From 098711ad3c6c486da5db13775a1779cc8832ee45 Mon Sep 17 00:00:00 2001 From: Jesse Friedman Date: Thu, 12 May 2016 15:17:50 -0400 Subject: [PATCH] improved getting started ui --- client/components/steps/get-started.jsx | 5 +- css/welcome-panel.css | 156 +- dist/ie-shims.js | 2313 ++- dist/ie-shims.js.map | 2 +- dist/jetpack-onboarding.css | 135 +- dist/jetpack-onboarding.css.map | 2 +- dist/jetpack-onboarding.js | 4784 +++++- dist/jetpack-onboarding.js.map | 2 +- dist/vendor.bundle.js | 19045 +++++++++++++++++++++- dist/vendor.bundle.js.map | 2 +- 10 files changed, 26408 insertions(+), 38 deletions(-) diff --git a/client/components/steps/get-started.jsx b/client/components/steps/get-started.jsx index 29e7d6a..bf54d1a 100644 --- a/client/components/steps/get-started.jsx +++ b/client/components/steps/get-started.jsx @@ -39,13 +39,14 @@ var GetStarted = React.createClass({

Welcome to WordPress

-

What kind of site can we help you set up?

+
+

What kind of site can we help you set up?

- + I don't need help

diff --git a/css/welcome-panel.css b/css/welcome-panel.css index f28a7d1..e78d805 100644 --- a/css/welcome-panel.css +++ b/css/welcome-panel.css @@ -9,7 +9,16 @@ margin: 0; padding: 0; list-style: none; } - .welcome__container input[type="text"], .welcome__container input[type="search"], .welcome__container input[type="email"], .welcome__container input[type="number"], .welcome__container input[type="password"], .welcome__container input[type=checkbox], .welcome__container .checkbox-tristate, .welcome__container input[type=radio], .welcome__container input[type="tel"], .welcome__container input[type="url"], .welcome__container textarea { + .welcome__container input[type="text"], + .welcome__container input[type="search"], + .welcome__container input[type="email"], + .welcome__container input[type="number"], + .welcome__container input[type="password"], + .welcome__container input[type=checkbox], .welcome__container .checkbox-tristate, + .welcome__container input[type=radio], + .welcome__container input[type="tel"], + .welcome__container input[type="url"], + .welcome__container textarea { margin: 0; padding: 7px 14px; width: 100%; @@ -21,35 +30,152 @@ -webkit-transition: all .15s ease-in-out; transition: all .15s ease-in-out; box-sizing: border-box; } - .welcome__container input[type="text"]::-webkit-input-placeholder, .welcome__container input[type="search"]::-webkit-input-placeholder, .welcome__container input[type="email"]::-webkit-input-placeholder, .welcome__container input[type="number"]::-webkit-input-placeholder, .welcome__container input[type="password"]::-webkit-input-placeholder, .welcome__container input[type=checkbox]::-webkit-input-placeholder, .welcome__container .checkbox-tristate::-webkit-input-placeholder, .welcome__container input[type=radio]::-webkit-input-placeholder, .welcome__container input[type="tel"]::-webkit-input-placeholder, .welcome__container input[type="url"]::-webkit-input-placeholder, .welcome__container textarea::-webkit-input-placeholder { + .welcome__container input[type="text"]::-webkit-input-placeholder, + .welcome__container input[type="search"]::-webkit-input-placeholder, + .welcome__container input[type="email"]::-webkit-input-placeholder, + .welcome__container input[type="number"]::-webkit-input-placeholder, + .welcome__container input[type="password"]::-webkit-input-placeholder, + .welcome__container input[type=checkbox]::-webkit-input-placeholder, .welcome__container .checkbox-tristate::-webkit-input-placeholder, + .welcome__container input[type=radio]::-webkit-input-placeholder, + .welcome__container input[type="tel"]::-webkit-input-placeholder, + .welcome__container input[type="url"]::-webkit-input-placeholder, + .welcome__container textarea::-webkit-input-placeholder { color: #999999; } - .welcome__container input[type="text"]::-moz-placeholder, .welcome__container input[type="search"]::-moz-placeholder, .welcome__container input[type="email"]::-moz-placeholder, .welcome__container input[type="number"]::-moz-placeholder, .welcome__container input[type="password"]::-moz-placeholder, .welcome__container input[type=checkbox]::-moz-placeholder, .welcome__container .checkbox-tristate::-moz-placeholder, .welcome__container input[type=radio]::-moz-placeholder, .welcome__container input[type="tel"]::-moz-placeholder, .welcome__container input[type="url"]::-moz-placeholder, .welcome__container textarea::-moz-placeholder { + .welcome__container input[type="text"]::-moz-placeholder, + .welcome__container input[type="search"]::-moz-placeholder, + .welcome__container input[type="email"]::-moz-placeholder, + .welcome__container input[type="number"]::-moz-placeholder, + .welcome__container input[type="password"]::-moz-placeholder, + .welcome__container input[type=checkbox]::-moz-placeholder, .welcome__container .checkbox-tristate::-moz-placeholder, + .welcome__container input[type=radio]::-moz-placeholder, + .welcome__container input[type="tel"]::-moz-placeholder, + .welcome__container input[type="url"]::-moz-placeholder, + .welcome__container textarea::-moz-placeholder { color: #999999; } - .welcome__container input[type="text"]:-ms-input-placeholder, .welcome__container input[type="search"]:-ms-input-placeholder, .welcome__container input[type="email"]:-ms-input-placeholder, .welcome__container input[type="number"]:-ms-input-placeholder, .welcome__container input[type="password"]:-ms-input-placeholder, .welcome__container input[type=checkbox]:-ms-input-placeholder, .welcome__container .checkbox-tristate:-ms-input-placeholder, .welcome__container input[type=radio]:-ms-input-placeholder, .welcome__container input[type="tel"]:-ms-input-placeholder, .welcome__container input[type="url"]:-ms-input-placeholder, .welcome__container textarea:-ms-input-placeholder { + .welcome__container input[type="text"]:-ms-input-placeholder, + .welcome__container input[type="search"]:-ms-input-placeholder, + .welcome__container input[type="email"]:-ms-input-placeholder, + .welcome__container input[type="number"]:-ms-input-placeholder, + .welcome__container input[type="password"]:-ms-input-placeholder, + .welcome__container input[type=checkbox]:-ms-input-placeholder, .welcome__container .checkbox-tristate:-ms-input-placeholder, + .welcome__container input[type=radio]:-ms-input-placeholder, + .welcome__container input[type="tel"]:-ms-input-placeholder, + .welcome__container input[type="url"]:-ms-input-placeholder, + .welcome__container textarea:-ms-input-placeholder { color: #999999; } - .welcome__container input[type="text"]::placeholder, .welcome__container input[type="search"]::placeholder, .welcome__container input[type="email"]::placeholder, .welcome__container input[type="number"]::placeholder, .welcome__container input[type="password"]::placeholder, .welcome__container input[type=checkbox]::placeholder, .welcome__container .checkbox-tristate::placeholder, .welcome__container input[type=radio]::placeholder, .welcome__container input[type="tel"]::placeholder, .welcome__container input[type="url"]::placeholder, .welcome__container textarea::placeholder { + .welcome__container input[type="text"]::placeholder, + .welcome__container input[type="search"]::placeholder, + .welcome__container input[type="email"]::placeholder, + .welcome__container input[type="number"]::placeholder, + .welcome__container input[type="password"]::placeholder, + .welcome__container input[type=checkbox]::placeholder, .welcome__container .checkbox-tristate::placeholder, + .welcome__container input[type=radio]::placeholder, + .welcome__container input[type="tel"]::placeholder, + .welcome__container input[type="url"]::placeholder, + .welcome__container textarea::placeholder { color: #999999; } - .welcome__container input[type="text"]:hover, .welcome__container input[type="search"]:hover, .welcome__container input[type="email"]:hover, .welcome__container input[type="number"]:hover, .welcome__container input[type="password"]:hover, .welcome__container input[type=checkbox]:hover, .welcome__container .checkbox-tristate:hover, .welcome__container input[type=radio]:hover, .welcome__container input[type="tel"]:hover, .welcome__container input[type="url"]:hover, .welcome__container textarea:hover { + .welcome__container input[type="text"]:hover, + .welcome__container input[type="search"]:hover, + .welcome__container input[type="email"]:hover, + .welcome__container input[type="number"]:hover, + .welcome__container input[type="password"]:hover, + .welcome__container input[type=checkbox]:hover, .welcome__container .checkbox-tristate:hover, + .welcome__container input[type=radio]:hover, + .welcome__container input[type="tel"]:hover, + .welcome__container input[type="url"]:hover, + .welcome__container textarea:hover { border-color: #b3b3b3; } - .welcome__container input[type="text"]:focus, .welcome__container input[type="search"]:focus, .welcome__container input[type="email"]:focus, .welcome__container input[type="number"]:focus, .welcome__container input[type="password"]:focus, .welcome__container input[type=checkbox]:focus, .welcome__container .checkbox-tristate:focus, .welcome__container input[type=radio]:focus, .welcome__container input[type="tel"]:focus, .welcome__container input[type="url"]:focus, .welcome__container textarea:focus { + .welcome__container input[type="text"]:focus, + .welcome__container input[type="search"]:focus, + .welcome__container input[type="email"]:focus, + .welcome__container input[type="number"]:focus, + .welcome__container input[type="password"]:focus, + .welcome__container input[type=checkbox]:focus, .welcome__container .checkbox-tristate:focus, + .welcome__container input[type=radio]:focus, + .welcome__container input[type="tel"]:focus, + .welcome__container input[type="url"]:focus, + .welcome__container textarea:focus { border-color: #0073AA; outline: none; box-shadow: 0 0 0 2px #008ec2; } - .welcome__container input[type="text"]:focus::-ms-clear, .welcome__container input[type="search"]:focus::-ms-clear, .welcome__container input[type="email"]:focus::-ms-clear, .welcome__container input[type="number"]:focus::-ms-clear, .welcome__container input[type="password"]:focus::-ms-clear, .welcome__container input[type=checkbox]:focus::-ms-clear, .welcome__container .checkbox-tristate:focus::-ms-clear, .welcome__container input[type=radio]:focus::-ms-clear, .welcome__container input[type="tel"]:focus::-ms-clear, .welcome__container input[type="url"]:focus::-ms-clear, .welcome__container textarea:focus::-ms-clear { + .welcome__container input[type="text"]:focus::-ms-clear, + .welcome__container input[type="search"]:focus::-ms-clear, + .welcome__container input[type="email"]:focus::-ms-clear, + .welcome__container input[type="number"]:focus::-ms-clear, + .welcome__container input[type="password"]:focus::-ms-clear, + .welcome__container input[type=checkbox]:focus::-ms-clear, .welcome__container .checkbox-tristate:focus::-ms-clear, + .welcome__container input[type=radio]:focus::-ms-clear, + .welcome__container input[type="tel"]:focus::-ms-clear, + .welcome__container input[type="url"]:focus::-ms-clear, + .welcome__container textarea:focus::-ms-clear { display: none; } - .welcome__container input[type="text"]:disabled, .welcome__container input[type="search"]:disabled, .welcome__container input[type="email"]:disabled, .welcome__container input[type="number"]:disabled, .welcome__container input[type="password"]:disabled, .welcome__container input[type=checkbox]:disabled, .welcome__container .checkbox-tristate:disabled, .welcome__container input[type=radio]:disabled, .welcome__container input[type="tel"]:disabled, .welcome__container input[type="url"]:disabled, .welcome__container textarea:disabled { + .welcome__container input[type="text"]:disabled, + .welcome__container input[type="search"]:disabled, + .welcome__container input[type="email"]:disabled, + .welcome__container input[type="number"]:disabled, + .welcome__container input[type="password"]:disabled, + .welcome__container input[type=checkbox]:disabled, .welcome__container .checkbox-tristate:disabled, + .welcome__container input[type=radio]:disabled, + .welcome__container input[type="tel"]:disabled, + .welcome__container input[type="url"]:disabled, + .welcome__container textarea:disabled { background: #f7f7f7; border-color: #e6e6e6; color: #b3b3b3; } - .welcome__container input[type="text"]:disabled:hover, .welcome__container input[type="search"]:disabled:hover, .welcome__container input[type="email"]:disabled:hover, .welcome__container input[type="number"]:disabled:hover, .welcome__container input[type="password"]:disabled:hover, .welcome__container input[type=checkbox]:disabled:hover, .welcome__container .checkbox-tristate:disabled:hover, .welcome__container input[type=radio]:disabled:hover, .welcome__container input[type="tel"]:disabled:hover, .welcome__container input[type="url"]:disabled:hover, .welcome__container textarea:disabled:hover { + .welcome__container input[type="text"]:disabled:hover, + .welcome__container input[type="search"]:disabled:hover, + .welcome__container input[type="email"]:disabled:hover, + .welcome__container input[type="number"]:disabled:hover, + .welcome__container input[type="password"]:disabled:hover, + .welcome__container input[type=checkbox]:disabled:hover, .welcome__container .checkbox-tristate:disabled:hover, + .welcome__container input[type=radio]:disabled:hover, + .welcome__container input[type="tel"]:disabled:hover, + .welcome__container input[type="url"]:disabled:hover, + .welcome__container textarea:disabled:hover { cursor: default; } - .welcome__container input[type="text"]:disabled::-webkit-input-placeholder, .welcome__container input[type="search"]:disabled::-webkit-input-placeholder, .welcome__container input[type="email"]:disabled::-webkit-input-placeholder, .welcome__container input[type="number"]:disabled::-webkit-input-placeholder, .welcome__container input[type="password"]:disabled::-webkit-input-placeholder, .welcome__container input[type=checkbox]:disabled::-webkit-input-placeholder, .welcome__container .checkbox-tristate:disabled::-webkit-input-placeholder, .welcome__container input[type=radio]:disabled::-webkit-input-placeholder, .welcome__container input[type="tel"]:disabled::-webkit-input-placeholder, .welcome__container input[type="url"]:disabled::-webkit-input-placeholder, .welcome__container textarea:disabled::-webkit-input-placeholder { + .welcome__container input[type="text"]:disabled::-webkit-input-placeholder, + .welcome__container input[type="search"]:disabled::-webkit-input-placeholder, + .welcome__container input[type="email"]:disabled::-webkit-input-placeholder, + .welcome__container input[type="number"]:disabled::-webkit-input-placeholder, + .welcome__container input[type="password"]:disabled::-webkit-input-placeholder, + .welcome__container input[type=checkbox]:disabled::-webkit-input-placeholder, .welcome__container .checkbox-tristate:disabled::-webkit-input-placeholder, + .welcome__container input[type=radio]:disabled::-webkit-input-placeholder, + .welcome__container input[type="tel"]:disabled::-webkit-input-placeholder, + .welcome__container input[type="url"]:disabled::-webkit-input-placeholder, + .welcome__container textarea:disabled::-webkit-input-placeholder { color: #b3b3b3; } - .welcome__container input[type="text"]:disabled::-moz-placeholder, .welcome__container input[type="search"]:disabled::-moz-placeholder, .welcome__container input[type="email"]:disabled::-moz-placeholder, .welcome__container input[type="number"]:disabled::-moz-placeholder, .welcome__container input[type="password"]:disabled::-moz-placeholder, .welcome__container input[type=checkbox]:disabled::-moz-placeholder, .welcome__container .checkbox-tristate:disabled::-moz-placeholder, .welcome__container input[type=radio]:disabled::-moz-placeholder, .welcome__container input[type="tel"]:disabled::-moz-placeholder, .welcome__container input[type="url"]:disabled::-moz-placeholder, .welcome__container textarea:disabled::-moz-placeholder { + .welcome__container input[type="text"]:disabled::-moz-placeholder, + .welcome__container input[type="search"]:disabled::-moz-placeholder, + .welcome__container input[type="email"]:disabled::-moz-placeholder, + .welcome__container input[type="number"]:disabled::-moz-placeholder, + .welcome__container input[type="password"]:disabled::-moz-placeholder, + .welcome__container input[type=checkbox]:disabled::-moz-placeholder, .welcome__container .checkbox-tristate:disabled::-moz-placeholder, + .welcome__container input[type=radio]:disabled::-moz-placeholder, + .welcome__container input[type="tel"]:disabled::-moz-placeholder, + .welcome__container input[type="url"]:disabled::-moz-placeholder, + .welcome__container textarea:disabled::-moz-placeholder { color: #b3b3b3; } - .welcome__container input[type="text"]:disabled:-ms-input-placeholder, .welcome__container input[type="search"]:disabled:-ms-input-placeholder, .welcome__container input[type="email"]:disabled:-ms-input-placeholder, .welcome__container input[type="number"]:disabled:-ms-input-placeholder, .welcome__container input[type="password"]:disabled:-ms-input-placeholder, .welcome__container input[type=checkbox]:disabled:-ms-input-placeholder, .welcome__container .checkbox-tristate:disabled:-ms-input-placeholder, .welcome__container input[type=radio]:disabled:-ms-input-placeholder, .welcome__container input[type="tel"]:disabled:-ms-input-placeholder, .welcome__container input[type="url"]:disabled:-ms-input-placeholder, .welcome__container textarea:disabled:-ms-input-placeholder { + .welcome__container input[type="text"]:disabled:-ms-input-placeholder, + .welcome__container input[type="search"]:disabled:-ms-input-placeholder, + .welcome__container input[type="email"]:disabled:-ms-input-placeholder, + .welcome__container input[type="number"]:disabled:-ms-input-placeholder, + .welcome__container input[type="password"]:disabled:-ms-input-placeholder, + .welcome__container input[type=checkbox]:disabled:-ms-input-placeholder, .welcome__container .checkbox-tristate:disabled:-ms-input-placeholder, + .welcome__container input[type=radio]:disabled:-ms-input-placeholder, + .welcome__container input[type="tel"]:disabled:-ms-input-placeholder, + .welcome__container input[type="url"]:disabled:-ms-input-placeholder, + .welcome__container textarea:disabled:-ms-input-placeholder { color: #b3b3b3; } - .welcome__container input[type="text"]:disabled::placeholder, .welcome__container input[type="search"]:disabled::placeholder, .welcome__container input[type="email"]:disabled::placeholder, .welcome__container input[type="number"]:disabled::placeholder, .welcome__container input[type="password"]:disabled::placeholder, .welcome__container input[type=checkbox]:disabled::placeholder, .welcome__container .checkbox-tristate:disabled::placeholder, .welcome__container input[type=radio]:disabled::placeholder, .welcome__container input[type="tel"]:disabled::placeholder, .welcome__container input[type="url"]:disabled::placeholder, .welcome__container textarea:disabled::placeholder { + .welcome__container input[type="text"]:disabled::placeholder, + .welcome__container input[type="search"]:disabled::placeholder, + .welcome__container input[type="email"]:disabled::placeholder, + .welcome__container input[type="number"]:disabled::placeholder, + .welcome__container input[type="password"]:disabled::placeholder, + .welcome__container input[type=checkbox]:disabled::placeholder, .welcome__container .checkbox-tristate:disabled::placeholder, + .welcome__container input[type=radio]:disabled::placeholder, + .welcome__container input[type="tel"]:disabled::placeholder, + .welcome__container input[type="url"]:disabled::placeholder, + .welcome__container textarea:disabled::placeholder { color: #b3b3b3; } .welcome__container textarea { min-height: 92px; } @@ -405,6 +531,7 @@ border-radius: 2px; border: 2px solid #888; -webkit-transform: translate(-50%, 0); + -ms-transform: translate(-50%, 0); transform: translate(-50%, 0); } .welcome__loading-message * { vertical-align: middle; } @@ -434,6 +561,7 @@ img.welcome__get-started-image { bottom: 0; left: 50%; -webkit-transform: translateX(-50%); + -ms-transform: translateX(-50%); transform: translateX(-50%); } @media (max-width: 550px), (max-height: 550px) { img.welcome__get-started-image { diff --git a/dist/ie-shims.js b/dist/ie-shims.js index 9455d19..e6a3350 100644 --- a/dist/ie-shims.js +++ b/dist/ie-shims.js @@ -1,2 +1,2313 @@ -webpackJsonp([0],[function(t,e,r){"use strict";r(1),r(2)},function(t,e,r){var n,o;!function(i,a){"use strict";n=a,o="function"==typeof n?n.call(e,r,e,t):n,!(void 0!==o&&(t.exports=o))}(this,function(){var t,e,r=Array,n=r.prototype,o=Object,i=o.prototype,a=Function,c=a.prototype,u=String,f=u.prototype,l=Number,s=l.prototype,p=n.slice,h=n.splice,y=n.push,d=n.unshift,b=n.concat,g=n.join,v=c.call,w=c.apply,O=Math.max,j=Math.min,T=i.toString,m="function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag,D=Function.prototype.toString,E=/^\s*class /,x=function(t){try{var e=D.call(t),r=e.replace(/\/\/.*\n/g,""),n=r.replace(/\/\*[.\s\S]*\*\//g,""),o=n.replace(/\n/gm," ").replace(/ {2}/g," ");return E.test(o)}catch(i){return!1}},S=function(t){try{return x(t)?!1:(D.call(t),!0)}catch(e){return!1}},_="[object Function]",M="[object GeneratorFunction]",t=function(t){if(!t)return!1;if("function"!=typeof t&&"object"!=typeof t)return!1;if(m)return S(t);if(x(t))return!1;var e=T.call(t);return e===_||e===M},I=RegExp.prototype.exec,P=function(t){try{return I.call(t),!0}catch(e){return!1}},F="[object RegExp]";e=function(t){return"object"!=typeof t?!1:m?P(t):T.call(t)===F};var U,N=String.prototype.valueOf,k=function(t){try{return N.call(t),!0}catch(e){return!1}},C="[object String]";U=function(t){return"string"==typeof t?!0:"object"!=typeof t?!1:m?k(t):T.call(t)===C};var A=o.defineProperty&&function(){try{var t={};o.defineProperty(t,"x",{enumerable:!1,value:t});for(var e in t)return!1;return t.x===t}catch(r){return!1}}(),R=function(t){var e;return e=A?function(t,e,r,n){!n&&e in t||o.defineProperty(t,e,{configurable:!0,enumerable:!1,writable:!0,value:r})}:function(t,e,r,n){!n&&e in t||(t[e]=r)},function(r,n,o){for(var i in n)t.call(n,i)&&e(r,i,n[i],o)}}(i.hasOwnProperty),$=function(t){var e=typeof t;return null===t||"object"!==e&&"function"!==e},z=l.isNaN||function(t){return t!==t},J={ToInteger:function(t){var e=+t;return z(e)?e=0:0!==e&&e!==1/0&&e!==-(1/0)&&(e=(e>0||-1)*Math.floor(Math.abs(e))),e},ToPrimitive:function(e){var r,n,o;if($(e))return e;if(n=e.valueOf,t(n)&&(r=n.call(e),$(r)))return r;if(o=e.toString,t(o)&&(r=o.call(e),$(r)))return r;throw new TypeError},ToObject:function(t){if(null==t)throw new TypeError("can't convert "+t+" to object");return o(t)},ToUint32:function(t){return t>>>0}},G=function(){};R(c,{bind:function(e){var r=this;if(!t(r))throw new TypeError("Function.prototype.bind called on incompatible "+r);for(var n,i=p.call(arguments,1),c=function(){if(this instanceof n){var t=w.call(r,this,b.call(i,p.call(arguments)));return o(t)===t?t:this}return w.call(r,e,b.call(i,p.call(arguments)))},u=O(0,r.length-i.length),f=[],l=0;u>l;l++)y.call(f,"$"+l);return n=a("binder","return function ("+g.call(f,",")+"){ return binder.apply(this, arguments); }")(c),r.prototype&&(G.prototype=r.prototype,n.prototype=new G,G.prototype=null),n}});var Z=v.bind(i.hasOwnProperty),Y=v.bind(i.toString),W=v.bind(p),B=w.bind(p),X=v.bind(f.slice),H=v.bind(f.split),L=v.bind(f.indexOf),q=v.bind(y),K=v.bind(i.propertyIsEnumerable),Q=v.bind(n.sort),V=r.isArray||function(t){return"[object Array]"===Y(t)},tt=1!==[].unshift(0);R(n,{unshift:function(){return d.apply(this,arguments),this.length}},tt),R(r,{isArray:V});var et=o("a"),rt="a"!==et[0]||!(0 in et),nt=function(t){var e=!0,r=!0,n=!1;if(t)try{t.call("foo",function(t,r,n){"object"!=typeof n&&(e=!1)}),t.call([1],function(){"use strict";r="string"==typeof this},"x")}catch(o){n=!0}return!!t&&!n&&e&&r};R(n,{forEach:function(e){var r,n=J.ToObject(this),o=rt&&U(this)?H(this,""):n,i=-1,a=J.ToUint32(o.length);if(arguments.length>1&&(r=arguments[1]),!t(e))throw new TypeError("Array.prototype.forEach callback must be a function");for(;++i1&&(n=arguments[1]),!t(e))throw new TypeError("Array.prototype.map callback must be a function");for(var u=0;a>u;u++)u in i&&("undefined"==typeof n?c[u]=e(i[u],u,o):c[u]=e.call(n,i[u],u,o));return c}},!nt(n.map)),R(n,{filter:function(e){var r,n,o=J.ToObject(this),i=rt&&U(this)?H(this,""):o,a=J.ToUint32(i.length),c=[];if(arguments.length>1&&(n=arguments[1]),!t(e))throw new TypeError("Array.prototype.filter callback must be a function");for(var u=0;a>u;u++)u in i&&(r=i[u],("undefined"==typeof n?e(r,u,o):e.call(n,r,u,o))&&q(c,r));return c}},!nt(n.filter)),R(n,{every:function(e){var r,n=J.ToObject(this),o=rt&&U(this)?H(this,""):n,i=J.ToUint32(o.length);if(arguments.length>1&&(r=arguments[1]),!t(e))throw new TypeError("Array.prototype.every callback must be a function");for(var a=0;i>a;a++)if(a in o&&!("undefined"==typeof r?e(o[a],a,n):e.call(r,o[a],a,n)))return!1;return!0}},!nt(n.every)),R(n,{some:function(e){var r,n=J.ToObject(this),o=rt&&U(this)?H(this,""):n,i=J.ToUint32(o.length);if(arguments.length>1&&(r=arguments[1]),!t(e))throw new TypeError("Array.prototype.some callback must be a function");for(var a=0;i>a;a++)if(a in o&&("undefined"==typeof r?e(o[a],a,n):e.call(r,o[a],a,n)))return!0;return!1}},!nt(n.some));var ot=!1;n.reduce&&(ot="object"==typeof n.reduce.call("es5",function(t,e,r,n){return n})),R(n,{reduce:function(e){var r=J.ToObject(this),n=rt&&U(this)?H(this,""):r,o=J.ToUint32(n.length);if(!t(e))throw new TypeError("Array.prototype.reduce callback must be a function");if(0===o&&1===arguments.length)throw new TypeError("reduce of empty array with no initial value");var i,a=0;if(arguments.length>=2)i=arguments[1];else for(;;){if(a in n){i=n[a++];break}if(++a>=o)throw new TypeError("reduce of empty array with no initial value")}for(;o>a;a++)a in n&&(i=e(i,n[a],a,r));return i}},!ot);var it=!1;n.reduceRight&&(it="object"==typeof n.reduceRight.call("es5",function(t,e,r,n){return n})),R(n,{reduceRight:function(e){var r=J.ToObject(this),n=rt&&U(this)?H(this,""):r,o=J.ToUint32(n.length);if(!t(e))throw new TypeError("Array.prototype.reduceRight callback must be a function");if(0===o&&1===arguments.length)throw new TypeError("reduceRight of empty array with no initial value");var i,a=o-1;if(arguments.length>=2)i=arguments[1];else for(;;){if(a in n){i=n[a--];break}if(--a<0)throw new TypeError("reduceRight of empty array with no initial value")}if(0>a)return i;do a in n&&(i=e(i,n[a],a,r));while(a--);return i}},!it);var at=n.indexOf&&-1!==[0,1].indexOf(1,2);R(n,{indexOf:function(t){var e=rt&&U(this)?H(this,""):J.ToObject(this),r=J.ToUint32(e.length);if(0===r)return-1;var n=0;for(arguments.length>1&&(n=J.ToInteger(arguments[1])),n=n>=0?n:O(0,r+n);r>n;n++)if(n in e&&e[n]===t)return n;return-1}},at);var ct=n.lastIndexOf&&-1!==[0,1].lastIndexOf(0,-3);R(n,{lastIndexOf:function(t){var e=rt&&U(this)?H(this,""):J.ToObject(this),r=J.ToUint32(e.length);if(0===r)return-1;var n=r-1;for(arguments.length>1&&(n=j(n,J.ToInteger(arguments[1]))),n=n>=0?n:r-Math.abs(n);n>=0;n--)if(n in e&&t===e[n])return n;return-1}},ct);var ut=function(){var t=[1,2],e=t.splice();return 2===t.length&&V(e)&&0===e.length}();R(n,{splice:function(t,e){return 0===arguments.length?[]:h.apply(this,arguments)}},!ut);var ft=function(){var t={};return n.splice.call(t,0,0,1),1===t.length}();R(n,{splice:function(t,e){if(0===arguments.length)return[];var r=arguments;return this.length=O(J.ToInteger(this.length),0),arguments.length>0&&"number"!=typeof e&&(r=W(arguments),r.length<2?q(r,this.length-t):r[1]=J.ToInteger(e)),h.apply(this,r)}},!ft);var lt=function(){var t=new r(1e5);return t[8]="x",t.splice(1,1),7===t.indexOf("x")}(),st=function(){var t=256,e=[];return e[t]="a",e.splice(t+1,0,"b"),"a"===e[t]}();R(n,{splice:function(t,e){for(var r,n=J.ToObject(this),o=[],i=J.ToUint32(n.length),a=J.ToInteger(t),c=0>a?O(i+a,0):j(a,i),f=j(O(J.ToInteger(e),0),i-c),l=0;f>l;)r=u(c+l),Z(n,r)&&(o[l]=n[r]),l+=1;var s,p=W(arguments,2),h=p.length;if(f>h){l=c;for(var y=i-f;y>l;)r=u(l+f),s=u(l+h),Z(n,r)?n[s]=n[r]:delete n[s],l+=1;l=i;for(var d=i-f+h;l>d;)delete n[l-1],l-=1}else if(h>f)for(l=i-f;l>c;)r=u(l+f-1),s=u(l+h-1),Z(n,r)?n[s]=n[r]:delete n[s],l-=1;l=c;for(var b=0;b=0&&!V(e)&&t(e.callee)},Ut=Pt(arguments)?Pt:Ft;R(o,{keys:function(e){var r=t(e),n=Ut(e),o=null!==e&&"object"==typeof e,i=o&&U(e);if(!o&&!r&&!n)throw new TypeError("Object.keys called on a non-object");var a=[],c=mt&&r;if(i&&Dt||n)for(var f=0;fp;p++){var h=Mt[p];s&&"constructor"===h||!Z(e,h)||q(a,h)}return a}});var Nt=o.keys&&function(){return 2===o.keys(arguments).length}(1,2),kt=o.keys&&function(){var t=o.keys(arguments);return 1!==arguments.length||1!==t.length||1!==t[0]}(1),Ct=o.keys;R(o,{keys:function(t){return Ct(Ut(t)?W(t):t)}},!Nt||kt);var At,Rt,$t=0!==new Date(-0xc782b5b342b24).getUTCMonth(),zt=new Date(-0x55d318d56a724),Jt=new Date(14496624e5),Gt="Mon, 01 Jan -45875 11:59:59 GMT"!==zt.toUTCString(),Zt=zt.getTimezoneOffset();-720>Zt?(At="Tue Jan 02 -45875"!==zt.toDateString(),Rt=!/^Thu Dec 10 2015 \d\d:\d\d:\d\d GMT[-\+]\d\d\d\d(?: |$)/.test(Jt.toString())):(At="Mon Jan 01 -45875"!==zt.toDateString(),Rt=!/^Wed Dec 09 2015 \d\d:\d\d:\d\d GMT[-\+]\d\d\d\d(?: |$)/.test(Jt.toString()));var Yt=v.bind(Date.prototype.getFullYear),Wt=v.bind(Date.prototype.getMonth),Bt=v.bind(Date.prototype.getDate),Xt=v.bind(Date.prototype.getUTCFullYear),Ht=v.bind(Date.prototype.getUTCMonth),Lt=v.bind(Date.prototype.getUTCDate),qt=v.bind(Date.prototype.getUTCDay),Kt=v.bind(Date.prototype.getUTCHours),Qt=v.bind(Date.prototype.getUTCMinutes),Vt=v.bind(Date.prototype.getUTCSeconds),te=v.bind(Date.prototype.getUTCMilliseconds),ee=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],re=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],ne=function(t,e){return Bt(new Date(e,t,0))};R(Date.prototype,{getFullYear:function(){if(!(this&&this instanceof Date))throw new TypeError("this is not a Date object.");var t=Yt(this);return 0>t&&Wt(this)>11?t+1:t},getMonth:function(){if(!(this&&this instanceof Date))throw new TypeError("this is not a Date object.");var t=Yt(this),e=Wt(this);return 0>t&&e>11?0:e},getDate:function(){if(!(this&&this instanceof Date))throw new TypeError("this is not a Date object.");var t=Yt(this),e=Wt(this),r=Bt(this);if(0>t&&e>11){if(12===e)return r;var n=ne(0,t+1);return n-r+1}return r},getUTCFullYear:function(){if(!(this&&this instanceof Date))throw new TypeError("this is not a Date object.");var t=Xt(this);return 0>t&&Ht(this)>11?t+1:t},getUTCMonth:function(){if(!(this&&this instanceof Date))throw new TypeError("this is not a Date object.");var t=Xt(this),e=Ht(this);return 0>t&&e>11?0:e},getUTCDate:function(){if(!(this&&this instanceof Date))throw new TypeError("this is not a Date object.");var t=Xt(this),e=Ht(this),r=Lt(this);if(0>t&&e>11){if(12===e)return r;var n=ne(0,t+1);return n-r+1}return r}},$t),R(Date.prototype,{toUTCString:function(){if(!(this&&this instanceof Date))throw new TypeError("this is not a Date object.");var t=qt(this),e=Lt(this),r=Ht(this),n=Xt(this),o=Kt(this),i=Qt(this),a=Vt(this);return ee[t]+", "+(10>e?"0"+e:e)+" "+re[r]+" "+n+" "+(10>o?"0"+o:o)+":"+(10>i?"0"+i:i)+":"+(10>a?"0"+a:a)+" GMT"}},$t||Gt),R(Date.prototype,{toDateString:function(){if(!(this&&this instanceof Date))throw new TypeError("this is not a Date object.");var t=this.getDay(),e=this.getDate(),r=this.getMonth(),n=this.getFullYear();return ee[t]+" "+re[r]+" "+(10>e?"0"+e:e)+" "+n}},$t||At),($t||Rt)&&(Date.prototype.toString=function(){if(!(this&&this instanceof Date))throw new TypeError("this is not a Date object.");var t=this.getDay(),e=this.getDate(),r=this.getMonth(),n=this.getFullYear(),o=this.getHours(),i=this.getMinutes(),a=this.getSeconds(),c=this.getTimezoneOffset(),u=Math.floor(Math.abs(c)/60),f=Math.floor(Math.abs(c)%60);return ee[t]+" "+re[r]+" "+(10>e?"0"+e:e)+" "+n+" "+(10>o?"0"+o:o)+":"+(10>i?"0"+i:i)+":"+(10>a?"0"+a:a)+" GMT"+(c>0?"-":"+")+(10>u?"0"+u:u)+(10>f?"0"+f:f)},A&&o.defineProperty(Date.prototype,"toString",{configurable:!0,enumerable:!1,writable:!0}));var oe=-621987552e5,ie="-000001",ae=Date.prototype.toISOString&&-1===new Date(oe).toISOString().indexOf(ie),ce=Date.prototype.toISOString&&"1969-12-31T23:59:59.999Z"!==new Date(-1).toISOString(),ue=v.bind(Date.prototype.getTime);R(Date.prototype,{toISOString:function(){if(!isFinite(this)||!isFinite(ue(this)))throw new RangeError("Date.prototype.toISOString called on non-finite value.");var t=Xt(this),e=Ht(this);t+=Math.floor(e/12),e=(e%12+12)%12;var r=[e+1,Lt(this),Kt(this),Qt(this),Vt(this)];t=(0>t?"-":t>9999?"+":"")+X("00000"+Math.abs(t),t>=0&&9999>=t?-4:-6);for(var n=0;n=7&&f>he){var y=Math.floor(f/he)*he,d=Math.floor(y/1e3);p+=d,h-=1e3*d}l=1===s&&u(r)===r?new t(e.parse(r)):s>=7?new t(r,n,o,i,a,p,h):s>=6?new t(r,n,o,i,a,p):s>=5?new t(r,n,o,i,a):s>=4?new t(r,n,o,i):s>=3?new t(r,n,o):s>=2?new t(r,n):s>=1?new t(r instanceof t?+r:r):new t}else l=t.apply(this,arguments);return $(l)||R(l,{constructor:e},!0),l},r=new RegExp("^(\\d{4}|[+-]\\d{6})(?:-(\\d{2})(?:-(\\d{2})(?:T(\\d{2}):(\\d{2})(?::(\\d{2})(?:(\\.\\d{1,}))?)?(Z|(?:([-+])(\\d{2}):(\\d{2})))?)?)?)?$"),n=[0,31,59,90,120,151,181,212,243,273,304,334,365],o=function(t,e){var r=e>1?1:0;return n[e]+Math.floor((t-1969+r)/4)-Math.floor((t-1901+r)/100)+Math.floor((t-1601+r)/400)+365*(t-1970)},i=function(e){var r=0,n=e;if(ye&&n>he){var o=Math.floor(n/he)*he,i=Math.floor(o/1e3);r+=i,n-=1e3*i}return l(new t(1970,0,1,0,0,r,n))};for(var a in t)Z(t,a)&&(e[a]=t[a]);R(e,{now:t.now,UTC:t.UTC},!0),e.prototype=t.prototype,R(e.prototype,{constructor:e},!0);var c=function(e){var n=r.exec(e);if(n){var a,c=l(n[1]),u=l(n[2]||1)-1,f=l(n[3]||1)-1,s=l(n[4]||0),p=l(n[5]||0),h=l(n[6]||0),y=Math.floor(1e3*l(n[7]||0)),d=Boolean(n[4]&&!n[8]),b="-"===n[9]?1:-1,g=l(n[10]||0),v=l(n[11]||0),w=p>0||h>0||y>0;return(w?24:25)>s&&60>p&&60>h&&1e3>y&&u>-1&&12>u&&24>g&&60>v&&f>-1&&f=-864e13&&864e13>=a)?a:NaN}return t.parse.apply(this,arguments)};return R(e,{parse:c}),e}(Date)}Date.now||(Date.now=function(){return(new Date).getTime()});var de=s.toFixed&&("0.000"!==8e-5.toFixed(3)||"1"!==.9.toFixed(0)||"1.25"!==1.255.toFixed(2)||"1000000000000000128"!==0xde0b6b3a7640080.toFixed(0)),be={base:1e7,size:6,data:[0,0,0,0,0,0],multiply:function(t,e){for(var r=-1,n=e;++r=0;)r+=be.data[e],be.data[e]=Math.floor(r/t),r=r%t*be.base},numToString:function(){for(var t=be.size,e="";--t>=0;)if(""!==e||0===t||0!==be.data[t]){var r=u(be.data[t]);""===e?e=r:e+=X("0000000",0,7-r.length)+r}return e},pow:function Ce(t,e,r){return 0===e?r:e%2===1?Ce(t,e-1,r*t):Ce(t*t,e/2,r)},log:function(t){for(var e=0,r=t;r>=4096;)e+=12,r/=4096;for(;r>=2;)e+=1,r/=2;return e}},ge=function(t){var e,r,n,o,i,a,c,f;if(e=l(t),e=z(e)?0:Math.floor(e),0>e||e>20)throw new RangeError("Number.toFixed called with invalid number of decimals");if(r=l(this),z(r))return"NaN";if(-1e21>=r||r>=1e21)return u(r);if(n="",0>r&&(n="-",r=-r),o="0",r>1e-21)if(i=be.log(r*be.pow(2,69,1))-69,a=0>i?r*be.pow(2,-i,1):r/be.pow(2,i,1),a*=4503599627370496,i=52-i,i>0){for(be.multiply(0,a),c=e;c>=7;)be.multiply(1e7,0),c-=7;for(be.multiply(be.pow(10,c,1),0),c=i-1;c>=23;)be.divide(1<<23),c-=23;be.divide(1<0?(f=o.length,o=e>=f?n+X("0.0000000000000000000",0,e-f+2)+o:n+X(o,0,f-e)+"."+X(o,f-e)):o=n+o,o};R(s,{toFixed:ge},de);var ve=function(){try{return"1"===1..toPrecision(void 0)}catch(t){return!0}}(),we=s.toPrecision;R(s,{toPrecision:function(t){return"undefined"==typeof t?we.call(this):we.call(this,t)}},ve),2!=="ab".split(/(?:ab)*/).length||4!==".".split(/(.?)(.?)/).length||"t"==="tesst".split(/(s)*/)[1]||4!=="test".split(/(?:)/,-1).length||"".split(/.?/).length||".".split(/()()/).length>1?!function(){var t="undefined"==typeof/()??/.exec("")[1],r=Math.pow(2,32)-1;f.split=function(n,o){var i=String(this);if("undefined"==typeof n&&0===o)return[];if(!e(n))return H(this,n,o);var a,c,u,f,l=[],s=(n.ignoreCase?"i":"")+(n.multiline?"m":"")+(n.unicode?"u":"")+(n.sticky?"y":""),p=0,h=new RegExp(n.source,s+"g");t||(a=new RegExp("^"+h.source+"$(?!\\s)",s));var d="undefined"==typeof o?r:J.ToUint32(o);for(c=h.exec(i);c&&(u=c.index+c[0].length,!(u>p&&(q(l,X(i,p,c.index)),!t&&c.length>1&&c[0].replace(a,function(){for(var t=1;t1&&c.index=d)));)h.lastIndex===c.index&&h.lastIndex++,c=h.exec(i);return p===i.length?!f&&h.test("")||q(l,""):q(l,X(i,p)),l.length>d?W(l,0,d):l}}():"0".split(void 0,0).length&&(f.split=function(t,e){return"undefined"==typeof t&&0===e?[]:H(this,t,e)});var Oe=f.replace,je=function(){var t=[];return"x".replace(/x(.)?/g,function(e,r){q(t,r)}),1===t.length&&"undefined"==typeof t[0]}();je||(f.replace=function(r,n){var o=t(n),i=e(r)&&/\)[*?]/.test(r.source);if(o&&i){var a=function(t){var e=arguments.length,o=r.lastIndex;r.lastIndex=0;var i=r.exec(t)||[];return r.lastIndex=o,q(i,arguments[e-2],arguments[e-1]),n.apply(this,i)};return Oe.call(this,r,a)}return Oe.call(this,r,n)});var Te=f.substr,me="".substr&&"b"!=="0b".substr(-1);R(f,{substr:function(t,e){var r=t;return 0>t&&(r=O(this.length+t,0)),Te.call(this,r,e)}},me);var De=" \n\x0B\f\r   ᠎              \u2028\u2029\ufeff",Ee="​",xe="["+De+"]",Se=new RegExp("^"+xe+xe+"*"),_e=new RegExp(xe+xe+"*$"),Me=f.trim&&(De.trim()||!Ee.trim());R(f,{trim:function(){if("undefined"==typeof this||null===this)throw new TypeError("can't convert "+this+" to object");return u(this).replace(Se,"").replace(_e,"")}},Me);var Ie=v.bind(String.prototype.trim),Pe=f.lastIndexOf&&-1!=="abcあい".lastIndexOf("あい",2);R(f,{lastIndexOf:function(t){if("undefined"==typeof this||null===this)throw new TypeError("can't convert "+this+" to object");for(var e=u(this),r=u(t),n=arguments.length>1?l(arguments[1]):NaN,o=z(n)?1/0:J.ToInteger(n),i=j(O(o,0),e.length),a=r.length,c=i+a;c>0;){c=O(0,c-a);var f=L(X(e,c,i+a),r);if(-1!==f)return c+f}return-1}},Pe);var Fe=f.lastIndexOf;if(R(f,{lastIndexOf:function(t){return Fe.apply(this,arguments)}},1!==f.lastIndexOf.length),8===parseInt(De+"08")&&22===parseInt(De+"0x16")||(parseInt=function(t){var e=/^[\-+]?0[xX]/;return function(r,n){var o=Ie(r),i=l(n)||(e.test(o)?16:10);return t(o,i)}}(parseInt)),1/parseFloat("-0")!==-(1/0)&&(parseFloat=function(t){return function(e){var r=Ie(e),n=t(r);return 0===n&&"-"===X(r,0,1)?-0:n}}(parseFloat)),"RangeError: test"!==String(new RangeError("test"))){var Ue=function(){if("undefined"==typeof this||null===this)throw new TypeError("can't convert "+this+" to object");var t=this.name;"undefined"==typeof t?t="Error":"string"!=typeof t&&(t=u(t));var e=this.message;return"undefined"==typeof e?e="":"string"!=typeof e&&(e=u(e)),t?e?t+": "+e:t:e};Error.prototype.toString=Ue}if(A){var Ne=function(t,e){if(K(t,e)){var r=Object.getOwnPropertyDescriptor(t,e);r.configurable&&(r.enumerable=!1,Object.defineProperty(t,e,r))}};Ne(Error.prototype,"message"),""!==Error.prototype.message&&(Error.prototype.message=""),Ne(Error.prototype,"name")}if("/a/gim"!==String(/a/gim)){var ke=function(){var t="/"+this.source+"/";return this.global&&(t+="g"),this.ignoreCase&&(t+="i"),this.multiline&&(t+="m"),t};RegExp.prototype.toString=ke}})},function(t,e,r){var n,o;!function(i,a){"use strict";n=a,o="function"==typeof n?n.call(e,r,e,t):n,!(void 0!==o&&(t.exports=o))}(this,function(){var t,e,r,n,o=Function.call,i=Object.prototype,a=o.bind(i.hasOwnProperty),c=o.bind(i.propertyIsEnumerable),u=o.bind(i.toString),f=a(i,"__defineGetter__");f&&(t=o.bind(i.__defineGetter__),e=o.bind(i.__defineSetter__),r=o.bind(i.__lookupGetter__),n=o.bind(i.__lookupSetter__)),Object.getPrototypeOf||(Object.getPrototypeOf=function(t){var e=t.__proto__;return e||null===e?e:"[object Function]"===u(t.constructor)?t.constructor.prototype:t instanceof Object?i:null});var l=function(t){try{return t.sentinel=0,0===Object.getOwnPropertyDescriptor(t,"sentinel").value}catch(e){return!1}};if(Object.defineProperty){var s=l({}),p="undefined"==typeof document||l(document.createElement("div"));if(!p||!s)var h=Object.getOwnPropertyDescriptor}if(!Object.getOwnPropertyDescriptor||h){var y="Object.getOwnPropertyDescriptor called on a non-object: ";Object.getOwnPropertyDescriptor=function(t,e){if("object"!=typeof t&&"function"!=typeof t||null===t)throw new TypeError(y+t);if(h)try{return h.call(Object,t,e)}catch(o){}var u;if(!a(t,e))return u;if(u={enumerable:c(t,e),configurable:!0},f){var l=t.__proto__,s=t!==i;s&&(t.__proto__=i);var p=r(t,e),d=n(t,e);if(s&&(t.__proto__=l),p||d)return p&&(u.get=p),d&&(u.set=d),u}return u.value=t[e],u.writable=!0,u}}if(Object.getOwnPropertyNames||(Object.getOwnPropertyNames=function(t){return Object.keys(t)}),!Object.create){var d,b=!({__proto__:null}instanceof Object),g=function(){if(!document.domain)return!1;try{return!!new ActiveXObject("htmlfile")}catch(t){return!1}},v=function(){var t,e;e=new ActiveXObject("htmlfile");var r="script";return e.write("<"+r+">"),e.close(),t=e.parentWindow.Object.prototype,e=null,t},w=function(){var t,e=document.createElement("iframe"),r=document.body||document.documentElement;return e.style.display="none",r.appendChild(e),e.src="javascript:",t=e.contentWindow.Object.prototype,r.removeChild(e),e=null,t};d=b||"undefined"==typeof document?function(){return{__proto__:null}}:function(){var t=g()?v():w();delete t.constructor,delete t.hasOwnProperty,delete t.propertyIsEnumerable,delete t.isPrototypeOf,delete t.toLocaleString,delete t.toString,delete t.valueOf;var e=function(){};return e.prototype=t,d=function(){return new e},new e},Object.create=function(t,e){var r,n=function(){};if(null===t)r=d();else{if("object"!=typeof t&&"function"!=typeof t)throw new TypeError("Object prototype may only be an Object or null");n.prototype=t,r=new n,r.__proto__=t}return void 0!==e&&Object.defineProperties(r,e),r}}var O=function(t){try{return Object.defineProperty(t,"sentinel",{}),"sentinel"in t}catch(e){return!1}};if(Object.defineProperty){var j=O({}),T="undefined"==typeof document||O(document.createElement("div"));if(!j||!T)var m=Object.defineProperty,D=Object.defineProperties}if(!Object.defineProperty||m){var E="Property description must be an object: ",x="Object.defineProperty called on non-object: ",S="getters & setters can not be defined on this javascript engine";Object.defineProperty=function(o,a,c){if("object"!=typeof o&&"function"!=typeof o||null===o)throw new TypeError(x+o);if("object"!=typeof c&&"function"!=typeof c||null===c)throw new TypeError(E+c);if(m)try{return m.call(Object,o,a,c)}catch(u){}if("value"in c)if(f&&(r(o,a)||n(o,a))){var l=o.__proto__;o.__proto__=i,delete o[a],o[a]=c.value,o.__proto__=l}else o[a]=c.value;else{if(!f&&("get"in c||"set"in c))throw new TypeError(S);"get"in c&&t(o,a,c.get),"set"in c&&e(o,a,c.set)}return o}}Object.defineProperties&&!D||(Object.defineProperties=function(t,e){if(D)try{return D.call(Object,t,e)}catch(r){}return Object.keys(e).forEach(function(r){"__proto__"!==r&&Object.defineProperty(t,r,e[r])}),t}),Object.seal||(Object.seal=function(t){if(Object(t)!==t)throw new TypeError("Object.seal can only be called on Objects.");return t}),Object.freeze||(Object.freeze=function(t){if(Object(t)!==t)throw new TypeError("Object.freeze can only be called on Objects.");return t});try{Object.freeze(function(){})}catch(_){Object.freeze=function(t){return function(e){return"function"==typeof e?e:t(e)}}(Object.freeze)}Object.preventExtensions||(Object.preventExtensions=function(t){if(Object(t)!==t)throw new TypeError("Object.preventExtensions can only be called on Objects.");return t}),Object.isSealed||(Object.isSealed=function(t){if(Object(t)!==t)throw new TypeError("Object.isSealed can only be called on Objects.");return!1}),Object.isFrozen||(Object.isFrozen=function(t){if(Object(t)!==t)throw new TypeError("Object.isFrozen can only be called on Objects.");return!1}),Object.isExtensible||(Object.isExtensible=function(t){if(Object(t)!==t)throw new TypeError("Object.isExtensible can only be called on Objects.");for(var e="";a(t,e);)e+="?";t[e]=!0;var r=a(t,e);return delete t[e],r})})}]); +webpackJsonp([0],[ +/* 0 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + + __webpack_require__(1); + __webpack_require__(2); + +/***/ }, +/* 1 */ +/***/ function(module, exports, __webpack_require__) { + + var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;/*! + * https://github.com/es-shims/es5-shim + * @license es5-shim Copyright 2009-2015 by contributors, MIT License + * see https://github.com/es-shims/es5-shim/blob/master/LICENSE + */ + + // vim: ts=4 sts=4 sw=4 expandtab + + // Add semicolon to prevent IIFE from being passed as argument to concatenated code. + ; + + // UMD (Universal Module Definition) + // see https://github.com/umdjs/umd/blob/master/returnExports.js + (function (root, factory) { + 'use strict'; + + /* global define, exports, module */ + if (true) { + // AMD. Register as an anonymous module. + !(__WEBPACK_AMD_DEFINE_FACTORY__ = (factory), __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? (__WEBPACK_AMD_DEFINE_FACTORY__.call(exports, __webpack_require__, exports, module)) : __WEBPACK_AMD_DEFINE_FACTORY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); + } else if (typeof exports === 'object') { + // Node. Does not work with strict CommonJS, but + // only CommonJS-like enviroments that support module.exports, + // like Node. + module.exports = factory(); + } else { + // Browser globals (root is window) + root.returnExports = factory(); + } + }(this, function () { + + /** + * Brings an environment as close to ECMAScript 5 compliance + * as is possible with the facilities of erstwhile engines. + * + * Annotated ES5: http://es5.github.com/ (specific links below) + * ES5 Spec: http://www.ecma-international.org/publications/files/ECMA-ST/Ecma-262.pdf + * Required reading: http://javascriptweblog.wordpress.com/2011/12/05/extending-javascript-natives/ + */ + + // Shortcut to an often accessed properties, in order to avoid multiple + // dereference that costs universally. This also holds a reference to known-good + // functions. + var $Array = Array; + var ArrayPrototype = $Array.prototype; + var $Object = Object; + var ObjectPrototype = $Object.prototype; + var FunctionPrototype = Function.prototype; + var $String = String; + var StringPrototype = $String.prototype; + var $Number = Number; + var NumberPrototype = $Number.prototype; + var array_slice = ArrayPrototype.slice; + var array_splice = ArrayPrototype.splice; + var array_push = ArrayPrototype.push; + var array_unshift = ArrayPrototype.unshift; + var array_concat = ArrayPrototype.concat; + var call = FunctionPrototype.call; + var max = Math.max; + var min = Math.min; + + // Having a toString local variable name breaks in Opera so use to_string. + var to_string = ObjectPrototype.toString; + + var hasToStringTag = typeof Symbol === 'function' && typeof Symbol.toStringTag === 'symbol'; + var isCallable; /* inlined from https://npmjs.com/is-callable */ var fnToStr = Function.prototype.toString, tryFunctionObject = function tryFunctionObject(value) { try { fnToStr.call(value); return true; } catch (e) { return false; } }, fnClass = '[object Function]', genClass = '[object GeneratorFunction]'; isCallable = function isCallable(value) { if (typeof value !== 'function') { return false; } if (hasToStringTag) { return tryFunctionObject(value); } var strClass = to_string.call(value); return strClass === fnClass || strClass === genClass; }; + var isRegex; /* inlined from https://npmjs.com/is-regex */ var regexExec = RegExp.prototype.exec, tryRegexExec = function tryRegexExec(value) { try { regexExec.call(value); return true; } catch (e) { return false; } }, regexClass = '[object RegExp]'; isRegex = function isRegex(value) { if (typeof value !== 'object') { return false; } return hasToStringTag ? tryRegexExec(value) : to_string.call(value) === regexClass; }; + var isString; /* inlined from https://npmjs.com/is-string */ var strValue = String.prototype.valueOf, tryStringObject = function tryStringObject(value) { try { strValue.call(value); return true; } catch (e) { return false; } }, stringClass = '[object String]'; isString = function isString(value) { if (typeof value === 'string') { return true; } if (typeof value !== 'object') { return false; } return hasToStringTag ? tryStringObject(value) : to_string.call(value) === stringClass; }; + + /* inlined from http://npmjs.com/define-properties */ + var defineProperties = (function (has) { + var supportsDescriptors = $Object.defineProperty && (function () { + try { + var obj = {}; + $Object.defineProperty(obj, 'x', { enumerable: false, value: obj }); + for (var _ in obj) { return false; } + return obj.x === obj; + } catch (e) { /* this is ES3 */ + return false; + } + }()); + + // Define configurable, writable and non-enumerable props + // if they don't exist. + var defineProperty; + if (supportsDescriptors) { + defineProperty = function (object, name, method, forceAssign) { + if (!forceAssign && (name in object)) { return; } + $Object.defineProperty(object, name, { + configurable: true, + enumerable: false, + writable: true, + value: method + }); + }; + } else { + defineProperty = function (object, name, method, forceAssign) { + if (!forceAssign && (name in object)) { return; } + object[name] = method; + }; + } + return function defineProperties(object, map, forceAssign) { + for (var name in map) { + if (has.call(map, name)) { + defineProperty(object, name, map[name], forceAssign); + } + } + }; + }(ObjectPrototype.hasOwnProperty)); + + // + // Util + // ====== + // + + /* replaceable with https://npmjs.com/package/es-abstract /helpers/isPrimitive */ + var isPrimitive = function isPrimitive(input) { + var type = typeof input; + return input === null || (type !== 'object' && type !== 'function'); + }; + + var isActualNaN = $Number.isNaN || function (x) { return x !== x; }; + + var ES = { + // ES5 9.4 + // http://es5.github.com/#x9.4 + // http://jsperf.com/to-integer + /* replaceable with https://npmjs.com/package/es-abstract ES5.ToInteger */ + ToInteger: function ToInteger(num) { + var n = +num; + if (isActualNaN(n)) { + n = 0; + } else if (n !== 0 && n !== (1 / 0) && n !== -(1 / 0)) { + n = (n > 0 || -1) * Math.floor(Math.abs(n)); + } + return n; + }, + + /* replaceable with https://npmjs.com/package/es-abstract ES5.ToPrimitive */ + ToPrimitive: function ToPrimitive(input) { + var val, valueOf, toStr; + if (isPrimitive(input)) { + return input; + } + valueOf = input.valueOf; + if (isCallable(valueOf)) { + val = valueOf.call(input); + if (isPrimitive(val)) { + return val; + } + } + toStr = input.toString; + if (isCallable(toStr)) { + val = toStr.call(input); + if (isPrimitive(val)) { + return val; + } + } + throw new TypeError(); + }, + + // ES5 9.9 + // http://es5.github.com/#x9.9 + /* replaceable with https://npmjs.com/package/es-abstract ES5.ToObject */ + ToObject: function (o) { + /* jshint eqnull: true */ + if (o == null) { // this matches both null and undefined + throw new TypeError("can't convert " + o + ' to object'); + } + return $Object(o); + }, + + /* replaceable with https://npmjs.com/package/es-abstract ES5.ToUint32 */ + ToUint32: function ToUint32(x) { + return x >>> 0; + } + }; + + // + // Function + // ======== + // + + // ES-5 15.3.4.5 + // http://es5.github.com/#x15.3.4.5 + + var Empty = function Empty() {}; + + defineProperties(FunctionPrototype, { + bind: function bind(that) { // .length is 1 + // 1. Let Target be the this value. + var target = this; + // 2. If IsCallable(Target) is false, throw a TypeError exception. + if (!isCallable(target)) { + throw new TypeError('Function.prototype.bind called on incompatible ' + target); + } + // 3. Let A be a new (possibly empty) internal list of all of the + // argument values provided after thisArg (arg1, arg2 etc), in order. + // XXX slicedArgs will stand in for "A" if used + var args = array_slice.call(arguments, 1); // for normal call + // 4. Let F be a new native ECMAScript object. + // 11. Set the [[Prototype]] internal property of F to the standard + // built-in Function prototype object as specified in 15.3.3.1. + // 12. Set the [[Call]] internal property of F as described in + // 15.3.4.5.1. + // 13. Set the [[Construct]] internal property of F as described in + // 15.3.4.5.2. + // 14. Set the [[HasInstance]] internal property of F as described in + // 15.3.4.5.3. + var bound; + var binder = function () { + + if (this instanceof bound) { + // 15.3.4.5.2 [[Construct]] + // When the [[Construct]] internal method of a function object, + // F that was created using the bind function is called with a + // list of arguments ExtraArgs, the following steps are taken: + // 1. Let target be the value of F's [[TargetFunction]] + // internal property. + // 2. If target has no [[Construct]] internal method, a + // TypeError exception is thrown. + // 3. Let boundArgs be the value of F's [[BoundArgs]] internal + // property. + // 4. Let args be a new list containing the same values as the + // list boundArgs in the same order followed by the same + // values as the list ExtraArgs in the same order. + // 5. Return the result of calling the [[Construct]] internal + // method of target providing args as the arguments. + + var result = target.apply( + this, + array_concat.call(args, array_slice.call(arguments)) + ); + if ($Object(result) === result) { + return result; + } + return this; + + } else { + // 15.3.4.5.1 [[Call]] + // When the [[Call]] internal method of a function object, F, + // which was created using the bind function is called with a + // this value and a list of arguments ExtraArgs, the following + // steps are taken: + // 1. Let boundArgs be the value of F's [[BoundArgs]] internal + // property. + // 2. Let boundThis be the value of F's [[BoundThis]] internal + // property. + // 3. Let target be the value of F's [[TargetFunction]] internal + // property. + // 4. Let args be a new list containing the same values as the + // list boundArgs in the same order followed by the same + // values as the list ExtraArgs in the same order. + // 5. Return the result of calling the [[Call]] internal method + // of target providing boundThis as the this value and + // providing args as the arguments. + + // equiv: target.call(this, ...boundArgs, ...args) + return target.apply( + that, + array_concat.call(args, array_slice.call(arguments)) + ); + + } + + }; + + // 15. If the [[Class]] internal property of Target is "Function", then + // a. Let L be the length property of Target minus the length of A. + // b. Set the length own property of F to either 0 or L, whichever is + // larger. + // 16. Else set the length own property of F to 0. + + var boundLength = max(0, target.length - args.length); + + // 17. Set the attributes of the length own property of F to the values + // specified in 15.3.5.1. + var boundArgs = []; + for (var i = 0; i < boundLength; i++) { + array_push.call(boundArgs, '$' + i); + } + + // XXX Build a dynamic function with desired amount of arguments is the only + // way to set the length property of a function. + // In environments where Content Security Policies enabled (Chrome extensions, + // for ex.) all use of eval or Function costructor throws an exception. + // However in all of these environments Function.prototype.bind exists + // and so this code will never be executed. + bound = Function('binder', 'return function (' + boundArgs.join(',') + '){ return binder.apply(this, arguments); }')(binder); + + if (target.prototype) { + Empty.prototype = target.prototype; + bound.prototype = new Empty(); + // Clean up dangling references. + Empty.prototype = null; + } + + // TODO + // 18. Set the [[Extensible]] internal property of F to true. + + // TODO + // 19. Let thrower be the [[ThrowTypeError]] function Object (13.2.3). + // 20. Call the [[DefineOwnProperty]] internal method of F with + // arguments "caller", PropertyDescriptor {[[Get]]: thrower, [[Set]]: + // thrower, [[Enumerable]]: false, [[Configurable]]: false}, and + // false. + // 21. Call the [[DefineOwnProperty]] internal method of F with + // arguments "arguments", PropertyDescriptor {[[Get]]: thrower, + // [[Set]]: thrower, [[Enumerable]]: false, [[Configurable]]: false}, + // and false. + + // TODO + // NOTE Function objects created using Function.prototype.bind do not + // have a prototype property or the [[Code]], [[FormalParameters]], and + // [[Scope]] internal properties. + // XXX can't delete prototype in pure-js. + + // 22. Return F. + return bound; + } + }); + + // _Please note: Shortcuts are defined after `Function.prototype.bind` as we + // us it in defining shortcuts. + var owns = call.bind(ObjectPrototype.hasOwnProperty); + var toStr = call.bind(ObjectPrototype.toString); + var strSlice = call.bind(StringPrototype.slice); + var strSplit = call.bind(StringPrototype.split); + var strIndexOf = call.bind(StringPrototype.indexOf); + var push = call.bind(array_push); + + // + // Array + // ===== + // + + var isArray = $Array.isArray || function isArray(obj) { + return toStr(obj) === '[object Array]'; + }; + + // ES5 15.4.4.12 + // http://es5.github.com/#x15.4.4.13 + // Return len+argCount. + // [bugfix, ielt8] + // IE < 8 bug: [].unshift(0) === undefined but should be "1" + var hasUnshiftReturnValueBug = [].unshift(0) !== 1; + defineProperties(ArrayPrototype, { + unshift: function () { + array_unshift.apply(this, arguments); + return this.length; + } + }, hasUnshiftReturnValueBug); + + // ES5 15.4.3.2 + // http://es5.github.com/#x15.4.3.2 + // https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/isArray + defineProperties($Array, { isArray: isArray }); + + // The IsCallable() check in the Array functions + // has been replaced with a strict check on the + // internal class of the object to trap cases where + // the provided function was actually a regular + // expression literal, which in V8 and + // JavaScriptCore is a typeof "function". Only in + // V8 are regular expression literals permitted as + // reduce parameters, so it is desirable in the + // general case for the shim to match the more + // strict and common behavior of rejecting regular + // expressions. + + // ES5 15.4.4.18 + // http://es5.github.com/#x15.4.4.18 + // https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/array/forEach + + // Check failure of by-index access of string characters (IE < 9) + // and failure of `0 in boxedString` (Rhino) + var boxedString = $Object('a'); + var splitString = boxedString[0] !== 'a' || !(0 in boxedString); + + var properlyBoxesContext = function properlyBoxed(method) { + // Check node 0.6.21 bug where third parameter is not boxed + var properlyBoxesNonStrict = true; + var properlyBoxesStrict = true; + if (method) { + method.call('foo', function (_, __, context) { + if (typeof context !== 'object') { properlyBoxesNonStrict = false; } + }); + + method.call([1], function () { + 'use strict'; + + properlyBoxesStrict = typeof this === 'string'; + }, 'x'); + } + return !!method && properlyBoxesNonStrict && properlyBoxesStrict; + }; + + defineProperties(ArrayPrototype, { + forEach: function forEach(callbackfn/*, thisArg*/) { + var object = ES.ToObject(this); + var self = splitString && isString(this) ? strSplit(this, '') : object; + var i = -1; + var length = ES.ToUint32(self.length); + var T; + if (arguments.length > 1) { + T = arguments[1]; + } + + // If no callback function or if callback is not a callable function + if (!isCallable(callbackfn)) { + throw new TypeError('Array.prototype.forEach callback must be a function'); + } + + while (++i < length) { + if (i in self) { + // Invoke the callback function with call, passing arguments: + // context, property value, property key, thisArg object + if (typeof T === 'undefined') { + callbackfn(self[i], i, object); + } else { + callbackfn.call(T, self[i], i, object); + } + } + } + } + }, !properlyBoxesContext(ArrayPrototype.forEach)); + + // ES5 15.4.4.19 + // http://es5.github.com/#x15.4.4.19 + // https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Objects/Array/map + defineProperties(ArrayPrototype, { + map: function map(callbackfn/*, thisArg*/) { + var object = ES.ToObject(this); + var self = splitString && isString(this) ? strSplit(this, '') : object; + var length = ES.ToUint32(self.length); + var result = $Array(length); + var T; + if (arguments.length > 1) { + T = arguments[1]; + } + + // If no callback function or if callback is not a callable function + if (!isCallable(callbackfn)) { + throw new TypeError('Array.prototype.map callback must be a function'); + } + + for (var i = 0; i < length; i++) { + if (i in self) { + if (typeof T === 'undefined') { + result[i] = callbackfn(self[i], i, object); + } else { + result[i] = callbackfn.call(T, self[i], i, object); + } + } + } + return result; + } + }, !properlyBoxesContext(ArrayPrototype.map)); + + // ES5 15.4.4.20 + // http://es5.github.com/#x15.4.4.20 + // https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Objects/Array/filter + defineProperties(ArrayPrototype, { + filter: function filter(callbackfn/*, thisArg*/) { + var object = ES.ToObject(this); + var self = splitString && isString(this) ? strSplit(this, '') : object; + var length = ES.ToUint32(self.length); + var result = []; + var value; + var T; + if (arguments.length > 1) { + T = arguments[1]; + } + + // If no callback function or if callback is not a callable function + if (!isCallable(callbackfn)) { + throw new TypeError('Array.prototype.filter callback must be a function'); + } + + for (var i = 0; i < length; i++) { + if (i in self) { + value = self[i]; + if (typeof T === 'undefined' ? callbackfn(value, i, object) : callbackfn.call(T, value, i, object)) { + push(result, value); + } + } + } + return result; + } + }, !properlyBoxesContext(ArrayPrototype.filter)); + + // ES5 15.4.4.16 + // http://es5.github.com/#x15.4.4.16 + // https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/every + defineProperties(ArrayPrototype, { + every: function every(callbackfn/*, thisArg*/) { + var object = ES.ToObject(this); + var self = splitString && isString(this) ? strSplit(this, '') : object; + var length = ES.ToUint32(self.length); + var T; + if (arguments.length > 1) { + T = arguments[1]; + } + + // If no callback function or if callback is not a callable function + if (!isCallable(callbackfn)) { + throw new TypeError('Array.prototype.every callback must be a function'); + } + + for (var i = 0; i < length; i++) { + if (i in self && !(typeof T === 'undefined' ? callbackfn(self[i], i, object) : callbackfn.call(T, self[i], i, object))) { + return false; + } + } + return true; + } + }, !properlyBoxesContext(ArrayPrototype.every)); + + // ES5 15.4.4.17 + // http://es5.github.com/#x15.4.4.17 + // https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/some + defineProperties(ArrayPrototype, { + some: function some(callbackfn/*, thisArg */) { + var object = ES.ToObject(this); + var self = splitString && isString(this) ? strSplit(this, '') : object; + var length = ES.ToUint32(self.length); + var T; + if (arguments.length > 1) { + T = arguments[1]; + } + + // If no callback function or if callback is not a callable function + if (!isCallable(callbackfn)) { + throw new TypeError('Array.prototype.some callback must be a function'); + } + + for (var i = 0; i < length; i++) { + if (i in self && (typeof T === 'undefined' ? callbackfn(self[i], i, object) : callbackfn.call(T, self[i], i, object))) { + return true; + } + } + return false; + } + }, !properlyBoxesContext(ArrayPrototype.some)); + + // ES5 15.4.4.21 + // http://es5.github.com/#x15.4.4.21 + // https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Objects/Array/reduce + var reduceCoercesToObject = false; + if (ArrayPrototype.reduce) { + reduceCoercesToObject = typeof ArrayPrototype.reduce.call('es5', function (_, __, ___, list) { return list; }) === 'object'; + } + defineProperties(ArrayPrototype, { + reduce: function reduce(callbackfn/*, initialValue*/) { + var object = ES.ToObject(this); + var self = splitString && isString(this) ? strSplit(this, '') : object; + var length = ES.ToUint32(self.length); + + // If no callback function or if callback is not a callable function + if (!isCallable(callbackfn)) { + throw new TypeError('Array.prototype.reduce callback must be a function'); + } + + // no value to return if no initial value and an empty array + if (length === 0 && arguments.length === 1) { + throw new TypeError('reduce of empty array with no initial value'); + } + + var i = 0; + var result; + if (arguments.length >= 2) { + result = arguments[1]; + } else { + do { + if (i in self) { + result = self[i++]; + break; + } + + // if array contains no values, no initial value to return + if (++i >= length) { + throw new TypeError('reduce of empty array with no initial value'); + } + } while (true); + } + + for (; i < length; i++) { + if (i in self) { + result = callbackfn(result, self[i], i, object); + } + } + + return result; + } + }, !reduceCoercesToObject); + + // ES5 15.4.4.22 + // http://es5.github.com/#x15.4.4.22 + // https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Objects/Array/reduceRight + var reduceRightCoercesToObject = false; + if (ArrayPrototype.reduceRight) { + reduceRightCoercesToObject = typeof ArrayPrototype.reduceRight.call('es5', function (_, __, ___, list) { return list; }) === 'object'; + } + defineProperties(ArrayPrototype, { + reduceRight: function reduceRight(callbackfn/*, initial*/) { + var object = ES.ToObject(this); + var self = splitString && isString(this) ? strSplit(this, '') : object; + var length = ES.ToUint32(self.length); + + // If no callback function or if callback is not a callable function + if (!isCallable(callbackfn)) { + throw new TypeError('Array.prototype.reduceRight callback must be a function'); + } + + // no value to return if no initial value, empty array + if (length === 0 && arguments.length === 1) { + throw new TypeError('reduceRight of empty array with no initial value'); + } + + var result; + var i = length - 1; + if (arguments.length >= 2) { + result = arguments[1]; + } else { + do { + if (i in self) { + result = self[i--]; + break; + } + + // if array contains no values, no initial value to return + if (--i < 0) { + throw new TypeError('reduceRight of empty array with no initial value'); + } + } while (true); + } + + if (i < 0) { + return result; + } + + do { + if (i in self) { + result = callbackfn(result, self[i], i, object); + } + } while (i--); + + return result; + } + }, !reduceRightCoercesToObject); + + // ES5 15.4.4.14 + // http://es5.github.com/#x15.4.4.14 + // https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/indexOf + var hasFirefox2IndexOfBug = ArrayPrototype.indexOf && [0, 1].indexOf(1, 2) !== -1; + defineProperties(ArrayPrototype, { + indexOf: function indexOf(searchElement/*, fromIndex */) { + var self = splitString && isString(this) ? strSplit(this, '') : ES.ToObject(this); + var length = ES.ToUint32(self.length); + + if (length === 0) { + return -1; + } + + var i = 0; + if (arguments.length > 1) { + i = ES.ToInteger(arguments[1]); + } + + // handle negative indices + i = i >= 0 ? i : max(0, length + i); + for (; i < length; i++) { + if (i in self && self[i] === searchElement) { + return i; + } + } + return -1; + } + }, hasFirefox2IndexOfBug); + + // ES5 15.4.4.15 + // http://es5.github.com/#x15.4.4.15 + // https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/lastIndexOf + var hasFirefox2LastIndexOfBug = ArrayPrototype.lastIndexOf && [0, 1].lastIndexOf(0, -3) !== -1; + defineProperties(ArrayPrototype, { + lastIndexOf: function lastIndexOf(searchElement/*, fromIndex */) { + var self = splitString && isString(this) ? strSplit(this, '') : ES.ToObject(this); + var length = ES.ToUint32(self.length); + + if (length === 0) { + return -1; + } + var i = length - 1; + if (arguments.length > 1) { + i = min(i, ES.ToInteger(arguments[1])); + } + // handle negative indices + i = i >= 0 ? i : length - Math.abs(i); + for (; i >= 0; i--) { + if (i in self && searchElement === self[i]) { + return i; + } + } + return -1; + } + }, hasFirefox2LastIndexOfBug); + + // ES5 15.4.4.12 + // http://es5.github.com/#x15.4.4.12 + var spliceNoopReturnsEmptyArray = (function () { + var a = [1, 2]; + var result = a.splice(); + return a.length === 2 && isArray(result) && result.length === 0; + }()); + defineProperties(ArrayPrototype, { + // Safari 5.0 bug where .splice() returns undefined + splice: function splice(start, deleteCount) { + if (arguments.length === 0) { + return []; + } else { + return array_splice.apply(this, arguments); + } + } + }, !spliceNoopReturnsEmptyArray); + + var spliceWorksWithEmptyObject = (function () { + var obj = {}; + ArrayPrototype.splice.call(obj, 0, 0, 1); + return obj.length === 1; + }()); + defineProperties(ArrayPrototype, { + splice: function splice(start, deleteCount) { + if (arguments.length === 0) { return []; } + var args = arguments; + this.length = max(ES.ToInteger(this.length), 0); + if (arguments.length > 0 && typeof deleteCount !== 'number') { + args = array_slice.call(arguments); + if (args.length < 2) { + push(args, this.length - start); + } else { + args[1] = ES.ToInteger(deleteCount); + } + } + return array_splice.apply(this, args); + } + }, !spliceWorksWithEmptyObject); + var spliceWorksWithLargeSparseArrays = (function () { + // Per https://github.com/es-shims/es5-shim/issues/295 + // Safari 7/8 breaks with sparse arrays of size 1e5 or greater + var arr = new $Array(1e5); + // note: the index MUST be 8 or larger or the test will false pass + arr[8] = 'x'; + arr.splice(1, 1); + // note: this test must be defined *after* the indexOf shim + // per https://github.com/es-shims/es5-shim/issues/313 + return arr.indexOf('x') === 7; + }()); + var spliceWorksWithSmallSparseArrays = (function () { + // Per https://github.com/es-shims/es5-shim/issues/295 + // Opera 12.15 breaks on this, no idea why. + var n = 256; + var arr = []; + arr[n] = 'a'; + arr.splice(n + 1, 0, 'b'); + return arr[n] === 'a'; + }()); + defineProperties(ArrayPrototype, { + splice: function splice(start, deleteCount) { + var O = ES.ToObject(this); + var A = []; + var len = ES.ToUint32(O.length); + var relativeStart = ES.ToInteger(start); + var actualStart = relativeStart < 0 ? max((len + relativeStart), 0) : min(relativeStart, len); + var actualDeleteCount = min(max(ES.ToInteger(deleteCount), 0), len - actualStart); + + var k = 0; + var from; + while (k < actualDeleteCount) { + from = $String(actualStart + k); + if (owns(O, from)) { + A[k] = O[from]; + } + k += 1; + } + + var items = array_slice.call(arguments, 2); + var itemCount = items.length; + var to; + if (itemCount < actualDeleteCount) { + k = actualStart; + while (k < (len - actualDeleteCount)) { + from = $String(k + actualDeleteCount); + to = $String(k + itemCount); + if (owns(O, from)) { + O[to] = O[from]; + } else { + delete O[to]; + } + k += 1; + } + k = len; + while (k > (len - actualDeleteCount + itemCount)) { + delete O[k - 1]; + k -= 1; + } + } else if (itemCount > actualDeleteCount) { + k = len - actualDeleteCount; + while (k > actualStart) { + from = $String(k + actualDeleteCount - 1); + to = $String(k + itemCount - 1); + if (owns(O, from)) { + O[to] = O[from]; + } else { + delete O[to]; + } + k -= 1; + } + } + k = actualStart; + for (var i = 0; i < items.length; ++i) { + O[k] = items[i]; + k += 1; + } + O.length = len - actualDeleteCount + itemCount; + + return A; + } + }, !spliceWorksWithLargeSparseArrays || !spliceWorksWithSmallSparseArrays); + + var hasJoinUndefinedBug = [1, 2].join(undefined) !== '1,2'; + var originalJoin = ArrayPrototype.join; + defineProperties(ArrayPrototype, { + join: function join(separator) { + return originalJoin.call(this, typeof separator === 'undefined' ? ',' : separator); + } + }, hasJoinUndefinedBug); + + var pushShim = function push(item) { + var O = ES.ToObject(this); + var n = ES.ToUint32(O.length); + var i = 0; + while (i < arguments.length) { + O[n + i] = arguments[i]; + i += 1; + } + O.length = n + i; + return n + i; + }; + + var pushIsNotGeneric = (function () { + var obj = {}; + var result = Array.prototype.push.call(obj, undefined); + return result !== 1 || obj.length !== 1 || typeof obj[0] !== 'undefined' || !owns(obj, 0); + }()); + defineProperties(ArrayPrototype, { + push: function push(item) { + if (isArray(this)) { + return array_push.apply(this, arguments); + } + return pushShim.apply(this, arguments); + } + }, pushIsNotGeneric); + + // This fixes a very weird bug in Opera 10.6 when pushing `undefined + var pushUndefinedIsWeird = (function () { + var arr = []; + var result = arr.push(undefined); + return result !== 1 || arr.length !== 1 || typeof arr[0] !== 'undefined' || !owns(arr, 0); + }()); + defineProperties(ArrayPrototype, { push: pushShim }, pushUndefinedIsWeird); + + // + // Object + // ====== + // + + // ES5 15.2.3.14 + // http://es5.github.com/#x15.2.3.14 + + // http://whattheheadsaid.com/2010/10/a-safer-object-keys-compatibility-implementation + var hasDontEnumBug = !({ 'toString': null }).propertyIsEnumerable('toString'); + var hasProtoEnumBug = function () {}.propertyIsEnumerable('prototype'); + var hasStringEnumBug = !owns('x', '0'); + var equalsConstructorPrototype = function (o) { + var ctor = o.constructor; + return ctor && ctor.prototype === o; + }; + var blacklistedKeys = { + $window: true, + $console: true, + $parent: true, + $self: true, + $frame: true, + $frames: true, + $frameElement: true, + $webkitIndexedDB: true, + $webkitStorageInfo: true + }; + var hasAutomationEqualityBug = (function () { + /* globals window */ + if (typeof window === 'undefined') { return false; } + for (var k in window) { + try { + if (!blacklistedKeys['$' + k] && owns(window, k) && window[k] !== null && typeof window[k] === 'object') { + equalsConstructorPrototype(window[k]); + } + } catch (e) { + return true; + } + } + return false; + }()); + var equalsConstructorPrototypeIfNotBuggy = function (object) { + if (typeof window === 'undefined' || !hasAutomationEqualityBug) { return equalsConstructorPrototype(object); } + try { + return equalsConstructorPrototype(object); + } catch (e) { + return false; + } + }; + var dontEnums = [ + 'toString', + 'toLocaleString', + 'valueOf', + 'hasOwnProperty', + 'isPrototypeOf', + 'propertyIsEnumerable', + 'constructor' + ]; + var dontEnumsLength = dontEnums.length; + + // taken directly from https://github.com/ljharb/is-arguments/blob/master/index.js + // can be replaced with require('is-arguments') if we ever use a build process instead + var isStandardArguments = function isArguments(value) { + return toStr(value) === '[object Arguments]'; + }; + var isLegacyArguments = function isArguments(value) { + return value !== null && + typeof value === 'object' && + typeof value.length === 'number' && + value.length >= 0 && + !isArray(value) && + isCallable(value.callee); + }; + var isArguments = isStandardArguments(arguments) ? isStandardArguments : isLegacyArguments; + + defineProperties($Object, { + keys: function keys(object) { + var isFn = isCallable(object); + var isArgs = isArguments(object); + var isObject = object !== null && typeof object === 'object'; + var isStr = isObject && isString(object); + + if (!isObject && !isFn && !isArgs) { + throw new TypeError('Object.keys called on a non-object'); + } + + var theKeys = []; + var skipProto = hasProtoEnumBug && isFn; + if ((isStr && hasStringEnumBug) || isArgs) { + for (var i = 0; i < object.length; ++i) { + push(theKeys, $String(i)); + } + } + + if (!isArgs) { + for (var name in object) { + if (!(skipProto && name === 'prototype') && owns(object, name)) { + push(theKeys, $String(name)); + } + } + } + + if (hasDontEnumBug) { + var skipConstructor = equalsConstructorPrototypeIfNotBuggy(object); + for (var j = 0; j < dontEnumsLength; j++) { + var dontEnum = dontEnums[j]; + if (!(skipConstructor && dontEnum === 'constructor') && owns(object, dontEnum)) { + push(theKeys, dontEnum); + } + } + } + return theKeys; + } + }); + + var keysWorksWithArguments = $Object.keys && (function () { + // Safari 5.0 bug + return $Object.keys(arguments).length === 2; + }(1, 2)); + var keysHasArgumentsLengthBug = $Object.keys && (function () { + var argKeys = $Object.keys(arguments); + return arguments.length !== 1 || argKeys.length !== 1 || argKeys[0] !== 1; + }(1)); + var originalKeys = $Object.keys; + defineProperties($Object, { + keys: function keys(object) { + if (isArguments(object)) { + return originalKeys(array_slice.call(object)); + } else { + return originalKeys(object); + } + } + }, !keysWorksWithArguments || keysHasArgumentsLengthBug); + + // + // Date + // ==== + // + + // ES5 15.9.5.43 + // http://es5.github.com/#x15.9.5.43 + // This function returns a String value represent the instance in time + // represented by this Date object. The format of the String is the Date Time + // string format defined in 15.9.1.15. All fields are present in the String. + // The time zone is always UTC, denoted by the suffix Z. If the time value of + // this object is not a finite Number a RangeError exception is thrown. + var negativeDate = -62198755200000; + var negativeYearString = '-000001'; + var hasNegativeDateBug = Date.prototype.toISOString && new Date(negativeDate).toISOString().indexOf(negativeYearString) === -1; + var hasSafari51DateBug = Date.prototype.toISOString && new Date(-1).toISOString() !== '1969-12-31T23:59:59.999Z'; + + defineProperties(Date.prototype, { + toISOString: function toISOString() { + var result, length, value, year, month; + if (!isFinite(this)) { + throw new RangeError('Date.prototype.toISOString called on non-finite value.'); + } + + year = this.getUTCFullYear(); + + month = this.getUTCMonth(); + // see https://github.com/es-shims/es5-shim/issues/111 + year += Math.floor(month / 12); + month = (month % 12 + 12) % 12; + + // the date time string format is specified in 15.9.1.15. + result = [month + 1, this.getUTCDate(), this.getUTCHours(), this.getUTCMinutes(), this.getUTCSeconds()]; + year = ( + (year < 0 ? '-' : (year > 9999 ? '+' : '')) + + strSlice('00000' + Math.abs(year), (0 <= year && year <= 9999) ? -4 : -6) + ); + + length = result.length; + while (length--) { + value = result[length]; + // pad months, days, hours, minutes, and seconds to have two + // digits. + if (value < 10) { + result[length] = '0' + value; + } + } + // pad milliseconds to have three digits. + return ( + year + '-' + array_slice.call(result, 0, 2).join('-') + + 'T' + array_slice.call(result, 2).join(':') + '.' + + strSlice('000' + this.getUTCMilliseconds(), -3) + 'Z' + ); + } + }, hasNegativeDateBug || hasSafari51DateBug); + + // ES5 15.9.5.44 + // http://es5.github.com/#x15.9.5.44 + // This function provides a String representation of a Date object for use by + // JSON.stringify (15.12.3). + var dateToJSONIsSupported = (function () { + try { + return Date.prototype.toJSON && + new Date(NaN).toJSON() === null && + new Date(negativeDate).toJSON().indexOf(negativeYearString) !== -1 && + Date.prototype.toJSON.call({ // generic + toISOString: function () { return true; } + }); + } catch (e) { + return false; + } + }()); + if (!dateToJSONIsSupported) { + Date.prototype.toJSON = function toJSON(key) { + // When the toJSON method is called with argument key, the following + // steps are taken: + + // 1. Let O be the result of calling ToObject, giving it the this + // value as its argument. + // 2. Let tv be ES.ToPrimitive(O, hint Number). + var O = $Object(this); + var tv = ES.ToPrimitive(O); + // 3. If tv is a Number and is not finite, return null. + if (typeof tv === 'number' && !isFinite(tv)) { + return null; + } + // 4. Let toISO be the result of calling the [[Get]] internal method of + // O with argument "toISOString". + var toISO = O.toISOString; + // 5. If IsCallable(toISO) is false, throw a TypeError exception. + if (!isCallable(toISO)) { + throw new TypeError('toISOString property is not callable'); + } + // 6. Return the result of calling the [[Call]] internal method of + // toISO with O as the this value and an empty argument list. + return toISO.call(O); + + // NOTE 1 The argument is ignored. + + // NOTE 2 The toJSON function is intentionally generic; it does not + // require that its this value be a Date object. Therefore, it can be + // transferred to other kinds of objects for use as a method. However, + // it does require that any such object have a toISOString method. An + // object is free to use the argument key to filter its + // stringification. + }; + } + + // ES5 15.9.4.2 + // http://es5.github.com/#x15.9.4.2 + // based on work shared by Daniel Friesen (dantman) + // http://gist.github.com/303249 + var supportsExtendedYears = Date.parse('+033658-09-27T01:46:40.000Z') === 1e15; + var acceptsInvalidDates = !isNaN(Date.parse('2012-04-04T24:00:00.500Z')) || !isNaN(Date.parse('2012-11-31T23:59:59.000Z')) || !isNaN(Date.parse('2012-12-31T23:59:60.000Z')); + var doesNotParseY2KNewYear = isNaN(Date.parse('2000-01-01T00:00:00.000Z')); + if (doesNotParseY2KNewYear || acceptsInvalidDates || !supportsExtendedYears) { + // XXX global assignment won't work in embeddings that use + // an alternate object for the context. + /* global Date: true */ + /* eslint-disable no-undef */ + var maxSafeUnsigned32Bit = Math.pow(2, 31) - 1; + var secondsWithinMaxSafeUnsigned32Bit = Math.floor(maxSafeUnsigned32Bit / 1e3); + var hasSafariSignedIntBug = isActualNaN(new Date(1970, 0, 1, 0, 0, 0, maxSafeUnsigned32Bit + 1).getTime()); + Date = (function (NativeDate) { + /* eslint-enable no-undef */ + // Date.length === 7 + var DateShim = function Date(Y, M, D, h, m, s, ms) { + var length = arguments.length; + var date; + if (this instanceof NativeDate) { + var seconds = s; + var millis = ms; + if (hasSafariSignedIntBug && length >= 7 && ms > maxSafeUnsigned32Bit) { + // work around a Safari 8/9 bug where it treats the seconds as signed + var msToShift = Math.floor(ms / maxSafeUnsigned32Bit) * maxSafeUnsigned32Bit; + var sToShift = Math.floor(msToShift / 1e3); + seconds += sToShift; + millis -= sToShift * 1e3; + } + date = length === 1 && $String(Y) === Y ? // isString(Y) + // We explicitly pass it through parse: + new NativeDate(DateShim.parse(Y)) : + // We have to manually make calls depending on argument + // length here + length >= 7 ? new NativeDate(Y, M, D, h, m, seconds, millis) : + length >= 6 ? new NativeDate(Y, M, D, h, m, seconds) : + length >= 5 ? new NativeDate(Y, M, D, h, m) : + length >= 4 ? new NativeDate(Y, M, D, h) : + length >= 3 ? new NativeDate(Y, M, D) : + length >= 2 ? new NativeDate(Y, M) : + length >= 1 ? new NativeDate(Y) : + new NativeDate(); + } else { + date = NativeDate.apply(this, arguments); + } + if (!isPrimitive(date)) { + // Prevent mixups with unfixed Date object + defineProperties(date, { constructor: DateShim }, true); + } + return date; + }; + + // 15.9.1.15 Date Time String Format. + var isoDateExpression = new RegExp('^' + + '(\\d{4}|[+-]\\d{6})' + // four-digit year capture or sign + + // 6-digit extended year + '(?:-(\\d{2})' + // optional month capture + '(?:-(\\d{2})' + // optional day capture + '(?:' + // capture hours:minutes:seconds.milliseconds + 'T(\\d{2})' + // hours capture + ':(\\d{2})' + // minutes capture + '(?:' + // optional :seconds.milliseconds + ':(\\d{2})' + // seconds capture + '(?:(\\.\\d{1,}))?' + // milliseconds capture + ')?' + + '(' + // capture UTC offset component + 'Z|' + // UTC capture + '(?:' + // offset specifier +/-hours:minutes + '([-+])' + // sign capture + '(\\d{2})' + // hours offset capture + ':(\\d{2})' + // minutes offset capture + ')' + + ')?)?)?)?' + + '$'); + + var months = [0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334, 365]; + + var dayFromMonth = function dayFromMonth(year, month) { + var t = month > 1 ? 1 : 0; + return ( + months[month] + + Math.floor((year - 1969 + t) / 4) - + Math.floor((year - 1901 + t) / 100) + + Math.floor((year - 1601 + t) / 400) + + 365 * (year - 1970) + ); + }; + + var toUTC = function toUTC(t) { + var s = 0; + var ms = t; + if (hasSafariSignedIntBug && ms > maxSafeUnsigned32Bit) { + // work around a Safari 8/9 bug where it treats the seconds as signed + var msToShift = Math.floor(ms / maxSafeUnsigned32Bit) * maxSafeUnsigned32Bit; + var sToShift = Math.floor(msToShift / 1e3); + s += sToShift; + ms -= sToShift * 1e3; + } + return $Number(new NativeDate(1970, 0, 1, 0, 0, s, ms)); + }; + + // Copy any custom methods a 3rd party library may have added + for (var key in NativeDate) { + if (owns(NativeDate, key)) { + DateShim[key] = NativeDate[key]; + } + } + + // Copy "native" methods explicitly; they may be non-enumerable + defineProperties(DateShim, { + now: NativeDate.now, + UTC: NativeDate.UTC + }, true); + DateShim.prototype = NativeDate.prototype; + defineProperties(DateShim.prototype, { + constructor: DateShim + }, true); + + // Upgrade Date.parse to handle simplified ISO 8601 strings + var parseShim = function parse(string) { + var match = isoDateExpression.exec(string); + if (match) { + // parse months, days, hours, minutes, seconds, and milliseconds + // provide default values if necessary + // parse the UTC offset component + var year = $Number(match[1]), + month = $Number(match[2] || 1) - 1, + day = $Number(match[3] || 1) - 1, + hour = $Number(match[4] || 0), + minute = $Number(match[5] || 0), + second = $Number(match[6] || 0), + millisecond = Math.floor($Number(match[7] || 0) * 1000), + // When time zone is missed, local offset should be used + // (ES 5.1 bug) + // see https://bugs.ecmascript.org/show_bug.cgi?id=112 + isLocalTime = Boolean(match[4] && !match[8]), + signOffset = match[9] === '-' ? 1 : -1, + hourOffset = $Number(match[10] || 0), + minuteOffset = $Number(match[11] || 0), + result; + var hasMinutesOrSecondsOrMilliseconds = minute > 0 || second > 0 || millisecond > 0; + if ( + hour < (hasMinutesOrSecondsOrMilliseconds ? 24 : 25) && + minute < 60 && second < 60 && millisecond < 1000 && + month > -1 && month < 12 && hourOffset < 24 && + minuteOffset < 60 && // detect invalid offsets + day > -1 && + day < (dayFromMonth(year, month + 1) - dayFromMonth(year, month)) + ) { + result = ( + (dayFromMonth(year, month) + day) * 24 + + hour + + hourOffset * signOffset + ) * 60; + result = ( + (result + minute + minuteOffset * signOffset) * 60 + + second + ) * 1000 + millisecond; + if (isLocalTime) { + result = toUTC(result); + } + if (-8.64e15 <= result && result <= 8.64e15) { + return result; + } + } + return NaN; + } + return NativeDate.parse.apply(this, arguments); + }; + defineProperties(DateShim, { parse: parseShim }); + + return DateShim; + }(Date)); + /* global Date: false */ + } + + // ES5 15.9.4.4 + // http://es5.github.com/#x15.9.4.4 + if (!Date.now) { + Date.now = function now() { + return new Date().getTime(); + }; + } + + // + // Number + // ====== + // + + // ES5.1 15.7.4.5 + // http://es5.github.com/#x15.7.4.5 + var hasToFixedBugs = NumberPrototype.toFixed && ( + (0.00008).toFixed(3) !== '0.000' || + (0.9).toFixed(0) !== '1' || + (1.255).toFixed(2) !== '1.25' || + (1000000000000000128).toFixed(0) !== '1000000000000000128' + ); + + var toFixedHelpers = { + base: 1e7, + size: 6, + data: [0, 0, 0, 0, 0, 0], + multiply: function multiply(n, c) { + var i = -1; + var c2 = c; + while (++i < toFixedHelpers.size) { + c2 += n * toFixedHelpers.data[i]; + toFixedHelpers.data[i] = c2 % toFixedHelpers.base; + c2 = Math.floor(c2 / toFixedHelpers.base); + } + }, + divide: function divide(n) { + var i = toFixedHelpers.size, c = 0; + while (--i >= 0) { + c += toFixedHelpers.data[i]; + toFixedHelpers.data[i] = Math.floor(c / n); + c = (c % n) * toFixedHelpers.base; + } + }, + numToString: function numToString() { + var i = toFixedHelpers.size; + var s = ''; + while (--i >= 0) { + if (s !== '' || i === 0 || toFixedHelpers.data[i] !== 0) { + var t = $String(toFixedHelpers.data[i]); + if (s === '') { + s = t; + } else { + s += strSlice('0000000', 0, 7 - t.length) + t; + } + } + } + return s; + }, + pow: function pow(x, n, acc) { + return (n === 0 ? acc : (n % 2 === 1 ? pow(x, n - 1, acc * x) : pow(x * x, n / 2, acc))); + }, + log: function log(x) { + var n = 0; + var x2 = x; + while (x2 >= 4096) { + n += 12; + x2 /= 4096; + } + while (x2 >= 2) { + n += 1; + x2 /= 2; + } + return n; + } + }; + + var toFixedShim = function toFixed(fractionDigits) { + var f, x, s, m, e, z, j, k; + + // Test for NaN and round fractionDigits down + f = $Number(fractionDigits); + f = isActualNaN(f) ? 0 : Math.floor(f); + + if (f < 0 || f > 20) { + throw new RangeError('Number.toFixed called with invalid number of decimals'); + } + + x = $Number(this); + + if (isActualNaN(x)) { + return 'NaN'; + } + + // If it is too big or small, return the string value of the number + if (x <= -1e21 || x >= 1e21) { + return $String(x); + } + + s = ''; + + if (x < 0) { + s = '-'; + x = -x; + } + + m = '0'; + + if (x > 1e-21) { + // 1e-21 < x < 1e21 + // -70 < log2(x) < 70 + e = toFixedHelpers.log(x * toFixedHelpers.pow(2, 69, 1)) - 69; + z = (e < 0 ? x * toFixedHelpers.pow(2, -e, 1) : x / toFixedHelpers.pow(2, e, 1)); + z *= 0x10000000000000; // Math.pow(2, 52); + e = 52 - e; + + // -18 < e < 122 + // x = z / 2 ^ e + if (e > 0) { + toFixedHelpers.multiply(0, z); + j = f; + + while (j >= 7) { + toFixedHelpers.multiply(1e7, 0); + j -= 7; + } + + toFixedHelpers.multiply(toFixedHelpers.pow(10, j, 1), 0); + j = e - 1; + + while (j >= 23) { + toFixedHelpers.divide(1 << 23); + j -= 23; + } + + toFixedHelpers.divide(1 << j); + toFixedHelpers.multiply(1, 1); + toFixedHelpers.divide(2); + m = toFixedHelpers.numToString(); + } else { + toFixedHelpers.multiply(0, z); + toFixedHelpers.multiply(1 << (-e), 0); + m = toFixedHelpers.numToString() + strSlice('0.00000000000000000000', 2, 2 + f); + } + } + + if (f > 0) { + k = m.length; + + if (k <= f) { + m = s + strSlice('0.0000000000000000000', 0, f - k + 2) + m; + } else { + m = s + strSlice(m, 0, k - f) + '.' + strSlice(m, k - f); + } + } else { + m = s + m; + } + + return m; + }; + defineProperties(NumberPrototype, { toFixed: toFixedShim }, hasToFixedBugs); + + var hasToPrecisionUndefinedBug = (function () { + try { + return 1.0.toPrecision(undefined) === '1'; + } catch (e) { + return true; + } + }()); + var originalToPrecision = NumberPrototype.toPrecision; + defineProperties(NumberPrototype, { + toPrecision: function toPrecision(precision) { + return typeof precision === 'undefined' ? originalToPrecision.call(this) : originalToPrecision.call(this, precision); + } + }, hasToPrecisionUndefinedBug); + + // + // String + // ====== + // + + // ES5 15.5.4.14 + // http://es5.github.com/#x15.5.4.14 + + // [bugfix, IE lt 9, firefox 4, Konqueror, Opera, obscure browsers] + // Many browsers do not split properly with regular expressions or they + // do not perform the split correctly under obscure conditions. + // See http://blog.stevenlevithan.com/archives/cross-browser-split + // I've tested in many browsers and this seems to cover the deviant ones: + // 'ab'.split(/(?:ab)*/) should be ["", ""], not [""] + // '.'.split(/(.?)(.?)/) should be ["", ".", "", ""], not ["", ""] + // 'tesst'.split(/(s)*/) should be ["t", undefined, "e", "s", "t"], not + // [undefined, "t", undefined, "e", ...] + // ''.split(/.?/) should be [], not [""] + // '.'.split(/()()/) should be ["."], not ["", "", "."] + + if ( + 'ab'.split(/(?:ab)*/).length !== 2 || + '.'.split(/(.?)(.?)/).length !== 4 || + 'tesst'.split(/(s)*/)[1] === 't' || + 'test'.split(/(?:)/, -1).length !== 4 || + ''.split(/.?/).length || + '.'.split(/()()/).length > 1 + ) { + (function () { + var compliantExecNpcg = typeof (/()??/).exec('')[1] === 'undefined'; // NPCG: nonparticipating capturing group + var maxSafe32BitInt = Math.pow(2, 32) - 1; + + StringPrototype.split = function (separator, limit) { + var string = this; + if (typeof separator === 'undefined' && limit === 0) { + return []; + } + + // If `separator` is not a regex, use native split + if (!isRegex(separator)) { + return strSplit(this, separator, limit); + } + + var output = []; + var flags = (separator.ignoreCase ? 'i' : '') + + (separator.multiline ? 'm' : '') + + (separator.unicode ? 'u' : '') + // in ES6 + (separator.sticky ? 'y' : ''), // Firefox 3+ and ES6 + lastLastIndex = 0, + // Make `global` and avoid `lastIndex` issues by working with a copy + separator2, match, lastIndex, lastLength; + var separatorCopy = new RegExp(separator.source, flags + 'g'); + string += ''; // Type-convert + if (!compliantExecNpcg) { + // Doesn't need flags gy, but they don't hurt + separator2 = new RegExp('^' + separatorCopy.source + '$(?!\\s)', flags); + } + /* Values for `limit`, per the spec: + * If undefined: 4294967295 // maxSafe32BitInt + * If 0, Infinity, or NaN: 0 + * If positive number: limit = Math.floor(limit); if (limit > 4294967295) limit -= 4294967296; + * If negative number: 4294967296 - Math.floor(Math.abs(limit)) + * If other: Type-convert, then use the above rules + */ + var splitLimit = typeof limit === 'undefined' ? maxSafe32BitInt : ES.ToUint32(limit); + match = separatorCopy.exec(string); + while (match) { + // `separatorCopy.lastIndex` is not reliable cross-browser + lastIndex = match.index + match[0].length; + if (lastIndex > lastLastIndex) { + push(output, strSlice(string, lastLastIndex, match.index)); + // Fix browsers whose `exec` methods don't consistently return `undefined` for + // nonparticipating capturing groups + if (!compliantExecNpcg && match.length > 1) { + /* eslint-disable no-loop-func */ + match[0].replace(separator2, function () { + for (var i = 1; i < arguments.length - 2; i++) { + if (typeof arguments[i] === 'undefined') { + match[i] = void 0; + } + } + }); + /* eslint-enable no-loop-func */ + } + if (match.length > 1 && match.index < string.length) { + array_push.apply(output, array_slice.call(match, 1)); + } + lastLength = match[0].length; + lastLastIndex = lastIndex; + if (output.length >= splitLimit) { + break; + } + } + if (separatorCopy.lastIndex === match.index) { + separatorCopy.lastIndex++; // Avoid an infinite loop + } + match = separatorCopy.exec(string); + } + if (lastLastIndex === string.length) { + if (lastLength || !separatorCopy.test('')) { + push(output, ''); + } + } else { + push(output, strSlice(string, lastLastIndex)); + } + return output.length > splitLimit ? strSlice(output, 0, splitLimit) : output; + }; + }()); + + // [bugfix, chrome] + // If separator is undefined, then the result array contains just one String, + // which is the this value (converted to a String). If limit is not undefined, + // then the output array is truncated so that it contains no more than limit + // elements. + // "0".split(undefined, 0) -> [] + } else if ('0'.split(void 0, 0).length) { + StringPrototype.split = function split(separator, limit) { + if (typeof separator === 'undefined' && limit === 0) { return []; } + return strSplit(this, separator, limit); + }; + } + + var str_replace = StringPrototype.replace; + var replaceReportsGroupsCorrectly = (function () { + var groups = []; + 'x'.replace(/x(.)?/g, function (match, group) { + push(groups, group); + }); + return groups.length === 1 && typeof groups[0] === 'undefined'; + }()); + + if (!replaceReportsGroupsCorrectly) { + StringPrototype.replace = function replace(searchValue, replaceValue) { + var isFn = isCallable(replaceValue); + var hasCapturingGroups = isRegex(searchValue) && (/\)[*?]/).test(searchValue.source); + if (!isFn || !hasCapturingGroups) { + return str_replace.call(this, searchValue, replaceValue); + } else { + var wrappedReplaceValue = function (match) { + var length = arguments.length; + var originalLastIndex = searchValue.lastIndex; + searchValue.lastIndex = 0; + var args = searchValue.exec(match) || []; + searchValue.lastIndex = originalLastIndex; + push(args, arguments[length - 2], arguments[length - 1]); + return replaceValue.apply(this, args); + }; + return str_replace.call(this, searchValue, wrappedReplaceValue); + } + }; + } + + // ECMA-262, 3rd B.2.3 + // Not an ECMAScript standard, although ECMAScript 3rd Edition has a + // non-normative section suggesting uniform semantics and it should be + // normalized across all browsers + // [bugfix, IE lt 9] IE < 9 substr() with negative value not working in IE + var string_substr = StringPrototype.substr; + var hasNegativeSubstrBug = ''.substr && '0b'.substr(-1) !== 'b'; + defineProperties(StringPrototype, { + substr: function substr(start, length) { + var normalizedStart = start; + if (start < 0) { + normalizedStart = max(this.length + start, 0); + } + return string_substr.call(this, normalizedStart, length); + } + }, hasNegativeSubstrBug); + + // ES5 15.5.4.20 + // whitespace from: http://es5.github.io/#x15.5.4.20 + var ws = '\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003' + + '\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028' + + '\u2029\uFEFF'; + var zeroWidth = '\u200b'; + var wsRegexChars = '[' + ws + ']'; + var trimBeginRegexp = new RegExp('^' + wsRegexChars + wsRegexChars + '*'); + var trimEndRegexp = new RegExp(wsRegexChars + wsRegexChars + '*$'); + var hasTrimWhitespaceBug = StringPrototype.trim && (ws.trim() || !zeroWidth.trim()); + defineProperties(StringPrototype, { + // http://blog.stevenlevithan.com/archives/faster-trim-javascript + // http://perfectionkills.com/whitespace-deviations/ + trim: function trim() { + if (typeof this === 'undefined' || this === null) { + throw new TypeError("can't convert " + this + ' to object'); + } + return $String(this).replace(trimBeginRegexp, '').replace(trimEndRegexp, ''); + } + }, hasTrimWhitespaceBug); + + var hasLastIndexBug = StringPrototype.lastIndexOf && 'abcあい'.lastIndexOf('あい', 2) !== -1; + defineProperties(StringPrototype, { + lastIndexOf: function lastIndexOf(searchString) { + if (typeof this === 'undefined' || this === null) { + throw new TypeError("can't convert " + this + ' to object'); + } + var S = $String(this); + var searchStr = $String(searchString); + var numPos = arguments.length > 1 ? $Number(arguments[1]) : NaN; + var pos = isActualNaN(numPos) ? Infinity : ES.ToInteger(numPos); + var start = min(max(pos, 0), S.length); + var searchLen = searchStr.length; + var k = start + searchLen; + while (k > 0) { + k = max(0, k - searchLen); + var index = strIndexOf(strSlice(S, k, start + searchLen), searchStr); + if (index !== -1) { + return k + index; + } + } + return -1; + } + }, hasLastIndexBug); + + var originalLastIndexOf = StringPrototype.lastIndexOf; + defineProperties(StringPrototype, { + lastIndexOf: function lastIndexOf(searchString) { + return originalLastIndexOf.apply(this, arguments); + } + }, StringPrototype.lastIndexOf.length !== 1); + + // ES-5 15.1.2.2 + /* eslint-disable radix */ + if (parseInt(ws + '08') !== 8 || parseInt(ws + '0x16') !== 22) { + /* eslint-enable radix */ + /* global parseInt: true */ + parseInt = (function (origParseInt) { + var hexRegex = /^[\-+]?0[xX]/; + return function parseInt(str, radix) { + var string = $String(str).trim(); + var defaultedRadix = $Number(radix) || (hexRegex.test(string) ? 16 : 10); + return origParseInt(string, defaultedRadix); + }; + }(parseInt)); + } + + if (String(new RangeError('test')) !== 'RangeError: test') { + var originalErrorToString = Error.prototype.toString; + var errorToStringShim = function toString() { + if (typeof this === 'undefined' || this === null) { + throw new TypeError("can't convert " + this + ' to object'); + } + var name = this.name; + if (typeof name === 'undefined') { + name = 'Error'; + } else if (typeof name !== 'string') { + name = $String(name); + } + var msg = this.message; + if (typeof msg === 'undefined') { + msg = ''; + } else if (typeof msg !== 'string') { + msg = $String(msg); + } + if (!name) { + return msg; + } + if (!msg) { + return name; + } + return name + ': ' + msg; + }; + // can't use defineProperties here because of toString enumeration issue in IE <= 8 + Error.prototype.toString = errorToStringShim; + } + + })); + + +/***/ }, +/* 2 */ +/***/ function(module, exports, __webpack_require__) { + + var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;/*! + * https://github.com/es-shims/es5-shim + * @license es5-shim Copyright 2009-2015 by contributors, MIT License + * see https://github.com/es-shims/es5-shim/blob/master/LICENSE + */ + + // vim: ts=4 sts=4 sw=4 expandtab + + // Add semicolon to prevent IIFE from being passed as argument to concatenated code. + ; + + // UMD (Universal Module Definition) + // see https://github.com/umdjs/umd/blob/master/returnExports.js + (function (root, factory) { + 'use strict'; + + /* global define, exports, module */ + if (true) { + // AMD. Register as an anonymous module. + !(__WEBPACK_AMD_DEFINE_FACTORY__ = (factory), __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? (__WEBPACK_AMD_DEFINE_FACTORY__.call(exports, __webpack_require__, exports, module)) : __WEBPACK_AMD_DEFINE_FACTORY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); + } else if (typeof exports === 'object') { + // Node. Does not work with strict CommonJS, but + // only CommonJS-like enviroments that support module.exports, + // like Node. + module.exports = factory(); + } else { + // Browser globals (root is window) + root.returnExports = factory(); + } + }(this, function () { + + var call = Function.prototype.call; + var prototypeOfObject = Object.prototype; + var owns = call.bind(prototypeOfObject.hasOwnProperty); + var propertyIsEnumerable = call.bind(prototypeOfObject.propertyIsEnumerable); + var toStr = call.bind(prototypeOfObject.toString); + + // If JS engine supports accessors creating shortcuts. + var defineGetter; + var defineSetter; + var lookupGetter; + var lookupSetter; + var supportsAccessors = owns(prototypeOfObject, '__defineGetter__'); + if (supportsAccessors) { + /* eslint-disable no-underscore-dangle */ + defineGetter = call.bind(prototypeOfObject.__defineGetter__); + defineSetter = call.bind(prototypeOfObject.__defineSetter__); + lookupGetter = call.bind(prototypeOfObject.__lookupGetter__); + lookupSetter = call.bind(prototypeOfObject.__lookupSetter__); + /* eslint-enable no-underscore-dangle */ + } + + // ES5 15.2.3.2 + // http://es5.github.com/#x15.2.3.2 + if (!Object.getPrototypeOf) { + // https://github.com/es-shims/es5-shim/issues#issue/2 + // http://ejohn.org/blog/objectgetprototypeof/ + // recommended by fschaefer on github + // + // sure, and webreflection says ^_^ + // ... this will nerever possibly return null + // ... Opera Mini breaks here with infinite loops + Object.getPrototypeOf = function getPrototypeOf(object) { + /* eslint-disable no-proto */ + var proto = object.__proto__; + /* eslint-enable no-proto */ + if (proto || proto === null) { + return proto; + } else if (toStr(object.constructor) === '[object Function]') { + return object.constructor.prototype; + } else if (object instanceof Object) { + return prototypeOfObject; + } else { + // Correctly return null for Objects created with `Object.create(null)` + // (shammed or native) or `{ __proto__: null}`. Also returns null for + // cross-realm objects on browsers that lack `__proto__` support (like + // IE <11), but that's the best we can do. + return null; + } + }; + } + + // ES5 15.2.3.3 + // http://es5.github.com/#x15.2.3.3 + + var doesGetOwnPropertyDescriptorWork = function doesGetOwnPropertyDescriptorWork(object) { + try { + object.sentinel = 0; + return Object.getOwnPropertyDescriptor(object, 'sentinel').value === 0; + } catch (exception) { + return false; + } + }; + + // check whether getOwnPropertyDescriptor works if it's given. Otherwise, shim partially. + if (Object.defineProperty) { + var getOwnPropertyDescriptorWorksOnObject = doesGetOwnPropertyDescriptorWork({}); + var getOwnPropertyDescriptorWorksOnDom = typeof document === 'undefined' || + doesGetOwnPropertyDescriptorWork(document.createElement('div')); + if (!getOwnPropertyDescriptorWorksOnDom || !getOwnPropertyDescriptorWorksOnObject) { + var getOwnPropertyDescriptorFallback = Object.getOwnPropertyDescriptor; + } + } + + if (!Object.getOwnPropertyDescriptor || getOwnPropertyDescriptorFallback) { + var ERR_NON_OBJECT = 'Object.getOwnPropertyDescriptor called on a non-object: '; + + /* eslint-disable no-proto */ + Object.getOwnPropertyDescriptor = function getOwnPropertyDescriptor(object, property) { + if ((typeof object !== 'object' && typeof object !== 'function') || object === null) { + throw new TypeError(ERR_NON_OBJECT + object); + } + + // make a valiant attempt to use the real getOwnPropertyDescriptor + // for I8's DOM elements. + if (getOwnPropertyDescriptorFallback) { + try { + return getOwnPropertyDescriptorFallback.call(Object, object, property); + } catch (exception) { + // try the shim if the real one doesn't work + } + } + + var descriptor; + + // If object does not owns property return undefined immediately. + if (!owns(object, property)) { + return descriptor; + } + + // If object has a property then it's for sure `configurable`, and + // probably `enumerable`. Detect enumerability though. + descriptor = { + enumerable: propertyIsEnumerable(object, property), + configurable: true + }; + + // If JS engine supports accessor properties then property may be a + // getter or setter. + if (supportsAccessors) { + // Unfortunately `__lookupGetter__` will return a getter even + // if object has own non getter property along with a same named + // inherited getter. To avoid misbehavior we temporary remove + // `__proto__` so that `__lookupGetter__` will return getter only + // if it's owned by an object. + var prototype = object.__proto__; + var notPrototypeOfObject = object !== prototypeOfObject; + // avoid recursion problem, breaking in Opera Mini when + // Object.getOwnPropertyDescriptor(Object.prototype, 'toString') + // or any other Object.prototype accessor + if (notPrototypeOfObject) { + object.__proto__ = prototypeOfObject; + } + + var getter = lookupGetter(object, property); + var setter = lookupSetter(object, property); + + if (notPrototypeOfObject) { + // Once we have getter and setter we can put values back. + object.__proto__ = prototype; + } + + if (getter || setter) { + if (getter) { + descriptor.get = getter; + } + if (setter) { + descriptor.set = setter; + } + // If it was accessor property we're done and return here + // in order to avoid adding `value` to the descriptor. + return descriptor; + } + } + + // If we got this far we know that object has an own property that is + // not an accessor so we set it as a value and return descriptor. + descriptor.value = object[property]; + descriptor.writable = true; + return descriptor; + }; + /* eslint-enable no-proto */ + } + + // ES5 15.2.3.4 + // http://es5.github.com/#x15.2.3.4 + if (!Object.getOwnPropertyNames) { + Object.getOwnPropertyNames = function getOwnPropertyNames(object) { + return Object.keys(object); + }; + } + + // ES5 15.2.3.5 + // http://es5.github.com/#x15.2.3.5 + if (!Object.create) { + + // Contributed by Brandon Benvie, October, 2012 + var createEmpty; + var supportsProto = !({ __proto__: null } instanceof Object); + // the following produces false positives + // in Opera Mini => not a reliable check + // Object.prototype.__proto__ === null + + // Check for document.domain and active x support + // No need to use active x approach when document.domain is not set + // see https://github.com/es-shims/es5-shim/issues/150 + // variation of https://github.com/kitcambridge/es5-shim/commit/4f738ac066346 + /* global ActiveXObject */ + var shouldUseActiveX = function shouldUseActiveX() { + // return early if document.domain not set + if (!document.domain) { + return false; + } + + try { + return !!new ActiveXObject('htmlfile'); + } catch (exception) { + return false; + } + }; + + // This supports IE8 when document.domain is used + // see https://github.com/es-shims/es5-shim/issues/150 + // variation of https://github.com/kitcambridge/es5-shim/commit/4f738ac066346 + var getEmptyViaActiveX = function getEmptyViaActiveX() { + var empty; + var xDoc; + + xDoc = new ActiveXObject('htmlfile'); + + xDoc.write('