Add NightMode support."
authorSalvatore Iovene <salvatore@iovene.com>
Thu, 20 Feb 2014 11:31:35 +0000 (13:31 +0200)
committerSalvatore Iovene <salvatore@iovene.com>
Thu, 20 Feb 2014 11:31:35 +0000 (13:31 +0200)
dist/cowhide.js
dist/cowhide.min.js
src/javascripts/cowhide-core.js

index 3281dce..1875032 100644 (file)
@@ -19471,8 +19471,12 @@ return (window.jQuery = window.$ = jQuery);
 
             self.vehicle = new window.Vehicle(
                 function() {
-                    $(document).on("VehicleSpeed", function(data) {
-                        self.setDrivingMode(data.originalEvent.value > 0);
+                    $(document).on("DrivingMode", function(e) {
+                        self.setDrivingMode(e.originalEvent.value == 1);
+                    });
+
+                    $(document).on("NightMode", function(e) {
+                        self.setNightMode(e.originalEvent.value);
                     });
                 },
                 function() {
index 54f1136..fb3605a 100644 (file)
@@ -2,5 +2,5 @@
 for(v in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})x.pseudos[v]=h(v);for(v in{submit:!0,reset:!0})x.pseudos[v]=i(v);l.prototype=x.filters=x.pseudos,x.setFilters=new l,A=b.compile=function(a,b){var c,d=[],e=[],f=T[a+" "];if(!f){for(b||(b=m(a)),c=b.length;c--;)f=t(b[c]),f[N]?d.push(f):e.push(f);f=T(a,u(e,d)),f.selector=a}return f},B=b.select=function(a,b,c,d){var e,f,g,h,i,j="function"==typeof a&&a,l=!d&&m(a=j.selector||a);if(c=c||[],1===l.length){if(f=l[0]=l[0].slice(0),f.length>2&&"ID"===(g=f[0]).type&&w.getById&&9===b.nodeType&&I&&x.relative[f[1].type]){if(b=(x.find.ID(g.matches[0].replace(wb,xb),b)||[])[0],!b)return c;j&&(b=b.parentNode),a=a.slice(f.shift().value.length)}for(e=pb.needsContext.test(a)?0:f.length;e--&&(g=f[e],!x.relative[h=g.type]);)if((i=x.find[h])&&(d=i(g.matches[0].replace(wb,xb),ub.test(f[0].type)&&k(b.parentNode)||b))){if(f.splice(e,1),a=d.length&&n(f),!a)return _.apply(c,d),c;break}}return(j||A(a,l))(d,b,!I,c,ub.test(a)&&k(b.parentNode)||b),c},w.sortStable=N.split("").sort(U).join("")===N,w.detectDuplicates=!!E,F(),w.sortDetached=e(function(a){return 1&a.compareDocumentPosition(G.createElement("div"))}),e(function(a){return a.innerHTML="<a href='#'></a>","#"===a.firstChild.getAttribute("href")})||f("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),w.attributes&&e(function(a){return a.innerHTML="<input/>",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||f("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),e(function(a){return null==a.getAttribute("disabled")})||f(cb,function(a,b,c){var d;return c?void 0:a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),eb.find=b,eb.expr=b.selectors,eb.expr[":"]=eb.expr.pseudos,eb.unique=b.uniqueSort,eb.text=b.getText,eb.isXMLDoc=b.isXML,eb.contains=b.contains}(a);var nb={};eb.Callbacks=function(a){a="string"==typeof a?nb[a]||c(a):eb.extend({},a);var b,d,e,f,g,h,i=[],j=!a.once&&[],k=function(c){for(b=a.memory&&c,d=!0,h=f||0,f=0,g=i.length,e=!0;i&&g>h;h++)if(i[h].apply(c[0],c[1])===!1&&a.stopOnFalse){b=!1;break}e=!1,i&&(j?j.length&&k(j.shift()):b?i=[]:l.disable())},l={add:function(){if(i){var c=i.length;!function d(b){eb.each(b,function(b,c){var e=eb.type(c);"function"===e?a.unique&&l.has(c)||i.push(c):c&&c.length&&"string"!==e&&d(c)})}(arguments),e?g=i.length:b&&(f=c,k(b))}return this},remove:function(){return i&&eb.each(arguments,function(a,b){for(var c;(c=eb.inArray(b,i,c))>-1;)i.splice(c,1),e&&(g>=c&&g--,h>=c&&h--)}),this},has:function(a){return a?eb.inArray(a,i)>-1:!(!i||!i.length)},empty:function(){return i=[],g=0,this},disable:function(){return i=j=b=void 0,this},disabled:function(){return!i},lock:function(){return j=void 0,b||l.disable(),this},locked:function(){return!j},fireWith:function(a,b){return!i||d&&!j||(b=b||[],b=[a,b.slice?b.slice():b],e?j.push(b):k(b)),this},fire:function(){return l.fireWith(this,arguments),this},fired:function(){return!!d}};return l},eb.extend({Deferred:function(a){var b=[["resolve","done",eb.Callbacks("once memory"),"resolved"],["reject","fail",eb.Callbacks("once memory"),"rejected"],["notify","progress",eb.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return eb.Deferred(function(c){eb.each(b,function(b,f){var g=f[0],h=eb.isFunction(a[b])&&a[b];e[f[1]](function(){var a=h&&h.apply(this,arguments);a&&eb.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[g+"With"](this===d?c.promise():this,h?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?eb.extend(a,d):d}},e={};return d.pipe=d.then,eb.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[1^a][2].disable,b[2][2].lock),e[f[0]]=function(){return e[f[0]+"With"](this===e?d:this,arguments),this},e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b,c,d,e=0,f=_.call(arguments),g=f.length,h=1!==g||a&&eb.isFunction(a.promise)?g:0,i=1===h?a:eb.Deferred(),j=function(a,c,d){return function(e){c[a]=this,d[a]=arguments.length>1?_.call(arguments):e,d===b?i.notifyWith(c,d):--h||i.resolveWith(c,d)}};if(g>1)for(b=new Array(g),c=new Array(g),d=new Array(g);g>e;e++)f[e]&&eb.isFunction(f[e].promise)?f[e].promise().done(j(e,d,f)).fail(i.reject).progress(j(e,c,b)):--h;return h||i.resolveWith(d,f),i.promise()}}),eb.support=function(b){var c=S.createElement("input"),d=S.createDocumentFragment(),e=S.createElement("div"),f=S.createElement("select"),g=f.appendChild(S.createElement("option"));return c.type?(c.type="checkbox",b.checkOn=""!==c.value,b.optSelected=g.selected,b.reliableMarginRight=!0,b.boxSizingReliable=!0,b.pixelPosition=!1,c.checked=!0,b.noCloneChecked=c.cloneNode(!0).checked,f.disabled=!0,b.optDisabled=!g.disabled,c=S.createElement("input"),c.value="t",c.type="radio",b.radioValue="t"===c.value,c.setAttribute("checked","t"),c.setAttribute("name","t"),d.appendChild(c),b.checkClone=d.cloneNode(!0).cloneNode(!0).lastChild.checked,b.focusinBubbles="onfocusin"in a,e.style.backgroundClip="content-box",e.cloneNode(!0).style.backgroundClip="",b.clearCloneStyle="content-box"===e.style.backgroundClip,eb(function(){var c,d,f="padding:0;margin:0;border:0;display:block;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box",g=S.getElementsByTagName("body")[0];g&&(c=S.createElement("div"),c.style.cssText="border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px",g.appendChild(c).appendChild(e),e.innerHTML="",e.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%",eb.swap(g,null!=g.style.zoom?{zoom:1}:{},function(){b.boxSizing=4===e.offsetWidth}),a.getComputedStyle&&(b.pixelPosition="1%"!==(a.getComputedStyle(e,null)||{}).top,b.boxSizingReliable="4px"===(a.getComputedStyle(e,null)||{width:"4px"}).width,d=e.appendChild(S.createElement("div")),d.style.cssText=e.style.cssText=f,d.style.marginRight=d.style.width="0",e.style.width="1px",b.reliableMarginRight=!parseFloat((a.getComputedStyle(d,null)||{}).marginRight)),g.removeChild(c))}),b):b}({});var ob,pb,qb=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,rb=/([A-Z])/g;d.uid=1,d.accepts=function(a){return a.nodeType?1===a.nodeType||9===a.nodeType:!0},d.prototype={key:function(a){if(!d.accepts(a))return 0;var b={},c=a[this.expando];if(!c){c=d.uid++;try{b[this.expando]={value:c},Object.defineProperties(a,b)}catch(e){b[this.expando]=c,eb.extend(a,b)}}return this.cache[c]||(this.cache[c]={}),c},set:function(a,b,c){var d,e=this.key(a),f=this.cache[e];if("string"==typeof b)f[b]=c;else if(eb.isEmptyObject(f))eb.extend(this.cache[e],b);else for(d in b)f[d]=b[d];return f},get:function(a,b){var c=this.cache[this.key(a)];return void 0===b?c:c[b]},access:function(a,b,c){var d;return void 0===b||b&&"string"==typeof b&&void 0===c?(d=this.get(a,b),void 0!==d?d:this.get(a,eb.camelCase(b))):(this.set(a,b,c),void 0!==c?c:b)},remove:function(a,b){var c,d,e,f=this.key(a),g=this.cache[f];if(void 0===b)this.cache[f]={};else{eb.isArray(b)?d=b.concat(b.map(eb.camelCase)):(e=eb.camelCase(b),b in g?d=[b,e]:(d=e,d=d in g?[d]:d.match(gb)||[])),c=d.length;for(;c--;)delete g[d[c]]}},hasData:function(a){return!eb.isEmptyObject(this.cache[a[this.expando]]||{})},discard:function(a){a[this.expando]&&delete this.cache[a[this.expando]]}},ob=new d,pb=new d,eb.extend({acceptData:d.accepts,hasData:function(a){return ob.hasData(a)||pb.hasData(a)},data:function(a,b,c){return ob.access(a,b,c)},removeData:function(a,b){ob.remove(a,b)},_data:function(a,b,c){return pb.access(a,b,c)},_removeData:function(a,b){pb.remove(a,b)}}),eb.fn.extend({data:function(a,b){var c,d,f=this[0],g=0,h=null;if(void 0===a){if(this.length&&(h=ob.get(f),1===f.nodeType&&!pb.get(f,"hasDataAttrs"))){for(c=f.attributes;g<c.length;g++)d=c[g].name,0===d.indexOf("data-")&&(d=eb.camelCase(d.slice(5)),e(f,d,h[d]));pb.set(f,"hasDataAttrs",!0)}return h}return"object"==typeof a?this.each(function(){ob.set(this,a)}):eb.access(this,function(b){var c,d=eb.camelCase(a);if(f&&void 0===b){if(c=ob.get(f,a),void 0!==c)return c;if(c=ob.get(f,d),void 0!==c)return c;if(c=e(f,d,void 0),void 0!==c)return c}else this.each(function(){var c=ob.get(this,d);ob.set(this,d,b),-1!==a.indexOf("-")&&void 0!==c&&ob.set(this,a,b)})},null,b,arguments.length>1,null,!0)},removeData:function(a){return this.each(function(){ob.remove(this,a)})}}),eb.extend({queue:function(a,b,c){var d;return a?(b=(b||"fx")+"queue",d=pb.get(a,b),c&&(!d||eb.isArray(c)?d=pb.access(a,b,eb.makeArray(c)):d.push(c)),d||[]):void 0},dequeue:function(a,b){b=b||"fx";var c=eb.queue(a,b),d=c.length,e=c.shift(),f=eb._queueHooks(a,b),g=function(){eb.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return pb.get(a,c)||pb.access(a,c,{empty:eb.Callbacks("once memory").add(function(){pb.remove(a,[b+"queue",c])})})}}),eb.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.length<c?eb.queue(this[0],a):void 0===b?this:this.each(function(){var c=eb.queue(this,a,b);eb._queueHooks(this,a),"fx"===a&&"inprogress"!==c[0]&&eb.dequeue(this,a)})},dequeue:function(a){return this.each(function(){eb.dequeue(this,a)})},delay:function(a,b){return a=eb.fx?eb.fx.speeds[a]||a:a,b=b||"fx",this.queue(b,function(b,c){var d=setTimeout(b,a);c.stop=function(){clearTimeout(d)}})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,b){var c,d=1,e=eb.Deferred(),f=this,g=this.length,h=function(){--d||e.resolveWith(f,[f])};for("string"!=typeof a&&(b=a,a=void 0),a=a||"fx";g--;)c=pb.get(f[g],a+"queueHooks"),c&&c.empty&&(d++,c.empty.add(h));return h(),e.promise(b)}});var sb,tb,ub=/[\t\r\n\f]/g,vb=/\r/g,wb=/^(?:input|select|textarea|button)$/i;eb.fn.extend({attr:function(a,b){return eb.access(this,eb.attr,a,b,arguments.length>1)},removeAttr:function(a){return this.each(function(){eb.removeAttr(this,a)})},prop:function(a,b){return eb.access(this,eb.prop,a,b,arguments.length>1)},removeProp:function(a){return this.each(function(){delete this[eb.propFix[a]||a]})},addClass:function(a){var b,c,d,e,f,g=0,h=this.length,i="string"==typeof a&&a;if(eb.isFunction(a))return this.each(function(b){eb(this).addClass(a.call(this,b,this.className))});if(i)for(b=(a||"").match(gb)||[];h>g;g++)if(c=this[g],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(ub," "):" ")){for(f=0;e=b[f++];)d.indexOf(" "+e+" ")<0&&(d+=e+" ");c.className=eb.trim(d)}return this},removeClass:function(a){var b,c,d,e,f,g=0,h=this.length,i=0===arguments.length||"string"==typeof a&&a;if(eb.isFunction(a))return this.each(function(b){eb(this).removeClass(a.call(this,b,this.className))});if(i)for(b=(a||"").match(gb)||[];h>g;g++)if(c=this[g],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(ub," "):"")){for(f=0;e=b[f++];)for(;d.indexOf(" "+e+" ")>=0;)d=d.replace(" "+e+" "," ");c.className=a?eb.trim(d):""}return this},toggleClass:function(a,b){var c=typeof a;return"boolean"==typeof b&&"string"===c?b?this.addClass(a):this.removeClass(a):this.each(eb.isFunction(a)?function(c){eb(this).toggleClass(a.call(this,c,this.className,b),b)}:function(){if("string"===c)for(var b,d=0,e=eb(this),f=a.match(gb)||[];b=f[d++];)e.hasClass(b)?e.removeClass(b):e.addClass(b);else(c===Q||"boolean"===c)&&(this.className&&pb.set(this,"__className__",this.className),this.className=this.className||a===!1?"":pb.get(this,"__className__")||"")})},hasClass:function(a){for(var b=" "+a+" ",c=0,d=this.length;d>c;c++)if(1===this[c].nodeType&&(" "+this[c].className+" ").replace(ub," ").indexOf(b)>=0)return!0;return!1},val:function(a){var b,c,d,e=this[0];{if(arguments.length)return d=eb.isFunction(a),this.each(function(c){var e;1===this.nodeType&&(e=d?a.call(this,c,eb(this).val()):a,null==e?e="":"number"==typeof e?e+="":eb.isArray(e)&&(e=eb.map(e,function(a){return null==a?"":a+""})),b=eb.valHooks[this.type]||eb.valHooks[this.nodeName.toLowerCase()],b&&"set"in b&&void 0!==b.set(this,e,"value")||(this.value=e))});if(e)return b=eb.valHooks[e.type]||eb.valHooks[e.nodeName.toLowerCase()],b&&"get"in b&&void 0!==(c=b.get(e,"value"))?c:(c=e.value,"string"==typeof c?c.replace(vb,""):null==c?"":c)}}}),eb.extend({valHooks:{option:{get:function(a){var b=a.attributes.value;return!b||b.specified?a.value:a.text}},select:{get:function(a){for(var b,c,d=a.options,e=a.selectedIndex,f="select-one"===a.type||0>e,g=f?null:[],h=f?e+1:d.length,i=0>e?h:f?e:0;h>i;i++)if(c=d[i],!(!c.selected&&i!==e||(eb.support.optDisabled?c.disabled:null!==c.getAttribute("disabled"))||c.parentNode.disabled&&eb.nodeName(c.parentNode,"optgroup"))){if(b=eb(c).val(),f)return b;g.push(b)}return g},set:function(a,b){for(var c,d,e=a.options,f=eb.makeArray(b),g=e.length;g--;)d=e[g],(d.selected=eb.inArray(eb(d).val(),f)>=0)&&(c=!0);return c||(a.selectedIndex=-1),f}}},attr:function(a,b,c){var d,e,f=a.nodeType;if(a&&3!==f&&8!==f&&2!==f)return typeof a.getAttribute===Q?eb.prop(a,b,c):(1===f&&eb.isXMLDoc(a)||(b=b.toLowerCase(),d=eb.attrHooks[b]||(eb.expr.match.bool.test(b)?tb:sb)),void 0===c?d&&"get"in d&&null!==(e=d.get(a,b))?e:(e=eb.find.attr(a,b),null==e?void 0:e):null!==c?d&&"set"in d&&void 0!==(e=d.set(a,c,b))?e:(a.setAttribute(b,c+""),c):void eb.removeAttr(a,b))},removeAttr:function(a,b){var c,d,e=0,f=b&&b.match(gb);if(f&&1===a.nodeType)for(;c=f[e++];)d=eb.propFix[c]||c,eb.expr.match.bool.test(c)&&(a[d]=!1),a.removeAttribute(c)},attrHooks:{type:{set:function(a,b){if(!eb.support.radioValue&&"radio"===b&&eb.nodeName(a,"input")){var c=a.value;return a.setAttribute("type",b),c&&(a.value=c),b}}}},propFix:{"for":"htmlFor","class":"className"},prop:function(a,b,c){var d,e,f,g=a.nodeType;if(a&&3!==g&&8!==g&&2!==g)return f=1!==g||!eb.isXMLDoc(a),f&&(b=eb.propFix[b]||b,e=eb.propHooks[b]),void 0!==c?e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:a[b]=c:e&&"get"in e&&null!==(d=e.get(a,b))?d:a[b]},propHooks:{tabIndex:{get:function(a){return a.hasAttribute("tabindex")||wb.test(a.nodeName)||a.href?a.tabIndex:-1}}}}),tb={set:function(a,b,c){return b===!1?eb.removeAttr(a,c):a.setAttribute(c,c),c}},eb.each(eb.expr.match.bool.source.match(/\w+/g),function(a,b){var c=eb.expr.attrHandle[b]||eb.find.attr;eb.expr.attrHandle[b]=function(a,b,d){var e=eb.expr.attrHandle[b],f=d?void 0:(eb.expr.attrHandle[b]=void 0)!=c(a,b,d)?b.toLowerCase():null;return eb.expr.attrHandle[b]=e,f}}),eb.support.optSelected||(eb.propHooks.selected={get:function(a){var b=a.parentNode;return b&&b.parentNode&&b.parentNode.selectedIndex,null}}),eb.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){eb.propFix[this.toLowerCase()]=this}),eb.each(["radio","checkbox"],function(){eb.valHooks[this]={set:function(a,b){return eb.isArray(b)?a.checked=eb.inArray(eb(a).val(),b)>=0:void 0}},eb.support.checkOn||(eb.valHooks[this].get=function(a){return null===a.getAttribute("value")?"on":a.value})});var xb=/^key/,yb=/^(?:mouse|contextmenu)|click/,zb=/^(?:focusinfocus|focusoutblur)$/,Ab=/^([^.]*)(?:\.(.+)|)$/;eb.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,n,o,p,q=pb.get(a);if(q){for(c.handler&&(f=c,c=f.handler,e=f.selector),c.guid||(c.guid=eb.guid++),(i=q.events)||(i=q.events={}),(g=q.handle)||(g=q.handle=function(a){return typeof eb===Q||a&&eb.event.triggered===a.type?void 0:eb.event.dispatch.apply(g.elem,arguments)},g.elem=a),b=(b||"").match(gb)||[""],j=b.length;j--;)h=Ab.exec(b[j])||[],n=p=h[1],o=(h[2]||"").split(".").sort(),n&&(l=eb.event.special[n]||{},n=(e?l.delegateType:l.bindType)||n,l=eb.event.special[n]||{},k=eb.extend({type:n,origType:p,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&eb.expr.match.needsContext.test(e),namespace:o.join(".")},f),(m=i[n])||(m=i[n]=[],m.delegateCount=0,l.setup&&l.setup.call(a,d,o,g)!==!1||a.addEventListener&&a.addEventListener(n,g,!1)),l.add&&(l.add.call(a,k),k.handler.guid||(k.handler.guid=c.guid)),e?m.splice(m.delegateCount++,0,k):m.push(k),eb.event.global[n]=!0);a=null}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,n,o,p,q=pb.hasData(a)&&pb.get(a);if(q&&(i=q.events)){for(b=(b||"").match(gb)||[""],j=b.length;j--;)if(h=Ab.exec(b[j])||[],n=p=h[1],o=(h[2]||"").split(".").sort(),n){for(l=eb.event.special[n]||{},n=(d?l.delegateType:l.bindType)||n,m=i[n]||[],h=h[2]&&new RegExp("(^|\\.)"+o.join("\\.(?:.*\\.|)")+"(\\.|$)"),g=f=m.length;f--;)k=m[f],!e&&p!==k.origType||c&&c.guid!==k.guid||h&&!h.test(k.namespace)||d&&d!==k.selector&&("**"!==d||!k.selector)||(m.splice(f,1),k.selector&&m.delegateCount--,l.remove&&l.remove.call(a,k));g&&!m.length&&(l.teardown&&l.teardown.call(a,o,q.handle)!==!1||eb.removeEvent(a,n,q.handle),delete i[n])}else for(n in i)eb.event.remove(a,n+b[j],c,d,!0);eb.isEmptyObject(i)&&(delete q.handle,pb.remove(a,"events"))}},trigger:function(b,c,d,e){var f,g,h,i,j,k,l,m=[d||S],n=cb.call(b,"type")?b.type:b,o=cb.call(b,"namespace")?b.namespace.split("."):[];if(g=h=d=d||S,3!==d.nodeType&&8!==d.nodeType&&!zb.test(n+eb.event.triggered)&&(n.indexOf(".")>=0&&(o=n.split("."),n=o.shift(),o.sort()),j=n.indexOf(":")<0&&"on"+n,b=b[eb.expando]?b:new eb.Event(n,"object"==typeof b&&b),b.isTrigger=e?2:3,b.namespace=o.join("."),b.namespace_re=b.namespace?new RegExp("(^|\\.)"+o.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,b.result=void 0,b.target||(b.target=d),c=null==c?[b]:eb.makeArray(c,[b]),l=eb.event.special[n]||{},e||!l.trigger||l.trigger.apply(d,c)!==!1)){if(!e&&!l.noBubble&&!eb.isWindow(d)){for(i=l.delegateType||n,zb.test(i+n)||(g=g.parentNode);g;g=g.parentNode)m.push(g),h=g;h===(d.ownerDocument||S)&&m.push(h.defaultView||h.parentWindow||a)}for(f=0;(g=m[f++])&&!b.isPropagationStopped();)b.type=f>1?i:l.bindType||n,k=(pb.get(g,"events")||{})[b.type]&&pb.get(g,"handle"),k&&k.apply(g,c),k=j&&g[j],k&&eb.acceptData(g)&&k.apply&&k.apply(g,c)===!1&&b.preventDefault();return b.type=n,e||b.isDefaultPrevented()||l._default&&l._default.apply(m.pop(),c)!==!1||!eb.acceptData(d)||j&&eb.isFunction(d[n])&&!eb.isWindow(d)&&(h=d[j],h&&(d[j]=null),eb.event.triggered=n,d[n](),eb.event.triggered=void 0,h&&(d[j]=h)),b.result}},dispatch:function(a){a=eb.event.fix(a);var b,c,d,e,f,g=[],h=_.call(arguments),i=(pb.get(this,"events")||{})[a.type]||[],j=eb.event.special[a.type]||{};if(h[0]=a,a.delegateTarget=this,!j.preDispatch||j.preDispatch.call(this,a)!==!1){for(g=eb.event.handlers.call(this,a,i),b=0;(e=g[b++])&&!a.isPropagationStopped();)for(a.currentTarget=e.elem,c=0;(f=e.handlers[c++])&&!a.isImmediatePropagationStopped();)(!a.namespace_re||a.namespace_re.test(f.namespace))&&(a.handleObj=f,a.data=f.data,d=((eb.event.special[f.origType]||{}).handle||f.handler).apply(e.elem,h),void 0!==d&&(a.result=d)===!1&&(a.preventDefault(),a.stopPropagation()));return j.postDispatch&&j.postDispatch.call(this,a),a.result}},handlers:function(a,b){var c,d,e,f,g=[],h=b.delegateCount,i=a.target;if(h&&i.nodeType&&(!a.button||"click"!==a.type))for(;i!==this;i=i.parentNode||this)if(i.disabled!==!0||"click"!==a.type){for(d=[],c=0;h>c;c++)f=b[c],e=f.selector+" ",void 0===d[e]&&(d[e]=f.needsContext?eb(e,this).index(i)>=0:eb.find(e,this,null,[i]).length),d[e]&&d.push(f);d.length&&g.push({elem:i,handlers:d})}return h<b.length&&g.push({elem:this,handlers:b.slice(h)}),g},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(a,b){return null==a.which&&(a.which=null!=b.charCode?b.charCode:b.keyCode),a}},mouseHooks:{props:"button buttons clientX clientY offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(a,b){var c,d,e,f=b.button;return null==a.pageX&&null!=b.clientX&&(c=a.target.ownerDocument||S,d=c.documentElement,e=c.body,a.pageX=b.clientX+(d&&d.scrollLeft||e&&e.scrollLeft||0)-(d&&d.clientLeft||e&&e.clientLeft||0),a.pageY=b.clientY+(d&&d.scrollTop||e&&e.scrollTop||0)-(d&&d.clientTop||e&&e.clientTop||0)),a.which||void 0===f||(a.which=1&f?1:2&f?3:4&f?2:0),a}},fix:function(a){if(a[eb.expando])return a;var b,c,d,e=a.type,f=a,g=this.fixHooks[e];for(g||(this.fixHooks[e]=g=yb.test(e)?this.mouseHooks:xb.test(e)?this.keyHooks:{}),d=g.props?this.props.concat(g.props):this.props,a=new eb.Event(f),b=d.length;b--;)c=d[b],a[c]=f[c];return a.target||(a.target=S),3===a.target.nodeType&&(a.target=a.target.parentNode),g.filter?g.filter(a,f):a},special:{load:{noBubble:!0},focus:{trigger:function(){return this!==h()&&this.focus?(this.focus(),!1):void 0},delegateType:"focusin"},blur:{trigger:function(){return this===h()&&this.blur?(this.blur(),!1):void 0},delegateType:"focusout"},click:{trigger:function(){return"checkbox"===this.type&&this.click&&eb.nodeName(this,"input")?(this.click(),!1):void 0},_default:function(a){return eb.nodeName(a.target,"a")}},beforeunload:{postDispatch:function(a){void 0!==a.result&&(a.originalEvent.returnValue=a.result)}}},simulate:function(a,b,c,d){var e=eb.extend(new eb.Event,c,{type:a,isSimulated:!0,originalEvent:{}});d?eb.event.trigger(e,null,b):eb.event.dispatch.call(b,e),e.isDefaultPrevented()&&c.preventDefault()}},eb.removeEvent=function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c,!1)},eb.Event=function(a,b){return this instanceof eb.Event?(a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||a.getPreventDefault&&a.getPreventDefault()?f:g):this.type=a,b&&eb.extend(this,b),this.timeStamp=a&&a.timeStamp||eb.now(),void(this[eb.expando]=!0)):new eb.Event(a,b)},eb.Event.prototype={isDefaultPrevented:g,isPropagationStopped:g,isImmediatePropagationStopped:g,preventDefault:function(){var a=this.originalEvent;this.isDefaultPrevented=f,a&&a.preventDefault&&a.preventDefault()},stopPropagation:function(){var a=this.originalEvent;this.isPropagationStopped=f,a&&a.stopPropagation&&a.stopPropagation()},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=f,this.stopPropagation()}},eb.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(a,b){eb.event.special[a]={delegateType:b,bindType:b,handle:function(a){var c,d=this,e=a.relatedTarget,f=a.handleObj;return(!e||e!==d&&!eb.contains(d,e))&&(a.type=f.origType,c=f.handler.apply(this,arguments),a.type=b),c}}}),eb.support.focusinBubbles||eb.each({focus:"focusin",blur:"focusout"},function(a,b){var c=0,d=function(a){eb.event.simulate(b,a.target,eb.event.fix(a),!0)};eb.event.special[b]={setup:function(){0===c++&&S.addEventListener(a,d,!0)},teardown:function(){0===--c&&S.removeEventListener(a,d,!0)}}}),eb.fn.extend({on:function(a,b,c,d,e){var f,h;if("object"==typeof a){"string"!=typeof b&&(c=c||b,b=void 0);for(h in a)this.on(h,b,c,a[h],e);return this}if(null==c&&null==d?(d=b,c=b=void 0):null==d&&("string"==typeof b?(d=c,c=void 0):(d=c,c=b,b=void 0)),d===!1)d=g;else if(!d)return this;return 1===e&&(f=d,d=function(a){return eb().off(a),f.apply(this,arguments)},d.guid=f.guid||(f.guid=eb.guid++)),this.each(function(){eb.event.add(this,a,d,c,b)})},one:function(a,b,c,d){return this.on(a,b,c,d,1)},off:function(a,b,c){var d,e;if(a&&a.preventDefault&&a.handleObj)return d=a.handleObj,eb(a.delegateTarget).off(d.namespace?d.origType+"."+d.namespace:d.origType,d.selector,d.handler),this;if("object"==typeof a){for(e in a)this.off(e,b,a[e]);return this}return(b===!1||"function"==typeof b)&&(c=b,b=void 0),c===!1&&(c=g),this.each(function(){eb.event.remove(this,a,c,b)})},trigger:function(a,b){return this.each(function(){eb.event.trigger(a,b,this)})},triggerHandler:function(a,b){var c=this[0];return c?eb.event.trigger(a,b,c,!0):void 0}});var Bb=/^.[^:#\[\.,]*$/,Cb=/^(?:parents|prev(?:Until|All))/,Db=eb.expr.match.needsContext,Eb={children:!0,contents:!0,next:!0,prev:!0};eb.fn.extend({find:function(a){var b,c=[],d=this,e=d.length;if("string"!=typeof a)return this.pushStack(eb(a).filter(function(){for(b=0;e>b;b++)if(eb.contains(d[b],this))return!0}));for(b=0;e>b;b++)eb.find(a,d[b],c);return c=this.pushStack(e>1?eb.unique(c):c),c.selector=this.selector?this.selector+" "+a:a,c},has:function(a){var b=eb(a,this),c=b.length;return this.filter(function(){for(var a=0;c>a;a++)if(eb.contains(this,b[a]))return!0})},not:function(a){return this.pushStack(j(this,a||[],!0))},filter:function(a){return this.pushStack(j(this,a||[],!1))},is:function(a){return!!j(this,"string"==typeof a&&Db.test(a)?eb(a):a||[],!1).length},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=Db.test(a)||"string"!=typeof a?eb(a,b||this.context):0;e>d;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&eb.find.matchesSelector(c,a))){c=f.push(c);break}return this.pushStack(f.length>1?eb.unique(f):f)},index:function(a){return a?"string"==typeof a?ab.call(eb(a),this[0]):ab.call(this,a.jquery?a[0]:a):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){var c="string"==typeof a?eb(a,b):eb.makeArray(a&&a.nodeType?[a]:a),d=eb.merge(this.get(),c);return this.pushStack(eb.unique(d))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}}),eb.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return eb.dir(a,"parentNode")},parentsUntil:function(a,b,c){return eb.dir(a,"parentNode",c)},next:function(a){return i(a,"nextSibling")},prev:function(a){return i(a,"previousSibling")},nextAll:function(a){return eb.dir(a,"nextSibling")},prevAll:function(a){return eb.dir(a,"previousSibling")},nextUntil:function(a,b,c){return eb.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return eb.dir(a,"previousSibling",c)},siblings:function(a){return eb.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return eb.sibling(a.firstChild)},contents:function(a){return a.contentDocument||eb.merge([],a.childNodes)}},function(a,b){eb.fn[a]=function(c,d){var e=eb.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=eb.filter(d,e)),this.length>1&&(Eb[a]||eb.unique(e),Cb.test(a)&&e.reverse()),this.pushStack(e)}}),eb.extend({filter:function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?eb.find.matchesSelector(d,a)?[d]:[]:eb.find.matches(a,eb.grep(b,function(a){return 1===a.nodeType}))},dir:function(a,b,c){for(var d=[],e=void 0!==c;(a=a[b])&&9!==a.nodeType;)if(1===a.nodeType){if(e&&eb(a).is(c))break;d.push(a)}return d},sibling:function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c}});var Fb=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,Gb=/<([\w:]+)/,Hb=/<|&#?\w+;/,Ib=/<(?:script|style|link)/i,Jb=/^(?:checkbox|radio)$/i,Kb=/checked\s*(?:[^=]|=\s*.checked.)/i,Lb=/^$|\/(?:java|ecma)script/i,Mb=/^true\/(.*)/,Nb=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,Ob={option:[1,"<select multiple='multiple'>","</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};Ob.optgroup=Ob.option,Ob.tbody=Ob.tfoot=Ob.colgroup=Ob.caption=Ob.thead,Ob.th=Ob.td,eb.fn.extend({text:function(a){return eb.access(this,function(a){return void 0===a?eb.text(this):this.empty().append((this[0]&&this[0].ownerDocument||S).createTextNode(a))},null,a,arguments.length)},append:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=k(this,a);b.appendChild(a)}})},prepend:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=k(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},remove:function(a,b){for(var c,d=a?eb.filter(a,this):this,e=0;null!=(c=d[e]);e++)b||1!==c.nodeType||eb.cleanData(p(c)),c.parentNode&&(b&&eb.contains(c.ownerDocument,c)&&n(p(c,"script")),c.parentNode.removeChild(c));return this},empty:function(){for(var a,b=0;null!=(a=this[b]);b++)1===a.nodeType&&(eb.cleanData(p(a,!1)),a.textContent="");return this},clone:function(a,b){return a=null==a?!1:a,b=null==b?a:b,this.map(function(){return eb.clone(this,a,b)})},html:function(a){return eb.access(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a&&1===b.nodeType)return b.innerHTML;if("string"==typeof a&&!Ib.test(a)&&!Ob[(Gb.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Fb,"<$1></$2>");try{for(;d>c;c++)b=this[c]||{},1===b.nodeType&&(eb.cleanData(p(b,!1)),b.innerHTML=a);b=0}catch(e){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=eb.map(this,function(a){return[a.nextSibling,a.parentNode]}),b=0;return this.domManip(arguments,function(c){var d=a[b++],e=a[b++];e&&(d&&d.parentNode!==e&&(d=this.nextSibling),eb(this).remove(),e.insertBefore(c,d))},!0),b?this:this.remove()},detach:function(a){return this.remove(a,!0)},domManip:function(a,b,c){a=Z.apply([],a);var d,e,f,g,h,i,j=0,k=this.length,n=this,o=k-1,q=a[0],r=eb.isFunction(q);if(r||!(1>=k||"string"!=typeof q||eb.support.checkClone)&&Kb.test(q))return this.each(function(d){var e=n.eq(d);r&&(a[0]=q.call(this,d,e.html())),e.domManip(a,b,c)});if(k&&(d=eb.buildFragment(a,this[0].ownerDocument,!1,!c&&this),e=d.firstChild,1===d.childNodes.length&&(d=e),e)){for(f=eb.map(p(d,"script"),l),g=f.length;k>j;j++)h=d,j!==o&&(h=eb.clone(h,!0,!0),g&&eb.merge(f,p(h,"script"))),b.call(this[j],h,j);if(g)for(i=f[f.length-1].ownerDocument,eb.map(f,m),j=0;g>j;j++)h=f[j],Lb.test(h.type||"")&&!pb.access(h,"globalEval")&&eb.contains(i,h)&&(h.src?eb._evalUrl(h.src):eb.globalEval(h.textContent.replace(Nb,"")))}return this}}),eb.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){eb.fn[a]=function(a){for(var c,d=[],e=eb(a),f=e.length-1,g=0;f>=g;g++)c=g===f?this:this.clone(!0),eb(e[g])[b](c),$.apply(d,c.get());return this.pushStack(d)}}),eb.extend({clone:function(a,b,c){var d,e,f,g,h=a.cloneNode(!0),i=eb.contains(a.ownerDocument,a);if(!(eb.support.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||eb.isXMLDoc(a)))for(g=p(h),f=p(a),d=0,e=f.length;e>d;d++)q(f[d],g[d]);if(b)if(c)for(f=f||p(a),g=g||p(h),d=0,e=f.length;e>d;d++)o(f[d],g[d]);else o(a,h);return g=p(h,"script"),g.length>0&&n(g,!i&&p(a,"script")),h},buildFragment:function(a,b,c,d){for(var e,f,g,h,i,j,k=0,l=a.length,m=b.createDocumentFragment(),o=[];l>k;k++)if(e=a[k],e||0===e)if("object"===eb.type(e))eb.merge(o,e.nodeType?[e]:e);else if(Hb.test(e)){for(f=f||m.appendChild(b.createElement("div")),g=(Gb.exec(e)||["",""])[1].toLowerCase(),h=Ob[g]||Ob._default,f.innerHTML=h[1]+e.replace(Fb,"<$1></$2>")+h[2],j=h[0];j--;)f=f.lastChild;eb.merge(o,f.childNodes),f=m.firstChild,f.textContent=""}else o.push(b.createTextNode(e));for(m.textContent="",k=0;e=o[k++];)if((!d||-1===eb.inArray(e,d))&&(i=eb.contains(e.ownerDocument,e),f=p(m.appendChild(e),"script"),i&&n(f),c))for(j=0;e=f[j++];)Lb.test(e.type||"")&&c.push(e);return m},cleanData:function(a){for(var b,c,e,f,g,h,i=eb.event.special,j=0;void 0!==(c=a[j]);j++){if(d.accepts(c)&&(g=c[pb.expando],g&&(b=pb.cache[g]))){if(e=Object.keys(b.events||{}),e.length)for(h=0;void 0!==(f=e[h]);h++)i[f]?eb.event.remove(c,f):eb.removeEvent(c,f,b.handle);pb.cache[g]&&delete pb.cache[g]}delete ob.cache[c[ob.expando]]}},_evalUrl:function(a){return eb.ajax({url:a,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})}}),eb.fn.extend({wrapAll:function(a){var b;return eb.isFunction(a)?this.each(function(b){eb(this).wrapAll(a.call(this,b))}):(this[0]&&(b=eb(a,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){for(var a=this;a.firstElementChild;)a=a.firstElementChild;
 return a}).append(this)),this)},wrapInner:function(a){return this.each(eb.isFunction(a)?function(b){eb(this).wrapInner(a.call(this,b))}:function(){var b=eb(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=eb.isFunction(a);return this.each(function(c){eb(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){eb.nodeName(this,"body")||eb(this).replaceWith(this.childNodes)}).end()}});var Pb,Qb,Rb=/^(none|table(?!-c[ea]).+)/,Sb=/^margin/,Tb=new RegExp("^("+fb+")(.*)$","i"),Ub=new RegExp("^("+fb+")(?!px)[a-z%]+$","i"),Vb=new RegExp("^([+-])=("+fb+")","i"),Wb={BODY:"block"},Xb={position:"absolute",visibility:"hidden",display:"block"},Yb={letterSpacing:0,fontWeight:400},Zb=["Top","Right","Bottom","Left"],$b=["Webkit","O","Moz","ms"];eb.fn.extend({css:function(a,b){return eb.access(this,function(a,b,c){var d,e,f={},g=0;if(eb.isArray(b)){for(d=t(a),e=b.length;e>g;g++)f[b[g]]=eb.css(a,b[g],!1,d);return f}return void 0!==c?eb.style(a,b,c):eb.css(a,b)},a,b,arguments.length>1)},show:function(){return u(this,!0)},hide:function(){return u(this)},toggle:function(a){return"boolean"==typeof a?a?this.show():this.hide():this.each(function(){s(this)?eb(this).show():eb(this).hide()})}}),eb.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=Pb(a,"opacity");return""===c?"1":c}}}},cssNumber:{columnCount:!0,fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":"cssFloat"},style:function(a,b,c,d){if(a&&3!==a.nodeType&&8!==a.nodeType&&a.style){var e,f,g,h=eb.camelCase(b),i=a.style;return b=eb.cssProps[h]||(eb.cssProps[h]=r(i,h)),g=eb.cssHooks[b]||eb.cssHooks[h],void 0===c?g&&"get"in g&&void 0!==(e=g.get(a,!1,d))?e:i[b]:(f=typeof c,"string"===f&&(e=Vb.exec(c))&&(c=(e[1]+1)*e[2]+parseFloat(eb.css(a,b)),f="number"),null==c||"number"===f&&isNaN(c)||("number"!==f||eb.cssNumber[h]||(c+="px"),eb.support.clearCloneStyle||""!==c||0!==b.indexOf("background")||(i[b]="inherit"),g&&"set"in g&&void 0===(c=g.set(a,c,d))||(i[b]=c)),void 0)}},css:function(a,b,c,d){var e,f,g,h=eb.camelCase(b);return b=eb.cssProps[h]||(eb.cssProps[h]=r(a.style,h)),g=eb.cssHooks[b]||eb.cssHooks[h],g&&"get"in g&&(e=g.get(a,!0,c)),void 0===e&&(e=Pb(a,b,d)),"normal"===e&&b in Yb&&(e=Yb[b]),""===c||c?(f=parseFloat(e),c===!0||eb.isNumeric(f)?f||0:e):e}}),Pb=function(a,b,c){var d,e,f,g=c||t(a),h=g?g.getPropertyValue(b)||g[b]:void 0,i=a.style;return g&&(""!==h||eb.contains(a.ownerDocument,a)||(h=eb.style(a,b)),Ub.test(h)&&Sb.test(b)&&(d=i.width,e=i.minWidth,f=i.maxWidth,i.minWidth=i.maxWidth=i.width=h,h=g.width,i.width=d,i.minWidth=e,i.maxWidth=f)),h},eb.each(["height","width"],function(a,b){eb.cssHooks[b]={get:function(a,c,d){return c?0===a.offsetWidth&&Rb.test(eb.css(a,"display"))?eb.swap(a,Xb,function(){return x(a,b,d)}):x(a,b,d):void 0},set:function(a,c,d){var e=d&&t(a);return v(a,c,d?w(a,b,d,eb.support.boxSizing&&"border-box"===eb.css(a,"boxSizing",!1,e),e):0)}}}),eb(function(){eb.support.reliableMarginRight||(eb.cssHooks.marginRight={get:function(a,b){return b?eb.swap(a,{display:"inline-block"},Pb,[a,"marginRight"]):void 0}}),!eb.support.pixelPosition&&eb.fn.position&&eb.each(["top","left"],function(a,b){eb.cssHooks[b]={get:function(a,c){return c?(c=Pb(a,b),Ub.test(c)?eb(a).position()[b]+"px":c):void 0}}})}),eb.expr&&eb.expr.filters&&(eb.expr.filters.hidden=function(a){return a.offsetWidth<=0&&a.offsetHeight<=0},eb.expr.filters.visible=function(a){return!eb.expr.filters.hidden(a)}),eb.each({margin:"",padding:"",border:"Width"},function(a,b){eb.cssHooks[a+b]={expand:function(c){for(var d=0,e={},f="string"==typeof c?c.split(" "):[c];4>d;d++)e[a+Zb[d]+b]=f[d]||f[d-2]||f[0];return e}},Sb.test(a)||(eb.cssHooks[a+b].set=v)});var _b=/%20/g,ac=/\[\]$/,bc=/\r?\n/g,cc=/^(?:submit|button|image|reset|file)$/i,dc=/^(?:input|select|textarea|keygen)/i;eb.fn.extend({serialize:function(){return eb.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var a=eb.prop(this,"elements");return a?eb.makeArray(a):this}).filter(function(){var a=this.type;return this.name&&!eb(this).is(":disabled")&&dc.test(this.nodeName)&&!cc.test(a)&&(this.checked||!Jb.test(a))}).map(function(a,b){var c=eb(this).val();return null==c?null:eb.isArray(c)?eb.map(c,function(a){return{name:b.name,value:a.replace(bc,"\r\n")}}):{name:b.name,value:c.replace(bc,"\r\n")}}).get()}}),eb.param=function(a,b){var c,d=[],e=function(a,b){b=eb.isFunction(b)?b():null==b?"":b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};if(void 0===b&&(b=eb.ajaxSettings&&eb.ajaxSettings.traditional),eb.isArray(a)||a.jquery&&!eb.isPlainObject(a))eb.each(a,function(){e(this.name,this.value)});else for(c in a)A(c,a[c],b,e);return d.join("&").replace(_b,"+")},eb.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(a,b){eb.fn[b]=function(a,c){return arguments.length>0?this.on(b,null,a,c):this.trigger(b)}}),eb.fn.extend({hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)},bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return 1===arguments.length?this.off(a,"**"):this.off(b,a||"**",c)}});var ec,fc,gc=eb.now(),hc=/\?/,ic=/#.*$/,jc=/([?&])_=[^&]*/,kc=/^(.*?):[ \t]*([^\r\n]*)$/gm,lc=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,mc=/^(?:GET|HEAD)$/,nc=/^\/\//,oc=/^([\w.+-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,pc=eb.fn.load,qc={},rc={},sc="*/".concat("*");try{fc=R.href}catch(tc){fc=S.createElement("a"),fc.href="",fc=fc.href}ec=oc.exec(fc.toLowerCase())||[],eb.fn.load=function(a,b,c){if("string"!=typeof a&&pc)return pc.apply(this,arguments);var d,e,f,g=this,h=a.indexOf(" ");return h>=0&&(d=a.slice(h),a=a.slice(0,h)),eb.isFunction(b)?(c=b,b=void 0):b&&"object"==typeof b&&(e="POST"),g.length>0&&eb.ajax({url:a,type:e,dataType:"html",data:b}).done(function(a){f=arguments,g.html(d?eb("<div>").append(eb.parseHTML(a)).find(d):a)}).complete(c&&function(a,b){g.each(c,f||[a.responseText,b,a])}),this},eb.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(a,b){eb.fn[b]=function(a){return this.on(b,a)}}),eb.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:fc,type:"GET",isLocal:lc.test(ec[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":sc,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":eb.parseJSON,"text xml":eb.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(a,b){return b?D(D(a,eb.ajaxSettings),b):D(eb.ajaxSettings,a)},ajaxPrefilter:B(qc),ajaxTransport:B(rc),ajax:function(a,b){function c(a,b,c,g){var i,k,r,s,u,w=b;2!==t&&(t=2,h&&clearTimeout(h),d=void 0,f=g||"",v.readyState=a>0?4:0,i=a>=200&&300>a||304===a,c&&(s=E(l,v,c)),s=F(l,s,v,i),i?(l.ifModified&&(u=v.getResponseHeader("Last-Modified"),u&&(eb.lastModified[e]=u),u=v.getResponseHeader("etag"),u&&(eb.etag[e]=u)),204===a||"HEAD"===l.type?w="nocontent":304===a?w="notmodified":(w=s.state,k=s.data,r=s.error,i=!r)):(r=w,(a||!w)&&(w="error",0>a&&(a=0))),v.status=a,v.statusText=(b||w)+"",i?o.resolveWith(m,[k,w,v]):o.rejectWith(m,[v,w,r]),v.statusCode(q),q=void 0,j&&n.trigger(i?"ajaxSuccess":"ajaxError",[v,l,i?k:r]),p.fireWith(m,[v,w]),j&&(n.trigger("ajaxComplete",[v,l]),--eb.active||eb.event.trigger("ajaxStop")))}"object"==typeof a&&(b=a,a=void 0),b=b||{};var d,e,f,g,h,i,j,k,l=eb.ajaxSetup({},b),m=l.context||l,n=l.context&&(m.nodeType||m.jquery)?eb(m):eb.event,o=eb.Deferred(),p=eb.Callbacks("once memory"),q=l.statusCode||{},r={},s={},t=0,u="canceled",v={readyState:0,getResponseHeader:function(a){var b;if(2===t){if(!g)for(g={};b=kc.exec(f);)g[b[1].toLowerCase()]=b[2];b=g[a.toLowerCase()]}return null==b?null:b},getAllResponseHeaders:function(){return 2===t?f:null},setRequestHeader:function(a,b){var c=a.toLowerCase();return t||(a=s[c]=s[c]||a,r[a]=b),this},overrideMimeType:function(a){return t||(l.mimeType=a),this},statusCode:function(a){var b;if(a)if(2>t)for(b in a)q[b]=[q[b],a[b]];else v.always(a[v.status]);return this},abort:function(a){var b=a||u;return d&&d.abort(b),c(0,b),this}};if(o.promise(v).complete=p.add,v.success=v.done,v.error=v.fail,l.url=((a||l.url||fc)+"").replace(ic,"").replace(nc,ec[1]+"//"),l.type=b.method||b.type||l.method||l.type,l.dataTypes=eb.trim(l.dataType||"*").toLowerCase().match(gb)||[""],null==l.crossDomain&&(i=oc.exec(l.url.toLowerCase()),l.crossDomain=!(!i||i[1]===ec[1]&&i[2]===ec[2]&&(i[3]||("http:"===i[1]?"80":"443"))===(ec[3]||("http:"===ec[1]?"80":"443")))),l.data&&l.processData&&"string"!=typeof l.data&&(l.data=eb.param(l.data,l.traditional)),C(qc,l,b,v),2===t)return v;j=l.global,j&&0===eb.active++&&eb.event.trigger("ajaxStart"),l.type=l.type.toUpperCase(),l.hasContent=!mc.test(l.type),e=l.url,l.hasContent||(l.data&&(e=l.url+=(hc.test(e)?"&":"?")+l.data,delete l.data),l.cache===!1&&(l.url=jc.test(e)?e.replace(jc,"$1_="+gc++):e+(hc.test(e)?"&":"?")+"_="+gc++)),l.ifModified&&(eb.lastModified[e]&&v.setRequestHeader("If-Modified-Since",eb.lastModified[e]),eb.etag[e]&&v.setRequestHeader("If-None-Match",eb.etag[e])),(l.data&&l.hasContent&&l.contentType!==!1||b.contentType)&&v.setRequestHeader("Content-Type",l.contentType),v.setRequestHeader("Accept",l.dataTypes[0]&&l.accepts[l.dataTypes[0]]?l.accepts[l.dataTypes[0]]+("*"!==l.dataTypes[0]?", "+sc+"; q=0.01":""):l.accepts["*"]);for(k in l.headers)v.setRequestHeader(k,l.headers[k]);if(l.beforeSend&&(l.beforeSend.call(m,v,l)===!1||2===t))return v.abort();u="abort";for(k in{success:1,error:1,complete:1})v[k](l[k]);if(d=C(rc,l,b,v)){v.readyState=1,j&&n.trigger("ajaxSend",[v,l]),l.async&&l.timeout>0&&(h=setTimeout(function(){v.abort("timeout")},l.timeout));try{t=1,d.send(r,c)}catch(w){if(!(2>t))throw w;c(-1,w)}}else c(-1,"No Transport");return v},getJSON:function(a,b,c){return eb.get(a,b,c,"json")},getScript:function(a,b){return eb.get(a,void 0,b,"script")}}),eb.each(["get","post"],function(a,b){eb[b]=function(a,c,d,e){return eb.isFunction(c)&&(e=e||d,d=c,c=void 0),eb.ajax({url:a,type:b,dataType:e,data:c,success:d})}}),eb.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(a){return eb.globalEval(a),a}}}),eb.ajaxPrefilter("script",function(a){void 0===a.cache&&(a.cache=!1),a.crossDomain&&(a.type="GET")}),eb.ajaxTransport("script",function(a){if(a.crossDomain){var b,c;return{send:function(d,e){b=eb("<script>").prop({async:!0,charset:a.scriptCharset,src:a.url}).on("load error",c=function(a){b.remove(),c=null,a&&e("error"===a.type?404:200,a.type)}),S.head.appendChild(b[0])},abort:function(){c&&c()}}}});var uc=[],vc=/(=)\?(?=&|$)|\?\?/;eb.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var a=uc.pop()||eb.expando+"_"+gc++;return this[a]=!0,a}}),eb.ajaxPrefilter("json jsonp",function(b,c,d){var e,f,g,h=b.jsonp!==!1&&(vc.test(b.url)?"url":"string"==typeof b.data&&!(b.contentType||"").indexOf("application/x-www-form-urlencoded")&&vc.test(b.data)&&"data");return h||"jsonp"===b.dataTypes[0]?(e=b.jsonpCallback=eb.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,h?b[h]=b[h].replace(vc,"$1"+e):b.jsonp!==!1&&(b.url+=(hc.test(b.url)?"&":"?")+b.jsonp+"="+e),b.converters["script json"]=function(){return g||eb.error(e+" was not called"),g[0]},b.dataTypes[0]="json",f=a[e],a[e]=function(){g=arguments},d.always(function(){a[e]=f,b[e]&&(b.jsonpCallback=c.jsonpCallback,uc.push(e)),g&&eb.isFunction(f)&&f(g[0]),g=f=void 0}),"script"):void 0}),eb.ajaxSettings.xhr=function(){try{return new XMLHttpRequest}catch(a){}};var wc=eb.ajaxSettings.xhr(),xc={0:200,1223:204},yc=0,zc={};a.ActiveXObject&&eb(a).on("unload",function(){for(var a in zc)zc[a]();zc=void 0}),eb.support.cors=!!wc&&"withCredentials"in wc,eb.support.ajax=wc=!!wc,eb.ajaxTransport(function(a){var b;return eb.support.cors||wc&&!a.crossDomain?{send:function(c,d){var e,f,g=a.xhr();if(g.open(a.type,a.url,a.async,a.username,a.password),a.xhrFields)for(e in a.xhrFields)g[e]=a.xhrFields[e];a.mimeType&&g.overrideMimeType&&g.overrideMimeType(a.mimeType),a.crossDomain||c["X-Requested-With"]||(c["X-Requested-With"]="XMLHttpRequest");for(e in c)g.setRequestHeader(e,c[e]);b=function(a){return function(){b&&(delete zc[f],b=g.onload=g.onerror=null,"abort"===a?g.abort():"error"===a?d(g.status||404,g.statusText):d(xc[g.status]||g.status,g.statusText,"string"==typeof g.responseText?{text:g.responseText}:void 0,g.getAllResponseHeaders()))}},g.onload=b(),g.onerror=b("error"),b=zc[f=yc++]=b("abort"),g.send(a.hasContent&&a.data||null)},abort:function(){b&&b()}}:void 0});var Ac,Bc,Cc=/^(?:toggle|show|hide)$/,Dc=new RegExp("^(?:([+-])=|)("+fb+")([a-z%]*)$","i"),Ec=/queueHooks$/,Fc=[K],Gc={"*":[function(a,b){var c=this.createTween(a,b),d=c.cur(),e=Dc.exec(b),f=e&&e[3]||(eb.cssNumber[a]?"":"px"),g=(eb.cssNumber[a]||"px"!==f&&+d)&&Dc.exec(eb.css(c.elem,a)),h=1,i=20;if(g&&g[3]!==f){f=f||g[3],e=e||[],g=+d||1;do h=h||".5",g/=h,eb.style(c.elem,a,g+f);while(h!==(h=c.cur()/d)&&1!==h&&--i)}return e&&(g=c.start=+g||+d||0,c.unit=f,c.end=e[1]?g+(e[1]+1)*e[2]:+e[2]),c}]};return eb.Animation=eb.extend(I,{tweener:function(a,b){eb.isFunction(a)?(b=a,a=["*"]):a=a.split(" ");for(var c,d=0,e=a.length;e>d;d++)c=a[d],Gc[c]=Gc[c]||[],Gc[c].unshift(b)},prefilter:function(a,b){b?Fc.unshift(a):Fc.push(a)}}),eb.Tween=L,L.prototype={constructor:L,init:function(a,b,c,d,e,f){this.elem=a,this.prop=c,this.easing=e||"swing",this.options=b,this.start=this.now=this.cur(),this.end=d,this.unit=f||(eb.cssNumber[c]?"":"px")},cur:function(){var a=L.propHooks[this.prop];return a&&a.get?a.get(this):L.propHooks._default.get(this)},run:function(a){var b,c=L.propHooks[this.prop];return this.pos=b=this.options.duration?eb.easing[this.easing](a,this.options.duration*a,0,1,this.options.duration):a,this.now=(this.end-this.start)*b+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),c&&c.set?c.set(this):L.propHooks._default.set(this),this}},L.prototype.init.prototype=L.prototype,L.propHooks={_default:{get:function(a){var b;return null==a.elem[a.prop]||a.elem.style&&null!=a.elem.style[a.prop]?(b=eb.css(a.elem,a.prop,""),b&&"auto"!==b?b:0):a.elem[a.prop]},set:function(a){eb.fx.step[a.prop]?eb.fx.step[a.prop](a):a.elem.style&&(null!=a.elem.style[eb.cssProps[a.prop]]||eb.cssHooks[a.prop])?eb.style(a.elem,a.prop,a.now+a.unit):a.elem[a.prop]=a.now}}},L.propHooks.scrollTop=L.propHooks.scrollLeft={set:function(a){a.elem.nodeType&&a.elem.parentNode&&(a.elem[a.prop]=a.now)}},eb.each(["toggle","show","hide"],function(a,b){var c=eb.fn[b];eb.fn[b]=function(a,d,e){return null==a||"boolean"==typeof a?c.apply(this,arguments):this.animate(M(b,!0),a,d,e)}}),eb.fn.extend({fadeTo:function(a,b,c,d){return this.filter(s).css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){var e=eb.isEmptyObject(a),f=eb.speed(b,c,d),g=function(){var b=I(this,eb.extend({},a),f);(e||pb.get(this,"finish"))&&b.stop(!0)};return g.finish=g,e||f.queue===!1?this.each(g):this.queue(f.queue,g)},stop:function(a,b,c){var d=function(a){var b=a.stop;delete a.stop,b(c)};return"string"!=typeof a&&(c=b,b=a,a=void 0),b&&a!==!1&&this.queue(a||"fx",[]),this.each(function(){var b=!0,e=null!=a&&a+"queueHooks",f=eb.timers,g=pb.get(this);if(e)g[e]&&g[e].stop&&d(g[e]);else for(e in g)g[e]&&g[e].stop&&Ec.test(e)&&d(g[e]);for(e=f.length;e--;)f[e].elem!==this||null!=a&&f[e].queue!==a||(f[e].anim.stop(c),b=!1,f.splice(e,1));(b||!c)&&eb.dequeue(this,a)})},finish:function(a){return a!==!1&&(a=a||"fx"),this.each(function(){var b,c=pb.get(this),d=c[a+"queue"],e=c[a+"queueHooks"],f=eb.timers,g=d?d.length:0;for(c.finish=!0,eb.queue(this,a,[]),e&&e.stop&&e.stop.call(this,!0),b=f.length;b--;)f[b].elem===this&&f[b].queue===a&&(f[b].anim.stop(!0),f.splice(b,1));for(b=0;g>b;b++)d[b]&&d[b].finish&&d[b].finish.call(this);delete c.finish})}}),eb.each({slideDown:M("show"),slideUp:M("hide"),slideToggle:M("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){eb.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),eb.speed=function(a,b,c){var d=a&&"object"==typeof a?eb.extend({},a):{complete:c||!c&&b||eb.isFunction(a)&&a,duration:a,easing:c&&b||b&&!eb.isFunction(b)&&b};return d.duration=eb.fx.off?0:"number"==typeof d.duration?d.duration:d.duration in eb.fx.speeds?eb.fx.speeds[d.duration]:eb.fx.speeds._default,(null==d.queue||d.queue===!0)&&(d.queue="fx"),d.old=d.complete,d.complete=function(){eb.isFunction(d.old)&&d.old.call(this),d.queue&&eb.dequeue(this,d.queue)},d},eb.easing={linear:function(a){return a},swing:function(a){return.5-Math.cos(a*Math.PI)/2}},eb.timers=[],eb.fx=L.prototype.init,eb.fx.tick=function(){var a,b=eb.timers,c=0;for(Ac=eb.now();c<b.length;c++)a=b[c],a()||b[c]!==a||b.splice(c--,1);b.length||eb.fx.stop(),Ac=void 0},eb.fx.timer=function(a){a()&&eb.timers.push(a)&&eb.fx.start()},eb.fx.interval=13,eb.fx.start=function(){Bc||(Bc=setInterval(eb.fx.tick,eb.fx.interval))},eb.fx.stop=function(){clearInterval(Bc),Bc=null},eb.fx.speeds={slow:600,fast:200,_default:400},eb.fx.step={},eb.expr&&eb.expr.filters&&(eb.expr.filters.animated=function(a){return eb.grep(eb.timers,function(b){return a===b.elem}).length}),eb.fn.offset=function(a){if(arguments.length)return void 0===a?this:this.each(function(b){eb.offset.setOffset(this,a,b)});var b,c,d=this[0],e={top:0,left:0},f=d&&d.ownerDocument;if(f)return b=f.documentElement,eb.contains(b,d)?(typeof d.getBoundingClientRect!==Q&&(e=d.getBoundingClientRect()),c=N(f),{top:e.top+c.pageYOffset-b.clientTop,left:e.left+c.pageXOffset-b.clientLeft}):e},eb.offset={setOffset:function(a,b,c){var d,e,f,g,h,i,j,k=eb.css(a,"position"),l=eb(a),m={};"static"===k&&(a.style.position="relative"),h=l.offset(),f=eb.css(a,"top"),i=eb.css(a,"left"),j=("absolute"===k||"fixed"===k)&&(f+i).indexOf("auto")>-1,j?(d=l.position(),g=d.top,e=d.left):(g=parseFloat(f)||0,e=parseFloat(i)||0),eb.isFunction(b)&&(b=b.call(a,c,h)),null!=b.top&&(m.top=b.top-h.top+g),null!=b.left&&(m.left=b.left-h.left+e),"using"in b?b.using.call(a,m):l.css(m)}},eb.fn.extend({position:function(){if(this[0]){var a,b,c=this[0],d={top:0,left:0};return"fixed"===eb.css(c,"position")?b=c.getBoundingClientRect():(a=this.offsetParent(),b=this.offset(),eb.nodeName(a[0],"html")||(d=a.offset()),d.top+=eb.css(a[0],"borderTopWidth",!0),d.left+=eb.css(a[0],"borderLeftWidth",!0)),{top:b.top-d.top-eb.css(c,"marginTop",!0),left:b.left-d.left-eb.css(c,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var a=this.offsetParent||T;a&&!eb.nodeName(a,"html")&&"static"===eb.css(a,"position");)a=a.offsetParent;return a||T})}}),eb.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(b,c){var d="pageYOffset"===c;eb.fn[b]=function(e){return eb.access(this,function(b,e,f){var g=N(b);return void 0===f?g?g[c]:b[e]:void(g?g.scrollTo(d?a.pageXOffset:f,d?f:a.pageYOffset):b[e]=f)},b,e,arguments.length,null)}}),eb.each({Height:"height",Width:"width"},function(a,b){eb.each({padding:"inner"+a,content:b,"":"outer"+a},function(c,d){eb.fn[d]=function(d,e){var f=arguments.length&&(c||"boolean"!=typeof d),g=c||(d===!0||e===!0?"margin":"border");return eb.access(this,function(b,c,d){var e;return eb.isWindow(b)?b.document.documentElement["client"+a]:9===b.nodeType?(e=b.documentElement,Math.max(b.body["scroll"+a],e["scroll"+a],b.body["offset"+a],e["offset"+a],e["client"+a])):void 0===d?eb.css(b,c,g):eb.style(b,c,d,g)},b,f?d:void 0,f,null)}})}),eb.fn.size=function(){return this.length},eb.fn.andSelf=eb.fn.addBack,a.jQuery=a.$=eb}),function(){function a(a,b){if(a!==b){if(a>b||"undefined"==typeof a)return 1;if(b>a||"undefined"==typeof b)return-1}return 0}function b(a,b,c){for(var d=(c||0)-1,e=a?a.length:0;++d<e;)if(a[d]===b)return d;return-1}function c(a,b){return a.has(b)?0:-1}function d(a){return a.charCodeAt(0)}function e(a,b){for(var c=-1,d=a.length;++c<d&&!(b.indexOf(a.charAt(c))<0););return c}function f(a,b){for(var c=a.length;c--&&!(b.indexOf(a.charAt(c))<0););return c}function g(b,c){return a(b.criteria,c.criteria)||b.index-c.index}function h(b,c){for(var d=b.criteria,e=c.criteria,f=-1,g=d.length;++f<g;){var h=a(d[f],e[f]);if(h)return h}return b.index-c.index}function i(a){return ob[a]}function j(a){return"\\"+rb[a]}function k(){return Y.pop()||[]}function l(){return Z.pop()||{criteria:null,index:0,value:null}}function m(a){return"function"!=typeof a.toString&&"string"==typeof(a+"")}function n(a){a.length=0,Y.length<E&&Y.push(a)}function o(a){a.criteria=a.value=null,Z.length<E&&Z.push(a)}function p(a,b){return(a=null==a?"":String(a))?null==b?a.slice(s(a),t(a)+1):(b=String(b),a.slice(e(a,b),f(a,b)+1)):a}function q(a,b){return(a=null==a?"":String(a))?null==b?a.slice(s(a)):(b=String(b),a.slice(e(a,b))):a}function r(a,b){return(a=null==a?"":String(a))?null==b?a.slice(0,t(a)+1):(b=String(b),a.slice(0,f(a,b)+1)):a}function s(a){for(var b=-1,c=a.length;++b<c;){var d=a.charCodeAt(b);if(!(160>=d&&d>=9&&13>=d||32==d||160==d||5760==d||6158==d||d>=8192&&(8202>=d||8232==d||8233==d||8239==d||8287==d||12288==d||65279==d)))break}return b}function t(a){for(var b=a.length;b--;){var c=a.charCodeAt(b);if(!(160>=c&&c>=9&&13>=c||32==c||160==c||5760==c||6158==c||c>=8192&&(8202>=c||8232==c||8233==c||8239==c||8287==c||12288==c||65279==c)))break}return b}function u(a){return pb[a]}function v(a){function e(a){return a&&"object"==typeof a&&!Ue(a)&&ke.call(a,"__wrapped__")?a:new f(a)}function f(a,b){this.__chain__=!!b,this.__wrapped__=a}function s(a){function b(){if(e){var a=Wb(e);le.apply(a,arguments)}if(this instanceof b){var f=E(c.prototype),g=c.apply(f,a||arguments);return kd(g)?g:f}return c.apply(d,a||arguments)}var c=a[0],d=a[3],e=a[4];return Le(b,a),b}function t(a,b,c,d,e){if(c){var f=c(a);if("undefined"!=typeof f)return f}var g=kd(a);if(!g)return a;var h=de.call(a);if(!lb[h]||!Ie.nodeClass&&m(a))return a;var i=Ge[h];switch(h){case db:case eb:return new i(+a);case hb:case kb:return new i(a);case jb:return f=i(a.source,R.exec(a)),f.lastIndex=a.lastIndex,f}var j=Ue(a);if(b){var l=!d;d||(d=k()),e||(e=k());for(var o=d.length;o--;)if(d[o]==a)return e[o];f=j?i(a.length):{}}else f=j?Wb(a):Rc({},a);return j&&(ke.call(a,"index")&&(f.index=a.index),ke.call(a,"input")&&(f.input=a.input)),b?(d.push(a),e.push(f),(j?pb:tb)(a,function(a,g){f[g]=t(a,b,c,d,e)}),l&&(n(d),n(e)),f):f}function E(a){return kd(a)?te(a):{}}function Y(a,b,c){if("function"!=typeof a)return Ed;if("undefined"==typeof b||!("prototype"in a))return a;var d=a[G];if("undefined"==typeof d&&(Ie.funcNames&&(d=!a.name),d=d||!Ie.funcDecomp,!d)){var e=ie.call(a);Ie.funcNames||(d=!S.test(e)),d||(d=V.test(e),Le(a,d))}if(d===!1||d!==!0&&d[1]&x)return a;switch(c){case 1:return function(c){return a.call(b,c)};case 2:return function(c,d){return a.call(b,c,d)};case 3:return function(c,d,e){return a.call(b,c,d,e)};case 4:return function(c,d,e,f){return a.call(b,c,d,e,f)}}return Dc(a,b)}function Z(a){function b(){var a=i?f:this;if(g){var n=Wb(g);le.apply(n,arguments)}if(h||k){n||(n=Wb(arguments)),h&&le.apply(n,h);var o=arguments.length;if(k&&e>o){d|=B,d&=~C,l||(d&=~(x|y));var p=ye(0,e-o);return Z([c,d,p,f,n])}}if(n||(n=arguments),j&&(c=a[m]),this instanceof b){a=E(c.prototype);var q=c.apply(a,n);return kd(q)?q:a}return c.apply(a,n)}var c=a[0],d=a[1],e=a[2],f=a[3],g=a[4],h=a[5],i=d&x,j=d&y,k=d&z,l=d&A,m=c;return Le(b,a),b}function ob(a,d){var e=-1,f=Db(),g=a?a.length:0,h=[];for(Ke&&d&&f===b&&d.length>=D&&(f=c,d=Ke(d));++e<g;){var i=a[e];f(d,i)<0&&h.push(i)}return h}function pb(a,b){var c=-1,d=a,e=a?a.length:0;if("number"==typeof e)for(Ie.unindexedChars&&pd(d)&&(d=d.split(""));++c<e&&b(d[c],c,a)!==!1;);else tb(a,b);return a}function qb(a,b){var c=a,d=a?a.length:0;if("number"==typeof d)for(Ie.unindexedChars&&pd(c)&&(c=c.split(""));d--&&b(c[d],d,a)!==!1;);else ub(a,b);return a}function rb(a,b,c,d){for(var e=(d||0)-1,f=a?a.length:0,g=[];++e<f;){var h=a[e];if(h&&"object"==typeof h&&"number"==typeof h.length&&(Ue(h)||Gb(h))){b||(h=rb(h,b,c));var i=-1,j=h.length,k=g.length;for(g.length+=j;++i<j;)g[k++]=h[i]}else c||g.push(h)}return g}function tb(a,b){for(var c=-1,d=We(a),e=d.length;++c<e;){var f=d[c];if(b(a[f],f,a)===!1)break}return a}function ub(a,b){for(var c=We(a),d=c.length;d--;){var e=c[d];if(b(a[e],e,a)===!1)break}return a}function vb(a,b,c,d,e,f){if(c){var g=c(a,b);if("undefined"!=typeof g)return!!g}if(a===b)return 0!==a||1/a==1/b;var h=typeof a,i=typeof b;if(a===a&&(!a||"function"!=h&&"object"!=h)&&(!b||"function"!=i&&"object"!=i))return!1;if(null==a||null==b)return a===b;var j=de.call(a),l=de.call(b);if(j==bb&&(j=ib),l==bb&&(l=ib),j!=l)return!1;switch(j){case db:case eb:return+a==+b;case hb:return a!=+a?b!=+b:0==a?1/a==1/b:a==+b;case jb:case kb:return a==Xd(b)}var o=j==cb;if(!o){var p=ke.call(a,"__wrapped__"),q=ke.call(b,"__wrapped__");if(p||q)return vb(p?a.__wrapped__:a,q?b.__wrapped__:b,c,d,e,f);if(j!=ib||!Ie.nodeClass&&(m(a)||m(b)))return!1;var r=!Ie.argsObject&&Gb(a)?Vd:a.constructor,s=!Ie.argsObject&&Gb(b)?Vd:b.constructor;if(!(r==s||ke.call(a,"constructor")&&ke.call(b,"constructor")||jd(r)&&r instanceof r&&jd(s)&&s instanceof s||!("constructor"in a&&"constructor"in b)))return!1}var t=!e;e||(e=k()),f||(f=k());for(var u=e.length;u--;)if(e[u]==a)return f[u]==b;var v=0;if(g=!0,e.push(a),f.push(b),o){if(u=a.length,v=b.length,g=v==u,g||d)for(;v--;){var w=u,x=b[v];if(d)for(;w--&&!(g=vb(a[w],x,c,d,e,f)););else if(!(g=vb(a[v],x,c,d,e,f)))break}}else Me(b,function(b,h,i){return ke.call(i,h)?(v++,g=ke.call(a,h)&&vb(a[h],b,c,d,e,f)):void 0}),g&&!d&&Me(a,function(a,b,c){return ke.call(c,b)?g=--v>-1:void 0});return e.pop(),f.pop(),t&&(n(e),n(f)),g}function wb(a,b,c,d,e){(Ue(b)?pb:tb)(b,function(b,f){var g,h,i=b,j=a[f];if(b&&((h=Ue(b))||Ve(b))){for(var k=d.length;k--;)if(g=d[k]==b){j=e[k];break}if(!g){var l;c&&(i=c(j,b),(l="undefined"!=typeof i)&&(j=i)),l||(j=h?Ue(j)?j:[]:Ve(j)?j:{}),d.push(b),e.push(j),l||wb(j,b,c,d,e)}}else c&&(i=c(j,b),"undefined"==typeof i&&(i=b)),"undefined"!=typeof i&&(j=i);a[f]=j})}function yb(a,b){return a+he(Ce()*(b-a+1))}function zb(a,d,e){var f=-1,g=Db(),h=a?a.length:0,i=Ke&&!d&&g===b&&h>=D,j=[];if(i){var l=Ke();g=c}else l=e?k():j;for(;++f<h;){var m=a[f],o=e?e(m,f,a):m;(d?!f||l[l.length-1]!==o:g(l,o)<0)&&((e||i)&&l.push(o),j.push(m))}return!i&&e&&n(l),j}function Ab(a,b){return function(c,d,f){var g=b?[[],[]]:{};if(d=e.createCallback(d,f,3),Ue(c))for(var h=-1,i=c.length;++h<i;){var j=c[h];a(g,j,d(j,h,c),c)}else pb(c,function(b,c,e){a(g,b,d(b,c,e),e)});return g}}function Bb(a,b,c,d,e,f){var g=b&x,h=b&y,i=b&B,j=b&C;if(!h&&!jd(a))throw new Yd;i&&!e.length&&(b&=~B,i=e=!1),j&&!f.length&&(b&=~C,j=f=!1);var k=!h&&a[G];if(k&&k!==!0){k=Wb(k),k[4]&&(k[4]=Wb(k[4])),k[5]&&(k[5]=Wb(k[5])),"number"==typeof c&&(k[2]=c);var l=k[1]&x;return g&&!l&&(k[3]=d),!g&&l&&(b|=A),i&&(k[4]?le.apply(k[4],e):k[4]=e),j&&(k[5]?qe.apply(k[5],f):k[5]=f),k[1]|=b,Bb.apply(null,k)}return null==c?c=h?0:a.length:0>c&&(c=0),k=[a,b,c,d,e,f],b==x||b==(x|B)?s(k):Z(k)}function Cb(a){a.shadowedProps=_,a.support=Ie;var b=Sd("errorClass, errorProto, hasOwnProperty, isArguments, isObject, objectProto, nonEnumProps, stringClass, stringProto, toString","return function("+a.args+") {\n"+Je(a)+"\n}");return b(fb,$d,ke,Gb,kd,_d,He,kb,ae,de)}function Db(){var a=(a=e.indexOf)===Nb?b:a;return a}function Eb(a){return"function"==typeof a&&ee.test(ie.call(a))}function Fb(a){var b,c;return!a||de.call(a)!=ib||!ke.call(a,"constructor")&&(b=a.constructor,jd(b)&&!(b instanceof b))||!Ie.argsClass&&Gb(a)||!Ie.nodeClass&&m(a)?!1:Ie.ownLast?(Me(a,function(a,b,d){return c=ke.call(d,b),!1}),c!==!1):(Me(a,function(a,b){c=b}),"undefined"==typeof c||ke.call(a,c))}function Gb(a){return a&&"object"==typeof a&&"number"==typeof a.length&&de.call(a)==bb||!1}function Hb(a){for(var b=-1,c=a?a.length:0,d=0,e=[];++b<c;){var f=a[b];f&&(e[d++]=f)}return e}function Ib(a){return ob(a,rb(arguments,!0,!0,1))}function Jb(a,b,c){var d=-1,f=a?a.length:0;for(b=e.createCallback(b,c,3);++d<f;)if(b(a[d],d,a))return d;return-1}function Kb(a,b,c){var d=a?a.length:0;for(b=e.createCallback(b,c,3);d--;)if(b(a[d],d,a))return d;return-1}function Lb(a,b,c){var d=0,f=a?a.length:0;if("number"!=typeof b&&null!=b){var g=-1;for(b=e.createCallback(b,c,3);++g<f&&b(a[g],g,a);)d++}else if(d=b,null==d||c)return a?a[0]:w;return Wb(a,0,d>0?d:0)}function Mb(a,b,c,d){var e=typeof b;return"boolean"!=e&&null!=b&&(d=c,c=b,b=!1,"number"!=e&&"string"!=e||!d||d[c]!==a||(c=null)),null!=c&&(a=qc(a,c,d)),rb(a,b)}function Nb(a,c,d){var e=a?a.length:0;if("number"==typeof d)d=0>d?ye(0,e+d):d||0;else if(d){var f=Xb(a,c);return e&&a[f]===c?f:-1}return b(a,c,d)}function Ob(a,b,c){var d=0,f=a?a.length:0;if("number"!=typeof b&&null!=b){var g=f;for(b=e.createCallback(b,c,3);g--&&b(a[g],g,a);)d++}else d=null==b||c?1:b||d;return d=f-d,Wb(a,0,d>0?d:0)}function Pb(){for(var a=[],d=-1,e=arguments.length,f=k(),g=Db(),h=Ke&&g===b,i=k();++d<e;){var j=arguments[d];(Ue(j)||Gb(j))&&(a.push(j),f.push(h&&j.length>=D&&Ke(d?a[d]:i)))}var l=a[0],m=-1,o=l?l.length:0,p=[];a:for(;++m<o;){var q=f[0];if(j=l[m],(q?c(q,j):g(i,j))<0){for(d=e,(q||i).push(j);--d;)if(q=f[d],(q?c(q,j):g(a[d],j))<0)continue a;p.push(j)}}return n(f),n(i),p}function Qb(a,b,c){var d=0,f=a?a.length:0;if("number"!=typeof b&&null!=b){var g=f;for(b=e.createCallback(b,c,3);g--&&b(a[g],g,a);)d++}else if(d=b,null==d||c)return a?a[f-1]:w;return d=f-d,Wb(a,d>0?d:0)}function Rb(a,b,c){var d=a?a.length:0;for("number"==typeof c&&(d=(0>c?ye(0,d+c):ze(c,d-1))+1);d--;)if(a[d]===b)return d;return-1}function Sb(a){for(var b=arguments,c=0,d=b.length,e=a?a.length:0;++c<d;)for(var f=-1,g=b[c];++f<e;)a[f]===g&&(pe.call(a,f--,1),e--);return a}function Tb(a,b,c){a=+a||0,c="number"==typeof c?c:+c||1,null==b&&(b=a,a=0);for(var d=-1,e=ye(0,fe((b-a)/(c||1))),f=Od(e);++d<e;)f[d]=a,a+=c;return f}function Ub(a,b,c){var d=-1,f=a?a.length:0,g=[];for(b=e.createCallback(b,c,3);++d<f;){var h=a[d];b(h,d,a)&&(g.push(h),pe.call(a,d--,1),f--)}return g}function Vb(a,b,c){if("number"!=typeof b&&null!=b){var d=0,f=-1,g=a?a.length:0;for(b=e.createCallback(b,c,3);++f<g&&b(a[f],f,a);)d++}else d=null==b||c?1:b>0?b:0;return Wb(a,d)}function Wb(a,b,c){var d=-1,e=a?a.length:0;"undefined"==typeof b?b=0:0>b?b=ye(e+b,0):b>e&&(b=e),"undefined"==typeof c?c=e:0>c?c=ye(e+c,0):c>e&&(c=e),e=c-b||0;for(var f=Od(e);++d<e;)f[d]=a[b+d];return f}function Xb(a,b,c,d){var f=0,g=a?a.length:f;for(c=c?e.createCallback(c,d,1):Ed,b=c(b);g>f;){var h=f+g>>>1;c(a[h])<b?f=h+1:g=h}return f}function Yb(){return zb(rb(arguments,!0,!0))}function Zb(a,b,c,d){var f=typeof b;return"boolean"!=f&&null!=b&&(d=c,c=b,b=!1,"number"!=f&&"string"!=f||!d||d[c]!==a||(c=null)),null!=c&&(c=e.createCallback(c,d,3)),zb(a,b,c)}function $b(a){return ob(a,Wb(arguments,1))}function _b(){for(var a=-1,b=arguments.length;++a<b;){var c=arguments[a];if(Ue(c)||Gb(c))var d=d?ob(d,c).concat(ob(c,d)):c}return d?zb(d):[]}function ac(){for(var a=arguments.length>1?arguments:arguments[0],b=-1,c=a?rc(Se(a,"length")):0,d=Od(0>c?0:c);++b<c;)d[b]=Se(a,b);return d}function bc(a,b){var c=-1,d=a?a.length:0,e={};for(b||!d||Ue(a[0])||(b=[]);++c<d;){var f=a[c];b?e[f]=b[c]:f&&(e[f[0]]=f[1])}return e}function cc(a){return a=new f(a),a.__chain__=!0,a}function dc(a,b,c){return b.call(c,a),a}function ec(){return this.__chain__=!0,this}function fc(){return Xd(this.__wrapped__)}function gc(){return this.__wrapped__}function hc(a,b){var c=arguments,d=-1,e=rb(c,!0,!1,1),f=e.length,g=typeof b;"number"!=g&&"string"!=g||!c[2]||c[2][b]!==a||(f=1),Ie.unindexedChars&&pd(a)&&(a=a.split(""));for(var h=Od(f);++d<f;)h[d]=a[e[d]];
 return h}function ic(a,b,c){var d=a?a.length:0;if(c="number"==typeof c?c:0,"number"==typeof d){if(c>=d)return!1;if("string"==typeof a||!Ue(a)&&pd(a))return se?se.call(a,b,c):a.indexOf(b,c)>-1;var e=Db();return c=(0>c?ye(0,d+c):c)||0,e(a,b,c)>-1}var f=-1,g=!1;return pb(a,function(a){return++f>=c?!(g=a===b):void 0}),g}function jc(a,b,c){var d=!0;if(b=e.createCallback(b,c,3),Ue(a)){for(var f=-1,g=a.length;++f<g;)if(!b(a[f],f,a))return!1}else pb(a,function(a,c,e){return d=!!b(a,c,e)});return d}function kc(a,b,c){var d=[];if(b=e.createCallback(b,c,3),Ue(a))for(var f=-1,g=a.length;++f<g;){var h=a[f];b(h,f,a)&&d.push(h)}else pb(a,function(a,c,e){b(a,c,e)&&d.push(a)});return d}function lc(a,b,c){if(b=e.createCallback(b,c,3),!Ue(a)){var d;return pb(a,function(a,c,e){return b(a,c,e)?(d=a,!1):void 0}),d}for(var f=-1,g=a.length;++f<g;){var h=a[f];if(b(h,f,a))return h}}function mc(a,b,c){var d;return b=e.createCallback(b,c,3),qb(a,function(a,c,e){return b(a,c,e)?(d=a,!1):void 0}),d}function nc(a,b,c){if(b&&"undefined"==typeof c&&Ue(a))for(var d=-1,e=a.length;++d<e&&b(a[d],d,a)!==!1;);else pb(a,Y(b,c,3));return a}function oc(a,b,c){if(b&&"undefined"==typeof c&&Ue(a))for(var d=a.length;d--&&b(a[d],d,a)!==!1;);else qb(a,Y(b,c,3));return a}function pc(a,b){var c=-1,d="function"==typeof b,e=a?a.length:0,f=Od("number"==typeof e?e:0);if(arguments.length<3&&Ue(a))for(;++c<e;){var g=a[c];f[c]=d?b.call(g):g[b]()}else{var h=Wb(arguments,2);pb(a,function(a){f[++c]=(d?b:a[b]).apply(a,h)})}return f}function qc(a,b,c){var d=-1,f=a?a.length:0,g=Od("number"==typeof f?f:0);if(b=e.createCallback(b,c,3),Ue(a))for(;++d<f;)g[d]=b(a[d],d,a);else pb(a,function(a,c,e){g[++d]=b(a,c,e)});return g}function rc(a,b,c){var f=-1/0,g=f,h=typeof b;if("number"!=h&&"string"!=h||!c||c[b]!==a||(b=null),null==b&&Ue(a))for(var i=-1,j=a.length;++i<j;){var k=a[i];k>g&&(g=k)}else b=null==b&&pd(a)?d:e.createCallback(b,c,3),pb(a,function(a,c,d){var e=b(a,c,d);e>f&&(f=e,g=a)});return g}function sc(a,b,c){var f=1/0,g=f,h=typeof b;if("number"!=h&&"string"!=h||!c||c[b]!==a||(b=null),null==b&&Ue(a))for(var i=-1,j=a.length;++i<j;){var k=a[i];g>k&&(g=k)}else b=null==b&&pd(a)?d:e.createCallback(b,c,3),pb(a,function(a,c,d){var e=b(a,c,d);f>e&&(f=e,g=a)});return g}function tc(a,b,c,d){var f=arguments.length<3;if(b=e.createCallback(b,d,4),Ue(a)){var g=-1,h=a.length;for(f&&h&&(c=a[++g]);++g<h;)c=b(c,a[g],g,a)}else pb(a,function(a,d,e){c=f?(f=!1,a):b(c,a,d,e)});return c}function uc(a,b,c,d){var f=arguments.length<3;return b=e.createCallback(b,d,4),qb(a,function(a,d,e){c=f?(f=!1,a):b(c,a,d,e)}),c}function vc(a,b,c){return b=e.createCallback(b,c,3),kc(a,function(a,c,d){return!b(a,c,d)})}function wc(a,b,c){if(a&&"number"!=typeof a.length?a=xd(a):Ie.unindexedChars&&pd(a)&&(a=a.split("")),null==b||c)return a?a[yb(0,a.length-1)]:w;var d=xc(a);return d.length=ze(ye(0,b),d.length),d}function xc(a){var b=-1,c=a?a.length:0,d=Od("number"==typeof c?c:0);return pb(a,function(a){var c=yb(0,++b);d[b]=d[c],d[c]=a}),d}function yc(a){var b=a?a.length:0;return"number"==typeof b?b:We(a).length}function zc(a,b,c){var d;if(b=e.createCallback(b,c,3),Ue(a)){for(var f=-1,g=a.length;++f<g;)if(b(a[f],f,a))return!0}else pb(a,function(a,c,e){return!(d=b(a,c,e))});return!!d}function Ac(a,b,c){var d=-1,f=b&&Ue(b),i=a?a.length:0,j=Od("number"==typeof i?i:0);for(f||(b=e.createCallback(b,c,3)),pb(a,function(a,c,e){if(f)for(var g=b.length,h=Od(g);g--;)h[g]=a[b[g]];else h=b(a,c,e);var i=j[++d]=l();i.criteria=h,i.index=d,i.value=a}),i=j.length,j.sort(f?h:g);i--;){var k=j[i];j[i]=k.value,o(k)}return j}function Bc(a){return a&&"number"==typeof a.length?Ie.unindexedChars&&pd(a)?a.split(""):Wb(a):xd(a)}function Cc(a,b){if(!jd(b))throw new Yd;return function(){return--a<1?b.apply(this,arguments):void 0}}function Dc(a,b){if(arguments.length<3)return Bb(a,x,null,b);if(a){var c=a[G]?a[G][2]:a.length,d=Wb(arguments,2);c-=d.length}return Bb(a,x|B,c,b,d)}function Ec(a){for(var b=arguments.length>1?rb(arguments,!0,!1,1):ad(a),c=-1,d=b.length;++c<d;){var e=b[c];a[e]=Bb(a[e],x,null,a)}return a}function Fc(a,b){return arguments.length<3?Bb(b,x|y,null,a):Bb(b,x|y|B,null,a,Wb(arguments,2))}function Gc(){for(var a=arguments,b=a.length,c=b;c--;)if(!jd(a[c]))throw new Yd;return function(){for(var c=b-1,d=a[c].apply(this,arguments);c--;)d=a[c].call(this,d);return d}}function Hc(a,b){return"number"!=typeof b&&(b=+b||(a?a.length:0)),Bb(a,z,b)}function Ic(a,b,c){var d,e,f,g,h,i,j,k=0,l=!1,m=!0;if(!jd(a))throw new Yd;if(b=ye(0,b)||0,c===!0){var n=!0;m=!1}else kd(c)&&(n=c.leading,l="maxWait"in c&&(ye(b,c.maxWait)||0),m="trailing"in c?c.trailing:m);var o=function(){var c=b-($e()-g);if(0>=c||c>b){e&&ge(e);var l=j;e=i=j=w,l&&(k=$e(),f=a.apply(h,d),i||e||(d=h=null))}else i=oe(o,c)},p=function(){i&&ge(i),e=i=j=w,(m||l!==b)&&(k=$e(),f=a.apply(h,d),i||e||(d=h=null))};return function(){if(d=arguments,g=$e(),h=this,j=m&&(i||!n),l===!1)var c=n&&!i;else{e||n||(k=g);var q=l-(g-k),r=0>=q||q>l;r?(e&&(e=ge(e)),k=g,f=a.apply(h,d)):e||(e=oe(p,q))}return r&&i?i=ge(i):i||b===l||(i=oe(o,b)),c&&(r=!0,f=a.apply(h,d)),!r||i||e||(d=h=null),f}}function Jc(a){if(!jd(a))throw new Yd;var b=Wb(arguments,1);return oe(function(){a.apply(w,b)},1)}function Kc(a,b){if(!jd(a))throw new Yd;var c=Wb(arguments,2);return oe(function(){a.apply(w,c)},b)}function Lc(a,b){if(!jd(a))throw new Yd;var c=function(){var d=c.cache,e=b?b.apply(this,arguments):"_"+arguments[0];return ke.call(d,e)?d[e]:d[e]=a.apply(this,arguments)};return c.cache={},c}function Mc(a){var b,c;if(!jd(a))throw new Yd;return function(){return b?c:(b=!0,c=a.apply(this,arguments),a=null,c)}}function Nc(a){if(a){var b=a[G]?a[G][2]:a.length,c=Wb(arguments,1);b-=c.length}return Bb(a,B,b,null,c)}function Oc(a){if(a){var b=a[G]?a[G][2]:a.length,c=Wb(arguments,1);b-=c.length}return Bb(a,C,b,null,null,c)}function Pc(a,b,c){var d=!0,e=!0;if(!jd(a))throw new Yd;return c===!1?d=!1:kd(c)&&(d="leading"in c?c.leading:d,e="trailing"in c?c.trailing:e),mb.leading=d,mb.maxWait=b,mb.trailing=e,Ic(a,b,mb)}function Qc(a,b){return Bb(b,B,null,null,[a])}function Rc(a,b,c){var d=arguments,e=0,f=d.length,g=typeof c;if("number"!=g&&"string"!=g||!d[3]||d[3][c]!==b||(f=2),f>3&&"function"==typeof d[f-2])var h=Y(d[--f-1],d[f--],2);else f>2&&"function"==typeof d[f-1]&&(h=d[--f]);for(;++e<f;)if(b=d[e],kd(b))for(var i=-1,j=We(b),k=j.length;++i<k;){var l=j[i];a[l]=h?h(a[l],b[l]):b[l]}return a}function Sc(a,b,c,d){var e=typeof b;return"boolean"!=e&&null!=b&&(d=c,c=b,b=!1,"number"!=e&&"string"!=e||!d||d[c]!==a||(c=null)),t(a,b,"function"==typeof c&&Y(c,d,1))}function Tc(a,b,c){return t(a,!0,"function"==typeof b&&Y(b,c,1))}function Uc(a,b){var c=E(a);return b?Rc(c,b):c}function Vc(a,b,c){var d=arguments,e=0,f=d.length,g=typeof c;for("number"!=g&&"string"!=g||!d[3]||d[3][c]!==b||(f=2);++e<f;)if(b=d[e],kd(b))for(var h=-1,i=We(b),j=i.length;++h<j;){var k=i[h];"undefined"==typeof a[k]&&(a[k]=b[k])}return a}function Wc(a,b,c){var d;return b=e.createCallback(b,c,3),tb(a,function(a,c,e){return b(a,c,e)?(d=c,!1):void 0}),d}function Xc(a,b,c){var d;return b=e.createCallback(b,c,3),ub(a,function(a,c,e){return b(a,c,e)?(d=c,!1):void 0}),d}function Yc(a,b,c){return b=b&&"undefined"==typeof c?b:Y(b,c,3),Me(a,b)}function Zc(a,b,c){var d=[];Me(a,function(a,b){d.push(b,a)});var e=d.length;for(b=Y(b,c,3);e--&&b(d[e--],d[e],a)!==!1;);return a}function $c(a,b,c){return b=b&&"undefined"==typeof c?b:Y(b,c,3),tb(a,b)}function _c(a,b,c){var d=We(a),e=d.length;for(b=Y(b,c,3);e--;){var f=d[e];if(b(a[f],f,a)===!1)break}return a}function ad(a){var b=[];return Me(a,function(a,c){jd(a)&&b.push(c)}),b.sort()}function bd(a,b){return a?ke.call(a,b):!1}function cd(a,b){for(var c=-1,d=We(a),e=d.length,f={};++c<e;){var g=d[c],h=a[g];b?ke.call(f,h)?f[h].push(g):f[h]=[g]:f[h]=g}return f}function dd(a){return a===!0||a===!1||a&&"object"==typeof a&&de.call(a)==db||!1}function ed(a){return a&&"object"==typeof a&&de.call(a)==eb||!1}function fd(a){return a&&"object"==typeof a&&1===a.nodeType&&(Ie.nodeClass?de.call(a).indexOf("Element")>-1:m(a))||!1}function gd(a){var b=!0;if(!a)return b;var c=de.call(a),d=a.length;return c==cb||c==kb||(Ie.argsClass?c==bb:Gb(a))||c==ib&&"number"==typeof d&&jd(a.splice)?!d:(tb(a,function(){return b=!1}),b)}function hd(a,b,c,d){return vb(a,b,"function"==typeof c&&Y(c,d,2))}function id(a){return ve(a)&&!we(parseFloat(a))}function jd(a){return"function"==typeof a}function kd(a){var b=typeof a;return a&&("function"==b||"object"==b)||!1}function ld(a){return nd(a)&&a!=+a}function md(a){return null===a}function nd(a){var b=typeof a;return"number"==b||a&&"object"==b&&de.call(a)==hb||!1}function od(a){var b=typeof a;return a&&("function"==b||"object"==b)&&de.call(a)==jb||!1}function pd(a){return"string"==typeof a||a&&"object"==typeof a&&de.call(a)==kb||!1}function qd(a){return"undefined"==typeof a}function rd(a,b,c){var d={};return b=e.createCallback(b,c,3),tb(a,function(a,c,e){d[c]=b(a,c,e)}),d}function sd(a,b,c){if(!kd(a))return a;var d=arguments,e=d.length,f=typeof c;if("number"!=f&&"string"!=f||!d[3]||d[3][c]!==b||(e=2),e>3&&"function"==typeof d[e-2])var g=Y(d[--e-1],d[e--],2);else e>2&&"function"==typeof d[e-1]&&(g=d[--e]);for(var h=Wb(arguments,1,e),i=-1,j=k(),l=k();++i<e;)wb(a,h[i],g,j,l);return n(j),n(l),a}function td(a,b,c){var d={};if("function"!=typeof b){for(var f=rb(arguments,!0,!1,1),g=f.length;g--;)f[g]=Xd(f[g]);var h=[];Me(a,function(a,b){h.push(b)});var i=-1;for(h=ob(h,f),g=h.length;++i<g;){var j=h[i];d[j]=a[j]}}else b=e.createCallback(b,c,3),Me(a,function(a,c,e){b(a,c,e)||(d[c]=a)});return d}function ud(a){for(var b=-1,c=We(a),d=c.length,e=Od(d);++b<d;){var f=c[b];e[b]=[f,a[f]]}return e}function vd(a,b,c){var d={};if("function"!=typeof b)for(var f=-1,g=rb(arguments,!0,!1,1),h=kd(a)?g.length:0;++f<h;){var i=g[f];i in a&&(d[i]=a[i])}else b=e.createCallback(b,c,3),Me(a,function(a,c,e){b(a,c,e)&&(d[c]=a)});return d}function wd(a,b,c,d){var f=Ue(a);if(null==c)if(f)c=[];else{var g=a&&a.constructor,h=g&&g.prototype;c=E(h)}return b&&(b=e.createCallback(b,d,4),(f?pb:tb)(a,function(a,d,e){return b(c,a,d,e)})),c}function xd(a){for(var b=-1,c=We(a),d=c.length,e=Od(d);++b<d;)e[b]=a[c[b]];return e}function yd(a){return null==a?"":(a=Xd(a),a.charAt(0).toUpperCase()+a.slice(1))}function zd(a){return null==a?"":Xd(a).replace(M,i)}function Ad(a,b,c){var d=e.templateSettings;a=Xd(a||""),c=Je?Vc({},c,d):d;var f,g=Je&&Vc({},c.imports,d.imports),h=Je?We(g):["_"],i=Je?xd(g):[e],k=0,l=c.interpolate||U,m="__p += '",n=Wd((c.escape||U).source+"|"+l.source+"|"+(l===P?Q:U).source+"|"+(c.evaluate||U).source+"|$","g");a.replace(n,function(b,c,d,e,g,h){return d||(d=e),m+=a.slice(k,h).replace(W,j),c&&(m+="' +\n__e("+c+") +\n'"),g&&(f=!0,m+="';\n"+g+";\n__p += '"),d&&(m+="' +\n((__t = ("+d+")) == null ? '' : __t) +\n'"),k=h+b.length,b}),m+="';\n";var o=c.variable,p=o;p||(o="obj",m="with ("+o+") {\n"+m+"\n}\n"),m=(f?m.replace(I,""):m).replace(J,"$1").replace(K,"$1;"),m="function("+o+") {\n"+(p?"":o+" || ("+o+" = {});\n")+"var __t, __p = '', __e = _.escape"+(f?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+m+"return __p\n}";var q="\n/*\n//# sourceURL="+(c.sourceURL||"/lodash/template/source["+ab++ +"]")+"\n*/";try{var r=Sd(h,"return "+m+q).apply(w,i)}catch(s){throw s.source=m,s}return b?r(b):(r.source=m,r)}function Bd(a){return null==a?"":(a=Xd(a),a.indexOf(";")<0?a:a.replace(L,u))}function Cd(a){return function(){return a}}function Dd(a,b,c){var d=typeof a;return"function"==d||null==a?("undefined"==typeof b||!("prototype"in a))&&a||Y(a,b,c):"object"!=d?Jd(a):Fd(a)}function Ed(a){return a}function Fd(a){a||(a={});var b=We(a),c=b[0],d=a[c];return 1!=b.length||d!==d||kd(d)?function(c){for(var d=b.length,e=!1;d--;){var f=b[d];if(!(e=ke.call(c,f)&&vb(c[f],a[f],null,!0)))break}return e}:function(a){if(!ke.call(a,c))return!1;var b=a[c];return d===b&&(0!==d||1/d==1/b)}}function Gd(a,b,c){var d=!0,f=b&&ad(b);b&&(c||f.length)||(null==c&&(c=b),b=a,a=e,f=ad(b)),c===!1?d=!1:kd(c)&&"chain"in c&&(d=c.chain);for(var g=-1,h=jd(a),i=f?f.length:0;++g<i;){var j=f[g],k=a[j]=b[j];h&&(a.prototype[j]=function(b){return function(){var c=this.__chain__,e=this.__wrapped__,f=[e];le.apply(f,arguments);var g=b.apply(a,f);if(d||c){if(e===g&&kd(g))return this;g=new a(g),g.__chain__=c}return g}}(k))}}function Hd(){return a._=ce,this}function Id(){}function Jd(a){return function(b){return b[a]}}function Kd(a,b,c){var d=null==a,e=null==b;if(null==c&&(e&&"boolean"==typeof a?(c=a,a=1):"boolean"==typeof b&&(c=b,e=!0)),d&&e&&(b=1,e=!1),a=+a||0,e?(b=a,a=0):b=+b||0,c||a%1||b%1){var f=Ce();return ze(a+f*(b-a+parseFloat("1e-"+((f+"").length-1))),b)}return yb(a,b)}function Ld(a,b,c){var d=null==a?w:a[b];return"undefined"==typeof d?c:jd(d)?a[b]():d}function Md(a,b,c){a=(a=+a)>-1?a:0;var d=-1,e=Od(a);for(b=Y(b,c,1);++d<a;)e[d]=b(d);return e}function Nd(a){var b=++H;return Xd(null==a?"":a)+b}a=a?xb.defaults(sb.Object(),a,xb.pick(sb,$)):sb;var Od=a.Array,Pd=a.Boolean,Qd=a.Date,Rd=a.Error,Sd=a.Function,Td=a.Math,Ud=a.Number,Vd=a.Object,Wd=a.RegExp,Xd=a.String,Yd=a.TypeError,Zd=Od.prototype,$d=Rd.prototype,_d=Vd.prototype,ae=Xd.prototype,be=(be=a.window)&&be.document,ce=a._,de=_d.toString,ee=Wd("^"+Xd(de).replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/toString|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),fe=Td.ceil,ge=a.clearTimeout,he=Td.floor,ie=Sd.prototype.toString,je=Eb(je=Vd.getPrototypeOf)&&je,ke=_d.hasOwnProperty,le=Zd.push,me=_d.propertyIsEnumerable,ne=Eb(ne=a.Set)&&ne,oe=a.setTimeout,pe=Zd.splice,qe=Zd.unshift,re=function(){try{var a={},b=Eb(b=Vd.defineProperty)&&b,c=b(a,a,a)&&b}catch(d){}return c}(),se=Eb(se=ae.contains)&&se,te=Eb(te=Vd.create)&&te,ue=Eb(ue=Od.isArray)&&ue,ve=a.isFinite,we=a.isNaN,xe=Eb(xe=Vd.keys)&&xe,ye=Td.max,ze=Td.min,Ae=Eb(Ae=Qd.now)&&Ae,Be=a.parseInt,Ce=Td.random,De=Eb(De=ae.trim)&&!De.call(X)&&De,Ee=Eb(Ee=ae.trimLeft)&&!Ee.call(X)&&Ee,Fe=Eb(Fe=ae.trimRight)&&!Fe.call(X)&&Fe,Ge={};Ge[cb]=Od,Ge[db]=Pd,Ge[eb]=Qd,Ge[gb]=Sd,Ge[ib]=Vd,Ge[hb]=Ud,Ge[jb]=Wd,Ge[kb]=Xd;var He={};He[cb]=He[eb]=He[hb]={constructor:!0,toLocaleString:!0,toString:!0,valueOf:!0},He[db]=He[kb]={constructor:!0,toString:!0,valueOf:!0},He[fb]=He[gb]=He[jb]={constructor:!0,toString:!0},He[ib]={constructor:!0},function(){for(var a=_.length;a--;){var b=_[a];for(var c in He)ke.call(He,c)&&!ke.call(He[c],b)&&(He[c][b]=!1)}}(),f.prototype=e.prototype;var Ie=e.support={};!function(){var b=function(){this.x=1},c={0:1,length:1},d=[];b.prototype={valueOf:1,y:1};for(var e in new b)d.push(e);for(e in arguments);Ie.argsClass=de.call(arguments)==bb,Ie.argsObject=arguments.constructor==Vd&&!(arguments instanceof Od),Ie.enumErrorProps=me.call($d,"message")||me.call($d,"name"),Ie.enumPrototypes=me.call(b,"prototype"),Ie.funcDecomp=!Eb(a.WinRTError)&&V.test(v),Ie.funcNames="string"==typeof Sd.name,Ie.nonEnumArgs=0!=e,Ie.nonEnumShadows=!/valueOf/.test(d),Ie.ownLast="x"!=d[0],Ie.spliceObjects=(pe.call(c,0,1),!c[0]),Ie.unindexedChars="x"[0]+Vd("x")[0]!="xx";try{Ie.dom=11===be.createDocumentFragment().nodeType}catch(f){Ie.dom=!1}try{Ie.nodeClass=!(de.call(be)==ib&&!({toString:0}+""))}catch(f){Ie.nodeClass=!0}}(1),e.templateSettings={escape:N,evaluate:O,interpolate:P,variable:"",imports:{_:e}};var Je=Ad("var result = <%= init %>;\nif (!isObject(object)) {\n  return result;\n}<% if (support.nonEnumArgs) { %>\nvar length = object.length;\nif (length && isArguments(object)) {\n  key = -1;\n  while (++key < length) {\n    key += '';\n    <%= loop %>;\n  }\n  return result;\n}<% } %><% if (support.enumPrototypes) { %>\nvar skipProto = typeof object == 'function';\n<% } %><% if (support.enumErrorProps) { %>\nvar skipErrorProps = object === errorProto || object instanceof Error;\n<% } %><%var conditions = [];\nif (support.enumPrototypes) { conditions.push('!(skipProto && key == \\'prototype\\')'); }\nif (support.enumErrorProps) { conditions.push('!(skipErrorProps && (key == \\'message\\' || key == \\'name\\'))'); }%>\nfor (var key in object) {\n<%  if (useHas) { conditions.push('hasOwnProperty.call(object, key)'); }\n  if (conditions.length) { %>  if (<%= conditions.join(' && ') %>) {\n  <% } %>  <%= loop %>;  <% if (conditions.length) { %>\n  }<% } %>\n}\n<% if (support.nonEnumShadows) { %>\nif (object !== objectProto) {\n  var ctor = object.constructor,\n      isProto = object === (ctor && ctor.prototype),\n      className = object === stringProto ? stringClass : object === errorProto ? errorClass : toString.call(object),\n      nonEnum = nonEnumProps[className];\n  <% for (var index = 0; index < 7; index++) { %>\n  key = '<%= shadowedProps[index] %>';\n  if ((!(isProto && nonEnum[key]) && hasOwnProperty.call(object, key))<%      if (!useHas) { %> || (!nonEnum[key] && object[key] !== objectProto[key])<% }    %>) {\n    <%= loop %>;\n  }  <% } %>\n}<% } %>\nreturn result;");te||(E=function(){function b(){}return function(c){if(kd(c)){b.prototype=c;var d=new b;b.prototype=null}return d||a.Object()}}());var Ke=ne&&function(a){var b=new ne,c=a?a.length:0;for(b.push=b.add;c--;)b.push(a[c]);return b},Le=re?function(a,b){nb.value=b,re(a,G,nb)}:Id;Ie.argsClass||(Gb=function(a){return a&&"object"==typeof a&&"number"==typeof a.length&&ke.call(a,"callee")&&!me.call(a,"callee")||!1});var Me=Cb({args:"object, callback",init:"object",loop:"if (callback(object[key], key, object) === false) {\n    return result;\n  }",useHas:!1}),Ne=Cb({args:"object",init:"[]",loop:"result.push(key)",useHas:!0}),Oe=Ab(function(a,b,c){ke.call(a,c)?a[c]++:a[c]=1}),Pe=Ab(function(a,b,c){ke.call(a,c)?a[c].push(b):a[c]=[b]}),Qe=Ab(function(a,b,c){a[c]=b}),Re=Ab(function(a,b,c){a[c?0:1].push(b)},!0),Se=qc,Te=kc,Ue=ue||function(a){return a&&"object"==typeof a&&"number"==typeof a.length&&de.call(a)==cb||!1};Ie.dom||(fd=function(a){return a&&"object"==typeof a&&1===a.nodeType&&!Ve(a)||!1}),jd(/x/)&&(jd=function(a){return"function"==typeof a&&de.call(a)==gb});var Ve=je?function(a){if(!a||de.call(a)!=ib||!Ie.argsClass&&Gb(a))return!1;var b=a.valueOf,c=Eb(b)&&(c=je(b))&&je(c);return c?a==c||je(a)==c:Fb(a)}:Fb,We=xe?function(a){return kd(a)?Ie.enumPrototypes&&"function"==typeof a||Ie.nonEnumArgs&&a.length&&Gb(a)?Ne(a):xe(a):[]}:Ne,Xe=De?function(a,b){return null==a?"":null==b?De.call(a):p(a,b)}:p,Ye=Ee?function(a,b){return null==a?"":null==b?Ee.call(a):q(a,b)}:q,Ze=Fe?function(a,b){return null==a?"":null==b?Fe.call(a):r(a,b)}:r,$e=Ae||function(){return(new Qd).getTime()},_e=8==Be(X+"08")?Be:function(a,b){return a=Xe(a),Be(a,+b||(T.test(a)?16:10))};return e.after=Cc,e.assign=Rc,e.at=hc,e.bind=Dc,e.bindAll=Ec,e.bindKey=Fc,e.chain=cc,e.compact=Hb,e.compose=Gc,e.constant=Cd,e.countBy=Oe,e.create=Uc,e.createCallback=Dd,e.curry=Hc,e.debounce=Ic,e.defaults=Vc,e.defer=Jc,e.delay=Kc,e.difference=Ib,e.filter=kc,e.flatten=Mb,e.forEach=nc,e.forEachRight=oc,e.forIn=Yc,e.forInRight=Zc,e.forOwn=$c,e.forOwnRight=_c,e.functions=ad,e.groupBy=Pe,e.indexBy=Qe,e.initial=Ob,e.intersection=Pb,e.invert=cd,e.invoke=pc,e.keys=We,e.map=qc,e.mapValues=rd,e.matches=Fd,e.max=rc,e.memoize=Lc,e.merge=sd,e.min=sc,e.omit=td,e.once=Mc,e.pairs=ud,e.partial=Nc,e.partialRight=Oc,e.partition=Re,e.pick=vd,e.pluck=Se,e.property=Jd,e.pull=Sb,e.range=Tb,e.reject=vc,e.remove=Ub,e.rest=Vb,e.shuffle=xc,e.slice=Wb,e.sortBy=Ac,e.tap=dc,e.throttle=Pc,e.times=Md,e.toArray=Bc,e.transform=wd,e.union=Yb,e.uniq=Zb,e.values=xd,e.where=Te,e.without=$b,e.wrap=Qc,e.xor=_b,e.zip=ac,e.zipObject=bc,e.callback=Dd,e.collect=qc,e.drop=Vb,e.each=nc,e.eachRight=oc,e.extend=Rc,e.methods=ad,e.object=bc,e.select=kc,e.tail=Vb,e.unique=Zb,e.unzip=ac,Gd(Rc({},e)),e.capitalize=yd,e.clone=Sc,e.cloneDeep=Tc,e.contains=ic,e.escape=zd,e.every=jc,e.find=lc,e.findIndex=Jb,e.findKey=Wc,e.findLast=mc,e.findLastIndex=Kb,e.findLastKey=Xc,e.has=bd,e.identity=Ed,e.indexOf=Nb,e.isArguments=Gb,e.isArray=Ue,e.isBoolean=dd,e.isDate=ed,e.isElement=fd,e.isEmpty=gd,e.isEqual=hd,e.isFinite=id,e.isFunction=jd,e.isNaN=ld,e.isNull=md,e.isNumber=nd,e.isObject=kd,e.isPlainObject=Ve,e.isRegExp=od,e.isString=pd,e.isUndefined=qd,e.lastIndexOf=Rb,e.mixin=Gd,e.noConflict=Hd,e.noop=Id,e.now=$e,e.parseInt=_e,e.random=Kd,e.reduce=tc,e.reduceRight=uc,e.result=Ld,e.runInContext=v,e.size=yc,e.some=zc,e.sortedIndex=Xb,e.template=Ad,e.trim=Xe,e.trimLeft=Ye,e.trimRight=Ze,e.unescape=Bd,e.uniqueId=Nd,e.all=jc,e.any=zc,e.detect=lc,e.findWhere=lc,e.foldl=tc,e.foldr=uc,e.include=ic,e.inject=tc,Gd(function(){var a={};return tb(e,function(b,c){e.prototype[c]||(a[c]=b)}),a}(),!1),e.first=Lb,e.last=Qb,e.sample=wc,e.take=Lb,e.head=Lb,tb(e,function(a,b){var c="sample"!==b;e.prototype[b]||(e.prototype[b]=function(b,d){var e=this.__chain__,g=a(this.__wrapped__,b,d);return e||null!=b&&(!d||c&&"function"==typeof b)?new f(g,e):g})}),e.VERSION=F,e.prototype.chain=ec,e.prototype.toString=fc,e.prototype.value=gc,e.prototype.valueOf=gc,pb(["join","pop","shift"],function(a){var b=Zd[a];e.prototype[a]=function(){var a=this.__chain__,c=b.apply(this.__wrapped__,arguments);return a?new f(c,a):c}}),pb(["push","reverse","sort","unshift"],function(a){var b=Zd[a];e.prototype[a]=function(){return b.apply(this.__wrapped__,arguments),this}}),pb(["concat","splice"],function(a){var b=Zd[a];e.prototype[a]=function(){return new f(b.apply(this.__wrapped__,arguments),this.__chain__)}}),Ie.spliceObjects||pb(["pop","shift","splice"],function(a){var b=Zd[a],c="splice"==a;e.prototype[a]=function(){var a=this.__chain__,d=this.__wrapped__,e=b.apply(d,arguments);return 0===d.length&&delete d[0],a||c?new f(e,a):e}}),e._baseForIn=Me,e._iteratorTemplate=Je,e._shimKeys=Ne,e}var w,x=1,y=2,z=4,A=8,B=16,C=32,D=40,E=40,F="2.4.1",G="__lodash@"+F+"__",H=0,I=/\b__p \+= '';/g,J=/\b(__p \+=) '' \+/g,K=/(__e\(.*?\)|\b__t\)) \+\n'';/g,L=/&(?:amp|lt|gt|quot|#39);/g,M=/[&<>"']/g,N=/<%-([\s\S]+?)%>/g,O=/<%([\s\S]+?)%>/g,P=/<%=([\s\S]+?)%>/g,Q=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,R=/\w*$/,S=/^\s*function[ \n\r\t]+\w/,T=/^0[xX]/,U=/($^)/,V=/\bthis\b/,W=/['\n\r\t\u2028\u2029\\]/g,X="        \v\f \n\r\u2028\u2029 ᠎              ",Y=[],Z=[],$=["Array","Boolean","Date","Error","Function","Math","Number","Object","RegExp","Set","String","_","clearTimeout","document","isFinite","isNaN","parseInt","setTimeout","TypeError","window","WinRTError"],_=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],ab=0,bb="[object Arguments]",cb="[object Array]",db="[object Boolean]",eb="[object Date]",fb="[object Error]",gb="[object Function]",hb="[object Number]",ib="[object Object]",jb="[object RegExp]",kb="[object String]",lb={};lb[gb]=!1,lb[bb]=lb[cb]=lb[db]=lb[eb]=lb[hb]=lb[ib]=lb[jb]=lb[kb]=!0;var mb={leading:!1,maxWait:0,trailing:!1},nb={configurable:!1,enumerable:!1,value:null,writable:!1},ob={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},pb={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},qb={"function":!0,object:!0},rb={"\\":"\\","'":"'","\n":"n","\r":"r","  ":"t","\u2028":"u2028","\u2029":"u2029"},sb=qb[typeof window]&&window||this,tb=qb[typeof exports]&&exports&&!exports.nodeType&&exports,ub=qb[typeof module]&&module&&!module.nodeType&&module,vb=tb&&ub&&"object"==typeof global&&global;!vb||vb.global!==vb&&vb.window!==vb&&vb.self!==vb||(sb=vb);var wb=ub&&ub.exports===tb&&tb,xb=v();"function"==typeof define&&"object"==typeof define.amd&&define.amd?(sb._=xb,define(function(){return xb})):tb&&ub?wb?(ub.exports=xb)._=xb:tb._=xb:sb._=xb}.call(this),!function(a){"use strict";a(function(){a.support.transition=function(){var a=function(){var a,b=document.createElement("bootstrap"),c={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(a in c)if(void 0!==b.style[a])return c[a]}();return a&&{end:a}}()})}(window.jQuery),!function(a){"use strict";var b='[data-dismiss="alert"]',c=function(c){a(c).on("click",b,this.close)};c.prototype.close=function(b){function c(){d.trigger("closed").remove()}var d,e=a(this),f=e.attr("data-target");f||(f=e.attr("href"),f=f&&f.replace(/.*(?=#[^\s]*$)/,"")),d=a(f),b&&b.preventDefault(),d.length||(d=e.hasClass("alert")?e:e.parent()),d.trigger(b=a.Event("close")),b.isDefaultPrevented()||(d.removeClass("in"),a.support.transition&&d.hasClass("fade")?d.on(a.support.transition.end,c):c())};var d=a.fn.alert;a.fn.alert=function(b){return this.each(function(){var d=a(this),e=d.data("alert");e||d.data("alert",e=new c(this)),"string"==typeof b&&e[b].call(d)})},a.fn.alert.Constructor=c,a.fn.alert.noConflict=function(){return a.fn.alert=d,this},a(document).on("click.alert.data-api",b,c.prototype.close)}(window.jQuery),!function(a){"use strict";var b=function(b,c){this.$element=a(b),this.options=a.extend({},a.fn.button.defaults,c)};b.prototype.setState=function(a){var b="disabled",c=this.$element,d=c.data(),e=c.is("input")?"val":"html";a+="Text",d.resetText||c.data("resetText",c[e]()),c[e](d[a]||this.options[a]),setTimeout(function(){"loadingText"==a?c.addClass(b).attr(b,b):c.removeClass(b).removeAttr(b)},0)},b.prototype.toggle=function(){var a=this.$element.closest('[data-toggle="buttons-radio"]');a&&a.find(".active").removeClass("active"),this.$element.toggleClass("active")};var c=a.fn.button;a.fn.button=function(c){return this.each(function(){var d=a(this),e=d.data("button"),f="object"==typeof c&&c;e||d.data("button",e=new b(this,f)),"toggle"==c?e.toggle():c&&e.setState(c)})},a.fn.button.defaults={loadingText:"loading..."},a.fn.button.Constructor=b,a.fn.button.noConflict=function(){return a.fn.button=c,this},a(document).on("click.button.data-api","[data-toggle^=button]",function(b){var c=a(b.target);c.hasClass("btn")||(c=c.closest(".btn")),c.button("toggle")})}(window.jQuery),!function(a){"use strict";var b=function(b,c){this.$element=a(b),this.$indicators=this.$element.find(".carousel-indicators"),this.options=c,"hover"==this.options.pause&&this.$element.on("mouseenter",a.proxy(this.pause,this)).on("mouseleave",a.proxy(this.cycle,this))};b.prototype={cycle:function(b){return b||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(a.proxy(this.next,this),this.options.interval)),this},getActiveIndex:function(){return this.$active=this.$element.find(".item.active"),this.$items=this.$active.parent().children(),this.$items.index(this.$active)},to:function(b){var c=this.getActiveIndex(),d=this;if(!(b>this.$items.length-1||0>b))return this.sliding?this.$element.one("slid",function(){d.to(b)}):c==b?this.pause().cycle():this.slide(b>c?"next":"prev",a(this.$items[b]))},pause:function(b){return b||(this.paused=!0),this.$element.find(".next, .prev").length&&a.support.transition.end&&(this.$element.trigger(a.support.transition.end),this.cycle(!0)),clearInterval(this.interval),this.interval=null,this},next:function(){return this.sliding?void 0:this.slide("next")},prev:function(){return this.sliding?void 0:this.slide("prev")},slide:function(b,c){var d,e=this.$element.find(".item.active"),f=c||e[b](),g=this.interval,h="next"==b?"left":"right",i="next"==b?"first":"last",j=this;if(this.sliding=!0,g&&this.pause(),f=f.length?f:this.$element.find(".item")[i](),d=a.Event("slide",{relatedTarget:f[0],direction:h}),!f.hasClass("active")){if(this.$indicators.length&&(this.$indicators.find(".active").removeClass("active"),this.$element.one("slid",function(){var b=a(j.$indicators.children()[j.getActiveIndex()]);b&&b.addClass("active")})),a.support.transition&&this.$element.hasClass("slide")){if(this.$element.trigger(d),d.isDefaultPrevented())return;f.addClass(b),f[0].offsetWidth,e.addClass(h),f.addClass(h),this.$element.one(a.support.transition.end,function(){f.removeClass([b,h].join(" ")).addClass("active"),e.removeClass(["active",h].join(" ")),j.sliding=!1,setTimeout(function(){j.$element.trigger("slid")},0)})}else{if(this.$element.trigger(d),d.isDefaultPrevented())return;e.removeClass("active"),f.addClass("active"),this.sliding=!1,this.$element.trigger("slid")}return g&&this.cycle(),this}}};var c=a.fn.carousel;a.fn.carousel=function(c){return this.each(function(){var d=a(this),e=d.data("carousel"),f=a.extend({},a.fn.carousel.defaults,"object"==typeof c&&c),g="string"==typeof c?c:f.slide;e||d.data("carousel",e=new b(this,f)),"number"==typeof c?e.to(c):g?e[g]():f.interval&&e.pause().cycle()})},a.fn.carousel.defaults={interval:5e3,pause:"hover"},a.fn.carousel.Constructor=b,a.fn.carousel.noConflict=function(){return a.fn.carousel=c,this},a(document).on("click.carousel.data-api","[data-slide], [data-slide-to]",function(b){var c,d,e=a(this),f=a(e.attr("data-target")||(c=e.attr("href"))&&c.replace(/.*(?=#[^\s]+$)/,"")),g=a.extend({},f.data(),e.data());f.carousel(g),(d=e.attr("data-slide-to"))&&f.data("carousel").pause().to(d).cycle(),b.preventDefault()})}(window.jQuery),!function(a){"use strict";var b=function(b,c){this.$element=a(b),this.options=a.extend({},a.fn.collapse.defaults,c),this.options.parent&&(this.$parent=a(this.options.parent)),this.options.toggle&&this.toggle()};b.prototype={constructor:b,dimension:function(){var a=this.$element.hasClass("width");return a?"width":"height"},show:function(){var b,c,d,e;if(!this.transitioning&&!this.$element.hasClass("in")){if(b=this.dimension(),c=a.camelCase(["scroll",b].join("-")),d=this.$parent&&this.$parent.find("> .accordion-group > .in"),d&&d.length){if(e=d.data("collapse"),e&&e.transitioning)return;d.collapse("hide"),e||d.data("collapse",null)}this.$element[b](0),this.transition("addClass",a.Event("show"),"shown"),a.support.transition&&this.$element[b](this.$element[0][c])}},hide:function(){var b;!this.transitioning&&this.$element.hasClass("in")&&(b=this.dimension(),this.reset(this.$element[b]()),this.transition("removeClass",a.Event("hide"),"hidden"),this.$element[b](0))},reset:function(a){var b=this.dimension();return this.$element.removeClass("collapse")[b](a||"auto")[0].offsetWidth,this.$element[null!==a?"addClass":"removeClass"]("collapse"),this},transition:function(b,c,d){var e=this,f=function(){"show"==c.type&&e.reset(),e.transitioning=0,e.$element.trigger(d)};this.$element.trigger(c),c.isDefaultPrevented()||(this.transitioning=1,this.$element[b]("in"),a.support.transition&&this.$element.hasClass("collapse")?this.$element.one(a.support.transition.end,f):f())},toggle:function(){this[this.$element.hasClass("in")?"hide":"show"]()}};var c=a.fn.collapse;a.fn.collapse=function(c){return this.each(function(){var d=a(this),e=d.data("collapse"),f=a.extend({},a.fn.collapse.defaults,d.data(),"object"==typeof c&&c);e||d.data("collapse",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.collapse.defaults={toggle:!0},a.fn.collapse.Constructor=b,a.fn.collapse.noConflict=function(){return a.fn.collapse=c,this},a(document).on("click.collapse.data-api","[data-toggle=collapse]",function(b){var c,d=a(this),e=d.attr("data-target")||b.preventDefault()||(c=d.attr("href"))&&c.replace(/.*(?=#[^\s]+$)/,""),f=a(e).data("collapse")?"toggle":d.data();d[a(e).hasClass("in")?"addClass":"removeClass"]("collapsed"),a(e).collapse(f)})}(window.jQuery),!function(a){"use strict";function b(){a(".dropdown-backdrop").remove(),a(d).each(function(){c(a(this)).removeClass("open")})}function c(b){var c,d=b.attr("data-target");return d||(d=b.attr("href"),d=d&&/#/.test(d)&&d.replace(/.*(?=#[^\s]*$)/,"")),c=d&&a(d),c&&c.length||(c=b.parent()),c}var d="[data-toggle=dropdown]",e=function(b){var c=a(b).on("click.dropdown.data-api",this.toggle);a("html").on("click.dropdown.data-api",function(){c.parent().removeClass("open")})};e.prototype={constructor:e,toggle:function(){var d,e,f=a(this);if(!f.is(".disabled, :disabled"))return d=c(f),e=d.hasClass("open"),b(),e||("ontouchstart"in document.documentElement&&a('<div class="dropdown-backdrop"/>').insertBefore(a(this)).on("click",b),d.toggleClass("open")),f.focus(),!1},keydown:function(b){var e,f,g,h,i;if(/(38|40|27)/.test(b.keyCode)&&(e=a(this),b.preventDefault(),b.stopPropagation(),!e.is(".disabled, :disabled"))){if(g=c(e),h=g.hasClass("open"),!h||h&&27==b.keyCode)return 27==b.which&&g.find(d).focus(),e.click();f=a("[role=menu] li:not(.divider):visible a",g),f.length&&(i=f.index(f.filter(":focus")),38==b.keyCode&&i>0&&i--,40==b.keyCode&&i<f.length-1&&i++,~i||(i=0),f.eq(i).focus())
-}}};var f=a.fn.dropdown;a.fn.dropdown=function(b){return this.each(function(){var c=a(this),d=c.data("dropdown");d||c.data("dropdown",d=new e(this)),"string"==typeof b&&d[b].call(c)})},a.fn.dropdown.Constructor=e,a.fn.dropdown.noConflict=function(){return a.fn.dropdown=f,this},a(document).on("click.dropdown.data-api",b).on("click.dropdown.data-api",".dropdown form",function(a){a.stopPropagation()}).on("click.dropdown.data-api",d,e.prototype.toggle).on("keydown.dropdown.data-api",d+", [role=menu]",e.prototype.keydown)}(window.jQuery),!function(a){"use strict";var b=function(b,c){this.options=c,this.$element=a(b).delegate('[data-dismiss="modal"]',"click.dismiss.modal",a.proxy(this.hide,this)),this.options.remote&&this.$element.find(".modal-body").load(this.options.remote)};b.prototype={constructor:b,toggle:function(){return this[this.isShown?"hide":"show"]()},show:function(){var b=this,c=a.Event("show");this.$element.trigger(c),this.isShown||c.isDefaultPrevented()||(this.isShown=!0,this.escape(),this.backdrop(function(){var c=a.support.transition&&b.$element.hasClass("fade");b.$element.parent().length||b.$element.appendTo(document.body),b.$element.show(),c&&b.$element[0].offsetWidth,b.$element.addClass("in").attr("aria-hidden",!1),b.enforceFocus(),c?b.$element.one(a.support.transition.end,function(){b.$element.focus().trigger("shown")}):b.$element.focus().trigger("shown")}))},hide:function(b){b&&b.preventDefault();b=a.Event("hide"),this.$element.trigger(b),this.isShown&&!b.isDefaultPrevented()&&(this.isShown=!1,this.escape(),a(document).off("focusin.modal"),this.$element.removeClass("in").attr("aria-hidden",!0),a.support.transition&&this.$element.hasClass("fade")?this.hideWithTransition():this.hideModal())},enforceFocus:function(){var b=this;a(document).on("focusin.modal",function(a){b.$element[0]===a.target||b.$element.has(a.target).length||b.$element.focus()})},escape:function(){var a=this;this.isShown&&this.options.keyboard?this.$element.on("keyup.dismiss.modal",function(b){27==b.which&&a.hide()}):this.isShown||this.$element.off("keyup.dismiss.modal")},hideWithTransition:function(){var b=this,c=setTimeout(function(){b.$element.off(a.support.transition.end),b.hideModal()},500);this.$element.one(a.support.transition.end,function(){clearTimeout(c),b.hideModal()})},hideModal:function(){var a=this;this.$element.hide(),this.backdrop(function(){a.removeBackdrop(),a.$element.trigger("hidden")})},removeBackdrop:function(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null},backdrop:function(b){var c=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var d=a.support.transition&&c;if(this.$backdrop=a('<div class="modal-backdrop '+c+'" />').appendTo(document.body),this.$backdrop.click("static"==this.options.backdrop?a.proxy(this.$element[0].focus,this.$element[0]):a.proxy(this.hide,this)),d&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),!b)return;d?this.$backdrop.one(a.support.transition.end,b):b()}else!this.isShown&&this.$backdrop?(this.$backdrop.removeClass("in"),a.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one(a.support.transition.end,b):b()):b&&b()}};var c=a.fn.modal;a.fn.modal=function(c){return this.each(function(){var d=a(this),e=d.data("modal"),f=a.extend({},a.fn.modal.defaults,d.data(),"object"==typeof c&&c);e||d.data("modal",e=new b(this,f)),"string"==typeof c?e[c]():f.show&&e.show()})},a.fn.modal.defaults={backdrop:!0,keyboard:!0,show:!0},a.fn.modal.Constructor=b,a.fn.modal.noConflict=function(){return a.fn.modal=c,this},a(document).on("click.modal.data-api",'[data-toggle="modal"]',function(b){var c=a(this),d=c.attr("href"),e=a(c.attr("data-target")||d&&d.replace(/.*(?=#[^\s]+$)/,"")),f=e.data("modal")?"toggle":a.extend({remote:!/#/.test(d)&&d},e.data(),c.data());b.preventDefault(),e.modal(f).one("hide",function(){c.focus()})})}(window.jQuery),!function(a){"use strict";var b=function(a,b){this.init("tooltip",a,b)};b.prototype={constructor:b,init:function(b,c,d){var e,f,g,h,i;for(this.type=b,this.$element=a(c),this.options=this.getOptions(d),this.enabled=!0,g=this.options.trigger.split(" "),i=g.length;i--;)h=g[i],"click"==h?this.$element.on("click."+this.type,this.options.selector,a.proxy(this.toggle,this)):"manual"!=h&&(e="hover"==h?"mouseenter":"focus",f="hover"==h?"mouseleave":"blur",this.$element.on(e+"."+this.type,this.options.selector,a.proxy(this.enter,this)),this.$element.on(f+"."+this.type,this.options.selector,a.proxy(this.leave,this)));this.options.selector?this._options=a.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},getOptions:function(b){return b=a.extend({},a.fn[this.type].defaults,this.$element.data(),b),b.delay&&"number"==typeof b.delay&&(b.delay={show:b.delay,hide:b.delay}),b},enter:function(b){var c,d=a.fn[this.type].defaults,e={};return this._options&&a.each(this._options,function(a,b){d[a]!=b&&(e[a]=b)},this),c=a(b.currentTarget)[this.type](e).data(this.type),c.options.delay&&c.options.delay.show?(clearTimeout(this.timeout),c.hoverState="in",void(this.timeout=setTimeout(function(){"in"==c.hoverState&&c.show()},c.options.delay.show))):c.show()},leave:function(b){var c=a(b.currentTarget)[this.type](this._options).data(this.type);return this.timeout&&clearTimeout(this.timeout),c.options.delay&&c.options.delay.hide?(c.hoverState="out",void(this.timeout=setTimeout(function(){"out"==c.hoverState&&c.hide()},c.options.delay.hide))):c.hide()},show:function(){var b,c,d,e,f,g,h=a.Event("show");if(this.hasContent()&&this.enabled){if(this.$element.trigger(h),h.isDefaultPrevented())return;switch(b=this.tip(),this.setContent(),this.options.animation&&b.addClass("fade"),f="function"==typeof this.options.placement?this.options.placement.call(this,b[0],this.$element[0]):this.options.placement,b.detach().css({top:0,left:0,display:"block"}),this.options.container?b.appendTo(this.options.container):b.insertAfter(this.$element),c=this.getPosition(),d=b[0].offsetWidth,e=b[0].offsetHeight,f){case"bottom":g={top:c.top+c.height,left:c.left+c.width/2-d/2};break;case"top":g={top:c.top-e,left:c.left+c.width/2-d/2};break;case"left":g={top:c.top+c.height/2-e/2,left:c.left-d};break;case"right":g={top:c.top+c.height/2-e/2,left:c.left+c.width}}this.applyPlacement(g,f),this.$element.trigger("shown")}},applyPlacement:function(a,b){var c,d,e,f,g=this.tip(),h=g[0].offsetWidth,i=g[0].offsetHeight;g.offset(a).addClass(b).addClass("in"),c=g[0].offsetWidth,d=g[0].offsetHeight,"top"==b&&d!=i&&(a.top=a.top+i-d,f=!0),"bottom"==b||"top"==b?(e=0,a.left<0&&(e=-2*a.left,a.left=0,g.offset(a),c=g[0].offsetWidth,d=g[0].offsetHeight),this.replaceArrow(e-h+c,c,"left")):this.replaceArrow(d-i,d,"top"),f&&g.offset(a)},replaceArrow:function(a,b,c){this.arrow().css(c,a?50*(1-a/b)+"%":"")},setContent:function(){var a=this.tip(),b=this.getTitle();a.find(".tooltip-inner")[this.options.html?"html":"text"](b),a.removeClass("fade in top bottom left right")},hide:function(){function b(){var b=setTimeout(function(){c.off(a.support.transition.end).detach()},500);c.one(a.support.transition.end,function(){clearTimeout(b),c.detach()})}var c=this.tip(),d=a.Event("hide");return this.$element.trigger(d),d.isDefaultPrevented()?void 0:(c.removeClass("in"),a.support.transition&&this.$tip.hasClass("fade")?b():c.detach(),this.$element.trigger("hidden"),this)},fixTitle:function(){var a=this.$element;(a.attr("title")||"string"!=typeof a.attr("data-original-title"))&&a.attr("data-original-title",a.attr("title")||"").attr("title","")},hasContent:function(){return this.getTitle()},getPosition:function(){var b=this.$element[0];return a.extend({},"function"==typeof b.getBoundingClientRect?b.getBoundingClientRect():{width:b.offsetWidth,height:b.offsetHeight},this.$element.offset())},getTitle:function(){var a,b=this.$element,c=this.options;return a=b.attr("data-original-title")||("function"==typeof c.title?c.title.call(b[0]):c.title)},tip:function(){return this.$tip=this.$tip||a(this.options.template)},arrow:function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},validate:function(){this.$element[0].parentNode||(this.hide(),this.$element=null,this.options=null)},enable:function(){this.enabled=!0},disable:function(){this.enabled=!1},toggleEnabled:function(){this.enabled=!this.enabled},toggle:function(b){var c=b?a(b.currentTarget)[this.type](this._options).data(this.type):this;c.tip().hasClass("in")?c.hide():c.show()},destroy:function(){this.hide().$element.off("."+this.type).removeData(this.type)}};var c=a.fn.tooltip;a.fn.tooltip=function(c){return this.each(function(){var d=a(this),e=d.data("tooltip"),f="object"==typeof c&&c;e||d.data("tooltip",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.tooltip.Constructor=b,a.fn.tooltip.defaults={animation:!0,placement:"top",selector:!1,template:'<div class="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,container:!1},a.fn.tooltip.noConflict=function(){return a.fn.tooltip=c,this}}(window.jQuery),!function(a){"use strict";var b=function(a,b){this.init("popover",a,b)};b.prototype=a.extend({},a.fn.tooltip.Constructor.prototype,{constructor:b,setContent:function(){var a=this.tip(),b=this.getTitle(),c=this.getContent();a.find(".popover-title")[this.options.html?"html":"text"](b),a.find(".popover-content")[this.options.html?"html":"text"](c),a.removeClass("fade top bottom left right in")},hasContent:function(){return this.getTitle()||this.getContent()},getContent:function(){var a,b=this.$element,c=this.options;return a=("function"==typeof c.content?c.content.call(b[0]):c.content)||b.attr("data-content")},tip:function(){return this.$tip||(this.$tip=a(this.options.template)),this.$tip},destroy:function(){this.hide().$element.off("."+this.type).removeData(this.type)}});var c=a.fn.popover;a.fn.popover=function(c){return this.each(function(){var d=a(this),e=d.data("popover"),f="object"==typeof c&&c;e||d.data("popover",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.popover.Constructor=b,a.fn.popover.defaults=a.extend({},a.fn.tooltip.defaults,{placement:"right",trigger:"click",content:"",template:'<div class="popover"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'}),a.fn.popover.noConflict=function(){return a.fn.popover=c,this}}(window.jQuery),!function(a){"use strict";function b(b,c){var d,e=a.proxy(this.process,this),f=a(a(b).is("body")?window:b);this.options=a.extend({},a.fn.scrollspy.defaults,c),this.$scrollElement=f.on("scroll.scroll-spy.data-api",e),this.selector=(this.options.target||(d=a(b).attr("href"))&&d.replace(/.*(?=#[^\s]+$)/,"")||"")+" .nav li > a",this.$body=a("body"),this.refresh(),this.process()}b.prototype={constructor:b,refresh:function(){var b,c=this;this.offsets=a([]),this.targets=a([]),b=this.$body.find(this.selector).map(function(){var b=a(this),d=b.data("target")||b.attr("href"),e=/^#\w/.test(d)&&a(d);return e&&e.length&&[[e.position().top+(!a.isWindow(c.$scrollElement.get(0))&&c.$scrollElement.scrollTop()),d]]||null}).sort(function(a,b){return a[0]-b[0]}).each(function(){c.offsets.push(this[0]),c.targets.push(this[1])})},process:function(){var a,b=this.$scrollElement.scrollTop()+this.options.offset,c=this.$scrollElement[0].scrollHeight||this.$body[0].scrollHeight,d=c-this.$scrollElement.height(),e=this.offsets,f=this.targets,g=this.activeTarget;if(b>=d)return g!=(a=f.last()[0])&&this.activate(a);for(a=e.length;a--;)g!=f[a]&&b>=e[a]&&(!e[a+1]||b<=e[a+1])&&this.activate(f[a])},activate:function(b){var c,d;this.activeTarget=b,a(this.selector).parent(".active").removeClass("active"),d=this.selector+'[data-target="'+b+'"],'+this.selector+'[href="'+b+'"]',c=a(d).parent("li").addClass("active"),c.parent(".dropdown-menu").length&&(c=c.closest("li.dropdown").addClass("active")),c.trigger("activate")}};var c=a.fn.scrollspy;a.fn.scrollspy=function(c){return this.each(function(){var d=a(this),e=d.data("scrollspy"),f="object"==typeof c&&c;e||d.data("scrollspy",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.scrollspy.Constructor=b,a.fn.scrollspy.defaults={offset:10},a.fn.scrollspy.noConflict=function(){return a.fn.scrollspy=c,this},a(window).on("load",function(){a('[data-spy="scroll"]').each(function(){var b=a(this);b.scrollspy(b.data())})})}(window.jQuery),!function(a){"use strict";var b=function(b){this.element=a(b)};b.prototype={constructor:b,show:function(){var b,c,d,e=this.element,f=e.closest("ul:not(.dropdown-menu)"),g=e.attr("data-target");g||(g=e.attr("href"),g=g&&g.replace(/.*(?=#[^\s]*$)/,"")),e.parent("li").hasClass("active")||(b=f.find(".active:last a")[0],d=a.Event("show",{relatedTarget:b}),e.trigger(d),d.isDefaultPrevented()||(c=a(g),this.activate(e.parent("li"),f),this.activate(c,c.parent(),function(){e.trigger({type:"shown",relatedTarget:b})})))},activate:function(b,c,d){function e(){f.removeClass("active").find("> .dropdown-menu > .active").removeClass("active"),b.addClass("active"),g?(b[0].offsetWidth,b.addClass("in")):b.removeClass("fade"),b.parent(".dropdown-menu")&&b.closest("li.dropdown").addClass("active"),d&&d()}var f=c.find("> .active"),g=d&&a.support.transition&&f.hasClass("fade");g?f.one(a.support.transition.end,e):e(),f.removeClass("in")}};var c=a.fn.tab;a.fn.tab=function(c){return this.each(function(){var d=a(this),e=d.data("tab");e||d.data("tab",e=new b(this)),"string"==typeof c&&e[c]()})},a.fn.tab.Constructor=b,a.fn.tab.noConflict=function(){return a.fn.tab=c,this},a(document).on("click.tab.data-api",'[data-toggle="tab"], [data-toggle="pill"]',function(b){b.preventDefault(),a(this).tab("show")})}(window.jQuery),!function(a){"use strict";var b=function(b,c){this.$element=a(b),this.options=a.extend({},a.fn.typeahead.defaults,c),this.matcher=this.options.matcher||this.matcher,this.sorter=this.options.sorter||this.sorter,this.highlighter=this.options.highlighter||this.highlighter,this.updater=this.options.updater||this.updater,this.source=this.options.source,this.$menu=a(this.options.menu),this.shown=!1,this.listen()};b.prototype={constructor:b,select:function(){var a=this.$menu.find(".active").attr("data-value");return this.$element.val(this.updater(a)).change(),this.hide()},updater:function(a){return a},show:function(){var b=a.extend({},this.$element.position(),{height:this.$element[0].offsetHeight});return this.$menu.insertAfter(this.$element).css({top:b.top+b.height,left:b.left}).show(),this.shown=!0,this},hide:function(){return this.$menu.hide(),this.shown=!1,this},lookup:function(){var b;return this.query=this.$element.val(),!this.query||this.query.length<this.options.minLength?this.shown?this.hide():this:(b=a.isFunction(this.source)?this.source(this.query,a.proxy(this.process,this)):this.source,b?this.process(b):this)},process:function(b){var c=this;return b=a.grep(b,function(a){return c.matcher(a)}),b=this.sorter(b),b.length?this.render(b.slice(0,this.options.items)).show():this.shown?this.hide():this},matcher:function(a){return~a.toLowerCase().indexOf(this.query.toLowerCase())},sorter:function(a){for(var b,c=[],d=[],e=[];b=a.shift();)b.toLowerCase().indexOf(this.query.toLowerCase())?~b.indexOf(this.query)?d.push(b):e.push(b):c.push(b);return c.concat(d,e)},highlighter:function(a){var b=this.query.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&");return a.replace(new RegExp("("+b+")","ig"),function(a,b){return"<strong>"+b+"</strong>"})},render:function(b){var c=this;return b=a(b).map(function(b,d){return b=a(c.options.item).attr("data-value",d),b.find("a").html(c.highlighter(d)),b[0]}),b.first().addClass("active"),this.$menu.html(b),this},next:function(){var b=this.$menu.find(".active").removeClass("active"),c=b.next();c.length||(c=a(this.$menu.find("li")[0])),c.addClass("active")},prev:function(){var a=this.$menu.find(".active").removeClass("active"),b=a.prev();b.length||(b=this.$menu.find("li").last()),b.addClass("active")},listen:function(){this.$element.on("focus",a.proxy(this.focus,this)).on("blur",a.proxy(this.blur,this)).on("keypress",a.proxy(this.keypress,this)).on("keyup",a.proxy(this.keyup,this)),this.eventSupported("keydown")&&this.$element.on("keydown",a.proxy(this.keydown,this)),this.$menu.on("click",a.proxy(this.click,this)).on("mouseenter","li",a.proxy(this.mouseenter,this)).on("mouseleave","li",a.proxy(this.mouseleave,this))},eventSupported:function(a){var b=a in this.$element;return b||(this.$element.setAttribute(a,"return;"),b="function"==typeof this.$element[a]),b},move:function(a){if(this.shown){switch(a.keyCode){case 9:case 13:case 27:a.preventDefault();break;case 38:a.preventDefault(),this.prev();break;case 40:a.preventDefault(),this.next()}a.stopPropagation()}},keydown:function(b){this.suppressKeyPressRepeat=~a.inArray(b.keyCode,[40,38,9,13,27]),this.move(b)},keypress:function(a){this.suppressKeyPressRepeat||this.move(a)},keyup:function(a){switch(a.keyCode){case 40:case 38:case 16:case 17:case 18:break;case 9:case 13:if(!this.shown)return;this.select();break;case 27:if(!this.shown)return;this.hide();break;default:this.lookup()}a.stopPropagation(),a.preventDefault()},focus:function(){this.focused=!0},blur:function(){this.focused=!1,!this.mousedover&&this.shown&&this.hide()},click:function(a){a.stopPropagation(),a.preventDefault(),this.select(),this.$element.focus()},mouseenter:function(b){this.mousedover=!0,this.$menu.find(".active").removeClass("active"),a(b.currentTarget).addClass("active")},mouseleave:function(){this.mousedover=!1,!this.focused&&this.shown&&this.hide()}};var c=a.fn.typeahead;a.fn.typeahead=function(c){return this.each(function(){var d=a(this),e=d.data("typeahead"),f="object"==typeof c&&c;e||d.data("typeahead",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.typeahead.defaults={source:[],items:8,menu:'<ul class="typeahead dropdown-menu"></ul>',item:'<li><a href="#"></a></li>',minLength:1},a.fn.typeahead.Constructor=b,a.fn.typeahead.noConflict=function(){return a.fn.typeahead=c,this},a(document).on("focus.typeahead.data-api",'[data-provide="typeahead"]',function(){var b=a(this);b.data("typeahead")||b.typeahead(b.data())})}(window.jQuery),!function(a){"use strict";var b=function(b,c){this.options=a.extend({},a.fn.affix.defaults,c),this.$window=a(window).on("scroll.affix.data-api",a.proxy(this.checkPosition,this)).on("click.affix.data-api",a.proxy(function(){setTimeout(a.proxy(this.checkPosition,this),1)},this)),this.$element=a(b),this.checkPosition()};b.prototype.checkPosition=function(){if(this.$element.is(":visible")){var b,c=a(document).height(),d=this.$window.scrollTop(),e=this.$element.offset(),f=this.options.offset,g=f.bottom,h=f.top,i="affix affix-top affix-bottom";"object"!=typeof f&&(g=h=f),"function"==typeof h&&(h=f.top()),"function"==typeof g&&(g=f.bottom()),b=null!=this.unpin&&d+this.unpin<=e.top?!1:null!=g&&e.top+this.$element.height()>=c-g?"bottom":null!=h&&h>=d?"top":!1,this.affixed!==b&&(this.affixed=b,this.unpin="bottom"==b?e.top-d:null,this.$element.removeClass(i).addClass("affix"+(b?"-"+b:"")))}};var c=a.fn.affix;a.fn.affix=function(c){return this.each(function(){var d=a(this),e=d.data("affix"),f="object"==typeof c&&c;e||d.data("affix",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.affix.Constructor=b,a.fn.affix.defaults={offset:0},a.fn.affix.noConflict=function(){return a.fn.affix=c,this},a(window).on("load",function(){a('[data-spy="affix"]').each(function(){var b=a(this),c=b.data();c.offset=c.offset||{},c.offsetBottom&&(c.offset.bottom=c.offsetBottom),c.offsetTop&&(c.offset.top=c.offsetTop),b.affix(c)})})}(window.jQuery),function(a){function b(b,c,d,e){function f(){"WebSocket"in a?(g.socket=g.socketProtocol.length>0?new WebSocket(g.socketUrl,g.socketProtocol):new WebSocket(g.socketUrl),g.socket.onopen=function(){g.connected=!0,g.iSuccessCB(g.retries<5?"(RECONNECTED)":""),g.retries=5},g.socket.onclose=function(){g.connected=!1,g.iErrorCB("socket closed "+(g.retries>0?"retrying in 5 seconds ...":"")),g.retries>0&&setTimeout(function(){g.retries--,f()},5e3)},g.socket.onerror=function(a){g.iErrorCB(a.data)},g.socket.onmessage=function(a){g.receive(a.data)}):console.log("This browser doesn't appear to support websockets!")}var g=this;this.iSuccessCB=b,this.iErrorCB=c,this.methodIdx=0,this.methodCalls=[];for(var h=0;100>h;h++)this.methodCalls[h]=null;this.retries=5,this.connected=!1,this.timeouttime=5e3,this.socketUrl="ws://localhost:23000/vehicle",this.socketProtocol="http-only",void 0!==d&&(this.socketUrl=d),void 0!==e&&(this.socketProtocol=e),this.VehicleMethodCall=function(a,b,c,d){var e=this;this.successCB=c,this.errorCB=d,this.transactionid=a,this.name=b,this.done=!1,this.start=function(){e.timeout=setTimeout(function(){void 0!==e.errorCB&&e.errorCB('"'+e.name+'" method timed out after '+g.timeouttime+"ms"),e.finish()},g.timeouttime)},this.finish=function(){void 0!==e.timeout&&clearTimeout(e.timeout),e.done=!0}},f()}b.prototype.generateTransactionId=function(){var a,b=[];for(a=0;8>a;a++){var c=Math.floor(65536*(Math.random()+1));b[a]=c.toString(16).substring(1)}var d=b[0]+b[1]+"-"+b[2]+"-"+b[3]+"-"+b[4]+"-"+b[5]+b[6]+b[7];return d},b.prototype.send=function(a,b,c){if(!this.connected)return void(void 0!==c&&c('"'+a.name+'" method failed because socket is closed'));var d=this.methodIdx;this.methodIdx=(this.methodIdx+1)%100,this.methodCalls[d]=new this.VehicleMethodCall(a.transactionid,a.name,b,c),this.socket.send(JSON.stringify(a)),this.methodCalls[d].start()},b.prototype.getSupportedEventTypes=function(a,b,c,d){var e={type:"method",name:"getSupportedEventTypes",writeable:b,transactionid:this.generateTransactionId(),data:a};this.send(e,c,d)},b.prototype.get=function(a,b,c){if(!(a.length<=0)){var d={type:"method",name:"get",transactionid:this.generateTransactionId(),data:a};this.send(d,b,c)}},b.prototype.getHistory=function(a,b,c,d,e){if(!(a.length<=0)){var f={property:a,timeBegin:(b.getTime()/1e3).toString(),timeEnd:(c.getTime()/1e3).toString(),sequenceBegin:"-1",sequenceEnd:"-1"},g={type:"method",name:"getRanged",transactionid:this.generateTransactionId(),data:f};this.send(g,d,e)}},b.prototype.set=function(a,b,c,d){if(!(a.length!=b.length||a.length<=0)){for(var e={type:"method",name:"set",transactionid:this.generateTransactionId(),data:[]},f=[],g=0;g<a.length;g++){var h={property:a[g],value:b[g]};f[f.length]=h}e.data=f,this.send(e,c,d)}},b.prototype.subscribe=function(a,b,c){var d={type:"method",name:"subscribe",transactionid:this.generateTransactionId(),data:a};this.send(d,b,c)},b.prototype.unsubscribe=function(a,b,c){var d={type:"method",name:"unsubscribe",transactionid:this.generateTransactionId(),data:a};this.send(d,b,c)},b.prototype.sendEvent=function(a,b){var c=document.createEvent("Event");c.initEvent(a,!0,!0),c.name=a,c.value=b,document.dispatchEvent(c),console.log(c)},b.prototype.receive=function(a){var b,c=this;try{b=JSON.parse(a)}catch(d){return void c.iErrorCB("GARBAGE MESSAGE: "+a)}if(void 0===b||void 0===b.type||void 0===b.name)return void c.iErrorCB("BADLY FORMED MESSAGE: "+a);if("methodReply"===b.type)for(var e=this.methodCalls,f=0;f<e.length;f++){var g=e[f];if(g&&!g.done&&g.transactionid===b.transactionid)return g.finish(),void 0!==b.error&&g.errorCB(b.error),void(void 0!==b.data&&void 0!==g.successCB&&g.successCB(b.data))}else"valuechanged"===b.type&&c.sendEvent(b.name,b.data)},a.Vehicle=b}(window),function(a,b,c){"use strict";a.cowhide=a.cowhide||{},a.extend(a.cowhide,{version:"0.0.1",options:{monitorFrameworkRestrictions:!1,connectToAMB:!1},themeEngineOptions:{path:"css",initial:"default",minified:!1},registeredWidgets:[],drivingMode:!1,nightMode:!1,currentTheme:"default",vehicle:null,GUID:function(){var a=function(){return Math.floor(65536*Math.random()).toString(16)};return a()+a()+"-"+a()+"-"+a()+"-"+a()+"-"+a()+a()+a()},register:function(c){var d=this,e=b.map(d.registeredWidgets,function(a){return a.guid});if(-1==b.indexOf(e,c.guid)&&d.registeredWidgets.push(c),"DIV"!=c.$element[0].tagName||!c.$element.hasClass("page")){var f=c.$element.parent().closest("div.page");0===f.length?a.cowhide.fatal("#30: every widget must be within a div with class='page'.",this.$element):f.ch_page("register",c)}},backdrop:function(){var b=a('<div class="modal-backdrop theme-change-backdrop fade" />');return b.appendTo(document.body),b[0].offsetWidth,b.addClass("in"),b},initThemeEngine:function(b){a.extend(this.themeEngineOptions,b),this.currentTheme=this.themeEngineOptions.initial;var c=a("link#cowhide-theme");0===c.length&&this.fatal("#40: could not find <link> with id 'cowhide-theme'.")},setTheme:function(b,d){if(b!==this.currentTheme||d!=this.nightMode){var e=a("link#cowhide-theme"),f=this.themeEngineOptions.path+"/cowhide-"+b||"default";(d===!0||d===c&&this.nightMode===!0)&&(f+="-night"),this.themeEngineOptions.minified&&(f+=".min"),f+=".css";var g=this.backdrop();setTimeout(function(){e.attr("href",f),g.remove()},200),this.currentTheme=b,d!==c&&(this.nightMode=d)}},setNightMode:function(a){this.nightMode!=a&&this.setTheme(this.currentTheme,!this.nightMode)},toggleNightMode:function(){this.setNightMode(!this.nightMode)},toggleDrivingMode:function(){this.setDrivingMode(!this.drivingMode)},setDrivingMode:function(a){var c=this;c.drivingMode!=a&&(c.drivingMode=a,b.each(this.registeredWidgets,function(a){a.setDrivingMode&&a.setDrivingMode(c.drivingMode)}))},listenToVehicle:function(){var b=this;b.vehicle=new window.Vehicle(function(){a(document).on("VehicleSpeed",function(a){b.setDrivingMode(a.originalEvent.value>0)})},function(){b.fatal("There was a problem connecting to AMB's web socket.")})},verifyFrameworkRestrictions:function(){b.each(this.registeredWidgets,function(a){a.verifyMinFontSize(),a.verifyMaxFontSize(),a.verifyMinWidth()})},fatal:function(a,b){var d="";if(d+="[Cowhide] Fatal error",b!==c){d+=" (offending widget: ";var e=b.attr("id"),f=b.attr("class");e&&(d+="#("+e+")"),f&&(d+=".("+f+")"),d+=")"}throw d+=": "+a,new Error(d)}}),a(function(){a.cowhide.options.connectToAMB&&a.cowhide.listenToVehicle(),a.cowhide.options.monitorFrameworkRestrictions&&setInterval(function(){a.cowhide.verifyFrameworkRestrictions()},1e3)})}(window.jQuery,window._),function(a,b){"use strict";var c=function(b){this.$element=a(b),this.options=a.extend({},a.fn.ch_widget.defaults),this.drivingMode=!1};c.prototype=a.extend({},{register:function(){this.guid=a.cowhide.GUID(),a.cowhide.register(this)},verifyMinWidth:function(){this.$element.width()<this.options.minWidth&&this.options.minWidth>0&&a.cowhide.fatal("#10: this widget has a minimum allowed width of "+this.options.minWidth+"px",this.$element)},verifyMinFontSize:function(){if(this.options.minFontSize>0){var b=this.$element.css("font-size");parseFloat(b)<this.options.minFontSize&&a.cowhide.fatal("#20: this widget has a minimum allowed font-size of "+this.options.minFontSize+"px",this.$element)}},verifyMaxFontSize:function(){if(this.options.maxFontSize>0){var b=this.$element.css("font-size");parseFloat(b)>this.options.maxFontSize&&a.cowhide.fatal("#21: this widget has a maximum allowed font-size of "+this.options.maxFontSize+"px",this.$element)}},setDrivingMode:function(a){if(this.$element.data("ignore-driving-mode")===b&&this.options.disableWhenDriving){var c="disabled"==this.$element.attr("disabled"),d="disabled";if(!a&&!this.drivingMode&&c)return;a?(this.$element.attr(d,d),this.$element.disabled=!0,this.$element.addClass(d),this.onDrivingModeEnter&&this.onDrivingModeEnter(),this.drivingMode=!0):this.drivingMode&&(this.$element.removeAttr(d),this.$element.disabled=!1,this.$element.removeClass(d),this.onDrivingModeExit&&this.onDrivingModeExit(),this.drivingMode=!1)}},onDrivingModeEnter:b,onDrivingModeExit:b}),a.fn.ch_widget=function(){},a.fn.ch_widget.defaults={minWidth:0,minFontSize:0,maxFontSize:0,disableWhenDriving:!1},a.fn.ch_widget.Constructor=c}(window.jQuery),function(a){"use strict";var b=function(b,c){a.fn.ch_widget.Constructor(b,c),this.$element=a(b),this.options=a.extend(c,a.fn.ch_widget.defaults,{minFontSize:12,maxFontSize:24,disableWhenDriving:!0}),this.options.fixedWidth&&this.$element.css({width:this.options.fixedWidth}),this.options.marquee&&this.enableMarquee()};b.prototype=a.extend({},a.fn.ch_widget.Constructor.prototype,{constructor:b,disableMarquee:function(){var a=this.$element.find("marquee");if(a.length>0){var b=a.text();a.remove(),this.$element.text(b)}},enableMarquee:function(){if(this.options.marquee&&("A"==this.$element[0].tagName||"BUTTON"==this.$element[0].tagName)){var b=this.$element.text(),c=a("<marquee/>");c.attr("behavior","alternate"),c.attr("scrollamount",1),c.attr("width",this.$element.width()),c.text(b),this.$element.html(c)}},onDrivingModeEnter:function(){this.disableMarquee()},onDrivingModeExit:function(){this.enableMarquee()}});var c=a.fn.ch_button;a.fn.ch_button=function(c){return this.each(function(){var d=a(this),e=d.data("ch_button"),f="object"==typeof c&&c;d.data("marquee")&&(f=a.extend(f,{marquee:!0})),d.data("fixed-width")&&(f=a.extend(f,{fixedWidth:d.data("fixed-width")})),e||(d.data("ch_button",e=new b(this,f)),e.register()),d.button(c)})},a.fn.ch_button.Constructor=b,a.fn.ch_button.noConflict=function(){return a.fn.ch_button=c,this},a(function(){a(".btn, button, input[type=button]").ch_button()})}(window.jQuery),function(a){"use strict";var b=function(b,c){a.fn.ch_widget.Constructor(b,c),this.$element=a(b),this.options=a.extend({},a.fn.ch_widget.defaults)};b.prototype=a.extend({},a.fn.ch_widget.Constructor.prototype,{constructor:b,removeSelection:function(){var a=this.$element.find("table");a.removeClass("front-left"),a.removeClass("front-right"),a.removeClass("rear-left"),a.removeClass("rear-right")},frontLeft:function(){this.removeSelection(),this.$element.find("table").addClass("front-left")},frontRight:function(){this.removeSelection(),this.$element.find("table").addClass("front-right")},rearLeft:function(){this.removeSelection(),this.$element.find("table").addClass("rear-left")},rearRight:function(){this.removeSelection(),this.$element.find("table").addClass("rear-right")}}),a.fn.ch_seat_selector=function(c){return this.each(function(){var d=a(this),e=d.data("ch_seat_selector"),f="object"==typeof c&&c;if(e)"frontLeft"==c?e.frontLeft():"frontRight"==c?e.frontRight():"rearLeft"==c?e.rearLeft():"rearRight"==c?e.rearRight():"removeSelection"==c&&e.removeSelection();else{d.data("ch_seat_selector",e=new b(this,f)),e.register();var g=["<table>","    <tr>",'        <td class="front-left"></td>','        <td class="front-right"></td>',"    </tr>","    <tr>",'        <td class="rear-left"></td>','        <td class="rear-right"></td>',"    </tr>","</table>"].join("\n");d.html(g)}})},a.fn.ch_seat_selector.Constructor=b,a(function(){a(".ch-seat-selector").ch_seat_selector()})}(window.jQuery),function(a){"use strict";var b=function(b,c){a.fn.ch_widget.Constructor(b,c),this.$element=a(b),this.options=a.extend({},a.fn.ch_widget.defaults)};b.prototype=a.extend({},a.fn.ch_widget.Constructor.prototype,{constructor:b}),a.fn.ch_slider=function(c){return this.each(function(){var d=a(this),e=d.data("ch_slider"),f="object"==typeof c&&c;d.attr("data-height")&&(f=a.extend(f,{height:d.attr("data-height")})),e||(d.data("ch_slider",e=new b(this,f)),e.register()),d.slider(f)})},a.fn.ch_button.Constructor=b,a(function(){a(".ch-slider").ch_slider(),a(".ch-slider-vertical").ch_slider({orientation:"vertical"})})}(window.jQuery),function(a){"use strict";var b=function(b,c){a.fn.ch_widget.Constructor(b,c),this.$element=a(b),this.options=a.extend({},a.fn.ch_widget.defaults,{disableWhenDriving:!0})};b.prototype=a.extend({},a.fn.ch_widget.Constructor.prototype,{constructor:b}),a.fn.ch_text_input=function(c){return this.each(function(){var d=a(this),e=d.data("ch_text_input"),f="object"==typeof c&&c;e||(d.data("ch_text_input",e=new b(this,f)),e.register())})},a.fn.ch_text_input.Constructor=b,a(function(){a("input[type=text]").ch_text_input()})}(window.jQuery),function(a){"use strict";var b=function(b,c){a.fn.ch_widget.Constructor(b,c),this.$element=a(b),this.options=a.extend({},a.fn.ch_widget.defaults,{disableWhenDriving:!0})
+}}};var f=a.fn.dropdown;a.fn.dropdown=function(b){return this.each(function(){var c=a(this),d=c.data("dropdown");d||c.data("dropdown",d=new e(this)),"string"==typeof b&&d[b].call(c)})},a.fn.dropdown.Constructor=e,a.fn.dropdown.noConflict=function(){return a.fn.dropdown=f,this},a(document).on("click.dropdown.data-api",b).on("click.dropdown.data-api",".dropdown form",function(a){a.stopPropagation()}).on("click.dropdown.data-api",d,e.prototype.toggle).on("keydown.dropdown.data-api",d+", [role=menu]",e.prototype.keydown)}(window.jQuery),!function(a){"use strict";var b=function(b,c){this.options=c,this.$element=a(b).delegate('[data-dismiss="modal"]',"click.dismiss.modal",a.proxy(this.hide,this)),this.options.remote&&this.$element.find(".modal-body").load(this.options.remote)};b.prototype={constructor:b,toggle:function(){return this[this.isShown?"hide":"show"]()},show:function(){var b=this,c=a.Event("show");this.$element.trigger(c),this.isShown||c.isDefaultPrevented()||(this.isShown=!0,this.escape(),this.backdrop(function(){var c=a.support.transition&&b.$element.hasClass("fade");b.$element.parent().length||b.$element.appendTo(document.body),b.$element.show(),c&&b.$element[0].offsetWidth,b.$element.addClass("in").attr("aria-hidden",!1),b.enforceFocus(),c?b.$element.one(a.support.transition.end,function(){b.$element.focus().trigger("shown")}):b.$element.focus().trigger("shown")}))},hide:function(b){b&&b.preventDefault();b=a.Event("hide"),this.$element.trigger(b),this.isShown&&!b.isDefaultPrevented()&&(this.isShown=!1,this.escape(),a(document).off("focusin.modal"),this.$element.removeClass("in").attr("aria-hidden",!0),a.support.transition&&this.$element.hasClass("fade")?this.hideWithTransition():this.hideModal())},enforceFocus:function(){var b=this;a(document).on("focusin.modal",function(a){b.$element[0]===a.target||b.$element.has(a.target).length||b.$element.focus()})},escape:function(){var a=this;this.isShown&&this.options.keyboard?this.$element.on("keyup.dismiss.modal",function(b){27==b.which&&a.hide()}):this.isShown||this.$element.off("keyup.dismiss.modal")},hideWithTransition:function(){var b=this,c=setTimeout(function(){b.$element.off(a.support.transition.end),b.hideModal()},500);this.$element.one(a.support.transition.end,function(){clearTimeout(c),b.hideModal()})},hideModal:function(){var a=this;this.$element.hide(),this.backdrop(function(){a.removeBackdrop(),a.$element.trigger("hidden")})},removeBackdrop:function(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null},backdrop:function(b){var c=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var d=a.support.transition&&c;if(this.$backdrop=a('<div class="modal-backdrop '+c+'" />').appendTo(document.body),this.$backdrop.click("static"==this.options.backdrop?a.proxy(this.$element[0].focus,this.$element[0]):a.proxy(this.hide,this)),d&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),!b)return;d?this.$backdrop.one(a.support.transition.end,b):b()}else!this.isShown&&this.$backdrop?(this.$backdrop.removeClass("in"),a.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one(a.support.transition.end,b):b()):b&&b()}};var c=a.fn.modal;a.fn.modal=function(c){return this.each(function(){var d=a(this),e=d.data("modal"),f=a.extend({},a.fn.modal.defaults,d.data(),"object"==typeof c&&c);e||d.data("modal",e=new b(this,f)),"string"==typeof c?e[c]():f.show&&e.show()})},a.fn.modal.defaults={backdrop:!0,keyboard:!0,show:!0},a.fn.modal.Constructor=b,a.fn.modal.noConflict=function(){return a.fn.modal=c,this},a(document).on("click.modal.data-api",'[data-toggle="modal"]',function(b){var c=a(this),d=c.attr("href"),e=a(c.attr("data-target")||d&&d.replace(/.*(?=#[^\s]+$)/,"")),f=e.data("modal")?"toggle":a.extend({remote:!/#/.test(d)&&d},e.data(),c.data());b.preventDefault(),e.modal(f).one("hide",function(){c.focus()})})}(window.jQuery),!function(a){"use strict";var b=function(a,b){this.init("tooltip",a,b)};b.prototype={constructor:b,init:function(b,c,d){var e,f,g,h,i;for(this.type=b,this.$element=a(c),this.options=this.getOptions(d),this.enabled=!0,g=this.options.trigger.split(" "),i=g.length;i--;)h=g[i],"click"==h?this.$element.on("click."+this.type,this.options.selector,a.proxy(this.toggle,this)):"manual"!=h&&(e="hover"==h?"mouseenter":"focus",f="hover"==h?"mouseleave":"blur",this.$element.on(e+"."+this.type,this.options.selector,a.proxy(this.enter,this)),this.$element.on(f+"."+this.type,this.options.selector,a.proxy(this.leave,this)));this.options.selector?this._options=a.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},getOptions:function(b){return b=a.extend({},a.fn[this.type].defaults,this.$element.data(),b),b.delay&&"number"==typeof b.delay&&(b.delay={show:b.delay,hide:b.delay}),b},enter:function(b){var c,d=a.fn[this.type].defaults,e={};return this._options&&a.each(this._options,function(a,b){d[a]!=b&&(e[a]=b)},this),c=a(b.currentTarget)[this.type](e).data(this.type),c.options.delay&&c.options.delay.show?(clearTimeout(this.timeout),c.hoverState="in",void(this.timeout=setTimeout(function(){"in"==c.hoverState&&c.show()},c.options.delay.show))):c.show()},leave:function(b){var c=a(b.currentTarget)[this.type](this._options).data(this.type);return this.timeout&&clearTimeout(this.timeout),c.options.delay&&c.options.delay.hide?(c.hoverState="out",void(this.timeout=setTimeout(function(){"out"==c.hoverState&&c.hide()},c.options.delay.hide))):c.hide()},show:function(){var b,c,d,e,f,g,h=a.Event("show");if(this.hasContent()&&this.enabled){if(this.$element.trigger(h),h.isDefaultPrevented())return;switch(b=this.tip(),this.setContent(),this.options.animation&&b.addClass("fade"),f="function"==typeof this.options.placement?this.options.placement.call(this,b[0],this.$element[0]):this.options.placement,b.detach().css({top:0,left:0,display:"block"}),this.options.container?b.appendTo(this.options.container):b.insertAfter(this.$element),c=this.getPosition(),d=b[0].offsetWidth,e=b[0].offsetHeight,f){case"bottom":g={top:c.top+c.height,left:c.left+c.width/2-d/2};break;case"top":g={top:c.top-e,left:c.left+c.width/2-d/2};break;case"left":g={top:c.top+c.height/2-e/2,left:c.left-d};break;case"right":g={top:c.top+c.height/2-e/2,left:c.left+c.width}}this.applyPlacement(g,f),this.$element.trigger("shown")}},applyPlacement:function(a,b){var c,d,e,f,g=this.tip(),h=g[0].offsetWidth,i=g[0].offsetHeight;g.offset(a).addClass(b).addClass("in"),c=g[0].offsetWidth,d=g[0].offsetHeight,"top"==b&&d!=i&&(a.top=a.top+i-d,f=!0),"bottom"==b||"top"==b?(e=0,a.left<0&&(e=-2*a.left,a.left=0,g.offset(a),c=g[0].offsetWidth,d=g[0].offsetHeight),this.replaceArrow(e-h+c,c,"left")):this.replaceArrow(d-i,d,"top"),f&&g.offset(a)},replaceArrow:function(a,b,c){this.arrow().css(c,a?50*(1-a/b)+"%":"")},setContent:function(){var a=this.tip(),b=this.getTitle();a.find(".tooltip-inner")[this.options.html?"html":"text"](b),a.removeClass("fade in top bottom left right")},hide:function(){function b(){var b=setTimeout(function(){c.off(a.support.transition.end).detach()},500);c.one(a.support.transition.end,function(){clearTimeout(b),c.detach()})}var c=this.tip(),d=a.Event("hide");return this.$element.trigger(d),d.isDefaultPrevented()?void 0:(c.removeClass("in"),a.support.transition&&this.$tip.hasClass("fade")?b():c.detach(),this.$element.trigger("hidden"),this)},fixTitle:function(){var a=this.$element;(a.attr("title")||"string"!=typeof a.attr("data-original-title"))&&a.attr("data-original-title",a.attr("title")||"").attr("title","")},hasContent:function(){return this.getTitle()},getPosition:function(){var b=this.$element[0];return a.extend({},"function"==typeof b.getBoundingClientRect?b.getBoundingClientRect():{width:b.offsetWidth,height:b.offsetHeight},this.$element.offset())},getTitle:function(){var a,b=this.$element,c=this.options;return a=b.attr("data-original-title")||("function"==typeof c.title?c.title.call(b[0]):c.title)},tip:function(){return this.$tip=this.$tip||a(this.options.template)},arrow:function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},validate:function(){this.$element[0].parentNode||(this.hide(),this.$element=null,this.options=null)},enable:function(){this.enabled=!0},disable:function(){this.enabled=!1},toggleEnabled:function(){this.enabled=!this.enabled},toggle:function(b){var c=b?a(b.currentTarget)[this.type](this._options).data(this.type):this;c.tip().hasClass("in")?c.hide():c.show()},destroy:function(){this.hide().$element.off("."+this.type).removeData(this.type)}};var c=a.fn.tooltip;a.fn.tooltip=function(c){return this.each(function(){var d=a(this),e=d.data("tooltip"),f="object"==typeof c&&c;e||d.data("tooltip",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.tooltip.Constructor=b,a.fn.tooltip.defaults={animation:!0,placement:"top",selector:!1,template:'<div class="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,container:!1},a.fn.tooltip.noConflict=function(){return a.fn.tooltip=c,this}}(window.jQuery),!function(a){"use strict";var b=function(a,b){this.init("popover",a,b)};b.prototype=a.extend({},a.fn.tooltip.Constructor.prototype,{constructor:b,setContent:function(){var a=this.tip(),b=this.getTitle(),c=this.getContent();a.find(".popover-title")[this.options.html?"html":"text"](b),a.find(".popover-content")[this.options.html?"html":"text"](c),a.removeClass("fade top bottom left right in")},hasContent:function(){return this.getTitle()||this.getContent()},getContent:function(){var a,b=this.$element,c=this.options;return a=("function"==typeof c.content?c.content.call(b[0]):c.content)||b.attr("data-content")},tip:function(){return this.$tip||(this.$tip=a(this.options.template)),this.$tip},destroy:function(){this.hide().$element.off("."+this.type).removeData(this.type)}});var c=a.fn.popover;a.fn.popover=function(c){return this.each(function(){var d=a(this),e=d.data("popover"),f="object"==typeof c&&c;e||d.data("popover",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.popover.Constructor=b,a.fn.popover.defaults=a.extend({},a.fn.tooltip.defaults,{placement:"right",trigger:"click",content:"",template:'<div class="popover"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'}),a.fn.popover.noConflict=function(){return a.fn.popover=c,this}}(window.jQuery),!function(a){"use strict";function b(b,c){var d,e=a.proxy(this.process,this),f=a(a(b).is("body")?window:b);this.options=a.extend({},a.fn.scrollspy.defaults,c),this.$scrollElement=f.on("scroll.scroll-spy.data-api",e),this.selector=(this.options.target||(d=a(b).attr("href"))&&d.replace(/.*(?=#[^\s]+$)/,"")||"")+" .nav li > a",this.$body=a("body"),this.refresh(),this.process()}b.prototype={constructor:b,refresh:function(){var b,c=this;this.offsets=a([]),this.targets=a([]),b=this.$body.find(this.selector).map(function(){var b=a(this),d=b.data("target")||b.attr("href"),e=/^#\w/.test(d)&&a(d);return e&&e.length&&[[e.position().top+(!a.isWindow(c.$scrollElement.get(0))&&c.$scrollElement.scrollTop()),d]]||null}).sort(function(a,b){return a[0]-b[0]}).each(function(){c.offsets.push(this[0]),c.targets.push(this[1])})},process:function(){var a,b=this.$scrollElement.scrollTop()+this.options.offset,c=this.$scrollElement[0].scrollHeight||this.$body[0].scrollHeight,d=c-this.$scrollElement.height(),e=this.offsets,f=this.targets,g=this.activeTarget;if(b>=d)return g!=(a=f.last()[0])&&this.activate(a);for(a=e.length;a--;)g!=f[a]&&b>=e[a]&&(!e[a+1]||b<=e[a+1])&&this.activate(f[a])},activate:function(b){var c,d;this.activeTarget=b,a(this.selector).parent(".active").removeClass("active"),d=this.selector+'[data-target="'+b+'"],'+this.selector+'[href="'+b+'"]',c=a(d).parent("li").addClass("active"),c.parent(".dropdown-menu").length&&(c=c.closest("li.dropdown").addClass("active")),c.trigger("activate")}};var c=a.fn.scrollspy;a.fn.scrollspy=function(c){return this.each(function(){var d=a(this),e=d.data("scrollspy"),f="object"==typeof c&&c;e||d.data("scrollspy",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.scrollspy.Constructor=b,a.fn.scrollspy.defaults={offset:10},a.fn.scrollspy.noConflict=function(){return a.fn.scrollspy=c,this},a(window).on("load",function(){a('[data-spy="scroll"]').each(function(){var b=a(this);b.scrollspy(b.data())})})}(window.jQuery),!function(a){"use strict";var b=function(b){this.element=a(b)};b.prototype={constructor:b,show:function(){var b,c,d,e=this.element,f=e.closest("ul:not(.dropdown-menu)"),g=e.attr("data-target");g||(g=e.attr("href"),g=g&&g.replace(/.*(?=#[^\s]*$)/,"")),e.parent("li").hasClass("active")||(b=f.find(".active:last a")[0],d=a.Event("show",{relatedTarget:b}),e.trigger(d),d.isDefaultPrevented()||(c=a(g),this.activate(e.parent("li"),f),this.activate(c,c.parent(),function(){e.trigger({type:"shown",relatedTarget:b})})))},activate:function(b,c,d){function e(){f.removeClass("active").find("> .dropdown-menu > .active").removeClass("active"),b.addClass("active"),g?(b[0].offsetWidth,b.addClass("in")):b.removeClass("fade"),b.parent(".dropdown-menu")&&b.closest("li.dropdown").addClass("active"),d&&d()}var f=c.find("> .active"),g=d&&a.support.transition&&f.hasClass("fade");g?f.one(a.support.transition.end,e):e(),f.removeClass("in")}};var c=a.fn.tab;a.fn.tab=function(c){return this.each(function(){var d=a(this),e=d.data("tab");e||d.data("tab",e=new b(this)),"string"==typeof c&&e[c]()})},a.fn.tab.Constructor=b,a.fn.tab.noConflict=function(){return a.fn.tab=c,this},a(document).on("click.tab.data-api",'[data-toggle="tab"], [data-toggle="pill"]',function(b){b.preventDefault(),a(this).tab("show")})}(window.jQuery),!function(a){"use strict";var b=function(b,c){this.$element=a(b),this.options=a.extend({},a.fn.typeahead.defaults,c),this.matcher=this.options.matcher||this.matcher,this.sorter=this.options.sorter||this.sorter,this.highlighter=this.options.highlighter||this.highlighter,this.updater=this.options.updater||this.updater,this.source=this.options.source,this.$menu=a(this.options.menu),this.shown=!1,this.listen()};b.prototype={constructor:b,select:function(){var a=this.$menu.find(".active").attr("data-value");return this.$element.val(this.updater(a)).change(),this.hide()},updater:function(a){return a},show:function(){var b=a.extend({},this.$element.position(),{height:this.$element[0].offsetHeight});return this.$menu.insertAfter(this.$element).css({top:b.top+b.height,left:b.left}).show(),this.shown=!0,this},hide:function(){return this.$menu.hide(),this.shown=!1,this},lookup:function(){var b;return this.query=this.$element.val(),!this.query||this.query.length<this.options.minLength?this.shown?this.hide():this:(b=a.isFunction(this.source)?this.source(this.query,a.proxy(this.process,this)):this.source,b?this.process(b):this)},process:function(b){var c=this;return b=a.grep(b,function(a){return c.matcher(a)}),b=this.sorter(b),b.length?this.render(b.slice(0,this.options.items)).show():this.shown?this.hide():this},matcher:function(a){return~a.toLowerCase().indexOf(this.query.toLowerCase())},sorter:function(a){for(var b,c=[],d=[],e=[];b=a.shift();)b.toLowerCase().indexOf(this.query.toLowerCase())?~b.indexOf(this.query)?d.push(b):e.push(b):c.push(b);return c.concat(d,e)},highlighter:function(a){var b=this.query.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&");return a.replace(new RegExp("("+b+")","ig"),function(a,b){return"<strong>"+b+"</strong>"})},render:function(b){var c=this;return b=a(b).map(function(b,d){return b=a(c.options.item).attr("data-value",d),b.find("a").html(c.highlighter(d)),b[0]}),b.first().addClass("active"),this.$menu.html(b),this},next:function(){var b=this.$menu.find(".active").removeClass("active"),c=b.next();c.length||(c=a(this.$menu.find("li")[0])),c.addClass("active")},prev:function(){var a=this.$menu.find(".active").removeClass("active"),b=a.prev();b.length||(b=this.$menu.find("li").last()),b.addClass("active")},listen:function(){this.$element.on("focus",a.proxy(this.focus,this)).on("blur",a.proxy(this.blur,this)).on("keypress",a.proxy(this.keypress,this)).on("keyup",a.proxy(this.keyup,this)),this.eventSupported("keydown")&&this.$element.on("keydown",a.proxy(this.keydown,this)),this.$menu.on("click",a.proxy(this.click,this)).on("mouseenter","li",a.proxy(this.mouseenter,this)).on("mouseleave","li",a.proxy(this.mouseleave,this))},eventSupported:function(a){var b=a in this.$element;return b||(this.$element.setAttribute(a,"return;"),b="function"==typeof this.$element[a]),b},move:function(a){if(this.shown){switch(a.keyCode){case 9:case 13:case 27:a.preventDefault();break;case 38:a.preventDefault(),this.prev();break;case 40:a.preventDefault(),this.next()}a.stopPropagation()}},keydown:function(b){this.suppressKeyPressRepeat=~a.inArray(b.keyCode,[40,38,9,13,27]),this.move(b)},keypress:function(a){this.suppressKeyPressRepeat||this.move(a)},keyup:function(a){switch(a.keyCode){case 40:case 38:case 16:case 17:case 18:break;case 9:case 13:if(!this.shown)return;this.select();break;case 27:if(!this.shown)return;this.hide();break;default:this.lookup()}a.stopPropagation(),a.preventDefault()},focus:function(){this.focused=!0},blur:function(){this.focused=!1,!this.mousedover&&this.shown&&this.hide()},click:function(a){a.stopPropagation(),a.preventDefault(),this.select(),this.$element.focus()},mouseenter:function(b){this.mousedover=!0,this.$menu.find(".active").removeClass("active"),a(b.currentTarget).addClass("active")},mouseleave:function(){this.mousedover=!1,!this.focused&&this.shown&&this.hide()}};var c=a.fn.typeahead;a.fn.typeahead=function(c){return this.each(function(){var d=a(this),e=d.data("typeahead"),f="object"==typeof c&&c;e||d.data("typeahead",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.typeahead.defaults={source:[],items:8,menu:'<ul class="typeahead dropdown-menu"></ul>',item:'<li><a href="#"></a></li>',minLength:1},a.fn.typeahead.Constructor=b,a.fn.typeahead.noConflict=function(){return a.fn.typeahead=c,this},a(document).on("focus.typeahead.data-api",'[data-provide="typeahead"]',function(){var b=a(this);b.data("typeahead")||b.typeahead(b.data())})}(window.jQuery),!function(a){"use strict";var b=function(b,c){this.options=a.extend({},a.fn.affix.defaults,c),this.$window=a(window).on("scroll.affix.data-api",a.proxy(this.checkPosition,this)).on("click.affix.data-api",a.proxy(function(){setTimeout(a.proxy(this.checkPosition,this),1)},this)),this.$element=a(b),this.checkPosition()};b.prototype.checkPosition=function(){if(this.$element.is(":visible")){var b,c=a(document).height(),d=this.$window.scrollTop(),e=this.$element.offset(),f=this.options.offset,g=f.bottom,h=f.top,i="affix affix-top affix-bottom";"object"!=typeof f&&(g=h=f),"function"==typeof h&&(h=f.top()),"function"==typeof g&&(g=f.bottom()),b=null!=this.unpin&&d+this.unpin<=e.top?!1:null!=g&&e.top+this.$element.height()>=c-g?"bottom":null!=h&&h>=d?"top":!1,this.affixed!==b&&(this.affixed=b,this.unpin="bottom"==b?e.top-d:null,this.$element.removeClass(i).addClass("affix"+(b?"-"+b:"")))}};var c=a.fn.affix;a.fn.affix=function(c){return this.each(function(){var d=a(this),e=d.data("affix"),f="object"==typeof c&&c;e||d.data("affix",e=new b(this,f)),"string"==typeof c&&e[c]()})},a.fn.affix.Constructor=b,a.fn.affix.defaults={offset:0},a.fn.affix.noConflict=function(){return a.fn.affix=c,this},a(window).on("load",function(){a('[data-spy="affix"]').each(function(){var b=a(this),c=b.data();c.offset=c.offset||{},c.offsetBottom&&(c.offset.bottom=c.offsetBottom),c.offsetTop&&(c.offset.top=c.offsetTop),b.affix(c)})})}(window.jQuery),function(a){function b(b,c,d,e){function f(){"WebSocket"in a?(g.socket=g.socketProtocol.length>0?new WebSocket(g.socketUrl,g.socketProtocol):new WebSocket(g.socketUrl),g.socket.onopen=function(){g.connected=!0,g.iSuccessCB(g.retries<5?"(RECONNECTED)":""),g.retries=5},g.socket.onclose=function(){g.connected=!1,g.iErrorCB("socket closed "+(g.retries>0?"retrying in 5 seconds ...":"")),g.retries>0&&setTimeout(function(){g.retries--,f()},5e3)},g.socket.onerror=function(a){g.iErrorCB(a.data)},g.socket.onmessage=function(a){g.receive(a.data)}):console.log("This browser doesn't appear to support websockets!")}var g=this;this.iSuccessCB=b,this.iErrorCB=c,this.methodIdx=0,this.methodCalls=[];for(var h=0;100>h;h++)this.methodCalls[h]=null;this.retries=5,this.connected=!1,this.timeouttime=5e3,this.socketUrl="ws://localhost:23000/vehicle",this.socketProtocol="http-only",void 0!==d&&(this.socketUrl=d),void 0!==e&&(this.socketProtocol=e),this.VehicleMethodCall=function(a,b,c,d){var e=this;this.successCB=c,this.errorCB=d,this.transactionid=a,this.name=b,this.done=!1,this.start=function(){e.timeout=setTimeout(function(){void 0!==e.errorCB&&e.errorCB('"'+e.name+'" method timed out after '+g.timeouttime+"ms"),e.finish()},g.timeouttime)},this.finish=function(){void 0!==e.timeout&&clearTimeout(e.timeout),e.done=!0}},f()}b.prototype.generateTransactionId=function(){var a,b=[];for(a=0;8>a;a++){var c=Math.floor(65536*(Math.random()+1));b[a]=c.toString(16).substring(1)}var d=b[0]+b[1]+"-"+b[2]+"-"+b[3]+"-"+b[4]+"-"+b[5]+b[6]+b[7];return d},b.prototype.send=function(a,b,c){if(!this.connected)return void(void 0!==c&&c('"'+a.name+'" method failed because socket is closed'));var d=this.methodIdx;this.methodIdx=(this.methodIdx+1)%100,this.methodCalls[d]=new this.VehicleMethodCall(a.transactionid,a.name,b,c),this.socket.send(JSON.stringify(a)),this.methodCalls[d].start()},b.prototype.getSupportedEventTypes=function(a,b,c,d){var e={type:"method",name:"getSupportedEventTypes",writeable:b,transactionid:this.generateTransactionId(),data:a};this.send(e,c,d)},b.prototype.get=function(a,b,c){if(!(a.length<=0)){var d={type:"method",name:"get",transactionid:this.generateTransactionId(),data:a};this.send(d,b,c)}},b.prototype.getHistory=function(a,b,c,d,e){if(!(a.length<=0)){var f={property:a,timeBegin:(b.getTime()/1e3).toString(),timeEnd:(c.getTime()/1e3).toString(),sequenceBegin:"-1",sequenceEnd:"-1"},g={type:"method",name:"getRanged",transactionid:this.generateTransactionId(),data:f};this.send(g,d,e)}},b.prototype.set=function(a,b,c,d){if(!(a.length!=b.length||a.length<=0)){for(var e={type:"method",name:"set",transactionid:this.generateTransactionId(),data:[]},f=[],g=0;g<a.length;g++){var h={property:a[g],value:b[g]};f[f.length]=h}e.data=f,this.send(e,c,d)}},b.prototype.subscribe=function(a,b,c){var d={type:"method",name:"subscribe",transactionid:this.generateTransactionId(),data:a};this.send(d,b,c)},b.prototype.unsubscribe=function(a,b,c){var d={type:"method",name:"unsubscribe",transactionid:this.generateTransactionId(),data:a};this.send(d,b,c)},b.prototype.sendEvent=function(a,b){var c=document.createEvent("Event");c.initEvent(a,!0,!0),c.name=a,c.value=b,document.dispatchEvent(c),console.log(c)},b.prototype.receive=function(a){var b,c=this;try{b=JSON.parse(a)}catch(d){return void c.iErrorCB("GARBAGE MESSAGE: "+a)}if(void 0===b||void 0===b.type||void 0===b.name)return void c.iErrorCB("BADLY FORMED MESSAGE: "+a);if("methodReply"===b.type)for(var e=this.methodCalls,f=0;f<e.length;f++){var g=e[f];if(g&&!g.done&&g.transactionid===b.transactionid)return g.finish(),void 0!==b.error&&g.errorCB(b.error),void(void 0!==b.data&&void 0!==g.successCB&&g.successCB(b.data))}else"valuechanged"===b.type&&c.sendEvent(b.name,b.data)},a.Vehicle=b}(window),function(a,b,c){"use strict";a.cowhide=a.cowhide||{},a.extend(a.cowhide,{version:"0.0.1",options:{monitorFrameworkRestrictions:!1,connectToAMB:!0},themeEngineOptions:{path:"css",initial:"default",minified:!1},registeredWidgets:[],drivingMode:!1,nightMode:!1,currentTheme:"default",vehicle:null,GUID:function(){var a=function(){return Math.floor(65536*Math.random()).toString(16)};return a()+a()+"-"+a()+"-"+a()+"-"+a()+"-"+a()+a()+a()},register:function(c){var d=this,e=b.map(d.registeredWidgets,function(a){return a.guid});if(-1==b.indexOf(e,c.guid)&&d.registeredWidgets.push(c),"DIV"!=c.$element[0].tagName||!c.$element.hasClass("page")){var f=c.$element.parent().closest("div.page");0===f.length?a.cowhide.fatal("#30: every widget must be within a div with class='page'.",this.$element):f.ch_page("register",c)}},backdrop:function(){var b=a('<div class="modal-backdrop theme-change-backdrop fade" />');return b.appendTo(document.body),b[0].offsetWidth,b.addClass("in"),b},initThemeEngine:function(b){a.extend(this.themeEngineOptions,b),this.currentTheme=this.themeEngineOptions.initial;var c=a("link#cowhide-theme");0===c.length&&this.fatal("#40: could not find <link> with id 'cowhide-theme'.")},setTheme:function(b,d){if(b!==this.currentTheme||d!=this.nightMode){var e=a("link#cowhide-theme"),f=this.themeEngineOptions.path+"/cowhide-"+b||"default";(d===!0||d===c&&this.nightMode===!0)&&(f+="-night"),this.themeEngineOptions.minified&&(f+=".min"),f+=".css";var g=this.backdrop();setTimeout(function(){e.attr("href",f),g.remove()},200),this.currentTheme=b,d!==c&&(this.nightMode=d)}},setNightMode:function(a){this.nightMode!=a&&this.setTheme(this.currentTheme,!this.nightMode)},toggleNightMode:function(){this.setNightMode(!this.nightMode)},toggleDrivingMode:function(){this.setDrivingMode(!this.drivingMode)},setDrivingMode:function(a){var c=this;c.drivingMode!=a&&(c.drivingMode=a,b.each(this.registeredWidgets,function(a){a.setDrivingMode&&a.setDrivingMode(c.drivingMode)}))},listenToVehicle:function(){var b=this;b.vehicle=new window.Vehicle(function(){a(document).on("DrivingMode",function(a){b.setDrivingMode(1==a.originalEvent.value)}),a(document).on("NightMode",function(a){b.setNightMode(a.originalEvent.value)})},function(){b.fatal("There was a problem connecting to AMB's web socket.")})},verifyFrameworkRestrictions:function(){b.each(this.registeredWidgets,function(a){a.verifyMinFontSize(),a.verifyMaxFontSize(),a.verifyMinWidth()})},fatal:function(a,b){var d="";if(d+="[Cowhide] Fatal error",b!==c){d+=" (offending widget: ";var e=b.attr("id"),f=b.attr("class");e&&(d+="#("+e+")"),f&&(d+=".("+f+")"),d+=")"}throw d+=": "+a,new Error(d)}}),a(function(){a.cowhide.options.connectToAMB&&a.cowhide.listenToVehicle(),a.cowhide.options.monitorFrameworkRestrictions&&setInterval(function(){a.cowhide.verifyFrameworkRestrictions()},1e3)})}(window.jQuery,window._),function(a,b){"use strict";var c=function(b){this.$element=a(b),this.options=a.extend({},a.fn.ch_widget.defaults),this.drivingMode=!1};c.prototype=a.extend({},{register:function(){this.guid=a.cowhide.GUID(),a.cowhide.register(this)},verifyMinWidth:function(){this.$element.width()<this.options.minWidth&&this.options.minWidth>0&&a.cowhide.fatal("#10: this widget has a minimum allowed width of "+this.options.minWidth+"px",this.$element)},verifyMinFontSize:function(){if(this.options.minFontSize>0){var b=this.$element.css("font-size");parseFloat(b)<this.options.minFontSize&&a.cowhide.fatal("#20: this widget has a minimum allowed font-size of "+this.options.minFontSize+"px",this.$element)}},verifyMaxFontSize:function(){if(this.options.maxFontSize>0){var b=this.$element.css("font-size");parseFloat(b)>this.options.maxFontSize&&a.cowhide.fatal("#21: this widget has a maximum allowed font-size of "+this.options.maxFontSize+"px",this.$element)}},setDrivingMode:function(a){if(this.$element.data("ignore-driving-mode")===b&&this.options.disableWhenDriving){var c="disabled"==this.$element.attr("disabled"),d="disabled";if(!a&&!this.drivingMode&&c)return;a?(this.$element.attr(d,d),this.$element.disabled=!0,this.$element.addClass(d),this.onDrivingModeEnter&&this.onDrivingModeEnter(),this.drivingMode=!0):this.drivingMode&&(this.$element.removeAttr(d),this.$element.disabled=!1,this.$element.removeClass(d),this.onDrivingModeExit&&this.onDrivingModeExit(),this.drivingMode=!1)}},onDrivingModeEnter:b,onDrivingModeExit:b}),a.fn.ch_widget=function(){},a.fn.ch_widget.defaults={minWidth:0,minFontSize:0,maxFontSize:0,disableWhenDriving:!1},a.fn.ch_widget.Constructor=c}(window.jQuery),function(a){"use strict";var b=function(b,c){a.fn.ch_widget.Constructor(b,c),this.$element=a(b),this.options=a.extend(c,a.fn.ch_widget.defaults,{minFontSize:12,maxFontSize:24,disableWhenDriving:!0}),this.options.fixedWidth&&this.$element.css({width:this.options.fixedWidth}),this.options.marquee&&this.enableMarquee()};b.prototype=a.extend({},a.fn.ch_widget.Constructor.prototype,{constructor:b,disableMarquee:function(){var a=this.$element.find("marquee");if(a.length>0){var b=a.text();a.remove(),this.$element.text(b)}},enableMarquee:function(){if(this.options.marquee&&("A"==this.$element[0].tagName||"BUTTON"==this.$element[0].tagName)){var b=this.$element.text(),c=a("<marquee/>");c.attr("behavior","alternate"),c.attr("scrollamount",1),c.attr("width",this.$element.width()),c.text(b),this.$element.html(c)}},onDrivingModeEnter:function(){this.disableMarquee()},onDrivingModeExit:function(){this.enableMarquee()}});var c=a.fn.ch_button;a.fn.ch_button=function(c){return this.each(function(){var d=a(this),e=d.data("ch_button"),f="object"==typeof c&&c;d.data("marquee")&&(f=a.extend(f,{marquee:!0})),d.data("fixed-width")&&(f=a.extend(f,{fixedWidth:d.data("fixed-width")})),e||(d.data("ch_button",e=new b(this,f)),e.register()),d.button(c)})},a.fn.ch_button.Constructor=b,a.fn.ch_button.noConflict=function(){return a.fn.ch_button=c,this},a(function(){a(".btn, button, input[type=button]").ch_button()})}(window.jQuery),function(a){"use strict";var b=function(b,c){a.fn.ch_widget.Constructor(b,c),this.$element=a(b),this.options=a.extend({},a.fn.ch_widget.defaults)};b.prototype=a.extend({},a.fn.ch_widget.Constructor.prototype,{constructor:b,removeSelection:function(){var a=this.$element.find("table");a.removeClass("front-left"),a.removeClass("front-right"),a.removeClass("rear-left"),a.removeClass("rear-right")},frontLeft:function(){this.removeSelection(),this.$element.find("table").addClass("front-left")},frontRight:function(){this.removeSelection(),this.$element.find("table").addClass("front-right")},rearLeft:function(){this.removeSelection(),this.$element.find("table").addClass("rear-left")},rearRight:function(){this.removeSelection(),this.$element.find("table").addClass("rear-right")}}),a.fn.ch_seat_selector=function(c){return this.each(function(){var d=a(this),e=d.data("ch_seat_selector"),f="object"==typeof c&&c;if(e)"frontLeft"==c?e.frontLeft():"frontRight"==c?e.frontRight():"rearLeft"==c?e.rearLeft():"rearRight"==c?e.rearRight():"removeSelection"==c&&e.removeSelection();else{d.data("ch_seat_selector",e=new b(this,f)),e.register();var g=["<table>","    <tr>",'        <td class="front-left"></td>','        <td class="front-right"></td>',"    </tr>","    <tr>",'        <td class="rear-left"></td>','        <td class="rear-right"></td>',"    </tr>","</table>"].join("\n");d.html(g)}})},a.fn.ch_seat_selector.Constructor=b,a(function(){a(".ch-seat-selector").ch_seat_selector()})}(window.jQuery),function(a){"use strict";var b=function(b,c){a.fn.ch_widget.Constructor(b,c),this.$element=a(b),this.options=a.extend({},a.fn.ch_widget.defaults)};b.prototype=a.extend({},a.fn.ch_widget.Constructor.prototype,{constructor:b}),a.fn.ch_slider=function(c){return this.each(function(){var d=a(this),e=d.data("ch_slider"),f="object"==typeof c&&c;d.attr("data-height")&&(f=a.extend(f,{height:d.attr("data-height")})),e||(d.data("ch_slider",e=new b(this,f)),e.register()),d.slider(f)})},a.fn.ch_button.Constructor=b,a(function(){a(".ch-slider").ch_slider(),a(".ch-slider-vertical").ch_slider({orientation:"vertical"})})}(window.jQuery),function(a){"use strict";var b=function(b,c){a.fn.ch_widget.Constructor(b,c),this.$element=a(b),this.options=a.extend({},a.fn.ch_widget.defaults,{disableWhenDriving:!0})};b.prototype=a.extend({},a.fn.ch_widget.Constructor.prototype,{constructor:b}),a.fn.ch_text_input=function(c){return this.each(function(){var d=a(this),e=d.data("ch_text_input"),f="object"==typeof c&&c;e||(d.data("ch_text_input",e=new b(this,f)),e.register())})},a.fn.ch_text_input.Constructor=b,a(function(){a("input[type=text]").ch_text_input()})}(window.jQuery),function(a){"use strict";var b=function(b,c){a.fn.ch_widget.Constructor(b,c),this.$element=a(b),this.options=a.extend({},a.fn.ch_widget.defaults,{disableWhenDriving:!0})
 };b.prototype=a.extend({},a.fn.ch_widget.Constructor.prototype,{constructor:b});var c=a.fn.ch_radio_input;a.fn.ch_radio_input=function(c){return this.each(function(){var d=a(this),e=d.data("ch_radio_input"),f="object"==typeof c&&c;e||(d.data("ch_radio_input",e=new b(this,f)),e.register())})},a.fn.ch_radio_input.Constructor=b,a.fn.ch_radio_input.noConflict=function(){return a.fn.ch_radio_input=c,this},a(function(){a("input[type=radio]").ch_radio_input()})}(window.jQuery),function(a){"use strict";var b=function(b,c){a.fn.ch_widget.Constructor(b,c),this.$element=a(b),this.options=a.extend({},a.fn.ch_widget.defaults,{disableWhenDriving:!0})};b.prototype=a.extend({},a.fn.ch_widget.Constructor.prototype,{constructor:b});var c=a.fn.ch_checkbox_input;a.fn.ch_checkbox_input=function(c){return this.each(function(){var d=a(this),e=d.data("ch_checkbox_input"),f="object"==typeof c&&c;e||(d.data("ch_checkbox_input",e=new b(this,f)),e.register())})},a.fn.ch_checkbox_input.Constructor=b,a.fn.ch_checkbox_input.noConflict=function(){return a.fn.ch_checkbox_input=c,this},a(function(){a("input[type=checkbox]").ch_checkbox_input()})}(window.jQuery),function(a){"use strict";var b=function(b,c){a.fn.ch_widget.Constructor(b,c),this.$element=a(b),this.options=a.extend({},a.fn.ch_widget.defaults,{disableWhenDriving:!0})};b.prototype=a.extend({},a.fn.ch_widget.Constructor.prototype,{constructor:b});var c=a.fn.ch_select;a.fn.ch_select=function(c){return this.each(function(){var d=a(this),e=d.data("ch_select"),f="object"==typeof c&&c;e||(d.data("ch_select",e=new b(this,f)),e.register())})},a.fn.ch_select.Constructor=b,a.fn.ch_select.noConflict=function(){return a.fn.ch_select=c,this},a(function(){a("select").ch_select()})}(window.jQuery),function(a){"use strict";var b=function(b,c){a.fn.ch_widget.Constructor(b,c),this.$element=a(b),this.options=a.extend(c,a.fn.ch_widget.defaults,{maxWidgets:0});var d=this.$element.parent().closest("div.page");0!==d.length&&a.cowhide.fatal("#31: pages cannot be nested.")};b.prototype=a.extend({},a.fn.ch_widget.Constructor.prototype,{constructor:b,registeredWidgets:0,registerWidget:function(){this.registeredWidgets++,this.options.maxWidgets>0&&this.registeredWidgets>this.options.maxWidgets&&a.cowhide.fatal("#32: a page cannot have more than "+this.options.maxWidgets+" widgets.")},setMaxWidgets:function(a){this.options.maxWidgets=a}}),a.fn.ch_page=function(c,d){return this.each(function(){var e=a(this),f=e.data("ch_page"),g="object"==typeof c&&c;f||(e.data("ch_page",f=new b(this,g)),f.register()),"register"==c&&f.registerWidget(d),"setMaxWidgets"==c&&f.setMaxWidgets(d)})},a.fn.ch_page.Constructor=b,a(function(){a("div.page").ch_page()})}(window.jQuery),function(a){"use strict";var b=function(b,c){a.fn.ch_widget.Constructor(b,c),this.$element=a(b),this.options=a.extend({},c)};b.prototype=a.extend({},a.fn.ch_widget.Constructor.prototype,{constructor:b,show:function(){var b=this.$element,c=a("<h1/>").text(this.$element.text());if(b.html(c),this.options.show_back_button){var d=a("<button/>").addClass("btn"),e=a("<i/>").addClass("icon-backward");d.html(e),b.append(d),d.click(function(c){c.preventDefault(),b.trigger(a.Event("back"))})}}});var c=a.fn.ch_header;a.fn.ch_header=function(c){return this.each(function(){var d=a(this),e=d.data("ch_header"),f="object"==typeof c&&c;d.data("show-back-button")&&(f=a.extend(f,{show_back_button:!0})),e||(d.data("ch_header",e=new b(this,f)),e.register()),"string"==typeof c&&e[c]()})},a.fn.ch_button.Constructor=b,a.fn.ch_header.noConflict=function(){return a.fn.ch_header=c,this},a(function(){a(".ch-header").ch_header("show")})}(window.jQuery),function(a){"use strict";var b=function(b,c){a.fn.ch_widget.Constructor(b,c),this.$element=a(b),this.options=a.extend(c,a.fn.ch_widget.defaults,{})};b.prototype=a.extend({},a.fn.ch_widget.Constructor.prototype,{constructor:b,enable:function(){var b,c=this,d=c.$element,e=a("<div/>").addClass("ch-simple-scrollable-up"),f=a("<div/>").addClass("ch-simple-scrollable-dn"),g=d.find("ul, ol, div, p");g.addClass("ch-simple-scrollable-content"),g.height(g.parent().height()-160),b=g.height()-40,e.css({top:g.offset().top}),e.html('<a href="#"><i class="icon-chevron-up"></i></a>'),f.html('<a href="#"><i class="icon-chevron-down"></i></a>'),f.click(function(){g.animate({scrollTop:g.scrollTop()+b},200)}),e.click(function(){g.animate({scrollTop:g.scrollTop()-b},200)}),e.insertBefore(g),f.insertAfter(g)}});var c=a.fn.ch_simple_scrollable;a.fn.ch_simple_scrollable=function(c){return this.each(function(){var d=a(this),e=d.data("ch_simple_scrollable"),f="object"==typeof c&&c;e||(d.data("ch_simple_scrollable",e=new b(this,f)),e.register()),"string"==typeof c&&e[c]()})},a.fn.ch_simple_scrollable.Constructor=b,a.fn.ch_simple_scrollable.noConflict=function(){return a.fn.ch_simple_scrollable=c,this},a(function(){a("div.ch-simple-scrollable").ch_simple_scrollable("enable")})}(window.jQuery);
\ No newline at end of file
index 31182ed..dcb4076 100644 (file)
 
             self.vehicle = new window.Vehicle(
                 function() {
-                    $(document).on("VehicleSpeed", function(data) {
-                        self.setDrivingMode(data.originalEvent.value > 0);
+                    $(document).on("DrivingMode", function(e) {
+                        self.setDrivingMode(e.originalEvent.value == 1);
+                    });
+
+                    $(document).on("NightMode", function(e) {
+                        self.setNightMode(e.originalEvent.value);
                     });
                 },
                 function() {