{"size": 397848, "ext": "js", "max_stars_repo_path": "src/California.Creator.Client/bundle/production/tokyoclient.js", "max_stars_repo_name": "Nusushi/Nusushi", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "src/California.Creator.Client/bundle/production/tokyoclient.js", "max_issues_repo_name": "Nusushi/Nusushi", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "src/California.Creator.Client/bundle/production/tokyoclient.js", "max_forks_repo_name": "Nusushi/Nusushi", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 397848.0, "max_line_length": 397848, "alphanum_fraction": 0.7161026322}
var Tokyotracker=function(e){function t(n){if(i[n])return i[n].exports;var o=i[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var i={};return t.m=e,t.c=i,t.d=function(e,i,n){t.o(e,i)||Object.defineProperty(e,i,{configurable:!1,enumerable:!0,get:n})},t.n=function(e){var i=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(i,"a",i),i},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="/assets/",t(t.s=8)}([function(e,t,i){var n,o;!function(t,i){"use strict";"object"==typeof e&&"object"==typeof e.exports?e.exports=t.document?i(t,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return i(e)}:i(t)}("undefined"!=typeof window?window:this,function(i,r){"use strict";function a(e,t,i){t=t||ce;var n,o=t.createElement("script");if(o.text=e,i)for(n in ke)i[n]&&(o[n]=i[n]);t.head.appendChild(o).parentNode.removeChild(o)}function s(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?ve[ge.call(e)]||"object":typeof e}function l(e){var t=!!e&&"length"in e&&e.length,i=s(e);return!Se(e)&&!Ee(e)&&("array"===i||0===t||"number"==typeof t&&t>0&&t-1 in e)}function d(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}function c(e,t,i){return Se(t)?Ce.grep(e,function(e,n){return!!t.call(e,n,e)!==i}):t.nodeType?Ce.grep(e,function(e){return e===t!==i}):"string"!=typeof t?Ce.grep(e,function(e){return he.call(t,e)>-1!==i}):Ce.filter(t,e,i)}function u(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}function p(e){var t={};return Ce.each(e.match(We)||[],function(e,i){t[i]=!0}),t}function m(e){return e}function f(e){throw e}function h(e,t,i,n){var o;try{e&&Se(o=e.promise)?o.call(e).done(t).fail(i):e&&Se(o=e.then)?o.call(e,t,i):t.apply(void 0,[e].slice(n))}catch(e){i.apply(void 0,[e])}}function v(){ce.removeEventListener("DOMContentLoaded",v),i.removeEventListener("load",v),Ce.ready()}function g(e,t){return t.toUpperCase()}function T(e){return e.replace(Fe,"ms-").replace(Ve,g)}function b(){this.expando=Ce.expando+b.uid++}function y(e){return"true"===e||"false"!==e&&("null"===e?null:e===+e+""?+e:Ge.test(e)?JSON.parse(e):e)}function w(e,t,i){var n;if(void 0===i&&1===e.nodeType)if(n="data-"+t.replace(Ze,"-$&").toLowerCase(),"string"==typeof(i=e.getAttribute(n))){try{i=y(i)}catch(e){}qe.set(e,t,i)}else i=void 0;return i}function S(e,t,i,n){var o,r,a=20,s=n?function(){return n.cur()}:function(){return Ce.css(e,t,"")},l=s(),d=i&&i[3]||(Ce.cssNumber[t]?"":"px"),c=(Ce.cssNumber[t]||"px"!==d&&+l)&&Xe.exec(Ce.css(e,t));if(c&&c[3]!==d){for(l/=2,d=d||c[3],c=+l||1;a--;)Ce.style(e,t,c+d),(1-r)*(1-(r=s()/l||.5))<=0&&(a=0),c/=r;c*=2,Ce.style(e,t,c+d),i=i||[]}return i&&(c=+c||+l||0,o=i[1]?c+(i[1]+1)*i[2]:+i[2],n&&(n.unit=d,n.start=c,n.end=o)),o}function E(e){var t,i=e.ownerDocument,n=e.nodeName,o=Ke[n];return o||(t=i.body.appendChild(i.createElement(n)),o=Ce.css(t,"display"),t.parentNode.removeChild(t),"none"===o&&(o="block"),Ke[n]=o,o)}function k(e,t){for(var i,n,o=[],r=0,a=e.length;r<a;r++)n=e[r],n.style&&(i=n.style.display,t?("none"===i&&(o[r]=Be.get(n,"display")||null,o[r]||(n.style.display="")),""===n.style.display&&Je(n)&&(o[r]=E(n))):"none"!==i&&(o[r]="none",Be.set(n,"display",i)));for(r=0;r<a;r++)null!=o[r]&&(e[r].style.display=o[r]);return e}function C(e,t){var i;return i=void 0!==e.getElementsByTagName?e.getElementsByTagName(t||"*"):void 0!==e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&d(e,t)?Ce.merge([e],i):i}function M(e,t){for(var i=0,n=e.length;i<n;i++)Be.set(e[i],"globalEval",!t||Be.get(t[i],"globalEval"))}function I(e,t,i,n,o){for(var r,a,l,d,c,u,p=t.createDocumentFragment(),m=[],f=0,h=e.length;f<h;f++)if((r=e[f])||0===r)if("object"===s(r))Ce.merge(m,r.nodeType?[r]:r);else if(nt.test(r)){for(a=a||p.appendChild(t.createElement("div")),l=(et.exec(r)||["",""])[1].toLowerCase(),d=it[l]||it._default,a.innerHTML=d[1]+Ce.htmlPrefilter(r)+d[2],u=d[0];u--;)a=a.lastChild;Ce.merge(m,a.childNodes),a=p.firstChild,a.textContent=""}else m.push(t.createTextNode(r));for(p.textContent="",f=0;r=m[f++];)if(n&&Ce.inArray(r,n)>-1)o&&o.push(r);else if(c=Ce.contains(r.ownerDocument,r),a=C(p.appendChild(r),"script"),c&&M(a),i)for(u=0;r=a[u++];)tt.test(r.type||"")&&i.push(r);return p}function x(){return!0}function D(){return!1}function N(){try{return ce.activeElement}catch(e){}}function _(e,t,i,n,o,r){var a,s;if("object"==typeof t){"string"!=typeof i&&(n=n||i,i=void 0);for(s in t)_(e,s,i,n,t[s],r);return e}if(null==n&&null==o?(o=i,n=i=void 0):null==o&&("string"==typeof i?(o=n,n=void 0):(o=n,n=i,i=void 0)),!1===o)o=D;else if(!o)return e;return 1===r&&(a=o,o=function(e){return Ce().off(e),a.apply(this,arguments)},o.guid=a.guid||(a.guid=Ce.guid++)),e.each(function(){Ce.event.add(this,t,o,n,i)})}function A(e,t){return d(e,"table")&&d(11!==t.nodeType?t:t.firstChild,"tr")?Ce(e).children("tbody")[0]||e:e}function O(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function U(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function L(e,t){var i,n,o,r,a,s,l,d;if(1===t.nodeType){if(Be.hasData(e)&&(r=Be.access(e),a=Be.set(t,r),d=r.events)){delete a.handle,a.events={};for(o in d)for(i=0,n=d[o].length;i<n;i++)Ce.event.add(t,o,d[o][i])}qe.hasData(e)&&(s=qe.access(e),l=Ce.extend({},s),qe.set(t,l))}}function W(e,t){var i=t.nodeName.toLowerCase();"input"===i&&Qe.test(e.type)?t.checked=e.checked:"input"!==i&&"textarea"!==i||(t.defaultValue=e.defaultValue)}function P(e,t,i,n){t=me.apply([],t);var o,r,s,l,d,c,u=0,p=e.length,m=p-1,f=t[0],h=Se(f);if(h||p>1&&"string"==typeof f&&!we.checkClone&&ct.test(f))return e.each(function(o){var r=e.eq(o);h&&(t[0]=f.call(this,o,r.html())),P(r,t,i,n)});if(p&&(o=I(t,e[0].ownerDocument,!1,e,n),r=o.firstChild,1===o.childNodes.length&&(o=r),r||n)){for(s=Ce.map(C(o,"script"),O),l=s.length;u<p;u++)d=o,u!==m&&(d=Ce.clone(d,!0,!0),l&&Ce.merge(s,C(d,"script"))),i.call(e[u],d,u);if(l)for(c=s[s.length-1].ownerDocument,Ce.map(s,U),u=0;u<l;u++)d=s[u],tt.test(d.type||"")&&!Be.access(d,"globalEval")&&Ce.contains(c,d)&&(d.src&&"module"!==(d.type||"").toLowerCase()?Ce._evalUrl&&Ce._evalUrl(d.src):a(d.textContent.replace(ut,""),c,d))}return e}function H(e,t,i){for(var n,o=t?Ce.filter(t,e):e,r=0;null!=(n=o[r]);r++)i||1!==n.nodeType||Ce.cleanData(C(n)),n.parentNode&&(i&&Ce.contains(n.ownerDocument,n)&&M(C(n,"script")),n.parentNode.removeChild(n));return e}function R(e,t,i){var n,o,r,a,s=e.style;return i=i||mt(e),i&&(a=i.getPropertyValue(t)||i[t],""!==a||Ce.contains(e.ownerDocument,e)||(a=Ce.style(e,t)),!we.pixelBoxStyles()&&pt.test(a)&&ft.test(t)&&(n=s.width,o=s.minWidth,r=s.maxWidth,s.minWidth=s.maxWidth=s.width=a,a=i.width,s.width=n,s.minWidth=o,s.maxWidth=r)),void 0!==a?a+"":a}function F(e,t){return{get:function(){return e()?void delete this.get:(this.get=t).apply(this,arguments)}}}function V(e){if(e in yt)return e;for(var t=e[0].toUpperCase()+e.slice(1),i=bt.length;i--;)if((e=bt[i]+t)in yt)return e}function j(e){var t=Ce.cssProps[e];return t||(t=Ce.cssProps[e]=V(e)||e),t}function B(e,t,i){var n=Xe.exec(t);return n?Math.max(0,n[2]-(i||0))+(n[3]||"px"):t}function q(e,t,i,n,o,r){var a="width"===t?1:0,s=0,l=0;if(i===(n?"border":"content"))return 0;for(;a<4;a+=2)"margin"===i&&(l+=Ce.css(e,i+Ye[a],!0,o)),n?("content"===i&&(l-=Ce.css(e,"padding"+Ye[a],!0,o)),"margin"!==i&&(l-=Ce.css(e,"border"+Ye[a]+"Width",!0,o))):(l+=Ce.css(e,"padding"+Ye[a],!0,o),"padding"!==i?l+=Ce.css(e,"border"+Ye[a]+"Width",!0,o):s+=Ce.css(e,"border"+Ye[a]+"Width",!0,o));return!n&&r>=0&&(l+=Math.max(0,Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-r-l-s-.5))),l}function G(e,t,i){var n=mt(e),o=R(e,t,n),r="border-box"===Ce.css(e,"boxSizing",!1,n),a=r;if(pt.test(o)){if(!i)return o;o="auto"}return a=a&&(we.boxSizingReliable()||o===e.style[t]),("auto"===o||!parseFloat(o)&&"inline"===Ce.css(e,"display",!1,n))&&(o=e["offset"+t[0].toUpperCase()+t.slice(1)],a=!0),(o=parseFloat(o)||0)+q(e,t,i||(r?"border":"content"),a,n,o)+"px"}function Z(e,t,i,n,o){return new Z.prototype.init(e,t,i,n,o)}function z(){St&&(!1===ce.hidden&&i.requestAnimationFrame?i.requestAnimationFrame(z):i.setTimeout(z,Ce.fx.interval),Ce.fx.tick())}function X(){return i.setTimeout(function(){wt=void 0}),wt=Date.now()}function Y(e,t){var i,n=0,o={height:e};for(t=t?1:0;n<4;n+=2-t)i=Ye[n],o["margin"+i]=o["padding"+i]=e;return t&&(o.opacity=o.width=e),o}function J(e,t,i){for(var n,o=(Q.tweeners[t]||[]).concat(Q.tweeners["*"]),r=0,a=o.length;r<a;r++)if(n=o[r].call(i,t,e))return n}function $(e,t,i){var n,o,r,a,s,l,d,c,u="width"in t||"height"in t,p=this,m={},f=e.style,h=e.nodeType&&Je(e),v=Be.get(e,"fxshow");i.queue||(a=Ce._queueHooks(e,"fx"),null==a.unqueued&&(a.unqueued=0,s=a.empty.fire,a.empty.fire=function(){a.unqueued||s()}),a.unqueued++,p.always(function(){p.always(function(){a.unqueued--,Ce.queue(e,"fx").length||a.empty.fire()})}));for(n in t)if(o=t[n],Et.test(o)){if(delete t[n],r=r||"toggle"===o,o===(h?"hide":"show")){if("show"!==o||!v||void 0===v[n])continue;h=!0}m[n]=v&&v[n]||Ce.style(e,n)}if((l=!Ce.isEmptyObject(t))||!Ce.isEmptyObject(m)){u&&1===e.nodeType&&(i.overflow=[f.overflow,f.overflowX,f.overflowY],d=v&&v.display,null==d&&(d=Be.get(e,"display")),c=Ce.css(e,"display"),"none"===c&&(d?c=d:(k([e],!0),d=e.style.display||d,c=Ce.css(e,"display"),k([e]))),("inline"===c||"inline-block"===c&&null!=d)&&"none"===Ce.css(e,"float")&&(l||(p.done(function(){f.display=d}),null==d&&(c=f.display,d="none"===c?"":c)),f.display="inline-block")),i.overflow&&(f.overflow="hidden",p.always(function(){f.overflow=i.overflow[0],f.overflowX=i.overflow[1],f.overflowY=i.overflow[2]})),l=!1;for(n in m)l||(v?"hidden"in v&&(h=v.hidden):v=Be.access(e,"fxshow",{display:d}),r&&(v.hidden=!h),h&&k([e],!0),p.done(function(){h||k([e]),Be.remove(e,"fxshow");for(n in m)Ce.style(e,n,m[n])})),l=J(h?v[n]:0,n,p),n in v||(v[n]=l.start,h&&(l.end=l.start,l.start=0))}}function K(e,t){var i,n,o,r,a;for(i in e)if(n=T(i),o=t[n],r=e[i],Array.isArray(r)&&(o=r[1],r=e[i]=r[0]),i!==n&&(e[n]=r,delete e[i]),(a=Ce.cssHooks[n])&&"expand"in a){r=a.expand(r),delete e[n];for(i in r)i in e||(e[i]=r[i],t[i]=o)}else t[n]=o}function Q(e,t,i){var n,o,r=0,a=Q.prefilters.length,s=Ce.Deferred().always(function(){delete l.elem}),l=function(){if(o)return!1;for(var t=wt||X(),i=Math.max(0,d.startTime+d.duration-t),n=i/d.duration||0,r=1-n,a=0,l=d.tweens.length;a<l;a++)d.tweens[a].run(r);return s.notifyWith(e,[d,r,i]),r<1&&l?i:(l||s.notifyWith(e,[d,1,0]),s.resolveWith(e,[d]),!1)},d=s.promise({elem:e,props:Ce.extend({},t),opts:Ce.extend(!0,{specialEasing:{},easing:Ce.easing._default},i),originalProperties:t,originalOptions:i,startTime:wt||X(),duration:i.duration,tweens:[],createTween:function(t,i){var n=Ce.Tween(e,d.opts,t,i,d.opts.specialEasing[t]||d.opts.easing);return d.tweens.push(n),n},stop:function(t){var i=0,n=t?d.tweens.length:0;if(o)return this;for(o=!0;i<n;i++)d.tweens[i].run(1);return t?(s.notifyWith(e,[d,1,0]),s.resolveWith(e,[d,t])):s.rejectWith(e,[d,t]),this}}),c=d.props;for(K(c,d.opts.specialEasing);r<a;r++)if(n=Q.prefilters[r].call(d,e,c,d.opts))return Se(n.stop)&&(Ce._queueHooks(d.elem,d.opts.queue).stop=n.stop.bind(n)),n;return Ce.map(c,J,d),Se(d.opts.start)&&d.opts.start.call(e,d),d.progress(d.opts.progress).done(d.opts.done,d.opts.complete).fail(d.opts.fail).always(d.opts.always),Ce.fx.timer(Ce.extend(l,{elem:e,anim:d,queue:d.opts.queue})),d}function ee(e){return(e.match(We)||[]).join(" ")}function te(e){return e.getAttribute&&e.getAttribute("class")||""}function ie(e){return Array.isArray(e)?e:"string"==typeof e?e.match(We)||[]:[]}function ne(e,t,i,n){var o;if(Array.isArray(t))Ce.each(t,function(t,o){i||Lt.test(e)?n(e,o):ne(e+"["+("object"==typeof o&&null!=o?t:"")+"]",o,i,n)});else if(i||"object"!==s(t))n(e,t);else for(o in t)ne(e+"["+o+"]",t[o],i,n)}function oe(e){return function(t,i){"string"!=typeof t&&(i=t,t="*");var n,o=0,r=t.toLowerCase().match(We)||[];if(Se(i))for(;n=r[o++];)"+"===n[0]?(n=n.slice(1)||"*",(e[n]=e[n]||[]).unshift(i)):(e[n]=e[n]||[]).push(i)}}function re(e,t,i,n){function o(s){var l;return r[s]=!0,Ce.each(e[s]||[],function(e,s){var d=s(t,i,n);return"string"!=typeof d||a||r[d]?a?!(l=d):void 0:(t.dataTypes.unshift(d),o(d),!1)}),l}var r={},a=e===zt;return o(t.dataTypes[0])||!r["*"]&&o("*")}function ae(e,t){var i,n,o=Ce.ajaxSettings.flatOptions||{};for(i in t)void 0!==t[i]&&((o[i]?e:n||(n={}))[i]=t[i]);return n&&Ce.extend(!0,e,n),e}function se(e,t,i){for(var n,o,r,a,s=e.contents,l=e.dataTypes;"*"===l[0];)l.shift(),void 0===n&&(n=e.mimeType||t.getResponseHeader("Content-Type"));if(n)for(o in s)if(s[o]&&s[o].test(n)){l.unshift(o);break}if(l[0]in i)r=l[0];else{for(o in i){if(!l[0]||e.converters[o+" "+l[0]]){r=o;break}a||(a=o)}r=r||a}if(r)return r!==l[0]&&l.unshift(r),i[r]}function le(e,t,i,n){var o,r,a,s,l,d={},c=e.dataTypes.slice();if(c[1])for(a in e.converters)d[a.toLowerCase()]=e.converters[a];for(r=c.shift();r;)if(e.responseFields[r]&&(i[e.responseFields[r]]=t),!l&&n&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),l=r,r=c.shift())if("*"===r)r=l;else if("*"!==l&&l!==r){if(!(a=d[l+" "+r]||d["* "+r]))for(o in d)if(s=o.split(" "),s[1]===r&&(a=d[l+" "+s[0]]||d["* "+s[0]])){!0===a?a=d[o]:!0!==d[o]&&(r=s[0],c.unshift(s[1]));break}if(!0!==a)if(a&&e.throws)t=a(t);else try{t=a(t)}catch(e){return{state:"parsererror",error:a?e:"No conversion from "+l+" to "+r}}}return{state:"success",data:t}}var de=[],ce=i.document,ue=Object.getPrototypeOf,pe=de.slice,me=de.concat,fe=de.push,he=de.indexOf,ve={},ge=ve.toString,Te=ve.hasOwnProperty,be=Te.toString,ye=be.call(Object),we={},Se=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},Ee=function(e){return null!=e&&e===e.window},ke={type:!0,src:!0,noModule:!0},Ce=function(e,t){return new Ce.fn.init(e,t)},Me=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;Ce.fn=Ce.prototype={jquery:"3.3.1",constructor:Ce,length:0,toArray:function(){return pe.call(this)},get:function(e){return null==e?pe.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){var t=Ce.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return Ce.each(this,e)},map:function(e){return this.pushStack(Ce.map(this,function(t,i){return e.call(t,i,t)}))},slice:function(){return this.pushStack(pe.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,i=+e+(e<0?t:0);return this.pushStack(i>=0&&i<t?[this[i]]:[])},end:function(){return this.prevObject||this.constructor()},push:fe,sort:de.sort,splice:de.splice},Ce.extend=Ce.fn.extend=function(){var e,t,i,n,o,r,a=arguments[0]||{},s=1,l=arguments.length,d=!1;for("boolean"==typeof a&&(d=a,a=arguments[s]||{},s++),"object"==typeof a||Se(a)||(a={}),s===l&&(a=this,s--);s<l;s++)if(null!=(e=arguments[s]))for(t in e)i=a[t],n=e[t],a!==n&&(d&&n&&(Ce.isPlainObject(n)||(o=Array.isArray(n)))?(o?(o=!1,r=i&&Array.isArray(i)?i:[]):r=i&&Ce.isPlainObject(i)?i:{},a[t]=Ce.extend(d,r,n)):void 0!==n&&(a[t]=n));return a},Ce.extend({expando:"jQuery"+("3.3.1"+Math.random()).replace(/\D/g,""),isReady:!0,error:function(e){throw new Error(e)},noop:function(){},isPlainObject:function(e){var t,i;return!(!e||"[object Object]"!==ge.call(e))&&(!(t=ue(e))||"function"==typeof(i=Te.call(t,"constructor")&&t.constructor)&&be.call(i)===ye)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},globalEval:function(e){a(e)},each:function(e,t){var i,n=0;if(l(e))for(i=e.length;n<i&&!1!==t.call(e[n],n,e[n]);n++);else for(n in e)if(!1===t.call(e[n],n,e[n]))break;return e},trim:function(e){return null==e?"":(e+"").replace(Me,"")},makeArray:function(e,t){var i=t||[];return null!=e&&(l(Object(e))?Ce.merge(i,"string"==typeof e?[e]:e):fe.call(i,e)),i},inArray:function(e,t,i){return null==t?-1:he.call(t,e,i)},merge:function(e,t){for(var i=+t.length,n=0,o=e.length;n<i;n++)e[o++]=t[n];return e.length=o,e},grep:function(e,t,i){for(var n=[],o=0,r=e.length,a=!i;o<r;o++)!t(e[o],o)!==a&&n.push(e[o]);return n},map:function(e,t,i){var n,o,r=0,a=[];if(l(e))for(n=e.length;r<n;r++)null!=(o=t(e[r],r,i))&&a.push(o);else for(r in e)null!=(o=t(e[r],r,i))&&a.push(o);return me.apply([],a)},guid:1,support:we}),"function"==typeof Symbol&&(Ce.fn[Symbol.iterator]=de[Symbol.iterator]),Ce.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(e,t){ve["[object "+t+"]"]=t.toLowerCase()});var Ie=function(e){function t(e,t,i,n){var o,r,a,s,l,c,p,m=t&&t.ownerDocument,f=t?t.nodeType:9;if(i=i||[],"string"!=typeof e||!e||1!==f&&9!==f&&11!==f)return i;if(!n&&((t?t.ownerDocument||t:R)!==_&&N(t),t=t||_,O)){if(11!==f&&(l=he.exec(e)))if(o=l[1]){if(9===f){if(!(a=t.getElementById(o)))return i;if(a.id===o)return i.push(a),i}else if(m&&(a=m.getElementById(o))&&P(t,a)&&a.id===o)return i.push(a),i}else{if(l[2])return J.apply(i,t.getElementsByTagName(e)),i;if((o=l[3])&&y.getElementsByClassName&&t.getElementsByClassName)return J.apply(i,t.getElementsByClassName(o)),i}if(y.qsa&&!q[e+" "]&&(!U||!U.test(e))){if(1!==f)m=t,p=e;else if("object"!==t.nodeName.toLowerCase()){for((s=t.getAttribute("id"))?s=s.replace(be,ye):t.setAttribute("id",s=H),c=k(e),r=c.length;r--;)c[r]="#"+s+" "+u(c[r]);p=c.join(","),m=ve.test(e)&&d(t.parentNode)||t}if(p)try{return J.apply(i,m.querySelectorAll(p)),i}catch(e){}finally{s===H&&t.removeAttribute("id")}}}return M(e.replace(re,"$1"),t,i,n)}function i(){function e(i,n){return t.push(i+" ")>w.cacheLength&&delete e[t.shift()],e[i+" "]=n}var t=[];return e}function n(e){return e[H]=!0,e}function o(e){var t=_.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function r(e,t){for(var i=e.split("|"),n=i.length;n--;)w.attrHandle[i[n]]=t}function a(e,t){var i=t&&e,n=i&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(n)return n;if(i)for(;i=i.nextSibling;)if(i===t)return-1;return e?1:-1}function s(e){return function(t){return"form"in t?t.parentNode&&!1===t.disabled?"label"in t?"label"in t.parentNode?t.parentNode.disabled===e:t.disabled===e:t.isDisabled===e||t.isDisabled!==!e&&Se(t)===e:t.disabled===e:"label"in t&&t.disabled===e}}function l(e){return n(function(t){return t=+t,n(function(i,n){for(var o,r=e([],i.length,t),a=r.length;a--;)i[o=r[a]]&&(i[o]=!(n[o]=i[o]))})})}function d(e){return e&&void 0!==e.getElementsByTagName&&e}function c(){}function u(e){for(var t=0,i=e.length,n="";t<i;t++)n+=e[t].value;return n}function p(e,t,i){var n=t.dir,o=t.next,r=o||n,a=i&&"parentNode"===r,s=V++;return t.first?function(t,i,o){for(;t=t[n];)if(1===t.nodeType||a)return e(t,i,o);return!1}:function(t,i,l){var d,c,u,p=[F,s];if(l){for(;t=t[n];)if((1===t.nodeType||a)&&e(t,i,l))return!0}else for(;t=t[n];)if(1===t.nodeType||a)if(u=t[H]||(t[H]={}),c=u[t.uniqueID]||(u[t.uniqueID]={}),o&&o===t.nodeName.toLowerCase())t=t[n]||t;else{if((d=c[r])&&d[0]===F&&d[1]===s)return p[2]=d[2];if(c[r]=p,p[2]=e(t,i,l))return!0}return!1}}function m(e){return e.length>1?function(t,i,n){for(var o=e.length;o--;)if(!e[o](t,i,n))return!1;return!0}:e[0]}function f(e,i,n){for(var o=0,r=i.length;o<r;o++)t(e,i[o],n);return n}function h(e,t,i,n,o){for(var r,a=[],s=0,l=e.length,d=null!=t;s<l;s++)(r=e[s])&&(i&&!i(r,n,o)||(a.push(r),d&&t.push(s)));return a}function v(e,t,i,o,r,a){return o&&!o[H]&&(o=v(o)),r&&!r[H]&&(r=v(r,a)),n(function(n,a,s,l){var d,c,u,p=[],m=[],v=a.length,g=n||f(t||"*",s.nodeType?[s]:s,[]),T=!e||!n&&t?g:h(g,p,e,s,l),b=i?r||(n?e:v||o)?[]:a:T;if(i&&i(T,b,s,l),o)for(d=h(b,m),o(d,[],s,l),c=d.length;c--;)(u=d[c])&&(b[m[c]]=!(T[m[c]]=u));if(n){if(r||e){if(r){for(d=[],c=b.length;c--;)(u=b[c])&&d.push(T[c]=u);r(null,b=[],d,l)}for(c=b.length;c--;)(u=b[c])&&(d=r?K(n,u):p[c])>-1&&(n[d]=!(a[d]=u))}}else b=h(b===a?b.splice(v,b.length):b),r?r(null,a,b,l):J.apply(a,b)})}function g(e){for(var t,i,n,o=e.length,r=w.relative[e[0].type],a=r||w.relative[" "],s=r?1:0,l=p(function(e){return e===t},a,!0),d=p(function(e){return K(t,e)>-1},a,!0),c=[function(e,i,n){var o=!r&&(n||i!==I)||((t=i).nodeType?l(e,i,n):d(e,i,n));return t=null,o}];s<o;s++)if(i=w.relative[e[s].type])c=[p(m(c),i)];else{if(i=w.filter[e[s].type].apply(null,e[s].matches),i[H]){for(n=++s;n<o&&!w.relative[e[n].type];n++);return v(s>1&&m(c),s>1&&u(e.slice(0,s-1).concat({value:" "===e[s-2].type?"*":""})).replace(re,"$1"),i,s<n&&g(e.slice(s,n)),n<o&&g(e=e.slice(n)),n<o&&u(e))}c.push(i)}return m(c)}function T(e,i){var o=i.length>0,r=e.length>0,a=function(n,a,s,l,d){var c,u,p,m=0,f="0",v=n&&[],g=[],T=I,b=n||r&&w.find.TAG("*",d),y=F+=null==T?1:Math.random()||.1,S=b.length;for(d&&(I=a===_||a||d);f!==S&&null!=(c=b[f]);f++){if(r&&c){for(u=0,a||c.ownerDocument===_||(N(c),s=!O);p=e[u++];)if(p(c,a||_,s)){l.push(c);break}d&&(F=y)}o&&((c=!p&&c)&&m--,n&&v.push(c))}if(m+=f,o&&f!==m){for(u=0;p=i[u++];)p(v,g,a,s);if(n){if(m>0)for(;f--;)v[f]||g[f]||(g[f]=X.call(l));g=h(g)}J.apply(l,g),d&&!n&&g.length>0&&m+i.length>1&&t.uniqueSort(l)}return d&&(F=y,I=T),v};return o?n(a):a}var b,y,w,S,E,k,C,M,I,x,D,N,_,A,O,U,L,W,P,H="sizzle"+1*new Date,R=e.document,F=0,V=0,j=i(),B=i(),q=i(),G=function(e,t){return e===t&&(D=!0),0},Z={}.hasOwnProperty,z=[],X=z.pop,Y=z.push,J=z.push,$=z.slice,K=function(e,t){for(var i=0,n=e.length;i<n;i++)if(e[i]===t)return i;return-1},Q="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",ee="[\\x20\\t\\r\\n\\f]",te="(?:\\\\.|[\\w-]|[^\0-\\xa0])+",ie="\\["+ee+"*("+te+")(?:"+ee+"*([*^$|!~]?=)"+ee+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+te+"))|)"+ee+"*\\]",ne=":("+te+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+ie+")*)|.*)\\)|)",oe=new RegExp(ee+"+","g"),re=new RegExp("^"+ee+"+|((?:^|[^\\\\])(?:\\\\.)*)"+ee+"+$","g"),ae=new RegExp("^"+ee+"*,"+ee+"*"),se=new RegExp("^"+ee+"*([>+~]|"+ee+")"+ee+"*"),le=new RegExp("="+ee+"*([^\\]'\"]*?)"+ee+"*\\]","g"),de=new RegExp(ne),ce=new RegExp("^"+te+"$"),ue={ID:new RegExp("^#("+te+")"),CLASS:new RegExp("^\\.("+te+")"),TAG:new RegExp("^("+te+"|[*])"),ATTR:new RegExp("^"+ie),PSEUDO:new RegExp("^"+ne),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+ee+"*(even|odd|(([+-]|)(\\d*)n|)"+ee+"*(?:([+-]|)"+ee+"*(\\d+)|))"+ee+"*\\)|)","i"),bool:new RegExp("^(?:"+Q+")$","i"),needsContext:new RegExp("^"+ee+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+ee+"*((?:-\\d)?\\d*)"+ee+"*\\)|)(?=[^-]|$)","i")},pe=/^(?:input|select|textarea|button)$/i,me=/^h\d$/i,fe=/^[^{]+\{\s*\[native \w/,he=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ve=/[+~]/,ge=new RegExp("\\\\([\\da-f]{1,6}"+ee+"?|("+ee+")|.)","ig"),Te=function(e,t,i){var n="0x"+t-65536;return n!==n||i?t:n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320)},be=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ye=function(e,t){return t?"\0"===e?"�":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},we=function(){N()},Se=p(function(e){return!0===e.disabled&&("form"in e||"label"in e)},{dir:"parentNode",next:"legend"});try{J.apply(z=$.call(R.childNodes),R.childNodes),z[R.childNodes.length].nodeType}catch(e){J={apply:z.length?function(e,t){Y.apply(e,$.call(t))}:function(e,t){for(var i=e.length,n=0;e[i++]=t[n++];);e.length=i-1}}}y=t.support={},E=t.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return!!t&&"HTML"!==t.nodeName},N=t.setDocument=function(e){var t,i,n=e?e.ownerDocument||e:R;return n!==_&&9===n.nodeType&&n.documentElement?(_=n,A=_.documentElement,O=!E(_),R!==_&&(i=_.defaultView)&&i.top!==i&&(i.addEventListener?i.addEventListener("unload",we,!1):i.attachEvent&&i.attachEvent("onunload",we)),y.attributes=o(function(e){return e.className="i",!e.getAttribute("className")}),y.getElementsByTagName=o(function(e){return e.appendChild(_.createComment("")),!e.getElementsByTagName("*").length}),y.getElementsByClassName=fe.test(_.getElementsByClassName),y.getById=o(function(e){return A.appendChild(e).id=H,!_.getElementsByName||!_.getElementsByName(H).length}),y.getById?(w.filter.ID=function(e){var t=e.replace(ge,Te);return function(e){return e.getAttribute("id")===t}},w.find.ID=function(e,t){if(void 0!==t.getElementById&&O){var i=t.getElementById(e);return i?[i]:[]}}):(w.filter.ID=function(e){var t=e.replace(ge,Te);return function(e){var i=void 0!==e.getAttributeNode&&e.getAttributeNode("id");return i&&i.value===t}},w.find.ID=function(e,t){if(void 0!==t.getElementById&&O){var i,n,o,r=t.getElementById(e);if(r){if((i=r.getAttributeNode("id"))&&i.value===e)return[r];for(o=t.getElementsByName(e),n=0;r=o[n++];)if((i=r.getAttributeNode("id"))&&i.value===e)return[r]}return[]}}),w.find.TAG=y.getElementsByTagName?function(e,t){return void 0!==t.getElementsByTagName?t.getElementsByTagName(e):y.qsa?t.querySelectorAll(e):void 0}:function(e,t){var i,n=[],o=0,r=t.getElementsByTagName(e);if("*"===e){for(;i=r[o++];)1===i.nodeType&&n.push(i);return n}return r},w.find.CLASS=y.getElementsByClassName&&function(e,t){if(void 0!==t.getElementsByClassName&&O)return t.getElementsByClassName(e)},L=[],U=[],(y.qsa=fe.test(_.querySelectorAll))&&(o(function(e){A.appendChild(e).innerHTML="<a id='"+H+"'></a><select id='"+H+"-\r\\' msallowcapture=''><option selected=''></option></select>",e.querySelectorAll("[msallowcapture^='']").length&&U.push("[*^$]="+ee+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||U.push("\\["+ee+"*(?:value|"+Q+")"),e.querySelectorAll("[id~="+H+"-]").length||U.push("~="),e.querySelectorAll(":checked").length||U.push(":checked"),e.querySelectorAll("a#"+H+"+*").length||U.push(".#.+[+~]")}),o(function(e){e.innerHTML="<a href='' disabled='disabled'></a><select disabled='disabled'><option/></select>";var t=_.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&U.push("name"+ee+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&U.push(":enabled",":disabled"),A.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&U.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),U.push(",.*:")})),(y.matchesSelector=fe.test(W=A.matches||A.webkitMatchesSelector||A.mozMatchesSelector||A.oMatchesSelector||A.msMatchesSelector))&&o(function(e){y.disconnectedMatch=W.call(e,"*"),W.call(e,"[s!='']:x"),L.push("!=",ne)}),U=U.length&&new RegExp(U.join("|")),L=L.length&&new RegExp(L.join("|")),t=fe.test(A.compareDocumentPosition),P=t||fe.test(A.contains)?function(e,t){var i=9===e.nodeType?e.documentElement:e,n=t&&t.parentNode;return e===n||!(!n||1!==n.nodeType||!(i.contains?i.contains(n):e.compareDocumentPosition&&16&e.compareDocumentPosition(n)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},G=t?function(e,t){if(e===t)return D=!0,0;var i=!e.compareDocumentPosition-!t.compareDocumentPosition;return i||(i=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1,1&i||!y.sortDetached&&t.compareDocumentPosition(e)===i?e===_||e.ownerDocument===R&&P(R,e)?-1:t===_||t.ownerDocument===R&&P(R,t)?1:x?K(x,e)-K(x,t):0:4&i?-1:1)}:function(e,t){if(e===t)return D=!0,0;var i,n=0,o=e.parentNode,r=t.parentNode,s=[e],l=[t];if(!o||!r)return e===_?-1:t===_?1:o?-1:r?1:x?K(x,e)-K(x,t):0;if(o===r)return a(e,t);for(i=e;i=i.parentNode;)s.unshift(i);for(i=t;i=i.parentNode;)l.unshift(i);for(;s[n]===l[n];)n++;return n?a(s[n],l[n]):s[n]===R?-1:l[n]===R?1:0},_):_},t.matches=function(e,i){return t(e,null,null,i)},t.matchesSelector=function(e,i){if((e.ownerDocument||e)!==_&&N(e),i=i.replace(le,"='$1']"),y.matchesSelector&&O&&!q[i+" "]&&(!L||!L.test(i))&&(!U||!U.test(i)))try{var n=W.call(e,i);if(n||y.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){}return t(i,_,null,[e]).length>0},t.contains=function(e,t){return(e.ownerDocument||e)!==_&&N(e),P(e,t)},t.attr=function(e,t){(e.ownerDocument||e)!==_&&N(e);var i=w.attrHandle[t.toLowerCase()],n=i&&Z.call(w.attrHandle,t.toLowerCase())?i(e,t,!O):void 0;return void 0!==n?n:y.attributes||!O?e.getAttribute(t):(n=e.getAttributeNode(t))&&n.specified?n.value:null},t.escape=function(e){return(e+"").replace(be,ye)},t.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},t.uniqueSort=function(e){var t,i=[],n=0,o=0;if(D=!y.detectDuplicates,x=!y.sortStable&&e.slice(0),e.sort(G),D){for(;t=e[o++];)t===e[o]&&(n=i.push(o));for(;n--;)e.splice(i[n],1)}return x=null,e},S=t.getText=function(e){var t,i="",n=0,o=e.nodeType;if(o){if(1===o||9===o||11===o){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)i+=S(e)}else if(3===o||4===o)return e.nodeValue}else for(;t=e[n++];)i+=S(t);return i},w=t.selectors={cacheLength:50,createPseudo:n,match:ue,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(ge,Te),e[3]=(e[3]||e[4]||e[5]||"").replace(ge,Te),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||t.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&t.error(e[0]),e},PSEUDO:function(e){var t,i=!e[6]&&e[2];return ue.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":i&&de.test(i)&&(t=k(i,!0))&&(t=i.indexOf(")",i.length-t)-i.length)&&(e[0]=e[0].slice(0,t),e[2]=i.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(ge,Te).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=j[e+" "];return t||(t=new RegExp("(^|"+ee+")"+e+"("+ee+"|$)"))&&j(e,function(e){return t.test("string"==typeof e.className&&e.className||void 0!==e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(e,i,n){return function(o){var r=t.attr(o,e);return null==r?"!="===i:!i||(r+="","="===i?r===n:"!="===i?r!==n:"^="===i?n&&0===r.indexOf(n):"*="===i?n&&r.indexOf(n)>-1:"$="===i?n&&r.slice(-n.length)===n:"~="===i?(" "+r.replace(oe," ")+" ").indexOf(n)>-1:"|="===i&&(r===n||r.slice(0,n.length+1)===n+"-"))}},CHILD:function(e,t,i,n,o){var r="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===n&&0===o?function(e){return!!e.parentNode}:function(t,i,l){var d,c,u,p,m,f,h=r!==a?"nextSibling":"previousSibling",v=t.parentNode,g=s&&t.nodeName.toLowerCase(),T=!l&&!s,b=!1;if(v){if(r){for(;h;){for(p=t;p=p[h];)if(s?p.nodeName.toLowerCase()===g:1===p.nodeType)return!1;f=h="only"===e&&!f&&"nextSibling"}return!0}if(f=[a?v.firstChild:v.lastChild],a&&T){for(p=v,u=p[H]||(p[H]={}),c=u[p.uniqueID]||(u[p.uniqueID]={}),d=c[e]||[],m=d[0]===F&&d[1],b=m&&d[2],p=m&&v.childNodes[m];p=++m&&p&&p[h]||(b=m=0)||f.pop();)if(1===p.nodeType&&++b&&p===t){c[e]=[F,m,b];break}}else if(T&&(p=t,u=p[H]||(p[H]={}),c=u[p.uniqueID]||(u[p.uniqueID]={}),d=c[e]||[],m=d[0]===F&&d[1],b=m),!1===b)for(;(p=++m&&p&&p[h]||(b=m=0)||f.pop())&&((s?p.nodeName.toLowerCase()!==g:1!==p.nodeType)||!++b||(T&&(u=p[H]||(p[H]={}),c=u[p.uniqueID]||(u[p.uniqueID]={}),c[e]=[F,b]),p!==t)););return(b-=o)===n||b%n==0&&b/n>=0}}},PSEUDO:function(e,i){var o,r=w.pseudos[e]||w.setFilters[e.toLowerCase()]||t.error("unsupported pseudo: "+e);return r[H]?r(i):r.length>1?(o=[e,e,"",i],w.setFilters.hasOwnProperty(e.toLowerCase())?n(function(e,t){for(var n,o=r(e,i),a=o.length;a--;)n=K(e,o[a]),e[n]=!(t[n]=o[a])}):function(e){return r(e,0,o)}):r}},pseudos:{not:n(function(e){var t=[],i=[],o=C(e.replace(re,"$1"));return o[H]?n(function(e,t,i,n){for(var r,a=o(e,null,n,[]),s=e.length;s--;)(r=a[s])&&(e[s]=!(t[s]=r))}):function(e,n,r){return t[0]=e,o(t,null,r,i),t[0]=null,!i.pop()}}),has:n(function(e){return function(i){return t(e,i).length>0}}),contains:n(function(e){return e=e.replace(ge,Te),function(t){return(t.textContent||t.innerText||S(t)).indexOf(e)>-1}}),lang:n(function(e){return ce.test(e||"")||t.error("unsupported lang: "+e),e=e.replace(ge,Te).toLowerCase(),function(t){var i;do{if(i=O?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return(i=i.toLowerCase())===e||0===i.indexOf(e+"-")}while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var i=e.location&&e.location.hash;return i&&i.slice(1)===t.id},root:function(e){return e===A},focus:function(e){return e===_.activeElement&&(!_.hasFocus||_.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:s(!1),disabled:s(!0),checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!w.pseudos.empty(e)},header:function(e){return me.test(e.nodeName)},input:function(e){return pe.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:l(function(){return[0]}),last:l(function(e,t){return[t-1]}),eq:l(function(e,t,i){return[i<0?i+t:i]}),even:l(function(e,t){for(var i=0;i<t;i+=2)e.push(i);return e}),odd:l(function(e,t){for(var i=1;i<t;i+=2)e.push(i);return e}),lt:l(function(e,t,i){for(var n=i<0?i+t:i;--n>=0;)e.push(n);return e}),gt:l(function(e,t,i){for(var n=i<0?i+t:i;++n<t;)e.push(n);return e})}},w.pseudos.nth=w.pseudos.eq;for(b in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})w.pseudos[b]=function(e){return function(t){return"input"===t.nodeName.toLowerCase()&&t.type===e}}(b);for(b in{submit:!0,reset:!0})w.pseudos[b]=function(e){return function(t){var i=t.nodeName.toLowerCase();return("input"===i||"button"===i)&&t.type===e}}(b);return c.prototype=w.filters=w.pseudos,w.setFilters=new c,k=t.tokenize=function(e,i){var n,o,r,a,s,l,d,c=B[e+" "];if(c)return i?0:c.slice(0);for(s=e,l=[],d=w.preFilter;s;){n&&!(o=ae.exec(s))||(o&&(s=s.slice(o[0].length)||s),l.push(r=[])),n=!1,(o=se.exec(s))&&(n=o.shift(),r.push({value:n,type:o[0].replace(re," ")}),s=s.slice(n.length));for(a in w.filter)!(o=ue[a].exec(s))||d[a]&&!(o=d[a](o))||(n=o.shift(),r.push({value:n,type:a,matches:o}),s=s.slice(n.length));if(!n)break}return i?s.length:s?t.error(e):B(e,l).slice(0)},C=t.compile=function(e,t){var i,n=[],o=[],r=q[e+" "];if(!r){for(t||(t=k(e)),i=t.length;i--;)r=g(t[i]),r[H]?n.push(r):o.push(r);r=q(e,T(o,n)),r.selector=e}return r},M=t.select=function(e,t,i,n){var o,r,a,s,l,c="function"==typeof e&&e,p=!n&&k(e=c.selector||e);if(i=i||[],1===p.length){if(r=p[0]=p[0].slice(0),r.length>2&&"ID"===(a=r[0]).type&&9===t.nodeType&&O&&w.relative[r[1].type]){if(!(t=(w.find.ID(a.matches[0].replace(ge,Te),t)||[])[0]))return i;c&&(t=t.parentNode),e=e.slice(r.shift().value.length)}for(o=ue.needsContext.test(e)?0:r.length;o--&&(a=r[o],!w.relative[s=a.type]);)if((l=w.find[s])&&(n=l(a.matches[0].replace(ge,Te),ve.test(r[0].type)&&d(t.parentNode)||t))){if(r.splice(o,1),!(e=n.length&&u(r)))return J.apply(i,n),i;break}}return(c||C(e,p))(n,t,!O,i,!t||ve.test(e)&&d(t.parentNode)||t),i},y.sortStable=H.split("").sort(G).join("")===H,y.detectDuplicates=!!D,N(),y.sortDetached=o(function(e){return 1&e.compareDocumentPosition(_.createElement("fieldset"))}),o(function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")})||r("type|href|height|width",function(e,t,i){if(!i)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),y.attributes&&o(function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||r("value",function(e,t,i){if(!i&&"input"===e.nodeName.toLowerCase())return e.defaultValue}),o(function(e){return null==e.getAttribute("disabled")})||r(Q,function(e,t,i){var n;if(!i)return!0===e[t]?t.toLowerCase():(n=e.getAttributeNode(t))&&n.specified?n.value:null}),t}(i);Ce.find=Ie,Ce.expr=Ie.selectors,Ce.expr[":"]=Ce.expr.pseudos,Ce.uniqueSort=Ce.unique=Ie.uniqueSort,Ce.text=Ie.getText,Ce.isXMLDoc=Ie.isXML,Ce.contains=Ie.contains,Ce.escapeSelector=Ie.escape;var xe=function(e,t,i){for(var n=[],o=void 0!==i;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(o&&Ce(e).is(i))break;n.push(e)}return n},De=function(e,t){for(var i=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&i.push(e);return i},Ne=Ce.expr.match.needsContext,_e=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;Ce.filter=function(e,t,i){var n=t[0];return i&&(e=":not("+e+")"),1===t.length&&1===n.nodeType?Ce.find.matchesSelector(n,e)?[n]:[]:Ce.find.matches(e,Ce.grep(t,function(e){return 1===e.nodeType}))},Ce.fn.extend({find:function(e){var t,i,n=this.length,o=this;if("string"!=typeof e)return this.pushStack(Ce(e).filter(function(){for(t=0;t<n;t++)if(Ce.contains(o[t],this))return!0}));for(i=this.pushStack([]),t=0;t<n;t++)Ce.find(e,o[t],i);return n>1?Ce.uniqueSort(i):i},filter:function(e){return this.pushStack(c(this,e||[],!1))},not:function(e){return this.pushStack(c(this,e||[],!0))},is:function(e){return!!c(this,"string"==typeof e&&Ne.test(e)?Ce(e):e||[],!1).length}});var Ae,Oe=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(Ce.fn.init=function(e,t,i){var n,o;if(!e)return this;if(i=i||Ae,"string"==typeof e){if(!(n="<"===e[0]&&">"===e[e.length-1]&&e.length>=3?[null,e,null]:Oe.exec(e))||!n[1]&&t)return!t||t.jquery?(t||i).find(e):this.constructor(t).find(e);if(n[1]){if(t=t instanceof Ce?t[0]:t,Ce.merge(this,Ce.parseHTML(n[1],t&&t.nodeType?t.ownerDocument||t:ce,!0)),_e.test(n[1])&&Ce.isPlainObject(t))for(n in t)Se(this[n])?this[n](t[n]):this.attr(n,t[n]);return this}return o=ce.getElementById(n[2]),o&&(this[0]=o,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):Se(e)?void 0!==i.ready?i.ready(e):e(Ce):Ce.makeArray(e,this)}).prototype=Ce.fn,Ae=Ce(ce);var Ue=/^(?:parents|prev(?:Until|All))/,Le={children:!0,contents:!0,next:!0,prev:!0};Ce.fn.extend({has:function(e){var t=Ce(e,this),i=t.length;return this.filter(function(){for(var e=0;e<i;e++)if(Ce.contains(this,t[e]))return!0})},closest:function(e,t){var i,n=0,o=this.length,r=[],a="string"!=typeof e&&Ce(e);if(!Ne.test(e))for(;n<o;n++)for(i=this[n];i&&i!==t;i=i.parentNode)if(i.nodeType<11&&(a?a.index(i)>-1:1===i.nodeType&&Ce.find.matchesSelector(i,e))){r.push(i);break}return this.pushStack(r.length>1?Ce.uniqueSort(r):r)},index:function(e){return e?"string"==typeof e?he.call(Ce(e),this[0]):he.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(Ce.uniqueSort(Ce.merge(this.get(),Ce(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),Ce.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return xe(e,"parentNode")},parentsUntil:function(e,t,i){return xe(e,"parentNode",i)},next:function(e){return u(e,"nextSibling")},prev:function(e){return u(e,"previousSibling")},nextAll:function(e){return xe(e,"nextSibling")},prevAll:function(e){return xe(e,"previousSibling")},nextUntil:function(e,t,i){return xe(e,"nextSibling",i)},prevUntil:function(e,t,i){return xe(e,"previousSibling",i)},siblings:function(e){return De((e.parentNode||{}).firstChild,e)},children:function(e){return De(e.firstChild)},contents:function(e){return d(e,"iframe")?e.contentDocument:(d(e,"template")&&(e=e.content||e),Ce.merge([],e.childNodes))}},function(e,t){Ce.fn[e]=function(i,n){var o=Ce.map(this,t,i);return"Until"!==e.slice(-5)&&(n=i),n&&"string"==typeof n&&(o=Ce.filter(n,o)),this.length>1&&(Le[e]||Ce.uniqueSort(o),Ue.test(e)&&o.reverse()),this.pushStack(o)}});var We=/[^\x20\t\r\n\f]+/g;Ce.Callbacks=function(e){e="string"==typeof e?p(e):Ce.extend({},e);var t,i,n,o,r=[],a=[],l=-1,d=function(){for(o=o||e.once,n=t=!0;a.length;l=-1)for(i=a.shift();++l<r.length;)!1===r[l].apply(i[0],i[1])&&e.stopOnFalse&&(l=r.length,i=!1);e.memory||(i=!1),t=!1,o&&(r=i?[]:"")},c={add:function(){return r&&(i&&!t&&(l=r.length-1,a.push(i)),function t(i){Ce.each(i,function(i,n){Se(n)?e.unique&&c.has(n)||r.push(n):n&&n.length&&"string"!==s(n)&&t(n)})}(arguments),i&&!t&&d()),this},remove:function(){return Ce.each(arguments,function(e,t){for(var i;(i=Ce.inArray(t,r,i))>-1;)r.splice(i,1),i<=l&&l--}),this},has:function(e){return e?Ce.inArray(e,r)>-1:r.length>0},empty:function(){return r&&(r=[]),this},disable:function(){return o=a=[],r=i="",this},disabled:function(){return!r},lock:function(){return o=a=[],i||t||(r=i=""),this},locked:function(){return!!o},fireWith:function(e,i){return o||(i=i||[],i=[e,i.slice?i.slice():i],a.push(i),t||d()),this},fire:function(){return c.fireWith(this,arguments),this},fired:function(){return!!n}};return c},Ce.extend({Deferred:function(e){var t=[["notify","progress",Ce.Callbacks("memory"),Ce.Callbacks("memory"),2],["resolve","done",Ce.Callbacks("once memory"),Ce.Callbacks("once memory"),0,"resolved"],["reject","fail",Ce.Callbacks("once memory"),Ce.Callbacks("once memory"),1,"rejected"]],n="pending",o={state:function(){return n},always:function(){return r.done(arguments).fail(arguments),this},catch:function(e){return o.then(null,e)},pipe:function(){var e=arguments;return Ce.Deferred(function(i){Ce.each(t,function(t,n){var o=Se(e[n[4]])&&e[n[4]];r[n[1]](function(){var e=o&&o.apply(this,arguments);e&&Se(e.promise)?e.promise().progress(i.notify).done(i.resolve).fail(i.reject):i[n[0]+"With"](this,o?[e]:arguments)})}),e=null}).promise()},then:function(e,n,o){function r(e,t,n,o){return function(){var s=this,l=arguments,d=function(){var i,d;if(!(e<a)){if((i=n.apply(s,l))===t.promise())throw new TypeError("Thenable self-resolution");d=i&&("object"==typeof i||"function"==typeof i)&&i.then,Se(d)?o?d.call(i,r(a,t,m,o),r(a,t,f,o)):(a++,d.call(i,r(a,t,m,o),r(a,t,f,o),r(a,t,m,t.notifyWith))):(n!==m&&(s=void 0,l=[i]),(o||t.resolveWith)(s,l))}},c=o?d:function(){try{d()}catch(i){Ce.Deferred.exceptionHook&&Ce.Deferred.exceptionHook(i,c.stackTrace),e+1>=a&&(n!==f&&(s=void 0,l=[i]),t.rejectWith(s,l))}};e?c():(Ce.Deferred.getStackHook&&(c.stackTrace=Ce.Deferred.getStackHook()),i.setTimeout(c))}}var a=0;return Ce.Deferred(function(i){t[0][3].add(r(0,i,Se(o)?o:m,i.notifyWith)),t[1][3].add(r(0,i,Se(e)?e:m)),t[2][3].add(r(0,i,Se(n)?n:f))}).promise()},promise:function(e){return null!=e?Ce.extend(e,o):o}},r={};return Ce.each(t,function(e,i){var a=i[2],s=i[5];o[i[1]]=a.add,s&&a.add(function(){n=s},t[3-e][2].disable,t[3-e][3].disable,t[0][2].lock,t[0][3].lock),a.add(i[3].fire),r[i[0]]=function(){return r[i[0]+"With"](this===r?void 0:this,arguments),this},r[i[0]+"With"]=a.fireWith}),o.promise(r),e&&e.call(r,r),r},when:function(e){var t=arguments.length,i=t,n=Array(i),o=pe.call(arguments),r=Ce.Deferred(),a=function(e){return function(i){n[e]=this,o[e]=arguments.length>1?pe.call(arguments):i,--t||r.resolveWith(n,o)}};if(t<=1&&(h(e,r.done(a(i)).resolve,r.reject,!t),"pending"===r.state()||Se(o[i]&&o[i].then)))return r.then();for(;i--;)h(o[i],a(i),r.reject);return r.promise()}});var Pe=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;Ce.Deferred.exceptionHook=function(e,t){i.console&&i.console.warn&&e&&Pe.test(e.name)&&i.console.warn("jQuery.Deferred exception: "+e.message,e.stack,t)},Ce.readyException=function(e){i.setTimeout(function(){throw e})};var He=Ce.Deferred();Ce.fn.ready=function(e){return He.then(e).catch(function(e){Ce.readyException(e)}),this},Ce.extend({isReady:!1,readyWait:1,ready:function(e){(!0===e?--Ce.readyWait:Ce.isReady)||(Ce.isReady=!0,!0!==e&&--Ce.readyWait>0||He.resolveWith(ce,[Ce]))}}),Ce.ready.then=He.then,"complete"===ce.readyState||"loading"!==ce.readyState&&!ce.documentElement.doScroll?i.setTimeout(Ce.ready):(ce.addEventListener("DOMContentLoaded",v),i.addEventListener("load",v));var Re=function(e,t,i,n,o,r,a){var l=0,d=e.length,c=null==i;if("object"===s(i)){o=!0;for(l in i)Re(e,t,l,i[l],!0,r,a)}else if(void 0!==n&&(o=!0,Se(n)||(a=!0),c&&(a?(t.call(e,n),t=null):(c=t,t=function(e,t,i){return c.call(Ce(e),i)})),t))for(;l<d;l++)t(e[l],i,a?n:n.call(e[l],l,t(e[l],i)));return o?e:c?t.call(e):d?t(e[0],i):r},Fe=/^-ms-/,Ve=/-([a-z])/g,je=function(e){return 1===e.nodeType||9===e.nodeType||!+e.nodeType};b.uid=1,b.prototype={cache:function(e){var t=e[this.expando];return t||(t={},je(e)&&(e.nodeType?e[this.expando]=t:Object.defineProperty(e,this.expando,{value:t,configurable:!0}))),t},set:function(e,t,i){var n,o=this.cache(e);if("string"==typeof t)o[T(t)]=i;else for(n in t)o[T(n)]=t[n];return o},get:function(e,t){return void 0===t?this.cache(e):e[this.expando]&&e[this.expando][T(t)]},access:function(e,t,i){return void 0===t||t&&"string"==typeof t&&void 0===i?this.get(e,t):(this.set(e,t,i),void 0!==i?i:t)},remove:function(e,t){var i,n=e[this.expando];if(void 0!==n){if(void 0!==t){Array.isArray(t)?t=t.map(T):(t=T(t),t=t in n?[t]:t.match(We)||[]),i=t.length;for(;i--;)delete n[t[i]]}(void 0===t||Ce.isEmptyObject(n))&&(e.nodeType?e[this.expando]=void 0:delete e[this.expando])}},hasData:function(e){var t=e[this.expando];return void 0!==t&&!Ce.isEmptyObject(t)}};var Be=new b,qe=new b,Ge=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,Ze=/[A-Z]/g;Ce.extend({hasData:function(e){return qe.hasData(e)||Be.hasData(e)},data:function(e,t,i){return qe.access(e,t,i)},removeData:function(e,t){qe.remove(e,t)},_data:function(e,t,i){return Be.access(e,t,i)},_removeData:function(e,t){Be.remove(e,t)}}),Ce.fn.extend({data:function(e,t){var i,n,o,r=this[0],a=r&&r.attributes;if(void 0===e){if(this.length&&(o=qe.get(r),1===r.nodeType&&!Be.get(r,"hasDataAttrs"))){for(i=a.length;i--;)a[i]&&(n=a[i].name,0===n.indexOf("data-")&&(n=T(n.slice(5)),w(r,n,o[n])));Be.set(r,"hasDataAttrs",!0)}return o}return"object"==typeof e?this.each(function(){qe.set(this,e)}):Re(this,function(t){var i;if(r&&void 0===t){if(void 0!==(i=qe.get(r,e)))return i;if(void 0!==(i=w(r,e)))return i}else this.each(function(){qe.set(this,e,t)})},null,t,arguments.length>1,null,!0)},removeData:function(e){return this.each(function(){qe.remove(this,e)})}}),Ce.extend({queue:function(e,t,i){var n;if(e)return t=(t||"fx")+"queue",n=Be.get(e,t),i&&(!n||Array.isArray(i)?n=Be.access(e,t,Ce.makeArray(i)):n.push(i)),n||[]},dequeue:function(e,t){t=t||"fx";var i=Ce.queue(e,t),n=i.length,o=i.shift(),r=Ce._queueHooks(e,t),a=function(){Ce.dequeue(e,t)};"inprogress"===o&&(o=i.shift(),n--),o&&("fx"===t&&i.unshift("inprogress"),delete r.stop,o.call(e,a,r)),!n&&r&&r.empty.fire()},_queueHooks:function(e,t){var i=t+"queueHooks";return Be.get(e,i)||Be.access(e,i,{empty:Ce.Callbacks("once memory").add(function(){Be.remove(e,[t+"queue",i])})})}}),Ce.fn.extend({queue:function(e,t){var i=2;return"string"!=typeof e&&(t=e,e="fx",i--),arguments.length<i?Ce.queue(this[0],e):void 0===t?this:this.each(function(){var i=Ce.queue(this,e,t);Ce._queueHooks(this,e),"fx"===e&&"inprogress"!==i[0]&&Ce.dequeue(this,e)})},dequeue:function(e){return this.each(function(){Ce.dequeue(this,e)})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){var i,n=1,o=Ce.Deferred(),r=this,a=this.length,s=function(){--n||o.resolveWith(r,[r])};for("string"!=typeof e&&(t=e,e=void 0),e=e||"fx";a--;)(i=Be.get(r[a],e+"queueHooks"))&&i.empty&&(n++,i.empty.add(s));return s(),o.promise(t)}});var ze=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,Xe=new RegExp("^(?:([+-])=|)("+ze+")([a-z%]*)$","i"),Ye=["Top","Right","Bottom","Left"],Je=function(e,t){return e=t||e,"none"===e.style.display||""===e.style.display&&Ce.contains(e.ownerDocument,e)&&"none"===Ce.css(e,"display")},$e=function(e,t,i,n){var o,r,a={};for(r in t)a[r]=e.style[r],e.style[r]=t[r];o=i.apply(e,n||[]);for(r in t)e.style[r]=a[r];return o},Ke={};Ce.fn.extend({show:function(){return k(this,!0)},hide:function(){return k(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){Je(this)?Ce(this).show():Ce(this).hide()})}});var Qe=/^(?:checkbox|radio)$/i,et=/<([a-z][^\/\0>\x20\t\r\n\f]+)/i,tt=/^$|^module$|\/(?:java|ecma)script/i,it={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,"",""]};it.optgroup=it.option,it.tbody=it.tfoot=it.colgroup=it.caption=it.thead,it.th=it.td;var nt=/<|&#?\w+;/;!function(){var e=ce.createDocumentFragment(),t=e.appendChild(ce.createElement("div")),i=ce.createElement("input");i.setAttribute("type","radio"),i.setAttribute("checked","checked"),i.setAttribute("name","t"),t.appendChild(i),we.checkClone=t.cloneNode(!0).cloneNode(!0).lastChild.checked,t.innerHTML="<textarea>x</textarea>",we.noCloneChecked=!!t.cloneNode(!0).lastChild.defaultValue}();var ot=ce.documentElement,rt=/^key/,at=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,st=/^([^.]*)(?:\.(.+)|)/;Ce.event={global:{},add:function(e,t,i,n,o){var r,a,s,l,d,c,u,p,m,f,h,v=Be.get(e);if(v)for(i.handler&&(r=i,i=r.handler,o=r.selector),o&&Ce.find.matchesSelector(ot,o),i.guid||(i.guid=Ce.guid++),(l=v.events)||(l=v.events={}),(a=v.handle)||(a=v.handle=function(t){return void 0!==Ce&&Ce.event.triggered!==t.type?Ce.event.dispatch.apply(e,arguments):void 0}),t=(t||"").match(We)||[""],d=t.length;d--;)s=st.exec(t[d])||[],m=h=s[1],f=(s[2]||"").split(".").sort(),m&&(u=Ce.event.special[m]||{},m=(o?u.delegateType:u.bindType)||m,u=Ce.event.special[m]||{},c=Ce.extend({type:m,origType:h,data:n,handler:i,guid:i.guid,selector:o,needsContext:o&&Ce.expr.match.needsContext.test(o),namespace:f.join(".")},r),(p=l[m])||(p=l[m]=[],p.delegateCount=0,u.setup&&!1!==u.setup.call(e,n,f,a)||e.addEventListener&&e.addEventListener(m,a)),u.add&&(u.add.call(e,c),c.handler.guid||(c.handler.guid=i.guid)),o?p.splice(p.delegateCount++,0,c):p.push(c),Ce.event.global[m]=!0)},remove:function(e,t,i,n,o){var r,a,s,l,d,c,u,p,m,f,h,v=Be.hasData(e)&&Be.get(e);if(v&&(l=v.events)){for(t=(t||"").match(We)||[""],d=t.length;d--;)if(s=st.exec(t[d])||[],m=h=s[1],f=(s[2]||"").split(".").sort(),m){for(u=Ce.event.special[m]||{},m=(n?u.delegateType:u.bindType)||m,p=l[m]||[],s=s[2]&&new RegExp("(^|\\.)"+f.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=r=p.length;r--;)c=p[r],!o&&h!==c.origType||i&&i.guid!==c.guid||s&&!s.test(c.namespace)||n&&n!==c.selector&&("**"!==n||!c.selector)||(p.splice(r,1),c.selector&&p.delegateCount--,u.remove&&u.remove.call(e,c));a&&!p.length&&(u.teardown&&!1!==u.teardown.call(e,f,v.handle)||Ce.removeEvent(e,m,v.handle),delete l[m])}else for(m in l)Ce.event.remove(e,m+t[d],i,n,!0);Ce.isEmptyObject(l)&&Be.remove(e,"handle events")}},dispatch:function(e){var t,i,n,o,r,a,s=Ce.event.fix(e),l=new Array(arguments.length),d=(Be.get(this,"events")||{})[s.type]||[],c=Ce.event.special[s.type]||{};for(l[0]=s,t=1;t<arguments.length;t++)l[t]=arguments[t];if(s.delegateTarget=this,!c.preDispatch||!1!==c.preDispatch.call(this,s)){for(a=Ce.event.handlers.call(this,s,d),t=0;(o=a[t++])&&!s.isPropagationStopped();)for(s.currentTarget=o.elem,i=0;(r=o.handlers[i++])&&!s.isImmediatePropagationStopped();)s.rnamespace&&!s.rnamespace.test(r.namespace)||(s.handleObj=r,s.data=r.data,void 0!==(n=((Ce.event.special[r.origType]||{}).handle||r.handler).apply(o.elem,l))&&!1===(s.result=n)&&(s.preventDefault(),s.stopPropagation()));return c.postDispatch&&c.postDispatch.call(this,s),s.result}},handlers:function(e,t){var i,n,o,r,a,s=[],l=t.delegateCount,d=e.target;if(l&&d.nodeType&&!("click"===e.type&&e.button>=1))for(;d!==this;d=d.parentNode||this)if(1===d.nodeType&&("click"!==e.type||!0!==d.disabled)){for(r=[],a={},i=0;i<l;i++)n=t[i],o=n.selector+" ",void 0===a[o]&&(a[o]=n.needsContext?Ce(o,this).index(d)>-1:Ce.find(o,this,null,[d]).length),a[o]&&r.push(n);r.length&&s.push({elem:d,handlers:r})}return d=this,l<t.length&&s.push({elem:d,handlers:t.slice(l)}),s},addProp:function(e,t){Object.defineProperty(Ce.Event.prototype,e,{enumerable:!0,configurable:!0,get:Se(t)?function(){if(this.originalEvent)return t(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[e]},set:function(t){Object.defineProperty(this,e,{enumerable:!0,configurable:!0,writable:!0,value:t})}})},fix:function(e){return e[Ce.expando]?e:new Ce.Event(e)},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==N()&&this.focus)return this.focus(),!1},delegateType:"focusin"},blur:{trigger:function(){if(this===N()&&this.blur)return this.blur(),!1},delegateType:"focusout"},click:{trigger:function(){if("checkbox"===this.type&&this.click&&d(this,"input"))return this.click(),!1},_default:function(e){return d(e.target,"a")}},beforeunload:{postDispatch:function(e){void 0!==e.result&&e.originalEvent&&(e.originalEvent.returnValue=e.result)}}}},Ce.removeEvent=function(e,t,i){e.removeEventListener&&e.removeEventListener(t,i)},Ce.Event=function(e,t){if(!(this instanceof Ce.Event))return new Ce.Event(e,t);e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||void 0===e.defaultPrevented&&!1===e.returnValue?x:D,this.target=e.target&&3===e.target.nodeType?e.target.parentNode:e.target,this.currentTarget=e.currentTarget,this.relatedTarget=e.relatedTarget):this.type=e,t&&Ce.extend(this,t),this.timeStamp=e&&e.timeStamp||Date.now(),this[Ce.expando]=!0},Ce.Event.prototype={constructor:Ce.Event,isDefaultPrevented:D,isPropagationStopped:D,isImmediatePropagationStopped:D,isSimulated:!1,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=x,e&&!this.isSimulated&&e.preventDefault()},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=x,e&&!this.isSimulated&&e.stopPropagation()},stopImmediatePropagation:function(){var e=this.originalEvent;this.isImmediatePropagationStopped=x,e&&!this.isSimulated&&e.stopImmediatePropagation(),this.stopPropagation()}},Ce.each({altKey:!0,bubbles:!0,cancelable:!0,changedTouches:!0,ctrlKey:!0,detail:!0,eventPhase:!0,metaKey:!0,pageX:!0,pageY:!0,shiftKey:!0,view:!0,char:!0,charCode:!0,key:!0,keyCode:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pointerId:!0,pointerType:!0,screenX:!0,screenY:!0,targetTouches:!0,toElement:!0,touches:!0,which:function(e){var t=e.button;return null==e.which&&rt.test(e.type)?null!=e.charCode?e.charCode:e.keyCode:!e.which&&void 0!==t&&at.test(e.type)?1&t?1:2&t?3:4&t?2:0:e.which}},Ce.event.addProp),Ce.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(e,t){Ce.event.special[e]={delegateType:t,bindType:t,handle:function(e){var i,n=this,o=e.relatedTarget,r=e.handleObj;return o&&(o===n||Ce.contains(n,o))||(e.type=r.origType,i=r.handler.apply(this,arguments),e.type=t),i}}}),Ce.fn.extend({on:function(e,t,i,n){return _(this,e,t,i,n)},one:function(e,t,i,n){return _(this,e,t,i,n,1)},off:function(e,t,i){var n,o;if(e&&e.preventDefault&&e.handleObj)return n=e.handleObj,Ce(e.delegateTarget).off(n.namespace?n.origType+"."+n.namespace:n.origType,n.selector,n.handler),this;if("object"==typeof e){for(o in e)this.off(o,t,e[o]);return this}return!1!==t&&"function"!=typeof t||(i=t,t=void 0),!1===i&&(i=D),this.each(function(){Ce.event.remove(this,e,i,t)})}});var lt=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([a-z][^\/\0>\x20\t\r\n\f]*)[^>]*)\/>/gi,dt=/<script|<style|<link/i,ct=/checked\s*(?:[^=]|=\s*.checked.)/i,ut=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;Ce.extend({htmlPrefilter:function(e){return e.replace(lt,"<$1></$2>")},clone:function(e,t,i){var n,o,r,a,s=e.cloneNode(!0),l=Ce.contains(e.ownerDocument,e);if(!(we.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||Ce.isXMLDoc(e)))for(a=C(s),r=C(e),n=0,o=r.length;n<o;n++)W(r[n],a[n]);if(t)if(i)for(r=r||C(e),a=a||C(s),n=0,o=r.length;n<o;n++)L(r[n],a[n]);else L(e,s);return a=C(s,"script"),a.length>0&&M(a,!l&&C(e,"script")),s},cleanData:function(e){for(var t,i,n,o=Ce.event.special,r=0;void 0!==(i=e[r]);r++)if(je(i)){if(t=i[Be.expando]){if(t.events)for(n in t.events)o[n]?Ce.event.remove(i,n):Ce.removeEvent(i,n,t.handle);i[Be.expando]=void 0}i[qe.expando]&&(i[qe.expando]=void 0)}}}),Ce.fn.extend({detach:function(e){return H(this,e,!0)},remove:function(e){return H(this,e)},text:function(e){return Re(this,function(e){return void 0===e?Ce.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=e)})},null,e,arguments.length)},append:function(){return P(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){A(this,e).appendChild(e)}})},prepend:function(){return P(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=A(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return P(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return P(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(Ce.cleanData(C(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map(function(){return Ce.clone(this,e,t)})},html:function(e){return Re(this,function(e){var t=this[0]||{},i=0,n=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!dt.test(e)&&!it[(et.exec(e)||["",""])[1].toLowerCase()]){e=Ce.htmlPrefilter(e);try{for(;i<n;i++)t=this[i]||{},1===t.nodeType&&(Ce.cleanData(C(t,!1)),t.innerHTML=e);t=0}catch(e){}}t&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var e=[];return P(this,arguments,function(t){var i=this.parentNode;Ce.inArray(this,e)<0&&(Ce.cleanData(C(this)),i&&i.replaceChild(t,this))},e)}}),Ce.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){Ce.fn[e]=function(e){for(var i,n=[],o=Ce(e),r=o.length-1,a=0;a<=r;a++)i=a===r?this:this.clone(!0),Ce(o[a])[t](i),fe.apply(n,i.get());return this.pushStack(n)}});var pt=new RegExp("^("+ze+")(?!px)[a-z%]+$","i"),mt=function(e){var t=e.ownerDocument.defaultView;return t&&t.opener||(t=i),t.getComputedStyle(e)},ft=new RegExp(Ye.join("|"),"i");!function(){function e(){if(d){l.style.cssText="position:absolute;left:-11111px;width:60px;margin-top:1px;padding:0;border:0",d.style.cssText="position:relative;display:block;box-sizing:border-box;overflow:scroll;margin:auto;border:1px;padding:1px;width:60%;top:1%",ot.appendChild(l).appendChild(d);var e=i.getComputedStyle(d);n="1%"!==e.top,s=12===t(e.marginLeft),d.style.right="60%",a=36===t(e.right),o=36===t(e.width),d.style.position="absolute",r=36===d.offsetWidth||"absolute",ot.removeChild(l),d=null}}function t(e){return Math.round(parseFloat(e))}var n,o,r,a,s,l=ce.createElement("div"),d=ce.createElement("div");d.style&&(d.style.backgroundClip="content-box",d.cloneNode(!0).style.backgroundClip="",we.clearCloneStyle="content-box"===d.style.backgroundClip,Ce.extend(we,{boxSizingReliable:function(){return e(),o},pixelBoxStyles:function(){return e(),a},pixelPosition:function(){return e(),n},reliableMarginLeft:function(){return e(),s},scrollboxSize:function(){return e(),r}}))}();var ht=/^(none|table(?!-c[ea]).+)/,vt=/^--/,gt={position:"absolute",visibility:"hidden",display:"block"},Tt={letterSpacing:"0",fontWeight:"400"},bt=["Webkit","Moz","ms"],yt=ce.createElement("div").style;Ce.extend({cssHooks:{opacity:{get:function(e,t){if(t){var i=R(e,"opacity");return""===i?"1":i}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{},style:function(e,t,i,n){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var o,r,a,s=T(t),l=vt.test(t),d=e.style;if(l||(t=j(s)),a=Ce.cssHooks[t]||Ce.cssHooks[s],void 0===i)return a&&"get"in a&&void 0!==(o=a.get(e,!1,n))?o:d[t];r=typeof i,"string"===r&&(o=Xe.exec(i))&&o[1]&&(i=S(e,t,o),r="number"),null!=i&&i===i&&("number"===r&&(i+=o&&o[3]||(Ce.cssNumber[s]?"":"px")),we.clearCloneStyle||""!==i||0!==t.indexOf("background")||(d[t]="inherit"),a&&"set"in a&&void 0===(i=a.set(e,i,n))||(l?d.setProperty(t,i):d[t]=i))}},css:function(e,t,i,n){var o,r,a,s=T(t);return vt.test(t)||(t=j(s)),a=Ce.cssHooks[t]||Ce.cssHooks[s],a&&"get"in a&&(o=a.get(e,!0,i)),void 0===o&&(o=R(e,t,n)),"normal"===o&&t in Tt&&(o=Tt[t]),""===i||i?(r=parseFloat(o),!0===i||isFinite(r)?r||0:o):o}}),Ce.each(["height","width"],function(e,t){Ce.cssHooks[t]={get:function(e,i,n){if(i)return!ht.test(Ce.css(e,"display"))||e.getClientRects().length&&e.getBoundingClientRect().width?G(e,t,n):$e(e,gt,function(){return G(e,t,n)})},set:function(e,i,n){var o,r=mt(e),a="border-box"===Ce.css(e,"boxSizing",!1,r),s=n&&q(e,t,n,a,r);return a&&we.scrollboxSize()===r.position&&(s-=Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-parseFloat(r[t])-q(e,t,"border",!1,r)-.5)),s&&(o=Xe.exec(i))&&"px"!==(o[3]||"px")&&(e.style[t]=i,i=Ce.css(e,t)),B(e,i,s)}}}),Ce.cssHooks.marginLeft=F(we.reliableMarginLeft,function(e,t){if(t)return(parseFloat(R(e,"marginLeft"))||e.getBoundingClientRect().left-$e(e,{marginLeft:0},function(){return e.getBoundingClientRect().left}))+"px"}),Ce.each({margin:"",padding:"",border:"Width"},function(e,t){Ce.cssHooks[e+t]={expand:function(i){for(var n=0,o={},r="string"==typeof i?i.split(" "):[i];n<4;n++)o[e+Ye[n]+t]=r[n]||r[n-2]||r[0];return o}},"margin"!==e&&(Ce.cssHooks[e+t].set=B)}),Ce.fn.extend({css:function(e,t){return Re(this,function(e,t,i){var n,o,r={},a=0;if(Array.isArray(t)){for(n=mt(e),o=t.length;a<o;a++)r[t[a]]=Ce.css(e,t[a],!1,n);return r}return void 0!==i?Ce.style(e,t,i):Ce.css(e,t)},e,t,arguments.length>1)}}),Ce.Tween=Z,Z.prototype={constructor:Z,init:function(e,t,i,n,o,r){this.elem=e,this.prop=i,this.easing=o||Ce.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=n,this.unit=r||(Ce.cssNumber[i]?"":"px")},cur:function(){var e=Z.propHooks[this.prop];return e&&e.get?e.get(this):Z.propHooks._default.get(this)},run:function(e){var t,i=Z.propHooks[this.prop];return this.options.duration?this.pos=t=Ce.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),i&&i.set?i.set(this):Z.propHooks._default.set(this),this}},Z.prototype.init.prototype=Z.prototype,Z.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=Ce.css(e.elem,e.prop,""),t&&"auto"!==t?t:0)},set:function(e){Ce.fx.step[e.prop]?Ce.fx.step[e.prop](e):1!==e.elem.nodeType||null==e.elem.style[Ce.cssProps[e.prop]]&&!Ce.cssHooks[e.prop]?e.elem[e.prop]=e.now:Ce.style(e.elem,e.prop,e.now+e.unit)}}},Z.propHooks.scrollTop=Z.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},Ce.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},Ce.fx=Z.prototype.init,Ce.fx.step={};var wt,St,Et=/^(?:toggle|show|hide)$/,kt=/queueHooks$/;Ce.Animation=Ce.extend(Q,{tweeners:{"*":[function(e,t){var i=this.createTween(e,t);return S(i.elem,e,Xe.exec(t),i),i}]},tweener:function(e,t){Se(e)?(t=e,e=["*"]):e=e.match(We);for(var i,n=0,o=e.length;n<o;n++)i=e[n],Q.tweeners[i]=Q.tweeners[i]||[],Q.tweeners[i].unshift(t)},prefilters:[$],prefilter:function(e,t){t?Q.prefilters.unshift(e):Q.prefilters.push(e)}}),Ce.speed=function(e,t,i){var n=e&&"object"==typeof e?Ce.extend({},e):{complete:i||!i&&t||Se(e)&&e,duration:e,easing:i&&t||t&&!Se(t)&&t};return Ce.fx.off?n.duration=0:"number"!=typeof n.duration&&(n.duration in Ce.fx.speeds?n.duration=Ce.fx.speeds[n.duration]:n.duration=Ce.fx.speeds._default),null!=n.queue&&!0!==n.queue||(n.queue="fx"),n.old=n.complete,n.complete=function(){Se(n.old)&&n.old.call(this),n.queue&&Ce.dequeue(this,n.queue)},n},Ce.fn.extend({fadeTo:function(e,t,i,n){return this.filter(Je).css("opacity",0).show().end().animate({opacity:t},e,i,n)},animate:function(e,t,i,n){var o=Ce.isEmptyObject(e),r=Ce.speed(t,i,n),a=function(){var t=Q(this,Ce.extend({},e),r);(o||Be.get(this,"finish"))&&t.stop(!0)};return a.finish=a,o||!1===r.queue?this.each(a):this.queue(r.queue,a)},stop:function(e,t,i){var n=function(e){var t=e.stop;delete e.stop,t(i)};return"string"!=typeof e&&(i=t,t=e,e=void 0),t&&!1!==e&&this.queue(e||"fx",[]),this.each(function(){var t=!0,o=null!=e&&e+"queueHooks",r=Ce.timers,a=Be.get(this);if(o)a[o]&&a[o].stop&&n(a[o]);else for(o in a)a[o]&&a[o].stop&&kt.test(o)&&n(a[o]);for(o=r.length;o--;)r[o].elem!==this||null!=e&&r[o].queue!==e||(r[o].anim.stop(i),t=!1,r.splice(o,1));!t&&i||Ce.dequeue(this,e)})},finish:function(e){return!1!==e&&(e=e||"fx"),this.each(function(){var t,i=Be.get(this),n=i[e+"queue"],o=i[e+"queueHooks"],r=Ce.timers,a=n?n.length:0;for(i.finish=!0,Ce.queue(this,e,[]),o&&o.stop&&o.stop.call(this,!0),t=r.length;t--;)r[t].elem===this&&r[t].queue===e&&(r[t].anim.stop(!0),r.splice(t,1));for(t=0;t<a;t++)n[t]&&n[t].finish&&n[t].finish.call(this);delete i.finish})}}),Ce.each(["toggle","show","hide"],function(e,t){var i=Ce.fn[t];Ce.fn[t]=function(e,n,o){return null==e||"boolean"==typeof e?i.apply(this,arguments):this.animate(Y(t,!0),e,n,o)}}),Ce.each({slideDown:Y("show"),slideUp:Y("hide"),slideToggle:Y("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){Ce.fn[e]=function(e,i,n){return this.animate(t,e,i,n)}}),Ce.timers=[],Ce.fx.tick=function(){var e,t=0,i=Ce.timers;for(wt=Date.now();t<i.length;t++)(e=i[t])()||i[t]!==e||i.splice(t--,1);i.length||Ce.fx.stop(),wt=void 0},Ce.fx.timer=function(e){Ce.timers.push(e),Ce.fx.start()},Ce.fx.interval=13,Ce.fx.start=function(){St||(St=!0,z())},Ce.fx.stop=function(){St=null},Ce.fx.speeds={slow:600,fast:200,_default:400},Ce.fn.delay=function(e,t){return e=Ce.fx?Ce.fx.speeds[e]||e:e,t=t||"fx",this.queue(t,function(t,n){var o=i.setTimeout(t,e);n.stop=function(){i.clearTimeout(o)}})},function(){var e=ce.createElement("input"),t=ce.createElement("select"),i=t.appendChild(ce.createElement("option"));e.type="checkbox",we.checkOn=""!==e.value,we.optSelected=i.selected,e=ce.createElement("input"),e.value="t",e.type="radio",we.radioValue="t"===e.value}();var Ct,Mt=Ce.expr.attrHandle;Ce.fn.extend({attr:function(e,t){return Re(this,Ce.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){Ce.removeAttr(this,e)})}}),Ce.extend({attr:function(e,t,i){var n,o,r=e.nodeType;if(3!==r&&8!==r&&2!==r)return void 0===e.getAttribute?Ce.prop(e,t,i):(1===r&&Ce.isXMLDoc(e)||(o=Ce.attrHooks[t.toLowerCase()]||(Ce.expr.match.bool.test(t)?Ct:void 0)),void 0!==i?null===i?void Ce.removeAttr(e,t):o&&"set"in o&&void 0!==(n=o.set(e,i,t))?n:(e.setAttribute(t,i+""),i):o&&"get"in o&&null!==(n=o.get(e,t))?n:(n=Ce.find.attr(e,t),null==n?void 0:n))},attrHooks:{type:{set:function(e,t){if(!we.radioValue&&"radio"===t&&d(e,"input")){var i=e.value;return e.setAttribute("type",t),i&&(e.value=i),t}}}},removeAttr:function(e,t){var i,n=0,o=t&&t.match(We);if(o&&1===e.nodeType)for(;i=o[n++];)e.removeAttribute(i)}}),Ct={set:function(e,t,i){return!1===t?Ce.removeAttr(e,i):e.setAttribute(i,i),i}},Ce.each(Ce.expr.match.bool.source.match(/\w+/g),function(e,t){var i=Mt[t]||Ce.find.attr;Mt[t]=function(e,t,n){var o,r,a=t.toLowerCase();return n||(r=Mt[a],Mt[a]=o,o=null!=i(e,t,n)?a:null,Mt[a]=r),o}});var It=/^(?:input|select|textarea|button)$/i,xt=/^(?:a|area)$/i;Ce.fn.extend({prop:function(e,t){return Re(this,Ce.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each(function(){delete this[Ce.propFix[e]||e]})}}),Ce.extend({prop:function(e,t,i){var n,o,r=e.nodeType;if(3!==r&&8!==r&&2!==r)return 1===r&&Ce.isXMLDoc(e)||(t=Ce.propFix[t]||t,o=Ce.propHooks[t]),void 0!==i?o&&"set"in o&&void 0!==(n=o.set(e,i,t))?n:e[t]=i:o&&"get"in o&&null!==(n=o.get(e,t))?n:e[t]},propHooks:{tabIndex:{get:function(e){var t=Ce.find.attr(e,"tabindex");return t?parseInt(t,10):It.test(e.nodeName)||xt.test(e.nodeName)&&e.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),we.optSelected||(Ce.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),Ce.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){Ce.propFix[this.toLowerCase()]=this}),Ce.fn.extend({addClass:function(e){var t,i,n,o,r,a,s,l=0;if(Se(e))return this.each(function(t){Ce(this).addClass(e.call(this,t,te(this)))});if(t=ie(e),t.length)for(;i=this[l++];)if(o=te(i),n=1===i.nodeType&&" "+ee(o)+" "){for(a=0;r=t[a++];)n.indexOf(" "+r+" ")<0&&(n+=r+" ");s=ee(n),o!==s&&i.setAttribute("class",s)}return this},removeClass:function(e){var t,i,n,o,r,a,s,l=0;if(Se(e))return this.each(function(t){Ce(this).removeClass(e.call(this,t,te(this)))});if(!arguments.length)return this.attr("class","");if(t=ie(e),t.length)for(;i=this[l++];)if(o=te(i),n=1===i.nodeType&&" "+ee(o)+" "){for(a=0;r=t[a++];)for(;n.indexOf(" "+r+" ")>-1;)n=n.replace(" "+r+" "," ");s=ee(n),o!==s&&i.setAttribute("class",s)}return this},toggleClass:function(e,t){var i=typeof e,n="string"===i||Array.isArray(e);return"boolean"==typeof t&&n?t?this.addClass(e):this.removeClass(e):Se(e)?this.each(function(i){Ce(this).toggleClass(e.call(this,i,te(this),t),t)}):this.each(function(){var t,o,r,a;if(n)for(o=0,r=Ce(this),a=ie(e);t=a[o++];)r.hasClass(t)?r.removeClass(t):r.addClass(t);else void 0!==e&&"boolean"!==i||(t=te(this),t&&Be.set(this,"__className__",t),this.setAttribute&&this.setAttribute("class",t||!1===e?"":Be.get(this,"__className__")||""))})},hasClass:function(e){var t,i,n=0;for(t=" "+e+" ";i=this[n++];)if(1===i.nodeType&&(" "+ee(te(i))+" ").indexOf(t)>-1)return!0;return!1}});var Dt=/\r/g;Ce.fn.extend({val:function(e){var t,i,n,o=this[0];{if(arguments.length)return n=Se(e),this.each(function(i){var o;1===this.nodeType&&(o=n?e.call(this,i,Ce(this).val()):e,null==o?o="":"number"==typeof o?o+="":Array.isArray(o)&&(o=Ce.map(o,function(e){return null==e?"":e+""})),(t=Ce.valHooks[this.type]||Ce.valHooks[this.nodeName.toLowerCase()])&&"set"in t&&void 0!==t.set(this,o,"value")||(this.value=o))});if(o)return(t=Ce.valHooks[o.type]||Ce.valHooks[o.nodeName.toLowerCase()])&&"get"in t&&void 0!==(i=t.get(o,"value"))?i:(i=o.value,"string"==typeof i?i.replace(Dt,""):null==i?"":i)}}}),Ce.extend({valHooks:{option:{get:function(e){var t=Ce.find.attr(e,"value");return null!=t?t:ee(Ce.text(e))}},select:{get:function(e){var t,i,n,o=e.options,r=e.selectedIndex,a="select-one"===e.type,s=a?null:[],l=a?r+1:o.length;for(n=r<0?l:a?r:0;n<l;n++)if(i=o[n],(i.selected||n===r)&&!i.disabled&&(!i.parentNode.disabled||!d(i.parentNode,"optgroup"))){if(t=Ce(i).val(),a)return t;s.push(t)}return s},set:function(e,t){for(var i,n,o=e.options,r=Ce.makeArray(t),a=o.length;a--;)n=o[a],(n.selected=Ce.inArray(Ce.valHooks.option.get(n),r)>-1)&&(i=!0);return i||(e.selectedIndex=-1),r}}}}),Ce.each(["radio","checkbox"],function(){Ce.valHooks[this]={set:function(e,t){if(Array.isArray(t))return e.checked=Ce.inArray(Ce(e).val(),t)>-1}},we.checkOn||(Ce.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})}),we.focusin="onfocusin"in i;var Nt=/^(?:focusinfocus|focusoutblur)$/,_t=function(e){e.stopPropagation()};Ce.extend(Ce.event,{trigger:function(e,t,n,o){var r,a,s,l,d,c,u,p,m=[n||ce],f=Te.call(e,"type")?e.type:e,h=Te.call(e,"namespace")?e.namespace.split("."):[];if(a=p=s=n=n||ce,3!==n.nodeType&&8!==n.nodeType&&!Nt.test(f+Ce.event.triggered)&&(f.indexOf(".")>-1&&(h=f.split("."),f=h.shift(),h.sort()),d=f.indexOf(":")<0&&"on"+f,e=e[Ce.expando]?e:new Ce.Event(f,"object"==typeof e&&e),e.isTrigger=o?2:3,e.namespace=h.join("."),e.rnamespace=e.namespace?new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=void 0,e.target||(e.target=n),t=null==t?[e]:Ce.makeArray(t,[e]),u=Ce.event.special[f]||{},o||!u.trigger||!1!==u.trigger.apply(n,t))){if(!o&&!u.noBubble&&!Ee(n)){for(l=u.delegateType||f,Nt.test(l+f)||(a=a.parentNode);a;a=a.parentNode)m.push(a),s=a;s===(n.ownerDocument||ce)&&m.push(s.defaultView||s.parentWindow||i)}for(r=0;(a=m[r++])&&!e.isPropagationStopped();)p=a,e.type=r>1?l:u.bindType||f,c=(Be.get(a,"events")||{})[e.type]&&Be.get(a,"handle"),c&&c.apply(a,t),(c=d&&a[d])&&c.apply&&je(a)&&(e.result=c.apply(a,t),!1===e.result&&e.preventDefault());return e.type=f,o||e.isDefaultPrevented()||u._default&&!1!==u._default.apply(m.pop(),t)||!je(n)||d&&Se(n[f])&&!Ee(n)&&(s=n[d],s&&(n[d]=null),Ce.event.triggered=f,e.isPropagationStopped()&&p.addEventListener(f,_t),n[f](),e.isPropagationStopped()&&p.removeEventListener(f,_t),Ce.event.triggered=void 0,s&&(n[d]=s)),e.result}},simulate:function(e,t,i){var n=Ce.extend(new Ce.Event,i,{type:e,isSimulated:!0});Ce.event.trigger(n,null,t)}}),Ce.fn.extend({trigger:function(e,t){return this.each(function(){Ce.event.trigger(e,t,this)})},triggerHandler:function(e,t){var i=this[0];if(i)return Ce.event.trigger(e,t,i,!0)}}),we.focusin||Ce.each({focus:"focusin",blur:"focusout"},function(e,t){var i=function(e){Ce.event.simulate(t,e.target,Ce.event.fix(e))};Ce.event.special[t]={setup:function(){var n=this.ownerDocument||this,o=Be.access(n,t);o||n.addEventListener(e,i,!0),Be.access(n,t,(o||0)+1)},teardown:function(){var n=this.ownerDocument||this,o=Be.access(n,t)-1;o?Be.access(n,t,o):(n.removeEventListener(e,i,!0),Be.remove(n,t))}}});var At=i.location,Ot=Date.now(),Ut=/\?/;Ce.parseXML=function(e){var t;if(!e||"string"!=typeof e)return null;try{t=(new i.DOMParser).parseFromString(e,"text/xml")}catch(e){t=void 0}return t&&!t.getElementsByTagName("parsererror").length||Ce.error("Invalid XML: "+e),t};var Lt=/\[\]$/,Wt=/\r?\n/g,Pt=/^(?:submit|button|image|reset|file)$/i,Ht=/^(?:input|select|textarea|keygen)/i;Ce.param=function(e,t){var i,n=[],o=function(e,t){var i=Se(t)?t():t;n[n.length]=encodeURIComponent(e)+"="+encodeURIComponent(null==i?"":i)};if(Array.isArray(e)||e.jquery&&!Ce.isPlainObject(e))Ce.each(e,function(){o(this.name,this.value)});else for(i in e)ne(i,e[i],t,o);return n.join("&")},Ce.fn.extend({serialize:function(){return Ce.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=Ce.prop(this,"elements");return e?Ce.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!Ce(this).is(":disabled")&&Ht.test(this.nodeName)&&!Pt.test(e)&&(this.checked||!Qe.test(e))}).map(function(e,t){var i=Ce(this).val();return null==i?null:Array.isArray(i)?Ce.map(i,function(e){return{name:t.name,value:e.replace(Wt,"\r\n")}}):{name:t.name,value:i.replace(Wt,"\r\n")}}).get()}});var Rt=/%20/g,Ft=/#.*$/,Vt=/([?&])_=[^&]*/,jt=/^(.*?):[ \t]*([^\r\n]*)$/gm,Bt=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,qt=/^(?:GET|HEAD)$/,Gt=/^\/\//,Zt={},zt={},Xt="*/".concat("*"),Yt=ce.createElement("a");Yt.href=At.href,Ce.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:At.href,type:"GET",isLocal:Bt.test(At.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Xt,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":Ce.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?ae(ae(e,Ce.ajaxSettings),t):ae(Ce.ajaxSettings,e)},ajaxPrefilter:oe(Zt),ajaxTransport:oe(zt),ajax:function(e,t){function n(e,t,n,s){var d,p,m,y,w,S=t;c||(c=!0,l&&i.clearTimeout(l),o=void 0,a=s||"",E.readyState=e>0?4:0,d=e>=200&&e<300||304===e,n&&(y=se(f,E,n)),y=le(f,y,E,d),d?(f.ifModified&&(w=E.getResponseHeader("Last-Modified"),w&&(Ce.lastModified[r]=w),(w=E.getResponseHeader("etag"))&&(Ce.etag[r]=w)),204===e||"HEAD"===f.type?S="nocontent":304===e?S="notmodified":(S=y.state,p=y.data,m=y.error,d=!m)):(m=S,!e&&S||(S="error",e<0&&(e=0))),E.status=e,E.statusText=(t||S)+"",d?g.resolveWith(h,[p,S,E]):g.rejectWith(h,[E,S,m]),E.statusCode(b),b=void 0,u&&v.trigger(d?"ajaxSuccess":"ajaxError",[E,f,d?p:m]),T.fireWith(h,[E,S]),u&&(v.trigger("ajaxComplete",[E,f]),--Ce.active||Ce.event.trigger("ajaxStop")))}"object"==typeof e&&(t=e,e=void 0),t=t||{};var o,r,a,s,l,d,c,u,p,m,f=Ce.ajaxSetup({},t),h=f.context||f,v=f.context&&(h.nodeType||h.jquery)?Ce(h):Ce.event,g=Ce.Deferred(),T=Ce.Callbacks("once memory"),b=f.statusCode||{},y={},w={},S="canceled",E={readyState:0,getResponseHeader:function(e){var t;if(c){if(!s)for(s={};t=jt.exec(a);)s[t[1].toLowerCase()]=t[2];t=s[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return c?a:null},setRequestHeader:function(e,t){return null==c&&(e=w[e.toLowerCase()]=w[e.toLowerCase()]||e,y[e]=t),this},overrideMimeType:function(e){return null==c&&(f.mimeType=e),this},statusCode:function(e){var t;if(e)if(c)E.always(e[E.status]);else for(t in e)b[t]=[b[t],e[t]];return this},abort:function(e){var t=e||S;return o&&o.abort(t),n(0,t),this}};if(g.promise(E),f.url=((e||f.url||At.href)+"").replace(Gt,At.protocol+"//"),f.type=t.method||t.type||f.method||f.type,f.dataTypes=(f.dataType||"*").toLowerCase().match(We)||[""],null==f.crossDomain){d=ce.createElement("a");try{d.href=f.url,d.href=d.href,f.crossDomain=Yt.protocol+"//"+Yt.host!=d.protocol+"//"+d.host}catch(e){f.crossDomain=!0}}if(f.data&&f.processData&&"string"!=typeof f.data&&(f.data=Ce.param(f.data,f.traditional)),re(Zt,f,t,E),c)return E;u=Ce.event&&f.global,u&&0==Ce.active++&&Ce.event.trigger("ajaxStart"),f.type=f.type.toUpperCase(),f.hasContent=!qt.test(f.type),r=f.url.replace(Ft,""),f.hasContent?f.data&&f.processData&&0===(f.contentType||"").indexOf("application/x-www-form-urlencoded")&&(f.data=f.data.replace(Rt,"+")):(m=f.url.slice(r.length),f.data&&(f.processData||"string"==typeof f.data)&&(r+=(Ut.test(r)?"&":"?")+f.data,delete f.data),!1===f.cache&&(r=r.replace(Vt,"$1"),m=(Ut.test(r)?"&":"?")+"_="+Ot+++m),f.url=r+m),f.ifModified&&(Ce.lastModified[r]&&E.setRequestHeader("If-Modified-Since",Ce.lastModified[r]),Ce.etag[r]&&E.setRequestHeader("If-None-Match",Ce.etag[r])),(f.data&&f.hasContent&&!1!==f.contentType||t.contentType)&&E.setRequestHeader("Content-Type",f.contentType),E.setRequestHeader("Accept",f.dataTypes[0]&&f.accepts[f.dataTypes[0]]?f.accepts[f.dataTypes[0]]+("*"!==f.dataTypes[0]?", "+Xt+"; q=0.01":""):f.accepts["*"]);for(p in f.headers)E.setRequestHeader(p,f.headers[p]);if(f.beforeSend&&(!1===f.beforeSend.call(h,E,f)||c))return E.abort();if(S="abort",T.add(f.complete),E.done(f.success),E.fail(f.error),o=re(zt,f,t,E)){if(E.readyState=1,u&&v.trigger("ajaxSend",[E,f]),c)return E;f.async&&f.timeout>0&&(l=i.setTimeout(function(){E.abort("timeout")},f.timeout));try{c=!1,o.send(y,n)}catch(e){if(c)throw e;n(-1,e)}}else n(-1,"No Transport");return E},getJSON:function(e,t,i){return Ce.get(e,t,i,"json")},getScript:function(e,t){return Ce.get(e,void 0,t,"script")}}),Ce.each(["get","post"],function(e,t){Ce[t]=function(e,i,n,o){return Se(i)&&(o=o||n,n=i,i=void 0),Ce.ajax(Ce.extend({url:e,type:t,dataType:o,data:i,success:n},Ce.isPlainObject(e)&&e))}}),Ce._evalUrl=function(e){return Ce.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,throws:!0})},Ce.fn.extend({wrapAll:function(e){var t;return this[0]&&(Se(e)&&(e=e.call(this[0])),t=Ce(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){for(var e=this;e.firstElementChild;)e=e.firstElementChild;return e}).append(this)),this},wrapInner:function(e){return Se(e)?this.each(function(t){Ce(this).wrapInner(e.call(this,t))}):this.each(function(){var t=Ce(this),i=t.contents();i.length?i.wrapAll(e):t.append(e)})},wrap:function(e){var t=Se(e);return this.each(function(i){Ce(this).wrapAll(t?e.call(this,i):e)})},unwrap:function(e){return this.parent(e).not("body").each(function(){Ce(this).replaceWith(this.childNodes)}),this}}),Ce.expr.pseudos.hidden=function(e){return!Ce.expr.pseudos.visible(e)},Ce.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},Ce.ajaxSettings.xhr=function(){try{return new i.XMLHttpRequest}catch(e){}};var Jt={0:200,1223:204},$t=Ce.ajaxSettings.xhr();we.cors=!!$t&&"withCredentials"in $t,we.ajax=$t=!!$t,Ce.ajaxTransport(function(e){var t,n;if(we.cors||$t&&!e.crossDomain)return{send:function(o,r){var a,s=e.xhr();if(s.open(e.type,e.url,e.async,e.username,e.password),e.xhrFields)for(a in e.xhrFields)s[a]=e.xhrFields[a];e.mimeType&&s.overrideMimeType&&s.overrideMimeType(e.mimeType),e.crossDomain||o["X-Requested-With"]||(o["X-Requested-With"]="XMLHttpRequest");for(a in o)s.setRequestHeader(a,o[a]);t=function(e){return function(){t&&(t=n=s.onload=s.onerror=s.onabort=s.ontimeout=s.onreadystatechange=null,"abort"===e?s.abort():"error"===e?"number"!=typeof s.status?r(0,"error"):r(s.status,s.statusText):r(Jt[s.status]||s.status,s.statusText,"text"!==(s.responseType||"text")||"string"!=typeof s.responseText?{binary:s.response}:{text:s.responseText},s.getAllResponseHeaders()))}},s.onload=t(),n=s.onerror=s.ontimeout=t("error"),void 0!==s.onabort?s.onabort=n:s.onreadystatechange=function(){4===s.readyState&&i.setTimeout(function(){t&&n()})},t=t("abort");try{s.send(e.hasContent&&e.data||null)}catch(e){if(t)throw e}},abort:function(){t&&t()}}}),Ce.ajaxPrefilter(function(e){e.crossDomain&&(e.contents.script=!1)}),Ce.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return Ce.globalEval(e),e}}}),Ce.ajaxPrefilter("script",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")}),Ce.ajaxTransport("script",function(e){if(e.crossDomain){var t,i;return{send:function(n,o){t=Ce("<script>").prop({charset:e.scriptCharset,src:e.url}).on("load error",i=function(e){t.remove(),i=null,e&&o("error"===e.type?404:200,e.type)}),ce.head.appendChild(t[0])},abort:function(){i&&i()}}}});var Kt=[],Qt=/(=)\?(?=&|$)|\?\?/;Ce.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Kt.pop()||Ce.expando+"_"+Ot++;return this[e]=!0,e}}),Ce.ajaxPrefilter("json jsonp",function(e,t,n){var o,r,a,s=!1!==e.jsonp&&(Qt.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Qt.test(e.data)&&"data");if(s||"jsonp"===e.dataTypes[0])return o=e.jsonpCallback=Se(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,s?e[s]=e[s].replace(Qt,"$1"+o):!1!==e.jsonp&&(e.url+=(Ut.test(e.url)?"&":"?")+e.jsonp+"="+o),e.converters["script json"]=function(){return a||Ce.error(o+" was not called"),a[0]},e.dataTypes[0]="json",r=i[o],i[o]=function(){a=arguments},n.always(function(){void 0===r?Ce(i).removeProp(o):i[o]=r,e[o]&&(e.jsonpCallback=t.jsonpCallback,Kt.push(o)),a&&Se(r)&&r(a[0]),a=r=void 0}),"script"}),we.createHTMLDocument=function(){var e=ce.implementation.createHTMLDocument("").body;return e.innerHTML="<form></form><form></form>",2===e.childNodes.length}(),Ce.parseHTML=function(e,t,i){if("string"!=typeof e)return[];"boolean"==typeof t&&(i=t,t=!1);var n,o,r;return t||(we.createHTMLDocument?(t=ce.implementation.createHTMLDocument(""),n=t.createElement("base"),n.href=ce.location.href,t.head.appendChild(n)):t=ce),o=_e.exec(e),r=!i&&[],o?[t.createElement(o[1])]:(o=I([e],t,r),r&&r.length&&Ce(r).remove(),Ce.merge([],o.childNodes))},Ce.fn.load=function(e,t,i){var n,o,r,a=this,s=e.indexOf(" ");return s>-1&&(n=ee(e.slice(s)),e=e.slice(0,s)),Se(t)?(i=t,t=void 0):t&&"object"==typeof t&&(o="POST"),a.length>0&&Ce.ajax({url:e,type:o||"GET",dataType:"html",data:t}).done(function(e){r=arguments,a.html(n?Ce("<div>").append(Ce.parseHTML(e)).find(n):e)}).always(i&&function(e,t){a.each(function(){i.apply(this,r||[e.responseText,t,e])})}),this},Ce.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){Ce.fn[t]=function(e){return this.on(t,e)}}),Ce.expr.pseudos.animated=function(e){return Ce.grep(Ce.timers,function(t){return e===t.elem}).length},Ce.offset={setOffset:function(e,t,i){var n,o,r,a,s,l,d,c=Ce.css(e,"position"),u=Ce(e),p={};"static"===c&&(e.style.position="relative"),s=u.offset(),r=Ce.css(e,"top"),l=Ce.css(e,"left"),d=("absolute"===c||"fixed"===c)&&(r+l).indexOf("auto")>-1,d?(n=u.position(),a=n.top,o=n.left):(a=parseFloat(r)||0,o=parseFloat(l)||0),Se(t)&&(t=t.call(e,i,Ce.extend({},s))),null!=t.top&&(p.top=t.top-s.top+a),null!=t.left&&(p.left=t.left-s.left+o),"using"in t?t.using.call(e,p):u.css(p)}},Ce.fn.extend({offset:function(e){if(arguments.length)return void 0===e?this:this.each(function(t){Ce.offset.setOffset(this,e,t)});var t,i,n=this[0];if(n)return n.getClientRects().length?(t=n.getBoundingClientRect(),i=n.ownerDocument.defaultView,{top:t.top+i.pageYOffset,left:t.left+i.pageXOffset}):{top:0,left:0}},position:function(){if(this[0]){var e,t,i,n=this[0],o={top:0,left:0};if("fixed"===Ce.css(n,"position"))t=n.getBoundingClientRect();else{for(t=this.offset(),i=n.ownerDocument,e=n.offsetParent||i.documentElement;e&&(e===i.body||e===i.documentElement)&&"static"===Ce.css(e,"position");)e=e.parentNode;e&&e!==n&&1===e.nodeType&&(o=Ce(e).offset(),o.top+=Ce.css(e,"borderTopWidth",!0),o.left+=Ce.css(e,"borderLeftWidth",!0))}return{top:t.top-o.top-Ce.css(n,"marginTop",!0),left:t.left-o.left-Ce.css(n,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var e=this.offsetParent;e&&"static"===Ce.css(e,"position");)e=e.offsetParent;return e||ot})}}),Ce.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,t){var i="pageYOffset"===t;Ce.fn[e]=function(n){return Re(this,function(e,n,o){var r;if(Ee(e)?r=e:9===e.nodeType&&(r=e.defaultView),void 0===o)return r?r[t]:e[n];r?r.scrollTo(i?r.pageXOffset:o,i?o:r.pageYOffset):e[n]=o},e,n,arguments.length)}}),Ce.each(["top","left"],function(e,t){Ce.cssHooks[t]=F(we.pixelPosition,function(e,i){if(i)return i=R(e,t),pt.test(i)?Ce(e).position()[t]+"px":i})}),Ce.each({Height:"height",Width:"width"},function(e,t){Ce.each({padding:"inner"+e,content:t,"":"outer"+e},function(i,n){Ce.fn[n]=function(o,r){var a=arguments.length&&(i||"boolean"!=typeof o),s=i||(!0===o||!0===r?"margin":"border");return Re(this,function(t,i,o){var r;return Ee(t)?0===n.indexOf("outer")?t["inner"+e]:t.document.documentElement["client"+e]:9===t.nodeType?(r=t.documentElement,Math.max(t.body["scroll"+e],r["scroll"+e],t.body["offset"+e],r["offset"+e],r["client"+e])):void 0===o?Ce.css(t,i,s):Ce.style(t,i,o,s)},t,a?o:void 0,a)}})}),Ce.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,t){Ce.fn[t]=function(e,i){return arguments.length>0?this.on(t,null,e,i):this.trigger(t)}}),Ce.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),Ce.fn.extend({bind:function(e,t,i){return this.on(e,null,t,i)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,i,n){return this.on(t,e,i,n)},undelegate:function(e,t,i){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",i)}}),Ce.proxy=function(e,t){var i,n,o;if("string"==typeof t&&(i=e[t],t=e,e=i),Se(e))return n=pe.call(arguments,2),o=function(){return e.apply(t||this,n.concat(pe.call(arguments)))},o.guid=e.guid=e.guid||Ce.guid++,o},Ce.holdReady=function(e){e?Ce.readyWait++:Ce.ready(!0)},Ce.isArray=Array.isArray,Ce.parseJSON=JSON.parse,Ce.nodeName=d,Ce.isFunction=Se,Ce.isWindow=Ee,Ce.camelCase=T,Ce.type=s,Ce.now=Date.now,Ce.isNumeric=function(e){var t=Ce.type(e);return("number"===t||"string"===t)&&!isNaN(e-parseFloat(e))},n=[],void 0!==(o=function(){return Ce}.apply(t,n))&&(e.exports=o);var ei=i.jQuery,ti=i.$;return Ce.noConflict=function(e){return i.$===Ce&&(i.$=ti),e&&i.jQuery===Ce&&(i.jQuery=ei),Ce},r||(i.jQuery=i.$=Ce),Ce})},function(e,t,i){var n,o,r;!function(i,a){o=[t],n=a,void 0!==(r="function"==typeof n?n.apply(t,o):n)&&(e.exports=r)}(0,function(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var t,i,n="http://www.w3.org/2000/svg",o=[],r=function(e,t){var i={};return Object.keys(e).forEach(function(t){i[t]=e[t]}),t&&Object.keys(t).forEach(function(e){i[e]=t[e]}),i},a=function(e,t){return e.vnodeSelector===t.vnodeSelector&&(e.properties&&t.properties?e.properties.key===t.properties.key&&e.properties.bind===t.properties.bind:!e.properties&&!t.properties)},s=function(e){return{vnodeSelector:"",properties:void 0,children:void 0,text:e.toString(),domNode:null}},l=function(e,t,i){for(var n=0,o=t.length;n<o;n++){var r=t[n];Array.isArray(r)?l(e,r,i):null!==r&&void 0!==r&&(r.hasOwnProperty("vnodeSelector")||(r=s(r)),i.push(r))}},d=function(){throw new Error("Provide a transitions object to the projectionOptions to do animations")},c={namespace:void 0,eventHandlerInterceptor:void 0,styleApplyer:function(e,t,i){e.style[t]=i},transitions:{enter:d,exit:d}},u=function(e){return r(c,e)},p=function(e){if("string"!=typeof e)throw new Error("Style values must be strings")},m=function(e,t,i){if(t)for(var o=i.eventHandlerInterceptor,r=Object.keys(t),a=r.length,s=0;s<a;s++)!function(a){var s=r[a],l=t[s];if("className"===s)throw new Error('Property "className" is not supported, use "class".');if("class"===s)l.split(/\s+/).forEach(function(t){return e.classList.add(t)});else if("classes"===s)for(var d=Object.keys(l),c=d.length,u=0;u<c;u++){var m=d[u];l[m]&&e.classList.add(m)}else if("styles"===s)for(var f=Object.keys(l),h=f.length,u=0;u<h;u++){var v=f[u],g=l[v];g&&(p(g),i.styleApplyer(e,v,g))}else if("key"!==s&&null!==l&&void 0!==l){var T=typeof l;"function"===T?0===s.lastIndexOf("on",0)&&(o&&(l=o(s,l,e,t)),"oninput"===s&&function(){var e=l;l=function(t){e.apply(this,[t]),t.target["oninput-value"]=t.target.value}}(),e[s]=l):"string"===T&&"value"!==s&&"innerHTML"!==s?i.namespace===n&&"href"===s?e.setAttributeNS("http://www.w3.org/1999/xlink",s,l):e.setAttribute(s,l):e[s]=l}}(s)},f=function(e,t,i,o){if(i){for(var r=!1,a=Object.keys(i),s=a.length,l=0;l<s;l++){var d=a[l],c=i[d],u=t[d];if("class"===d){if(u!==c)throw new Error('"class" property may not be updated. Use the "classes" property for conditional css classes.')}else if("classes"===d)for(var m=e.classList,f=Object.keys(c),h=f.length,v=0;v<h;v++){var g=f[v],T=!!c[g],b=!!u[g];T!==b&&(r=!0,T?m.add(g):m.remove(g))}else if("styles"===d)for(var y=Object.keys(c),w=y.length,v=0;v<w;v++){var S=y[v],E=c[S],k=u[S];E!==k&&(r=!0,E?(p(E),o.styleApplyer(e,S,E)):o.styleApplyer(e,S,""))}else if(c||"string"!=typeof u||(c=""),"value"===d){var C=e[d];C!==c&&(e["oninput-value"]?C===e["oninput-value"]:c!==u)&&(e[d]=c,e["oninput-value"]=void 0),c!==u&&(r=!0)}else if(c!==u){var M=typeof c;if("function"===M)throw new Error("Functions may not be updated on subsequent renders (property: "+d+"). Hint: declare event handler functions outside the render() function.");"string"===M&&"innerHTML"!==d?o.namespace===n&&"href"===d?e.setAttributeNS("http://www.w3.org/1999/xlink",d,c):"role"===d&&""===c?e.removeAttribute(d):e.setAttribute(d,c):e[d]!==c&&(e[d]=c),r=!0}}return r}},h=function(e,t,i){if(""!==t.vnodeSelector)for(var n=i;n<e.length;n++)if(a(e[n],t))return n;return-1},v=function(e,t){if(e.properties){var i=e.properties.enterAnimation;i&&("function"==typeof i?i(e.domNode,e.properties):t.enter(e.domNode,e.properties,i))}},g=function(e,t){var i=e.domNode;if(e.properties){var n=e.properties.exitAnimation;if(n){i.style.pointerEvents="none";var o=function(){i.parentNode&&i.parentNode.removeChild(i)};return"function"==typeof n?void n(i,o,e.properties):void t.exit(e.domNode,e.properties,n,o)}}i.parentNode&&i.parentNode.removeChild(i)},T=function(e,t,i,n){var o=e[t];if(""!==o.vnodeSelector){var r=o.properties;if(!(r?void 0===r.key?r.bind:r.key:void 0))for(var s=0;s<e.length;s++)if(s!==t){var l=e[s];if(a(l,o))throw"added"===n?new Error(i.vnodeSelector+" had a "+o.vnodeSelector+" child added, but there is now more than one. You must add unique key properties to make them distinguishable."):new Error(i.vnodeSelector+" had a "+o.vnodeSelector+" child removed, but there were more than one. You must add unique key properties to make them distinguishable.")}}},b=function(e,n,r,s,l){if(r===s)return!1;r=r||o,s=s||o;for(var d,c=r.length,u=s.length,p=l.transitions,m=0,f=0,b=!1;f<u;){var y=m<c?r[m]:void 0,w=s[f];if(void 0!==y&&a(y,w))b=i(y,w,l)||b,m++;else{var S=h(r,w,m+1);if(S>=0){for(d=m;d<S;d++)g(r[d],p),T(r,d,e,"removed");b=i(r[S],w,l)||b,m=S+1}else t(w,n,m<c?r[m].domNode:void 0,l),v(w,p),T(s,f,e,"added")}f++}if(c>m)for(d=m;d<c;d++)g(r[d],p),T(r,d,e,"removed");return b},y=function(e,i,n){if(i)for(var o=0;o<i.length;o++)t(i[o],e,void 0,n)},w=function(e,t,i){y(e,t.children,i),t.text&&(e.textContent=t.text),m(e,t.properties,i),t.properties&&t.properties.afterCreate&&t.properties.afterCreate.apply(t.properties.bind||t.properties,[e,i,t.vnodeSelector,t.properties,t.children])};t=function(e,t,i,o){var a,s,l,d,c,u=0,p=e.vnodeSelector,m=t.ownerDocument;if(""===p)a=e.domNode=m.createTextNode(e.text),void 0!==i?t.insertBefore(a,i):t.appendChild(a);else{for(s=0;s<=p.length;++s)l=p.charAt(s),s!==p.length&&"."!==l&&"#"!==l||(d=p.charAt(u-1),c=p.slice(u,s),"."===d?a.classList.add(c):"#"===d?a.id=c:("svg"===c&&(o=r(o,{namespace:n})),void 0!==o.namespace?a=e.domNode=m.createElementNS(o.namespace,c):(a=e.domNode=e.domNode||m.createElement(c),"input"===c&&e.properties&&void 0!==e.properties.type&&a.setAttribute("type",e.properties.type)),void 0!==i?t.insertBefore(a,i):a.parentNode!==t&&t.appendChild(a)),u=s+1);w(a,e,o)}},i=function(e,t,i){var o=e.domNode,a=!1;if(e===t)return!1;var s=!1;if(""===t.vnodeSelector){if(t.text!==e.text){var l=o.ownerDocument.createTextNode(t.text);return o.parentNode.replaceChild(l,o),t.domNode=l,a=!0}}else 0===t.vnodeSelector.lastIndexOf("svg",0)&&(i=r(i,{namespace:n})),e.text!==t.text&&(s=!0,void 0===t.text?o.removeChild(o.firstChild):o.textContent=t.text),s=b(t,o,e.children,t.children,i)||s,s=f(o,e.properties,t.properties,i)||s,t.properties&&t.properties.afterUpdate&&t.properties.afterUpdate.apply(t.properties.bind||t.properties,[o,i,t.vnodeSelector,t.properties,t.children]);return s&&t.properties&&t.properties.updateAnimation&&t.properties.updateAnimation(o,t.properties,e.properties),t.domNode=e.domNode,a};var S=function(e,t){return{update:function(n){if(e.vnodeSelector!==n.vnodeSelector)throw new Error("The selector for the root VNode may not be changed. (consider using dom.merge and add one extra level to the virtual DOM)");i(e,n,t),e=n},domNode:e.domNode}};e.h=function(e){var t=arguments[1];if("string"!=typeof e)throw new Error;var i=1;!t||t.hasOwnProperty("vnodeSelector")||Array.isArray(t)||"object"!=typeof t?t=void 0:i=2;var n,o,r=arguments.length;if(r===i+1){var a=arguments[i];"string"==typeof a?n=a:void 0!==a&&null!==a&&1===a.length&&"string"==typeof a[0]&&(n=a[0])}if(void 0===n)for(o=[];i<r;i++){var d=arguments[i];null===d||void 0===d||(Array.isArray(d)?l(e,d,o):d.hasOwnProperty("vnodeSelector")?o.push(d):o.push(s(d)))}return{vnodeSelector:e,properties:t,children:o,text:""===n?void 0:n,domNode:null}},e.dom={create:function(e,i){return i=u(i),t(e,document.createElement("div"),void 0,i),S(e,i)},append:function(e,i,n){return n=u(n),t(i,e,void 0,n),S(i,n)},insertBefore:function(e,i,n){return n=u(n),t(i,e.parentNode,e,n),S(i,n)},merge:function(e,t,i){return i=u(i),t.domNode=e,w(e,t,i),S(t,i)},replace:function(e,i,n){return n=u(n),t(i,e.parentNode,e,n),e.parentNode.removeChild(e),S(i,n)}},e.createCache=function(){var e,t;return{invalidate:function(){t=void 0,e=void 0},result:function(i,n){if(e)for(var o=0;o<i.length;o++)e[o]!==i[o]&&(t=void 0);return t||(t=n(),e=i),t}}},e.createMapping=function(e,t,i){var n=[],o=[];return{results:o,map:function(r){for(var a=r.map(e),s=o.slice(),l=0,d=0;d<r.length;d++){var c=r[d],u=a[d];if(u===n[l])o[d]=s[l],i(c,s[l],d),l++;else{for(var p=!1,m=1;m<n.length+1;m++){var f=(l+m)%n.length;if(n[f]===u){o[d]=s[f],i(r[d],s[f],d),l=f+1,p=!0;break}}p||(o[d]=t(c,d))}}o.length=r.length,n=a}}},e.createProjector=function(t){var i,n=u(t);n.eventHandlerInterceptor=function(e,t,n,o){return function(){return i.scheduleRender(),t.apply(o.bind||this,arguments)}};var o,r=!0,a=!1,s=[],l=[],d=function(){if(o=void 0,r){r=!1;for(var e=0;e<s.length;e++){var t=l[e]();s[e].update(t)}r=!0}};return i={renderNow:d,scheduleRender:function(){o||a||(o=requestAnimationFrame(d))},stop:function(){o&&(cancelAnimationFrame(o),o=void 0),a=!0},resume:function(){a=!1,r=!0,i.scheduleRender()},append:function(t,i){s.push(e.dom.append(t,i(),n)),l.push(i)},insertBefore:function(t,i){s.push(e.dom.insertBefore(t,i(),n)),l.push(i)},merge:function(t,i){s.push(e.dom.merge(t,i(),n)),l.push(i)},replace:function(t,i){s.push(e.dom.replace(t,i(),n)),l.push(i)},detach:function(e){for(var t=0;t<l.length;t++)if(l[t]===e)return l.splice(t,1),s.splice(t,1)[0];throw new Error("renderMaquetteFunction was not found")}}}})},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TIMELINE_COLOR_R=14,t.TIMELINE_COLOR_G=30,t.TIMELINE_COLOR_B=86,t.TIMELINE_COLOR_STRING="rgb("+t.TIMELINE_COLOR_R+","+t.TIMELINE_COLOR_G+","+t.TIMELINE_COLOR_B+")",t.TIMELINE_SHADED_COLOR_R=200,t.TIMELINE_SHADED_COLOR_G=0,t.TIMELINE_SHADED_COLOR_B=0,t.TIMELINE_SHADED_COLOR_STRING="rgb("+t.TIMELINE_SHADED_COLOR_R+","+t.TIMELINE_SHADED_COLOR_G+","+t.TIMELINE_SHADED_COLOR_B+")",t.TIMELINE_HIGHLIGHT_COLOR_R=255,t.TIMELINE_HIGHLIGHT_COLOR_G=0,t.TIMELINE_HIGHLIGHT_COLOR_B=0,t.TIMELINE_HIGHLIGHT_COLOR_STRING="rgb("+t.TIMELINE_HIGHLIGHT_COLOR_R+","+t.TIMELINE_HIGHLIGHT_COLOR_G+","+t.TIMELINE_HIGHLIGHT_COLOR_B+")",t.TIMELINE_INTERMEDIATE_COLOR_R=42,t.TIMELINE_INTERMEDIATE_COLOR_G=178,t.TIMELINE_INTERMEDIATE_COLOR_B=191,t.TIMELINE_INTERMEDIATE_COLOR_STRING="rgb("+t.TIMELINE_INTERMEDIATE_COLOR_R+","+t.TIMELINE_INTERMEDIATE_COLOR_G+","+t.TIMELINE_INTERMEDIATE_COLOR_B+")",t.TIMELINE_WARNING_COLOR_R=242,t.TIMELINE_WARNING_COLOR_G=242,t.TIMELINE_WARNING_COLOR_B=0,t.TIMELINE_WARNING_COLOR_STRING="rgb("+t.TIMELINE_WARNING_COLOR_R+","+t.TIMELINE_WARNING_COLOR_G+","+t.TIMELINE_WARNING_COLOR_B+")",t.INTERACTION_AREA_BG_COLOR_STRING="rgb(233, 236, 239)",t.TIMELINE_MIN_WIDTH_PX=1150,t.TIMELINE_MIN_WIDTH_STRING=t.TIMELINE_MIN_WIDTH_PX+"px",t.TIMELINE_HEIGHT_PX=80,t.TIMELINE_HEIGHT_PX_STRING=""+t.TIMELINE_HEIGHT_PX},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){function i(e){var t=!1;return function(){t||(t=!0,window.Promise.resolve().then(function(){t=!1,e()}))}}function n(e){var t=!1;return function(){t||(t=!0,setTimeout(function(){t=!1,e()},ue))}}function o(e){var t={};return e&&"[object Function]"===t.toString.call(e)}function r(e,t){if(1!==e.nodeType)return[];var i=getComputedStyle(e,null);return t?i[t]:i}function a(e){return"HTML"===e.nodeName?e:e.parentNode||e.host}function s(e){if(!e)return document.body;switch(e.nodeName){case"HTML":case"BODY":return e.ownerDocument.body;case"#document":return e.body}var t=r(e),i=t.overflow,n=t.overflowX;return/(auto|scroll|overlay)/.test(i+t.overflowY+n)?e:s(a(e))}function l(e){return 11===e?he:10===e?ve:he||ve}function d(e){if(!e)return document.documentElement;for(var t=l(10)?document.body:null,i=e.offsetParent;i===t&&e.nextElementSibling;)i=(e=e.nextElementSibling).offsetParent;var n=i&&i.nodeName;return n&&"BODY"!==n&&"HTML"!==n?-1!==["TD","TABLE"].indexOf(i.nodeName)&&"static"===r(i,"position")?d(i):i:e?e.ownerDocument.documentElement:document.documentElement}function c(e){var t=e.nodeName;return"BODY"!==t&&("HTML"===t||d(e.firstElementChild)===e)}function u(e){return null!==e.parentNode?u(e.parentNode):e}function p(e,t){if(!(e&&e.nodeType&&t&&t.nodeType))return document.documentElement;var i=e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING,n=i?e:t,o=i?t:e,r=document.createRange();r.setStart(n,0),r.setEnd(o,0);var a=r.commonAncestorContainer;if(e!==a&&t!==a||n.contains(o))return c(a)?a:d(a);var s=u(e);return s.host?p(s.host,t):p(e,u(t).host)}function m(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"top",i="top"===t?"scrollTop":"scrollLeft",n=e.nodeName;if("BODY"===n||"HTML"===n){var o=e.ownerDocument.documentElement;return(e.ownerDocument.scrollingElement||o)[i]}return e[i]}function f(e,t){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=m(t,"top"),o=m(t,"left"),r=i?-1:1;return e.top+=n*r,e.bottom+=n*r,e.left+=o*r,e.right+=o*r,e}function h(e,t){var i="x"===t?"Left":"Top",n="Left"===i?"Right":"Bottom";return parseFloat(e["border"+i+"Width"],10)+parseFloat(e["border"+n+"Width"],10)}function v(e,t,i,n){return Math.max(t["offset"+e],t["scroll"+e],i["client"+e],i["offset"+e],i["scroll"+e],l(10)?i["offset"+e]+n["margin"+("Height"===e?"Top":"Left")]+n["margin"+("Height"===e?"Bottom":"Right")]:0)}function g(){var e=document.body,t=document.documentElement,i=l(10)&&getComputedStyle(t);return{height:v("Height",e,t,i),width:v("Width",e,t,i)}}function T(e){return ye({},e,{right:e.left+e.width,bottom:e.top+e.height})}function b(e){var t={};try{if(l(10)){t=e.getBoundingClientRect();var i=m(e,"top"),n=m(e,"left");t.top+=i,t.left+=n,t.bottom+=i,t.right+=n}else t=e.getBoundingClientRect()}catch(e){}var o={left:t.left,top:t.top,width:t.right-t.left,height:t.bottom-t.top},a="HTML"===e.nodeName?g():{},s=a.width||e.clientWidth||o.right-o.left,d=a.height||e.clientHeight||o.bottom-o.top,c=e.offsetWidth-s,u=e.offsetHeight-d;if(c||u){var p=r(e);c-=h(p,"x"),u-=h(p,"y"),o.width-=c,o.height-=u}return T(o)}function y(e,t){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=l(10),o="HTML"===t.nodeName,a=b(e),d=b(t),c=s(e),u=r(t),p=parseFloat(u.borderTopWidth,10),m=parseFloat(u.borderLeftWidth,10);i&&"HTML"===t.nodeName&&(d.top=Math.max(d.top,0),d.left=Math.max(d.left,0));var h=T({top:a.top-d.top-p,left:a.left-d.left-m,width:a.width,height:a.height});if(h.marginTop=0,h.marginLeft=0,!n&&o){var v=parseFloat(u.marginTop,10),g=parseFloat(u.marginLeft,10);h.top-=p-v,h.bottom-=p-v,h.left-=m-g,h.right-=m-g,h.marginTop=v,h.marginLeft=g}return(n&&!i?t.contains(c):t===c&&"BODY"!==c.nodeName)&&(h=f(h,t)),h}function w(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=e.ownerDocument.documentElement,n=y(e,i),o=Math.max(i.clientWidth,window.innerWidth||0),r=Math.max(i.clientHeight,window.innerHeight||0),a=t?0:m(i),s=t?0:m(i,"left");return T({top:a-n.top+n.marginTop,left:s-n.left+n.marginLeft,width:o,height:r})}function S(e){var t=e.nodeName;return"BODY"!==t&&"HTML"!==t&&("fixed"===r(e,"position")||S(a(e)))}function E(e){if(!e||!e.parentElement||l())return document.documentElement;for(var t=e.parentElement;t&&"none"===r(t,"transform");)t=t.parentElement;return t||document.documentElement}function k(e,t,i,n){var o=arguments.length>4&&void 0!==arguments[4]&&arguments[4],r={top:0,left:0},l=o?E(e):p(e,t);if("viewport"===n)r=w(l,o);else{var d=void 0;"scrollParent"===n?(d=s(a(t)),"BODY"===d.nodeName&&(d=e.ownerDocument.documentElement)):d="window"===n?e.ownerDocument.documentElement:n;var c=y(d,l,o);if("HTML"!==d.nodeName||S(l))r=c;else{var u=g(),m=u.height,f=u.width;r.top+=c.top-c.marginTop,r.bottom=m+c.top,r.left+=c.left-c.marginLeft,r.right=f+c.left}}return r.left+=i,r.top+=i,r.right-=i,r.bottom-=i,r}function C(e){return e.width*e.height}function M(e,t,i,n,o){var r=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0;if(-1===e.indexOf("auto"))return e;var a=k(i,n,r,o),s={top:{width:a.width,height:t.top-a.top},right:{width:a.right-t.right,height:a.height},bottom:{width:a.width,height:a.bottom-t.bottom},left:{width:t.left-a.left,height:a.height}},l=Object.keys(s).map(function(e){return ye({key:e},s[e],{area:C(s[e])})}).sort(function(e,t){return t.area-e.area}),d=l.filter(function(e){var t=e.width,n=e.height;return t>=i.clientWidth&&n>=i.clientHeight}),c=d.length>0?d[0].key:l[0].key,u=e.split("-")[1];return c+(u?"-"+u:"")}function I(e,t,i){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;return y(i,n?E(t):p(t,i),n)}function x(e){var t=getComputedStyle(e),i=parseFloat(t.marginTop)+parseFloat(t.marginBottom),n=parseFloat(t.marginLeft)+parseFloat(t.marginRight);return{width:e.offsetWidth+n,height:e.offsetHeight+i}}function D(e){var t={left:"right",right:"left",bottom:"top",top:"bottom"};return e.replace(/left|right|bottom|top/g,function(e){return t[e]})}function N(e,t,i){i=i.split("-")[0];var n=x(e),o={width:n.width,height:n.height},r=-1!==["right","left"].indexOf(i),a=r?"top":"left",s=r?"left":"top",l=r?"height":"width",d=r?"width":"height";return o[a]=t[a]+t[l]/2-n[l]/2,o[s]=i===s?t[s]-n[d]:t[D(s)],o}function _(e,t){return Array.prototype.find?e.find(t):e.filter(t)[0]}function A(e,t,i){if(Array.prototype.findIndex)return e.findIndex(function(e){return e[t]===i});var n=_(e,function(e){return e[t]===i});return e.indexOf(n)}function O(e,t,i){return(void 0===i?e:e.slice(0,A(e,"name",i))).forEach(function(e){e.function&&console.warn("`modifier.function` is deprecated, use `modifier.fn`!");var i=e.function||e.fn;e.enabled&&o(i)&&(t.offsets.popper=T(t.offsets.popper),t.offsets.reference=T(t.offsets.reference),t=i(t,e))}),t}function U(){if(!this.state.isDestroyed){var e={instance:this,styles:{},arrowStyles:{},attributes:{},flipped:!1,offsets:{}};e.offsets.reference=I(this.state,this.popper,this.reference,this.options.positionFixed),e.placement=M(this.options.placement,e.offsets.reference,this.popper,this.reference,this.options.modifiers.flip.boundariesElement,this.options.modifiers.flip.padding),e.originalPlacement=e.placement,e.positionFixed=this.options.positionFixed,e.offsets.popper=N(this.popper,e.offsets.reference,e.placement),e.offsets.popper.position=this.options.positionFixed?"fixed":"absolute",e=O(this.modifiers,e),this.state.isCreated?this.options.onUpdate(e):(this.state.isCreated=!0,this.options.onCreate(e))}}function L(e,t){return e.some(function(e){var i=e.name;return e.enabled&&i===t})}function W(e){for(var t=[!1,"ms","Webkit","Moz","O"],i=e.charAt(0).toUpperCase()+e.slice(1),n=0;n<t.length;n++){var o=t[n],r=o?""+o+i:e;if(void 0!==document.body.style[r])return r}return null}function P(){return this.state.isDestroyed=!0,L(this.modifiers,"applyStyle")&&(this.popper.removeAttribute("x-placement"),this.popper.style.position="",this.popper.style.top="",this.popper.style.left="",this.popper.style.right="",this.popper.style.bottom="",this.popper.style.willChange="",this.popper.style[W("transform")]=""),this.disableEventListeners(),this.options.removeOnDestroy&&this.popper.parentNode.removeChild(this.popper),this}function H(e){var t=e.ownerDocument;return t?t.defaultView:window}function R(e,t,i,n){var o="BODY"===e.nodeName,r=o?e.ownerDocument.defaultView:e;r.addEventListener(t,i,{passive:!0}),o||R(s(r.parentNode),t,i,n),n.push(r)}function F(e,t,i,n){i.updateBound=n,H(e).addEventListener("resize",i.updateBound,{passive:!0});var o=s(e);return R(o,"scroll",i.updateBound,i.scrollParents),i.scrollElement=o,i.eventsEnabled=!0,i}function V(){this.state.eventsEnabled||(this.state=F(this.reference,this.options,this.state,this.scheduleUpdate))}function j(e,t){return H(e).removeEventListener("resize",t.updateBound),t.scrollParents.forEach(function(e){e.removeEventListener("scroll",t.updateBound)}),t.updateBound=null,t.scrollParents=[],t.scrollElement=null,t.eventsEnabled=!1,t}function B(){this.state.eventsEnabled&&(cancelAnimationFrame(this.scheduleUpdate),this.state=j(this.reference,this.state))}function q(e){return""!==e&&!isNaN(parseFloat(e))&&isFinite(e)}function G(e,t){Object.keys(t).forEach(function(i){var n="";-1!==["width","height","top","right","bottom","left"].indexOf(i)&&q(t[i])&&(n="px"),e.style[i]=t[i]+n})}function Z(e,t){Object.keys(t).forEach(function(i){!1!==t[i]?e.setAttribute(i,t[i]):e.removeAttribute(i)})}function z(e){return G(e.instance.popper,e.styles),Z(e.instance.popper,e.attributes),e.arrowElement&&Object.keys(e.arrowStyles).length&&G(e.arrowElement,e.arrowStyles),e}function X(e,t,i,n,o){var r=I(o,t,e,i.positionFixed),a=M(i.placement,r,t,e,i.modifiers.flip.boundariesElement,i.modifiers.flip.padding);return t.setAttribute("x-placement",a),G(t,{position:i.positionFixed?"fixed":"absolute"}),i}function Y(e,t){var i=t.x,n=t.y,o=e.offsets.popper,r=_(e.instance.modifiers,function(e){return"applyStyle"===e.name}).gpuAcceleration;void 0!==r&&console.warn("WARNING: `gpuAcceleration` option moved to `computeStyle` modifier and will not be supported in future versions of Popper.js!");var a=void 0!==r?r:t.gpuAcceleration,s=d(e.instance.popper),l=b(s),c={position:o.position},u={left:Math.floor(o.left),top:Math.round(o.top),bottom:Math.round(o.bottom),right:Math.floor(o.right)},p="bottom"===i?"top":"bottom",m="right"===n?"left":"right",f=W("transform"),h=void 0,v=void 0;if(v="bottom"===p?-l.height+u.bottom:u.top,h="right"===m?-l.width+u.right:u.left,a&&f)c[f]="translate3d("+h+"px, "+v+"px, 0)",c[p]=0,c[m]=0,c.willChange="transform";else{var g="bottom"===p?-1:1,T="right"===m?-1:1;c[p]=v*g,c[m]=h*T,c.willChange=p+", "+m}var y={"x-placement":e.placement};return e.attributes=ye({},y,e.attributes),e.styles=ye({},c,e.styles),e.arrowStyles=ye({},e.offsets.arrow,e.arrowStyles),e}function J(e,t,i){var n=_(e,function(e){return e.name===t}),o=!!n&&e.some(function(e){return e.name===i&&e.enabled&&e.order<n.order});if(!o){var r="`"+t+"`",a="`"+i+"`";console.warn(a+" modifier is required by "+r+" modifier in order to work, be sure to include it before "+r+"!")}return o}function $(e,t){var i;if(!J(e.instance.modifiers,"arrow","keepTogether"))return e;var n=t.element;if("string"==typeof n){if(!(n=e.instance.popper.querySelector(n)))return e}else if(!e.instance.popper.contains(n))return console.warn("WARNING: `arrow.element` must be child of its popper element!"),e;var o=e.placement.split("-")[0],a=e.offsets,s=a.popper,l=a.reference,d=-1!==["left","right"].indexOf(o),c=d?"height":"width",u=d?"Top":"Left",p=u.toLowerCase(),m=d?"left":"top",f=d?"bottom":"right",h=x(n)[c];l[f]-h<s[p]&&(e.offsets.popper[p]-=s[p]-(l[f]-h)),l[p]+h>s[f]&&(e.offsets.popper[p]+=l[p]+h-s[f]),e.offsets.popper=T(e.offsets.popper);var v=l[p]+l[c]/2-h/2,g=r(e.instance.popper),b=parseFloat(g["margin"+u],10),y=parseFloat(g["border"+u+"Width"],10),w=v-e.offsets.popper[p]-b-y;return w=Math.max(Math.min(s[c]-h,w),0),e.arrowElement=n,e.offsets.arrow=(i={},be(i,p,Math.round(w)),be(i,m,""),i),e}function K(e){return"end"===e?"start":"start"===e?"end":e}function Q(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=Se.indexOf(e),n=Se.slice(i+1).concat(Se.slice(0,i));return t?n.reverse():n}function ee(e,t){if(L(e.instance.modifiers,"inner"))return e;if(e.flipped&&e.placement===e.originalPlacement)return e;var i=k(e.instance.popper,e.instance.reference,t.padding,t.boundariesElement,e.positionFixed),n=e.placement.split("-")[0],o=D(n),r=e.placement.split("-")[1]||"",a=[];switch(t.behavior){case Ee.FLIP:a=[n,o];break;case Ee.CLOCKWISE:a=Q(n);break;case Ee.COUNTERCLOCKWISE:a=Q(n,!0);break;default:a=t.behavior}return a.forEach(function(s,l){if(n!==s||a.length===l+1)return e;n=e.placement.split("-")[0],o=D(n);var d=e.offsets.popper,c=e.offsets.reference,u=Math.floor,p="left"===n&&u(d.right)>u(c.left)||"right"===n&&u(d.left)<u(c.right)||"top"===n&&u(d.bottom)>u(c.top)||"bottom"===n&&u(d.top)<u(c.bottom),m=u(d.left)<u(i.left),f=u(d.right)>u(i.right),h=u(d.top)<u(i.top),v=u(d.bottom)>u(i.bottom),g="left"===n&&m||"right"===n&&f||"top"===n&&h||"bottom"===n&&v,T=-1!==["top","bottom"].indexOf(n),b=!!t.flipVariations&&(T&&"start"===r&&m||T&&"end"===r&&f||!T&&"start"===r&&h||!T&&"end"===r&&v);(p||g||b)&&(e.flipped=!0,(p||g)&&(n=a[l+1]),b&&(r=K(r)),e.placement=n+(r?"-"+r:""),e.offsets.popper=ye({},e.offsets.popper,N(e.instance.popper,e.offsets.reference,e.placement)),e=O(e.instance.modifiers,e,"flip"))}),e}function te(e){var t=e.offsets,i=t.popper,n=t.reference,o=e.placement.split("-")[0],r=Math.floor,a=-1!==["top","bottom"].indexOf(o),s=a?"right":"bottom",l=a?"left":"top",d=a?"width":"height";return i[s]<r(n[l])&&(e.offsets.popper[l]=r(n[l])-i[d]),i[l]>r(n[s])&&(e.offsets.popper[l]=r(n[s])),e}function ie(e,t,i,n){var o=e.match(/((?:\-|\+)?\d*\.?\d*)(.*)/),r=+o[1],a=o[2];if(!r)return e;if(0===a.indexOf("%")){var s=void 0;switch(a){case"%p":s=i;break;case"%":case"%r":default:s=n}return T(s)[t]/100*r}if("vh"===a||"vw"===a){return("vh"===a?Math.max(document.documentElement.clientHeight,window.innerHeight||0):Math.max(document.documentElement.clientWidth,window.innerWidth||0))/100*r}return r}function ne(e,t,i,n){var o=[0,0],r=-1!==["right","left"].indexOf(n),a=e.split(/(\+|\-)/).map(function(e){return e.trim()}),s=a.indexOf(_(a,function(e){return-1!==e.search(/,|\s/)}));a[s]&&-1===a[s].indexOf(",")&&console.warn("Offsets separated by white space(s) are deprecated, use a comma (,) instead.");var l=/\s*,\s*|\s+/,d=-1!==s?[a.slice(0,s).concat([a[s].split(l)[0]]),[a[s].split(l)[1]].concat(a.slice(s+1))]:[a];return d=d.map(function(e,n){var o=(1===n?!r:r)?"height":"width",a=!1;return e.reduce(function(e,t){return""===e[e.length-1]&&-1!==["+","-"].indexOf(t)?(e[e.length-1]=t,a=!0,e):a?(e[e.length-1]+=t,a=!1,e):e.concat(t)},[]).map(function(e){return ie(e,o,t,i)})}),d.forEach(function(e,t){e.forEach(function(i,n){q(i)&&(o[t]+=i*("-"===e[n-1]?-1:1))})}),o}function oe(e,t){var i=t.offset,n=e.placement,o=e.offsets,r=o.popper,a=o.reference,s=n.split("-")[0],l=void 0;return l=q(+i)?[+i,0]:ne(i,r,a,s),"left"===s?(r.top+=l[0],r.left-=l[1]):"right"===s?(r.top+=l[0],r.left+=l[1]):"top"===s?(r.left+=l[0],r.top-=l[1]):"bottom"===s&&(r.left+=l[0],r.top+=l[1]),e.popper=r,e}function re(e,t){var i=t.boundariesElement||d(e.instance.popper);e.instance.reference===i&&(i=d(i));var n=W("transform"),o=e.instance.popper.style,r=o.top,a=o.left,s=o[n];o.top="",o.left="",o[n]="";var l=k(e.instance.popper,e.instance.reference,t.padding,i,e.positionFixed);o.top=r,o.left=a,o[n]=s,t.boundaries=l;var c=t.priority,u=e.offsets.popper,p={primary:function(e){var i=u[e];return u[e]<l[e]&&!t.escapeWithReference&&(i=Math.max(u[e],l[e])),be({},e,i)},secondary:function(e){var i="right"===e?"left":"top",n=u[i];return u[e]>l[e]&&!t.escapeWithReference&&(n=Math.min(u[i],l[e]-("right"===e?u.width:u.height))),be({},i,n)}};return c.forEach(function(e){var t=-1!==["left","top"].indexOf(e)?"primary":"secondary";u=ye({},u,p[t](e))}),e.offsets.popper=u,e}function ae(e){var t=e.placement,i=t.split("-")[0],n=t.split("-")[1];if(n){var o=e.offsets,r=o.reference,a=o.popper,s=-1!==["bottom","top"].indexOf(i),l=s?"left":"top",d=s?"width":"height",c={start:be({},l,r[l]),end:be({},l,r[l]+r[d]-a[d])};e.offsets.popper=ye({},a,c[n])}return e}function se(e){if(!J(e.instance.modifiers,"hide","preventOverflow"))return e;var t=e.offsets.reference,i=_(e.instance.modifiers,function(e){return"preventOverflow"===e.name}).boundaries;if(t.bottom<i.top||t.left>i.right||t.top>i.bottom||t.right<i.left){if(!0===e.hide)return e;e.hide=!0,e.attributes["x-out-of-boundaries"]=""}else{if(!1===e.hide)return e;e.hide=!1,e.attributes["x-out-of-boundaries"]=!1}return e}function le(e){var t=e.placement,i=t.split("-")[0],n=e.offsets,o=n.popper,r=n.reference,a=-1!==["left","right"].indexOf(i),s=-1===["top","left"].indexOf(i);return o[a?"left":"top"]=r[i]-(s?o[a?"width":"height"]:0),e.placement=D(t),e.offsets.popper=T(o),e}for(var de="undefined"!=typeof window&&"undefined"!=typeof document,ce=["Edge","Trident","Firefox"],ue=0,pe=0;pe<ce.length;pe+=1)if(de&&navigator.userAgent.indexOf(ce[pe])>=0){ue=1;break}var me=de&&window.Promise,fe=me?i:n,he=de&&!(!window.MSInputMethodContext||!document.documentMode),ve=de&&/MSIE 10/.test(navigator.userAgent),ge=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},Te=function(){function e(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,i,n){return i&&e(t.prototype,i),n&&e(t,n),t}}(),be=function(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e},ye=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},we=["auto-start","auto","auto-end","top-start","top","top-end","right-start","right","right-end","bottom-end","bottom","bottom-start","left-end","left","left-start"],Se=we.slice(3),Ee={FLIP:"flip",CLOCKWISE:"clockwise",COUNTERCLOCKWISE:"counterclockwise"},ke={shift:{order:100,enabled:!0,fn:ae},offset:{order:200,enabled:!0,fn:oe,offset:0},preventOverflow:{order:300,enabled:!0,fn:re,priority:["left","right","top","bottom"],padding:5,boundariesElement:"scrollParent"},keepTogether:{order:400,enabled:!0,fn:te},arrow:{order:500,enabled:!0,fn:$,element:"[x-arrow]"},flip:{order:600,enabled:!0,fn:ee,behavior:"flip",padding:5,boundariesElement:"viewport"},inner:{order:700,enabled:!1,fn:le},hide:{order:800,enabled:!0,fn:se},computeStyle:{order:850,enabled:!0,fn:Y,gpuAcceleration:!0,x:"bottom",y:"right"},applyStyle:{order:900,enabled:!0,fn:z,onLoad:X,gpuAcceleration:void 0}},Ce={placement:"bottom",positionFixed:!1,eventsEnabled:!0,removeOnDestroy:!1,onCreate:function(){},onUpdate:function(){},modifiers:ke},Me=function(){function e(t,i){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};ge(this,e),this.scheduleUpdate=function(){return requestAnimationFrame(n.update)},this.update=fe(this.update.bind(this)),this.options=ye({},e.Defaults,r),this.state={isDestroyed:!1,isCreated:!1,scrollParents:[]},this.reference=t&&t.jquery?t[0]:t,this.popper=i&&i.jquery?i[0]:i,this.options.modifiers={},Object.keys(ye({},e.Defaults.modifiers,r.modifiers)).forEach(function(t){n.options.modifiers[t]=ye({},e.Defaults.modifiers[t]||{},r.modifiers?r.modifiers[t]:{})}),this.modifiers=Object.keys(this.options.modifiers).map(function(e){return ye({name:e},n.options.modifiers[e])}).sort(function(e,t){return e.order-t.order}),this.modifiers.forEach(function(e){e.enabled&&o(e.onLoad)&&e.onLoad(n.reference,n.popper,n.options,e,n.state)}),this.update();var a=this.options.eventsEnabled;a&&this.enableEventListeners(),this.state.eventsEnabled=a}return Te(e,[{key:"update",value:function(){return U.call(this)}},{key:"destroy",value:function(){return P.call(this)}},{key:"enableEventListeners",value:function(){return V.call(this)}},{key:"disableEventListeners",value:function(){return B.call(this)}}]),e}();Me.Utils=("undefined"!=typeof window?window:e).PopperUtils,Me.placements=we,Me.Defaults=Ce,t.default=Me}.call(t,i(12))},function(e,t,i){"use strict";function n(e,t){void 0===e&&console.log("cannot read attribute: element is null");var i=e.attributes.getNamedItem(t);return null===i?(console.log("could not find attribute "+t+" on target"),console.log(e),0):parseInt(i.value)}function o(e,t){void 0===e&&console.log("cannot read attribute: element is null");var i=e.attributes.getNamedItem(t);return null===i?(console.log("could not find attribute "+t+" on target"),console.log(e),""):i.value}Object.defineProperty(t,"__esModule",{value:!0});var r=i(1),a=r.h,s=i(5),l=i(6);t.parseIntFromAttribute=n,t.parseStringFromAttribute=o,t.DEFAULT_EXCEPTION="unexpected error";var d=function(){function e(){this.tokyoMainDiv=document.getElementById("tokyo-main"),this.clientData={CurrentRevision:0,StatusText:"",SelectedTimeTableId:0,SelectedTimeTable:void 0,TimeStamp:void 0,TrackerEvent:s.TrackerEvent.ShowInitialClientData,TargetId:0,UpdatedName:"",UnboundTimeStamps:[],UpdatedRating:void 0,TimeTables:[],TimeTable:void 0,TimeTableSecondary:void 0,WorkUnitIdSource:0,WorkUnitIdTarget:0,TimeZones:[],CultureIds:[],WeekDayLetters:[],AbbreviatedMonths:[],StartDayOfWeekIndex:0,SelectedTimeZoneIdTimeStamps:"",SelectedTimeZoneIdView:"",SelectedCultureId:"",TimeNormTag:void 0,TargetWorkUnitId:0,TrackerClientFlags:[],TimeNormNoChildren:void 0,WorkUnit:void 0,UrlToReadOnly:"",UrlToReadAndEdit:"",ClientTimelineOffset:"",WorkUnitDurationString:"",TimeNormDurationString:""},this.renderTrackerApp=function(){return a("div",{afterCreate:e.TrackerAppInstance.createdTrackerAppHandler,styles:{flex:"1 1 100%",height:"100%","max-height":"100%",display:"flex","flex-flow":"column nowrap"}},e.TrackerAppInstance.client.renderMaquette())},this.createdTrackerAppHandler=function(t,i,n,o,r){e.TrackerAppInstance.client.recalculateTimelineBounds()},this.projector=r.createProjector(),this.client=new l.TokyoTrackerClient(this),this.clientVM=this.client.viewModel,this.controller=new s.TokyoController,this.controller.InitialClientDataJson((new Date).toString()).done(function(t){e.TrackerAppInstance.client.setupInitialDataStore(t)}).fail(function(){console.log("could not get data")}),document.addEventListener("DOMContentLoaded",function(){e.TrackerAppInstance.projector.append(e.TrackerAppInstance.tokyoMainDiv,e.TrackerAppInstance.renderTrackerApp),e.TrackerAppInstance.projector.scheduleRender()}),window.addEventListener("resize",function(){e.TrackerAppInstance.client.recalculateTimelineBounds()})}return e}();t.TokyoTrackerApp=d},function(e,t,i){"use strict";function n(e){for(var i in e)t.hasOwnProperty(i)||(t[i]=e[i])}Object.defineProperty(t,"__esModule",{value:!0}),n(i(17)),n(i(19)),n(i(20)),n(i(21)),n(i(22)),n(i(23)),n(i(24)),n(i(25)),n(i(26)),n(i(27)),n(i(28)),n(i(29))},function(e,t,i){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0});var n=i(7),o=i(1),r=o.h,a=i(4),s=i(30),l=i(32),d=i(5),c=i(33),u=i(3),p=i(2);i(35),i(36);var m,f,h,v;t.OFFLINE_N="Tn";var g=function(){function i(i){this.timeTableScrollDivElement=void 0,this.topBarGlobalizationButtonElement=void 0,this.timeTableScrollPaddingBottom="300px",this.activeSensorHandler=void 0,this.renderMaquette=function(){var e=0,t="",i=!1;void 0!==m.clientData.UnboundTimeStamps&&(e=m.clientData.UnboundTimeStamps.length,i=e%2==1,t=i?((e-1)/2).toString():(e/2).toString());var n,o=""!==m.clientData.ClientTimelineOffset,a=(h.viewModel.isSensorEnabled,{flex:"1 1 50px","border-color":"white","align-items":"center"}),s={flex:"1 1 50px","align-items":"center","border-color":"white"},d={flex:"1 1 50px","border-color":"white","align-items":"center"},c={flex:"1 1 50px","border-color":h.viewModel.isSensorEnabled?"brown":"white","align-items":"center"},u={flex:"1 1 50px","border-color":"white","align-items":"center"},g={flex:"1 1 50px","border-color":p.TIMELINE_COLOR_STRING,"align-items":"center","letter-spacing":"0.3px"},T={flex:"1 1 50px","border-color":p.TIMELINE_COLOR_STRING,"align-items":"center","margin-top":"-6px",padding:"0","text-align":"center","letter-spacing":"0.3px"},b={flex:"1 1 50px","align-items":"center",opacity:o?"1":"0.2","border-color":o?"brown":"white"};n=o?"("+m.clientData.ClientTimelineOffset+")":"";var y=!1,w=f.viewModel.offlineTimeStampCount>0;void 0!==m.clientData.SelectedTimeTable&&void 0!==m.clientData.SelectedTimeTable.TimeTableAndWorkUnits&&void 0!==m.clientData.SelectedTimeTable.TimeTableAndWorkUnits.WorkUnits&&(y=0==m.clientData.SelectedTimeTable.TimeTableAndWorkUnits.WorkUnits.length);var S={flex:"0 0 auto","padding-left":"12px","text-decoration":"underline","margin-right":"20px","margin-bottom":"0"},E=m.clientData.SelectedTimeTableId.toString();return r("div",{key:"client",styles:{position:"relative",flex:"1 1 99%",height:"99%","max-height":"99%","max-width":"100%",width:"100%",display:"flex","flex-flow":"column nowrap"},ontouchend:f.mouseUpGlobalTouchHandler,onmouseup:f.mouseUpGlobalPointerHandler,onmousemove:f.mouseGlobalMoveHandler},r("div",{key:"2",styles:{flex:"0 0 auto",display:"flex","flex-flow":"row nowrap","background-color":p.INTERACTION_AREA_BG_COLOR_STRING,"margin-bottom":"4px"}},r("button",{key:"a",type:"button",class:"btn btn-sm",onclick:f.createTimeStampClickHandler,styles:s},"⌚"),r("button",{key:"b",type:"button",class:"btn btn-sm",onclick:f.createManualTimeStampClickHandler,styles:a},"⌚…"),e>1&&i?r("button",{key:"c",type:"button",class:"btn btn-sm",onclick:f.processTimeStampsClickHandler,styles:g},"☷ (",r("b",null,t),"+½)"):e>1&&!i?r("button",{key:"c0",type:"button",class:"btn btn-sm",onclick:f.processTimeStampsClickHandler,styles:g},"☷ (",r("b",null,t),"+0)"):1==e?r("button",{disabled:!0,key:"c00",type:"button",class:"btn btn-sm",onclick:f.processTimeStampsClickHandler,styles:g},"☷ ",r("span",{styles:{opacity:"0"}},t),"(+½)"):void 0,f.viewModel.currentEditMode!==l.ClientEditMode.TimeTable?r("button",{key:"e",type:"button",class:"btn btn-sm",onclick:f.createTimeTableClickHandler,styles:d},r("p",{styles:{transform:"rotate(90deg)","margin-bottom":"0"}},"↷")):void 0,f.viewModel.currentEditMode!==l.ClientEditMode.TimeTable?r("button",{key:"f",type:"button",class:"btn btn-sm",onclick:f.toggleEnableSensorTimelime,styles:c},r("p",{styles:{"margin-bottom":"0"}},"<->")):void 0,r("button",{key:"h",type:"button",class:"btn btn-sm",onclick:f.globalizationSetupClickHandler,styles:b,afterCreate:f.globalizationButtonTopBarAfterCreateHandler},"🌐... ",n),r("button",{key:"i",type:"button",class:"btn btn-sm",onclick:f.toggleSmallDeviceView,styles:u},r("span",{styles:{transform:f.viewModel.isToggledTimeline?void 0:"rotate(-90deg)",display:"inline-block",transition:"all ease-in .2s","font-weight":"bold"}},"∇")),r("button",{key:"j",type:"button",class:"btn btn-sm",onclick:f.shareTimeTableClickHandler,styles:a},"✉…"),w?r("button",{key:"k",type:"button",class:"btn btn-sm",onclick:f.sendTimeStampsOfflineClickHandler,styles:s},"↑ (",f.viewModel.offlineTimeStampCount,")"):void 0),f.viewModel.isToggledTimeline?r("div",{key:"t3",styles:{display:"flex","flex-flow":"row nowrap","padding-bottom":"20px","margin-bottom":"5px","padding-top":"5px","border-bottom":"1px solid rgba(0, 0, 0, 0.1)","border-top":"1px solid rgba(0, 0, 0, 0.1)"}},r("div",{key:"0",styles:{flex:"1 1 100%",width:"100%",position:"relative","max-width":"100%"}},h.renderMaquette())):void 0,r("div",{key:"3",styles:{flex:"1 1 1px",display:"flex","flex-flow":"row nowrap",height:"100%"}},f.viewModel.isToggledTableOfContents?r("div",{key:"0",styles:{flex:"0 0 15%",height:"auto",width:"15%","max-width":"15%","overflow-x":"hidden","overflow-y":"scroll"}},v.renderMaquette()):void 0,r("div",{key:"1",styles:{flex:"1 1 100%",width:"100%","overflow-x":"scroll","overflow-y":"scroll"},onscroll:v.onContentPositionScrolledHandler,afterCreate:f.timeTableAfterCreateHandler},r("div",{key:"2",styles:{flex:"0 0 auto",display:"flex","flex-flow":"row nowrap"}},r("a",{key:"0",class:"anchor",name:"a_"+m.clientData.SelectedTimeTableId,tabindex:"-1"}),f.viewModel.currentEditMode===l.ClientEditMode.TimeTable?r("input",{key:"-1",value:f.viewModel.tempTimeTableName,oninput:f.timeTableNameChangedHandler,onblur:f.timeTableNameLostFocusHandler,onkeydown:f.timeTableNameKeyDownHandler,afterCreate:f.inputNameAfterCreateHandler,styles:S}):r("h3",{key:"-2",tid:E,onclick:f.tableNameClickedHandler,styles:S},m.clientData.SelectedTimeTable&&m.clientData.SelectedTimeTable.TimeTableAndWorkUnits?""+m.clientData.SelectedTimeTable.TimeTableAndWorkUnits.Name:void 0),f.viewModel.currentEditMode!==l.ClientEditMode.TimeTable&&y?r("button",{key:"3",type:"button",class:"btn btn-sm",onclick:f.removeTimeTableClickHandler,styles:{"margin-left":"20px",width:"35px"}},"✘"):void 0),r("div",{key:"-3",styles:{flex:"1 1 auto",height:"auto",position:"relative"}},f.viewModel.workUnitMapping.results.map(function(e){return e.renderMaquette()}),f.viewModel.currentEditMode!==l.ClientEditMode.TimeTable?r("button",{key:"1",type:"button",class:"btn btn-sm",onclick:f.createWorkUnitClickHandler,styles:{width:"35px","margin-left":"15px","margin-top":"1rem","margin-bottom":f.timeTableScrollPaddingBottom}},"+"):void 0))),f.viewModel.isToggledTimeline&&e>0?r("hr",{key:"hr1",styles:{"margin-bottom":"5px"}}):void 0,f.viewModel.isToggledTimeline&&e>0?r("div",{key:"4",styles:{display:"flex","flex-flow":"row wrap",flex:"0 0 auto",height:"auto","align-self":"flex-end","margin-bottom":"3px"}},f.viewModel.unboundTimeStampMapping.results.map(function(e){return e.renderMaquette()})):void 0,f.viewModel.isToggledTimeline&&e>1?r("div",{key:"6",styles:{flex:"0 0 auto","align-self":"flex-end"}},r("select",{key:"a",onchange:f.activeWorkUnitChangedHandler},r("option",{disabled:!0,key:"a",styles:{"font-weight":"bold"}},"Add new times to ..."),f.viewModel.tableWorkUnitSelectionMapping.results.map(function(e){return e.renderMaquette()})),i?r("button",{key:"b",type:"button",class:"btn btn-sm",onclick:f.processTimeStampsClickHandler,styles:T},"☷ (",r("b",null,t),"+½)"):r("button",{key:"b0",type:"button",class:"btn btn-sm",onclick:f.processTimeStampsClickHandler,styles:T},"☷ (",r("b",null,t),"+0)")):void 0,r("div",{key:"5"},f.renderEditTimeStampPopup()),r("div",{key:"7"},f.renderShareTimeTablePopup()),r("div",{key:"8"},f.renderGlobalizationPopup()),r("div",{key:"9"},f.renderChartPopup()),f.viewModel.isToggledSelectToc?r("div",{key:"10",styles:{flex:"0 0 auto"}},r("select",{key:"a",onchange:f.selectedTimeTableChangedHandler},f.viewModel.timeTableSelectionMapping.results.map(function(e){return e.renderMaquette()}))):void 0)},this.timelineShowAnimation=function(){if(void 0===h.timelineDivElement)return void console.log(a.DEFAULT_EXCEPTION);n.animate(h.timelineDivElement,"stop",!0);var e=911*(1-h.timelineDivElement.clientHeight/p.TIMELINE_HEIGHT_PX);n.animate(h.timelineDivElement,{height:p.TIMELINE_HEIGHT_PX},{duration:e,easing:"ease-in"})},this.timelineHideAnimation=function(){if(void 0===h.timelineDivElement)return void console.log(a.DEFAULT_EXCEPTION);if(n.animate(h.timelineDivElement,"stop",!0),void 0!==f.timeTableScrollDivElement&&f.timeTableScrollDivElement.scrollHeight>document.body.clientHeight+p.TIMELINE_HEIGHT_PX){var e=h.timelineDivElement.clientHeight/p.TIMELINE_HEIGHT_PX*911;n.animate(h.timelineDivElement,{height:0},{duration:e,easing:"ease-out"})}},this.timeStampTimeChangedHandler=function(e){var t=e.target.value;if(""!==t){var i=parseInt(t.slice(0,4)),n=parseInt(t.slice(5,7)),o=parseInt(t.slice(8,10)),r=parseInt(t.slice(11,13)),a=parseInt(t.slice(14,16));f.viewModel.tempEditedTimeStampHtmlInput=f.convertTimeForHtmlInput(i,n,o,r,a),f.viewModel.isTempEditedTimeStampChanged=!0}},this.convertHtmlInputToEditTimeStampVM=function(e,t){var i=parseInt(e.slice(0,4)),n=parseInt(e.slice(5,7)),o=parseInt(e.slice(8,10)),r=parseInt(e.slice(11,13)),a=parseInt(e.slice(14,16));return{Year:i,Month:n,Day:o,Hour:r,Minute:a,Second:0,Millisecond:0,StatusMessage:"",JsTimeString:new Date(i,n,o,r,a).toString(),TimeStampName:"UNSET_TIMESTAMP",ExactTicks:0,YearOld:i,MonthOld:n,DayOld:o,HourOld:r,MinuteOld:a,SecondOld:0,MillisecondOld:0,TimeStampId:t}},this.recalculateTimelineBounds=function(){h.viewModel.actualSpacePx=document.body.clientWidth,h.viewModel.isEnoughSpace=document.body.clientWidth>p.TIMELINE_MIN_WIDTH_PX,h.viewModel.isEnoughSpace?(h.viewModel.timelineMaxDayElements=14,h.viewModel.timelineMinZoomLevel=-1,h.viewModel.timelineMaxZoomLevel=20,h.viewModel.timelineZoomLevel=h.viewModel.timelineZoomLevel>h.viewModel.timelineMaxZoomLevel?h.viewModel.timelineMaxZoomLevel:h.viewModel.timelineZoomLevel<h.viewModel.timelineMinZoomLevel?h.viewModel.timelineMinZoomLevel:h.viewModel.timelineZoomLevel):h.viewModel.actualSpacePx>500?(h.viewModel.timelineMaxDayElements=8,h.viewModel.timelineMinZoomLevel=-1,h.viewModel.timelineMaxZoomLevel=10,h.viewModel.timelineZoomLevel=h.viewModel.timelineZoomLevel>h.viewModel.timelineMaxZoomLevel?h.viewModel.timelineMaxZoomLevel:h.viewModel.timelineZoomLevel<h.viewModel.timelineMinZoomLevel?h.viewModel.timelineMinZoomLevel:h.viewModel.timelineZoomLevel):(h.viewModel.timelineMaxDayElements=4,h.viewModel.timelineMinZoomLevel=-1,h.viewModel.timelineMaxZoomLevel=1,h.viewModel.timelineZoomLevel=h.viewModel.timelineZoomLevel>h.viewModel.timelineMaxZoomLevel?h.viewModel.timelineMaxZoomLevel:h.viewModel.timelineZoomLevel<h.viewModel.timelineMinZoomLevel?h.viewModel.timelineMinZoomLevel:h.viewModel.timelineZoomLevel),m.projector.scheduleRender()},this.convertHtmlInputToTimeStampVM=function(e){var t=parseInt(e.slice(0,4)),i=parseInt(e.slice(5,7)),n=parseInt(e.slice(8,10)),o=parseInt(e.slice(11,13)),r=parseInt(e.slice(14,16));return{Year:t,Month:i,Day:n,Hour:o,Minute:r,Second:0,Millisecond:0,StatusMessage:"",ManualDateTimeString:"",JsTimeString:new Date(t,i,n,o,r).toString(),TimeStampName:"UNSET_TIMESTAMP"}},this.convertTimeStampForHtmlInput=function(e){var t;t="Date"==typeof e?e:new Date(e);var i=t.getFullYear(),n=t.getMonth(),o=t.getDate(),r=t.getHours(),a=t.getMinutes();return f.convertTimeForHtmlInput(i,n+1,o,r,a)},this.convertTimeForHtmlInput=function(e,t,i,n,o){return e.toString()+"-"+(t<10?"0"+t:t.toString())+"-"+(i<10?"0"+i:i.toString())+"T"+(n<10?"0"+n:n.toString())+":"+(o<10?"0"+o:o.toString())},this.renderEditTimeStampPopup=function(){var e,t=f.viewModel.currentEditMode===l.ClientEditMode.EditTimeStamp||f.viewModel.currentEditMode===l.ClientEditMode.AddManualTimeStamp,i=t?f.viewModel.tempEditedTimeStampHtmlInput:"",n=!f.viewModel.isTempEditedTimeStampChanged&&f.viewModel.currentEditMode!==l.ClientEditMode.AddManualTimeStamp,o=""!==m.clientData.ClientTimelineOffset,a={display:o?void 0:"none",flex:"1 0 10%",width:"10%","min-width":"10%","border-color":"brown"};return e=o?"("+m.clientData.ClientTimelineOffset+")":"",r("div",{id:l.ClientEditMode[l.ClientEditMode.EditTimeStamp],styles:{display:t?"block":"none","background-color":"white",border:"solid black 1px","z-index":"2"}},r("form",null,r("div",{styles:{display:"flex","flex-flow":"row nowrap","min-width":"250px"}},n?r("button",{key:"a",role:"button",styles:{flex:"1 0 10%",width:"10%","min-width":"10%"},class:"btn btn-sm",onclick:f.duplicateTimeStampClickHandler},"x2"):r("button",{disabled:!0,key:"a0",role:"button",styles:{flex:"10% 1 0",width:"10%","min-width":"10%"},class:"btn btn-sm"},"x2"),r("button",{key:"b",type:"button",class:"btn btn-sm",onclick:f.globalizationSetupClickHandler,styles:a},"🌐 ",e),r("button",{key:"c",role:"button",styles:{flex:"1 0 10%",width:"10%","min-width":"10%","background-color":f.viewModel.isTempEditedTimeStampChanged?p.TIMELINE_INTERMEDIATE_COLOR_STRING:void 0},class:"btn btn-sm",onclick:f.saveEditTimeStampClickHandler},"✔"),r("button",{key:"d",role:"button",styles:{flex:"1 0 10%",width:"10%","min-width":"10%","background-color":f.viewModel.isTempEditedTimeStampChanged?p.TIMELINE_HIGHLIGHT_COLOR_STRING:void 0},class:"btn btn-sm",onclick:f.cancelEditTimeStampClickHandler},"x")),r("div",{class:"form-group"},r("input",{type:"datetime-local",class:"form-control",id:"editLocalTimeStamp1","aria-describedby":"timeStampHelp",value:i,oninput:f.timeStampTimeChangedHandler},r("small",{id:"timeStampHelp",class:"form-text text-muted"},"When does this show TODO.")))))},this.renderShareTimeTablePopup=function(){var e=f.viewModel.currentEditMode===l.ClientEditMode.ShareTimeTable;return r("div",{id:l.ClientEditMode[l.ClientEditMode.ShareTimeTable],styles:{display:e?"block":"none","background-color":"white",border:"solid black 1px","z-index":"2"}},r("form",null,r("div",{styles:{display:"flex","flex-flow":"row nowrap","min-width":"250px"}},r("button",{key:"b",role:"button",styles:{flex:"1 0 10%",width:"10%","min-width":"10%"},class:"btn btn-sm",onclick:f.cancelShareTimeTableClickHandler},"x")),r("div",{class:"form-group"},r("p",{key:"0",styles:{"margin-top":"1rem"}},m.clientData.UrlToReadOnly,r("span",null,r("button",{key:"a",type:"button",class:"btn btn-sm",onclick:f.logoutClickHandler},"🔒"))),r("button",{key:"b",type:"button",class:"btn btn-sm",onclick:f.exportToCSVClickHandler},"💾"),r("button",{key:"c",type:"button",class:"btn btn-sm",onclick:void 0},"Device Switch"),r("button",{key:"d",type:"button",class:"btn btn-sm",onclick:f.californiaClickHandler},"CALIFORNIA"))))},this.californiaClickHandler=function(e){window.location.assign(window.location.origin+"/california/")},this.renderGlobalizationPopup=function(){var e=f.viewModel.currentEditMode===l.ClientEditMode.GlobalizationSetup,t={width:"auto",height:"35px"},i={transform:"matrix(0, -1, -1, 0, 1, 1)",margin:"0"};return r("div",{id:l.ClientEditMode[l.ClientEditMode.GlobalizationSetup],styles:{display:e?"block":"none","background-color":"white",border:"solid black 1px","z-index":"2"}},r("form",null,r("div",{key:"0",styles:{display:"flex","flex-flow":"row nowrap","min-width":"250px"}},r("button",{key:"b",role:"button",styles:{flex:"1 0 10%",width:"10%","min-width":"10%"},class:"btn btn-sm",onclick:f.cancelGlobalizationSetupClickHandler},"x")),r("div",{key:"-1",styles:{flex:"0 0 auto",height:"auto",width:"33.33%",display:"flex"}},r("select",{key:"0",onchange:f.cultureChangedHandler,styles:{width:"auto",height:"35px"}},void 0!==m.clientData.CultureIds?m.clientData.CultureIds.map(function(e){var t=m.clientData.SelectedCultureId;return e.IdDotNet===t?r("option",{selected:!0,key:e.Key,value:e.Key.toString()},e.DisplayName):r("option",{key:e.Key,value:e.Key.toString()},e.DisplayName)}):void 0),""!==f.viewModel.lastCultureIdDotNet?r("button",{key:"a",type:"button",class:"btn btn-sm",onclick:f.selectLastSelectedCultureClickHandler,styles:t},r("span",{key:"0"},r("p",{styles:i},"↷"))):r("button",{disabled:!0,key:"a0",type:"button",class:"btn btn-sm",onclick:f.selectLastSelectedCultureClickHandler,styles:t},r("span",{key:"0"},r("p",{styles:i},"↷")))),r("div",{key:"-3",styles:{flex:"0 0 auto",height:"auto",width:"33.33%"}},r("select",{onchange:f.timeZoneViewChangedHandler},void 0===f.viewModel.selectedTimeZoneView?r("option",{key:"a",selected:!0},"Select view time zone..."):void 0,f.viewModel.timeZoneViewSelectionMapping.results.map(function(e){return e.renderMaquette()})),""!==f.viewModel.lastTimeZoneIdDotNet?r("button",{key:"a",type:"button",class:"btn btn-sm",onclick:f.selectLastSelectedTimeZoneClickHandler,styles:t},r("span",{key:"0"},r("p",{styles:i},"↷"))):r("button",{disabled:!0,key:"a0",type:"button",class:"btn btn-sm",onclick:f.selectLastSelectedTimeZoneClickHandler,styles:t},r("span",{key:"0"},r("p",{styles:i},"↷"))))))},this.renderChartPopup=function(){var e=f.viewModel.currentEditMode===l.ClientEditMode.DisplayChart;return r("div",{id:l.ClientEditMode[l.ClientEditMode.DisplayChart],styles:{display:e?"block":"none","background-color":"white",border:"solid black 1px","z-index":"2"}},r("form",null,r("div",{styles:{display:"flex","flex-flow":"row nowrap","min-width":"250px"}},r("button",{key:"b",role:"button",styles:{flex:"1 0 10%",width:"10%","min-width":"10%"},class:"btn btn-sm",onclick:f.cancelChartClickHandler},"x")),r("div",{key:"-4",styles:{flex:"0 0 auto",height:"auto",width:"auto","min-height":"200px"}},"GraphTODO")))},this.renderProductivityRating=function(e,t){(t<0||t>100)&&console.log("Invalid productivity rating.");var i=(t+.1)/100,n=3*i,o=Math.floor(n),a=3-o,s=[],l=!1;void 0!=f.viewModel.hoveredProductivityStarIndex&&void 0!=f.viewModel.hoveredProductivityTimeNormId&&(l=e==f.viewModel.hoveredProductivityTimeNormId);for(var d=0;d<o;d++){var c=(d+1)*(100/3),u=!1;l&&void 0!=f.viewModel.hoveredProductivityStarIndex&&(u=f.viewModel.hoveredProductivityStarIndex>=d&&f.viewModel.hoveredProductivityStarIndex<o||f.viewModel.hoveredProductivityStarIndex==d),s.push(r("span",{key:"a"+d.toString(),tid:e.toString(),wid:c.toPrecision(3),zid:d==o-1?"1":"0",xid:d.toString(),onclick:f.editProductivityRatingClickHandler,onmouseenter:f.enterProductivityRatingHandler,onmouseleave:f.exitProductivityRatingHandler,styles:{color:u?"rgb(42, 178, 191)":"rgb(14, 30, 86)"}},"★"))}for(var p=0;p<a;p++){var c=(o+p+1)*(100/3),u=!1;l&&void 0!=f.viewModel.hoveredProductivityStarIndex&&(u=o+p<=f.viewModel.hoveredProductivityStarIndex),s.push(r("span",{key:"b"+(o+p).toString(),tid:e.toString(),wid:c.toPrecision(3),zid:"0",xid:(o+p).toString(),onclick:f.editProductivityRatingClickHandler,onmouseenter:f.enterProductivityRatingHandler,onmouseleave:f.exitProductivityRatingHandler,styles:{color:u?"rgb(42, 178, 191)":"rgb(14, 30, 86)","-webkit-user-select":"none"},innerHTML:u?"&#9733;":"&#9734;"}))}return s},this.mouseUpGlobalTouchHandler=function(e){(h.viewModel.isTimelinePanning||h.viewModel.isTimelineInteracting)&&h.endTimelineInteraction(),f.viewModel.isDragging&&f.endDrag()},this.mouseUpGlobalPointerHandler=function(e){f.viewModel.isDragging&&f.endDrag()},this.logoutClickHandler=function(e){m.controller.LogoutAction().done(function(e){window.location.assign(window.location.origin+"/tokyo/")})},this.toggleSmallDeviceView=function(e){!1===f.viewModel.isToggledTimeline&&(f.viewModel.isExplicitlyToggledTimeline=!0),f.viewModel.isToggledTimeline=!f.viewModel.isToggledTimeline,f.viewModel.isToggledTableOfContents=!f.viewModel.isToggledTableOfContents,f.viewModel.isToggledDetailedTimeNorm=!f.viewModel.isToggledDetailedTimeNorm,f.viewModel.isToggledSelectToc=!f.viewModel.isToggledSelectToc},this.createTimeNormClickHandler=function(e){var t=a.parseIntFromAttribute(e.target,"wid"),i="";f.viewModel.isSendLocalTimezone&&(i=new Date(Date.now()).toString()),m.controller.CreateTimeNormJson(t,i).done(function(e){return f.UpdateData(e)})},this.workUnitDragClickHandler=function(e){var t=e.target;if(1==e.buttons){var i=a.parseIntFromAttribute(t,"wid");f.viewModel.isDragging=!0,f.viewModel.draggedElementPositionStartX=e.clientX,f.viewModel.draggedElementPositionStartY=e.clientY,f.dragUpdate(e.clientX,e.clientY),f.viewModel.draggedWorkUnitId=i,void 0!==f.timeTableScrollDivElement&&(f.timeTableScrollDivElement.scrollTop=0);var n=void 0,o=-1;if(void 0!==m.clientData.TimeTables){var r=m.clientData.TimeTables.find(function(e){var t=-1;return void 0!==e.TimeTableAndWorkUnits&&void 0!==e.TimeTableAndWorkUnits.WorkUnits&&(t=e.TimeTableAndWorkUnits.WorkUnits.findIndex(function(e){return e.WorkUnitId==i})),-1!=t&&(o=t,!0)});void 0!==r&&void 0!==r.TimeTableAndWorkUnits&&void 0!==r.TimeTableAndWorkUnits.WorkUnits&&o<r.TimeTableAndWorkUnits.WorkUnits.length-1&&(n=r.TimeTableAndWorkUnits.WorkUnits[o+1].WorkUnitId)}f.viewModel.draggedFollowUpWorkUnitId=void 0!==n?n:0}},this.mouseGlobalMoveHandler=function(e){f.viewModel.isDragging&&f.dragUpdate(e.clientX,e.clientY)},this.dragUpdate=function(e,t){f.viewModel.draggedElementPositionX=e-f.viewModel.draggedElementPositionStartX+15,f.viewModel.draggedElementPositionY=t-f.viewModel.draggedElementPositionStartY+15},this.workUnitMouseEnterHandler=function(e){if(f.viewModel.isDragging){var t=a.parseIntFromAttribute(e.target,"wid");f.viewModel.draggedWorkUnitId!=t&&f.viewModel.draggedFollowUpWorkUnitId!=t&&(f.viewModel.hoveredWorkUnitIdWhileDrag=t)}},this.workUnitMouseLeaveHandler=function(e){f.viewModel.hoveredWorkUnitIdWhileDrag=0},this.workUnitMouseUpHandler=function(e){0!=f.viewModel.draggedWorkUnitId&&0!=f.viewModel.hoveredWorkUnitIdWhileDrag&&m.controller.MoveWorkUnitBeforeWorkUnitJson(f.viewModel.draggedWorkUnitId,f.viewModel.hoveredWorkUnitIdWhileDrag).done(function(e){return f.UpdateData(e)}),f.endDrag()},this.endDrag=function(){f.viewModel.isDragging=!1,f.viewModel.draggedWorkUnitId=0,f.viewModel.draggedFollowUpWorkUnitId=0,f.viewModel.hoveredWorkUnitIdWhileDrag=0},this.createWorkUnitTableMapping=function(){return o.createMapping(function(e){return e.WorkUnitId},function(e){var t=[];void 0!==e.TimeNorms&&(t=e.TimeNorms);var i=f.createTimeNormTableMapping();i.map(t);var n=t.length>0,o=e.WorkUnitId==m.clientData.TargetWorkUnitId,a=e.WorkUnitId,s=e.WorkUnitId.toString(),l=e.Name,d=e.DurationString;return{renderMaquette:function(){var e=!1;void 0!==m.clientData.UnboundTimeStamps&&m.clientData.UnboundTimeStamps.length>0&&(e=!0);var t=a==f.viewModel.tempEditedWorkUnitId;o=a==m.clientData.TargetWorkUnitId;var c=a==f.viewModel.hoveredWorkUnitIdWhileDrag,u=a==f.viewModel.draggedWorkUnitId,p=""+l;return"< 1s"!==d&&(p=l+" ("+d+")"),r("div",{key:s,wid:s,styles:{flex:"0 0 auto",position:u?"absolute":"relative",left:u?f.viewModel.draggedElementPositionX+"px":void 0,top:u?f.viewModel.draggedElementPositionY+"px":void 0},onmouseenter:f.workUnitMouseEnterHandler,onmouseleave:f.workUnitMouseLeaveHandler,onmouseup:f.workUnitMouseUpHandler},c?r("div",{key:"-13",styles:{width:"20px",height:"2px","background-color":"black"}}):void 0,r("hr",{key:"-11"}),t?r("div",{key:"10"},r("input",{value:f.viewModel.tempWorkUnitName,oninput:f.workUnitNameChangedHandler,onblur:f.workUnitNameLostFocusHandler,onkeydown:f.workUnitNameKeyDownHandler,afterCreate:f.inputNameAfterCreateHandler})):r("div",{key:"0",styles:{display:"flex","flex-flow":"row nowrap"}},r("h4",{key:"h1",tid:s,onclick:f.workUnitNameClickedHandler,styles:{flex:"0 0 auto","padding-left":"12px"}},r("a",{class:"anchor",name:"a_"+v.viewModel.createSectionNumberingWorkUnit(m.clientData.SelectedTimeTableId,a),tabindex:"-1"}),o?"•":"",p),o?void 0:r("button",{key:"a",type:"button",class:"btn btn-sm",wid:s,onclick:f.activateWorkUnitClickHandler,styles:{"margin-left":"20px",width:"35px"}},"✔"),e?r("button",{disabled:!0,key:"b0",type:"button",class:"btn btn-sm",wid:s,onmousedown:f.createTimeNormClickHandler,styles:{"margin-left":"20px",width:"35px","font-size":"1.2","font-weight":"bold"}},"+"):r("button",{key:"b",type:"button",class:"btn btn-sm",wid:s,onmousedown:f.createTimeNormClickHandler,styles:{"margin-left":"20px",width:"35px"}},"+"),r("button",{key:"c",type:"button",class:"btn btn-sm",wid:s,onmousedown:f.workUnitDragClickHandler,styles:{"margin-left":"20px",width:"35px",cursor:"move"}},"≡"),n||o?void 0:r("button",{key:"d",type:"button",class:"btn btn-sm",wid:s,onclick:f.removeWorkUnitClickHandler,styles:{"margin-left":"20px",width:"35px"}},"✘")),r("hr",{key:"-12",styles:{"margin-bottom":"0"}}),f.viewModel.isDragging?void 0:i.results.map(function(e){return e.renderMaquette()}))},update:function(e){t=void 0!==e.TimeNorms?e.TimeNorms:[],i.map(t),n=t.length>0,o=e.WorkUnitId==m.clientData.TargetWorkUnitId,a=e.WorkUnitId,s=e.WorkUnitId.toString(),l=e.Name,d=e.DurationString}}},function(e,t){t.update(e)})},this.createTimeNormTableMapping=function(){return o.createMapping(function(e){return e.TimeNormId},function(e){var t="",i="",n="",o="";void 0!==e.StartTime&&("Date"==typeof e.StartTime.TrackedTimeForView?e.StartTime.TrackedTimeForView:new Date(e.StartTime.TrackedTimeForView),t=e.StartTime.DateString,n=e.StartTime.TimeString),void 0!==e.EndTime&&("Date"==typeof e.EndTime.TrackedTimeForView?e.EndTime.TrackedTimeForView:new Date(e.EndTime.TrackedTimeForView),i=e.EndTime.DateString,o=e.EndTime.TimeString);var a=e.TimeNormId.toString(),s=e.WorkUnitId.toString(),l=e.ProductivityRating,d=0,c=e.DurationString,u=e.Name,p="rgb("+e.ColorR+","+e.ColorG+","+e.ColorB+")";return{renderMaquette:function(){var h={flex:"1 1 auto",display:"flex","flex-flow":"row wrap"},g=void 0;if(void 0!==e.StartTime&&void 0!==e.EndTime){g=r("div",{styles:h,key:"4"},r("p",{key:"0",styles:{flex:"0 0 auto","margin-right":".5rem","margin-bottom":"0"},tid:e.StartTime.TimeStampId.toString(),wid:a,zid:"a",onclick:f.editTimeStampClickHandler},t," ",n)," - ",r("p",{key:"1",styles:{flex:"0 0 auto","margin-left":".5rem","margin-bottom":"0"},tid:e.EndTime.TimeStampId.toString(),wid:a,zid:"b",onclick:f.editTimeStampClickHandler},t!==i?i+" "+o:o));var T={flex:"0 0 30%","max-width":"30%","padding-left":"12px"},b={flex:"0 0 20px","max-width":"20px"},y={flex:"0 0 100px",width:"100px","padding-left":"5px","padding-right":"5px"},w={flex:"0 0 60px",width:"60px"},S={flex:"0 0 90px",width:"90px","margin-right":"20px"},E=e.TimeNormId==f.viewModel.tempEditedTimeNormId;return d=void 0!=l?l.ProductivityPercentage:0,r("div",{key:e.TimeNormId,styles:{display:"flex","flex-flow":"row nowrap",width:"100%","border-bottom":"1px solid rgba(14, 30, 86, 0.2)","padding-top":"5px"}},E?r("div",{key:"10",styles:T},r("input",{value:f.viewModel.tempTimeNormName,oninput:f.timeNormNameChangedHandler,onblur:f.timeNormNameLostFocusHandler,onkeydown:f.timeNormNameKeyDownHandler,afterCreate:f.inputNameAfterCreateHandler})):r("div",{tid:a,wid:s,key:"0",styles:T},r("div",null,r("p",{tid:a,wid:s,onclick:f.timeNormNameClickedHandler},r("a",{class:"anchor",name:"a_"+v.viewModel.createSectionNumberingTimeNorm(m.clientData.SelectedTimeTableId,e.WorkUnitId,e.TimeNormId),tabindex:"-1"}),u))),f.viewModel.isToggledDetailedTimeNorm?r("div",{key:"1",styles:b},f.renderColorPickerSelector(e.TimeNormId,p)):void 0,r("div",{key:"2",styles:y},c),r("div",{key:"3",styles:w},f.renderProductivityRating(e.TimeNormId,d)),f.viewModel.isToggledDetailedTimeNorm?r("div",{key:"4",styles:S},r("button",{key:"a",type:"button",class:"btn btn-sm",tid:a,onclick:f.focusTimeNormClickHandler,styles:{height:"35px",width:"35px"}},"🔍"),r("button",{key:"b",type:"button",class:"btn btn-sm",tid:a,onclick:f.unbindTimeNormClickHandler,styles:{height:"35px","margin-left":"20px",width:"35px"}},"↶")):void 0,g)}},update:function(e){c=e.DurationString,e.StartTime&&(t=e.StartTime.DateString,n=e.StartTime.TimeString),e.EndTime&&(i=e.EndTime.DateString,o=e.EndTime.TimeString),l=e.ProductivityRating,void 0!==l&&void 0!=e.ProductivityRating||(l=void 0),u=e.Name,p="rgb("+e.ColorR+","+e.ColorG+","+e.ColorB+")"}}},function(e,t){t.update(e)})},this.focusTimeNormClickHandler=function(e){var t=a.parseIntFromAttribute(e.target,"tid"),i=h.viewModel.timeNormTimeSpans.find(function(e){return e.timeNormId==t});if(void 0!==i&&void 0!==h.viewModel.timelineDateCenter){for(var n=h.viewModel.timelineDateCenter.getTime(),o=i.startTimeNumber>n,r=!1,s=0;!r;){if(n=h.viewModel.addFullDaysSameTime(new Date(n),o?1:-1).getTime(),o){if(i.startTimeNumber<n){r=!0;break}s+=1}else if(!o&&(s-=1,i.startTimeNumber>n)){r=!0;break}if(Math.abs(s)>1e3)break}if(h.viewModel.timelineCenterBias=h.viewModel.timelineCenterBias+s,0==s){var l=h.viewModel.timelineZoomLevel,d=h.viewModel.addFullDaysSameTime(h.viewModel.timelineDateCenter,h.viewModel.elementCountAwayFromCenter).getTime();i.endTimeNumber<d||console.log("end not in timeline TODO"),h.viewModel.timelineZoomLevel=l+0}h.viewModel.timelineElements=h.createTimelineElements(),h.viewModel.timelineElementMapping.map(h.viewModel.timelineElements)}},this.focusWorkUnitClickHandler=function(e){e.preventDefault()},this.renderColorPickerSelector=function(e,t){return r("div",{tid:""+e,afterCreate:f.divWithColorpickerAfterCreate,styles:{width:"20px",height:"20px","background-color":t}})},this.divWithColorpickerAfterCreate=function(t,i,n,o,r){var s=a.parseIntFromAttribute(t,"tid"),l=!1;e(t).ColorPicker({onSubmit:function(t,i,n,o){h.stopMarkerEditAnimation(s),m.controller.EditTimeNormJson(s,"",n.r,n.g,n.b).done(function(e){m.client.UpdateData(e)}),l=!0,e(o).ColorPickerHide()},onChange:function(e,t,i){},onHide:function(e){l||h.stopMarkerEditAnimation(s)},onBeforeShow:function(){l=!1;var t=h.viewModel.timeNormTimeSpans.find(function(e){return e.timeNormId==s});if(void 0===t)return void console.log("animation element undefined");var i=t.colorR,n=t.colorG,o=t.colorB;h.startMarkerEditAnimation(s),e(this).ColorPickerSetColor({r:i,g:n,b:o})}})},this.createUnboundTimeStampMapping=function(){return o.createMapping(function(e){return e.TimeStampId},function(e){var t="",i="";return"Date"==typeof e.TrackedTimeForView?e.TrackedTimeForView:new Date(e.TrackedTimeForView),t=e.DateString,i=e.TimeString,{renderMaquette:function(){var n=r("div",{styles:{display:"flex","flex-flow":"row nowrap"},key:"0"},r("div",{styles:{flex:"0 0 auto","padding-right":"5px","padding-left":"5px"},tid:e.TimeStampId.toString(),wid:"0",zid:"c",onclick:f.editTimeStampClickHandler},t," ",i),r("button",{styles:{flex:"0 0 auto",width:"35px"},key:"1",type:"button",tid:""+e.TimeStampId,class:"btn btn-sm btn-danger",onclick:f.removeTimeStampButtonClickHandler},"X"));return r("div",{key:e.TimeStampId,styles:{flex:"0 0 auto",color:e.IsBound?"blue":"red"}},n)},update:function(e){t=e.DateString,i=e.TimeString}}},function(e,t){t.update(e)})},this.unbindTimeNormClickHandler=function(e){var t=a.parseIntFromAttribute(e.target,"tid");m.controller.UnbindTimeNormJson(t).done(function(e){return f.UpdateData(e)})},this.inputNameAfterCreateHandler=function(e,t,i,n,o){e.focus()},this.globalizationButtonTopBarAfterCreateHandler=function(e,t,i,n,o){f.topBarGlobalizationButtonElement=e},this.timeTableAfterCreateHandler=function(e,t,i,n,o){f.timeTableScrollDivElement=e;f.timeTableScrollPaddingBottom=document.body.clientHeight-290+"px"},this.createTimeTableSelectionMapping=function(){return o.createMapping(function(e){return e.TimeTableAndWorkUnits?e.TimeTableAndWorkUnits.TimeTableId:0},function(e){var t="0";return e.TimeTableAndWorkUnits&&(t=e.TimeTableAndWorkUnits.TimeTableId.toString()),{renderMaquette:function(){var i="",n=!1;return e.TimeTableAndWorkUnits&&(i=e.TimeTableAndWorkUnits.Name,m.clientData.SelectedTimeTable&&m.clientData.SelectedTimeTable.TimeTableAndWorkUnits&&(n=m.clientData.SelectedTimeTable.TimeTableAndWorkUnits.TimeTableId==e.TimeTableAndWorkUnits.TimeTableId)),n?r("option",{key:t,value:t,selected:!0},i):r("option",{key:t,value:t},i)},update:function(e){}}},function(e,t){t.update(e)})},this.createTableWorkUnitSelectionMapping=function(){return o.createMapping(function(e){return e.TimeTableAndWorkUnits?e.TimeTableAndWorkUnits.TimeTableId:0},function(e){var t="0",i=[];void 0!==e.TimeTableAndWorkUnits&&(t=e.TimeTableAndWorkUnits.TimeTableId.toString(),void 0!==e.TimeTableAndWorkUnits.WorkUnits&&(i=e.TimeTableAndWorkUnits.WorkUnits));var n=f.createWorkUnitSelectionMapping();return n.map(i),{renderMaquette:function(){var i=[],o="";return e.TimeTableAndWorkUnits&&(o=e.TimeTableAndWorkUnits.Name),i.push(r("option",{disabled:!0,key:"t"+t,value:"t"+t},o)),i.push.apply(i,n.results.map(function(e){return e.renderMaquette()})),i},update:function(e){i=[],void 0!==e.TimeTableAndWorkUnits&&void 0!==e.TimeTableAndWorkUnits.WorkUnits&&(i=e.TimeTableAndWorkUnits.WorkUnits),n.map(i)}}},function(e,t){t.update(e)})},this.createWorkUnitSelectionMapping=function(){return o.createMapping(function(e){return e.WorkUnitId},function(e){var t=e.WorkUnitId.toString(),i="..."+e.Name;return{renderMaquette:function(){return e.WorkUnitId==m.clientData.TargetWorkUnitId?r("option",{selected:!0,key:"w"+t,value:t},i):r("option",{key:"w"+t,value:t},i)},update:function(e){i="..."+e.Name}}},function(e,t){t.update(e)})},this.removeWorkUnitClickHandler=function(e){var t=a.parseIntFromAttribute(e.target,"wid");m.controller.RemoveWorkUnitJson(t).done(function(e){return f.UpdateData(e)})},this.activateWorkUnitClickHandler=function(e){var t=a.parseIntFromAttribute(e.target,"wid");m.controller.SetWorkUnitAsDefaultTargetJson(t).done(function(e){return f.UpdateData(e)})},this.createTimeZoneMapping=function(e){return o.createMapping(function(e){return e.Key},function(t){return{renderMaquette:function(){var i=!1;switch(e){case l.TimeZoneSetting.Device:void 0!=f.viewModel.selectedTimeZoneDevice&&(i=f.viewModel.selectedTimeZoneDevice==t.Key);break;case l.TimeZoneSetting.View:void 0!=f.viewModel.selectedTimeZoneView&&(i=f.viewModel.selectedTimeZoneView==t.Key);break;case l.TimeZoneSetting.TimeStamp:void 0!=f.viewModel.selectedTimeZoneTimeStamp&&(i=f.viewModel.selectedTimeZoneTimeStamp==t.Key)}return i?r("option",{key:t.Key,value:t.Key.toString(),selected:!0},t.DisplayName):r("option",{key:t.Key,value:t.Key.toString()},t.DisplayName)},update:function(e){}}},function(e,t){t.update(e)})},this.createTimeStampClickHandler=function(e){e.preventDefault();var t="";f.viewModel.isSendLocalTimezone&&(t=new Date(Date.now()).toString()),m.controller.CreateTimeStampJson(t).done(function(e){a.TokyoTrackerApp.TrackerAppInstance.client.UpdateData(e)}).fail(function(e,t){0==e.status&&(f.createOfflineTimeStamp(new Date(Date.now()).getTime().toString()),m.projector.scheduleRender())})},this.createOfflineTimeStamp=function(e){var i=window.localStorage.getItem(t.OFFLINE_N),n=0;i&&(n=parseInt(i)),window.localStorage.setItem("T"+n.toString(),e),window.localStorage.setItem(t.OFFLINE_N,(n+1).toString()),f.viewModel.offlineTimeStampCount=parseInt(window.localStorage.getItem(t.OFFLINE_N))},this.sendTimeStampsOfflineClickHandler=function(e){var i=window.localStorage.getItem(t.OFFLINE_N);if(i){for(var n=parseInt(i),o=0;o<n;o++)!function(e){var t="T"+e,i=window.localStorage.getItem(t),n=void 0;null!==i&&(n=new Date(parseInt(i))),void 0!==n&&m.controller.CreateTimeStampManuallyPostJson(f.convertHtmlInputToTimeStampVM(f.convertTimeStampForHtmlInput(n))).done(function(e){f.UpdateData(e)}).fail(function(e,t){0==e.status&&void 0!==n&&(f.createOfflineTimeStamp(n.getTime().toString()),m.projector.scheduleRender())}),window.localStorage.removeItem(t)}(o);window.localStorage.removeItem(t.OFFLINE_N)}f.viewModel.offlineTimeStampCount=parseInt(window.localStorage.getItem(t.OFFLINE_N))},this.exportToCSVClickHandler=function(e){e.preventDefault(),m.clientData.SelectedTimeTable&&m.clientData.SelectedTimeTable.TimeTableAndWorkUnits&&window.location.assign("/tokyo/ExportTimeTableToCSV?timeTableId="+m.clientData.SelectedTimeTable.TimeTableAndWorkUnits.TimeTableId)},this.toggleAgendaViewClickHandler=function(e){e.preventDefault()},this.toggleReorderElementsClickHandler=function(e){e.preventDefault()},this.toggleEnableSensorTimelime=function(e){h.viewModel.isSensorEnabled=!h.viewModel.isSensorEnabled,h.viewModel.isSensorEnabled?(h.viewModel.isSensorCalibrated=!1,f.activeSensorHandler=f.processAccelerometer,console.log("registering motion sensor reader"),window.addEventListener("devicemotion",f.activeSensorHandler)):(console.log("stopping event..."),void 0!==f.activeSensorHandler&&window.removeEventListener("devicemotion",f.activeSensorHandler),h.viewModel.isSensorCalibrated=!1,h.viewModel.sensorDataCounter=0,h.viewModel.sensorDataCounterLastBiasChange=0,h.viewModel.sensorDataCounterLastZoomChange=0)},this.processAccelerometer=function(e){var t=void 0;if(null===e.accelerationIncludingGravity)return t="no accelerometer available",void window.removeEventListener("devicemotion",f.activeSensorHandler);if(h.viewModel.isSensorCalibrated)if(t="reading sensor data...",null!==e.accelerationIncludingGravity.x&&null!==e.accelerationIncludingGravity.y){if(h.viewModel.sensorDataCounter=h.viewModel.sensorDataCounter+1,h.viewModel.sensorXPrevious=h.viewModel.sensorXCurrent,h.viewModel.sensorXCurrent=e.accelerationIncludingGravity.x-h.viewModel.sensorXStart,h.viewModel.sensorXCurrent=h.viewModel.sensorXCurrent>.3?h.viewModel.sensorXCurrent-.3:h.viewModel.sensorXCurrent<-.3?h.viewModel.sensorXCurrent+.3:h.viewModel.sensorXCurrent,h.viewModel.sensorYPrevious=h.viewModel.sensorYCurrent,h.viewModel.sensorYCurrent=e.accelerationIncludingGravity.y-h.viewModel.sensorYStart,h.viewModel.sensorYCurrent=h.viewModel.sensorYCurrent>.3?h.viewModel.sensorYCurrent-.3:h.viewModel.sensorYCurrent<-.3?h.viewModel.sensorYCurrent+.3:h.viewModel.sensorYCurrent,null!==e.accelerationIncludingGravity.z&&(h.viewModel.sensorZPrevious=h.viewModel.sensorZCurrent,h.viewModel.sensorZCurrent=e.accelerationIncludingGravity.z-h.viewModel.sensorZStart),h.viewModel.sensorDataCounter%1==0){var i=!1,n=Math.trunc(h.viewModel.sensorYCurrent);(n>.5||n<-.5)&&(h.viewModel.sensorDataCounter-h.viewModel.sensorDataCounterLastBiasChange<20?n=0:(h.viewModel.sensorDataCounterLastBiasChange=h.viewModel.sensorDataCounter,i=!0)),h.viewModel.timelineCenterBias+=n;var o=Math.trunc(h.viewModel.sensorXCurrent);(o>.5||o<-.5)&&(h.viewModel.sensorDataCounter-h.viewModel.sensorDataCounterLastZoomChange<50?o=0:(h.viewModel.sensorDataCounterLastZoomChange=h.viewModel.sensorDataCounter,i=!0)),h.viewModel.timelineZoomLevel+=o,h.viewModel.timelineZoomLevel=h.viewModel.timelineZoomLevel>h.viewModel.timelineMaxZoomLevel?h.viewModel.timelineMaxZoomLevel:h.viewModel.timelineZoomLevel<h.viewModel.timelineMinZoomLevel?h.viewModel.timelineMinZoomLevel:h.viewModel.timelineZoomLevel,i&&(h.viewModel.timelineElements=h.createTimelineElements(),h.viewModel.timelineElementMapping.map(h.viewModel.timelineElements),m.projector.scheduleRender())}}else t="accelerationIncludingGravity data undefined";else t="calibrating sensor...",null!==e.accelerationIncludingGravity.x&&null!==e.accelerationIncludingGravity.y?(h.viewModel.sensorXStart=e.accelerationIncludingGravity.x,h.viewModel.sensorYStart=e.accelerationIncludingGravity.y,null!==e.accelerationIncludingGravity.z&&(h.viewModel.sensorZStart=e.accelerationIncludingGravity.z),h.viewModel.isSensorCalibrated=!0):t="calibration failed";h.viewModel.sensorStatus=t},this.createTimeTableClickHandler=function(e){e.preventDefault(),m.controller.CreateTimeTableJson().done(function(e){a.TokyoTrackerApp.TrackerAppInstance.client.UpdateData(e)})},this.createWorkUnitClickHandler=function(e){if(e.preventDefault(),m.clientData.SelectedTimeTable&&m.clientData.SelectedTimeTable.TimeTableAndWorkUnits){var t=e.target.attributes.getNamedItem("wid");if(null!==t){var i=parseInt(t.value);m.controller.CreateWorkUnitJson(m.clientData.SelectedTimeTable.TimeTableAndWorkUnits.TimeTableId).done(function(e){var t=0;void 0!==e.WorkUnit&&(t=e.WorkUnit.WorkUnitId),a.TokyoTrackerApp.TrackerAppInstance.client.UpdateData(e,!0),m.controller.MoveWorkUnitBeforeWorkUnitJson(t,i).done(function(e){a.TokyoTrackerApp.TrackerAppInstance.client.UpdateData(e)})})}else m.controller.CreateWorkUnitJson(m.clientData.SelectedTimeTable.TimeTableAndWorkUnits.TimeTableId).done(function(e){return f.UpdateData(e)})}else console.log("Error: No table selected.")},this.removeTimeTableClickHandler=function(e){e.preventDefault(),m.clientData.SelectedTimeTable&&m.clientData.SelectedTimeTable.TimeTableAndWorkUnits?m.controller.RemoveTimeTableJson(m.clientData.SelectedTimeTable.TimeTableAndWorkUnits.TimeTableId).done(function(e){a.TokyoTrackerApp.TrackerAppInstance.client.UpdateData(e)}):console.log("Error: No table selected.")},this.processTimeStampsClickHandler=function(e){e.preventDefault(),m.controller.ProcessTimeStampsJson().done(function(e){return f.UpdateData(e)})},this.removeTimeStampButtonClickHandler=function(e){e.preventDefault();var t=a.parseIntFromAttribute(e.target,"tid");m.controller.RemoveTimeStampJson(t).done(function(e){a.TokyoTrackerApp.TrackerAppInstance.client.UpdateData(e)})},this.updateWorkUnitMappingForSelectedTable=function(){void 0!==m.clientData.SelectedTimeTable&&void 0!==m.clientData.SelectedTimeTable.TimeTableAndWorkUnits&&void 0!==m.clientData.SelectedTimeTable.TimeTableAndWorkUnits.WorkUnits&&f.updateWorkUnitMapping(m.clientData.SelectedTimeTable.TimeTableAndWorkUnits.WorkUnits)},this.updateWorkUnitMapping=function(e){f.viewModel.updateWorkUnitsForTableMapping(e),h.updateWorkUnitMapping(e)},this.workUnitNameChangedHandler=function(e){f.viewModel.tempWorkUnitName=e.target.value},this.workUnitNameLostFocusHandler=function(e){f.updateWorkUnitNameHandler()},this.workUnitNameKeyDownHandler=function(e){13==e.keyCode?(e.preventDefault(),e.target.blur()):27==e.keyCode&&(e.preventDefault(),f.viewModel.tempWorkUnitName="",f.viewModel.tempEditedWorkUnitId=void 0,f.viewModel.currentEditMode=l.ClientEditMode.None,e.target.blur())},this.workUnitNameClickedHandler=function(e){if(e.preventDefault(),f.viewModel.currentEditMode===l.ClientEditMode.None){var t=a.parseStringFromAttribute(e.target,"tid"),i=parseInt(t);if(m.clientData.SelectedTimeTable&&m.clientData.SelectedTimeTable.TimeTableAndWorkUnits&&m.clientData.SelectedTimeTable.TimeTableAndWorkUnits.WorkUnits){var n=m.clientData.SelectedTimeTable.TimeTableAndWorkUnits.WorkUnits.find(function(e){return e.WorkUnitId==i});void 0!=n&&(f.viewModel.currentEditMode=l.ClientEditMode.WorkUnit,f.viewModel.tempWorkUnitName=n.Name,f.viewModel.tempEditedWorkUnitId=i)}}},this.timeTableNameChangedHandler=function(e){f.viewModel.tempTimeTableName=e.target.value},this.activeWorkUnitChangedHandler=function(e){var t=parseInt(e.target.value);m.controller.SetWorkUnitAsDefaultTargetJson(t).done(function(e){return f.UpdateData(e)})},this.timeNormNameChangedHandler=function(e){f.viewModel.tempTimeNormName=e.target.value},this.timeZoneViewChangedHandler=function(e){var t=e.target,i=void 0;if(void 0!==t.selectedOptions)1==t.selectedOptions.length&&(i=parseInt(t.selectedOptions[0].value));else if(t.selectedIndex<t.childElementCount){var n=t.options[t.selectedIndex];i=parseInt(n.value)}if(void 0!==i&&void 0!==m.clientData.TimeZones){var o=m.clientData.TimeZones.find(function(e){return e.Key==i});if(void 0!==o){var r=f.viewModel.lastTimeZoneIdDotNet;return f.viewModel.lastTimeZoneIdDotNet=m.clientData.SelectedTimeZoneIdView,m.clientData.SelectedTimeZoneIdView=o.IdDotNet,void m.controller.SetViewTimeZoneJson(o.IdDotNet).done(function(e){return f.UpdateData(e)}).fail(function(e){f.viewModel.lastTimeZoneIdDotNet=r})}}console.log("Error: reload page.")},this.cultureChangedHandler=function(e){var t=e.target,i=void 0;if(void 0!==t.selectedOptions)1==t.selectedOptions.length&&(i=parseInt(t.selectedOptions[0].value));else if(t.selectedIndex<t.childElementCount){var n=t.options[t.selectedIndex];i=parseInt(n.value)}if(void 0!==i&&void 0!==m.clientData.CultureIds){var o=m.clientData.CultureIds.find(function(e){return e.Key==i});if(void 0!==o){var r=f.viewModel.lastCultureIdDotNet;return f.viewModel.lastCultureIdDotNet=m.clientData.SelectedCultureId,m.clientData.SelectedCultureId=o.IdDotNet,m.controller.SetCultureJson(o.IdDotNet).done(function(e){return f.UpdateData(e)}).fail(function(e){f.viewModel.lastCultureIdDotNet=r}),void(f.viewModel.currentEditMode=l.ClientEditMode.None)}}console.log("Error: reload page.")},this.selectLastSelectedCultureClickHandler=function(){if(""!==f.viewModel.lastCultureIdDotNet&&""!==m.clientData.SelectedCultureId){var e=f.viewModel.lastCultureIdDotNet;return f.viewModel.lastCultureIdDotNet=m.clientData.SelectedCultureId,m.clientData.SelectedCultureId=e,m.controller.SetCultureJson(e).done(function(e){return f.UpdateData(e)}).fail(function(t){f.viewModel.lastCultureIdDotNet=e}),void(f.viewModel.currentEditMode=l.ClientEditMode.None)}},this.selectLastSelectedTimeZoneClickHandler=function(){if(""!==f.viewModel.lastTimeZoneIdDotNet&&""!==m.clientData.SelectedTimeZoneIdTimeStamps){var e=f.viewModel.lastTimeZoneIdDotNet;return f.viewModel.lastTimeZoneIdDotNet=m.clientData.SelectedTimeZoneIdView,m.clientData.SelectedTimeZoneIdView=e,m.controller.SetViewTimeZoneJson(e).done(function(e){return f.UpdateData(e)}).fail(function(t){f.viewModel.lastTimeZoneIdDotNet=e}),void(f.viewModel.currentEditMode=l.ClientEditMode.None)}},this.jumpToTimeTableClickHandler=function(e){var t=e.target,i=a.parseIntFromAttribute(t,"tid");m.clientData.SelectedTimeTableId!=i&&(e.preventDefault(),f.changeSelectedTimeTableAndUpdateTableOfContents(i))},this.changeSelectedTimeTableAndUpdateTableOfContents=function(e){if(void 0!==m.clientData.TimeTables&&m.clientData.SelectedTimeTableId!=e){var t=m.clientData.TimeTables.find(function(t){return!!t.TimeTableAndWorkUnits&&t.TimeTableAndWorkUnits.TimeTableId==e});if(void 0!==t&&void 0!==t.TimeTableAndWorkUnits&&void 0!==t.TimeTableAndWorkUnits.WorkUnits)return m.clientData.SelectedTimeTable=t,m.clientData.SelectedTimeTableId=e,f.updateWorkUnitMapping(t.TimeTableAndWorkUnits.WorkUnits),v.viewModel.activeSectionName=m.clientData.SelectedTimeTableId.toString(),void 0!==f.timeTableScrollDivElement&&void 0!==Object.getPrototypeOf(f.timeTableScrollDivElement).scrollTo&&(f.timeTableScrollDivElement.scrollTop=0),m.projector.renderNow(),void v.viewModel.updateTableOfContents(m.clientData.TimeTables,m.clientData.SelectedTimeTableId);console.log("Invalid table id.")}},this.selectedTimeTableChangedHandler=function(e){var t=e.target,i=void 0;if(void 0!==t.selectedOptions)1==t.selectedOptions.length&&(i=parseInt(t.selectedOptions[0].value));else if(t.selectedIndex<t.childElementCount){var n=t.options[t.selectedIndex];i=parseInt(n.value)}void 0!==i&&i!=m.clientData.SelectedTimeTableId&&f.changeSelectedTimeTableAndUpdateTableOfContents(i)},this.timeTableNameLostFocusHandler=function(e){f.updateTimeTableNameHandler()},this.timeNormNameLostFocusHandler=function(e){f.updateTimeNormNameHandler()},this.updateTimeNormNameHandler=function(){if(f.viewModel.currentEditMode===l.ClientEditMode.TimeNorm&&f.viewModel.tempEditedTimeNormId){if(""===f.viewModel.tempTimeNormName)return f.viewModel.currentEditMode=l.ClientEditMode.None,f.viewModel.tempEditedTimeNormId=void 0,f.viewModel.tempEditedTimeNormParentWorkUnitId=void 0,f.viewModel.tempTimeNormName="",f.viewModel.tempTimeNormColorR=0,f.viewModel.tempTimeNormColorG=0,void(f.viewModel.tempTimeNormColorB=0);f.viewModel.currentEditMode=l.ClientEditMode.Pending,m.controller.EditTimeNormJson(f.viewModel.tempEditedTimeNormId,f.viewModel.tempTimeNormName,f.viewModel.tempTimeNormColorR,f.viewModel.tempTimeNormColorG,f.viewModel.tempTimeNormColorB).done(function(e){f.UpdateData(e),f.viewModel.currentEditMode=l.ClientEditMode.None}).fail(function(e){return f.viewModel.currentEditMode=l.ClientEditMode.None}),f.viewModel.tempTimeNormName="",f.viewModel.tempTimeNormColorR=0,f.viewModel.tempTimeNormColorG=0,f.viewModel.tempTimeNormColorB=0,f.viewModel.tempEditedTimeNormId=void 0,f.viewModel.tempEditedTimeNormParentWorkUnitId=void 0}},this.updateWorkUnitNameHandler=function(){if(f.viewModel.currentEditMode===l.ClientEditMode.WorkUnit&&f.viewModel.tempEditedWorkUnitId){if(""===f.viewModel.tempWorkUnitName)return f.viewModel.currentEditMode=l.ClientEditMode.None,f.viewModel.tempWorkUnitName="",void(f.viewModel.tempEditedWorkUnitId=void 0);f.viewModel.currentEditMode=l.ClientEditMode.Pending,m.controller.EditWorkUnitJson(f.viewModel.tempEditedWorkUnitId,f.viewModel.tempWorkUnitName).done(function(e){f.UpdateData(e),f.viewModel.currentEditMode=l.ClientEditMode.None}).fail(function(e){return f.viewModel.currentEditMode=l.ClientEditMode.None}),f.viewModel.tempEditedWorkUnitId=void 0,f.viewModel.tempWorkUnitName=""}},this.updateTimeTableNameHandler=function(){if(f.viewModel.currentEditMode===l.ClientEditMode.TimeTable){if(""===f.viewModel.tempTimeTableName)return f.viewModel.currentEditMode=l.ClientEditMode.None,void(f.viewModel.tempTimeTableName="");void 0!==m.clientData.SelectedTimeTable&&void 0!==m.clientData.SelectedTimeTable.TimeTableAndWorkUnits&&(f.viewModel.currentEditMode=l.ClientEditMode.Pending,m.controller.EditTimeTableJson(m.clientData.SelectedTimeTable.TimeTableAndWorkUnits.TimeTableId,f.viewModel.tempTimeTableName).done(function(e){f.UpdateData(e),f.viewModel.currentEditMode=l.ClientEditMode.None}).fail(function(e){return f.viewModel.currentEditMode=l.ClientEditMode.None})),f.viewModel.tempTimeTableName=""}},this.timeTableNameKeyDownHandler=function(e){13==e.keyCode?(e.preventDefault(),e.target.blur()):27==e.keyCode&&(e.preventDefault(),f.viewModel.tempTimeTableName="",f.viewModel.currentEditMode=l.ClientEditMode.None,e.target.blur())},this.timeNormNameKeyDownHandler=function(e){13==e.keyCode?(e.preventDefault(),e.target.blur()):27==e.keyCode&&(e.preventDefault(),f.viewModel.tempTimeNormName="",f.viewModel.tempEditedTimeNormId=void 0,f.viewModel.tempEditedTimeNormParentWorkUnitId=void 0,f.viewModel.currentEditMode=l.ClientEditMode.None,e.target.blur())},this.cancelEditTimeStampClickHandler=function(e){e.preventDefault(),f.viewModel.currentEditMode!==l.ClientEditMode.EditTimeStamp&&f.viewModel.currentEditMode!==l.ClientEditMode.AddManualTimeStamp||(f.viewModel.tempEditedTimeStamp=void 0,f.viewModel.tempEditedTimeStampHtmlInput="",document.body.style.background="white",f.viewModel.currentEditMode=l.ClientEditMode.None,f.viewModel.isTempEditedTimeStampChanged=!1)},this.cancelShareTimeTableClickHandler=function(e){e.preventDefault(),f.viewModel.currentEditMode===l.ClientEditMode.ShareTimeTable&&(document.body.style.background="white",f.viewModel.currentEditMode=l.ClientEditMode.None)},this.cancelGlobalizationSetupClickHandler=function(e){e.preventDefault(),f.viewModel.currentEditMode===l.ClientEditMode.GlobalizationSetup&&(document.body.style.background="white",f.viewModel.currentEditMode=l.ClientEditMode.None)},this.cancelChartClickHandler=function(e){e.preventDefault(),f.viewModel.currentEditMode===l.ClientEditMode.DisplayChart&&(document.body.style.background="white",f.viewModel.currentEditMode=l.ClientEditMode.None)},this.editProductivityRatingClickHandler=function(e){e.preventDefault();var t=a.parseIntFromAttribute(e.target,"tid"),i=e.target.attributes.getNamedItem("wid"),n=0;null===i?console.log(a.DEFAULT_EXCEPTION):n=parseFloat(i.value),1==a.parseIntFromAttribute(e.target,"zid")&&(n=0),m.controller.EditProductivityRatingJson(t,n).done(function(e){f.UpdateData(e)}),f.viewModel.hoveredProductivityStarIndex=void 0,f.viewModel.hoveredProductivityTimeNormId=void 0},this.enterProductivityRatingHandler=function(e){e.preventDefault();var t=a.parseIntFromAttribute(e.target,"tid"),i=a.parseIntFromAttribute(e.target,"xid");f.viewModel.hoveredProductivityTimeNormId=t,f.viewModel.hoveredProductivityStarIndex=i},this.exitProductivityRatingHandler=function(e){f.viewModel.hoveredProductivityStarIndex=void 0,f.viewModel.hoveredProductivityTimeNormId=void 0},this.duplicateTimeStampClickHandler=function(e){e.preventDefault(),f.viewModel.currentEditMode===l.ClientEditMode.EditTimeStamp&&void 0!==f.viewModel.tempEditedTimeStamp&&m.controller.DuplicateTimeStampJson(f.viewModel.tempEditedTimeStamp.TimeStampId).done(function(e){f.UpdateData(e)}),f.viewModel.tempEditedTimeStamp=void 0,f.viewModel.tempEditedTimeStampHtmlInput="",document.body.style.background="white",f.viewModel.currentEditMode=l.ClientEditMode.None,f.viewModel.isTempEditedTimeStampChanged=!1},this.saveEditTimeStampClickHandler=function(e){e.preventDefault(),f.viewModel.currentEditMode===l.ClientEditMode.EditTimeStamp?void 0!==f.viewModel.tempEditedTimeStamp&&m.controller.EditTimeStampPostJson(f.convertHtmlInputToEditTimeStampVM(f.viewModel.tempEditedTimeStampHtmlInput,f.viewModel.tempEditedTimeStamp.TimeStampId)).done(function(e){f.UpdateData(e)}):f.viewModel.currentEditMode===l.ClientEditMode.AddManualTimeStamp&&m.controller.CreateTimeStampManuallyPostJson(f.convertHtmlInputToTimeStampVM(f.viewModel.tempEditedTimeStampHtmlInput)).done(function(e){f.UpdateData(e)}),f.viewModel.tempEditedTimeStamp=void 0,f.viewModel.tempEditedTimeStampHtmlInput="",document.body.style.background="white",f.viewModel.currentEditMode=l.ClientEditMode.None,f.viewModel.isTempEditedTimeStampChanged=!1},this.tableNameClickedHandler=function(e){if(e.preventDefault(),f.viewModel.currentEditMode===l.ClientEditMode.None){var t=a.parseStringFromAttribute(e.target,"tid");parseInt(t);void 0!==m.clientData.SelectedTimeTable&&void 0!==m.clientData.SelectedTimeTable.TimeTableAndWorkUnits&&(f.viewModel.currentEditMode=l.ClientEditMode.TimeTable,f.viewModel.tempTimeTableName=m.clientData.SelectedTimeTable.TimeTableAndWorkUnits.Name)}},this.timeNormNameClickedHandler=function(e){if(e.preventDefault(),f.viewModel.currentEditMode===l.ClientEditMode.None){var t=a.parseIntFromAttribute(e.target,"tid"),i=a.parseIntFromAttribute(e.target,"wid");if(m.clientData.SelectedTimeTable&&m.clientData.SelectedTimeTable.TimeTableAndWorkUnits&&m.clientData.SelectedTimeTable.TimeTableAndWorkUnits.WorkUnits){var n=m.clientData.SelectedTimeTable.TimeTableAndWorkUnits.WorkUnits.find(function(e){return e.WorkUnitId==i});if(void 0!==n&&void 0!==n.TimeNorms){var o=n.TimeNorms.find(function(e){return e.TimeNormId==t});if(o)return f.viewModel.currentEditMode=l.ClientEditMode.TimeNorm,f.viewModel.tempTimeNormName=o.Name,f.viewModel.tempEditedTimeNormId=t,f.viewModel.tempEditedTimeNormParentWorkUnitId=i,f.viewModel.tempTimeNormColorR=o.ColorR,f.viewModel.tempTimeNormColorG=o.ColorG,void(f.viewModel.tempTimeNormColorB=o.ColorB)}}}},this.createManualTimeStampClickHandler=function(e){if(e.preventDefault(),f.viewModel.currentEditMode===l.ClientEditMode.None){var t=new Date(Date.now());f.viewModel.tempEditedTimeStamp={TrackedTimeAtCreation:t,TrackedTimeForView:t,TimeStampId:0,BoundNormStart:void 0,BoundNormEnd:void 0,IsBound:!1,Name:"MANUAL_TIMESTAMP",TrackerStoreId:"",TimeZoneIdAtCreation:"UTC",UtcOffsetAtCreation:"0",IsNegativeUtcOffset:!1,AbsoluteOfUtcOffset:"0",TimeString:"UNSET_TIME",DateString:"UNSET_DATE"},f.viewModel.tempEditedTimeStampHtmlInput=f.convertTimeStampForHtmlInput(void 0!==h.viewModel.timelineDateCenter?h.viewModel.timelineDateCenter:f.viewModel.tempEditedTimeStamp.TrackedTimeForView),f.displayPopup(l.ClientEditMode.AddManualTimeStamp,e.target)}},this.timeZoneViewUpClickHandler=function(e){},this.timeZoneViewDownClickHandler=function(e){},this.shareTimeTableClickHandler=function(e){f.displayPopup(l.ClientEditMode.ShareTimeTable,e.target)},this.displayChartClickHandler=function(e){f.displayPopup(l.ClientEditMode.DisplayChart,e.target)},this.displayPopup=function(e,t){if(f.viewModel.currentEditMode===l.ClientEditMode.None||f.viewModel.currentEditMode===l.ClientEditMode.EditTimeStamp){var i=null;if(null!==(i=e===l.ClientEditMode.AddManualTimeStamp?document.getElementById(l.ClientEditMode[l.ClientEditMode.EditTimeStamp]):document.getElementById(l.ClientEditMode[e]))){f.viewModel.currentEditMode=e;new u.default(t,i,{placement:"bottom-start",modifiers:{preventOverflow:{boundariesElement:document.body}}});return document.body.style.backgroundColor="rgb(245, 245, 245)",void m.projector.renderNow()}console.log("reload page...")}},this.globalizationSetupClickHandler=function(e){f.displayPopup(l.ClientEditMode.GlobalizationSetup,f.topBarGlobalizationButtonElement)},this.editTimeStampClickHandler=function(e){if(f.viewModel.currentEditMode===l.ClientEditMode.None){var t=a.parseIntFromAttribute(e.target,"tid"),i=a.parseIntFromAttribute(e.target,"wid"),n=a.parseStringFromAttribute(e.target,"zid"),o="a"===n,r=void 0;if("c"===n)void 0!==m.clientData.UnboundTimeStamps&&(r=m.clientData.UnboundTimeStamps.find(function(e){return e.TimeStampId==t}));else if(m.clientData.SelectedTimeTable&&m.clientData.SelectedTimeTable.TimeTableAndWorkUnits&&m.clientData.SelectedTimeTable.TimeTableAndWorkUnits.WorkUnits){var s=-1,d=m.clientData.SelectedTimeTable.TimeTableAndWorkUnits.WorkUnits.find(function(e){if(void 0!==e.TimeNorms){var t=e.TimeNorms.findIndex(function(e){return e.TimeNormId==i});if(-1!=t)return s=t,!0}return!1});if(-1!=s&&d&&d.TimeNorms){var c=d.TimeNorms[s];c&&(r=o?c.StartTime:c.EndTime)}}return void 0!==r?(f.viewModel.tempEditedTimeStamp={TrackedTimeAtCreation:r.TrackedTimeAtCreation,TrackedTimeForView:r.TrackedTimeForView,TimeStampId:r.TimeStampId,BoundNormStart:r.BoundNormStart,BoundNormEnd:r.BoundNormEnd,IsBound:r.IsBound,Name:r.Name,TrackerStoreId:r.TrackerStoreId,TimeZoneIdAtCreation:"UTC",UtcOffsetAtCreation:"0",IsNegativeUtcOffset:!1,AbsoluteOfUtcOffset:"0",TimeString:r.TimeString,DateString:r.DateString},f.viewModel.tempEditedTimeStampHtmlInput=f.convertTimeStampForHtmlInput(f.viewModel.tempEditedTimeStamp.TrackedTimeForView),void f.displayPopup(l.ClientEditMode.EditTimeStamp,e.target)):void 0}},this.dataResponseCheck=function(e){return null==e?(console.log("invalid client data"),!1):null!==e.StatusText&&""!==e.StatusText?(console.log(e.StatusText),!1):!(void 0!==m.clientData&&e.CurrentRevision<m.clientData.CurrentRevision)||(console.log("Ignoring client data: revision is lower"),!1)},this.updateCultureAfterDataChanged=function(e,t,i){var n=new Date(2018,0,1,0,0,0,1),o=n.getDay();m.clientData.WeekDayLetters=[];for(var r=7-o,a=r;a<7;a++)m.clientData.WeekDayLetters.push(e[a]);for(var a=0;a<r;a++)m.clientData.WeekDayLetters.push(e[a]);m.clientData.StartDayOfWeekIndex=t+o,m.clientData.StartDayOfWeekIndex>6&&(m.clientData.StartDayOfWeekIndex-=7),m.clientData.AbbreviatedMonths=i},this.setupUiForDevice=function(){window.innerWidth<s.TIMELINE_MIN_WIDTH?(f.viewModel.isToggledTimeline=!1,f.viewModel.isToggledTableOfContents=!1,f.viewModel.isToggledDetailedTimeNorm=!1,f.viewModel.isToggledSelectToc=!0):(f.viewModel.isToggledTimeline=!0,f.viewModel.isToggledTableOfContents=!0,f.viewModel.isToggledDetailedTimeNorm=!0,f.viewModel.isToggledSelectToc=!1)},this.setupInitialDataStore=function(e){f.dataResponseCheck(e)&&(f.setupUiForDevice(),void 0!==e.TimeTables&&void 0!==e.UnboundTimeStamps&&void 0!==e.TimeZones?(m.clientData.TimeZones=e.TimeZones,m.clientData.CultureIds=e.CultureIds,m.clientData.SelectedCultureId=e.SelectedCultureId,m.clientData.SelectedTimeZoneIdTimeStamps=e.SelectedTimeZoneIdTimeStamps,m.clientData.SelectedTimeZoneIdView=e.SelectedTimeZoneIdView,m.clientData.ClientTimelineOffset=e.ClientTimelineOffset,f.updateCultureAfterDataChanged(e.WeekDayLetters,e.StartDayOfWeekIndex,e.AbbreviatedMonths),f.viewModel.updateTimeZonesMapping(m.clientData.TimeZones),f.viewModel.setTimeZone(m.clientData.SelectedTimeZoneIdTimeStamps,l.TimeZoneSetting.Device),f.viewModel.setTimeZone(m.clientData.SelectedTimeZoneIdView,l.TimeZoneSetting.View),m.clientData.UrlToReadOnly=e.UrlToReadOnly,m.clientData.UrlToReadAndEdit=e.UrlToReadAndEdit,m.clientData.TimeTables=e.TimeTables,m.clientData.TimeTables.map(function(e){return f.convertTableDataForClient(e)}),m.clientData.UnboundTimeStamps=e.UnboundTimeStamps,m.clientData.SelectedTimeTableId=e.SelectedTimeTableId,m.clientData.TargetWorkUnitId=e.TargetWorkUnitId,v.viewModel.activeSectionName=m.clientData.SelectedTimeTableId.toString(),f.updateTimeTablesAndUnboundAndTableOfContentsAndSelectedAfterDataChanged(),m.projector.scheduleRender()):console.log("missing client data"))},this.convertTableDataForClient=function(e){e.EarliestDateTimeInData=new Date(e.EarliestDateTimeInData),e.LatestDateTimeInData=new Date(e.LatestDateTimeInData),void 0!==e.TimeTableAndWorkUnits&&void 0!==e.TimeTableAndWorkUnits.WorkUnits&&e.TimeTableAndWorkUnits.WorkUnits.map(function(e){void 0!==e.TimeNorms&&e.TimeNorms.map(function(e){void 0!==e.StartTime&&(e.StartTime.TrackedTimeForView=new Date(e.StartTime.TrackedTimeForView),e.StartTime.TrackedTimeAtCreation=new Date(e.StartTime.TrackedTimeAtCreation)),void 0!==e.EndTime&&(e.EndTime.TrackedTimeForView=new Date(e.EndTime.TrackedTimeForView),e.EndTime.TrackedTimeAtCreation=new Date(e.EndTime.TrackedTimeAtCreation))})})},this.updateTimeTablesAndUnboundAndTableOfContentsAndSelectedAfterDataChanged=function(){if(void 0!==m.clientData.TimeTables){var e=m.clientData.TimeTables.find(function(e){return!!e.TimeTableAndWorkUnits&&e.TimeTableAndWorkUnits.TimeTableId==m.clientData.SelectedTimeTableId});m.clientData.SelectedTimeTable=e,f.viewModel.updateTimeTablesMapping(m.clientData.TimeTables),void 0!==m.clientData.SelectedTimeTable&&void 0!==m.clientData.SelectedTimeTable.TimeTableAndWorkUnits&&void 0!==m.clientData.SelectedTimeTable.TimeTableAndWorkUnits.WorkUnits?(f.updateWorkUnitMappingForSelectedTable(),m.clientData.SelectedTimeTable.TimeTableAndWorkUnits.WorkUnits.length>0&&v.viewModel.updateTreeForActiveSection(m.clientData.SelectedTimeTableId.toString())):f.updateWorkUnitMapping([]),v.viewModel.updateTableOfContents(m.clientData.TimeTables,m.clientData.SelectedTimeTableId)}void 0!==m.clientData.UnboundTimeStamps&&(m.clientData.UnboundTimeStamps.map(function(e){e.TrackedTimeForView=new Date(e.TrackedTimeForView),e.TrackedTimeAtCreation=new Date(e.TrackedTimeAtCreation)}),f.viewModel.updateUnboundTimeStampMapping(m.clientData.UnboundTimeStamps))},this.UpdateData=function(e,t){if(void 0===t&&(t=!1),f.dataResponseCheck(e)){var i=!1;switch(e.TrackerEvent){case d.TrackerEvent.CreateTimeStamp:case d.TrackerEvent.CreateTimeStampManually:void 0!==e.TimeStamp&&void 0!==m.clientData.UnboundTimeStamps&&-1==m.clientData.UnboundTimeStamps.findIndex(function(t){return void 0!==e.TimeStamp&&t.TimeStampId==e.TimeStamp.TimeStampId})&&(e.TimeStamp.TrackedTimeForView=new Date(e.TimeStamp.TrackedTimeForView),e.TimeStamp.TrackedTimeAtCreation=new Date(e.TimeStamp.TrackedTimeAtCreation),m.clientData.UnboundTimeStamps.push(e.TimeStamp),f.viewModel.updateUnboundTimeStampMapping(m.clientData.UnboundTimeStamps),i=!0);break;case d.TrackerEvent.DuplicateTimeStamp:void 0!==e.TimeStamp&&void 0!==m.clientData.UnboundTimeStamps&&(e.TimeStamp.TrackedTimeForView=new Date(e.TimeStamp.TrackedTimeForView),e.TimeStamp.TrackedTimeAtCreation=new Date(e.TimeStamp.TrackedTimeAtCreation),m.clientData.UnboundTimeStamps.push(e.TimeStamp),f.viewModel.updateUnboundTimeStampMapping(m.clientData.UnboundTimeStamps),i=!0);break;case d.TrackerEvent.RemoveTimeStamp:if(void 0!==m.clientData.UnboundTimeStamps){var n=m.clientData.UnboundTimeStamps.findIndex(function(t){return t.TimeStampId==e.TargetId});m.clientData.UnboundTimeStamps.splice(n,1),f.viewModel.updateUnboundTimeStampMapping(m.clientData.UnboundTimeStamps),i=!0}break;case d.TrackerEvent.CreateWorkUnit:if(void 0!==e.WorkUnit&&void 0!==m.clientData.TimeTables){var o=e.WorkUnit.TimeTableId,r=(e.WorkUnit.WorkUnitId,m.clientData.TimeTables.find(function(e){return void 0!==e.TimeTableAndWorkUnits&&e.TimeTableAndWorkUnits.TimeTableId==o}));void 0!==r&&void 0!==r.TimeTableAndWorkUnits&&void 0!==r.TimeTableAndWorkUnits.WorkUnits&&-1==r.TimeTableAndWorkUnits.WorkUnits.findIndex(function(t){return void 0!==e.WorkUnit&&t.WorkUnitId==e.WorkUnit.WorkUnitId})&&(r.TimeTableAndWorkUnits.WorkUnits.push(e.WorkUnit),f.viewModel.updateTimeTablesMapping(f.viewModel.timeTables),f.updateWorkUnitMappingForSelectedTable(),v.viewModel.updateTableOfContents(m.clientData.TimeTables,m.clientData.SelectedTimeTableId),i=!0)}break;case d.TrackerEvent.RemoveWorkUnit:if(0!=e.TargetId&&void 0!==m.clientData.TimeTables){var a=-1,r=m.clientData.TimeTables.find(function(t){if(void 0!==t.TimeTableAndWorkUnits&&void 0!==t.TimeTableAndWorkUnits.WorkUnits){var i=t.TimeTableAndWorkUnits.WorkUnits.findIndex(function(t){return t.WorkUnitId==e.TargetId});if(-1!=i)return a=i,!0}return!1});void 0!==r&&void 0!==r.TimeTableAndWorkUnits&&void 0!==r.TimeTableAndWorkUnits.WorkUnits&&a>-1&&(r.TimeTableAndWorkUnits.WorkUnits.splice(a,1),f.viewModel.updateTimeTablesMapping(f.viewModel.timeTables),f.updateWorkUnitMappingForSelectedTable(),v.viewModel.updateTableOfContents(m.clientData.TimeTables,m.clientData.SelectedTimeTableId),i=!0)}break;case d.TrackerEvent.EditWorkUnit:if(void 0!==e.UpdatedName&&0!=e.TargetId&&void 0!==m.clientData.TimeTables){var s=-1,r=m.clientData.TimeTables.find(function(t){if(void 0!==t.TimeTableAndWorkUnits&&void 0!==t.TimeTableAndWorkUnits.WorkUnits){var i=t.TimeTableAndWorkUnits.WorkUnits.findIndex(function(t){return t.WorkUnitId==e.TargetId});if(-1!=i)return s=i,!0}return!1});if(void 0!==r&&void 0!==r.TimeTableAndWorkUnits&&void 0!==r.TimeTableAndWorkUnits.WorkUnits){var c=r.TimeTableAndWorkUnits.WorkUnits[s];c.Name=e.UpdatedName,f.viewModel.updateTimeTablesMapping(f.viewModel.timeTables),f.updateWorkUnitMappingForSelectedTable(),v.viewModel.updateTableOfContents(m.clientData.TimeTables,m.clientData.SelectedTimeTableId),i=!0}}f.viewModel.currentEditMode=l.ClientEditMode.None;break;case d.TrackerEvent.EditTimeStamp:if(void 0!==e.TimeStamp){e.TimeStamp.TrackedTimeForView=new Date(e.TimeStamp.TrackedTimeForView),e.TimeStamp.TrackedTimeAtCreation=new Date(e.TimeStamp.TrackedTimeAtCreation);var u,p,h=e.TimeStamp.TimeStampId,g=-1,T=!1;if(void 0!==m.clientData.TimeTables){var r=m.clientData.TimeTables.find(function(t){if(void 0!==t.TimeTableAndWorkUnits&&void 0!==t.TimeTableAndWorkUnits.WorkUnits){var i=t.TimeTableAndWorkUnits.WorkUnits.findIndex(function(t){if(void 0!==t.TimeNorms){var i=-1;if(t.TimeNorms.map(function(t,n){T||(t.StartTimeId==h?(t.StartTime=e.TimeStamp,T=!0,i=n):t.EndTimeId==h&&(t.EndTime=e.TimeStamp,T=!0,i=n))}),T)return u=t.TimeNorms[i],!0}return!1});if(-1!=i)return g=i,p=t.TimeTableAndWorkUnits.WorkUnits[i],!0}return!1});T&&void 0!==u&&void 0!==e.TimeNormNoChildren&&(void 0!==e.WorkUnitDurationString&&void 0!==p&&(p.DurationString=e.WorkUnitDurationString),void 0!==e.TimeNormDurationString&&(u.DurationString=e.TimeNormDurationString),f.updateWorkUnitMappingForSelectedTable(),i=!0)}if(!T&&void 0!==m.clientData.UnboundTimeStamps){var b=m.clientData.UnboundTimeStamps.findIndex(function(e){return e.TimeStampId==h});-1!=b&&(m.clientData.UnboundTimeStamps[b]=e.TimeStamp,f.viewModel.updateUnboundTimeStampMapping(m.clientData.UnboundTimeStamps),i=!0)}}break;case d.TrackerEvent.EditTimeNorm:if(void 0!==e.TimeNormNoChildren&&void 0!==m.clientData.TimeTables){var y=e.TimeNormNoChildren.TimeNormId,w=-1,S=-1,r=m.clientData.TimeTables.find(function(e){if(void 0!==e.TimeTableAndWorkUnits&&void 0!==e.TimeTableAndWorkUnits.WorkUnits){var t=e.TimeTableAndWorkUnits.WorkUnits.findIndex(function(e){if(void 0!==e.TimeNorms){var t=e.TimeNorms.findIndex(function(e){return e.TimeNormId==y});if(-1!=t)return w=t,!0}return!1});if(-1!=t)return S=t,!0}return!1}),E=void 0;if(void 0!==r&&void 0!==r.TimeTableAndWorkUnits&&void 0!==r.TimeTableAndWorkUnits.WorkUnits){var c=r.TimeTableAndWorkUnits.WorkUnits[S];void 0!==c&&void 0!==c.TimeNorms&&(E=c.TimeNorms[w])}void 0!==E&&(E.Name=e.TimeNormNoChildren.Name,E.ColorR=e.TimeNormNoChildren.ColorR,E.ColorG=e.TimeNormNoChildren.ColorG,E.ColorB=e.TimeNormNoChildren.ColorB,f.updateWorkUnitMappingForSelectedTable(),v.viewModel.updateTableOfContents(m.clientData.TimeTables,m.clientData.SelectedTimeTableId),i=!0)}f.viewModel.currentEditMode=l.ClientEditMode.None;break;case d.TrackerEvent.UnbindTimeNorm:if(0!=e.TargetId&&void 0!==m.clientData.TimeTables&&void 0!==e.UnboundTimeStamps){var k=-1,C=-1,r=m.clientData.TimeTables.find(function(t){if(void 0!==t.TimeTableAndWorkUnits&&void 0!==t.TimeTableAndWorkUnits.WorkUnits){var i=t.TimeTableAndWorkUnits.WorkUnits.findIndex(function(t){if(void 0!==t.TimeNorms){var i=t.TimeNorms.findIndex(function(t){return t.TimeNormId==e.TargetId});if(-1!=i)return k=i,!0}return!1});if(-1!=i)return C=i,!0}return!1}),c=void 0;void 0!==r&&void 0!==r.TimeTableAndWorkUnits&&void 0!==r.TimeTableAndWorkUnits.WorkUnits&&(c=r.TimeTableAndWorkUnits.WorkUnits[C]),void 0!==c&&void 0!==c.TimeNorms&&(void 0!==e.WorkUnitDurationString&&(c.DurationString=e.WorkUnitDurationString),c.TimeNorms.splice(k,1),f.viewModel.updateTimeTablesMapping(f.viewModel.timeTables),f.updateWorkUnitMappingForSelectedTable(),v.viewModel.updateTableOfContents(m.clientData.TimeTables,m.clientData.SelectedTimeTableId),m.clientData.UnboundTimeStamps=e.UnboundTimeStamps,f.viewModel.updateUnboundTimeStampMapping(m.clientData.UnboundTimeStamps),i=!0)}break;case d.TrackerEvent.EditTimeTable:if(void 0!==e.UpdatedName&&0!=e.TargetId&&void 0!==m.clientData.TimeTables){var r=m.clientData.TimeTables.find(function(t){return void 0!==t.TimeTableAndWorkUnits&&t.TimeTableAndWorkUnits.TimeTableId==e.TargetId});void 0!==r&&void 0!==r.TimeTableAndWorkUnits&&(r.TimeTableAndWorkUnits.Name=e.UpdatedName,f.viewModel.updateTimeTablesMapping(f.viewModel.timeTables),v.viewModel.updateTableOfContents(m.clientData.TimeTables,m.clientData.SelectedTimeTableId),i=!0)}f.viewModel.currentEditMode=l.ClientEditMode.None;break;case d.TrackerEvent.SetDefaultTargetWorkUnit:m.clientData.TargetWorkUnitId=e.TargetWorkUnitId,i=!0;break;case d.TrackerEvent.EditProductivityRating:if(void 0!==e.UpdatedRating&&0!=e.TargetId&&void 0!==m.clientData.TimeTables){var M=e.TargetId,I=-1,x=-1,r=m.clientData.TimeTables.find(function(e){if(void 0!==e.TimeTableAndWorkUnits&&void 0!==e.TimeTableAndWorkUnits.WorkUnits){var t=e.TimeTableAndWorkUnits.WorkUnits.findIndex(function(e){if(void 0!==e.TimeNorms){var t=e.TimeNorms.findIndex(function(e){return e.TimeNormId==M});if(-1!=t)return I=t,!0}return!1});if(-1!=t)return x=t,!0}return!1}),E=void 0;if(void 0!==r&&void 0!==r.TimeTableAndWorkUnits&&void 0!==r.TimeTableAndWorkUnits.WorkUnits){var c=r.TimeTableAndWorkUnits.WorkUnits[x];void 0!==c&&void 0!==c.TimeNorms&&(E=c.TimeNorms[I])}void 0!==E&&(E.ProductivityRatingId=e.UpdatedRating.ProductivityRatingId,E.ProductivityRating=e.UpdatedRating,f.updateWorkUnitMappingForSelectedTable(),i=!0)}break;case d.TrackerEvent.CreateTimeTable:void 0!==e.TimeTable&&void 0!==e.TimeTable.TimeTableAndWorkUnits&&void 0!==m.clientData.TimeTables&&-1==m.clientData.TimeTables.findIndex(function(t){return void 0!==e.TimeTable&&void 0!==e.TimeTable.TimeTableAndWorkUnits&&void 0!==t.TimeTableAndWorkUnits&&t.TimeTableAndWorkUnits.TimeTableId==e.TimeTable.TimeTableAndWorkUnits.TimeTableId})&&(m.clientData.TimeTables.push(e.TimeTable),m.client.viewModel.updateTimeTablesMapping(m.clientData.TimeTables),f.changeSelectedTimeTableAndUpdateTableOfContents(e.TimeTable.TimeTableAndWorkUnits.TimeTableId),i=!0);break;case d.TrackerEvent.RemoveTimeTable:if(void 0!==m.clientData.TimeTables){var D=m.clientData.TimeTables.findIndex(function(t){return!!t.TimeTableAndWorkUnits&&t.TimeTableAndWorkUnits.TimeTableId==e.TargetId});if(D>-1){if(m.clientData.TimeTables.splice(D,1),m.client.viewModel.updateTimeTablesMapping(m.clientData.TimeTables),m.clientData.TimeTables.length>0){var N=m.clientData.TimeTables[0];void 0!==N.TimeTableAndWorkUnits&&f.changeSelectedTimeTableAndUpdateTableOfContents(N.TimeTableAndWorkUnits.TimeTableId)}i=!0}}break;case d.TrackerEvent.MoveWorkUnit:if(void 0!==e.TimeTable&&void 0!==e.TimeTable.TimeTableAndWorkUnits&&void 0!==m.clientData.TimeTables){f.convertTableDataForClient(e.TimeTable);var _=e.TimeTable.TimeTableAndWorkUnits.TimeTableId,A=m.clientData.TimeTables.findIndex(function(e){return void 0!==e.TimeTableAndWorkUnits&&e.TimeTableAndWorkUnits.TimeTableId==_});if(-1!=A){if(m.clientData.TimeTables[A]=e.TimeTable,void 0!==e.TimeTableSecondary&&(f.convertTableDataForClient(e.TimeTableSecondary),void 0!==e.TimeTableSecondary.TimeTableAndWorkUnits)){var O=e.TimeTableSecondary.TimeTableAndWorkUnits.TimeTableId,U=m.clientData.TimeTables.findIndex(function(e){return void 0!==e.TimeTableAndWorkUnits&&e.TimeTableAndWorkUnits.TimeTableId==O});-1!=U&&(m.clientData.TimeTables[U]=e.TimeTableSecondary)}f.updateTimeTablesAndUnboundAndTableOfContentsAndSelectedAfterDataChanged(),f.updateWorkUnitMappingForSelectedTable(),v.viewModel.updateTableOfContents(m.clientData.TimeTables,m.clientData.SelectedTimeTableId),i=!0}}break;case d.TrackerEvent.SetDeviceTimeZone:void 0!==e.SelectedTimeZoneIdTimeStamps&&""!==e.SelectedTimeZoneIdTimeStamps&&(m.clientData.SelectedTimeZoneIdTimeStamps=e.SelectedTimeZoneIdTimeStamps,f.viewModel.setTimeZone(e.SelectedTimeZoneIdTimeStamps,l.TimeZoneSetting.Device),i=!0);break;case d.TrackerEvent.SetViewTimeZone:void 0!==e.SelectedTimeZoneIdView&&""!==e.SelectedTimeZoneIdView&&void 0!==e.TimeTables&&void 0!==e.UnboundTimeStamps&&(m.clientData.SelectedTimeZoneIdView=e.SelectedTimeZoneIdView,f.viewModel.setTimeZone(e.SelectedTimeZoneIdView,l.TimeZoneSetting.View),m.clientData.TimeTables=e.TimeTables,m.clientData.TimeTables.map(function(e){return f.convertTableDataForClient(e)}),m.clientData.UnboundTimeStamps=e.UnboundTimeStamps,f.updateTimeTablesAndUnboundAndTableOfContentsAndSelectedAfterDataChanged(),m.clientData.ClientTimelineOffset=e.ClientTimelineOffset,i=!0);break;case d.TrackerEvent.RemoveTimeNorm:if(0!=e.TargetId&&void 0!==m.clientData.TimeTables){var L=e.TargetId,W=-1,P=-1,r=m.clientData.TimeTables.find(function(e){if(void 0!==e.TimeTableAndWorkUnits&&void 0!==e.TimeTableAndWorkUnits.WorkUnits){var t=e.TimeTableAndWorkUnits.WorkUnits.findIndex(function(e){if(void 0!==e.TimeNorms){var t=e.TimeNorms.findIndex(function(e){return e.TimeNormId==L});if(-1!=t)return W=t,!0}return!1});if(-1!=t)return P=t,!0}return!1}),c=void 0;if(void 0!==r&&void 0!==r.TimeTableAndWorkUnits&&void 0!==r.TimeTableAndWorkUnits.WorkUnits&&(c=r.TimeTableAndWorkUnits.WorkUnits[P]),void 0!==c&&void 0!==c.TimeNorms){c.TimeNorms.splice(W,1),c.DurationString=void 0!==e.WorkUnitDurationString?e.WorkUnitDurationString:"",i=!0,f.updateWorkUnitMappingForSelectedTable(),v.viewModel.updateTableOfContents(m.clientData.TimeTables,m.clientData.SelectedTimeTableId);break}}break;case d.TrackerEvent.SetCulture:void 0!==e.TimeTables&&void 0!==e.UnboundTimeStamps&&void 0!==e.WeekDayLetters&&void 0!==e.StartDayOfWeekIndex&&void 0!==e.AbbreviatedMonths&&(f.updateCultureAfterDataChanged(e.WeekDayLetters,e.StartDayOfWeekIndex,e.AbbreviatedMonths),m.clientData.TimeTables=e.TimeTables,m.clientData.TimeTables.map(function(e){return f.convertTableDataForClient(e)}),m.clientData.UnboundTimeStamps=e.UnboundTimeStamps,m.clientData.SelectedTimeTable=m.clientData.TimeTables.find(function(e){return void 0!==e.TimeTableAndWorkUnits&&e.TimeTableAndWorkUnits.TimeTableId==m.clientData.SelectedTimeTableId}),f.updateTimeTablesAndUnboundAndTableOfContentsAndSelectedAfterDataChanged(),f.changeSelectedTimeTableAndUpdateTableOfContents(m.clientData.SelectedTimeTableId),i=!0);break;case d.TrackerEvent.ProcessTimeStamps:if(void 0!==e.TimeTables&&void 0!==e.UnboundTimeStamps&&0!==e.TargetWorkUnitId){if(m.clientData.TimeTables=e.TimeTables,m.clientData.TimeTables.map(function(e){return f.convertTableDataForClient(e)}),m.clientData.UnboundTimeStamps=e.UnboundTimeStamps,m.clientData.SelectedTimeTable=m.clientData.TimeTables.find(function(e){return void 0!==e.TimeTableAndWorkUnits&&e.TimeTableAndWorkUnits.TimeTableId==m.clientData.SelectedTimeTableId}),void 0!==e.WorkUnitDurationString){var H=!1;m.clientData.TimeTables.map(function(t){if(!H&&void 0!==t.TimeTableAndWorkUnits&&void 0!==t.TimeTableAndWorkUnits.WorkUnits)for(var i=0;i<t.TimeTableAndWorkUnits.WorkUnits.length;i++){var n=t.TimeTableAndWorkUnits.WorkUnits[i];if(n.WorkUnitId==e.TargetWorkUnitId){n.DurationString=e.WorkUnitDurationString,H=!0;break}}})}f.updateTimeTablesAndUnboundAndTableOfContentsAndSelectedAfterDataChanged(),f.changeSelectedTimeTableAndUpdateTableOfContents(m.clientData.SelectedTimeTableId),i=!0}break;case d.TrackerEvent.CreateTimeNorm:void 0!==e.TimeTables&&void 0!==e.UnboundTimeStamps&&(m.clientData.TimeTables=e.TimeTables,m.clientData.TimeTables.map(function(e){return f.convertTableDataForClient(e)}),m.clientData.UnboundTimeStamps=e.UnboundTimeStamps,m.clientData.SelectedTimeTable=m.clientData.TimeTables.find(function(e){return void 0!==e.TimeTableAndWorkUnits&&e.TimeTableAndWorkUnits.TimeTableId==m.clientData.SelectedTimeTableId}),f.updateTimeTablesAndUnboundAndTableOfContentsAndSelectedAfterDataChanged(),f.changeSelectedTimeTableAndUpdateTableOfContents(m.clientData.SelectedTimeTableId),i=!0);break;default:console.log("incremental update not implemented for "+d.TrackerEvent[e.TrackerEvent])}i||(console.log("invalid client state"),location.reload()),f.viewModel.hoveredProductivityTimeNormId=void 0,t||m.projector.scheduleRender()}},f=this,m=i,h=new s.Timeline(i,0),v=new c.TableOfContents(i),this.viewModel=new l.TokyoTrackerClientVM(this)}return i}();t.TokyoTrackerClient=g}).call(t,i(0))},function(e,t,i){(function(n,o){var r,a;!function(e){"use strict";function t(e){var t=e.length,n=i.type(e);return"function"!==n&&!i.isWindow(e)&&(!(1!==e.nodeType||!t)||("array"===n||0===t||"number"==typeof t&&t>0&&t-1 in e))}if(!n){var i=function(e,t){return new i.fn.init(e,t)};i.isWindow=function(e){return e&&e===e.window},i.type=function(e){return e?"object"==typeof e||"function"==typeof e?r[s.call(e)]||"object":typeof e:e+""},i.isArray=Array.isArray||function(e){return"array"===i.type(e)},i.isPlainObject=function(e){var t;if(!e||"object"!==i.type(e)||e.nodeType||i.isWindow(e))return!1;try{if(e.constructor&&!a.call(e,"constructor")&&!a.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(e){return!1}for(t in e);return void 0===t||a.call(e,t)},i.each=function(e,i,n){var o=0,r=e.length,a=t(e);if(n){if(a)for(;o<r&&!1!==i.apply(e[o],n);o++);else for(o in e)if(e.hasOwnProperty(o)&&!1===i.apply(e[o],n))break}else if(a)for(;o<r&&!1!==i.call(e[o],o,e[o]);o++);else for(o in e)if(e.hasOwnProperty(o)&&!1===i.call(e[o],o,e[o]))break;return e},i.data=function(e,t,n){if(void 0===n){var r=e[i.expando],a=r&&o[r];if(void 0===t)return a;if(a&&t in a)return a[t]}else if(void 0!==t){var s=e[i.expando]||(e[i.expando]=++i.uuid);return o[s]=o[s]||{},o[s][t]=n,n}},i.removeData=function(e,t){var n=e[i.expando],r=n&&o[n];r&&(t?i.each(t,function(e,t){delete r[t]}):delete o[n])},i.extend=function(){var e,t,n,o,r,a,s=arguments[0]||{},l=1,d=arguments.length,c=!1;for("boolean"==typeof s&&(c=s,s=arguments[l]||{},l++),"object"!=typeof s&&"function"!==i.type(s)&&(s={}),l===d&&(s=this,l--);l<d;l++)if(r=arguments[l])for(o in r)r.hasOwnProperty(o)&&(e=s[o],n=r[o],s!==n&&(c&&n&&(i.isPlainObject(n)||(t=i.isArray(n)))?(t?(t=!1,a=e&&i.isArray(e)?e:[]):a=e&&i.isPlainObject(e)?e:{},s[o]=i.extend(c,a,n)):void 0!==n&&(s[o]=n)));return s},i.queue=function(e,n,o){if(e){n=(n||"fx")+"queue";var r=i.data(e,n);return o?(!r||i.isArray(o)?r=i.data(e,n,function(e,i){var n=i||[];return e&&(t(Object(e))?function(e,t){for(var i=+t.length,n=0,o=e.length;n<i;)e[o++]=t[n++];if(i!==i)for(;void 0!==t[n];)e[o++]=t[n++];e.length=o}(n,"string"==typeof e?[e]:e):[].push.call(n,e)),n}(o)):r.push(o),r):r||[]}},i.dequeue=function(e,t){i.each(e.nodeType?[e]:e,function(e,n){t=t||"fx";var o=i.queue(n,t),r=o.shift();"inprogress"===r&&(r=o.shift()),r&&("fx"===t&&o.unshift("inprogress"),r.call(n,function(){i.dequeue(n,t)}))})},i.fn=i.prototype={init:function(e){if(e.nodeType)return this[0]=e,this;throw new Error("Not a DOM node.")},offset:function(){var t=this[0].getBoundingClientRect?this[0].getBoundingClientRect():{top:0,left:0};return{top:t.top+(e.pageYOffset||document.scrollTop||0)-(document.clientTop||0),left:t.left+(e.pageXOffset||document.scrollLeft||0)-(document.clientLeft||0)}},position:function(){var e=this[0],t=function(e){for(var t=e.offsetParent;t&&"html"!==t.nodeName.toLowerCase()&&t.style&&"static"===t.style.position.toLowerCase();)t=t.offsetParent;return t||document}(e),n=this.offset(),o=/^(?:body|html)$/i.test(t.nodeName)?{top:0,left:0}:i(t).offset();return n.top-=parseFloat(e.style.marginTop)||0,n.left-=parseFloat(e.style.marginLeft)||0,t.style&&(o.top+=parseFloat(t.style.borderTopWidth)||0,o.left+=parseFloat(t.style.borderLeftWidth)||0),{top:n.top-o.top,left:n.left-o.left}}};var o={};i.expando="velocity"+(new Date).getTime(),i.uuid=0;for(var r={},a=r.hasOwnProperty,s=r.toString,l="Boolean Number String Function Array Date RegExp Object Error".split(" "),d=0;d<l.length;d++)r["[object "+l[d]+"]"]=l[d].toLowerCase();i.fn.init.prototype=i.fn,e.Velocity={Utilities:i}}}(window),function(n){"use strict";"object"==typeof e&&"object"==typeof e.exports?e.exports=n():(r=n,void 0!==(a="function"==typeof r?r.call(t,i,t,e):r)&&(e.exports=a))}(function(){"use strict";return function(e,t,i,n){function r(e){for(var t=-1,i=e?e.length:0,n=[];++t<i;){var o=e[t];o&&n.push(o)}return n}function a(e){return w.isWrapped(e)?e=b.call(e):w.isNode(e)&&(e=[e]),e}function s(e){var t=h.data(e,"velocity");return null===t?n:t}function l(e,t){var i=s(e);i&&i.delayTimer&&!i.delayPaused&&(i.delayRemaining=i.delay-t+i.delayBegin,i.delayPaused=!0,clearTimeout(i.delayTimer.setTimeout))}function d(e,t){var i=s(e);i&&i.delayTimer&&i.delayPaused&&(i.delayPaused=!1,i.delayTimer.setTimeout=setTimeout(i.delayTimer.next,i.delayRemaining))}function c(e){return function(t){return Math.round(t*e)*(1/e)}}function u(e,i,n,o){function r(e,t){return 1-3*t+3*e}function a(e,t){return 3*t-6*e}function s(e){return 3*e}function l(e,t,i){return((r(t,i)*e+a(t,i))*e+s(t))*e}function d(e,t,i){return 3*r(t,i)*e*e+2*a(t,i)*e+s(t)}function c(t,i){for(var o=0;o<h;++o){var r=d(i,e,n);if(0===r)return i;i-=(l(i,e,n)-t)/r}return i}function u(){for(var t=0;t<b;++t)E[t]=l(t*y,e,n)}function p(t,i,o){var r,a,s=0;do{a=i+(o-i)/2,r=l(a,e,n)-t,r>0?o=a:i=a}while(Math.abs(r)>g&&++s<T);return a}function m(t){for(var i=0,o=1,r=b-1;o!==r&&E[o]<=t;++o)i+=y;--o;var a=(t-E[o])/(E[o+1]-E[o]),s=i+a*y,l=d(s,e,n);return l>=v?c(t,s):0===l?s:p(t,i,i+y)}function f(){k=!0,e===i&&n===o||u()}var h=4,v=.001,g=1e-7,T=10,b=11,y=1/(b-1),w="Float32Array"in t;if(4!==arguments.length)return!1;for(var S=0;S<4;++S)if("number"!=typeof arguments[S]||isNaN(arguments[S])||!isFinite(arguments[S]))return!1;e=Math.min(e,1),n=Math.min(n,1),e=Math.max(e,0),n=Math.max(n,0);var E=w?new Float32Array(b):new Array(b),k=!1,C=function(t){return k||f(),e===i&&n===o?t:0===t?0:1===t?1:l(m(t),i,o)};C.getControlPoints=function(){return[{x:e,y:i},{x:n,y:o}]};var M="generateBezier("+[e,i,n,o]+")";return C.toString=function(){return M},C}function p(e,t){var i=e;return w.isString(e)?C.Easings[e]||(i=!1):i=w.isArray(e)&&1===e.length?c.apply(null,e):w.isArray(e)&&2===e.length?M.apply(null,e.concat([t])):!(!w.isArray(e)||4!==e.length)&&u.apply(null,e),!1===i&&(i=C.Easings[C.defaults.easing]?C.defaults.easing:k),i}function m(e){if(e){var t=C.timestamp&&!0!==e?e:T.now(),i=C.State.calls.length;i>1e4&&(C.State.calls=r(C.State.calls),i=C.State.calls.length);for(var o=0;o<i;o++)if(C.State.calls[o]){var a=C.State.calls[o],l=a[0],d=a[2],c=a[3],u=!c,p=null,g=a[5],b=a[6];if(c||(c=C.State.calls[o][3]=t-16),g){if(!0!==g.resume)continue;c=a[3]=Math.round(t-b-16),a[5]=null}b=a[6]=t-c;for(var y=Math.min(b/d.duration,1),S=0,E=l.length;S<E;S++){var k=l[S],M=k.element;if(s(M)){var x=!1;if(d.display!==n&&null!==d.display&&"none"!==d.display){if("flex"===d.display){var N=["-webkit-box","-moz-box","-ms-flexbox","-webkit-flex"];h.each(N,function(e,t){I.setPropertyValue(M,"display",t)})}I.setPropertyValue(M,"display",d.display)}d.visibility!==n&&"hidden"!==d.visibility&&I.setPropertyValue(M,"visibility",d.visibility);for(var _ in k)if(k.hasOwnProperty(_)&&"element"!==_){var A,O=k[_],U=w.isString(O.easing)?C.Easings[O.easing]:O.easing;if(w.isString(O.pattern)){var L=1===y?function(e,t,i){var n=O.endValue[t];return i?Math.round(n):n}:function(e,t,i){var n=O.startValue[t],o=O.endValue[t]-n,r=n+o*U(y,d,o);return i?Math.round(r):r};A=O.pattern.replace(/{(\d+)(!)?}/g,L)}else if(1===y)A=O.endValue;else{var W=O.endValue-O.startValue;A=O.startValue+W*U(y,d,W)}if(!u&&A===O.currentValue)continue;if(O.currentValue=A,"tween"===_)p=A;else{var P;if(I.Hooks.registered[_]){P=I.Hooks.getRoot(_);var H=s(M).rootPropertyValueCache[P];H&&(O.rootPropertyValue=H)}var R=I.setPropertyValue(M,_,O.currentValue+(v<9&&0===parseFloat(A)?"":O.unitType),O.rootPropertyValue,O.scrollData);I.Hooks.registered[_]&&(I.Normalizations.registered[P]?s(M).rootPropertyValueCache[P]=I.Normalizations.registered[P]("extract",null,R[1]):s(M).rootPropertyValueCache[P]=R[1]),"transform"===R[0]&&(x=!0)}}d.mobileHA&&s(M).transformCache.translate3d===n&&(s(M).transformCache.translate3d="(0px, 0px, 0px)",x=!0),x&&I.flushTransformCache(M)}}d.display!==n&&"none"!==d.display&&(C.State.calls[o][2].display=!1),d.visibility!==n&&"hidden"!==d.visibility&&(C.State.calls[o][2].visibility=!1),d.progress&&d.progress.call(a[1],a[1],y,Math.max(0,c+d.duration-t),c,p),1===y&&f(o)}}C.State.isTicking&&D(m)}function f(e,t){if(!C.State.calls[e])return!1;for(var i=C.State.calls[e][0],o=C.State.calls[e][1],r=C.State.calls[e][2],a=C.State.calls[e][4],l=!1,d=0,c=i.length;d<c;d++){var u=i[d].element;t||r.loop||("none"===r.display&&I.setPropertyValue(u,"display",r.display),"hidden"===r.visibility&&I.setPropertyValue(u,"visibility",r.visibility));var p=s(u);if(!0!==r.loop&&(h.queue(u)[1]===n||!/\.velocityQueueEntryFlag/i.test(h.queue(u)[1]))&&p){p.isAnimating=!1,p.rootPropertyValueCache={};var m=!1;h.each(I.Lists.transforms3D,function(e,t){var i=/^scale/.test(t)?1:0,o=p.transformCache[t];p.transformCache[t]!==n&&new RegExp("^\\("+i+"[^.]").test(o)&&(m=!0,delete p.transformCache[t])}),r.mobileHA&&(m=!0,delete p.transformCache.translate3d),m&&I.flushTransformCache(u),I.Values.removeClass(u,"velocity-animating")}if(!t&&r.complete&&!r.loop&&d===c-1)try{r.complete.call(o,o)}catch(e){setTimeout(function(){throw e},1)}a&&!0!==r.loop&&a(o),p&&!0===r.loop&&!t&&(h.each(p.tweensContainer,function(e,t){if(/^rotate/.test(e)&&(parseFloat(t.startValue)-parseFloat(t.endValue))%360==0){var i=t.startValue;t.startValue=t.endValue,t.endValue=i}/^backgroundPosition/.test(e)&&100===parseFloat(t.endValue)&&"%"===t.unitType&&(t.endValue=0,t.startValue=100)}),C(u,"reverse",{loop:!0,delay:r.delay})),!1!==r.queue&&h.dequeue(u,r.queue)}C.State.calls[e]=!1;for(var f=0,v=C.State.calls.length;f<v;f++)if(!1!==C.State.calls[f]){l=!0;break}!1===l&&(C.State.isTicking=!1,delete C.State.calls,C.State.calls=[])}var h,v=function(){if(i.documentMode)return i.documentMode;for(var e=7;e>4;e--){var t=i.createElement("div");if(t.innerHTML="\x3c!--[if IE "+e+"]><span></span><![endif]--\x3e",t.getElementsByTagName("span").length)return t=null,e}return n}(),g=function(){var e=0;return t.webkitRequestAnimationFrame||t.mozRequestAnimationFrame||function(t){var i,n=(new Date).getTime();return i=Math.max(0,16-(n-e)),e=n+i,setTimeout(function(){t(n+i)},i)}}(),T=function(){var e=t.performance||{};if("function"!=typeof e.now){var i=e.timing&&e.timing.navigationStart?e.timing.navigationStart:(new Date).getTime();e.now=function(){return(new Date).getTime()-i}}return e}(),b=function(){var e=Array.prototype.slice;try{return e.call(i.documentElement),e}catch(t){return function(t,i){var n=this.length;if("number"!=typeof t&&(t=0),"number"!=typeof i&&(i=n),this.slice)return e.call(this,t,i);var o,r=[],a=t>=0?t:Math.max(0,n+t),s=i<0?n+i:Math.min(i,n),l=s-a;if(l>0)if(r=new Array(l),this.charAt)for(o=0;o<l;o++)r[o]=this.charAt(a+o);else for(o=0;o<l;o++)r[o]=this[a+o];return r}}}(),y=function(){return Array.prototype.includes?function(e,t){return e.includes(t)}:Array.prototype.indexOf?function(e,t){return e.indexOf(t)>=0}:function(e,t){for(var i=0;i<e.length;i++)if(e[i]===t)return!0;return!1}},w={isNumber:function(e){return"number"==typeof e},isString:function(e){return"string"==typeof e},isArray:Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},isFunction:function(e){return"[object Function]"===Object.prototype.toString.call(e)},isNode:function(e){return e&&e.nodeType},isWrapped:function(e){return e&&e!==t&&w.isNumber(e.length)&&!w.isString(e)&&!w.isFunction(e)&&!w.isNode(e)&&(0===e.length||w.isNode(e[0]))},isSVG:function(e){return t.SVGElement&&e instanceof t.SVGElement},isEmptyObject:function(e){for(var t in e)if(e.hasOwnProperty(t))return!1;return!0}},S=!1;if(e.fn&&e.fn.jquery?(h=e,S=!0):h=t.Velocity.Utilities,v<=8&&!S)throw new Error("Velocity: IE8 and below require jQuery to be loaded before Velocity.");if(v<=7)return void(o.fn.velocity=o.fn.animate);var E=400,k="swing",C={State:{isMobile:/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(t.navigator.userAgent),isAndroid:/Android/i.test(t.navigator.userAgent),isGingerbread:/Android 2\.3\.[3-7]/i.test(t.navigator.userAgent),isChrome:t.chrome,isFirefox:/Firefox/i.test(t.navigator.userAgent),prefixElement:i.createElement("div"),prefixMatches:{},scrollAnchor:null,scrollPropertyLeft:null,scrollPropertyTop:null,isTicking:!1,calls:[],delayedElements:{count:0}},CSS:{},Utilities:h,Redirects:{},Easings:{},Promise:t.Promise,defaults:{queue:"",duration:E,easing:k,begin:n,complete:n,progress:n,display:n,visibility:n,loop:!1,delay:!1,mobileHA:!0,_cacheValues:!0,promiseRejectEmpty:!0},init:function(e){h.data(e,"velocity",{isSVG:w.isSVG(e),isAnimating:!1,computedStyle:null,tweensContainer:null,rootPropertyValueCache:{},transformCache:{}})},hook:null,mock:!1,version:{major:1,minor:5,patch:1},debug:!1,timestamp:!0,pauseAll:function(e){var t=(new Date).getTime();h.each(C.State.calls,function(t,i){if(i){if(e!==n&&(i[2].queue!==e||!1===i[2].queue))return!0;i[5]={resume:!1}}}),h.each(C.State.delayedElements,function(e,i){i&&l(i,t)})},resumeAll:function(e){var t=(new Date).getTime();h.each(C.State.calls,function(t,i){if(i){if(e!==n&&(i[2].queue!==e||!1===i[2].queue))return!0;i[5]&&(i[5].resume=!0)}}),h.each(C.State.delayedElements,function(e,i){i&&d(i,t)})}};t.pageYOffset!==n?(C.State.scrollAnchor=t,C.State.scrollPropertyLeft="pageXOffset",C.State.scrollPropertyTop="pageYOffset"):(C.State.scrollAnchor=i.documentElement||i.body.parentNode||i.body,C.State.scrollPropertyLeft="scrollLeft",C.State.scrollPropertyTop="scrollTop");var M=function(){function e(e){return-e.tension*e.x-e.friction*e.v}function t(t,i,n){var o={x:t.x+n.dx*i,v:t.v+n.dv*i,tension:t.tension,friction:t.friction};return{dx:o.v,dv:e(o)}}function i(i,n){var o={dx:i.v,dv:e(i)},r=t(i,.5*n,o),a=t(i,.5*n,r),s=t(i,n,a),l=1/6*(o.dx+2*(r.dx+a.dx)+s.dx),d=1/6*(o.dv+2*(r.dv+a.dv)+s.dv);return i.x=i.x+l*n,i.v=i.v+d*n,i}return function e(t,n,o){var r,a,s,l={x:-1,v:0,tension:null,friction:null},d=[0],c=0;for(t=parseFloat(t)||500,n=parseFloat(n)||20,o=o||null,l.tension=t,l.friction=n,r=null!==o,r?(c=e(t,n),a=c/o*.016):a=.016;;)if(s=i(s||l,a),d.push(1+s.x),c+=16,!(Math.abs(s.x)>1e-4&&Math.abs(s.v)>1e-4))break;return r?function(e){return d[e*(d.length-1)|0]}:c}}();C.Easings={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},spring:function(e){return 1-Math.cos(4.5*e*Math.PI)*Math.exp(6*-e)}},h.each([["ease",[.25,.1,.25,1]],["ease-in",[.42,0,1,1]],["ease-out",[0,0,.58,1]],["ease-in-out",[.42,0,.58,1]],["easeInSine",[.47,0,.745,.715]],["easeOutSine",[.39,.575,.565,1]],["easeInOutSine",[.445,.05,.55,.95]],["easeInQuad",[.55,.085,.68,.53]],["easeOutQuad",[.25,.46,.45,.94]],["easeInOutQuad",[.455,.03,.515,.955]],["easeInCubic",[.55,.055,.675,.19]],["easeOutCubic",[.215,.61,.355,1]],["easeInOutCubic",[.645,.045,.355,1]],["easeInQuart",[.895,.03,.685,.22]],["easeOutQuart",[.165,.84,.44,1]],["easeInOutQuart",[.77,0,.175,1]],["easeInQuint",[.755,.05,.855,.06]],["easeOutQuint",[.23,1,.32,1]],["easeInOutQuint",[.86,0,.07,1]],["easeInExpo",[.95,.05,.795,.035]],["easeOutExpo",[.19,1,.22,1]],["easeInOutExpo",[1,0,0,1]],["easeInCirc",[.6,.04,.98,.335]],["easeOutCirc",[.075,.82,.165,1]],["easeInOutCirc",[.785,.135,.15,.86]]],function(e,t){C.Easings[t[0]]=u.apply(null,t[1])});var I=C.CSS={RegEx:{isHex:/^#([A-f\d]{3}){1,2}$/i,valueUnwrap:/^[A-z]+\((.*)\)$/i,wrappedValueAlreadyExtracted:/[0-9.]+ [0-9.]+ [0-9.]+( [0-9.]+)?/,valueSplit:/([A-z]+\(.+\))|(([A-z0-9#-.]+?)(?=\s|$))/gi},Lists:{colors:["fill","stroke","stopColor","color","backgroundColor","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor","outlineColor"],transformsBase:["translateX","translateY","scale","scaleX","scaleY","skewX","skewY","rotateZ"],transforms3D:["transformPerspective","translateZ","scaleZ","rotateX","rotateY"],units:["%","em","ex","ch","rem","vw","vh","vmin","vmax","cm","mm","Q","in","pc","pt","px","deg","grad","rad","turn","s","ms"],colorNames:{aliceblue:"240,248,255",antiquewhite:"250,235,215",aquamarine:"127,255,212",aqua:"0,255,255",azure:"240,255,255",beige:"245,245,220",bisque:"255,228,196",black:"0,0,0",blanchedalmond:"255,235,205",blueviolet:"138,43,226",blue:"0,0,255",brown:"165,42,42",burlywood:"222,184,135",cadetblue:"95,158,160",chartreuse:"127,255,0",chocolate:"210,105,30",coral:"255,127,80",cornflowerblue:"100,149,237",cornsilk:"255,248,220",crimson:"220,20,60",cyan:"0,255,255",darkblue:"0,0,139",darkcyan:"0,139,139",darkgoldenrod:"184,134,11",darkgray:"169,169,169",darkgrey:"169,169,169",darkgreen:"0,100,0",darkkhaki:"189,183,107",darkmagenta:"139,0,139",darkolivegreen:"85,107,47",darkorange:"255,140,0",darkorchid:"153,50,204",darkred:"139,0,0",darksalmon:"233,150,122",darkseagreen:"143,188,143",darkslateblue:"72,61,139",darkslategray:"47,79,79",darkturquoise:"0,206,209",darkviolet:"148,0,211",deeppink:"255,20,147",deepskyblue:"0,191,255",dimgray:"105,105,105",dimgrey:"105,105,105",dodgerblue:"30,144,255",firebrick:"178,34,34",floralwhite:"255,250,240",forestgreen:"34,139,34",fuchsia:"255,0,255",gainsboro:"220,220,220",ghostwhite:"248,248,255",gold:"255,215,0",goldenrod:"218,165,32",gray:"128,128,128",grey:"128,128,128",greenyellow:"173,255,47",green:"0,128,0",honeydew:"240,255,240",hotpink:"255,105,180",indianred:"205,92,92",indigo:"75,0,130",ivory:"255,255,240",khaki:"240,230,140",lavenderblush:"255,240,245",lavender:"230,230,250",lawngreen:"124,252,0",lemonchiffon:"255,250,205",lightblue:"173,216,230",lightcoral:"240,128,128",lightcyan:"224,255,255",lightgoldenrodyellow:"250,250,210",lightgray:"211,211,211",lightgrey:"211,211,211",lightgreen:"144,238,144",lightpink:"255,182,193",lightsalmon:"255,160,122",lightseagreen:"32,178,170",lightskyblue:"135,206,250",lightslategray:"119,136,153",lightsteelblue:"176,196,222",lightyellow:"255,255,224",limegreen:"50,205,50",lime:"0,255,0",linen:"250,240,230",magenta:"255,0,255",maroon:"128,0,0",mediumaquamarine:"102,205,170",mediumblue:"0,0,205",mediumorchid:"186,85,211",mediumpurple:"147,112,219",mediumseagreen:"60,179,113",mediumslateblue:"123,104,238",mediumspringgreen:"0,250,154",mediumturquoise:"72,209,204",mediumvioletred:"199,21,133",midnightblue:"25,25,112",mintcream:"245,255,250",mistyrose:"255,228,225",moccasin:"255,228,181",navajowhite:"255,222,173",navy:"0,0,128",oldlace:"253,245,230",olivedrab:"107,142,35",olive:"128,128,0",orangered:"255,69,0",orange:"255,165,0",orchid:"218,112,214",palegoldenrod:"238,232,170",palegreen:"152,251,152",paleturquoise:"175,238,238",palevioletred:"219,112,147",papayawhip:"255,239,213",peachpuff:"255,218,185",peru:"205,133,63",pink:"255,192,203",plum:"221,160,221",powderblue:"176,224,230",purple:"128,0,128",red:"255,0,0",rosybrown:"188,143,143",royalblue:"65,105,225",saddlebrown:"139,69,19",salmon:"250,128,114",sandybrown:"244,164,96",seagreen:"46,139,87",seashell:"255,245,238",sienna:"160,82,45",silver:"192,192,192",skyblue:"135,206,235",slateblue:"106,90,205",slategray:"112,128,144",snow:"255,250,250",springgreen:"0,255,127",steelblue:"70,130,180",tan:"210,180,140",teal:"0,128,128",thistle:"216,191,216",tomato:"255,99,71",turquoise:"64,224,208",violet:"238,130,238",wheat:"245,222,179",whitesmoke:"245,245,245",white:"255,255,255",yellowgreen:"154,205,50",yellow:"255,255,0"}},Hooks:{templates:{textShadow:["Color X Y Blur","black 0px 0px 0px"],boxShadow:["Color X Y Blur Spread","black 0px 0px 0px 0px"],clip:["Top Right Bottom Left","0px 0px 0px 0px"],backgroundPosition:["X Y","0% 0%"],transformOrigin:["X Y Z","50% 50% 0px"],perspectiveOrigin:["X Y","50% 50%"]},registered:{},register:function(){for(var e=0;e<I.Lists.colors.length;e++){var t="color"===I.Lists.colors[e]?"0 0 0 1":"255 255 255 1";I.Hooks.templates[I.Lists.colors[e]]=["Red Green Blue Alpha",t]}var i,n,o;if(v)for(i in I.Hooks.templates)if(I.Hooks.templates.hasOwnProperty(i)){n=I.Hooks.templates[i],o=n[0].split(" ");var r=n[1].match(I.RegEx.valueSplit);"Color"===o[0]&&(o.push(o.shift()),r.push(r.shift()),I.Hooks.templates[i]=[o.join(" "),r.join(" ")])}for(i in I.Hooks.templates)if(I.Hooks.templates.hasOwnProperty(i)){n=I.Hooks.templates[i],o=n[0].split(" ");for(var a in o)if(o.hasOwnProperty(a)){var s=i+o[a],l=a;I.Hooks.registered[s]=[i,l]}}},getRoot:function(e){var t=I.Hooks.registered[e];return t?t[0]:e},getUnit:function(e,t){var i=(e.substr(t||0,5).match(/^[a-z%]+/)||[])[0]||"";return i&&y(I.Lists.units,i)?i:""},fixColors:function(e){return e.replace(/(rgba?\(\s*)?(\b[a-z]+\b)/g,function(e,t,i){return I.Lists.colorNames.hasOwnProperty(i)?(t||"rgba(")+I.Lists.colorNames[i]+(t?"":",1)"):t+i})},cleanRootPropertyValue:function(e,t){return I.RegEx.valueUnwrap.test(t)&&(t=t.match(I.RegEx.valueUnwrap)[1]),I.Values.isCSSNullValue(t)&&(t=I.Hooks.templates[e][1]),t},extractValue:function(e,t){var i=I.Hooks.registered[e];if(i){var n=i[0],o=i[1];return t=I.Hooks.cleanRootPropertyValue(n,t),t.toString().match(I.RegEx.valueSplit)[o]}return t},injectValue:function(e,t,i){var n=I.Hooks.registered[e];if(n){var o,r=n[0],a=n[1];return i=I.Hooks.cleanRootPropertyValue(r,i),o=i.toString().match(I.RegEx.valueSplit),o[a]=t,o.join(" ")}return i}},Normalizations:{registered:{clip:function(e,t,i){switch(e){case"name":return"clip";case"extract":var n;return I.RegEx.wrappedValueAlreadyExtracted.test(i)?n=i:(n=i.toString().match(I.RegEx.valueUnwrap),n=n?n[1].replace(/,(\s+)?/g," "):i),n;case"inject":return"rect("+i+")"}},blur:function(e,t,i){switch(e){case"name":return C.State.isFirefox?"filter":"-webkit-filter";case"extract":var n=parseFloat(i);if(!n&&0!==n){var o=i.toString().match(/blur\(([0-9]+[A-z]+)\)/i);n=o?o[1]:0}return n;case"inject":return parseFloat(i)?"blur("+i+")":"none"}},opacity:function(e,t,i){if(v<=8)switch(e){case"name":return"filter";case"extract":var n=i.toString().match(/alpha\(opacity=(.*)\)/i);return i=n?n[1]/100:1;case"inject":return t.style.zoom=1,parseFloat(i)>=1?"":"alpha(opacity="+parseInt(100*parseFloat(i),10)+")"}else switch(e){case"name":return"opacity";case"extract":case"inject":return i}}},register:function(){function e(e,t,i){if("border-box"===I.getPropertyValue(t,"boxSizing").toString().toLowerCase()===(i||!1)){var n,o,r=0,a="width"===e?["Left","Right"]:["Top","Bottom"],s=["padding"+a[0],"padding"+a[1],"border"+a[0]+"Width","border"+a[1]+"Width"];for(n=0;n<s.length;n++)o=parseFloat(I.getPropertyValue(t,s[n])),isNaN(o)||(r+=o);return i?-r:r}return 0}function t(t,i){return function(n,o,r){switch(n){case"name":return t;case"extract":return parseFloat(r)+e(t,o,i);case"inject":return parseFloat(r)-e(t,o,i)+"px"}}}v&&!(v>9)||C.State.isGingerbread||(I.Lists.transformsBase=I.Lists.transformsBase.concat(I.Lists.transforms3D));for(var i=0;i<I.Lists.transformsBase.length;i++)!function(){var e=I.Lists.transformsBase[i];I.Normalizations.registered[e]=function(t,i,o){switch(t){case"name":return"transform";case"extract":return s(i)===n||s(i).transformCache[e]===n?/^scale/i.test(e)?1:0:s(i).transformCache[e].replace(/[()]/g,"");case"inject":var r=!1;switch(e.substr(0,e.length-1)){case"translate":r=!/(%|px|em|rem|vw|vh|\d)$/i.test(o);break;case"scal":case"scale":C.State.isAndroid&&s(i).transformCache[e]===n&&o<1&&(o=1),r=!/(\d)$/i.test(o);break;case"skew":case"rotate":r=!/(deg|\d)$/i.test(o)}return r||(s(i).transformCache[e]="("+o+")"),s(i).transformCache[e]}}}();for(var o=0;o<I.Lists.colors.length;o++)!function(){var e=I.Lists.colors[o];I.Normalizations.registered[e]=function(t,i,o){switch(t){case"name":return e;case"extract":var r;if(I.RegEx.wrappedValueAlreadyExtracted.test(o))r=o;else{var a,s={black:"rgb(0, 0, 0)",blue:"rgb(0, 0, 255)",gray:"rgb(128, 128, 128)",green:"rgb(0, 128, 0)",red:"rgb(255, 0, 0)",white:"rgb(255, 255, 255)"};/^[A-z]+$/i.test(o)?a=s[o]!==n?s[o]:s.black:I.RegEx.isHex.test(o)?a="rgb("+I.Values.hexToRgb(o).join(" ")+")":/^rgba?\(/i.test(o)||(a=s.black),r=(a||o).toString().match(I.RegEx.valueUnwrap)[1].replace(/,(\s+)?/g," ")}return(!v||v>8)&&3===r.split(" ").length&&(r+=" 1"),r;case"inject":return/^rgb/.test(o)?o:(v<=8?4===o.split(" ").length&&(o=o.split(/\s+/).slice(0,3).join(" ")):3===o.split(" ").length&&(o+=" 1"),(v<=8?"rgb":"rgba")+"("+o.replace(/\s+/g,",").replace(/\.(\d)+(?=,)/g,"")+")")}}}();I.Normalizations.registered.innerWidth=t("width",!0),I.Normalizations.registered.innerHeight=t("height",!0),I.Normalizations.registered.outerWidth=t("width"),I.Normalizations.registered.outerHeight=t("height")}},Names:{camelCase:function(e){return e.replace(/-(\w)/g,function(e,t){return t.toUpperCase()})},SVGAttribute:function(e){var t="width|height|x|y|cx|cy|r|rx|ry|x1|x2|y1|y2";return(v||C.State.isAndroid&&!C.State.isChrome)&&(t+="|transform"),new RegExp("^("+t+")$","i").test(e)},prefixCheck:function(e){if(C.State.prefixMatches[e])return[C.State.prefixMatches[e],!0];for(var t=["","Webkit","Moz","ms","O"],i=0,n=t.length;i<n;i++){var o;if(o=0===i?e:t[i]+e.replace(/^\w/,function(e){return e.toUpperCase()}),w.isString(C.State.prefixElement.style[o]))return C.State.prefixMatches[e]=o,[o,!0]}return[e,!1]}},Values:{hexToRgb:function(e){var t,i=/^#?([a-f\d])([a-f\d])([a-f\d])$/i,n=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i;return e=e.replace(i,function(e,t,i,n){return t+t+i+i+n+n}),t=n.exec(e),t?[parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16)]:[0,0,0]},isCSSNullValue:function(e){return!e||/^(none|auto|transparent|(rgba\(0, ?0, ?0, ?0\)))$/i.test(e)},getUnitType:function(e){return/^(rotate|skew)/i.test(e)?"deg":/(^(scale|scaleX|scaleY|scaleZ|alpha|flexGrow|flexHeight|zIndex|fontWeight)$)|((opacity|red|green|blue|alpha)$)/i.test(e)?"":"px"},getDisplayType:function(e){var t=e&&e.tagName.toString().toLowerCase();return/^(b|big|i|small|tt|abbr|acronym|cite|code|dfn|em|kbd|strong|samp|var|a|bdo|br|img|map|object|q|script|span|sub|sup|button|input|label|select|textarea)$/i.test(t)?"inline":/^(li)$/i.test(t)?"list-item":/^(tr)$/i.test(t)?"table-row":/^(table)$/i.test(t)?"table":/^(tbody)$/i.test(t)?"table-row-group":"block"},addClass:function(e,t){if(e)if(e.classList)e.classList.add(t);else if(w.isString(e.className))e.className+=(e.className.length?" ":"")+t;else{var i=e.getAttribute(v<=7?"className":"class")||"";e.setAttribute("class",i+(i?" ":"")+t)}},removeClass:function(e,t){if(e)if(e.classList)e.classList.remove(t);else if(w.isString(e.className))e.className=e.className.toString().replace(new RegExp("(^|\\s)"+t.split(" ").join("|")+"(\\s|$)","gi")," ");else{var i=e.getAttribute(v<=7?"className":"class")||"";e.setAttribute("class",i.replace(new RegExp("(^|s)"+t.split(" ").join("|")+"(s|$)","gi")," "))}}},getPropertyValue:function(e,i,o,r){function a(e,i){var o=0;if(v<=8)o=h.css(e,i);else{var l=!1;/^(width|height)$/.test(i)&&0===I.getPropertyValue(e,"display")&&(l=!0,I.setPropertyValue(e,"display",I.Values.getDisplayType(e)));var d=function(){l&&I.setPropertyValue(e,"display","none")};if(!r){if("height"===i&&"border-box"!==I.getPropertyValue(e,"boxSizing").toString().toLowerCase()){var c=e.offsetHeight-(parseFloat(I.getPropertyValue(e,"borderTopWidth"))||0)-(parseFloat(I.getPropertyValue(e,"borderBottomWidth"))||0)-(parseFloat(I.getPropertyValue(e,"paddingTop"))||0)-(parseFloat(I.getPropertyValue(e,"paddingBottom"))||0);return d(),c}if("width"===i&&"border-box"!==I.getPropertyValue(e,"boxSizing").toString().toLowerCase()){var u=e.offsetWidth-(parseFloat(I.getPropertyValue(e,"borderLeftWidth"))||0)-(parseFloat(I.getPropertyValue(e,"borderRightWidth"))||0)-(parseFloat(I.getPropertyValue(e,"paddingLeft"))||0)-(parseFloat(I.getPropertyValue(e,"paddingRight"))||0);return d(),u}}var p;p=s(e)===n?t.getComputedStyle(e,null):s(e).computedStyle?s(e).computedStyle:s(e).computedStyle=t.getComputedStyle(e,null),"borderColor"===i&&(i="borderTopColor"),o=9===v&&"filter"===i?p.getPropertyValue(i):p[i],""!==o&&null!==o||(o=e.style[i]),d()}if("auto"===o&&/^(top|right|bottom|left)$/i.test(i)){var m=a(e,"position");("fixed"===m||"absolute"===m&&/top|left/i.test(i))&&(o=h(e).position()[i]+"px")}return o}var l;if(I.Hooks.registered[i]){var d=i,c=I.Hooks.getRoot(d);o===n&&(o=I.getPropertyValue(e,I.Names.prefixCheck(c)[0])),I.Normalizations.registered[c]&&(o=I.Normalizations.registered[c]("extract",e,o)),l=I.Hooks.extractValue(d,o)}else if(I.Normalizations.registered[i]){var u,p;u=I.Normalizations.registered[i]("name",e),"transform"!==u&&(p=a(e,I.Names.prefixCheck(u)[0]),I.Values.isCSSNullValue(p)&&I.Hooks.templates[i]&&(p=I.Hooks.templates[i][1])),l=I.Normalizations.registered[i]("extract",e,p)}if(!/^[\d-]/.test(l)){var m=s(e);if(m&&m.isSVG&&I.Names.SVGAttribute(i))if(/^(height|width)$/i.test(i))try{l=e.getBBox()[i]}catch(e){l=0}else l=e.getAttribute(i);else l=a(e,I.Names.prefixCheck(i)[0])}return I.Values.isCSSNullValue(l)&&(l=0),C.debug>=2&&console.log("Get "+i+": "+l),l},setPropertyValue:function(e,i,n,o,r){var a=i;if("scroll"===i)r.container?r.container["scroll"+r.direction]=n:"Left"===r.direction?t.scrollTo(n,r.alternateValue):t.scrollTo(r.alternateValue,n);else if(I.Normalizations.registered[i]&&"transform"===I.Normalizations.registered[i]("name",e))I.Normalizations.registered[i]("inject",e,n),a="transform",n=s(e).transformCache[i];else{if(I.Hooks.registered[i]){var l=i,d=I.Hooks.getRoot(i);o=o||I.getPropertyValue(e,d),n=I.Hooks.injectValue(l,n,o),i=d}if(I.Normalizations.registered[i]&&(n=I.Normalizations.registered[i]("inject",e,n),i=I.Normalizations.registered[i]("name",e)),a=I.Names.prefixCheck(i)[0],v<=8)try{e.style[a]=n}catch(e){C.debug&&console.log("Browser does not support ["+n+"] for ["+a+"]")}else{var c=s(e);c&&c.isSVG&&I.Names.SVGAttribute(i)?e.setAttribute(i,n):e.style[a]=n}C.debug>=2&&console.log("Set "+i+" ("+a+"): "+n)}return[a,n]},flushTransformCache:function(e){var t="",i=s(e);if((v||C.State.isAndroid&&!C.State.isChrome)&&i&&i.isSVG){var n=function(t){return parseFloat(I.getPropertyValue(e,t))},o={translate:[n("translateX"),n("translateY")],skewX:[n("skewX")],skewY:[n("skewY")],scale:1!==n("scale")?[n("scale"),n("scale")]:[n("scaleX"),n("scaleY")],rotate:[n("rotateZ"),0,0]};h.each(s(e).transformCache,function(e){/^translate/i.test(e)?e="translate":/^scale/i.test(e)?e="scale":/^rotate/i.test(e)&&(e="rotate"),o[e]&&(t+=e+"("+o[e].join(" ")+") ",delete o[e])})}else{var r,a;h.each(s(e).transformCache,function(i){if(r=s(e).transformCache[i],"transformPerspective"===i)return a=r,!0;9===v&&"rotateZ"===i&&(i="rotate"),t+=i+r+" "}),a&&(t="perspective"+a+" "+t)}I.setPropertyValue(e,"transform",t)}};I.Hooks.register(),I.Normalizations.register(),C.hook=function(e,t,i){var o;return e=a(e),h.each(e,function(e,r){if(s(r)===n&&C.init(r),i===n)o===n&&(o=I.getPropertyValue(r,t));else{var a=I.setPropertyValue(r,t,i);"transform"===a[0]&&C.CSS.flushTransformCache(r),o=a}}),o};var x=function(){function e(){return c?k.promise||null:u}function o(e,o){function r(r){var c,u;if(l.begin&&0===D)try{l.begin.call(g,g)}catch(e){setTimeout(function(){throw e},1)}if("scroll"===A){var f,v,S,E=/^x$/i.test(l.axis)?"Left":"Top",x=parseFloat(l.offset)||0;l.container?w.isWrapped(l.container)||w.isNode(l.container)?(l.container=l.container[0]||l.container,f=l.container["scroll"+E],S=f+h(e).position()[E.toLowerCase()]+x):l.container=null:(f=C.State.scrollAnchor[C.State["scrollProperty"+E]],v=C.State.scrollAnchor[C.State["scrollProperty"+("Left"===E?"Top":"Left")]],S=h(e).offset()[E.toLowerCase()]+x),d={scroll:{rootPropertyValue:!1,startValue:f,currentValue:f,endValue:S,unitType:"",easing:l.easing,scrollData:{container:l.container,direction:E,alternateValue:v}},element:e},C.debug&&console.log("tweensContainer (scroll): ",d.scroll,e)}else if("reverse"===A){if(!(c=s(e)))return;if(!c.tweensContainer)return void h.dequeue(e,l.queue);"none"===c.opts.display&&(c.opts.display="auto"),"hidden"===c.opts.visibility&&(c.opts.visibility="visible"),c.opts.loop=!1,c.opts.begin=null,c.opts.complete=null,b.easing||delete l.easing,b.duration||delete l.duration,l=h.extend({},c.opts,l),u=h.extend(!0,{},c?c.tweensContainer:null);for(var N in u)if(u.hasOwnProperty(N)&&"element"!==N){var _=u[N].startValue;u[N].startValue=u[N].currentValue=u[N].endValue,u[N].endValue=_,w.isEmptyObject(b)||(u[N].easing=l.easing),C.debug&&console.log("reverse tweensContainer ("+N+"): "+JSON.stringify(u[N]),e)}d=u}else if("start"===A){c=s(e),c&&c.tweensContainer&&!0===c.isAnimating&&(u=c.tweensContainer);var O=function(o,r){var s,p=I.Hooks.getRoot(o),m=!1,f=r[0],v=r[1],g=r[2];if(!(c&&c.isSVG||"tween"===p||!1!==I.Names.prefixCheck(p)[1]||I.Normalizations.registered[p]!==n))return void(C.debug&&console.log("Skipping ["+p+"] due to a lack of browser support."));(l.display!==n&&null!==l.display&&"none"!==l.display||l.visibility!==n&&"hidden"!==l.visibility)&&/opacity|filter/.test(o)&&!g&&0!==f&&(g=0),l._cacheValues&&u&&u[o]?(g===n&&(g=u[o].endValue+u[o].unitType),m=c.rootPropertyValueCache[p]):I.Hooks.registered[o]?g===n?(m=I.getPropertyValue(e,p),g=I.getPropertyValue(e,o,m)):m=I.Hooks.templates[p][1]:g===n&&(g=I.getPropertyValue(e,o));var T,b,y,S=!1,E=function(e,t){var i,n;return n=(t||"0").toString().toLowerCase().replace(/[%A-z]+$/,function(e){return i=e,""}),i||(i=I.Values.getUnitType(e)),[n,i]};if(g!==f&&w.isString(g)&&w.isString(f)){s="";var k=0,M=0,x=[],D=[],N=0,_=0,A=0;for(g=I.Hooks.fixColors(g),f=I.Hooks.fixColors(f);k<g.length&&M<f.length;){var O=g[k],U=f[M];if(/[\d\.-]/.test(O)&&/[\d\.-]/.test(U)){for(var L=O,W=U,P=".",R=".";++k<g.length;){if((O=g[k])===P)P="..";else if(!/\d/.test(O))break;L+=O}for(;++M<f.length;){if((U=f[M])===R)R="..";else if(!/\d/.test(U))break;W+=U}var F=I.Hooks.getUnit(g,k),V=I.Hooks.getUnit(f,M);if(k+=F.length,M+=V.length,F===V)L===W?s+=L+F:(s+="{"+x.length+(_?"!":"")+"}"+F,x.push(parseFloat(L)),D.push(parseFloat(W)));else{var j=parseFloat(L),B=parseFloat(W);s+=(N<5?"calc":"")+"("+(j?"{"+x.length+(_?"!":"")+"}":"0")+F+" + "+(B?"{"+(x.length+(j?1:0))+(_?"!":"")+"}":"0")+V+")",j&&(x.push(j),D.push(0)),B&&(x.push(0),D.push(B))}}else{if(O!==U){N=0;break}s+=O,k++,M++,0===N&&"c"===O||1===N&&"a"===O||2===N&&"l"===O||3===N&&"c"===O||N>=4&&"("===O?N++:(N&&N<5||N>=4&&")"===O&&--N<5)&&(N=0),0===_&&"r"===O||1===_&&"g"===O||2===_&&"b"===O||3===_&&"a"===O||_>=3&&"("===O?(3===_&&"a"===O&&(A=1),_++):A&&","===O?++A>3&&(_=A=0):(A&&_<(A?5:4)||_>=(A?4:3)&&")"===O&&--_<(A?5:4))&&(_=A=0)}}k===g.length&&M===f.length||(C.debug&&console.error('Trying to pattern match mis-matched strings ["'+f+'", "'+g+'"]'),s=n),s&&(x.length?(C.debug&&console.log('Pattern found "'+s+'" -> ',x,D,"["+g+","+f+"]"),g=x,f=D,b=y=""):s=n)}s||(T=E(o,g),g=T[0],y=T[1],T=E(o,f),f=T[0].replace(/^([+-\/*])=/,function(e,t){return S=t,""}),b=T[1],g=parseFloat(g)||0,f=parseFloat(f)||0,"%"===b&&(/^(fontSize|lineHeight)$/.test(o)?(f/=100,b="em"):/^scale/.test(o)?(f/=100,b=""):/(Red|Green|Blue)$/i.test(o)&&(f=f/100*255,b="")));if(/[\/*]/.test(S))b=y;else if(y!==b&&0!==g)if(0===f)b=y;else{a=a||function(){var n={myParent:e.parentNode||i.body,position:I.getPropertyValue(e,"position"),fontSize:I.getPropertyValue(e,"fontSize")},o=n.position===H.lastPosition&&n.myParent===H.lastParent,r=n.fontSize===H.lastFontSize;H.lastParent=n.myParent,H.lastPosition=n.position,H.lastFontSize=n.fontSize;var a={};if(r&&o)a.emToPx=H.lastEmToPx,a.percentToPxWidth=H.lastPercentToPxWidth,a.percentToPxHeight=H.lastPercentToPxHeight;else{var s=c&&c.isSVG?i.createElementNS("http://www.w3.org/2000/svg","rect"):i.createElement("div");C.init(s),n.myParent.appendChild(s),h.each(["overflow","overflowX","overflowY"],function(e,t){C.CSS.setPropertyValue(s,t,"hidden")}),C.CSS.setPropertyValue(s,"position",n.position),C.CSS.setPropertyValue(s,"fontSize",n.fontSize),C.CSS.setPropertyValue(s,"boxSizing","content-box"),h.each(["minWidth","maxWidth","width","minHeight","maxHeight","height"],function(e,t){C.CSS.setPropertyValue(s,t,"100%")}),C.CSS.setPropertyValue(s,"paddingLeft","100em"),a.percentToPxWidth=H.lastPercentToPxWidth=(parseFloat(I.getPropertyValue(s,"width",null,!0))||1)/100,a.percentToPxHeight=H.lastPercentToPxHeight=(parseFloat(I.getPropertyValue(s,"height",null,!0))||1)/100,a.emToPx=H.lastEmToPx=(parseFloat(I.getPropertyValue(s,"paddingLeft"))||1)/100,n.myParent.removeChild(s)}return null===H.remToPx&&(H.remToPx=parseFloat(I.getPropertyValue(i.body,"fontSize"))||16),null===H.vwToPx&&(H.vwToPx=parseFloat(t.innerWidth)/100,H.vhToPx=parseFloat(t.innerHeight)/100),a.remToPx=H.remToPx,a.vwToPx=H.vwToPx,a.vhToPx=H.vhToPx,C.debug>=1&&console.log("Unit ratios: "+JSON.stringify(a),e),a}();var q=/margin|padding|left|right|width|text|word|letter/i.test(o)||/X$/.test(o)||"x"===o?"x":"y";switch(y){case"%":g*="x"===q?a.percentToPxWidth:a.percentToPxHeight;break;case"px":break;default:g*=a[y+"ToPx"]}switch(b){case"%":g*=1/("x"===q?a.percentToPxWidth:a.percentToPxHeight);break;case"px":break;default:g*=1/a[b+"ToPx"]}}switch(S){case"+":f=g+f;break;case"-":f=g-f;break;case"*":f*=g;break;case"/":f=g/f}d[o]={rootPropertyValue:m,startValue:g,currentValue:g,endValue:f,unitType:b,easing:v},s&&(d[o].pattern=s),C.debug&&console.log("tweensContainer ("+o+"): "+JSON.stringify(d[o]),e)};for(var U in T)if(T.hasOwnProperty(U)){var L=I.Names.camelCase(U),W=function(t,i){var n,r,a;return w.isFunction(t)&&(t=t.call(e,o,M)),w.isArray(t)?(n=t[0],!w.isArray(t[1])&&/^[\d-]/.test(t[1])||w.isFunction(t[1])||I.RegEx.isHex.test(t[1])?a=t[1]:w.isString(t[1])&&!I.RegEx.isHex.test(t[1])&&C.Easings[t[1]]||w.isArray(t[1])?(r=i?t[1]:p(t[1],l.duration),a=t[2]):a=t[1]||t[2]):n=t,i||(r=r||l.easing),w.isFunction(n)&&(n=n.call(e,o,M)),w.isFunction(a)&&(a=a.call(e,o,M)),[n||0,r,a]}(T[U]);if(y(I.Lists.colors,L)){var P=W[0],F=W[1],V=W[2];if(I.RegEx.isHex.test(P)){for(var j=["Red","Green","Blue"],B=I.Values.hexToRgb(P),q=V?I.Values.hexToRgb(V):n,G=0;G<j.length;G++){var Z=[B[G]];F&&Z.push(F),q!==n&&Z.push(q[G]),O(L+j[G],Z)}continue}}O(L,W)}d.element=e}d.element&&(I.Values.addClass(e,"velocity-animating"),R.push(d),c=s(e),c&&(""===l.queue&&(c.tweensContainer=d,c.opts=l),c.isAnimating=!0),D===M-1?(C.State.calls.push([R,g,l,null,k.resolver,null,0]),!1===C.State.isTicking&&(C.State.isTicking=!0,m())):D++)}var a,l=h.extend({},C.defaults,b),d={};switch(s(e)===n&&C.init(e),parseFloat(l.delay)&&!1!==l.queue&&h.queue(e,l.queue,function(t,i){if(!0===i)return!0;C.velocityQueueEntryFlag=!0;var n=C.State.delayedElements.count++;C.State.delayedElements[n]=e;var o=function(e){return function(){C.State.delayedElements[e]=!1,t()}}(n);s(e).delayBegin=(new Date).getTime(),s(e).delay=parseFloat(l.delay),s(e).delayTimer={setTimeout:setTimeout(t,parseFloat(l.delay)),next:o}}),l.duration.toString().toLowerCase()){case"fast":l.duration=200;break;case"normal":l.duration=E;break;case"slow":l.duration=600;break;default:l.duration=parseFloat(l.duration)||1}if(!1!==C.mock&&(!0===C.mock?l.duration=l.delay=1:(l.duration*=parseFloat(C.mock)||1,l.delay*=parseFloat(C.mock)||1)),l.easing=p(l.easing,l.duration),l.begin&&!w.isFunction(l.begin)&&(l.begin=null),l.progress&&!w.isFunction(l.progress)&&(l.progress=null),l.complete&&!w.isFunction(l.complete)&&(l.complete=null),l.display!==n&&null!==l.display&&(l.display=l.display.toString().toLowerCase(),"auto"===l.display&&(l.display=C.CSS.Values.getDisplayType(e))),l.visibility!==n&&null!==l.visibility&&(l.visibility=l.visibility.toString().toLowerCase()),l.mobileHA=l.mobileHA&&C.State.isMobile&&!C.State.isGingerbread,!1===l.queue)if(l.delay){var c=C.State.delayedElements.count++;C.State.delayedElements[c]=e;var u=function(e){return function(){C.State.delayedElements[e]=!1,r()}}(c);s(e).delayBegin=(new Date).getTime(),s(e).delay=parseFloat(l.delay),s(e).delayTimer={setTimeout:setTimeout(r,parseFloat(l.delay)),next:u}}else r();else h.queue(e,l.queue,function(e,t){if(!0===t)return k.promise&&k.resolver(g),!0;C.velocityQueueEntryFlag=!0,r(e)});""!==l.queue&&"fx"!==l.queue||"inprogress"===h.queue(e)[0]||h.dequeue(e)}var r,c,u,v,g,T,b,S=arguments[0]&&(arguments[0].p||h.isPlainObject(arguments[0].properties)&&!arguments[0].properties.names||w.isString(arguments[0].properties));w.isWrapped(this)?(c=!1,v=0,g=this,u=this):(c=!0,v=1,g=S?arguments[0].elements||arguments[0].e:arguments[0]);var k={promise:null,resolver:null,rejecter:null};if(c&&C.Promise&&(k.promise=new C.Promise(function(e,t){k.resolver=e,k.rejecter=t})),S?(T=arguments[0].properties||arguments[0].p,b=arguments[0].options||arguments[0].o):(T=arguments[v],b=arguments[v+1]),!(g=a(g)))return void(k.promise&&(T&&b&&!1===b.promiseRejectEmpty?k.resolver():k.rejecter()));var M=g.length,D=0;if(!/^(stop|finish|finishAll|pause|resume)$/i.test(T)&&!h.isPlainObject(b)){var N=v+1;b={};for(var _=N;_<arguments.length;_++)w.isArray(arguments[_])||!/^(fast|normal|slow)$/i.test(arguments[_])&&!/^\d/.test(arguments[_])?w.isString(arguments[_])||w.isArray(arguments[_])?b.easing=arguments[_]:w.isFunction(arguments[_])&&(b.complete=arguments[_]):b.duration=arguments[_]}var A;switch(T){case"scroll":A="scroll";break;case"reverse":A="reverse";break;case"pause":var O=(new Date).getTime();return h.each(g,function(e,t){l(t,O)}),h.each(C.State.calls,function(e,t){var i=!1;t&&h.each(t[1],function(e,o){var r=b===n?"":b;return!0!==r&&t[2].queue!==r&&(b!==n||!1!==t[2].queue)||(h.each(g,function(e,n){if(n===o)return t[5]={resume:!1},i=!0,!1}),!i&&void 0)})}),e();case"resume":return h.each(g,function(e,t){d(t,O)}),h.each(C.State.calls,function(e,t){var i=!1;t&&h.each(t[1],function(e,o){var r=b===n?"":b;return!0!==r&&t[2].queue!==r&&(b!==n||!1!==t[2].queue)||(!t[5]||(h.each(g,function(e,n){if(n===o)return t[5].resume=!0,i=!0,!1}),!i&&void 0))})}),e();case"finish":case"finishAll":case"stop":h.each(g,function(e,t){s(t)&&s(t).delayTimer&&(clearTimeout(s(t).delayTimer.setTimeout),s(t).delayTimer.next&&s(t).delayTimer.next(),delete s(t).delayTimer),"finishAll"!==T||!0!==b&&!w.isString(b)||(h.each(h.queue(t,w.isString(b)?b:""),function(e,t){w.isFunction(t)&&t()}),h.queue(t,w.isString(b)?b:"",[]))});var U=[];return h.each(C.State.calls,function(e,t){t&&h.each(t[1],function(i,o){var r=b===n?"":b;if(!0!==r&&t[2].queue!==r&&(b!==n||!1!==t[2].queue))return!0;h.each(g,function(i,n){if(n===o)if((!0===b||w.isString(b))&&(h.each(h.queue(n,w.isString(b)?b:""),function(e,t){w.isFunction(t)&&t(null,!0)}),h.queue(n,w.isString(b)?b:"",[])),"stop"===T){var a=s(n);a&&a.tweensContainer&&!1!==r&&h.each(a.tweensContainer,function(e,t){t.endValue=t.currentValue}),U.push(e)}else"finish"!==T&&"finishAll"!==T||(t[2].duration=1)})})}),"stop"===T&&(h.each(U,function(e,t){f(t,!0)}),k.promise&&k.resolver(g)),e();default:if(!h.isPlainObject(T)||w.isEmptyObject(T)){if(w.isString(T)&&C.Redirects[T]){r=h.extend({},b);var L=r.duration,W=r.delay||0;return!0===r.backwards&&(g=h.extend(!0,[],g).reverse()),h.each(g,function(e,t){parseFloat(r.stagger)?r.delay=W+parseFloat(r.stagger)*e:w.isFunction(r.stagger)&&(r.delay=W+r.stagger.call(t,e,M)),r.drag&&(r.duration=parseFloat(L)||(/^(callout|transition)/.test(T)?1e3:E),r.duration=Math.max(r.duration*(r.backwards?1-e/M:(e+1)/M),.75*r.duration,200)),C.Redirects[T].call(t,t,r||{},e,M,g,k.promise?k:n)}),e()}var P="Velocity: First argument ("+T+") was not a property map, a known action, or a registered redirect. Aborting.";return k.promise?k.rejecter(new Error(P)):t.console&&console.log(P),e()}A="start"}var H={lastParent:null,lastPosition:null,lastFontSize:null,lastPercentToPxWidth:null,lastPercentToPxHeight:null,lastEmToPx:null,remToPx:null,vwToPx:null,vhToPx:null},R=[];h.each(g,function(e,t){w.isNode(t)&&o(t,e)}),r=h.extend({},C.defaults,b),r.loop=parseInt(r.loop,10);var F=2*r.loop-1;if(r.loop)for(var V=0;V<F;V++){var j={delay:r.delay,progress:r.progress};V===F-1&&(j.display=r.display,j.visibility=r.visibility,j.complete=r.complete),x(g,"reverse",j)}return e()};C=h.extend(x,C),C.animate=x;var D=t.requestAnimationFrame||g;if(!C.State.isMobile&&i.hidden!==n){var N=function(){i.hidden?(D=function(e){return setTimeout(function(){e(!0)},16)},m()):D=t.requestAnimationFrame||g};N(),i.addEventListener("visibilitychange",N)}return e.Velocity=C,e!==t&&(e.fn.velocity=x,e.fn.velocity.defaults=C.defaults),h.each(["Down","Up"],function(e,t){C.Redirects["slide"+t]=function(e,i,o,r,a,s){var l=h.extend({},i),d=l.begin,c=l.complete,u={},p={height:"",marginTop:"",marginBottom:"",paddingTop:"",paddingBottom:""};l.display===n&&(l.display="Down"===t?"inline"===C.CSS.Values.getDisplayType(e)?"inline-block":"block":"none"),l.begin=function(){0===o&&d&&d.call(a,a);for(var i in p)if(p.hasOwnProperty(i)){u[i]=e.style[i];var n=I.getPropertyValue(e,i);p[i]="Down"===t?[n,0]:[0,n]}u.overflow=e.style.overflow,e.style.overflow="hidden"},l.complete=function(){for(var t in u)u.hasOwnProperty(t)&&(e.style[t]=u[t]);o===r-1&&(c&&c.call(a,a),s&&s.resolver(a))},C(e,p,l)}}),h.each(["In","Out"],function(e,t){C.Redirects["fade"+t]=function(e,i,o,r,a,s){var l=h.extend({},i),d=l.complete,c={opacity:"In"===t?1:0};0!==o&&(l.begin=null),l.complete=o!==r-1?null:function(){d&&d.call(a,a),s&&s.resolver(a)},l.display===n&&(l.display="In"===t?"auto":"none"),C(this,c,l)}}),C}(n||window.Zepto||window,window,window?window.document:void 0)})}).call(t,i(0),i(0))},function(e,t,i){i(0),i(9),i(10),i(11),i(3),i(13),i(14),i(15),e.exports=i(16)},function(e,t,i){var n,o,r;!function(a){o=[i(0)],n=a,void 0!==(r="function"==typeof n?n.apply(t,o):n)&&(e.exports=r)}(function(e){e.extend(e.fn,{validate:function(t){if(!this.length)return void(t&&t.debug&&window.console&&console.warn("Nothing selected, can't validate, returning nothing."));var i=e.data(this[0],"validator");return i||(this.attr("novalidate","novalidate"),i=new e.validator(t,this[0]),e.data(this[0],"validator",i),i.settings.onsubmit&&(this.on("click.validate",":submit",function(t){i.submitButton=t.currentTarget,e(this).hasClass("cancel")&&(i.cancelSubmit=!0),void 0!==e(this).attr("formnovalidate")&&(i.cancelSubmit=!0)}),this.on("submit.validate",function(t){function n(){var n,o;return i.submitButton&&(i.settings.submitHandler||i.formSubmitted)&&(n=e("<input type='hidden'/>").attr("name",i.submitButton.name).val(e(i.submitButton).val()).appendTo(i.currentForm)),!i.settings.submitHandler||(o=i.settings.submitHandler.call(i,i.currentForm,t),n&&n.remove(),void 0!==o&&o)}return i.settings.debug&&t.preventDefault(),i.cancelSubmit?(i.cancelSubmit=!1,n()):i.form()?i.pendingRequest?(i.formSubmitted=!0,!1):n():(i.focusInvalid(),!1)})),i)},valid:function(){var t,i,n;return e(this[0]).is("form")?t=this.validate().form():(n=[],t=!0,i=e(this[0].form).validate(),this.each(function(){(t=i.element(this)&&t)||(n=n.concat(i.errorList))}),i.errorList=n),t},rules:function(t,i){var n,o,r,a,s,l,d=this[0];if(null!=d&&(!d.form&&d.hasAttribute("contenteditable")&&(d.form=this.closest("form")[0],d.name=this.attr("name")),null!=d.form)){if(t)switch(n=e.data(d.form,"validator").settings,o=n.rules,r=e.validator.staticRules(d),t){case"add":e.extend(r,e.validator.normalizeRule(i)),delete r.messages,o[d.name]=r,i.messages&&(n.messages[d.name]=e.extend(n.messages[d.name],i.messages));break;case"remove":return i?(l={},e.each(i.split(/\s/),function(e,t){l[t]=r[t],delete r[t]}),l):(delete o[d.name],r)}return a=e.validator.normalizeRules(e.extend({},e.validator.classRules(d),e.validator.attributeRules(d),e.validator.dataRules(d),e.validator.staticRules(d)),d),a.required&&(s=a.required,delete a.required,a=e.extend({required:s},a)),a.remote&&(s=a.remote,delete a.remote,a=e.extend(a,{remote:s})),a}}}),e.extend(e.expr.pseudos||e.expr[":"],{blank:function(t){return!e.trim(""+e(t).val())},filled:function(t){var i=e(t).val();return null!==i&&!!e.trim(""+i)},unchecked:function(t){return!e(t).prop("checked")}}),e.validator=function(t,i){this.settings=e.extend(!0,{},e.validator.defaults,t),this.currentForm=i,this.init()},e.validator.format=function(t,i){return 1===arguments.length?function(){var i=e.makeArray(arguments);return i.unshift(t),e.validator.format.apply(this,i)}:void 0===i?t:(arguments.length>2&&i.constructor!==Array&&(i=e.makeArray(arguments).slice(1)),i.constructor!==Array&&(i=[i]),e.each(i,function(e,i){t=t.replace(new RegExp("\\{"+e+"\\}","g"),function(){return i})}),t)},e.extend(e.validator,{defaults:{messages:{},groups:{},rules:{},errorClass:"error",pendingClass:"pending",validClass:"valid",errorElement:"label",focusCleanup:!1,focusInvalid:!0,errorContainer:e([]),errorLabelContainer:e([]),onsubmit:!0,ignore:":hidden",ignoreTitle:!1,onfocusin:function(e){this.lastActive=e,this.settings.focusCleanup&&(this.settings.unhighlight&&this.settings.unhighlight.call(this,e,this.settings.errorClass,this.settings.validClass),this.hideThese(this.errorsFor(e)))},onfocusout:function(e){this.checkable(e)||!(e.name in this.submitted)&&this.optional(e)||this.element(e)},onkeyup:function(t,i){var n=[16,17,18,20,35,36,37,38,39,40,45,144,225];9===i.which&&""===this.elementValue(t)||-1!==e.inArray(i.keyCode,n)||(t.name in this.submitted||t.name in this.invalid)&&this.element(t)},onclick:function(e){e.name in this.submitted?this.element(e):e.parentNode.name in this.submitted&&this.element(e.parentNode)},highlight:function(t,i,n){"radio"===t.type?this.findByName(t.name).addClass(i).removeClass(n):e(t).addClass(i).removeClass(n)},unhighlight:function(t,i,n){"radio"===t.type?this.findByName(t.name).removeClass(i).addClass(n):e(t).removeClass(i).addClass(n)}},setDefaults:function(t){e.extend(e.validator.defaults,t)},messages:{required:"This field is required.",remote:"Please fix this field.",email:"Please enter a valid email address.",url:"Please enter a valid URL.",date:"Please enter a valid date.",dateISO:"Please enter a valid date (ISO).",number:"Please enter a valid number.",digits:"Please enter only digits.",equalTo:"Please enter the same value again.",maxlength:e.validator.format("Please enter no more than {0} characters."),minlength:e.validator.format("Please enter at least {0} characters."),rangelength:e.validator.format("Please enter a value between {0} and {1} characters long."),range:e.validator.format("Please enter a value between {0} and {1}."),max:e.validator.format("Please enter a value less than or equal to {0}."),min:e.validator.format("Please enter a value greater than or equal to {0}."),step:e.validator.format("Please enter a multiple of {0}.")},autoCreateRanges:!1,prototype:{init:function(){function t(t){!this.form&&this.hasAttribute("contenteditable")&&(this.form=e(this).closest("form")[0],this.name=e(this).attr("name"));var i=e.data(this.form,"validator"),n="on"+t.type.replace(/^validate/,""),o=i.settings;o[n]&&!e(this).is(o.ignore)&&o[n].call(i,this,t)}this.labelContainer=e(this.settings.errorLabelContainer),this.errorContext=this.labelContainer.length&&this.labelContainer||e(this.currentForm),this.containers=e(this.settings.errorContainer).add(this.settings.errorLabelContainer),this.submitted={},this.valueCache={},this.pendingRequest=0,this.pending={},this.invalid={},this.reset();var i,n=this.groups={};e.each(this.settings.groups,function(t,i){"string"==typeof i&&(i=i.split(/\s/)),e.each(i,function(e,i){n[i]=t})}),i=this.settings.rules,e.each(i,function(t,n){i[t]=e.validator.normalizeRule(n)}),e(this.currentForm).on("focusin.validate focusout.validate keyup.validate",":text, [type='password'], [type='file'], select, textarea, [type='number'], [type='search'], [type='tel'], [type='url'], [type='email'], [type='datetime'], [type='date'], [type='month'], [type='week'], [type='time'], [type='datetime-local'], [type='range'], [type='color'], [type='radio'], [type='checkbox'], [contenteditable], [type='button']",t).on("click.validate","select, option, [type='radio'], [type='checkbox']",t),this.settings.invalidHandler&&e(this.currentForm).on("invalid-form.validate",this.settings.invalidHandler)},form:function(){return this.checkForm(),e.extend(this.submitted,this.errorMap),this.invalid=e.extend({},this.errorMap),this.valid()||e(this.currentForm).triggerHandler("invalid-form",[this]),this.showErrors(),this.valid()},checkForm:function(){this.prepareForm();for(var e=0,t=this.currentElements=this.elements();t[e];e++)this.check(t[e]);return this.valid()},element:function(t){var i,n,o=this.clean(t),r=this.validationTargetFor(o),a=this,s=!0;return void 0===r?delete this.invalid[o.name]:(this.prepareElement(r),this.currentElements=e(r),n=this.groups[r.name],n&&e.each(this.groups,function(e,t){t===n&&e!==r.name&&(o=a.validationTargetFor(a.clean(a.findByName(e))))&&o.name in a.invalid&&(a.currentElements.push(o),s=a.check(o)&&s)}),i=!1!==this.check(r),s=s&&i,this.invalid[r.name]=!i,this.numberOfInvalids()||(this.toHide=this.toHide.add(this.containers)),this.showErrors(),e(t).attr("aria-invalid",!i)),s},showErrors:function(t){if(t){var i=this;e.extend(this.errorMap,t),this.errorList=e.map(this.errorMap,function(e,t){return{message:e,element:i.findByName(t)[0]}}),this.successList=e.grep(this.successList,function(e){return!(e.name in t)})}this.settings.showErrors?this.settings.showErrors.call(this,this.errorMap,this.errorList):this.defaultShowErrors()},resetForm:function(){e.fn.resetForm&&e(this.currentForm).resetForm(),this.invalid={},this.submitted={},this.prepareForm(),this.hideErrors();var t=this.elements().removeData("previousValue").removeAttr("aria-invalid");this.resetElements(t)},resetElements:function(e){var t;if(this.settings.unhighlight)for(t=0;e[t];t++)this.settings.unhighlight.call(this,e[t],this.settings.errorClass,""),this.findByName(e[t].name).removeClass(this.settings.validClass);else e.removeClass(this.settings.errorClass).removeClass(this.settings.validClass)},numberOfInvalids:function(){return this.objectLength(this.invalid)},objectLength:function(e){var t,i=0;for(t in e)void 0!==e[t]&&null!==e[t]&&!1!==e[t]&&i++;return i},hideErrors:function(){this.hideThese(this.toHide)},hideThese:function(e){e.not(this.containers).text(""),this.addWrapper(e).hide()},valid:function(){return 0===this.size()},size:function(){return this.errorList.length},focusInvalid:function(){if(this.settings.focusInvalid)try{e(this.findLastActive()||this.errorList.length&&this.errorList[0].element||[]).filter(":visible").focus().trigger("focusin")}catch(e){}},findLastActive:function(){var t=this.lastActive;return t&&1===e.grep(this.errorList,function(e){return e.element.name===t.name}).length&&t},elements:function(){var t=this,i={};return e(this.currentForm).find("input, select, textarea, [contenteditable]").not(":submit, :reset, :image, :disabled").not(this.settings.ignore).filter(function(){var n=this.name||e(this).attr("name");return!n&&t.settings.debug&&window.console&&console.error("%o has no name assigned",this),this.hasAttribute("contenteditable")&&(this.form=e(this).closest("form")[0],this.name=n),!(n in i||!t.objectLength(e(this).rules()))&&(i[n]=!0,!0)})},clean:function(t){return e(t)[0]},errors:function(){var t=this.settings.errorClass.split(" ").join(".");return e(this.settings.errorElement+"."+t,this.errorContext)},resetInternals:function(){this.successList=[],this.errorList=[],this.errorMap={},this.toShow=e([]),this.toHide=e([])},reset:function(){this.resetInternals(),this.currentElements=e([])},prepareForm:function(){this.reset(),this.toHide=this.errors().add(this.containers)},prepareElement:function(e){this.reset(),this.toHide=this.errorsFor(e)},elementValue:function(t){var i,n,o=e(t),r=t.type;return"radio"===r||"checkbox"===r?this.findByName(t.name).filter(":checked").val():"number"===r&&void 0!==t.validity?t.validity.badInput?"NaN":o.val():(i=t.hasAttribute("contenteditable")?o.text():o.val(),"file"===r?"C:\\fakepath\\"===i.substr(0,12)?i.substr(12):(n=i.lastIndexOf("/"))>=0?i.substr(n+1):(n=i.lastIndexOf("\\"),n>=0?i.substr(n+1):i):"string"==typeof i?i.replace(/\r/g,""):i)},check:function(t){t=this.validationTargetFor(this.clean(t));var i,n,o,r,a=e(t).rules(),s=e.map(a,function(e,t){return t}).length,l=!1,d=this.elementValue(t);if("function"==typeof a.normalizer?r=a.normalizer:"function"==typeof this.settings.normalizer&&(r=this.settings.normalizer),r){if("string"!=typeof(d=r.call(t,d)))throw new TypeError("The normalizer should return a string value.");delete a.normalizer}for(n in a){o={method:n,parameters:a[n]};try{if("dependency-mismatch"===(i=e.validator.methods[n].call(this,d,t,o.parameters))&&1===s){l=!0;continue}if(l=!1,"pending"===i)return void(this.toHide=this.toHide.not(this.errorsFor(t)));if(!i)return this.formatAndAdd(t,o),!1}catch(e){throw this.settings.debug&&window.console&&console.log("Exception occurred when checking element "+t.id+", check the '"+o.method+"' method.",e),e instanceof TypeError&&(e.message+=".  Exception occurred when checking element "+t.id+", check the '"+o.method+"' method."),e}}if(!l)return this.objectLength(a)&&this.successList.push(t),!0},customDataMessage:function(t,i){return e(t).data("msg"+i.charAt(0).toUpperCase()+i.substring(1).toLowerCase())||e(t).data("msg")},customMessage:function(e,t){var i=this.settings.messages[e];return i&&(i.constructor===String?i:i[t])},findDefined:function(){for(var e=0;e<arguments.length;e++)if(void 0!==arguments[e])return arguments[e]},defaultMessage:function(t,i){"string"==typeof i&&(i={method:i});var n=this.findDefined(this.customMessage(t.name,i.method),this.customDataMessage(t,i.method),!this.settings.ignoreTitle&&t.title||void 0,e.validator.messages[i.method],"<strong>Warning: No message defined for "+t.name+"</strong>"),o=/\$?\{(\d+)\}/g;return"function"==typeof n?n=n.call(this,i.parameters,t):o.test(n)&&(n=e.validator.format(n.replace(o,"{$1}"),i.parameters)),n},formatAndAdd:function(e,t){var i=this.defaultMessage(e,t);this.errorList.push({message:i,element:e,method:t.method}),this.errorMap[e.name]=i,this.submitted[e.name]=i},addWrapper:function(e){return this.settings.wrapper&&(e=e.add(e.parent(this.settings.wrapper))),e},defaultShowErrors:function(){var e,t,i;for(e=0;this.errorList[e];e++)i=this.errorList[e],this.settings.highlight&&this.settings.highlight.call(this,i.element,this.settings.errorClass,this.settings.validClass),this.showLabel(i.element,i.message);if(this.errorList.length&&(this.toShow=this.toShow.add(this.containers)),this.settings.success)for(e=0;this.successList[e];e++)this.showLabel(this.successList[e]);if(this.settings.unhighlight)for(e=0,t=this.validElements();t[e];e++)this.settings.unhighlight.call(this,t[e],this.settings.errorClass,this.settings.validClass);this.toHide=this.toHide.not(this.toShow),this.hideErrors(),this.addWrapper(this.toShow).show()},validElements:function(){return this.currentElements.not(this.invalidElements())},invalidElements:function(){return e(this.errorList).map(function(){return this.element})},showLabel:function(t,i){var n,o,r,a,s=this.errorsFor(t),l=this.idOrName(t),d=e(t).attr("aria-describedby");s.length?(s.removeClass(this.settings.validClass).addClass(this.settings.errorClass),s.html(i)):(s=e("<"+this.settings.errorElement+">").attr("id",l+"-error").addClass(this.settings.errorClass).html(i||""),n=s,this.settings.wrapper&&(n=s.hide().show().wrap("<"+this.settings.wrapper+"/>").parent()),this.labelContainer.length?this.labelContainer.append(n):this.settings.errorPlacement?this.settings.errorPlacement.call(this,n,e(t)):n.insertAfter(t),s.is("label")?s.attr("for",l):0===s.parents("label[for='"+this.escapeCssMeta(l)+"']").length&&(r=s.attr("id"),d?d.match(new RegExp("\\b"+this.escapeCssMeta(r)+"\\b"))||(d+=" "+r):d=r,e(t).attr("aria-describedby",d),(o=this.groups[t.name])&&(a=this,e.each(a.groups,function(t,i){i===o&&e("[name='"+a.escapeCssMeta(t)+"']",a.currentForm).attr("aria-describedby",s.attr("id"))})))),!i&&this.settings.success&&(s.text(""),"string"==typeof this.settings.success?s.addClass(this.settings.success):this.settings.success(s,t)),this.toShow=this.toShow.add(s)},errorsFor:function(t){var i=this.escapeCssMeta(this.idOrName(t)),n=e(t).attr("aria-describedby"),o="label[for='"+i+"'], label[for='"+i+"'] *";return n&&(o=o+", #"+this.escapeCssMeta(n).replace(/\s+/g,", #")),this.errors().filter(o)},escapeCssMeta:function(e){return e.replace(/([\\!"#$%&'()*+,.\/:;<=>?@\[\]^`{|}~])/g,"\\$1")},idOrName:function(e){return this.groups[e.name]||(this.checkable(e)?e.name:e.id||e.name)},validationTargetFor:function(t){return this.checkable(t)&&(t=this.findByName(t.name)),e(t).not(this.settings.ignore)[0]},checkable:function(e){return/radio|checkbox/i.test(e.type)},findByName:function(t){return e(this.currentForm).find("[name='"+this.escapeCssMeta(t)+"']")},getLength:function(t,i){switch(i.nodeName.toLowerCase()){case"select":return e("option:selected",i).length;case"input":if(this.checkable(i))return this.findByName(i.name).filter(":checked").length}return t.length},depend:function(e,t){return!this.dependTypes[typeof e]||this.dependTypes[typeof e](e,t)},dependTypes:{boolean:function(e){return e},string:function(t,i){return!!e(t,i.form).length},function:function(e,t){return e(t)}},optional:function(t){var i=this.elementValue(t);return!e.validator.methods.required.call(this,i,t)&&"dependency-mismatch"},startRequest:function(t){this.pending[t.name]||(this.pendingRequest++,e(t).addClass(this.settings.pendingClass),this.pending[t.name]=!0)},stopRequest:function(t,i){this.pendingRequest--,this.pendingRequest<0&&(this.pendingRequest=0),delete this.pending[t.name],e(t).removeClass(this.settings.pendingClass),i&&0===this.pendingRequest&&this.formSubmitted&&this.form()?(e(this.currentForm).submit(),this.submitButton&&e("input:hidden[name='"+this.submitButton.name+"']",this.currentForm).remove(),this.formSubmitted=!1):!i&&0===this.pendingRequest&&this.formSubmitted&&(e(this.currentForm).triggerHandler("invalid-form",[this]),this.formSubmitted=!1)},previousValue:function(t,i){return i="string"==typeof i&&i||"remote",e.data(t,"previousValue")||e.data(t,"previousValue",{old:null,valid:!0,message:this.defaultMessage(t,{method:i})})},destroy:function(){this.resetForm(),e(this.currentForm).off(".validate").removeData("validator").find(".validate-equalTo-blur").off(".validate-equalTo").removeClass("validate-equalTo-blur")}},classRuleSettings:{required:{required:!0},email:{email:!0},url:{url:!0},date:{date:!0},dateISO:{dateISO:!0},number:{number:!0},digits:{digits:!0},creditcard:{creditcard:!0}},addClassRules:function(t,i){t.constructor===String?this.classRuleSettings[t]=i:e.extend(this.classRuleSettings,t)},classRules:function(t){var i={},n=e(t).attr("class");return n&&e.each(n.split(" "),function(){this in e.validator.classRuleSettings&&e.extend(i,e.validator.classRuleSettings[this])}),i},normalizeAttributeRule:function(e,t,i,n){/min|max|step/.test(i)&&(null===t||/number|range|text/.test(t))&&(n=Number(n),isNaN(n)&&(n=void 0)),n||0===n?e[i]=n:t===i&&"range"!==t&&(e[i]=!0)},attributeRules:function(t){var i,n,o={},r=e(t),a=t.getAttribute("type");for(i in e.validator.methods)"required"===i?(n=t.getAttribute(i),""===n&&(n=!0),n=!!n):n=r.attr(i),this.normalizeAttributeRule(o,a,i,n);return o.maxlength&&/-1|2147483647|524288/.test(o.maxlength)&&delete o.maxlength,o},dataRules:function(t){var i,n,o={},r=e(t),a=t.getAttribute("type");for(i in e.validator.methods)n=r.data("rule"+i.charAt(0).toUpperCase()+i.substring(1).toLowerCase()),this.normalizeAttributeRule(o,a,i,n);return o},staticRules:function(t){var i={},n=e.data(t.form,"validator");return n.settings.rules&&(i=e.validator.normalizeRule(n.settings.rules[t.name])||{}),i},normalizeRules:function(t,i){return e.each(t,function(n,o){if(!1===o)return void delete t[n];if(o.param||o.depends){var r=!0;switch(typeof o.depends){case"string":r=!!e(o.depends,i.form).length;break;case"function":r=o.depends.call(i,i)}r?t[n]=void 0===o.param||o.param:(e.data(i.form,"validator").resetElements(e(i)),delete t[n])}}),e.each(t,function(n,o){t[n]=e.isFunction(o)&&"normalizer"!==n?o(i):o}),e.each(["minlength","maxlength"],function(){t[this]&&(t[this]=Number(t[this]))}),e.each(["rangelength","range"],function(){var i;t[this]&&(e.isArray(t[this])?t[this]=[Number(t[this][0]),Number(t[this][1])]:"string"==typeof t[this]&&(i=t[this].replace(/[\[\]]/g,"").split(/[\s,]+/),t[this]=[Number(i[0]),Number(i[1])]))}),e.validator.autoCreateRanges&&(null!=t.min&&null!=t.max&&(t.range=[t.min,t.max],delete t.min,delete t.max),null!=t.minlength&&null!=t.maxlength&&(t.rangelength=[t.minlength,t.maxlength],delete t.minlength,delete t.maxlength)),t},normalizeRule:function(t){if("string"==typeof t){var i={};e.each(t.split(/\s/),function(){i[this]=!0}),t=i}return t},addMethod:function(t,i,n){e.validator.methods[t]=i,e.validator.messages[t]=void 0!==n?n:e.validator.messages[t],i.length<3&&e.validator.addClassRules(t,e.validator.normalizeRule(t))},methods:{required:function(t,i,n){if(!this.depend(n,i))return"dependency-mismatch";if("select"===i.nodeName.toLowerCase()){var o=e(i).val();return o&&o.length>0}return this.checkable(i)?this.getLength(t,i)>0:t.length>0},email:function(e,t){return this.optional(t)||/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/.test(e)},url:function(e,t){return this.optional(t)||/^(?:(?:(?:https?|ftp):)?\/\/)(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)(?:\.(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)*(?:\.(?:[a-z\u00a1-\uffff]{2,})).?)(?::\d{2,5})?(?:[\/?#]\S*)?$/i.test(e)},date:function(e,t){return this.optional(t)||!/Invalid|NaN/.test(new Date(e).toString())},dateISO:function(e,t){return this.optional(t)||/^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])$/.test(e)},number:function(e,t){return this.optional(t)||/^(?:-?\d+|-?\d{1,3}(?:,\d{3})+)?(?:\.\d+)?$/.test(e)},digits:function(e,t){return this.optional(t)||/^\d+$/.test(e)},minlength:function(t,i,n){var o=e.isArray(t)?t.length:this.getLength(t,i);return this.optional(i)||o>=n},maxlength:function(t,i,n){var o=e.isArray(t)?t.length:this.getLength(t,i);return this.optional(i)||o<=n},rangelength:function(t,i,n){var o=e.isArray(t)?t.length:this.getLength(t,i);return this.optional(i)||o>=n[0]&&o<=n[1]},min:function(e,t,i){return this.optional(t)||e>=i},max:function(e,t,i){return this.optional(t)||e<=i},range:function(e,t,i){return this.optional(t)||e>=i[0]&&e<=i[1]},step:function(t,i,n){var o,r=e(i).attr("type"),a="Step attribute on input type "+r+" is not supported.",s=["text","number","range"],l=new RegExp("\\b"+r+"\\b"),d=r&&!l.test(s.join()),c=function(e){var t=(""+e).match(/(?:\.(\d+))?$/);return t&&t[1]?t[1].length:0},u=function(e){return Math.round(e*Math.pow(10,o))},p=!0;if(d)throw new Error(a);return o=c(n),(c(t)>o||u(t)%u(n)!=0)&&(p=!1),this.optional(i)||p},equalTo:function(t,i,n){var o=e(n);return this.settings.onfocusout&&o.not(".validate-equalTo-blur").length&&o.addClass("validate-equalTo-blur").on("blur.validate-equalTo",function(){e(i).valid()}),t===o.val()},remote:function(t,i,n,o){if(this.optional(i))return"dependency-mismatch";o="string"==typeof o&&o||"remote";var r,a,s,l=this.previousValue(i,o);return this.settings.messages[i.name]||(this.settings.messages[i.name]={}),l.originalMessage=l.originalMessage||this.settings.messages[i.name][o],this.settings.messages[i.name][o]=l.message,n="string"==typeof n&&{url:n}||n,s=e.param(e.extend({data:t},n.data)),l.old===s?l.valid:(l.old=s,r=this,this.startRequest(i),a={},a[i.name]=t,e.ajax(e.extend(!0,{mode:"abort",port:"validate"+i.name,dataType:"json",data:a,context:r.currentForm,success:function(e){var n,a,s,d=!0===e||"true"===e;r.settings.messages[i.name][o]=l.originalMessage,d?(s=r.formSubmitted,r.resetInternals(),r.toHide=r.errorsFor(i),r.formSubmitted=s,r.successList.push(i),r.invalid[i.name]=!1,r.showErrors()):(n={},a=e||r.defaultMessage(i,{method:o,parameters:t}),n[i.name]=l.message=a,r.invalid[i.name]=!0,r.showErrors(n)),l.valid=d,r.stopRequest(i,d)}},n)),"pending")}}});var t,i={};return e.ajaxPrefilter?e.ajaxPrefilter(function(e,t,n){var o=e.port;"abort"===e.mode&&(i[o]&&i[o].abort(),i[o]=n)}):(t=e.ajax,e.ajax=function(n){var o=("mode"in n?n:e.ajaxSettings).mode,r=("port"in n?n:e.ajaxSettings).port;return"abort"===o?(i[r]&&i[r].abort(),i[r]=t.apply(this,arguments),i[r]):t.apply(this,arguments)}),e})},function(e,t,i){(function(e){!function(e){function t(e,t,i){e.rules[t]=i,e.message&&(e.messages[t]=e.message)}function i(e){return e.replace(/^\s+|\s+$/g,"").split(/\s*,\s*/g)}function n(e){return e.replace(/([!"#$%&'()*+,.\/:;<=>?@\[\\\]^`{|}~])/g,"\\$1")}function o(e){return e.substr(0,e.lastIndexOf(".")+1)}function r(e,t){return 0===e.indexOf("*.")&&(e=e.replace("*.",t)),e}function a(t,i){var o=e(this).find("[data-valmsg-for='"+n(i[0].name)+"']"),r=o.attr("data-valmsg-replace"),a=r?!1!==e.parseJSON(r):null;o.removeClass("field-validation-valid").addClass("field-validation-error"),t.data("unobtrusiveContainer",o),a?(o.empty(),t.removeClass("input-validation-error").appendTo(o)):t.hide()}function s(t,i){var n=e(this).find("[data-valmsg-summary=true]"),o=n.find("ul");o&&o.length&&i.errorList.length&&(o.empty(),n.addClass("validation-summary-errors").removeClass("validation-summary-valid"),e.each(i.errorList,function(){e("<li />").html(this.message).appendTo(o)}))}function l(t){var i=t.data("unobtrusiveContainer");if(i){var n=i.attr("data-valmsg-replace"),o=n?e.parseJSON(n):null;i.addClass("field-validation-valid").removeClass("field-validation-error"),t.removeData("unobtrusiveContainer"),o&&i.empty()}}function d(t){var i=e(this),n="__jquery_unobtrusive_validation_form_reset";if(!i.data(n)){i.data(n,!0);try{i.data("validator").resetForm()}finally{i.removeData(n)}i.find(".validation-summary-errors").addClass("validation-summary-valid").removeClass("validation-summary-errors"),i.find(".field-validation-error").addClass("field-validation-valid").removeClass("field-validation-error").removeData("unobtrusiveContainer").find(">*").removeData("unobtrusiveContainer")}}function c(t){var i=e(t),n=i.data(m),o=e.proxy(d,t),r=p.unobtrusive.options||{},c=function(i,n){var o=r[i];o&&e.isFunction(o)&&o.apply(t,n)};return n||(n={options:{errorClass:r.errorClass||"input-validation-error",errorElement:r.errorElement||"span",errorPlacement:function(){a.apply(t,arguments),c("errorPlacement",arguments)},invalidHandler:function(){s.apply(t,arguments),c("invalidHandler",arguments)},messages:{},rules:{},success:function(){l.apply(t,arguments),c("success",arguments)}},attachValidation:function(){i.off("reset."+m,o).on("reset."+m,o).validate(this.options)},validate:function(){return i.validate(),i.valid()}},i.data(m,n)),n}var u,p=e.validator,m="unobtrusiveValidation";p.unobtrusive={adapters:[],parseElement:function(t,i){var n,o,r,a=e(t),s=a.parents("form")[0];s&&(n=c(s),n.options.rules[t.name]=o={},n.options.messages[t.name]=r={},e.each(this.adapters,function(){var i="data-val-"+this.name,n=a.attr(i),l={};void 0!==n&&(i+="-",e.each(this.params,function(){l[this]=a.attr(i+this)}),this.adapt({element:t,form:s,message:n,params:l,rules:o,messages:r}))}),e.extend(o,{__dummy__:!0}),i||n.attachValidation())},parse:function(t){var i=e(t),n=i.parents().addBack().filter("form").add(i.find("form")).has("[data-val=true]");i.find("[data-val=true]").each(function(){p.unobtrusive.parseElement(this,!0)}),n.each(function(){var e=c(this);e&&e.attachValidation()})}},u=p.unobtrusive.adapters,u.add=function(e,t,i){return i||(i=t,t=[]),this.push({name:e,params:t,adapt:i}),this},u.addBool=function(e,i){return this.add(e,function(n){t(n,i||e,!0)})},u.addMinMax=function(e,i,n,o,r,a){return this.add(e,[r||"min",a||"max"],function(e){var r=e.params.min,a=e.params.max;r&&a?t(e,o,[r,a]):r?t(e,i,r):a&&t(e,n,a)})},u.addSingleVal=function(e,i,n){return this.add(e,[i||"val"],function(o){t(o,n||e,o.params[i])})},p.addMethod("__dummy__",function(e,t,i){return!0}),p.addMethod("regex",function(e,t,i){var n;return!!this.optional(t)||(n=new RegExp(i).exec(e))&&0===n.index&&n[0].length===e.length}),p.addMethod("nonalphamin",function(e,t,i){var n;return i&&(n=e.match(/\W/g),n=n&&n.length>=i),n}),p.methods.extension?(u.addSingleVal("accept","mimtype"),u.addSingleVal("extension","extension")):u.addSingleVal("extension","extension","accept"),u.addSingleVal("regex","pattern"),u.addBool("creditcard").addBool("date").addBool("digits").addBool("email").addBool("number").addBool("url"),u.addMinMax("length","minlength","maxlength","rangelength").addMinMax("range","min","max","range"),u.addMinMax("minlength","minlength").addMinMax("maxlength","minlength","maxlength"),u.add("equalto",["other"],function(i){var a=o(i.element.name),s=i.params.other,l=r(s,a);t(i,"equalTo",e(i.form).find(":input").filter("[name='"+n(l)+"']")[0])}),u.add("required",function(e){"INPUT"===e.element.tagName.toUpperCase()&&"CHECKBOX"===e.element.type.toUpperCase()||t(e,"required",!0)}),u.add("remote",["url","type","additionalfields"],function(a){var s={url:a.params.url,type:a.params.type||"GET",data:{}},l=o(a.element.name);e.each(i(a.params.additionalfields||a.element.name),function(t,i){var o=r(i,l);s.data[o]=function(){var t=e(a.form).find(":input").filter("[name='"+n(o)+"']");return t.is(":checkbox")?t.filter(":checked").val()||t.filter(":hidden").val()||"":t.is(":radio")?t.filter(":checked").val()||"":t.val()}}),t(a,"remote",s)}),u.add("password",["min","nonalphamin","regex"],function(e){e.params.min&&t(e,"minlength",e.params.min),e.params.nonalphamin&&t(e,"nonalphamin",e.params.nonalphamin),e.params.regex&&t(e,"regex",e.params.regex)}),e(function(){p.unobtrusive.parse(document)})}(e)}).call(t,i(0))},function(e,t,i){var n,o;!function(r,a){n=a,void 0!==(o="function"==typeof n?n.call(t,i,t,e):n)&&(e.exports=o)}(0,function(e,t,i){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e){var t=e.getBoundingClientRect(),i={};for(var n in t)i[n]=t[n];if(e.ownerDocument!==document){var r=e.ownerDocument.defaultView.frameElement;if(r){var a=o(r);i.top+=a.top,i.bottom+=a.top,i.left+=a.left,i.right+=a.left}}return i}function r(e){var t=getComputedStyle(e)||{},i=t.position,n=[];if("fixed"===i)return[e];for(var o=e;(o=o.parentNode)&&o&&1===o.nodeType;){var r=void 0;try{r=getComputedStyle(o)}catch(e){}if(void 0===r||null===r)return n.push(o),n;var a=r,s=a.overflow,l=a.overflowX;/(auto|scroll|overlay)/.test(s+a.overflowY+l)&&("absolute"!==i||["relative","absolute","fixed"].indexOf(r.position)>=0)&&n.push(o)}return n.push(e.ownerDocument.body),e.ownerDocument!==document&&n.push(e.ownerDocument.defaultView),n}function a(){C&&document.body.removeChild(C),C=null}function s(e){var t=void 0;e===document?(t=document,e=document.documentElement):t=e.ownerDocument;var i=t.documentElement,n=o(e),r=x();return n.top-=r.top,n.left-=r.left,void 0===n.width&&(n.width=document.body.scrollWidth-n.left-n.right),void 0===n.height&&(n.height=document.body.scrollHeight-n.top-n.bottom),n.top=n.top-i.clientTop,n.left=n.left-i.clientLeft,n.right=t.body.clientWidth-n.width-n.left,n.bottom=t.body.clientHeight-n.height-n.top,n}function l(e){return e.offsetParent||document.documentElement}function d(){if(D)return D;var e=document.createElement("div");e.style.width="100%",e.style.height="200px";var t=document.createElement("div");c(t.style,{position:"absolute",top:0,left:0,pointerEvents:"none",visibility:"hidden",width:"200px",height:"150px",overflow:"hidden"}),t.appendChild(e),document.body.appendChild(t);var i=e.offsetWidth;t.style.overflow="scroll";var n=e.offsetWidth;i===n&&(n=t.clientWidth),document.body.removeChild(t);var o=i-n;return D={width:o,height:o}}function c(){var e=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],t=[];return Array.prototype.push.apply(t,arguments),t.slice(1).forEach(function(t){if(t)for(var i in t)({}).hasOwnProperty.call(t,i)&&(e[i]=t[i])}),e}function u(e,t){if(void 0!==e.classList)t.split(" ").forEach(function(t){t.trim()&&e.classList.remove(t)});else{var i=new RegExp("(^| )"+t.split(" ").join("|")+"( |$)","gi"),n=f(e).replace(i," ");h(e,n)}}function p(e,t){if(void 0!==e.classList)t.split(" ").forEach(function(t){t.trim()&&e.classList.add(t)});else{u(e,t);var i=f(e)+" "+t;h(e,i)}}function m(e,t){if(void 0!==e.classList)return e.classList.contains(t);var i=f(e);return new RegExp("(^| )"+t+"( |$)","gi").test(i)}function f(e){return e.className instanceof e.ownerDocument.defaultView.SVGAnimatedString?e.className.baseVal:e.className}function h(e,t){e.setAttribute("class",t)}function v(e,t,i){i.forEach(function(i){-1===t.indexOf(i)&&m(e,i)&&u(e,i)}),t.forEach(function(t){m(e,t)||p(e,t)})}function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function g(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function T(e,t){var i=arguments.length<=2||void 0===arguments[2]?1:arguments[2];return e+i>=t&&t>=e-i}function b(){return"object"==typeof performance&&"function"==typeof performance.now?performance.now():+new Date}function y(){for(var e={top:0,left:0},t=arguments.length,i=Array(t),n=0;n<t;n++)i[n]=arguments[n];return i.forEach(function(t){var i=t.top,n=t.left;"string"==typeof i&&(i=parseFloat(i,10)),"string"==typeof n&&(n=parseFloat(n,10)),e.top+=i,e.left+=n}),e}function w(e,t){return"string"==typeof e.left&&-1!==e.left.indexOf("%")&&(e.left=parseFloat(e.left,10)/100*t.width),"string"==typeof e.top&&-1!==e.top.indexOf("%")&&(e.top=parseFloat(e.top,10)/100*t.height),e}function S(e,t){return"scrollParent"===t?t=e.scrollParents[0]:"window"===t&&(t=[pageXOffset,pageYOffset,innerWidth+pageXOffset,innerHeight+pageYOffset]),t===document&&(t=t.documentElement),void 0!==t.nodeType&&function(){var e=t,i=s(t),n=i,o=getComputedStyle(t);if(t=[n.left,n.top,i.width+n.left,i.height+n.top],e.ownerDocument!==document){var r=e.ownerDocument.defaultView;t[0]+=r.pageXOffset,t[1]+=r.pageYOffset,t[2]+=r.pageXOffset,t[3]+=r.pageYOffset}Y.forEach(function(e,i){e=e[0].toUpperCase()+e.substr(1),"Top"===e||"Left"===e?t[i]+=parseFloat(o["border"+e+"Width"]):t[i]-=parseFloat(o["border"+e+"Width"])})}(),t}var E=function(){function e(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,i,n){return i&&e(t.prototype,i),n&&e(t,n),t}}(),k=void 0;void 0===k&&(k={modules:[]});var C=null,M=function(){var e=0;return function(){return++e}}(),I={},x=function(){var e=C;e&&document.body.contains(e)||(e=document.createElement("div"),e.setAttribute("data-tether-id",M()),c(e.style,{top:0,left:0,position:"absolute"}),document.body.appendChild(e),C=e);var t=e.getAttribute("data-tether-id");return void 0===I[t]&&(I[t]=o(e),_(function(){delete I[t]})),I[t]},D=null,N=[],_=function(e){N.push(e)},A=function(){for(var e=void 0;e=N.pop();)e()},O=function(){function e(){n(this,e)}return E(e,[{key:"on",value:function(e,t,i){var n=!(arguments.length<=3||void 0===arguments[3])&&arguments[3];void 0===this.bindings&&(this.bindings={}),void 0===this.bindings[e]&&(this.bindings[e]=[]),this.bindings[e].push({handler:t,ctx:i,once:n})}},{key:"once",value:function(e,t,i){this.on(e,t,i,!0)}},{key:"off",value:function(e,t){if(void 0!==this.bindings&&void 0!==this.bindings[e])if(void 0===t)delete this.bindings[e];else for(var i=0;i<this.bindings[e].length;)this.bindings[e][i].handler===t?this.bindings[e].splice(i,1):++i}},{key:"trigger",value:function(e){if(void 0!==this.bindings&&this.bindings[e]){for(var t=0,i=arguments.length,n=Array(i>1?i-1:0),o=1;o<i;o++)n[o-1]=arguments[o];for(;t<this.bindings[e].length;){var r=this.bindings[e][t],a=r.handler,s=r.ctx,l=r.once,d=s;void 0===d&&(d=this),a.apply(d,n),l?this.bindings[e].splice(t,1):++t}}}}]),e}();k.Utils={getActualBoundingClientRect:o,getScrollParents:r,getBounds:s,getOffsetParent:l,extend:c,addClass:p,removeClass:u,hasClass:m,updateClasses:v,defer:_,flush:A,uniqueId:M,Evented:O,getScrollBarSize:d,removeUtilElements:a};var U=function(){function e(e,t){var i=[],n=!0,o=!1,r=void 0;try{for(var a,s=e[Symbol.iterator]();!(n=(a=s.next()).done)&&(i.push(a.value),!t||i.length!==t);n=!0);}catch(e){o=!0,r=e}finally{try{!n&&s.return&&s.return()}finally{if(o)throw r}}return i}return function(t,i){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,i);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),E=function(){function e(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,i,n){return i&&e(t.prototype,i),n&&e(t,n),t}}(),L=function(e,t,i){for(var n=!0;n;){var o=e,r=t,a=i;n=!1,null===o&&(o=Function.prototype);var s=Object.getOwnPropertyDescriptor(o,r);if(void 0!==s){if("value"in s)return s.value;var l=s.get;if(void 0===l)return;return l.call(a)}var d=Object.getPrototypeOf(o);if(null===d)return;e=d,t=r,i=a,n=!0,s=d=void 0}};if(void 0===k)throw new Error("You must include the utils.js file before tether.js");var W=k.Utils,r=W.getScrollParents,s=W.getBounds,l=W.getOffsetParent,c=W.extend,p=W.addClass,u=W.removeClass,v=W.updateClasses,_=W.defer,A=W.flush,d=W.getScrollBarSize,a=W.removeUtilElements,P=function(){if("undefined"==typeof document)return"";for(var e=document.createElement("div"),t=["transform","WebkitTransform","OTransform","MozTransform","msTransform"],i=0;i<t.length;++i){var n=t[i];if(void 0!==e.style[n])return n}}(),H=[],R=function(){H.forEach(function(e){e.position(!1)}),A()};!function(){var e=null,t=null,i=null,n=function n(){if(void 0!==t&&t>16)return t=Math.min(t-16,250),void(i=setTimeout(n,250));void 0!==e&&b()-e<10||(null!=i&&(clearTimeout(i),i=null),e=b(),R(),t=b()-e)};"undefined"!=typeof window&&void 0!==window.addEventListener&&["resize","scroll","touchmove"].forEach(function(e){window.addEventListener(e,n)})}();var F={center:"center",left:"right",right:"left"},V={middle:"middle",top:"bottom",bottom:"top"},j={top:0,left:0,middle:"50%",center:"50%",bottom:"100%",right:"100%"},B=function(e,t){var i=e.left,n=e.top;return"auto"===i&&(i=F[t.left]),"auto"===n&&(n=V[t.top]),{left:i,top:n}},q=function(e){var t=e.left,i=e.top;return void 0!==j[e.left]&&(t=j[e.left]),void 0!==j[e.top]&&(i=j[e.top]),{left:t,top:i}},G=function(e){var t=e.split(" "),i=U(t,2);return{top:i[0],left:i[1]}},Z=G,z=function(e){function t(e){var i=this;n(this,t),L(Object.getPrototypeOf(t.prototype),"constructor",this).call(this),this.position=this.position.bind(this),H.push(this),this.history=[],this.setOptions(e,!1),k.modules.forEach(function(e){void 0!==e.initialize&&e.initialize.call(i)}),this.position()}return g(t,e),E(t,[{key:"getClass",value:function(){var e=arguments.length<=0||void 0===arguments[0]?"":arguments[0],t=this.options.classes;return void 0!==t&&t[e]?this.options.classes[e]:this.options.classPrefix?this.options.classPrefix+"-"+e:e}},{key:"setOptions",value:function(e){var t=this,i=arguments.length<=1||void 0===arguments[1]||arguments[1],n={offset:"0 0",targetOffset:"0 0",targetAttachment:"auto auto",classPrefix:"tether"};this.options=c(n,e);var o=this.options,a=o.element,s=o.target,l=o.targetModifier;if(this.element=a,this.target=s,this.targetModifier=l,"viewport"===this.target?(this.target=document.body,this.targetModifier="visible"):"scroll-handle"===this.target&&(this.target=document.body,this.targetModifier="scroll-handle"),["element","target"].forEach(function(e){if(void 0===t[e])throw new Error("Tether Error: Both element and target must be defined");void 0!==t[e].jquery?t[e]=t[e][0]:"string"==typeof t[e]&&(t[e]=document.querySelector(t[e]))}),p(this.element,this.getClass("element")),!1!==this.options.addTargetClasses&&p(this.target,this.getClass("target")),!this.options.attachment)throw new Error("Tether Error: You must provide an attachment");this.targetAttachment=Z(this.options.targetAttachment),this.attachment=Z(this.options.attachment),this.offset=G(this.options.offset),this.targetOffset=G(this.options.targetOffset),void 0!==this.scrollParents&&this.disable(),"scroll-handle"===this.targetModifier?this.scrollParents=[this.target]:this.scrollParents=r(this.target),!1!==this.options.enabled&&this.enable(i)}},{key:"getTargetBounds",value:function(){if(void 0===this.targetModifier)return s(this.target);if("visible"===this.targetModifier){if(this.target===document.body)return{top:pageYOffset,left:pageXOffset,height:innerHeight,width:innerWidth};var e=s(this.target),t={height:e.height,width:e.width,top:e.top,left:e.left};return t.height=Math.min(t.height,e.height-(pageYOffset-e.top)),t.height=Math.min(t.height,e.height-(e.top+e.height-(pageYOffset+innerHeight))),t.height=Math.min(innerHeight,t.height),t.height-=2,t.width=Math.min(t.width,e.width-(pageXOffset-e.left)),t.width=Math.min(t.width,e.width-(e.left+e.width-(pageXOffset+innerWidth))),t.width=Math.min(innerWidth,t.width),t.width-=2,t.top<pageYOffset&&(t.top=pageYOffset),t.left<pageXOffset&&(t.left=pageXOffset),t}if("scroll-handle"===this.targetModifier){var e=void 0,i=this.target;i===document.body?(i=document.documentElement,e={left:pageXOffset,top:pageYOffset,height:innerHeight,width:innerWidth}):e=s(i);var n=getComputedStyle(i),o=i.scrollWidth>i.clientWidth||[n.overflow,n.overflowX].indexOf("scroll")>=0||this.target!==document.body,r=0;o&&(r=15);var a=e.height-parseFloat(n.borderTopWidth)-parseFloat(n.borderBottomWidth)-r,t={width:15,height:.975*a*(a/i.scrollHeight),left:e.left+e.width-parseFloat(n.borderLeftWidth)-15},l=0;a<408&&this.target===document.body&&(l=-11e-5*Math.pow(a,2)-.00727*a+22.58),this.target!==document.body&&(t.height=Math.max(t.height,24));var d=this.target.scrollTop/(i.scrollHeight-a);return t.top=d*(a-t.height-l)+e.top+parseFloat(n.borderTopWidth),this.target===document.body&&(t.height=Math.max(t.height,24)),t}}},{key:"clearCache",value:function(){this._cache={}}},{key:"cache",value:function(e,t){return void 0===this._cache&&(this._cache={}),void 0===this._cache[e]&&(this._cache[e]=t.call(this)),this._cache[e]}},{key:"enable",value:function(){var e=this,t=arguments.length<=0||void 0===arguments[0]||arguments[0];!1!==this.options.addTargetClasses&&p(this.target,this.getClass("enabled")),p(this.element,this.getClass("enabled")),this.enabled=!0,this.scrollParents.forEach(function(t){t!==e.target.ownerDocument&&t.addEventListener("scroll",e.position)}),t&&this.position()}},{key:"disable",value:function(){var e=this;u(this.target,this.getClass("enabled")),u(this.element,this.getClass("enabled")),this.enabled=!1,void 0!==this.scrollParents&&this.scrollParents.forEach(function(t){t.removeEventListener("scroll",e.position)})}},{key:"destroy",value:function(){var e=this;this.disable(),H.forEach(function(t,i){t===e&&H.splice(i,1)}),0===H.length&&a()}},{key:"updateAttachClasses",value:function(e,t){var i=this;e=e||this.attachment,t=t||this.targetAttachment;var n=["left","top","bottom","right","middle","center"];void 0!==this._addAttachClasses&&this._addAttachClasses.length&&this._addAttachClasses.splice(0,this._addAttachClasses.length),void 0===this._addAttachClasses&&(this._addAttachClasses=[]);var o=this._addAttachClasses;e.top&&o.push(this.getClass("element-attached")+"-"+e.top),e.left&&o.push(this.getClass("element-attached")+"-"+e.left),t.top&&o.push(this.getClass("target-attached")+"-"+t.top),t.left&&o.push(this.getClass("target-attached")+"-"+t.left);var r=[];n.forEach(function(e){r.push(i.getClass("element-attached")+"-"+e),r.push(i.getClass("target-attached")+"-"+e)}),_(function(){void 0!==i._addAttachClasses&&(v(i.element,i._addAttachClasses,r),!1!==i.options.addTargetClasses&&v(i.target,i._addAttachClasses,r),delete i._addAttachClasses)})}},{key:"position",value:function(){var e=this,t=arguments.length<=0||void 0===arguments[0]||arguments[0];if(this.enabled){this.clearCache();var i=B(this.targetAttachment,this.attachment);this.updateAttachClasses(this.attachment,i);var n=this.cache("element-bounds",function(){return s(e.element)}),o=n.width,r=n.height;if(0===o&&0===r&&void 0!==this.lastSize){var a=this.lastSize;o=a.width,r=a.height}else this.lastSize={width:o,height:r};var c=this.cache("target-bounds",function(){return e.getTargetBounds()}),u=c,p=w(q(this.attachment),{width:o,height:r}),m=w(q(i),u),f=w(this.offset,{width:o,height:r}),h=w(this.targetOffset,u);p=y(p,f),m=y(m,h);for(var v=c.left+m.left-p.left,g=c.top+m.top-p.top,T=0;T<k.modules.length;++T){var b=k.modules[T],S=b.position.call(this,{left:v,top:g,targetAttachment:i,targetPos:c,elementPos:n,offset:p,targetOffset:m,manualOffset:f,manualTargetOffset:h,scrollbarSize:I,attachment:this.attachment});if(!1===S)return!1;void 0!==S&&"object"==typeof S&&(g=S.top,v=S.left)}var E={page:{top:g,left:v},viewport:{top:g-pageYOffset,bottom:pageYOffset-g-r+innerHeight,left:v-pageXOffset,right:pageXOffset-v-o+innerWidth}},C=this.target.ownerDocument,M=C.defaultView,I=void 0;return M.innerHeight>C.documentElement.clientHeight&&(I=this.cache("scrollbar-size",d),E.viewport.bottom-=I.height),M.innerWidth>C.documentElement.clientWidth&&(I=this.cache("scrollbar-size",d),E.viewport.right-=I.width),-1!==["","static"].indexOf(C.body.style.position)&&-1!==["","static"].indexOf(C.body.parentElement.style.position)||(E.page.bottom=C.body.scrollHeight-g-r,E.page.right=C.body.scrollWidth-v-o),void 0!==this.options.optimizations&&!1!==this.options.optimizations.moveElement&&void 0===this.targetModifier&&function(){var t=e.cache("target-offsetparent",function(){return l(e.target)}),i=e.cache("target-offsetparent-bounds",function(){return s(t)}),n=getComputedStyle(t),o=i,r={};if(["Top","Left","Bottom","Right"].forEach(function(e){r[e.toLowerCase()]=parseFloat(n["border"+e+"Width"])}),i.right=C.body.scrollWidth-i.left-o.width+r.right,i.bottom=C.body.scrollHeight-i.top-o.height+r.bottom,E.page.top>=i.top+r.top&&E.page.bottom>=i.bottom&&E.page.left>=i.left+r.left&&E.page.right>=i.right){var a=t.scrollTop,d=t.scrollLeft;E.offset={top:E.page.top-i.top+a-r.top,left:E.page.left-i.left+d-r.left}}}(),this.move(E),this.history.unshift(E),this.history.length>3&&this.history.pop(),t&&A(),!0}}},{key:"move",value:function(e){var t=this;if(void 0!==this.element.parentNode){var i={};for(var n in e){i[n]={};for(var o in e[n]){for(var r=!1,a=0;a<this.history.length;++a){var s=this.history[a];if(void 0!==s[n]&&!T(s[n][o],e[n][o])){r=!0;break}}r||(i[n][o]=!0)}}var d={top:"",left:"",right:"",bottom:""},u=function(e,i){if(!1!==(void 0!==t.options.optimizations?t.options.optimizations.gpu:null)){var n=void 0,o=void 0;e.top?(d.top=0,n=i.top):(d.bottom=0,n=-i.bottom),e.left?(d.left=0,o=i.left):(d.right=0,o=-i.right),window.matchMedia&&(window.matchMedia("only screen and (min-resolution: 1.3dppx)").matches||window.matchMedia("only screen and (-webkit-min-device-pixel-ratio: 1.3)").matches||(o=Math.round(o),n=Math.round(n))),d[P]="translateX("+o+"px) translateY("+n+"px)","msTransform"!==P&&(d[P]+=" translateZ(0)")}else e.top?d.top=i.top+"px":d.bottom=i.bottom+"px",e.left?d.left=i.left+"px":d.right=i.right+"px"},p=!1;if((i.page.top||i.page.bottom)&&(i.page.left||i.page.right)?(d.position="absolute",u(i.page,e.page)):(i.viewport.top||i.viewport.bottom)&&(i.viewport.left||i.viewport.right)?(d.position="fixed",u(i.viewport,e.viewport)):void 0!==i.offset&&i.offset.top&&i.offset.left?function(){d.position="absolute";var n=t.cache("target-offsetparent",function(){return l(t.target)});l(t.element)!==n&&_(function(){t.element.parentNode.removeChild(t.element),n.appendChild(t.element)}),u(i.offset,e.offset),p=!0}():(d.position="absolute",u({top:!0,left:!0},e.page)),!p)if(this.options.bodyElement)this.element.parentNode!==this.options.bodyElement&&this.options.bodyElement.appendChild(this.element);else{for(var m=!0,f=this.element.parentNode;f&&1===f.nodeType&&"BODY"!==f.tagName;){if("static"!==getComputedStyle(f).position){m=!1;break}f=f.parentNode}m||(this.element.parentNode.removeChild(this.element),this.element.ownerDocument.body.appendChild(this.element))}var h={},v=!1;for(var o in d){var g=d[o];this.element.style[o]!==g&&(v=!0,h[o]=g)}v&&_(function(){c(t.element.style,h),t.trigger("repositioned")})}}}]),t}(O);z.modules=[],k.position=R;var X=c(z,k),U=function(){function e(e,t){var i=[],n=!0,o=!1,r=void 0;try{for(var a,s=e[Symbol.iterator]();!(n=(a=s.next()).done)&&(i.push(a.value),!t||i.length!==t);n=!0);}catch(e){o=!0,r=e}finally{try{!n&&s.return&&s.return()}finally{if(o)throw r}}return i}return function(t,i){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,i);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),W=k.Utils,s=W.getBounds,c=W.extend,v=W.updateClasses,_=W.defer,Y=["left","top","right","bottom"];k.modules.push({position:function(e){var t=this,i=e.top,n=e.left,o=e.targetAttachment;if(!this.options.constraints)return!0;var r=this.cache("element-bounds",function(){return s(t.element)}),a=r.height,l=r.width;if(0===l&&0===a&&void 0!==this.lastSize){var d=this.lastSize;l=d.width,a=d.height}var u=this.cache("target-bounds",function(){return t.getTargetBounds()}),p=u.height,m=u.width,f=[this.getClass("pinned"),this.getClass("out-of-bounds")];this.options.constraints.forEach(function(e){var t=e.outOfBoundsClass,i=e.pinnedClass;t&&f.push(t),i&&f.push(i)}),f.forEach(function(e){["left","top","right","bottom"].forEach(function(t){f.push(e+"-"+t)})});var h=[],g=c({},o),T=c({},this.attachment);return this.options.constraints.forEach(function(e){var r=e.to,s=e.attachment,d=e.pin;void 0===s&&(s="");var c=void 0,u=void 0;if(s.indexOf(" ")>=0){var f=s.split(" "),v=U(f,2);u=v[0],c=v[1]}else c=u=s;var b=S(t,r);"target"!==u&&"both"!==u||(i<b[1]&&"top"===g.top&&(i+=p,g.top="bottom"),i+a>b[3]&&"bottom"===g.top&&(i-=p,g.top="top")),"together"===u&&("top"===g.top&&("bottom"===T.top&&i<b[1]?(i+=p,g.top="bottom",i+=a,T.top="top"):"top"===T.top&&i+a>b[3]&&i-(a-p)>=b[1]&&(i-=a-p,g.top="bottom",T.top="bottom")),"bottom"===g.top&&("top"===T.top&&i+a>b[3]?(i-=p,g.top="top",i-=a,T.top="bottom"):"bottom"===T.top&&i<b[1]&&i+(2*a-p)<=b[3]&&(i+=a-p,g.top="top",T.top="top")),"middle"===g.top&&(i+a>b[3]&&"top"===T.top?(i-=a,T.top="bottom"):i<b[1]&&"bottom"===T.top&&(i+=a,T.top="top"))),"target"!==c&&"both"!==c||(n<b[0]&&"left"===g.left&&(n+=m,g.left="right"),n+l>b[2]&&"right"===g.left&&(n-=m,g.left="left")),"together"===c&&(n<b[0]&&"left"===g.left?"right"===T.left?(n+=m,g.left="right",n+=l,T.left="left"):"left"===T.left&&(n+=m,g.left="right",n-=l,T.left="right"):n+l>b[2]&&"right"===g.left?"left"===T.left?(n-=m,g.left="left",n-=l,T.left="right"):"right"===T.left&&(n-=m,g.left="left",n+=l,T.left="left"):"center"===g.left&&(n+l>b[2]&&"left"===T.left?(n-=l,T.left="right"):n<b[0]&&"right"===T.left&&(n+=l,T.left="left"))),"element"!==u&&"both"!==u||(i<b[1]&&"bottom"===T.top&&(i+=a,T.top="top"),i+a>b[3]&&"top"===T.top&&(i-=a,T.top="bottom")),"element"!==c&&"both"!==c||(n<b[0]&&("right"===T.left?(n+=l,T.left="left"):"center"===T.left&&(n+=l/2,T.left="left")),n+l>b[2]&&("left"===T.left?(n-=l,T.left="right"):"center"===T.left&&(n-=l/2,T.left="right"))),"string"==typeof d?d=d.split(",").map(function(e){return e.trim()}):!0===d&&(d=["top","left","right","bottom"]),d=d||[];var y=[],w=[];i<b[1]&&(d.indexOf("top")>=0?(i=b[1],y.push("top")):w.push("top")),i+a>b[3]&&(d.indexOf("bottom")>=0?(i=b[3]-a,y.push("bottom")):w.push("bottom")),n<b[0]&&(d.indexOf("left")>=0?(n=b[0],y.push("left")):w.push("left")),n+l>b[2]&&(d.indexOf("right")>=0?(n=b[2]-l,y.push("right")):w.push("right")),y.length&&function(){var e=void 0;e=void 0!==t.options.pinnedClass?t.options.pinnedClass:t.getClass("pinned"),h.push(e),y.forEach(function(t){h.push(e+"-"+t)})}(),w.length&&function(){var e=void 0;e=void 0!==t.options.outOfBoundsClass?t.options.outOfBoundsClass:t.getClass("out-of-bounds"),h.push(e),w.forEach(function(t){h.push(e+"-"+t)})}(),(y.indexOf("left")>=0||y.indexOf("right")>=0)&&(T.left=g.left=!1),(y.indexOf("top")>=0||y.indexOf("bottom")>=0)&&(T.top=g.top=!1),g.top===o.top&&g.left===o.left&&T.top===t.attachment.top&&T.left===t.attachment.left||(t.updateAttachClasses(T,g),t.trigger("update",{attachment:T,targetAttachment:g}))}),_(function(){!1!==t.options.addTargetClasses&&v(t.target,h,f),v(t.element,h,f)}),{top:i,left:n}}});var W=k.Utils,s=W.getBounds,v=W.updateClasses,_=W.defer;k.modules.push({position:function(e){var t=this,i=e.top,n=e.left,o=this.cache("element-bounds",function(){return s(t.element)}),r=o.height,a=o.width,l=this.getTargetBounds(),d=i+r,c=n+a,u=[];i<=l.bottom&&d>=l.top&&["left","right"].forEach(function(e){var t=l[e];t!==n&&t!==c||u.push(e)}),n<=l.right&&c>=l.left&&["top","bottom"].forEach(function(e){var t=l[e];t!==i&&t!==d||u.push(e)});var p=[],m=[],f=["left","top","right","bottom"];return p.push(this.getClass("abutted")),f.forEach(function(e){p.push(t.getClass("abutted")+"-"+e)}),u.length&&m.push(this.getClass("abutted")),u.forEach(function(e){m.push(t.getClass("abutted")+"-"+e)}),_(function(){!1!==t.options.addTargetClasses&&v(t.target,m,p),v(t.element,m,p)}),!0}});var U=function(){function e(e,t){var i=[],n=!0,o=!1,r=void 0;try{for(var a,s=e[Symbol.iterator]();!(n=(a=s.next()).done)&&(i.push(a.value),!t||i.length!==t);n=!0);}catch(e){o=!0,r=e}finally{try{!n&&s.return&&s.return()}finally{if(o)throw r}}return i}return function(t,i){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,i);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();return k.modules.push({position:function(e){var t=e.top,i=e.left;if(this.options.shift){var n=this.options.shift;"function"==typeof this.options.shift&&(n=this.options.shift.call(this,{top:t,left:i}));var o=void 0,r=void 0;if("string"==typeof n){n=n.split(" "),n[1]=n[1]||n[0];var a=n,s=U(a,2);o=s[0],r=s[1],o=parseFloat(o,10),r=parseFloat(r,10)}else o=n.top,r=n.left;return t+=o,i+=r,{top:t,left:i}}}}),X})},function(e,t){var i;i=function(){return this}();try{i=i||Function("return this")()||(0,eval)("this")}catch(e){"object"==typeof window&&(i=window)}e.exports=i},function(e,t,i){(function(e,t){if(void 0===e)throw new Error("Bootstrap's JavaScript requires jQuery. jQuery must be included before Bootstrap's JavaScript.");!function(e){var t=e.fn.jquery.split(" ")[0].split(".");if(t[0]<2&&t[1]<9||1==t[0]&&9==t[1]&&t[2]<1||t[0]>=4)throw new Error("Bootstrap's JavaScript requires at least jQuery v1.9.1 but less than v4.0.0")}(e),function(){function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function n(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a=function(){function e(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,i,n){return i&&e(t.prototype,i),n&&e(t,n),t}}(),s=function(e){function t(e){return{}.toString.call(e).match(/\s([a-zA-Z]+)/)[1].toLowerCase()}function i(e){return(e[0]||e).nodeType}function n(){return{bindType:a.end,delegateType:a.end,handle:function(t){if(e(t.target).is(this))return t.handleObj.handler.apply(this,arguments)}}}function o(){if(window.QUnit)return!1;var e=document.createElement("bootstrap");for(var t in s)if(void 0!==e.style[t])return{end:s[t]};return!1}function r(t){var i=this,n=!1;return e(this).one(l.TRANSITION_END,function(){n=!0}),setTimeout(function(){n||l.triggerTransitionEnd(i)},t),this}var a=!1,s={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"},l={TRANSITION_END:"bsTransitionEnd",getUID:function(e){do{e+=~~(1e6*Math.random())}while(document.getElementById(e));return e},getSelectorFromElement:function(t){var i=t.getAttribute("data-target");i&&"#"!==i||(i=t.getAttribute("href")||"");try{return e(i).length>0?i:null}catch(e){return null}},reflow:function(e){return e.offsetHeight},triggerTransitionEnd:function(t){e(t).trigger(a.end)},supportsTransitionEnd:function(){return Boolean(a)},typeCheckConfig:function(e,n,o){for(var r in o)if(o.hasOwnProperty(r)){var a=o[r],s=n[r],l=s&&i(s)?"element":t(s);if(!new RegExp(a).test(l))throw new Error(e.toUpperCase()+': Option "'+r+'" provided type "'+l+'" but expected type "'+a+'".')}}};return function(){a=o(),e.fn.emulateTransitionEnd=r,l.supportsTransitionEnd()&&(e.event.special[l.TRANSITION_END]=n())}(),l}(e),l=(function(e){var t="alert",i=e.fn[t],n={DISMISS:'[data-dismiss="alert"]'},r={CLOSE:"close.bs.alert",CLOSED:"closed.bs.alert",CLICK_DATA_API:"click.bs.alert.data-api"},l={ALERT:"alert",FADE:"fade",SHOW:"show"},d=function(){function t(e){o(this,t),this._element=e}return t.prototype.close=function(e){e=e||this._element;var t=this._getRootElement(e);this._triggerCloseEvent(t).isDefaultPrevented()||this._removeElement(t)},t.prototype.dispose=function(){e.removeData(this._element,"bs.alert"),this._element=null},t.prototype._getRootElement=function(t){var i=s.getSelectorFromElement(t),n=!1;return i&&(n=e(i)[0]),n||(n=e(t).closest("."+l.ALERT)[0]),n},t.prototype._triggerCloseEvent=function(t){var i=e.Event(r.CLOSE);return e(t).trigger(i),i},t.prototype._removeElement=function(t){var i=this;if(e(t).removeClass(l.SHOW),!s.supportsTransitionEnd()||!e(t).hasClass(l.FADE))return void this._destroyElement(t);e(t).one(s.TRANSITION_END,function(e){return i._destroyElement(t,e)}).emulateTransitionEnd(150)},t.prototype._destroyElement=function(t){e(t).detach().trigger(r.CLOSED).remove()},t._jQueryInterface=function(i){return this.each(function(){var n=e(this),o=n.data("bs.alert");o||(o=new t(this),n.data("bs.alert",o)),"close"===i&&o[i](this)})},t._handleDismiss=function(e){return function(t){t&&t.preventDefault(),e.close(this)}},a(t,null,[{key:"VERSION",get:function(){return"4.0.0-beta"}}]),t}();e(document).on(r.CLICK_DATA_API,n.DISMISS,d._handleDismiss(new d)),e.fn[t]=d._jQueryInterface,e.fn[t].Constructor=d,e.fn[t].noConflict=function(){return e.fn[t]=i,d._jQueryInterface}}(e),function(e){var t="button",i=e.fn[t],n={ACTIVE:"active",BUTTON:"btn",FOCUS:"focus"},r={DATA_TOGGLE_CARROT:'[data-toggle^="button"]',DATA_TOGGLE:'[data-toggle="buttons"]',INPUT:"input",ACTIVE:".active",BUTTON:".btn"},s={CLICK_DATA_API:"click.bs.button.data-api",FOCUS_BLUR_DATA_API:"focus.bs.button.data-api blur.bs.button.data-api"},l=function(){function t(e){o(this,t),this._element=e}return t.prototype.toggle=function(){var t=!0,i=!0,o=e(this._element).closest(r.DATA_TOGGLE)[0];if(o){var a=e(this._element).find(r.INPUT)[0];if(a){if("radio"===a.type)if(a.checked&&e(this._element).hasClass(n.ACTIVE))t=!1;else{var s=e(o).find(r.ACTIVE)[0];s&&e(s).removeClass(n.ACTIVE)}if(t){if(a.hasAttribute("disabled")||o.hasAttribute("disabled")||a.classList.contains("disabled")||o.classList.contains("disabled"))return;a.checked=!e(this._element).hasClass(n.ACTIVE),e(a).trigger("change")}a.focus(),i=!1}}i&&this._element.setAttribute("aria-pressed",!e(this._element).hasClass(n.ACTIVE)),t&&e(this._element).toggleClass(n.ACTIVE)},t.prototype.dispose=function(){e.removeData(this._element,"bs.button"),this._element=null},t._jQueryInterface=function(i){return this.each(function(){var n=e(this).data("bs.button");n||(n=new t(this),e(this).data("bs.button",n)),"toggle"===i&&n[i]()})},a(t,null,[{key:"VERSION",get:function(){return"4.0.0-beta"}}]),t}();e(document).on(s.CLICK_DATA_API,r.DATA_TOGGLE_CARROT,function(t){t.preventDefault();var i=t.target;e(i).hasClass(n.BUTTON)||(i=e(i).closest(r.BUTTON)),l._jQueryInterface.call(e(i),"toggle")}).on(s.FOCUS_BLUR_DATA_API,r.DATA_TOGGLE_CARROT,function(t){var i=e(t.target).closest(r.BUTTON)[0];e(i).toggleClass(n.FOCUS,/^focus(in)?$/.test(t.type))}),e.fn[t]=l._jQueryInterface,e.fn[t].Constructor=l,e.fn[t].noConflict=function(){return e.fn[t]=i,l._jQueryInterface}}(e),function(e){var t="carousel",i="bs.carousel",n="."+i,l=e.fn[t],d={interval:5e3,keyboard:!0,slide:!1,pause:"hover",wrap:!0},c={interval:"(number|boolean)",keyboard:"boolean",slide:"(boolean|string)",pause:"(string|boolean)",wrap:"boolean"},u={NEXT:"next",PREV:"prev",LEFT:"left",RIGHT:"right"},p={SLIDE:"slide"+n,SLID:"slid"+n,KEYDOWN:"keydown"+n,MOUSEENTER:"mouseenter"+n,MOUSELEAVE:"mouseleave"+n,TOUCHEND:"touchend"+n,LOAD_DATA_API:"load.bs.carousel.data-api",CLICK_DATA_API:"click.bs.carousel.data-api"},m={CAROUSEL:"carousel",ACTIVE:"active",SLIDE:"slide",RIGHT:"carousel-item-right",LEFT:"carousel-item-left",NEXT:"carousel-item-next",PREV:"carousel-item-prev",ITEM:"carousel-item"},f={ACTIVE:".active",ACTIVE_ITEM:".active.carousel-item",ITEM:".carousel-item",NEXT_PREV:".carousel-item-next, .carousel-item-prev",INDICATORS:".carousel-indicators",DATA_SLIDE:"[data-slide], [data-slide-to]",DATA_RIDE:'[data-ride="carousel"]'},h=function(){function l(t,i){o(this,l),this._items=null,this._interval=null,this._activeElement=null,this._isPaused=!1,this._isSliding=!1,this.touchTimeout=null,this._config=this._getConfig(i),this._element=e(t)[0],this._indicatorsElement=e(this._element).find(f.INDICATORS)[0],this._addEventListeners()}return l.prototype.next=function(){this._isSliding||this._slide(u.NEXT)},l.prototype.nextWhenVisible=function(){document.hidden||this.next()},l.prototype.prev=function(){this._isSliding||this._slide(u.PREV)},l.prototype.pause=function(t){t||(this._isPaused=!0),e(this._element).find(f.NEXT_PREV)[0]&&s.supportsTransitionEnd()&&(s.triggerTransitionEnd(this._element),this.cycle(!0)),clearInterval(this._interval),this._interval=null},l.prototype.cycle=function(e){e||(this._isPaused=!1),this._interval&&(clearInterval(this._interval),this._interval=null),this._config.interval&&!this._isPaused&&(this._interval=setInterval((document.visibilityState?this.nextWhenVisible:this.next).bind(this),this._config.interval))},l.prototype.to=function(t){var i=this;this._activeElement=e(this._element).find(f.ACTIVE_ITEM)[0];var n=this._getItemIndex(this._activeElement);if(!(t>this._items.length-1||t<0)){if(this._isSliding)return void e(this._element).one(p.SLID,function(){return i.to(t)});if(n===t)return this.pause(),void this.cycle();var o=t>n?u.NEXT:u.PREV;this._slide(o,this._items[t])}},l.prototype.dispose=function(){e(this._element).off(n),e.removeData(this._element,i),this._items=null,this._config=null,this._element=null,this._interval=null,this._isPaused=null,this._isSliding=null,this._activeElement=null,this._indicatorsElement=null},l.prototype._getConfig=function(i){return i=e.extend({},d,i),s.typeCheckConfig(t,i,c),i},l.prototype._addEventListeners=function(){var t=this;this._config.keyboard&&e(this._element).on(p.KEYDOWN,function(e){return t._keydown(e)}),"hover"===this._config.pause&&(e(this._element).on(p.MOUSEENTER,function(e){return t.pause(e)}).on(p.MOUSELEAVE,function(e){return t.cycle(e)}),"ontouchstart"in document.documentElement&&e(this._element).on(p.TOUCHEND,function(){t.pause(),t.touchTimeout&&clearTimeout(t.touchTimeout),t.touchTimeout=setTimeout(function(e){return t.cycle(e)},500+t._config.interval)}))},l.prototype._keydown=function(e){if(!/input|textarea/i.test(e.target.tagName))switch(e.which){case 37:e.preventDefault(),this.prev();break;case 39:e.preventDefault(),this.next();break;default:return}},l.prototype._getItemIndex=function(t){return this._items=e.makeArray(e(t).parent().find(f.ITEM)),this._items.indexOf(t)},l.prototype._getItemByDirection=function(e,t){var i=e===u.NEXT,n=e===u.PREV,o=this._getItemIndex(t),r=this._items.length-1;if((n&&0===o||i&&o===r)&&!this._config.wrap)return t;var a=e===u.PREV?-1:1,s=(o+a)%this._items.length;return-1===s?this._items[this._items.length-1]:this._items[s]},l.prototype._triggerSlideEvent=function(t,i){var n=this._getItemIndex(t),o=this._getItemIndex(e(this._element).find(f.ACTIVE_ITEM)[0]),r=e.Event(p.SLIDE,{relatedTarget:t,direction:i,from:o,to:n});return e(this._element).trigger(r),r},l.prototype._setActiveIndicatorElement=function(t){if(this._indicatorsElement){e(this._indicatorsElement).find(f.ACTIVE).removeClass(m.ACTIVE);var i=this._indicatorsElement.children[this._getItemIndex(t)];i&&e(i).addClass(m.ACTIVE)}},l.prototype._slide=function(t,i){var n=this,o=e(this._element).find(f.ACTIVE_ITEM)[0],r=this._getItemIndex(o),a=i||o&&this._getItemByDirection(t,o),l=this._getItemIndex(a),d=Boolean(this._interval),c=void 0,h=void 0,v=void 0;if(t===u.NEXT?(c=m.LEFT,h=m.NEXT,v=u.LEFT):(c=m.RIGHT,h=m.PREV,v=u.RIGHT),a&&e(a).hasClass(m.ACTIVE))return void(this._isSliding=!1);if(!this._triggerSlideEvent(a,v).isDefaultPrevented()&&o&&a){this._isSliding=!0,d&&this.pause(),this._setActiveIndicatorElement(a);var g=e.Event(p.SLID,{relatedTarget:a,direction:v,from:r,to:l});s.supportsTransitionEnd()&&e(this._element).hasClass(m.SLIDE)?(e(a).addClass(h),s.reflow(a),e(o).addClass(c),e(a).addClass(c),e(o).one(s.TRANSITION_END,function(){e(a).removeClass(c+" "+h).addClass(m.ACTIVE),e(o).removeClass(m.ACTIVE+" "+h+" "+c),n._isSliding=!1,setTimeout(function(){return e(n._element).trigger(g)},0)}).emulateTransitionEnd(600)):(e(o).removeClass(m.ACTIVE),e(a).addClass(m.ACTIVE),this._isSliding=!1,e(this._element).trigger(g)),d&&this.cycle()}},l._jQueryInterface=function(t){return this.each(function(){var n=e(this).data(i),o=e.extend({},d,e(this).data());"object"===(void 0===t?"undefined":r(t))&&e.extend(o,t);var a="string"==typeof t?t:o.slide;if(n||(n=new l(this,o),e(this).data(i,n)),"number"==typeof t)n.to(t);else if("string"==typeof a){if(void 0===n[a])throw new Error('No method named "'+a+'"');n[a]()}else o.interval&&(n.pause(),n.cycle())})},l._dataApiClickHandler=function(t){var n=s.getSelectorFromElement(this);if(n){var o=e(n)[0];if(o&&e(o).hasClass(m.CAROUSEL)){var r=e.extend({},e(o).data(),e(this).data()),a=this.getAttribute("data-slide-to");a&&(r.interval=!1),l._jQueryInterface.call(e(o),r),a&&e(o).data(i).to(a),t.preventDefault()}}},a(l,null,[{key:"VERSION",get:function(){return"4.0.0-beta"}},{key:"Default",get:function(){return d}}]),l}();e(document).on(p.CLICK_DATA_API,f.DATA_SLIDE,h._dataApiClickHandler),e(window).on(p.LOAD_DATA_API,function(){e(f.DATA_RIDE).each(function(){var t=e(this);h._jQueryInterface.call(t,t.data())})}),e.fn[t]=h._jQueryInterface,e.fn[t].Constructor=h,e.fn[t].noConflict=function(){return e.fn[t]=l,h._jQueryInterface}}(e),function(e){var t="collapse",i="bs.collapse",n=e.fn[t],l={toggle:!0,parent:""},d={toggle:"boolean",parent:"string"},c={SHOW:"show.bs.collapse",SHOWN:"shown.bs.collapse",HIDE:"hide.bs.collapse",HIDDEN:"hidden.bs.collapse",CLICK_DATA_API:"click.bs.collapse.data-api"},u={SHOW:"show",COLLAPSE:"collapse",COLLAPSING:"collapsing",COLLAPSED:"collapsed"},p={WIDTH:"width",HEIGHT:"height"},m={ACTIVES:".show, .collapsing",DATA_TOGGLE:'[data-toggle="collapse"]'},f=function(){function n(t,i){o(this,n),this._isTransitioning=!1,this._element=t,this._config=this._getConfig(i),this._triggerArray=e.makeArray(e('[data-toggle="collapse"][href="#'+t.id+'"],[data-toggle="collapse"][data-target="#'+t.id+'"]'));for(var r=e(m.DATA_TOGGLE),a=0;a<r.length;a++){var l=r[a],d=s.getSelectorFromElement(l);null!==d&&e(d).filter(t).length>0&&this._triggerArray.push(l)}this._parent=this._config.parent?this._getParent():null,this._config.parent||this._addAriaAndCollapsedClass(this._element,this._triggerArray),this._config.toggle&&this.toggle()}return n.prototype.toggle=function(){e(this._element).hasClass(u.SHOW)?this.hide():this.show()},n.prototype.show=function(){var t=this;if(!this._isTransitioning&&!e(this._element).hasClass(u.SHOW)){var o=void 0,r=void 0;if(this._parent&&(o=e.makeArray(e(this._parent).children().children(m.ACTIVES)),o.length||(o=null)),!(o&&(r=e(o).data(i))&&r._isTransitioning)){var a=e.Event(c.SHOW);if(e(this._element).trigger(a),!a.isDefaultPrevented()){o&&(n._jQueryInterface.call(e(o),"hide"),r||e(o).data(i,null));var l=this._getDimension();e(this._element).removeClass(u.COLLAPSE).addClass(u.COLLAPSING),this._element.style[l]=0,this._triggerArray.length&&e(this._triggerArray).removeClass(u.COLLAPSED).attr("aria-expanded",!0),this.setTransitioning(!0);var d=function(){e(t._element).removeClass(u.COLLAPSING).addClass(u.COLLAPSE).addClass(u.SHOW),t._element.style[l]="",t.setTransitioning(!1),e(t._element).trigger(c.SHOWN)};if(!s.supportsTransitionEnd())return void d();var p=l[0].toUpperCase()+l.slice(1),f="scroll"+p;e(this._element).one(s.TRANSITION_END,d).emulateTransitionEnd(600),this._element.style[l]=this._element[f]+"px"}}}},n.prototype.hide=function(){var t=this;if(!this._isTransitioning&&e(this._element).hasClass(u.SHOW)){var i=e.Event(c.HIDE);if(e(this._element).trigger(i),!i.isDefaultPrevented()){var n=this._getDimension();if(this._element.style[n]=this._element.getBoundingClientRect()[n]+"px",s.reflow(this._element),e(this._element).addClass(u.COLLAPSING).removeClass(u.COLLAPSE).removeClass(u.SHOW),this._triggerArray.length)for(var o=0;o<this._triggerArray.length;o++){var r=this._triggerArray[o],a=s.getSelectorFromElement(r);if(null!==a){var l=e(a);l.hasClass(u.SHOW)||e(r).addClass(u.COLLAPSED).attr("aria-expanded",!1)}}this.setTransitioning(!0);var d=function(){t.setTransitioning(!1),e(t._element).removeClass(u.COLLAPSING).addClass(u.COLLAPSE).trigger(c.HIDDEN)};if(this._element.style[n]="",!s.supportsTransitionEnd())return void d();e(this._element).one(s.TRANSITION_END,d).emulateTransitionEnd(600)}}},n.prototype.setTransitioning=function(e){this._isTransitioning=e},n.prototype.dispose=function(){e.removeData(this._element,i),this._config=null,this._parent=null,this._element=null,this._triggerArray=null,this._isTransitioning=null},n.prototype._getConfig=function(i){return i=e.extend({},l,i),i.toggle=Boolean(i.toggle),s.typeCheckConfig(t,i,d),i},n.prototype._getDimension=function(){return e(this._element).hasClass(p.WIDTH)?p.WIDTH:p.HEIGHT},n.prototype._getParent=function(){var t=this,i=e(this._config.parent)[0],o='[data-toggle="collapse"][data-parent="'+this._config.parent+'"]';return e(i).find(o).each(function(e,i){t._addAriaAndCollapsedClass(n._getTargetFromElement(i),[i])}),i},n.prototype._addAriaAndCollapsedClass=function(t,i){if(t){var n=e(t).hasClass(u.SHOW);i.length&&e(i).toggleClass(u.COLLAPSED,!n).attr("aria-expanded",n)}},n._getTargetFromElement=function(t){var i=s.getSelectorFromElement(t);return i?e(i)[0]:null},n._jQueryInterface=function(t){return this.each(function(){var o=e(this),a=o.data(i),s=e.extend({},l,o.data(),"object"===(void 0===t?"undefined":r(t))&&t);if(!a&&s.toggle&&/show|hide/.test(t)&&(s.toggle=!1),a||(a=new n(this,s),o.data(i,a)),"string"==typeof t){if(void 0===a[t])throw new Error('No method named "'+t+'"');a[t]()}})},a(n,null,[{key:"VERSION",get:function(){return"4.0.0-beta"}},{key:"Default",get:function(){return l}}]),n}();e(document).on(c.CLICK_DATA_API,m.DATA_TOGGLE,function(t){/input|textarea/i.test(t.target.tagName)||t.preventDefault();var n=e(this),o=s.getSelectorFromElement(this);e(o).each(function(){var t=e(this),o=t.data(i),r=o?"toggle":n.data();f._jQueryInterface.call(t,r)})}),e.fn[t]=f._jQueryInterface,e.fn[t].Constructor=f,e.fn[t].noConflict=function(){return e.fn[t]=n,f._jQueryInterface}}(e),function(e){if(void 0===t)throw new Error("Bootstrap dropdown require Popper.js (https://popper.js.org)");var i="dropdown",n="bs.dropdown",l="."+n,d=e.fn[i],c=new RegExp("38|40|27"),u={HIDE:"hide"+l,HIDDEN:"hidden"+l,SHOW:"show"+l,SHOWN:"shown"+l,CLICK:"click"+l,CLICK_DATA_API:"click.bs.dropdown.data-api",KEYDOWN_DATA_API:"keydown.bs.dropdown.data-api",KEYUP_DATA_API:"keyup.bs.dropdown.data-api"},p={DISABLED:"disabled",SHOW:"show",DROPUP:"dropup",MENURIGHT:"dropdown-menu-right",MENULEFT:"dropdown-menu-left"},m={DATA_TOGGLE:'[data-toggle="dropdown"]',FORM_CHILD:".dropdown form",MENU:".dropdown-menu",NAVBAR_NAV:".navbar-nav",VISIBLE_ITEMS:".dropdown-menu .dropdown-item:not(.disabled)"},f={TOP:"top-start",TOPEND:"top-end",BOTTOM:"bottom-start",BOTTOMEND:"bottom-end"},h={placement:f.BOTTOM,offset:0,flip:!0},v={placement:"string",offset:"(number|string)",flip:"boolean"},g=function(){function d(e,t){o(this,d),this._element=e,this._popper=null,this._config=this._getConfig(t),this._menu=this._getMenuElement(),this._inNavbar=this._detectNavbar(),this._addEventListeners()}return d.prototype.toggle=function(){if(!this._element.disabled&&!e(this._element).hasClass(p.DISABLED)){var i=d._getParentFromElement(this._element),n=e(this._menu).hasClass(p.SHOW);if(d._clearMenus(),!n){var o={relatedTarget:this._element},r=e.Event(u.SHOW,o);if(e(i).trigger(r),!r.isDefaultPrevented()){var a=this._element;e(i).hasClass(p.DROPUP)&&(e(this._menu).hasClass(p.MENULEFT)||e(this._menu).hasClass(p.MENURIGHT))&&(a=i),this._popper=new t(a,this._menu,this._getPopperConfig()),"ontouchstart"in document.documentElement&&!e(i).closest(m.NAVBAR_NAV).length&&e("body").children().on("mouseover",null,e.noop),this._element.focus(),this._element.setAttribute("aria-expanded",!0),e(this._menu).toggleClass(p.SHOW),e(i).toggleClass(p.SHOW).trigger(e.Event(u.SHOWN,o))}}}},d.prototype.dispose=function(){e.removeData(this._element,n),e(this._element).off(l),this._element=null,this._menu=null,null!==this._popper&&this._popper.destroy(),this._popper=null},d.prototype.update=function(){this._inNavbar=this._detectNavbar(),null!==this._popper&&this._popper.scheduleUpdate()},d.prototype._addEventListeners=function(){var t=this;e(this._element).on(u.CLICK,function(e){e.preventDefault(),e.stopPropagation(),t.toggle()})},d.prototype._getConfig=function(t){var n=e(this._element).data();return void 0!==n.placement&&(n.placement=f[n.placement.toUpperCase()]),t=e.extend({},this.constructor.Default,e(this._element).data(),t),s.typeCheckConfig(i,t,this.constructor.DefaultType),t},d.prototype._getMenuElement=function(){if(!this._menu){var t=d._getParentFromElement(this._element);this._menu=e(t).find(m.MENU)[0]}return this._menu},d.prototype._getPlacement=function(){var t=e(this._element).parent(),i=this._config.placement;return t.hasClass(p.DROPUP)||this._config.placement===f.TOP?(i=f.TOP,e(this._menu).hasClass(p.MENURIGHT)&&(i=f.TOPEND)):e(this._menu).hasClass(p.MENURIGHT)&&(i=f.BOTTOMEND),i},d.prototype._detectNavbar=function(){return e(this._element).closest(".navbar").length>0},d.prototype._getPopperConfig=function(){var e={placement:this._getPlacement(),modifiers:{offset:{offset:this._config.offset},flip:{enabled:this._config.flip}}};return this._inNavbar&&(e.modifiers.applyStyle={enabled:!this._inNavbar}),e},d._jQueryInterface=function(t){return this.each(function(){var i=e(this).data(n),o="object"===(void 0===t?"undefined":r(t))?t:null;if(i||(i=new d(this,o),e(this).data(n,i)),"string"==typeof t){if(void 0===i[t])throw new Error('No method named "'+t+'"');i[t]()}})},d._clearMenus=function(t){if(!t||3!==t.which&&("keyup"!==t.type||9===t.which))for(var i=e.makeArray(e(m.DATA_TOGGLE)),o=0;o<i.length;o++){var r=d._getParentFromElement(i[o]),a=e(i[o]).data(n),s={relatedTarget:i[o]};if(a){var l=a._menu;if(e(r).hasClass(p.SHOW)&&!(t&&("click"===t.type&&/input|textarea/i.test(t.target.tagName)||"keyup"===t.type&&9===t.which)&&e.contains(r,t.target))){var c=e.Event(u.HIDE,s);e(r).trigger(c),c.isDefaultPrevented()||("ontouchstart"in document.documentElement&&e("body").children().off("mouseover",null,e.noop),i[o].setAttribute("aria-expanded","false"),e(l).removeClass(p.SHOW),e(r).removeClass(p.SHOW).trigger(e.Event(u.HIDDEN,s)))}}}},d._getParentFromElement=function(t){var i=void 0,n=s.getSelectorFromElement(t);return n&&(i=e(n)[0]),i||t.parentNode},d._dataApiKeydownHandler=function(t){if(!(!c.test(t.which)||/button/i.test(t.target.tagName)&&32===t.which||/input|textarea/i.test(t.target.tagName)||(t.preventDefault(),t.stopPropagation(),this.disabled||e(this).hasClass(p.DISABLED)))){var i=d._getParentFromElement(this),n=e(i).hasClass(p.SHOW);if(!n&&(27!==t.which||32!==t.which)||n&&(27===t.which||32===t.which)){if(27===t.which){var o=e(i).find(m.DATA_TOGGLE)[0];e(o).trigger("focus")}return void e(this).trigger("click")}var r=e(i).find(m.VISIBLE_ITEMS).get();if(r.length){var a=r.indexOf(t.target);38===t.which&&a>0&&a--,40===t.which&&a<r.length-1&&a++,a<0&&(a=0),r[a].focus()}}},a(d,null,[{key:"VERSION",get:function(){return"4.0.0-beta"}},{key:"Default",get:function(){return h}},{key:"DefaultType",get:function(){return v}}]),d}();e(document).on(u.KEYDOWN_DATA_API,m.DATA_TOGGLE,g._dataApiKeydownHandler).on(u.KEYDOWN_DATA_API,m.MENU,g._dataApiKeydownHandler).on(u.CLICK_DATA_API+" "+u.KEYUP_DATA_API,g._clearMenus).on(u.CLICK_DATA_API,m.DATA_TOGGLE,function(t){t.preventDefault(),t.stopPropagation(),g._jQueryInterface.call(e(this),"toggle")}).on(u.CLICK_DATA_API,m.FORM_CHILD,function(e){e.stopPropagation()}),e.fn[i]=g._jQueryInterface,e.fn[i].Constructor=g,e.fn[i].noConflict=function(){return e.fn[i]=d,g._jQueryInterface}}(e),function(e){var t="modal",i=".bs.modal",n=e.fn[t],l={backdrop:!0,keyboard:!0,focus:!0,show:!0},d={backdrop:"(boolean|string)",keyboard:"boolean",focus:"boolean",show:"boolean"},c={HIDE:"hide.bs.modal",HIDDEN:"hidden.bs.modal",SHOW:"show.bs.modal",SHOWN:"shown.bs.modal",FOCUSIN:"focusin.bs.modal",RESIZE:"resize.bs.modal",CLICK_DISMISS:"click.dismiss.bs.modal",KEYDOWN_DISMISS:"keydown.dismiss.bs.modal",MOUSEUP_DISMISS:"mouseup.dismiss.bs.modal",MOUSEDOWN_DISMISS:"mousedown.dismiss.bs.modal",CLICK_DATA_API:"click.bs.modal.data-api"},u={SCROLLBAR_MEASURER:"modal-scrollbar-measure",BACKDROP:"modal-backdrop",OPEN:"modal-open",FADE:"fade",SHOW:"show"},p={DIALOG:".modal-dialog",DATA_TOGGLE:'[data-toggle="modal"]',DATA_DISMISS:'[data-dismiss="modal"]',FIXED_CONTENT:".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",NAVBAR_TOGGLER:".navbar-toggler"},m=function(){function n(t,i){o(this,n),this._config=this._getConfig(i),this._element=t,this._dialog=e(t).find(p.DIALOG)[0],this._backdrop=null,this._isShown=!1,this._isBodyOverflowing=!1,this._ignoreBackdropClick=!1,this._originalBodyPadding=0,this._scrollbarWidth=0}return n.prototype.toggle=function(e){return this._isShown?this.hide():this.show(e)},n.prototype.show=function(t){var i=this;if(!this._isTransitioning){s.supportsTransitionEnd()&&e(this._element).hasClass(u.FADE)&&(this._isTransitioning=!0);var n=e.Event(c.SHOW,{relatedTarget:t});e(this._element).trigger(n),this._isShown||n.isDefaultPrevented()||(this._isShown=!0,this._checkScrollbar(),this._setScrollbar(),e(document.body).addClass(u.OPEN),this._setEscapeEvent(),this._setResizeEvent(),e(this._element).on(c.CLICK_DISMISS,p.DATA_DISMISS,function(e){return i.hide(e)}),e(this._dialog).on(c.MOUSEDOWN_DISMISS,function(){e(i._element).one(c.MOUSEUP_DISMISS,function(t){e(t.target).is(i._element)&&(i._ignoreBackdropClick=!0)})}),this._showBackdrop(function(){return i._showElement(t)}))}},n.prototype.hide=function(t){var i=this;if(t&&t.preventDefault(),!this._isTransitioning&&this._isShown){var n=s.supportsTransitionEnd()&&e(this._element).hasClass(u.FADE);n&&(this._isTransitioning=!0);var o=e.Event(c.HIDE);e(this._element).trigger(o),this._isShown&&!o.isDefaultPrevented()&&(this._isShown=!1,this._setEscapeEvent(),this._setResizeEvent(),e(document).off(c.FOCUSIN),e(this._element).removeClass(u.SHOW),e(this._element).off(c.CLICK_DISMISS),e(this._dialog).off(c.MOUSEDOWN_DISMISS),n?e(this._element).one(s.TRANSITION_END,function(e){return i._hideModal(e)}).emulateTransitionEnd(300):this._hideModal())}},n.prototype.dispose=function(){e.removeData(this._element,"bs.modal"),e(window,document,this._element,this._backdrop).off(i),this._config=null,this._element=null,this._dialog=null,this._backdrop=null,this._isShown=null,this._isBodyOverflowing=null,this._ignoreBackdropClick=null,this._scrollbarWidth=null},n.prototype.handleUpdate=function(){this._adjustDialog()},n.prototype._getConfig=function(i){return i=e.extend({},l,i),s.typeCheckConfig(t,i,d),i},n.prototype._showElement=function(t){var i=this,n=s.supportsTransitionEnd()&&e(this._element).hasClass(u.FADE);this._element.parentNode&&this._element.parentNode.nodeType===Node.ELEMENT_NODE||document.body.appendChild(this._element),this._element.style.display="block",this._element.removeAttribute("aria-hidden"),this._element.scrollTop=0,n&&s.reflow(this._element),e(this._element).addClass(u.SHOW),this._config.focus&&this._enforceFocus();var o=e.Event(c.SHOWN,{relatedTarget:t}),r=function(){i._config.focus&&i._element.focus(),i._isTransitioning=!1,e(i._element).trigger(o)};n?e(this._dialog).one(s.TRANSITION_END,r).emulateTransitionEnd(300):r()},n.prototype._enforceFocus=function(){var t=this;e(document).off(c.FOCUSIN).on(c.FOCUSIN,function(i){document===i.target||t._element===i.target||e(t._element).has(i.target).length||t._element.focus()})},n.prototype._setEscapeEvent=function(){var t=this;this._isShown&&this._config.keyboard?e(this._element).on(c.KEYDOWN_DISMISS,function(e){27===e.which&&(e.preventDefault(),t.hide())}):this._isShown||e(this._element).off(c.KEYDOWN_DISMISS)},n.prototype._setResizeEvent=function(){var t=this;this._isShown?e(window).on(c.RESIZE,function(e){return t.handleUpdate(e)}):e(window).off(c.RESIZE)},n.prototype._hideModal=function(){var t=this;this._element.style.display="none",this._element.setAttribute("aria-hidden",!0),this._isTransitioning=!1,this._showBackdrop(function(){e(document.body).removeClass(u.OPEN),t._resetAdjustments(),t._resetScrollbar(),e(t._element).trigger(c.HIDDEN)})},n.prototype._removeBackdrop=function(){this._backdrop&&(e(this._backdrop).remove(),this._backdrop=null)},n.prototype._showBackdrop=function(t){var i=this,n=e(this._element).hasClass(u.FADE)?u.FADE:"";if(this._isShown&&this._config.backdrop){var o=s.supportsTransitionEnd()&&n;if(this._backdrop=document.createElement("div"),this._backdrop.className=u.BACKDROP,n&&e(this._backdrop).addClass(n),e(this._backdrop).appendTo(document.body),e(this._element).on(c.CLICK_DISMISS,function(e){if(i._ignoreBackdropClick)return void(i._ignoreBackdropClick=!1);e.target===e.currentTarget&&("static"===i._config.backdrop?i._element.focus():i.hide())}),o&&s.reflow(this._backdrop),e(this._backdrop).addClass(u.SHOW),!t)return;if(!o)return void t();e(this._backdrop).one(s.TRANSITION_END,t).emulateTransitionEnd(150)}else if(!this._isShown&&this._backdrop){e(this._backdrop).removeClass(u.SHOW);var r=function(){i._removeBackdrop(),t&&t()};s.supportsTransitionEnd()&&e(this._element).hasClass(u.FADE)?e(this._backdrop).one(s.TRANSITION_END,r).emulateTransitionEnd(150):r()}else t&&t()},n.prototype._adjustDialog=function(){var e=this._element.scrollHeight>document.documentElement.clientHeight;!this._isBodyOverflowing&&e&&(this._element.style.paddingLeft=this._scrollbarWidth+"px"),this._isBodyOverflowing&&!e&&(this._element.style.paddingRight=this._scrollbarWidth+"px")},n.prototype._resetAdjustments=function(){this._element.style.paddingLeft="",this._element.style.paddingRight=""},n.prototype._checkScrollbar=function(){this._isBodyOverflowing=document.body.clientWidth<window.innerWidth,this._scrollbarWidth=this._getScrollbarWidth()},n.prototype._setScrollbar=function(){var t=this;if(this._isBodyOverflowing){e(p.FIXED_CONTENT).each(function(i,n){var o=e(n)[0].style.paddingRight,r=e(n).css("padding-right");e(n).data("padding-right",o).css("padding-right",parseFloat(r)+t._scrollbarWidth+"px")}),e(p.NAVBAR_TOGGLER).each(function(i,n){var o=e(n)[0].style.marginRight,r=e(n).css("margin-right");e(n).data("margin-right",o).css("margin-right",parseFloat(r)+t._scrollbarWidth+"px")});var i=document.body.style.paddingRight,n=e("body").css("padding-right");e("body").data("padding-right",i).css("padding-right",parseFloat(n)+this._scrollbarWidth+"px")}},n.prototype._resetScrollbar=function(){e(p.FIXED_CONTENT).each(function(t,i){var n=e(i).data("padding-right");void 0!==n&&e(i).css("padding-right",n).removeData("padding-right")}),e(p.NAVBAR_TOGGLER).each(function(t,i){var n=e(i).data("margin-right");void 0!==n&&e(i).css("margin-right",n).removeData("margin-right")});var t=e("body").data("padding-right");void 0!==t&&e("body").css("padding-right",t).removeData("padding-right")},n.prototype._getScrollbarWidth=function(){var e=document.createElement("div");e.className=u.SCROLLBAR_MEASURER,document.body.appendChild(e);var t=e.getBoundingClientRect().width-e.clientWidth;return document.body.removeChild(e),t},n._jQueryInterface=function(t,i){return this.each(function(){var o=e(this).data("bs.modal"),a=e.extend({},n.Default,e(this).data(),"object"===(void 0===t?"undefined":r(t))&&t);if(o||(o=new n(this,a),e(this).data("bs.modal",o)),"string"==typeof t){if(void 0===o[t])throw new Error('No method named "'+t+'"');o[t](i)}else a.show&&o.show(i)})},a(n,null,[{key:"VERSION",get:function(){return"4.0.0-beta"}},{key:"Default",get:function(){return l}}]),n}();e(document).on(c.CLICK_DATA_API,p.DATA_TOGGLE,function(t){var i=this,n=void 0,o=s.getSelectorFromElement(this);o&&(n=e(o)[0]);var r=e(n).data("bs.modal")?"toggle":e.extend({},e(n).data(),e(this).data());"A"!==this.tagName&&"AREA"!==this.tagName||t.preventDefault();var a=e(n).one(c.SHOW,function(t){t.isDefaultPrevented()||a.one(c.HIDDEN,function(){e(i).is(":visible")&&i.focus()})});m._jQueryInterface.call(e(n),r,this)}),e.fn[t]=m._jQueryInterface,e.fn[t].Constructor=m,e.fn[t].noConflict=function(){return e.fn[t]=n,m._jQueryInterface}}(e),function(e){var t="scrollspy",i=e.fn[t],n={offset:10,method:"auto",target:""},l={offset:"number",method:"string",target:"(string|element)"},d={ACTIVATE:"activate.bs.scrollspy",SCROLL:"scroll.bs.scrollspy",LOAD_DATA_API:"load.bs.scrollspy.data-api"},c={DROPDOWN_ITEM:"dropdown-item",DROPDOWN_MENU:"dropdown-menu",ACTIVE:"active"},u={DATA_SPY:'[data-spy="scroll"]',ACTIVE:".active",NAV_LIST_GROUP:".nav, .list-group",NAV_LINKS:".nav-link",LIST_ITEMS:".list-group-item",DROPDOWN:".dropdown",DROPDOWN_ITEMS:".dropdown-item",DROPDOWN_TOGGLE:".dropdown-toggle"},p={OFFSET:"offset",POSITION:"position"},m=function(){function i(t,n){var r=this;o(this,i),this._element=t,this._scrollElement="BODY"===t.tagName?window:t,this._config=this._getConfig(n),this._selector=this._config.target+" "+u.NAV_LINKS+","+this._config.target+" "+u.LIST_ITEMS+","+this._config.target+" "+u.DROPDOWN_ITEMS,this._offsets=[],this._targets=[],this._activeTarget=null,this._scrollHeight=0,e(this._scrollElement).on(d.SCROLL,function(e){return r._process(e)}),this.refresh(),this._process()}return i.prototype.refresh=function(){var t=this,i=this._scrollElement!==this._scrollElement.window?p.POSITION:p.OFFSET,n="auto"===this._config.method?i:this._config.method,o=n===p.POSITION?this._getScrollTop():0;this._offsets=[],this._targets=[],this._scrollHeight=this._getScrollHeight(),e.makeArray(e(this._selector)).map(function(t){var i=void 0,r=s.getSelectorFromElement(t);if(r&&(i=e(r)[0]),i){var a=i.getBoundingClientRect();if(a.width||a.height)return[e(i)[n]().top+o,r]}return null}).filter(function(e){return e}).sort(function(e,t){return e[0]-t[0]}).forEach(function(e){t._offsets.push(e[0]),t._targets.push(e[1])})},i.prototype.dispose=function(){e.removeData(this._element,"bs.scrollspy"),e(this._scrollElement).off(".bs.scrollspy"),this._element=null,this._scrollElement=null,this._config=null,this._selector=null,this._offsets=null,this._targets=null,this._activeTarget=null,this._scrollHeight=null},i.prototype._getConfig=function(i){if(i=e.extend({},n,i),"string"!=typeof i.target){var o=e(i.target).attr("id");o||(o=s.getUID(t),e(i.target).attr("id",o)),i.target="#"+o}return s.typeCheckConfig(t,i,l),i},i.prototype._getScrollTop=function(){return this._scrollElement===window?this._scrollElement.pageYOffset:this._scrollElement.scrollTop},i.prototype._getScrollHeight=function(){return this._scrollElement.scrollHeight||Math.max(document.body.scrollHeight,document.documentElement.scrollHeight)},i.prototype._getOffsetHeight=function(){return this._scrollElement===window?window.innerHeight:this._scrollElement.getBoundingClientRect().height},i.prototype._process=function(){var e=this._getScrollTop()+this._config.offset,t=this._getScrollHeight(),i=this._config.offset+t-this._getOffsetHeight();if(this._scrollHeight!==t&&this.refresh(),e>=i){var n=this._targets[this._targets.length-1];return void(this._activeTarget!==n&&this._activate(n))}if(this._activeTarget&&e<this._offsets[0]&&this._offsets[0]>0)return this._activeTarget=null,void this._clear();for(var o=this._offsets.length;o--;){this._activeTarget!==this._targets[o]&&e>=this._offsets[o]&&(void 0===this._offsets[o+1]||e<this._offsets[o+1])&&this._activate(this._targets[o])}},i.prototype._activate=function(t){this._activeTarget=t,this._clear();var i=this._selector.split(",");i=i.map(function(e){return e+'[data-target="'+t+'"],'+e+'[href="'+t+'"]'});var n=e(i.join(","));n.hasClass(c.DROPDOWN_ITEM)?(n.closest(u.DROPDOWN).find(u.DROPDOWN_TOGGLE).addClass(c.ACTIVE),n.addClass(c.ACTIVE)):(n.addClass(c.ACTIVE),n.parents(u.NAV_LIST_GROUP).prev(u.NAV_LINKS+", "+u.LIST_ITEMS).addClass(c.ACTIVE)),e(this._scrollElement).trigger(d.ACTIVATE,{relatedTarget:t})},i.prototype._clear=function(){e(this._selector).filter(u.ACTIVE).removeClass(c.ACTIVE)},i._jQueryInterface=function(t){return this.each(function(){var n=e(this).data("bs.scrollspy"),o="object"===(void 0===t?"undefined":r(t))&&t;if(n||(n=new i(this,o),e(this).data("bs.scrollspy",n)),"string"==typeof t){if(void 0===n[t])throw new Error('No method named "'+t+'"');n[t]()}})},a(i,null,[{key:"VERSION",get:function(){return"4.0.0-beta"}},{key:"Default",get:function(){return n}}]),i}();e(window).on(d.LOAD_DATA_API,function(){for(var t=e.makeArray(e(u.DATA_SPY)),i=t.length;i--;){var n=e(t[i]);m._jQueryInterface.call(n,n.data())}}),e.fn[t]=m._jQueryInterface,e.fn[t].Constructor=m,e.fn[t].noConflict=function(){return e.fn[t]=i,m._jQueryInterface}}(e),function(e){var t=e.fn.tab,i={HIDE:"hide.bs.tab",HIDDEN:"hidden.bs.tab",SHOW:"show.bs.tab",SHOWN:"shown.bs.tab",CLICK_DATA_API:"click.bs.tab.data-api"},n={DROPDOWN_MENU:"dropdown-menu",ACTIVE:"active",DISABLED:"disabled",FADE:"fade",SHOW:"show"},r={DROPDOWN:".dropdown",NAV_LIST_GROUP:".nav, .list-group",ACTIVE:".active",DATA_TOGGLE:'[data-toggle="tab"], [data-toggle="pill"], [data-toggle="list"]',DROPDOWN_TOGGLE:".dropdown-toggle",DROPDOWN_ACTIVE_CHILD:"> .dropdown-menu .active"},l=function(){function t(e){o(this,t),this._element=e}return t.prototype.show=function(){var t=this;if(!(this._element.parentNode&&this._element.parentNode.nodeType===Node.ELEMENT_NODE&&e(this._element).hasClass(n.ACTIVE)||e(this._element).hasClass(n.DISABLED))){var o=void 0,a=void 0,l=e(this._element).closest(r.NAV_LIST_GROUP)[0],d=s.getSelectorFromElement(this._element);l&&(a=e.makeArray(e(l).find(r.ACTIVE)),a=a[a.length-1]);var c=e.Event(i.HIDE,{relatedTarget:this._element}),u=e.Event(i.SHOW,{relatedTarget:a});if(a&&e(a).trigger(c),e(this._element).trigger(u),!u.isDefaultPrevented()&&!c.isDefaultPrevented()){d&&(o=e(d)[0]),this._activate(this._element,l);var p=function(){var n=e.Event(i.HIDDEN,{relatedTarget:t._element}),o=e.Event(i.SHOWN,{relatedTarget:a});e(a).trigger(n),e(t._element).trigger(o)};o?this._activate(o,o.parentNode,p):p()}}},t.prototype.dispose=function(){e.removeData(this._element,"bs.tab"),this._element=null},t.prototype._activate=function(t,i,o){var a=this,l=e(i).find(r.ACTIVE)[0],d=o&&s.supportsTransitionEnd()&&l&&e(l).hasClass(n.FADE),c=function(){return a._transitionComplete(t,l,d,o)};l&&d?e(l).one(s.TRANSITION_END,c).emulateTransitionEnd(150):c(),l&&e(l).removeClass(n.SHOW)},t.prototype._transitionComplete=function(t,i,o,a){if(i){e(i).removeClass(n.ACTIVE);var l=e(i.parentNode).find(r.DROPDOWN_ACTIVE_CHILD)[0];l&&e(l).removeClass(n.ACTIVE),i.setAttribute("aria-expanded",!1)}if(e(t).addClass(n.ACTIVE),t.setAttribute("aria-expanded",!0),o?(s.reflow(t),e(t).addClass(n.SHOW)):e(t).removeClass(n.FADE),t.parentNode&&e(t.parentNode).hasClass(n.DROPDOWN_MENU)){var d=e(t).closest(r.DROPDOWN)[0];d&&e(d).find(r.DROPDOWN_TOGGLE).addClass(n.ACTIVE),t.setAttribute("aria-expanded",!0)}a&&a()},t._jQueryInterface=function(i){return this.each(function(){var n=e(this),o=n.data("bs.tab");if(o||(o=new t(this),n.data("bs.tab",o)),"string"==typeof i){if(void 0===o[i])throw new Error('No method named "'+i+'"');o[i]()}})},a(t,null,[{key:"VERSION",get:function(){return"4.0.0-beta"}}]),t}();e(document).on(i.CLICK_DATA_API,r.DATA_TOGGLE,function(t){t.preventDefault(),l._jQueryInterface.call(e(this),"show")}),e.fn.tab=l._jQueryInterface,e.fn.tab.Constructor=l,e.fn.tab.noConflict=function(){return e.fn.tab=t,l._jQueryInterface}}(e),function(e){if(void 0===t)throw new Error("Bootstrap tooltips require Popper.js (https://popper.js.org)");var i="tooltip",n=".bs.tooltip",l=e.fn[i],d=new RegExp("(^|\\s)bs-tooltip\\S+","g"),c={animation:"boolean",template:"string",title:"(string|element|function)",trigger:"string",delay:"(number|object)",html:"boolean",selector:"(string|boolean)",placement:"(string|function)",offset:"(number|string)",container:"(string|element|boolean)",fallbackPlacement:"(string|array)"},u={AUTO:"auto",TOP:"top",RIGHT:"right",BOTTOM:"bottom",LEFT:"left"},p={animation:!0,template:'<div class="tooltip" role="tooltip"><div class="arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,selector:!1,placement:"top",offset:0,container:!1,fallbackPlacement:"flip"},m={SHOW:"show",OUT:"out"},f={HIDE:"hide"+n,HIDDEN:"hidden"+n,SHOW:"show"+n,SHOWN:"shown"+n,INSERTED:"inserted"+n,CLICK:"click"+n,FOCUSIN:"focusin"+n,FOCUSOUT:"focusout"+n,MOUSEENTER:"mouseenter"+n,MOUSELEAVE:"mouseleave"+n},h={FADE:"fade",SHOW:"show"},v={TOOLTIP:".tooltip",TOOLTIP_INNER:".tooltip-inner",ARROW:".arrow"},g={HOVER:"hover",FOCUS:"focus",CLICK:"click",MANUAL:"manual"},T=function(){function l(e,t){o(this,l),this._isEnabled=!0,this._timeout=0,this._hoverState="",this._activeTrigger={},this._popper=null,this.element=e,this.config=this._getConfig(t),this.tip=null,this._setListeners()}return l.prototype.enable=function(){this._isEnabled=!0},l.prototype.disable=function(){this._isEnabled=!1},l.prototype.toggleEnabled=function(){this._isEnabled=!this._isEnabled},l.prototype.toggle=function(t){if(t){var i=this.constructor.DATA_KEY,n=e(t.currentTarget).data(i);n||(n=new this.constructor(t.currentTarget,this._getDelegateConfig()),e(t.currentTarget).data(i,n)),n._activeTrigger.click=!n._activeTrigger.click,n._isWithActiveTrigger()?n._enter(null,n):n._leave(null,n)}else{if(e(this.getTipElement()).hasClass(h.SHOW))return void this._leave(null,this);this._enter(null,this)}},l.prototype.dispose=function(){clearTimeout(this._timeout),e.removeData(this.element,this.constructor.DATA_KEY),e(this.element).off(this.constructor.EVENT_KEY),e(this.element).closest(".modal").off("hide.bs.modal"),this.tip&&e(this.tip).remove(),this._isEnabled=null,this._timeout=null,this._hoverState=null,this._activeTrigger=null,null!==this._popper&&this._popper.destroy(),this._popper=null,this.element=null,this.config=null,this.tip=null},l.prototype.show=function(){var i=this;if("none"===e(this.element).css("display"))throw new Error("Please use show on visible elements");var n=e.Event(this.constructor.Event.SHOW);if(this.isWithContent()&&this._isEnabled){e(this.element).trigger(n);var o=e.contains(this.element.ownerDocument.documentElement,this.element);if(n.isDefaultPrevented()||!o)return;var r=this.getTipElement(),a=s.getUID(this.constructor.NAME);r.setAttribute("id",a),this.element.setAttribute("aria-describedby",a),this.setContent(),this.config.animation&&e(r).addClass(h.FADE);var d="function"==typeof this.config.placement?this.config.placement.call(this,r,this.element):this.config.placement,c=this._getAttachment(d);this.addAttachmentClass(c);var u=!1===this.config.container?document.body:e(this.config.container);e(r).data(this.constructor.DATA_KEY,this),e.contains(this.element.ownerDocument.documentElement,this.tip)||e(r).appendTo(u),e(this.element).trigger(this.constructor.Event.INSERTED),this._popper=new t(this.element,r,{placement:c,modifiers:{offset:{offset:this.config.offset},flip:{behavior:this.config.fallbackPlacement},arrow:{element:v.ARROW}},onCreate:function(e){e.originalPlacement!==e.placement&&i._handlePopperPlacementChange(e)},onUpdate:function(e){i._handlePopperPlacementChange(e)}}),e(r).addClass(h.SHOW),"ontouchstart"in document.documentElement&&e("body").children().on("mouseover",null,e.noop);var p=function(){i.config.animation&&i._fixTransition();var t=i._hoverState;i._hoverState=null,e(i.element).trigger(i.constructor.Event.SHOWN),t===m.OUT&&i._leave(null,i)};s.supportsTransitionEnd()&&e(this.tip).hasClass(h.FADE)?e(this.tip).one(s.TRANSITION_END,p).emulateTransitionEnd(l._TRANSITION_DURATION):p()}},l.prototype.hide=function(t){var i=this,n=this.getTipElement(),o=e.Event(this.constructor.Event.HIDE),r=function(){i._hoverState!==m.SHOW&&n.parentNode&&n.parentNode.removeChild(n),i._cleanTipClass(),i.element.removeAttribute("aria-describedby"),e(i.element).trigger(i.constructor.Event.HIDDEN),null!==i._popper&&i._popper.destroy(),t&&t()};e(this.element).trigger(o),o.isDefaultPrevented()||(e(n).removeClass(h.SHOW),"ontouchstart"in document.documentElement&&e("body").children().off("mouseover",null,e.noop),this._activeTrigger[g.CLICK]=!1,this._activeTrigger[g.FOCUS]=!1,this._activeTrigger[g.HOVER]=!1,s.supportsTransitionEnd()&&e(this.tip).hasClass(h.FADE)?e(n).one(s.TRANSITION_END,r).emulateTransitionEnd(150):r(),this._hoverState="")},l.prototype.update=function(){null!==this._popper&&this._popper.scheduleUpdate()},l.prototype.isWithContent=function(){return Boolean(this.getTitle())},l.prototype.addAttachmentClass=function(t){e(this.getTipElement()).addClass("bs-tooltip-"+t)},l.prototype.getTipElement=function(){return this.tip=this.tip||e(this.config.template)[0]},l.prototype.setContent=function(){var t=e(this.getTipElement());this.setElementContent(t.find(v.TOOLTIP_INNER),this.getTitle()),t.removeClass(h.FADE+" "+h.SHOW)},l.prototype.setElementContent=function(t,i){var n=this.config.html;"object"===(void 0===i?"undefined":r(i))&&(i.nodeType||i.jquery)?n?e(i).parent().is(t)||t.empty().append(i):t.text(e(i).text()):t[n?"html":"text"](i)},l.prototype.getTitle=function(){var e=this.element.getAttribute("data-original-title");return e||(e="function"==typeof this.config.title?this.config.title.call(this.element):this.config.title),e},l.prototype._getAttachment=function(e){return u[e.toUpperCase()]},l.prototype._setListeners=function(){var t=this;this.config.trigger.split(" ").forEach(function(i){if("click"===i)e(t.element).on(t.constructor.Event.CLICK,t.config.selector,function(e){return t.toggle(e)});else if(i!==g.MANUAL){var n=i===g.HOVER?t.constructor.Event.MOUSEENTER:t.constructor.Event.FOCUSIN,o=i===g.HOVER?t.constructor.Event.MOUSELEAVE:t.constructor.Event.FOCUSOUT;e(t.element).on(n,t.config.selector,function(e){return t._enter(e)}).on(o,t.config.selector,function(e){return t._leave(e)})}e(t.element).closest(".modal").on("hide.bs.modal",function(){return t.hide()})}),this.config.selector?this.config=e.extend({},this.config,{trigger:"manual",selector:""}):this._fixTitle()},l.prototype._fixTitle=function(){var e=r(this.element.getAttribute("data-original-title"));(this.element.getAttribute("title")||"string"!==e)&&(this.element.setAttribute("data-original-title",this.element.getAttribute("title")||""),this.element.setAttribute("title",""))},l.prototype._enter=function(t,i){var n=this.constructor.DATA_KEY;return i=i||e(t.currentTarget).data(n),i||(i=new this.constructor(t.currentTarget,this._getDelegateConfig()),e(t.currentTarget).data(n,i)),t&&(i._activeTrigger["focusin"===t.type?g.FOCUS:g.HOVER]=!0),e(i.getTipElement()).hasClass(h.SHOW)||i._hoverState===m.SHOW?void(i._hoverState=m.SHOW):(clearTimeout(i._timeout),i._hoverState=m.SHOW,i.config.delay&&i.config.delay.show?void(i._timeout=setTimeout(function(){i._hoverState===m.SHOW&&i.show()},i.config.delay.show)):void i.show())},l.prototype._leave=function(t,i){var n=this.constructor.DATA_KEY;if(i=i||e(t.currentTarget).data(n),i||(i=new this.constructor(t.currentTarget,this._getDelegateConfig()),e(t.currentTarget).data(n,i)),t&&(i._activeTrigger["focusout"===t.type?g.FOCUS:g.HOVER]=!1),!i._isWithActiveTrigger()){if(clearTimeout(i._timeout),i._hoverState=m.OUT,!i.config.delay||!i.config.delay.hide)return void i.hide();i._timeout=setTimeout(function(){i._hoverState===m.OUT&&i.hide()},i.config.delay.hide)}},l.prototype._isWithActiveTrigger=function(){for(var e in this._activeTrigger)if(this._activeTrigger[e])return!0;return!1},l.prototype._getConfig=function(t){return t=e.extend({},this.constructor.Default,e(this.element).data(),t),t.delay&&"number"==typeof t.delay&&(t.delay={show:t.delay,hide:t.delay}),t.title&&"number"==typeof t.title&&(t.title=t.title.toString()),t.content&&"number"==typeof t.content&&(t.content=t.content.toString()),s.typeCheckConfig(i,t,this.constructor.DefaultType),t},l.prototype._getDelegateConfig=function(){var e={};if(this.config)for(var t in this.config)this.constructor.Default[t]!==this.config[t]&&(e[t]=this.config[t]);return e},l.prototype._cleanTipClass=function(){var t=e(this.getTipElement()),i=t.attr("class").match(d);null!==i&&i.length>0&&t.removeClass(i.join(""))},l.prototype._handlePopperPlacementChange=function(e){this._cleanTipClass(),this.addAttachmentClass(this._getAttachment(e.placement))},l.prototype._fixTransition=function(){var t=this.getTipElement(),i=this.config.animation;null===t.getAttribute("x-placement")&&(e(t).removeClass(h.FADE),this.config.animation=!1,this.hide(),this.show(),this.config.animation=i)},l._jQueryInterface=function(t){return this.each(function(){var i=e(this).data("bs.tooltip"),n="object"===(void 0===t?"undefined":r(t))&&t;if((i||!/dispose|hide/.test(t))&&(i||(i=new l(this,n),e(this).data("bs.tooltip",i)),"string"==typeof t)){if(void 0===i[t])throw new Error('No method named "'+t+'"');i[t]()}})},a(l,null,[{key:"VERSION",get:function(){return"4.0.0-beta"}},{key:"Default",get:function(){return p}},{key:"NAME",get:function(){return i}},{key:"DATA_KEY",get:function(){return"bs.tooltip"}},{key:"Event",get:function(){return f}},{key:"EVENT_KEY",get:function(){return n}},{key:"DefaultType",get:function(){return c}}]),l}();return e.fn[i]=T._jQueryInterface,e.fn[i].Constructor=T,e.fn[i].noConflict=function(){return e.fn[i]=l,T._jQueryInterface},T}(e));!function(e){var t="popover",s=".bs.popover",d=e.fn[t],c=new RegExp("(^|\\s)bs-popover\\S+","g"),u=e.extend({},l.Default,{placement:"right",trigger:"click",content:"",template:'<div class="popover" role="tooltip"><div class="arrow"></div><h3 class="popover-header"></h3><div class="popover-body"></div></div>'}),p=e.extend({},l.DefaultType,{content:"(string|element|function)"}),m={FADE:"fade",SHOW:"show"},f={TITLE:".popover-header",CONTENT:".popover-body"},h={HIDE:"hide"+s,HIDDEN:"hidden"+s,SHOW:"show"+s,SHOWN:"shown"+s,INSERTED:"inserted"+s,CLICK:"click"+s,FOCUSIN:"focusin"+s,FOCUSOUT:"focusout"+s,MOUSEENTER:"mouseenter"+s,MOUSELEAVE:"mouseleave"+s},v=function(l){function d(){return o(this,d),i(this,l.apply(this,arguments))}return n(d,l),d.prototype.isWithContent=function(){return this.getTitle()||this._getContent()},d.prototype.addAttachmentClass=function(t){e(this.getTipElement()).addClass("bs-popover-"+t)},d.prototype.getTipElement=function(){return this.tip=this.tip||e(this.config.template)[0]},d.prototype.setContent=function(){var t=e(this.getTipElement());this.setElementContent(t.find(f.TITLE),this.getTitle()),this.setElementContent(t.find(f.CONTENT),this._getContent()),t.removeClass(m.FADE+" "+m.SHOW)},d.prototype._getContent=function(){return this.element.getAttribute("data-content")||("function"==typeof this.config.content?this.config.content.call(this.element):this.config.content)},d.prototype._cleanTipClass=function(){var t=e(this.getTipElement()),i=t.attr("class").match(c);null!==i&&i.length>0&&t.removeClass(i.join(""))},d._jQueryInterface=function(t){return this.each(function(){var i=e(this).data("bs.popover"),n="object"===(void 0===t?"undefined":r(t))?t:null;if((i||!/destroy|hide/.test(t))&&(i||(i=new d(this,n),e(this).data("bs.popover",i)),"string"==typeof t)){if(void 0===i[t])throw new Error('No method named "'+t+'"');i[t]()}})},a(d,null,[{key:"VERSION",get:function(){return"4.0.0-beta"}},{key:"Default",get:function(){return u}},{key:"NAME",get:function(){return t}},{key:"DATA_KEY",get:function(){return"bs.popover"}},{key:"Event",get:function(){return h}},{key:"EVENT_KEY",get:function(){return s}},{key:"DefaultType",get:function(){return p}}]),d}(l);e.fn[t]=v._jQueryInterface,e.fn[t].Constructor=v,e.fn[t].noConflict=function(){return e.fn[t]=d,v._jQueryInterface}}(e)}()}).call(t,i(0),i(3).default)},function(e,t){},function(e,t){},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(4);n.TokyoTrackerApp.TrackerAppInstance=new n.TokyoTrackerApp,Array.prototype.find||Object.defineProperty(Array.prototype,"find",{value:function(e){if(null==this)throw new TypeError('"this" is null or not defined');var t=Object(this),i=t.length>>>0;if("function"!=typeof e)throw new TypeError("predicate must be a function");for(var n=arguments[1],o=0;o<i;){var r=t[o];if(e.call(n,r,o,t))return r;o++}}}),Array.prototype.findIndex||Object.defineProperty(Array.prototype,"findIndex",{value:function(e){if(null==this)throw new TypeError('"this" is null or not defined');var t=Object(this),i=t.length>>>0;if("function"!=typeof e)throw new TypeError("predicate must be a function");for(var n=arguments[1],o=0;o<i;){var r=t[o];if(e.call(n,r,o,t))return o;o++}return-1}})},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(18),o=function(){function e(){this.IndexAction=function(e,t){return n.Action("/tokyo/Index"+encodeURIComponent(e)+"?token="+encodeURIComponent(t),"get",null)},this.LogoutAction=function(){return n.Action("/tokyo/Logout","post",null)},this.InitialClientDataJson=function(e){return n.Json("/tokyo/InitialClientData?jsTimeString="+encodeURIComponent(e),"get",null)},this.EditProductivityRatingJson=function(e,t){return n.Json("/tokyo/EditProductivityRating?timeNormId="+e+"&ratingPercentage="+t,"post",null)},this.CreateTimeTableJson=function(){return n.Json("/tokyo/CreateTimeTable","post",null)},this.MoveWorkUnitBeforeWorkUnitJson=function(e,t){return n.Json("/tokyo/MoveWorkUnitBeforeWorkUnit?moveWorkUnitId="+e+"&moveBeforeWorkUnitId="+t,"post",null)},this.SetWorkUnitAsDefaultTargetJson=function(e){return n.Json("/tokyo/SetWorkUnitAsDefaultTarget?workUnitId="+e,"post",null)},this.SetViewTimeZoneJson=function(e){return n.Json("/tokyo/SetViewTimeZone?timeZoneIdDotNet="+encodeURIComponent(e),"post",null)},this.SetCultureJson=function(e){return n.Json("/tokyo/SetCulture?cultureIdDotNet="+encodeURIComponent(e),"post",null)},this.MoveTimeNormToWorkUnitJson=function(e,t){return n.Json("/tokyo/MoveTimeNormToWorkUnit?timeNormId="+e+"&targetWorkUnitId="+t,"post",null)},this.ProcessTimeStampsJson=function(){return n.Json("/tokyo/ProcessTimeStamps","post",null)},this.EditTimeNormJson=function(e,t,i,o,r){return n.Json("/tokyo/EditTimeNorm?timeNormId="+e+"&newTimeNormName="+encodeURIComponent(t)+"&newColorR="+i+"&newColorG="+o+"&newColorB="+r,"post",null)},this.CreateWorkUnitJson=function(e){return n.Json("/tokyo/CreateWorkUnit?timeTableId="+e,"post",null)},this.UnbindTimeNormJson=function(e){return n.Json("/tokyo/UnbindTimeNorm?timeNormId="+e,"post",null)},this.RemoveWorkUnitJson=function(e){return n.Json("/tokyo/RemoveWorkUnit?workUnitId="+e,"post",null)},this.RemoveTimeTableJson=function(e){return n.Json("/tokyo/RemoveTimeTable?timeTableId="+e,"post",null)},this.EditTimeStampPostJson=function(e){return n.Json("/tokyo/EditTimeStampPost","post",e)},this.UndoLastUserActionJson=function(){return n.Json("/tokyo/UndoLastUserAction","post",null)},this.RemoveTimeStampJson=function(e){return n.Json("/tokyo/RemoveTimeStamp?timeStampId="+e,"post",null)},this.EditTimeTableJson=function(e,t){return n.Json("/tokyo/EditTimeTable?timeTableId="+e+"&newTimeTableName="+encodeURIComponent(t),"post",null)},this.EditWorkUnitJson=function(e,t){return n.Json("/tokyo/EditWorkUnit?workUnitId="+e+"&newWorkUnitName="+encodeURIComponent(t),"post",null)},this.CreateTimeNormTagJson=function(e,t){return n.Json("/tokyo/CreateTimeNormTag?name="+encodeURIComponent(e)+"&color="+encodeURIComponent(t),"post",null)},this.EditTimeNormTagJson=function(e,t,i){return n.Json("/tokyo/EditTimeNormTag?timeNormTagId="+e+"&name="+encodeURIComponent(t)+"&color="+encodeURIComponent(i),"post",null)},this.RemoveTimeNormTagJson=function(e){return n.Json("/tokyo/RemoveTimeNormTag?timeNormTagId="+e,"post",null)},this.ExportTimeTableToCSVAction=function(e){return n.Action("/tokyo/ExportTimeTableToCSV?timeTableId="+e,"get",null)},this.TimeTablePlotAction=function(e){return n.Action("/tokyo/TimeTablePlot?timeTableId="+e,"post",null)},this.CreateTimeStampsJson=function(e,t){return n.Json("/tokyo/CreateTimeStamps?timeStampStrings="+e+"&count="+t,"post",null)},this.CreateTimeStampJson=function(e){return n.Json("/tokyo/CreateTimeStamp?jsTimeString="+encodeURIComponent(e),"get",null)},this.CreateTimeNormJson=function(e,t){return n.Json("/tokyo/CreateTimeNorm?workUnitId="+e+"&jsTimeString="+encodeURIComponent(t),"post",null)},this.DuplicateTimeStampJson=function(e){return n.Json("/tokyo/DuplicateTimeStamp?timeStampId="+e,"post",null)},this.CreateTimeStampManuallyPostJson=function(e){return n.Json("/tokyo/CreateTimeStampManuallyPost","post",e)},this.SetSortOrderJson=function(e,t){return n.Json("/tokyo/SetSortOrder?sortOrderType="+e+"&isAscending="+t,"post",null)},this.ShareTimeTablesWithTokenJson=function(e){return n.Json("/tokyo/ShareTimeTablesWithToken?timeTableIds="+e,"post",null)},this.ShareTimeTablesJson=function(e,t){return n.Json("/tokyo/ShareTimeTables?timeTableIds="+e+"&shareWithEmail="+encodeURIComponent(t),"post",null)},this.UnShareTimeTablesJson=function(e){return n.Json("/tokyo/UnShareTimeTables?timeTableIds="+e,"post",null)}}return e}();t.TokyoController=o},function(e,t,i){"use strict";(function(e){function i(t,i,n){var o;return o=null!==n?e.ajax(t,{method:i,data:JSON.stringify(n),contentType:"application/json; charset=utf-8"}):e.ajax(t,{method:i}),o.fail(function(e){void 0!==e.responseJSON&&void 0!==e.responseJSON.StatusText&&console.log(e.responseJSON.StatusText)}),o}function n(t,i,n){var o;return o=null!==n?e.ajax(t,{method:i,data:JSON.stringify(n),contentType:"application/json; charset=utf-8"}):e.ajax(t,{method:i}),o.fail(function(e){void 0!==e.statusText&&console.log(e.statusText)}),o}Object.defineProperty(t,"__esModule",{value:!0}),t.Json=i,t.Action=n}).call(t,i(0))},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(){}return e}();t.TrackerClientViewModel=n},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(){}return e}();t.TimeStamp=n},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(){}return e}();t.TimeTable=n},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(){}return e}();t.TimeTableViewModel=n},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});!function(e){e[e.CreateTimeStamp=0]="CreateTimeStamp",e[e.CreateTimeStampManually=1]="CreateTimeStampManually",e[e.ShowTimeStamp=2]="ShowTimeStamp",e[e.ShowTimeStamps=3]="ShowTimeStamps",e[e.EditTimeStamp=4]="EditTimeStamp",e[e.RemoveTimeStamp=5]="RemoveTimeStamp",e[e.RemoveTimeStamps=6]="RemoveTimeStamps",e[e.CreateTimeNormTag=7]="CreateTimeNormTag",e[e.ShowTimeNormTag=8]="ShowTimeNormTag",e[e.ShowTimeNormTags=9]="ShowTimeNormTags",e[e.EditTimeNormTag=10]="EditTimeNormTag",e[e.RemoveTimeNormTag=11]="RemoveTimeNormTag",e[e.RemoveTimeNorm=12]="RemoveTimeNorm",e[e.ShowTimeTables=13]="ShowTimeTables",e[e.RemoveTimeTable=14]="RemoveTimeTable",e[e.CreateProfile=15]="CreateProfile",e[e.RemoveProfile=16]="RemoveProfile",e[e.ProcessTimeStamps=17]="ProcessTimeStamps",e[e.AbortSimilarRequest=18]="AbortSimilarRequest",e[e.ShareTimeTables=19]="ShareTimeTables",e[e.ShowSharedTimeTables=20]="ShowSharedTimeTables",e[e.UnshareTimeTables=21]="UnshareTimeTables",e[e.QueryTableOwners=22]="QueryTableOwners",e[e.EditWorkUnit=23]="EditWorkUnit",e[e.CreateWorkUnit=24]="CreateWorkUnit",e[e.RemoveWorkUnit=25]="RemoveWorkUnit",e[e.ShowDefaultTargetWorkUnit=26]="ShowDefaultTargetWorkUnit",e[e.MoveWorkUnit=27]="MoveWorkUnit",e[e.SetDefaultTargetWorkUnit=28]="SetDefaultTargetWorkUnit",e[e.MoveTimeNorm=29]="MoveTimeNorm",e[e.ShowInitialClientData=30]="ShowInitialClientData",e[e.EditTimeNorm=31]="EditTimeNorm",e[e.EditProductivityRating=32]="EditProductivityRating",e[e.CreateTimeTable=33]="CreateTimeTable",e[e.ExportTimeTableToCSV=34]="ExportTimeTableToCSV",e[e.ShowPlot=35]="ShowPlot",e[e.EditTimeTable=36]="EditTimeTable",e[e.SetDefaultTimeZone=37]="SetDefaultTimeZone",e[e.SetDeviceTimeZone=38]="SetDeviceTimeZone",e[e.SetViewTimeZone=39]="SetViewTimeZone",e[e.AIGeneral=40]="AIGeneral",e[e.UnbindTimeNorm=41]="UnbindTimeNorm",e[e.SetCulture=42]="SetCulture",e[e.DuplicateTimeStamp=43]="DuplicateTimeStamp",e[e.CreateTimeNorm=44]="CreateTimeNorm"}(t.TrackerEvent||(t.TrackerEvent={}))},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(){}return e}();t.WorkUnit=n},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(){}return e}();t.TimeNorm=n},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(){}return e}();t.CreateTimeStampPostViewModel=n},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(){}return e}();t.EditTimeStampPostViewModel=n},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(){}return e}();t.TrackerTimeZone=n},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(){}return e}();t.TrackerCultureInfo=n},function(e,t,i){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0});var n=i(7),o=i(1),r=o.h,a=i(31),s=i(2),l=i(2);t.TIMELINE_MIN_WIDTH=480;var d,c,u=20,p=6,m=1e3/60,f=Math.round(m),h=Math.round(13*m),v=Math.round(13*m),g=3,T=function(){function t(t,i){this.renderMaquette=function(){var e={position:"absolute",top:"0",left:"0","margin-left":"50%",color:l.TIMELINE_WARNING_COLOR_STRING,"font-size":"16px","line-height":"1","font-weight":"bold","z-index":"3"},t=c.viewModel.timelineZoomLevel!=c.viewModel.timelineMinZoomLevel,i=c.viewModel.timelineZoomLevel!=c.viewModel.timelineMaxZoomLevel,n={flex:"1 1 20px","border-color":"white","align-items":"center",opacity:"0.2"};return r("div",{key:"t"+c.timelineIndex,id:"tracker-timeline"+c.timelineIndex,class:"tracker-timeline",styles:{width:"100%","max-width":"100%",flex:"0 0 80px",height:l.TIMELINE_HEIGHT_PX_STRING,display:"flex","flex-flow":"row nowrap",position:"relative","justify-content":"space-between",overflow:"hidden",cursor:"move","min-width":"200px"},onmousedown:c.interactionStartHandler,ontouchstart:c.interactionStartTouchHandler,ondblclick:c.timelineResetHandler,afterCreate:c.timelineAfterCreateHandler},r("div",{key:"-1",styles:{position:"absolute",left:"50%",top:"0px",opacity:c.viewModel.isEnoughSpace?"0.2":"1.0","background-color":c.viewModel.isEnoughSpace?"black":"rgb(200,0,0)",height:"10px",width:"1px"}}),c.viewModel.timelineElementMapping.results.map(function(e){return e.renderMaquette()}),void 0!==c.viewModel.timelineFixedMonthString?r("p",{key:"x0",lid:"0",vid:"1",hid:"0",enterAnimation:c.timelineElementEnterAnimation,exitAnimation:c.timelineElementExitAnimation,styles:{position:"absolute",top:"63px",left:"0px",padding:"0","margin-top":"-20px","font-size":"22px","font-weight":"400",color:s.TIMELINE_COLOR_STRING}},c.viewModel.timelineFixedMonthString):void 0,r("div",{key:"0zp",styles:{position:"absolute",right:"0",top:"0",height:"75px",flex:"0 0 30px",width:"30px",display:"flex","flex-flow":"column nowrap","padding-bottom":"1px"}},t?r("button",{key:"a",type:"button",class:"btn btn-sm",spu:"0",onclick:c.zoomUpClickHandler,styles:n},"/\\"):r("button",{disabled:!0,key:"aa",type:"button",class:"btn btn-sm",onclick:c.zoomUpClickHandler,styles:n},"/\\"),i?r("button",{key:"b",type:"button",class:"btn btn-sm",spu:"0",onclick:c.zoomDownClickHandler,styles:n},"\\/"):r("button",{disabled:!0,key:"bb",type:"button",class:"btn btn-sm",onclick:c.zoomDownClickHandler,styles:n},"\\/")),c.viewModel.isSensorEnabled?r("p",{key:"0sp",styles:e},"#",c.viewModel.sensorDataCounter.toString(),": ",c.viewModel.sensorStatus," x:",c.viewModel.sensorXCurrent,", y:",c.viewModel.sensorYCurrent,", z:",c.viewModel.sensorZCurrent):void 0)},this.zoomUpClickHandler=function(e){c.adjustZoom(-1)},this.zoomDownClickHandler=function(e){c.adjustZoom(1)},this.createTimelineElementMapping=function(){return o.createMapping(function(e){return e.index+","+e.subIndex},function(e){var t=e.isVisible,i=e.isLittleElement,n=e.index,o=e.subIndex,a=e.description,s=e.subdescription,d=e.markers,m=e.isHighlighted,f=c.createTimelineMarkerMapping();f.map(d);var h=e.dayOfMonthString,v="rgb("+e.subColorR+","+e.subColorG+","+e.subColorB,g="rgb("+e.colorR+","+e.colorG+","+e.colorB,T=e.isStartOfWeekMarker,b=e.weekNumber,y=c.viewModel.timelineLittleElementVisibleCount>0?"calc(50% - "+-2*(""+e.weekNumber).length+"px)":-2*(""+e.weekNumber).length+"px";return{renderMaquette:function(){var e,d=""!==s;e=t?i?p:u:0;var v={position:"absolute",top:"0",left:"0","margin-left":y,height:"0.6rem",opacity:"0.4","margin-top":"0","margin-bottom":"0","font-size":"0.5rem","line-height":"0.5rem","padding-left":"3px","letter-spacing":"0.2px","background-color":"white","z-index":"1","font-color":l.TIMELINE_COLOR_STRING},w=t?1:0;return r("div",{key:n+","+o,styles:{position:"relative",flex:w+" "+w+" "+e+"px",width:e+"px","min-width":e+"px",height:"80px","text-align":"center","font-weight":"bold","line-height":"1.5","padding-top":i?"10px":void 0,"font-size":i?"10px":c.viewModel.timelineFontSizeString,"-webkit-user-select":"none","overflow-x":"visible","overflow-y":"visible",color:g},lid:i?"1":"0",hid:m?"1":"0",vid:t?"1":"0",enterAnimation:c.timelineElementEnterAnimation,exitAnimation:c.timelineElementExitAnimation},r("p",{key:"1",styles:{padding:"0"}},a),i?void 0:r("p",{key:"2",styles:{padding:"0","-webkit-user-select":"none",width:"auto","margin-top":"-20px","font-size":"14px","font-weight":"lighter",color:l.TIMELINE_COLOR_STRING}},h),i||!d?void 0:r("p",{key:"3",styles:{padding:"0","margin-top":"-20px",width:"auto","font-size":"22px","font-weight":"lighter",color:l.TIMELINE_COLOR_STRING,"border-left":"solid "+l.TIMELINE_COLOR_STRING+" 1px"}},s),f.results.map(function(e){return e.renderMaquette()}),T?r("p",{key:"4",styles:v},b):void 0)},update:function(r,l){t=r.isVisible,i=r.isLittleElement,n=r.index,o=r.subIndex,a=r.description,s=r.subdescription,m=r.isHighlighted,d=r.markers,f.map(d),h=r.dayOfMonthString,g="rgb("+r.colorR+","+r.colorG+","+r.colorB,v="rgb("+r.subColorR+","+r.subColorG+","+r.subColorB,T=r.isStartOfWeekMarker,b=r.weekNumber,y=c.viewModel.timelineLittleElementVisibleCount>0?"calc(50% - "+-2*(""+e.weekNumber).length+"px)":-2*(""+e.weekNumber).length+"px"}}},function(e,t){t.update(e)})},this.timelineAfterCreateHandler=function(e,t,i,n,o){c.timelineDivElement=e},this.updateActiveTimeNorm=function(e){var t=void 0;c.viewModel.workUnits.find(function(i){if(i.TimeNorms){var n=i.TimeNorms.findIndex(function(t){return t.TimeNormId==e});if(n>-1)return t=i.TimeNorms[n],!0}return!1})},this.adjustZoom=function(e){var t=c.viewModel.timelineZoomLevel+e;t<c.viewModel.timelineMinZoomLevel?t=c.viewModel.timelineMinZoomLevel:t>c.viewModel.timelineMaxZoomLevel&&(t=c.viewModel.timelineMaxZoomLevel),c.viewModel.timelineZoomLevel=t,c.viewModel.timelineElements=c.createTimelineElements(),c.viewModel.timelineElementMapping.map(c.viewModel.timelineElements)},this.updateWorkUnitMapping=function(e){var t;c.viewModel.workUnits=[],(t=c.viewModel.workUnits).push.apply(t,e.sort(function(e,t){return e.ManualSortOrderKey-t.ManualSortOrderKey})),c.viewModel.activeTimeNorm=void 0,c.viewModel.timeNormTimeSpans=[];var i=[];c.viewModel.workUnits.map(function(e){e.TimeNorms&&e.TimeNorms.map(function(e){e.StartTime&&e.EndTime&&i.push({startTimeNumber:e.StartTime.TrackedTimeForView.getTime(),endTimeNumber:e.EndTime.TrackedTimeForView.getTime(),colorR:e.ColorR,colorG:e.ColorG,colorB:e.ColorB,usedLevel:-1,timeNormId:e.TimeNormId})})}),c.viewModel.timeNormTimeSpans=i,c.viewModel.timelineElements=c.createTimelineElements(),c.viewModel.timelineElementMapping.map(c.viewModel.timelineElements)},this.createTimelineMarkerMapping=function(){return o.createMapping(function(e){return e.uniqueId},function(e){var t=e.uniqueId,i=e.isTimeNormStart,n=e.isTimeNormEnd,o=e.level,a=e.mappedTimeSpanIndex,s=c.viewModel.timeNormTimeSpans[e.mappedTimeSpanIndex];return{renderMaquette:function(){var a=0,l=100;i?n?(a=25,l=50):(a=75,l=25):n&&(a=0,l=25);var d={position:"absolute",top:o*g+"px",left:"0px",height:g+"px",width:"100%"};return r("div",{key:t+","+i+","+n,mid:""+e.mappedTimeSpanIndex,styles:d},r("div",{key:"1",styles:{position:"absolute",left:a+"%",width:l+"%",height:"100%","background-color":"rgb("+s.colorR+","+s.colorG+","+s.colorB}}))},update:function(e){t=e.uniqueId,i=e.isTimeNormStart,n=e.isTimeNormEnd,o=e.level,a=e.mappedTimeSpanIndex,s=c.viewModel.timeNormTimeSpans[e.mappedTimeSpanIndex]}}},function(e,t){t.update(e)})},this.interactionStartHandler=function(e){e.preventDefault();var t=e.target,i=t.attributes.getNamedItem("spu");null!==i&&0==parseInt(i.value)||1==e.buttons&&c.startTimelineInteraction(e.screenX,e.screenY)},this.interactionStartTouchHandler=function(e){c.viewModel.isTimelineInteracting&&e.preventDefault();var t=e.touches.item(0);c.endTimelineInteraction(),c.startTimelineInteraction(t.screenX,t.screenY)},this.startTimelineInteraction=function(e,t){c.viewModel.isTimelineInteracting?c.endTimelineInteraction():(c.viewModel.isTimelineInteracting=!0,c.viewModel.timelinePanStartMousePositionX=e,c.viewModel.timelinePanStartMousePositionY=t,c.viewModel.timelineStartZoomLevel=c.viewModel.timelineZoomLevel,c.viewModel.timelineStartCenterBias=c.viewModel.timelineCenterBias,c.viewModel.timelineTimer=setTimeout(c.timerTimelineRenderSetupTimed,f),c.viewModel.timelineAcceleration=0,c.viewModel.timelineSpeed=0,c.viewModel.timelineElapsedTimeMs=0,c.viewModel.timelineChangeInPositionDoubleX=0,c.viewModel.timelineChangeInPositionDoubleY=0)},this.interactionUpdateHandler=function(e){if(1==e.buttons&&c.viewModel.isTimelineInteracting){var t=e.screenX-c.viewModel.timelinePanStartMousePositionX,i=e.screenY-c.viewModel.timelinePanStartMousePositionY,n=void 0;n=c.viewModel.timelineLittleElementVisibleCount>0?3/((c.viewModel.timelineElements.length-c.viewModel.timelineLittleElementVisibleCount)/46):3/(c.viewModel.timelineElements.length/46),n!=c.viewModel.timelineLastElementFactor&&(c.viewModel.timelineStartCenterBias=c.viewModel.timelineCenterBias,c.viewModel.timelinePanStartMousePositionX=c.viewModel.timelinePanStartMousePositionX+t,t=0,c.viewModel.timelineChangeInPositionDoubleX=0,c.viewModel.timelineLastElementFactor=n),Math.abs(t)>10&&Math.abs(i)>10&&c.transformPixelsToTimelineSetup(t/n,i),Math.abs(t)>10?c.transformPixelsToTimelineSetup(t/n,c.minSignedElement(i,20)):Math.abs(i)>10?c.transformPixelsToTimelineSetup(c.minSignedElement(t/n,10),i):c.transformPixelsToTimelineSetup(t/n,i)}else 1!=e.buttons&&c.viewModel.isTimelineInteracting&&c.endTimelineInteraction()},this.interactionUpdateTouchHandler=function(e){if(c.viewModel.isTimelineInteracting){e.preventDefault();var t=e.touches.item(0),i=t.screenX-c.viewModel.timelinePanStartMousePositionX,n=t.screenY-c.viewModel.timelinePanStartMousePositionY,o=void 0;o=c.viewModel.timelineLittleElementVisibleCount>0?3/((c.viewModel.timelineElements.length-c.viewModel.timelineLittleElementVisibleCount)/46):3/(c.viewModel.timelineElements.length/46),o!=c.viewModel.timelineLastElementFactor&&(c.viewModel.timelineStartCenterBias=c.viewModel.timelineCenterBias,c.viewModel.timelinePanStartMousePositionX=c.viewModel.timelinePanStartMousePositionX+i,i=0,c.viewModel.timelineChangeInPositionDoubleX=0,c.viewModel.timelineLastElementFactor=o),Math.abs(i)>10&&Math.abs(n)>10&&c.transformPixelsToTimelineSetup(c.minSignedElement(i/o,3),c.minSignedElement(n/2,5)),Math.abs(i)>10?c.transformPixelsToTimelineSetup(i/o,c.minSignedElement(n/2,5)):Math.abs(n)>10?c.transformPixelsToTimelineSetup(c.minSignedElement(i/o,3),n/2):c.transformPixelsToTimelineSetup(c.minSignedElement(i/o,3),c.minSignedElement(n/2,5))}},this.transformPixelsToTimelineSetup=function(e,t){c.viewModel.timelineChangeInPositionDoubleX=e/5},this.timerTimelineRenderSetupTimed=function(){if(!c.viewModel.isTimelineInteracting)return void(void 0!==c.viewModel.timelineTimer&&(clearTimeout(c.viewModel.timelineTimer),c.viewModel.timelineTimer=void 0));var e;e=c.viewModel.timelineChangeInPositionDoubleX>=0?Math.floor(c.viewModel.timelineChangeInPositionDoubleX):Math.round(c.viewModel.timelineChangeInPositionDoubleX);var t,i=c.viewModel.timelineStartCenterBias-e,n=c.viewModel.timelineChangeInPositionDoubleY;t=Math.floor(n);var o=c.viewModel.timelineStartZoomLevel+t;if(o<c.viewModel.timelineMinZoomLevel?(o=c.viewModel.timelineMinZoomLevel,c.viewModel.timelineSpeed=0,c.viewModel.timelineAcceleration=0):o>c.viewModel.timelineMaxZoomLevel?(o=c.viewModel.timelineMaxZoomLevel,c.viewModel.timelineSpeed=0,c.viewModel.timelineAcceleration=0):(c.viewModel.timelineChangeInPositionDoubleY=n,c.viewModel.timelineSpeed=c.viewModel.timelineSpeed+c.viewModel.timelineAcceleration*f),o!=c.viewModel.timelineZoomLevel||i!=c.viewModel.timelineCenterBias){if(performance.now()-c.lastRenderTime<m);else{o!=c.viewModel.timelineZoomLevel?i=c.viewModel.timelineCenterBias:i!=c.viewModel.timelineCenterBias&&(o=c.viewModel.timelineZoomLevel,c.viewModel.isPanningRight=i>c.viewModel.timelineCenterBias),c.viewModel.timelineZoomLevel=o,c.viewModel.timelineCenterBias=i,c.viewModel.timelineElements=c.createTimelineElements(),c.viewModel.timelineElementMapping.map(c.viewModel.timelineElements);var r=performance.now();c.lastRenderTime=r,d.projector.scheduleRender()}c.viewModel.timelineTimer=setTimeout(c.timerTimelineRenderSetupTimed,f),c.viewModel.timelineElapsedTimeMs+=f}else c.viewModel.timelineElapsedTimeMs+=f,c.viewModel.timelineTimer=setTimeout(c.timerTimelineRenderSetupTimed,f)},this.lastRenderTime=performance.now(),this.minSignedElement=function(e,t){var i;return e>=0?(i=e-t)<0&&(i=0):(i=e+t)>0&&(i=0),i},this.endTimelineInteraction=function(){c.viewModel.isTimelinePanning=!1,c.viewModel.isTimelineInteracting=!1,c.viewModel.timelineLastAccelerationDiff=0},this.timelineResetHandler=function(e){var t=e.target,i=t.attributes.getNamedItem("spu");null!==i&&0==parseInt(i.value)||(c.viewModel.timelineCenterBias=0,c.viewModel.timelineElements=c.createTimelineElements(),c.viewModel.timelineElementMapping.map(c.viewModel.timelineElements))},this.startMarkerEditAnimation=function(t){var i=c.viewModel.timeNormTimeSpans.findIndex(function(e){return e.timeNormId==t});if(-1==i)return void console.log("animation element undefined");var o=e(c.timelineDivElement).find("[mid='"+i+"']");n.animate(o,{opacity:0},{duration:500,easing:"ease-in-out",loop:!0})},this.stopMarkerEditAnimation=function(t){var i=c.viewModel.timeNormTimeSpans.findIndex(function(e){return e.timeNormId==t}),o=e(c.timelineDivElement).find("[mid='"+i+"']");if(-1==i)return void console.log("animation element undefined");n.animate(o,"stop",!0),n.animate(o,{opacity:1},{duration:50,easing:"ease-in"})},this.timelineElementEnterAnimation=function(e,t){var i="1"===e.attributes.getNamedItem("lid").value,o="1"===e.attributes.getNamedItem("vid").value,r="1"===e.attributes.getNamedItem("hid").value;e.style.flexBasis="0px",e.style.width="0px",e.style.minWidth="0px",e.style.flexGrow="0",e.style.flexShrink="0";var a="0";o&&(a=i?p.toString():"auto"),n.animate(e,{flexGrow:o?1:0,flexShrink:o?1:0,flexBasis:a,width:a,minWidth:a},h,"ease-in",function(e){}),i||(e.style.opacity="0",n.animate(e,{colorRed:r?s.TIMELINE_SHADED_COLOR_R:s.TIMELINE_COLOR_R,colorGreen:r?s.TIMELINE_SHADED_COLOR_G:s.TIMELINE_COLOR_G,colorBlue:r?s.TIMELINE_SHADED_COLOR_B:s.TIMELINE_COLOR_B},{queue:!1,duration:h,easing:"ease-in",complete:function(e){e.map(function(e){})}}),o&&n.animate(e,{opacity:1},{queue:!1,duration:h,easing:"ease-in"})),e.children.length>1&&n.animate(e.lastElementChild,{colorRed:s.TIMELINE_COLOR_R,colorGreen:s.TIMELINE_COLOR_G,colorBlue:s.TIMELINE_COLOR_B},{duration:h,easing:"ease-in"})},this.timelineElementExitAnimation=function(e,t,i){e.attributes.getNamedItem("lid").value;n.animate(e,{opacity:0,flexBasis:0,width:0,minWidth:0,flexGrow:0,flexShrink:0},{duration:v,easing:"ease-out",complete:t,queue:!1})},this.createTimelineElements=function(){c.viewModel.workUnitGraphEndTime.getTime()<c.viewModel.workUnitGraphStartTime.getTime()&&console.log("timeline end date must be later than start date");var e=[],t=c.viewModel.fullDaysToDisplay,i=c.viewModel.elementCountAwayFromCenter,n=t<c.viewModel.timelineMaxDayElements,o=new Date(Date.now()),r=o.getFullYear(),a=new Date(r,o.getMonth(),o.getDate(),0,0,0,0),l=new Date(r,0,1,0,0,0,0).getDay(),u=c.viewModel.addFullDaysSameTime(a,c.viewModel.timelineCenterBias);c.viewModel.timelineDateCenter=u;for(var p=u.getMonth(),m=(u.getDay(),u.getDate()),f=0;f<p;f++){m+=new Date(u.getFullYear(),f,0,0,0,0,0).getDate()}var h=7-(d.clientData.StartDayOfWeekIndex,l-d.clientData.StartDayOfWeekIndex),v=m+h;console.log(v);var g=c.viewModel.timelineCenterBias;c.viewModel.timelineLittleElementVisibleCount=0;for(var T=[],b=[],y=g-i,w=g+i+1,S=0;S<c.viewModel.timeNormTimeSpans.length;S++)b.push(S);var E=[],k=new Date(u.getTime());E.push(k);for(var f=0;f<i;f++)k=c.viewModel.addSingleDaySameTime(k,!0),E.push(k);k=E[0];for(var C=[],f=0;f<i;f++)k=c.viewModel.addSingleDaySameTime(k,!1),C.push(k);for(var M=[],I=[],f=0;f<i;f++)M.push(C.pop());M=M.concat(E),M.map(function(e){return I.push(e.getTime())}),c.viewModel.timelineFixedMonthString=void 0;for(var f=y;f<w;f++){var x=m+h-(g-f),D=f-y,N=M[D],_=I[D],A=N.getDay(),O=d.clientData.WeekDayLetters[A],U=6==A||0==A,L=N.getDate(),W=N.getMonth(),P=1==L,H="";if(P||f==y){var R=W;H=d.clientData.AbbreviatedMonths[R].toUpperCase()+"'"+N.getFullYear().toString()}if(f==y&&!P){var F=Math.min(3,w-1-y-1);L<c.viewModel.addFullDaysSameTime(M[D],F).getDate()&&(c.viewModel.timelineFixedMonthString=H,P=!1)}var V=[],j=void 0;j=t>7?4:t>5?2:1;var B=0,q=_,G=void 0;G=f<w-1?I[D+1]-1:c.viewModel.addSingleDaySameTime(M[D],!0).getTime()+1;var Z=1e3*j*60*60,z=void 0;for(z=n?_+Z:G-1;q<G;){if(B>25){console.log("day has too many hours");break}V=[];for(var X=[],Y=[],J=[],$=0;$<T.length;$++){var K=T[$],Q=c.viewModel.timeNormTimeSpans[K],ee=z>Q.endTimeNumber;V.push({isTimeNormStart:!1,isTimeNormEnd:ee,level:Q.usedLevel,mappedTimeSpanIndex:K,uniqueId:d.clientData.SelectedTimeTableId.toString()+","+f+","+B+","+Q.usedLevel+","+t+","+c.viewModel.timelineCenterBias}),J.push(Q.usedLevel),ee&&(X.push(K),J.splice(J.indexOf(K),1))}for(var te=0;te<b.length;te++){var ie=b[te],ne=c.viewModel.timeNormTimeSpans[ie],oe=!1,ee=!1,re=!0;if(q<=ne.startTimeNumber&&z>ne.startTimeNumber?(oe=!0,z>ne.endTimeNumber&&(ee=!0)):f==y&&0==B&&q>=ne.startTimeNumber&&q<ne.endTimeNumber&&(oe=!0,re=!1,z>=ne.endTimeNumber&&(ee=!0)),oe){for(var ae=0;ae<1e4&&-1!=J.indexOf(ae);)ae++;1e4==ae&&console.log("too many overlapping time norms"),ne.usedLevel=ae,J.push(ae),V.push({isTimeNormStart:re,isTimeNormEnd:ee,level:ae,mappedTimeSpanIndex:ie,uniqueId:d.clientData.SelectedTimeTableId.toString()+","+f+","+B+","+ne.usedLevel+","+t+","+c.viewModel.timelineCenterBias}),ee||T.push(ie),Y.push(ie)}}0==B&&e.push({description:O,subdescription:P?H:"",index:f,subIndex:0,isHighlighted:U,colorR:U?s.TIMELINE_SHADED_COLOR_R:s.TIMELINE_COLOR_R,colorG:U?s.TIMELINE_SHADED_COLOR_G:s.TIMELINE_COLOR_G,colorB:U?s.TIMELINE_SHADED_COLOR_B:s.TIMELINE_COLOR_B,isStartOfWeekMarker:!0,weekNumber:x,subColorR:s.TIMELINE_COLOR_R,subColorG:s.TIMELINE_COLOR_G,subColorB:s.TIMELINE_COLOR_B,isLittleElement:!1,isVisible:!0,dayOfMonthString:L.toString(),markers:V}),B>=j&&f<w-1&&(e.push({description:".",subdescription:"",isHighlighted:!1,index:f,colorR:s.TIMELINE_COLOR_R,colorG:s.TIMELINE_COLOR_G,colorB:s.TIMELINE_COLOR_B,isStartOfWeekMarker:!1,weekNumber:0,subColorR:s.TIMELINE_COLOR_R,subColorG:s.TIMELINE_COLOR_G,subColorB:s.TIMELINE_COLOR_B,isLittleElement:!0,isVisible:n&&B>0&&B%j==0,subIndex:100*f+B,dayOfMonthString:"",markers:V}),B>0&&(c.viewModel.timelineLittleElementVisibleCount+=1));for(var se=0;se<Y.length;se++)b.splice(b.indexOf(Y[se]),1);for(var se=0;se<X.length;se++)T.splice(T.indexOf(X[se]),1);if(q+=Z,z+=Z,B+=j,!n)break}}return c.viewModel.timelineFontSizeString="20px",e},c=this,this.timelineIndex=i,d=t,document.body.addEventListener("mousemove",this.interactionUpdateHandler),document.body.addEventListener("touchmove",this.interactionUpdateTouchHandler),this.viewModel=new a.TimelineVM(this)}return t}();t.Timeline=T}).call(t,i(0))},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n,o=i(1),r=(o.h,function(){function e(e){this.workUnits=[],this.activeTimeNorm=void 0,this.timeNormTimeSpans=[],this.timelineDateCenter=void 0,this.timelineElements=[],this.timelineElementTimeSpanIndexMapping={},this.timelineLittleElementVisibleCount=0,this.timelineMaxDayElements=14,this.timelineFixedMonthString=void 0,this.isPanningRight=!1,this.isEnoughSpace=!1,this.actualSpacePx=1080,this.timelineCursorElementIndex=0,this.timelineLastElementFactor=0,this.timelineZoomLevel=6,this.timelineMaxZoomLevel=20,this.timelineMinZoomLevel=-1,this.timelineStartZoomLevel=0,this.timelineCenterBias=0,this.timelineStartCenterBias=0,this.timelineChangeInPositionDoubleX=0,this.timelineChangeInPositionDoubleY=0,this.timelineAcceleration=0,this.timelineLastAccelerationDiff=0,this.timelineSpeed=0,this.timelineElapsedTimeMs=0,this.isTimelineInteracting=!1,this.timelineTimer=void 0,this.timelinePanStartMousePositionX=0,this.timelinePanStartMousePositionY=0,this.isTimelinePanning=!1,this.displayedWeekNumber=0,this.isSensorEnabled=!1,this.isSensorPanning=!1,this.isSensorCalibrated=!1,this.sensorDataCounter=0,this.sensorDataCounterLastZoomChange=0,this.sensorDataCounterLastBiasChange=0,this.sensorXStart=0,this.sensorYStart=0,this.sensorZStart=0,this.sensorStatus="",this.sensorXCurrent=0,this.sensorYCurrent=0,this.sensorZCurrent=0,this.sensorXPrevious=0,this.sensorYPrevious=0,this.sensorZPrevious=0,this.addFullDaysSameTime=function(e,t){for(var i=new Date(e.getTime()),o=0;o<Math.abs(t);o++)i=n.addSingleDaySameTime(i,t>0);return i},this.addFullHoursSameSubTime=function(e,t){for(var i=new Date(e.getTime()),o=0;o<Math.abs(t);o++)i=n.addSingleHourSameSubTime(i,t>0);return i},this.addSingleHourSameSubTime=function(e,t){var i=e.getTime()+(t?1e3:-1e3);return new Date(i)},this.addSingleDaySameTime=function(e,t){var i=e.getFullYear(),n=e.getMonth(),o=e.getDate(),r=e.getHours(),a=e.getMinutes(),s=e.getSeconds(),l=e.getMilliseconds(),d=o+(t?1:-1),c=n,u=i;if(t)if(12==c)d>31&&(d=1,c=1,u=i+1);else{var p=new Date(i,n+1,1,0,0,0,1),m=new Date(p.getTime()-10).getDate();d>m&&(d=1,c=n+1)}else if(0==d)if(1==n)u=i-1,c=12,d=31;else{var f=new Date(i,n,1,0,0,0,1),h=new Date(f.getTime()-10).getDate();c=n-1,d=h}return new Date(u,c,d,r,a,s,l)},n=this;var t=new Date(Date.now());this.workUnitGraphEndTime=this.addFullDaysSameTime(t,3),this.workUnitGraphStartTime=this.addFullDaysSameTime(t,-3),this.workUnitGraphDaysDifference=6,this.timelineElementMapping=e.createTimelineElementMapping(),this.timelineElementMapping.map(this.timelineElements)}return Object.defineProperty(e.prototype,"fullDaysToDisplay",{get:function(){return 5+2*n.timelineZoomLevel},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"elementCountAwayFromCenter",{get:function(){return Math.floor(this.fullDaysToDisplay/2)},enumerable:!0,configurable:!0}),e}());t.TimelineVM=r},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n,o,r=i(1),a=(r.h,i(6));!function(e){e[e.None=0]="None",e[e.Pending=1]="Pending",e[e.WorkUnit=2]="WorkUnit",e[e.TimeNorm=3]="TimeNorm",e[e.TimeTable=4]="TimeTable",e[e.EditTimeStamp=5]="EditTimeStamp",e[e.AddManualTimeStamp=6]="AddManualTimeStamp",e[e.SelectTimeTable=7]="SelectTimeTable",e[e.ShareTimeTable=8]="ShareTimeTable",e[e.GlobalizationSetup=9]="GlobalizationSetup",e[e.DisplayChart=10]="DisplayChart"}(o=t.ClientEditMode||(t.ClientEditMode={}));var s;!function(e){e[e.Device=0]="Device",e[e.View=1]="View",e[e.TimeStamp=2]="TimeStamp"}(s=t.TimeZoneSetting||(t.TimeZoneSetting={}));var l=function(){function e(e){this.isShowButton=!0,this.unboundTimeStamps=[],this.timeTables=[],this.currentEditMode=o.None,this.tempEditedWorkUnitId=void 0,this.tempWorkUnitName="",this.tempEditedTimeNormParentWorkUnitId=void 0,this.tempEditedTimeNormId=void 0,this.tempTimeNormName="",this.tempTimeNormColorR=0,this.tempTimeNormColorG=0,this.tempTimeNormColorB=0,this.tempTimeTableName="",this.tempEditedTimeStamp=void 0,this.tempEditedTimeStampHtmlInput="",this.isTempEditedTimeStampChanged=!1,this.forMoveWorkUnitId=void 0,this.hoveredProductivityTimeNormId=void 0,this.hoveredProductivityStarIndex=void 0,this.timeZones=[],this.selectedTimeZoneDevice=void 0,this.selectedTimeZoneView=void 0,this.selectedTimeZoneTimeStamp=void 0,this.workUnits=[],this.isToggledTimeline=!0,this.isExplicitlyToggledTimeline=!1,this.lastScroll=0,this.isToggledTableOfContents=!0,this.isToggledDetailedTimeNorm=!0,this.isToggledSelectToc=!1,this.offlineTimeStampCount=parseInt(window.localStorage.getItem(a.OFFLINE_N)),this.isDragging=!1,this.draggedWorkUnitId=0,this.hoveredWorkUnitIdWhileDrag=0,this.draggedFollowUpWorkUnitId=0,this.draggedElementPositionStartX=0,this.draggedElementPositionStartY=0,this.draggedElementPositionX=0,this.draggedElementPositionY=0,this.lastCultureIdDotNet="",this.lastTimeZoneIdDotNet="",this.isSendLocalTimezone=!0,this.updateUnboundTimeStampMapping=function(e){var t;n.unboundTimeStamps=[],(t=n.unboundTimeStamps).push.apply(t,e),n.unboundTimeStampMapping.map(n.unboundTimeStamps)},this.updateTimeTablesMapping=function(e){var t;n.timeTables=[],(t=n.timeTables).push.apply(t,e),n.timeTableSelectionMapping.map(n.timeTables),n.tableWorkUnitSelectionMapping.map(n.timeTables)},this.updateTimeZonesMapping=function(e){var t;n.timeZones=[],(t=n.timeZones).push.apply(t,e),n.timeZoneDeviceSelectionMapping.map(n.timeZones),n.timeZoneViewSelectionMapping.map(n.timeZones),n.timeZoneTimeStampSelectionMapping.map(n.timeZones)},this.setTimeZone=function(e,t){var i=n.timeZones.find(function(t){return t.IdDotNet==e});if(void 0!==i)switch(t){case s.Device:n.selectedTimeZoneDevice=i.Key;break;case s.View:n.selectedTimeZoneView=i.Key;break;default:console.log("Not implemented.")}else console.log("Invalid time zone.")},this.updateWorkUnitsForTableMapping=function(e){var t;n.workUnits=[],(t=n.workUnits).push.apply(t,e.sort(function(e,t){return e.ManualSortOrderKey-t.ManualSortOrderKey})),n.workUnitMapping.map(n.workUnits)},n=this,this.unboundTimeStampMapping=e.createUnboundTimeStampMapping(),this.timeTableSelectionMapping=e.createTimeTableSelectionMapping(),this.timeZoneDeviceSelectionMapping=e.createTimeZoneMapping(s.Device),this.timeZoneViewSelectionMapping=e.createTimeZoneMapping(s.View),this.timeZoneTimeStampSelectionMapping=e.createTimeZoneMapping(s.TimeStamp),this.workUnitMapping=e.createWorkUnitTableMapping(),this.tableWorkUnitSelectionMapping=e.createTableWorkUnitSelectionMapping()}return e}();t.TokyoTrackerClientVM=l},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n,o,r=i(1),a=r.h,s=i(2),l=i(34),d=function(){function e(e){this.renderMaquette=function(){return a("ul",{class:"nav nav-pills nav-stacked"},o.viewModel.sectionsMapping.results.map(function(e){return e.renderMaquette()}))},this.createRecursiveSectionsMapping=function(){return r.createMapping(function(e){return e.Numbering},function(e){var t=e.IsActive,i=e.IsVisible,r=o.createRecursiveSectionsMapping();r.map(e.SubSectionVMs);var l=5*e.Level,d=e.Text;return{renderMaquette:function(){var o;o=0==e.Level?a("a",{href:"#a_"+e.Numbering,tid:e.Numbering.toString(),onclick:n.client.jumpToTimeTableClickHandler,styles:{color:t?s.TIMELINE_COLOR_STRING:void 0}},""+d):a("a",{href:"#a_"+e.Numbering,styles:{color:t?s.TIMELINE_COLOR_STRING:void 0}},""+d);var c=[];return c.push(a("li",{key:e.Numbering,classes:{active:t},role:"presentation",styles:{display:i?"list-item":"none","padding-left":l+"px",width:"100%","text-decoration":t?"underline":void 0,"font-weight":0==e.Level?"bold":void 0}},o)),r.results.map(function(e){c.push(e.renderMaquette())}),c},update:function(e){t=e.IsActive,i=e.IsVisible,r.map(e.SubSectionVMs),d=e.Text}}},function(e,t){t.update(e)})},this.onContentPositionScrolledHandler=function(e){var t=document.getElementsByClassName("anchor");document.getElementsByName("a_"+o.viewModel.activeSectionName);-1==o.viewModel.currentIndex&&(o.viewModel.currentIndex=0);var i=e.target.scrollTop;0!=n.client.viewModel.lastScroll||n.client.viewModel.isExplicitlyToggledTimeline?0==i&&n.client.viewModel.lastScroll&&!n.client.viewModel.isExplicitlyToggledTimeline&&n.client.timelineShowAnimation():n.client.timelineHideAnimation(),n.client.viewModel.lastScroll=i;for(var r=!1,a=o.viewModel.currentIndex,s=0;s<t.length;s++)if(void 0!==t[s]){var l=t[s].offsetTop;0==s&&(l=0);var d=i-l}for(var s=o.viewModel.currentIndex;s>=0;s--)if(void 0!==t[s]){var l=t[s].offsetTop,d=i-l;if(!(d<=-129))break;a=s-1,a<0&&(a=0),r=!0}if(!r)for(var c=o.viewModel.currentIndex;c<t.length;c++)if(void 0!==t[c]){var u=t[c].offsetTop,p=i-u;if(p>=-90){r=!0,a=c;break}}if(a!==o.viewModel.currentIndex&&void 0!==t[a]){o.viewModel.currentIndex=a;var m=t[a].name.slice(2);o.viewModel.updateTreeForActiveSection(m),n.projector.scheduleRender()}},o=this,n=e,this.viewModel=new l.TableOfContentsVM(this)}return e}();t.TableOfContents=d},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n,o=i(1),r=(o.h,function(){function e(e){this.sectionsTree=[],this.mappedSectionsDictionary={},this.initialIndex=-1,this.currentIndex=-1,this.activeSectionName=void 0,this.updateSectionDictionary=function(){n.mappedSectionsDictionary={};for(var e=0;e<n.sectionsTree.length;e++){var t=n.sectionsTree[e];t.IsVisible=!0,n.mappedSectionsDictionary[t.Numbering]=t;for(var i=0;i<t.SubSectionVMs.length;i++){var o=t.SubSectionVMs[i];o.IsVisible=!1,n.mappedSectionsDictionary[o.Numbering]=o;for(var r=0;r<o.SubSectionVMs.length;r++){var a=o.SubSectionVMs[r];a.IsVisible=!1,n.mappedSectionsDictionary[a.Numbering]=a;for(var s=0;s<a.SubSectionVMs.length;s++){var l=a.SubSectionVMs[s];l.IsVisible=!1,n.mappedSectionsDictionary[l.Numbering]=l}}}}},this.updateTableOfContents=function(e,t){var i=[];if(void 0!==e)for(var o=0;o<e.length;o++){var r=e[o];if(void 0!==r.TimeTableAndWorkUnits&&void 0!==r.TimeTableAndWorkUnits.WorkUnits){for(var a=r.TimeTableAndWorkUnits.TimeTableId==t,s=[],l=0;l<r.TimeTableAndWorkUnits.WorkUnits.length;l++){var d=r.TimeTableAndWorkUnits.WorkUnits[l],c=[];if(void 0!==d.TimeNorms)for(var u=0;u<d.TimeNorms.length;u++){var p=d.TimeNorms[u];c.push({IsActive:!1,IsVisible:!1,Level:2,Numbering:n.createSectionNumberingTimeNorm(r.TimeTableAndWorkUnits.TimeTableId,d.WorkUnitId,p.TimeNormId),SubSectionVMs:[],Text:p.Name})}s.push({IsActive:!1,IsVisible:a,Level:1,Numbering:n.createSectionNumberingWorkUnit(r.TimeTableAndWorkUnits.TimeTableId,d.WorkUnitId),SubSectionVMs:c,Text:d.Name})}i.push({IsActive:a,IsVisible:!0,Level:0,Numbering:r.TimeTableAndWorkUnits.TimeTableId.toString(),SubSectionVMs:s,Text:r.TimeTableAndWorkUnits.Name})}}n.updateSectionDictionary(),n.sectionsTree=i,n.updateTreeForActiveSection(n.activeSectionName)},this.updateTreeForActiveSection=function(e){if(void 0==e)return void(n.activeSectionName=void 0);n.activeSectionName=e;for(var t=0;t<n.sectionsTree.length;t++){var i=n.sectionsTree[t];i.IsActive=i.Numbering===n.activeSectionName;for(var o=0;o<i.SubSectionVMs.length;o++){var r=i.SubSectionVMs[o];r.IsActive=r.Numbering===n.activeSectionName,i.IsActive=i.IsActive||r.IsActive;for(var a=0;a<r.SubSectionVMs.length;a++){var s=r.SubSectionVMs[a];s.IsActive=s.Numbering===n.activeSectionName,r.IsActive=r.IsActive||s.IsActive,i.IsActive=i.IsActive||s.IsActive;for(var l=0;l<s.SubSectionVMs.length;l++){var d=s.SubSectionVMs[l];d.IsActive=d.Numbering===n.activeSectionName,s.IsActive=s.IsActive||d.IsActive,r.IsActive=r.IsActive||d.IsActive,i.IsActive=i.IsActive||d.IsActive}}}}for(var t=0;t<n.sectionsTree.length;t++)for(var i=n.sectionsTree[t],o=0;o<i.SubSectionVMs.length;o++){var r=i.SubSectionVMs[o];r.IsVisible=i.IsActive;for(var a=0;a<r.SubSectionVMs.length;a++){var s=r.SubSectionVMs[a];s.IsVisible=r.IsActive;for(var l=0;l<s.SubSectionVMs.length;l++){var d=s.SubSectionVMs[l];d.IsVisible=s.IsActive}}}n.sectionsMapping.map(n.sectionsTree)},n=this,this.sectionsMapping=e.createRecursiveSectionsMapping(),this.sectionsMapping.map(this.sectionsTree)}return e.prototype.createSectionNumberingWorkUnit=function(e,t){return e+"."+t},e.prototype.createSectionNumberingTimeNorm=function(e,t,i){return e+"."+t+"."+i},e}());t.TableOfContentsVM=r},function(e,t,i){(function(e){!function(e){var t=function(){var t=65,i={eventName:"click",onShow:function(){},onBeforeShow:function(){},onHide:function(){},onChange:function(){},onSubmit:function(){},color:"ff0000",livePreview:!0,flat:!1},n=function(t,i){var n=W(t);e(i).data("colorpicker").fields.eq(1).val(n.r).end().eq(2).val(n.g).end().eq(3).val(n.b).end()},o=function(t,i){e(i).data("colorpicker").fields.eq(4).val(t.h).end().eq(5).val(t.s).end().eq(6).val(t.b).end()},r=function(t,i){e(i).data("colorpicker").fields.eq(0).val(H(t)).end()},a=function(t,i){e(i).data("colorpicker").selector.css("backgroundColor","#"+H({h:t.h,s:100,b:100})),e(i).data("colorpicker").selectorIndic.css({left:parseInt(150*t.s/100,10),top:parseInt(150*(100-t.b)/100,10)})},s=function(t,i){e(i).data("colorpicker").hue.css("top",parseInt(150-150*t.h/360,10))},l=function(t,i){e(i).data("colorpicker").currentColor.css("backgroundColor","#"+H(t))},d=function(t,i){e(i).data("colorpicker").newColor.css("backgroundColor","#"+H(t))},c=function(i){var n=i.charCode||i.keyCode||-1;if(n>t&&n<=90||32==n)return!1;!0===e(this).parent().parent().data("colorpicker").livePreview&&u.apply(this)},u=function(t){var i,l=e(this).parent().parent();this.parentNode.className.indexOf("_hex")>0?l.data("colorpicker").color=i=U(A(this.value)):this.parentNode.className.indexOf("_hsb")>0?l.data("colorpicker").color=i=N({h:parseInt(l.data("colorpicker").fields.eq(4).val(),10),s:parseInt(l.data("colorpicker").fields.eq(5).val(),10),b:parseInt(l.data("colorpicker").fields.eq(6).val(),10)}):l.data("colorpicker").color=i=L(_({r:parseInt(l.data("colorpicker").fields.eq(1).val(),10),g:parseInt(l.data("colorpicker").fields.eq(2).val(),10),b:parseInt(l.data("colorpicker").fields.eq(3).val(),10)})),t&&(n(i,l.get(0)),r(i,l.get(0)),o(i,l.get(0))),a(i,l.get(0)),s(i,l.get(0)),d(i,l.get(0)),l.data("colorpicker").onChange.apply(l,[i,H(i),W(i)])},p=function(t){e(this).parent().parent().data("colorpicker").fields.parent().removeClass("colorpicker_focus")},m=function(){t=this.parentNode.className.indexOf("_hex")>0?70:65,e(this).parent().parent().data("colorpicker").fields.parent().removeClass("colorpicker_focus"),e(this).parent().addClass("colorpicker_focus")},f=function(t){var i=e(this).parent().find("input").focus(),n={el:e(this).parent().addClass("colorpicker_slider"),max:this.parentNode.className.indexOf("_hsb_h")>0?360:this.parentNode.className.indexOf("_hsb")>0?100:255,y:t.pageY,field:i,val:parseInt(i.val(),10),preview:e(this).parent().parent().data("colorpicker").livePreview};e(document).bind("mouseup",n,v),e(document).bind("mousemove",n,h)},h=function(e){return e.data.field.val(Math.max(0,Math.min(e.data.max,parseInt(e.data.val+e.pageY-e.data.y,10)))),e.data.preview&&u.apply(e.data.field.get(0),[!0]),!1},v=function(t){return u.apply(t.data.field.get(0),[!0]),t.data.el.removeClass("colorpicker_slider").find("input").focus(),e(document).unbind("mouseup",v),e(document).unbind("mousemove",h),!1},g=function(t){var i={cal:e(this).parent(),y:e(this).offset().top};i.preview=i.cal.data("colorpicker").livePreview,e(document).bind("mouseup",i,b),e(document).bind("mousemove",i,T)},T=function(e){return u.apply(e.data.cal.data("colorpicker").fields.eq(4).val(parseInt(360*(150-Math.max(0,Math.min(150,e.pageY-e.data.y)))/150,10)).get(0),[e.data.preview]),!1},b=function(t){return n(t.data.cal.data("colorpicker").color,t.data.cal.get(0)),r(t.data.cal.data("colorpicker").color,t.data.cal.get(0)),e(document).unbind("mouseup",b),e(document).unbind("mousemove",T),!1},y=function(t){var i={cal:e(this).parent(),pos:e(this).offset()};i.preview=i.cal.data("colorpicker").livePreview,e(document).bind("mouseup",i,S),e(document).bind("mousemove",i,w)},w=function(e){return u.apply(e.data.cal.data("colorpicker").fields.eq(6).val(parseInt(100*(150-Math.max(0,Math.min(150,e.pageY-e.data.pos.top)))/150,10)).end().eq(5).val(parseInt(100*Math.max(0,Math.min(150,e.pageX-e.data.pos.left))/150,10)).get(0),[e.data.preview]),!1},S=function(t){return n(t.data.cal.data("colorpicker").color,t.data.cal.get(0)),r(t.data.cal.data("colorpicker").color,t.data.cal.get(0)),e(document).unbind("mouseup",S),e(document).unbind("mousemove",w),!1},E=function(t){e(this).addClass("colorpicker_focus")},k=function(t){e(this).removeClass("colorpicker_focus")},C=function(t){var i=e(this).parent(),n=i.data("colorpicker").color;i.data("colorpicker").origColor=n,l(n,i.get(0)),i.data("colorpicker").onSubmit(n,H(n),W(n),i.data("colorpicker").el)},M=function(t){var i=e("#"+e(this).data("colorpickerId"));i.data("colorpicker").onBeforeShow.apply(this,[i.get(0)]);var n=e(this).offset(),o=D(),r=n.top+this.offsetHeight,a=n.left;return r+176>o.t+o.h&&(r-=this.offsetHeight+176),a+356>o.l+o.w&&(a-=356),i.css({left:a+"px",top:r+"px"}),0!=i.data("colorpicker").onShow.apply(this,[i.get(0)])&&i.show(),e(document).bind("mousedown",{cal:i},I),!1},I=function(t){x(t.data.cal.get(0),t.target,t.data.cal.get(0))||(0!=t.data.cal.data("colorpicker").onHide.apply(this,[t.data.cal.get(0)])&&t.data.cal.hide(),e(document).unbind("mousedown",I))},x=function(e,t,i){if(e==t)return!0;if(e.contains)return e.contains(t);if(e.compareDocumentPosition)return!!(16&e.compareDocumentPosition(t));for(var n=t.parentNode;n&&n!=i;){if(n==e)return!0;n=n.parentNode}return!1},D=function(){var e="CSS1Compat"==document.compatMode;return{l:window.pageXOffset||(e?document.documentElement.scrollLeft:document.body.scrollLeft),t:window.pageYOffset||(e?document.documentElement.scrollTop:document.body.scrollTop),w:window.innerWidth||(e?document.documentElement.clientWidth:document.body.clientWidth),h:window.innerHeight||(e?document.documentElement.clientHeight:document.body.clientHeight)}},N=function(e){return{h:Math.min(360,Math.max(0,e.h)),s:Math.min(100,Math.max(0,e.s)),b:Math.min(100,Math.max(0,e.b))}},_=function(e){return{r:Math.min(255,Math.max(0,e.r)),g:Math.min(255,Math.max(0,e.g)),b:Math.min(255,Math.max(0,e.b))}},A=function(e){var t=6-e.length;if(t>0){for(var i=[],n=0;n<t;n++)i.push("0");i.push(e),e=i.join("")}return e},O=function(e){var e=parseInt(e.indexOf("#")>-1?e.substring(1):e,16);return{r:e>>16,g:(65280&e)>>8,b:255&e}},U=function(e){return L(O(e))},L=function(e){var t={h:0,s:0,b:0},i=Math.min(e.r,e.g,e.b),n=Math.max(e.r,e.g,e.b),o=n-i;return t.b=n,t.s=0!=n?255*o/n:0,0!=t.s?e.r==n?t.h=(e.g-e.b)/o:e.g==n?t.h=2+(e.b-e.r)/o:t.h=4+(e.r-e.g)/o:t.h=-1,t.h*=60,t.h<0&&(t.h+=360),t.s*=100/255,t.b*=100/255,t},W=function(e){var t={},i=Math.round(e.h),n=Math.round(255*e.s/100),o=Math.round(255*e.b/100);if(0==n)t.r=t.g=t.b=o;else{var r=o,a=(255-n)*o/255,s=i%60*(r-a)/60;360==i&&(i=0),i<60?(t.r=r,t.b=a,t.g=a+s):i<120?(t.g=r,t.b=a,t.r=r-s):i<180?(t.g=r,t.r=a,t.b=a+s):i<240?(t.b=r,t.r=a,t.g=r-s):i<300?(t.b=r,t.g=a,t.r=a+s):i<360?(t.r=r,t.g=a,t.b=r-s):(t.r=0,t.g=0,t.b=0)}return{r:Math.round(t.r),g:Math.round(t.g),b:Math.round(t.b)}},P=function(t){var i=[t.r.toString(16),t.g.toString(16),t.b.toString(16)];return e.each(i,function(e,t){1==t.length&&(i[e]="0"+t)}),i.join("")},H=function(e){return P(W(e))},R=function(){var t=e(this).parent(),i=t.data("colorpicker").origColor;t.data("colorpicker").color=i,n(i,t.get(0)),r(i,t.get(0)),o(i,t.get(0)),a(i,t.get(0)),s(i,t.get(0)),d(i,t.get(0))};return{init:function(t){if(t=e.extend({},i,t||{}),"string"==typeof t.color)t.color=U(t.color);else if(void 0!=t.color.r&&void 0!=t.color.g&&void 0!=t.color.b)t.color=L(t.color);else{if(void 0==t.color.h||void 0==t.color.s||void 0==t.color.b)return this;t.color=N(t.color)}return this.each(function(){if(!e(this).data("colorpickerId")){var i=e.extend({},t);i.origColor=t.color;var h="collorpicker_"+parseInt(1e3*Math.random());e(this).data("colorpickerId",h);var v=e('<div class="colorpicker"><div class="colorpicker_color"><div><div></div></div></div><div class="colorpicker_hue"><div></div></div><div class="colorpicker_new_color"></div><div class="colorpicker_current_color"></div><div class="colorpicker_hex"><input type="text" maxlength="6" size="6" /></div><div class="colorpicker_rgb_r colorpicker_field"><input type="text" maxlength="3" size="3" /><span></span></div><div class="colorpicker_rgb_g colorpicker_field"><input type="text" maxlength="3" size="3" /><span></span></div><div class="colorpicker_rgb_b colorpicker_field"><input type="text" maxlength="3" size="3" /><span></span></div><div class="colorpicker_hsb_h colorpicker_field"><input type="text" maxlength="3" size="3" /><span></span></div><div class="colorpicker_hsb_s colorpicker_field"><input type="text" maxlength="3" size="3" /><span></span></div><div class="colorpicker_hsb_b colorpicker_field"><input type="text" maxlength="3" size="3" /><span></span></div><div class="colorpicker_submit"></div></div>').attr("id",h);i.flat?v.appendTo(this).show():v.appendTo(document.body),i.fields=v.find("input").bind("keyup",c).bind("change",u).bind("blur",p).bind("focus",m),v.find("span").bind("mousedown",f).end().find(">div.colorpicker_current_color").bind("click",R),i.selector=v.find("div.colorpicker_color").bind("mousedown",y),i.selectorIndic=i.selector.find("div div"),i.el=this,i.hue=v.find("div.colorpicker_hue div"),v.find("div.colorpicker_hue").bind("mousedown",g),i.newColor=v.find("div.colorpicker_new_color"),i.currentColor=v.find("div.colorpicker_current_color"),v.data("colorpicker",i),v.find("div.colorpicker_submit").bind("mouseenter",E).bind("mouseleave",k).bind("click",C),n(i.color,v.get(0)),o(i.color,v.get(0)),r(i.color,v.get(0)),s(i.color,v.get(0)),a(i.color,v.get(0)),l(i.color,v.get(0)),d(i.color,v.get(0)),i.flat?v.css({position:"relative",display:"block"}):e(this).bind(i.eventName,M)}})},showPicker:function(){return this.each(function(){e(this).data("colorpickerId")&&M.apply(this)})},hidePicker:function(){return this.each(function(){e(this).data("colorpickerId")&&e("#"+e(this).data("colorpickerId")).hide()})},setColor:function(t){if("string"==typeof t)t=U(t);else if(void 0!=t.r&&void 0!=t.g&&void 0!=t.b)t=L(t);else{if(void 0==t.h||void 0==t.s||void 0==t.b)return this;t=N(t)}return this.each(function(){if(e(this).data("colorpickerId")){var i=e("#"+e(this).data("colorpickerId"));i.data("colorpicker").color=t,i.data("colorpicker").origColor=t,n(t,i.get(0)),o(t,i.get(0)),r(t,i.get(0)),s(t,i.get(0)),a(t,i.get(0)),l(t,i.get(0)),d(t,i.get(0))}})}}}();e.fn.extend({ColorPicker:t.init,ColorPickerHide:t.hidePicker,ColorPickerShow:t.showPicker,ColorPickerSetColor:t.setColor})}(e)}).call(t,i(0))},function(e,t){}]);