PageSourceSearch

https://bistum-augsburg.de/js/532fab0.js?v1789122841

js bistum-augsburg.de collected 2026-09-24 21:09:40 UTC 1,395,658 bytes, 16,433 lines download raw bytes

1/*! jQuery v1.10.2 | (c) 2005, 2013 jQuery Foundation, Inc. | jquery.org/license
vendor: 92,984 bytes, lines 1-5
1
2*/
3(function(e,t){var n,r,i=typeof t,o=e.location,a=e.document,s=a.documentElement,l=e.jQuery,u=e.$,c={},p=[],f="1.10.2",d=p.concat,h=p.push,g=p.slice,m=p.indexOf,y=c.toString,v=c.hasOwnProperty,b=f.trim,x=function(e,t){return new x.fn.init(e,t,r)},w=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,T=/\S+/g,C=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,N=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,k=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,E=/^[\],:{}\s]*$/,S=/(?:^|:|,)(?:\s*\[)+/g,A=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,j=/"[^"\\\r\n]*"|true|false|null|-?(?:\d+\.|)\d+(?:[eE][+-]?\d+|)/g,D=/^-ms-/,L=/-([\da-z])/gi,H=function(e,t){return t.toUpperCase()},q=function(e){(a.addEventListener||"load"===e.type||"complete"===a.readyState)&&(_(),x.ready())},_=function(){a.addEventListener?(a.removeEventListener("DOMContentLoaded",q,!1),e.removeEventListener("load",q,!1)):(a.detachEvent("onreadystatechange",q),e.detachEvent("onload",q))};x.fn=x.prototype={jquery:f,constructor:x,init:function(e,n,r){var i,o;if(!e)return this;if("string"==typeof e){if(i="<"===e.charAt(0)&&">"===e.charAt(e.length-1)&&e.length>=3?[null,e,null]:N.exec(e),!i||!i[1]&&n)return!n||n.jquery?(n||r).find(e):this.constructor(n).find(e);if(i[1]){if(n=n instanceof x?n[0]:n,x.merge(this,x.parseHTML(i[1],n&&n.nodeType?n.ownerDocument||n:a,!0)),k.test(i[1])&&x.isPlainObject(n))for(i in n)x.isFunction(this[i])?this[i](n[i]):this.attr(i,n[i]);return this}if(o=a.getElementById(i[2]),o&&o.parentNode){if(o.id!==i[2])return r.find(e);this.length=1,this[0]=o}return this.context=a,this.selector=e,this}return e.nodeType?(this.context=this[0]=e,this.length=1,this):x.isFunction(e)?r.ready(e):(e.selector!==t&&(this.selector=e.selector,this.context=e.context),x.makeArray(e,this))},selector:"",length:0,toArray:function(){return g.call(this)},get:function(e){return null==e?this.toArray():0>e?this[this.length+e]:this[e]},pushStack:function(e){var t=x.merge(this.constructor(),e);return t.prevObject=this,t.context=this.context,t},each:function(e,t){return x.each(this,e,t)},ready:function(e){return x.ready.promise().done(e),this},slice:function(){return this.pushStack(g.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(0>e?t:0);return this.pushStack(n>=0&&t>n?[this[n]]:[])},map:function(e){return this.pushStack(x.map(this,function(t,n){return e.call(t,n,t)}))},end:function(){return this.prevObject||this.constructor(null)},push:h,sort:[].sort,splice:[].splice},x.fn.init.prototype=x.fn,x.extend=x.fn.extend=function(){var e,n,r,i,o,a,s=arguments[0]||{},l=1,u=arguments.length,c=!1;for("boolean"==typeof s&&(c=s,s=arguments[1]||{},l=2),"object"==typeof s||x.isFunction(s)||(s={}),u===l&&(s=this,--l);u>l;l++)if(null!=(o=arguments[l]))for(i in o)e=s[i],r=o[i],s!==r&&(c&&r&&(x.isPlainObject(r)||(n=x.isArray(r)))?(n?(n=!1,a=e&&x.isArray(e)?e:[]):a=e&&x.isPlainObject(e)?e:{},s[i]=x.extend(c,a,r)):r!==t&&(s[i]=r));return s},x.extend({expando:"jQuery"+(f+Math.random()).replace(/\D/g,""),noConflict:function(t){return e.$===x&&(e.$=u),t&&e.jQuery===x&&(e.jQuery=l),x},isReady:!1,readyWait:1,holdReady:function(e){e?x.readyWait++:x.ready(!0)},ready:function(e){if(e===!0?!--x.readyWait:!x.isReady){if(!a.body)return setTimeout(x.ready);x.isReady=!0,e!==!0&&--x.readyWait>0||(n.resolveWith(a,[x]),x.fn.trigger&&x(a).trigger("ready").off("ready"))}},isFunction:function(e){return"function"===x.type(e)},isArray:Array.isArray||function(e){return"array"===x.type(e)},isWindow:function(e){return null!=e&&e==e.window},isNumeric:function(e){return!isNaN(parseFloat(e))&&isFinite(e)},type:function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?c[y.call(e)]||"object":typeof e},isPlainObject:function(e){var n;if(!e||"object"!==x.type(e)||e.nodeType||x.isWindow(e))return!1;try{if(e.constructor&&!v.call(e,"constructor")&&!v.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(r){return!1}if(x.support.ownLast)for(n in e)return v.call(e,n);for(n in e);return n===t||v.call(e,n)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},error:function(e){throw Error(e)},parseHTML:function(e,t,n){if(!e||"string"!=typeof e)return null;"boolean"==typeof t&&(n=t,t=!1),t=t||a;var r=k.exec(e),i=!n&&[];return r?[t.createElement(r[1])]:(r=x.buildFragment([e],t,i),i&&x(i).remove(),x.merge([],r.childNodes))},parseJSON:function(n){return e.JSON&&e.JSON.parse?e.JSON.parse(n):null===n?n:"string"==typeof n&&(n=x.trim(n),n&&E.test(n.replace(A,"@").replace(j,"]").replace(S,"")))?Function("return "+n)():(x.error("Invalid JSON: "+n),t)},parseXML:function(n){var r,i;if(!n||"string"!=typeof n)return null;try{e.DOMParser?(i=new DOMParser,r=i.parseFromString(n,"text/xml")):(r=new ActiveXObject("Microsoft.XMLDOM"),r.async="false",r.loadXML(n))}catch(o){r=t}return r&&r.documentElement&&!r.getElementsByTagName("parsererror").length||x.error("Invalid XML: "+n),r},noop:function(){},globalEval:function(t){t&&x.trim(t)&&(e.execScript||function(t){e.eval.call(e,t)})(t)},camelCase:function(e){return e.replace(D,"ms-").replace(L,H)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,t,n){var r,i=0,o=e.length,a=M(e);if(n){if(a){for(;o>i;i++)if(r=t.apply(e[i],n),r===!1)break}else for(i in e)if(r=t.apply(e[i],n),r===!1)break}else if(a){for(;o>i;i++)if(r=t.call(e[i],i,e[i]),r===!1)break}else for(i in e)if(r=t.call(e[i],i,e[i]),r===!1)break;return e},trim:b&&!b.call("\ufeff\u00a0")?function(e){return null==e?"":b.call(e)}:function(e){return null==e?"":(e+"").replace(C,"")},makeArray:function(e,t){var n=t||[];return null!=e&&(M(Object(e))?x.merge(n,"string"==typeof e?[e]:e):h.call(n,e)),n},inArray:function(e,t,n){var r;if(t){if(m)return m.call(t,e,n);for(r=t.length,n=n?0>n?Math.max(0,r+n):n:0;r>n;n++)if(n in t&&t[n]===e)return n}return-1},merge:function(e,n){var r=n.length,i=e.length,o=0;if("number"==typeof r)for(;r>o;o++)e[i++]=n[o];else while(n[o]!==t)e[i++]=n[o++];return e.length=i,e},grep:function(e,t,n){var r,i=[],o=0,a=e.length;for(n=!!n;a>o;o++)r=!!t(e[o],o),n!==r&&i.push(e[o]);return i},map:function(e,t,n){var r,i=0,o=e.length,a=M(e),s=[];if(a)for(;o>i;i++)r=t(e[i],i,n),null!=r&&(s[s.length]=r);else for(i in e)r=t(e[i],i,n),null!=r&&(s[s.length]=r);return d.apply([],s)},guid:1,proxy:function(e,n){var r,i,o;return"string"==typeof n&&(o=e[n],n=e,e=o),x.isFunction(e)?(r=g.call(arguments,2),i=function(){return e.apply(n||this,r.concat(g.call(arguments)))},i.guid=e.guid=e.guid||x.guid++,i):t},access:function(e,n,r,i,o,a,s){var l=0,u=e.length,c=null==r;if("object"===x.type(r)){o=!0;for(l in r)x.access(e,n,l,r[l],!0,a,s)}else if(i!==t&&(o=!0,x.isFunction(i)||(s=!0),c&&(s?(n.call(e,i),n=null):(c=n,n=function(e,t,n){return c.call(x(e),n)})),n))for(;u>l;l++)n(e[l],r,s?i:i.call(e[l],l,n(e[l],r)));return o?e:c?n.call(e):u?n(e[0],r):a},now:function(){return(new Date).getTime()},swap:function(e,t,n,r){var i,o,a={};for(o in t)a[o]=e.style[o],e.style[o]=t[o];i=n.apply(e,r||[]);for(o in t)e.style[o]=a[o];return i}}),x.ready.promise=function(t){if(!n)if(n=x.Deferred(),"complete"===a.readyState)setTimeout(x.ready);else if(a.addEventListener)a.addEventListener("DOMContentLoaded",q,!1),e.addEventListener("load",q,!1);else{a.attachEvent("onreadystatechange",q),e.attachEvent("onload",q);var r=!1;try{r=null==e.frameElement&&a.documentElement}catch(i){}r&&r.doScroll&&function o(){if(!x.isReady){try{r.doScroll("left")}catch(e){return setTimeout(o,50)}_(),x.ready()}}()}return n.promise(t)},x.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(e,t){c["[object "+t+"]"]=t.toLowerCase()});function M(e){var t=e.length,n=x.type(e);return x.isWindow(e)?!1:1===e.nodeType&&t?!0:"array"===n||"function"!==n&&(0===t||"number"==typeof t&&t>0&&t-1 in e)}r=x(a),function(e,t){var n,r,i,o,a,s,l,u,c,p,f,d,h,g,m,y,v,b="sizzle"+-new Date,w=e.document,T=0,C=0,N=st(),k=st(),E=st(),S=!1,A=function(e,t){return e===t?(S=!0,0):0},j=typeof t,D=1<<31,L={}.hasOwnProperty,H=[],q=H.pop,_=H.push,M=H.push,O=H.slice,F=H.indexOf||function(e){var t=0,n=this.length;for(;n>t;t++)if(this[t]===e)return t;return-1},B="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",P="[\\x20\\t\\r\\n\\f]",R="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",W=R.replace("w","w#"),$="\\["+P+"*("+R+")"+P+"*(?:([*^$|!~]?=)"+P+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+W+")|)|)"+P+"*\\]",I=":("+R+")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|"+$.replace(3,8)+")*)|.*)\\)|)",z=RegExp("^"+P+"+|((?:^|[^\\\\])(?:\\\\.)*)"+P+"+$","g"),X=RegExp("^"+P+"*,"+P+"*"),U=RegExp("^"+P+"*([>+~]|"+P+")"+P+"*"),V=RegExp(P+"*[+~]"),Y=RegExp("="+P+"*([^\\]'\"]*)"+P+"*\\]","g"),J=RegExp(I),G=RegExp("^"+W+"$"),Q={ID:RegExp("^#("+R+")"),CLASS:RegExp("^\\.("+R+")"),TAG:RegExp("^("+R.replace("w","w*")+")"),ATTR:RegExp("^"+$),PSEUDO:RegExp("^"+I),CHILD:RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+P+"*(even|odd|(([+-]|)(\\d*)n|)"+P+"*(?:([+-]|)"+P+"*(\\d+)|))"+P+"*\\)|)","i"),bool:RegExp("^(?:"+B+")$","i"),needsContext:RegExp("^"+P+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+P+"*((?:-\\d)?\\d*)"+P+"*\\)|)(?=[^-]|$)","i")},K=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,et=/^(?:input|select|textarea|button)$/i,tt=/^h\d$/i,nt=/'|\\/g,rt=RegExp("\\\\([\\da-f]{1,6}"+P+"?|("+P+")|.)","ig"),it=function(e,t,n){var r="0x"+t-65536;return r!==r||n?t:0>r?String.fromCharCode(r+65536):String.fromCharCode(55296|r>>10,56320|1023&r)};try{M.apply(H=O.call(w.childNodes),w.childNodes),H[w.childNodes.length].nodeType}catch(ot){M={apply:H.length?function(e,t){_.apply(e,O.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function at(e,t,n,i){var o,a,s,l,u,c,d,m,y,x;if((t?t.ownerDocument||t:w)!==f&&p(t),t=t||f,n=n||[],!e||"string"!=typeof e)return n;if(1!==(l=t.nodeType)&&9!==l)return[];if(h&&!i){if(o=Z.exec(e))if(s=o[1]){if(9===l){if(a=t.getElementById(s),!a||!a.parentNode)return n;if(a.id===s)return n.push(a),n}else if(t.ownerDocument&&(a=t.ownerDocument.getElementById(s))&&v(t,a)&&a.id===s)return n.push(a),n}else{if(o[2])return M.apply(n,t.getElementsByTagName(e)),n;if((s=o[3])&&r.getElementsByClassName&&t.getElementsByClassName)return M.apply(n,t.getElementsByClassName(s)),n}if(r.qsa&&(!g||!g.test(e))){if(m=d=b,y=t,x=9===l&&e,1===l&&"object"!==t.nodeName.toLowerCase()){c=mt(e),(d=t.getAttribute("id"))?m=d.replace(nt,"\\$&"):t.setAttribute("id",m),m="[id='"+m+"'] ",u=c.length;while(u--)c[u]=m+yt(c[u]);y=V.test(e)&&t.parentNode||t,x=c.join(",")}if(x)try{return M.apply(n,y.querySelectorAll(x)),n}catch(T){}finally{d||t.removeAttribute("id")}}}return kt(e.replace(z,"$1"),t,n,i)}function st(){var e=[];function t(n,r){return e.push(n+=" ")>o.cacheLength&&delete t[e.shift()],t[n]=r}return t}function lt(e){return e[b]=!0,e}function ut(e){var t=f.createElement("div");try{return!!e(t)}catch(n){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function ct(e,t){var n=e.split("|"),r=e.length;while(r--)o.attrHandle[n[r]]=t}function pt(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&(~t.sourceIndex||D)-(~e.sourceIndex||D);if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function ft(e){return function(t){var n=t.nodeName.toLowerCase();return"input"===n&&t.type===e}}function dt(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function ht(e){return lt(function(t){return t=+t,lt(function(n,r){var i,o=e([],n.length,t),a=o.length;while(a--)n[i=o[a]]&&(n[i]=!(r[i]=n[i]))})})}s=at.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return t?"HTML"!==t.nodeName:!1},r=at.support={},p=at.setDocument=function(e){var n=e?e.ownerDocument||e:w,i=n.defaultView;return n!==f&&9===n.nodeType&&n.documentElement?(f=n,d=n.documentElement,h=!s(n),i&&i.attachEvent&&i!==i.top&&i.attachEvent("onbeforeunload",function(){p()}),r.attributes=ut(function(e){return e.className="i",!e.getAttribute("className")}),r.getElementsByTagName=ut(function(e){return e.appendChild(n.createComment("")),!e.getElementsByTagName("*").length}),r.getElementsByClassName=ut(function(e){return e.innerHTML="<div class='a'></div><div class='a i'></div>",e.firstChild.className="i",2===e.getElementsByClassName("i").length}),r.getById=ut(function(e){return d.appendChild(e).id=b,!n.getElementsByName||!n.getElementsByName(b).length}),r.getById?(o.find.ID=function(e,t){if(typeof t.getElementById!==j&&h){var n=t.getElementById(e);return n&&n.parentNode?[n]:[]}},o.filter.ID=function(e){var t=e.replace(rt,it);return function(e){return e.getAttribute("id")===t}}):(delete o.find.ID,o.filter.ID=function(e){var t=e.replace(rt,it);return function(e){var n=typeof e.getAttributeNode!==j&&e.getAttributeNode("id");return n&&n.value===t}}),o.find.TAG=r.getElementsByTagName?function(e,n){return typeof n.getElementsByTagName!==j?n.getElementsByTagName(e):t}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},o.find.CLASS=r.getElementsByClassName&&function(e,n){return typeof n.getElementsByClassName!==j&&h?n.getElementsByClassName(e):t},m=[],g=[],(r.qsa=K.test(n.querySelectorAll))&&(ut(function(e){e.innerHTML="<select><option selected=''></option></select>",e.querySelectorAll("[selected]").length||g.push("\\["+P+"*(?:value|"+B+")"),e.querySelectorAll(":checked").length||g.push(":checked")}),ut(function(e){var t=n.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("t",""),e.querySelectorAll("[t^='']").length&&g.push("[*^$]="+P+"*(?:''|\"\")"),e.querySelectorAll(":enabled").length||g.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),g.push(",.*:")})),(r.matchesSelector=K.test(y=d.webkitMatchesSelector||d.mozMatchesSelector||d.oMatchesSelector||d.msMatchesSelector))&&ut(function(e){r.disconnectedMatch=y.call(e,"div"),y.call(e,"[s!='']:x"),m.push("!=",I)}),g=g.length&&RegExp(g.join("|")),m=m.length&&RegExp(m.join("|")),v=K.test(d.contains)||d.compareDocumentPosition?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},A=d.compareDocumentPosition?function(e,t){if(e===t)return S=!0,0;var i=t.compareDocumentPosition&&e.compareDocumentPosition&&e.compareDocumentPosition(t);return i?1&i||!r.sortDetached&&t.compareDocumentPosition(e)===i?e===n||v(w,e)?-1:t===n||v(w,t)?1:c?F.call(c,e)-F.call(c,t):0:4&i?-1:1:e.compareDocumentPosition?-1:1}:function(e,t){var r,i=0,o=e.parentNode,a=t.parentNode,s=[e],l=[t];if(e===t)return S=!0,0;if(!o||!a)return e===n?-1:t===n?1:o?-1:a?1:c?F.call(c,e)-F.call(c,t):0;if(o===a)return pt(e,t);r=e;while(r=r.parentNode)s.unshift(r);r=t;while(r=r.parentNode)l.unshift(r);while(s[i]===l[i])i++;return i?pt(s[i],l[i]):s[i]===w?-1:l[i]===w?1:0},n):f},at.matches=function(e,t){return at(e,null,null,t)},at.matchesSelector=function(e,t){if((e.ownerDocument||e)!==f&&p(e),t=t.replace(Y,"='$1']"),!(!r.matchesSelector||!h||m&&m.test(t)||g&&g.test(t)))try{var n=y.call(e,t);if(n||r.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(i){}return at(t,f,null,[e]).length>0},at.contains=function(e,t){return(e.ownerDocument||e)!==f&&p(e),v(e,t)},at.attr=function(e,n){(e.ownerDocument||e)!==f&&p(e);var i=o.attrHandle[n.toLowerCase()],a=i&&L.call(o.attrHandle,n.toLowerCase())?i(e,n,!h):t;return a===t?r.attributes||!h?e.getAttribute(n):(a=e.getAttributeNode(n))&&a.specified?a.value:null:a},at.error=function(e){throw Error("Syntax error, unrecognized expression: "+e)},at.uniqueSort=function(e){var t,n=[],i=0,o=0;if(S=!r.detectDuplicates,c=!r.sortStable&&e.slice(0),e.sort(A),S){while(t=e[o++])t===e[o]&&(i=n.push(o));while(i--)e.splice(n[i],1)}return e},a=at.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=a(e)}else if(3===i||4===i)return e.nodeValue}else for(;t=e[r];r++)n+=a(t);return n},o=at.selectors={cacheLength:50,createPseudo:lt,match:Q,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(rt,it),e[3]=(e[4]||e[5]||"").replace(rt,it),"~="===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]||at.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]&&at.error(e[0]),e},PSEUDO:function(e){var n,r=!e[5]&&e[2];return Q.CHILD.test(e[0])?null:(e[3]&&e[4]!==t?e[2]=e[4]:r&&J.test(r)&&(n=mt(r,!0))&&(n=r.indexOf(")",r.length-n)-r.length)&&(e[0]=e[0].slice(0,n),e[2]=r.slice(0,n)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(rt,it).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=N[e+" "];return t||(t=RegExp("(^|"+P+")"+e+"("+P+"|$)"))&&N(e,function(e){return t.test("string"==typeof e.className&&e.className||typeof e.getAttribute!==j&&e.getAttribute("class")||"")})},ATTR:function(e,t,n){return function(r){var i=at.attr(r,e);return null==i?"!="===t:t?(i+="","="===t?i===n:"!="===t?i!==n:"^="===t?n&&0===i.indexOf(n):"*="===t?n&&i.indexOf(n)>-1:"$="===t?n&&i.slice(-n.length)===n:"~="===t?(" "+i+" ").indexOf(n)>-1:"|="===t?i===n||i.slice(0,n.length+1)===n+"-":!1):!0}},CHILD:function(e,t,n,r,i){var o="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,l){var u,c,p,f,d,h,g=o!==a?"nextSibling":"previousSibling",m=t.parentNode,y=s&&t.nodeName.toLowerCase(),v=!l&&!s;if(m){if(o){while(g){p=t;while(p=p[g])if(s?p.nodeName.toLowerCase()===y:1===p.nodeType)return!1;h=g="only"===e&&!h&&"nextSibling"}return!0}if(h=[a?m.firstChild:m.lastChild],a&&v){c=m[b]||(m[b]={}),u=c[e]||[],d=u[0]===T&&u[1],f=u[0]===T&&u[2],p=d&&m.childNodes[d];while(p=++d&&p&&p[g]||(f=d=0)||h.pop())if(1===p.nodeType&&++f&&p===t){c[e]=[T,d,f];break}}else if(v&&(u=(t[b]||(t[b]={}))[e])&&u[0]===T)f=u[1];else while(p=++d&&p&&p[g]||(f=d=0)||h.pop())if((s?p.nodeName.toLowerCase()===y:1===p.nodeType)&&++f&&(v&&((p[b]||(p[b]={}))[e]=[T,f]),p===t))break;return f-=i,f===r||0===f%r&&f/r>=0}}},PSEUDO:function(e,t){var n,r=o.pseudos[e]||o.setFilters[e.toLowerCase()]||at.error("unsupported pseudo: "+e);return r[b]?r(t):r.length>1?(n=[e,e,"",t],o.setFilters.hasOwnProperty(e.toLowerCase())?lt(function(e,n){var i,o=r(e,t),a=o.length;while(a--)i=F.call(e,o[a]),e[i]=!(n[i]=o[a])}):function(e){return r(e,0,n)}):r}},pseudos:{not:lt(function(e){var t=[],n=[],r=l(e.replace(z,"$1"));return r[b]?lt(function(e,t,n,i){var o,a=r(e,null,i,[]),s=e.length;while(s--)(o=a[s])&&(e[s]=!(t[s]=o))}):function(e,i,o){return t[0]=e,r(t,null,o,n),!n.pop()}}),has:lt(function(e){return function(t){return at(e,t).length>0}}),contains:lt(function(e){return function(t){return(t.textContent||t.innerText||a(t)).indexOf(e)>-1}}),lang:lt(function(e){return G.test(e||"")||at.error("unsupported lang: "+e),e=e.replace(rt,it).toLowerCase(),function(t){var n;do if(n=h?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return n=n.toLowerCase(),n===e||0===n.indexOf(e+"-");while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===d},focus:function(e){return e===f.activeElement&&(!f.hasFocus||f.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return e.disabled===!1},disabled:function(e){return e.disabled===!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,e.selected===!0},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeName>"@"||3===e.nodeType||4===e.nodeType)return!1;return!0},parent:function(e){return!o.pseudos.empty(e)},header:function(e){return tt.test(e.nodeName)},input:function(e){return et.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"))||t.toLowerCase()===e.type)},first:ht(function(){return[0]}),last:ht(function(e,t){return[t-1]}),eq:ht(function(e,t,n){return[0>n?n+t:n]}),even:ht(function(e,t){var n=0;for(;t>n;n+=2)e.push(n);return e}),odd:ht(function(e,t){var n=1;for(;t>n;n+=2)e.push(n);return e}),lt:ht(function(e,t,n){var r=0>n?n+t:n;for(;--r>=0;)e.push(r);return e}),gt:ht(function(e,t,n){var r=0>n?n+t:n;for(;t>++r;)e.push(r);return e})}},o.pseudos.nth=o.pseudos.eq;for(n in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})o.pseudos[n]=ft(n);for(n in{submit:!0,reset:!0})o.pseudos[n]=dt(n);function gt(){}gt.prototype=o.filters=o.pseudos,o.setFilters=new gt;function mt(e,t){var n,r,i,a,s,l,u,c=k[e+" "];if(c)return t?0:c.slice(0);s=e,l=[],u=o.preFilter;while(s){(!n||(r=X.exec(s)))&&(r&&(s=s.slice(r[0].length)||s),l.push(i=[])),n=!1,(r=U.exec(s))&&(n=r.shift(),i.push({value:n,type:r[0].replace(z," ")}),s=s.slice(n.length));for(a in o.filter)!(r=Q[a].exec(s))||u[a]&&!(r=u[a](r))||(n=r.shift(),i.push({value:n,type:a,matches:r}),s=s.slice(n.length));if(!n)break}return t?s.length:s?at.error(e):k(e,l).slice(0)}function yt(e){var t=0,n=e.length,r="";for(;n>t;t++)r+=e[t].value;return r}function vt(e,t,n){var r=t.dir,o=n&&"parentNode"===r,a=C++;return t.first?function(t,n,i){while(t=t[r])if(1===t.nodeType||o)return e(t,n,i)}:function(t,n,s){var l,u,c,p=T+" "+a;if(s){while(t=t[r])if((1===t.nodeType||o)&&e(t,n,s))return!0}else while(t=t[r])if(1===t.nodeType||o)if(c=t[b]||(t[b]={}),(u=c[r])&&u[0]===p){if((l=u[1])===!0||l===i)return l===!0}else if(u=c[r]=[p],u[1]=e(t,n,s)||i,u[1]===!0)return!0}}function bt(e){return e.length>1?function(t,n,r){var i=e.length;while(i--)if(!e[i](t,n,r))return!1;return!0}:e[0]}function xt(e,t,n,r,i){var o,a=[],s=0,l=e.length,u=null!=t;for(;l>s;s++)(o=e[s])&&(!n||n(o,r,i))&&(a.push(o),u&&t.push(s));return a}function wt(e,t,n,r,i,o){return r&&!r[b]&&(r=wt(r)),i&&!i[b]&&(i=wt(i,o)),lt(function(o,a,s,l){var u,c,p,f=[],d=[],h=a.length,g=o||Nt(t||"*",s.nodeType?[s]:s,[]),m=!e||!o&&t?g:xt(g,f,e,s,l),y=n?i||(o?e:h||r)?[]:a:m;if(n&&n(m,y,s,l),r){u=xt(y,d),r(u,[],s,l),c=u.length;while(c--)(p=u[c])&&(y[d[c]]=!(m[d[c]]=p))}if(o){if(i||e){if(i){u=[],c=y.length;while(c--)(p=y[c])&&u.push(m[c]=p);i(null,y=[],u,l)}c=y.length;while(c--)(p=y[c])&&(u=i?F.call(o,p):f[c])>-1&&(o[u]=!(a[u]=p))}}else y=xt(y===a?y.splice(h,y.length):y),i?i(null,a,y,l):M.apply(a,y)})}function Tt(e){var t,n,r,i=e.length,a=o.relative[e[0].type],s=a||o.relative[" "],l=a?1:0,c=vt(function(e){return e===t},s,!0),p=vt(function(e){return F.call(t,e)>-1},s,!0),f=[function(e,n,r){return!a&&(r||n!==u)||((t=n).nodeType?c(e,n,r):p(e,n,r))}];for(;i>l;l++)if(n=o.relative[e[l].type])f=[vt(bt(f),n)];else{if(n=o.filter[e[l].type].apply(null,e[l].matches),n[b]){for(r=++l;i>r;r++)if(o.relative[e[r].type])break;return wt(l>1&&bt(f),l>1&&yt(e.slice(0,l-1).concat({value:" "===e[l-2].type?"*":""})).replace(z,"$1"),n,r>l&&Tt(e.slice(l,r)),i>r&&Tt(e=e.slice(r)),i>r&&yt(e))}f.push(n)}return bt(f)}function Ct(e,t){var n=0,r=t.length>0,a=e.length>0,s=function(s,l,c,p,d){var h,g,m,y=[],v=0,b="0",x=s&&[],w=null!=d,C=u,N=s||a&&o.find.TAG("*",d&&l.parentNode||l),k=T+=null==C?1:Math.random()||.1;for(w&&(u=l!==f&&l,i=n);null!=(h=N[b]);b++){if(a&&h){g=0;while(m=e[g++])if(m(h,l,c)){p.push(h);break}w&&(T=k,i=++n)}r&&((h=!m&&h)&&v--,s&&x.push(h))}if(v+=b,r&&b!==v){g=0;while(m=t[g++])m(x,y,l,c);if(s){if(v>0)while(b--)x[b]||y[b]||(y[b]=q.call(p));y=xt(y)}M.apply(p,y),w&&!s&&y.length>0&&v+t.length>1&&at.uniqueSort(p)}return w&&(T=k,u=C),x};return r?lt(s):s}l=at.compile=function(e,t){var n,r=[],i=[],o=E[e+" "];if(!o){t||(t=mt(e)),n=t.length;while(n--)o=Tt(t[n]),o[b]?r.push(o):i.push(o);o=E(e,Ct(i,r))}return o};function Nt(e,t,n){var r=0,i=t.length;for(;i>r;r++)at(e,t[r],n);return n}function kt(e,t,n,i){var a,s,u,c,p,f=mt(e);if(!i&&1===f.length){if(s=f[0]=f[0].slice(0),s.length>2&&"ID"===(u=s[0]).type&&r.getById&&9===t.nodeType&&h&&o.relative[s[1].type]){if(t=(o.find.ID(u.matches[0].replace(rt,it),t)||[])[0],!t)return n;e=e.slice(s.shift().value.length)}a=Q.needsContext.test(e)?0:s.length;while(a--){if(u=s[a],o.relative[c=u.type])break;if((p=o.find[c])&&(i=p(u.matches[0].replace(rt,it),V.test(s[0].type)&&t.parentNode||t))){if(s.splice(a,1),e=i.length&&yt(s),!e)return M.apply(n,i),n;break}}}return l(e,f)(i,t,!h,n,V.test(e)),n}r.sortStable=b.split("").sort(A).join("")===b,r.detectDuplicates=S,p(),r.sortDetached=ut(function(e){return 1&e.compareDocumentPosition(f.createElement("div"))}),ut(function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")})||ct("type|href|height|width",function(e,n,r){return r?t:e.getAttribute(n,"type"===n.toLowerCase()?1:2)}),r.attributes&&ut(function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||ct("value",function(e,n,r){return r||"input"!==e.nodeName.toLowerCase()?t:e.defaultValue}),ut(function(e){return null==e.getAttribute("disabled")})||ct(B,function(e,n,r){var i;return r?t:(i=e.getAttributeNode(n))&&i.specified?i.value:e[n]===!0?n.toLowerCase():null}),x.find=at,x.expr=at.selectors,x.expr[":"]=x.expr.pseudos,x.unique=at.uniqueSort,x.text=at.getText,x.isXMLDoc=at.isXML,x.contains=at.contains}(e);var O={};function F(e){var t=O[e]={};return x.each(e.match(T)||[],function(e,n){t[n]=!0}),t}x.Callbacks=function(e){e="string"==typeof e?O[e]||F(e):x.extend({},e);var n,r,i,o,a,s,l=[],u=!e.once&&[],c=function(t){for(r=e.memory&&t,i=!0,a=s||0,s=0,o=l.length,n=!0;l&&o>a;a++)if(l[a].apply(t[0],t[1])===!1&&e.stopOnFalse){r=!1;break}n=!1,l&&(u?u.length&&c(u.shift()):r?l=[]:p.disable())},p={add:function(){if(l){var t=l.length;(function i(t){x.each(t,function(t,n){var r=x.type(n);"function"===r?e.unique&&p.has(n)||l.push(n):n&&n.length&&"string"!==r&&i(n)})})(arguments),n?o=l.length:r&&(s=t,c(r))}return this},remove:function(){return l&&x.each(arguments,function(e,t){var r;while((r=x.inArray(t,l,r))>-1)l.splice(r,1),n&&(o>=r&&o--,a>=r&&a--)}),this},has:function(e){return e?x.inArray(e,l)>-1:!(!l||!l.length)},empty:function(){return l=[],o=0,this},disable:function(){return l=u=r=t,this},disabled:function(){return!l},lock:function(){return u=t,r||p.disable(),this},locked:function(){return!u},fireWith:function(e,t){return!l||i&&!u||(t=t||[],t=[e,t.slice?t.slice():t],n?u.push(t):c(t)),this},fire:function(){return p.fireWith(this,arguments),this},fired:function(){return!!i}};return p},x.extend({Deferred:function(e){var t=[["resolve","done",x.Callbacks("once memory"),"resolved"],["reject","fail",x.Callbacks("once memory"),"rejected"],["notify","progress",x.Callbacks("memory")]],n="pending",r={state:function(){return n},always:function(){return i.done(arguments).fail(arguments),this},then:function(){var e=arguments;return x.Deferred(function(n){x.each(t,function(t,o){var a=o[0],s=x.isFunction(e[t])&&e[t];i[o[1]](function(){var e=s&&s.apply(this,arguments);e&&x.isFunction(e.promise)?e.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[a+"With"](this===r?n.promise():this,s?[e]:arguments)})}),e=null}).promise()},promise:function(e){return null!=e?x.extend(e,r):r}},i={};return r.pipe=r.then,x.each(t,function(e,o){var a=o[2],s=o[3];r[o[1]]=a.add,s&&a.add(function(){n=s},t[1^e][2].disable,t[2][2].lock),i[o[0]]=function(){return i[o[0]+"With"](this===i?r:this,arguments),this},i[o[0]+"With"]=a.fireWith}),r.promise(i),e&&e.call(i,i),i},when:function(e){var t=0,n=g.call(arguments),r=n.length,i=1!==r||e&&x.isFunction(e.promise)?r:0,o=1===i?e:x.Deferred(),a=function(e,t,n){return function(r){t[e]=this,n[e]=arguments.length>1?g.call(arguments):r,n===s?o.notifyWith(t,n):--i||o.resolveWith(t,n)}},s,l,u;if(r>1)for(s=Array(r),l=Array(r),u=Array(r);r>t;t++)n[t]&&x.isFunction(n[t].promise)?n[t].promise().done(a(t,u,n)).fail(o.reject).progress(a(t,l,s)):--i;return i||o.resolveWith(u,n),o.promise()}}),x.support=function(t){var n,r,o,s,l,u,c,p,f,d=a.createElement("div");if(d.setAttribute("className","t"),d.innerHTML="  <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",n=d.getElementsByTagName("*")||[],r=d.getElementsByTagName("a")[0],!r||!r.style||!n.length)return t;s=a.createElement("select"),u=s.appendChild(a.createElement("option")),o=d.getElementsByTagName("input")[0],r.style.cssText="top:1px;float:left;opacity:.5",t.getSetAttribute="t"!==d.className,t.leadingWhitespace=3===d.firstChild.nodeType,t.tbody=!d.getElementsByTagName("tbody").length,t.htmlSerialize=!!d.getElementsByTagName("link").length,t.style=/top/.test(r.getAttribute("style")),t.hrefNormalized="/a"===r.getAttribute("href"),t.opacity=/^0.5/.test(r.style.opacity),t.cssFloat=!!r.style.cssFloat,t.checkOn=!!o.value,t.optSelected=u.selected,t.enctype=!!a.createElement("form").enctype,t.html5Clone="<:nav></:nav>"!==a.createElement("nav").cloneNode(!0).outerHTML,t.inlineBlockNeedsLayout=!1,t.shrinkWrapBlocks=!1,t.pixelPosition=!1,t.deleteExpando=!0,t.noCloneEvent=!0,t.reliableMarginRight=!0,t.boxSizingReliable=!0,o.checked=!0,t.noCloneChecked=o.cloneNode(!0).checked,s.disabled=!0,t.optDisabled=!u.disabled;try{delete d.test}catch(h){t.deleteExpando=!1}o=a.createElement("input"),o.setAttribute("value",""),t.input=""===o.getAttribute("value"),o.value="t",o.setAttribute("type","radio"),t.radioValue="t"===o.value,o.setAttribute("checked","t"),o.setAttribute("name","t"),l=a.createDocumentFragment(),l.appendChild(o),t.appendChecked=o.checked,t.checkClone=l.cloneNode(!0).cloneNode(!0).lastChild.checked,d.attachEvent&&(d.attachEvent("onclick",function(){t.noCloneEvent=!1}),d.cloneNode(!0).click());for(f in{submit:!0,change:!0,focusin:!0})d.setAttribute(c="on"+f,"t"),t[f+"Bubbles"]=c in e||d.attributes[c].expando===!1;d.style.backgroundClip="content-box",d.cloneNode(!0).style.backgroundClip="",t.clearCloneStyle="content-box"===d.style.backgroundClip;for(f in x(t))break;return t.ownLast="0"!==f,x(function(){var n,r,o,s="padding:0;margin:0;border:0;display:block;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;",l=a.getElementsByTagName("body")[0];l&&(n=a.createElement("div"),n.style.cssText="border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px",l.appendChild(n).appendChild(d),d.innerHTML="<table><tr><td></td><td>t</td></tr></table>",o=d.getElementsByTagName("td"),o[0].style.cssText="padding:0;margin:0;border:0;display:none",p=0===o[0].offsetHeight,o[0].style.display="",o[1].style.display="none",t.reliableHiddenOffsets=p&&0===o[0].offsetHeight,d.innerHTML="",d.style.cssText="box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;",x.swap(l,null!=l.style.zoom?{zoom:1}:{},function(){t.boxSizing=4===d.offsetWidth}),e.getComputedStyle&&(t.pixelPosition="1%"!==(e.getComputedStyle(d,null)||{}).top,t.boxSizingReliable="4px"===(e.getComputedStyle(d,null)||{width:"4px"}).width,r=d.appendChild(a.createElement("div")),r.style.cssText=d.style.cssText=s,r.style.marginRight=r.style.width="0",d.style.width="1px",t.reliableMarginRight=!parseFloat((e.getComputedStyle(r,null)||{}).marginRight)),typeof d.style.zoom!==i&&(d.innerHTML="",d.style.cssText=s+"width:1px;padding:1px;display:inline;zoom:1",t.inlineBlockNeedsLayout=3===d.offsetWidth,d.style.display="block",d.innerHTML="<div></div>",d.firstChild.style.width="5px",t.shrinkWrapBlocks=3!==d.offsetWidth,t.inlineBlockNeedsLayout&&(l.style.zoom=1)),l.removeChild(n),n=d=o=r=null)}),n=s=l=u=r=o=null,t
4}({});var B=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,P=/([A-Z])/g;function R(e,n,r,i){if(x.acceptData(e)){var o,a,s=x.expando,l=e.nodeType,u=l?x.cache:e,c=l?e[s]:e[s]&&s;if(c&&u[c]&&(i||u[c].data)||r!==t||"string"!=typeof n)return c||(c=l?e[s]=p.pop()||x.guid++:s),u[c]||(u[c]=l?{}:{toJSON:x.noop}),("object"==typeof n||"function"==typeof n)&&(i?u[c]=x.extend(u[c],n):u[c].data=x.extend(u[c].data,n)),a=u[c],i||(a.data||(a.data={}),a=a.data),r!==t&&(a[x.camelCase(n)]=r),"string"==typeof n?(o=a[n],null==o&&(o=a[x.camelCase(n)])):o=a,o}}function W(e,t,n){if(x.acceptData(e)){var r,i,o=e.nodeType,a=o?x.cache:e,s=o?e[x.expando]:x.expando;if(a[s]){if(t&&(r=n?a[s]:a[s].data)){x.isArray(t)?t=t.concat(x.map(t,x.camelCase)):t in r?t=[t]:(t=x.camelCase(t),t=t in r?[t]:t.split(" ")),i=t.length;while(i--)delete r[t[i]];if(n?!I(r):!x.isEmptyObject(r))return}(n||(delete a[s].data,I(a[s])))&&(o?x.cleanData([e],!0):x.support.deleteExpando||a!=a.window?delete a[s]:a[s]=null)}}}x.extend({cache:{},noData:{applet:!0,embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(e){return e=e.nodeType?x.cache[e[x.expando]]:e[x.expando],!!e&&!I(e)},data:function(e,t,n){return R(e,t,n)},removeData:function(e,t){return W(e,t)},_data:function(e,t,n){return R(e,t,n,!0)},_removeData:function(e,t){return W(e,t,!0)},acceptData:function(e){if(e.nodeType&&1!==e.nodeType&&9!==e.nodeType)return!1;var t=e.nodeName&&x.noData[e.nodeName.toLowerCase()];return!t||t!==!0&&e.getAttribute("classid")===t}}),x.fn.extend({data:function(e,n){var r,i,o=null,a=0,s=this[0];if(e===t){if(this.length&&(o=x.data(s),1===s.nodeType&&!x._data(s,"parsedAttrs"))){for(r=s.attributes;r.length>a;a++)i=r[a].name,0===i.indexOf("data-")&&(i=x.camelCase(i.slice(5)),$(s,i,o[i]));x._data(s,"parsedAttrs",!0)}return o}return"object"==typeof e?this.each(function(){x.data(this,e)}):arguments.length>1?this.each(function(){x.data(this,e,n)}):s?$(s,e,x.data(s,e)):null},removeData:function(e){return this.each(function(){x.removeData(this,e)})}});function $(e,n,r){if(r===t&&1===e.nodeType){var i="data-"+n.replace(P,"-$1").toLowerCase();if(r=e.getAttribute(i),"string"==typeof r){try{r="true"===r?!0:"false"===r?!1:"null"===r?null:+r+""===r?+r:B.test(r)?x.parseJSON(r):r}catch(o){}x.data(e,n,r)}else r=t}return r}function I(e){var t;for(t in e)if(("data"!==t||!x.isEmptyObject(e[t]))&&"toJSON"!==t)return!1;return!0}x.extend({queue:function(e,n,r){var i;return e?(n=(n||"fx")+"queue",i=x._data(e,n),r&&(!i||x.isArray(r)?i=x._data(e,n,x.makeArray(r)):i.push(r)),i||[]):t},dequeue:function(e,t){t=t||"fx";var n=x.queue(e,t),r=n.length,i=n.shift(),o=x._queueHooks(e,t),a=function(){x.dequeue(e,t)};"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,a,o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return x._data(e,n)||x._data(e,n,{empty:x.Callbacks("once memory").add(function(){x._removeData(e,t+"queue"),x._removeData(e,n)})})}}),x.fn.extend({queue:function(e,n){var r=2;return"string"!=typeof e&&(n=e,e="fx",r--),r>arguments.length?x.queue(this[0],e):n===t?this:this.each(function(){var t=x.queue(this,e,n);x._queueHooks(this,e),"fx"===e&&"inprogress"!==t[0]&&x.dequeue(this,e)})},dequeue:function(e){return this.each(function(){x.dequeue(this,e)})},delay:function(e,t){return e=x.fx?x.fx.speeds[e]||e:e,t=t||"fx",this.queue(t,function(t,n){var r=setTimeout(t,e);n.stop=function(){clearTimeout(r)}})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,n){var r,i=1,o=x.Deferred(),a=this,s=this.length,l=function(){--i||o.resolveWith(a,[a])};"string"!=typeof e&&(n=e,e=t),e=e||"fx";while(s--)r=x._data(a[s],e+"queueHooks"),r&&r.empty&&(i++,r.empty.add(l));return l(),o.promise(n)}});var z,X,U=/[\t\r\n\f]/g,V=/\r/g,Y=/^(?:input|select|textarea|button|object)$/i,J=/^(?:a|area)$/i,G=/^(?:checked|selected)$/i,Q=x.support.getSetAttribute,K=x.support.input;x.fn.extend({attr:function(e,t){return x.access(this,x.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){x.removeAttr(this,e)})},prop:function(e,t){return x.access(this,x.prop,e,t,arguments.length>1)},removeProp:function(e){return e=x.propFix[e]||e,this.each(function(){try{this[e]=t,delete this[e]}catch(n){}})},addClass:function(e){var t,n,r,i,o,a=0,s=this.length,l="string"==typeof e&&e;if(x.isFunction(e))return this.each(function(t){x(this).addClass(e.call(this,t,this.className))});if(l)for(t=(e||"").match(T)||[];s>a;a++)if(n=this[a],r=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(U," "):" ")){o=0;while(i=t[o++])0>r.indexOf(" "+i+" ")&&(r+=i+" ");n.className=x.trim(r)}return this},removeClass:function(e){var t,n,r,i,o,a=0,s=this.length,l=0===arguments.length||"string"==typeof e&&e;if(x.isFunction(e))return this.each(function(t){x(this).removeClass(e.call(this,t,this.className))});if(l)for(t=(e||"").match(T)||[];s>a;a++)if(n=this[a],r=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(U," "):"")){o=0;while(i=t[o++])while(r.indexOf(" "+i+" ")>=0)r=r.replace(" "+i+" "," ");n.className=e?x.trim(r):""}return this},toggleClass:function(e,t){var n=typeof e;return"boolean"==typeof t&&"string"===n?t?this.addClass(e):this.removeClass(e):x.isFunction(e)?this.each(function(n){x(this).toggleClass(e.call(this,n,this.className,t),t)}):this.each(function(){if("string"===n){var t,r=0,o=x(this),a=e.match(T)||[];while(t=a[r++])o.hasClass(t)?o.removeClass(t):o.addClass(t)}else(n===i||"boolean"===n)&&(this.className&&x._data(this,"__className__",this.className),this.className=this.className||e===!1?"":x._data(this,"__className__")||"")})},hasClass:function(e){var t=" "+e+" ",n=0,r=this.length;for(;r>n;n++)if(1===this[n].nodeType&&(" "+this[n].className+" ").replace(U," ").indexOf(t)>=0)return!0;return!1},val:function(e){var n,r,i,o=this[0];{if(arguments.length)return i=x.isFunction(e),this.each(function(n){var o;1===this.nodeType&&(o=i?e.call(this,n,x(this).val()):e,null==o?o="":"number"==typeof o?o+="":x.isArray(o)&&(o=x.map(o,function(e){return null==e?"":e+""})),r=x.valHooks[this.type]||x.valHooks[this.nodeName.toLowerCase()],r&&"set"in r&&r.set(this,o,"value")!==t||(this.value=o))});if(o)return r=x.valHooks[o.type]||x.valHooks[o.nodeName.toLowerCase()],r&&"get"in r&&(n=r.get(o,"value"))!==t?n:(n=o.value,"string"==typeof n?n.replace(V,""):null==n?"":n)}}}),x.extend({valHooks:{option:{get:function(e){var t=x.find.attr(e,"value");return null!=t?t:e.text}},select:{get:function(e){var t,n,r=e.options,i=e.selectedIndex,o="select-one"===e.type||0>i,a=o?null:[],s=o?i+1:r.length,l=0>i?s:o?i:0;for(;s>l;l++)if(n=r[l],!(!n.selected&&l!==i||(x.support.optDisabled?n.disabled:null!==n.getAttribute("disabled"))||n.parentNode.disabled&&x.nodeName(n.parentNode,"optgroup"))){if(t=x(n).val(),o)return t;a.push(t)}return a},set:function(e,t){var n,r,i=e.options,o=x.makeArray(t),a=i.length;while(a--)r=i[a],(r.selected=x.inArray(x(r).val(),o)>=0)&&(n=!0);return n||(e.selectedIndex=-1),o}}},attr:function(e,n,r){var o,a,s=e.nodeType;if(e&&3!==s&&8!==s&&2!==s)return typeof e.getAttribute===i?x.prop(e,n,r):(1===s&&x.isXMLDoc(e)||(n=n.toLowerCase(),o=x.attrHooks[n]||(x.expr.match.bool.test(n)?X:z)),r===t?o&&"get"in o&&null!==(a=o.get(e,n))?a:(a=x.find.attr(e,n),null==a?t:a):null!==r?o&&"set"in o&&(a=o.set(e,r,n))!==t?a:(e.setAttribute(n,r+""),r):(x.removeAttr(e,n),t))},removeAttr:function(e,t){var n,r,i=0,o=t&&t.match(T);if(o&&1===e.nodeType)while(n=o[i++])r=x.propFix[n]||n,x.expr.match.bool.test(n)?K&&Q||!G.test(n)?e[r]=!1:e[x.camelCase("default-"+n)]=e[r]=!1:x.attr(e,n,""),e.removeAttribute(Q?n:r)},attrHooks:{type:{set:function(e,t){if(!x.support.radioValue&&"radio"===t&&x.nodeName(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},propFix:{"for":"htmlFor","class":"className"},prop:function(e,n,r){var i,o,a,s=e.nodeType;if(e&&3!==s&&8!==s&&2!==s)return a=1!==s||!x.isXMLDoc(e),a&&(n=x.propFix[n]||n,o=x.propHooks[n]),r!==t?o&&"set"in o&&(i=o.set(e,r,n))!==t?i:e[n]=r:o&&"get"in o&&null!==(i=o.get(e,n))?i:e[n]},propHooks:{tabIndex:{get:function(e){var t=x.find.attr(e,"tabindex");return t?parseInt(t,10):Y.test(e.nodeName)||J.test(e.nodeName)&&e.href?0:-1}}}}),X={set:function(e,t,n){return t===!1?x.removeAttr(e,n):K&&Q||!G.test(n)?e.setAttribute(!Q&&x.propFix[n]||n,n):e[x.camelCase("default-"+n)]=e[n]=!0,n}},x.each(x.expr.match.bool.source.match(/\w+/g),function(e,n){var r=x.expr.attrHandle[n]||x.find.attr;x.expr.attrHandle[n]=K&&Q||!G.test(n)?function(e,n,i){var o=x.expr.attrHandle[n],a=i?t:(x.expr.attrHandle[n]=t)!=r(e,n,i)?n.toLowerCase():null;return x.expr.attrHandle[n]=o,a}:function(e,n,r){return r?t:e[x.camelCase("default-"+n)]?n.toLowerCase():null}}),K&&Q||(x.attrHooks.value={set:function(e,n,r){return x.nodeName(e,"input")?(e.defaultValue=n,t):z&&z.set(e,n,r)}}),Q||(z={set:function(e,n,r){var i=e.getAttributeNode(r);return i||e.setAttributeNode(i=e.ownerDocument.createAttribute(r)),i.value=n+="","value"===r||n===e.getAttribute(r)?n:t}},x.expr.attrHandle.id=x.expr.attrHandle.name=x.expr.attrHandle.coords=function(e,n,r){var i;return r?t:(i=e.getAttributeNode(n))&&""!==i.value?i.value:null},x.valHooks.button={get:function(e,n){var r=e.getAttributeNode(n);return r&&r.specified?r.value:t},set:z.set},x.attrHooks.contenteditable={set:function(e,t,n){z.set(e,""===t?!1:t,n)}},x.each(["width","height"],function(e,n){x.attrHooks[n]={set:function(e,r){return""===r?(e.setAttribute(n,"auto"),r):t}}})),x.support.hrefNormalized||x.each(["href","src"],function(e,t){x.propHooks[t]={get:function(e){return e.getAttribute(t,4)}}}),x.support.style||(x.attrHooks.style={get:function(e){return e.style.cssText||t},set:function(e,t){return e.style.cssText=t+""}}),x.support.optSelected||(x.propHooks.selected={get:function(e){var t=e.parentNode;return t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex),null}}),x.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){x.propFix[this.toLowerCase()]=this}),x.support.enctype||(x.propFix.enctype="encoding"),x.each(["radio","checkbox"],function(){x.valHooks[this]={set:function(e,n){return x.isArray(n)?e.checked=x.inArray(x(e).val(),n)>=0:t}},x.support.checkOn||(x.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})});var Z=/^(?:input|select|textarea)$/i,et=/^key/,tt=/^(?:mouse|contextmenu)|click/,nt=/^(?:focusinfocus|focusoutblur)$/,rt=/^([^.]*)(?:\.(.+)|)$/;function it(){return!0}function ot(){return!1}function at(){try{return a.activeElement}catch(e){}}x.event={global:{},add:function(e,n,r,o,a){var s,l,u,c,p,f,d,h,g,m,y,v=x._data(e);if(v){r.handler&&(c=r,r=c.handler,a=c.selector),r.guid||(r.guid=x.guid++),(l=v.events)||(l=v.events={}),(f=v.handle)||(f=v.handle=function(e){return typeof x===i||e&&x.event.triggered===e.type?t:x.event.dispatch.apply(f.elem,arguments)},f.elem=e),n=(n||"").match(T)||[""],u=n.length;while(u--)s=rt.exec(n[u])||[],g=y=s[1],m=(s[2]||"").split(".").sort(),g&&(p=x.event.special[g]||{},g=(a?p.delegateType:p.bindType)||g,p=x.event.special[g]||{},d=x.extend({type:g,origType:y,data:o,handler:r,guid:r.guid,selector:a,needsContext:a&&x.expr.match.needsContext.test(a),namespace:m.join(".")},c),(h=l[g])||(h=l[g]=[],h.delegateCount=0,p.setup&&p.setup.call(e,o,m,f)!==!1||(e.addEventListener?e.addEventListener(g,f,!1):e.attachEvent&&e.attachEvent("on"+g,f))),p.add&&(p.add.call(e,d),d.handler.guid||(d.handler.guid=r.guid)),a?h.splice(h.delegateCount++,0,d):h.push(d),x.event.global[g]=!0);e=null}},remove:function(e,t,n,r,i){var o,a,s,l,u,c,p,f,d,h,g,m=x.hasData(e)&&x._data(e);if(m&&(c=m.events)){t=(t||"").match(T)||[""],u=t.length;while(u--)if(s=rt.exec(t[u])||[],d=g=s[1],h=(s[2]||"").split(".").sort(),d){p=x.event.special[d]||{},d=(r?p.delegateType:p.bindType)||d,f=c[d]||[],s=s[2]&&RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),l=o=f.length;while(o--)a=f[o],!i&&g!==a.origType||n&&n.guid!==a.guid||s&&!s.test(a.namespace)||r&&r!==a.selector&&("**"!==r||!a.selector)||(f.splice(o,1),a.selector&&f.delegateCount--,p.remove&&p.remove.call(e,a));l&&!f.length&&(p.teardown&&p.teardown.call(e,h,m.handle)!==!1||x.removeEvent(e,d,m.handle),delete c[d])}else for(d in c)x.event.remove(e,d+t[u],n,r,!0);x.isEmptyObject(c)&&(delete m.handle,x._removeData(e,"events"))}},trigger:function(n,r,i,o){var s,l,u,c,p,f,d,h=[i||a],g=v.call(n,"type")?n.type:n,m=v.call(n,"namespace")?n.namespace.split("."):[];if(u=f=i=i||a,3!==i.nodeType&&8!==i.nodeType&&!nt.test(g+x.event.triggered)&&(g.indexOf(".")>=0&&(m=g.split("."),g=m.shift(),m.sort()),l=0>g.indexOf(":")&&"on"+g,n=n[x.expando]?n:new x.Event(g,"object"==typeof n&&n),n.isTrigger=o?2:3,n.namespace=m.join("."),n.namespace_re=n.namespace?RegExp("(^|\\.)"+m.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,n.result=t,n.target||(n.target=i),r=null==r?[n]:x.makeArray(r,[n]),p=x.event.special[g]||{},o||!p.trigger||p.trigger.apply(i,r)!==!1)){if(!o&&!p.noBubble&&!x.isWindow(i)){for(c=p.delegateType||g,nt.test(c+g)||(u=u.parentNode);u;u=u.parentNode)h.push(u),f=u;f===(i.ownerDocument||a)&&h.push(f.defaultView||f.parentWindow||e)}d=0;while((u=h[d++])&&!n.isPropagationStopped())n.type=d>1?c:p.bindType||g,s=(x._data(u,"events")||{})[n.type]&&x._data(u,"handle"),s&&s.apply(u,r),s=l&&u[l],s&&x.acceptData(u)&&s.apply&&s.apply(u,r)===!1&&n.preventDefault();if(n.type=g,!o&&!n.isDefaultPrevented()&&(!p._default||p._default.apply(h.pop(),r)===!1)&&x.acceptData(i)&&l&&i[g]&&!x.isWindow(i)){f=i[l],f&&(i[l]=null),x.event.triggered=g;try{i[g]()}catch(y){}x.event.triggered=t,f&&(i[l]=f)}return n.result}},dispatch:function(e){e=x.event.fix(e);var n,r,i,o,a,s=[],l=g.call(arguments),u=(x._data(this,"events")||{})[e.type]||[],c=x.event.special[e.type]||{};if(l[0]=e,e.delegateTarget=this,!c.preDispatch||c.preDispatch.call(this,e)!==!1){s=x.event.handlers.call(this,e,u),n=0;while((o=s[n++])&&!e.isPropagationStopped()){e.currentTarget=o.elem,a=0;while((i=o.handlers[a++])&&!e.isImmediatePropagationStopped())(!e.namespace_re||e.namespace_re.test(i.namespace))&&(e.handleObj=i,e.data=i.data,r=((x.event.special[i.origType]||{}).handle||i.handler).apply(o.elem,l),r!==t&&(e.result=r)===!1&&(e.preventDefault(),e.stopPropagation()))}return c.postDispatch&&c.postDispatch.call(this,e),e.result}},handlers:function(e,n){var r,i,o,a,s=[],l=n.delegateCount,u=e.target;if(l&&u.nodeType&&(!e.button||"click"!==e.type))for(;u!=this;u=u.parentNode||this)if(1===u.nodeType&&(u.disabled!==!0||"click"!==e.type)){for(o=[],a=0;l>a;a++)i=n[a],r=i.selector+" ",o[r]===t&&(o[r]=i.needsContext?x(r,this).index(u)>=0:x.find(r,this,null,[u]).length),o[r]&&o.push(i);o.length&&s.push({elem:u,handlers:o})}return n.length>l&&s.push({elem:this,handlers:n.slice(l)}),s},fix:function(e){if(e[x.expando])return e;var t,n,r,i=e.type,o=e,s=this.fixHooks[i];s||(this.fixHooks[i]=s=tt.test(i)?this.mouseHooks:et.test(i)?this.keyHooks:{}),r=s.props?this.props.concat(s.props):this.props,e=new x.Event(o),t=r.length;while(t--)n=r[t],e[n]=o[n];return e.target||(e.target=o.srcElement||a),3===e.target.nodeType&&(e.target=e.target.parentNode),e.metaKey=!!e.metaKey,s.filter?s.filter(e,o):e},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(e,t){return null==e.which&&(e.which=null!=t.charCode?t.charCode:t.keyCode),e}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(e,n){var r,i,o,s=n.button,l=n.fromElement;return null==e.pageX&&null!=n.clientX&&(i=e.target.ownerDocument||a,o=i.documentElement,r=i.body,e.pageX=n.clientX+(o&&o.scrollLeft||r&&r.scrollLeft||0)-(o&&o.clientLeft||r&&r.clientLeft||0),e.pageY=n.clientY+(o&&o.scrollTop||r&&r.scrollTop||0)-(o&&o.clientTop||r&&r.clientTop||0)),!e.relatedTarget&&l&&(e.relatedTarget=l===e.target?n.toElement:l),e.which||s===t||(e.which=1&s?1:2&s?3:4&s?2:0),e}},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==at()&&this.focus)try{return this.focus(),!1}catch(e){}},delegateType:"focusin"},blur:{trigger:function(){return this===at()&&this.blur?(this.blur(),!1):t},delegateType:"focusout"},click:{trigger:function(){return x.nodeName(this,"input")&&"checkbox"===this.type&&this.click?(this.click(),!1):t},_default:function(e){return x.nodeName(e.target,"a")}},beforeunload:{postDispatch:function(e){e.result!==t&&(e.originalEvent.returnValue=e.result)}}},simulate:function(e,t,n,r){var i=x.extend(new x.Event,n,{type:e,isSimulated:!0,originalEvent:{}});r?x.event.trigger(i,null,t):x.event.dispatch.call(t,i),i.isDefaultPrevented()&&n.preventDefault()}},x.removeEvent=a.removeEventListener?function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n,!1)}:function(e,t,n){var r="on"+t;e.detachEvent&&(typeof e[r]===i&&(e[r]=null),e.detachEvent(r,n))},x.Event=function(e,n){return this instanceof x.Event?(e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||e.returnValue===!1||e.getPreventDefault&&e.getPreventDefault()?it:ot):this.type=e,n&&x.extend(this,n),this.timeStamp=e&&e.timeStamp||x.now(),this[x.expando]=!0,t):new x.Event(e,n)},x.Event.prototype={isDefaultPrevented:ot,isPropagationStopped:ot,isImmediatePropagationStopped:ot,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=it,e&&(e.preventDefault?e.preventDefault():e.returnValue=!1)},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=it,e&&(e.stopPropagation&&e.stopPropagation(),e.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=it,this.stopPropagation()}},x.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(e,t){x.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,r=this,i=e.relatedTarget,o=e.handleObj;return(!i||i!==r&&!x.contains(r,i))&&(e.type=o.origType,n=o.handler.apply(this,arguments),e.type=t),n}}}),x.support.submitBubbles||(x.event.special.submit={setup:function(){return x.nodeName(this,"form")?!1:(x.event.add(this,"click._submit keypress._submit",function(e){var n=e.target,r=x.nodeName(n,"input")||x.nodeName(n,"button")?n.form:t;r&&!x._data(r,"submitBubbles")&&(x.event.add(r,"submit._submit",function(e){e._submit_bubble=!0}),x._data(r,"submitBubbles",!0))}),t)},postDispatch:function(e){e._submit_bubble&&(delete e._submit_bubble,this.parentNode&&!e.isTrigger&&x.event.simulate("submit",this.parentNode,e,!0))},teardown:function(){return x.nodeName(this,"form")?!1:(x.event.remove(this,"._submit"),t)}}),x.support.changeBubbles||(x.event.special.change={setup:function(){return Z.test(this.nodeName)?(("checkbox"===this.type||"radio"===this.type)&&(x.event.add(this,"propertychange._change",function(e){"checked"===e.originalEvent.propertyName&&(this._just_changed=!0)}),x.event.add(this,"click._change",function(e){this._just_changed&&!e.isTrigger&&(this._just_changed=!1),x.event.simulate("change",this,e,!0)})),!1):(x.event.add(this,"beforeactivate._change",function(e){var t=e.target;Z.test(t.nodeName)&&!x._data(t,"changeBubbles")&&(x.event.add(t,"change._change",function(e){!this.parentNode||e.isSimulated||e.isTrigger||x.event.simulate("change",this.parentNode,e,!0)}),x._data(t,"changeBubbles",!0))}),t)},handle:function(e){var n=e.target;return this!==n||e.isSimulated||e.isTrigger||"radio"!==n.type&&"checkbox"!==n.type?e.handleObj.handler.apply(this,arguments):t},teardown:function(){return x.event.remove(this,"._change"),!Z.test(this.nodeName)}}),x.support.focusinBubbles||x.each({focus:"focusin",blur:"focusout"},function(e,t){var n=0,r=function(e){x.event.simulate(t,e.target,x.event.fix(e),!0)};x.event.special[t]={setup:function(){0===n++&&a.addEventListener(e,r,!0)},teardown:function(){0===--n&&a.removeEventListener(e,r,!0)}}}),x.fn.extend({on:function(e,n,r,i,o){var a,s;if("object"==typeof e){"string"!=typeof n&&(r=r||n,n=t);for(a in e)this.on(a,n,r,e[a],o);return this}if(null==r&&null==i?(i=n,r=n=t):null==i&&("string"==typeof n?(i=r,r=t):(i=r,r=n,n=t)),i===!1)i=ot;else if(!i)return this;return 1===o&&(s=i,i=function(e){return x().off(e),s.apply(this,arguments)},i.guid=s.guid||(s.guid=x.guid++)),this.each(function(){x.event.add(this,e,i,r,n)})},one:function(e,t,n,r){return this.on(e,t,n,r,1)},off:function(e,n,r){var i,o;if(e&&e.preventDefault&&e.handleObj)return i=e.handleObj,x(e.delegateTarget).off(i.namespace?i.origType+"."+i.namespace:i.origType,i.selector,i.handler),this;if("object"==typeof e){for(o in e)this.off(o,n,e[o]);return this}return(n===!1||"function"==typeof n)&&(r=n,n=t),r===!1&&(r=ot),this.each(function(){x.event.remove(this,e,r,n)})},trigger:function(e,t){return this.each(function(){x.event.trigger(e,t,this)})},triggerHandler:function(e,n){var r=this[0];return r?x.event.trigger(e,n,r,!0):t}});var st=/^.[^:#\[\.,]*$/,lt=/^(?:parents|prev(?:Until|All))/,ut=x.expr.match.needsContext,ct={children:!0,contents:!0,next:!0,prev:!0};x.fn.extend({find:function(e){var t,n=[],r=this,i=r.length;if("string"!=typeof e)return this.pushStack(x(e).filter(function(){for(t=0;i>t;t++)if(x.contains(r[t],this))return!0}));for(t=0;i>t;t++)x.find(e,r[t],n);return n=this.pushStack(i>1?x.unique(n):n),n.selector=this.selector?this.selector+" "+e:e,n},has:function(e){var t,n=x(e,this),r=n.length;return this.filter(function(){for(t=0;r>t;t++)if(x.contains(this,n[t]))return!0})},not:function(e){return this.pushStack(ft(this,e||[],!0))},filter:function(e){return this.pushStack(ft(this,e||[],!1))},is:function(e){return!!ft(this,"string"==typeof e&&ut.test(e)?x(e):e||[],!1).length},closest:function(e,t){var n,r=0,i=this.length,o=[],a=ut.test(e)||"string"!=typeof e?x(e,t||this.context):0;for(;i>r;r++)for(n=this[r];n&&n!==t;n=n.parentNode)if(11>n.nodeType&&(a?a.index(n)>-1:1===n.nodeType&&x.find.matchesSelector(n,e))){n=o.push(n);break}return this.pushStack(o.length>1?x.unique(o):o)},index:function(e){return e?"string"==typeof e?x.inArray(this[0],x(e)):x.inArray(e.jquery?e[0]:e,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){var n="string"==typeof e?x(e,t):x.makeArray(e&&e.nodeType?[e]:e),r=x.merge(this.get(),n);return this.pushStack(x.unique(r))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}});function pt(e,t){do e=e[t];while(e&&1!==e.nodeType);return e}x.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return x.dir(e,"parentNode")},parentsUntil:function(e,t,n){return x.dir(e,"parentNode",n)},next:function(e){return pt(e,"nextSibling")},prev:function(e){return pt(e,"previousSibling")},nextAll:function(e){return x.dir(e,"nextSibling")},prevAll:function(e){return x.dir(e,"previousSibling")},nextUntil:function(e,t,n){return x.dir(e,"nextSibling",n)},prevUntil:function(e,t,n){return x.dir(e,"previousSibling",n)},siblings:function(e){return x.sibling((e.parentNode||{}).firstChild,e)},children:function(e){return x.sibling(e.firstChild)},contents:function(e){return x.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:x.merge([],e.childNodes)}},function(e,t){x.fn[e]=function(n,r){var i=x.map(this,t,n);return"Until"!==e.slice(-5)&&(r=n),r&&"string"==typeof r&&(i=x.filter(r,i)),this.length>1&&(ct[e]||(i=x.unique(i)),lt.test(e)&&(i=i.reverse())),this.pushStack(i)}}),x.extend({filter:function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?x.find.matchesSelector(r,e)?[r]:[]:x.find.matches(e,x.grep(t,function(e){return 1===e.nodeType}))},dir:function(e,n,r){var i=[],o=e[n];while(o&&9!==o.nodeType&&(r===t||1!==o.nodeType||!x(o).is(r)))1===o.nodeType&&i.push(o),o=o[n];return i},sibling:function(e,t){var n=[];for(;e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n}});function ft(e,t,n){if(x.isFunction(t))return x.grep(e,function(e,r){return!!t.call(e,r,e)!==n});if(t.nodeType)return x.grep(e,function(e){return e===t!==n});if("string"==typeof t){if(st.test(t))return x.filter(t,e,n);t=x.filter(t,e)}return x.grep(e,function(e){return x.inArray(e,t)>=0!==n})}function dt(e){var t=ht.split("|"),n=e.createDocumentFragment();if(n.createElement)while(t.length)n.createElement(t.pop());return n}var ht="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",gt=/ jQuery\d+="(?:null|\d+)"/g,mt=RegExp("<(?:"+ht+")[\\s/>]","i"),yt=/^\s+/,vt=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,bt=/<([\w:]+)/,xt=/<tbody/i,wt=/<|&#?\w+;/,Tt=/<(?:script|style|link)/i,Ct=/^(?:checkbox|radio)$/i,Nt=/checked\s*(?:[^=]|=\s*.checked.)/i,kt=/^$|\/(?:java|ecma)script/i,Et=/^true\/(.*)/,St=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,At={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],area:[1,"<map>","</map>"],param:[1,"<object>","</object>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:x.support.htmlSerialize?[0,"",""]:[1,"X<div>","</div>"]},jt=dt(a),Dt=jt.appendChild(a.createElement("div"));At.optgroup=At.option,At.tbody=At.tfoot=At.colgroup=At.caption=At.thead,At.th=At.td,x.fn.extend({text:function(e){return x.access(this,function(e){return e===t?x.text(this):this.empty().append((this[0]&&this[0].ownerDocument||a).createTextNode(e))},null,e,arguments.length)},append:function(){return this.domManip(arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=Lt(this,e);t.appendChild(e)}})},prepend:function(){return this.domManip(arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=Lt(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return this.domManip(arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return this.domManip(arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},remove:function(e,t){var n,r=e?x.filter(e,this):this,i=0;for(;null!=(n=r[i]);i++)t||1!==n.nodeType||x.cleanData(Ft(n)),n.parentNode&&(t&&x.contains(n.ownerDocument,n)&&_t(Ft(n,"script")),n.parentNode.removeChild(n));return this},empty:function(){var e,t=0;for(;null!=(e=this[t]);t++){1===e.nodeType&&x.cleanData(Ft(e,!1));while(e.firstChild)e.removeChild(e.firstChild);e.options&&x.nodeName(e,"select")&&(e.options.length=0)}return this},clone:function(e,t){return e=null==e?!1:e,t=null==t?e:t,this.map(function(){return x.clone(this,e,t)})},html:function(e){return x.access(this,function(e){var n=this[0]||{},r=0,i=this.length;if(e===t)return 1===n.nodeType?n.innerHTML.replace(gt,""):t;if(!("string"!=typeof e||Tt.test(e)||!x.support.htmlSerialize&&mt.test(e)||!x.support.leadingWhitespace&&yt.test(e)||At[(bt.exec(e)||["",""])[1].toLowerCase()])){e=e.replace(vt,"<$1></$2>");try{for(;i>r;r++)n=this[r]||{},1===n.nodeType&&(x.cleanData(Ft(n,!1)),n.innerHTML=e);n=0}catch(o){}}n&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var e=x.map(this,function(e){return[e.nextSibling,e.parentNode]}),t=0;return this.domManip(arguments,function(n){var r=e[t++],i=e[t++];i&&(r&&r.parentNode!==i&&(r=this.nextSibling),x(this).remove(),i.insertBefore(n,r))},!0),t?this:this.remove()},detach:function(e){return this.remove(e,!0)},domManip:function(e,t,n){e=d.apply([],e);var r,i,o,a,s,l,u=0,c=this.length,p=this,f=c-1,h=e[0],g=x.isFunction(h);if(g||!(1>=c||"string"!=typeof h||x.support.checkClone)&&Nt.test(h))return this.each(function(r){var i=p.eq(r);g&&(e[0]=h.call(this,r,i.html())),i.domManip(e,t,n)});if(c&&(l=x.buildFragment(e,this[0].ownerDocument,!1,!n&&this),r=l.firstChild,1===l.childNodes.length&&(l=r),r)){for(a=x.map(Ft(l,"script"),Ht),o=a.length;c>u;u++)i=l,u!==f&&(i=x.clone(i,!0,!0),o&&x.merge(a,Ft(i,"script"))),t.call(this[u],i,u);if(o)for(s=a[a.length-1].ownerDocument,x.map(a,qt),u=0;o>u;u++)i=a[u],kt.test(i.type||"")&&!x._data(i,"globalEval")&&x.contains(s,i)&&(i.src?x._evalUrl(i.src):x.globalEval((i.text||i.textContent||i.innerHTML||"").replace(St,"")));l=r=null}return this}});function Lt(e,t){return x.nodeName(e,"table")&&x.nodeName(1===t.nodeType?t:t.firstChild,"tr")?e.getElementsByTagName("tbody")[0]||e.appendChild(e.ownerDocument.createElement("tbody")):e}function Ht(e){return e.type=(null!==x.find.attr(e,"type"))+"/"+e.type,e}function qt(e){var t=Et.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function _t(e,t){var n,r=0;for(;null!=(n=e[r]);r++)x._data(n,"globalEval",!t||x._data(t[r],"globalEval"))}function Mt(e,t){if(1===t.nodeType&&x.hasData(e)){var n,r,i,o=x._data(e),a=x._data(t,o),s=o.events;if(s){delete a.handle,a.events={};for(n in s)for(r=0,i=s[n].length;i>r;r++)x.event.add(t,n,s[n][r])}a.data&&(a.data=x.extend({},a.data))}}function Ot(e,t){var n,r,i;if(1===t.nodeType){if(n=t.nodeName.toLowerCase(),!x.support.noCloneEvent&&t[x.expando]){i=x._data(t);for(r in i.events)x.removeEvent(t,r,i.handle);t.removeAttribute(x.expando)}"script"===n&&t.text!==e.text?(Ht(t).text=e.text,qt(t)):"object"===n?(t.parentNode&&(t.outerHTML=e.outerHTML),x.support.html5Clone&&e.innerHTML&&!x.trim(t.innerHTML)&&(t.innerHTML=e.innerHTML)):"input"===n&&Ct.test(e.type)?(t.defaultChecked=t.checked=e.checked,t.value!==e.value&&(t.value=e.value)):"option"===n?t.defaultSelected=t.selected=e.defaultSelected:("input"===n||"textarea"===n)&&(t.defaultValue=e.defaultValue)}}x.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){x.fn[e]=function(e){var n,r=0,i=[],o=x(e),a=o.length-1;for(;a>=r;r++)n=r===a?this:this.clone(!0),x(o[r])[t](n),h.apply(i,n.get());return this.pushStack(i)}});function Ft(e,n){var r,o,a=0,s=typeof e.getElementsByTagName!==i?e.getElementsByTagName(n||"*"):typeof e.querySelectorAll!==i?e.querySelectorAll(n||"*"):t;if(!s)for(s=[],r=e.childNodes||e;null!=(o=r[a]);a++)!n||x.nodeName(o,n)?s.push(o):x.merge(s,Ft(o,n));return n===t||n&&x.nodeName(e,n)?x.merge([e],s):s}function Bt(e){Ct.test(e.type)&&(e.defaultChecked=e.checked)}x.extend({clone:function(e,t,n){var r,i,o,a,s,l=x.contains(e.ownerDocument,e);if(x.support.html5Clone||x.isXMLDoc(e)||!mt.test("<"+e.nodeName+">")?o=e.cloneNode(!0):(Dt.innerHTML=e.outerHTML,Dt.removeChild(o=Dt.firstChild)),!(x.support.noCloneEvent&&x.support.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||x.isXMLDoc(e)))for(r=Ft(o),s=Ft(e),a=0;null!=(i=s[a]);++a)r[a]&&Ot(i,r[a]);if(t)if(n)for(s=s||Ft(e),r=r||Ft(o),a=0;null!=(i=s[a]);a++)Mt(i,r[a]);else Mt(e,o);return r=Ft(o,"script"),r.length>0&&_t(r,!l&&Ft(e,"script")),r=s=i=null,o},buildFragment:function(e,t,n,r){var i,o,a,s,l,u,c,p=e.length,f=dt(t),d=[],h=0;for(;p>h;h++)if(o=e[h],o||0===o)if("object"===x.type(o))x.merge(d,o.nodeType?[o]:o);else if(wt.test(o)){s=s||f.appendChild(t.createElement("div")),l=(bt.exec(o)||["",""])[1].toLowerCase(),c=At[l]||At._default,s.innerHTML=c[1]+o.replace(vt,"<$1></$2>")+c[2],i=c[0];while(i--)s=s.lastChild;if(!x.support.leadingWhitespace&&yt.test(o)&&d.push(t.createTextNode(yt.exec(o)[0])),!x.support.tbody){o="table"!==l||xt.test(o)?"<table>"!==c[1]||xt.test(o)?0:s:s.firstChild,i=o&&o.childNodes.length;while(i--)x.nodeName(u=o.childNodes[i],"tbody")&&!u.childNodes.length&&o.removeChild(u)}x.merge(d,s.childNodes),s.textContent="";while(s.firstChild)s.removeChild(s.firstChild);s=f.lastChild}else d.push(t.createTextNode(o));s&&f.removeChild(s),x.support.appendChecked||x.grep(Ft(d,"input"),Bt),h=0;while(o=d[h++])if((!r||-1===x.inArray(o,r))&&(a=x.contains(o.ownerDocument,o),s=Ft(f.appendChild(o),"script"),a&&_t(s),n)){i=0;while(o=s[i++])kt.test(o.type||"")&&n.push(o)}return s=null,f},cleanData:function(e,t){var n,r,o,a,s=0,l=x.expando,u=x.cache,c=x.support.deleteExpando,f=x.event.special;for(;null!=(n=e[s]);s++)if((t||x.acceptData(n))&&(o=n[l],a=o&&u[o])){if(a.events)for(r in a.events)f[r]?x.event.remove(n,r):x.removeEvent(n,r,a.handle);
5u[o]&&(delete u[o],c?delete n[l]:typeof n.removeAttribute!==i?n.removeAttribute(l):n[l]=null,p.push(o))}},_evalUrl:function(e){return x.ajax({url:e,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})}}),x.fn.extend({wrapAll:function(e){if(x.isFunction(e))return this.each(function(t){x(this).wrapAll(e.call(this,t))});if(this[0]){var t=x(e,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){var e=this;while(e.firstChild&&1===e.firstChild.nodeType)e=e.firstChild;return e}).append(this)}return this},wrapInner:function(e){return x.isFunction(e)?this.each(function(t){x(this).wrapInner(e.call(this,t))}):this.each(function(){var t=x(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=x.isFunction(e);return this.each(function(n){x(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(){return this.parent().each(function(){x.nodeName(this,"body")||x(this).replaceWith(this.childNodes)}).end()}});var Pt,Rt,Wt,$t=/alpha\([^)]*\)/i,It=/opacity\s*=\s*([^)]*)/,zt=/^(top|right|bottom|left)$/,Xt=/^(none|table(?!-c[ea]).+)/,Ut=/^margin/,Vt=RegExp("^("+w+")(.*)$","i"),Yt=RegExp("^("+w+")(?!px)[a-z%]+$","i"),Jt=RegExp("^([+-])=("+w+")","i"),Gt={BODY:"block"},Qt={position:"absolute",visibility:"hidden",display:"block"},Kt={letterSpacing:0,fontWeight:400},Zt=["Top","Right","Bottom","Left"],en=["Webkit","O","Moz","ms"];function tn(e,t){if(t in e)return t;var n=t.charAt(0).toUpperCase()+t.slice(1),r=t,i=en.length;while(i--)if(t=en[i]+n,t in e)return t;return r}function nn(e,t){return e=t||e,"none"===x.css(e,"display")||!x.contains(e.ownerDocument,e)}function rn(e,t){var n,r,i,o=[],a=0,s=e.length;for(;s>a;a++)r=e[a],r.style&&(o[a]=x._data(r,"olddisplay"),n=r.style.display,t?(o[a]||"none"!==n||(r.style.display=""),""===r.style.display&&nn(r)&&(o[a]=x._data(r,"olddisplay",ln(r.nodeName)))):o[a]||(i=nn(r),(n&&"none"!==n||!i)&&x._data(r,"olddisplay",i?n:x.css(r,"display"))));for(a=0;s>a;a++)r=e[a],r.style&&(t&&"none"!==r.style.display&&""!==r.style.display||(r.style.display=t?o[a]||"":"none"));return e}x.fn.extend({css:function(e,n){return x.access(this,function(e,n,r){var i,o,a={},s=0;if(x.isArray(n)){for(o=Rt(e),i=n.length;i>s;s++)a[n[s]]=x.css(e,n[s],!1,o);return a}return r!==t?x.style(e,n,r):x.css(e,n)},e,n,arguments.length>1)},show:function(){return rn(this,!0)},hide:function(){return rn(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){nn(this)?x(this).show():x(this).hide()})}}),x.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Wt(e,"opacity");return""===n?"1":n}}}},cssNumber:{columnCount:!0,fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":x.support.cssFloat?"cssFloat":"styleFloat"},style:function(e,n,r,i){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var o,a,s,l=x.camelCase(n),u=e.style;if(n=x.cssProps[l]||(x.cssProps[l]=tn(u,l)),s=x.cssHooks[n]||x.cssHooks[l],r===t)return s&&"get"in s&&(o=s.get(e,!1,i))!==t?o:u[n];if(a=typeof r,"string"===a&&(o=Jt.exec(r))&&(r=(o[1]+1)*o[2]+parseFloat(x.css(e,n)),a="number"),!(null==r||"number"===a&&isNaN(r)||("number"!==a||x.cssNumber[l]||(r+="px"),x.support.clearCloneStyle||""!==r||0!==n.indexOf("background")||(u[n]="inherit"),s&&"set"in s&&(r=s.set(e,r,i))===t)))try{u[n]=r}catch(c){}}},css:function(e,n,r,i){var o,a,s,l=x.camelCase(n);return n=x.cssProps[l]||(x.cssProps[l]=tn(e.style,l)),s=x.cssHooks[n]||x.cssHooks[l],s&&"get"in s&&(a=s.get(e,!0,r)),a===t&&(a=Wt(e,n,i)),"normal"===a&&n in Kt&&(a=Kt[n]),""===r||r?(o=parseFloat(a),r===!0||x.isNumeric(o)?o||0:a):a}}),e.getComputedStyle?(Rt=function(t){return e.getComputedStyle(t,null)},Wt=function(e,n,r){var i,o,a,s=r||Rt(e),l=s?s.getPropertyValue(n)||s[n]:t,u=e.style;return s&&(""!==l||x.contains(e.ownerDocument,e)||(l=x.style(e,n)),Yt.test(l)&&Ut.test(n)&&(i=u.width,o=u.minWidth,a=u.maxWidth,u.minWidth=u.maxWidth=u.width=l,l=s.width,u.width=i,u.minWidth=o,u.maxWidth=a)),l}):a.documentElement.currentStyle&&(Rt=function(e){return e.currentStyle},Wt=function(e,n,r){var i,o,a,s=r||Rt(e),l=s?s[n]:t,u=e.style;return null==l&&u&&u[n]&&(l=u[n]),Yt.test(l)&&!zt.test(n)&&(i=u.left,o=e.runtimeStyle,a=o&&o.left,a&&(o.left=e.currentStyle.left),u.left="fontSize"===n?"1em":l,l=u.pixelLeft+"px",u.left=i,a&&(o.left=a)),""===l?"auto":l});function on(e,t,n){var r=Vt.exec(t);return r?Math.max(0,r[1]-(n||0))+(r[2]||"px"):t}function an(e,t,n,r,i){var o=n===(r?"border":"content")?4:"width"===t?1:0,a=0;for(;4>o;o+=2)"margin"===n&&(a+=x.css(e,n+Zt[o],!0,i)),r?("content"===n&&(a-=x.css(e,"padding"+Zt[o],!0,i)),"margin"!==n&&(a-=x.css(e,"border"+Zt[o]+"Width",!0,i))):(a+=x.css(e,"padding"+Zt[o],!0,i),"padding"!==n&&(a+=x.css(e,"border"+Zt[o]+"Width",!0,i)));return a}function sn(e,t,n){var r=!0,i="width"===t?e.offsetWidth:e.offsetHeight,o=Rt(e),a=x.support.boxSizing&&"border-box"===x.css(e,"boxSizing",!1,o);if(0>=i||null==i){if(i=Wt(e,t,o),(0>i||null==i)&&(i=e.style[t]),Yt.test(i))return i;r=a&&(x.support.boxSizingReliable||i===e.style[t]),i=parseFloat(i)||0}return i+an(e,t,n||(a?"border":"content"),r,o)+"px"}function ln(e){var t=a,n=Gt[e];return n||(n=un(e,t),"none"!==n&&n||(Pt=(Pt||x("<iframe frameborder='0' width='0' height='0'/>").css("cssText","display:block !important")).appendTo(t.documentElement),t=(Pt[0].contentWindow||Pt[0].contentDocument).document,t.write("<!doctype html><html><body>"),t.close(),n=un(e,t),Pt.detach()),Gt[e]=n),n}function un(e,t){var n=x(t.createElement(e)).appendTo(t.body),r=x.css(n[0],"display");return n.remove(),r}x.each(["height","width"],function(e,n){x.cssHooks[n]={get:function(e,r,i){return r?0===e.offsetWidth&&Xt.test(x.css(e,"display"))?x.swap(e,Qt,function(){return sn(e,n,i)}):sn(e,n,i):t},set:function(e,t,r){var i=r&&Rt(e);return on(e,t,r?an(e,n,r,x.support.boxSizing&&"border-box"===x.css(e,"boxSizing",!1,i),i):0)}}}),x.support.opacity||(x.cssHooks.opacity={get:function(e,t){return It.test((t&&e.currentStyle?e.currentStyle.filter:e.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":t?"1":""},set:function(e,t){var n=e.style,r=e.currentStyle,i=x.isNumeric(t)?"alpha(opacity="+100*t+")":"",o=r&&r.filter||n.filter||"";n.zoom=1,(t>=1||""===t)&&""===x.trim(o.replace($t,""))&&n.removeAttribute&&(n.removeAttribute("filter"),""===t||r&&!r.filter)||(n.filter=$t.test(o)?o.replace($t,i):o+" "+i)}}),x(function(){x.support.reliableMarginRight||(x.cssHooks.marginRight={get:function(e,n){return n?x.swap(e,{display:"inline-block"},Wt,[e,"marginRight"]):t}}),!x.support.pixelPosition&&x.fn.position&&x.each(["top","left"],function(e,n){x.cssHooks[n]={get:function(e,r){return r?(r=Wt(e,n),Yt.test(r)?x(e).position()[n]+"px":r):t}}})}),x.expr&&x.expr.filters&&(x.expr.filters.hidden=function(e){return 0>=e.offsetWidth&&0>=e.offsetHeight||!x.support.reliableHiddenOffsets&&"none"===(e.style&&e.style.display||x.css(e,"display"))},x.expr.filters.visible=function(e){return!x.expr.filters.hidden(e)}),x.each({margin:"",padding:"",border:"Width"},function(e,t){x.cssHooks[e+t]={expand:function(n){var r=0,i={},o="string"==typeof n?n.split(" "):[n];for(;4>r;r++)i[e+Zt[r]+t]=o[r]||o[r-2]||o[0];return i}},Ut.test(e)||(x.cssHooks[e+t].set=on)});var cn=/%20/g,pn=/\[\]$/,fn=/\r?\n/g,dn=/^(?:submit|button|image|reset|file)$/i,hn=/^(?:input|select|textarea|keygen)/i;x.fn.extend({serialize:function(){return x.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=x.prop(this,"elements");return e?x.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!x(this).is(":disabled")&&hn.test(this.nodeName)&&!dn.test(e)&&(this.checked||!Ct.test(e))}).map(function(e,t){var n=x(this).val();return null==n?null:x.isArray(n)?x.map(n,function(e){return{name:t.name,value:e.replace(fn,"\r\n")}}):{name:t.name,value:n.replace(fn,"\r\n")}}).get()}}),x.param=function(e,n){var r,i=[],o=function(e,t){t=x.isFunction(t)?t():null==t?"":t,i[i.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};if(n===t&&(n=x.ajaxSettings&&x.ajaxSettings.traditional),x.isArray(e)||e.jquery&&!x.isPlainObject(e))x.each(e,function(){o(this.name,this.value)});else for(r in e)gn(r,e[r],n,o);return i.join("&").replace(cn,"+")};function gn(e,t,n,r){var i;if(x.isArray(t))x.each(t,function(t,i){n||pn.test(e)?r(e,i):gn(e+"["+("object"==typeof i?t:"")+"]",i,n,r)});else if(n||"object"!==x.type(t))r(e,t);else for(i in t)gn(e+"["+i+"]",t[i],n,r)}x.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(e,t){x.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}),x.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)},bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)}});var mn,yn,vn=x.now(),bn=/\?/,xn=/#.*$/,wn=/([?&])_=[^&]*/,Tn=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Cn=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Nn=/^(?:GET|HEAD)$/,kn=/^\/\//,En=/^([\w.+-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,Sn=x.fn.load,An={},jn={},Dn="*/".concat("*");try{yn=o.href}catch(Ln){yn=a.createElement("a"),yn.href="",yn=yn.href}mn=En.exec(yn.toLowerCase())||[];function Hn(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var r,i=0,o=t.toLowerCase().match(T)||[];if(x.isFunction(n))while(r=o[i++])"+"===r[0]?(r=r.slice(1)||"*",(e[r]=e[r]||[]).unshift(n)):(e[r]=e[r]||[]).push(n)}}function qn(e,n,r,i){var o={},a=e===jn;function s(l){var u;return o[l]=!0,x.each(e[l]||[],function(e,l){var c=l(n,r,i);return"string"!=typeof c||a||o[c]?a?!(u=c):t:(n.dataTypes.unshift(c),s(c),!1)}),u}return s(n.dataTypes[0])||!o["*"]&&s("*")}function _n(e,n){var r,i,o=x.ajaxSettings.flatOptions||{};for(i in n)n[i]!==t&&((o[i]?e:r||(r={}))[i]=n[i]);return r&&x.extend(!0,e,r),e}x.fn.load=function(e,n,r){if("string"!=typeof e&&Sn)return Sn.apply(this,arguments);var i,o,a,s=this,l=e.indexOf(" ");return l>=0&&(i=e.slice(l,e.length),e=e.slice(0,l)),x.isFunction(n)?(r=n,n=t):n&&"object"==typeof n&&(a="POST"),s.length>0&&x.ajax({url:e,type:a,dataType:"html",data:n}).done(function(e){o=arguments,s.html(i?x("<div>").append(x.parseHTML(e)).find(i):e)}).complete(r&&function(e,t){s.each(r,o||[e.responseText,t,e])}),this},x.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){x.fn[t]=function(e){return this.on(t,e)}}),x.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:yn,type:"GET",isLocal:Cn.test(mn[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Dn,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":x.parseJSON,"text xml":x.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?_n(_n(e,x.ajaxSettings),t):_n(x.ajaxSettings,e)},ajaxPrefilter:Hn(An),ajaxTransport:Hn(jn),ajax:function(e,n){"object"==typeof e&&(n=e,e=t),n=n||{};var r,i,o,a,s,l,u,c,p=x.ajaxSetup({},n),f=p.context||p,d=p.context&&(f.nodeType||f.jquery)?x(f):x.event,h=x.Deferred(),g=x.Callbacks("once memory"),m=p.statusCode||{},y={},v={},b=0,w="canceled",C={readyState:0,getResponseHeader:function(e){var t;if(2===b){if(!c){c={};while(t=Tn.exec(a))c[t[1].toLowerCase()]=t[2]}t=c[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return 2===b?a:null},setRequestHeader:function(e,t){var n=e.toLowerCase();return b||(e=v[n]=v[n]||e,y[e]=t),this},overrideMimeType:function(e){return b||(p.mimeType=e),this},statusCode:function(e){var t;if(e)if(2>b)for(t in e)m[t]=[m[t],e[t]];else C.always(e[C.status]);return this},abort:function(e){var t=e||w;return u&&u.abort(t),k(0,t),this}};if(h.promise(C).complete=g.add,C.success=C.done,C.error=C.fail,p.url=((e||p.url||yn)+"").replace(xn,"").replace(kn,mn[1]+"//"),p.type=n.method||n.type||p.method||p.type,p.dataTypes=x.trim(p.dataType||"*").toLowerCase().match(T)||[""],null==p.crossDomain&&(r=En.exec(p.url.toLowerCase()),p.crossDomain=!(!r||r[1]===mn[1]&&r[2]===mn[2]&&(r[3]||("http:"===r[1]?"80":"443"))===(mn[3]||("http:"===mn[1]?"80":"443")))),p.data&&p.processData&&"string"!=typeof p.data&&(p.data=x.param(p.data,p.traditional)),qn(An,p,n,C),2===b)return C;l=p.global,l&&0===x.active++&&x.event.trigger("ajaxStart"),p.type=p.type.toUpperCase(),p.hasContent=!Nn.test(p.type),o=p.url,p.hasContent||(p.data&&(o=p.url+=(bn.test(o)?"&":"?")+p.data,delete p.data),p.cache===!1&&(p.url=wn.test(o)?o.replace(wn,"$1_="+vn++):o+(bn.test(o)?"&":"?")+"_="+vn++)),p.ifModified&&(x.lastModified[o]&&C.setRequestHeader("If-Modified-Since",x.lastModified[o]),x.etag[o]&&C.setRequestHeader("If-None-Match",x.etag[o])),(p.data&&p.hasContent&&p.contentType!==!1||n.contentType)&&C.setRequestHeader("Content-Type",p.contentType),C.setRequestHeader("Accept",p.dataTypes[0]&&p.accepts[p.dataTypes[0]]?p.accepts[p.dataTypes[0]]+("*"!==p.dataTypes[0]?", "+Dn+"; q=0.01":""):p.accepts["*"]);for(i in p.headers)C.setRequestHeader(i,p.headers[i]);if(p.beforeSend&&(p.beforeSend.call(f,C,p)===!1||2===b))return C.abort();w="abort";for(i in{success:1,error:1,complete:1})C[i](p[i]);if(u=qn(jn,p,n,C)){C.readyState=1,l&&d.trigger("ajaxSend",[C,p]),p.async&&p.timeout>0&&(s=setTimeout(function(){C.abort("timeout")},p.timeout));try{b=1,u.send(y,k)}catch(N){if(!(2>b))throw N;k(-1,N)}}else k(-1,"No Transport");function k(e,n,r,i){var c,y,v,w,T,N=n;2!==b&&(b=2,s&&clearTimeout(s),u=t,a=i||"",C.readyState=e>0?4:0,c=e>=200&&300>e||304===e,r&&(w=Mn(p,C,r)),w=On(p,w,C,c),c?(p.ifModified&&(T=C.getResponseHeader("Last-Modified"),T&&(x.lastModified[o]=T),T=C.getResponseHeader("etag"),T&&(x.etag[o]=T)),204===e||"HEAD"===p.type?N="nocontent":304===e?N="notmodified":(N=w.state,y=w.data,v=w.error,c=!v)):(v=N,(e||!N)&&(N="error",0>e&&(e=0))),C.status=e,C.statusText=(n||N)+"",c?h.resolveWith(f,[y,N,C]):h.rejectWith(f,[C,N,v]),C.statusCode(m),m=t,l&&d.trigger(c?"ajaxSuccess":"ajaxError",[C,p,c?y:v]),g.fireWith(f,[C,N]),l&&(d.trigger("ajaxComplete",[C,p]),--x.active||x.event.trigger("ajaxStop")))}return C},getJSON:function(e,t,n){return x.get(e,t,n,"json")},getScript:function(e,n){return x.get(e,t,n,"script")}}),x.each(["get","post"],function(e,n){x[n]=function(e,r,i,o){return x.isFunction(r)&&(o=o||i,i=r,r=t),x.ajax({url:e,type:n,dataType:o,data:r,success:i})}});function Mn(e,n,r){var i,o,a,s,l=e.contents,u=e.dataTypes;while("*"===u[0])u.shift(),o===t&&(o=e.mimeType||n.getResponseHeader("Content-Type"));if(o)for(s in l)if(l[s]&&l[s].test(o)){u.unshift(s);break}if(u[0]in r)a=u[0];else{for(s in r){if(!u[0]||e.converters[s+" "+u[0]]){a=s;break}i||(i=s)}a=a||i}return a?(a!==u[0]&&u.unshift(a),r[a]):t}function On(e,t,n,r){var i,o,a,s,l,u={},c=e.dataTypes.slice();if(c[1])for(a in e.converters)u[a.toLowerCase()]=e.converters[a];o=c.shift();while(o)if(e.responseFields[o]&&(n[e.responseFields[o]]=t),!l&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),l=o,o=c.shift())if("*"===o)o=l;else if("*"!==l&&l!==o){if(a=u[l+" "+o]||u["* "+o],!a)for(i in u)if(s=i.split(" "),s[1]===o&&(a=u[l+" "+s[0]]||u["* "+s[0]])){a===!0?a=u[i]:u[i]!==!0&&(o=s[0],c.unshift(s[1]));break}if(a!==!0)if(a&&e["throws"])t=a(t);else try{t=a(t)}catch(p){return{state:"parsererror",error:a?p:"No conversion from "+l+" to "+o}}}return{state:"success",data:t}}x.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(e){return x.globalEval(e),e}}}),x.ajaxPrefilter("script",function(e){e.cache===t&&(e.cache=!1),e.crossDomain&&(e.type="GET",e.global=!1)}),x.ajaxTransport("script",function(e){if(e.crossDomain){var n,r=a.head||x("head")[0]||a.documentElement;return{send:function(t,i){n=a.createElement("script"),n.async=!0,e.scriptCharset&&(n.charset=e.scriptCharset),n.src=e.url,n.onload=n.onreadystatechange=function(e,t){(t||!n.readyState||/loaded|complete/.test(n.readyState))&&(n.onload=n.onreadystatechange=null,n.parentNode&&n.parentNode.removeChild(n),n=null,t||i(200,"success"))},r.insertBefore(n,r.firstChild)},abort:function(){n&&n.onload(t,!0)}}}});var Fn=[],Bn=/(=)\?(?=&|$)|\?\?/;x.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Fn.pop()||x.expando+"_"+vn++;return this[e]=!0,e}}),x.ajaxPrefilter("json jsonp",function(n,r,i){var o,a,s,l=n.jsonp!==!1&&(Bn.test(n.url)?"url":"string"==typeof n.data&&!(n.contentType||"").indexOf("application/x-www-form-urlencoded")&&Bn.test(n.data)&&"data");return l||"jsonp"===n.dataTypes[0]?(o=n.jsonpCallback=x.isFunction(n.jsonpCallback)?n.jsonpCallback():n.jsonpCallback,l?n[l]=n[l].replace(Bn,"$1"+o):n.jsonp!==!1&&(n.url+=(bn.test(n.url)?"&":"?")+n.jsonp+"="+o),n.converters["script json"]=function(){return s||x.error(o+" was not called"),s[0]},n.dataTypes[0]="json",a=e[o],e[o]=function(){s=arguments},i.always(function(){e[o]=a,n[o]&&(n.jsonpCallback=r.jsonpCallback,Fn.push(o)),s&&x.isFunction(a)&&a(s[0]),s=a=t}),"script"):t});var Pn,Rn,Wn=0,$n=e.ActiveXObject&&function(){var e;for(e in Pn)Pn[e](t,!0)};function In(){try{return new e.XMLHttpRequest}catch(t){}}function zn(){try{return new e.ActiveXObject("Microsoft.XMLHTTP")}catch(t){}}x.ajaxSettings.xhr=e.ActiveXObject?function(){return!this.isLocal&&In()||zn()}:In,Rn=x.ajaxSettings.xhr(),x.support.cors=!!Rn&&"withCredentials"in Rn,Rn=x.support.ajax=!!Rn,Rn&&x.ajaxTransport(function(n){if(!n.crossDomain||x.support.cors){var r;return{send:function(i,o){var a,s,l=n.xhr();if(n.username?l.open(n.type,n.url,n.async,n.username,n.password):l.open(n.type,n.url,n.async),n.xhrFields)for(s in n.xhrFields)l[s]=n.xhrFields[s];n.mimeType&&l.overrideMimeType&&l.overrideMimeType(n.mimeType),n.crossDomain||i["X-Requested-With"]||(i["X-Requested-With"]="XMLHttpRequest");try{for(s in i)l.setRequestHeader(s,i[s])}catch(u){}l.send(n.hasContent&&n.data||null),r=function(e,i){var s,u,c,p;try{if(r&&(i||4===l.readyState))if(r=t,a&&(l.onreadystatechange=x.noop,$n&&delete Pn[a]),i)4!==l.readyState&&l.abort();else{p={},s=l.status,u=l.getAllResponseHeaders(),"string"==typeof l.responseText&&(p.text=l.responseText);try{c=l.statusText}catch(f){c=""}s||!n.isLocal||n.crossDomain?1223===s&&(s=204):s=p.text?200:404}}catch(d){i||o(-1,d)}p&&o(s,c,p,u)},n.async?4===l.readyState?setTimeout(r):(a=++Wn,$n&&(Pn||(Pn={},x(e).unload($n)),Pn[a]=r),l.onreadystatechange=r):r()},abort:function(){r&&r(t,!0)}}}});var Xn,Un,Vn=/^(?:toggle|show|hide)$/,Yn=RegExp("^(?:([+-])=|)("+w+")([a-z%]*)$","i"),Jn=/queueHooks$/,Gn=[nr],Qn={"*":[function(e,t){var n=this.createTween(e,t),r=n.cur(),i=Yn.exec(t),o=i&&i[3]||(x.cssNumber[e]?"":"px"),a=(x.cssNumber[e]||"px"!==o&&+r)&&Yn.exec(x.css(n.elem,e)),s=1,l=20;if(a&&a[3]!==o){o=o||a[3],i=i||[],a=+r||1;do s=s||".5",a/=s,x.style(n.elem,e,a+o);while(s!==(s=n.cur()/r)&&1!==s&&--l)}return i&&(a=n.start=+a||+r||0,n.unit=o,n.end=i[1]?a+(i[1]+1)*i[2]:+i[2]),n}]};function Kn(){return setTimeout(function(){Xn=t}),Xn=x.now()}function Zn(e,t,n){var r,i=(Qn[t]||[]).concat(Qn["*"]),o=0,a=i.length;for(;a>o;o++)if(r=i[o].call(n,t,e))return r}function er(e,t,n){var r,i,o=0,a=Gn.length,s=x.Deferred().always(function(){delete l.elem}),l=function(){if(i)return!1;var t=Xn||Kn(),n=Math.max(0,u.startTime+u.duration-t),r=n/u.duration||0,o=1-r,a=0,l=u.tweens.length;for(;l>a;a++)u.tweens[a].run(o);return s.notifyWith(e,[u,o,n]),1>o&&l?n:(s.resolveWith(e,[u]),!1)},u=s.promise({elem:e,props:x.extend({},t),opts:x.extend(!0,{specialEasing:{}},n),originalProperties:t,originalOptions:n,startTime:Xn||Kn(),duration:n.duration,tweens:[],createTween:function(t,n){var r=x.Tween(e,u.opts,t,n,u.opts.specialEasing[t]||u.opts.easing);return u.tweens.push(r),r},stop:function(t){var n=0,r=t?u.tweens.length:0;if(i)return this;for(i=!0;r>n;n++)u.tweens[n].run(1);return t?s.resolveWith(e,[u,t]):s.rejectWith(e,[u,t]),this}}),c=u.props;for(tr(c,u.opts.specialEasing);a>o;o++)if(r=Gn[o].call(u,e,c,u.opts))return r;return x.map(c,Zn,u),x.isFunction(u.opts.start)&&u.opts.start.call(e,u),x.fx.timer(x.extend(l,{elem:e,anim:u,queue:u.opts.queue})),u.progress(u.opts.progress).done(u.opts.done,u.opts.complete).fail(u.opts.fail).always(u.opts.always)}function tr(e,t){var n,r,i,o,a;for(n in e)if(r=x.camelCase(n),i=t[r],o=e[n],x.isArray(o)&&(i=o[1],o=e[n]=o[0]),n!==r&&(e[r]=o,delete e[n]),a=x.cssHooks[r],a&&"expand"in a){o=a.expand(o),delete e[r];for(n in o)n in e||(e[n]=o[n],t[n]=i)}else t[r]=i}x.Animation=x.extend(er,{tweener:function(e,t){x.isFunction(e)?(t=e,e=["*"]):e=e.split(" ");var n,r=0,i=e.length;for(;i>r;r++)n=e[r],Qn[n]=Qn[n]||[],Qn[n].unshift(t)},prefilter:function(e,t){t?Gn.unshift(e):Gn.push(e)}});function nr(e,t,n){var r,i,o,a,s,l,u=this,c={},p=e.style,f=e.nodeType&&nn(e),d=x._data(e,"fxshow");n.queue||(s=x._queueHooks(e,"fx"),null==s.unqueued&&(s.unqueued=0,l=s.empty.fire,s.empty.fire=function(){s.unqueued||l()}),s.unqueued++,u.always(function(){u.always(function(){s.unqueued--,x.queue(e,"fx").length||s.empty.fire()})})),1===e.nodeType&&("height"in t||"width"in t)&&(n.overflow=[p.overflow,p.overflowX,p.overflowY],"inline"===x.css(e,"display")&&"none"===x.css(e,"float")&&(x.support.inlineBlockNeedsLayout&&"inline"!==ln(e.nodeName)?p.zoom=1:p.display="inline-block")),n.overflow&&(p.overflow="hidden",x.support.shrinkWrapBlocks||u.always(function(){p.overflow=n.overflow[0],p.overflowX=n.overflow[1],p.overflowY=n.overflow[2]}));for(r in t)if(i=t[r],Vn.exec(i)){if(delete t[r],o=o||"toggle"===i,i===(f?"hide":"show"))continue;c[r]=d&&d[r]||x.style(e,r)}if(!x.isEmptyObject(c)){d?"hidden"in d&&(f=d.hidden):d=x._data(e,"fxshow",{}),o&&(d.hidden=!f),f?x(e).show():u.done(function(){x(e).hide()}),u.done(function(){var t;x._removeData(e,"fxshow");for(t in c)x.style(e,t,c[t])});for(r in c)a=Zn(f?d[r]:0,r,u),r in d||(d[r]=a.start,f&&(a.end=a.start,a.start="width"===r||"height"===r?1:0))}}function rr(e,t,n,r,i){return new rr.prototype.init(e,t,n,r,i)}x.Tween=rr,rr.prototype={constructor:rr,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||"swing",this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(x.cssNumber[n]?"":"px")},cur:function(){var e=rr.propHooks[this.prop];return e&&e.get?e.get(this):rr.propHooks._default.get(this)},run:function(e){var t,n=rr.propHooks[this.prop];return this.pos=t=this.options.duration?x.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):rr.propHooks._default.set(this),this}},rr.prototype.init.prototype=rr.prototype,rr.propHooks={_default:{get:function(e){var t;return null==e.elem[e.prop]||e.elem.style&&null!=e.elem.style[e.prop]?(t=x.css(e.elem,e.prop,""),t&&"auto"!==t?t:0):e.elem[e.prop]},set:function(e){x.fx.step[e.prop]?x.fx.step[e.prop](e):e.elem.style&&(null!=e.elem.style[x.cssProps[e.prop]]||x.cssHooks[e.prop])?x.style(e.elem,e.prop,e.now+e.unit):e.elem[e.prop]=e.now}}},rr.propHooks.scrollTop=rr.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},x.each(["toggle","show","hide"],function(e,t){var n=x.fn[t];x.fn[t]=function(e,r,i){return null==e||"boolean"==typeof e?n.apply(this,arguments):this.animate(ir(t,!0),e,r,i)}}),x.fn.extend({fadeTo:function(e,t,n,r){return this.filter(nn).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(e,t,n,r){var i=x.isEmptyObject(e),o=x.speed(t,n,r),a=function(){var t=er(this,x.extend({},e),o);(i||x._data(this,"finish"))&&t.stop(!0)};return a.finish=a,i||o.queue===!1?this.each(a):this.queue(o.queue,a)},stop:function(e,n,r){var i=function(e){var t=e.stop;delete e.stop,t(r)};return"string"!=typeof e&&(r=n,n=e,e=t),n&&e!==!1&&this.queue(e||"fx",[]),this.each(function(){var t=!0,n=null!=e&&e+"queueHooks",o=x.timers,a=x._data(this);if(n)a[n]&&a[n].stop&&i(a[n]);else for(n in a)a[n]&&a[n].stop&&Jn.test(n)&&i(a[n]);for(n=o.length;n--;)o[n].elem!==this||null!=e&&o[n].queue!==e||(o[n].anim.stop(r),t=!1,o.splice(n,1));(t||!r)&&x.dequeue(this,e)})},finish:function(e){return e!==!1&&(e=e||"fx"),this.each(function(){var t,n=x._data(this),r=n[e+"queue"],i=n[e+"queueHooks"],o=x.timers,a=r?r.length:0;for(n.finish=!0,x.queue(this,e,[]),i&&i.stop&&i.stop.call(this,!0),t=o.length;t--;)o[t].elem===this&&o[t].queue===e&&(o[t].anim.stop(!0),o.splice(t,1));for(t=0;a>t;t++)r[t]&&r[t].finish&&r[t].finish.call(this);delete n.finish})}});function ir(e,t){var n,r={height:e},i=0;for(t=t?1:0;4>i;i+=2-t)n=Zt[i],r["margin"+n]=r["padding"+n]=e;return t&&(r.opacity=r.width=e),r}x.each({slideDown:ir("show"),slideUp:ir("hide"),slideToggle:ir("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){x.fn[e]=function(e,n,r){return this.animate(t,e,n,r)}}),x.speed=function(e,t,n){var r=e&&"object"==typeof e?x.extend({},e):{complete:n||!n&&t||x.isFunction(e)&&e,duration:e,easing:n&&t||t&&!x.isFunction(t)&&t};return r.duration=x.fx.off?0:"number"==typeof r.duration?r.duration:r.duration in x.fx.speeds?x.fx.speeds[r.duration]:x.fx.speeds._default,(null==r.queue||r.queue===!0)&&(r.queue="fx"),r.old=r.complete,r.complete=function(){x.isFunction(r.old)&&r.old.call(this),r.queue&&x.dequeue(this,r.queue)},r},x.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2}},x.timers=[],x.fx=rr.prototype.init,x.fx.tick=function(){var e,n=x.timers,r=0;for(Xn=x.now();n.length>r;r++)e=n[r],e()||n[r]!==e||n.splice(r--,1);n.length||x.fx.stop(),Xn=t},x.fx.timer=function(e){e()&&x.timers.push(e)&&x.fx.start()},x.fx.interval=13,x.fx.start=function(){Un||(Un=setInterval(x.fx.tick,x.fx.interval))},x.fx.stop=function(){clearInterval(Un),Un=null},x.fx.speeds={slow:600,fast:200,_default:400},x.fx.step={},x.expr&&x.expr.filters&&(x.expr.filters.animated=function(e){return x.grep(x.timers,function(t){return e===t.elem}).length}),x.fn.offset=function(e){if(arguments.length)return e===t?this:this.each(function(t){x.offset.setOffset(this,e,t)});var n,r,o={top:0,left:0},a=this[0],s=a&&a.ownerDocument;if(s)return n=s.documentElement,x.contains(n,a)?(typeof a.getBoundingClientRect!==i&&(o=a.getBoundingClientRect()),r=or(s),{top:o.top+(r.pageYOffset||n.scrollTop)-(n.clientTop||0),left:o.left+(r.pageXOffset||n.scrollLeft)-(n.clientLeft||0)}):o},x.offset={setOffset:function(e,t,n){var r=x.css(e,"position");"static"===r&&(e.style.position="relative");var i=x(e),o=i.offset(),a=x.css(e,"top"),s=x.css(e,"left"),l=("absolute"===r||"fixed"===r)&&x.inArray("auto",[a,s])>-1,u={},c={},p,f;l?(c=i.position(),p=c.top,f=c.left):(p=parseFloat(a)||0,f=parseFloat(s)||0),x.isFunction(t)&&(t=t.call(e,n,o)),null!=t.top&&(u.top=t.top-o.top+p),null!=t.left&&(u.left=t.left-o.left+f),"using"in t?t.using.call(e,u):i.css(u)}},x.fn.extend({position:function(){if(this[0]){var e,t,n={top:0,left:0},r=this[0];return"fixed"===x.css(r,"position")?t=r.getBoundingClientRect():(e=this.offsetParent(),t=this.offset(),x.nodeName(e[0],"html")||(n=e.offset()),n.top+=x.css(e[0],"borderTopWidth",!0),n.left+=x.css(e[0],"borderLeftWidth",!0)),{top:t.top-n.top-x.css(r,"marginTop",!0),left:t.left-n.left-x.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent||s;while(e&&!x.nodeName(e,"html")&&"static"===x.css(e,"position"))e=e.offsetParent;return e||s})}}),x.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,n){var r=/Y/.test(n);x.fn[e]=function(i){return x.access(this,function(e,i,o){var a=or(e);return o===t?a?n in a?a[n]:a.document.documentElement[i]:e[i]:(a?a.scrollTo(r?x(a).scrollLeft():o,r?o:x(a).scrollTop()):e[i]=o,t)},e,i,arguments.length,null)}});function or(e){return x.isWindow(e)?e:9===e.nodeType?e.defaultView||e.parentWindow:!1}x.each({Height:"height",Width:"width"},function(e,n){x.each({padding:"inner"+e,content:n,"":"outer"+e},function(r,i){x.fn[i]=function(i,o){var a=arguments.length&&(r||"boolean"!=typeof i),s=r||(i===!0||o===!0?"margin":"border");return x.access(this,function(n,r,i){var o;return x.isWindow(n)?n.document.documentElement["client"+e]:9===n.nodeType?(o=n.documentElement,Math.max(n.body["scroll"+e],o["scroll"+e],n.body["offset"+e],o["offset"+e],o["client"+e])):i===t?x.css(n,r,s):x.style(n,r,i,s)},n,a?i:t,a,null)}})}),x.fn.size=function(){return this.length},x.fn.andSelf=x.fn.addBack,"object"==typeof module&&module&&"object"==typeof module.exports?module.exports=x:(e.jQuery=e.$=x,"function"==typeof define&&define.amd&&define("jquery",[],function(){return x}))})(window);
vendor: 11,970 bytes, lines 6-12
6
7/*! jQuery UI - v1.10.3 - 2013-09-04
8* http://jqueryui.com
9* Includes: jquery.ui.core.js, jquery.ui.widget.js, jquery.ui.mouse.js, jquery.ui.position.js, jquery.ui.draggable.js, jquery.ui.droppable.js, jquery.ui.resizable.js, jquery.ui.selectable.js, jquery.ui.sortable.js, jquery.ui.accordion.js, jquery.ui.autocomplete.js, jquery.ui.button.js, jquery.ui.datepicker.js, jquery.ui.dialog.js, jquery.ui.menu.js, jquery.ui.progressbar.js, jquery.ui.slider.js, jquery.ui.spinner.js, jquery.ui.tabs.js, jquery.ui.tooltip.js, jquery.ui.effect.js, jquery.ui.effect-blind.js, jquery.ui.effect-bounce.js, jquery.ui.effect-clip.js, jquery.ui.effect-drop.js, jquery.ui.effect-explode.js, jquery.ui.effect-fade.js, jquery.ui.effect-fold.js, jquery.ui.effect-highlight.js, jquery.ui.effect-pulsate.js, jquery.ui.effect-scale.js, jquery.ui.effect-shake.js, jquery.ui.effect-slide.js, jquery.ui.effect-transfer.js
10* Copyright 2013 jQuery Foundation and other contributors Licensed MIT */
11
12(function(e,t){function i(t,i){var a,n,r,o=t.nodeName.toLowerCase();return"area"===o?(a=t.parentNode,n=a.name,t.href&&n&&"map"===a.nodeName.toLowerCase()?(r=e("img[usemap=#"+n+"]")[0],!!r&&s(r)):!1):(/input|select|textarea|button|object/.test(o)?!t.disabled:"a"===o?t.href||i:i)&&s(t)}function s(t){return e.expr.filters.visible(t)&&!e(t).parents().addBack().filter(function(){return"hidden"===e.css(this,"visibility")}).length}var a=0,n=/^ui-id-\d+$/;e.ui=e.ui||{},e.extend(e.ui,{version:"1.10.3",keyCode:{BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38}}),e.fn.extend({focus:function(t){return function(i,s){return"number"==typeof i?this.each(function(){var t=this;setTimeout(function(){e(t).focus(),s&&s.call(t)},i)}):t.apply(this,arguments)}}(e.fn.focus),scrollParent:function(){var t;return t=e.ui.ie&&/(static|relative)/.test(this.css("position"))||/absolute/.test(this.css("position"))?this.parents().filter(function(){return/(relative|absolute|fixed)/.test(e.css(this,"position"))&&/(auto|scroll)/.test(e.css(this,"overflow")+e.css(this,"overflow-y")+e.css(this,"overflow-x"))}).eq(0):this.parents().filter(function(){return/(auto|scroll)/.test(e.css(this,"overflow")+e.css(this,"overflow-y")+e.css(this,"overflow-x"))}).eq(0),/fixed/.test(this.css("position"))||!t.length?e(document):t},zIndex:function(i){if(i!==t)return this.css("zIndex",i);if(this.length)for(var s,a,n=e(this[0]);n.length&&n[0]!==document;){if(s=n.css("position"),("absolute"===s||"relative"===s||"fixed"===s)&&(a=parseInt(n.css("zIndex"),10),!isNaN(a)&&0!==a))return a;n=n.parent()}return 0},uniqueId:function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++a)})},removeUniqueId:function(){return this.each(function(){n.test(this.id)&&e(this).removeAttr("id")})}}),e.extend(e.expr[":"],{data:e.expr.createPseudo?e.expr.createPseudo(function(t){return function(i){return!!e.data(i,t)}}):function(t,i,s){return!!e.data(t,s[3])},focusable:function(t){return i(t,!isNaN(e.attr(t,"tabindex")))},tabbable:function(t){var s=e.attr(t,"tabindex"),a=isNaN(s);return(a||s>=0)&&i(t,!a)}}),e("<a>").outerWidth(1).jquery||e.each(["Width","Height"],function(i,s){function a(t,i,s,a){return e.each(n,function(){i-=parseFloat(e.css(t,"padding"+this))||0,s&&(i-=parseFloat(e.css(t,"border"+this+"Width"))||0),a&&(i-=parseFloat(e.css(t,"margin"+this))||0)}),i}var n="Width"===s?["Left","Right"]:["Top","Bottom"],r=s.toLowerCase(),o={innerWidth:e.fn.innerWidth,innerHeight:e.fn.innerHeight,outerWidth:e.fn.outerWidth,outerHeight:e.fn.outerHeight};e.fn["inner"+s]=function(i){return i===t?o["inner"+s].call(this):this.each(function(){e(this).css(r,a(this,i)+"px")})},e.fn["outer"+s]=function(t,i){return"number"!=typeof t?o["outer"+s].call(this,t):this.each(function(){e(this).css(r,a(this,t,!0,i)+"px")})}}),e.fn.addBack||(e.fn.addBack=function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}),e("<a>").data("a-b","a").removeData("a-b").data("a-b")&&(e.fn.removeData=function(t){return function(i){return arguments.length?t.call(this,e.camelCase(i)):t.call(this)}}(e.fn.removeData)),e.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase()),e.support.selectstart="onselectstart"in document.createElement("div"),e.fn.extend({disableSelection:function(){return this.bind((e.support.selectstart?"selectstart":"mousedown")+".ui-disableSelection",function(e){e.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")}}),e.extend(e.ui,{plugin:{add:function(t,i,s){var a,n=e.ui[t].prototype;for(a in s)n.plugins[a]=n.plugins[a]||[],n.plugins[a].push([i,s[a]])},call:function(e,t,i){var s,a=e.plugins[t];if(a&&e.element[0].parentNode&&11!==e.element[0].parentNode.nodeType)for(s=0;a.length>s;s++)e.options[a[s][0]]&&a[s][1].apply(e.element,i)}},hasScroll:function(t,i){if("hidden"===e(t).css("overflow"))return!1;var s=i&&"left"===i?"scrollLeft":"scrollTop",a=!1;return t[s]>0?!0:(t[s]=1,a=t[s]>0,t[s]=0,a)}})})(jQuery);(function(e,t){var i=0,s=Array.prototype.slice,n=e.cleanData;e.cleanData=function(t){for(var i,s=0;null!=(i=t[s]);s++)try{e(i).triggerHandler("remove")}catch(a){}n(t)},e.widget=function(i,s,n){var a,r,o,h,l={},u=i.split(".")[0];i=i.split(".")[1],a=u+"-"+i,n||(n=s,s=e.Widget),e.expr[":"][a.toLowerCase()]=function(t){return!!e.data(t,a)},e[u]=e[u]||{},r=e[u][i],o=e[u][i]=function(e,i){return this._createWidget?(arguments.length&&this._createWidget(e,i),t):new o(e,i)},e.extend(o,r,{version:n.version,_proto:e.extend({},n),_childConstructors:[]}),h=new s,h.options=e.widget.extend({},h.options),e.each(n,function(i,n){return e.isFunction(n)?(l[i]=function(){var e=function(){return s.prototype[i].apply(this,arguments)},t=function(e){return s.prototype[i].apply(this,e)};return function(){var i,s=this._super,a=this._superApply;return this._super=e,this._superApply=t,i=n.apply(this,arguments),this._super=s,this._superApply=a,i}}(),t):(l[i]=n,t)}),o.prototype=e.widget.extend(h,{widgetEventPrefix:r?h.widgetEventPrefix:i},l,{constructor:o,namespace:u,widgetName:i,widgetFullName:a}),r?(e.each(r._childConstructors,function(t,i){var s=i.prototype;e.widget(s.namespace+"."+s.widgetName,o,i._proto)}),delete r._childConstructors):s._childConstructors.push(o),e.widget.bridge(i,o)},e.widget.extend=function(i){for(var n,a,r=s.call(arguments,1),o=0,h=r.length;h>o;o++)for(n in r[o])a=r[o][n],r[o].hasOwnProperty(n)&&a!==t&&(i[n]=e.isPlainObject(a)?e.isPlainObject(i[n])?e.widget.extend({},i[n],a):e.widget.extend({},a):a);return i},e.widget.bridge=function(i,n){var a=n.prototype.widgetFullName||i;e.fn[i]=function(r){var o="string"==typeof r,h=s.call(arguments,1),l=this;return r=!o&&h.length?e.widget.extend.apply(null,[r].concat(h)):r,o?this.each(function(){var s,n=e.data(this,a);return n?e.isFunction(n[r])&&"_"!==r.charAt(0)?(s=n[r].apply(n,h),s!==n&&s!==t?(l=s&&s.jquery?l.pushStack(s.get()):s,!1):t):e.error("no such method '"+r+"' for "+i+" widget instance"):e.error("cannot call methods on "+i+" prior to initialization; "+"attempted to call method '"+r+"'")}):this.each(function(){var t=e.data(this,a);t?t.option(r||{})._init():e.data(this,a,new n(r,this))}),l}},e.Widget=function(){},e.Widget._childConstructors=[],e.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{disabled:!1,create:null},_createWidget:function(t,s){s=e(s||this.defaultElement||this)[0],this.element=e(s),this.uuid=i++,this.eventNamespace="."+this.widgetName+this.uuid,this.options=e.widget.extend({},this.options,this._getCreateOptions(),t),this.bindings=e(),this.hoverable=e(),this.focusable=e(),s!==this&&(e.data(s,this.widgetFullName,this),this._on(!0,this.element,{remove:function(e){e.target===s&&this.destroy()}}),this.document=e(s.style?s.ownerDocument:s.document||s),this.window=e(this.document[0].defaultView||this.document[0].parentWindow)),this._create(),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:e.noop,_getCreateEventData:e.noop,_create:e.noop,_init:e.noop,destroy:function(){this._destroy(),this.element.unbind(this.eventNamespace).removeData(this.widgetName).removeData(this.widgetFullName).removeData(e.camelCase(this.widgetFullName)),this.widget().unbind(this.eventNamespace).removeAttr("aria-disabled").removeClass(this.widgetFullName+"-disabled "+"ui-state-disabled"),this.bindings.unbind(this.eventNamespace),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")},_destroy:e.noop,widget:function(){return this.element},option:function(i,s){var n,a,r,o=i;if(0===arguments.length)return e.widget.extend({},this.options);if("string"==typeof i)if(o={},n=i.split("."),i=n.shift(),n.length){for(a=o[i]=e.widget.extend({},this.options[i]),r=0;n.length-1>r;r++)a[n[r]]=a[n[r]]||{},a=a[n[r]];if(i=n.pop(),s===t)return a[i]===t?null:a[i];a[i]=s}else{if(s===t)return this.options[i]===t?null:this.options[i];o[i]=s}return this._setOptions(o),this},_setOptions:function(e){var t;for(t in e)this._setOption(t,e[t]);return this},_setOption:function(e,t){return this.options[e]=t,"disabled"===e&&(this.widget().toggleClass(this.widgetFullName+"-disabled ui-state-disabled",!!t).attr("aria-disabled",t),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")),this},enable:function(){return this._setOption("disabled",!1)},disable:function(){return this._setOption("disabled",!0)},_on:function(i,s,n){var a,r=this;"boolean"!=typeof i&&(n=s,s=i,i=!1),n?(s=a=e(s),this.bindings=this.bindings.add(s)):(n=s,s=this.element,a=this.widget()),e.each(n,function(n,o){function h(){return i||r.options.disabled!==!0&&!e(this).hasClass("ui-state-disabled")?("string"==typeof o?r[o]:o).apply(r,arguments):t}"string"!=typeof o&&(h.guid=o.guid=o.guid||h.guid||e.guid++);var l=n.match(/^(\w+)\s*(.*)$/),u=l[1]+r.eventNamespace,c=l[2];c?a.delegate(c,u,h):s.bind(u,h)})},_off:function(e,t){t=(t||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,e.unbind(t).undelegate(t)},_delay:function(e,t){function i(){return("string"==typeof e?s[e]:e).apply(s,arguments)}var s=this;return setTimeout(i,t||0)},_hoverable:function(t){this.hoverable=this.hoverable.add(t),this._on(t,{mouseenter:function(t){e(t.currentTarget).addClass("ui-state-hover")},mouseleave:function(t){e(t.currentTarget).removeClass("ui-state-hover")}})},_focusable:function(t){this.focusable=this.focusable.add(t),this._on(t,{focusin:function(t){e(t.currentTarget).addClass("ui-state-focus")},focusout:function(t){e(t.currentTarget).removeClass("ui-state-focus")}})},_trigger:function(t,i,s){var n,a,r=this.options[t];if(s=s||{},i=e.Event(i),i.type=(t===this.widgetEventPrefix?t:this.widgetEventPrefix+t).toLowerCase(),i.target=this.element[0],a=i.originalEvent)for(n in a)n in i||(i[n]=a[n]);return this.element.trigger(i,s),!(e.isFunction(r)&&r.apply(this.element[0],[i].concat(s))===!1||i.isDefaultPrevented())}},e.each({show:"fadeIn",hide:"fadeOut"},function(t,i){e.Widget.prototype["_"+t]=function(s,n,a){"string"==typeof n&&(n={effect:n});var r,o=n?n===!0||"number"==typeof n?i:n.effect||i:t;n=n||{},"number"==typeof n&&(n={duration:n}),r=!e.isEmptyObject(n),n.complete=a,n.delay&&s.delay(n.delay),r&&e.effects&&e.effects.effect[o]?s[t](n):o!==t&&s[o]?s[o](n.duration,n.easing,a):s.queue(function(i){e(this)[t](),a&&a.call(s[0]),i()})}})})(jQuery);(function(e){var t=!1;e(document).mouseup(function(){t=!1}),e.widget("ui.mouse",{version:"1.10.3",options:{cancel:"input,textarea,button,select,option",distance:1,delay:0},_mouseInit:function(){var t=this;this.element.bind("mousedown."+this.widgetName,function(e){return t._mouseDown(e)}).bind("click."+this.widgetName,function(i){return!0===e.data(i.target,t.widgetName+".preventClickEvent")?(e.removeData(i.target,t.widgetName+".preventClickEvent"),i.stopImmediatePropagation(),!1):u
vendor: 4,328 bytes, line 12
12ndefined}),this.started=!1},_mouseDestroy:function(){this.element.unbind("."+this.widgetName),this._mouseMoveDelegate&&e(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(i){if(!t){this._mouseStarted&&this._mouseUp(i),this._mouseDownEvent=i;var s=this,n=1===i.which,a="string"==typeof this.options.cancel&&i.target.nodeName?e(i.target).closest(this.options.cancel).length:!1;return n&&!a&&this._mouseCapture(i)?(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){s.mouseDelayMet=!0},this.options.delay)),this._mouseDistanceMet(i)&&this._mouseDelayMet(i)&&(this._mouseStarted=this._mouseStart(i)!==!1,!this._mouseStarted)?(i.preventDefault(),!0):(!0===e.data(i.target,this.widgetName+".preventClickEvent")&&e.removeData(i.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(e){return s._mouseMove(e)},this._mouseUpDelegate=function(e){return s._mouseUp(e)},e(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate),i.preventDefault(),t=!0,!0)):!0}},_mouseMove:function(t){return e.ui.ie&&(!document.documentMode||9>document.documentMode)&&!t.button?this._mouseUp(t):this._mouseStarted?(this._mouseDrag(t),t.preventDefault()):(this._mouseDistanceMet(t)&&this._mouseDelayMet(t)&&(this._mouseStarted=this._mouseStart(this._mouseDownEvent,t)!==!1,this._mouseStarted?this._mouseDrag(t):this._mouseUp(t)),!this._mouseStarted)},_mouseUp:function(t){return e(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,t.target===this._mouseDownEvent.target&&e.data(t.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(t)),!1},_mouseDistanceMet:function(e){return Math.max(Math.abs(this._mouseDownEvent.pageX-e.pageX),Math.abs(this._mouseDownEvent.pageY-e.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}})})(jQuery);(function(t,e){function i(t,e,i){return[parseFloat(t[0])*(p.test(t[0])?e/100:1),parseFloat(t[1])*(p.test(t[1])?i/100:1)]}function s(e,i){return parseInt(t.css(e,i),10)||0}function n(e){var i=e[0];return 9===i.nodeType?{width:e.width(),height:e.height(),offset:{top:0,left:0}}:t.isWindow(i)?{width:e.width(),height:e.height(),offset:{top:e.scrollTop(),left:e.scrollLeft()}}:i.preventDefault?{width:0,height:0,offset:{top:i.pageY,left:i.pageX}}:{width:e.outerWidth(),height:e.outerHeight(),offset:e.offset()}}t.ui=t.ui||{};var a,o=Math.max,r=Math.abs,h=Math.round,l=/left|center|right/,c=/top|center|bottom/,u=/[\+\-]\d+(\.[\d]+)?%?/,d=/^\w+/,p=/%$/,f=t.fn.position;t.position={scrollbarWidth:function(){if(a!==e)return a;var i,s,n=t("<div style='display:block;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>"),o=n.children()[0];return t("body").append(n),i=o.offsetWidth,n.css("overflow","scroll"),s=o.offsetWidth,i===s&&(s=n[0].clientWidth),n.remove(),a=i-s},getScrollInfo:function(e){var i=e.isWindow?"":e.element.css("overflow-x"),s=e.isWindow?"":e.element.css("overflow-y"),n="scroll"===i||"auto"===i&&e.width<e.element[0].scrollWidth,a="scroll"===s||"auto"===s&&e.height<e.element[0].scrollHeight;return{width:a?t.position.scrollbarWidth():0,height:n?t.position.scrollbarWidth():0}},getWithinInfo:function(e){var i=t(e||window),s=t.isWindow(i[0]);return{element:i,isWindow:s,offset:i.offset()||{left:0,top:0},scrollLeft:i.scrollLeft(),scrollTop:i.scrollTop(),width:s?i.width():i.outerWidth(),height:s?i.height():i.outerHeight()}}},t.fn.position=function(e){if(!e||!e.of)return f.apply(this,arguments);e=t.extend({},e);var a,p,m,g,v,b,_=t(e.of),y=t.position.getWithinInfo(e.within),w=t.position.getScrollInfo(y),x=(e.collision||"flip").split(" "),k={};return b=n(_),_[0].preventDefault&&(e.at="left top"),p=b.width,m=b.height,g=b.offset,v=t.extend({},g),t.each(["my","at"],function(){var t,i,s=(e[this]||"").split(" ");1===s.length&&(s=l.test(s[0])?s.concat(["center"]):c.test(s[0])?["center"].concat(s):["center","center"]),s[0]=l.test(s[0])?s[0]:"center",s[
vendor: 1,314 bytes, line 12
121]=c.test(s[1])?s[1]:"center",t=u.exec(s[0]),i=u.exec(s[1]),k[this]=[t?t[0]:0,i?i[0]:0],e[this]=[d.exec(s[0])[0],d.exec(s[1])[0]]}),1===x.length&&(x[1]=x[0]),"right"===e.at[0]?v.left+=p:"center"===e.at[0]&&(v.left+=p/2),"bottom"===e.at[1]?v.top+=m:"center"===e.at[1]&&(v.top+=m/2),a=i(k.at,p,m),v.left+=a[0],v.top+=a[1],this.each(function(){var n,l,c=t(this),u=c.outerWidth(),d=c.outerHeight(),f=s(this,"marginLeft"),b=s(this,"marginTop"),D=u+f+s(this,"marginRight")+w.width,T=d+b+s(this,"marginBottom")+w.height,C=t.extend({},v),M=i(k.my,c.outerWidth(),c.outerHeight());"right"===e.my[0]?C.left-=u:"center"===e.my[0]&&(C.left-=u/2),"bottom"===e.my[1]?C.top-=d:"center"===e.my[1]&&(C.top-=d/2),C.left+=M[0],C.top+=M[1],t.support.offsetFractions||(C.left=h(C.left),C.top=h(C.top)),n={marginLeft:f,marginTop:b},t.each(["left","top"],function(i,s){t.ui.position[x[i]]&&t.ui.position[x[i]][s](C,{targetWidth:p,targetHeight:m,elemWidth:u,elemHeight:d,collisionPosition:n,collisionWidth:D,collisionHeight:T,offset:[a[0]+M[0],a[1]+M[1]],my:e.my,at:e.at,within:y,elem:c})}),e.using&&(l=function(t){var i=g.left-C.left,s=i+p-u,n=g.top-C.top,a=n+m-d,h={target:{element:_,left:g.left,top:g.top,width:p,height:m},element:{element:c,left:C.left,top:C.top,width:u,height:d},horizontal:0>s?"left":i>0?"right":"center",vertical:0>
vendor: 34,597 bytes, line 12
12a?"top":n>0?"bottom":"middle"};u>p&&p>r(i+s)&&(h.horizontal="center"),d>m&&m>r(n+a)&&(h.vertical="middle"),h.important=o(r(i),r(s))>o(r(n),r(a))?"horizontal":"vertical",e.using.call(this,t,h)}),c.offset(t.extend(C,{using:l}))})},t.ui.position={fit:{left:function(t,e){var i,s=e.within,n=s.isWindow?s.scrollLeft:s.offset.left,a=s.width,r=t.left-e.collisionPosition.marginLeft,h=n-r,l=r+e.collisionWidth-a-n;e.collisionWidth>a?h>0&&0>=l?(i=t.left+h+e.collisionWidth-a-n,t.left+=h-i):t.left=l>0&&0>=h?n:h>l?n+a-e.collisionWidth:n:h>0?t.left+=h:l>0?t.left-=l:t.left=o(t.left-r,t.left)},top:function(t,e){var i,s=e.within,n=s.isWindow?s.scrollTop:s.offset.top,a=e.within.height,r=t.top-e.collisionPosition.marginTop,h=n-r,l=r+e.collisionHeight-a-n;e.collisionHeight>a?h>0&&0>=l?(i=t.top+h+e.collisionHeight-a-n,t.top+=h-i):t.top=l>0&&0>=h?n:h>l?n+a-e.collisionHeight:n:h>0?t.top+=h:l>0?t.top-=l:t.top=o(t.top-r,t.top)}},flip:{left:function(t,e){var i,s,n=e.within,a=n.offset.left+n.scrollLeft,o=n.width,h=n.isWindow?n.scrollLeft:n.offset.left,l=t.left-e.collisionPosition.marginLeft,c=l-h,u=l+e.collisionWidth-o-h,d="left"===e.my[0]?-e.elemWidth:"right"===e.my[0]?e.elemWidth:0,p="left"===e.at[0]?e.targetWidth:"right"===e.at[0]?-e.targetWidth:0,f=-2*e.offset[0];0>c?(i=t.left+d+p+f+e.collisionWidth-o-a,(0>i||r(c)>i)&&(t.left+=d+p+f)):u>0&&(s=t.left-e.collisionPosition.marginLeft+d+p+f-h,(s>0||u>r(s))&&(t.left+=d+p+f))},top:function(t,e){var i,s,n=e.within,a=n.offset.top+n.scrollTop,o=n.height,h=n.isWindow?n.scrollTop:n.offset.top,l=t.top-e.collisionPosition.marginTop,c=l-h,u=l+e.collisionHeight-o-h,d="top"===e.my[1],p=d?-e.elemHeight:"bottom"===e.my[1]?e.elemHeight:0,f="top"===e.at[1]?e.targetHeight:"bottom"===e.at[1]?-e.targetHeight:0,m=-2*e.offset[1];0>c?(s=t.top+p+f+m+e.collisionHeight-o-a,t.top+p+f+m>c&&(0>s||r(c)>s)&&(t.top+=p+f+m)):u>0&&(i=t.top-e.collisionPosition.marginTop+p+f+m-h,t.top+p+f+m>u&&(i>0||u>r(i))&&(t.top+=p+f+m))}},flipfit:{left:function(){t.ui.position.flip.left.apply(this,arguments),t.ui.position.fit.left.apply(this,arguments)},top:function(){t.ui.position.flip.top.apply(this,arguments),t.ui.position.fit.top.apply(this,arguments)}}},function(){var e,i,s,n,a,o=document.getElementsByTagName("body")[0],r=document.createElement("div");e=document.createElement(o?"div":"body"),s={visibility:"hidden",width:0,height:0,border:0,margin:0,background:"none"},o&&t.extend(s,{position:"absolute",left:"-1000px",top:"-1000px"});for(a in s)e.style[a]=s[a];e.appendChild(r),i=o||document.documentElement,i.insertBefore(e,i.firstChild),r.style.cssText="position: absolute; left: 10.7432222px;",n=t(r).offset().left,t.support.offsetFractions=n>10&&11>n,e.innerHTML="",i.removeChild(e)}()})(jQuery);(function(e){e.widget("ui.draggable",e.ui.mouse,{version:"1.10.3",widgetEventPrefix:"drag",options:{addClasses:!0,appendTo:"parent",axis:!1,connectToSortable:!1,containment:!1,cursor:"auto",cursorAt:!1,grid:!1,handle:!1,helper:"original",iframeFix:!1,opacity:!1,refreshPositions:!1,revert:!1,revertDuration:500,scope:"default",scroll:!0,scrollSensitivity:20,scrollSpeed:20,snap:!1,snapMode:"both",snapTolerance:20,stack:!1,zIndex:!1,drag:null,start:null,stop:null},_create:function(){"original"!==this.options.helper||/^(?:r|a|f)/.test(this.element.css("position"))||(this.element[0].style.position="relative"),this.options.addClasses&&this.element.addClass("ui-draggable"),this.options.disabled&&this.element.addClass("ui-draggable-disabled"),this._mouseInit()},_destroy:function(){this.element.removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled"),this._mouseDestroy()},_mouseCapture:function(t){var i=this.options;return this.helper||i.disabled||e(t.target).closest(".ui-resizable-handle").length>0?!1:(this.handle=this._getHandle(t),this.handle?(e(i.iframeFix===!0?"iframe":i.iframeFix).each(function(){e("<div class='ui-draggable-iframeFix' style='background: #fff;'></div>").css({width:this.offsetWidth+"px",height:this.offsetHeight+"px",position:"absolute",opacity:"0.001",zIndex:1e3}).css(e(this).offset()).appendTo("body")}),!0):!1)},_mouseStart:function(t){var i=this.options;return this.helper=this._createHelper(t),this.helper.addClass("ui-draggable-dragging"),this._cacheHelperProportions(),e.ui.ddmanager&&(e.ui.ddmanager.current=this),this._cacheMargins(),this.cssPosition=this.helper.css("position"),this.scrollParent=this.helper.scrollParent(),this.offsetParent=this.helper.offsetParent(),this.offsetParentCssPosition=this.offsetParent.css("position"),this.offset=this.positionAbs=this.element.offset(),this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left},this.offset.scroll=!1,e.extend(this.offset,{click:{left:t.pageX-this.offset.left,top:t.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}),this.originalPosition=this.position=this._generatePosition(t),this.originalPageX=t.pageX,this.originalPageY=t.pageY,i.cursorAt&&this._adjustOffsetFromHelper(i.cursorAt),this._setContainment(),this._trigger("start",t)===!1?(this._clear(),!1):(this._cacheHelperProportions(),e.ui.ddmanager&&!i.dropBehaviour&&e.ui.ddmanager.prepareOffsets(this,t),this._mouseDrag(t,!0),e.ui.ddmanager&&e.ui.ddmanager.dragStart(this,t),!0)},_mouseDrag:function(t,i){if("fixed"===this.offsetParentCssPosition&&(this.offset.parent=this._getParentOffset()),this.position=this._generatePosition(t),this.positionAbs=this._convertPositionTo("absolute"),!i){var s=this._uiHash();if(this._trigger("drag",t,s)===!1)return this._mouseUp({}),!1;this.position=s.position}return this.options.axis&&"y"===this.options.axis||(this.helper[0].style.left=this.position.left+"px"),this.options.axis&&"x"===this.options.axis||(this.helper[0].style.top=this.position.top+"px"),e.ui.ddmanager&&e.ui.ddmanager.drag(this,t),!1},_mouseStop:function(t){var i=this,s=!1;return e.ui.ddmanager&&!this.options.dropBehaviour&&(s=e.ui.ddmanager.drop(this,t)),this.dropped&&(s=this.dropped,this.dropped=!1),"original"!==this.options.helper||e.contains(this.element[0].ownerDocument,this.element[0])?("invalid"===this.options.revert&&!s||"valid"===this.options.revert&&s||this.options.revert===!0||e.isFunction(this.options.revert)&&this.options.revert.call(this.element,s)?e(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){i._trigger("stop",t)!==!1&&i._clear()}):this._trigger("stop",t)!==!1&&this._clear(),!1):!1},_mouseUp:function(t){return e("div.ui-draggable-iframeFix").each(function(){this.parentNode.removeChild(this)}),e.ui.ddmanager&&e.ui.ddmanager.dragStop(this,t),e.ui.mouse.prototype._mouseUp.call(this,t)},cancel:function(){return this.helper.is(".ui-draggable-dragging")?this._mouseUp({}):this._clear(),this},_getHandle:function(t){return this.options.handle?!!e(t.target).closest(this.element.find(this.options.handle)).length:!0},_createHelper:function(t){var i=this.options,s=e.isFunction(i.helper)?e(i.helper.apply(this.element[0],[t])):"clone"===i.helper?this.element.clone().removeAttr("id"):this.element;return s.parents("body").length||s.appendTo("parent"===i.appendTo?this.element[0].parentNode:i.appendTo),s[0]===this.element[0]||/(fixed|absolute)/.test(s.css("position"))||s.css("position","absolute"),s},_adjustOffsetFromHelper:function(t){"string"==typeof t&&(t=t.split(" ")),e.isArray(t)&&(t={left:+t[0],top:+t[1]||0}),"left"in t&&(this.offset.click.left=t.left+this.margins.left),"right"in t&&(this.offset.click.left=this.helperProportions.width-t.right+this.margins.left),"top"in t&&(this.offset.click.top=t.top+this.margins.top),"bottom"in t&&(this.offset.click.top=this.helperProportions.height-t.bottom+this.margins.top)},_getParentOffset:function(){var t=this.offsetParent.offset();return"absolute"===this.cssPosition&&this.scrollParent[0]!==document&&e.contains(this.scrollParent[0],this.offsetParent[0])&&(t.left+=this.scrollParent.scrollLeft(),t.top+=this.scrollParent.scrollTop()),(this.offsetParent[0]===document.body||this.offsetParent[0].tagName&&"html"===this.offsetParent[0].tagName.toLowerCase()&&e.ui.ie)&&(t={top:0,left:0}),{top:t.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:t.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"===this.cssPosition){var e=this.element.position();return{top:e.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:e.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.element.css("marginLeft"),10)||0,top:parseInt(this.element.css("marginTop"),10)||0,right:parseInt(this.element.css("marginRight"),10)||0,bottom:parseInt(this.element.css("marginBottom"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var t,i,s,n=this.options;return n.containment?"window"===n.containment?(this.containment=[e(window).scrollLeft()-this.offset.relative.left-this.offset.parent.left,e(window).scrollTop()-this.offset.relative.top-this.offset.parent.top,e(window).scrollLeft()+e(window).width()-this.helperProportions.width-this.margins.left,e(window).scrollTop()+(e(window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top],undefined):"document"===n.containment?(this.containment=[0,0,e(document).width()-this.helperProportions.width-this.margins.left,(e(document).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top],undefined):n.containment.constructor===Array?(this.containment=n.containment,undefined):("parent"===n.containment&&(n.containment=this.helper[0].parentNode),i=e(n.containment),s=i[0],s&&(t="hidden"!==i.css("overflow"),this.containment=[(parseInt(i.css("borderLeftWidth"),10)||0)+(parseInt(i.css("paddingLeft"),10)||0),(parseInt(i.css("borderTopWidth"),10)||0)+(parseInt(i.css("paddingTop"),10)||0),(t?Math.max(s.scrollWidth,s.offsetWidth):s.offsetWidth)-(parseInt(i.css("borderRightWidth"),10)||0)-(parseInt(i.css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(t?Math.max(s.scrollHeight,s.offsetHeight):s.offsetHeight)-(parseInt(i.css("borderBottomWidth"),10)||0)-(parseInt(i.css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom],this.relative_container=i),undefined):(this.containment=null,undefined)},_convertPositionTo:function(t,i){i||(i=this.position);var s="absolute"===t?1:-1,n="absolute"!==this.cssPosition||this.scrollParent[0]!==document&&e.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent;return this.offset.scroll||(this.offset.scroll={top:n.scrollTop(),left:n.scrollLeft()}),{top:i.top+this.offset.relative.top*s+this.offset.parent.top*s-("fixed"===this.cssPosition?-this.scrollParent.scrollTop():this.offset.scroll.top)*s,left:i.left+this.offset.relative.left*s+this.offset.parent.left*s-("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():this.offset.scroll.left)*s}},_generatePosition:function(t){var i,s,n,a,o=this.options,r="absolute"!==this.cssPosition||this.scrollParent[0]!==document&&e.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,h=t.pageX,l=t.pageY;return this.offset.scroll||(this.offset.scroll={top:r.scrollTop(),left:r.scrollLeft()}),this.originalPosition&&(this.containment&&(this.relative_container?(s=this.relative_container.offset(),i=[this.containment[0]+s.left,this.containment[1]+s.top,this.containment[2]+s.left,this.containment[3]+s.top]):i=this.containment,t.pageX-this.offset.click.left<i[0]&&(h=i[0]+this.offset.click.left),t.pageY-this.offset.click.top<i[1]&&(l=i[1]+this.offset.click.top),t.pageX-this.offset.click.left>i[2]&&(h=i[2]+this.offset.click.left),t.pageY-this.offset.click.top>i[3]&&(l=i[3]+this.offset.click.top)),o.grid&&(n=o.grid[1]?this.originalPageY+Math.round((l-this.originalPageY)/o.grid[1])*o.grid[1]:this.originalPageY,l=i?n-this.offset.click.top>=i[1]||n-this.offset.click.top>i[3]?n:n-this.offset.click.top>=i[1]?n-o.grid[1]:n+o.grid[1]:n,a=o.grid[0]?this.originalPageX+Math.round((h-this.originalPageX)/o.grid[0])*o.grid[0]:this.originalPageX,h=i?a-this.offset.click.left>=i[0]||a-this.offset.click.left>i[2]?a:a-this.offset.click.left>=i[0]?a-o.grid[0]:a+o.grid[0]:a)),{top:l-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.scrollParent.scrollTop():this.offset.scroll.top),left:h-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():this.offset.scroll.left)}},_clear:function(){this.helper.removeClass("ui-draggable-dragging"),this.helper[0]===this.element[0]||this.cancelHelperRemoval||this.helper.remove(),this.helper=null,this.cancelHelperRemoval=!1},_trigger:function(t,i,s){return s=s||this._uiHash(),e.ui.plugin.call(this,t,[i,s]),"drag"===t&&(this.positionAbs=this._convertPositionTo("absolute")),e.Widget.prototype._trigger.call(this,t,i,s)},plugins:{},_uiHash:function(){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}}),e.ui.plugin.add("draggable","connectToSortable",{start:function(t,i){var s=e(this).data("ui-draggable"),n=s.options,a=e.extend({},i,{item:s.element});s.sortables=[],e(n.connectToSortable).each(function(){var i=e.data(this,"ui-sortable");i&&!i.options.disabled&&(s.sortables.push({instance:i,shouldRevert:i.options.revert}),i.refreshPositions(),i._trigger("activate",t,a))})},stop:function(t,i){var s=e(this).data("ui-draggable"),n=e.extend({},i,{item:s.element});e.each(s.sortables,function(){this.instance.isOver?(this.instance.isOver=0,s.cancelHelperRemoval=!0,this.instance.cancelHelperRemoval=!1,this.shouldRevert&&(this.instance.options.revert=this.shouldRevert),this.instance._mouseStop(t),this.instance.options.helper=this.instance.options._helper,"original"===s.options.helper&&this.instance.currentItem.css({top:"auto",left:"auto"})):(this.instance.cancelHelperRemoval=!1,this.instance._trigger("deactivate",t,n))})},drag:function(t,i){var s=e(this).data("ui-draggable"),n=this;e.each(s.sortables,function(){var a=!1,o=this;this.instance.positionAbs=s.positionAbs,this.instance.helperProportions=s.helperProportions,this.instance.offset.click=s.offset.click,this.instance._intersectsWith(this.instance.containerCache)&&(a=!0,e.each(s.sortables,function(){return this.instance.positionAbs=s.positionAbs,this.instance.helperProportions=s.helperProportions,this.instance.offset.click=s.offset.click,this!==o&&this.instance._intersectsWith(this.instance.containerCache)&&e.contains(o.instance.element[0],this.instance.element[0])&&(a=!1),a})),a?(this.instance.isOver||(this.instance.isOver=1,this.instance.currentItem=e(n).clone().removeAttr("id").appendTo(this.instance.element).data("ui-sortable-item",!0),this.instance.options._helper=this.instance.options.helper,this.instance.options.helper=function(){return i.helper[0]},t.target=this.instance.currentItem[0],this.instance._mouseCapture(t,!0),this.instance._mouseStart(t,!0,!0),this.instance.offset.click.top=s.offset.click.top,this.instance.offset.click.left=s.offset.click.left,this.instance.offset.parent.left-=s.offset.parent.left-this.instance.offset.parent.left,this.instance.offset.parent.top-=s.offset.parent.top-this.instance.offset.parent.top,s._trigger("toSortable",t),s.dropped=this.instance.element,s.currentItem=s.element,this.instance.fromOutside=s),this.instance.currentItem&&this.instance._mouseDrag(t)):this.instance.isOver&&(this.instance.isOver=0,this.instance.cancelHelperRemoval=!0,this.instance.options.revert=!1,this.instance._trigger("out",t,this.instance._uiHash(this.instance)),this.instance._mouseStop(t,!0),this.instance.options.helper=this.instance.options._helper,this.instance.currentItem.remove(),this.instance.placeholder&&this.instance.placeholder.remove(),s._trigger("fromSortable",t),s.dropped=!1)})}}),e.ui.plugin.add("draggable","cursor",{start:function(){var t=e("body"),i=e(this).data("ui-draggable").options;t.css("cursor")&&(i._cursor=t.css("cursor")),t.css("cursor",i.cursor)},stop:function(){var t=e(this).data("ui-draggable").options;t._cursor&&e("body").css("cursor",t._cursor)}}),e.ui.plugin.add("draggable","opacity",{start:function(t,i){var s=e(i.helper),n=e(this).data("ui-draggable").options;s.css("opacity")&&(n._opacity=s.css("opacity")),s.css("opacity",n.opacity)},stop:function(t,i){var s=e(this).data("ui-draggable").options;s._opacity&&e(i.helper).css("opacity",s._opacity)}}),e.ui.plugin.add("draggable","scroll",{start:function(){var t=e(this).data("ui-draggable");t.scrollParent[0]!==document&&"HTML"!==t.scrollParent[0].tagName&&(t.overflowOffset=t.scrollParent.offset())},drag:function(t){var i=e(this).data("ui-draggable"),s=i.options,n=!1;i.scrollParent[0]!==document&&"HTML"!==i.scrollParent[0].tagName?(s.axis&&"x"===s.axis||(i.overflowOffset.top+i.scrollParent[0].offsetHeight-t.pageY<s.scrollSensitivity?i.scrollParent[0].scrollTop=n=i.scrollParent[0].scrollTop+s.scrollSpeed:t.pageY-i.overflowOffset.top<s.scrollSensitivity&&(i.scrollParent[0].scrollTop=n=i.scrollParent[0].scrollTop-s.scrollSpeed)),s.axis&&"y"===s.axis||(i.overflowOffset.left+i.scrollParent[0].offsetWidth-t.pageX<s.scrollSensitivity?i.scrollParent[0].scrollLeft=n=i.scrollParent[0].scrollLeft+s.scrollSpeed:t.pageX-i.overflowOffset.left<s.scrollSensitivity&&(i.scrollParent[0].scrollLeft=n=i.scrollParent[0].scrollLeft-s.scrollSpeed))):(s.axis&&"x"===s.axis||(t.pageY-e(document).scrollTop()<s.scrollSensitivity?n=e(document).scrollTop(e(document).scrollTop()-s.scrollSpeed):e(window).height()-(t.pageY-e(document).scrollTop())<s.scrollSensitivity&&(n=e(document).scrollTop(e(document).scrollTop()+s.scrollSpeed))),s.axis&&"y"===s.axis||(t.pageX-e(document).scrollLeft()<s.scrollSensitivity?n=e(document).scrollLeft(e(document).scrollLeft()-s.scrollSpeed):e(window).width()-(t.pageX-e(document).scrollLeft())<s.scrollSensitivity&&(n=e(document).scrollLeft(e(document).scrollLeft()+s.scrollSpeed)))),n!==!1&&e.ui.ddmanager&&!s.dropBehaviour&&e.ui.ddmanager.prepareOffsets(i,t)}}),e.ui.plugin.add("draggable","snap",{start:function(){var t=e(this).data("ui-draggable"),i=t.options;t.snapElements=[],e(i.snap.constructor!==String?i.snap.items||":data(ui-draggable)":i.snap).each(function(){var i=e(this),s=i.offset();this!==t.element[0]&&t.snapElements.push({item:this,width:i.outerWidth(),height:i.outerHeight(),top:s.top,left:s.left})})},drag:function(t,i){var s,n,a,o,r,h,l,u,c,d,p=e(this).data("ui-draggable"),f=p.options,m=f.snapTolerance,g=i.offset.left,v=g+p.helperProportions.width,b=i.offset.top,y=b+p.helperProportions.height;for(c=p.snapElements.length-1;c>=0;c--)r=p.snapElements[c].left,h=r+p.snapElements[c].width,l=p.snapElements[c].top,u=l+p.snapElements[c].height,r-m>v||g>h+m||l-m>y||b>u+m||!e.contains(p.snapElements[c].item.ownerDocument,p.snapElements[c].item)?(p.snapElements[c].snapping&&p.options.snap.release&&p.options.snap.release.call(p.element,t,e.extend(p._uiHash(),{snapItem:p.snapElements[c].item})),p.snapElements[c].snapping=!1):("inner"!==f.snapMode&&(s=m>=Math.abs(l-y),n=m>=Math.abs(u-b),a=m>=Math.abs(r-v),o=m>=Math.abs(h-g),s&&(i.position.top=p._convertPositionTo("relative",{top:l-p.helperProportions.height,left:0}).top-p.margins.top),n&&(i.position.top=p._convertPositionTo("relative",{top:u,left:0}).top-p.margins.top),a&&(i.position.left=p._convertPositionTo("relative",{top:0,left:r-p.helperProportions.width}).left-p.margins.left),o&&(i.position.left=p._convertPositionTo("relative",{top:0,left:h}).left-p.margins.left)),d=s||n||a||o,"outer"!==f.snapMode&&(s=m>=Math.abs(l-b),n=m>=Math.abs(u-y),a=m>=Math.abs(r-g),o=m>=Math.abs(h-v),s&&(i.position.top=p._convertPositionTo("relative",{top:l,left:0}).top-p.margins.top),n&&(i.position.top=p._convertPositionTo("relative",{top:u-p.helperProportions.height,left:0}).top-p.margins.top),a&&(i.position.left=p._convertPositionTo("relative",{top:0,left:r}).left-p.margins.left),o&&(i.position.left=p._convertPositionTo("relative",{top:0,left:h-p.helperProportions.width}).left-p.margins.left)),!p.snapElements[c].snapping&&(s||n||a||o||d)&&p.options.snap.snap&&p.options.snap.snap.call(p.element,t,e.extend(p._uiHash(),{snapItem:p.snapElements[c].item})),p.snapElements[c].snapping=s||n||a||o||d)}}),e.ui.plugin.add("draggable","stack",{start:function(){var t,i=this.data("ui-draggable").options,s=e.makeArray(e(i.stack)).sort(function(t,i){return(parseInt(e(t).css("zIndex"),10)||0)-(parseInt(e(i).css("zIndex"),10)||0)});s.length&&(t=parseInt(e(s[0]).css("zIndex"),10)||0,e(s).each(function(i){e(this).css("zIndex",t+i)}),this.css("zIndex",t+s.length))}}),e.ui.plugin.add("draggable","zIndex",{start:function(t,i){var s=e(i.helper),n=e(this).data("ui-draggable").options;s.css("zIndex")&&(n._zIndex=s.css("zIndex")),s.css("zIndex",n.zIndex)},stop:function(t,i){var s=e(this).data("ui-draggable").options;s._zIndex&&e(i.helper).css("zIndex",s._zIndex)}})})(jQuery);(function(e){function t(e,t,i){return e>t&&t+i>e}e.widget("ui.droppable",{version:"1.10.3",widgetEventPrefix:"drop",options:{accept:"*",activeClass:!1,addClasses:!0,greedy:!1,hoverClass:!1,scope:"default",tolerance:"intersect",activate:null,deactivate:null,drop:null,out:null,over:null},_create:function(){var t=this.options,i=t.accept;this.isover=!1,this.isout=!0,this.accept=e.isFunction(i)?i:function(e){return e.is(i)},this.proportions={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight},e.ui.ddmanager.droppables[t.scope]=e.ui.ddmanager.droppables[t.scope]||[],e.ui.ddmanager.droppables[t.scope].push(this),t.addClasses&&this.element.addClass("ui-droppable")},_destroy:function(){for(var t=0,i=e.ui.ddmanager.droppables[this.options.scope];i.length>t;t++)i[t]===this&&i.splice(t,1);this.element.removeClass("ui-droppable ui-droppable-disabled")},_setOption:function(t,i){"accept"===t&&(this.accept=e.isFunction(i)?i:function(e){return e.is(i)}),e.Widget.prototype._setOption.apply(this,arguments)},_activate:function(t){var i=e.ui.ddmanager.current;this.options.activeClass&&this.element.addClass(this.options.activeClass),i&&this._trigger("activate",t,this.ui(i))},_deactivate:function(t){var i=e.ui.ddmanager.current;this.options.activeClass&&this.element.removeClass(this.options.activeClass),i&&this._trigger("deactivate",t,this.ui(i))},_over:function(t){var i=e.ui.ddmanager.current;i&&(i.currentItem||i.element)[0]!==this.element[0]&&this.accept.call(this.element[0],i.currentItem||i.element)&&(this.options.hoverClass&&this.element.addClass(this.options.hoverClass),this._trigger("over",t,this.ui(i)))},_out:function(t){var i=e.ui.ddmanager.current;i&&(i.currentItem||i.element)[0]!==this.element[0]&&this.accept.call(this.element[0],i.currentItem||i.element)&&(this.options.hoverClass&&this.element.removeClass(this.options.hoverClass),this._trigger("out",t,this.ui(i)))},_drop:function(t,i){var s=i||e.ui.ddmanager.current,n=!1;return s&&(s.currentItem||s.element)[0]!==this.element[0]?(this.element.find(":data(ui-droppable)").not(".ui-draggable-dragging").each(function(){var t=e.data(this,"ui-droppable");return t.options.greedy&&!t.options.disabled&&t.options.scope===s.options.scope&&t.accept.call(t.element[0],s.currentItem||s.element)&&e.ui.intersect(s,e.extend(t,{offset:t.element.offset()}),t.options.tolerance)?(n=!0,!1):undefined}),n?!1:this.accept.call(this.element[0],s.currentItem||s.element)?(this.options.activeClass&&this.element.removeClass(this.options.activeClass),this.options.hoverClass&&this.element.removeClass(this.options.hoverClass),this._trigger("drop",t,this.ui(s)),this.element):!1):!1},ui:function(e){return{draggable:e.currentItem||e.element,helper:e.helper,position:e.position,offset:e.positionAbs}}}),e.ui.intersect=function(e,i,s){if(!i.offset)return!1;var n,a,o=(e.positionAbs||e.position.absolute).left,r=o+e.helperProportions.width,h=(e.positionAbs||e.position.absolute).top,l=h+e.helperProportions.height,u=i.offset.left,c=u+i.proportions.width,d=i.offset.top,p=d+i.proportions.height;switch(s){case"fit":return o>=u&&c>=r&&h>=d&&p>=l;case"intersect":return o+e.helperProportions.width/2>u&&c>r-e.helperProportions.width/2&&h+e.helperProportions.height/2>d&&p>l-e.helperProportions.height/2;case"pointer":return n=(e.positionAbs||e.position.absolute).left+(e.clickOffset||e.offset.click).left,a=(e.positionAbs||e.position.absolute).top+(e.clickOffset||e.offset.click).top,t(a,d,i.proportions.height)&&t(n,u,i.proportions.width);case"touch":return(h>=d&&p>=h||l>=d&&p>=l||d>h&&l>p)&&(o>=u&&c>=o||r>=u&&c>=r||u>o&&r>c);default:return!1}},e.ui.ddmanager={current:null,droppables:{"default":[]},prepareOffsets:function(t,i){var s,n,a=e.ui.ddmanager.droppables[t.options.scope]||[],o=i?i.type:null,r=(t.currentItem||t.element).find(":data(ui-droppable)").addBack();e:for(s=0;a.length>s;s++)if(!(a[s].options.disabled||t&&!a[s].accept.call(a[s].element[0],t.currentItem||t.element))){for(n=0;r.length>n;n++)if(r[n]===a[s].element[0]){a[s].proportions.height=0;continue e}a[s].visible="none"!==a[s].element.css("display"),a[s].visible&&("mousedown"===o&&a[s]._activate.call(a[s],i),a[s].offset=a[s].element.offset(),a[s].proportions={width:a[s].element[0].offsetWidth,height:a[s].element[0].offsetHeight})}},drop:function(t,i){var s=!1;return e.each((e.ui.ddmanager.droppables[t.options.scope]||[]).slice(),function(){this.options&&(!this.options.disabled&&this.visible&&e.ui.intersect(t,this,this.options.tolerance)&&(s=this._drop.call(this,i)||s),!this.options.disabled&&this.visible&&this.accept.call(this.element[0],t.currentItem||t.element)&&(this.isout=!0,this.isover=!1,this._deactivate.call(this,i)))}),s},dragStart:function(t,i){t.element.parentsUntil("body").bind("scroll.droppable",function(){t.options.refreshPositions||e.ui.ddmanager.prepareOffsets(t,i)})},drag:function(t,i){t.options.refreshPositions&&e.ui.ddmanager.prepareOffsets(t,i),e.each(e.ui.ddmanager.droppables[t.options.scope]||[],function(){if(!this.options.disabled&&!this.greedyChild&&this.visible){var s,n,a,o=e.ui.intersect(t,this,this.options.tolerance),r=!o&&this.isover?"isout":o&&!this.isover?"isover":null;r&&(this.options.greedy&&(n=this.options.scope,a=this.element.parents(":data(ui-droppable)").filter(function(){return e.data(this,"ui-droppable").options.scope===n}),a.length&&(s=e.data(a[0],"ui-droppable"),s.greedyChild="isover"===r)),s&&"isover"===r&&(s.isover=!1,s.isout=!0,s._out.call(s,i)),this[r]=!0,this["isout"===r?"isover":"isout"]=!1,this["isover"===r?"_over":"_out"].call(this,i),s&&"isout"===r&&(s.isout=!1,s.isover=!0,s._over.call(s,i)))}})},dragStop:function(t,i){t.element.parentsUntil("body").unbind("scroll.droppable"),t.options.refreshPositions||e.ui.ddmanager.prepareOffsets(t,i)}}})(jQuery);(function(e){function t(e){return parseInt(e,10)||0}function i(e){return!isNaN(parseInt(e,10))}e.widget("ui.resizable",e.ui.mouse,{version:"1.10.3",widgetEventPrefix:"resize",options:{alsoResize:!1,animate:!1,animateDuration:"slow",animateEasing:"swing",aspectRatio:!1,autoHide:!1,containment:!1,ghost:!1,grid:!1,handles:"e,s,se",helper:!1,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:90,resize:null,start:null,stop:null},_create:function(){var t,i,s,n,a,o=this,r=this.options;if(this.element.addClass("ui-resizable"),e.extend(this,{_aspectRatio:!!r.aspectRatio,aspectRatio:r.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:r.helper||r.ghost||r.animate?r.helper||"ui-resizable-helper":null}),this.element[0].nodeName.match(/canvas|textarea|input|select|button|img/i)&&(this.element.wrap(e("<div class='ui-wrapper' style='overflow: hidden;'></div>").css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")})),this.element=this.element.parent().data("ui-resizable",this.element.data("ui-resizable")),this.elementIsWrapper=!0,this.element.css({marginLeft:this.originalElement.css("marginLeft"),marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom")}),this.originalElement.css({marginLeft:0,marginTop:0,marginRight:0,marginBottom:0}),this.originalResizeStyle=this.originalElement.css("resize"),this.originalElement.css("resize","none"),this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"})),this.originalElement.css({margin:this.originalElement.css("margin")}),this._proportionallyResize()),this.handles=r.handles||(e(".ui-resizable-handle",this.element).length?{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"}:"e,s,se"),this.handles.constructor===String)for("all"===this.handles&&(this.handles="n,e,s,w,se,sw,ne,nw"),t=this.handles.split(","),this.handles={},i=0;t.length>i;i++)s=e.trim(t[i]),a="ui-resizable-"+s,n=e("<div class='ui-resizable-handle "+a+"'></div>"),n.css({zIndex:r.zIndex}),"se"===s&&n.addClass("ui-icon ui-icon-gripsmall-diagonal-se"),this.handles[s]=".ui-resizable-"+s,this.element.append(n);this._renderAxis=function(t){var i,s,n,a;t=t||this.element;for(i in this.handles)this.handles[i].constructor===String&&(this.handles[i]=e(this.handles[i],this.element).show()),this.elementIsWrapper&&this.originalElement[0].nodeName.match(/textarea|input|select|button/i)&&(s=e(this.handles[i],this.element),a=/sw|ne|nw|se|n|s/.test(i)?s.outerHeight():s.outerWidth(),n=["padding",/ne|nw|n/.test(i)?"Top":/se|sw|s/.test(i)?"Bottom":/^e$/.test(i)?"Right":"Left"].join(""),t.css(n,a),this._proportionallyResize()),e(this.handles[i]).length},this._renderAxis(this.element),this._handles=e(".ui-resizable-handle",this.element).disableSelection(),this._handles.mouseover(function(){o.resizing||(this.className&&(n=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)),o.axis=n&&n[1]?n[1]:"se")}),r.autoHide&&(this._handles.hide(),e(this.element).addClass("ui-resizable-autohide").mouseenter(function(){r.disabled||(e(this).removeClass("ui-resizable-autohide"),o._handles.show())}).mouseleave(function(){r.disabled||o.resizing||(e(this).addClass("ui-resizable-autohide"),o._handles.hide())})),this._mouseInit()},_destroy:function(){this._mouseDestroy();var t,i=function(t){e(t).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").removeData("ui-resizable").unbind(".resizable").find(".ui-resizable-handle").remove()};return this.elementIsWrapper&&(i(this.element),t=this.element,this.originalElement.css({position:t.css("position"),width:t.outerWidth(),height:t.outerHeight(),top:t.css("top"),left:t.css("left")}).insertAfter(t),t.remove()),this.originalElement.css("resize",this.originalResizeStyle),i(this.originalElement),this},_mouseCapture:function(t){var i,s,n=!1;for(i in this.handles)s=e(this.handles[i])[0],(s===t.target||e.contains(s,t.target))&&(n=!0);return!this.options.disabled&&n},_mouseStart:function(i){var s,n,a,o=this.options,r=this.element.position(),h=this.element;return this.resizing=!0,/absolute/.test(h.css("position"))?h.css({position:"absolute",top:h.css("top"),left:h.css("left")}):h.is(".ui-draggable")&&h.css({position:"absolute",top:r.top,left:r.left}),this._renderProxy(),s=t(this.helper.css("left")),n=t(this.helper.css("top")),o.containment&&(s+=e(o.containment).scrollLeft()||0,n+=e(o.containment).scrollTop()||0),this.offset=this.helper.offset(),this.position={left:s,top:n},this.size=this._helper?{width:h.outerWidth(),height:h.outerHeight()}:{width:h.width(),height:h.height()},this.originalSize=this._helper?{width:h.outerWidth(),height:h.outerHeight()}:{width:h.width(),height:h.height()},this.originalPosition={left:s,top:n},this.sizeDiff={width:h.outerWidth()-h.width(),height:h.outerHeight()-h.height()},this.originalMousePosition={left:i.pageX,top:i.pageY},this.aspectRatio="number"==typeof o.aspectRatio?o.aspectRatio:this.originalSize.width/this.originalSize.height||1,a=e(".ui-resizable-"+this.axis).css("cursor"),e("body").css("cursor","auto"===a?this.axis+"-resize":a),h.addClass("ui-resizable-resizing"),this._propagate("start",i),!0},_mouseDrag:function(t){var i,s=this.helper,n={},a=this.originalMousePosition,o=this.axis,r=this.position.top,h=this.position.left,l=this.size.width,u=this.size.height,c=t.pageX-a.left||0,d=t.pageY-a.top||0,p=this._change[o];return p?(i=p.apply(this,[t,c,d]),this._updateVirtualBoundaries(t.shiftKey),(this._aspectRatio||t.shiftKey)&&(i=this._updateRatio(i,t)),i=this._respectSize(i,t),this._updateCache(i),this._propagate("resize",t),this.position.top!==r&&(n.top=this.position.top+"px"),this.position.left!==h&&(n.left=this.position.left+"px"),this.size.width!==l&&(n.width=this.size.width+"px"),this.size.height!==u&&(n.height=this.size.height+"px"),s.css(n),!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize(),e.isEmptyObject(n)||this._trigger("resize",t,this.ui()),!1):!1},_mouseStop:function(t){this.resizing=!1;var i,s,n,a,o,r,h,l=this.options,u=this;return this._helper&&(i=this._proportionallyResizeElements,s=i.length&&/textarea/i.test(i[0].nodeName),n=s&&e.ui.hasScroll(i[0],"left")?0:u.sizeDiff.height,a=s?0:u.sizeDiff.width,o={width:u.helper.width()-a,height:u.helper.height()-n},r=parseInt(u.element.css("left"),10)+(u.position.left-u.originalPosition.left)||null,h=parseInt(u.element.css("top"),10)+(u.position.top-u.originalPosition.top)||null,l.animate||this.element.css(e.extend(o,{top:h,left:r})),u.helper.height(u.size.height),u.helper.width(u.size.width),this._helper&&!l.animate&&this._proportionallyResize()),e("body").css("cursor","auto"),this.element.removeClass("ui-resizable-resizing"),this._propagate("stop",t),this._helper&&this.helper.remove(),!1},_updateVirtualBoundaries:function(e){var t,s,n,a,o,r=this.options;o={minWidth:i(r.minWidth)?r.minWidth:0,maxWidth:i(r.maxWidth)?r.maxWidth:1/0,minHeight:i(r.minHeight)?r.minHeight:0,maxHeight:i(r.maxHeight)?r.maxHeight:1/0},(this._aspectRatio||e)&&(t=o.minHeight*this.aspectRatio,n=o.minWidth/this.aspectRatio,s=o.maxHeight*this.aspectRatio,a=o.maxWidth/this.aspectRatio,t>o.minWidth&&(o.minWidth=t),n>o.minHeight&&(o.minHeight=n),o.maxWidth>s&&(o.maxWidth=s),o.maxHeight>a&&(o.maxHeight=a)),this._vBoundaries=o},_updateCache:function(e){this.offset=this.helper.offset(),i(e.left)&&(this.position.left
12=e.left),i(e.top)&&(this.position.top=e.top),i(e.height)&&(this.size.height=e.height),i(e.width)&&(this.size.width=e.width)},_updateRatio:function(e){var t=this.position,s=this.size,n=this.axis;return i(e.height)?e.width=e.height*this.aspectRatio:i(e.width)&&(e.height=e.width/this.aspectRatio),"sw"===n&&(e.left=t.left+(s.width-e.width),e.top=null),"nw"===n&&(e.top=t.top+(s.height-e.height),e.left=t.left+(s.width-e.width)),e},_respectSize:function(e){var t=this._vBoundaries,s=this.axis,n=i(e.width)&&t.maxWidth&&t.maxWidth<e.width,a=i(e.height)&&t.maxHeight&&t.maxHeight<e.height,o=i(e.width)&&t.minWidth&&t.minWidth>e.width,r=i(e.height)&&t.minHeight&&t.minHeight>e.height,h=this.originalPosition.left+this.originalSize.width,l=this.position.top+this.size.height,u=/sw|nw|w/.test(s),c=/nw|ne|n/.test(s);return o&&(e.width=t.minWidth),r&&(e.height=t.minHeight),n&&(e.width=t.maxWidth),a&&(e.height=t.maxHeight),o&&u&&(e.left=h-t.minWidth),n&&u&&(e.left=h-t.maxWidth),r&&c&&(e.top=l-t.minHeight),a&&c&&(e.top=l-t.maxHeight),e.width||e.height||e.left||!e.top?e.width||e.height||e.top||!e.left||(e.left=null):e.top=null,e},_proportionallyResize:function(){if(this._proportionallyResizeElements.length){var e,t,i,s,n,a=this.helper||this.element;for(e=0;this._proportionallyResizeElements.length>e;e++){if(n=this._proportionallyResizeElements[e],!this.borderDif)for(this.borderDif=[],i=[n.css("borderTopWidth"),n.css("borderRightWidth"),n.css("borderBottomWidth"),n.css("borderLeftWidth")],s=[n.css("paddingTop"),n.css("paddingRight"),n.css("paddingBottom"),n.css("paddingLeft")],t=0;i.length>t;t++)this.borderDif[t]=(parseInt(i[t],10)||0)+(parseInt(s[t],10)||0);n.css({height:a.height()-this.borderDif[0]-this.borderDif[2]||0,width:a.width()-this.borderDif[1]-this.borderDif[3]||0})}}},_renderProxy:function(){var t=this.element,i=this.options;this.elementOffset=t.offset(),this._helper?(this.helper=this.helper||e("<div style='overflow:hidden;'></div>"),this.helper.addClass(this._helper).css({width:this.element.outerWidth()-1,height:this.element.outerHeight()-1,position:"absolute",left:this.elementOffset.left+"px",top:this.elementOffset.top+"px",zIndex:++i.zIndex}),this.helper.appendTo("body").disableSelection()):this.helper=this.element},_change:{e:function(e,t){return{width:this.originalSize.width+t}},w:function(e,t){var i=this.originalSize,s=this.originalPosition;return{left:s.left+t,width:i.width-t}},n:function(e,t,i){var s=this.originalSize,n=this.originalPosition;return{top:n.top+i,height:s.height-i}},s:function(e,t,i){return{height:this.originalSize.height+i}},se:function(t,i,s){return e.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[t,i,s]))},sw:function(t,i,s){return e.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[t,i,s]))},ne:function(t,i,s){return e.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[t,i,s]))},nw:function(t,i,s){return e.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[t,i,s]))}},_propagate:function(t,i){e.ui.plugin.call(this,t,[i,this.ui()]),"resize"!==t&&this._trigger(t,i,this.ui())},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}}),e.ui.plugin.add("resizable","animate",{stop:function(t){var i=e(this).data("ui-resizable"),s=i.options,n=i._proportionallyResizeElements,a=n.length&&/textarea/i.test(n[0].nodeName),o=a&&e.ui.hasScroll(n[0],"left")?0:i.sizeDiff.height,r=a?0:i.sizeDiff.width,h={width:i.size.width-r,height:i.size.height-o},l=parseInt(i.element.css("left"),10)+(i.position.left-i.originalPosition.left)||null,u=parseInt(i.element.css("top"),10)+(i.position.top-i.originalPosition.top)||null;i.element.animate(e.extend(h,u&&l?{top:u,left:l}:{}),{duration:s.animateDuration,easing:s.animateEasing,step:function(){var s={width:parseInt(i.element.css("width"),10),height:parseInt(i.element.css("height"),10),top:parseInt(i.element.css("top"),10),left:parseInt(i.element.css("left"),10)};n&&n.length&&e(n[0]).css({width:s.width,height:s.height}),i._updateCache(s),i._propagate("resize",t)}})}}),e.ui.plugin.add("resizable","containment",{start:function(){var i,s,n,a,o,r,h,l=e(this).data("ui-resizable"),u=l.options,c=l.element,d=u.containment,p=d instanceof e?d.get(0):/parent/.test(d)?c.parent().get(0):d;p&&(l.containerElement=e(p),/document/.test(d)||d===document?(l.containerOffset={left:0,top:0},l.containerPosition={left:0,top:0},l.parentData={element:e(document),left:0,top:0,width:e(document).width(),height:e(document).height()||document.body.parentNode.scrollHeight}):(i=e(p),s=[],e(["Top","Right","Left","Bottom"]).each(function(e,n){s[e]=t(i.css("padding"+n))}),l.containerOffset=i.offset(),l.containerPosition=i.position(),l.containerSize={height:i.innerHeight()-s[3],width:i.innerWidth()-s[1]},n=l.containerOffset,a=l.containerSize.height,o=l.containerSize.width,r=e.ui.hasScroll(p,"left")?p.scrollWidth:o,h=e.ui.hasScroll(p)?p.scrollHeight:a,l.parentData={element:p,left:n.left,top:n.top,width:r,height:h}))},resize:function(t){var i,s,n,a,o=e(this).data("ui-resizable"),r=o.options,h=o.containerOffset,l=o.position,u=o._aspectRatio||t.shiftKey,c={top:0,left:0},d=o.containerElement;
vendor: 42,150 bytes, line 12
12d[0]!==document&&/static/.test(d.css("position"))&&(c=h),l.left<(o._helper?h.left:0)&&(o.size.width=o.size.width+(o._helper?o.position.left-h.left:o.position.left-c.left),u&&(o.size.height=o.size.width/o.aspectRatio),o.position.left=r.helper?h.left:0),l.top<(o._helper?h.top:0)&&(o.size.height=o.size.height+(o._helper?o.position.top-h.top:o.position.top),u&&(o.size.width=o.size.height*o.aspectRatio),o.position.top=o._helper?h.top:0),o.offset.left=o.parentData.left+o.position.left,o.offset.top=o.parentData.top+o.position.top,i=Math.abs((o._helper?o.offset.left-c.left:o.offset.left-c.left)+o.sizeDiff.width),s=Math.abs((o._helper?o.offset.top-c.top:o.offset.top-h.top)+o.sizeDiff.height),n=o.containerElement.get(0)===o.element.parent().get(0),a=/relative|absolute/.test(o.containerElement.css("position")),n&&a&&(i-=o.parentData.left),i+o.size.width>=o.parentData.width&&(o.size.width=o.parentData.width-i,u&&(o.size.height=o.size.width/o.aspectRatio)),s+o.size.height>=o.parentData.height&&(o.size.height=o.parentData.height-s,u&&(o.size.width=o.size.height*o.aspectRatio))},stop:function(){var t=e(this).data("ui-resizable"),i=t.options,s=t.containerOffset,n=t.containerPosition,a=t.containerElement,o=e(t.helper),r=o.offset(),h=o.outerWidth()-t.sizeDiff.width,l=o.outerHeight()-t.sizeDiff.height;t._helper&&!i.animate&&/relative/.test(a.css("position"))&&e(this).css({left:r.left-n.left-s.left,width:h,height:l}),t._helper&&!i.animate&&/static/.test(a.css("position"))&&e(this).css({left:r.left-n.left-s.left,width:h,height:l})}}),e.ui.plugin.add("resizable","alsoResize",{start:function(){var t=e(this).data("ui-resizable"),i=t.options,s=function(t){e(t).each(function(){var t=e(this);t.data("ui-resizable-alsoresize",{width:parseInt(t.width(),10),height:parseInt(t.height(),10),left:parseInt(t.css("left"),10),top:parseInt(t.css("top"),10)})})};"object"!=typeof i.alsoResize||i.alsoResize.parentNode?s(i.alsoResize):i.alsoResize.length?(i.alsoResize=i.alsoResize[0],s(i.alsoResize)):e.each(i.alsoResize,function(e){s(e)})},resize:function(t,i){var s=e(this).data("ui-resizable"),n=s.options,a=s.originalSize,o=s.originalPosition,r={height:s.size.height-a.height||0,width:s.size.width-a.width||0,top:s.position.top-o.top||0,left:s.position.left-o.left||0},h=function(t,s){e(t).each(function(){var t=e(this),n=e(this).data("ui-resizable-alsoresize"),a={},o=s&&s.length?s:t.parents(i.originalElement[0]).length?["width","height"]:["width","height","top","left"];e.each(o,function(e,t){var i=(n[t]||0)+(r[t]||0);i&&i>=0&&(a[t]=i||null)}),t.css(a)})};"object"!=typeof n.alsoResize||n.alsoResize.nodeType?h(n.alsoResize):e.each(n.alsoResize,function(e,t){h(e,t)})},stop:function(){e(this).removeData("resizable-alsoresize")}}),e.ui.plugin.add("resizable","ghost",{start:function(){var t=e(this).data("ui-resizable"),i=t.options,s=t.size;t.ghost=t.originalElement.clone(),t.ghost.css({opacity:.25,display:"block",position:"relative",height:s.height,width:s.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass("string"==typeof i.ghost?i.ghost:""),t.ghost.appendTo(t.helper)},resize:function(){var t=e(this).data("ui-resizable");t.ghost&&t.ghost.css({position:"relative",height:t.size.height,width:t.size.width})},stop:function(){var t=e(this).data("ui-resizable");t.ghost&&t.helper&&t.helper.get(0).removeChild(t.ghost.get(0))}}),e.ui.plugin.add("resizable","grid",{resize:function(){var t=e(this).data("ui-resizable"),i=t.options,s=t.size,n=t.originalSize,a=t.originalPosition,o=t.axis,r="number"==typeof i.grid?[i.grid,i.grid]:i.grid,h=r[0]||1,l=r[1]||1,u=Math.round((s.width-n.width)/h)*h,c=Math.round((s.height-n.height)/l)*l,d=n.width+u,p=n.height+c,f=i.maxWidth&&d>i.maxWidth,m=i.maxHeight&&p>i.maxHeight,g=i.minWidth&&i.minWidth>d,v=i.minHeight&&i.minHeight>p;i.grid=r,g&&(d+=h),v&&(p+=l),f&&(d-=h),m&&(p-=l),/^(se|s|e)$/.test(o)?(t.size.width=d,t.size.height=p):/^(ne)$/.test(o)?(t.size.width=d,t.size.height=p,t.position.top=a.top-c):/^(sw)$/.test(o)?(t.size.width=d,t.size.height=p,t.position.left=a.left-u):(t.size.width=d,t.size.height=p,t.position.top=a.top-c,t.position.left=a.left-u)}})})(jQuery);(function(e){e.widget("ui.selectable",e.ui.mouse,{version:"1.10.3",options:{appendTo:"body",autoRefresh:!0,distance:0,filter:"*",tolerance:"touch",selected:null,selecting:null,start:null,stop:null,unselected:null,unselecting:null},_create:function(){var t,i=this;this.element.addClass("ui-selectable"),this.dragged=!1,this.refresh=function(){t=e(i.options.filter,i.element[0]),t.addClass("ui-selectee"),t.each(function(){var t=e(this),i=t.offset();e.data(this,"selectable-item",{element:this,$element:t,left:i.left,top:i.top,right:i.left+t.outerWidth(),bottom:i.top+t.outerHeight(),startselected:!1,selected:t.hasClass("ui-selected"),selecting:t.hasClass("ui-selecting"),unselecting:t.hasClass("ui-unselecting")})})},this.refresh(),this.selectees=t.addClass("ui-selectee"),this._mouseInit(),this.helper=e("<div class='ui-selectable-helper'></div>")},_destroy:function(){this.selectees.removeClass("ui-selectee").removeData("selectable-item"),this.element.removeClass("ui-selectable ui-selectable-disabled"),this._mouseDestroy()},_mouseStart:function(t){var i=this,s=this.options;this.opos=[t.pageX,t.pageY],this.options.disabled||(this.selectees=e(s.filter,this.element[0]),this._trigger("start",t),e(s.appendTo).append(this.helper),this.helper.css({left:t.pageX,top:t.pageY,width:0,height:0}),s.autoRefresh&&this.refresh(),this.selectees.filter(".ui-selected").each(function(){var s=e.data(this,"selectable-item");s.startselected=!0,t.metaKey||t.ctrlKey||(s.$element.removeClass("ui-selected"),s.selected=!1,s.$element.addClass("ui-unselecting"),s.unselecting=!0,i._trigger("unselecting",t,{unselecting:s.element}))}),e(t.target).parents().addBack().each(function(){var s,n=e.data(this,"selectable-item");return n?(s=!t.metaKey&&!t.ctrlKey||!n.$element.hasClass("ui-selected"),n.$element.removeClass(s?"ui-unselecting":"ui-selected").addClass(s?"ui-selecting":"ui-unselecting"),n.unselecting=!s,n.selecting=s,n.selected=s,s?i._trigger("selecting",t,{selecting:n.element}):i._trigger("unselecting",t,{unselecting:n.element}),!1):undefined}))},_mouseDrag:function(t){if(this.dragged=!0,!this.options.disabled){var i,s=this,n=this.options,a=this.opos[0],o=this.opos[1],r=t.pageX,h=t.pageY;return a>r&&(i=r,r=a,a=i),o>h&&(i=h,h=o,o=i),this.helper.css({left:a,top:o,width:r-a,height:h-o}),this.selectees.each(function(){var i=e.data(this,"selectable-item"),l=!1;i&&i.element!==s.element[0]&&("touch"===n.tolerance?l=!(i.left>r||a>i.right||i.top>h||o>i.bottom):"fit"===n.tolerance&&(l=i.left>a&&r>i.right&&i.top>o&&h>i.bottom),l?(i.selected&&(i.$element.removeClass("ui-selected"),i.selected=!1),i.unselecting&&(i.$element.removeClass("ui-unselecting"),i.unselecting=!1),i.selecting||(i.$element.addClass("ui-selecting"),i.selecting=!0,s._trigger("selecting",t,{selecting:i.element}))):(i.selecting&&((t.metaKey||t.ctrlKey)&&i.startselected?(i.$element.removeClass("ui-selecting"),i.selecting=!1,i.$element.addClass("ui-selected"),i.selected=!0):(i.$element.removeClass("ui-selecting"),i.selecting=!1,i.startselected&&(i.$element.addClass("ui-unselecting"),i.unselecting=!0),s._trigger("unselecting",t,{unselecting:i.element}))),i.selected&&(t.metaKey||t.ctrlKey||i.startselected||(i.$element.removeClass("ui-selected"),i.selected=!1,i.$element.addClass("ui-unselecting"),i.unselecting=!0,s._trigger("unselecting",t,{unselecting:i.element})))))}),!1}},_mouseStop:function(t){var i=this;return this.dragged=!1,e(".ui-unselecting",this.element[0]).each(function(){var s=e.data(this,"selectable-item");s.$element.removeClass("ui-unselecting"),s.unselecting=!1,s.startselected=!1,i._trigger("unselected",t,{unselected:s.element})}),e(".ui-selecting",this.element[0]).each(function(){var s=e.data(this,"selectable-item");s.$element.removeClass("ui-selecting").addClass("ui-selected"),s.selecting=!1,s.selected=!0,s.startselected=!0,i._trigger("selected",t,{selected:s.element})}),this._trigger("stop",t),this.helper.remove(),!1}})})(jQuery);(function(t){function e(t,e,i){return t>e&&e+i>t}function i(t){return/left|right/.test(t.css("float"))||/inline|table-cell/.test(t.css("display"))}t.widget("ui.sortable",t.ui.mouse,{version:"1.10.3",widgetEventPrefix:"sort",ready:!1,options:{appendTo:"parent",axis:!1,connectWith:!1,containment:!1,cursor:"auto",cursorAt:!1,dropOnEmpty:!0,forcePlaceholderSize:!1,forceHelperSize:!1,grid:!1,handle:!1,helper:"original",items:"> *",opacity:!1,placeholder:!1,revert:!1,scroll:!0,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1e3,activate:null,beforeStop:null,change:null,deactivate:null,out:null,over:null,receive:null,remove:null,sort:null,start:null,stop:null,update:null},_create:function(){var t=this.options;this.containerCache={},this.element.addClass("ui-sortable"),this.refresh(),this.floating=this.items.length?"x"===t.axis||i(this.items[0].item):!1,this.offset=this.element.offset(),this._mouseInit(),this.ready=!0},_destroy:function(){this.element.removeClass("ui-sortable ui-sortable-disabled"),this._mouseDestroy();for(var t=this.items.length-1;t>=0;t--)this.items[t].item.removeData(this.widgetName+"-item");return this},_setOption:function(e,i){"disabled"===e?(this.options[e]=i,this.widget().toggleClass("ui-sortable-disabled",!!i)):t.Widget.prototype._setOption.apply(this,arguments)},_mouseCapture:function(e,i){var s=null,n=!1,a=this;return this.reverting?!1:this.options.disabled||"static"===this.options.type?!1:(this._refreshItems(e),t(e.target).parents().each(function(){return t.data(this,a.widgetName+"-item")===a?(s=t(this),!1):undefined}),t.data(e.target,a.widgetName+"-item")===a&&(s=t(e.target)),s?!this.options.handle||i||(t(this.options.handle,s).find("*").addBack().each(function(){this===e.target&&(n=!0)}),n)?(this.currentItem=s,this._removeCurrentsFromItems(),!0):!1:!1)},_mouseStart:function(e,i,s){var n,a,o=this.options;if(this.currentContainer=this,this.refreshPositions(),this.helper=this._createHelper(e),this._cacheHelperProportions(),this._cacheMargins(),this.scrollParent=this.helper.scrollParent(),this.offset=this.currentItem.offset(),this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left},t.extend(this.offset,{click:{left:e.pageX-this.offset.left,top:e.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}),this.helper.css("position","absolute"),this.cssPosition=this.helper.css("position"),this.originalPosition=this._generatePosition(e),this.originalPageX=e.pageX,this.originalPageY=e.pageY,o.cursorAt&&this._adjustOffsetFromHelper(o.cursorAt),this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]},this.helper[0]!==this.currentItem[0]&&this.currentItem.hide(),this._createPlaceholder(),o.containment&&this._setContainment(),o.cursor&&"auto"!==o.cursor&&(a=this.document.find("body"),this.storedCursor=a.css("cursor"),a.css("cursor",o.cursor),this.storedStylesheet=t("<style>*{ cursor: "+o.cursor+" !important; }</style>").appendTo(a)),o.opacity&&(this.helper.css("opacity")&&(this._storedOpacity=this.helper.css("opacity")),this.helper.css("opacity",o.opacity)),o.zIndex&&(this.helper.css("zIndex")&&(this._storedZIndex=this.helper.css("zIndex")),this.helper.css("zIndex",o.zIndex)),this.scrollParent[0]!==document&&"HTML"!==this.scrollParent[0].tagName&&(this.overflowOffset=this.scrollParent.offset()),this._trigger("start",e,this._uiHash()),this._preserveHelperProportions||this._cacheHelperProportions(),!s)for(n=this.containers.length-1;n>=0;n--)this.containers[n]._trigger("activate",e,this._uiHash(this));return t.ui.ddmanager&&(t.ui.ddmanager.current=this),t.ui.ddmanager&&!o.dropBehaviour&&t.ui.ddmanager.prepareOffsets(this,e),this.dragging=!0,this.helper.addClass("ui-sortable-helper"),this._mouseDrag(e),!0},_mouseDrag:function(e){var i,s,n,a,o=this.options,r=!1;for(this.position=this._generatePosition(e),this.positionAbs=this._convertPositionTo("absolute"),this.lastPositionAbs||(this.lastPositionAbs=this.positionAbs),this.options.scroll&&(this.scrollParent[0]!==document&&"HTML"!==this.scrollParent[0].tagName?(this.overflowOffset.top+this.scrollParent[0].offsetHeight-e.pageY<o.scrollSensitivity?this.scrollParent[0].scrollTop=r=this.scrollParent[0].scrollTop+o.scrollSpeed:e.pageY-this.overflowOffset.top<o.scrollSensitivity&&(this.scrollParent[0].scrollTop=r=this.scrollParent[0].scrollTop-o.scrollSpeed),this.overflowOffset.left+this.scrollParent[0].offsetWidth-e.pageX<o.scrollSensitivity?this.scrollParent[0].scrollLeft=r=this.scrollParent[0].scrollLeft+o.scrollSpeed:e.pageX-this.overflowOffset.left<o.scrollSensitivity&&(this.scrollParent[0].scrollLeft=r=this.scrollParent[0].scrollLeft-o.scrollSpeed)):(e.pageY-t(document).scrollTop()<o.scrollSensitivity?r=t(document).scrollTop(t(document).scrollTop()-o.scrollSpeed):t(window).height()-(e.pageY-t(document).scrollTop())<o.scrollSensitivity&&(r=t(document).scrollTop(t(document).scrollTop()+o.scrollSpeed)),e.pageX-t(document).scrollLeft()<o.scrollSensitivity?r=t(document).scrollLeft(t(document).scrollLeft()-o.scrollSpeed):t(window).width()-(e.pageX-t(document).scrollLeft())<o.scrollSensitivity&&(r=t(document).scrollLeft(t(document).scrollLeft()+o.scrollSpeed))),r!==!1&&t.ui.ddmanager&&!o.dropBehaviour&&t.ui.ddmanager.prepareOffsets(this,e)),this.positionAbs=this._convertPositionTo("absolute"),this.options.axis&&"y"===this.options.axis||(this.helper[0].style.left=this.position.left+"px"),this.options.axis&&"x"===this.options.axis||(this.helper[0].style.top=this.position.top+"px"),i=this.items.length-1;i>=0;i--)if(s=this.items[i],n=s.item[0],a=this._intersectsWithPointer(s),a&&s.instance===this.currentContainer&&n!==this.currentItem[0]&&this.placeholder[1===a?"next":"prev"]()[0]!==n&&!t.contains(this.placeholder[0],n)&&("semi-dynamic"===this.options.type?!t.contains(this.element[0],n):!0)){if(this.direction=1===a?"down":"up","pointer"!==this.options.tolerance&&!this._intersectsWithSides(s))break;this._rearrange(e,s),this._trigger("change",e,this._uiHash());break}return this._contactContainers(e),t.ui.ddmanager&&t.ui.ddmanager.drag(this,e),this._trigger("sort",e,this._uiHash()),this.lastPositionAbs=this.positionAbs,!1},_mouseStop:function(e,i){if(e){if(t.ui.ddmanager&&!this.options.dropBehaviour&&t.ui.ddmanager.drop(this,e),this.options.revert){var s=this,n=this.placeholder.offset(),a=this.options.axis,o={};a&&"x"!==a||(o.left=n.left-this.offset.parent.left-this.margins.left+(this.offsetParent[0]===document.body?0:this.offsetParent[0].scrollLeft)),a&&"y"!==a||(o.top=n.top-this.offset.parent.top-this.margins.top+(this.offsetParent[0]===document.body?0:this.offsetParent[0].scrollTop)),this.reverting=!0,t(this.helper).animate(o,parseInt(this.options.revert,10)||500,function(){s._clear(e)})}else this._clear(e,i);return!1}},cancel:function(){if(this.dragging){this._mouseUp({target:null}),"original"===this.options.helper?this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper"):this.currentItem.show();for(var e=this.containers.length-1;e>=0;e--)this.containers[e]._trigger("deactivate",null,this._uiHash(this)),this.containers[e].containerCache.over&&(this.containers[e]._trigger("out",null,this._uiHash(this)),this.containers[e].containerCache.over=0)}return this.placeholder&&(this.placeholder[0].parentNode&&this.placeholder[0].parentNode.removeChild(this.placeholder[0]),"original"!==this.options.helper&&this.helper&&this.helper[0].parentNode&&this.helper.remove(),t.extend(this,{helper:null,dragging:!1,reverting:!1,_noFinalSort:null}),this.domPosition.prev?t(this.domPosition.prev).after(this.currentItem):t(this.domPosition.parent).prepend(this.currentItem)),this},serialize:function(e){var i=this._getItemsAsjQuery(e&&e.connected),s=[];return e=e||{},t(i).each(function(){var i=(t(e.item||this).attr(e.attribute||"id")||"").match(e.expression||/(.+)[\-=_](.+)/);i&&s.push((e.key||i[1]+"[]")+"="+(e.key&&e.expression?i[1]:i[2]))}),!s.length&&e.key&&s.push(e.key+"="),s.join("&")},toArray:function(e){var i=this._getItemsAsjQuery(e&&e.connected),s=[];return e=e||{},i.each(function(){s.push(t(e.item||this).attr(e.attribute||"id")||"")}),s},_intersectsWith:function(t){var e=this.positionAbs.left,i=e+this.helperProportions.width,s=this.positionAbs.top,n=s+this.helperProportions.height,a=t.left,o=a+t.width,r=t.top,h=r+t.height,l=this.offset.click.top,c=this.offset.click.left,u="x"===this.options.axis||s+l>r&&h>s+l,d="y"===this.options.axis||e+c>a&&o>e+c,p=u&&d;return"pointer"===this.options.tolerance||this.options.forcePointerForContainers||"pointer"!==this.options.tolerance&&this.helperProportions[this.floating?"width":"height"]>t[this.floating?"width":"height"]?p:e+this.helperProportions.width/2>a&&o>i-this.helperProportions.width/2&&s+this.helperProportions.height/2>r&&h>n-this.helperProportions.height/2},_intersectsWithPointer:function(t){var i="x"===this.options.axis||e(this.positionAbs.top+this.offset.click.top,t.top,t.height),s="y"===this.options.axis||e(this.positionAbs.left+this.offset.click.left,t.left,t.width),n=i&&s,a=this._getDragVerticalDirection(),o=this._getDragHorizontalDirection();return n?this.floating?o&&"right"===o||"down"===a?2:1:a&&("down"===a?2:1):!1},_intersectsWithSides:function(t){var i=e(this.positionAbs.top+this.offset.click.top,t.top+t.height/2,t.height),s=e(this.positionAbs.left+this.offset.click.left,t.left+t.width/2,t.width),n=this._getDragVerticalDirection(),a=this._getDragHorizontalDirection();return this.floating&&a?"right"===a&&s||"left"===a&&!s:n&&("down"===n&&i||"up"===n&&!i)},_getDragVerticalDirection:function(){var t=this.positionAbs.top-this.lastPositionAbs.top;return 0!==t&&(t>0?"down":"up")},_getDragHorizontalDirection:function(){var t=this.positionAbs.left-this.lastPositionAbs.left;return 0!==t&&(t>0?"right":"left")},refresh:function(t){return this._refreshItems(t),this.refreshPositions(),this},_connectWith:function(){var t=this.options;return t.connectWith.constructor===String?[t.connectWith]:t.connectWith},_getItemsAsjQuery:function(e){var i,s,n,a,o=[],r=[],h=this._connectWith();if(h&&e)for(i=h.length-1;i>=0;i--)for(n=t(h[i]),s=n.length-1;s>=0;s--)a=t.data(n[s],this.widgetFullName),a&&a!==this&&!a.options.disabled&&r.push([t.isFunction(a.options.items)?a.options.items.call(a.element):t(a.options.items,a.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),a]);for(r.push([t.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):t(this.options.items,this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),this]),i=r.length-1;i>=0;i--)r[i][0].each(function(){o.push(this)});return t(o)},_removeCurrentsFromItems:function(){var e=this.currentItem.find(":data("+this.widgetName+"-item)");this.items=t.grep(this.items,function(t){for(var i=0;e.length>i;i++)if(e[i]===t.item[0])return!1;return!0})},_refreshItems:function(e){this.items=[],this.containers=[this];var i,s,n,a,o,r,h,l,c=this.items,u=[[t.isFunction(this.options.items)?this.options.items.call(this.element[0],e,{item:this.currentItem}):t(this.options.items,this.element),this]],d=this._connectWith();if(d&&this.ready)for(i=d.length-1;i>=0;i--)for(n=t(d[i]),s=n.length-1;s>=0;s--)a=t.data(n[s],this.widgetFullName),a&&a!==this&&!a.options.disabled&&(u.push([t.isFunction(a.options.items)?a.options.items.call(a.element[0],e,{item:this.currentItem}):t(a.options.items,a.element),a]),this.containers.push(a));for(i=u.length-1;i>=0;i--)for(o=u[i][1],r=u[i][0],s=0,l=r.length;l>s;s++)h=t(r[s]),h.data(this.widgetName+"-item",o),c.push({item:h,instance:o,width:0,height:0,left:0,top:0})},refreshPositions:function(e){this.offsetParent&&this.helper&&(this.offset.parent=this._getParentOffset());var i,s,n,a;for(i=this.items.length-1;i>=0;i--)s=this.items[i],s.instance!==this.currentContainer&&this.currentContainer&&s.item[0]!==this.currentItem[0]||(n=this.options.toleranceElement?t(this.options.toleranceElement,s.item):s.item,e||(s.width=n.outerWidth(),s.height=n.outerHeight()),a=n.offset(),s.left=a.left,s.top=a.top);if(this.options.custom&&this.options.custom.refreshContainers)this.options.custom.refreshContainers.call(this);else for(i=this.containers.length-1;i>=0;i--)a=this.containers[i].element.offset(),this.containers[i].containerCache.left=a.left,this.containers[i].containerCache.top=a.top,this.containers[i].containerCache.width=this.containers[i].element.outerWidth(),this.containers[i].containerCache.height=this.containers[i].element.outerHeight();return this},_createPlaceholder:function(e){e=e||this;var i,s=e.options;s.placeholder&&s.placeholder.constructor!==String||(i=s.placeholder,s.placeholder={element:function(){var s=e.currentItem[0].nodeName.toLowerCase(),n=t("<"+s+">",e.document[0]).addClass(i||e.currentItem[0].className+" ui-sortable-placeholder").removeClass("ui-sortable-helper");return"tr"===s?e.currentItem.children().each(function(){t("<td>&#160;</td>",e.document[0]).attr("colspan",t(this).attr("colspan")||1).appendTo(n)}):"img"===s&&n.attr("src",e.currentItem.attr("src")),i||n.css("visibility","hidden"),n},update:function(t,n){(!i||s.forcePlaceholderSize)&&(n.height()||n.height(e.currentItem.innerHeight()-parseInt(e.currentItem.css("paddingTop")||0,10)-parseInt(e.currentItem.css("paddingBottom")||0,10)),n.width()||n.width(e.currentItem.innerWidth()-parseInt(e.currentItem.css("paddingLeft")||0,10)-parseInt(e.currentItem.css("paddingRight")||0,10)))}}),e.placeholder=t(s.placeholder.element.call(e.element,e.currentItem)),e.currentItem.after(e.placeholder),s.placeholder.update(e,e.placeholder)},_contactContainers:function(s){var n,a,o,r,h,l,c,u,d,p,f=null,m=null;for(n=this.containers.length-1;n>=0;n--)if(!t.contains(this.currentItem[0],this.containers[n].element[0]))if(this._intersectsWith(this.containers[n].containerCache)){if(f&&t.contains(this.containers[n].element[0],f.element[0]))continue;f=this.containers[n],m=n}else this.containers[n].containerCache.over&&(this.containers[n]._trigger("out",s,this._uiHash(this)),this.containers[n].containerCache.over=0);if(f)if(1===this.containers.length)this.containers[m].containerCache.over||(this.containers[m]._trigger("over",s,this._uiHash(this)),this.containers[m].containerCache.over=1);else{for(o=1e4,r=null,p=f.floating||i(this.currentItem),h=p?"left":"top",l=p?"width":"height",c=this.positionAbs[h]+this.offset.click[h],a=this.items.length-1;a>=0;a--)t.contains(this.containers[m].element[0],this.items[a].item[0])&&this.items[a].item[0]!==this.currentItem[0]&&(!p||e(this.positionAbs.top+this.offset.click.top,this.items[a].top,this.items[a].height))&&(u=this.items[a].item.offset()[h],d=!1,Math.abs(u-c)>Math.abs(u+this.items[a][l]-c)&&(d=!0,u+=this.items[a][l]),o>Math.abs(u-c)&&(o=Math.abs(u-c),r=this.items[a],this.direction=d?"up":"down"));if(!r&&!this.options.dropOnEmpty)return;if(this.currentContainer===this.containers[m])return;r?this._rearrange(s,r,null,!0):this._rearrange(s,null,this.containers[m].element,!0),this._trigger("change",s,this._uiHash()),this.containers[m]._trigger("change",s,this._uiHash(this)),this.currentContainer=this.containers[m],this.options.placeholder.update(this.currentContainer,this.placeholder),this.containers[m]._trigger("over",s,this._uiHash(this)),this.containers[m].containerCache.over=1}},_createHelper:function(e){var i=this.options,s=t.isFunction(i.helper)?t(i.helper.apply(this.element[0],[e,this.currentItem])):"clone"===i.helper?this.currentItem.clone():this.currentItem;return s.parents("body").length||t("parent"!==i.appendTo?i.appendTo:this.currentItem[0].parentNode)[0].appendChild(s[0]),s[0]===this.currentItem[0]&&(this._storedCSS={width:this.currentItem[0].style.width,height:this.currentItem[0].style.height,position:this.currentItem.css("position"),top:this.currentItem.css("top"),left:this.currentItem.css("left")}),(!s[0].style.width||i.forceHelperSize)&&s.width(this.currentItem.width()),(!s[0].style.height||i.forceHelperSize)&&s.height(this.currentItem.height()),s},_adjustOffsetFromHelper:function(e){"string"==typeof e&&(e=e.split(" ")),t.isArray(e)&&(e={left:+e[0],top:+e[1]||0}),"left"in e&&(this.offset.click.left=e.left+this.margins.left),"right"in e&&(this.offset.click.left=this.helperProportions.width-e.right+this.margins.left),"top"in e&&(this.offset.click.top=e.top+this.margins.top),"bottom"in e&&(this.offset.click.top=this.helperProportions.height-e.bottom+this.margins.top)},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var e=this.offsetParent.offset();return"absolute"===this.cssPosition&&this.scrollParent[0]!==document&&t.contains(this.scrollParent[0],this.offsetParent[0])&&(e.left+=this.scrollParent.scrollLeft(),e.top+=this.scrollParent.scrollTop()),(this.offsetParent[0]===document.body||this.offsetParent[0].tagName&&"html"===this.offsetParent[0].tagName.toLowerCase()&&t.ui.ie)&&(e={top:0,left:0}),{top:e.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:e.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"===this.cssPosition){var t=this.currentItem.position();return{top:t.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:t.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.currentItem.css("marginLeft"),10)||0,top:parseInt(this.currentItem.css("marginTop"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var e,i,s,n=this.options;"parent"===n.containment&&(n.containment=this.helper[0].parentNode),("document"===n.containment||"window"===n.containment)&&(this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,t("document"===n.containment?document:window).width()-this.helperProportions.width-this.margins.left,(t("document"===n.containment?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]),/^(document|window|parent)$/.test(n.containment)||(e=t(n.containment)[0],i=t(n.containment).offset(),s="hidden"!==t(e).css("overflow"),this.containment=[i.left+(parseInt(t(e).css("borderLeftWidth"),10)||0)+(parseInt(t(e).css("paddingLeft"),10)||0)-this.margins.left,i.top+(parseInt(t(e).css("borderTopWidth"),10)||0)+(parseInt(t(e).css("paddingTop"),10)||0)-this.margins.top,i.left+(s?Math.max(e.scrollWidth,e.offsetWidth):e.offsetWidth)-(parseInt(t(e).css("borderLeftWidth"),10)||0)-(parseInt(t(e).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,i.top+(s?Math.max(e.scrollHeight,e.offsetHeight):e.offsetHeight)-(parseInt(t(e).css("borderTopWidth"),10)||0)-(parseInt(t(e).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top])},_convertPositionTo:function(e,i){i||(i=this.position);var s="absolute"===e?1:-1,n="absolute"!==this.cssPosition||this.scrollParent[0]!==document&&t.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,a=/(html|body)/i.test(n[0].tagName);return{top:i.top+this.offset.relative.top*s+this.offset.parent.top*s-("fixed"===this.cssPosition?-this.scrollParent.scrollTop():a?0:n.scrollTop())*s,left:i.left+this.offset.relative.left*s+this.offset.parent.left*s-("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():a?0:n.scrollLeft())*s}},_generatePosition:function(e){var i,s,n=this.options,a=e.pageX,o=e.pageY,r="absolute"!==this.cssPosition||this.scrollParent[0]!==document&&t.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,h=/(html|body)/i.test(r[0].tagName);return"relative"!==this.cssPosition||this.scrollParent[0]!==document&&this.scrollParent[0]!==this.offsetParent[0]||(this.offset.relative=this._getRelativeOffset()),this.originalPosition&&(this.containment&&(e.pageX-this.offset.click.left<this.containment[0]&&(a=this.containment[0]+this.offset.click.left),e.pageY-this.offset.click.top<this.containment[1]&&(o=this.containment[1]+this.offset.click.top),e.pageX-this.offset.click.left>this.containment[2]&&(a=this.containment[2]+this.offset.click.left),e.pageY-this.offset.click.top>this.containment[3]&&(o=this.containment[3]+this.offset.click.top)),n.grid&&(i=this.originalPageY+Math.round((o-this.originalPageY)/n.grid[1])*n.grid[1],o=this.containment?i-this.offset.click.top>=this.containment[1]&&i-this.offset.click.top<=this.containment[3]?i:i-this.offset.click.top>=this.containment[1]?i-n.grid[1]:i+n.grid[1]:i,s=this.originalPageX+Math.round((a-this.originalPageX)/n.grid[0])*n.grid[0],a=this.containment?s-this.offset.click.left>=this.containment[0]&&s-this.offset.click.left<=this.containment[2]?s:s-this.offset.click.left>=this.containment[0]?s-n.grid[0]:s+n.grid[0]:s)),{top:o-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.scrollParent.scrollTop():h?0:r.scrollTop()),left:a-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():h?0:r.scrollLeft())}},_rearrange:function(t,e,i,s){i?i[0].appendChild(this.placeholder[0]):e.item[0].parentNode.insertBefore(this.placeholder[0],"down"===this.direction?e.item[0]:e.item[0].nextSibling),this.counter=this.counter?++this.counter:1;var n=this.counter;this._delay(function(){n===this.counter&&this.refreshPositions(!s)})},_clear:function(t,e){this.reverting=!1;var i,s=[];if(!this._noFinalSort&&this.currentItem.parent().length&&this.placeholder.before(this.currentItem),this._noFinalSort=null,this.helper[0]===this.currentItem[0]){for(i in this._storedCSS)("auto"===this._storedCSS[i]||"static"===this._storedCSS[i])&&(this._storedCSS[i]="");this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper")}else this.currentItem.show();for(this.fromOutside&&!e&&s.push(function(t){this._trigger("receive",t,this._uiHash(this.fromOutside))}),!this.fromOutside&&this.domPosition.prev===this.currentItem.prev().not(".ui-sortable-helper")[0]&&this.domPosition.parent===this.currentItem.parent()[0]||e||s.push(function(t){this._trigger("update",t,this._uiHash())}),this!==this.currentContainer&&(e||(s.push(function(t){this._trigger("remove",t,this._uiHash())}),s.push(function(t){return function(e){t._trigger("receive",e,this._uiHash(this))}}.call(this,this.currentContainer)),s.push(function(t){return function(e){t._trigger("update",e,this._uiHash(this))}}.call(this,this.currentContainer)))),i=this.containers.length-1;i>=0;i--)e||s.push(function(t){return function(e){t._trigger("deactivate",e,this._uiHash(this))}}.call(this,this.containers[i])),this.containers[i].containerCache.over&&(s.push(function(t){return function(e){t._trigger("out",e,this._uiHash(this))}}.call(this,this.containers[i])),this.containers[i].containerCache.over=0);if(this.storedCursor&&(this.document.find("body").css("cursor",this.storedCursor),this.storedStylesheet.remove()),this._storedOpacity&&this.helper.css("opacity",this._storedOpacity),this._storedZIndex&&this.helper.css("zIndex","auto"===this._storedZIndex?"":this._storedZIndex),this.dragging=!1,this.cancelHelperRemoval){if(!e){for(this._trigger("beforeStop",t,this._uiHash()),i=0;s.length>i;i++)s[i].call(this,t);this._trigger("stop",t,this._uiHash())}return this.fromOutside=!1,!1}if(e||this._trigger("beforeStop",t,this._uiHash()),this.placeholder[0].parentNode.removeChild(this.placeholder[0]),this.helper[0]!==this.currentItem[0]&&this.helper.remove(),this.helper=null,!e){for(i=0;s.length>i;i++)s[i].call(this,t);this._trigger("stop",t,this._uiHash())}return this.fromOutside=!1,!0},_trigger:function(){t.Widget.prototype._trigger.apply(this,arguments)===!1&&this.cancel()},_uiHash:function(e){var i=e||this;return{helper:i.helper,placeholder:i.placeholder||t([]),position:i.position,originalPosition:i.originalPosition,offset:i.positionAbs,item:i.currentItem,sender:e?e.element:null}}})})(jQuery);(function(t){var e=0,i={},s={};i.height=i.paddingTop=i.paddingBottom=i.borderTopWidth=i.borderBottomWidth="hide",s.height=s.paddingTop=s.paddingBottom=s.borderTopWidth=s.borderBottomWidth="show",t.widget("ui.accordion",{version:"1.10.3",options:{active:0,animate:{},collapsible:!1,event:"click",header:"> li > :first-child,> :not(li):even",heightStyle:"auto",icons:{activeHeader:"ui-icon-triangle-1-s",header:"ui-icon-triangle-1-e"},activate:null,beforeActivate:null},_create:function(){var e=this.options;this.prevShow=this.prevHide=t(),this.element.addClass("ui-accordion ui-widget ui-helper-reset").attr("role","tablist"),e.collapsible||e.active!==!1&&null!=e.active||(e.active=0),this._processPanels(),0>e.active&&(e.active+=this.headers.length),this._refresh()},_getCreateEventData:function(){return{header:this.active,panel:this.active.length?this.active.next():t(),content:this.active.length?this.active.next():t()}},_createIcons:function(){var e=this.options.icons;e&&(t("<span>").addClass("ui-accordion-header-icon ui-icon "+e.header).prependTo(this.headers),this.active.children(".ui-accordion-header-icon").removeClass(e.header).addClass(e.activeHeader),this.headers.addClass("ui-accordion-icons"))},_destroyIcons:function(){this.headers.removeClass("ui-accordion-icons").children(".ui-accordion-header-icon").remove()},_destroy:function(){var t;this.element.removeClass("ui-accordion ui-widget ui-helper-reset").removeAttr("role"),this.headers.removeClass("ui-accordion-header ui-accordion-header-active ui-helper-reset ui-state-default ui-corner-all ui-state-active ui-state-disabled ui-corner-top").removeAttr("role").removeAttr("aria-selected").removeAttr("aria-controls").removeAttr("tabIndex").each(function(){/^ui-accordion/.test(this.id)&&this.removeAttribute("id")}),this._destroyIcons(),t=this.headers.next().css("display","").removeAttr("role").removeAttr("aria-expanded").removeAttr("aria-hidden").removeAttr("aria-labelledby").removeClass("ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content ui-accordion-content-active ui-state-disabled").each(function(){/^ui-accordion/.test(this.id)&&this.removeAttribute("id")}),"content"!==this.options.heightStyle&&t.css("height","")},_setOption:function(t,e){return"active"===t?(this._activate(e),undefined):("event"===t&&(this.options.event&&this._off(this.headers,this.options.event),this._setupEvents(e)),this._super(t,e),"collapsible"!==t||e||this.options.active!==!1||this._activate(0),"icons"===t&&(this._destroyIcons(),e&&this._createIcons()),"disabled"===t&&this.headers.add(this.headers.next()).toggleClass("ui-state-disabled",!!e),undefined)},_keydown:function(e){if(!e.altKey&&!e.ctrlKey){var i=t.ui.keyCode,s=this.headers.length,n=this.headers.index(e.target),a=!1;switch(e.keyCode){case i.RIGHT:case i.DOWN:a=this.headers[(n+1)%s];break;case i.LEFT:case i.UP:a=this.headers[(n-1+s)%s];break;case i.SPACE:case i.ENTER:this._eventHandler(e);break;case i.HOME:a=this.headers[0];break;case i.END:a=this.headers[s-1]}a&&(t(e.target).attr("tabIndex",-1),t(a).attr("tabIndex",0),a.focus(),e.preventDefault())}},_panelKeyDown:function(e){e.keyCode===t.ui.keyCode.UP&&e.ctrlKey&&t(e.currentTarget).prev().focus()},refresh:function(){var e=this.options;this._processPanels(),e.active===!1&&e.collapsible===!0||!this.headers.length?(e.active=!1,this.active=t()):e.active===!1?this._activate(0):this.active.length&&!t.contains(this.element[0],this.active[0])?this.headers.length===this.headers.find(".ui-state-disabled").length?(e.active=!1,this.active=t()):this._activate(Math.max(0,e.active-1)):e.active=this.headers.index(this.active),this._destroyIcons(),this._refresh()},_processPanels:function(){this.headers=this.element.find(this.options.header).addClass("ui-accordion-header ui-helper-reset ui-state-default ui-corner-all"),this.headers.next().addClass("ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom").filter(":not(.ui-accordion-content-active)").hide()},_refresh:function(){var i,s=this.options,n=s.heightStyle,a=this.element.parent(),o=this.accordionId="ui-accordion-"+(this.element.attr("id")||++e);this.active=this._findActive(s.active).addClass("ui-accordion-header-active ui-state-active ui-corner-top").removeClass("ui-corner-all"),this.active.next().addClass("ui-accordion-content-active").show(),this.headers.attr("role","tab").each(function(e){var i=t(this),s=i.attr("id"),n=i.next(),a=n.attr("id");s||(s=o+"-header-"+e,i.attr("id",s)),a||(a=o+"-panel-"+e,n.attr("id",a)),i.attr("aria-controls",a),n.attr("aria-labelledby",s)}).next().attr("role","tabpanel"),this.headers.not(this.active).attr({"aria-selected":"false",tabIndex:-1}).next().attr({"aria-expanded":"false","aria-hidden":"true"}).hide(),this.active.length?this.active.attr({"aria-selected":"true",tabIndex:0}).next().attr({"aria-expanded":"true","aria-hidden":"false"}):this.headers.eq(0).attr("tabIndex",0),this._createIcons(),this._setupEvents(s.event),"fill"===n?(i=a.height(),this.element.siblings(":visible").each(function(){var e=t(this),s=e.css("position");"absolute"!==s&&"fixed"!==s&&(i-=e.outerHeight(!0))}),this.headers.each(function(){i-=t(this).outerHeight(!0)}),this.headers.next().each(function(){t(this).height(Math.max(0,i-t(this).innerHeight()+t(this).height()))}).css("overflow","auto")):"auto"===n&&(i=0,this.headers.next().each(function(){i=Math.max(i,t(this).css("height","").height())}).height(i))},_activate:function(e){var i=this._findActive(e)[0];i!==this.active[0]&&(i=i||this.active[0],this._eventHandler({target:i,currentTarget:i,preventDefault:t.noop}))},_findActive:function(e){return"number"==typeof e?this.headers.eq(e):t()},_setupEvents:function(e){var i={keydown:"_keydown"};e&&t.each(e.split(" "),function(t,e){i[e]="_eventHandler"}),this._off(this.headers.add(this.headers.next())),this._on(this.headers,i),this._on(this.headers.next(),{keydown:"_panelKeyDown"}),this._hoverable(this.headers),this._focusable(this.headers)},_eventHandler:function(e){var i=this.options,s=this.active,n=t(e.currentTarget),a=n[0]===s[0],o=a&&i.collapsible,r=o?t():n.next(),h=s.next(),l={oldHeader:s,oldPanel:h,newHeader:o?t():n,newPanel:r};e.preventDefault(),a&&!i.collapsible||this._trigger("beforeActivate",e,l)===!1||(i.active=o?!1:this.headers.index(n),this.active=a?t():n,this._toggle(l),s.removeClass("ui-accordion-header-active ui-state-active"),i.icons&&s.children(".ui-accordion-header-icon").removeClass(i.icons.activeHeader).addClass(i.icons.header),a||(n.removeClass("ui-corner-all").addClass("ui-accordion-header-active ui-state-active ui-corner-top"),i.icons&&n.children(".ui-accordion-header-icon").removeClass(i.icons.header).addClass(i.icons.activeHeader),n.next().addClass("ui-accordion-content-active")))},_toggle:function(e){var i=e.newPanel,s=this.prevShow.length?this.prevShow:e.oldPanel;this.prevShow.add(this.prevHide).stop(!0,!0),this.prevShow=i,this.prevHide=s,this.options.animate?this._animate(i,s,e):(s.hide(),i.show(),this._toggleComplete(e)),s.attr({"aria-expanded":"false","aria-hidden":"true"}),s.prev().attr("aria-selected","false"),i.length&&s.length?s.prev().attr("tabIndex",-1):i.length&&this.headers.filter(function(){return 0===t(this).attr("tabIndex")}).attr("tabIndex",-1),i.attr({"aria-expanded":"true","aria-hidden":"false"}).prev().attr({"aria-selected":"true",tabIndex:0})},_animate:function(t,e,n){var a,o,r,h=this,l=0,c=t.length&&(!e.length||t.index()<e.index()),u=this.options.animate||{},d=c&&u.down||u,p=function(){h._toggleComplete(n)};return"number"==typeof d&&(r=d),"string"==typeof d&&(o=d),o=o||d.easing||u.easing,r=r||d.duration||u.duration,e.length?t.length?(a=t.show().outerHeight(),e.animate(i,{duration:r,easing:o,step:function(t,e){e.now=Math.round(t)}}),t.hide().animate(s,{duration:r,easing:o,complete:p,step:function(t,i){i.now=Math.round(t),"height"!==i.prop?l+=i.now:"content"!==h.options.heightStyle&&(i.now=Math.round(a-e.outerHeight()-l),l=0)}}),undefined):e.animate(i,r,o,p):t.animate(s,r,o,p)},_toggleComplete:function(t){var e=t.oldPanel;e.removeClass("ui-accordion-content-active").prev().removeClass("ui-corner-top").addClass("ui-corner-all"),e.length&&(e.parent()[0].className=e.parent()[0].className),this._trigger("activate",null,t)}})})(jQuery);(function(t){var e=0;t.widget("ui.autocomplete",{version:"1.10.3",defaultElement:"<input>",options:{appendTo:null,autoFocus:!1,delay:300,minLength:1,position:{my:"left top",at:"left bottom",collision:"none"},source:null,change:null,close:null,focus:null,open:null,response:null,search:null,select:null},pending:0,_create:function(){var e,i,s,n=this.element[0].nodeName.toLowerCase(),a="textarea"===n,o="input"===n;this.isMultiLine=a?!0:o?!1:this.element.prop("isContentEditable"),this.valueMethod=this.element[a||o?"val":"text"],this.isNewMenu=!0,this.element.addClass("ui-autocomplete-input").attr("autocomplete","off"),this._on(this.element,{keydown:function(n){if(this.element.prop("readOnly"))return e=!0,s=!0,i=!0,undefined;e=!1,s=!1,i=!1;var a=t.ui.keyCode;switch(n.keyCode){case a.PAGE_UP:e=!0,this._move("previousPage",n);break;case a.PAGE_DOWN:e=!0,this._move("nextPage",n);break;case a.UP:e=!0,this._keyEvent("previous",n);break;case a.DOWN:e=!0,this._keyEvent("next",n);break;case a.ENTER:case a.NUMPAD_ENTER:this.menu.active&&(e=!0,n.preventDefault(),this.menu.select(n));break;case a.TAB:this.menu.active&&this.menu.select(n);break;case a.ESCAPE:this.menu.element.is(":visible")&&(this._value(this.term),this.close(n),n.preventDefault());break;default:i=!0,this._searchTimeout(n)}},keypress:function(s){if(e)return e=!1,(!this.isMultiLine||this.menu.element.is(":visible"))&&s.preventDefault(),undefined;if(!i){var n=t.ui.keyCode;switch(s.keyCode){case n.PAGE_UP:this._move("previousPage",s);break;case n.PAGE_DOWN:this._move("nextPage",s);break;case n.UP:this._keyEvent("previous",s);break;case n.DOWN:this._keyEvent("next",s)}}},input:function(t){return s?(s=!1,t.preventDefault(),undefined):(this._searchTimeout(t),undefined)},focus:function(){this.selectedItem=null,this.previous=this._value(
vendor: 19,881 bytes, line 12
12)},blur:function(t){return this.cancelBlur?(delete this.cancelBlur,undefined):(clearTimeout(this.searching),this.close(t),this._change(t),undefined)}}),this._initSource(),this.menu=t("<ul>").addClass("ui-autocomplete ui-front").appendTo(this._appendTo()).menu({role:null}).hide().data("ui-menu"),this._on(this.menu.element,{mousedown:function(e){e.preventDefault(),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur});var i=this.menu.element[0];t(e.target).closest(".ui-menu-item").length||this._delay(function(){var e=this;this.document.one("mousedown",function(s){s.target===e.element[0]||s.target===i||t.contains(i,s.target)||e.close()})})},menufocus:function(e,i){if(this.isNewMenu&&(this.isNewMenu=!1,e.originalEvent&&/^mouse/.test(e.originalEvent.type)))return this.menu.blur(),this.document.one("mousemove",function(){t(e.target).trigger(e.originalEvent)}),undefined;var s=i.item.data("ui-autocomplete-item");!1!==this._trigger("focus",e,{item:s})?e.originalEvent&&/^key/.test(e.originalEvent.type)&&this._value(s.value):this.liveRegion.text(s.value)},menuselect:function(t,e){var i=e.item.data("ui-autocomplete-item"),s=this.previous;this.element[0]!==this.document[0].activeElement&&(this.element.focus(),this.previous=s,this._delay(function(){this.previous=s,this.selectedItem=i})),!1!==this._trigger("select",t,{item:i})&&this._value(i.value),this.term=this._value(),this.close(t),this.selectedItem=i}}),this.liveRegion=t("<span>",{role:"status","aria-live":"polite"}).addClass("ui-helper-hidden-accessible").insertBefore(this.element),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_destroy:function(){clearTimeout(this.searching),this.element.removeClass("ui-autocomplete-input").removeAttr("autocomplete"),this.menu.element.remove(),this.liveRegion.remove()},_setOption:function(t,e){this._super(t,e),"source"===t&&this._initSource(),"appendTo"===t&&this.menu.element.appendTo(this._appendTo()),"disabled"===t&&e&&this.xhr&&this.xhr.abort()},_appendTo:function(){var e=this.options.appendTo;return e&&(e=e.jquery||e.nodeType?t(e):this.document.find(e).eq(0)),e||(e=this.element.closest(".ui-front")),e.length||(e=this.document[0].body),e},_initSource:function(){var e,i,s=this;t.isArray(this.options.source)?(e=this.options.source,this.source=function(i,s){s(t.ui.autocomplete.filter(e,i.term))}):"string"==typeof this.options.source?(i=this.options.source,this.source=function(e,n){s.xhr&&s.xhr.abort(),s.xhr=t.ajax({url:i,data:e,dataType:"json",success:function(t){n(t)},error:function(){n([])}})}):this.source=this.options.source},_searchTimeout:function(t){clearTimeout(this.searching),this.searching=this._delay(function(){this.term!==this._value()&&(this.selectedItem=null,this.search(null,t))},this.options.delay)},search:function(t,e){return t=null!=t?t:this._value(),this.term=this._value(),t.length<this.options.minLength?this.close(e):this._trigger("search",e)!==!1?this._search(t):undefined},_search:function(t){this.pending++,this.element.addClass("ui-autocomplete-loading"),this.cancelSearch=!1,this.source({term:t},this._response())},_response:function(){var t=this,i=++e;return function(s){i===e&&t.__response(s),t.pending--,t.pending||t.element.removeClass("ui-autocomplete-loading")}},__response:function(t){t&&(t=this._normalize(t)),this._trigger("response",null,{content:t}),!this.options.disabled&&t&&t.length&&!this.cancelSearch?(this._suggest(t),this._trigger("open")):this._close()},close:function(t){this.cancelSearch=!0,this._close(t)},_close:function(t){this.menu.element.is(":visible")&&(this.menu.element.hide(),this.menu.blur(),this.isNewMenu=!0,this._trigger("close",t))},_change:function(t){this.previous!==this._value()&&this._trigger("change",t,{item:this.selectedItem})},_normalize:function(e){return e.length&&e[0].label&&e[0].value?e:t.map(e,function(e){return"string"==typeof e?{label:e,value:e}:t.extend({label:e.label||e.value,value:e.value||e.label},e)})},_suggest:function(e){var i=this.menu.element.empty();this._renderMenu(i,e),this.isNewMenu=!0,this.menu.refresh(),i.show(),this._resizeMenu(),i.position(t.extend({of:this.element},this.options.position)),this.options.autoFocus&&this.menu.next()},_resizeMenu:function(){var t=this.menu.element;t.outerWidth(Math.max(t.width("").outerWidth()+1,this.element.outerWidth()))},_renderMenu:function(e,i){var s=this;t.each(i,function(t,i){s._renderItemData(e,i)})},_renderItemData:function(t,e){return this._renderItem(t,e).data("ui-autocomplete-item",e)},_renderItem:function(e,i){return t("<li>").append(t("<a>").text(i.label)).appendTo(e)},_move:function(t,e){return this.menu.element.is(":visible")?this.menu.isFirstItem()&&/^previous/.test(t)||this.menu.isLastItem()&&/^next/.test(t)?(this._value(this.term),this.menu.blur(),undefined):(this.menu[t](e),undefined):(this.search(null,e),undefined)},widget:function(){return this.menu.element},_value:function(){return this.valueMethod.apply(this.element,arguments)},_keyEvent:function(t,e){(!this.isMultiLine||this.menu.element.is(":visible"))&&(this._move(t,e),e.preventDefault())}}),t.extend(t.ui.autocomplete,{escapeRegex:function(t){return t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")},filter:function(e,i){var s=RegExp(t.ui.autocomplete.escapeRegex(i),"i");return t.grep(e,function(t){return s.test(t.label||t.value||t)})}}),t.widget("ui.autocomplete",t.ui.autocomplete,{options:{messages:{noResults:"No search results.",results:function(t){return t+(t>1?" results are":" result is")+" available, use up and down arrow keys to navigate."}}},__response:function(t){var e;this._superApply(arguments),this.options.disabled||this.cancelSearch||(e=t&&t.length?this.options.messages.results(t.length):this.options.messages.noResults,this.liveRegion.text(e))}})})(jQuery);(function(t){var e,i,s,n,a="ui-button ui-widget ui-state-default ui-corner-all",o="ui-state-hover ui-state-active ",r="ui-button-icons-only ui-button-icon-only ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary ui-button-text-only",h=function(){var e=t(this);setTimeout(function(){e.find(":ui-button").button("refresh")},1)},l=function(e){var i=e.name,s=e.form,n=t([]);return i&&(i=i.replace(/'/g,"\\'"),n=s?t(s).find("[name='"+i+"']"):t("[name='"+i+"']",e.ownerDocument).filter(function(){return!this.form})),n};t.widget("ui.button",{version:"1.10.3",defaultElement:"<button>",options:{disabled:null,text:!0,label:null,icons:{primary:null,secondary:null}},_create:function(){this.element.closest("form").unbind("reset"+this.eventNamespace).bind("reset"+this.eventNamespace,h),"boolean"!=typeof this.options.disabled?this.options.disabled=!!this.element.prop("disabled"):this.element.prop("disabled",this.options.disabled),this._determineButtonType(),this.hasTitle=!!this.buttonElement.attr("title");var o=this,r=this.options,c="checkbox"===this.type||"radio"===this.type,u=c?"":"ui-state-active",d="ui-state-focus";null===r.label&&(r.label="input"===this.type?this.buttonElement.val():this.buttonElement.html()),this._hoverable(this.buttonElement),this.buttonElement.addClass(a).attr("role","button").bind("mouseenter"+this.eventNamespace,function(){r.disabled||this===e&&t(this).addClass("ui-state-active")}).bind("mouseleave"+this.eventNamespace,function(){r.disabled||t(this).removeClass(u)}).bind("click"+this.eventNamespace,function(t){r.disabled&&(t.preventDefault(),t.stopImmediatePropagation())}),this.element.bind("focus"+this.eventNamespace,function(){o.buttonElement.addClass(d)}).bind("blur"+this.eventNamespace,function(){o.buttonElement.removeClass(d)}),c&&(this.element.bind("change"+this.eventNamespace,function(){n||o.refresh()}),this.buttonElement.bind("mousedown"+this.eventNamespace,function(t){r.disabled||(n=!1,i=t.pageX,s=t.pageY)}).bind("mouseup"+this.eventNamespace,function(t){r.disabled||(i!==t.pageX||s!==t.pageY)&&(n=!0)})),"checkbox"===this.type?this.buttonElement.bind("click"+this.eventNamespace,function(){return r.disabled||n?!1:undefined}):"radio"===this.type?this.buttonElement.bind("click"+this.eventNamespace,function(){if(r.disabled||n)return!1;t(this).addClass("ui-state-active"),o.buttonElement.attr("aria-pressed","true");var e=o.element[0];l(e).not(e).map(function(){return t(this).button("widget")[0]}).removeClass("ui-state-active").attr("aria-pressed","false")}):(this.buttonElement.bind("mousedown"+this.eventNamespace,function(){return r.disabled?!1:(t(this).addClass("ui-state-active"),e=this,o.document.one("mouseup",function(){e=null}),undefined)}).bind("mouseup"+this.eventNamespace,function(){return r.disabled?!1:(t(this).removeClass("ui-state-active"),undefined)}).bind("keydown"+this.eventNamespace,function(e){return r.disabled?!1:((e.keyCode===t.ui.keyCode.SPACE||e.keyCode===t.ui.keyCode.ENTER)&&t(this).addClass("ui-state-active"),undefined)}).bind("keyup"+this.eventNamespace+" blur"+this.eventNamespace,function(){t(this).removeClass("ui-state-active")}),this.buttonElement.is("a")&&this.buttonElement.keyup(function(e){e.keyCode===t.ui.keyCode.SPACE&&t(this).click()})),this._setOption("disabled",r.disabled),this._resetButton()},_determineButtonType:function(){var t,e,i;this.type=this.element.is("[type=checkbox]")?"checkbox":this.element.is("[type=radio]")?"radio":this.element.is("input")?"input":"button","checkbox"===this.type||"radio"===this.type?(t=this.element.parents().last(),e="label[for='"+this.element.attr("id")+"']",this.buttonElement=t.find(e),this.buttonElement.length||(t=t.length?t.siblings():this.element.siblings(),this.buttonElement=t.filter(e),this.buttonElement.length||(this.buttonElement=t.find(e))),this.element.addClass("ui-helper-hidden-accessible"),i=this.element.is(":checked"),i&&this.buttonElement.addClass("ui-state-active"),this.buttonElement.prop("aria-pressed",i)):this.buttonElement=this.element},widget:function(){return this.buttonElement},_destroy:function(){this.element.removeClass("ui-helper-hidden-accessible"),this.buttonElement.removeClass(a+" "+o+" "+r).removeAttr("role").removeAttr("aria-pressed").html(this.buttonElement.find(".ui-button-text").html()),this.hasTitle||this.buttonElement.removeAttr("title")},_setOption:function(t,e){return this._super(t,e),"disabled"===t?(e?this.element.prop("disabled",!0):this.element.prop("disabled",!1),undefined):(this._resetButton(),undefined)},refresh:function(){var e=this.element.is("input, button")?this.element.is(":disabled"):this.element.hasClass("ui-button-disabled");e!==this.options.disabled&&this._setOption("disabled",e),"radio"===this.type?l(this.element[0]).each(function(){t(this).is(":checked")?t(this).button("widget").addClass("ui-state-active").attr("aria-pressed","true"):t(this).button("widget").removeClass("ui-state-active").attr("aria-pressed","false")}):"checkbox"===this.type&&(this.element.is(":checked")?this.buttonElement.addClass("ui-state-active").attr("aria-pressed","true"):this.buttonElement.removeClass("ui-state-active").attr("aria-pressed","false"))},_resetButton:function(){if("input"===this.type)return this.options.label&&this.element.val(this.options.label),undefined;var e=this.buttonElement.removeClass(r),i=t("<span></span>",this.document[0]).addClass("ui-button-text").html(this.options.label).appendTo(e.empty()).text(),s=this.options.icons,n=s.primary&&s.secondary,a=[];s.primary||s.secondary?(this.options.text&&a.push("ui-button-text-icon"+(n?"s":s.primary?"-primary":"-secondary")),s.primary&&e.prepend("<span class='ui-button-icon-primary ui-icon "+s.primary+"'></span>"),s.secondary&&e.append("<span class='ui-button-icon-secondary ui-icon "+s.secondary+"'></span>"),this.options.text||(a.push(n?"ui-button-icons-only":"ui-button-icon-only"),this.hasTitle||e.attr("title",t.trim(i)))):a.push("ui-button-text-only"),e.addClass(a.join(" "))}}),t.widget("ui.buttonset",{version:"1.10.3",options:{items:"button, input[type=button], input[type=submit], input[type=reset], input[type=checkbox], input[type=radio], a, :data(ui-button)"},_create:function(){this.element.addClass("ui-buttonset")},_init:function(){this.refresh()},_setOption:function(t,e){"disabled"===t&&this.buttons.button("option",t,e),this._super(t,e)},refresh:function(){var e="rtl"===this.element.css("direction");this.buttons=this.element.find(this.options.items).filter(":ui-button").button("refresh").end().not(":ui-button").button().end().map(function(){return t(this).button("widget")[0]}).removeClass("ui-corner-all ui-corner-left ui-corner-right").filter(":first").addClass(e?"ui-corner-right":"ui-corner-left").end().filter(":last").addClass(e?"ui-corner-left":"ui-corner-right").end().end()},_destroy:function(){this.element.removeClass("ui-buttonset"),this.buttons.map(function(){return t(this).button("widget")[0]}).removeClass("ui-corner-left ui-corner-right").end().button("destroy")}})})(jQuery);(function(t,e){function i(){this._curInst=null,this._keyEvent=!1,this._disabledInputs=[],this._datepickerShowing=!1,this._inDialog=!1,this._mainDivId="ui-datepicker-div",this._inlineClass="ui-datepicker-inline",this._appendClass="ui-datepicker-append",this._triggerClass="ui-datepicker-trigger",this._dialogClass="ui-datepicker-dialog",this._disableClass="ui-datepicker-disabled",this._unselectableClass="ui-datepicker-unselectable",this._currentClass="ui-datepicker-current-day",this._dayOverClass="ui-datepicker-days-cell-over",this.regional=[],this.regional[""]={closeText:"Done",prevText:"Prev",nextText:"Next",currentText:"Today",monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],weekHeader:"Wk",dateFormat:"mm/dd/yy",firstDay:0,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},this._defaults={showOn:"focus",showAnim:"fadeIn",showOptions:{},defaultDate:null,appendText:"",buttonText:"...",buttonImage:"",buttonImageOnly:!1,hideIfNoPrevNext:!1,navigationAsDateFormat:!1,gotoCurrent:!1,changeMonth:!1,changeYear:!1,yearRange:"c-10:c+10",showOtherMonths:!1,selectOtherMonths:!1,showWeek:!1,calculateWeek:this.iso8601Week,shortYearCutoff:"+10",minDate:null,maxDate:null,duration:"fast",beforeShowDay:null,beforeShow:null,onSelect:null,onChangeMonthYear:null,onClose:null,numberOfMonths:1,showCurrentAtPos:0,stepMonths:1,stepBigMonths:12,altField:"",altFormat:"",constrainInput:!0,showButtonPanel:!1,autoSize:!1,disabled:!1},t.extend(this._defaults,this.regional[""]),this.dpDiv=s(t("<div id='"+this._mainDivId+"' class='ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>"))}function s(e){var i="button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a";return e.delegate(i,"mouseout",function(){t(this).removeClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&t(this).removeClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&t(this).removeClass("ui-datepicker-next-hover")}).delegate(i,"mouseover",function(){t.datepicker._isDisabledDatepicker(a.inline?e.parent()[0]:a.input[0])||(t(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover"),t(this).addClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&t(this).addClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&t(this).addClass("ui-datepicker-next-hover"))})}function n(e,i){t.extend(e,i);for(var s in i)null==i[s]&&(e[s]=i[s]);return e}t.extend(t.ui,{datepicker:{version:"1.10.3"}});var a,r="datepicker";t.extend(i.prototype,{markerClassName:"hasDatepicker",maxRows:4,_widgetDatepicker:function(){return this.dpDiv},setDefaults:function(t){return n(this._defaults,t||{}),this},_attachDatepicker:function(e,i){var s,n,a;s=e.nodeName.toLowerCase(),n="div"===s||"span"===s,e.id||(this.uuid+=1,e.id="dp"+this.uuid),a=this._newInst(t(e),n),a.settings=t.extend({},i||{}),"input"===s?this._connectDatepicker(e,a):n&&this._inlineDatepicker(e,a)},_newInst:function(e,i){var n=e[0].id.replace(/([^A-Za-z0-9_\-])/g,"\\\\$1");return{id:n,input:e,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:i,dpDiv:i?s(t("<div class='"+this._inlineClass+" ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>")):this.dpDiv}},_connectDatepicker:function(e,i){var s=t(e);i.append=t([]),i.trigger=t([]),s.hasClass(this.markerClassName)||(this._attachments(s,i),s.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).keyup(this._doKeyUp),this._autoSize(i),t.data(e,r,i),i.settings.disabled&&this._disableDatepicker(e))},_attachments:function(e,i){var s,n,a,r=this._get(i,"appendText"),o=this._get(i,"isRTL");i.append&&i.append.remove(),r&&(i.append=t("<span class='"+this._appendClass+"'>"+r+"</span>"),e[o?"before":"after"](i.append)),e.unbind("focus",this._showDatepicker),i.trigger&&i.trigger.remove(),s=this._get(i,"showOn"),("focus"===s||"both"===s)&&e.focus(this._showDatepicker),("button"===s||"both"===s)&&(n=this._get(i,"buttonText"),a=this._get(i,"buttonImage"),i.trigger=t(this._get(i,"buttonImageOnly")?t("<img/>").addClass(this._triggerClass).attr({src:a,alt:n,title:n}):t("<button type='button'></button>").addClass(this._triggerClass).html(a?t("<img/>").attr({src:a,alt:n,title:n}):n)),e[o?"before":"after"](i.trigger),i.trigger.click(function(){return t.datepicker._datepickerShowing&&t.datepicker._lastInput===e[0]?t.datepicker._hideDatepicker():t.datepicker._datepickerShowing&&t.datepicker._lastInput!==e[0]?(t.datepicker._hideDatepicker(),t.datepicker._showDatepicker(e[0])):t.datepicker._showDatepicker(e[0]),!1}))},_autoSize:function(t){if(this._get(t,"autoSize")&&!t.inline){var e,i,s,n,a=new Date(2009,11,20),r=this._get(t,"dateFormat");r.match(/[DM]/)&&(e=function(t){for(i=0,s=0,n=0;t.length>n;n++)t[n].length>i&&(i=t[n].length,s=n);return s},a.setMonth(e(this._get(t,r.match(/MM/)?"monthNames":"monthNamesShort"))),a.setDate(e(this._get(t,r.match(/DD/)?"dayNames":"dayNamesShort"))+20-a.getDay())),t.input.attr("size",this._formatDate(t,a).length)}},_inlineDatepicker:function(e,i){var s=t(e);s.hasClass(this.markerClassName)||(s.addClass(this.markerClassName).append(i.dpDiv),t.data(e,r,i),this._setDate(i,this._getDefaultDate(i),!0),this._updateDatepicker(i),this._updateAlternate(i),i.settings.disabled&&this._disableDatepicker(e),i.dpDiv.css("display","block"))},_dialogDatepicker:function(e,i,s,a,o){var h,l,c,u,d,p=this._dialogInst;return p||(this.uuid+=1,h="dp"+this.uuid,this._dialogInput=t("<input type='text' id='"+h+"' style='position: absolute; top: -100px; width: 0px;'/>"),this._dialogInput.keydown(this._doKeyDown),t("body").append(this._dialogInput),p=this._dialogInst=this._newInst(this._dialogInput,!1),p.settings={},t.data(this._dialogInput[0],r,p)),n(p.settings,a||{}),i=i&&i.constructor===Date?this._formatDate(p,i):i,this._dialogInput.val(i),this._pos=o?o.length?o:[o.pageX,o.pageY]:null,this._pos||(l=document.documentElement.clientWidth,c=document.documentElement.clientHeight,u=document.documentElement.scrollLeft||document.body.scrollLeft,d=document.documentElement.scrollTop||document.body.scrollTop,this._pos=[l/2-100+u,c/2-150+d]),this._dialogInput.css("left",this._pos[0]+20+"px").css("top",this._pos[1]+"px"),p.settings.onSelect=s,this._inDialog=!0,this.dpDiv.addClass(this._dialogClass),this._showDatepicker(this._dialogInput[0]),t.blockUI&&t.blockUI(this.dpDiv),t.data(this._dialogInput[0],r,p),this},_destroyDatepicker:function(e){var i,s=t(e),n=t.data(e,r);s.hasClass(this.markerClassName)&&(i=e.nodeName.toLowerCase(),t.removeData(e,r),"input"===i?(n.append.remove(),n.trigger.remove(),s.removeClass(this.markerClassName).unbind("focus",this._showDatepicker).unbind("
12keydown",this._doKeyDown).unbind("keypress",this._doKeyPress).unbind("keyup",this._doKeyUp)):("div"===i||"span"===i)&&s.removeClass(this.markerClassName).empty())},_enableDatepicker:function(e){var i,s,n=t(e),a=t.data(e,r);n.hasClass(this.markerClassName)&&(i=e.nodeName.toLowerCase(),"input"===i?(e.disabled=!1,a.trigger.filter("button").each(function(){this.disabled=!1}).end().filter("img").css({opacity:"1.0",cursor:""})):("div"===i||"span"===i)&&(s=n.children("."+this._inlineClass),s.children().removeClass("ui-state-disabled"),s.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!1)),this._disabledInputs=t.map(this._disabledInputs,function(t){return t===e?null:t}))},_disableDatepicker:function(e){var i,s,n=t(e),a=t.data(e,r);n.hasClass(this.markerClassName)&&(i=e.nodeName.toLowerCase(),"input"===i?(e.disabled=!0,a.trigger.filter("button").each(function(){this.disabled=!0}).end().filter("img").css({opacity:"0.5",cursor:"default"})):("div"===i||"span"===i)&&(s=n.children("."+this._inlineClass),s.children().addClass("ui-state-disabled"),s.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!0)),this._disabledInputs=t.map(this._disabledInputs,function(t){return t===e?null:t}),this._disabledInputs[this._disabledInputs.length]=e)},_isDisabledDatepicker:function(t){if(!t)return!1;for(var e=0;this._disabledInputs.length>e;e++)if(this._disabledInputs[e]===t)return!0;return!1},_getInst:function(e){try{return t.data(e,r)}catch(i){throw"Missing instance data for this datepicker"}},_optionDatepicker:function(i,s,a){var r,o,h,l,c=this._getInst(i);return 2===arguments.length&&"string"==typeof s?"defaults"===s?t.extend({},t.datepicker._defaults):c?"all"===s?t.extend({},c.settings):this._get(c,s):null:(r=s||{},"string"==typeof s&&(r={},r[s]=a),c&&(this._curInst===c&&this._hideDatepicker(),o=this._getDateDatepicker(i,!0),h=this._getMinMaxDate(c,"min"),l=this._getMinMaxDate(c,"max"),n(c.settings,r),null!==h&&r.dateFormat!==e&&r.minDate===e&&(c.settings.minDate=this._formatDate(c,h)),null!==l&&r.dateFormat!==e&&r.maxDate===e&&(c.settings.maxDate=this._formatDate(c,l)),"disabled"in r&&(r.disabled?this._disableDatepicker(i):this._enableDatepicker(i)),this._attachments(t(i),c),this._autoSize(c),this._setDate(c,o),this._updateAlternate(c),this._updateDatepicker(c)),e)},_changeDatepicker:function(t,e,i){this._optionDatepicker(t,e,i)},_refreshDatepicker:function(t){var e=this._getInst(t);e&&this._updateDatepicker(e)},_setDateDatepicker:function(t,e){var i=this._getInst(t);i&&(this._setDate(i,e),this._updateDatepicker(i),this._updateAlternate(i))},_getDateDatepicker:function(t,e){var i=this._getInst(t);return i&&!i.inline&&this._setDateFromField(i,e),i?this._getDate(i):null},_doKeyDown:function(e){var i,s,n,a=t.datepicker._getInst(e.target),r=!0,o=a.dpDiv.is(".ui-datepicker-rtl");if(a._keyEvent=!0,t.datepicker._datepickerShowing)switch(e.keyCode){case 9:t.datepicker._hideDatepicker(),r=!1;break;case 13:return n=t("td."+t.datepicker._dayOverClass+":not(."+t.datepicker._currentClass+")",a.dpDiv),n[0]&&t.datepicker._selectDay(e.target,a.selectedMonth,a.selectedYear,n[0]),i=t.datepicker._get(a,"onSelect"),i?(s=t.datepicker._formatDate(a),i.apply(a.input?a.input[0]:null,[s,a])):t.datepicker._hideDatepicker(),!1;case 27:t.datepicker._hideDatepicker();break;case 33:t.datepicker._adjustDate(e.target,e.ctrlKey?-t.datepicker._get(a,"stepBigMonths"):-t.datepicker._get(a,"stepMonths"),"M");break;case 34:t.datepicker._adjustDate(e.target,e.ctrlKey?+t.datepicker._get(a,"stepBigMonths"):+t.datepicker._get(a,"stepMonths"),"M");break;case 35:(e.ctrlKey||e.metaKey)&&t.datepicker._clearDate(e.target),r=e.ctrlKey||e.metaKey;break;case 36:(e.ctrlKey||e.metaKey)&&t.datepicker._gotoToday(e.target),r=e.ctrlKey||e.metaKey;break;case 37:(e.ctrlKey||e.metaKey)&&t.datepicker._adjustDate(e.target,o?1:-1,"D"),r=e.ctrlKey||e.metaKey,e.originalEvent.altKey&&t.datepicker._adjustDate(e.target,e.ctrlKey?-t.datepicker._get(a,"stepBigMonths"):-t.datepicker._get(a,"stepMonths"),"M");break;case 38:(e.ctrlKey||e.metaKey)&&t.datepicker._adjustDate(e.target,-7,"D"),r=e.ctrlKey||e.metaKey;break;case 39:(e.ctrlKey||e.metaKey)&&t.datepicker._adjustDate(e.target,o?-1:1,"D"),r=e.ctrlKey||e.metaKey,e.originalEvent.altKey&&t.datepicker._adjustDate(e.target,e.ctrlKey?+t.datepicker._get(a,"stepBigMonths"):+t.datepicker._get(a,"stepMonths"),"M");break;case 40:(e.ctrlKey||e.metaKey)&&t.datepicker._adjustDate(e.target,7,"D"),r=e.ctrlKey||e.metaKey;break;default:r=!1}else 36===e.keyCode&&e.ctrlKey?t.datepicker._showDatepicker(this):r=!1;r&&(e.preventDefault(),e.stopPropagation())},_doKeyPress:function(i){var s,n,a=t.datepicker._getInst(i.target);return t.datepicker._get(a,"constrainInput")?(s=t.datepicker._possibleChars(t.datepicker._get(a,"dateFormat")),n=String.fromCharCode(null==i.charCode?i.keyCode:i.charCode),i.ctrlKey||i.metaKey||" ">n||!s||s.indexOf(n)>-1):e},_doKeyUp:function(e){var i,s=t.datepicker._getInst(e.target);if(s.input.val()!==s.lastVal)try{i=t.datepicker.parseDate(t.datepicker._get(s,"dateFormat"),s.input?s.input.val():null,t.datepicker._getFormatConfig(s)),i&&(t.datepicker._setDateFromField(s),t.datepicker._updateAlternate(s),t.datepicker._updateDatepicker(s))}catch(n){}return!0}
vendor: 1,720 bytes, line 12
12,_showDatepicker:function(e){if(e=e.target||e,"input"!==e.nodeName.toLowerCase()&&(e=t("input",e.parentNode)[0]),!t.datepicker._isDisabledDatepicker(e)&&t.datepicker._lastInput!==e){var i,s,a,r,o,h,l;i=t.datepicker._getInst(e),t.datepicker._curInst&&t.datepicker._curInst!==i&&(t.datepicker._curInst.dpDiv.stop(!0,!0),i&&t.datepicker._datepickerShowing&&t.datepicker._hideDatepicker(t.datepicker._curInst.input[0])),s=t.datepicker._get(i,"beforeShow"),a=s?s.apply(e,[e,i]):{},a!==!1&&(n(i.settings,a),i.lastVal=null,t.datepicker._lastInput=e,t.datepicker._setDateFromField(i),t.datepicker._inDialog&&(e.value=""),t.datepicker._pos||(t.datepicker._pos=t.datepicker._findPos(e),t.datepicker._pos[1]+=e.offsetHeight),r=!1,t(e).parents().each(function(){return r|="fixed"===t(this).css("position"),!r}),o={left:t.datepicker._pos[0],top:t.datepicker._pos[1]},t.datepicker._pos=null,i.dpDiv.empty(),i.dpDiv.css({position:"absolute",display:"block",top:"-1000px"}),t.datepicker._updateDatepicker(i),o=t.datepicker._checkOffset(i,o,r),i.dpDiv.css({position:t.datepicker._inDialog&&t.blockUI?"static":r?"fixed":"absolute",display:"none",left:o.left+"px",top:o.top+"px"}),i.inline||(h=t.datepicker._get(i,"showAnim"),l=t.datepicker._get(i,"duration"),i.dpDiv.zIndex(t(e).zIndex()+1),t.datepicker._datepickerShowing=!0,t.effects&&t.effects.effect[h]?i.dpDiv.show(h,t.datepicker._get(i,"showOptions"),l):i.dpDiv[h||"show"](h?l:null),t.datepicker._shouldFocusInput(i)&&i.input.focus(),t.datepicker._curInst=i))}},_updateDatepicker:function(e){this.maxRows=4,a=e,e.dpDiv.empty().append(this._generateHTML(e)),this._attachHandlers(e),e.dpDiv.find("."+this._dayOverClass+" a").mouseover();var i,s=this._getNumberOfMonths(e),n=s[1],r=17;
vendor: 20,987 bytes, lines 12-13
12e.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width(""),n>1&&e.dpDiv.addClass("ui-datepicker-multi-"+n).css("width",r*n+"em"),e.dpDiv[(1!==s[0]||1!==s[1]?"add":"remove")+"Class"]("ui-datepicker-multi"),e.dpDiv[(this._get(e,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl"),e===t.datepicker._curInst&&t.datepicker._datepickerShowing&&t.datepicker._shouldFocusInput(e)&&e.input.focus(),e.yearshtml&&(i=e.yearshtml,setTimeout(function(){i===e.yearshtml&&e.yearshtml&&e.dpDiv.find("select.ui-datepicker-year:first").replaceWith(e.yearshtml),i=e.yearshtml=null},0))},_shouldFocusInput:function(t){return t.input&&t.input.is(":visible")&&!t.input.is(":disabled")&&!t.input.is(":focus")},_checkOffset:function(e,i,s){var n=e.dpDiv.outerWidth(),a=e.dpDiv.outerHeight(),r=e.input?e.input.outerWidth():0,o=e.input?e.input.outerHeight():0,h=document.documentElement.clientWidth+(s?0:t(document).scrollLeft()),l=document.documentElement.clientHeight+(s?0:t(document).scrollTop());return i.left-=this._get(e,"isRTL")?n-r:0,i.left-=s&&i.left===e.input.offset().left?t(document).scrollLeft():0,i.top-=s&&i.top===e.input.offset().top+o?t(document).scrollTop():0,i.left-=Math.min(i.left,i.left+n>h&&h>n?Math.abs(i.left+n-h):0),i.top-=Math.min(i.top,i.top+a>l&&l>a?Math.abs(a+o):0),i},_findPos:function(e){for(var i,s=this._getInst(e),n=this._get(s,"isRTL");e&&("hidden"===e.type||1!==e.nodeType||t.expr.filters.hidden(e));)e=e[n?"previousSibling":"nextSibling"];return i=t(e).offset(),[i.left,i.top]},_hideDatepicker:function(e){var i,s,n,a,o=this._curInst;!o||e&&o!==t.data(e,r)||this._datepickerShowing&&(i=this._get(o,"showAnim"),s=this._get(o,"duration"),n=function(){t.datepicker._tidyDialog(o)},t.effects&&(t.effects.effect[i]||t.effects[i])?o.dpDiv.hide(i,t.datepicker._get(o,"showOptions"),s,n):o.dpDiv["slideDown"===i?"slideUp":"fadeIn"===i?"fadeOut":"hide"](i?s:null,n),i||n(),this._datepickerShowing=!1,a=this._get(o,"onClose"),a&&a.apply(o.input?o.input[0]:null,[o.input?o.input.val():"",o]),this._lastInput=null,this._inDialog&&(this._dialogInput.css({position:"absolute",left:"0",top:"-100px"}),t.blockUI&&(t.unblockUI(),t("body").append(this.dpDiv))),this._inDialog=!1)},_tidyDialog:function(t){t.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker-calendar")},_checkExternalClick:function(e){if(t.datepicker._curInst){var i=t(e.target),s=t.datepicker._getInst(i[0]);(i[0].id!==t.datepicker._mainDivId&&0===i.parents("#"+t.datepicker._mainDivId).length&&!i.hasClass(t.datepicker.markerClassName)&&!i.closest("."+t.datepicker._triggerClass).length&&t.datepicker._datepickerShowing&&(!t.datepicker._inDialog||!t.blockUI)||i.hasClass(t.datepicker.markerClassName)&&t.datepicker._curInst!==s)&&t.datepicker._hideDatepicker()}},_adjustDate:function(e,i,s){var n=t(e),a=this._getInst(n[0]);this._isDisabledDatepicker(n[0])||(this._adjustInstDate(a,i+("M"===s?this._get(a,"showCurrentAtPos"):0),s),this._updateDatepicker(a))},_gotoToday:function(e){var i,s=t(e),n=this._getInst(s[0]);this._get(n,"gotoCurrent")&&n.currentDay?(n.selectedDay=n.currentDay,n.drawMonth=n.selectedMonth=n.currentMonth,n.drawYear=n.selectedYear=n.currentYear):(i=new Date,n.selectedDay=i.getDate(),n.drawMonth=n.selectedMonth=i.getMonth(),n.drawYear=n.selectedYear=i.getFullYear()),this._notifyChange(n),this._adjustDate(s)},_selectMonthYear:function(e,i,s){var n=t(e),a=this._getInst(n[0]);a["selected"+("M"===s?"Month":"Year")]=a["draw"+("M"===s?"Month":"Year")]=parseInt(i.options[i.selectedIndex].value,10),this._notifyChange(a),this._adjustDate(n)},_selectDay:function(e,i,s,n){var a,r=t(e);t(n).hasClass(this._unselectableClass)||this._isDisabledDatepicker(r[0])||(a=this._getInst(r[0]),a.selectedDay=a.currentDay=t("a",n).html(),a.selectedMonth=a.currentMonth=i,a.selectedYear=a.currentYear=s,this._selectDate(e,this._formatDate(a,a.currentDay,a.currentMonth,a.currentYear)))},_clearDate:function(e){var i=t(e);this._selectDate(i,"")},_selectDate:function(e,i){var s,n=t(e),a=this._getInst(n[0]);i=null!=i?i:this._formatDate(a),a.input&&a.input.val(i),this._updateAlternate(a),s=this._get(a,"onSelect"),s?s.apply(a.input?a.input[0]:null,[i,a]):a.input&&a.input.trigger("change"),a.inline?this._updateDatepicker(a):(this._hideDatepicker(),this._lastInput=a.input[0],"object"!=typeof a.input[0]&&a.input.focus(),this._lastInput=null)},_updateAlternate:function(e){var i,s,n,a=this._get(e,"altField");a&&(i=this._get(e,"altFormat")||this._get(e,"dateFormat"),s=this._getDate(e),n=this.formatDate(i,s,this._getFormatConfig(e)),t(a).each(function(){t(this).val(n)}))},noWeekends:function(t){var e=t.getDay();return[e>0&&6>e,""]},iso8601Week:function(t){var e,i=new Date(t.getTime());return i.setDate(i.getDate()+4-(i.getDay()||7)),e=i.getTime(),i.setMonth(0),i.setDate(1),Math.floor(Math.round((e-i)/864e5)/7)+1},parseDate:function(i,s,n){if(null==i||null==s)throw"Invalid arguments";if(s="object"==typeof s?""+s:s+"",""===s)return null;var a,r,o,h,l=0,c=(n?n.shortYearCutoff:null)||this._defaults.shortYearCutoff,u="string"!=typeof c?c:(new Date).getFullYear()%100+parseInt(c,10),d=(n?n.dayNamesShort:null)||this._defaults.dayNamesShort,p=(n?n.dayNames:null)||this._defaults.dayNames,f=(n?n.monthNamesShort:null)||this._defaults.monthNamesShort,m=(n?n.monthNames:null)||this._defaults.monthNames,g=-1,v=-1,_=-1,b=-1,y=!1,x=function(t){var e=i.length>a+1&&i.charAt(a+1)===t;return e&&a++,e},k=function(t){var e=x(t),i="@"===t?14:"!"===t?20:"y"===t&&e?4:"o"===t?3:2,n=RegExp("^\\d{1,"+i+"}"),a=s.substring(l).match(n);if(!a)throw"Missing number at position "+l;return l+=a[0].length,parseInt(a[0],10)},w=function(i,n,a){var r=-1,o=t.map(x(i)?a:n,function(t,e){return[[e,t]]}).sort(function(t,e){return-(t[1].length-e[1].length)});if(t.each(o,function(t,i){var n=i[1];return s.substr(l,n.length).toLowerCase()===n.toLowerCase()?(r=i[0],l+=n.length,!1):e}),-1!==r)return r+1;throw"Unknown name at position "+l},D=function(){if(s.charAt(l)!==i.charAt(a))throw"Unexpected literal at position "+l;l++};for(a=0;i.length>a;a++)if(y)"'"!==i.charAt(a)||x("'")?D():y=!1;else switch(i.charAt(a)){case"d":_=k("d");break;case"D":w("D",d,p);break;case"o":b=k("o");break;case"m":v=k("m");break;case"M":v=w("M",f,m);break;case"y":g=k("y");break;case"@":h=new Date(k("@")),g=h.getFullYear(),v=h.getMonth()+1,_=h.getDate();break;case"!":h=new Date((k("!")-this._ticksTo1970)/1e4),g=h.getFullYear(),v=h.getMonth()+1,_=h.getDate();break;case"'":x("'")?D():y=!0;break;default:D()}if(s.length>l&&(o=s.substr(l),!/^\s+/.test(o)))throw"Extra/unparsed characters found in date: "+o;if(-1===g?g=(new Date).getFullYear():100>g&&(g+=(new Date).getFullYear()-(new Date).getFullYear()%100+(u>=g?0:-100)),b>-1)for(v=1,_=b;;){if(r=this._getDaysInMonth(g,v-1),r>=_)break;v++,_-=r}if(h=this._daylightSavingAdjust(new Date(g,v-1,_)),h.getFullYear()!==g||h.getMonth()+1!==v||h.getDate()!==_)throw"Invalid date";return h},ATOM:"yy-mm-dd",COOKIE:"D, dd M yy",ISO_8601:"yy-mm-dd",RFC_822:"D, d M y",RFC_850:"DD, dd-M-y",RFC_1036:"D, d M y",RFC_1123:"D, d M yy",RFC_2822:"D, d M yy",RSS:"D, d M y",TICKS:"!",TIMESTAMP:"@",W3C:"yy-mm-dd",_ticksTo1970:1e7*60*60*24*(718685+Math.floor(492.5)-Math.floor(19.7)+Math.floor(4.925)),formatDate:function(t,e,i){if(!e)return"";var s,n=(i?i.dayNamesShort:null)||this._defaults.dayNamesShort,a=(i?i.dayNames:null)||this._defaults.dayNames,r=(i?i.monthNamesShort:null)||this._defaults.monthNamesShort,o=(i?i.monthNames:null)||this._defaults.monthNames,h=function(e){var i=t.length>s+1&&t.charAt(s+1)===e;return i&&s++,i},l=function(t,e,i){var s=""+e;if(h(t))for(;i>s.length;)s="0"+s;return s},c=function(t,e,i,s){return h(t)?s[e]:i[e]},u="",d=!1;if(e)for(s=0;t.length>s;s++)if(d)"'"!==t.charAt(s)||h("'")?u+=t.charAt(s):d=!1;else switch(t.charAt(s)){case"d":u+=l("d",e.getDate(),2);break;case"D":u+=c("D",e.getDay(),n,a);break;case"o":u+=l("o",Math.round((new Date(e.getFullYear(),e.getMonth(),e.getDate()).getTime()-new Date(e.getFullYear(),0,0).getTime())/864e5),3);break;case"m":u+=l("m",e.getMonth()+1,2);break;case"M":u+=c("M",e.getMonth(),r,o);break;case"y":u+=h("y")?e.getFullYear():(10>e.getYear()%100?"0":"")+e.getYear()%100;break;case"@":u+=e.getTime();break;case"!":u+=1e4*e.getTime()+this._ticksTo1970;break;case"'":h("'")?u+="'":d=!0;break;default:u+=t.charAt(s)}return u},_possibleChars:function(t){var e,i="",s=!1,n=function(i){var s=t.length>e+1&&t.charAt(e+1)===i;return s&&e++,s};for(e=0;t.length>e;e++)if(s)"'"!==t.charAt(e)||n("'")?i+=t.charAt(e):s=!1;else switch(t.charAt(e)){case"d":case"m":case"y":case"@":i+="0123456789";break;case"D":case"M":return null;case"'":n("'")?i+="'":s=!0;break;default:i+=t.charAt(e)}return i},_get:function(t,i){return t.settings[i]!==e?t.settings[i]:this._defaults[i]},_setDateFromField:function(t,e){if(t.input.val()!==t.lastVal){var i=this._get(t,"dateFormat"),s=t.lastVal=t.input?t.input.val():null,n=this._getDefaultDate(t),a=n,r=this._getFormatConfig(t);try{a=this.parseDate(i,s,r)||n}catch(o){s=e?"":s}t.selectedDay=a.getDate(),t.drawMonth=t.selectedMonth=a.getMonth(),t.drawYear=t.selectedYear=a.getFullYear(),t.currentDay=s?a.getDate():0,t.currentMonth=s?a.getMonth():0,t.currentYear=s?a.getFullYear():0,this._adjustInstDate(t)}},_getDefaultDate:function(t){return this._restrictMinMax(t,this._determineDate(t,this._get(t,"defaultDate"),new Date))},_determineDate:function(e,i,s){var n=function(t){var e=new Date;return e.setDate(e.getDate()+t),e},a=function(i){try{return t.datepicker.parseDate(t.datepicker._get(e,"dateFormat"),i,t.datepicker._getFormatConfig(e))}catch(s){}for(var n=(i.toLowerCase().match(/^c/)?t.datepicker._getDate(e):null)||new Date,a=n.getFullYear(),r=n.getMonth(),o=n.getDate(),h=/([+\-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g,l=h.exec(i);l;){switch(l[2]||"d"){case"d":case"D":o+=parseInt(l[1],10);break;case"w":case"W":o+=7*parseInt(l[1],10);break;case"m":case"M":r+=parseInt(l[1],10),o=Math.min(o,t.datepicker._getDaysInMonth(a,r));break;case"y":case"Y":a+=parseInt(l[1],10),o=Math.min(o,t.datepicker._getDaysInMonth(a,r))}l=h.exec(i)}return new Date(a,r,o)},r=null==i||""===i?s:"string"==typeof i?a(i):"number"==typeof i?isNaN(i)?s:n(i):new Date(i.getTime());return r=r&&"Invalid Date"==""+r?s:r,r&&(r.setHours(0),r.setMinutes(0),r.setSeconds(0),r.setMilliseconds(0)),this._daylightSavingAdjust(r)},_daylightSavingAdjust:function(t){return t?(t.setHours(t.getHours()>12?t.getHours()+2:0),t):null},_setDate:function(t,e,i){var s=!e,n=t.selectedMonth,a=t.selectedYear,r=this._restrictMinMax(t,this._determineDate(t,e,new Date));t.selectedDay=t.currentDay=r.getDate(),t.drawMonth=t.selectedMonth=t.currentMonth=r.getMonth(),t.drawYear=t.selectedYear=t.currentYear=r.getFullYear(),n===t.selectedMonth&&a===t.selectedYear||i||this._notifyChange(t),this._adjustInstDate(t),t.input&&t.input.val(s?"":this._formatDate(t))},_getDate:function(t){var e=!t.currentYear||t.input&&""===t.input.val()?null:this._daylightSavingAdjust(new Date(t.currentYear,t.currentMonth,t.currentDay));return e},_attachHandlers:function(e){var i=this._get(e,"stepMonths"),s="#"+e.id.replace(/\\\\/g,"\\");e.dpDiv.find("[data-handler]").map(function(){var e={prev:function(){t.datepicker._adjustDate(s,-i,"M")},next:function(){t.datepicker._adjustDate(s,+i,"M")},hide:function(){t.datepicker._hideDatepicker()},today:function(){t.datepicker._gotoToday(s)},selectDay:function(){return t.datepicker._selectDay(s,+this.getAttribute("data-month"),+this.getAttribute("data-year"),this),!1},selectMonth:function(){return t.datepicker._selectMonthYear(s,this,"M"),!1},selectYear:function(){return t.datepicker._selectMonthYear(s,this,"Y"),!1}};t(this).bind(this.getAttribute("data-event"),e[this.getAttribute("data-handler")])})},_generateHTML:function(t){var e,i,s,n,a,r,o,h,l,c,u,d,p,f,m,g,v,_,b,y,x,k,w,D,T,C,M,S,N,I,P,A,z,H,E,F,O,W,j,R=new Date,L=this._daylightSavingAdjust(new Date(R.getFullYear(),R.getMonth(),R.getDate())),Y=this._get(t,"isRTL"),B=this._get(t,"showButtonPanel"),J=this._get(t,"hideIfNoPrevNext"),K=this._get(t,"navigationAsDateFormat"),Q=this._getNumberOfMonths(t),V=this._get(t,"showCurrentAtPos"),U=this._get(t,"stepMonths"),q=1!==Q[0]||1!==Q[1],X=this._daylightSavingAdjust(t.currentDay?new Date(t.currentYear,t.currentMonth,t.currentDay):new Date(9999,9,9)),G=this._getMinMaxDate(t,"min"),$=this._getMinMaxDate(t,"max"),Z=t.drawMonth-V,te=t.drawYear;if(0>Z&&(Z+=12,te--),$)for(e=this._daylightSavingAdjust(new Date($.getFullYear(),$.getMonth()-Q[0]*Q[1]+1,$.getDate())),e=G&&G>e?G:e;this._daylightSavingAdjust(new Date(te,Z,1))>e;)Z--,0>Z&&(Z=11,te--);for(t.drawMonth=Z,t.drawYear=te,i=this._get(t,"prevText"),i=K?this.formatDate(i,this._daylightSavingAdjust(new Date(te,Z-U,1)),this._getFormatConfig(t)):i,s=this._canAdjustMonth(t,-1,te,Z)?"<a class='ui-datepicker-prev ui-corner-all' data-handler='prev' data-event='click' title='"+i+"'><span class='ui-icon ui-icon-circle-triangle-"+(Y?"e":"w")+"'>"+i+"</span></a>":J?"":"<a class='ui-datepicker-prev ui-corner-all ui-state-disabled' title='"+i+"'><span class='ui-icon ui-icon-circle-triangle-"+(Y?"e":"w")+"'>"+i+"</span></a>",n=this._get(t,"nextText"),n=K?this.formatDate(n,this._daylightSavingAdjust(new Date(te,Z+U,1)),this._getFormatConfig(t)):n,a=this._canAdjustMonth(t,1,te,Z)?"<a class='ui-datepicker-next ui-corner-all' data-handler='next' data-event='click' title='"+n+"'><span class='ui-icon ui-icon-circle-triangle-"+(Y?"w":"e")+"'>"+n+"</span></a>":J?"":"<a class='ui-datepicker-next ui-corner-all ui-state-disabled' title='"+n+"'><span class='ui-icon ui-icon-circle-triangle-"+(Y?"w":"e")+"'>"+n+"</span></a>",r=this._get(t,"currentText"),o=this._get(t,"gotoCurrent")&&t.currentDay?X:L,r=K?this.formatDate(r,o,this._getFormatConfig(t)):r,h=t.inline?"":"<button type='button' class='ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all' data-handler='hide' data-event='click'>"+this._get(t,"closeText")+"</button>",l=B?"<div class='ui-datepicker-buttonpane ui-widget-content'>"+(Y?h:"")+(this._isInRange(t,o)?"<button type='button' class='ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all' data-handler='today' data-event='click'>"+r+"</button>":"")+(Y?"":h)+"</div>":"",c=parseInt(this._get(t,"firstDay"),10),c=isNaN(c)?0:c,u=this._get(t,"showWeek"),d=this._get(t,"dayNames"),p=this._get(t,"dayNamesMin"),f=this._get(t,"monthNames"),m=this._get(t,"monthNamesShort"),g=this._get(t,"beforeShowDay"),v=this._get(t,"showOtherMonths"),_=this._get(t,"selectOtherMonths"),b=this._getDefaultDate(t),y="",k=0;Q[0]>k;k++){for(w="",this.maxRows=4,D=0;Q[1]>D;D++){if(T=this._daylightSavingAdjust(new Date(te,Z,t.selectedDay)),C=" ui-corner-all",M="",q){if(M+="<div class='ui-datepicker-group",Q[1]>1)switch(D){case 0:M+=" ui-datepicker-group-first",C=" ui-corner-"+(Y?"right":"left");break;case Q[1]-1:M+=" ui-datepicker-group-last",C=" ui-corner-"+(Y?"left":"right");break;default:M+=" ui-datepicker-group-middle",C=""}M+="'>"}for(M+="<div class='ui-datepicker-header ui-widget-header ui-helper-clearfix"+C+"'>"+(/all|left/.test(C)&&0===k?Y?a:s:"")+(/all|right/.test(C)&&0===k?Y?s:a:"")+this._generateMonthYearHeader(t,Z,te,G,$,k>0||D>0,f,m)+"</div><table class='ui-datepicker-calendar'><thead>"+"<tr>",S=u?"<th class='ui-datepicker-week-col'>"+this._get(t,"weekHeader")+"</th>":"",x=0;7>x;x++)N=(x+c)%7,S+="<th"+((x+c+6)%7>=5?" class='ui-datepicker-week-end'":"")+">"+"<span title='"+d[N]+"'>"+p[N]+"</span></th>";for(M+=S+"</tr></thead><tbody>",I=this._getDaysInMonth(te,Z),te===t.selectedYear&&Z===t.selectedMonth&&(t.selectedDay=Math.min(t.selectedDay,I)),P=(this._getFirstDayOfMonth(te,Z)-c+7)%7,A=Math.ceil((P+I)/7),z=q?this.maxRows>A?this.maxRows:A:A,this.maxRows=z,H=this._daylightSavingAdjust(new Date(te,Z,1-P)),E=0;z>E;E++){for(M+="<tr>",F=u?"<td class='ui-datepicker-week-col'>"+this._get(t,"calculateWeek")(H)+"</td>":"",x=0;7>x;x++)O=g?g.apply(t.input?t.input[0]:null,[H]):[!0,""],W=H.getMonth()!==Z,j=W&&!_||!O[0]||G&&G>H||$&&H>$,F+="<td class='"+((x+c+6)%7>=5?" ui-datepicker-week-end":"")+(W?" ui-datepicker-other-month":"")+(H.getTime()===T.getTime()&&Z===t.selectedMonth&&t._keyEvent||b.getTime()===H.getTime()&&b.getTime()===T.getTime()?" "+this._dayOverClass:"")+(j?" "+this._unselectableClass+" ui-state-disabled":"")+(W&&!v?"":" "+O[1]+(H.getTime()===X.getTime()?" "+this._currentClass:"")+(H.getTime()===L.getTime()?" ui-datepicker-today":""))+"'"+(W&&!v||!O[2]?"":" title='"+O[2].replace(/'/g,"&#39;")+"'")+(j?"":" data-handler='selectDay' data-event='click' data-month='"+H.getMonth()+"' data-year='"+H.getFullYear()+"'")+">"+(W&&!v?"&#xa0;":j?"<span class='ui-state-default'>"+H.getDate()+"</span>":"<a class='ui-state-default"+(H.getTime()===L.getTime()?" ui-state-highlight":"")+(H.getTime()===X.getTime()?" ui-state-active":"")+(W?" ui-priority-secondary":"")+"' href='#'>"+H.getDate()+"</a>")+"</td>",H.setDate(H.getDate()+1),H=this._daylightSavingAdjust(H);M+=F+"</tr>"}Z++,Z>11&&(Z=0,te++),M+="</tbody></table>"+(q?"</div>"+(Q[0]>0&&D===Q[1]-1?"<div class='ui-datepicker-row-break'></div>":""):""),w+=M}y+=w}return y+=l,t._keyEvent=!1,y},_generateMonthYearHeader:function(t,e,i,s,n,a,r,o){var h,l,c,u,d,p,f,m,g=this._get(t,"changeMonth"),v=this._get(t,"changeYear"),_=this._get(t,"showMonthAfterYear"),b="<div class='ui-datepicker-title'>",y="";if(a||!g)y+="<span class='ui-datepicker-month'>"+r[e]+"</span>";else{for(h=s&&s.getFullYear()===i,l=n&&n.getFullYear()===i,y+="<select class='ui-datepicker-month' data-handler='selectMonth' data-event='change'>",c=0;12>c;c++)(!h||c>=s.getMonth())&&(!l||n.getMonth()>=c)&&(y+="<option value='"+c+"'"+(c===e?" selected='selected'":"")+">"+o[c]+"</option>");y+="</select>"}if(_||(b+=y+(!a&&g&&v?"":"&#xa0;")),!t.yearshtml)if(t.yearshtml="",a||!v)b+="<span class='ui-datepicker-year'>"+i+"</span>";else{for(u=this._get(t,"yearRange").split(":"),d=(new Date).getFullYear(),p=function(t){var e=t.match(/c[+\-].*/)?i+parseInt(t.substring(1),10):t.match(/[+\-].*/)?d+parseInt(t,10):parseInt(t,10);
13return isNaN(e)?d:e},f=p(u[0]),m=Math.max(f,p(u[1]||"")),f=s?Math.max(f,s.getFullYear()):f,m=n?Math.min(m,n.getFullYear()):m,t.yearshtml+="<select class='ui-datepicker-year' data-handler='selectYear' data-event='change'>";m>=f;f++)t.yearshtml+="<option value='"+f+"'"+(f===i?" selected='selected'":"")+">"+f+"</option>";t.yearshtml+="</select>",b+=t.yearshtml,t.yearshtml=null}return b+=this._get(t,"yearSuffix"),_&&(b+=(!a&&g&&v?"":"&#xa0;")+y),b+="</div>"},_adjustInstDate:function(t,e,i){var s=t.drawYear+("Y"===i?e:0),n=t.drawMonth+("M"===i?e:0),a=Math.min(t.selectedDay,this._getDaysInMonth(s,n))+("D"===i?e:0),r=this._restrictMinMax(t,this._daylightSavingAdjust(new Date(s,n,a)));t.selectedDay=r.getDate(),t.drawMonth=t.selectedMonth=r.getMonth(),t.drawYear=t.selectedYear=r.getFullYear(),("M"===i||"Y"===i)&&this._notifyChange(t)},_restrictMinMax:function(t,e){var i=this._getMinMaxDate(t,"min"),s=this._getMinMaxDate(t,"max"),n=i&&i>e?i:e;return s&&n>s?s:n},_notifyChange:function(t){var e=this._get(t,"onChangeMonthYear");e&&e.apply(t.input?t.input[0]:null,[t.selectedYear,t.selectedMonth+1,t])},_getNumberOfMonths:function(t){var e=this._get(t,"numberOfMonths");return null==e?[1,1]:"number"==typeof e?[1,e]:e},_getMinMaxDate:function(t,e){return this._determineDate(t,this._get(t,e+"Date"),null)},_getDaysInMonth:function(t,e){return 32-this._daylightSavingAdjust(new Date(t,e,32)).getDate()},_getFirstDayOfMonth:function(t,e){return new Date(t,e,1).getDay()},_canAdjustMonth:function(t,e,i,s){var n=this._getNumberOfMonths(t),a=this._daylightSavingAdjust(new Date(i,s+(0>e?e:n[0]*n[1]),1));return 0>e&&a.setDate(this._getDaysInMonth(a.getFullYear(),a.getMonth())),this._isInRange(t,a)},_isInRange:function(t,e){var i,s,n=this._getMinMaxDate(t,"min"),a=this._getMinMaxDate(t,"max"),r=null,o=null,h=this._get(t,"yearRange");return h&&(i=h.split(":"),s=(new Date).getFullYear(),r=parseInt(i[0],10),o=parseInt(i[1],10),i[0].match(/[+\-].*/)&&(r+=s),i[1].match(/[+\-].*/)&&(o+=s)),(!n||e.getTime()>=n.getTime())&&(!a||e.getTime()<=a.getTime())&&(!r||e.getFullYear()>=r)&&(!o||o>=e.getFullYear())},_getFormatConfig:function(t){var e=this._get(t,"shortYearCutoff");return e="string"!=typeof e?e:(new Date).getFullYear()%100+parseInt(e,10),{shortYearCutoff:e,dayNamesShort:this._get(t,"dayNamesShort"),dayNames:this._get(t,"dayNames"),monthNamesShort:this._get(t,"monthNamesShort"),monthNames:this._get(t,"monthNames")}},_formatDate:function(t,e,i,s){e||(t.currentDay=t.selectedDay,t.currentMonth=t.selectedMonth,t.currentYear=t.selectedYear);var n=e?"object"==typeof e?e:this._daylightSavingAdjust(new Date(s,i,e)):this._daylightSavingAdjust(new Date(t.currentYear,t.currentMonth,t.currentDay));return this.formatDate(this._get(t,"dateFormat"),n,this._getFormatConfig(t))}}),t.fn.datepicker=function(e){if(!this.length)return this;t.datepicker.initialized||(t(document).mousedown(t.datepicker._checkExternalClick),t.datepicker.initialized=!0),0===t("#"+t.datepicker._mainDivId).length&&t("body").append(t.datepicker.dpDiv);
vendor: 18,953 bytes, line 13
13var i=Array.prototype.slice.call(arguments,1);return"string"!=typeof e||"isDisabled"!==e&&"getDate"!==e&&"widget"!==e?"option"===e&&2===arguments.length&&"string"==typeof arguments[1]?t.datepicker["_"+e+"Datepicker"].apply(t.datepicker,[this[0]].concat(i)):this.each(function(){"string"==typeof e?t.datepicker["_"+e+"Datepicker"].apply(t.datepicker,[this].concat(i)):t.datepicker._attachDatepicker(this,e)}):t.datepicker["_"+e+"Datepicker"].apply(t.datepicker,[this[0]].concat(i))},t.datepicker=new i,t.datepicker.initialized=!1,t.datepicker.uuid=(new Date).getTime(),t.datepicker.version="1.10.3"})(jQuery);(function(t){var e={buttons:!0,height:!0,maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0,width:!0},i={maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0};t.widget("ui.dialog",{version:"1.10.3",options:{appendTo:"body",autoOpen:!0,buttons:[],closeOnEscape:!0,closeText:"close",dialogClass:"",draggable:!0,hide:null,height:"auto",maxHeight:null,maxWidth:null,minHeight:150,minWidth:150,modal:!1,position:{my:"center",at:"center",of:window,collision:"fit",using:function(e){var i=t(this).css(e).offset().top;0>i&&t(this).css("top",e.top-i)}},resizable:!0,show:null,title:null,width:300,beforeClose:null,close:null,drag:null,dragStart:null,dragStop:null,focus:null,open:null,resize:null,resizeStart:null,resizeStop:null},_create:function(){this.originalCss={display:this.element[0].style.display,width:this.element[0].style.width,minHeight:this.element[0].style.minHeight,maxHeight:this.element[0].style.maxHeight,height:this.element[0].style.height},this.originalPosition={parent:this.element.parent(),index:this.element.parent().children().index(this.element)},this.originalTitle=this.element.attr("title"),this.options.title=this.options.title||this.originalTitle,this._createWrapper(),this.element.show().removeAttr("title").addClass("ui-dialog-content ui-widget-content").appendTo(this.uiDialog),this._createTitlebar(),this._createButtonPane(),this.options.draggable&&t.fn.draggable&&this._makeDraggable(),this.options.resizable&&t.fn.resizable&&this._makeResizable(),this._isOpen=!1},_init:function(){this.options.autoOpen&&this.open()},_appendTo:function(){var e=this.options.appendTo;return e&&(e.jquery||e.nodeType)?t(e):this.document.find(e||"body").eq(0)},_destroy:function(){var t,e=this.originalPosition;this._destroyOverlay(),this.element.removeUniqueId().removeClass("ui-dialog-content ui-widget-content").css(this.originalCss).detach(),this.uiDialog.stop(!0,!0).remove(),this.originalTitle&&this.element.attr("title",this.originalTitle),t=e.parent.children().eq(e.index),t.length&&t[0]!==this.element[0]?t.before(this.element):e.parent.append(this.element)},widget:function(){return this.uiDialog},disable:t.noop,enable:t.noop,close:function(e){var i=this;this._isOpen&&this._trigger("beforeClose",e)!==!1&&(this._isOpen=!1,this._destroyOverlay(),this.opener.filter(":focusable").focus().length||t(this.document[0].activeElement).blur(),this._hide(this.uiDialog,this.options.hide,function(){i._trigger("close",e)}))},isOpen:function(){return this._isOpen},moveToTop:function(){this._moveToTop()},_moveToTop:function(t,e){var i=!!this.uiDialog.nextAll(":visible").insertBefore(this.uiDialog).length;return i&&!e&&this._trigger("focus",t),i},open:function(){var e=this;return this._isOpen?(this._moveToTop()&&this._focusTabbable(),undefined):(this._isOpen=!0,this.opener=t(this.document[0].activeElement),this._size(),this._position(),this._createOverlay(),this._moveToTop(null,!0),this._show(this.uiDialog,this.options.show,function(){e._focusTabbable(),e._trigger("focus")}),this._trigger("open"),undefined)},_focusTabbable:function(){var t=this.element.find("[autofocus]");t.length||(t=this.element.find(":tabbable")),t.length||(t=this.uiDialogButtonPane.find(":tabbable")),t.length||(t=this.uiDialogTitlebarClose.filter(":tabbable")),t.length||(t=this.uiDialog),t.eq(0).focus()},_keepFocus:function(e){function i(){var e=this.document[0].activeElement,i=this.uiDialog[0]===e||t.contains(this.uiDialog[0],e);i||this._focusTabbable()}e.preventDefault(),i.call(this),this._delay(i)},_createWrapper:function(){this.uiDialog=t("<div>").addClass("ui-dialog ui-widget ui-widget-content ui-corner-all ui-front "+this.options.dialogClass).hide().attr({tabIndex:-1,role:"dialog"}).appendTo(this._appendTo()),this._on(this.uiDialog,{keydown:function(e){if(this.options.closeOnEscape&&!e.isDefaultPrevented()&&e.keyCode&&e.keyCode===t.ui.keyCode.ESCAPE)return e.preventDefault(),this.close(e),undefined;if(e.keyCode===t.ui.keyCode.TAB){var i=this.uiDialog.find(":tabbable"),s=i.filter(":first"),n=i.filter(":last");e.target!==n[0]&&e.target!==this.uiDialog[0]||e.shiftKey?e.target!==s[0]&&e.target!==this.uiDialog[0]||!e.shiftKey||(n.focus(1),e.preventDefault()):(s.focus(1),e.preventDefault())}},mousedown:function(t){this._moveToTop(t)&&this._focusTabbable()}}),this.element.find("[aria-describedby]").length||this.uiDialog.attr({"aria-describedby":this.element.uniqueId().attr("id")})},_createTitlebar:function(){var e;this.uiDialogTitlebar=t("<div>").addClass("ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix").prependTo(this.uiDialog),this._on(this.uiDialogTitlebar,{mousedown:function(e){t(e.target).closest(".ui-dialog-titlebar-close")||this.uiDialog.focus()}}),this.uiDialogTitlebarClose=t("<button></button>").button({label:this.options.closeText,icons:{primary:"ui-icon-closethick"},text:!1}).addClass("ui-dialog-titlebar-close").appendTo(this.uiDialogTitlebar),this._on(this.uiDialogTitlebarClose,{click:function(t){t.preventDefault(),this.close(t)}}),e=t("<span>").uniqueId().addClass("ui-dialog-title").prependTo(this.uiDialogTitlebar),this._title(e),this.uiDialog.attr({"aria-labelledby":e.attr("id")})},_title:function(t){this.options.title||t.html("&#160;"),t.text(this.options.title)},_createButtonPane:function(){this.uiDialogButtonPane=t("<div>").addClass("ui-dialog-buttonpane ui-widget-content ui-helper-clearfix"),this.uiButtonSet=t("<div>").addClass("ui-dialog-buttonset").appendTo(this.uiDialogButtonPane),this._createButtons()},_createButtons:function(){var e=this,i=this.options.buttons;return this.uiDialogButtonPane.remove(),this.uiButtonSet.empty(),t.isEmptyObject(i)||t.isArray(i)&&!i.length?(this.uiDialog.removeClass("ui-dialog-buttons"),undefined):(t.each(i,function(i,s){var n,a;s=t.isFunction(s)?{click:s,text:i}:s,s=t.extend({type:"button"},s),n=s.click,s.click=function(){n.apply(e.element[0],arguments)},a={icons:s.icons,text:s.showText},delete s.icons,delete s.showText,t("<button></button>",s).button(a).appendTo(e.uiButtonSet)}),this.uiDialog.addClass("ui-dialog-buttons"),this.uiDialogButtonPane.appendTo(this.uiDialog),undefined)},_makeDraggable:function(){function e(t){return{position:t.position,offset:t.offset}}var i=this,s=this.options;this.uiDialog.draggable({cancel:".ui-dialog-content, .ui-dialog-titlebar-close",handle:".ui-dialog-titlebar",containment:"document",start:function(s,n){t(this).addClass("ui-dialog-dragging"),i._blockFrames(),i._trigger("dragStart",s,e(n))},drag:function(t,s){i._trigger("drag",t,e(s))},stop:function(n,a){s.position=[a.position.left-i.document.scrollLeft(),a.position.top-i.document.scrollTop()],t(this).removeClass("ui-dialog-dragging"),i._unblockFrames(),i._trigger("dragStop",n,e(a))}})},_makeResizable:function(){function e(t){return{originalPosition:t.originalPosition,originalSize:t.originalSize,position:t.position,size:t.size}}var i=this,s=this.options,n=s.resizable,a=this.uiDialog.css("position"),o="string"==typeof n?n:"n,e,s,w,se,sw,ne,nw";this.uiDialog.resizable({cancel:".ui-dialog-content",containment:"document",alsoResize:this.element,maxWidth:s.maxWidth,maxHeight:s.maxHeight,minWidth:s.minWidth,minHeight:this._minHeight(),handles:o,start:function(s,n){t(this).addClass("ui-dialog-resizing"),i._blockFrames(),i._trigger("resizeStart",s,e(n))},resize:function(t,s){i._trigger("resize",t,e(s))},stop:function(n,a){s.height=t(this).height(),s.width=t(this).width(),t(this).removeClass("ui-dialog-resizing"),i._unblockFrames(),i._trigger("resizeStop",n,e(a))}}).css("position",a)},_minHeight:function(){var t=this.options;return"auto"===t.height?t.minHeight:Math.min(t.minHeight,t.height)},_position:function(){var t=this.uiDialog.is(":visible");t||this.uiDialog.show(),this.uiDialog.position(this.options.position),t||this.uiDialog.hide()},_setOptions:function(s){var n=this,a=!1,o={};t.each(s,function(t,s){n._setOption(t,s),t in e&&(a=!0),t in i&&(o[t]=s)}),a&&(this._size(),this._position()),this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option",o)},_setOption:function(t,e){var i,s,n=this.uiDialog;"dialogClass"===t&&n.removeClass(this.options.dialogClass).addClass(e),"disabled"!==t&&(this._super(t,e),"appendTo"===t&&this.uiDialog.appendTo(this._appendTo()),"buttons"===t&&this._createButtons(),"closeText"===t&&this.uiDialogTitlebarClose.button({label:""+e}),"draggable"===t&&(i=n.is(":data(ui-draggable)"),i&&!e&&n.draggable("destroy"),!i&&e&&this._makeDraggable()),"position"===t&&this._position(),"resizable"===t&&(s=n.is(":data(ui-resizable)"),s&&!e&&n.resizable("destroy"),s&&"string"==typeof e&&n.resizable("option","handles",e),s||e===!1||this._makeResizable()),"title"===t&&this._title(this.uiDialogTitlebar.find(".ui-dialog-title")))},_size:function(){var t,e,i,s=this.options;this.element.show().css({width:"auto",minHeight:0,maxHeight:"none",height:0}),s.minWidth>s.width&&(s.width=s.minWidth),t=this.uiDialog.css({height:"auto",width:s.width}).outerHeight(),e=Math.max(0,s.minHeight-t),i="number"==typeof s.maxHeight?Math.max(0,s.maxHeight-t):"none","auto"===s.height?this.element.css({minHeight:e,maxHeight:i,height:"auto"}):this.element.height(Math.max(0,s.height-t)),this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option","minHeight",this._minHeight())},_blockFrames:function(){this.iframeBlocks=this.document.find("iframe").map(function(){var e=t(this);return t("<div>").css({position:"absolute",width:e.outerWidth(),height:e.outerHeight()}).appendTo(e.parent()).offset(e.offset())[0]})},_unblockFrames:function(){this.iframeBlocks&&(this.iframeBlocks.remove(),delete this.iframeBlocks)},_allowInteraction:function(e){return t(e.target).closest(".ui-dialog").length?!0:!!t(e.target).closest(".ui-datepicker").length},_createOverlay:function(){if(this.options.modal){var e=this,i=this.widgetFullName;t.ui.dialog.overlayInstances||this._delay(function(){t.ui.dialog.overlayInstances&&this.document.bind("focusin.dialog",function(s){e._allowInteraction(s)||(s.preventDefault(),t(".ui-dialog:visible:last .ui-dialog-content").data(i)._focusTabbable())})}),this.overlay=t("<div>").addClass("ui-widget-overlay ui-front").appendTo(this._appendTo()),this._on(this.overlay,{mousedown:"_keepFocus"}),t.ui.dialog.overlayInstances++}},_destroyOverlay:function(){this.options.modal&&this.overlay&&(t.ui.dialog.overlayInstances--,t.ui.dialog.overlayInstances||this.document.unbind("focusin.dialog"),this.overlay.remove(),this.overlay=null)}}),t.ui.dialog.overlayInstances=0,t.uiBackCompat!==!1&&t.widget("ui.dialog",t.ui.dialog,{_position:function(){var e,i=this.options.position,s=[],n=[0,0];i?(("string"==typeof i||"object"==typeof i&&"0"in i)&&(s=i.split?i.split(" "):[i[0],i[1]],1===s.length&&(s[1]=s[0]),t.each(["left","top"],function(t,e){+s[t]===s[t]&&(n[t]=s[t],s[t]=e)}),i={my:s[0]+(0>n[0]?n[0]:"+"+n[0])+" "+s[1]+(0>n[1]?n[1]:"+"+n[1]),at:s.join(" ")}),i=t.extend({},t.ui.dialog.prototype.options.position,i)):i=t.ui.dialog.prototype.options.position,e=this.uiDialog.is(":visible"),e||this.uiDialog.show(),this.uiDialog.position(i),e||this.uiDialog.hide()}})})(jQuery);(function(t){t.widget("ui.menu",{version:"1.10.3",defaultElement:"<ul>",delay:300,options:{icons:{submenu:"ui-icon-carat-1-e"},menus:"ul",position:{my:"left top",at:"right top"},role:"menu",blur:null,focus:null,select:null},_create:function(){this.activeMenu=this.element,this.mouseHandled=!1,this.element.uniqueId().addClass("ui-menu ui-widget ui-widget-content ui-corner-all").toggleClass("ui-menu-icons",!!this.element.find(".ui-icon").length).attr({role:this.options.role,tabIndex:0}).bind("click"+this.eventNamespace,t.proxy(function(t){this.options.disabled&&t.preventDefault()},this)),this.options.disabled&&this.element.addClass("ui-state-disabled").attr("aria-disabled","true"),this._on({"mousedown .ui-menu-item > a":function(t){t.preventDefault()},"click .ui-state-disabled > a":function(t){t.preventDefault()},"click .ui-menu-item:has(a)":function(e){var i=t(e.target).closest(".ui-menu-item");!this.mouseHandled&&i.not(".ui-state-disabled").length&&(this.mouseHandled=!0,this.select(e),i.has(".ui-menu").length?this.expand(e):this.element.is(":focus")||(this.element.trigger("focus",[!0]),this.active&&1===this.active.parents(".ui-menu").length&&clearTimeout(this.timer)))},"mouseenter .ui-menu-item":function(e){var i=t(e.currentTarget);i.siblings().children(".ui-state-active").removeClass("ui-state-active"),this.focus(e,i)},mouseleave:"collapseAll","mouseleave .ui-menu":"collapseAll",focus:function(t,e){var i=this.active||this.element.children(".ui-menu-item").eq(0);e||this.focus(t,i)},blur:function(e){this._delay(function(){t.contains(this.element[0],this.document[0].activeElement)||this.collapseAll(e)})},keydown:"_keydown"}),this.refresh(),this._on(this.document,{click:function(e){t(e.target).closest(".ui-menu").length||this.collapseAll(e),this.mouseHandled=!1}})},_destroy:function(){this.element.removeAttr("aria-activedescendant").find(".ui-menu").addBack().removeClass("ui-menu ui-widget ui-widget-content ui-corner-all ui-menu-icons").removeAttr("role").removeAttr("tabIndex").removeAttr("aria-labelledby").removeAttr("aria-expanded").removeAttr("aria-hidden").removeAttr("aria-disabled").removeUniqueId().show(),this.element.find(".ui-menu-item").removeClass("ui-menu-item").removeAttr("role").removeAttr("aria-disabled").children("a").removeUniqueId().removeClass("ui-corner-all ui-state-hover").removeAttr("tabIndex").removeAttr("role").removeAttr("aria-haspopup").children().each(function(){var e=t(this);e.data("ui-menu-submenu-carat")&&e.remove()}),this.element.find(".ui-menu-divider").removeClass("ui-menu-divider ui-widget-content")},_keydown:function(e){function i(t){return t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}var s,n,a,o,r,h=!0;switch(e.keyCode){case t.ui.keyCode.PAGE_UP:this.previousPage(e);break;case t.ui.keyCode.PAGE_DOWN:this.nextPage(e);break;case t.ui.keyCode.HOME:this._move("first","first",e);break;case t.ui.keyCode.END:this._move("last","last",e);break;case t.ui.keyCode.UP:this.previous(e);break;case t.ui.keyCode.DOWN:this.next(e);break;case t.ui.keyCode.LEFT:this.collapse(e);break;case t.ui.keyCode.RIGHT:this.active&&!this.active.is(".ui-state-disabled")&&this.expand(e);break;case t.ui.keyCode.ENTER:case t.ui.keyCode.SPACE:this._activate(e);break;case t.ui.keyCode.ESCAPE:this.collapse(e);break;default:h=!1,n=this.previousFilter||"",a=String.fromCharCode(e.keyCode),o=!1,clearTimeout(this.filterTimer),a===n?o=!0:a=n+a,r=RegExp("^"+i(a),"i"),s=this.activeMenu.children(".ui-menu-item").filter(function(){return r.test(t(this).children("a").text())}),s=o&&-1!==s.index(this.active.next())?this.active.nextAll(".ui-menu-item"):s,s.length||(a=String.fromCharCode(e.keyCode),r=RegExp("^"+i(a),"i"),s=this.activeMenu.children(".ui-menu-item").filter(function(){return r.test(t(this).children("a").text())})),s.length?(this.focus(e,s),s.length>1?(this.previousFilter=a,this.filterTimer=this._delay(function(){delete this.previousFilter},1e3)):delete this.previousFilter):delete this.previousFilter}h&&e.preventDefault()},_activate:function(t){this.active.is(".ui-state-disabled")||(this.active.children("a[aria-haspopup='true']").length?this.expand(t):this.select(t))},refresh:function(){var e,i=this.options.icons.submenu,s=this.element.find(this.options.menus);s.filter(":not(.ui-menu)").addClass("ui-menu ui-widget ui-widget-content ui-corner-all").hide().attr({role:this.options.role,"aria-hidden":"true","aria-expanded":"false"}).each(function(){var e=t(this),s=e.prev("a"),n=t("<span>").addClass("ui-menu-icon ui-icon "+i).data("ui-menu-submenu-carat",!0);s.attr("aria-haspopup","true").prepend(n),e.attr("aria-labelledby",s.attr("id"))}),e=s.add(this.element),e.children(":not(.ui-menu-item):has(a)").addClass("ui-menu-item").attr("role","presentation").children("a").uniqueId().addClass("ui-corner-all").attr({tabIndex:-1,role:this._itemRole()}),e.children(":not(.ui-menu-item)").each(function(){var e=t(this);/[^\-\u2014\u2013\s]/.test(e.text())||e.addClass("ui-widget-content ui-menu-divider")}),e.children(".ui-state-disabled").attr("aria-disabled","true"),this.active&&!t.contains(this.element[0],this.active[0])&&this.blur()},_itemRole:function(){return{menu:"menuitem",listbox:"option"}[this.options.role]},_setOption:function(t,e){"icons"===t&&this.element.find(".ui-menu-icon").removeClass(this.options.icons.submenu).addClass(e.submenu),this._super(t,e)},focus:function(t,e){var i,s;this.blur(t,t&&"focus"===t.type),this._scrollIntoView(e),this.active=e.first(),s=this.active.children("a").addClass("ui-state-focus"),this.options.role&&this.element.attr("aria-activedescendant",s.attr("id")),this.active.parent().closest(".ui-menu-item").children("a:first").addClass("ui-state-active"),t&&"keydown"===t.type?this._close():this.timer=this._delay(function(){this._close()},this.delay),i=e.children(".ui-menu"),i.length&&/^mouse/.test(t.type)&&this._startOpening(i),this.activeMenu=e.parent(),this._trigger("focus",t,{item:e})},_scrollIntoView:function(e){var i,s,n,a,o,r;this._hasScroll()&&(i=parseFloat(t.css(this.activeMenu[0],"borderTopWidth"))||0,s=parseFloat(t.css(this.activeMenu[0],"paddingTop"))||0,n=e.offset().top-this.activeMenu.offset().top-i-s,a=this.activeMenu.scrollTop(),o=this.activeMenu.height(),r=e.height(),0>n?this.activeMenu.scrollTop(a+n):n+r>o&&this.activeMenu.scrollTop(a+n-o+r))},blur:function(t,e){e||clearTimeout(this.timer),this.active&&(this.active.children("a").removeClass("ui-state-focus"),this.active=null,this._trigger("blur",t,{item:this.active}))},_startOpening:function(t){clearTimeout(this.timer),"true"===t.attr("aria-hidden")&&(this.timer=this._delay(function(){this._close(),this._open(t)},this.delay))},_open:function(e){var i=t.extend({of:this.active},this.options.position);clearTimeout(this.timer),this.element.find(".ui-menu").not(e.parents(".ui-menu")).hide().attr("aria-hidden","true"),e.show().removeAttr("aria-hidden").attr("aria-expanded","true").position(i)},collapseAll:function(e,i){clearTimeout(this.timer),this.timer=this._delay(function(){var s=i?this.element:t(e&&e.target).closest(this.element.find(".ui-menu"));s.length||(s=this.element),this._close(s),this.blur(e),this.activeMenu=s},this.delay)},_close:function(t){t||(t=this.active?this.active.parent():this.element),t.find(".ui-menu").hide().attr("aria-hidden","true").attr("aria-expanded","fal
vendor: 5,950 bytes, line 13
13se").end().find("a.ui-state-active").removeClass("ui-state-active")},collapse:function(t){var e=this.active&&this.active.parent().closest(".ui-menu-item",this.element);e&&e.length&&(this._close(),this.focus(t,e))},expand:function(t){var e=this.active&&this.active.children(".ui-menu ").children(".ui-menu-item").first();e&&e.length&&(this._open(e.parent()),this._delay(function(){this.focus(t,e)}))},next:function(t){this._move("next","first",t)},previous:function(t){this._move("prev","last",t)},isFirstItem:function(){return this.active&&!this.active.prevAll(".ui-menu-item").length},isLastItem:function(){return this.active&&!this.active.nextAll(".ui-menu-item").length},_move:function(t,e,i){var s;this.active&&(s="first"===t||"last"===t?this.active["first"===t?"prevAll":"nextAll"](".ui-menu-item").eq(-1):this.active[t+"All"](".ui-menu-item").eq(0)),s&&s.length&&this.active||(s=this.activeMenu.children(".ui-menu-item")[e]()),this.focus(i,s)},nextPage:function(e){var i,s,n;return this.active?(this.isLastItem()||(this._hasScroll()?(s=this.active.offset().top,n=this.element.height(),this.active.nextAll(".ui-menu-item").each(function(){return i=t(this),0>i.offset().top-s-n}),this.focus(e,i)):this.focus(e,this.activeMenu.children(".ui-menu-item")[this.active?"last":"first"]())),undefined):(this.next(e),undefined)},previousPage:function(e){var i,s,n;return this.active?(this.isFirstItem()||(this._hasScroll()?(s=this.active.offset().top,n=this.element.height(),this.active.prevAll(".ui-menu-item").each(function(){return i=t(this),i.offset().top-s+n>0}),this.focus(e,i)):this.focus(e,this.activeMenu.children(".ui-menu-item").first())),undefined):(this.next(e),undefined)},_hasScroll:function(){return this.element.outerHeight()<this.element.prop("scrollHeight")},select:function(e){this.active=this.active||t(e.target).closest(".ui-menu-item");var i={item:this.active};this.active.has(".ui-menu").length||this.collapseAll(e,!0),this._trigger("select",e,i)}})})(jQuery);(function(t,e){t.widget("ui.progressbar",{version:"1.10.3",options:{max:100,value:0,change:null,complete:null},min:0,_create:function(){this.oldValue=this.options.value=this._constrainedValue(),this.element.addClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").attr({role:"progressbar","aria-valuemin":this.min}),this.valueDiv=t("<div class='ui-progressbar-value ui-widget-header ui-corner-left'></div>").appendTo(this.element),this._refreshValue()},_destroy:function(){this.element.removeClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow"),this.valueDiv.remove()},value:function(t){return t===e?this.options.value:(this.options.value=this._constrainedValue(t),this._refreshValue(),e)},_constrainedValue:function(t){return t===e&&(t=this.options.value),this.indeterminate=t===!1,"number"!=typeof t&&(t=0),this.indeterminate?!1:Math.min(this.options.max,Math.max(this.min,t))},_setOptions:function(t){var e=t.value;delete t.value,this._super(t),this.options.value=this._constrainedValue(e),this._refreshValue()},_setOption:function(t,e){"max"===t&&(e=Math.max(this.min,e)),this._super(t,e)},_percentage:function(){return this.indeterminate?100:100*(this.options.value-this.min)/(this.options.max-this.min)},_refreshValue:function(){var e=this.options.value,i=this._percentage();this.valueDiv.toggle(this.indeterminate||e>this.min).toggleClass("ui-corner-right",e===this.options.max).width(i.toFixed(0)+"%"),this.element.toggleClass("ui-progressbar-indeterminate",this.indeterminate),this.indeterminate?(this.element.removeAttr("aria-valuenow"),this.overlayDiv||(this.overlayDiv=t("<div class='ui-progressbar-overlay'></div>").appendTo(this.valueDiv))):(this.element.attr({"aria-valuemax":this.options.max,"aria-valuenow":e}),this.overlayDiv&&(this.overlayDiv.remove(),this.overlayDiv=null)),this.oldValue!==e&&(this.oldValue=e,this._trigger("change")),e===this.options.max&&this._trigger("complete")}})})(jQuery);(function(t){var e=5;t.widget("ui.slider",t.ui.mouse,{version:"1.10.3",widgetEventPrefix:"slide",options:{animate:!1,distance:0,max:100,min:0,orientation:"horizontal",range:!1,step:1,value:0,values:null,change:null,slide:null,start:null,stop:null},_create:function(){this._keySliding=!1,this._mouseSliding=!1,this._animateOff=!0,this._handleIndex=null,this._detectOrientation(),this._mouseInit(),this.element.addClass("ui-slider ui-slider-"+this.orientation+" ui-widget"+" ui-widget-content"+" ui-corner-all"),this._refresh(),this._setOption("disabled",this.options.disabled),this._animateOff=!1},_refresh:function(){this._createRange(),this._createHandles(),this._setupEvents(),this._refreshValue()},_createHandles:function(){var e,i,s=this.options,n=this.element.find(".ui-slider-handle").addClass("ui-state-default ui-corner-all"),a="<a class='ui-slider-handle ui-state-default ui-corner-all' href='#'></a>",o=[];for(i=s.values&&s.values.length||1,n.length>i&&(n.slice(i).remove(),n=n.slice(0,i)),e=n.length;i>e;e++)o.push(a);this.handles=n.add(t(o.join("")).appendTo(this.element)),this.handle=this.handles.eq(0),this.handles.each(function(e){t(this).data("ui-slider-handle-index",e)})},_createRange:function(){var e=this.options,i="";e.range?(e.range===!0&&(e.values?e.values.length&&2!==e.values.length?e.values=[e.values[0],e.values[0]]:t.isArray(e.values)&&(e.values=e.values.slice(0)):e.values=[this._valueMin(),this._valueMin()]),this.range&&this.range.length?this.range.removeClass("ui-slider-range-min ui-slider-range-max").css({left:"",bottom:""}):(this.range=t("<div></div>").appendTo(this.element),i="ui-slider-range ui-widget-header ui-corner-all"),this.range.addClass(i+("min"===e.range||"max"===e.range?" ui-slider-range-"+e.range:""))):this.range=t([])},_setupEvents:function(){var t=this.handles.add(this.range).filter("a");this._off(t),this._on(t,this._handleEvents),this._hoverable(t),this._focusable(t)}
vendor: 5,882 bytes, line 13
13,_destroy:function(){this.handles.remove(),this.range.remove(),this.element.removeClass("ui-slider ui-slider-horizontal ui-slider-vertical ui-widget ui-widget-content ui-corner-all"),this._mouseDestroy()},_mouseCapture:function(e){var i,s,n,a,o,r,h,l,u=this,c=this.options;return c.disabled?!1:(this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()},this.elementOffset=this.element.offset(),i={x:e.pageX,y:e.pageY},s=this._normValueFromMouse(i),n=this._valueMax()-this._valueMin()+1,this.handles.each(function(e){var i=Math.abs(s-u.values(e));(n>i||n===i&&(e===u._lastChangedValue||u.values(e)===c.min))&&(n=i,a=t(this),o=e)}),r=this._start(e,o),r===!1?!1:(this._mouseSliding=!0,this._handleIndex=o,a.addClass("ui-state-active").focus(),h=a.offset(),l=!t(e.target).parents().addBack().is(".ui-slider-handle"),this._clickOffset=l?{left:0,top:0}:{left:e.pageX-h.left-a.width()/2,top:e.pageY-h.top-a.height()/2-(parseInt(a.css("borderTopWidth"),10)||0)-(parseInt(a.css("borderBottomWidth"),10)||0)+(parseInt(a.css("marginTop"),10)||0)},this.handles.hasClass("ui-state-hover")||this._slide(e,o,s),this._animateOff=!0,!0))},_mouseStart:function(){return!0},_mouseDrag:function(t){var e={x:t.pageX,y:t.pageY},i=this._normValueFromMouse(e);return this._slide(t,this._handleIndex,i),!1},_mouseStop:function(t){return this.handles.removeClass("ui-state-active"),this._mouseSliding=!1,this._stop(t,this._handleIndex),this._change(t,this._handleIndex),this._handleIndex=null,this._clickOffset=null,this._animateOff=!1,!1},_detectOrientation:function(){this.orientation="vertical"===this.options.orientation?"vertical":"horizontal"},_normValueFromMouse:function(t){var e,i,s,n,a;return"horizontal"===this.orientation?(e=this.elementSize.width,i=t.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)):(e=this.elementSize.height,i=t.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)),s=i/e,s>1&&(s=1),0>s&&(s=0),"vertical"===this.orientation&&(s=1-s),n=this._valueMax()-this._valueMin(),a=this._valueMin()+s*n,this._trimAlignValue(a)},_start:function(t,e){var i={handle:this.handles[e],value:this.value()};return this.options.values&&this.options.values.length&&(i.value=this.values(e),i.values=this.values()),this._trigger("start",t,i)},_slide:function(t,e,i){var s,n,a;this.options.values&&this.options.values.length?(s=this.values(e?0:1),2===this.options.values.length&&this.options.range===!0&&(0===e&&i>s||1===e&&s>i)&&(i=s),i!==this.values(e)&&(n=this.values(),n[e]=i,a=this._trigger("slide",t,{handle:this.handles[e],value:i,values:n}),s=this.values(e?0:1),a!==!1&&this.values(e,i,!0))):i!==this.value()&&(a=this._trigger("slide",t,{handle:this.handles[e],value:i}),a!==!1&&this.value(i))},_stop:function(t,e){var i={handle:this.handles[e],value:this.value()};this.options.values&&this.options.values.length&&(i.value=this.values(e),i.values=this.values()),this._trigger("stop",t,i)},_change:function(t,e){if(!this._keySliding&&!this._mouseSliding){var i={handle:this.handles[e],value:this.value()};this.options.values&&this.options.values.length&&(i.value=this.values(e),i.values=this.values()),this._lastChangedValue=e,this._trigger("change",t,i)}},value:function(t){return arguments.length?(this.options.value=this._trimAlignValue(t),this._refreshValue(),this._change(null,0),undefined):this._value()},values:function(e,i){var s,n,a;if(arguments.length>1)return this.options.values[e]=this._trimAlignValue(i),this._refreshValue(),this._change(null,e),undefined;if(!arguments.length)return this._values();if(!t.isArray(arguments[0]))return this.options.values&&this.options.values.length?this._values(e):this.value();for(s=this.options.values,n=arguments[0],a=0;s.length>a;a+=1)s[a]=this._trimAlignValue(n[a]),this._change(null,a);this._refreshValue()},_setOption:function(e,i){var s,n=0;switch("range"===e&&this.options.range===!0&&("min"===i?(this.options.value=this._values(0),this.options.values=null):"max"===i&&(this.options.value=this._values(this.options.values.length-1),this.options.values=null)),t.isArray(this.options.values)&&(n=this.options.values.length),t.Widget.prototype._setOption.apply(this,arguments),e){case"orientation":this._detectOrientation(),this.element.removeClass("ui-slider-horizontal ui-slider-vertical").addClass("ui-slider-"+this.orientation),this._refreshValue();break;case"value":this._animateOff=!0,this._refreshValue(),this._change(null,0),this._animateOff=!1;break;case"values":for(this._animateOff=!0,this._refreshValue(),s=0;n>s;s+=1)this._change(null,s);this._animateOff=!1;break;case"min":case"max":this._animateOff=!0,this._refreshValue(),this._animateOff=!1;break;case"range":this._animateOff=!0,this._refresh(),this._animateOff=!1}},_value:function(){var t=this.options.value;return t=this._trimAlignValue(t)},_values:function(t){var e,i,s;if(arguments.length)return e=this.options.values[t],e=this._trimAlignValue(e);if(this.options.values&&this.options.values.length){for(i=this.options.values.slice(),s=0;i.length>s;s+=1)i[s]=this._trimAlignValue(i[s]);return i}return[]},_trimAlignValue:function(t){if(this._valueMin()>=t)return this._valueMin();if(t>=this._valueMax())return this._valueMax();var e=this.options.step>0?this.options.step:1,i=(t-this._valueMin())%e,s=t-i;return 2*Math.abs(i)>=e&&(s+=i>0?e:-e),parseFloat(s.toFixed(5))},_valueMin:function(){return this.options.min},_valueMax:function(){return this.options.max},_refreshValue:function(){var e,i,s,n,a,o=this.options.range,r=this.options,h=this,l=this._animateOff?!1:r.animate,u={};this.options.values&&this.options.values.length?this.handles.each(function(s){i=100*((h.values(s)-h._valueMin())/(h._valueMax()-h._valueMin())),u["horizontal"===h.orientation?"left":"bottom"]=i+"%",t(this).stop(1,1)[l?"animate":"css"](u,r.animate),h.options.range===!0&&("horizontal"===h.orientation?(0===s&&h.range.stop(1,
vendor: 8,984 bytes, line 13
131)[l?"animate":"css"]({left:i+"%"},r.animate),1===s&&h.range[l?"animate":"css"]({width:i-e+"%"},{queue:!1,duration:r.animate})):(0===s&&h.range.stop(1,1)[l?"animate":"css"]({bottom:i+"%"},r.animate),1===s&&h.range[l?"animate":"css"]({height:i-e+"%"},{queue:!1,duration:r.animate}))),e=i}):(s=this.value(),n=this._valueMin(),a=this._valueMax(),i=a!==n?100*((s-n)/(a-n)):0,u["horizontal"===this.orientation?"left":"bottom"]=i+"%",this.handle.stop(1,1)[l?"animate":"css"](u,r.animate),"min"===o&&"horizontal"===this.orientation&&this.range.stop(1,1)[l?"animate":"css"]({width:i+"%"},r.animate),"max"===o&&"horizontal"===this.orientation&&this.range[l?"animate":"css"]({width:100-i+"%"},{queue:!1,duration:r.animate}),"min"===o&&"vertical"===this.orientation&&this.range.stop(1,1)[l?"animate":"css"]({height:i+"%"},r.animate),"max"===o&&"vertical"===this.orientation&&this.range[l?"animate":"css"]({height:100-i+"%"},{queue:!1,duration:r.animate}))},_handleEvents:{keydown:function(i){var s,n,a,o,r=t(i.target).data("ui-slider-handle-index");switch(i.keyCode){case t.ui.keyCode.HOME:case t.ui.keyCode.END:case t.ui.keyCode.PAGE_UP:case t.ui.keyCode.PAGE_DOWN:case t.ui.keyCode.UP:case t.ui.keyCode.RIGHT:case t.ui.keyCode.DOWN:case t.ui.keyCode.LEFT:if(i.preventDefault(),!this._keySliding&&(this._keySliding=!0,t(i.target).addClass("ui-state-active"),s=this._start(i,r),s===!1))return}switch(o=this.options.step,n=a=this.options.values&&this.options.values.length?this.values(r):this.value(),i.keyCode){case t.ui.keyCode.HOME:a=this._valueMin();break;case t.ui.keyCode.END:a=this._valueMax();break;case t.ui.keyCode.PAGE_UP:a=this._trimAlignValue(n+(this._valueMax()-this._valueMin())/e);break;case t.ui.keyCode.PAGE_DOWN:a=this._trimAlignValue(n-(this._valueMax()-this._valueMin())/e);break;case t.ui.keyCode.UP:case t.ui.keyCode.RIGHT:if(n===this._valueMax())return;a=this._trimAlignValue(n+o);break;case t.ui.keyCode.DOWN:case t.ui.keyCode.LEFT:if(n===this._valueMin())return;a=this._trimAlignValue(n-o)}this._slide(i,r,a)},click:function(t){t.preventDefault()},keyup:function(e){var i=t(e.target).data("ui-slider-handle-index");this._keySliding&&(this._keySliding=!1,this._stop(e,i),this._change(e,i),t(e.target).removeClass("ui-state-active"))}}})})(jQuery);(function(t){function e(t){return function(){var e=this.element.val();t.apply(this,arguments),this._refresh(),e!==this.element.val()&&this._trigger("change")}}t.widget("ui.spinner",{version:"1.10.3",defaultElement:"<input>",widgetEventPrefix:"spin",options:{culture:null,icons:{down:"ui-icon-triangle-1-s",up:"ui-icon-triangle-1-n"},incremental:!0,max:null,min:null,numberFormat:null,page:10,step:1,change:null,spin:null,start:null,stop:null},_create:function(){this._setOption("max",this.options.max),this._setOption("min",this.options.min),this._setOption("step",this.options.step),this._value(this.element.val(),!0),this._draw(),this._on(this._events),this._refresh(),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_getCreateOptions:function(){var e={},i=this.element;return t.each(["min","max","step"],function(t,s){var n=i.attr(s);void 0!==n&&n.length&&(e[s]=n)}),e},_events:{keydown:function(t){this._start(t)&&this._keydown(t)&&t.preventDefault()},keyup:"_stop",focus:function(){this.previous=this.element.val()},blur:function(t){return this.cancelBlur?(delete this.cancelBlur,void 0):(this._stop(),this._refresh(),this.previous!==this.element.val()&&this._trigger("change",t),void 0)},mousewheel:function(t,e){if(e){if(!this.spinning&&!this._start(t))return!1;this._spin((e>0?1:-1)*this.options.step,t),clearTimeout(this.mousewheelTimer),this.mousewheelTimer=this._delay(function(){this.spinning&&this._stop(t)},100),t.preventDefault()}},"mousedown .ui-spinner-button":function(e){function i(){var t=this.element[0]===this.document[0].activeElement;t||(this.element.focus(),this.previous=s,this._delay(function(){this.previous=s}))}var s;s=this.element[0]===this.document[0].activeElement?this.previous:this.element.val(),e.preventDefault(),i.call(this),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur,i.call(this)}),this._start(e)!==!1&&this._repeat(null,t(e.currentTarget).hasClass("ui-spinner-up")?1:-1,e)},"mouseup .ui-spinner-button":"_stop","mouseenter .ui-spinner-button":function(e){return t(e.currentTarget).hasClass("ui-state-active")?this._start(e)===!1?!1:(this._repeat(null,t(e.currentTarget).hasClass("ui-spinner-up")?1:-1,e),void 0):void 0},"mouseleave .ui-spinner-button":"_stop"},_draw:function(){var t=this.uiSpinner=this.element.addClass("ui-spinner-input").attr("autocomplete","off").wrap(this._uiSpinnerHtml()).parent().append(this._buttonHtml());this.element.attr("role","spinbutton"),this.buttons=t.find(".ui-spinner-button").attr("tabIndex",-1).button().removeClass("ui-corner-all"),this.buttons.height()>Math.ceil(.5*t.height())&&t.height()>0&&t.height(t.height()),this.options.disabled&&this.disable()},_keydown:function(e){var i=this.options,s=t.ui.keyCode;switch(e.keyCode){case s.UP:return this._repeat(null,1,e),!0;case s.DOWN:return this._repeat(null,-1,e),!0;case s.PAGE_UP:return this._repeat(null,i.page,e),!0;case s.PAGE_DOWN:return this._repeat(null,-i.page,e),!0}return!1},_uiSpinnerHtml:function(){return"<span class='ui-spinner ui-widget ui-widget-content ui-corner-all'></span>"},_buttonHtml:function(){return"<a class='ui-spinner-button ui-spinner-up ui-corner-tr'><span class='ui-icon "+this.options.icons.up+"'>&#9650;</span>"+"</a>"+"<a class='ui-spinner-button ui-spinner-down ui-corner-br'>"+"<span class='ui-icon "+this.options.icons.down+"'>&#9660;</span>"+"</a>"},_start:function(t){return this.spinning||this._trigger("start",t)!==!1?(this.counter||(this.counter=1),this.spinning=!0,!0):!1},_repeat:function(t,e,i){t=t||500,clearTimeout(this.timer),this.timer=this._delay(function(){this._repeat(40,e,i)},t),this._spin(e*this.options.step,i)},_spin:function(t,e){var i=this.value()||0;this.counter||(this.counter=1),i=this._adjustValue(i+t*this._increment(this.counter)),this.spinning&&this._trigger("spin",e,{value:i})===!1||(this._value(i),this.counter++)},_increment:function(e){var i=this.options.incremental;return i?t.isFunction(i)?i(e):Math.floor(e*e*e/5e4-e*e/500+17*e/200+1):1},_precision:function(){var t=this._precisionOf(this.options.step);return null!==this.options.min&&(t=Math.max(t,this._precisionOf(this.options.min))),t},_precisionOf:function(t){var e=""+t,i=e.indexOf(".");return-1===i?0:e.length-i-1},_adjustValue:function(t){var e,i,s=this.options;return e=null!==s.min?s.min:0,i=t-e,i=Math.round(i/s.step)*s.step,t=e+i,t=parseFloat(t.toFixed(this._precision())),null!==s.max&&t>s.max?s.max:null!==s.min&&s.min>t?s.min:t},_stop:function(t){this.spinning&&(clearTimeout(this.timer),clearTimeout(this.mousewheelTimer),this.counter=0,this.spinning=!1,this._trigger("stop",t))},_setOption:function(t,e){if("culture"===t||"numberFormat"===t){var i=this._parse(this.element.val());return this.options[t]=e,this.element.val(this._format(i)),void 0}("max"===t||"min"===t||"step"===t)&&"string"==typeof e&&(e=this._parse(e)),"icons"===t&&(this.buttons.first().find(".ui-icon").removeClass(this.options.icons.up).addClass(e.up),this.buttons.last().find(".ui-icon").removeClass(this.options.icons.down).addClass(e.down)),this._super(t,e),"disabled"===t&&(e?(this.element.prop("disabled",!0),this.buttons.button("disable")):(this.element.prop("disabled",!1),this.buttons.button("enable")))},_setOptions:e(function(t){this._super(t),this._value(this.element.val())}),_parse:function(t){return"string"==typeof t&&""!==t&&(t=window.Globalize&&this.options.numberFormat?Globalize.parseFloat(t,10,this.options.culture):+t),""===t||isNaN(t)?null:t},_format:function(t){return""===t?"":window.Globalize&&this.options.numberFormat?Globalize.format(t,this.options.numberFormat,this.options.culture):t},_refresh:function(){this.element.attr({"aria-valuemin":this.options.min,"aria-valuemax":this.options.max,"aria-valuenow":this._parse(this.element.val())})},_value:function(t,e){var i;""!==t&&(i=this._parse(t),null!==i&&(e||(i=this._adjustValue(i)),t=this._format(i))),this.element.val(t),this._refresh()},_destroy:function(){this.element.removeClass("ui-spinner-input").prop("disabled",!1).removeAttr("autocomplete").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow"),this.uiSpinner.replaceWith(this.element)},stepUp:e(function(t){this._stepUp(t)}),_stepUp:function(t){this._start()&&(this._spin((t||1)*this.options.step),this._stop())},stepDown:e(function(t){this._stepDown(t)}),_stepDown:function(t){this._start()&&(this._spin((t||1)*-this.options.step),this._stop())},pageUp:e(function(t){this._stepUp((t||1)*this.options.page)}),pageDown:e(function(t){this._stepDown((t||1)*this.options.page)}),value:function(t){return arguments.length?(e(this._value).call(this,t),void 0):this._parse(this.element.val())},widget:function(){return this.uiSpinner}}
vendor: 8,457 bytes, line 13
13)})(jQuery);(function(t,e){function i(){return++n}function s(t){return t.hash.length>1&&decodeURIComponent(t.href.replace(a,""))===decodeURIComponent(location.href.replace(a,""))}var n=0,a=/#.*$/;t.widget("ui.tabs",{version:"1.10.3",delay:300,options:{active:null,collapsible:!1,event:"click",heightStyle:"content",hide:null,show:null,activate:null,beforeActivate:null,beforeLoad:null,load:null},_create:function(){var e=this,i=this.options;this.running=!1,this.element.addClass("ui-tabs ui-widget ui-widget-content ui-corner-all").toggleClass("ui-tabs-collapsible",i.collapsible).delegate(".ui-tabs-nav > li","mousedown"+this.eventNamespace,function(e){t(this).is(".ui-state-disabled")&&e.preventDefault()}).delegate(".ui-tabs-anchor","focus"+this.eventNamespace,function(){t(this).closest("li").is(".ui-state-disabled")&&this.blur()}),this._processTabs(),i.active=this._initialActive(),t.isArray(i.disabled)&&(i.disabled=t.unique(i.disabled.concat(t.map(this.tabs.filter(".ui-state-disabled"),function(t){return e.tabs.index(t)}))).sort()),this.active=this.options.active!==!1&&this.anchors.length?this._findActive(i.active):t(),this._refresh(),this.active.length&&this.load(i.active)},_initialActive:function(){var i=this.options.active,s=this.options.collapsible,n=location.hash.substring(1);return null===i&&(n&&this.tabs.each(function(s,a){return t(a).attr("aria-controls")===n?(i=s,!1):e}),null===i&&(i=this.tabs.index(this.tabs.filter(".ui-tabs-active"))),(null===i||-1===i)&&(i=this.tabs.length?0:!1)),i!==!1&&(i=this.tabs.index(this.tabs.eq(i)),-1===i&&(i=s?!1:0)),!s&&i===!1&&this.anchors.length&&(i=0),i},_getCreateEventData:function(){return{tab:this.active,panel:this.active.length?this._getPanelForTab(this.active):t()}},_tabKeydown:function(i){var s=t(this.document[0].activeElement).closest("li"),n=this.tabs.index(s),a=!0;if(!this._handlePageNav(i)){switch(i.keyCode){case t.ui.keyCode.RIGHT:case t.ui.keyCode.DOWN:n++;break;case t.ui.keyCode.UP:case t.ui.keyCode.LEFT:a=!1,n--;break;case t.ui.keyCode.END:n=this.anchors.length-1;break;case t.ui.keyCode.HOME:n=0;break;case t.ui.keyCode.SPACE:return i.preventDefault(),clearTimeout(this.activating),this._activate(n),e;case t.ui.keyCode.ENTER:return i.preventDefault(),clearTimeout(this.activating),this._activate(n===this.options.active?!1:n),e;default:return}i.preventDefault(),clearTimeout(this.activating),n=this._focusNextTab(n,a),i.ctrlKey||(s.attr("aria-selected","false"),this.tabs.eq(n).attr("aria-selected","true"),this.activating=this._delay(function(){this.option("active",n)},this.delay))}},_panelKeydown:function(e){this._handlePageNav(e)||e.ctrlKey&&e.keyCode===t.ui.keyCode.UP&&(e.preventDefault(),this.active.focus())},_handlePageNav:function(i){return i.altKey&&i.keyCode===t.ui.keyCode.PAGE_UP?(this._activate(this._focusNextTab(this.options.active-1,!1)),!0):i.altKey&&i.keyCode===t.ui.keyCode.PAGE_DOWN?(this._activate(this._focusNextTab(this.options.active+1,!0)),!0):e},_findNextTab:function(e,i){function s(){return e>n&&(e=0),0>e&&(e=n),e}for(var n=this.tabs.length-1;-1!==t.inArray(s(),this.options.disabled);)e=i?e+1:e-1;return e},_focusNextTab:function(t,e){return t=this._findNextTab(t,e),this.tabs.eq(t).focus(),t},_setOption:function(t,i){return"active"===t?(this._activate(i),e):"disabled"===t?(this._setupDisabled(i),e):(this._super(t,i),"collapsible"===t&&(this.element.toggleClass("ui-tabs-collapsible",i),i||this.options.active!==!1||this._activate(0)),"event"===t&&this._setupEvents(i),"heightStyle"===t&&this._setupHeightStyle(i),e)},_tabId:function(t){return t.attr("aria-controls")||"ui-tabs-"+i()},_sanitizeSelector:function(t){return t?t.replace(/[!"$%&'()*+,.\/:;<=>?@\[\]\^`{|}~]/g,"\\$&"):""},refresh:function(){var e=this.options,i=this.tablist.children(":has(a[href])");e.disabled=t.map(i.filter(".ui-state-disabled"),function(t){return i.index(t)}),this._processTabs(),e.active!==!1&&this.anchors.length?this.active.length&&!t.contains(this.tablist[0],this.active[0])?this.tabs.length===e.disabled.length?(e.active=!1,this.active=t()):this._activate(this._findNextTab(Math.max(0,e.active-1),!1)):e.active=this.tabs.index(this.active):(e.active=!1,this.active=t()),this._refresh()},_refresh:function(){this._setupDisabled(this.options.disabled),this._setupEvents(this.options.event),this._setupHeightStyle(this.options.heightStyle),this.tabs.not(this.active).attr({"aria-selected":"false",tabIndex:-1}),this.panels.not(this._getPanelForTab(this.active)).hide().attr({"aria-expanded":"false","aria-hidden":"true"}),this.active.length?(this.active.addClass("ui-tabs-active ui-state-active").attr({"aria-selected":"true",tabIndex:0}),this._getPanelForTab(this.active).show().attr({"aria-expanded":"true","aria-hidden":"false"})):this.tabs.eq(0).attr("tabIndex",0)},_processTabs:function(){var e=this;this.tablist=this._getList().addClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all").attr("role","tablist"),this.tabs=this.tablist.find("> li:has(a[href])").addClass("ui-state-default ui-corner-top").attr({role:"tab",tabIndex:-1}),this.anchors=this.tabs.map(function(){return t("a",this)[0]}).addClass("ui-tabs-anchor").attr({role:"presentation",tabIndex:-1}),this.panels=t(),this.anchors.each(function(i,n){var a,o,r,h=t(n).uniqueId().attr("id"),l=t(n).closest("li"),u=l.attr("aria-controls");s(n)?(a=n.hash,o=e.element.find(e._sanitizeSelector(a))):(r=e._tabId(l),a="#"+r,o=e.element.find(a),o.length||(o=e._createPanel(r),o.insertAfter(e.panels[i-1]||e.tablist)),o.attr("aria-live","polite")),o.length&&(e.panels=e.panels.add(o)),u&&l.data("ui-tabs-aria-controls",u),l.attr({"aria-controls":a.substring(1),"aria-labelledby":h}),o.attr("aria-labelledby",h)}),this.panels.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").attr("role","tabpanel")},_getList:function(){return this.element.find("ol,ul").eq(0)},_createPanel:function(e){return t("<div>").attr("id",e).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").data("ui-tabs-destroy",!0)},_setupDisabled:function(e){t.isArray(e)&&(e.length?e.length===this.anchors.length&&(e=!0):e=!1);for(var i,s=0;i=this.tabs[s];s++)e===!0||-1!==t.inArray(s,e)?t(i).addClass("ui-state-disabled").attr("aria-disabled","true"):t(i).removeClass("ui-state-disabled").removeAttr("aria-disabled");this.options.disabled=e},_setupEvents:function(e){var i={click:function(t){t.preventDefault()}};e&&t.each(e.split(" "),function(t,e){i[e]="_eventHandler"}),this._off(this.anchors.add(this.tabs).add(this.panels)),this._on(this.anchors,i),this._on(this.tabs,{keydown:"_tabKeydown"}),this._on(this.panels,{keydown:"_panelKeydown"}),this._focusable(this.tabs),this._hoverable(this.tabs)},_setupHeightStyle:function(e){var i,s=this.element.parent();"fill"===e?(i=s.height(),i-=this.element.outerHeight()-this.element.height(),this.element.siblings(":visible").each(function(){var e=t(this),s=e.css("position");"absolute"!==s&&"fixed"!==s&&(i-=e.outerHeight(!0))}),this.element.children().not(this.panels).each(function(){i-=t(this).outerHeight(!0)}),this.panels.each(function(){t(this).height(Math.max(0,i-t(this).innerHeight()+t(this).height()))}).css("overflow","auto")):"auto"===e&&(i=0,this.panels.each(function(){i=Math.max(i,t(this).height("").height())}).height(i))},_eventHandler:function(e){var i=this.options,s=this.active,n=t(e.currentTarget),a=n.closest("li"),o=a[0]===s[0],r=o&&i.collapsible,h=r?t():this._getPanelForTab(a),l=s.length?this._getPanelForTab(s):t(),u={oldTab:s,oldPanel:l,newTab:r?t():a,newPanel:h};e.preventDefault(),a.hasClass("ui-state-disabled")||a.hasClass("ui-tabs-loading")||this.running||o&&!i.collapsible||this._trigger("beforeActivate",e,u)===!1||(i.active=r?!1:this.tabs.index(a),this.active=o?t():a,this.xhr&&this.xhr.abort(),l.length||h.length||t.error("jQuery UI Tabs: Mismatching fragment identifier."),h.length&&this.load(this.tabs.index(a),e),this._toggle(e,u))},_toggle:function(e,i){function s(){a.running=!1,a._trigger("activate",e,i)}function n(){i.newTab.closest("li").addClass("ui-tabs-active ui-state-active"),o.length&&a.options.show?a._show(o,a.options.show,s):(o.show(),s())}var a=this,o=i.newPanel,r=i.oldPanel;this.running=!0,r.length&&this.options.hide?this._hide(r,this.options.hide,function(){i.oldTab.closest("li").removeClass("ui-tabs-active ui-state-active"),n()}):(i.oldTab.closest("li").removeClass("ui-tabs-active ui-state-active"),r.hide(),n()),r.attr({"aria-expanded":"false","aria-hidden":"true"}
vendor: 11,942 bytes, line 13
13),i.oldTab.attr("aria-selected","false"),o.length&&r.length?i.oldTab.attr("tabIndex",-1):o.length&&this.tabs.filter(function(){return 0===t(this).attr("tabIndex")}).attr("tabIndex",-1),o.attr({"aria-expanded":"true","aria-hidden":"false"}),i.newTab.attr({"aria-selected":"true",tabIndex:0})},_activate:function(e){var i,s=this._findActive(e);s[0]!==this.active[0]&&(s.length||(s=this.active),i=s.find(".ui-tabs-anchor")[0],this._eventHandler({target:i,currentTarget:i,preventDefault:t.noop}))},_findActive:function(e){return e===!1?t():this.tabs.eq(e)},_getIndex:function(t){return"string"==typeof t&&(t=this.anchors.index(this.anchors.filter("[href$='"+t+"']"))),t},_destroy:function(){this.xhr&&this.xhr.abort(),this.element.removeClass("ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible"),this.tablist.removeClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all").removeAttr("role"),this.anchors.removeClass("ui-tabs-anchor").removeAttr("role").removeAttr("tabIndex").removeUniqueId(),this.tabs.add(this.panels).each(function(){t.data(this,"ui-tabs-destroy")?t(this).remove():t(this).removeClass("ui-state-default ui-state-active ui-state-disabled ui-corner-top ui-corner-bottom ui-widget-content ui-tabs-active ui-tabs-panel").removeAttr("tabIndex").removeAttr("aria-live").removeAttr("aria-busy").removeAttr("aria-selected").removeAttr("aria-labelledby").removeAttr("aria-hidden").removeAttr("aria-expanded").removeAttr("role")}),this.tabs.each(function(){var e=t(this),i=e.data("ui-tabs-aria-controls");i?e.attr("aria-controls",i).removeData("ui-tabs-aria-controls"):e.removeAttr("aria-controls")}),this.panels.show(),"content"!==this.options.heightStyle&&this.panels.css("height","")},enable:function(i){var s=this.options.disabled;s!==!1&&(i===e?s=!1:(i=this._getIndex(i),s=t.isArray(s)?t.map(s,function(t){return t!==i?t:null}):t.map(this.tabs,function(t,e){return e!==i?e:null})),this._setupDisabled(s))},disable:function(i){var s=this.options.disabled;if(s!==!0){if(i===e)s=!0;else{if(i=this._getIndex(i),-1!==t.inArray(i,s))return;s=t.isArray(s)?t.merge([i],s).sort():[i]}this._setupDisabled(s)}},load:function(e,i){e=this._getIndex(e);var n=this,a=this.tabs.eq(e),o=a.find(".ui-tabs-anchor"),r=this._getPanelForTab(a),h={tab:a,panel:r};s(o[0])||(this.xhr=t.ajax(this._ajaxSettings(o,i,h)),this.xhr&&"canceled"!==this.xhr.statusText&&(a.addClass("ui-tabs-loading"),r.attr("aria-busy","true"),this.xhr.success(function(t){setTimeout(function(){r.html(t),n._trigger("load",i,h)},1)}).complete(function(t,e){setTimeout(function(){"abort"===e&&n.panels.stop(!1,!0),a.removeClass("ui-tabs-loading"),r.removeAttr("aria-busy"),t===n.xhr&&delete n.xhr},1)})))},_ajaxSettings:function(e,i,s){var n=this;return{url:e.attr("href"),beforeSend:function(e,a){return n._trigger("beforeLoad",i,t.extend({jqXHR:e,ajaxSettings:a},s))}}},_getPanelForTab:function(e){var i=t(e).attr("aria-controls");return this.element.find(this._sanitizeSelector("#"+i))}})})(jQuery);(function(t){function e(e,i){var s=(e.attr("aria-describedby")||"").split(/\s+/);s.push(i),e.data("ui-tooltip-id",i).attr("aria-describedby",t.trim(s.join(" ")))}function i(e){var i=e.data("ui-tooltip-id"),s=(e.attr("aria-describedby")||"").split(/\s+/),n=t.inArray(i,s);-1!==n&&s.splice(n,1),e.removeData("ui-tooltip-id"),s=t.trim(s.join(" ")),s?e.attr("aria-describedby",s):e.removeAttr("aria-describedby")}var s=0;t.widget("ui.tooltip",{version:"1.10.3",options:{content:function(){var e=t(this).attr("title")||"";return t("<a>").text(e).html()},hide:!0,items:"[title]:not([disabled])",position:{my:"left top+15",at:"left bottom",collision:"flipfit flip"},show:!0,tooltipClass:null,track:!1,close:null,open:null},_create:function(){this._on({mouseover:"open",focusin:"open"}),this.tooltips={},this.parents={},this.options.disabled&&this._disable()},_setOption:function(e,i){var s=this;return"disabled"===e?(this[i?"_disable":"_enable"](),this.options[e]=i,void 0):(this._super(e,i),"content"===e&&t.each(this.tooltips,function(t,e){s._updateContent(e)}),void 0)},_disable:function(){var e=this;t.each(this.tooltips,function(i,s){var n=t.Event("blur");n.target=n.currentTarget=s[0],e.close(n,!0)}),this.element.find(this.options.items).addBack().each(function(){var e=t(this);e.is("[title]")&&e.data("ui-tooltip-title",e.attr("title")).attr("title","")})},_enable:function(){this.element.find(this.options.items).addBack().each(function(){var e=t(this);e.data("ui-tooltip-title")&&e.attr("title",e.data("ui-tooltip-title"))})},open:function(e){var i=this,s=t(e?e.target:this.element).closest(this.options.items);s.length&&!s.data("ui-tooltip-id")&&(s.attr("title")&&s.data("ui-tooltip-title",s.attr("title")),s.data("ui-tooltip-open",!0),e&&"mouseover"===e.type&&s.parents().each(function(){var e,s=t(this);s.data("ui-tooltip-open")&&(e=t.Event("blur"),e.target=e.currentTarget=this,i.close(e,!0)),s.attr("title")&&(s.uniqueId(),i.parents[this.id]={element:this,title:s.attr("title")},s.attr("title",""))}),this._updateContent(s,e))},_updateContent:function(t,e){var i,s=this.options.content,n=this,a=e?e.type:null;return"string"==typeof s?this._open(e,t,s):(i=s.call(t[0],function(i){t.data("ui-tooltip-open")&&n._delay(function(){e&&(e.type=a),this._open(e,t,i)})}),i&&this._open(e,t,i),void 0)},_open:function(i,s,n){function a(t){l.of=t,o.is(":hidden")||o.position(l)}var o,r,h,l=t.extend({},this.options.position);if(n){if(o=this._find(s),o.length)return o.find(".ui-tooltip-content").html(n),void 0;s.is("[title]")&&(i&&"mouseover"===i.type?s.attr("title",""):s.removeAttr("title")),o=this._tooltip(s),e(s,o.attr("id")),o.find(".ui-tooltip-content").html(n),this.options.track&&i&&/^mouse/.test(i.type)?(this._on(this.document,{mousemove:a}),a(i)):o.position(t.extend({of:s},this.options.position)),o.hide(),this._show(o,this.options.show),this.options.show&&this.options.show.delay&&(h=this.delayedShow=setInterval(function(){o.is(":visible")&&(a(l.of),clearInterval(h))},t.fx.interval)),this._trigger("open",i,{tooltip:o}),r={keyup:function(e){if(e.keyCode===t.ui.keyCode.ESCAPE){var i=t.Event(e);i.currentTarget=s[0],this.close(i,!0)}},remove:function(){this._removeTooltip(o)}},i&&"mouseover"!==i.type||(r.mouseleave="close"),i&&"focusin"!==i.type||(r.focusout="close"),this._on(!0,s,r)}},close:function(e){var s=this,n=t(e?e.currentTarget:this.element),a=this._find(n);this.closing||(clearInterval(this.delayedShow),n.data("ui-tooltip-title")&&n.attr("title",n.data("ui-tooltip-title")),i(n),a.stop(!0),this._hide(a,this.options.hide,function(){s._removeTooltip(t(this))}),n.removeData("ui-tooltip-open"),this._off(n,"mouseleave focusout keyup"),n[0]!==this.element[0]&&this._off(n,"remove"),this._off(this.document,"mousemove"),e&&"mouseleave"===e.type&&t.each(this.parents,function(e,i){t(i.element).attr("title",i.title),delete s.parents[e]}),this.closing=!0,this._trigger("close",e,{tooltip:a}),this.closing=!1)},_tooltip:function(e){var i="ui-tooltip-"+s++,n=t("<div>").attr({id:i,role:"tooltip"}).addClass("ui-tooltip ui-widget ui-corner-all ui-widget-content "+(this.options.tooltipClass||""));return t("<div>").addClass("ui-tooltip-content").appendTo(n),n.appendTo(this.document[0].body),this.tooltips[i]=e,n},_find:function(e){var i=e.data("ui-tooltip-id");return i?t("#"+i):t()},_removeTooltip:function(t){t.remove(),delete this.tooltips[t.attr("id")]},_destroy:function(){var e=this;t.each(this.tooltips,function(i,s){var n=t.Event("blur");n.target=n.currentTarget=s[0],e.close(n,!0),t("#"+i).remove(),s.data("ui-tooltip-title")&&(s.attr("title",s.data("ui-tooltip-title")),s.removeData("ui-tooltip-title"))})}})})(jQuery);(function(t,e){var i="ui-effects-";t.effects={effect:{}},function(t,e){function i(t,e,i){var s=u[e.type]||{};return null==t?i||!e.def?null:e.def:(t=s.floor?~~t:parseFloat(t),isNaN(t)?e.def:s.mod?(t+s.mod)%s.mod:0>t?0:t>s.max?s.max:t)}function s(i){var s=l(),n=s._rgba=[];return i=i.toLowerCase(),f(h,function(t,a){var o,r=a.re.exec(i),h=r&&a.parse(r),l=a.space||"rgba";return h?(o=s[l](h),s[c[l].cache]=o[c[l].cache],n=s._rgba=o._rgba,!1):e}),n.length?("0,0,0,0"===n.join()&&t.extend(n,a.transparent),s):a[i]}function n(t,e,i){return i=(i+1)%1,1>6*i?t+6*(e-t)*i:1>2*i?e:2>3*i?t+6*(e-t)*(2/3-i):t}var a,o="backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor",r=/^([\-+])=\s*(\d+\.?\d*)/,h=[{re:/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(t){return[t[1],t[2],t[3],t[4]]}},{re:/rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(t){return[2.55*t[1],2.55*t[2],2.55*t[3],t[4]]}},{re:/#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/,parse:function(t){return[parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16)]}},{re:/#([a-f0-9])([a-f0-9])([a-f0-9])/,parse:function(t){return[parseInt(t[1]+t[1],16),parseInt(t[2]+t[2],16),parseInt(t[3]+t[3],16)]}},{re:/hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,space:"hsla",parse:function(t){return[t[1],t[2]/100,t[3]/100,t[4]]}}],l=t.Color=function(e,i,s,n){return new t.Color.fn.parse(e,i,s,n)},c={rgba:{props:{red:{idx:0,type:"byte"},green:{idx:1,type:"byte"},blue:{idx:2,type:"byte"}}},hsla:{props:{hue:{idx:0,type:"degrees"},saturation:{idx:1,type:"percent"},lightness:{idx:2,type:"percent"}}}},u={"byte":{floor:!0,max:255},percent:{max:1},degrees:{mod:360,floor:!0}},d=l.support={},p=t("<p>")[0],f=t.each;p.style.cssText="background-color:rgba(1,1,1,.5)",d.rgba=p.style.backgroundColor.indexOf("rgba")>-1,f(c,function(t,e){e.cache="_"+t,e.props.alpha={idx:3,type:"percent",def:1}}),l.fn=t.extend(l.prototype,{parse:function(n,o,r,h){if(n===e)return this._rgba=[null,null,null,null],this;(n.jquery||n.nodeType)&&(n=t(n).css(o),o=e);var u=this,d=t.type(n),p=this._rgba=[];return o!==e&&(n=[n,o,r,h],d="array"),"string"===d?this.parse(s(n)||a._default):"array"===d?(f(c.rgba.props,function(t,e){p[e.idx]=i(n[e.idx],e)}),this):"object"===d?(n instanceof l?f(c,function(t,e){n[e.cache]&&(u[e.cache]=n[e.cache].slice())}):f(c,function(e,s){var a=s.cache;f(s.props,function(t,e){if(!u[a]&&s.to){if("alpha"===t||null==n[t])return;u[a]=s.to(u._rgba)}u[a][e.idx]=i(n[t],e,!0)}),u[a]&&0>t.inArray(null,u[a].slice(0,3))&&(u[a][3]=1,s.from&&(u._rgba=s.from(u[a])))}),this):e},is:function(t){var i=l(t),s=!0,n=this;return f(c,function(t,a){var o,r=i[a.cache];return r&&(o=n[a.cache]||a.to&&a.to(n._rgba)||[],f(a.props,function(t,i){return null!=r[i.idx]?s=r[i.idx]===o[i.idx]:e})),s}),s},_space:function(){var t=[],e=this;return f(c,function(i,s){e[s.cache]&&t.push(i)}),t.pop()},transition:function(t,e){var s=l(t),n=s._space(),a=c[n],o=0===this.alpha()?l("transparent"):this,r=o[a.cache]||a.to(o._rgba),h=r.slice();return s=s[a.cache],f(a.props,function(t,n){var a=n.idx,o=r[a],l=s[a],c=u[n.type]||{};null!==l&&(null===o?h[a]=l:(c.mod&&(l-o>c.mod/2?o+=c.mod:o-l>c.mod/2&&(o-=c.mod)),h[a]=i((l-o)*e+o,n)))}),this[n](h)},blend:function(e){if(1===this._rgba[3])return this;var i=this._rgba.slice(),s=i.pop(),n=l(e)._rgba;return l(t.map(i,function(t,e){return(1-s)*n[e]+s*t}))},toRgbaString:function(){var e="rgba(",i=t.map(this._rgba,function(t,e){return null==t?e>2?1:0:t});return 1===i[3]&&(i.pop(),e="rgb("),e+i.join()+")"},toHslaString:function(){var e="hsla(",i=t.map(this.hsla(),function(t,e){return null==t&&(t=e>2?1:0),e&&3>e&&(t=Math.round(100*t)+"%"),t});return 1===i[3]&&(i.pop(),e="hsl("),e+i.join()+")"},toHexString:function(e){var i=this._rgba.slice(),s=i.pop();return e&&i.push(~~(255*s)),"#"+t.map(i,function(t){return t=(t||0).toString(16),1===t.length?"0"+t:t}).join("")},toString:function(){return 0===this._rgba[3]?"transparent":this.toRgbaString()}}),l.fn.parse.prototype=l.fn,c.hsla.to=function(t){if(null==t[0]||null==t[1]||null==t[2])return[null,
vendor: 20,767 bytes, lines 13-20
13null,null,t[3]];var e,i,s=t[0]/255,n=t[1]/255,a=t[2]/255,o=t[3],r=Math.max(s,n,a),h=Math.min(s,n,a),l=r-h,c=r+h,u=.5*c;return e=h===r?0:s===r?60*(n-a)/l+360:n===r?60*(a-s)/l+120:60*(s-n)/l+240,i=0===l?0:.5>=u?l/c:l/(2-c),[Math.round(e)%360,i,u,null==o?1:o]},c.hsla.from=function(t){if(null==t[0]||null==t[1]||null==t[2])return[null,null,null,t[3]];var e=t[0]/360,i=t[1],s=t[2],a=t[3],o=.5>=s?s*(1+i):s+i-s*i,r=2*s-o;return[Math.round(255*n(r,o,e+1/3)),Math.round(255*n(r,o,e)),Math.round(255*n(r,o,e-1/3)),a]},f(c,function(s,n){var a=n.props,o=n.cache,h=n.to,c=n.from;l.fn[s]=function(s){if(h&&!this[o]&&(this[o]=h(this._rgba)),s===e)return this[o].slice();var n,r=t.type(s),u="array"===r||"object"===r?s:arguments,d=this[o].slice();return f(a,function(t,e){var s=u["object"===r?t:e.idx];null==s&&(s=d[e.idx]),d[e.idx]=i(s,e)}),c?(n=l(c(d)),n[o]=d,n):l(d)},f(a,function(e,i){l.fn[e]||(l.fn[e]=function(n){var a,o=t.type(n),h="alpha"===e?this._hsla?"hsla":"rgba":s,l=this[h](),c=l[i.idx];return"undefined"===o?c:("function"===o&&(n=n.call(this,c),o=t.type(n)),null==n&&i.empty?this:("string"===o&&(a=r.exec(n),a&&(n=c+parseFloat(a[2])*("+"===a[1]?1:-1))),l[i.idx]=n,this[h](l)))})})}),l.hook=function(e){var i=e.split(" ");f(i,function(e,i){t.cssHooks[i]={set:function(e,n){var a,o,r="";if("transparent"!==n&&("string"!==t.type(n)||(a=s(n)))){if(n=l(a||n),!d.rgba&&1!==n._rgba[3]){for(o="backgroundColor"===i?e.parentNode:e;(""===r||"transparent"===r)&&o&&o.style;)try{r=t.css(o,"backgroundColor"),o=o.parentNode}catch(h){}n=n.blend(r&&"transparent"!==r?r:"_default")}n=n.toRgbaString()}try{e.style[i]=n}catch(h){}}},t.fx.step[i]=function(e){e.colorInit||(e.start=l(e.elem,i),e.end=l(e.end),e.colorInit=!0),t.cssHooks[i].set(e.elem,e.start.transition(e.end,e.pos))}})},l.hook(o),t.cssHooks.borderColor={expand:function(t){var e={};return f(["Top","Right","Bottom","Left"],function(i,s){e["border"+s+"Color"]=t}),e}},a=t.Color.names={aqua:"#00ffff",black:"#000000",blue:"#0000ff",fuchsia:"#ff00ff",gray:"#808080",green:"#008000",lime:"#00ff00",maroon:"#800000",navy:"#000080",olive:"#808000",purple:"#800080",red:"#ff0000",silver:"#c0c0c0",teal:"#008080",white:"#ffffff",yellow:"#ffff00",transparent:[null,null,null,0],_default:"#ffffff"}}(jQuery),function(){function i(e){var i,s,n=e.ownerDocument.defaultView?e.ownerDocument.defaultView.getComputedStyle(e,null):e.currentStyle,a={};if(n&&n.length&&n[0]&&n[n[0]])for(s=n.length;s--;)i=n[s],"string"==typeof n[i]&&(a[t.camelCase(i)]=n[i]);else for(i in n)"string"==typeof n[i]&&(a[i]=n[i]);return a}function s(e,i){var s,n,o={};for(s in i)n=i[s],e[s]!==n&&(a[s]||(t.fx.step[s]||!isNaN(parseFloat(n)))&&(o[s]=n));return o}var n=["add","remove","toggle"],a={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};t.each(["borderLeftStyle","borderRightStyle","borderBottomStyle","borderTopStyle"],function(e,i){t.fx.step[i]=function(t){("none"!==t.end&&!t.setAttr||1===t.pos&&!t.setAttr)&&(jQuery.style(t.elem,i,t.end),t.setAttr=!0)}}),t.fn.addBack||(t.fn.addBack=function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}),t.effects.animateClass=function(e,a,o,r){var h=t.speed(a,o,r);return this.queue(function(){var a,o=t(this),r=o.attr("class")||"",l=h.children?o.find("*").addBack():o;l=l.map(function(){var e=t(this);return{el:e,start:i(this)}}),a=function(){t.each(n,function(t,i){e[i]&&o[i+"Class"](e[i])})},a(),l=l.map(function(){return this.end=i(this.el[0]),this.diff=s(this.start,this.end),this}),o.attr("class",r),l=l.map(function(){var e=this,i=t.Deferred(),s=t.extend({},h,{queue:!1,complete:function(){i.resolve(e)}});return this.el.animate(this.diff,s),i.promise()}),t.when.apply(t,l.get()).done(function(){a(),t.each(arguments,function(){var e=this.el;t.each(this.diff,function(t){e.css(t,"")})}),h.complete.call(o[0])})})},t.fn.extend({addClass:function(e){return function(i,s,n,a){return s?t.effects.animateClass.call(this,{add:i},s,n,a):e.apply(this,arguments)}}(t.fn.addClass),removeClass:function(e){return function(i,s,n,a){return arguments.length>1?t.effects.animateClass.call(this,{remove:i},s,n,a):e.apply(this,arguments)}}(t.fn.removeClass),toggleClass:function(i){return function(s,n,a,o,r){return"boolean"==typeof n||n===e?a?t.effects.animateClass.call(this,n?{add:s}:{remove:s},a,o,r):i.apply(this,arguments):t.effects.animateClass.call(this,{toggle:s},n,a,o)}}(t.fn.toggleClass),switchClass:function(e,i,s,n,a){return t.effects.animateClass.call(this,{add:i,remove:e},s,n,a)}})}(),function(){function s(e,i,s,n){return t.isPlainObject(e)&&(i=e,e=e.effect),e={effect:e},null==i&&(i={}),t.isFunction(i)&&(n=i,s=null,i={}),("number"==typeof i||t.fx.speeds[i])&&(n=s,s=i,i={}),t.isFunction(s)&&(n=s,s=null),i&&t.extend(e,i),s=s||i.duration,e.duration=t.fx.off?0:"number"==typeof s?s:s in t.fx.speeds?t.fx.speeds[s]:t.fx.speeds._default,e.complete=n||i.complete,e}function n(e){return!e||"number"==typeof e||t.fx.speeds[e]?!0:"string"!=typeof e||t.effects.effect[e]?t.isFunction(e)?!0:"object"!=typeof e||e.effect?!1:!0:!0}t.extend(t.effects,{version:"1.10.3",save:function(t,e){for(var s=0;e.length>s;s++)null!==e[s]&&t.data(i+e[s],t[0].style[e[s]])},restore:function(t,s){var n,a;for(a=0;s.length>a;a++)null!==s[a]&&(n=t.data(i+s[a]),n===e&&(n=""),t.css(s[a],n))},setMode:function(t,e){return"toggle"===e&&(e=t.is(":hidden")?"show":"hide"),e},getBaseline:function(t,e){var i,s;switch(t[0]){case"top":i=0;break;case"middle":i=.5;break;case"bottom":i=1;break;default:i=t[0]/e.height}switch(t[1]){case"left":s=0;break;case"center":s=.5;break;case"right":s=1;break;default:s=t[1]/e.width}return{x:s,y:i}},createWrapper:function(e){if(e.parent().is(".ui-effects-wrapper"))return e.parent();var i={width:e.outerWidth(!0),height:e.outerHeight(!0),"float":e.css("float")},s=t("<div></div>").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0}),n={width:e.width(),height:e.height()},a=document.activeElement;try{a.id}catch(o){a=document.body}return e.wrap(s),(e[0]===a||t.contains(e[0],a))&&t(a).focus(),s=e.parent(),"static"===e.css("position")?(s.css({position:"relative"}),e.css({position:"relative"})):(t.extend(i,{position:e.css("position"),zIndex:e.css("z-index")}),t.each(["top","left","bottom","right"],function(t,s){i[s]=e.css(s),isNaN(parseInt(i[s],10))&&(i[s]="auto")}),e.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})),e.css(n),s.css(i).show()},removeWrapper:function(e){var i=document.activeElement;return e.parent().is(".ui-effects-wrapper")&&(e.parent().replaceWith(e),(e[0]===i||t.contains(e[0],i))&&t(i).focus()),e},setTransition:function(e,i,s,n){return n=n||{},t.each(i,function(t,i){var a=e.cssUnit(i);a[0]>0&&(n[i]=a[0]*s+a[1])}),n}}),t.fn.extend({effect:function(){function e(e){function s(){t.isFunction(a)&&a.call(n[0]),t.isFunction(e)&&e()}var n=t(this),a=i.complete,r=i.mode;(n.is(":hidden")?"hide"===r:"show"===r)?(n[r](),s()):o.call(n[0],i,s)}var i=s.apply(this,arguments),n=i.mode,a=i.queue,o=t.effects.effect[i.effect];return t.fx.off||!o?n?this[n](i.duration,i.complete):this.each(function(){i.complete&&i.complete.call(this)}):a===!1?this.each(e):this.queue(a||"fx",e)},show:function(t){return function(e){if(n(e))return t.apply(this,arguments);var i=s.apply(this,arguments);return i.mode="show",this.effect.call(this,i)}}(t.fn.show),hide:function(t){return function(e){if(n(e))return t.apply(this,arguments);var i=s.apply(this,arguments);return i.mode="hide",this.effect.call(this,i)}}(t.fn.hide),toggle:function(t){return function(e){if(n(e)||"boolean"==typeof e)return t.apply(this,arguments);var i=s.apply(this,arguments);return i.mode="toggle",this.effect.call(this,i)}}(t.fn.toggle),cssUnit:function(e){var i=this.css(e),s=[];return t.each(["em","px","%","pt"],function(t,e){i.indexOf(e)>0&&(s=[parseFloat(i),e])}),s}})}(),function(){var e={};t.each(["Quad","Cubic","Quart","Quint","Expo"],function(t,i){e[i]=function(e){return Math.pow(e,t+2)}}),t.extend(e,{Sine:function(t){return 1-Math.cos(t*Math.PI/2)},Circ:function(t){return 1-Math.sqrt(1-t*t)},Elastic:function(t){return 0===t||1===t?t:-Math.pow(2,8*(t-1))*Math.sin((80*(t-1)-7.5)*Math.PI/15)},Back:function(t){return t*t*(3*t-2)},Bounce:function(t){for(var e,i=4;((e=Math.pow(2,--i))-1)/11>t;);return 1/Math.pow(4,3-i)-7.5625*Math.pow((3*e-2)/22-t,2)}}),t.each(e,function(e,i){t.easing["easeIn"+e]=i,t.easing["easeOut"+e]=function(t){return 1-i(1-t)},t.easing["easeInOut"+e]=function(t){return.5>t?i(2*t)/2:1-i(-2*t+2)/2}})}()})(jQuery);(function(t){var e=/up|down|vertical/,i=/up|left|vertical|horizontal/;t.effects.effect.blind=function(s,n){var a,o,r,h=t(this),l=["position","top","bottom","left","right","height","width"],c=t.effects.setMode(h,s.mode||"hide"),u=s.direction||"up",d=e.test(u),p=d?"height":"width",f=d?"top":"left",m=i.test(u),g={},v="show"===c;h.parent().is(".ui-effects-wrapper")?t.effects.save(h.parent(),l):t.effects.save(h,l),h.show(),a=t.effects.createWrapper(h).css({overflow:"hidden"}),o=a[p](),r=parseFloat(a.css(f))||0,g[p]=v?o:0,m||(h.css(d?"bottom":"right",0).css(d?"top":"left","auto").css({position:"absolute"}),g[f]=v?r:o+r),v&&(a.css(p,0),m||a.css(f,r+o)),a.animate(g,{duration:s.duration,easing:s.easing,queue:!1,complete:function(){"hide"===c&&h.hide(),t.effects.restore(h,l),t.effects.removeWrapper(h),n()}})}})(jQuery);(function(t){t.effects.effect.bounce=function(e,i){var s,n,a,o=t(this),r=["position","top","bottom","left","right","height","width"],h=t.effects.setMode(o,e.mode||"effect"),l="hide"===h,c="show"===h,u=e.direction||"up",d=e.distance,p=e.times||5,f=2*p+(c||l?1:0),m=e.duration/f,g=e.easing,v="up"===u||"down"===u?"top":"left",_="up"===u||"left"===u,b=o.queue(),y=b.length;for((c||l)&&r.push("opacity"),t.effects.save(o,r),o.show(),t.effects.createWrapper(o),d||(d=o["top"===v?"outerHeight":"outerWidth"]()/3),c&&(a={opacity:1},a[v]=0,o.css("opacity",0).css(v,_?2*-d:2*d).animate(a,m,g)),l&&(d/=Math.pow(2,p-1)),a={},a[v]=0,s=0;p>s;s++)n={},n[v]=(_?"-=":"+=")+d,o.animate(n,m,g).animate(a,m,g),d=l?2*d:d/2;l&&(n={opacity:0},n[v]=(_?"-=":"+=")+d,o.animate(n,m,g)),o.queue(function(){l&&o.hide(),t.effects.restore(o,r),t.effects.removeWrapper(o),i()}),y>1&&b.splice.apply(b,[1,0].concat(b.splice(y,f+1))),o.dequeue()}})(jQuery);(function(t){t.effects.effect.clip=function(e,i){var s,n,a,o=t(this),r=["position","top","bottom","left","right","height","width"],h=t.effects.setMode(o,e.mode||"hide"),l="show"===h,c=e.direction||"vertical",u="vertical"===c,d=u?"height":"width",p=u?"top":"left",f={};t.effects.save(o,r),o.show(),s=t.effects.createWrapper(o).css({overflow:"hidden"}),n="IMG"===o[0].tagName?s:o,a=n[d](),l&&(n.css(d,0),n.css(p,a/2)),f[d]=l?a:0,f[p]=l?0:a/2,n.animate(f,{queue:!1,duration:e.duration,easing:e.easing,complete:function(){l||o.hide(),t.effects.restore(o,r),t.effects.removeWrapper(o),i()}})}})(jQuery);(function(t){t.effects.effect.drop=function(e,i){var s,n=t(this),a=["position","top","bottom","left","right","opacity","height","width"],o=t.effects.setMode(n,e.mode||"hide"),r="show"===o,h=e.direction||"left",l="up"===h||"down"===h?"top":"left",c="up"===h||"left"===h?"pos":"neg",u={opacity:r?1:0};t.effects.save(n,a),n.show(),t.effects.createWrapper(n),s=e.distance||n["top"===l?"outerHeight":"outerWidth"](!0)/2,r&&n.css("opacity",0).css(l,"pos"===c?-s:s),u[l]=(r?"pos"===c?"+=":"-=":"pos"===c?"-=":"+=")+s,n.animate(u,{queue:!1,duration:e.duration,easing:e.easing,complete:function(){"hide"===o&&n.hide(),t.effects.restore(n,a),t.effects.removeWrapper(n),i()}})}})(jQuery);(function(t){t.effects.effect.explode=function(e,i){function s(){b.push(this),b.length===u*d&&n()}function n(){p.css({visibility:"visible"}),t(b).remove(),m||p.hide(),i()}var a,o,r,h,l,c,u=e.pieces?Math.round(Math.sqrt(e.pieces)):3,d=u,p=t(this),f=t.effects.setMode(p,e.mode||"hide"),m="show"===f,g=p.show().css("visibility","hidden").offset(),v=Math.ceil(p.outerWidth()/d),_=Math.ceil(p.outerHeight()/u),b=[];for(a=0;u>a;a++)for(h=g.top+a*_,c=a-(u-1)/2,o=0;d>o;o++)r=g.left+o*v,l=o-(d-1)/2,p.clone().appendTo("body").wrap("<div></div>").css({position:"absolute",visibility:"visible",left:-o*v,top:-a*_}).parent().addClass("ui-effects-explode").css({position:"absolute",overflow:"hidden",width:v,height:_,left:r+(m?l*v:0),top:h+(m?c*_:0),opacity:m?0:1}).animate({left:r+(m?0:l*v),top:h+(m?0:c*_),opacity:m?1:0},e.duration||500,e.easing,s)}})(jQuery);(function(t){t.effects.effect.fade=function(e,i){var s=t(this),n=t.effects.setMode(s,e.mode||"toggle");s.animate({opacity:n},{queue:!1,duration:e.duration,easing:e.easing,complete:i})}})(jQuery);(function(t){t.effects.effect.fold=function(e,i){var s,n,a=t(this),o=["position","top","bottom","left","right","height","width"],r=t.effects.setMode(a,e.mode||"hide"),h="show"===r,l="hide"===r,c=e.size||15,u=/([0-9]+)%/.exec(c),d=!!e.horizFirst,p=h!==d,f=p?["width","height"]:["height","width"],m=e.duration/2,g={},v={};t.effects.save(a,o),a.show(),s=t.effects.createWrapper(a).css({overflow:"hidden"}),n=p?[s.width(),s.height()]:[s.height(),s.width()],u&&(c=parseInt(u[1],10)/100*n[l?0:1]),h&&s.css(d?{height:0,width:c}:{height:c,width:0}),g[f[0]]=h?n[0]:c,v[f[1]]=h?n[1]:0,s.animate(g,m,e.easing).animate(v,m,e.easing,function(){l&&a.hide(),t.effects.restore(a,o),t.effects.removeWrapper(a),i()})}})(jQuery);(function(t){t.effects.effect.highlight=function(e,i){var s=t(this),n=["backgroundImage","backgroundColor","opacity"],a=t.effects.setMode(s,e.mode||"show"),o={backgroundColor:s.css("backgroundColor")};"hide"===a&&(o.opacity=0),t.effects.save(s,n),s.show().css({backgroundImage:"none",backgroundColor:e.color||"#ffff99"}).animate(o,{queue:!1,duration:e.duration,easing:e.easing,complete:function(){"hide"===a&&s.hide(),t.effects.restore(s,n),i()}})}})(jQuery);(function(t){t.effects.effect.pulsate=function(e,i){var s,n=t(this),a=t.effects.setMode(n,e.mode||"show"),o="show"===a,r="hide"===a,h=o||"hide"===a,l=2*(e.times||5)+(h?1:0),c=e.duration/l,u=0,d=n.queue(),p=d.length;for((o||!n.is(":visible"))&&(n.css("opacity",0).show(),u=1),s=1;l>s;s++)n.animate({opacity:u},c,e.easing),u=1-u;n.animate({opacity:u},c,e.easing),n.queue(function(){r&&n.hide(),i()}),p>1&&d.splice.apply(d,[1,0].concat(d.splice(p,l+1))),n.dequeue()}})(jQuery);(function(t){t.effects.effect.puff=function(e,i){var s=t(this),n=t.effects.setMode(s,e.mode||"hide"),a="hide"===n,o=parseInt(e.percent,10)||150,r=o/100,h={height:s.height(),width:s.width(),outerHeight:s.outerHeight(),outerWidth:s.outerWidth()};t.extend(e,{effect:"scale",queue:!1,fade:!0,mode:n,complete:i,percent:a?o:100,from:a?h:{height:h.height*r,width:h.width*r,outerHeight:h.outerHeight*r,outerWidth:h.outerWidth*r}}),s.effect(e)},t.effects.effect.scale=function(e,i){var s=t(this),n=t.extend(!0,{},e),a=t.effects.setMode(s,e.mode||"effect"),o=parseInt(e.percent,10)||(0===parseInt(e.percent,10)?0:"hide"===a?0:100),r=e.direction||"both",h=e.origin,l={height:s.height(),width:s.width(),outerHeight:s.outerHeight(),outerWidth:s.outerWidth()},c={y:"horizontal"!==r?o/100:1,x:"vertical"!==r?o/100:1};n.effect="size",n.queue=!1,n.complete=i,"effect"!==a&&(n.origin=h||["middle","center"],n.restore=!0),n.from=e.from||("show"===a?{height:0,width:0,outerHeight:0,outerWidth:0}:l),n.to={height:l.height*c.y,width:l.width*c.x,outerHeight:l.outerHeight*c.y,outerWidth:l.outerWidth*c.x},n.fade&&("show"===a&&(n.from.opacity=0,n.to.opacity=1),"hide"===a&&(n.from.opacity=1,n.to.opacity=0)),s.effect(n)},t.effects.effect.size=function(e,i){var s,n,a,o=t(this),r=["position","top","bottom","left","right","width","height","overflow","opacity"],h=["position","top","bottom","left","right","overflow","opacity"],l=["width","height","overflow"],c=["fontSize"],u=["borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"],d=["borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"],p=t.effects.setMode(o,e.mode||"effect"),f=e.restore||"effect"!==p,m=e.scale||"both",g=e.origin||["middle","center"],v=o.css("position"),_=f?r:h,b={height:0,width:0,outerHeight:0,outerWidth:0};"show"===p&&o.show(),s={height:o.height(),width:o.width(),outerHeight:o.outerHeight(),outerWidth:o.outerWidth()},"toggle"===e.mode&&"show"===p?(o.from=e.to||b,o.to=e.from||s):(o.from=e.from||("show"===p?b:s),o.to=e.to||("hide"===p?b:s)),a={from:{y:o.from.height/s.height,x:o.from.width/s.width},to:{y:o.to.height/s.height,x:o.to.width/s.width}},("box"===m||"both"===m)&&(a.from.y!==a.to.y&&(_=_.concat(u),o.from=t.effects.setTransition(o,u,a.from.y,o.from),o.to=t.effects.setTransition(o,u,a.to.y,o.to)),a.from.x!==a.to.x&&(_=_.concat(d),o.from=t.effects.setTransition(o,d,a.from.x,o.from),o.to=t.effects.setTransition(o,d,a.to.x,o.to))),("content"===m||"both"===m)&&a.from.y!==a.to.y&&(_=_.concat(c).concat(l),o.from=t.effects.setTransition(o,c,a.from.y,o.from),o.to=t.effects.setTransition(o,c,a.to.y,o.to)),t.effects.save(o,_),o.show(),t.effects.createWrapper(o),o.css("overflow","hidden").css(o.from),g&&(n=t.effects.getBaseline(g,s),o.from.top=(s.outerHeight-o.outerHeight())*n.y,o.from.left=(s.outerWidth-o.outerWidth())*n.x,o.to.top=(s.outerHeight-o.to.outerHeight)*n.y,o.to.left=(s.outerWidth-o.to.outerWidth)*n.x),o.css(o.from),("content"===m||"both"===m)&&(u=u.concat(["marginTop","marginBottom"]).concat(c),d=d.concat(["marginLeft","marginRight"]),l=r.concat(u).concat(d),o.find("*[width]").each(function(){var i=t(this),s={height:i.height(),width:i.width(),outerHeight:i.outerHeight(),outerWidth:i.outerWidth()};f&&t.effects.save(i,l),i.from={height:s.height*a.from.y,width:s.width*a.from.x,outerHeight:s.outerHeight*a.from.y,outerWidth:s.outerWidth*a.from.x},i.to={height:s.height*a.to.y,width:s.width*a.to.x,outerHeight:s.height*a.to.y,outerWidth:s.width*a.to.x},a.from.y!==a.to.y&&(i.from=t.effects.setTransition(i,u,a.from.y,i.from),i.to=t.effects.setTransition(i,u,a.to.y,i.to)),a.from.x!==a.to.x&&(i.from=t.effects.setTransition(i,d,a.from.x,i.from),i.to=t.effects.setTransition(i,d,a.to.x,i.to)),i.css(i.from),i.animate(i.to,e.duration,e.easing,function(){f&&t.effects.restore(i,l)})})),o.animate(o.to,{queue:!1,duration:e.duration,easing:e.easing,complete:function(){0===o.to.opacity&&o.css("opacity",o.from.opacity),"hide"===p&&o.hide(),t.effects.restore(o,_),f||("static"===v?o.css({position:"relative",top:o.to.top,left:o.to.left}):t.each(["top","left"],function(t,e){o.css(e,function(e,i){var s=parseInt(i,10),n=t?o.to.left:o.to.top;return"auto"===i?n+"px":s+n+"px"})})),t.effects.removeWrapper(o),i()}})}})(jQuery);(function(t){t.effects.effect.shake=function(e,i){var s,n=t(this),a=["position","top","bottom","left","right","height","width"],o=t.effects.setMode(n,e.mode||"effect"),r=e.direction||"left",h=e.distance||20,l=e.times||3,c=2*l+1,u=Math.round(e.duration/c),d="up"===r||"down"===r?"top":"left",p="up"===r||"left"===r,f={},m={},g={},v=n.queue(),_=v.length;for(t.effects.save(n,a),n.show(),t.effects.createWrapper(n),f[d]=(p?"-=":"+=")+h,m[d]=(p?"+=":"-=")+2*h,g[d]=(p?"-=":"+=")+2*h,n.animate(f,u,e.easing),s=1;l>s;s++)n.animate(m,u,e.easing).animate(g,u,e.easing);n.animate(m,u,e.easing).animate(f,u/2,e.easing).queue(function(){"hide"===o&&n.hide(),t.effects.restore(n,a),t.effects.removeWrapper(n),i()}),_>1&&v.splice.apply(v,[1,0].concat(v.splice(_,c+1))),n.dequeue()}})(jQuery);(function(t){t.effects.effect.slide=function(e,i){var s,n=t(this),a=["position","top","bottom","left","right","width","height"],o=t.effects.setMode(n,e.mode||"show"),r="show"===o,h=e.direction||"left",l="up"===h||"down"===h?"top":"left",c="up"===h||"left"===h,u={};t.effects.save(n,a),n.show(),s=e.distance||n["top"===l?"outerHeight":"outerWidth"](!0),t.effects.createWrapper(n).css({overflow:"hidden"}),r&&n.css(l,c?isNaN(s)?"-"+s:-s:s),u[l]=(r?c?"+=":"-=":c?"-=":"+=")+s,n.animate(u,{queue:!1,duration:e.duration,easing:e.easing,complete:function(){"hide"===o&&n.hide(),t.effects.restore(n,a),t.effects.removeWrapper(n),i()}})}})(jQuery);(function(t){t.effects.effect.transfer=function(e,i){var s=t(this),n=t(e.to),a="fixed"===n.css("position"),o=t("body"),r=a?o.scrollTop():0,h=a?o.scrollLeft():0,l=n.offset(),c={top:l.top-r,left:l.left-h,height:n.innerHeight(),width:n.innerWidth()},u=s.offset(),d=t("<div class='ui-effects-transfer'></div>").appendTo(document.body).addClass(e.className).css({top:u.top-r,left:u.left-h,height:s.innerHeight(),width:s.innerWidth(),position:a?"fixed":"absolute"}).animate(c,e.duration,e.easing,function(){d.remove(),i()})}})(jQuery);
14/* ========================================================================
15 * Bootstrap: collapse.js v3.0.3
16 * http://getbootstrap.com/javascript/#collapse
17 * ========================================================================
18 * Copyright 2013 Twitter, Inc.
19 *
20 * Licensed under the Apache License, Version 2.0 (the "License");
21 * you may not use this file except in compliance with the License.
22 * You may obtain a copy of the License at
23 *
24 * http://www.apache.org/licenses/LICENSE-2.0
25 *
26 * Unless required by applicable law or agreed to in writing, software
27 * distributed under the License is distributed on an "AS IS" BASIS,
28 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
29 * See the License for the specific language governing permissions and
30 * limitations under the License.
31 * ======================================================================== */
32
33
34+function ($) { "use strict";
35
36  // COLLAPSE PUBLIC CLASS DEFINITION
37  // ================================
38
39  var Collapse = function (element, options) {
40    this.$element      = $(element)
41    this.options       = $.extend({}, Collapse.DEFAULTS, options)
42    this.transitioning = null
43
44    if (this.options.parent) this.$parent = $(this.options.parent)
45    if (this.options.toggle) this.toggle()
46  }
47
48  Collapse.DEFAULTS = {
49    toggle: true
50  }
51
52  Collapse.prototype.dimension = function () {
53    var hasWidth = this.$element.hasClass('width')
54    return hasWidth ? 'width' : 'height'
55  }
56
57  Collapse.prototype.show = function () {
58    if (this.transitioning || this.$element.hasClass('in')) return
59
60    var startEvent = $.Event('show.bs.collapse')
61    this.$element.trigger(startEvent)
62    if (startEvent.isDefaultPrevented()) return
63
64    var actives = this.$parent && this.$parent.find('> .panel > .in')
65
66    if (actives && actives.length) {
67      var hasData = actives.data('bs.collapse')
68      if (hasData && hasData.transitioning) return
69      actives.collapse('hide')
70      hasData || actives.data('bs.collapse', null)
71    }
72
73    var dimension = this.dimension()
74
75    this.$element
76      .removeClass('collapse')
77      .addClass('collapsing')
78      [dimension](0)
79
80    this.transitioning = 1
81
82    var complete = function () {
83      this.$element
84        .removeClass('collapsing')
85        .addClass('in')
86        [dimension]('auto')
87      this.transitioning = 0
88      this.$element.trigger('shown.bs.collapse')
89    }
90
91    if (!$.support.transition) return complete.call(this)
92
93    var scrollSize = $.camelCase(['scroll', dimension].join('-'))
94
95    this.$element
96      .one($.support.transition.end, $.proxy(complete, this))
97      .emulateTransitionEnd(350)
98      [dimension](this.$element[0][scrollSize])
99  }
100
101  Collapse.prototype.hide = function () {
102    if (this.transitioning || !this.$element.hasClass('in')) return
103
104    var startEvent = $.Event('hide.bs.collapse')
105    this.$element.trigger(startEvent)
106    if (startEvent.isDefaultPrevented()) return
107
108    var dimension = this.dimension()
109
110    this.$element
111      [dimension](this.$element[dimension]())
112      [0].offsetHeight
113
114    this.$element
115      .addClass('collapsing')
116      .removeClass('collapse')
117      .removeClass('in')
118
119    this.transitioning = 1
120
121    var complete = function () {
122      this.transitioning = 0
123      this.$element
124        .trigger('hidden.bs.collapse')
125        .removeClass('collapsing')
126        .addClass('collapse')
127    }
128
129    if (!$.support.transition) return complete.call(this)
130
131    this.$element
132      [dimension](0)
133      .one($.support.transition.end, $.proxy(complete, this))
134      .emulateTransitionEnd(350)
135  }
136
137  Collapse.prototype.toggle = function () {
138    this[this.$element.hasClass('in') ? 'hide' : 'show']()
139  }
140
141
142  // COLLAPSE PLUGIN DEFINITION
143  // ==========================
144
145  var old = $.fn.collapse
146
147  $.fn.collapse = function (option) {
148    return this.each(function () {
149      var $this   = $(this)
150      var data    = $this.data('bs.collapse')
151      var options = $.extend({}, Collapse.DEFAULTS, $this.data(), typeof option == 'object' && option)
152
153      if (!data) $this.data('bs.collapse', (data = new Collapse(this, options)))
154      if (typeof option == 'string') data[option]()
155    })
156  }
157
158  $.fn.collapse.Constructor = Collapse
159
160
161  // COLLAPSE NO CONFLICT
162  // ====================
163
164  $.fn.collapse.noConflict = function () {
165    $.fn.collapse = old
166    return this
167  }
168
169
170  // COLLAPSE DATA-API
171  // =================
172
173  $(document).on('click.bs.collapse.data-api', '[data-toggle=collapse]', function (e) {
174    var $this   = $(this), href
175    var target  = $this.attr('data-target')
176        || e.preventDefault()
177        || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '') //strip for ie7
178    var $target = $(target)
179    var data    = $target.data('bs.collapse')
180    var option  = data ? 'toggle' : $this.data()
181    var parent  = $this.attr('data-parent')
182    var $parent = parent && $(parent)
183
184    if (!data || !data.transitioning) {
185      if ($parent) $parent.find('[data-toggle=collapse][data-parent="' + parent + '"]').not($this).addClass('collapsed')
186      $this[$target.hasClass('in') ? 'addClass' : 'removeClass']('collapsed')
187    }
188
189    $target.collapse(option)
190  })
191
192}(jQuery);
193
194/* ========================================================================
195 * Bootstrap: transition.js v3.0.3
196 * http://getbootstrap.com/javascript/#transitions
197 * ========================================================================
198 * Copyright 2013 Twitter, Inc.
199 *
200 * Licensed under the Apache License, Version 2.0 (the "License");
201 * you may not use this file except in compliance with the License.
202 * You may obtain a copy of the License at
203 *
204 * http://www.apache.org/licenses/LICENSE-2.0
205 *
206 * Unless required by applicable law or agreed to in writing, software
207 * distributed under the License is distributed on an "AS IS" BASIS,
208 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
209 * See the License for the specific language governing permissions and
210 * limitations under the License.
211 * ======================================================================== */
212
213
214+function ($) { "use strict";
215
216  // CSS TRANSITION SUPPORT (Shoutout: http://www.modernizr.com/)
217  // ============================================================
218
219  function transitionEnd() {
220    var el = document.createElement('bootstrap')
221
222    var transEndEventNames = {
223      'WebkitTransition' : 'webkitTransitionEnd'
224    , 'MozTransition'    : 'transitionend'
225    , 'OTransition'      : 'oTransitionEnd otransitionend'
226    , 'transition'       : 'transitionend'
227    }
228
229    for (var name in transEndEventNames) {
230      if (el.style[name] !== undefined) {
231        return { end: transEndEventNames[name] }
232      }
233    }
234  }
235
236  // http://blog.alexmaccaw.com/css-transitions
237  $.fn.emulateTransitionEnd = function (duration) {
238    var called = false, $el = this
239    $(this).one($.support.transition.end, function () { called = true })
240    var callback = function () { if (!called) $($el).trigger($.support.transition.end) }
241    setTimeout(callback, duration)
242    return this
243  }
244
245  $(function () {
246    $.support.transition = transitionEnd()
247  })
248
249}(jQuery);
250
251/* ========================================================================
252 * Bootstrap: tab.js v3.0.3
253 * http://getbootstrap.com/javascript/#tabs
254 * ========================================================================
255 * Copyright 2013 Twitter, Inc.
256 *
257 * Licensed under the Apache License, Version 2.0 (the "License");
258 * you may not use this file except in compliance with the License.
259 * You may obtain a copy of the License at
260 *
261 * http://www.apache.org/licenses/LICENSE-2.0
262 *
263 * Unless required by applicable law or agreed to in writing, software
264 * distributed under the License is distributed on an "AS IS" BASIS,
265 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
266 * See the License for the specific language governing permissions and
267 * limitations under the License.
268 * ======================================================================== */
269
270
271+function ($) { "use strict";
272
273  // TAB CLASS DEFINITION
274  // ====================
275
276  var Tab = function (element) {
277    this.element = $(element)
278  }
279
280  Tab.prototype.show = function () {
281    var $this    = this.element
282    var $ul      = $this.closest('ul:not(.dropdown-menu)')
283    var selector = $this.data('target')
284
285    if (!selector) {
286      selector = $this.attr('href')
287      selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7
288    }
289
290    if ($this.parent('li').hasClass('active')) return
291
292    var previous = $ul.find('.active:last a')[0]
293    var e        = $.Event('show.bs.tab', {
294      relatedTarget: previous
295    })
296
297    $this.trigger(e)
298
299    if (e.isDefaultPrevented()) return
300
301    var $target = $(selector)
302
303    this.activate($this.parent('li'), $ul)
304    this.activate($target, $target.parent(), function () {
305      $this.trigger({
306        type: 'shown.bs.tab'
307      , relatedTarget: previous
308      })
309    })
310  }
311
312  Tab.prototype.activate = function (element, container, callback) {
313    var $active    = container.find('> .active')
314    var transition = callback
315      && $.support.transition
316      && $active.hasClass('fade')
317
318    function next() {
319      $active
320        .removeClass('active')
321        .find('> .dropdown-menu > .active')
322        .removeClass('active')
323
324      element.addClass('active')
325
326      if (transition) {
327        element[0].offsetWidth // reflow for transition
328        element.addClass('in')
329      } else {
330        element.removeClass('fade')
331      }
332
333      if (element.parent('.dropdown-menu')) {
334        element.closest('li.dropdown').addClass('active')
335      }
336
337      callback && callback()
338    }
339
340    transition ?
341      $active
342        .one($.support.transition.end, next)
343        .emulateTransitionEnd(150) :
344      next()
345
346    $active.removeClass('in')
347  }
348
349
350  // TAB PLUGIN DEFINITION
351  // =====================
352
353  var old = $.fn.tab
354
355  $.fn.tab = function ( option ) {
356    return this.each(function () {
357      var $this = $(this)
358      var data  = $this.data('bs.tab')
359
360      if (!data) $this.data('bs.tab', (data = new Tab(this)))
361      if (typeof option == 'string') data[option]()
362    })
363  }
364
365  $.fn.tab.Constructor = Tab
366
367
368  // TAB NO CONFLICT
369  // ===============
370
371  $.fn.tab.noConflict = function () {
372    $.fn.tab = old
373    return this
374  }
375
376
377  // TAB DATA-API
378  // ============
379
380  $(document).on('click.bs.tab.data-api', '[data-toggle="tab"], [data-toggle="pill"]', function (e) {
381    e.preventDefault()
382    $(this).tab('show')
383  })
384
385}(jQuery);
386
387/* ========================================================================
388 * Bootstrap: alert.js v3.0.3
389 * http://getbootstrap.com/javascript/#alerts
390 * ========================================================================
391 * Copyright 2013 Twitter, Inc.
392 *
393 * Licensed under the Apache License, Version 2.0 (the "License");
394 * you may not use this file except in compliance with the License.
395 * You may obtain a copy of the License at
396 *
397 * http://www.apache.org/licenses/LICENSE-2.0
398 *
399 * Unless required by applicable law or agreed to in writing, software
400 * distributed under the License is distributed on an "AS IS" BASIS,
401 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
402 * See the License for the specific language governing permissions and
403 * limitations under the License.
404 * ======================================================================== */
405
406
407+function ($) { "use strict";
408
409  // ALERT CLASS DEFINITION
410  // ======================
411
412  var dismiss = '[data-dismiss="alert"]'
413  var Alert   = function (el) {
414    $(el).on('click', dismiss, this.close)
415  }
416
417  Alert.prototype.close = function (e) {
418    var $this    = $(this)
419    var selector = $this.attr('data-target')
420
421    if (!selector) {
422      selector = $this.attr('href')
423      selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7
424    }
425
426    var $parent = $(selector)
427
428    if (e) e.preventDefault()
429
430    if (!$parent.length) {
431      $parent = $this.hasClass('alert') ? $this : $this.parent()
432    }
433
434    $parent.trigger(e = $.Event('close.bs.alert'))
435
436    if (e.isDefaultPrevented()) return
437
438    $parent.removeClass('in')
439
440    function removeElement() {
441      $parent.trigger('closed.bs.alert').remove()
442    }
443
444    $.support.transition && $parent.hasClass('fade') ?
445      $parent
446        .one($.support.transition.end, removeElement)
447        .emulateTransitionEnd(150) :
448      removeElement()
449  }
450
451
452  // ALERT PLUGIN DEFINITION
453  // =======================
454
455  var old = $.fn.alert
456
457  $.fn.alert = function (option) {
458    return this.each(function () {
459      var $this = $(this)
460      var data  = $this.data('bs.alert')
461
462      if (!data) $this.data('bs.alert', (data = new Alert(this)))
463      if (typeof option == 'string') data[option].call($this)
464    })
465  }
466
467  $.fn.alert.Constructor = Alert
468
469
470  // ALERT NO CONFLICT
471  // =================
472
473  $.fn.alert.noConflict = function () {
474    $.fn.alert = old
475    return this
476  }
477
478
479  // ALERT DATA-API
480  // ==============
481
482  $(document).on('click.bs.alert.data-api', dismiss, Alert.prototype.close)
483
484}(jQuery);
485
486//! moment.js
487//! version : 2.29.4
488//! authors : Tim Wood, Iskren Chernev, Moment.js contributors
489//! license : MIT
490//! momentjs.com
491
492;(function (global, factory) {
493    typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
494    typeof define === 'function' && define.amd ? define(factory) :
495    global.moment = factory()
496}(this, (function () { 'use strict';
497
498    var hookCallback;
499
500    function hooks() {
501        return hookCallback.apply(null, arguments);
502    }
503
504    // This is done to register the method called with moment()
505    // without creating circular dependencies.
506    function setHookCallback(callback) {
507        hookCallback = callback;
508    }
509
510    function isArray(input) {
511        return (
512            input instanceof Array ||
513            Object.prototype.toString.call(input) === '[object Array]'
514        );
515    }
516
517    function isObject(input) {
518        // IE8 will treat undefined and null as object if it wasn't for
519        // input != null
520        return (
521            input != null &&
522            Object.prototype.toString.call(input) === '[object Object]'
523        );
524    }
525
526    function hasOwnProp(a, b) {
527        return Object.prototype.hasOwnProperty.call(a, b);
528    }
529
530    function isObjectEmpty(obj) {
531        if (Object.getOwnPropertyNames) {
532            return Object.getOwnPropertyNames(obj).length === 0;
533        } else {
534            var k;
535            for (k in obj) {
536                if (hasOwnProp(obj, k)) {
537                    return false;
538                }
539            }
540            return true;
541        }
542    }
543
544    function isUndefined(input) {
545        return input === void 0;
546    }
547
548    function isNumber(input) {
549        return (
550            typeof input === 'number' ||
551            Object.prototype.toString.call(input) === '[object Number]'
552        );
553    }
554
555    function isDate(input) {
556        return (
557            input instanceof Date ||
558            Object.prototype.toString.call(input) === '[object Date]'
559        );
560    }
561
562    function map(arr, fn) {
563        var res = [],
564            i,
565            arrLen = arr.length;
566        for (i = 0; i < arrLen; ++i) {
567            res.push(fn(arr[i], i));
568        }
569        return res;
570    }
571
572    function extend(a, b) {
573        for (var i in b) {
574            if (hasOwnProp(b, i)) {
575                a[i] = b[i];
576            }
577        }
578
579        if (hasOwnProp(b, 'toString')) {
580            a.toString = b.toString;
581        }
582
583        if (hasOwnProp(b, 'valueOf')) {
584            a.valueOf = b.valueOf;
585        }
586
587        return a;
588    }
589
590    function createUTC(input, format, locale, strict) {
vendor: 67,673 bytes, lines 591-2775
591        return createLocalOrUTC(input, format, locale, strict, true).utc();
592    }
593
594    function defaultParsingFlags() {
595        // We need to deep clone this object.
596        return {
597            empty: false,
598            unusedTokens: [],
599            unusedInput: [],
600            overflow: -2,
601            charsLeftOver: 0,
602            nullInput: false,
603            invalidEra: null,
604            invalidMonth: null,
605            invalidFormat: false,
606            userInvalidated: false,
607            iso: false,
608            parsedDateParts: [],
609            era: null,
610            meridiem: null,
611            rfc2822: false,
612            weekdayMismatch: false,
613        };
614    }
615
616    function getParsingFlags(m) {
617        if (m._pf == null) {
618            m._pf = defaultParsingFlags();
619        }
620        return m._pf;
621    }
622
623    var some;
624    if (Array.prototype.some) {
625        some = Array.prototype.some;
626    } else {
627        some = function (fun) {
628            var t = Object(this),
629                len = t.length >>> 0,
630                i;
631
632            for (i = 0; i < len; i++) {
633                if (i in t && fun.call(this, t[i], i, t)) {
634                    return true;
635                }
636            }
637
638            return false;
639        };
640    }
641
642    function isValid(m) {
643        if (m._isValid == null) {
644            var flags = getParsingFlags(m),
645                parsedParts = some.call(flags.parsedDateParts, function (i) {
646                    return i != null;
647                }),
648                isNowValid =
649                    !isNaN(m._d.getTime()) &&
650                    flags.overflow < 0 &&
651                    !flags.empty &&
652                    !flags.invalidEra &&
653                    !flags.invalidMonth &&
654                    !flags.invalidWeekday &&
655                    !flags.weekdayMismatch &&
656                    !flags.nullInput &&
657                    !flags.invalidFormat &&
658                    !flags.userInvalidated &&
659                    (!flags.meridiem || (flags.meridiem && parsedParts));
660
661            if (m._strict) {
662                isNowValid =
663                    isNowValid &&
664                    flags.charsLeftOver === 0 &&
665                    flags.unusedTokens.length === 0 &&
666                    flags.bigHour === undefined;
667            }
668
669            if (Object.isFrozen == null || !Object.isFrozen(m)) {
670                m._isValid = isNowValid;
671            } else {
672                return isNowValid;
673            }
674        }
675        return m._isValid;
676    }
677
678    function createInvalid(flags) {
679        var m = createUTC(NaN);
680        if (flags != null) {
681            extend(getParsingFlags(m), flags);
682        } else {
683            getParsingFlags(m).userInvalidated = true;
684        }
685
686        return m;
687    }
688
689    // Plugins that add properties should also add the key here (null value),
690    // so we can properly clone ourselves.
691    var momentProperties = (hooks.momentProperties = []),
692        updateInProgress = false;
693
694    function copyConfig(to, from) {
695        var i,
696            prop,
697            val,
698            momentPropertiesLen = momentProperties.length;
699
700        if (!isUndefined(from._isAMomentObject)) {
701            to._isAMomentObject = from._isAMomentObject;
702        }
703        if (!isUndefined(from._i)) {
704            to._i = from._i;
705        }
706        if (!isUndefined(from._f)) {
707            to._f = from._f;
708        }
709        if (!isUndefined(from._l)) {
710            to._l = from._l;
711        }
712        if (!isUndefined(from._strict)) {
713            to._strict = from._strict;
714        }
715        if (!isUndefined(from._tzm)) {
716            to._tzm = from._tzm;
717        }
718        if (!isUndefined(from._isUTC)) {
719            to._isUTC = from._isUTC;
720        }
721        if (!isUndefined(from._offset)) {
722            to._offset = from._offset;
723        }
724        if (!isUndefined(from._pf)) {
725            to._pf = getParsingFlags(from);
726        }
727        if (!isUndefined(from._locale)) {
728            to._locale = from._locale;
729        }
730
731        if (momentPropertiesLen > 0) {
732            for (i = 0; i < momentPropertiesLen; i++) {
733                prop = momentProperties[i];
734                val = from[prop];
735                if (!isUndefined(val)) {
736                    to[prop] = val;
737                }
738            }
739        }
740
741        return to;
742    }
743
744    // Moment prototype object
745    function Moment(config) {
746        copyConfig(this, config);
747        this._d = new Date(config._d != null ? config._d.getTime() : NaN);
748        if (!this.isValid()) {
749            this._d = new Date(NaN);
750        }
751        // Prevent infinite loop in case updateOffset creates new moment
752        // objects.
753        if (updateInProgress === false) {
754            updateInProgress = true;
755            hooks.updateOffset(this);
756            updateInProgress = false;
757        }
758    }
759
760    function isMoment(obj) {
761        return (
762            obj instanceof Moment || (obj != null && obj._isAMomentObject != null)
763        );
764    }
765
766    function warn(msg) {
767        if (
768            hooks.suppressDeprecationWarnings === false &&
769            typeof console !== 'undefined' &&
770            console.warn
771        ) {
772            console.warn('Deprecation warning: ' + msg);
773        }
774    }
775
776    function deprecate(msg, fn) {
777        var firstTime = true;
778
779        return extend(function () {
780            if (hooks.deprecationHandler != null) {
781                hooks.deprecationHandler(null, msg);
782            }
783            if (firstTime) {
784                var args = [],
785                    arg,
786                    i,
787                    key,
788                    argLen = arguments.length;
789                for (i = 0; i < argLen; i++) {
790                    arg = '';
791                    if (typeof arguments[i] === 'object') {
792                        arg += '\n[' + i + '] ';
793                        for (key in arguments[0]) {
794                            if (hasOwnProp(arguments[0], key)) {
795                                arg += key + ': ' + arguments[0][key] + ', ';
796                            }
797                        }
798                        arg = arg.slice(0, -2); // Remove trailing comma and space
799                    } else {
800                        arg = arguments[i];
801                    }
802                    args.push(arg);
803                }
804                warn(
805                    msg +
806                        '\nArguments: ' +
807                        Array.prototype.slice.call(args).join('') +
808                        '\n' +
809                        new Error().stack
810                );
811                firstTime = false;
812            }
813            return fn.apply(this, arguments);
814        }, fn);
815    }
816
817    var deprecations = {};
818
819    function deprecateSimple(name, msg) {
820        if (hooks.deprecationHandler != null) {
821            hooks.deprecationHandler(name, msg);
822        }
823        if (!deprecations[name]) {
824            warn(msg);
825            deprecations[name] = true;
826        }
827    }
828
829    hooks.suppressDeprecationWarnings = false;
830    hooks.deprecationHandler = null;
831
832    function isFunction(input) {
833        return (
834            (typeof Function !== 'undefined' && input instanceof Function) ||
835            Object.prototype.toString.call(input) === '[object Function]'
836        );
837    }
838
839    function set(config) {
840        var prop, i;
841        for (i in config) {
842            if (hasOwnProp(config, i)) {
843                prop = config[i];
844                if (isFunction(prop)) {
845                    this[i] = prop;
846                } else {
847                    this['_' + i] = prop;
848                }
849            }
850        }
851        this._config = config;
852        // Lenient ordinal parsing accepts just a number in addition to
853        // number + (possibly) stuff coming from _dayOfMonthOrdinalParse.
854        // TODO: Remove "ordinalParse" fallback in next major release.
855        this._dayOfMonthOrdinalParseLenient = new RegExp(
856            (this._dayOfMonthOrdinalParse.source || this._ordinalParse.source) +
857                '|' +
858                /\d{1,2}/.source
859        );
860    }
861
862    function mergeConfigs(parentConfig, childConfig) {
863        var res = extend({}, parentConfig),
864            prop;
865        for (prop in childConfig) {
866            if (hasOwnProp(childConfig, prop)) {
867                if (isObject(parentConfig[prop]) && isObject(childConfig[prop])) {
868                    res[prop] = {};
869                    extend(res[prop], parentConfig[prop]);
870                    extend(res[prop], childConfig[prop]);
871                } else if (childConfig[prop] != null) {
872                    res[prop] = childConfig[prop];
873                } else {
874                    delete res[prop];
875                }
876            }
877        }
878        for (prop in parentConfig) {
879            if (
880                hasOwnProp(parentConfig, prop) &&
881                !hasOwnProp(childConfig, prop) &&
882                isObject(parentConfig[prop])
883            ) {
884                // make sure changes to properties don't modify parent config
885                res[prop] = extend({}, res[prop]);
886            }
887        }
888        return res;
889    }
890
891    function Locale(config) {
892        if (config != null) {
893            this.set(config);
894        }
895    }
896
897    var keys;
898
899    if (Object.keys) {
900        keys = Object.keys;
901    } else {
902        keys = function (obj) {
903            var i,
904                res = [];
905            for (i in obj) {
906                if (hasOwnProp(obj, i)) {
907                    res.push(i);
908                }
909            }
910            return res;
911        };
912    }
913
914    var defaultCalendar = {
915        sameDay: '[Today at] LT',
916        nextDay: '[Tomorrow at] LT',
917        nextWeek: 'dddd [at] LT',
918        lastDay: '[Yesterday at] LT',
919        lastWeek: '[Last] dddd [at] LT',
920        sameElse: 'L',
921    };
922
923    function calendar(key, mom, now) {
924        var output = this._calendar[key] || this._calendar['sameElse'];
925        return isFunction(output) ? output.call(mom, now) : output;
926    }
927
928    function zeroFill(number, targetLength, forceSign) {
929        var absNumber = '' + Math.abs(number),
930            zerosToFill = targetLength - absNumber.length,
931            sign = number >= 0;
932        return (
933            (sign ? (forceSign ? '+' : '') : '-') +
934            Math.pow(10, Math.max(0, zerosToFill)).toString().substr(1) +
935            absNumber
936        );
937    }
938
939    var formattingTokens =
940            /(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,
941        localFormattingTokens = /(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,
942        formatFunctions = {},
943        formatTokenFunctions = {};
944
945    // token:    'M'
946    // padded:   ['MM', 2]
947    // ordinal:  'Mo'
948    // callback: function () { this.month() + 1 }
949    function addFormatToken(token, padded, ordinal, callback) {
950        var func = callback;
951        if (typeof callback === 'string') {
952            func = function () {
953                return this[callback]();
954            };
955        }
956        if (token) {
957            formatTokenFunctions[token] = func;
958        }
959        if (padded) {
960            formatTokenFunctions[padded[0]] = function () {
961                return zeroFill(func.apply(this, arguments), padded[1], padded[2]);
962            };
963        }
964        if (ordinal) {
965            formatTokenFunctions[ordinal] = function () {
966                return this.localeData().ordinal(
967                    func.apply(this, arguments),
968                    token
969                );
970            };
971        }
972    }
973
974    function removeFormattingTokens(input) {
975        if (input.match(/\[[\s\S]/)) {
976            return input.replace(/^\[|\]$/g, '');
977        }
978        return input.replace(/\\/g, '');
979    }
980
981    function makeFormatFunction(format) {
982        var array = format.match(formattingTokens),
983            i,
984            length;
985
986        for (i = 0, length = array.length; i < length; i++) {
987            if (formatTokenFunctions[array[i]]) {
988                array[i] = formatTokenFunctions[array[i]];
989            } else {
990                array[i] = removeFormattingTokens(array[i]);
991            }
992        }
993
994        return function (mom) {
995            var output = '',
996                i;
997            for (i = 0; i < length; i++) {
998                output += isFunction(array[i])
999                    ? array[i].call(mom, format)
1000                    : array[i];
1001            }
1002            return output;
1003        };
1004    }
1005
1006    // format date using native date object
1007    function formatMoment(m, format) {
1008        if (!m.isValid()) {
1009            return m.localeData().invalidDate();
1010        }
1011
1012        format = expandFormat(format, m.localeData());
1013        formatFunctions[format] =
1014            formatFunctions[format] || makeFormatFunction(format);
1015
1016        return formatFunctions[format](m);
1017    }
1018
1019    function expandFormat(format, locale) {
1020        var i = 5;
1021
1022        function replaceLongDateFormatTokens(input) {
1023            return locale.longDateFormat(input) || input;
1024        }
1025
1026        localFormattingTokens.lastIndex = 0;
1027        while (i >= 0 && localFormattingTokens.test(format)) {
1028            format = format.replace(
1029                localFormattingTokens,
1030                replaceLongDateFormatTokens
1031            );
1032            localFormattingTokens.lastIndex = 0;
1033            i -= 1;
1034        }
1035
1036        return format;
1037    }
1038
1039    var defaultLongDateFormat = {
1040        LTS: 'h:mm:ss A',
1041        LT: 'h:mm A',
1042        L: 'MM/DD/YYYY',
1043        LL: 'MMMM D, YYYY',
1044        LLL: 'MMMM D, YYYY h:mm A',
1045        LLLL: 'dddd, MMMM D, YYYY h:mm A',
1046    };
1047
1048    function longDateFormat(key) {
1049        var format = this._longDateFormat[key],
1050            formatUpper = this._longDateFormat[key.toUpperCase()];
1051
1052        if (format || !formatUpper) {
1053            return format;
1054        }
1055
1056        this._longDateFormat[key] = formatUpper
1057            .match(formattingTokens)
1058            .map(function (tok) {
1059                if (
1060                    tok === 'MMMM' ||
1061                    tok === 'MM' ||
1062                    tok === 'DD' ||
1063                    tok === 'dddd'
1064                ) {
1065                    return tok.slice(1);
1066                }
1067                return tok;
1068            })
1069            .join('');
1070
1071        return this._longDateFormat[key];
1072    }
1073
1074    var defaultInvalidDate = 'Invalid date';
1075
1076    function invalidDate() {
1077        return this._invalidDate;
1078    }
1079
1080    var defaultOrdinal = '%d',
1081        defaultDayOfMonthOrdinalParse = /\d{1,2}/;
1082
1083    function ordinal(number) {
1084        return this._ordinal.replace('%d', number);
1085    }
1086
1087    var defaultRelativeTime = {
1088        future: 'in %s',
1089        past: '%s ago',
1090        s: 'a few seconds',
1091        ss: '%d seconds',
1092        m: 'a minute',
1093        mm: '%d minutes',
1094        h: 'an hour',
1095        hh: '%d hours',
1096        d: 'a day',
1097        dd: '%d days',
1098        w: 'a week',
1099        ww: '%d weeks',
1100        M: 'a month',
1101        MM: '%d months',
1102        y: 'a year',
1103        yy: '%d years',
1104    };
1105
1106    function relativeTime(number, withoutSuffix, string, isFuture) {
1107        var output = this._relativeTime[string];
1108        return isFunction(output)
1109            ? output(number, withoutSuffix, string, isFuture)
1110            : output.replace(/%d/i, number);
1111    }
1112
1113    function pastFuture(diff, output) {
1114        var format = this._relativeTime[diff > 0 ? 'future' : 'past'];
1115        return isFunction(format) ? format(output) : format.replace(/%s/i, output);
1116    }
1117
1118    var aliases = {};
1119
1120    function addUnitAlias(unit, shorthand) {
1121        var lowerCase = unit.toLowerCase();
1122        aliases[lowerCase] = aliases[lowerCase + 's'] = aliases[shorthand] = unit;
1123    }
1124
1125    function normalizeUnits(units) {
1126        return typeof units === 'string'
1127            ? aliases[units] || aliases[units.toLowerCase()]
1128            : undefined;
1129    }
1130
1131    function normalizeObjectUnits(inputObject) {
1132        var normalizedInput = {},
1133            normalizedProp,
1134            prop;
1135
1136        for (prop in inputObject) {
1137            if (hasOwnProp(inputObject, prop)) {
1138                normalizedProp = normalizeUnits(prop);
1139                if (normalizedProp) {
1140                    normalizedInput[normalizedProp] = inputObject[prop];
1141                }
1142            }
1143        }
1144
1145        return normalizedInput;
1146    }
1147
1148    var priorities = {};
1149
1150    function addUnitPriority(unit, priority) {
1151        priorities[unit] = priority;
1152    }
1153
1154    function getPrioritizedUnits(unitsObj) {
1155        var units = [],
1156            u;
1157        for (u in unitsObj) {
1158            if (hasOwnProp(unitsObj, u)) {
1159                units.push({ unit: u, priority: priorities[u] });
1160            }
1161        }
1162        units.sort(function (a, b) {
1163            return a.priority - b.priority;
1164        });
1165        return units;
1166    }
1167
1168    function isLeapYear(year) {
1169        return (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0;
1170    }
1171
1172    function absFloor(number) {
1173        if (number < 0) {
1174            // -0 -> 0
1175            return Math.ceil(number) || 0;
1176        } else {
1177            return Math.floor(number);
1178        }
1179    }
1180
1181    function toInt(argumentForCoercion) {
1182        var coercedNumber = +argumentForCoercion,
1183            value = 0;
1184
1185        if (coercedNumber !== 0 && isFinite(coercedNumber)) {
1186            value = absFloor(coercedNumber);
1187        }
1188
1189        return value;
1190    }
1191
1192    function makeGetSet(unit, keepTime) {
1193        return function (value) {
1194            if (value != null) {
1195                set$1(this, unit, value);
1196                hooks.updateOffset(this, keepTime);
1197                return this;
1198            } else {
1199                return get(this, unit);
1200            }
1201        };
1202    }
1203
1204    function get(mom, unit) {
1205        return mom.isValid()
1206            ? mom._d['get' + (mom._isUTC ? 'UTC' : '') + unit]()
1207            : NaN;
1208    }
1209
1210    function set$1(mom, unit, value) {
1211        if (mom.isValid() && !isNaN(value)) {
1212            if (
1213                unit === 'FullYear' &&
1214                isLeapYear(mom.year()) &&
1215                mom.month() === 1 &&
1216                mom.date() === 29
1217            ) {
1218                value = toInt(value);
1219                mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](
1220                    value,
1221                    mom.month(),
1222                    daysInMonth(value, mom.month())
1223                );
1224            } else {
1225                mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](value);
1226            }
1227        }
1228    }
1229
1230    // MOMENTS
1231
1232    function stringGet(units) {
1233        units = normalizeUnits(units);
1234        if (isFunction(this[units])) {
1235            return this[units]();
1236        }
1237        return this;
1238    }
1239
1240    function stringSet(units, value) {
1241        if (typeof units === 'object') {
1242            units = normalizeObjectUnits(units);
1243            var prioritized = getPrioritizedUnits(units),
1244                i,
1245                prioritizedLen = prioritized.length;
1246            for (i = 0; i < prioritizedLen; i++) {
1247                this[prioritized[i].unit](units[prioritized[i].unit]);
1248            }
1249        } else {
1250            units = normalizeUnits(units);
1251            if (isFunction(this[units])) {
1252                return this[units](value);
1253            }
1254        }
1255        return this;
1256    }
1257
1258    var match1 = /\d/, //       0 - 9
1259        match2 = /\d\d/, //      00 - 99
1260        match3 = /\d{3}/, //     000 - 999
1261        match4 = /\d{4}/, //    0000 - 9999
1262        match6 = /[+-]?\d{6}/, // -999999 - 999999
1263        match1to2 = /\d\d?/, //       0 - 99
1264        match3to4 = /\d\d\d\d?/, //     999 - 9999
1265        match5to6 = /\d\d\d\d\d\d?/, //   99999 - 999999
1266        match1to3 = /\d{1,3}/, //       0 - 999
1267        match1to4 = /\d{1,4}/, //       0 - 9999
1268        match1to6 = /[+-]?\d{1,6}/, // -999999 - 999999
1269        matchUnsigned = /\d+/, //       0 - inf
1270        matchSigned = /[+-]?\d+/, //    -inf - inf
1271        matchOffset = /Z|[+-]\d\d:?\d\d/gi, // +00:00 -00:00 +0000 -0000 or Z
1272        matchShortOffset = /Z|[+-]\d\d(?::?\d\d)?/gi, // +00 -00 +00:00 -00:00 +0000 -0000 or Z
1273        matchTimestamp = /[+-]?\d+(\.\d{1,3})?/, // 123456789 123456789.123
1274        // any word (or two) characters or numbers including two/three word month in arabic.
1275        // includes scottish gaelic two word and hyphenated months
1276        matchWord =
1277            /[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,
1278        regexes;
1279
1280    regexes = {};
1281
1282    function addRegexToken(token, regex, strictRegex) {
1283        regexes[token] = isFunction(regex)
1284            ? regex
1285            : function (isStrict, localeData) {
1286                  return isStrict && strictRegex ? strictRegex : regex;
1287              };
1288    }
1289
1290    function getParseRegexForToken(token, config) {
1291        if (!hasOwnProp(regexes, token)) {
1292            return new RegExp(unescapeFormat(token));
1293        }
1294
1295        return regexes[token](config._strict, config._locale);
1296    }
1297
1298    // Code from http://stackoverflow.com/questions/3561493/is-there-a-regexp-escape-function-in-javascript
1299    function unescapeFormat(s) {
1300        return regexEscape(
1301            s
1302                .replace('\\', '')
1303                .replace(
1304                    /\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,
1305                    function (matched, p1, p2, p3, p4) {
1306                        return p1 || p2 || p3 || p4;
1307                    }
1308                )
1309        );
1310    }
1311
1312    function regexEscape(s) {
1313        return s.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&');
1314    }
1315
1316    var tokens = {};
1317
1318    function addParseToken(token, callback) {
1319        var i,
1320            func = callback,
1321            tokenLen;
1322        if (typeof token === 'string') {
1323            token = [token];
1324        }
1325        if (isNumber(callback)) {
1326            func = function (input, array) {
1327                array[callback] = toInt(input);
1328            };
1329        }
1330        tokenLen = token.length;
1331        for (i = 0; i < tokenLen; i++) {
1332            tokens[token[i]] = func;
1333        }
1334    }
1335
1336    function addWeekParseToken(token, callback) {
1337        addParseToken(token, function (input, array, config, token) {
1338            config._w = config._w || {};
1339            callback(input, config._w, config, token);
1340        });
1341    }
1342
1343    function addTimeToArrayFromToken(token, input, config) {
1344        if (input != null && hasOwnProp(tokens, token)) {
1345            tokens[token](input, config._a, config, token);
1346        }
1347    }
1348
1349    var YEAR = 0,
1350        MONTH = 1,
1351        DATE = 2,
1352        HOUR = 3,
1353        MINUTE = 4,
1354        SECOND = 5,
1355        MILLISECOND = 6,
1356        WEEK = 7,
1357        WEEKDAY = 8;
1358
1359    function mod(n, x) {
1360        return ((n % x) + x) % x;
1361    }
1362
1363    var indexOf;
1364
1365    if (Array.prototype.indexOf) {
1366        indexOf = Array.prototype.indexOf;
1367    } else {
1368        indexOf = function (o) {
1369            // I know
1370            var i;
1371            for (i = 0; i < this.length; ++i) {
1372                if (this[i] === o) {
1373                    return i;
1374                }
1375            }
1376            return -1;
1377        };
1378    }
1379
1380    function daysInMonth(year, month) {
1381        if (isNaN(year) || isNaN(month)) {
1382            return NaN;
1383        }
1384        var modMonth = mod(month, 12);
1385        year += (month - modMonth) / 12;
1386        return modMonth === 1
1387            ? isLeapYear(year)
1388                ? 29
1389                : 28
1390            : 31 - ((modMonth % 7) % 2);
1391    }
1392
1393    // FORMATTING
1394
1395    addFormatToken('M', ['MM', 2], 'Mo', function () {
1396        return this.month() + 1;
1397    });
1398
1399    addFormatToken('MMM', 0, 0, function (format) {
1400        return this.localeData().monthsShort(this, format);
1401    });
1402
1403    addFormatToken('MMMM', 0, 0, function (format) {
1404        return this.localeData().months(this, format);
1405    });
1406
1407    // ALIASES
1408
1409    addUnitAlias('month', 'M');
1410
1411    // PRIORITY
1412
1413    addUnitPriority('month', 8);
1414
1415    // PARSING
1416
1417    addRegexToken('M', match1to2);
1418    addRegexToken('MM', match1to2, match2);
1419    addRegexToken('MMM', function (isStrict, locale) {
1420        return locale.monthsShortRegex(isStrict);
1421    });
1422    addRegexToken('MMMM', function (isStrict, locale) {
1423        return locale.monthsRegex(isStrict);
1424    });
1425
1426    addParseToken(['M', 'MM'], function (input, array) {
1427        array[MONTH] = toInt(input) - 1;
1428    });
1429
1430    addParseToken(['MMM', 'MMMM'], function (input, array, config, token) {
1431        var month = config._locale.monthsParse(input, token, config._strict);
1432        // if we didn't find a month name, mark the date as invalid.
1433        if (month != null) {
1434            array[MONTH] = month;
1435        } else {
1436            getParsingFlags(config).invalidMonth = input;
1437        }
1438    });
1439
1440    // LOCALES
1441
1442    var defaultLocaleMonths =
1443            'January_February_March_April_May_June_July_August_September_October_November_December'.split(
1444                '_'
1445            ),
1446        defaultLocaleMonthsShort =
1447            'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),
1448        MONTHS_IN_FORMAT = /D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,
1449        defaultMonthsShortRegex = matchWord,
1450        defaultMonthsRegex = matchWord;
1451
1452    function localeMonths(m, format) {
1453        if (!m) {
1454            return isArray(this._months)
1455                ? this._months
1456                : this._months['standalone'];
1457        }
1458        return isArray(this._months)
1459            ? this._months[m.month()]
1460            : this._months[
1461                  (this._months.isFormat || MONTHS_IN_FORMAT).test(format)
1462                      ? 'format'
1463                      : 'standalone'
1464              ][m.month()];
1465    }
1466
1467    function localeMonthsShort(m, format) {
1468        if (!m) {
1469            return isArray(this._monthsShort)
1470                ? this._monthsShort
1471                : this._monthsShort['standalone'];
1472        }
1473        return isArray(this._monthsShort)
1474            ? this._monthsShort[m.month()]
1475            : this._monthsShort[
1476                  MONTHS_IN_FORMAT.test(format) ? 'format' : 'standalone'
1477              ][m.month()];
1478    }
1479
1480    function handleStrictParse(monthName, format, strict) {
1481        var i,
1482            ii,
1483            mom,
1484            llc = monthName.toLocaleLowerCase();
1485        if (!this._monthsParse) {
1486            // this is not used
1487            this._monthsParse = [];
1488            this._longMonthsParse = [];
1489            this._shortMonthsParse = [];
1490            for (i = 0; i < 12; ++i) {
1491                mom = createUTC([2000, i]);
1492                this._shortMonthsParse[i] = this.monthsShort(
1493                    mom,
1494                    ''
1495                ).toLocaleLowerCase();
1496                this._longMonthsParse[i] = this.months(mom, '').toLocaleLowerCase();
1497            }
1498        }
1499
1500        if (strict) {
1501            if (format === 'MMM') {
1502                ii = indexOf.call(this._shortMonthsParse, llc);
1503                return ii !== -1 ? ii : null;
1504            } else {
1505                ii = indexOf.call(this._longMonthsParse, llc);
1506                return ii !== -1 ? ii : null;
1507            }
1508        } else {
1509            if (format === 'MMM') {
1510                ii = indexOf.call(this._shortMonthsParse, llc);
1511                if (ii !== -1) {
1512                    return ii;
1513                }
1514                ii = indexOf.call(this._longMonthsParse, llc);
1515                return ii !== -1 ? ii : null;
1516            } else {
1517                ii = indexOf.call(this._longMonthsParse, llc);
1518                if (ii !== -1) {
1519                    return ii;
1520                }
1521                ii = indexOf.call(this._shortMonthsParse, llc);
1522                return ii !== -1 ? ii : null;
1523            }
1524        }
1525    }
1526
1527    function localeMonthsParse(monthName, format, strict) {
1528        var i, mom, regex;
1529
1530        if (this._monthsParseExact) {
1531            return handleStrictParse.call(this, monthName, format, strict);
1532        }
1533
1534        if (!this._monthsParse) {
1535            this._monthsParse = [];
1536            this._longMonthsParse = [];
1537            this._shortMonthsParse = [];
1538        }
1539
1540        // TODO: add sorting
1541        // Sorting makes sure if one month (or abbr) is a prefix of another
1542        // see sorting in computeMonthsParse
1543        for (i = 0; i < 12; i++) {
1544            // make the regex if we don't have it already
1545            mom = createUTC([2000, i]);
1546            if (strict && !this._longMonthsParse[i]) {
1547                this._longMonthsParse[i] = new RegExp(
1548                    '^' + this.months(mom, '').replace('.', '') + '$',
1549                    'i'
1550                );
1551                this._shortMonthsParse[i] = new RegExp(
1552                    '^' + this.monthsShort(mom, '').replace('.', '') + '$',
1553                    'i'
1554                );
1555            }
1556            if (!strict && !this._monthsParse[i]) {
1557                regex =
1558                    '^' + this.months(mom, '') + '|^' + this.monthsShort(mom, '');
1559                this._monthsParse[i] = new RegExp(regex.replace('.', ''), 'i');
1560            }
1561            // test the regex
1562            if (
1563                strict &&
1564                format === 'MMMM' &&
1565                this._longMonthsParse[i].test(monthName)
1566            ) {
1567                return i;
1568            } else if (
1569                strict &&
1570                format === 'MMM' &&
1571                this._shortMonthsParse[i].test(monthName)
1572            ) {
1573                return i;
1574            } else if (!strict && this._monthsParse[i].test(monthName)) {
1575                return i;
1576            }
1577        }
1578    }
1579
1580    // MOMENTS
1581
1582    function setMonth(mom, value) {
1583        var dayOfMonth;
1584
1585        if (!mom.isValid()) {
1586            // No op
1587            return mom;
1588        }
1589
1590        if (typeof value === 'string') {
1591            if (/^\d+$/.test(value)) {
1592                value = toInt(value);
1593            } else {
1594                value = mom.localeData().monthsParse(value);
1595                // TODO: Another silent failure?
1596                if (!isNumber(value)) {
1597                    return mom;
1598                }
1599            }
1600        }
1601
1602        dayOfMonth = Math.min(mom.date(), daysInMonth(mom.year(), value));
1603        mom._d['set' + (mom._isUTC ? 'UTC' : '') + 'Month'](value, dayOfMonth);
1604        return mom;
1605    }
1606
1607    function getSetMonth(value) {
1608        if (value != null) {
1609            setMonth(this, value);
1610            hooks.updateOffset(this, true);
1611            return this;
1612        } else {
1613            return get(this, 'Month');
1614        }
1615    }
1616
1617    function getDaysInMonth() {
1618        return daysInMonth(this.year(), this.month());
1619    }
1620
1621    function monthsShortRegex(isStrict) {
1622        if (this._monthsParseExact) {
1623            if (!hasOwnProp(this, '_monthsRegex')) {
1624                computeMonthsParse.call(this);
1625            }
1626            if (isStrict) {
1627                return this._monthsShortStrictRegex;
1628            } else {
1629                return this._monthsShortRegex;
1630            }
1631        } else {
1632            if (!hasOwnProp(this, '_monthsShortRegex')) {
1633                this._monthsShortRegex = defaultMonthsShortRegex;
1634            }
1635            return this._monthsShortStrictRegex && isStrict
1636                ? this._monthsShortStrictRegex
1637                : this._monthsShortRegex;
1638        }
1639    }
1640
1641    function monthsRegex(isStrict) {
1642        if (this._monthsParseExact) {
1643            if (!hasOwnProp(this, '_monthsRegex')) {
1644                computeMonthsParse.call(this);
1645            }
1646            if (isStrict) {
1647                return this._monthsStrictRegex;
1648            } else {
1649                return this._monthsRegex;
1650            }
1651        } else {
1652            if (!hasOwnProp(this, '_monthsRegex')) {
1653                this._monthsRegex = defaultMonthsRegex;
1654            }
1655            return this._monthsStrictRegex && isStrict
1656                ? this._monthsStrictRegex
1657                : this._monthsRegex;
1658        }
1659    }
1660
1661    function computeMonthsParse() {
1662        function cmpLenRev(a, b) {
1663            return b.length - a.length;
1664        }
1665
1666        var shortPieces = [],
1667            longPieces = [],
1668            mixedPieces = [],
1669            i,
1670            mom;
1671        for (i = 0; i < 12; i++) {
1672            // make the regex if we don't have it already
1673            mom = createUTC([2000, i]);
1674            shortPieces.push(this.monthsShort(mom, ''));
1675            longPieces.push(this.months(mom, ''));
1676            mixedPieces.push(this.months(mom, ''));
1677            mixedPieces.push(this.monthsShort(mom, ''));
1678        }
1679        // Sorting makes sure if one month (or abbr) is a prefix of another it
1680        // will match the longer piece.
1681        shortPieces.sort(cmpLenRev);
1682        longPieces.sort(cmpLenRev);
1683        mixedPieces.sort(cmpLenRev);
1684        for (i = 0; i < 12; i++) {
1685            shortPieces[i] = regexEscape(shortPieces[i]);
1686            longPieces[i] = regexEscape(longPieces[i]);
1687        }
1688        for (i = 0; i < 24; i++) {
1689            mixedPieces[i] = regexEscape(mixedPieces[i]);
1690        }
1691
1692        this._monthsRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');
1693        this._monthsShortRegex = this._monthsRegex;
1694        this._monthsStrictRegex = new RegExp(
1695            '^(' + longPieces.join('|') + ')',
1696            'i'
1697        );
1698        this._monthsShortStrictRegex = new RegExp(
1699            '^(' + shortPieces.join('|') + ')',
1700            'i'
1701        );
1702    }
1703
1704    // FORMATTING
1705
1706    addFormatToken('Y', 0, 0, function () {
1707        var y = this.year();
1708        return y <= 9999 ? zeroFill(y, 4) : '+' + y;
1709    });
1710
1711    addFormatToken(0, ['YY', 2], 0, function () {
1712        return this.year() % 100;
1713    });
1714
1715    addFormatToken(0, ['YYYY', 4], 0, 'year');
1716    addFormatToken(0, ['YYYYY', 5], 0, 'year');
1717    addFormatToken(0, ['YYYYYY', 6, true], 0, 'year');
1718
1719    // ALIASES
1720
1721    addUnitAlias('year', 'y');
1722
1723    // PRIORITIES
1724
1725    addUnitPriority('year', 1);
1726
1727    // PARSING
1728
1729    addRegexToken('Y', matchSigned);
1730    addRegexToken('YY', match1to2, match2);
1731    addRegexToken('YYYY', match1to4, match4);
1732    addRegexToken('YYYYY', match1to6, match6);
1733    addRegexToken('YYYYYY', match1to6, match6);
1734
1735    addParseToken(['YYYYY', 'YYYYYY'], YEAR);
1736    addParseToken('YYYY', function (input, array) {
1737        array[YEAR] =
1738            input.length === 2 ? hooks.parseTwoDigitYear(input) : toInt(input);
1739    });
1740    addParseToken('YY', function (input, array) {
1741        array[YEAR] = hooks.parseTwoDigitYear(input);
1742    });
1743    addParseToken('Y', function (input, array) {
1744        array[YEAR] = parseInt(input, 10);
1745    });
1746
1747    // HELPERS
1748
1749    function daysInYear(year) {
1750        return isLeapYear(year) ? 366 : 365;
1751    }
1752
1753    // HOOKS
1754
1755    hooks.parseTwoDigitYear = function (input) {
1756        return toInt(input) + (toInt(input) > 68 ? 1900 : 2000);
1757    };
1758
1759    // MOMENTS
1760
1761    var getSetYear = makeGetSet('FullYear', true);
1762
1763    function getIsLeapYear() {
1764        return isLeapYear(this.year());
1765    }
1766
1767    function createDate(y, m, d, h, M, s, ms) {
1768        // can't just apply() to create a date:
1769        // https://stackoverflow.com/q/181348
1770        var date;
1771        // the date constructor remaps years 0-99 to 1900-1999
1772        if (y < 100 && y >= 0) {
1773            // preserve leap years using a full 400 year cycle, then reset
1774            date = new Date(y + 400, m, d, h, M, s, ms);
1775            if (isFinite(date.getFullYear())) {
1776                date.setFullYear(y);
1777            }
1778        } else {
1779            date = new Date(y, m, d, h, M, s, ms);
1780        }
1781
1782        return date;
1783    }
1784
1785    function createUTCDate(y) {
1786        var date, args;
1787        // the Date.UTC function remaps years 0-99 to 1900-1999
1788        if (y < 100 && y >= 0) {
1789            args = Array.prototype.slice.call(arguments);
1790            // preserve leap years using a full 400 year cycle, then reset
1791            args[0] = y + 400;
1792            date = new Date(Date.UTC.apply(null, args));
1793            if (isFinite(date.getUTCFullYear())) {
1794                date.setUTCFullYear(y);
1795            }
1796        } else {
1797            date = new Date(Date.UTC.apply(null, arguments));
1798        }
1799
1800        return date;
1801    }
1802
1803    // start-of-first-week - start-of-year
1804    function firstWeekOffset(year, dow, doy) {
1805        var // first-week day -- which january is always in the first week (4 for iso, 1 for other)
1806            fwd = 7 + dow - doy,
1807            // first-week day local weekday -- which local weekday is fwd
1808            fwdlw = (7 + createUTCDate(year, 0, fwd).getUTCDay() - dow) % 7;
1809
1810        return -fwdlw + fwd - 1;
1811    }
1812
1813    // https://en.wikipedia.org/wiki/ISO_week_date#Calculating_a_date_given_the_year.2C_week_number_and_weekday
1814    function dayOfYearFromWeeks(year, week, weekday, dow, doy) {
1815        var localWeekday = (7 + weekday - dow) % 7,
1816            weekOffset = firstWeekOffset(year, dow, doy),
1817            dayOfYear = 1 + 7 * (week - 1) + localWeekday + weekOffset,
1818            resYear,
1819            resDayOfYear;
1820
1821        if (dayOfYear <= 0) {
1822            resYear = year - 1;
1823            resDayOfYear = daysInYear(resYear) + dayOfYear;
1824        } else if (dayOfYear > daysInYear(year)) {
1825            resYear = year + 1;
1826            resDayOfYear = dayOfYear - daysInYear(year);
1827        } else {
1828            resYear = year;
1829            resDayOfYear = dayOfYear;
1830        }
1831
1832        return {
1833            year: resYear,
1834            dayOfYear: resDayOfYear,
1835        };
1836    }
1837
1838    function weekOfYear(mom, dow, doy) {
1839        var weekOffset = firstWeekOffset(mom.year(), dow, doy),
1840            week = Math.floor((mom.dayOfYear() - weekOffset - 1) / 7) + 1,
1841            resWeek,
1842            resYear;
1843
1844        if (week < 1) {
1845            resYear = mom.year() - 1;
1846            resWeek = week + weeksInYear(resYear, dow, doy);
1847        } else if (week > weeksInYear(mom.year(), dow, doy)) {
1848            resWeek = week - weeksInYear(mom.year(), dow, doy);
1849            resYear = mom.year() + 1;
1850        } else {
1851            resYear = mom.year();
1852            resWeek = week;
1853        }
1854
1855        return {
1856            week: resWeek,
1857            year: resYear,
1858        };
1859    }
1860
1861    function weeksInYear(year, dow, doy) {
1862        var weekOffset = firstWeekOffset(year, dow, doy),
1863            weekOffsetNext = firstWeekOffset(year + 1, dow, doy);
1864        return (daysInYear(year) - weekOffset + weekOffsetNext) / 7;
1865    }
1866
1867    // FORMATTING
1868
1869    addFormatToken('w', ['ww', 2], 'wo', 'week');
1870    addFormatToken('W', ['WW', 2], 'Wo', 'isoWeek');
1871
1872    // ALIASES
1873
1874    addUnitAlias('week', 'w');
1875    addUnitAlias('isoWeek', 'W');
1876
1877    // PRIORITIES
1878
1879    addUnitPriority('week', 5);
1880    addUnitPriority('isoWeek', 5);
1881
1882    // PARSING
1883
1884    addRegexToken('w', match1to2);
1885    addRegexToken('ww', match1to2, match2);
1886    addRegexToken('W', match1to2);
1887    addRegexToken('WW', match1to2, match2);
1888
1889    addWeekParseToken(
1890        ['w', 'ww', 'W', 'WW'],
1891        function (input, week, config, token) {
1892            week[token.substr(0, 1)] = toInt(input);
1893        }
1894    );
1895
1896    // HELPERS
1897
1898    // LOCALES
1899
1900    function localeWeek(mom) {
1901        return weekOfYear(mom, this._week.dow, this._week.doy).week;
1902    }
1903
1904    var defaultLocaleWeek = {
1905        dow: 0, // Sunday is the first day of the week.
1906        doy: 6, // The week that contains Jan 6th is the first week of the year.
1907    };
1908
1909    function localeFirstDayOfWeek() {
1910        return this._week.dow;
1911    }
1912
1913    function localeFirstDayOfYear() {
1914        return this._week.doy;
1915    }
1916
1917    // MOMENTS
1918
1919    function getSetWeek(input) {
1920        var week = this.localeData().week(this);
1921        return input == null ? week : this.add((input - week) * 7, 'd');
1922    }
1923
1924    function getSetISOWeek(input) {
1925        var week = weekOfYear(this, 1, 4).week;
1926        return input == null ? week : this.add((input - week) * 7, 'd');
1927    }
1928
1929    // FORMATTING
1930
1931    addFormatToken('d', 0, 'do', 'day');
1932
1933    addFormatToken('dd', 0, 0, function (format) {
1934        return this.localeData().weekdaysMin(this, format);
1935    });
1936
1937    addFormatToken('ddd', 0, 0, function (format) {
1938        return this.localeData().weekdaysShort(this, format);
1939    });
1940
1941    addFormatToken('dddd', 0, 0, function (format) {
1942        return this.localeData().weekdays(this, format);
1943    });
1944
1945    addFormatToken('e', 0, 0, 'weekday');
1946    addFormatToken('E', 0, 0, 'isoWeekday');
1947
1948    // ALIASES
1949
1950    addUnitAlias('day', 'd');
1951    addUnitAlias('weekday', 'e');
1952    addUnitAlias('isoWeekday', 'E');
1953
1954    // PRIORITY
1955    addUnitPriority('day', 11);
1956    addUnitPriority('weekday', 11);
1957    addUnitPriority('isoWeekday', 11);
1958
1959    // PARSING
1960
1961    addRegexToken('d', match1to2);
1962    addRegexToken('e', match1to2);
1963    addRegexToken('E', match1to2);
1964    addRegexToken('dd', function (isStrict, locale) {
1965        return locale.weekdaysMinRegex(isStrict);
1966    });
1967    addRegexToken('ddd', function (isStrict, locale) {
1968        return locale.weekdaysShortRegex(isStrict);
1969    });
1970    addRegexToken('dddd', function (isStrict, locale) {
1971        return locale.weekdaysRegex(isStrict);
1972    });
1973
1974    addWeekParseToken(['dd', 'ddd', 'dddd'], function (input, week, config, token) {
1975        var weekday = config._locale.weekdaysParse(input, token, config._strict);
1976        // if we didn't get a weekday name, mark the date as invalid
1977        if (weekday != null) {
1978            week.d = weekday;
1979        } else {
1980            getParsingFlags(config).invalidWeekday = input;
1981        }
1982    });
1983
1984    addWeekParseToken(['d', 'e', 'E'], function (input, week, config, token) {
1985        week[token] = toInt(input);
1986    });
1987
1988    // HELPERS
1989
1990    function parseWeekday(input, locale) {
1991        if (typeof input !== 'string') {
1992            return input;
1993        }
1994
1995        if (!isNaN(input)) {
1996            return parseInt(input, 10);
1997        }
1998
1999        input = locale.weekdaysParse(input);
2000        if (typeof input === 'number') {
2001            return input;
2002        }
2003
2004        return null;
2005    }
2006
2007    function parseIsoWeekday(input, locale) {
2008        if (typeof input === 'string') {
2009            return locale.weekdaysParse(input) % 7 || 7;
2010        }
2011        return isNaN(input) ? null : input;
2012    }
2013
2014    // LOCALES
2015    function shiftWeekdays(ws, n) {
2016        return ws.slice(n, 7).concat(ws.slice(0, n));
2017    }
2018
2019    var defaultLocaleWeekdays =
2020            'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'),
2021        defaultLocaleWeekdaysShort = 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),
2022        defaultLocaleWeekdaysMin = 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),
2023        defaultWeekdaysRegex = matchWord,
2024        defaultWeekdaysShortRegex = matchWord,
2025        defaultWeekdaysMinRegex = matchWord;
2026
2027    function localeWeekdays(m, format) {
2028        var weekdays = isArray(this._weekdays)
2029            ? this._weekdays
2030            : this._weekdays[
2031                  m && m !== true && this._weekdays.isFormat.test(format)
2032                      ? 'format'
2033                      : 'standalone'
2034              ];
2035        return m === true
2036            ? shiftWeekdays(weekdays, this._week.dow)
2037            : m
2038            ? weekdays[m.day()]
2039            : weekdays;
2040    }
2041
2042    function localeWeekdaysShort(m) {
2043        return m === true
2044            ? shiftWeekdays(this._weekdaysShort, this._week.dow)
2045            : m
2046            ? this._weekdaysShort[m.day()]
2047            : this._weekdaysShort;
2048    }
2049
2050    function localeWeekdaysMin(m) {
2051        return m === true
2052            ? shiftWeekdays(this._weekdaysMin, this._week.dow)
2053            : m
2054            ? this._weekdaysMin[m.day()]
2055            : this._weekdaysMin;
2056    }
2057
2058    function handleStrictParse$1(weekdayName, format, strict) {
2059        var i,
2060            ii,
2061            mom,
2062            llc = weekdayName.toLocaleLowerCase();
2063        if (!this._weekdaysParse) {
2064            this._weekdaysParse = [];
2065            this._shortWeekdaysParse = [];
2066            this._minWeekdaysParse = [];
2067
2068            for (i = 0; i < 7; ++i) {
2069                mom = createUTC([2000, 1]).day(i);
2070                this._minWeekdaysParse[i] = this.weekdaysMin(
2071                    mom,
2072                    ''
2073                ).toLocaleLowerCase();
2074                this._shortWeekdaysParse[i] = this.weekdaysShort(
2075                    mom,
2076                    ''
2077                ).toLocaleLowerCase();
2078                this._weekdaysParse[i] = this.weekdays(mom, '').toLocaleLowerCase();
2079            }
2080        }
2081
2082        if (strict) {
2083            if (format === 'dddd') {
2084                ii = indexOf.call(this._weekdaysParse, llc);
2085                return ii !== -1 ? ii : null;
2086            } else if (format === 'ddd') {
2087                ii = indexOf.call(this._shortWeekdaysParse, llc);
2088                return ii !== -1 ? ii : null;
2089            } else {
2090                ii = indexOf.call(this._minWeekdaysParse, llc);
2091                return ii !== -1 ? ii : null;
2092            }
2093        } else {
2094            if (format === 'dddd') {
2095                ii = indexOf.call(this._weekdaysParse, llc);
2096                if (ii !== -1) {
2097                    return ii;
2098                }
2099                ii = indexOf.call(this._shortWeekdaysParse, llc);
2100                if (ii !== -1) {
2101                    return ii;
2102                }
2103                ii = indexOf.call(this._minWeekdaysParse, llc);
2104                return ii !== -1 ? ii : null;
2105            } else if (format === 'ddd') {
2106                ii = indexOf.call(this._shortWeekdaysParse, llc);
2107                if (ii !== -1) {
2108                    return ii;
2109                }
2110                ii = indexOf.call(this._weekdaysParse, llc);
2111                if (ii !== -1) {
2112                    return ii;
2113                }
2114                ii = indexOf.call(this._minWeekdaysParse, llc);
2115                return ii !== -1 ? ii : null;
2116            } else {
2117                ii = indexOf.call(this._minWeekdaysParse, llc);
2118                if (ii !== -1) {
2119                    return ii;
2120                }
2121                ii = indexOf.call(this._weekdaysParse, llc);
2122                if (ii !== -1) {
2123                    return ii;
2124                }
2125                ii = indexOf.call(this._shortWeekdaysParse, llc);
2126                return ii !== -1 ? ii : null;
2127            }
2128        }
2129    }
2130
2131    function localeWeekdaysParse(weekdayName, format, strict) {
2132        var i, mom, regex;
2133
2134        if (this._weekdaysParseExact) {
2135            return handleStrictParse$1.call(this, weekdayName, format, strict);
2136        }
2137
2138        if (!this._weekdaysParse) {
2139            this._weekdaysParse = [];
2140            this._minWeekdaysParse = [];
2141            this._shortWeekdaysParse = [];
2142            this._fullWeekdaysParse = [];
2143        }
2144
2145        for (i = 0; i < 7; i++) {
2146            // make the regex if we don't have it already
2147
2148            mom = createUTC([2000, 1]).day(i);
2149            if (strict && !this._fullWeekdaysParse[i]) {
2150                this._fullWeekdaysParse[i] = new RegExp(
2151                    '^' + this.weekdays(mom, '').replace('.', '\\.?') + '$',
2152                    'i'
2153                );
2154                this._shortWeekdaysParse[i] = new RegExp(
2155                    '^' + this.weekdaysShort(mom, '').replace('.', '\\.?') + '$',
2156                    'i'
2157                );
2158                this._minWeekdaysParse[i] = new RegExp(
2159                    '^' + this.weekdaysMin(mom, '').replace('.', '\\.?') + '$',
2160                    'i'
2161                );
2162            }
2163            if (!this._weekdaysParse[i]) {
2164                regex =
2165                    '^' +
2166                    this.weekdays(mom, '') +
2167                    '|^' +
2168                    this.weekdaysShort(mom, '') +
2169                    '|^' +
2170                    this.weekdaysMin(mom, '');
2171                this._weekdaysParse[i] = new RegExp(regex.replace('.', ''), 'i');
2172            }
2173            // test the regex
2174            if (
2175                strict &&
2176                format === 'dddd' &&
2177                this._fullWeekdaysParse[i].test(weekdayName)
2178            ) {
2179                return i;
2180            } else if (
2181                strict &&
2182                format === 'ddd' &&
2183                this._shortWeekdaysParse[i].test(weekdayName)
2184            ) {
2185                return i;
2186            } else if (
2187                strict &&
2188                format === 'dd' &&
2189                this._minWeekdaysParse[i].test(weekdayName)
2190            ) {
2191                return i;
2192            } else if (!strict && this._weekdaysParse[i].test(weekdayName)) {
2193                return i;
2194            }
2195        }
2196    }
2197
2198    // MOMENTS
2199
2200    function getSetDayOfWeek(input) {
2201        if (!this.isValid()) {
2202            return input != null ? this : NaN;
2203        }
2204        var day = this._isUTC ? this._d.getUTCDay() : this._d.getDay();
2205        if (input != null) {
2206            input = parseWeekday(input, this.localeData());
2207            return this.add(input - day, 'd');
2208        } else {
2209            return day;
2210        }
2211    }
2212
2213    function getSetLocaleDayOfWeek(input) {
2214        if (!this.isValid()) {
2215            return input != null ? this : NaN;
2216        }
2217        var weekday = (this.day() + 7 - this.localeData()._week.dow) % 7;
2218        return input == null ? weekday : this.add(input - weekday, 'd');
2219    }
2220
2221    function getSetISODayOfWeek(input) {
2222        if (!this.isValid()) {
2223            return input != null ? this : NaN;
2224        }
2225
2226        // behaves the same as moment#day except
2227        // as a getter, returns 7 instead of 0 (1-7 range instead of 0-6)
2228        // as a setter, sunday should belong to the previous week.
2229
2230        if (input != null) {
2231            var weekday = parseIsoWeekday(input, this.localeData());
2232            return this.day(this.day() % 7 ? weekday : weekday - 7);
2233        } else {
2234            return this.day() || 7;
2235        }
2236    }
2237
2238    function weekdaysRegex(isStrict) {
2239        if (this._weekdaysParseExact) {
2240            if (!hasOwnProp(this, '_weekdaysRegex')) {
2241                computeWeekdaysParse.call(this);
2242            }
2243            if (isStrict) {
2244                return this._weekdaysStrictRegex;
2245            } else {
2246                return this._weekdaysRegex;
2247            }
2248        } else {
2249            if (!hasOwnProp(this, '_weekdaysRegex')) {
2250                this._weekdaysRegex = defaultWeekdaysRegex;
2251            }
2252            return this._weekdaysStrictRegex && isStrict
2253                ? this._weekdaysStrictRegex
2254                : this._weekdaysRegex;
2255        }
2256    }
2257
2258    function weekdaysShortRegex(isStrict) {
2259        if (this._weekdaysParseExact) {
2260            if (!hasOwnProp(this, '_weekdaysRegex')) {
2261                computeWeekdaysParse.call(this);
2262            }
2263            if (isStrict) {
2264                return this._weekdaysShortStrictRegex;
2265            } else {
2266                return this._weekdaysShortRegex;
2267            }
2268        } else {
2269            if (!hasOwnProp(this, '_weekdaysShortRegex')) {
2270                this._weekdaysShortRegex = defaultWeekdaysShortRegex;
2271            }
2272            return this._weekdaysShortStrictRegex && isStrict
2273                ? this._weekdaysShortStrictRegex
2274                : this._weekdaysShortRegex;
2275        }
2276    }
2277
2278    function weekdaysMinRegex(isStrict) {
2279        if (this._weekdaysParseExact) {
2280            if (!hasOwnProp(this, '_weekdaysRegex')) {
2281                computeWeekdaysParse.call(this);
2282            }
2283            if (isStrict) {
2284                return this._weekdaysMinStrictRegex;
2285            } else {
2286                return this._weekdaysMinRegex;
2287            }
2288        } else {
2289            if (!hasOwnProp(this, '_weekdaysMinRegex')) {
2290                this._weekdaysMinRegex = defaultWeekdaysMinRegex;
2291            }
2292            return this._weekdaysMinStrictRegex && isStrict
2293                ? this._weekdaysMinStrictRegex
2294                : this._weekdaysMinRegex;
2295        }
2296    }
2297
2298    function computeWeekdaysParse() {
2299        function cmpLenRev(a, b) {
2300            return b.length - a.length;
2301        }
2302
2303        var minPieces = [],
2304            shortPieces = [],
2305            longPieces = [],
2306            mixedPieces = [],
2307            i,
2308            mom,
2309            minp,
2310            shortp,
2311            longp;
2312        for (i = 0; i < 7; i++) {
2313            // make the regex if we don't have it already
2314            mom = createUTC([2000, 1]).day(i);
2315            minp = regexEscape(this.weekdaysMin(mom, ''));
2316            shortp = regexEscape(this.weekdaysShort(mom, ''));
2317            longp = regexEscape(this.weekdays(mom, ''));
2318            minPieces.push(minp);
2319            shortPieces.push(shortp);
2320            longPieces.push(longp);
2321            mixedPieces.push(minp);
2322            mixedPieces.push(shortp);
2323            mixedPieces.push(longp);
2324        }
2325        // Sorting makes sure if one weekday (or abbr) is a prefix of another it
2326        // will match the longer piece.
2327        minPieces.sort(cmpLenRev);
2328        shortPieces.sort(cmpLenRev);
2329        longPieces.sort(cmpLenRev);
2330        mixedPieces.sort(cmpLenRev);
2331
2332        this._weekdaysRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');
2333        this._weekdaysShortRegex = this._weekdaysRegex;
2334        this._weekdaysMinRegex = this._weekdaysRegex;
2335
2336        this._weekdaysStrictRegex = new RegExp(
2337            '^(' + longPieces.join('|') + ')',
2338            'i'
2339        );
2340        this._weekdaysShortStrictRegex = new RegExp(
2341            '^(' + shortPieces.join('|') + ')',
2342            'i'
2343        );
2344        this._weekdaysMinStrictRegex = new RegExp(
2345            '^(' + minPieces.join('|') + ')',
2346            'i'
2347        );
2348    }
2349
2350    // FORMATTING
2351
2352    function hFormat() {
2353        return this.hours() % 12 || 12;
2354    }
2355
2356    function kFormat() {
2357        return this.hours() || 24;
2358    }
2359
2360    addFormatToken('H', ['HH', 2], 0, 'hour');
2361    addFormatToken('h', ['hh', 2], 0, hFormat);
2362    addFormatToken('k', ['kk', 2], 0, kFormat);
2363
2364    addFormatToken('hmm', 0, 0, function () {
2365        return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2);
2366    });
2367
2368    addFormatToken('hmmss', 0, 0, function () {
2369        return (
2370            '' +
2371            hFormat.apply(this) +
2372            zeroFill(this.minutes(), 2) +
2373            zeroFill(this.seconds(), 2)
2374        );
2375    });
2376
2377    addFormatToken('Hmm', 0, 0, function () {
2378        return '' + this.hours() + zeroFill(this.minutes(), 2);
2379    });
2380
2381    addFormatToken('Hmmss', 0, 0, function () {
2382        return (
2383            '' +
2384            this.hours() +
2385            zeroFill(this.minutes(), 2) +
2386            zeroFill(this.seconds(), 2)
2387        );
2388    });
2389
2390    function meridiem(token, lowercase) {
2391        addFormatToken(token, 0, 0, function () {
2392            return this.localeData().meridiem(
2393                this.hours(),
2394                this.minutes(),
2395                lowercase
2396            );
2397        });
2398    }
2399
2400    meridiem('a', true);
2401    meridiem('A', false);
2402
2403    // ALIASES
2404
2405    addUnitAlias('hour', 'h');
2406
2407    // PRIORITY
2408    addUnitPriority('hour', 13);
2409
2410    // PARSING
2411
2412    function matchMeridiem(isStrict, locale) {
2413        return locale._meridiemParse;
2414    }
2415
2416    addRegexToken('a', matchMeridiem);
2417    addRegexToken('A', matchMeridiem);
2418    addRegexToken('H', match1to2);
2419    addRegexToken('h', match1to2);
2420    addRegexToken('k', match1to2);
2421    addRegexToken('HH', match1to2, match2);
2422    addRegexToken('hh', match1to2, match2);
2423    addRegexToken('kk', match1to2, match2);
2424
2425    addRegexToken('hmm', match3to4);
2426    addRegexToken('hmmss', match5to6);
2427    addRegexToken('Hmm', match3to4);
2428    addRegexToken('Hmmss', match5to6);
2429
2430    addParseToken(['H', 'HH'], HOUR);
2431    addParseToken(['k', 'kk'], function (input, array, config) {
2432        var kInput = toInt(input);
2433        array[HOUR] = kInput === 24 ? 0 : kInput;
2434    });
2435    addParseToken(['a', 'A'], function (input, array, config) {
2436        config._isPm = config._locale.isPM(input);
2437        config._meridiem = input;
2438    });
2439    addParseToken(['h', 'hh'], function (input, array, config) {
2440        array[HOUR] = toInt(input);
2441        getParsingFlags(config).bigHour = true;
2442    });
2443    addParseToken('hmm', function (input, array, config) {
2444        var pos = input.length - 2;
2445        array[HOUR] = toInt(input.substr(0, pos));
2446        array[MINUTE] = toInt(input.substr(pos));
2447        getParsingFlags(config).bigHour = true;
2448    });
2449    addParseToken('hmmss', function (input, array, config) {
2450        var pos1 = input.length - 4,
2451            pos2 = input.length - 2;
2452        array[HOUR] = toInt(input.substr(0, pos1));
2453        array[MINUTE] = toInt(input.substr(pos1, 2));
2454        array[SECOND] = toInt(input.substr(pos2));
2455        getParsingFlags(config).bigHour = true;
2456    });
2457    addParseToken('Hmm', function (input, array, config) {
2458        var pos = input.length - 2;
2459        array[HOUR] = toInt(input.substr(0, pos));
2460        array[MINUTE] = toInt(input.substr(pos));
2461    });
2462    addParseToken('Hmmss', function (input, array, config) {
2463        var pos1 = input.length - 4,
2464            pos2 = input.length - 2;
2465        array[HOUR] = toInt(input.substr(0, pos1));
2466        array[MINUTE] = toInt(input.substr(pos1, 2));
2467        array[SECOND] = toInt(input.substr(pos2));
2468    });
2469
2470    // LOCALES
2471
2472    function localeIsPM(input) {
2473        // IE8 Quirks Mode & IE7 Standards Mode do not allow accessing strings like arrays
2474        // Using charAt should be more compatible.
2475        return (input + '').toLowerCase().charAt(0) === 'p';
2476    }
2477
2478    var defaultLocaleMeridiemParse = /[ap]\.?m?\.?/i,
2479        // Setting the hour should keep the time, because the user explicitly
2480        // specified which hour they want. So trying to maintain the same hour (in
2481        // a new timezone) makes sense. Adding/subtracting hours does not follow
2482        // this rule.
2483        getSetHour = makeGetSet('Hours', true);
2484
2485    function localeMeridiem(hours, minutes, isLower) {
2486        if (hours > 11) {
2487            return isLower ? 'pm' : 'PM';
2488        } else {
2489            return isLower ? 'am' : 'AM';
2490        }
2491    }
2492
2493    var baseConfig = {
2494        calendar: defaultCalendar,
2495        longDateFormat: defaultLongDateFormat,
2496        invalidDate: defaultInvalidDate,
2497        ordinal: defaultOrdinal,
2498        dayOfMonthOrdinalParse: defaultDayOfMonthOrdinalParse,
2499        relativeTime: defaultRelativeTime,
2500
2501        months: defaultLocaleMonths,
2502        monthsShort: defaultLocaleMonthsShort,
2503
2504        week: defaultLocaleWeek,
2505
2506        weekdays: defaultLocaleWeekdays,
2507        weekdaysMin: defaultLocaleWeekdaysMin,
2508        weekdaysShort: defaultLocaleWeekdaysShort,
2509
2510        meridiemParse: defaultLocaleMeridiemParse,
2511    };
2512
2513    // internal storage for locale config files
2514    var locales = {},
2515        localeFamilies = {},
2516        globalLocale;
2517
2518    function commonPrefix(arr1, arr2) {
2519        var i,
2520            minl = Math.min(arr1.length, arr2.length);
2521        for (i = 0; i < minl; i += 1) {
2522            if (arr1[i] !== arr2[i]) {
2523                return i;
2524            }
2525        }
2526        return minl;
2527    }
2528
2529    function normalizeLocale(key) {
2530        return key ? key.toLowerCase().replace('_', '-') : key;
2531    }
2532
2533    // pick the locale from the array
2534    // try ['en-au', 'en-gb'] as 'en-au', 'en-gb', 'en', as in move through the list trying each
2535    // substring from most specific to least, but move to the next array item if it's a more specific variant than the current root
2536    function chooseLocale(names) {
2537        var i = 0,
2538            j,
2539            next,
2540            locale,
2541            split;
2542
2543        while (i < names.length) {
2544            split = normalizeLocale(names[i]).split('-');
2545            j = split.length;
2546            next = normalizeLocale(names[i + 1]);
2547            next = next ? next.split('-') : null;
2548            while (j > 0) {
2549                locale = loadLocale(split.slice(0, j).join('-'));
2550                if (locale) {
2551                    return locale;
2552                }
2553                if (
2554                    next &&
2555                    next.length >= j &&
2556                    commonPrefix(split, next) >= j - 1
2557                ) {
2558                    //the next array item is better than a shallower substring of this one
2559                    break;
2560                }
2561                j--;
2562            }
2563            i++;
2564        }
2565        return globalLocale;
2566    }
2567
2568    function isLocaleNameSane(name) {
2569        // Prevent names that look like filesystem paths, i.e contain '/' or '\'
2570        return name.match('^[^/\\\\]*$') != null;
2571    }
2572
2573    function loadLocale(name) {
2574        var oldLocale = null,
2575            aliasedRequire;
2576        // TODO: Find a better way to register and load all the locales in Node
2577        if (
2578            locales[name] === undefined &&
2579            typeof module !== 'undefined' &&
2580            module &&
2581            module.exports &&
2582            isLocaleNameSane(name)
2583        ) {
2584            try {
2585                oldLocale = globalLocale._abbr;
2586                aliasedRequire = require;
2587                aliasedRequire('./locale/' + name);
2588                getSetGlobalLocale(oldLocale);
2589            } catch (e) {
2590                // mark as not found to avoid repeating expensive file require call causing high CPU
2591                // when trying to find en-US, en_US, en-us for every format call
2592                locales[name] = null; // null means not found
2593            }
2594        }
2595        return locales[name];
2596    }
2597
2598    // This function will load locale and then set the global locale.  If
2599    // no arguments are passed in, it will simply return the current global
2600    // locale key.
2601    function getSetGlobalLocale(key, values) {
2602        var data;
2603        if (key) {
2604            if (isUndefined(values)) {
2605                data = getLocale(key);
2606            } else {
2607                data = defineLocale(key, values);
2608            }
2609
2610            if (data) {
2611                // moment.duration._locale = moment._locale = data;
2612                globalLocale = data;
2613            } else {
2614                if (typeof console !== 'undefined' && console.warn) {
2615                    //warn user if arguments are passed but the locale could not be set
2616                    console.warn(
2617                        'Locale ' + key + ' not found. Did you forget to load it?'
2618                    );
2619                }
2620            }
2621        }
2622
2623        return globalLocale._abbr;
2624    }
2625
2626    function defineLocale(name, config) {
2627        if (config !== null) {
2628            var locale,
2629                parentConfig = baseConfig;
2630            config.abbr = name;
2631            if (locales[name] != null) {
2632                deprecateSimple(
2633                    'defineLocaleOverride',
2634                    'use moment.updateLocale(localeName, config) to change ' +
2635                        'an existing locale. moment.defineLocale(localeName, ' +
2636                        'config) should only be used for creating a new locale ' +
2637                        'See http://momentjs.com/guides/#/warnings/define-locale/ for more info.'
2638                );
2639                parentConfig = locales[name]._config;
2640            } else if (config.parentLocale != null) {
2641                if (locales[config.parentLocale] != null) {
2642                    parentConfig = locales[config.parentLocale]._config;
2643                } else {
2644                    locale = loadLocale(config.parentLocale);
2645                    if (locale != null) {
2646                        parentConfig = locale._config;
2647                    } else {
2648                        if (!localeFamilies[config.parentLocale]) {
2649                            localeFamilies[config.parentLocale] = [];
2650                        }
2651                        localeFamilies[config.parentLocale].push({
2652                            name: name,
2653                            config: config,
2654                        });
2655                        return null;
2656                    }
2657                }
2658            }
2659            locales[name] = new Locale(mergeConfigs(parentConfig, config));
2660
2661            if (localeFamilies[name]) {
2662                localeFamilies[name].forEach(function (x) {
2663                    defineLocale(x.name, x.config);
2664                });
2665            }
2666
2667            // backwards compat for now: also set the locale
2668            // make sure we set the locale AFTER all child locales have been
2669            // created, so we won't end up with the child locale set.
2670            getSetGlobalLocale(name);
2671
2672            return locales[name];
2673        } else {
2674            // useful for testing
2675            delete locales[name];
2676            return null;
2677        }
2678    }
2679
2680    function updateLocale(name, config) {
2681        if (config != null) {
2682            var locale,
2683                tmpLocale,
2684                parentConfig = baseConfig;
2685
2686            if (locales[name] != null && locales[name].parentLocale != null) {
2687                // Update existing child locale in-place to avoid memory-leaks
2688                locales[name].set(mergeConfigs(locales[name]._config, config));
2689            } else {
2690                // MERGE
2691                tmpLocale = loadLocale(name);
2692                if (tmpLocale != null) {
2693                    parentConfig = tmpLocale._config;
2694                }
2695                config = mergeConfigs(parentConfig, config);
2696                if (tmpLocale == null) {
2697                    // updateLocale is called for creating a new locale
2698                    // Set abbr so it will have a name (getters return
2699                    // undefined otherwise).
2700                    config.abbr = name;
2701                }
2702                locale = new Locale(config);
2703                locale.parentLocale = locales[name];
2704                locales[name] = locale;
2705            }
2706
2707            // backwards compat for now: also set the locale
2708            getSetGlobalLocale(name);
2709        } else {
2710            // pass null for config to unupdate, useful for tests
2711            if (locales[name] != null) {
2712                if (locales[name].parentLocale != null) {
2713                    locales[name] = locales[name].parentLocale;
2714                    if (name === getSetGlobalLocale()) {
2715                        getSetGlobalLocale(name);
2716                    }
2717                } else if (locales[name] != null) {
2718                    delete locales[name];
2719                }
2720            }
2721        }
2722        return locales[name];
2723    }
2724
2725    // returns locale data
2726    function getLocale(key) {
2727        var locale;
2728
2729        if (key && key._locale && key._locale._abbr) {
2730            key = key._locale._abbr;
2731        }
2732
2733        if (!key) {
2734            return globalLocale;
2735        }
2736
2737        if (!isArray(key)) {
2738            //short-circuit everything else
2739            locale = loadLocale(key);
2740            if (locale) {
2741                return locale;
2742            }
2743            key = [key];
2744        }
2745
2746        return chooseLocale(key);
2747    }
2748
2749    function listLocales() {
2750        return keys(locales);
2751    }
2752
2753    function checkOverflow(m) {
2754        var overflow,
2755            a = m._a;
2756
2757        if (a && getParsingFlags(m).overflow === -2) {
2758            overflow =
2759                a[MONTH] < 0 || a[MONTH] > 11
2760                    ? MONTH
2761                    : a[DATE] < 1 || a[DATE] > daysInMonth(a[YEAR], a[MONTH])
2762                    ? DATE
2763                    : a[HOUR] < 0 ||
2764                      a[HOUR] > 24 ||
2765                      (a[HOUR] === 24 &&
2766                          (a[MINUTE] !== 0 ||
2767                              a[SECOND] !== 0 ||
2768                              a[MILLISECOND] !== 0))
2769                    ? HOUR
2770                    : a[MINUTE] < 0 || a[MINUTE] > 59
2771                    ? MINUTE
2772                    : a[SECOND] < 0 || a[SECOND] > 59
2773                    ? SECOND
2774                    : a[MILLISECOND] < 0 || a[MILLISECOND] > 999
2775                    ? MILLISECOND
vendor: 9,346 bytes, lines 2776-3059
2776                    : -1;
2777
2778            if (
2779                getParsingFlags(m)._overflowDayOfYear &&
2780                (overflow < YEAR || overflow > DATE)
2781            ) {
2782                overflow = DATE;
2783            }
2784            if (getParsingFlags(m)._overflowWeeks && overflow === -1) {
2785                overflow = WEEK;
2786            }
2787            if (getParsingFlags(m)._overflowWeekday && overflow === -1) {
2788                overflow = WEEKDAY;
2789            }
2790
2791            getParsingFlags(m).overflow = overflow;
2792        }
2793
2794        return m;
2795    }
2796
2797    // iso 8601 regex
2798    // 0000-00-00 0000-W00 or 0000-W00-0 + T + 00 or 00:00 or 00:00:00 or 00:00:00.000 + +00:00 or +0000 or +00)
2799    var extendedIsoRegex =
2800            /^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,
2801        basicIsoRegex =
2802            /^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,
2803        tzRegex = /Z|[+-]\d\d(?::?\d\d)?/,
2804        isoDates = [
2805            ['YYYYYY-MM-DD', /[+-]\d{6}-\d\d-\d\d/],
2806            ['YYYY-MM-DD', /\d{4}-\d\d-\d\d/],
2807            ['GGGG-[W]WW-E', /\d{4}-W\d\d-\d/],
2808            ['GGGG-[W]WW', /\d{4}-W\d\d/, false],
2809            ['YYYY-DDD', /\d{4}-\d{3}/],
2810            ['YYYY-MM', /\d{4}-\d\d/, false],
2811            ['YYYYYYMMDD', /[+-]\d{10}/],
2812            ['YYYYMMDD', /\d{8}/],
2813            ['GGGG[W]WWE', /\d{4}W\d{3}/],
2814            ['GGGG[W]WW', /\d{4}W\d{2}/, false],
2815            ['YYYYDDD', /\d{7}/],
2816            ['YYYYMM', /\d{6}/, false],
2817            ['YYYY', /\d{4}/, false],
2818        ],
2819        // iso time formats and regexes
2820        isoTimes = [
2821            ['HH:mm:ss.SSSS', /\d\d:\d\d:\d\d\.\d+/],
2822            ['HH:mm:ss,SSSS', /\d\d:\d\d:\d\d,\d+/],
2823            ['HH:mm:ss', /\d\d:\d\d:\d\d/],
2824            ['HH:mm', /\d\d:\d\d/],
2825            ['HHmmss.SSSS', /\d\d\d\d\d\d\.\d+/],
2826            ['HHmmss,SSSS', /\d\d\d\d\d\d,\d+/],
2827            ['HHmmss', /\d\d\d\d\d\d/],
2828            ['HHmm', /\d\d\d\d/],
2829            ['HH', /\d\d/],
2830        ],
2831        aspNetJsonRegex = /^\/?Date\((-?\d+)/i,
2832        // RFC 2822 regex: For details see https://tools.ietf.org/html/rfc2822#section-3.3
2833        rfc2822 =
2834            /^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,
2835        obsOffsets = {
2836            UT: 0,
2837            GMT: 0,
2838            EDT: -4 * 60,
2839            EST: -5 * 60,
2840            CDT: -5 * 60,
2841            CST: -6 * 60,
2842            MDT: -6 * 60,
2843            MST: -7 * 60,
2844            PDT: -7 * 60,
2845            PST: -8 * 60,
2846        };
2847
2848    // date from iso format
2849    function configFromISO(config) {
2850        var i,
2851            l,
2852            string = config._i,
2853            match = extendedIsoRegex.exec(string) || basicIsoRegex.exec(string),
2854            allowTime,
2855            dateFormat,
2856            timeFormat,
2857            tzFormat,
2858            isoDatesLen = isoDates.length,
2859            isoTimesLen = isoTimes.length;
2860
2861        if (match) {
2862            getParsingFlags(config).iso = true;
2863            for (i = 0, l = isoDatesLen; i < l; i++) {
2864                if (isoDates[i][1].exec(match[1])) {
2865                    dateFormat = isoDates[i][0];
2866                    allowTime = isoDates[i][2] !== false;
2867                    break;
2868                }
2869            }
2870            if (dateFormat == null) {
2871                config._isValid = false;
2872                return;
2873            }
2874            if (match[3]) {
2875                for (i = 0, l = isoTimesLen; i < l; i++) {
2876                    if (isoTimes[i][1].exec(match[3])) {
2877                        // match[2] should be 'T' or space
2878                        timeFormat = (match[2] || ' ') + isoTimes[i][0];
2879                        break;
2880                    }
2881                }
2882                if (timeFormat == null) {
2883                    config._isValid = false;
2884                    return;
2885                }
2886            }
2887            if (!allowTime && timeFormat != null) {
2888                config._isValid = false;
2889                return;
2890            }
2891            if (match[4]) {
2892                if (tzRegex.exec(match[4])) {
2893                    tzFormat = 'Z';
2894                } else {
2895                    config._isValid = false;
2896                    return;
2897                }
2898            }
2899            config._f = dateFormat + (timeFormat || '') + (tzFormat || '');
2900            configFromStringAndFormat(config);
2901        } else {
2902            config._isValid = false;
2903        }
2904    }
2905
2906    function extractFromRFC2822Strings(
2907        yearStr,
2908        monthStr,
2909        dayStr,
2910        hourStr,
2911        minuteStr,
2912        secondStr
2913    ) {
2914        var result = [
2915            untruncateYear(yearStr),
2916            defaultLocaleMonthsShort.indexOf(monthStr),
2917            parseInt(dayStr, 10),
2918            parseInt(hourStr, 10),
2919            parseInt(minuteStr, 10),
2920        ];
2921
2922        if (secondStr) {
2923            result.push(parseInt(secondStr, 10));
2924        }
2925
2926        return result;
2927    }
2928
2929    function untruncateYear(yearStr) {
2930        var year = parseInt(yearStr, 10);
2931        if (year <= 49) {
2932            return 2000 + year;
2933        } else if (year <= 999) {
2934            return 1900 + year;
2935        }
2936        return year;
2937    }
2938
2939    function preprocessRFC2822(s) {
2940        // Remove comments and folding whitespace and replace multiple-spaces with a single space
2941        return s
2942            .replace(/\([^()]*\)|[\n\t]/g, ' ')
2943            .replace(/(\s\s+)/g, ' ')
2944            .replace(/^\s\s*/, '')
2945            .replace(/\s\s*$/, '');
2946    }
2947
2948    function checkWeekday(weekdayStr, parsedInput, config) {
2949        if (weekdayStr) {
2950            // TODO: Replace the vanilla JS Date object with an independent day-of-week check.
2951            var weekdayProvided = defaultLocaleWeekdaysShort.indexOf(weekdayStr),
2952                weekdayActual = new Date(
2953                    parsedInput[0],
2954                    parsedInput[1],
2955                    parsedInput[2]
2956                ).getDay();
2957            if (weekdayProvided !== weekdayActual) {
2958                getParsingFlags(config).weekdayMismatch = true;
2959                config._isValid = false;
2960                return false;
2961            }
2962        }
2963        return true;
2964    }
2965
2966    function calculateOffset(obsOffset, militaryOffset, numOffset) {
2967        if (obsOffset) {
2968            return obsOffsets[obsOffset];
2969        } else if (militaryOffset) {
2970            // the only allowed military tz is Z
2971            return 0;
2972        } else {
2973            var hm = parseInt(numOffset, 10),
2974                m = hm % 100,
2975                h = (hm - m) / 100;
2976            return h * 60 + m;
2977        }
2978    }
2979
2980    // date and time from ref 2822 format
2981    function configFromRFC2822(config) {
2982        var match = rfc2822.exec(preprocessRFC2822(config._i)),
2983            parsedArray;
2984        if (match) {
2985            parsedArray = extractFromRFC2822Strings(
2986                match[4],
2987                match[3],
2988                match[2],
2989                match[5],
2990                match[6],
2991                match[7]
2992            );
2993            if (!checkWeekday(match[1], parsedArray, config)) {
2994                return;
2995            }
2996
2997            config._a = parsedArray;
2998            config._tzm = calculateOffset(match[8], match[9], match[10]);
2999
3000            config._d = createUTCDate.apply(null, config._a);
3001            config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);
3002
3003            getParsingFlags(config).rfc2822 = true;
3004        } else {
3005            config._isValid = false;
3006        }
3007    }
3008
3009    // date from 1) ASP.NET, 2) ISO, 3) RFC 2822 formats, or 4) optional fallback if parsing isn't strict
3010    function configFromString(config) {
3011        var matched = aspNetJsonRegex.exec(config._i);
3012        if (matched !== null) {
3013            config._d = new Date(+matched[1]);
3014            return;
3015        }
3016
3017        configFromISO(config);
3018        if (config._isValid === false) {
3019            delete config._isValid;
3020        } else {
3021            return;
3022        }
3023
3024        configFromRFC2822(config);
3025        if (config._isValid === false) {
3026            delete config._isValid;
3027        } else {
3028            return;
3029        }
3030
3031        if (config._strict) {
3032            config._isValid = false;
3033        } else {
3034            // Final attempt, use Input Fallback
3035            hooks.createFromInputFallback(config);
3036        }
3037    }
3038
3039    hooks.createFromInputFallback = deprecate(
3040        'value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), ' +
3041            'which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are ' +
3042            'discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.',
3043        function (config) {
3044            config._d = new Date(config._i + (config._useUTC ? ' UTC' : ''));
3045        }
3046    );
3047
3048    // Pick the first defined of two or three arguments.
3049    function defaults(a, b, c) {
3050        if (a != null) {
3051            return a;
3052        }
3053        if (b != null) {
3054            return b;
3055        }
3056        return c;
3057    }
3058
3059    function currentDateArray(config
vendor: 87,494 bytes, lines 3059-5935
3059) {
3060        // hooks is actually the exported moment object
3061        var nowValue = new Date(hooks.now());
3062        if (config._useUTC) {
3063            return [
3064                nowValue.getUTCFullYear(),
3065                nowValue.getUTCMonth(),
3066                nowValue.getUTCDate(),
3067            ];
3068        }
3069        return [nowValue.getFullYear(), nowValue.getMonth(), nowValue.getDate()];
3070    }
3071
3072    // convert an array to a date.
3073    // the array should mirror the parameters below
3074    // note: all values past the year are optional and will default to the lowest possible value.
3075    // [year, month, day , hour, minute, second, millisecond]
3076    function configFromArray(config) {
3077        var i,
3078            date,
3079            input = [],
3080            currentDate,
3081            expectedWeekday,
3082            yearToUse;
3083
3084        if (config._d) {
3085            return;
3086        }
3087
3088        currentDate = currentDateArray(config);
3089
3090        //compute day of the year from weeks and weekdays
3091        if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {
3092            dayOfYearFromWeekInfo(config);
3093        }
3094
3095        //if the day of the year is set, figure out what it is
3096        if (config._dayOfYear != null) {
3097            yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);
3098
3099            if (
3100                config._dayOfYear > daysInYear(yearToUse) ||
3101                config._dayOfYear === 0
3102            ) {
3103                getParsingFlags(config)._overflowDayOfYear = true;
3104            }
3105
3106            date = createUTCDate(yearToUse, 0, config._dayOfYear);
3107            config._a[MONTH] = date.getUTCMonth();
3108            config._a[DATE] = date.getUTCDate();
3109        }
3110
3111        // Default to current date.
3112        // * if no year, month, day of month are given, default to today
3113        // * if day of month is given, default month and year
3114        // * if month is given, default only year
3115        // * if year is given, don't default anything
3116        for (i = 0; i < 3 && config._a[i] == null; ++i) {
3117            config._a[i] = input[i] = currentDate[i];
3118        }
3119
3120        // Zero out whatever was not defaulted, including time
3121        for (; i < 7; i++) {
3122            config._a[i] = input[i] =
3123                config._a[i] == null ? (i === 2 ? 1 : 0) : config._a[i];
3124        }
3125
3126        // Check for 24:00:00.000
3127        if (
3128            config._a[HOUR] === 24 &&
3129            config._a[MINUTE] === 0 &&
3130            config._a[SECOND] === 0 &&
3131            config._a[MILLISECOND] === 0
3132        ) {
3133            config._nextDay = true;
3134            config._a[HOUR] = 0;
3135        }
3136
3137        config._d = (config._useUTC ? createUTCDate : createDate).apply(
3138            null,
3139            input
3140        );
3141        expectedWeekday = config._useUTC
3142            ? config._d.getUTCDay()
3143            : config._d.getDay();
3144
3145        // Apply timezone offset from input. The actual utcOffset can be changed
3146        // with parseZone.
3147        if (config._tzm != null) {
3148            config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);
3149        }
3150
3151        if (config._nextDay) {
3152            config._a[HOUR] = 24;
3153        }
3154
3155        // check for mismatching day of week
3156        if (
3157            config._w &&
3158            typeof config._w.d !== 'undefined' &&
3159            config._w.d !== expectedWeekday
3160        ) {
3161            getParsingFlags(config).weekdayMismatch = true;
3162        }
3163    }
3164
3165    function dayOfYearFromWeekInfo(config) {
3166        var w, weekYear, week, weekday, dow, doy, temp, weekdayOverflow, curWeek;
3167
3168        w = config._w;
3169        if (w.GG != null || w.W != null || w.E != null) {
3170            dow = 1;
3171            doy = 4;
3172
3173            // TODO: We need to take the current isoWeekYear, but that depends on
3174            // how we interpret now (local, utc, fixed offset). So create
3175            // a now version of current config (take local/utc/offset flags, and
3176            // create now).
3177            weekYear = defaults(
3178                w.GG,
3179                config._a[YEAR],
3180                weekOfYear(createLocal(), 1, 4).year
3181            );
3182            week = defaults(w.W, 1);
3183            weekday = defaults(w.E, 1);
3184            if (weekday < 1 || weekday > 7) {
3185                weekdayOverflow = true;
3186            }
3187        } else {
3188            dow = config._locale._week.dow;
3189            doy = config._locale._week.doy;
3190
3191            curWeek = weekOfYear(createLocal(), dow, doy);
3192
3193            weekYear = defaults(w.gg, config._a[YEAR], curWeek.year);
3194
3195            // Default to current week.
3196            week = defaults(w.w, curWeek.week);
3197
3198            if (w.d != null) {
3199                // weekday -- low day numbers are considered next week
3200                weekday = w.d;
3201                if (weekday < 0 || weekday > 6) {
3202                    weekdayOverflow = true;
3203                }
3204            } else if (w.e != null) {
3205                // local weekday -- counting starts from beginning of week
3206                weekday = w.e + dow;
3207                if (w.e < 0 || w.e > 6) {
3208                    weekdayOverflow = true;
3209                }
3210            } else {
3211                // default to beginning of week
3212                weekday = dow;
3213            }
3214        }
3215        if (week < 1 || week > weeksInYear(weekYear, dow, doy)) {
3216            getParsingFlags(config)._overflowWeeks = true;
3217        } else if (weekdayOverflow != null) {
3218            getParsingFlags(config)._overflowWeekday = true;
3219        } else {
3220            temp = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy);
3221            config._a[YEAR] = temp.year;
3222            config._dayOfYear = temp.dayOfYear;
3223        }
3224    }
3225
3226    // constant that refers to the ISO standard
3227    hooks.ISO_8601 = function () {};
3228
3229    // constant that refers to the RFC 2822 form
3230    hooks.RFC_2822 = function () {};
3231
3232    // date from string and format string
3233    function configFromStringAndFormat(config) {
3234        // TODO: Move this to another part of the creation flow to prevent circular deps
3235        if (config._f === hooks.ISO_8601) {
3236            configFromISO(config);
3237            return;
3238        }
3239        if (config._f === hooks.RFC_2822) {
3240            configFromRFC2822(config);
3241            return;
3242        }
3243        config._a = [];
3244        getParsingFlags(config).empty = true;
3245
3246        // This array is used to make a Date, either with `new Date` or `Date.UTC`
3247        var string = '' + config._i,
3248            i,
3249            parsedInput,
3250            tokens,
3251            token,
3252            skipped,
3253            stringLength = string.length,
3254            totalParsedInputLength = 0,
3255            era,
3256            tokenLen;
3257
3258        tokens =
3259            expandFormat(config._f, config._locale).match(formattingTokens) || [];
3260        tokenLen = tokens.length;
3261        for (i = 0; i < tokenLen; i++) {
3262            token = tokens[i];
3263            parsedInput = (string.match(getParseRegexForToken(token, config)) ||
3264                [])[0];
3265            if (parsedInput) {
3266                skipped = string.substr(0, string.indexOf(parsedInput));
3267                if (skipped.length > 0) {
3268                    getParsingFlags(config).unusedInput.push(skipped);
3269                }
3270                string = string.slice(
3271                    string.indexOf(parsedInput) + parsedInput.length
3272                );
3273                totalParsedInputLength += parsedInput.length;
3274            }
3275            // don't parse if it's not a known token
3276            if (formatTokenFunctions[token]) {
3277                if (parsedInput) {
3278                    getParsingFlags(config).empty = false;
3279                } else {
3280                    getParsingFlags(config).unusedTokens.push(token);
3281                }
3282                addTimeToArrayFromToken(token, parsedInput, config);
3283            } else if (config._strict && !parsedInput) {
3284                getParsingFlags(config).unusedTokens.push(token);
3285            }
3286        }
3287
3288        // add remaining unparsed input length to the string
3289        getParsingFlags(config).charsLeftOver =
3290            stringLength - totalParsedInputLength;
3291        if (string.length > 0) {
3292            getParsingFlags(config).unusedInput.push(string);
3293        }
3294
3295        // clear _12h flag if hour is <= 12
3296        if (
3297            config._a[HOUR] <= 12 &&
3298            getParsingFlags(config).bigHour === true &&
3299            config._a[HOUR] > 0
3300        ) {
3301            getParsingFlags(config).bigHour = undefined;
3302        }
3303
3304        getParsingFlags(config).parsedDateParts = config._a.slice(0);
3305        getParsingFlags(config).meridiem = config._meridiem;
3306        // handle meridiem
3307        config._a[HOUR] = meridiemFixWrap(
3308            config._locale,
3309            config._a[HOUR],
3310            config._meridiem
3311        );
3312
3313        // handle era
3314        era = getParsingFlags(config).era;
3315        if (era !== null) {
3316            config._a[YEAR] = config._locale.erasConvertYear(era, config._a[YEAR]);
3317        }
3318
3319        configFromArray(config);
3320        checkOverflow(config);
3321    }
3322
3323    function meridiemFixWrap(locale, hour, meridiem) {
3324        var isPm;
3325
3326        if (meridiem == null) {
3327            // nothing to do
3328            return hour;
3329        }
3330        if (locale.meridiemHour != null) {
3331            return locale.meridiemHour(hour, meridiem);
3332        } else if (locale.isPM != null) {
3333            // Fallback
3334            isPm = locale.isPM(meridiem);
3335            if (isPm && hour < 12) {
3336                hour += 12;
3337            }
3338            if (!isPm && hour === 12) {
3339                hour = 0;
3340            }
3341            return hour;
3342        } else {
3343            // this is not supposed to happen
3344            return hour;
3345        }
3346    }
3347
3348    // date from string and array of format strings
3349    function configFromStringAndArray(config) {
3350        var tempConfig,
3351            bestMoment,
3352            scoreToBeat,
3353            i,
3354            currentScore,
3355            validFormatFound,
3356            bestFormatIsValid = false,
3357            configfLen = config._f.length;
3358
3359        if (configfLen === 0) {
3360            getParsingFlags(config).invalidFormat = true;
3361            config._d = new Date(NaN);
3362            return;
3363        }
3364
3365        for (i = 0; i < configfLen; i++) {
3366            currentScore = 0;
3367            validFormatFound = false;
3368            tempConfig = copyConfig({}, config);
3369            if (config._useUTC != null) {
3370                tempConfig._useUTC = config._useUTC;
3371            }
3372            tempConfig._f = config._f[i];
3373            configFromStringAndFormat(tempConfig);
3374
3375            if (isValid(tempConfig)) {
3376                validFormatFound = true;
3377            }
3378
3379            // if there is any input that was not parsed add a penalty for that format
3380            currentScore += getParsingFlags(tempConfig).charsLeftOver;
3381
3382            //or tokens
3383            currentScore += getParsingFlags(tempConfig).unusedTokens.length * 10;
3384
3385            getParsingFlags(tempConfig).score = currentScore;
3386
3387            if (!bestFormatIsValid) {
3388                if (
3389                    scoreToBeat == null ||
3390                    currentScore < scoreToBeat ||
3391                    validFormatFound
3392                ) {
3393                    scoreToBeat = currentScore;
3394                    bestMoment = tempConfig;
3395                    if (validFormatFound) {
3396                        bestFormatIsValid = true;
3397                    }
3398                }
3399            } else {
3400                if (currentScore < scoreToBeat) {
3401                    scoreToBeat = currentScore;
3402                    bestMoment = tempConfig;
3403                }
3404            }
3405        }
3406
3407        extend(config, bestMoment || tempConfig);
3408    }
3409
3410    function configFromObject(config) {
3411        if (config._d) {
3412            return;
3413        }
3414
3415        var i = normalizeObjectUnits(config._i),
3416            dayOrDate = i.day === undefined ? i.date : i.day;
3417        config._a = map(
3418            [i.year, i.month, dayOrDate, i.hour, i.minute, i.second, i.millisecond],
3419            function (obj) {
3420                return obj && parseInt(obj, 10);
3421            }
3422        );
3423
3424        configFromArray(config);
3425    }
3426
3427    function createFromConfig(config) {
3428        var res = new Moment(checkOverflow(prepareConfig(config)));
3429        if (res._nextDay) {
3430            // Adding is smart enough around DST
3431            res.add(1, 'd');
3432            res._nextDay = undefined;
3433        }
3434
3435        return res;
3436    }
3437
3438    function prepareConfig(config) {
3439        var input = config._i,
3440            format = config._f;
3441
3442        config._locale = config._locale || getLocale(config._l);
3443
3444        if (input === null || (format === undefined && input === '')) {
3445            return createInvalid({ nullInput: true });
3446        }
3447
3448        if (typeof input === 'string') {
3449            config._i = input = config._locale.preparse(input);
3450        }
3451
3452        if (isMoment(input)) {
3453            return new Moment(checkOverflow(input));
3454        } else if (isDate(input)) {
3455            config._d = input;
3456        } else if (isArray(format)) {
3457            configFromStringAndArray(config);
3458        } else if (format) {
3459            configFromStringAndFormat(config);
3460        } else {
3461            configFromInput(config);
3462        }
3463
3464        if (!isValid(config)) {
3465            config._d = null;
3466        }
3467
3468        return config;
3469    }
3470
3471    function configFromInput(config) {
3472        var input = config._i;
3473        if (isUndefined(input)) {
3474            config._d = new Date(hooks.now());
3475        } else if (isDate(input)) {
3476            config._d = new Date(input.valueOf());
3477        } else if (typeof input === 'string') {
3478            configFromString(config);
3479        } else if (isArray(input)) {
3480            config._a = map(input.slice(0), function (obj) {
3481                return parseInt(obj, 10);
3482            });
3483            configFromArray(config);
3484        } else if (isObject(input)) {
3485            configFromObject(config);
3486        } else if (isNumber(input)) {
3487            // from milliseconds
3488            config._d = new Date(input);
3489        } else {
3490            hooks.createFromInputFallback(config);
3491        }
3492    }
3493
3494    function createLocalOrUTC(input, format, locale, strict, isUTC) {
3495        var c = {};
3496
3497        if (format === true || format === false) {
3498            strict = format;
3499            format = undefined;
3500        }
3501
3502        if (locale === true || locale === false) {
3503            strict = locale;
3504            locale = undefined;
3505        }
3506
3507        if (
3508            (isObject(input) && isObjectEmpty(input)) ||
3509            (isArray(input) && input.length === 0)
3510        ) {
3511            input = undefined;
3512        }
3513        // object construction must be done this way.
3514        // https://github.com/moment/moment/issues/1423
3515        c._isAMomentObject = true;
3516        c._useUTC = c._isUTC = isUTC;
3517        c._l = locale;
3518        c._i = input;
3519        c._f = format;
3520        c._strict = strict;
3521
3522        return createFromConfig(c);
3523    }
3524
3525    function createLocal(input, format, locale, strict) {
3526        return createLocalOrUTC(input, format, locale, strict, false);
3527    }
3528
3529    var prototypeMin = deprecate(
3530            'moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/',
3531            function () {
3532                var other = createLocal.apply(null, arguments);
3533                if (this.isValid() && other.isValid()) {
3534                    return other < this ? this : other;
3535                } else {
3536                    return createInvalid();
3537                }
3538            }
3539        ),
3540        prototypeMax = deprecate(
3541            'moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/',
3542            function () {
3543                var other = createLocal.apply(null, arguments);
3544                if (this.isValid() && other.isValid()) {
3545                    return other > this ? this : other;
3546                } else {
3547                    return createInvalid();
3548                }
3549            }
3550        );
3551
3552    // Pick a moment m from moments so that m[fn](other) is true for all
3553    // other. This relies on the function fn to be transitive.
3554    //
3555    // moments should either be an array of moment objects or an array, whose
3556    // first element is an array of moment objects.
3557    function pickBy(fn, moments) {
3558        var res, i;
3559        if (moments.length === 1 && isArray(moments[0])) {
3560            moments = moments[0];
3561        }
3562        if (!moments.length) {
3563            return createLocal();
3564        }
3565        res = moments[0];
3566        for (i = 1; i < moments.length; ++i) {
3567            if (!moments[i].isValid() || moments[i][fn](res)) {
3568                res = moments[i];
3569            }
3570        }
3571        return res;
3572    }
3573
3574    // TODO: Use [].sort instead?
3575    function min() {
3576        var args = [].slice.call(arguments, 0);
3577
3578        return pickBy('isBefore', args);
3579    }
3580
3581    function max() {
3582        var args = [].slice.call(arguments, 0);
3583
3584        return pickBy('isAfter', args);
3585    }
3586
3587    var now = function () {
3588        return Date.now ? Date.now() : +new Date();
3589    };
3590
3591    var ordering = [
3592        'year',
3593        'quarter',
3594        'month',
3595        'week',
3596        'day',
3597        'hour',
3598        'minute',
3599        'second',
3600        'millisecond',
3601    ];
3602
3603    function isDurationValid(m) {
3604        var key,
3605            unitHasDecimal = false,
3606            i,
3607            orderLen = ordering.length;
3608        for (key in m) {
3609            if (
3610                hasOwnProp(m, key) &&
3611                !(
3612                    indexOf.call(ordering, key) !== -1 &&
3613                    (m[key] == null || !isNaN(m[key]))
3614                )
3615            ) {
3616                return false;
3617            }
3618        }
3619
3620        for (i = 0; i < orderLen; ++i) {
3621            if (m[ordering[i]]) {
3622                if (unitHasDecimal) {
3623                    return false; // only allow non-integers for smallest unit
3624                }
3625                if (parseFloat(m[ordering[i]]) !== toInt(m[ordering[i]])) {
3626                    unitHasDecimal = true;
3627                }
3628            }
3629        }
3630
3631        return true;
3632    }
3633
3634    function isValid$1() {
3635        return this._isValid;
3636    }
3637
3638    function createInvalid$1() {
3639        return createDuration(NaN);
3640    }
3641
3642    function Duration(duration) {
3643        var normalizedInput = normalizeObjectUnits(duration),
3644            years = normalizedInput.year || 0,
3645            quarters = normalizedInput.quarter || 0,
3646            months = normalizedInput.month || 0,
3647            weeks = normalizedInput.week || normalizedInput.isoWeek || 0,
3648            days = normalizedInput.day || 0,
3649            hours = normalizedInput.hour || 0,
3650            minutes = normalizedInput.minute || 0,
3651            seconds = normalizedInput.second || 0,
3652            milliseconds = normalizedInput.millisecond || 0;
3653
3654        this._isValid = isDurationValid(normalizedInput);
3655
3656        // representation for dateAddRemove
3657        this._milliseconds =
3658            +milliseconds +
3659            seconds * 1e3 + // 1000
3660            minutes * 6e4 + // 1000 * 60
3661            hours * 1000 * 60 * 60; //using 1000 * 60 * 60 instead of 36e5 to avoid floating point rounding errors https://github.com/moment/moment/issues/2978
3662        // Because of dateAddRemove treats 24 hours as different from a
3663        // day when working around DST, we need to store them separately
3664        this._days = +days + weeks * 7;
3665        // It is impossible to translate months into days without knowing
3666        // which months you are are talking about, so we have to store
3667        // it separately.
3668        this._months = +months + quarters * 3 + years * 12;
3669
3670        this._data = {};
3671
3672        this._locale = getLocale();
3673
3674        this._bubble();
3675    }
3676
3677    function isDuration(obj) {
3678        return obj instanceof Duration;
3679    }
3680
3681    function absRound(number) {
3682        if (number < 0) {
3683            return Math.round(-1 * number) * -1;
3684        } else {
3685            return Math.round(number);
3686        }
3687    }
3688
3689    // compare two arrays, return the number of differences
3690    function compareArrays(array1, array2, dontConvert) {
3691        var len = Math.min(array1.length, array2.length),
3692            lengthDiff = Math.abs(array1.length - array2.length),
3693            diffs = 0,
3694            i;
3695        for (i = 0; i < len; i++) {
3696            if (
3697                (dontConvert && array1[i] !== array2[i]) ||
3698                (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))
3699            ) {
3700                diffs++;
3701            }
3702        }
3703        return diffs + lengthDiff;
3704    }
3705
3706    // FORMATTING
3707
3708    function offset(token, separator) {
3709        addFormatToken(token, 0, 0, function () {
3710            var offset = this.utcOffset(),
3711                sign = '+';
3712            if (offset < 0) {
3713                offset = -offset;
3714                sign = '-';
3715            }
3716            return (
3717                sign +
3718                zeroFill(~~(offset / 60), 2) +
3719                separator +
3720                zeroFill(~~offset % 60, 2)
3721            );
3722        });
3723    }
3724
3725    offset('Z', ':');
3726    offset('ZZ', '');
3727
3728    // PARSING
3729
3730    addRegexToken('Z', matchShortOffset);
3731    addRegexToken('ZZ', matchShortOffset);
3732    addParseToken(['Z', 'ZZ'], function (input, array, config) {
3733        config._useUTC = true;
3734        config._tzm = offsetFromString(matchShortOffset, input);
3735    });
3736
3737    // HELPERS
3738
3739    // timezone chunker
3740    // '+10:00' > ['10',  '00']
3741    // '-1530'  > ['-15', '30']
3742    var chunkOffset = /([\+\-]|\d\d)/gi;
3743
3744    function offsetFromString(matcher, string) {
3745        var matches = (string || '').match(matcher),
3746            chunk,
3747            parts,
3748            minutes;
3749
3750        if (matches === null) {
3751            return null;
3752        }
3753
3754        chunk = matches[matches.length - 1] || [];
3755        parts = (chunk + '').match(chunkOffset) || ['-', 0, 0];
3756        minutes = +(parts[1] * 60) + toInt(parts[2]);
3757
3758        return minutes === 0 ? 0 : parts[0] === '+' ? minutes : -minutes;
3759    }
3760
3761    // Return a moment from input, that is local/utc/zone equivalent to model.
3762    function cloneWithOffset(input, model) {
3763        var res, diff;
3764        if (model._isUTC) {
3765            res = model.clone();
3766            diff =
3767                (isMoment(input) || isDate(input)
3768                    ? input.valueOf()
3769                    : createLocal(input).valueOf()) - res.valueOf();
3770            // Use low-level api, because this fn is low-level api.
3771            res._d.setTime(res._d.valueOf() + diff);
3772            hooks.updateOffset(res, false);
3773            return res;
3774        } else {
3775            return createLocal(input).local();
3776        }
3777    }
3778
3779    function getDateOffset(m) {
3780        // On Firefox.24 Date#getTimezoneOffset returns a floating point.
3781        // https://github.com/moment/moment/pull/1871
3782        return -Math.round(m._d.getTimezoneOffset());
3783    }
3784
3785    // HOOKS
3786
3787    // This function will be called whenever a moment is mutated.
3788    // It is intended to keep the offset in sync with the timezone.
3789    hooks.updateOffset = function () {};
3790
3791    // MOMENTS
3792
3793    // keepLocalTime = true means only change the timezone, without
3794    // affecting the local hour. So 5:31:26 +0300 --[utcOffset(2, true)]-->
3795    // 5:31:26 +0200 It is possible that 5:31:26 doesn't exist with offset
3796    // +0200, so we adjust the time as needed, to be valid.
3797    //
3798    // Keeping the time actually adds/subtracts (one hour)
3799    // from the actual represented time. That is why we call updateOffset
3800    // a second time. In case it wants us to change the offset again
3801    // _changeInProgress == true case, then we have to adjust, because
3802    // there is no such time in the given timezone.
3803    function getSetOffset(input, keepLocalTime, keepMinutes) {
3804        var offset = this._offset || 0,
3805            localAdjust;
3806        if (!this.isValid()) {
3807            return input != null ? this : NaN;
3808        }
3809        if (input != null) {
3810            if (typeof input === 'string') {
3811                input = offsetFromString(matchShortOffset, input);
3812                if (input === null) {
3813                    return this;
3814                }
3815            } else if (Math.abs(input) < 16 && !keepMinutes) {
3816                input = input * 60;
3817            }
3818            if (!this._isUTC && keepLocalTime) {
3819                localAdjust = getDateOffset(this);
3820            }
3821            this._offset = input;
3822            this._isUTC = true;
3823            if (localAdjust != null) {
3824                this.add(localAdjust, 'm');
3825            }
3826            if (offset !== input) {
3827                if (!keepLocalTime || this._changeInProgress) {
3828                    addSubtract(
3829                        this,
3830                        createDuration(input - offset, 'm'),
3831                        1,
3832                        false
3833                    );
3834                } else if (!this._changeInProgress) {
3835                    this._changeInProgress = true;
3836                    hooks.updateOffset(this, true);
3837                    this._changeInProgress = null;
3838                }
3839            }
3840            return this;
3841        } else {
3842            return this._isUTC ? offset : getDateOffset(this);
3843        }
3844    }
3845
3846    function getSetZone(input, keepLocalTime) {
3847        if (input != null) {
3848            if (typeof input !== 'string') {
3849                input = -input;
3850            }
3851
3852            this.utcOffset(input, keepLocalTime);
3853
3854            return this;
3855        } else {
3856            return -this.utcOffset();
3857        }
3858    }
3859
3860    function setOffsetToUTC(keepLocalTime) {
3861        return this.utcOffset(0, keepLocalTime);
3862    }
3863
3864    function setOffsetToLocal(keepLocalTime) {
3865        if (this._isUTC) {
3866            this.utcOffset(0, keepLocalTime);
3867            this._isUTC = false;
3868
3869            if (keepLocalTime) {
3870                this.subtract(getDateOffset(this), 'm');
3871            }
3872        }
3873        return this;
3874    }
3875
3876    function setOffsetToParsedOffset() {
3877        if (this._tzm != null) {
3878            this.utcOffset(this._tzm, false, true);
3879        } else if (typeof this._i === 'string') {
3880            var tZone = offsetFromString(matchOffset, this._i);
3881            if (tZone != null) {
3882                this.utcOffset(tZone);
3883            } else {
3884                this.utcOffset(0, true);
3885            }
3886        }
3887        return this;
3888    }
3889
3890    function hasAlignedHourOffset(input) {
3891        if (!this.isValid()) {
3892            return false;
3893        }
3894        input = input ? createLocal(input).utcOffset() : 0;
3895
3896        return (this.utcOffset() - input) % 60 === 0;
3897    }
3898
3899    function isDaylightSavingTime() {
3900        return (
3901            this.utcOffset() > this.clone().month(0).utcOffset() ||
3902            this.utcOffset() > this.clone().month(5).utcOffset()
3903        );
3904    }
3905
3906    function isDaylightSavingTimeShifted() {
3907        if (!isUndefined(this._isDSTShifted)) {
3908            return this._isDSTShifted;
3909        }
3910
3911        var c = {},
3912            other;
3913
3914        copyConfig(c, this);
3915        c = prepareConfig(c);
3916
3917        if (c._a) {
3918            other = c._isUTC ? createUTC(c._a) : createLocal(c._a);
3919            this._isDSTShifted =
3920                this.isValid() && compareArrays(c._a, other.toArray()) > 0;
3921        } else {
3922            this._isDSTShifted = false;
3923        }
3924
3925        return this._isDSTShifted;
3926    }
3927
3928    function isLocal() {
3929        return this.isValid() ? !this._isUTC : false;
3930    }
3931
3932    function isUtcOffset() {
3933        return this.isValid() ? this._isUTC : false;
3934    }
3935
3936    function isUtc() {
3937        return this.isValid() ? this._isUTC && this._offset === 0 : false;
3938    }
3939
3940    // ASP.NET json date format regex
3941    var aspNetRegex = /^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,
3942        // from http://docs.closure-library.googlecode.com/git/closure_goog_date_date.js.source.html
3943        // somewhat more in line with 4.4.3.2 2004 spec, but allows decimal anywhere
3944        // and further modified to allow for strings containing both week and day
3945        isoRegex =
3946            /^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;
3947
3948    function createDuration(input, key) {
3949        var duration = input,
3950            // matching against regexp is expensive, do it on demand
3951            match = null,
3952            sign,
3953            ret,
3954            diffRes;
3955
3956        if (isDuration(input)) {
3957            duration = {
3958                ms: input._milliseconds,
3959                d: input._days,
3960                M: input._months,
3961            };
3962        } else if (isNumber(input) || !isNaN(+input)) {
3963            duration = {};
3964            if (key) {
3965                duration[key] = +input;
3966            } else {
3967                duration.milliseconds = +input;
3968            }
3969        } else if ((match = aspNetRegex.exec(input))) {
3970            sign = match[1] === '-' ? -1 : 1;
3971            duration = {
3972                y: 0,
3973                d: toInt(match[DATE]) * sign,
3974                h: toInt(match[HOUR]) * sign,
3975                m: toInt(match[MINUTE]) * sign,
3976                s: toInt(match[SECOND]) * sign,
3977                ms: toInt(absRound(match[MILLISECOND] * 1000)) * sign, // the millisecond decimal point is included in the match
3978            };
3979        } else if ((match = isoRegex.exec(input))) {
3980            sign = match[1] === '-' ? -1 : 1;
3981            duration = {
3982                y: parseIso(match[2], sign),
3983                M: parseIso(match[3], sign),
3984                w: parseIso(match[4], sign),
3985                d: parseIso(match[5], sign),
3986                h: parseIso(match[6], sign),
3987                m: parseIso(match[7], sign),
3988                s: parseIso(match[8], sign),
3989            };
3990        } else if (duration == null) {
3991            // checks for null or undefined
3992            duration = {};
3993        } else if (
3994            typeof duration === 'object' &&
3995            ('from' in duration || 'to' in duration)
3996        ) {
3997            diffRes = momentsDifference(
3998                createLocal(duration.from),
3999                createLocal(duration.to)
4000            );
4001
4002            duration = {};
4003            duration.ms = diffRes.milliseconds;
4004            duration.M = diffRes.months;
4005        }
4006
4007        ret = new Duration(duration);
4008
4009        if (isDuration(input) && hasOwnProp(input, '_locale')) {
4010            ret._locale = input._locale;
4011        }
4012
4013        if (isDuration(input) && hasOwnProp(input, '_isValid')) {
4014            ret._isValid = input._isValid;
4015        }
4016
4017        return ret;
4018    }
4019
4020    createDuration.fn = Duration.prototype;
4021    createDuration.invalid = createInvalid$1;
4022
4023    function parseIso(inp, sign) {
4024        // We'd normally use ~~inp for this, but unfortunately it also
4025        // converts floats to ints.
4026        // inp may be undefined, so careful calling replace on it.
4027        var res = inp && parseFloat(inp.replace(',', '.'));
4028        // apply sign while we're at it
4029        return (isNaN(res) ? 0 : res) * sign;
4030    }
4031
4032    function positiveMomentsDifference(base, other) {
4033        var res = {};
4034
4035        res.months =
4036            other.month() - base.month() + (other.year() - base.year()) * 12;
4037        if (base.clone().add(res.months, 'M').isAfter(other)) {
4038            --res.months;
4039        }
4040
4041        res.milliseconds = +other - +base.clone().add(res.months, 'M');
4042
4043        return res;
4044    }
4045
4046    function momentsDifference(base, other) {
4047        var res;
4048        if (!(base.isValid() && other.isValid())) {
4049            return { milliseconds: 0, months: 0 };
4050        }
4051
4052        other = cloneWithOffset(other, base);
4053        if (base.isBefore(other)) {
4054            res = positiveMomentsDifference(base, other);
4055        } else {
4056            res = positiveMomentsDifference(other, base);
4057            res.milliseconds = -res.milliseconds;
4058            res.months = -res.months;
4059        }
4060
4061        return res;
4062    }
4063
4064    // TODO: remove 'name' arg after deprecation is removed
4065    function createAdder(direction, name) {
4066        return function (val, period) {
4067            var dur, tmp;
4068            //invert the arguments, but complain about it
4069            if (period !== null && !isNaN(+period)) {
4070                deprecateSimple(
4071                    name,
4072                    'moment().' +
4073                        name +
4074                        '(period, number) is deprecated. Please use moment().' +
4075                        name +
4076                        '(number, period). ' +
4077                        'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.'
4078                );
4079                tmp = val;
4080                val = period;
4081                period = tmp;
4082            }
4083
4084            dur = createDuration(val, period);
4085            addSubtract(this, dur, direction);
4086            return this;
4087        };
4088    }
4089
4090    function addSubtract(mom, duration, isAdding, updateOffset) {
4091        var milliseconds = duration._milliseconds,
4092            days = absRound(duration._days),
4093            months = absRound(duration._months);
4094
4095        if (!mom.isValid()) {
4096            // No op
4097            return;
4098        }
4099
4100        updateOffset = updateOffset == null ? true : updateOffset;
4101
4102        if (months) {
4103            setMonth(mom, get(mom, 'Month') + months * isAdding);
4104        }
4105        if (days) {
4106            set$1(mom, 'Date', get(mom, 'Date') + days * isAdding);
4107        }
4108        if (milliseconds) {
4109            mom._d.setTime(mom._d.valueOf() + milliseconds * isAdding);
4110        }
4111        if (updateOffset) {
4112            hooks.updateOffset(mom, days || months);
4113        }
4114    }
4115
4116    var add = createAdder(1, 'add'),
4117        subtract = createAdder(-1, 'subtract');
4118
4119    function isString(input) {
4120        return typeof input === 'string' || input instanceof String;
4121    }
4122
4123    // type MomentInput = Moment | Date | string | number | (number | string)[] | MomentInputObject | void; // null | undefined
4124    function isMomentInput(input) {
4125        return (
4126            isMoment(input) ||
4127            isDate(input) ||
4128            isString(input) ||
4129            isNumber(input) ||
4130            isNumberOrStringArray(input) ||
4131            isMomentInputObject(input) ||
4132            input === null ||
4133            input === undefined
4134        );
4135    }
4136
4137    function isMomentInputObject(input) {
4138        var objectTest = isObject(input) && !isObjectEmpty(input),
4139            propertyTest = false,
4140            properties = [
4141                'years',
4142                'year',
4143                'y',
4144                'months',
4145                'month',
4146                'M',
4147                'days',
4148                'day',
4149                'd',
4150                'dates',
4151                'date',
4152                'D',
4153                'hours',
4154                'hour',
4155                'h',
4156                'minutes',
4157                'minute',
4158                'm',
4159                'seconds',
4160                'second',
4161                's',
4162                'milliseconds',
4163                'millisecond',
4164                'ms',
4165            ],
4166            i,
4167            property,
4168            propertyLen = properties.length;
4169
4170        for (i = 0; i < propertyLen; i += 1) {
4171            property = properties[i];
4172            propertyTest = propertyTest || hasOwnProp(input, property);
4173        }
4174
4175        return objectTest && propertyTest;
4176    }
4177
4178    function isNumberOrStringArray(input) {
4179        var arrayTest = isArray(input),
4180            dataTypeTest = false;
4181        if (arrayTest) {
4182            dataTypeTest =
4183                input.filter(function (item) {
4184                    return !isNumber(item) && isString(input);
4185                }).length === 0;
4186        }
4187        return arrayTest && dataTypeTest;
4188    }
4189
4190    function isCalendarSpec(input) {
4191        var objectTest = isObject(input) && !isObjectEmpty(input),
4192            propertyTest = false,
4193            properties = [
4194                'sameDay',
4195                'nextDay',
4196                'lastDay',
4197                'nextWeek',
4198                'lastWeek',
4199                'sameElse',
4200            ],
4201            i,
4202            property;
4203
4204        for (i = 0; i < properties.length; i += 1) {
4205            property = properties[i];
4206            propertyTest = propertyTest || hasOwnProp(input, property);
4207        }
4208
4209        return objectTest && propertyTest;
4210    }
4211
4212    function getCalendarFormat(myMoment, now) {
4213        var diff = myMoment.diff(now, 'days', true);
4214        return diff < -6
4215            ? 'sameElse'
4216            : diff < -1
4217            ? 'lastWeek'
4218            : diff < 0
4219            ? 'lastDay'
4220            : diff < 1
4221            ? 'sameDay'
4222            : diff < 2
4223            ? 'nextDay'
4224            : diff < 7
4225            ? 'nextWeek'
4226            : 'sameElse';
4227    }
4228
4229    function calendar$1(time, formats) {
4230        // Support for single parameter, formats only overload to the calendar function
4231        if (arguments.length === 1) {
4232            if (!arguments[0]) {
4233                time = undefined;
4234                formats = undefined;
4235            } else if (isMomentInput(arguments[0])) {
4236                time = arguments[0];
4237                formats = undefined;
4238            } else if (isCalendarSpec(arguments[0])) {
4239                formats = arguments[0];
4240                time = undefined;
4241            }
4242        }
4243        // We want to compare the start of today, vs this.
4244        // Getting start-of-today depends on whether we're local/utc/offset or not.
4245        var now = time || createLocal(),
4246            sod = cloneWithOffset(now, this).startOf('day'),
4247            format = hooks.calendarFormat(this, sod) || 'sameElse',
4248            output =
4249                formats &&
4250                (isFunction(formats[format])
4251                    ? formats[format].call(this, now)
4252                    : formats[format]);
4253
4254        return this.format(
4255            output || this.localeData().calendar(format, this, createLocal(now))
4256        );
4257    }
4258
4259    function clone() {
4260        return new Moment(this);
4261    }
4262
4263    function isAfter(input, units) {
4264        var localInput = isMoment(input) ? input : createLocal(input);
4265        if (!(this.isValid() && localInput.isValid())) {
4266            return false;
4267        }
4268        units = normalizeUnits(units) || 'millisecond';
4269        if (units === 'millisecond') {
4270            return this.valueOf() > localInput.valueOf();
4271        } else {
4272            return localInput.valueOf() < this.clone().startOf(units).valueOf();
4273        }
4274    }
4275
4276    function isBefore(input, units) {
4277        var localInput = isMoment(input) ? input : createLocal(input);
4278        if (!(this.isValid() && localInput.isValid())) {
4279            return false;
4280        }
4281        units = normalizeUnits(units) || 'millisecond';
4282        if (units === 'millisecond') {
4283            return this.valueOf() < localInput.valueOf();
4284        } else {
4285            return this.clone().endOf(units).valueOf() < localInput.valueOf();
4286        }
4287    }
4288
4289    function isBetween(from, to, units, inclusivity) {
4290        var localFrom = isMoment(from) ? from : createLocal(from),
4291            localTo = isMoment(to) ? to : createLocal(to);
4292        if (!(this.isValid() && localFrom.isValid() && localTo.isValid())) {
4293            return false;
4294        }
4295        inclusivity = inclusivity || '()';
4296        return (
4297            (inclusivity[0] === '('
4298                ? this.isAfter(localFrom, units)
4299                : !this.isBefore(localFrom, units)) &&
4300            (inclusivity[1] === ')'
4301                ? this.isBefore(localTo, units)
4302                : !this.isAfter(localTo, units))
4303        );
4304    }
4305
4306    function isSame(input, units) {
4307        var localInput = isMoment(input) ? input : createLocal(input),
4308            inputMs;
4309        if (!(this.isValid() && localInput.isValid())) {
4310            return false;
4311        }
4312        units = normalizeUnits(units) || 'millisecond';
4313        if (units === 'millisecond') {
4314            return this.valueOf() === localInput.valueOf();
4315        } else {
4316            inputMs = localInput.valueOf();
4317            return (
4318                this.clone().startOf(units).valueOf() <= inputMs &&
4319                inputMs <= this.clone().endOf(units).valueOf()
4320            );
4321        }
4322    }
4323
4324    function isSameOrAfter(input, units) {
4325        return this.isSame(input, units) || this.isAfter(input, units);
4326    }
4327
4328    function isSameOrBefore(input, units) {
4329        return this.isSame(input, units) || this.isBefore(input, units);
4330    }
4331
4332    function diff(input, units, asFloat) {
4333        var that, zoneDelta, output;
4334
4335        if (!this.isValid()) {
4336            return NaN;
4337        }
4338
4339        that = cloneWithOffset(input, this);
4340
4341        if (!that.isValid()) {
4342            return NaN;
4343        }
4344
4345        zoneDelta = (that.utcOffset() - this.utcOffset()) * 6e4;
4346
4347        units = normalizeUnits(units);
4348
4349        switch (units) {
4350            case 'year':
4351                output = monthDiff(this, that) / 12;
4352                break;
4353            case 'month':
4354                output = monthDiff(this, that);
4355                break;
4356            case 'quarter':
4357                output = monthDiff(this, that) / 3;
4358                break;
4359            case 'second':
4360                output = (this - that) / 1e3;
4361                break; // 1000
4362            case 'minute':
4363                output = (this - that) / 6e4;
4364                break; // 1000 * 60
4365            case 'hour':
4366                output = (this - that) / 36e5;
4367                break; // 1000 * 60 * 60
4368            case 'day':
4369                output = (this - that - zoneDelta) / 864e5;
4370                break; // 1000 * 60 * 60 * 24, negate dst
4371            case 'week':
4372                output = (this - that - zoneDelta) / 6048e5;
4373                break; // 1000 * 60 * 60 * 24 * 7, negate dst
4374            default:
4375                output = this - that;
4376        }
4377
4378        return asFloat ? output : absFloor(output);
4379    }
4380
4381    function monthDiff(a, b) {
4382        if (a.date() < b.date()) {
4383            // end-of-month calculations work correct when the start month has more
4384            // days than the end month.
4385            return -monthDiff(b, a);
4386        }
4387        // difference in months
4388        var wholeMonthDiff = (b.year() - a.year()) * 12 + (b.month() - a.month()),
4389            // b is in (anchor - 1 month, anchor + 1 month)
4390            anchor = a.clone().add(wholeMonthDiff, 'months'),
4391            anchor2,
4392            adjust;
4393
4394        if (b - anchor < 0) {
4395            anchor2 = a.clone().add(wholeMonthDiff - 1, 'months');
4396            // linear across the month
4397            adjust = (b - anchor) / (anchor - anchor2);
4398        } else {
4399            anchor2 = a.clone().add(wholeMonthDiff + 1, 'months');
4400            // linear across the month
4401            adjust = (b - anchor) / (anchor2 - anchor);
4402        }
4403
4404        //check for negative zero, return zero if negative zero
4405        return -(wholeMonthDiff + adjust) || 0;
4406    }
4407
4408    hooks.defaultFormat = 'YYYY-MM-DDTHH:mm:ssZ';
4409    hooks.defaultFormatUtc = 'YYYY-MM-DDTHH:mm:ss[Z]';
4410
4411    function toString() {
4412        return this.clone().locale('en').format('ddd MMM DD YYYY HH:mm:ss [GMT]ZZ');
4413    }
4414
4415    function toISOString(keepOffset) {
4416        if (!this.isValid()) {
4417            return null;
4418        }
4419        var utc = keepOffset !== true,
4420            m = utc ? this.clone().utc() : this;
4421        if (m.year() < 0 || m.year() > 9999) {
4422            return formatMoment(
4423                m,
4424                utc
4425                    ? 'YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]'
4426                    : 'YYYYYY-MM-DD[T]HH:mm:ss.SSSZ'
4427            );
4428        }
4429        if (isFunction(Date.prototype.toISOString)) {
4430            // native implementation is ~50x faster, use it when we can
4431            if (utc) {
4432                return this.toDate().toISOString();
4433            } else {
4434                return new Date(this.valueOf() + this.utcOffset() * 60 * 1000)
4435                    .toISOString()
4436                    .replace('Z', formatMoment(m, 'Z'));
4437            }
4438        }
4439        return formatMoment(
4440            m,
4441            utc ? 'YYYY-MM-DD[T]HH:mm:ss.SSS[Z]' : 'YYYY-MM-DD[T]HH:mm:ss.SSSZ'
4442        );
4443    }
4444
4445    /**
4446     * Return a human readable representation of a moment that can
4447     * also be evaluated to get a new moment which is the same
4448     *
4449     * @link https://nodejs.org/dist/latest/docs/api/util.html#util_custom_inspect_function_on_objects
4450     */
4451    function inspect() {
4452        if (!this.isValid()) {
4453            return 'moment.invalid(/* ' + this._i + ' */)';
4454        }
4455        var func = 'moment',
4456            zone = '',
4457            prefix,
4458            year,
4459            datetime,
4460            suffix;
4461        if (!this.isLocal()) {
4462            func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';
4463            zone = 'Z';
4464        }
4465        prefix = '[' + func + '("]';
4466        year = 0 <= this.year() && this.year() <= 9999 ? 'YYYY' : 'YYYYYY';
4467        datetime = '-MM-DD[T]HH:mm:ss.SSS';
4468        suffix = zone + '[")]';
4469
4470        return this.format(prefix + year + datetime + suffix);
4471    }
4472
4473    function format(inputString) {
4474        if (!inputString) {
4475            inputString = this.isUtc()
4476                ? hooks.defaultFormatUtc
4477                : hooks.defaultFormat;
4478        }
4479        var output = formatMoment(this, inputString);
4480        return this.localeData().postformat(output);
4481    }
4482
4483    function from(time, withoutSuffix) {
4484        if (
4485            this.isValid() &&
4486            ((isMoment(time) && time.isValid()) || createLocal(time).isValid())
4487        ) {
4488            return createDuration({ to: this, from: time })
4489                .locale(this.locale())
4490                .humanize(!withoutSuffix);
4491        } else {
4492            return this.localeData().invalidDate();
4493        }
4494    }
4495
4496    function fromNow(withoutSuffix) {
4497        return this.from(createLocal(), withoutSuffix);
4498    }
4499
4500    function to(time, withoutSuffix) {
4501        if (
4502            this.isValid() &&
4503            ((isMoment(time) && time.isValid()) || createLocal(time).isValid())
4504        ) {
4505            return createDuration({ from: this, to: time })
4506                .locale(this.locale())
4507                .humanize(!withoutSuffix);
4508        } else {
4509            return this.localeData().invalidDate();
4510        }
4511    }
4512
4513    function toNow(withoutSuffix) {
4514        return this.to(createLocal(), withoutSuffix);
4515    }
4516
4517    // If passed a locale key, it will set the locale for this
4518    // instance.  Otherwise, it will return the locale configuration
4519    // variables for this instance.
4520    function locale(key) {
4521        var newLocaleData;
4522
4523        if (key === undefined) {
4524            return this._locale._abbr;
4525        } else {
4526            newLocaleData = getLocale(key);
4527            if (newLocaleData != null) {
4528                this._locale = newLocaleData;
4529            }
4530            return this;
4531        }
4532    }
4533
4534    var lang = deprecate(
4535        'moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.',
4536        function (key) {
4537            if (key === undefined) {
4538                return this.localeData();
4539            } else {
4540                return this.locale(key);
4541            }
4542        }
4543    );
4544
4545    function localeData() {
4546        return this._locale;
4547    }
4548
4549    var MS_PER_SECOND = 1000,
4550        MS_PER_MINUTE = 60 * MS_PER_SECOND,
4551        MS_PER_HOUR = 60 * MS_PER_MINUTE,
4552        MS_PER_400_YEARS = (365 * 400 + 97) * 24 * MS_PER_HOUR;
4553
4554    // actual modulo - handles negative numbers (for dates before 1970):
4555    function mod$1(dividend, divisor) {
4556        return ((dividend % divisor) + divisor) % divisor;
4557    }
4558
4559    function localStartOfDate(y, m, d) {
4560        // the date constructor remaps years 0-99 to 1900-1999
4561        if (y < 100 && y >= 0) {
4562            // preserve leap years using a full 400 year cycle, then reset
4563            return new Date(y + 400, m, d) - MS_PER_400_YEARS;
4564        } else {
4565            return new Date(y, m, d).valueOf();
4566        }
4567    }
4568
4569    function utcStartOfDate(y, m, d) {
4570        // Date.UTC remaps years 0-99 to 1900-1999
4571        if (y < 100 && y >= 0) {
4572            // preserve leap years using a full 400 year cycle, then reset
4573            return Date.UTC(y + 400, m, d) - MS_PER_400_YEARS;
4574        } else {
4575            return Date.UTC(y, m, d);
4576        }
4577    }
4578
4579    function startOf(units) {
4580        var time, startOfDate;
4581        units = normalizeUnits(units);
4582        if (units === undefined || units === 'millisecond' || !this.isValid()) {
4583            return this;
4584        }
4585
4586        startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate;
4587
4588        switch (units) {
4589            case 'year':
4590                time = startOfDate(this.year(), 0, 1);
4591                break;
4592            case 'quarter':
4593                time = startOfDate(
4594                    this.year(),
4595                    this.month() - (this.month() % 3),
4596                    1
4597                );
4598                break;
4599            case 'month':
4600                time = startOfDate(this.year(), this.month(), 1);
4601                break;
4602            case 'week':
4603                time = startOfDate(
4604                    this.year(),
4605                    this.month(),
4606                    this.date() - this.weekday()
4607                );
4608                break;
4609            case 'isoWeek':
4610                time = startOfDate(
4611                    this.year(),
4612                    this.month(),
4613                    this.date() - (this.isoWeekday() - 1)
4614                );
4615                break;
4616            case 'day':
4617            case 'date':
4618                time = startOfDate(this.year(), this.month(), this.date());
4619                break;
4620            case 'hour':
4621                time = this._d.valueOf();
4622                time -= mod$1(
4623                    time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE),
4624                    MS_PER_HOUR
4625                );
4626                break;
4627            case 'minute':
4628                time = this._d.valueOf();
4629                time -= mod$1(time, MS_PER_MINUTE);
4630                break;
4631            case 'second':
4632                time = this._d.valueOf();
4633                time -= mod$1(time, MS_PER_SECOND);
4634                break;
4635        }
4636
4637        this._d.setTime(time);
4638        hooks.updateOffset(this, true);
4639        return this;
4640    }
4641
4642    function endOf(units) {
4643        var time, startOfDate;
4644        units = normalizeUnits(units);
4645        if (units === undefined || units === 'millisecond' || !this.isValid()) {
4646            return this;
4647        }
4648
4649        startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate;
4650
4651        switch (units) {
4652            case 'year':
4653                time = startOfDate(this.year() + 1, 0, 1) - 1;
4654                break;
4655            case 'quarter':
4656                time =
4657                    startOfDate(
4658                        this.year(),
4659                        this.month() - (this.month() % 3) + 3,
4660                        1
4661                    ) - 1;
4662                break;
4663            case 'month':
4664                time = startOfDate(this.year(), this.month() + 1, 1) - 1;
4665                break;
4666            case 'week':
4667                time =
4668                    startOfDate(
4669                        this.year(),
4670                        this.month(),
4671                        this.date() - this.weekday() + 7
4672                    ) - 1;
4673                break;
4674            case 'isoWeek':
4675                time =
4676                    startOfDate(
4677                        this.year(),
4678                        this.month(),
4679                        this.date() - (this.isoWeekday() - 1) + 7
4680                    ) - 1;
4681                break;
4682            case 'day':
4683            case 'date':
4684                time = startOfDate(this.year(), this.month(), this.date() + 1) - 1;
4685                break;
4686            case 'hour':
4687                time = this._d.valueOf();
4688                time +=
4689                    MS_PER_HOUR -
4690                    mod$1(
4691                        time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE),
4692                        MS_PER_HOUR
4693                    ) -
4694                    1;
4695                break;
4696            case 'minute':
4697                time = this._d.valueOf();
4698                time += MS_PER_MINUTE - mod$1(time, MS_PER_MINUTE) - 1;
4699                break;
4700            case 'second':
4701                time = this._d.valueOf();
4702                time += MS_PER_SECOND - mod$1(time, MS_PER_SECOND) - 1;
4703                break;
4704        }
4705
4706        this._d.setTime(time);
4707        hooks.updateOffset(this, true);
4708        return this;
4709    }
4710
4711    function valueOf() {
4712        return this._d.valueOf() - (this._offset || 0) * 60000;
4713    }
4714
4715    function unix() {
4716        return Math.floor(this.valueOf() / 1000);
4717    }
4718
4719    function toDate() {
4720        return new Date(this.valueOf());
4721    }
4722
4723    function toArray() {
4724        var m = this;
4725        return [
4726            m.year(),
4727            m.month(),
4728            m.date(),
4729            m.hour(),
4730            m.minute(),
4731            m.second(),
4732            m.millisecond(),
4733        ];
4734    }
4735
4736    function toObject() {
4737        var m = this;
4738        return {
4739            years: m.year(),
4740            months: m.month(),
4741            date: m.date(),
4742            hours: m.hours(),
4743            minutes: m.minutes(),
4744            seconds: m.seconds(),
4745            milliseconds: m.milliseconds(),
4746        };
4747    }
4748
4749    function toJSON() {
4750        // new Date(NaN).toJSON() === null
4751        return this.isValid() ? this.toISOString() : null;
4752    }
4753
4754    function isValid$2() {
4755        return isValid(this);
4756    }
4757
4758    function parsingFlags() {
4759        return extend({}, getParsingFlags(this));
4760    }
4761
4762    function invalidAt() {
4763        return getParsingFlags(this).overflow;
4764    }
4765
4766    function creationData() {
4767        return {
4768            input: this._i,
4769            format: this._f,
4770            locale: this._locale,
4771            isUTC: this._isUTC,
4772            strict: this._strict,
4773        };
4774    }
4775
4776    addFormatToken('N', 0, 0, 'eraAbbr');
4777    addFormatToken('NN', 0, 0, 'eraAbbr');
4778    addFormatToken('NNN', 0, 0, 'eraAbbr');
4779    addFormatToken('NNNN', 0, 0, 'eraName');
4780    addFormatToken('NNNNN', 0, 0, 'eraNarrow');
4781
4782    addFormatToken('y', ['y', 1], 'yo', 'eraYear');
4783    addFormatToken('y', ['yy', 2], 0, 'eraYear');
4784    addFormatToken('y', ['yyy', 3], 0, 'eraYear');
4785    addFormatToken('y', ['yyyy', 4], 0, 'eraYear');
4786
4787    addRegexToken('N', matchEraAbbr);
4788    addRegexToken('NN', matchEraAbbr);
4789    addRegexToken('NNN', matchEraAbbr);
4790    addRegexToken('NNNN', matchEraName);
4791    addRegexToken('NNNNN', matchEraNarrow);
4792
4793    addParseToken(
4794        ['N', 'NN', 'NNN', 'NNNN', 'NNNNN'],
4795        function (input, array, config, token) {
4796            var era = config._locale.erasParse(input, token, config._strict);
4797            if (era) {
4798                getParsingFlags(config).era = era;
4799            } else {
4800                getParsingFlags(config).invalidEra = input;
4801            }
4802        }
4803    );
4804
4805    addRegexToken('y', matchUnsigned);
4806    addRegexToken('yy', matchUnsigned);
4807    addRegexToken('yyy', matchUnsigned);
4808    addRegexToken('yyyy', matchUnsigned);
4809    addRegexToken('yo', matchEraYearOrdinal);
4810
4811    addParseToken(['y', 'yy', 'yyy', 'yyyy'], YEAR);
4812    addParseToken(['yo'], function (input, array, config, token) {
4813        var match;
4814        if (config._locale._eraYearOrdinalRegex) {
4815            match = input.match(config._locale._eraYearOrdinalRegex);
4816        }
4817
4818        if (config._locale.eraYearOrdinalParse) {
4819            array[YEAR] = config._locale.eraYearOrdinalParse(input, match);
4820        } else {
4821            array[YEAR] = parseInt(input, 10);
4822        }
4823    });
4824
4825    function localeEras(m, format) {
4826        var i,
4827            l,
4828            date,
4829            eras = this._eras || getLocale('en')._eras;
4830        for (i = 0, l = eras.length; i < l; ++i) {
4831            switch (typeof eras[i].since) {
4832                case 'string':
4833                    // truncate time
4834                    date = hooks(eras[i].since).startOf('day');
4835                    eras[i].since = date.valueOf();
4836                    break;
4837            }
4838
4839            switch (typeof eras[i].until) {
4840                case 'undefined':
4841                    eras[i].until = +Infinity;
4842                    break;
4843                case 'string':
4844                    // truncate time
4845                    date = hooks(eras[i].until).startOf('day').valueOf();
4846                    eras[i].until = date.valueOf();
4847                    break;
4848            }
4849        }
4850        return eras;
4851    }
4852
4853    function localeErasParse(eraName, format, strict) {
4854        var i,
4855            l,
4856            eras = this.eras(),
4857            name,
4858            abbr,
4859            narrow;
4860        eraName = eraName.toUpperCase();
4861
4862        for (i = 0, l = eras.length; i < l; ++i) {
4863            name = eras[i].name.toUpperCase();
4864            abbr = eras[i].abbr.toUpperCase();
4865            narrow = eras[i].narrow.toUpperCase();
4866
4867            if (strict) {
4868                switch (format) {
4869                    case 'N':
4870                    case 'NN':
4871                    case 'NNN':
4872                        if (abbr === eraName) {
4873                            return eras[i];
4874                        }
4875                        break;
4876
4877                    case 'NNNN':
4878                        if (name === eraName) {
4879                            return eras[i];
4880                        }
4881                        break;
4882
4883                    case 'NNNNN':
4884                        if (narrow === eraName) {
4885                            return eras[i];
4886                        }
4887                        break;
4888                }
4889            } else if ([name, abbr, narrow].indexOf(eraName) >= 0) {
4890                return eras[i];
4891            }
4892        }
4893    }
4894
4895    function localeErasConvertYear(era, year) {
4896        var dir = era.since <= era.until ? +1 : -1;
4897        if (year === undefined) {
4898            return hooks(era.since).year();
4899        } else {
4900            return hooks(era.since).year() + (year - era.offset) * dir;
4901        }
4902    }
4903
4904    function getEraName() {
4905        var i,
4906            l,
4907            val,
4908            eras = this.localeData().eras();
4909        for (i = 0, l = eras.length; i < l; ++i) {
4910            // truncate time
4911            val = this.clone().startOf('day').valueOf();
4912
4913            if (eras[i].since <= val && val <= eras[i].until) {
4914                return eras[i].name;
4915            }
4916            if (eras[i].until <= val && val <= eras[i].since) {
4917                return eras[i].name;
4918            }
4919        }
4920
4921        return '';
4922    }
4923
4924    function getEraNarrow() {
4925        var i,
4926            l,
4927            val,
4928            eras = this.localeData().eras();
4929        for (i = 0, l = eras.length; i < l; ++i) {
4930            // truncate time
4931            val = this.clone().startOf('day').valueOf();
4932
4933            if (eras[i].since <= val && val <= eras[i].until) {
4934                return eras[i].narrow;
4935            }
4936            if (eras[i].until <= val && val <= eras[i].since) {
4937                return eras[i].narrow;
4938            }
4939        }
4940
4941        return '';
4942    }
4943
4944    function getEraAbbr() {
4945        var i,
4946            l,
4947            val,
4948            eras = this.localeData().eras();
4949        for (i = 0, l = eras.length; i < l; ++i) {
4950            // truncate time
4951            val = this.clone().startOf('day').valueOf();
4952
4953            if (eras[i].since <= val && val <= eras[i].until) {
4954                return eras[i].abbr;
4955            }
4956            if (eras[i].until <= val && val <= eras[i].since) {
4957                return eras[i].abbr;
4958            }
4959        }
4960
4961        return '';
4962    }
4963
4964    function getEraYear() {
4965        var i,
4966            l,
4967            dir,
4968            val,
4969            eras = this.localeData().eras();
4970        for (i = 0, l = eras.length; i < l; ++i) {
4971            dir = eras[i].since <= eras[i].until ? +1 : -1;
4972
4973            // truncate time
4974            val = this.clone().startOf('day').valueOf();
4975
4976            if (
4977                (eras[i].since <= val && val <= eras[i].until) ||
4978                (eras[i].until <= val && val <= eras[i].since)
4979            ) {
4980                return (
4981                    (this.year() - hooks(eras[i].since).year()) * dir +
4982                    eras[i].offset
4983                );
4984            }
4985        }
4986
4987        return this.year();
4988    }
4989
4990    function erasNameRegex(isStrict) {
4991        if (!hasOwnProp(this, '_erasNameRegex')) {
4992            computeErasParse.call(this);
4993        }
4994        return isStrict ? this._erasNameRegex : this._erasRegex;
4995    }
4996
4997    function erasAbbrRegex(isStrict) {
4998        if (!hasOwnProp(this, '_erasAbbrRegex')) {
4999            computeErasParse.call(this);
5000        }
5001        return isStrict ? this._erasAbbrRegex : this._erasRegex;
5002    }
5003
5004    function erasNarrowRegex(isStrict) {
5005        if (!hasOwnProp(this, '_erasNarrowRegex')) {
5006            computeErasParse.call(this);
5007        }
5008        return isStrict ? this._erasNarrowRegex : this._erasRegex;
5009    }
5010
5011    function matchEraAbbr(isStrict, locale) {
5012        return locale.erasAbbrRegex(isStrict);
5013    }
5014
5015    function matchEraName(isStrict, locale) {
5016        return locale.erasNameRegex(isStrict);
5017    }
5018
5019    function matchEraNarrow(isStrict, locale) {
5020        return locale.erasNarrowRegex(isStrict);
5021    }
5022
5023    function matchEraYearOrdinal(isStrict, locale) {
5024        return locale._eraYearOrdinalRegex || matchUnsigned;
5025    }
5026
5027    function computeErasParse() {
5028        var abbrPieces = [],
5029            namePieces = [],
5030            narrowPieces = [],
5031            mixedPieces = [],
5032            i,
5033            l,
5034            eras = this.eras();
5035
5036        for (i = 0, l = eras.length; i < l; ++i) {
5037            namePieces.push(regexEscape(eras[i].name));
5038            abbrPieces.push(regexEscape(eras[i].abbr));
5039            narrowPieces.push(regexEscape(eras[i].narrow));
5040
5041            mixedPieces.push(regexEscape(eras[i].name));
5042            mixedPieces.push(regexEscape(eras[i].abbr));
5043            mixedPieces.push(regexEscape(eras[i].narrow));
5044        }
5045
5046        this._erasRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');
5047        this._erasNameRegex = new RegExp('^(' + namePieces.join('|') + ')', 'i');
5048        this._erasAbbrRegex = new RegExp('^(' + abbrPieces.join('|') + ')', 'i');
5049        this._erasNarrowRegex = new RegExp(
5050            '^(' + narrowPieces.join('|') + ')',
5051            'i'
5052        );
5053    }
5054
5055    // FORMATTING
5056
5057    addFormatToken(0, ['gg', 2], 0, function () {
5058        return this.weekYear() % 100;
5059    });
5060
5061    addFormatToken(0, ['GG', 2], 0, function () {
5062        return this.isoWeekYear() % 100;
5063    });
5064
5065    function addWeekYearFormatToken(token, getter) {
5066        addFormatToken(0, [token, token.length], 0, getter);
5067    }
5068
5069    addWeekYearFormatToken('gggg', 'weekYear');
5070    addWeekYearFormatToken('ggggg', 'weekYear');
5071    addWeekYearFormatToken('GGGG', 'isoWeekYear');
5072    addWeekYearFormatToken('GGGGG', 'isoWeekYear');
5073
5074    // ALIASES
5075
5076    addUnitAlias('weekYear', 'gg');
5077    addUnitAlias('isoWeekYear', 'GG');
5078
5079    // PRIORITY
5080
5081    addUnitPriority('weekYear', 1);
5082    addUnitPriority('isoWeekYear', 1);
5083
5084    // PARSING
5085
5086    addRegexToken('G', matchSigned);
5087    addRegexToken('g', matchSigned);
5088    addRegexToken('GG', match1to2, match2);
5089    addRegexToken('gg', match1to2, match2);
5090    addRegexToken('GGGG', match1to4, match4);
5091    addRegexToken('gggg', match1to4, match4);
5092    addRegexToken('GGGGG', match1to6, match6);
5093    addRegexToken('ggggg', match1to6, match6);
5094
5095    addWeekParseToken(
5096        ['gggg', 'ggggg', 'GGGG', 'GGGGG'],
5097        function (input, week, config, token) {
5098            week[token.substr(0, 2)] = toInt(input);
5099        }
5100    );
5101
5102    addWeekParseToken(['gg', 'GG'], function (input, week, config, token) {
5103        week[token] = hooks.parseTwoDigitYear(input);
5104    });
5105
5106    // MOMENTS
5107
5108    function getSetWeekYear(input) {
5109        return getSetWeekYearHelper.call(
5110            this,
5111            input,
5112            this.week(),
5113            this.weekday(),
5114            this.localeData()._week.dow,
5115            this.localeData()._week.doy
5116        );
5117    }
5118
5119    function getSetISOWeekYear(input) {
5120        return getSetWeekYearHelper.call(
5121            this,
5122            input,
5123            this.isoWeek(),
5124            this.isoWeekday(),
5125            1,
5126            4
5127        );
5128    }
5129
5130    function getISOWeeksInYear() {
5131        return weeksInYear(this.year(), 1, 4);
5132    }
5133
5134    function getISOWeeksInISOWeekYear() {
5135        return weeksInYear(this.isoWeekYear(), 1, 4);
5136    }
5137
5138    function getWeeksInYear() {
5139        var weekInfo = this.localeData()._week;
5140        return weeksInYear(this.year(), weekInfo.dow, weekInfo.doy);
5141    }
5142
5143    function getWeeksInWeekYear() {
5144        var weekInfo = this.localeData()._week;
5145        return weeksInYear(this.weekYear(), weekInfo.dow, weekInfo.doy);
5146    }
5147
5148    function getSetWeekYearHelper(input, week, weekday, dow, doy) {
5149        var weeksTarget;
5150        if (input == null) {
5151            return weekOfYear(this, dow, doy).year;
5152        } else {
5153            weeksTarget = weeksInYear(input, dow, doy);
5154            if (week > weeksTarget) {
5155                week = weeksTarget;
5156            }
5157            return setWeekAll.call(this, input, week, weekday, dow, doy);
5158        }
5159    }
5160
5161    function setWeekAll(weekYear, week, weekday, dow, doy) {
5162        var dayOfYearData = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy),
5163            date = createUTCDate(dayOfYearData.year, 0, dayOfYearData.dayOfYear);
5164
5165        this.year(date.getUTCFullYear());
5166        this.month(date.getUTCMonth());
5167        this.date(date.getUTCDate());
5168        return this;
5169    }
5170
5171    // FORMATTING
5172
5173    addFormatToken('Q', 0, 'Qo', 'quarter');
5174
5175    // ALIASES
5176
5177    addUnitAlias('quarter', 'Q');
5178
5179    // PRIORITY
5180
5181    addUnitPriority('quarter', 7);
5182
5183    // PARSING
5184
5185    addRegexToken('Q', match1);
5186    addParseToken('Q', function (input, array) {
5187        array[MONTH] = (toInt(input) - 1) * 3;
5188    });
5189
5190    // MOMENTS
5191
5192    function getSetQuarter(input) {
5193        return input == null
5194            ? Math.ceil((this.month() + 1) / 3)
5195            : this.month((input - 1) * 3 + (this.month() % 3));
5196    }
5197
5198    // FORMATTING
5199
5200    addFormatToken('D', ['DD', 2], 'Do', 'date');
5201
5202    // ALIASES
5203
5204    addUnitAlias('date', 'D');
5205
5206    // PRIORITY
5207    addUnitPriority('date', 9);
5208
5209    // PARSING
5210
5211    addRegexToken('D', match1to2);
5212    addRegexToken('DD', match1to2, match2);
5213    addRegexToken('Do', function (isStrict, locale) {
5214        // TODO: Remove "ordinalParse" fallback in next major release.
5215        return isStrict
5216            ? locale._dayOfMonthOrdinalParse || locale._ordinalParse
5217            : locale._dayOfMonthOrdinalParseLenient;
5218    });
5219
5220    addParseToken(['D', 'DD'], DATE);
5221    addParseToken('Do', function (input, array) {
5222        array[DATE] = toInt(input.match(match1to2)[0]);
5223    });
5224
5225    // MOMENTS
5226
5227    var getSetDayOfMonth = makeGetSet('Date', true);
5228
5229    // FORMATTING
5230
5231    addFormatToken('DDD', ['DDDD', 3], 'DDDo', 'dayOfYear');
5232
5233    // ALIASES
5234
5235    addUnitAlias('dayOfYear', 'DDD');
5236
5237    // PRIORITY
5238    addUnitPriority('dayOfYear', 4);
5239
5240    // PARSING
5241
5242    addRegexToken('DDD', match1to3);
5243    addRegexToken('DDDD', match3);
5244    addParseToken(['DDD', 'DDDD'], function (input, array, config) {
5245        config._dayOfYear = toInt(input);
5246    });
5247
5248    // HELPERS
5249
5250    // MOMENTS
5251
5252    function getSetDayOfYear(input) {
5253        var dayOfYear =
5254            Math.round(
5255                (this.clone().startOf('day') - this.clone().startOf('year')) / 864e5
5256            ) + 1;
5257        return input == null ? dayOfYear : this.add(input - dayOfYear, 'd');
5258    }
5259
5260    // FORMATTING
5261
5262    addFormatToken('m', ['mm', 2], 0, 'minute');
5263
5264    // ALIASES
5265
5266    addUnitAlias('minute', 'm');
5267
5268    // PRIORITY
5269
5270    addUnitPriority('minute', 14);
5271
5272    // PARSING
5273
5274    addRegexToken('m', match1to2);
5275    addRegexToken('mm', match1to2, match2);
5276    addParseToken(['m', 'mm'], MINUTE);
5277
5278    // MOMENTS
5279
5280    var getSetMinute = makeGetSet('Minutes', false);
5281
5282    // FORMATTING
5283
5284    addFormatToken('s', ['ss', 2], 0, 'second');
5285
5286    // ALIASES
5287
5288    addUnitAlias('second', 's');
5289
5290    // PRIORITY
5291
5292    addUnitPriority('second', 15);
5293
5294    // PARSING
5295
5296    addRegexToken('s', match1to2);
5297    addRegexToken('ss', match1to2, match2);
5298    addParseToken(['s', 'ss'], SECOND);
5299
5300    // MOMENTS
5301
5302    var getSetSecond = makeGetSet('Seconds', false);
5303
5304    // FORMATTING
5305
5306    addFormatToken('S', 0, 0, function () {
5307        return ~~(this.millisecond() / 100);
5308    });
5309
5310    addFormatToken(0, ['SS', 2], 0, function () {
5311        return ~~(this.millisecond() / 10);
5312    });
5313
5314    addFormatToken(0, ['SSS', 3], 0, 'millisecond');
5315    addFormatToken(0, ['SSSS', 4], 0, function () {
5316        return this.millisecond() * 10;
5317    });
5318    addFormatToken(0, ['SSSSS', 5], 0, function () {
5319        return this.millisecond() * 100;
5320    });
5321    addFormatToken(0, ['SSSSSS', 6], 0, function () {
5322        return this.millisecond() * 1000;
5323    });
5324    addFormatToken(0, ['SSSSSSS', 7], 0, function () {
5325        return this.millisecond() * 10000;
5326    });
5327    addFormatToken(0, ['SSSSSSSS', 8], 0, function () {
5328        return this.millisecond() * 100000;
5329    });
5330    addFormatToken(0, ['SSSSSSSSS', 9], 0, function () {
5331        return this.millisecond() * 1000000;
5332    });
5333
5334    // ALIASES
5335
5336    addUnitAlias('millisecond', 'ms');
5337
5338    // PRIORITY
5339
5340    addUnitPriority('millisecond', 16);
5341
5342    // PARSING
5343
5344    addRegexToken('S', match1to3, match1);
5345    addRegexToken('SS', match1to3, match2);
5346    addRegexToken('SSS', match1to3, match3);
5347
5348    var token, getSetMillisecond;
5349    for (token = 'SSSS'; token.length <= 9; token += 'S') {
5350        addRegexToken(token, matchUnsigned);
5351    }
5352
5353    function parseMs(input, array) {
5354        array[MILLISECOND] = toInt(('0.' + input) * 1000);
5355    }
5356
5357    for (token = 'S'; token.length <= 9; token += 'S') {
5358        addParseToken(token, parseMs);
5359    }
5360
5361    getSetMillisecond = makeGetSet('Milliseconds', false);
5362
5363    // FORMATTING
5364
5365    addFormatToken('z', 0, 0, 'zoneAbbr');
5366    addFormatToken('zz', 0, 0, 'zoneName');
5367
5368    // MOMENTS
5369
5370    function getZoneAbbr() {
5371        return this._isUTC ? 'UTC' : '';
5372    }
5373
5374    function getZoneName() {
5375        return this._isUTC ? 'Coordinated Universal Time' : '';
5376    }
5377
5378    var proto = Moment.prototype;
5379
5380    proto.add = add;
5381    proto.calendar = calendar$1;
5382    proto.clone = clone;
5383    proto.diff = diff;
5384    proto.endOf = endOf;
5385    proto.format = format;
5386    proto.from = from;
5387    proto.fromNow = fromNow;
5388    proto.to = to;
5389    proto.toNow = toNow;
5390    proto.get = stringGet;
5391    proto.invalidAt = invalidAt;
5392    proto.isAfter = isAfter;
5393    proto.isBefore = isBefore;
5394    proto.isBetween = isBetween;
5395    proto.isSame = isSame;
5396    proto.isSameOrAfter = isSameOrAfter;
5397    proto.isSameOrBefore = isSameOrBefore;
5398    proto.isValid = isValid$2;
5399    proto.lang = lang;
5400    proto.locale = locale;
5401    proto.localeData = localeData;
5402    proto.max = prototypeMax;
5403    proto.min = prototypeMin;
5404    proto.parsingFlags = parsingFlags;
5405    proto.set = stringSet;
5406    proto.startOf = startOf;
5407    proto.subtract = subtract;
5408    proto.toArray = toArray;
5409    proto.toObject = toObject;
5410    proto.toDate = toDate;
5411    proto.toISOString = toISOString;
5412    proto.inspect = inspect;
5413    if (typeof Symbol !== 'undefined' && Symbol.for != null) {
5414        proto[Symbol.for('nodejs.util.inspect.custom')] = function () {
5415            return 'Moment<' + this.format() + '>';
5416        };
5417    }
5418    proto.toJSON = toJSON;
5419    proto.toString = toString;
5420    proto.unix = unix;
5421    proto.valueOf = valueOf;
5422    proto.creationData = creationData;
5423    proto.eraName = getEraName;
5424    proto.eraNarrow = getEraNarrow;
5425    proto.eraAbbr = getEraAbbr;
5426    proto.eraYear = getEraYear;
5427    proto.year = getSetYear;
5428    proto.isLeapYear = getIsLeapYear;
5429    proto.weekYear = getSetWeekYear;
5430    proto.isoWeekYear = getSetISOWeekYear;
5431    proto.quarter = proto.quarters = getSetQuarter;
5432    proto.month = getSetMonth;
5433    proto.daysInMonth = getDaysInMonth;
5434    proto.week = proto.weeks = getSetWeek;
5435    proto.isoWeek = proto.isoWeeks = getSetISOWeek;
5436    proto.weeksInYear = getWeeksInYear;
5437    proto.weeksInWeekYear = getWeeksInWeekYear;
5438    proto.isoWeeksInYear = getISOWeeksInYear;
5439    proto.isoWeeksInISOWeekYear = getISOWeeksInISOWeekYear;
5440    proto.date = getSetDayOfMonth;
5441    proto.day = proto.days = getSetDayOfWeek;
5442    proto.weekday = getSetLocaleDayOfWeek;
5443    proto.isoWeekday = getSetISODayOfWeek;
5444    proto.dayOfYear = getSetDayOfYear;
5445    proto.hour = proto.hours = getSetHour;
5446    proto.minute = proto.minutes = getSetMinute;
5447    proto.second = proto.seconds = getSetSecond;
5448    proto.millisecond = proto.milliseconds = getSetMillisecond;
5449    proto.utcOffset = getSetOffset;
5450    proto.utc = setOffsetToUTC;
5451    proto.local = setOffsetToLocal;
5452    proto.parseZone = setOffsetToParsedOffset;
5453    proto.hasAlignedHourOffset = hasAlignedHourOffset;
5454    proto.isDST = isDaylightSavingTime;
5455    proto.isLocal = isLocal;
5456    proto.isUtcOffset = isUtcOffset;
5457    proto.isUtc = isUtc;
5458    proto.isUTC = isUtc;
5459    proto.zoneAbbr = getZoneAbbr;
5460    proto.zoneName = getZoneName;
5461    proto.dates = deprecate(
5462        'dates accessor is deprecated. Use date instead.',
5463        getSetDayOfMonth
5464    );
5465    proto.months = deprecate(
5466        'months accessor is deprecated. Use month instead',
5467        getSetMonth
5468    );
5469    proto.years = deprecate(
5470        'years accessor is deprecated. Use year instead',
5471        getSetYear
5472    );
5473    proto.zone = deprecate(
5474        'moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/',
5475        getSetZone
5476    );
5477    proto.isDSTShifted = deprecate(
5478        'isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information',
5479        isDaylightSavingTimeShifted
5480    );
5481
5482    function createUnix(input) {
5483        return createLocal(input * 1000);
5484    }
5485
5486    function createInZone() {
5487        return createLocal.apply(null, arguments).parseZone();
5488    }
5489
5490    function preParsePostFormat(string) {
5491        return string;
5492    }
5493
5494    var proto$1 = Locale.prototype;
5495
5496    proto$1.calendar = calendar;
5497    proto$1.longDateFormat = longDateFormat;
5498    proto$1.invalidDate = invalidDate;
5499    proto$1.ordinal = ordinal;
5500    proto$1.preparse = preParsePostFormat;
5501    proto$1.postformat = preParsePostFormat;
5502    proto$1.relativeTime = relativeTime;
5503    proto$1.pastFuture = pastFuture;
5504    proto$1.set = set;
5505    proto$1.eras = localeEras;
5506    proto$1.erasParse = localeErasParse;
5507    proto$1.erasConvertYear = localeErasConvertYear;
5508    proto$1.erasAbbrRegex = erasAbbrRegex;
5509    proto$1.erasNameRegex = erasNameRegex;
5510    proto$1.erasNarrowRegex = erasNarrowRegex;
5511
5512    proto$1.months = localeMonths;
5513    proto$1.monthsShort = localeMonthsShort;
5514    proto$1.monthsParse = localeMonthsParse;
5515    proto$1.monthsRegex = monthsRegex;
5516    proto$1.monthsShortRegex = monthsShortRegex;
5517    proto$1.week = localeWeek;
5518    proto$1.firstDayOfYear = localeFirstDayOfYear;
5519    proto$1.firstDayOfWeek = localeFirstDayOfWeek;
5520
5521    proto$1.weekdays = localeWeekdays;
5522    proto$1.weekdaysMin = localeWeekdaysMin;
5523    proto$1.weekdaysShort = localeWeekdaysShort;
5524    proto$1.weekdaysParse = localeWeekdaysParse;
5525
5526    proto$1.weekdaysRegex = weekdaysRegex;
5527    proto$1.weekdaysShortRegex = weekdaysShortRegex;
5528    proto$1.weekdaysMinRegex = weekdaysMinRegex;
5529
5530    proto$1.isPM = localeIsPM;
5531    proto$1.meridiem = localeMeridiem;
5532
5533    function get$1(format, index, field, setter) {
5534        var locale = getLocale(),
5535            utc = createUTC().set(setter, index);
5536        return locale[field](utc, format);
5537    }
5538
5539    function listMonthsImpl(format, index, field) {
5540        if (isNumber(format)) {
5541            index = format;
5542            format = undefined;
5543        }
5544
5545        format = format || '';
5546
5547        if (index != null) {
5548            return get$1(format, index, field, 'month');
5549        }
5550
5551        var i,
5552            out = [];
5553        for (i = 0; i < 12; i++) {
5554            out[i] = get$1(format, i, field, 'month');
5555        }
5556        return out;
5557    }
5558
5559    // ()
5560    // (5)
5561    // (fmt, 5)
5562    // (fmt)
5563    // (true)
5564    // (true, 5)
5565    // (true, fmt, 5)
5566    // (true, fmt)
5567    function listWeekdaysImpl(localeSorted, format, index, field) {
5568        if (typeof localeSorted === 'boolean') {
5569            if (isNumber(format)) {
5570                index = format;
5571                format = undefined;
5572            }
5573
5574            format = format || '';
5575        } else {
5576            format = localeSorted;
5577            index = format;
5578            localeSorted = false;
5579
5580            if (isNumber(format)) {
5581                index = format;
5582                format = undefined;
5583            }
5584
5585            format = format || '';
5586        }
5587
5588        var locale = getLocale(),
5589            shift = localeSorted ? locale._week.dow : 0,
5590            i,
5591            out = [];
5592
5593        if (index != null) {
5594            return get$1(format, (index + shift) % 7, field, 'day');
5595        }
5596
5597        for (i = 0; i < 7; i++) {
5598            out[i] = get$1(format, (i + shift) % 7, field, 'day');
5599        }
5600        return out;
5601    }
5602
5603    function listMonths(format, index) {
5604        return listMonthsImpl(format, index, 'months');
5605    }
5606
5607    function listMonthsShort(format, index) {
5608        return listMonthsImpl(format, index, 'monthsShort');
5609    }
5610
5611    function listWeekdays(localeSorted, format, index) {
5612        return listWeekdaysImpl(localeSorted, format, index, 'weekdays');
5613    }
5614
5615    function listWeekdaysShort(localeSorted, format, index) {
5616        return listWeekdaysImpl(localeSorted, format, index, 'weekdaysShort');
5617    }
5618
5619    function listWeekdaysMin(localeSorted, format, index) {
5620        return listWeekdaysImpl(localeSorted, format, index, 'weekdaysMin');
5621    }
5622
5623    getSetGlobalLocale('en', {
5624        eras: [
5625            {
5626                since: '0001-01-01',
5627                until: +Infinity,
5628                offset: 1,
5629                name: 'Anno Domini',
5630                narrow: 'AD',
5631                abbr: 'AD',
5632            },
5633            {
5634                since: '0000-12-31',
5635                until: -Infinity,
5636                offset: 1,
5637                name: 'Before Christ',
5638                narrow: 'BC',
5639                abbr: 'BC',
5640            },
5641        ],
5642        dayOfMonthOrdinalParse: /\d{1,2}(th|st|nd|rd)/,
5643        ordinal: function (number) {
5644            var b = number % 10,
5645                output =
5646                    toInt((number % 100) / 10) === 1
5647                        ? 'th'
5648                        : b === 1
5649                        ? 'st'
5650                        : b === 2
5651                        ? 'nd'
5652                        : b === 3
5653                        ? 'rd'
5654                        : 'th';
5655            return number + output;
5656        },
5657    });
5658
5659    // Side effect imports
5660
5661    hooks.lang = deprecate(
5662        'moment.lang is deprecated. Use moment.locale instead.',
5663        getSetGlobalLocale
5664    );
5665    hooks.langData = deprecate(
5666        'moment.langData is deprecated. Use moment.localeData instead.',
5667        getLocale
5668    );
5669
5670    var mathAbs = Math.abs;
5671
5672    function abs() {
5673        var data = this._data;
5674
5675        this._milliseconds = mathAbs(this._milliseconds);
5676        this._days = mathAbs(this._days);
5677        this._months = mathAbs(this._months);
5678
5679        data.milliseconds = mathAbs(data.milliseconds);
5680        data.seconds = mathAbs(data.seconds);
5681        data.minutes = mathAbs(data.minutes);
5682        data.hours = mathAbs(data.hours);
5683        data.months = mathAbs(data.months);
5684        data.years = mathAbs(data.years);
5685
5686        return this;
5687    }
5688
5689    function addSubtract$1(duration, input, value, direction) {
5690        var other = createDuration(input, value);
5691
5692        duration._milliseconds += direction * other._milliseconds;
5693        duration._days += direction * other._days;
5694        duration._months += direction * other._months;
5695
5696        return duration._bubble();
5697    }
5698
5699    // supports only 2.0-style add(1, 's') or add(duration)
5700    function add$1(input, value) {
5701        return addSubtract$1(this, input, value, 1);
5702    }
5703
5704    // supports only 2.0-style subtract(1, 's') or subtract(duration)
5705    function subtract$1(input, value) {
5706        return addSubtract$1(this, input, value, -1);
5707    }
5708
5709    function absCeil(number) {
5710        if (number < 0) {
5711            return Math.floor(number);
5712        } else {
5713            return Math.ceil(number);
5714        }
5715    }
5716
5717    function bubble() {
5718        var milliseconds = this._milliseconds,
5719            days = this._days,
5720            months = this._months,
5721            data = this._data,
5722            seconds,
5723            minutes,
5724            hours,
5725            years,
5726            monthsFromDays;
5727
5728        // if we have a mix of positive and negative values, bubble down first
5729        // check: https://github.com/moment/moment/issues/2166
5730        if (
5731            !(
5732                (milliseconds >= 0 && days >= 0 && months >= 0) ||
5733                (milliseconds <= 0 && days <= 0 && months <= 0)
5734            )
5735        ) {
5736            milliseconds += absCeil(monthsToDays(months) + days) * 864e5;
5737            days = 0;
5738            months = 0;
5739        }
5740
5741        // The following code bubbles up values, see the tests for
5742        // examples of what that means.
5743        data.milliseconds = milliseconds % 1000;
5744
5745        seconds = absFloor(milliseconds / 1000);
5746        data.seconds = seconds % 60;
5747
5748        minutes = absFloor(seconds / 60);
5749        data.minutes = minutes % 60;
5750
5751        hours = absFloor(minutes / 60);
5752        data.hours = hours % 24;
5753
5754        days += absFloor(hours / 24);
5755
5756        // convert days to months
5757        monthsFromDays = absFloor(daysToMonths(days));
5758        months += monthsFromDays;
5759        days -= absCeil(monthsToDays(monthsFromDays));
5760
5761        // 12 months -> 1 year
5762        years = absFloor(months / 12);
5763        months %= 12;
5764
5765        data.days = days;
5766        data.months = months;
5767        data.years = years;
5768
5769        return this;
5770    }
5771
5772    function daysToMonths(days) {
5773        // 400 years have 146097 days (taking into account leap year rules)
5774        // 400 years have 12 months === 4800
5775        return (days * 4800) / 146097;
5776    }
5777
5778    function monthsToDays(months) {
5779        // the reverse of daysToMonths
5780        return (months * 146097) / 4800;
5781    }
5782
5783    function as(units) {
5784        if (!this.isValid()) {
5785            return NaN;
5786        }
5787        var days,
5788            months,
5789            milliseconds = this._milliseconds;
5790
5791        units = normalizeUnits(units);
5792
5793        if (units === 'month' || units === 'quarter' || units === 'year') {
5794            days = this._days + milliseconds / 864e5;
5795            months = this._months + daysToMonths(days);
5796            switch (units) {
5797                case 'month':
5798                    return months;
5799                case 'quarter':
5800                    return months / 3;
5801                case 'year':
5802                    return months / 12;
5803            }
5804        } else {
5805            // handle milliseconds separately because of floating point math errors (issue #1867)
5806            days = this._days + Math.round(monthsToDays(this._months));
5807            switch (units) {
5808                case 'week':
5809                    return days / 7 + milliseconds / 6048e5;
5810                case 'day':
5811                    return days + milliseconds / 864e5;
5812                case 'hour':
5813                    return days * 24 + milliseconds / 36e5;
5814                case 'minute':
5815                    return days * 1440 + milliseconds / 6e4;
5816                case 'second':
5817                    return days * 86400 + milliseconds / 1000;
5818                // Math.floor prevents floating point math errors here
5819                case 'millisecond':
5820                    return Math.floor(days * 864e5) + milliseconds;
5821                default:
5822                    throw new Error('Unknown unit ' + units);
5823            }
5824        }
5825    }
5826
5827    // TODO: Use this.as('ms')?
5828    function valueOf$1() {
5829        if (!this.isValid()) {
5830            return NaN;
5831        }
5832        return (
5833            this._milliseconds +
5834            this._days * 864e5 +
5835            (this._months % 12) * 2592e6 +
5836            toInt(this._months / 12) * 31536e6
5837        );
5838    }
5839
5840    function makeAs(alias) {
5841        return function () {
5842            return this.as(alias);
5843        };
5844    }
5845
5846    var asMilliseconds = makeAs('ms'),
5847        asSeconds = makeAs('s'),
5848        asMinutes = makeAs('m'),
5849        asHours = makeAs('h'),
5850        asDays = makeAs('d'),
5851        asWeeks = makeAs('w'),
5852        asMonths = makeAs('M'),
5853        asQuarters = makeAs('Q'),
5854        asYears = makeAs('y');
5855
5856    function clone$1() {
5857        return createDuration(this);
5858    }
5859
5860    function get$2(units) {
5861        units = normalizeUnits(units);
5862        return this.isValid() ? this[units + 's']() : NaN;
5863    }
5864
5865    function makeGetter(name) {
5866        return function () {
5867            return this.isValid() ? this._data[name] : NaN;
5868        };
5869    }
5870
5871    var milliseconds = makeGetter('milliseconds'),
5872        seconds = makeGetter('seconds'),
5873        minutes = makeGetter('minutes'),
5874        hours = makeGetter('hours'),
5875        days = makeGetter('days'),
5876        months = makeGetter('months'),
5877        years = makeGetter('years');
5878
5879    function weeks() {
5880        return absFloor(this.days() / 7);
5881    }
5882
5883    var round = Math.round,
5884        thresholds = {
5885            ss: 44, // a few seconds to seconds
5886            s: 45, // seconds to minute
5887            m: 45, // minutes to hour
5888            h: 22, // hours to day
5889            d: 26, // days to month/week
5890            w: null, // weeks to month
5891            M: 11, // months to year
5892        };
5893
5894    // helper function for moment.fn.from, moment.fn.fromNow, and moment.duration.fn.humanize
5895    function substituteTimeAgo(string, number, withoutSuffix, isFuture, locale) {
5896        return locale.relativeTime(number || 1, !!withoutSuffix, string, isFuture);
5897    }
5898
5899    function relativeTime$1(posNegDuration, withoutSuffix, thresholds, locale) {
5900        var duration = createDuration(posNegDuration).abs(),
5901            seconds = round(duration.as('s')),
5902            minutes = round(duration.as('m')),
5903            hours = round(duration.as('h')),
5904            days = round(duration.as('d')),
5905            months = round(duration.as('M')),
5906            weeks = round(duration.as('w')),
5907            years = round(duration.as('y')),
5908            a =
5909                (seconds <= thresholds.ss && ['s', seconds]) ||
5910                (seconds < thresholds.s && ['ss', seconds]) ||
5911                (minutes <= 1 && ['m']) ||
5912                (minutes < thresholds.m && ['mm', minutes]) ||
5913                (hours <= 1 && ['h']) ||
5914                (hours < thresholds.h && ['hh', hours]) ||
5915                (days <= 1 && ['d']) ||
5916                (days < thresholds.d && ['dd', days]);
5917
5918        if (thresholds.w != null) {
5919            a =
5920                a ||
5921                (weeks <= 1 && ['w']) ||
5922                (weeks < thresholds.w && ['ww', weeks]);
5923        }
5924        a = a ||
5925            (months <= 1 && ['M']) ||
5926            (months < thresholds.M && ['MM', months]) ||
5927            (years <= 1 && ['y']) || ['yy', years];
5928
5929        a[2] = withoutSuffix;
5930        a[3] = +posNegDuration > 0;
5931        a[4] = locale;
5932        return substituteTimeAgo.apply(null, a);
5933    }
5934
5935    // This function allows you to set the rounding function for relative time strings
vendor: 10,095 bytes, lines 5936-6248
5936    function getSetRelativeTimeRounding(roundingFunction) {
5937        if (roundingFunction === undefined) {
5938            return round;
5939        }
5940        if (typeof roundingFunction === 'function') {
5941            round = roundingFunction;
5942            return true;
5943        }
5944        return false;
5945    }
5946
5947    // This function allows you to set a threshold for relative time strings
5948    function getSetRelativeTimeThreshold(threshold, limit) {
5949        if (thresholds[threshold] === undefined) {
5950            return false;
5951        }
5952        if (limit === undefined) {
5953            return thresholds[threshold];
5954        }
5955        thresholds[threshold] = limit;
5956        if (threshold === 's') {
5957            thresholds.ss = limit - 1;
5958        }
5959        return true;
5960    }
5961
5962    function humanize(argWithSuffix, argThresholds) {
5963        if (!this.isValid()) {
5964            return this.localeData().invalidDate();
5965        }
5966
5967        var withSuffix = false,
5968            th = thresholds,
5969            locale,
5970            output;
5971
5972        if (typeof argWithSuffix === 'object') {
5973            argThresholds = argWithSuffix;
5974            argWithSuffix = false;
5975        }
5976        if (typeof argWithSuffix === 'boolean') {
5977            withSuffix = argWithSuffix;
5978        }
5979        if (typeof argThresholds === 'object') {
5980            th = Object.assign({}, thresholds, argThresholds);
5981            if (argThresholds.s != null && argThresholds.ss == null) {
5982                th.ss = argThresholds.s - 1;
5983            }
5984        }
5985
5986        locale = this.localeData();
5987        output = relativeTime$1(this, !withSuffix, th, locale);
5988
5989        if (withSuffix) {
5990            output = locale.pastFuture(+this, output);
5991        }
5992
5993        return locale.postformat(output);
5994    }
5995
5996    var abs$1 = Math.abs;
5997
5998    function sign(x) {
5999        return (x > 0) - (x < 0) || +x;
6000    }
6001
6002    function toISOString$1() {
6003        // for ISO strings we do not use the normal bubbling rules:
6004        //  * milliseconds bubble up until they become hours
6005        //  * days do not bubble at all
6006        //  * months bubble up until they become years
6007        // This is because there is no context-free conversion between hours and days
6008        // (think of clock changes)
6009        // and also not between days and months (28-31 days per month)
6010        if (!this.isValid()) {
6011            return this.localeData().invalidDate();
6012        }
6013
6014        var seconds = abs$1(this._milliseconds) / 1000,
6015            days = abs$1(this._days),
6016            months = abs$1(this._months),
6017            minutes,
6018            hours,
6019            years,
6020            s,
6021            total = this.asSeconds(),
6022            totalSign,
6023            ymSign,
6024            daysSign,
6025            hmsSign;
6026
6027        if (!total) {
6028            // this is the same as C#'s (Noda) and python (isodate)...
6029            // but not other JS (goog.date)
6030            return 'P0D';
6031        }
6032
6033        // 3600 seconds -> 60 minutes -> 1 hour
6034        minutes = absFloor(seconds / 60);
6035        hours = absFloor(minutes / 60);
6036        seconds %= 60;
6037        minutes %= 60;
6038
6039        // 12 months -> 1 year
6040        years = absFloor(months / 12);
6041        months %= 12;
6042
6043        // inspired by https://github.com/dordille/moment-isoduration/blob/master/moment.isoduration.js
6044        s = seconds ? seconds.toFixed(3).replace(/\.?0+$/, '') : '';
6045
6046        totalSign = total < 0 ? '-' : '';
6047        ymSign = sign(this._months) !== sign(total) ? '-' : '';
6048        daysSign = sign(this._days) !== sign(total) ? '-' : '';
6049        hmsSign = sign(this._milliseconds) !== sign(total) ? '-' : '';
6050
6051        return (
6052            totalSign +
6053            'P' +
6054            (years ? ymSign + years + 'Y' : '') +
6055            (months ? ymSign + months + 'M' : '') +
6056            (days ? daysSign + days + 'D' : '') +
6057            (hours || minutes || seconds ? 'T' : '') +
6058            (hours ? hmsSign + hours + 'H' : '') +
6059            (minutes ? hmsSign + minutes + 'M' : '') +
6060            (seconds ? hmsSign + s + 'S' : '')
6061        );
6062    }
6063
6064    var proto$2 = Duration.prototype;
6065
6066    proto$2.isValid = isValid$1;
6067    proto$2.abs = abs;
6068    proto$2.add = add$1;
6069    proto$2.subtract = subtract$1;
6070    proto$2.as = as;
6071    proto$2.asMilliseconds = asMilliseconds;
6072    proto$2.asSeconds = asSeconds;
6073    proto$2.asMinutes = asMinutes;
6074    proto$2.asHours = asHours;
6075    proto$2.asDays = asDays;
6076    proto$2.asWeeks = asWeeks;
6077    proto$2.asMonths = asMonths;
6078    proto$2.asQuarters = asQuarters;
6079    proto$2.asYears = asYears;
6080    proto$2.valueOf = valueOf$1;
6081    proto$2._bubble = bubble;
6082    proto$2.clone = clone$1;
6083    proto$2.get = get$2;
6084    proto$2.milliseconds = milliseconds;
6085    proto$2.seconds = seconds;
6086    proto$2.minutes = minutes;
6087    proto$2.hours = hours;
6088    proto$2.days = days;
6089    proto$2.weeks = weeks;
6090    proto$2.months = months;
6091    proto$2.years = years;
6092    proto$2.humanize = humanize;
6093    proto$2.toISOString = toISOString$1;
6094    proto$2.toString = toISOString$1;
6095    proto$2.toJSON = toISOString$1;
6096    proto$2.locale = locale;
6097    proto$2.localeData = localeData;
6098
6099    proto$2.toIsoString = deprecate(
6100        'toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)',
6101        toISOString$1
6102    );
6103    proto$2.lang = lang;
6104
6105    // FORMATTING
6106
6107    addFormatToken('X', 0, 0, 'unix');
6108    addFormatToken('x', 0, 0, 'valueOf');
6109
6110    // PARSING
6111
6112    addRegexToken('x', matchSigned);
6113    addRegexToken('X', matchTimestamp);
6114    addParseToken('X', function (input, array, config) {
6115        config._d = new Date(parseFloat(input) * 1000);
6116    });
6117    addParseToken('x', function (input, array, config) {
6118        config._d = new Date(toInt(input));
6119    });
6120
6121    //! moment.js
6122
6123    hooks.version = '2.29.4';
6124
6125    setHookCallback(createLocal);
6126
6127    hooks.fn = proto;
6128    hooks.min = min;
6129    hooks.max = max;
6130    hooks.now = now;
6131    hooks.utc = createUTC;
6132    hooks.unix = createUnix;
6133    hooks.months = listMonths;
6134    hooks.isDate = isDate;
6135    hooks.locale = getSetGlobalLocale;
6136    hooks.invalid = createInvalid;
6137    hooks.duration = createDuration;
6138    hooks.isMoment = isMoment;
6139    hooks.weekdays = listWeekdays;
6140    hooks.parseZone = createInZone;
6141    hooks.localeData = getLocale;
6142    hooks.isDuration = isDuration;
6143    hooks.monthsShort = listMonthsShort;
6144    hooks.weekdaysMin = listWeekdaysMin;
6145    hooks.defineLocale = defineLocale;
6146    hooks.updateLocale = updateLocale;
6147    hooks.locales = listLocales;
6148    hooks.weekdaysShort = listWeekdaysShort;
6149    hooks.normalizeUnits = normalizeUnits;
6150    hooks.relativeTimeRounding = getSetRelativeTimeRounding;
6151    hooks.relativeTimeThreshold = getSetRelativeTimeThreshold;
6152    hooks.calendarFormat = getCalendarFormat;
6153    hooks.prototype = proto;
6154
6155    // currently HTML5 input type only supports 24-hour formats
6156    hooks.HTML5_FMT = {
6157        DATETIME_LOCAL: 'YYYY-MM-DDTHH:mm', // <input type="datetime-local" />
6158        DATETIME_LOCAL_SECONDS: 'YYYY-MM-DDTHH:mm:ss', // <input type="datetime-local" step="1" />
6159        DATETIME_LOCAL_MS: 'YYYY-MM-DDTHH:mm:ss.SSS', // <input type="datetime-local" step="0.001" />
6160        DATE: 'YYYY-MM-DD', // <input type="date" />
6161        TIME: 'HH:mm', // <input type="time" />
6162        TIME_SECONDS: 'HH:mm:ss', // <input type="time" step="1" />
6163        TIME_MS: 'HH:mm:ss.SSS', // <input type="time" step="0.001" />
6164        WEEK: 'GGGG-[W]WW', // <input type="week" />
6165        MONTH: 'YYYY-MM', // <input type="month" />
6166    };
6167
6168    return hooks;
6169
6170})));
6171
6172//! moment.js locale configuration
6173//! locale : English (United Kingdom) [en-gb]
6174//! author : Chris Gedrim : https://github.com/chrisgedrim
6175
6176;(function (global, factory) {
6177   typeof exports === 'object' && typeof module !== 'undefined'
6178       && typeof require === 'function' ? factory(require('../moment')) :
6179   typeof define === 'function' && define.amd ? define(['../moment'], factory) :
6180   factory(global.moment)
6181}(this, (function (moment) { 'use strict';
6182
6183    //! moment.js locale configuration
6184
6185    var enGb = moment.defineLocale('en-gb', {
6186        months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split(
6187            '_'
6188        ),
6189        monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),
6190        weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split(
6191            '_'
6192        ),
6193        weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),
6194        weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),
6195        longDateFormat: {
6196            LT: 'HH:mm',
6197            LTS: 'HH:mm:ss',
6198            L: 'DD/MM/YYYY',
6199            LL: 'D MMMM YYYY',
6200            LLL: 'D MMMM YYYY HH:mm',
6201            LLLL: 'dddd, D MMMM YYYY HH:mm',
6202        },
6203        calendar: {
6204            sameDay: '[Today at] LT',
6205            nextDay: '[Tomorrow at] LT',
6206            nextWeek: 'dddd [at] LT',
6207            lastDay: '[Yesterday at] LT',
6208            lastWeek: '[Last] dddd [at] LT',
6209            sameElse: 'L',
6210        },
6211        relativeTime: {
6212            future: 'in %s',
6213            past: '%s ago',
6214            s: 'a few seconds',
6215            ss: '%d seconds',
6216            m: 'a minute',
6217            mm: '%d minutes',
6218            h: 'an hour',
6219            hh: '%d hours',
6220            d: 'a day',
6221            dd: '%d days',
6222            M: 'a month',
6223            MM: '%d months',
6224            y: 'a year',
6225            yy: '%d years',
6226        },
6227        dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/,
6228        ordinal: function (number) {
6229            var b = number % 10,
6230                output =
6231                    ~~((number % 100) / 10) === 1
6232                        ? 'th'
6233                        : b === 1
6234                        ? 'st'
6235                        : b === 2
6236                        ? 'nd'
6237                        : b === 3
6238                        ? 'rd'
6239                        : 'th';
6240            return number + output;
6241        },
6242        week: {
6243            dow: 1, // Monday is the first day of the week.
6244            doy: 4, // The week that contains Jan 4th is the first week of the year.
6245        },
6246    });
6247
6248    return enGb;
6249
6250})));
6251
6252//! moment.js locale configuration
6253//! locale : German [de]
6254//! author : lluchs : https://github.com/lluchs
6255//! author: Menelion Elensúle: https://github.com/Oire
6256//! author : Mikolaj Dadela : https://github.com/mik01aj
6257
6258;(function (global, factory) {
6259   typeof exports === 'object' && typeof module !== 'undefined'
6260       && typeof require === 'function' ? factory(require('../moment')) :
6261   typeof define === 'function' && define.amd ? define(['../moment'], factory) :
6262   factory(global.moment)
6263}(this, (function (moment) { 'use strict';
6264
6265    //! moment.js locale configuration
6266
6267    function processRelativeTime(number, withoutSuffix, key, isFuture) {
6268        var format = {
6269            m: ['eine Minute', 'einer Minute'],
6270            h: ['eine Stunde', 'einer Stunde'],
6271            d: ['ein Tag', 'einem Tag'],
6272            dd: [number + ' Tage', number + ' Tagen'],
6273            w: ['eine Woche', 'einer Woche'],
6274            M: ['ein Monat', 'einem Monat'],
6275            MM: [number + ' Monate', number + ' Monaten'],
6276            y: ['ein Jahr', 'einem Jahr'],
6277            yy: [number + ' Jahre', number + ' Jahren'],
6278        };
6279        return withoutSuffix ? format[key][0] : format[key][1];
6280    }
6281
6282    var de = moment.defineLocale('de', {
6283        months: 'Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember'.split(
6284            '_'
6285        ),
6286        monthsShort:
6287            'Jan._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.'.split('_'),
6288        monthsParseExact: true,
6289        weekdays:
6290            'Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag'.split(
6291                '_'
6292            ),
6293        weekdaysShort: 'So._Mo._Di._Mi._Do._Fr._Sa.'.split('_'),
6294        weekdaysMin: 'So_Mo_Di_Mi_Do_Fr_Sa'.split('_'),
6295        weekdaysParseExact: true,
6296        longDateFormat: {
6297            LT: 'HH:mm',
6298            LTS: 'HH:mm:ss',
6299            L: 'DD.MM.YYYY',
6300            LL: 'D. MMMM YYYY',
6301            LLL: 'D. MMMM YYYY HH:mm',
6302            LLLL: 'dddd, D. MMMM YYYY HH:mm',
6303        },
6304        calendar: {
6305            sameDay: '[heute um] LT [Uhr]',
6306            sameElse: 'L',
6307            nextDay: '[morgen um] LT [Uhr]',
6308            nextWeek: 'dddd [um] LT [Uhr]',
6309            lastDay: '[gestern um] LT [Uhr]',
6310            lastWeek: '[letzten] dddd [um] LT [Uhr]',
6311        },
6312        relativeTime: {
6313            future: 'in %s',
6314            past: 'vor %s',
6315            s: 'ein paar Sekunden',
6316            ss: '%d Sekunden',
6317            m: processRelativeTime,
6318            mm: '%d Minuten',
6319            h: processRelativeTime,
6320            hh: '%d Stunden',
6321            d: processRelativeTime,
6322            dd: processRelativeTime,
6323            w: processRelativeTime,
6324            ww: '%d Wochen',
6325            M: processRelativeTime,
6326            MM: processRelativeTime,
6327            y: processRelativeTime,
6328            yy: processRelativeTime,
6329        },
6330        dayOfMonthOrdinalParse: /\d{1,2}\./,
6331        ordinal: '%d.',
6332        week: {
6333            dow: 1, // Monday is the first day of the week.
6334            doy: 4, // The week that contains Jan 4th is the first week of the year.
6335        },
6336    });
6337
6338    return de;
6339
6340})));
6341
6342/*!
6343  * Bootstrap Datetime Picker v4.17.49
6344  * Copyright 2015-2020 Jonathan Peterson
6345  * Licensed under MIT (https://github.com/Eonasdan/bootstrap-datetimepicker/blob/master/LICENSE)
6346  */
6347/*global define:false */
6348/*global exports:false */
6349/*global require:false */
6350/*global jQuery:false */
6351/*global moment:false */
6352(function (factory) {
6353    'use strict';
6354    if (typeof define === 'function' && define.amd) {
6355        // AMD is used - Register as an anonymous module.
6356        define(['jquery', 'moment'], factory);
6357    } else if (typeof exports === 'object') {
6358        module.exports = factory(require('jquery'), require('moment'));
6359    } else {
6360        // Neither AMD nor CommonJS used. Use global variables.
6361        if (typeof jQuery === 'undefined') {
6362            throw 'bootstrap-datetimepicker requires jQuery to be loaded first';
6363        }
6364        if (typeof moment === 'undefined') {
6365            throw 'bootstrap-datetimepicker requires Moment.js to be loaded first';
6366        }
6367        factory(jQuery, moment);
6368    }
6369}(function ($, moment) {
6370    'use strict';
6371    if (!moment) {
6372        throw new Error('bootstrap-datetimepicker requires Moment.js to be loaded first');
6373    }
6374
6375    var dateTimePicker = function (element, options) {
6376        var picker = {},
6377            date,
6378            viewDate,
6379            unset = true,
6380            input,
6381            component = false,
6382            widget = false,
6383            use24Hours,
6384            minViewModeNumber = 0,
6385            actualFormat,
6386            parseFormats,
6387            currentViewMode,
6388            datePickerModes = [
6389                {
6390                    clsName: 'days',
6391                    navFnc: 'M',
6392                    navStep: 1
6393                },
6394                {
6395                    clsName: 'months',
6396                    navFnc: 'y',
6397                    navStep: 1
6398                },
6399                {
6400                    clsName: 'years',
6401                    navFnc: 'y',
6402                    navStep: 10
6403                },
6404                {
6405                    clsName: 'decades',
6406                    navFnc: 'y',
6407                    navStep: 100
6408                }
6409            ],
6410            viewModes = ['days', 'months', 'years', 'decades'],
6411            verticalModes = ['top', 'bottom', 'auto'],
6412            horizontalModes = ['left', 'right', 'auto'],
6413            toolbarPlacements = ['default', 'top', 'bottom'],
6414            keyMap = {
6415                'up': 38,
6416                38: 'up',
6417                'down': 40,
6418                40: 'down',
6419                'left': 37,
6420                37: 'left',
6421                'right': 39,
6422                39: 'right',
6423                'tab': 9,
6424                9: 'tab',
6425                'escape': 27,
6426                27: 'escape',
6427                'enter': 13,
6428                13: 'enter',
6429                'pageUp': 33,
6430                33: 'pageUp',
6431                'pageDown': 34,
6432                34: 'pageDown',
6433                'shift': 16,
6434                16: 'shift',
6435                'control': 17,
6436                17: 'control',
6437                'space': 32,
6438                32: 'space',
6439                't': 84,
6440                84: 't',
6441                'delete': 46,
6442                46: 'delete'
6443            },
6444            keyState = {},
6445
6446            /********************************************************************************
6447             *
6448             * Private functions
6449             *
6450             ********************************************************************************/
6451
6452            hasTimeZone = function () {
6453                return moment.tz !== undefined && options.timeZone !== undefined && options.timeZone !== null && options.timeZone !== '';
6454            },
6455
6456            getMoment = function (d) {
6457                var returnMoment;
6458
6459                if (d === undefined || d === null) {
6460                    returnMoment = moment(); //TODO should this use format? and locale?
6461                } else if (moment.isDate(d) || moment.isMoment(d)) {
6462                    // If the date that is passed in is already a Date() or moment() object,
6463                    // pass it directly to moment.
6464                    returnMoment = moment(d);
6465                } else if (hasTimeZone()) { // There is a string to parse and a default time zone
6466                    // parse with the tz function which takes a default time zone if it is not in the format str
6466ing
6467                    returnMoment = moment.tz(d, parseFormats, options.useStrict, options.timeZone);
6468                } else {
6469                    returnMoment = moment(d, parseFormats, options.useStrict);
6470                }
6471
6472                if (hasTimeZone()) {
6473                    returnMoment.tz(options.timeZone);
6474                }
6475
6476                return returnMoment;
6477            },
6478
6479            isEnabled = function (granularity) {
6480                if (typeof granularity !== 'string' || granularity.length > 1) {
6481                    throw new TypeError('isEnabled expects a single character string parameter');
6482                }
6483                switch (granularity) {
6484                    case 'y':
6485                        return actualFormat.indexOf('Y') !== -1;
6486                    case 'M':
6487                        return actualFormat.indexOf('M') !== -1;
6488                    case 'd':
6489                        return actualFormat.toLowerCase().indexOf('d') !== -1;
6490                    case 'h':
6491                    case 'H':
6492                        return actualFormat.toLowerCase().indexOf('h') !== -1;
6493                    case 'm':
6494                        return actualFormat.indexOf('m') !== -1;
6495                    case 's':
6496                        return actualFormat.indexOf('s') !== -1;
6497                    default:
6498                        return false;
6499                }
6500            },
6501
6502            hasTime = function () {
6503                return (isEnabled('h') || isEnabled('m') || isEnabled('s'));
6504            },
6505
6506            hasDate = function () {
6507                return (isEnabled('y') || isEnabled('M') || isEnabled('d'));
6508            },
6509
6510            getDatePickerTemplate = function () {
6511                var headTemplate = $('<thead>')
6512                        .append($('<tr>')
6513                            .append($('<th>').addClass('prev').attr('data-action', 'previous')
6514                                .append($('<span>').addClass(options.icons.previous))
6515                                )
6516                            .append($('<th>').addClass('picker-switch').attr('data-action', 'pickerSwitch').attr('colspan', (options.calendarWeeks ? '6' : '5')))
6517                            .append($('<th>').addClass('next').attr('data-action', 'next')
6518                                .append($('<span>').addClass(options.icons.next))
6519                                )
6520                            ),
6521                    contTemplate = $('<tbody>')
6522                        .append($('<tr>')
6523                            .append($('<td>').attr('colspan', (options.calendarWeeks ? '8' : '7')))
6524                            );
6525
6526                return [
6527                    $('<div>').addClass('datepicker-days')
6528                        .append($('<table>').addClass('table-condensed')
6529                            .append(headTemplate)
6530                            .append($('<tbody>'))
6531                            ),
6532                    $('<div>').addClass('datepicker-months')
6533                        .append($('<table>').addClass('table-condensed')
6534                            .append(headTemplate.clone())
6535                            .append(contTemplate.clone())
6536                            ),
6537                    $('<div>').addClass('datepicker-years')
6538                        .append($('<table>').addClass('table-condensed')
6539                            .append(headTemplate.clone())
6540                            .append(contTemplate.clone())
6541                            ),
6542                    $('<div>').addClass('datepicker-decades')
6543                        .append($('<table>').addClass('table-condensed')
6544                            .append(headTemplate.clone())
6545                            .append(contTemplate.clone())
6546                            )
6547                ];
6548            },
6549
6550            getTimePickerMainTemplate = function () {
6551                var topRow = $('<tr>'),
6552                    middleRow = $('<tr>'),
6553                    bottomRow = $('<tr>');
6554
6555                if (isEnabled('h')) {
6556                    topRow.append($('<td>')
6557                        .append($('<a>').attr({ href: '#', tabindex: '-1', 'title': options.tooltips.incrementHour }).addClass('btn').attr('data-action', 'incrementHours').append($('<span>').addClass(options.icons.up))));
6558                    middleRow.append($('<td>')
6559                        .append($('<span>').addClass('timepicker-hour').attr({ 'data-time-component': 'hours', 'title': options.tooltips.pickHour }).attr('data-action', 'showHours')));
6560                    bottomRow.append($('<td>')
6561                        .append($('<a>').attr({ href: '#', tabindex: '-1', 'title': options.tooltips.decrementHour }).addClass('btn').attr('data-action', 'decrementHours').append($('<span>').addClass(options.icons.down))));
6562                }
6563                if (isEnabled('m')) {
6564                    if (isEnabled('h')) {
6565                        topRow.append($('<td>').addClass('separator'));
6566                        middleRow.append($('<td>').addClass('separator').html(':'));
6567                        bottomRow.append($('<td>').addClass('separator'));
6568                    }
6569                    topRow.append($('<td>')
6570                        .append($('<a>').attr({ href: '#', tabindex: '-1', 'title': options.tooltips.incrementMinute }).addClass('btn').attr('data-action', 'incrementMinutes')
6571                            .append($('<span>').addClass(options.icons.up))));
6572                    middleRow.append($('<td>')
6573                        .append($('<span>').addClass('timepicker-minute').attr({ 'data-time-component': 'minutes', 'title': options.tooltips.pickMinute }).attr('data-action', 'showMinutes')));
6574                    bottomRow.append($('<td>')
6575                        .append($('<a>').attr({ href: '#', tabindex: '-1', 'title': options.tooltips.decrementMinute }).addClass('btn').attr('data-action', 'decrementMinutes')
6576                            .append($('<span>').addClass(options.icons.down))));
6577                }
6578                if (isEnabled('s')) {
6579                    if (isEnabled('m')) {
6580                        topRow.append($('<td>').addClass('separator'));
6581                        middleRow.append($('<td>').addClass('separator').html(':'));
6582                        bottomRow.append($('<td>').addClass('separator'));
6583                    }
6584                    topRow.append($('<td>')
6585                        .append($('<a>').attr({ href: '#', tabindex: '-1', 'title': options.tooltips.incrementSecond }).addClass('btn').attr('data-action', 'incrementSeconds')
6586                            .append($('<span>').addClass(options.icons.up))));
6587                    middleRow.append($('<td>')
6588                        .append($('<span>').addClass('timepicker-second').attr({ 'data-time-component': '
6588seconds', 'title': options.tooltips.pickSecond }).attr('data-action', 'showSeconds')));
6589                    bottomRow.append($('<td>')
6590                        .append($('<a>').attr({ href: '#', tabindex: '-1', 'title': options.tooltips.decrementSecond }).addClass('btn').attr('data-action', 'decrementSeconds')
6591                            .append($('<span>').addClass(options.icons.down))));
6592                }
6593
6594                if (!use24Hours) {
6595                    topRow.append($('<td>').addClass('separator'));
6596                    middleRow.append($('<td>')
6597                        .append($('<button>').addClass('btn btn-primary').attr({ 'data-action': 'togglePeriod', tabindex: '-1', 'title': options.tooltips.togglePeriod })));
6598                    bottomRow.append($('<td>').addClass('separator'));
6599                }
6600
6601                return $('<div>').addClass('timepicker-picker')
6602                    .append($('<table>').addClass('table-condensed')
6603                        .append([topRow, middleRow, bottomRow]));
6604            },
6605
6606            getTimePickerTemplate = function () {
6607                var hoursView = $('<div>').addClass('timepicker-hours')
6608                        .append($('<table>').addClass('table-condensed')),
6609                    minutesView = $('<div>').addClass('timepicker-minutes')
6610                        .append($('<table>').addClass('table-condensed')),
6611                    secondsView = $('<div>').addClass('timepicker-seconds')
6612                        .append($('<table>').addClass('table-condensed')),
6613                    ret = [getTimePickerMainTemplate()];
6614
6615                if (isEnabled('h')) {
6616                    ret.push(hoursView);
6617                }
6618                if (isEnabled('m')) {
6619                    ret.push(minutesView);
6620                }
6621                if (isEnabled('s')) {
6622                    ret.push(secondsView);
6623                }
6624
6625                return ret;
6626            },
6627
6628            getToolbar = function () {
6629                var row = [];
6630                if (options.showTodayButton) {
6631                    row.push($('<td>').append($('<a>').attr({ 'data-action': 'today', 'title': options.tooltips.today }).append($('<span>').addClass(options.icons.today))));
6632                }
6633                if (!options.sideBySide && hasDate() && hasTime()) {
6634                    row.push($('<td>').append($('<a>').attr({ 'data-action': 'togglePicker', 'title': options.tooltips.selectTime }).append($('<span>').addClass(options.icons.time))));
6635                }
6636                if (options.showClear) {
6637                    row.push($('<td>').append($('<a>').attr({ 'data-action': 'clear', 'title': options.tooltips.clear }).append($('<span>').addClass(options.icons.clear))));
6638                }
6639                if (options.showClose) {
6640                    row.push($('<td>').append($('<a>').attr({ 'data-action': 'close', 'title': options.tooltips.close }).append($('<span>').addClass(options.icons.close))));
6641                }
6642                return $('<table>').addClass('table-condensed').append($('<tbody>').append($('<tr>').append(row)));
6643            },
6644
6645            getTemplate = function () {
6646                var template = $('<div>').addClass('bootstrap-datetimepicker-widget dropdown-menu'),
6647                    dateView = $('<div>').addClass('datepicker').append(getDatePickerTemplate()),
6648                    timeView = $('<div>').addClass('timepicker').append(getTimePickerTemplate()),
6649                    content = $('<ul>').addClass('list-unstyled'),
6650                    toolbar = $('<li>').addClass('picker-switch' + (options.collapse ? ' accordion-toggle' : '')).append(getToolbar());
6651
6652                if (options.inline) {
6653                    template.removeClass('dropdown-menu');
6654                }
6655
6656                if (use24Hours) {
6657                    template.addClass('usetwentyfour');
6658                }
6659
6660                if (isEnabled('s') && !use24Hours) {
6661                    template.addClass('wider');
6662                }
6663
6664                if (options.sideBySide && hasDate() && hasTime()) {
6665                    template.addClass('timepicker-sbs');
6666                    if (options.toolbarPlacement === 'top') {
6667                        template.append(toolbar);
6668                    }
6669                    template.append(
6670                        $('<div>').addClass('row')
6671                            .append(dateView.addClass('col-md-6'))
6672                            .append(timeView.addClass('col-md-6'))
6673                    );
6674                    if (options.toolbarPlacement === 'bottom') {
6675                        template.append(toolbar);
6676                    }
6677                    return template;
6678                }
6679
6680                if (options.toolbarPlacement === 'top') {
6681                    content.append(toolbar);
6682                }
6683                if (hasDate()) {
6684                    content.append($('<li>').addClass((options.collapse && hasTime() ? 'collapse in' : '')).append(dateView));
6685                }
6686                if (options.toolbarPlacement === 'default') {
6687                    content.append(toolbar);
6688                }
6689                if (hasTime()) {
6690                    content.append($('<li>
6690').addClass((options.collapse && hasDate() ? 'collapse' : '')).append(timeView));
6691                }
6692                if (options.toolbarPlacement === 'bottom') {
6693                    content.append(toolbar);
6694                }
6695                return template.append(content);
6696            },
6697
6698            dataToOptions = function () {
6699                var eData,
6700                    dataOptions = {};
6701
6702                if (element.is('input') || options.inline) {
6703                    eData = element.data();
6704                } else {
6705                    eData = element.find('input').data();
6706                }
6707
6708                if (eData.dateOptions && eData.dateOptions instanceof Object) {
6709                    dataOptions = $.extend(true, dataOptions, eData.dateOptions);
6710                }
6711
6712                $.each(options, function (key) {
6713                    var attributeName = 'date' + key.charAt(0).toUpperCase() + key.slice(1);
6714                    if (eData[attributeName] !== undefined) {
6715                        dataOptions[key] = eData[attributeName];
6716                    }
6717                });
6718                return dataOptions;
6719            },
6720
6721            place = function () {
6722                var position = (component || element).position(),
6723                    offset = (component || element).offset(),
6724                    vertical = options.widgetPositioning.vertical,
6725                    horizontal = options.widgetPositioning.horizontal,
6726                    parent;
6727
6728                if (options.widgetParent) {
6729                    parent = options.widgetParent.append(widget);
6730                } else if (element.is('input')) {
6731                    parent = element.after(widget).parent();
6732                } else if (options.inline) {
6733                    parent = element.append(widget);
6734                    return;
6735                } else {
6736                    parent = element;
6737                    element.children().first().after(widget);
6738                }
6739
6740                // Top and bottom logic
6741                if (vertical === 'auto') {
6742                    if (offset.top + widget.height() * 1.5 >= $(window).height() + $(window).scrollTop() &&
6743                        widget.height() + element.outerHeight() < offset.top) {
6744                        vertical = 'top';
6745                    } else {
6746                        vertical = 'bottom';
6747                    }
6748                }
6749
6750                // Left and right logic
6751                if (horizontal === 'auto') {
6752                    if (parent.width() < offset.left + widget.outerWidth() / 2 &&
6753                        offset.left + widget.outerWidth() > $(window).width()) {
6754                        horizontal = 'right';
6755                    } else {
6756                        horizontal = 'left';
6757                    }
6758                }
6759
6760                if (vertical === 'top') {
6761                    widget.addClass('top').removeClass('bottom');
6762                } else {
6763                    widget.addClass('bottom').removeClass('top');
6764                }
6765
6766                if (horizontal === 'right') {
6767                    widget.addClass('pull-right');
6768                } else {
6769                    widget.removeClass('pull-right');
6770                }
6771
6772                // find the first parent element that has a non-static css positioning
6773                if (parent.css('position') === 'static') {
6774                    parent = parent.parents().filter(function () {
6775                        return $(this).css('position') !== 'static';
6776                    }).first();
6777                }
6778
6779                if (parent.length === 0) {
6780                    throw new Error('datetimepicker component should be placed within a non-static positioned container');
6781                }
6782
6783                widget.css({
6784                    top: vertical === 'top' ? 'auto' : position.top + element.outerHeight(),
6785                    bottom: vertical === 'top' ? parent.outerHeight() - (parent === element ? 0 : position.top) : 'auto',
6786                    left: horizontal === 'left' ? (parent === element ? 0 : position.left) : 'auto',
6787                    right: horizontal === 'left' ? 'auto' : parent.outerWidth() - element.outerWidth() - (parent === element ? 0 : position.left)
6788                });
6789            },
6790
6791            notifyEvent = function (e) {
6792                if (e.type === 'dp.change' && ((e.date && e.date.isSame(e.oldDate)) || (!e.date && !e.oldDate))) {
6793                    return;
6794                }
6795                element.trigger(e);
6796            },
6797
6798            viewUpdate = function (e) {
6799                if (e === 'y') {
6800                    e = 'YYYY';
6801                }
6802                notifyEvent({
6803                    type: 'dp.update',
6804                    change: e,
6805                    viewDate: viewDate.clone()
6806                });
6807            },
6808
6809            showMode = function (dir) {
6810                if (!widget) {
6811                    return;
6812                }
6813                if (dir) {
6814                    currentViewMode = Math.max(minViewModeNumber, Math.min(3, currentViewMode + dir));
6815                }
6816                widget.find('.datepicker > div').hide().filter('.datepicker-' + datePickerModes[currentViewMode].clsName).show();
6817            },
6818
6819            fillDow = function () {
6820                var row = $('<tr>'),
6821                    currentDate = viewDate.clone().startOf('w').startOf('d');
6822
6823                if (options.calendarWeeks === true) {
6824                    row.append($('<th>').addClass('cw').text('#'));
6825                }
6826
6827                while (currentDate.isBefore(viewDate.clone().endOf('w'))) {
6828                    row.append($('<th>').addClass('dow').text(currentDate.format('dd')));
6829                    currentDate.add(1, 'd');
6830                }
6831                widget.find('.datepicker-days thead').append(row);
6832            },
6833
6834            isInDisabledDates = function (testDate) {
6835                return options.disabledDates[testDate.format('YYYY-MM-DD')] === true;
6836            },
6837
6838            isInEnabledDates = function (testDate) {
6839                return options.enabledDates[testDate.format('YYYY-MM-DD')] === true;
6840            },
6841
6842            isInDisabledHours = function (testDate) {
6843                return options.disabledHours[testDate.format('H')] === true;
6844            },
6845
6846            isInEnabledHours = function (testDate) {
6847                return options.enabledHours[testDate.format('H')] === true;
6848            },
6849
6850            isValid = function (targetMoment, granularity) {
6851                if (!targetMoment.isValid()) {
6852                    return false;
6853                }
6854                if (options.disabledDates && granularity === 'd' && isInDisabledDates(targetMoment)) {
6855                    return false;
6856                }
6857                if (options.enabledDates && granularity === 'd' && !isInEnabledDates(targetMoment)) {
6858                    return false;
6859                }
6860                if (options.minDate && targetMoment.isBefore(options.minDate, granularity)) {
6861                    return false;
6862                }
6863                if (options.maxDate && targetMoment.isAfter(options.maxDate, granularity)) {
6864                    return false;
6865                }
6866                if (options.daysOfWeekDisabled && granularity === 'd' && options.daysOfWeekDisabled.indexOf(targetMoment.day()) !== -1) {
6867                    return false;
6868                }
6869                if (options.disabledHours && (granularity === 'h' || granularity === 'm' || granularity === 's') && isInDisabledHours(targetMoment)) {
6870                    return false;
6871                }
6872                if (options.enabledHours && (granularity === 'h' || granularity === 'm' || granularity === 's') && !isInEnabledHours(targetMoment)) {
6873                    return false;
6874                }
6875                if (options.disabledTimeIntervals && (granularity === 'h' || granularity === 'm' || granularity === 's')) {
6876                    var found = false;
6877                    $.each(options.disabledTimeIntervals, function () {
6878                        if (targetMoment.isBetween(this[0], this[1])) {
6879                            found = true;
6880                            return false;
6881                        }
6882                    });
6883                    if (found) {
6884                        return false;
6885                    }
6886                }
6887                return true;
6888            },
6889
6890            fillMonths = function () {
6891                var spans = [],
6892                    monthsShort = viewDate.clone().startOf('y').startOf('d');
6893                while (monthsShort.isSame(viewDate, 'y')) {
6894                    spans.push($('<span>').attr('data-action', 'selectMonth').addClass('month').text(monthsShort.format('MMM')));
6895                    monthsShort.add(1, 'M');
6896                }
6897                widget.find('.datepicker-months td').empty().append(spans);
6898            },
6899
6900            updateMonths = function () {
6901                var monthsView = widget.find('.datepicker-months'),
6902                    monthsViewHeader = monthsView.find('th'),
6903                    months = monthsView.find('tbody').find('span');
6904
6905                monthsViewHeader.eq(0).find('span').attr('title', options.tooltips.prevYear);
6906                monthsViewHeader.eq(1).attr('title', options.tooltips.selectYear);
6907                monthsViewHeader.eq(2).find('span').attr('title', options.tooltips.nextYear);
6908
6909                monthsView.find('.disabled').removeClass('disabled');
6910
6911                if (!isValid(viewDate.clone().subtract(1, 'y'), 'y')) {
6912                    monthsViewHeader.eq(0).addClass('disabled');
6913                }
6914
6915                monthsViewHeader.eq(1).text(viewDate.year());
6916
6917                if (!isValid(viewDate.clone().add(1, 'y'), 'y')) {
6918                    monthsViewHeader.eq(2).addClass('disabled');
6919                }
6920
6921                months.removeClass('active');
6922                if (date.isSame(viewDate, 'y') && !unset) {
6923                    months.eq(date.month()).addClass('active');
6924                }
6925
6926                months.each(function (index) {
6927                    if (!isValid(viewDate.clone().month(index), 'M')) {
6928                        $(this).addClass('disabled');
6929                    }
6930                });
6931            },
6932
6933            updateYears = function () {
6934                var yearsView = widget.find('.datepicker-years'),
6935                    yearsViewHeader = yearsView.find('th'),
6936                    startYear = viewDate.clone().subtract(5, 'y'),
6937                    endYear = viewDate.clone().add(6, 'y'),
6938                    html = '';
6939
6940                yearsViewHeader.eq(0).find('span').attr('title', options.tooltips.prevDecade);
6941                yearsViewHeader.eq(1).attr('title', options.tooltips.selectDecade);
6942                yearsViewHeader.eq(2).find('span').attr('title', options.tooltips.nextDecade);
6943
6944                yearsView.find('.disabled').removeClass('disabled');
6945
6946                if (options.minDate && options.minDate.isAfter(startYear, 'y')) {
6947                    yearsViewHeader.eq(0).addClass('disabled');
6948                }
6949
6950                yearsViewHeader.eq(1).text(startYear.year() + '-' + endYear.year());
6951
6952                if (options.maxDate && options.maxDate.isBefore(endYear, 'y')) {
6953                    yearsViewHeader.eq(2).addClass('disabled');
6954                }
6955
6956                while (!startYear.isAfter(endYear, 'y')) {
6957                    html += '<span data-action="selectYear" class="year' + (startYear.isSame(date, 'y') && !unset ? ' active' : '') + (!isValid(startYear, 'y') ? ' disabled' : '') + '">' + startYear.year() + '</span>';
6958                    startYear.add(1, 'y');
6959                }
6960
6961                yearsView.find('td').html(html);
6962            },
6963
6964            updateDecades = function () {
6965                var decadesView = widget.find('.datepicker-decades'),
6966                    decadesViewHeader = decadesView.find('th'),
6967                    startDecade = moment({ y: viewDate.year() - (viewDate.year() % 100) - 1 }),
6968                    endDecade = startDecade.clone().add(100, 'y'),
6969                    startedAt = startDecade.clone(),
6970                    minDateDecade = false,
6971                    maxDateDecade = false,
6972                    endDecadeYear,
6973                    html = '';
6974
6975                decadesViewHeader.eq(0).find('span').attr('title', options.tooltips.prevCentury);
6976                decadesViewHeader.eq(2).find('span').attr('title', options.tooltips.nextCentury);
6977
6978                decadesView.find('.disabled').removeClass('disabled');
6979
6980                if (startDecade.isSame(moment({ y: 1900 })) || (options.minDate && options.minDate.isAfter(startDecade, 'y'))) {
6981                    decadesViewHeader.eq(0).addClass('disabled');
6982                }
6983
6984                decadesViewHeader.eq(1).text(startDecade.year() + '-' + endDecade.year());
6985
6986                if (startDecade.isSame(moment({ y: 2000 })) || (options.maxDate && options.maxDate.isBefore(endDecade, 'y'))) {
6987                    decadesViewHeader.eq(2).addClass('disabled');
6988                }
6989
6990                while (!startDecade.isAfter(endDecade, 'y')) {
6991                    endDecadeYear = startDecade.year() + 12;
6992                    minDateDecade = options.minDate && options.minDate.isAfter(startDecade, 'y') && options.minDate.year() <= endDecadeYear;
6993                    maxDateDecade = options.maxDate && options.maxDate.isAfter(startDecade, 'y') && options.maxDate.year() <= endDecadeYear;
6994                    html += '<span data-action="selectDecade" class="decade' + (date.isAfter(startDecade) && date.year() <= endDecadeYear ? ' active' : '') +
6995                        (!isValid(startDecade, 'y') && !minDateDecade && !maxDateDecade ? ' disabled' : '') + '" data-selection="' + (startDecade.year() + 6) + '">' + (startDecade.year() + 1) + ' - ' + (startDecade.year() + 12) + '</span>';
6996                    startDecade.add(12, 'y');
6997                }
6998                html += '<span></span><span></span><span></span>'; //push the dangling block over, at least this way it's even
6999
7000                decadesView.find('td').html(html);
7001                decadesViewHeader.eq(1).text((startedAt.year() + 1) + '-' + (startDecade.year()));
7002            },
7003
7004            fillDate = function () {
7005                var daysView = widget.find('.datepicker-days'),
7006                    daysViewHeader = daysView.find('th'),
7007                    currentDate,
7008                    html = [],
7009                    row,
7010                    clsNames = [],
7011                    i;
7012
7013                if (!hasDate()) {
7014                    return;
7015                }
7016
7017                daysViewHeader.eq(0).find('span').attr('title', options.tooltips.prevMonth);
7018                daysViewHeader.eq(1).attr('title', options.tooltips.selectMonth);
7019                daysViewHeader.eq(2).find('span').attr('title', options.tooltips.nextMonth);
7020
7021                daysView.find('.disabled').removeClass('disabled');
7022                daysViewHeader.eq(1).text(viewDate.format(options.dayViewHeaderFormat));
7023
7024                if (!isValid(viewDate.clone().subtract(1, 'M'), 'M')) {
7025                    daysViewHeader.eq(0).addClass('disabled');
7026                }
7027                if (!isValid(viewDate.clone().add(1, 'M'), 'M')) {
7028                    daysViewHeader.eq(2).addClass('disabled');
7029                }
7030
7031                currentDate = viewDate.clone().startOf('M').startOf('w').startOf('d');
7032
7033                for (i = 0; i < 42; i++) { //always display 42 days (should show 6 weeks)
7034                    if (currentDate.weekday() === 0) {
7035                        row = $('<tr>');
7036                        if (options.calendarWeeks) {
7037                            row.append('<td class="cw">' + currentDate.week() + '</td>');
7038                        }
7039                        html.push(row);
7040                    }
7041                    clsNames = ['day'];
7042                    if (currentDate.isBefore(viewDate, 'M')) {
7043                        clsNames.push('old');
7044                    }
7045                    if (currentDate.isAfter(viewDate, 'M')) {
7046                        clsNames.push('new');
7047                    }
7048                    if (currentDate.isSame(date, 'd') && !unset) {
7049                        clsNames.push('active');
7050                    }
7051                    if (!isValid(currentDate, 'd')) {
7052                        clsNames.push('disabled');
7053                    }
7054                    if (currentDate.isSame(getMoment(), 'd')) {
7055                        clsNames.push('today');
7056                    }
7057                    if (currentDate.day() === 0 || currentDate.day() === 6) {
7058                        clsNames.push('weekend');
7059                    }
7060                    notifyEvent({
7061                        type: 'dp.classify',
7062                        date: currentDate,
7063                        classNames: clsNames
7064                    });
7065                    row.append('<td data-action="selectDay" data-day="' + currentDate.format('L') + '" class="' + clsNames.join(' ') + '">' + currentDate.date() + '</td>');
7066                    currentDate.add(1, 'd');
7067                }
7068
7069                daysView.find('tbody').empty().append(html);
7070
7071                updateMonths();
7072
7073                updateYears();
7074
7075                updateDecades();
7076            },
7077
7078            fillHours = function () {
7079                var table = widget.find('.timepicker-hours table'),
7080                    currentHour = viewDate.clone().startOf('d'),
7081                    html = [],
7082                    row = $('<tr>');
7083
7084                if (viewDate.hour() > 11 && !use24Hours) {
7085                    currentHour.hour(12);
7086                }
7087                while (currentHour.isSame(viewDate, 'd') && (use24Hours || (viewDate.hour() < 12 && currentHour.hour() < 12) || viewDate.hour() > 11)) {
7088                    if (currentHour.hour() % 4 === 0) {
7089                        row = $('<tr>');
7090                        html.push(row);
7091                    }
7092                    row.append('<td data-action="selectHour" class="hour' + (!isValid(currentHour, 'h') ? ' disabled' : '') + '">' + currentHour.format(use24Hours ? 'HH' : 'hh') + '</td>');
7093                    currentHour.add(1, 'h');
7094                }
7095                table.empty().append(html);
7096            },
7097
7098            fillMinutes = function () {
7099                var table = widget.find('.timepicker-minutes table'),
7100                    currentMinute = viewDate.clone().startOf('h'),
7101                    html = [],
7102                    row = $('<tr>'),
7103                    step = options.stepping === 1 ? 5 : options.stepping;
7104
7105                while (viewDate.isSame(currentMinute, 'h')) {
7106                    if (currentMinute.minute() % (step * 4) === 0) {
7107                        row = $('<tr>');
7108                        html.push(row);
7109                    }
7110                    row.append('<td data-action="selectMinute" class="minute' + (!isValid(currentMinute, 'm') ? ' disabled' : '') + '">' + currentMinute.format('mm') + '</td>');
7111                    currentMinute.add(step, 'm');
7112                }
7113                table.empty().append(html);
7114            },
7115
7116            fillSeconds = function () {
7117                var table = widget.find('.timepicker-seconds table'),
7118                    currentSecond = viewDate.clone().startOf('m'),
7119                    html = [],
7120                    row = $('<tr>');
7121
7122                while (viewDate.isSame(currentSecond, 'm')) {
7123                    if (currentSecond.second() % 20 === 0) {
7124                        row = $('<tr>');
7125                        html.push(row);
7126                    }
7127                    row.append('<td data-action="selectSecond" class="second' + (!isValid(currentSecond, 's') ? ' disabled' : '') + '">' + currentSecond.format('ss') + '</td>');
7128                    currentSecond.add(5, 's');
7129                }
7130
7131                table.empty().append(html);
7132            },
7133
7134            fillTime = function () {
7135                var toggle, newDate, timeComponents = widget.find('.timepicker span[data-time-component]');
7136
7137                if (!use24Hours) {
7138                    toggle = widget.find('.timepicker [data-action=togglePeriod]');
7139                    newDate = date.clone().add((date.hours() >= 12) ? -12 : 12, 'h');
7140
7141                    toggle.text(date.format('A'));
7142
7143                    if (isValid(newDate, 'h')) {
7144                        toggle.removeClass('disabled');
7145                    } else {
7146                        toggle.addClass('disabled');
7147                    }
7148                }
7149                timeComponents.filter('[data-time-component=hours]').text(date.format(use24Hours ? 'HH' : 'hh'));
7150                timeComponents.filter('[data-time-component=minutes]').text(date.format('mm'));
7151                timeComponents.filter('[data-time-component=seconds]').text(date.format('ss'));
7152
7153                fillHours();
7154                fillMinutes();
7155                fillSeconds();
7156            },
7157
7158            update = function () {
7159                if (!widget) {
7160                    return;
7161                }
7162                fillDate();
7163                fillTime();
7164            },
7165
7166            setValue = function (targetMoment) {
7167                var oldDate = unset ? null : date;
7168
7169                // case of calling setValue(null or false)
7170                if (!targetMoment) {
7171                    unset = true;
7172                    input.val('');
7173                    element.data('date', '');
7174                    notifyEvent({
7175                        type: 'dp.change',
7176                        date: false,
7177                        oldDate: oldDate
7178                    });
7179                    update();
7180                    return;
7181                }
7182
7183                targetMoment = targetMoment.clone().locale(options.locale);
7184
7185                if (hasTimeZone()) {
7186                    targetMoment.tz(options.timeZone);
7187                }
7188
7189                if (options.stepping !== 1) {
7190                    targetMoment.minutes((Math.round(targetMoment.minutes() / options.stepping) * options.stepping)).seconds(0);
7191
7192                    while (options.minDate && targetMoment.isBefore(options.minDate)) {
7193                        targetMoment.add(options.stepping, 'minutes');
7194                    }
7195                }
7196
7197                if (isValid(targetMoment)) {
7198                    date = targetMoment;
7199                    viewDate = date.clone();
7200                    input.val(date.format(actualFormat));
7201                    element.data('date', date.format(actualFormat));
7202                    unset = false;
7203                    update();
7204                    notifyEvent({
7205                        type: 'dp.change',
7206                        date: date.clone(),
7207                        oldDate: oldDate
7208                    });
7209                } else {
7210                    if (!options.keepInvalid) {
7211                        input.val(unset ? '' : date.format(actualFormat));
7212                    } else {
7213                        notifyEvent({
7214                            type: 'dp.change',
7215                            date: targetMoment,
7216                            oldDate: oldDate
7217                        });
7218                    }
7219                    notifyEvent({
7220                        type: 'dp.error',
7221                        date: targetMoment,
7222                        oldDate: oldDate
7223                    });
7224                }
7225            },
7226
7227            /**
7228             * Hides the widget. Possibly will emit dp.hide
7229             */
7230            hide = function () {
7231                var transitioning = false;
7232                if (!widget) {
7233                    return picker;
7234                }
7235                // Ignore event if in the middle of a picker transition
7236                widget.find('.collapse').each(function () {
7237                    var collapseData = $(this).data('collapse');
7238                    if (collapseData && collapseData.transitioning) {
7239                        transitioning = true;
7240                        return false;
7241                    }
7242                    return true;
7243                });
7244                if (transitioning) {
7245                    return picker;
7246                }
7247                if (component && component.hasClass('btn')) {
7248                    component.toggleClass('active');
7249                }
7250                widget.hide();
7251
7252                $(window).off('resize', place);
7253                widget.off('click', '[data-action]');
7254                widget.off('mousedown', false);
7255
7256                widget.remove();
7257                widget = false;
7258
7259                notifyEvent({
7260                    type: 'dp.hide',
7261                    date: date.clone()
7262                });
7263
7264                input.blur();
7265
7266                viewDate = date.clone();
7267
7268                return picker;
7269            },
7270
7271            clear = function () {
7272                setValue(null);
7273            },
7274
7275            parseInputDate = function (inputDate) {
7276                if (options.parseInputDate === undefined) {
7277                    if (!moment.isMoment(inputDate) || inputDate instanceof Date) {
7278                        inputDate = getMoment(inputDate);
7279                    }
7280                } else {
7281                    inputDate = options.parseInputDate(inputDate);
7282                }
7283                //inputDate.locale(options.locale);
7284                return inputDate;
7285            },
7286
7287            /********************************************************************************
7288             *
7289             * Widget UI interaction functions
7290             *
7291             ********************************************************************************/
7292            actions = {
7293                next: function () {
7294                    var navFnc = datePickerModes[currentViewMode].navFnc;
7295                    viewDate.add(datePickerModes[currentViewMode].navStep, navFnc);
7296                    fillDate();
7297                    viewUpdate(navFnc);
7298                },
7299
7300                previous: function () {
7301                    var navFnc = datePickerModes[currentViewMode].navFnc;
7302                    viewDate.subtract(datePickerModes[currentViewMode].navStep, navFnc);
7303                    fillDate();
7304                    viewUpdate(navFnc);
7305                },
7306
7307                pickerSwitch: function () {
7308                    showMode(1);
7309                },
7310
7311                selectMonth: function (e) {
7312                    var month = $(e.target).closest('tbody').find('span').index($(e.target));
7313                    viewDate.month(month);
7314                    if (currentViewMode === minViewModeNumber) {
7315                        setValue(date.clone().year(viewDate.year()).month(viewDate.month()));
7316                        if (!options.inline) {
7317                            hide();
7318                        }
7319                    } else {
7320                        showMode(-1);
7321                        fillDate();
7322                    }
7323                    viewUpdate('M');
7324                },
7325
7326                selectYear: function (e) {
7327                    var year = parseInt($(e.target).text(), 10) || 0;
7328                    viewDate.year(year);
7329                    if (currentViewMode === minViewModeNumber) {
7330                        setValue(date.clone().year(viewDate.year()));
7331                        if (!options.inline) {
7332                            hide();
7333                        }
7334                    } else {
7335                        showMode(-1);
7336                        fillDate();
7337                    }
7338                    viewUpdate('YYYY');
7339                },
7340
7341                selectDecade: function (e) {
7342                    var year = parseInt($(e.target).data('selection'), 10) || 0;
7343                    viewDate.year(year);
7344                    if (currentViewMode === minViewModeNumber) {
7345                        setValue(date.clone().year(viewDate.year()));
7346                        if (!options.inline) {
7347                            hide();
7348                        }
7349                    } else {
7350                        showMode(-1);
7351                        fillDate();
7352                    }
7353                    viewUpdate('YYYY');
7354                },
7355
7356                selectDay: function (e) {
7357                    var day = viewDate.clone();
7358                    if ($(e.target).is('.old')) {
7359                        day.subtract(1, 'M');
7360                    }
7361                    if ($(e.target).is('.new')) {
7362                        day.add(1, 'M');
7363                    }
7364                    setValue(day.date(parseInt($(e.target).text(), 10)));
7365                    if (!hasTime() && !options.keepOpen && !options.inline) {
7366                        hide();
7367                    }
7368                },
7369
7370                incrementHours: function () {
7371                    var newDate = date.clone().add(1, 'h');
7372                    if (isValid(newDate, 'h')) {
7373                        setValue(newDate);
7374                    }
7375                },
7376
7377                incrementMinutes: function () {
7378                    var newDate = date.clone().add(options.stepping, 'm');
7379                    if (isValid(newDate, 'm')) {
7380                        setValue(newDate);
7381                    }
7382                },
7383
7384                incrementSeconds: function () {
7385                    var newDate = date.clone().add(1, 's');
7386                    if (isValid(newDate, 's')) {
7387                        setValue(newDate);
7388                    }
7389                },
7390
7391                decrementHours: function () {
7392                    var newDate = date.clone().subtract(1, 'h');
7393                    if (isValid(newDate, 'h')) {
7394                        setValue(newDate);
7395                    }
7396                },
7397
7398                decrementMinutes: function () {
7399                    var newDate = date.clone().subtract(options.stepping, 'm');
7400                    if (isValid(newDate, 'm')) {
7401                        setValue(newDate);
7402                    }
7403                },
7404
7405                decrementSeconds: function () {
7406                    var newDate = date.clone().subtract(1, 's');
7407                    if (isValid(newDate, 's')) {
7408                        setValue(newDate);
7409                    }
7410                },
7411
7412                togglePeriod: function () {
7413                    setValue(date.clone().add((date.hours() >= 12) ? -12 : 12, 'h'));
7414                },
7415
7416                togglePicker: function (e) {
7417                    var $this = $(e.target),
7418                        $parent = $this.closest('ul'),
7419                        expanded = $parent.find('.in'),
7420                        closed = $parent.find('.collapse:not(.in)'),
7421                        collapseData;
7422
7423                    if (expanded && expanded.length) {
7424                        collapseData = expanded.data('collapse');
7425                        if (collapseData && collapseData.transitioning) {
7426                            return;
7427                        }
7428                        if (expanded.collapse) { // if collapse plugin is available through bootstrap.js then use it
7429                            expanded.collapse('hide');
7430                            closed.collapse('show');
7431                        } else { // otherwise just toggle in class on the two views
7432                            expanded.removeClass('in');
7433                            closed.addClass('in');
7434                        }
7435                        if ($this.is('span')) {
7436                            $this.toggleClass(options.icons.time + ' ' + options.icons.date);
7437                        } else {
7438                            $this.find('span').toggleClass(options.icons.time + ' ' + options.icons.date);
7439                        }
7440
7441                        // NOTE: uncomment if toggled state will be restored in show()
7442                        //if (component) {
7443                        //    component.find('span').toggleClass(options.icons.time + ' ' + options.icons.date);
7444                        //}
7445                    }
7446                },
7447
7448                showPicker: function () {
7449                    widget.find('.timepicker > div:not(.timepicker-picker)').hide();
7450                    widget.find('.timepicker .timepicker-picker').show();
7451                },
7452
7453                showHours: function () {
7454                    widget.find('.timepicker .timepicker-picker').hide();
7455                    widget.find('.timepicker .timepicker-hours').show();
7456                },
7457
7458                showMinutes: function () {
7459                    widget.find('.timepicker .timepicker-picker').hide();
7460                    widget.find('.timepicker .timepicker-minutes').show();
7461                },
7462
7463                showSeconds: function () {
7464                    widget.find('.timepicker .timepicker-picker').hide();
7465                    widget.find('.timepicker .timepicker-seconds').show();
7466                },
7467
7468                selectHour: function (e) {
7469                    var hour = parseInt($(e.target).text(), 10);
7470
7471                    if (!use24Hours) {
7472                        if (date.hours() >= 12) {
7473                            if (hour !== 12) {
7474                                hour += 12;
7475                            }
7476                        } else {
7477                            if (hour === 12) {
7478                                hour = 0;
7479                            }
7480                        }
7481                    }
7482                    setValue(date.clone().hours(hour));
7483                    actions.showPicker.call(picker);
7484                },
7485
7486                selectMinute: function (e) {
7487                    setValue(date.clone().minutes(parseInt($(e.target).text(), 10)));
7488                    actions.showPicker.call(picker);
7489                },
7490
7491                selectSecond: function (e) {
7492                    setValue(date.clone().seconds(parseInt($(e.target).text(), 10)));
7493                    actions.showPicker.call(picker);
7494                },
7495
7496                clear: clear,
7497
7498                today: function () {
7499                    var todaysDate = getMoment();
7500                    if (isValid(todaysDate, 'd')) {
7501                        setValue(todaysDate);
7502                    }
7503                },
7504
7505                close: hide
7506            },
7507
7508            doAction = function (e) {
7509                if ($(e.currentTarget).is('.disabled')) {
7510                    return false;
7511                }
7512                actions[$(e.currentTarget).data('action')].apply(picker, arguments);
7513                return false;
7514            },
7515
7516            /**
7517             * Shows the widget. Possibly will emit dp.show and dp.change
7518             */
7519            show = function () {
7520                var currentMoment,
7521                    useCurrentGranularity = {
7522                        'year': function (m) {
7523                            return m.month(0).date(1).hours(0).seconds(0).minutes(0);
7524                        },
7525                        'month': function (m) {
7526                            return m.date(1).hours(0).seconds(0).minutes(0);
7527                        },
7528                        'day': function (m) {
7529                            return m.hours(0).seconds(0).minutes(0);
7530                        },
7531                        'hour': function (m) {
7532                            return m.seconds(0).minutes(0);
7533                        },
7534                        'minute': function (m) {
7535                            return m.seconds(0);
7536                        }
7537                    };
7538
7539                if (input.prop('disabled') || (!options.ignoreReadonly && input.prop('readonly')) || widget) {
7540                    return picker;
7541                }
7542                if (input.val() !== undefined && input.val().trim().length !== 0) {
7543                    setValue(parseInputDate(input.val().trim()));
7544                } else if (unset && options.useCurrent && (options.inline || (input.is('input') && input.val().trim().length === 0))) {
7545                    currentMoment = getMoment();
7546                    if (typeof options.useCurrent === 'string') {
7547                        currentMoment = useCurrentGranularity[options.useCurrent](currentMoment);
7548                    }
7549                    setValue(currentMoment);
7550                }
7551                widget = getTemplate();
7552
7553                fillDow();
7554                fillMonths();
7555
7556                widget.find('.timepicker-hours').hide();
7557                widget.find('.timepicker-minutes').hide();
7558                widget.find('.timepicker-seconds').hide();
7559
7560                update();
7561                showMode();
7562
7563                $(window).on('resize', place);
7564                widget.on('click', '[data-action]', doAction); // this handles clicks on the widget
7565                widget.on('mousedown', false);
7566
7567                if (component && component.hasClass('btn')) {
7568                    component.toggleClass('active');
7569                }
7570                place();
7571                widget.show();
7572                if (options.focusOnShow && !input.is(':focus')) {
7573                    input.focus();
7574                }
7575
7576                notifyEvent({
7577                    type: 'dp.show'
7578                });
7579                return picker;
7580            },
7581
7582            /**
7583             * Shows or hides the widget
7584             */
7585            toggle = function () {
7586                return (widget ? hide() : show());
7587            },
7588
7589            keydown = function (e) {
7590                var handler = null,
7591                    index,
7592                    index2,
7593                    pressedKeys = [],
7594                    pressedModifiers = {},
7595                    currentKey = e.which,
7596                    keyBindKeys,
7597                    allModifiersPressed,
7598                    pressed = 'p';
7599
7600                keyState[currentKey] = pressed;
7601
7602                for (index in keyState) {
7603                    if (keyState.hasOwnProperty(index) && keyState[index] === pressed) {
7604                        pressedKeys.push(index);
7605                        if (parseInt(index, 10) !== currentKey) {
7606                            pressedModifiers[index] = true;
7607                        }
7608                    }
7609                }
7610
7611                for (index in options.keyBinds) {
7612                    if (options.keyBinds.hasOwnProperty(index) && typeof (options.keyBinds[index]) === 'function') {
7613                        keyBindKeys = index.split(' ');
7614                        if (keyBindKeys.length === pressedKeys.length && keyMap[currentKey] === keyBindKeys[keyBindKeys.length - 1]) {
7615                            allModifiersPressed = true;
7616                            for (index2 = keyBindKeys.length - 2; index2 >= 0; index2--) {
7617                                if (!(keyMap[keyBindKeys[index2]] in pressedModifiers)) {
7618                                    allModifiersPressed = false;
7619                                    break;
7620                                }
7621                            }
7622                            if (allModifiersPressed) {
7623                                handler = options.keyBinds[index];
7624                                break;
7625                            }
7626                        }
7627                    }
7628                }
7629
7630                if (handler) {
7631                    handler.call(picker, widget);
7632                    e.stopPropagation();
7633                    e.preventDefault();
7634                }
7635            },
7636
7637            keyup = function (e) {
7638                keyState[e.which] = 'r';
7639                e.stopPropagation();
7640                e.preventDefault();
7641            },
7642
7643            change = function (e) {
7644                var val = $(e.target).val().trim(),
7645                    parsedDate = val ? parseInputDate(val) : null;
7646                setValue(parsedDate);
7647                e.stopImmediatePropagation();
7648                return false;
7649            },
7650
7651            attachDatePickerElementEvents = function () {
7652                input.on({
7653                    'change': change,
7654                    'blur': options.debug ? '' : hide,
7655                    'keydown': keydown,
7656                    'keyup': keyup,
7657                    'focus': options.allowInputToggle ? show : ''
7658                });
7659
7660                if (element.is('input')) {
7661                    input.on({
7662                        'focus': show
7663                    });
7664                } else if (component) {
7665                    component.on('click', toggle);
7666                    component.on('mousedown', false);
7667                }
7668            },
7669
7670            detachDatePickerElementEvents = function () {
7671                input.off({
7672                    'change': change,
7673                    'blur': blur,
7674                    'keydown': keydown,
7675                    'keyup': keyup,
7676                    'focus': options.allowInputToggle ? hide : ''
7677                });
7678
7679                if (element.is('input')) {
7680                    input.off({
7681                        'focus': show
7682                    });
7683                } else if (component) {
7684                    component.off('click', toggle);
7685                    component.off('mousedown', false);
7686                }
7687            },
7688
7689            indexGivenDates = function (givenDatesArray) {
7690                // Store given enabledDates and disabledDates as keys.
7691                // This way we can check their existence in O(1) time instead of looping through whole array.
7692                // (for example: options.enabledDates['2014-02-27'] === true)
7693                var givenDatesIndexed = {};
7694                $.each(givenDatesArray, function () {
7695                    var dDate = parseInputDate(this);
7696                    if (dDate.isValid()) {
7697                        givenDatesIndexed[dDate.format('YYYY-MM-DD')] = true;
7698                    }
7699                });
7700                return (Object.keys(givenDatesIndexed).length) ? givenDatesIndexed : false;
7701            },
7702
7703            indexGivenHours = function (givenHoursArray) {
7704                // Store given enabledHours and disabledHours as keys.
7705                // This way we can check their existence in O(1) time instead of looping through whole array.
7706                // (for example: options.enabledHours['2014-02-27'] === true)
7707                var givenHoursIndexed = {};
7708                $.each(givenHoursArray, function () {
7709                    givenHoursIndexed[this] = true;
7710                });
7711                return (Object.keys(givenHoursIndexed).length) ? givenHoursIndexed : false;
7712            },
7713
7714            initFormatting = function () {
7715                var format = options.format || 'L LT';
7716
7717                actualFormat = format.replace(/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g, function (formatInput) {
7718                    var newinput = date.localeData().longDateFormat(formatInput) || formatInput;
7719                    return newinput.replace(/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g, function (formatInput2) { //temp fix for #740
7720                        return date.localeData().longDateFormat(formatInput2) || formatInput2;
7721                    });
7722                });
7723
7724
7725                parseFormats = options.extraFormats ? options.extraFormats.slice() : [];
7726                if (parseFormats.indexOf(format) < 0 && parseFormats.indexOf(actualFormat) < 0) {
7727                    parseFormats.push(actualFormat);
7728                }
7729
7730                use24Hours = (actualFormat.toLowerCase().indexOf('a') < 1 && actualFormat.replace(/\[.*?\]/g, '').indexOf('h') < 1);
7731
7732                if (isEnabled('y')) {
7733                    minViewModeNumber = 2;
7734                }
7735                if (isEnabled('M')) {
7736                    minViewModeNumber = 1;
7737                }
7738                if (isEnabled('d')) {
7739                    minViewModeNumber = 0;
7740                }
7741
7742                currentViewMode = Math.max(minViewModeNumber, currentViewMode);
7743
7744                if (!unset) {
7745                    setValue(date);
7746                }
7747            };
7748
7749        /********************************************************************************
7750         *
7751         * Public API functions
7752         * =====================
7753         *
7754         * Important: Do not expose direct references to private objects or the options
7755         * object to the outer world. Always return a clone when returning values or make
7756         * a clone when setting a private variable.
7757         *
7758         ********************************************************************************/
7759        picker.destroy = function () {
7760            ///<summary>Destroys the widget and removes all attached event listeners</summary>
7761            hide();
7762            detachDatePickerElementEvents();
7763            element.removeData('DateTimePicker');
7764            element.removeData('date');
7765        };
7766
7767        picker.toggle = toggle;
7768
7769        picker.show = show;
7770
7771        picker.hide = hide;
7772
7773        picker.disable = function () {
7774            ///<summary>Disables the input element, the component is attached to, by adding a disabled="true" attribute to it.
7775            ///If the widget was visible before that call it is hidden. Possibly emits dp.hide</summary>
7776            hide();
7777            if (component && component.hasClass('btn')) {
7778                component.addClass('disabled');
7779            }
7780            input.prop('disabled', true);
7781            return picker;
7782        };
7783
7784        picker.enable = function () {
7785            ///<summary>Enables the input element, the component is attached to, by removing disabled attribute from it.</summary>
7786            if (component && component.hasClass('btn')) {
7787                component.removeClass('disabled');
7788            }
7789            input.prop('disabled', false);
7790            return picker;
7791        };
7792
7793        picker.ignoreReadonly = function (ignoreReadonly) {
7794            if (arguments.length === 0) {
7795                return options.ignoreReadonly;
7796            }
7797            if (typeof ignoreReadonly !== 'boolean') {
7798                throw new TypeError('ignoreReadonly () expects a boolean parameter');
7799            }
7800            options.ignoreReadonly = ignoreReadonly;
7801            return picker;
7802        };
7803
7804        picker.options = function (newOptions) {
7805            if (arguments.length === 0) {
7806                return $.extend(true, {}, options);
7807            }
7808
7809            if (!(newOptions instanceof Object)) {
7810                throw new TypeError('options() options parameter should be an object');
7811            }
7812            $.extend(true, options, newOptions);
7813            $.each(options, function (key, value) {
7814                if (picker[key] !== undefined) {
7815                    picker[key](value);
7816                } else {
7817                    throw new TypeError('option ' + key + ' is not recognized!');
7818                }
7819            });
7820            return picker;
7821        };
7822
7823        picker.date = function (newDate) {
7824            ///<signature helpKeyword="$.fn.datetimepicker.date">
7825            ///<summary>Returns the component's model current date, a moment object or null if not set.</summary>
7826            ///<returns type="Moment">date.clone()</returns>
7827            ///</signature>
7828            ///<signature>
7829            ///<summary>Sets the components model current moment to it. Passing a null value unsets the components model current moment. Parsing of the newDate parameter is made using moment library with the options.format and options.useStrict components configuration.</summary>
7830            ///<param name="newDate" locid="$.fn.datetimepicker.date_p:newDate">Takes string, Date, moment, null parameter.</param>
7831            ///</signature>
7832            if (arguments.length === 0) {
7833                if (unset) {
7834                    return null;
7835                }
7836                return date.clone();
7837            }
7838
7839            if (newDate !== null && typeof newDate !== 'string' && !moment.isMoment(newDate) && !(newDate instanceof Date)) {
7840                throw new TypeError('date() parameter must be one of [null, string, moment or Date]');
7841            }
7842
7843            setValue(newDate === null ? null : parseInputDate(newDate));
7844            return picker;
7845        };
7846
7847        picker.format = function (newFormat) {
7848            ///<summary>test su</summary>
7849            ///<param name="newFormat">info about para</param>
7850            ///<returns type="string|boolean">returns foo</returns>
7851            if (arguments.length === 0) {
7852                return options.format;
7853            }
7854
7855            if ((typeof newFormat !== 'string') && ((typeof newFormat !== 'boolean') || (newFormat !== false))) {
7856                throw new TypeError('format() expects a string or boolean:false parameter ' + newFormat);
7857            }
7858
7859            options.format = newFormat;
7860            if (actualFormat) {
7861                initFormatting(); // reinit formatting
7862            }
7863            return picker;
7864        };
7865
7866        picker.timeZone = function (newZone) {
7867            if (arguments.length === 0) {
7868                return options.timeZone;
7869            }
7870
7871            if (typeof newZone !== 'string') {
7872                throw new TypeError('newZone() expects a string parameter');
7873            }
7874
7875            options.timeZone = newZone;
7876
7877            return picker;
7878        };
7879
7880        picker.dayViewHeaderFormat = function (newFormat) {
7881            if (arguments.length === 0) {
7882                return options.dayViewHeaderFormat;
7883            }
7884
7885            if (typeof newFormat !== 'string') {
7886                throw new TypeError('dayViewHeaderFormat() expects a string parameter');
7887            }
7888
7889            options.dayViewHeaderFormat = newFormat;
7890            return picker;
7891        };
7892
7893        picker.extraFormats = function (formats) {
7894            if (arguments.length === 0) {
7895                return options.extraFormats;
7896            }
7897
7898            if (formats !== false && !(formats instanceof Array)) {
7899                throw new TypeError('extraFormats() expects an array or false parameter');
7900            }
7901
7902            options.extraFormats = formats;
7903            if (parseFormats) {
7904                initFormatting(); // reinit formatting
7905            }
7906            return picker;
7907        };
7908
7909        picker.disabledDates = function (dates) {
7910            ///<signature helpKeyword="$.fn.datetimepicker.disabledDates">
7911            ///<summary>Returns an array with the currently set disabled dates on the component.</summary>
7912            ///<returns type="array">options.disabledDates</returns>
7913            ///</signature>
7914            ///<signature>
7915            ///<summary>Setting this takes precedence over options.minDate, options.maxDate configuration. Also calling this function removes the configuration of
7916            ///options.enabledDates if such exist.</summary>
7917            ///<param name="dates" locid="$.fn.datetimepicker.disabledDates_p:dates">Takes an [ string or Date or moment ] of values and allows the user to select only from those days.
7917</param>
7918            ///</signature>
7919            if (arguments.length === 0) {
7920                return (options.disabledDates ? $.extend({}, options.disabledDates) : options.disabledDates);
7921            }
7922
7923            if (!dates) {
7924                options.disabledDates = false;
7925                update();
7926                return picker;
7927            }
7928            if (!(dates instanceof Array)) {
7929                throw new TypeError('disabledDates() expects an array parameter');
7930            }
7931            options.disabledDates = indexGivenDates(dates);
7932            options.enabledDates = false;
7933            update();
7934            return picker;
7935        };
7936
7937        picker.enabledDates = function (dates) {
7938            ///<signature helpKeyword="$.fn.datetimepicker.enabledDates">
7939            ///<summary>Returns an array with the currently set enabled dates on the component.</summary>
7940            ///<returns type="array">options.enabledDates</returns>
7941            ///</signature>
7942            ///<signature>
7943            ///<summary>Setting this takes precedence over options.minDate, options.maxDate configuration. Also calling this function removes the configuration of options.disabledDates if such exist.</summary>
7944            ///<param name="dates" locid="$.fn.datetimepicker.enabledDates_p:dates">Takes an [ string or Date or moment ] of values and allows the user to select only from those days.</param>
7945            ///</signature>
7946            if (arguments.length === 0) {
7947                return (options.enabledDates ? $.extend({}, options.enabledDates) : options.enabledDates);
7948            }
7949
7950            if (!dates) {
7951                options.enabledDates = false;
7952                update();
7953                return picker;
7954            }
7955            if (!(dates instanceof Array)) {
7956                throw new TypeError('enabledDates() expects an array parameter');
7957            }
7958            options.enabledDates = indexGivenDates(dates);
7959            options.disabledDates = false;
7960            update();
7961            return picker;
7962        };
7963
7964        picker.daysOfWeekDisabled = function (daysOfWeekDisabled) {
7965            if (arguments.length === 0) {
7966                return options.daysOfWeekDisabled.splice(0);
7967            }
7968
7969            if ((typeof daysOfWeekDisabled === 'boolean') && !daysOfWeekDisabled) {
7970                options.daysOfWeekDisabled = false;
7971                update();
7972                return picker;
7973            }
7974
7975            if (!(daysOfWeekDisabled instanceof Array)) {
7976                throw new TypeError('daysOfWeekDisabled() expects an array parameter');
7977            }
7978            options.daysOfWeekDisabled = daysOfWeekDisabled.reduce(function (previousValue, currentValue) {
7979                currentValue = parseInt(currentValue, 10);
7980                if (currentValue > 6 || currentValue < 0 || isNaN(currentValue)) {
7981                    return previousValue;
7982                }
7983                if (previousValue.indexOf(currentValue) === -1) {
7984                    previousValue.push(currentValue);
7985                }
7986                return previousValue;
7987            }, []).sort();
7988            if (options.useCurrent && !options.keepInvalid) {
7989                var tries = 0;
7990                while (!isValid(date, 'd')) {
7991                    date.add(1, 'd');
7992                    if (tries === 31) {
7993                        throw 'Tried 31 times to find a valid date';
7994                    }
7995                    tries++;
7996                }
7997                setValue(date);
7998            }
7999            update();
8000            return picker;
8001        };
8002
8003        picker.maxDate = function (maxDate) {
8004            if (arguments.length === 0) {
8005                return options.maxDate ? options.maxDate.clone() : options.maxDate;
8006            }
8007
8008            if ((typeof maxDate === 'boolean') && maxDate === false) {
8009                options.maxDate = false;
8010                update();
8011                return picker;
8012            }
8013
8014            if (typeof maxDate === 'string') {
8015                if (maxDate === 'now' || maxDate === 'moment') {
8016                    maxDate = getMoment();
8017                }
8018            }
8019
8020            var parsedDate = parseInputDate(maxDate);
8021
8022            if (!parsedDate.isValid()) {
8023                throw new TypeError('maxDate() Could not parse date parameter: ' + maxDate);
8024            }
8025            if (options.minDate && parsedDate.isBefore(options.minDate)) {
8026                throw new TypeError('maxDate() date parameter is before options.minDate: ' + parsedDate.format(actualFormat));
8027            }
8028            options.maxDate = parsedDate;
8029            if (options.useCurrent && !options.keepInvalid && date.isAfter(maxDate)) {
8030                setValue(options.maxDate);
8031            }
8032            if (viewDate.isAfter(parsedDate)) {
8033                viewDate = parsedDate.clone().subtract(options.stepping, 'm');
8034            }
8035            update();
8036            return picker;
8037        };
8038
8039        picker.minDate = function (minDate) {
8040            if (arguments.length === 0) {
8041                return options.minDate ? options.minDate.clone() : options.minDate;
8042            }
8043
8044            if ((typeof minDate === 'boolean') && minDate === false) {
8045                options.minDate = false;
8046                update();
8047                return picker;
8048            }
8049
8050            if (typeof minDate === 'string') {
8051                if (minDate === 'now' || minDate === 'moment') {
8052                    minDate = getMoment();
8053                }
8054            }
8055
8056            var parsedDate = parseInputDate(minDate);
8057
8058            if (!parsedDate.isValid()) {
8059                throw new TypeError('minDate() Could not parse date parameter: ' + minDate);
8060            }
8061            if (options.maxDate && parsedDate.isAfter(options.maxDate)) {
8062                throw new TypeError('minDate() date parameter is after options.maxDate: ' + parsedDate.format(actualFormat));
8063            }
8064            options.minDate = parsedDate;
8065            if (options.useCurrent && !options.keepInvalid && date.isBefore(minDate)) {
8066                setValue(options.minDate);
8067            }
8068            if (viewDate.isBefore(parsedDate)) {
8069                viewDate = parsedDate.clone().add(options.stepping, 'm');
8070            }
8071            update();
8072            return picker;
8073        };
8074
8075        picker.defaultDate = function (defaultDate) {
8076            ///<signature helpKeyword="$.fn.datetimepicker.defaultDate">
8077            ///<summary>Returns a moment with the options.defaultDate option configuration or false if not set</summary>
8078            ///<returns type="Moment">date.clone()</returns>
8079            ///</signature>
8080            ///<signature>
8081            ///<summary>Will set the picker's inital date. If a boolean:false value is passed the options.defaultDate parameter is cleared.</summary>
8082            ///<param name="defaultDate" locid="$.fn.datetimepicker.defaultDate_p:defaultDate">Takes a string, Date, moment, boolean:false</param>
8083            ///</signature>
8084            if (arguments.length === 0) {
8085                return options.defaultDate ? options.defaultDate.clone() : options.defaultDate;
8086            }
8087            if (!defaultDate) {
8088                options.defaultDate = false;
8089                return picker;
8090            }
8091
8092            if (typeof defaultDate === 'string') {
8093                if (defaultDate === 'now' || defaultDate === 'moment') {
8094                    defaultDate = getMoment();
8095                } else {
8096                    defaultDate = getMoment(defaultDate);
8097                }
8098            }
8099
8100            var parsedDate = parseInputDate(defaultDate);
8101            if (!parsedDate.isValid()) {
8102                throw new TypeError('defaultDate() Could not parse date parameter: ' + defaultDate);
8103            }
8104            if (!isValid(parsedDate)) {
8105                throw new TypeError('defaultDate() date passed is invalid according to component setup validations');
8106            }
8107
8108            options.defaultDate = parsedDate;
8109
8110            if ((options.defaultDate && options.inline) || input.val().trim() === '') {
8111                setValue(options.defaultDate);
8112            }
8113            return picker;
8114        };
8115
8116        picker.locale = function (locale) {
8117            if (arguments.length === 0) {
8118                return options.locale;
8119            }
8120
8121            if (!moment.localeData(locale)) {
8122                throw new TypeError('locale() locale ' + locale + ' is not loaded from moment locales!');
8123            }
8124
8125            options.locale = locale;
8126            date.locale(options.locale);
8127            viewDate.locale(options.locale);
8128
8129            if (actualFormat) {
8130                initFormatting(); // reinit formatting
8131            }
8132            if (widget) {
8133                hide();
8134                show();
8135            }
8136            return picker;
8137        };
8138
8139        picker.stepping = function (stepping) {
8140            if (arguments.length === 0) {
8141                return options.stepping;
8142            }
8143
8144            stepping = parseInt(stepping, 10);
8145            if (isNaN(stepping) || stepping < 1) {
8146                stepping = 1;
8147            }
8148            options.stepping = stepping;
8149            return picker;
8150        };
8151
8152        picker.useCurrent = function (useCurrent) {
8153            var useCurrentOptions = ['year', 'month', 'day', 'hour', 'minute'];
8154            if (arguments.length === 0) {
8155                return options.useCurrent;
8156            }
8157
8158            if ((typeof useCurrent !== 'boolean') && (typeof useCurrent !== 'string')) {
8159                throw new TypeError('useCurrent() expects a boolean or string parameter');
8160            }
8161            if (typeof useCurrent === 'string' && useCurrentOptions.indexOf(useCurrent.toLowerCase()) === -1) {
8162                throw new TypeError('useCurrent() expects a string parameter of ' + useCurrentOptions.join(', '));
8163            }
8164            options.useCurrent = useCurrent;
8165            return picker;
8166        };
8167
8168        picker.collapse = function (collapse) {
8169            if (arguments.length === 0) {
8170                return options.collapse;
8171            }
8172
8173            if (typeof collapse !== 'boolean') {
8174                throw new TypeError('collapse() expects a boolean parameter');
8175            }
8176            if (options.collapse === collapse) {
8177                return picker;
8178            }
8179            options.collapse = collapse;
8180            if (widget) {
8181                hide();
8182                show();
8183            }
8184            return picker;
8185        };
8186
8187        picker.icons = function (icons) {
8188            if (arguments.length === 0) {
8189                return $.extend({}, options.icons);
8190            }
8191
8192            if (!(icons instanceof Object)) {
8193                throw new TypeError('icons() expects parameter to be an Object');
8194            }
8195            $.extend(options.icons, icons);
8196            if (widget) {
8197                hide();
8198                show();
8199            }
8200            return picker;
8201        };
8202
8203        picker.tooltips = function (tooltips) {
8204            if (arguments.length === 0) {
8205                return $.extend({}, options.tooltips);
8206            }
8207
8208            if (!(tooltips instanceof Object)) {
8209                throw new TypeError('tooltips() expects parameter to be an Object');
8210            }
8211            $.extend(options.tooltips, tooltips);
8212            if (widget) {
8213                hide();
8214                show();
8215            }
8216            return picker;
8217        };
8218
8219        picker.useStrict = function (useStrict) {
8220            if (arguments.length === 0) {
8221                return options.useStrict;
8222            }
8223
8224            if (typeof useStrict !== 'boolean') {
8225                throw new TypeError('useStrict() expects a boolean parameter');
8226            }
8227            options.useStrict = useStrict;
8228            return picker;
8229        };
8230
8231        picker.sideBySide = function (sideBySide) {
8232            if (arguments.length === 0) {
8233                return options.sideBySide;
8234            }
8235
8236            if (typeof sideBySide !== 'boolean') {
8237                throw new TypeError('sideBySide() expects a boolean parameter');
8238            }
8239            options.sideBySide = sideBySide;
8240            if (widget) {
8241                hide();
8242                show();
8243            }
8244            return picker;
8245        };
8246
8247        picker.viewMode = function (viewMode) {
8248            if (arguments.length === 0) {
8249                return options.viewMode;
8250            }
8251
8252            if (typeof viewMode !== 'string') {
8253                throw new TypeError('viewMode() expects a string parameter');
8254            }
8255
8256            if (viewModes.indexOf(viewMode) === -1) {
8257                throw new TypeError('viewMode() parameter must be one of (' + viewModes.join(', ') + ') value');
8258            }
8259
8260            options.viewMode = viewMode;
8261            currentViewMode = Math.max(viewModes.indexOf(viewMode), minViewModeNumber);
8262
8263            showMode();
8264            return picker;
8265        };
8266
8267        picker.toolbarPlacement = function (toolbarPlacement) {
8268            if (arguments.length === 0) {
8269                return options.toolbarPlacement;
8270            }
8271
8272            if (typeof toolbarPlacement !== 'string') {
8273                throw new TypeError('toolbarPlacement() expects a string parameter');
8274            }
8275            if (toolbarPlacements.indexOf(toolbarPlacement) === -1) {
8276                throw new TypeError('toolbarPlacement() parameter must be one of (' + toolbarPlacements.join(', ') + ') value');
8277            }
8278            options.toolbarPlacement = toolbarPlacement;
8279
8280            if (widget) {
8281                hide();
8282                show();
8283            }
8284            return picker;
8285        };
8286
8287        picker.widgetPositioning = function (widgetPositioning) {
8288            if (arguments.length === 0) {
8289                return $.extend({}, options.widgetPositioning);
8290            }
8291
8292            if (({}).toString.call(widgetPositioning) !== '[object Object]') {
8293                throw new TypeError('widgetPositioning() expects an object variable');
8294            }
8295            if (widgetPositioning.horizontal) {
8296                if (typeof widgetPositioning.horizontal !== 'string') {
8297                    throw new TypeError('widgetPositioning() horizontal variable must be a string');
8298                }
8299                widgetPositioning.horizontal = widgetPositioning.horizontal.toLowerCase();
8300                if (horizontalModes.indexOf(widgetPositioning.horizontal) === -1) {
8301                    throw new TypeError('widgetPositioning() expects horizontal parameter to be one of (' + horizontalModes.join(', ') + ')');
8302                }
8303                options.widgetPositioning.horizontal = widgetPositioning.horizontal;
8304            }
8305            if (widgetPositioning.vertical) {
8306                if (typeof widgetPositioning.vertical !== 'string') {
8307                    throw new TypeError('widgetPositioning() vertical variable must be a string');
8308                }
8309                widgetPositioning.vertical = widgetPositioning.vertical.toLowerCase();
8310                if (verticalModes.indexOf(widgetPositioning.vertical) === -1) {
8311                    throw new TypeError('widgetPositioning() expects vertical parameter to be one of (' + verticalModes.join(', ') + ')');
8312                }
8313                options.widgetPositioning.vertical = widgetPositioning.vertical;
8314            }
8315            update();
8316            return picker;
8317        };
8318
8319        picker.calendarWeeks = function (calendarWeeks) {
8320            if (arguments.length === 0) {
8321                return options.calendarWeeks;
8322            }
8323
8324            if (typeof calendarWeeks !== 'boolean') {
8325                throw new TypeError('calendarWeeks() expects parameter to be a boolean value');
8326            }
8327
8328            options.calendarWeeks = calendarWeeks;
8329            update();
8330            return picker;
8331        };
8332
8333        picker.showTodayButton = function (showTodayButton) {
8334            if (arguments.length === 0) {
8335                return options.showTodayButton;
8336            }
8337
8338            if (typeof showTodayButton !== 'boolean') {
8339                throw new TypeError('showTodayButton() expects a boolean parameter');
8340            }
8341
8342            options.showTodayButton = showTodayButton;
8343            if (widget) {
8344                hide();
8345                show();
8346            }
8347            return picker;
8348        };
8349
8350        picker.showClear = function (showClear) {
8351            if (arguments.length === 0) {
8352                return options.showClear;
8353            }
8354
8355            if (typeof showClear !== 'boolean') {
8356                throw new TypeError('showClear() expects a boolean parameter');
8357            }
8358
8359            options.showClear = showClear;
8360            if (widget) {
8361                hide();
8362                show();
8363            }
8364            return picker;
8365        };
8366
8367        picker.widgetParent = function (widgetParent) {
8368            if (arguments.length === 0) {
8369                return options.widgetParent;
8370            }
8371
8372            if (typeof widgetParent === 'string') {
8373                widgetParent = $(widgetParent);
8374            }
8375
8376            if (widgetParent !== null && (typeof widgetParent !== 'string' && !(widgetParent instanceof $))) {
8377                throw new TypeError('widgetParent() expects a string or a jQuery object parameter');
8378            }
8379
8380            options.widgetParent = widgetParent;
8381            if (widget) {
8382                hide();
8383                show();
8384            }
8385            return picker;
8386        };
8387
8388        picker.keepOpen = function (keepOpen) {
8389            if (arguments.length === 0) {
8390                return options.keepOpen;
8391            }
8392
8393            if (typeof keepOpen !== 'boolean') {
8394                throw new TypeError('keepOpen() expects a boolean parameter');
8395            }
8396
8397            options.keepOpen = keepOpen;
8398            return picker;
8399        };
8400
8401        picker.focusOnShow = function (focusOnShow) {
8402            if (arguments.length === 0) {
8403                return options.focusOnShow;
8404            }
8405
8406            if (typeof focusOnShow !== 'boolean') {
8407                throw new TypeError('focusOnShow() expects a boolean parameter');
8408            }
8409
8410            options.focusOnShow = focusOnShow;
8411            return picker;
8412        };
8413
8414        picker.inline = function (inline) {
8415            if (arguments.length === 0) {
8416                return options.inline;
8417            }
8418
8419            if (typeof inline !== 'boolean') {
8420                throw new TypeError('inline() expects a boolean parameter');
8421            }
8422
8423            options.inline = inline;
8424            return picker;
8425        };
8426
8427        picker.clear = function () {
8428            clear();
8429            return picker;
8430        };
8431
8432        picker.keyBinds = function (keyBinds) {
8433            if (arguments.length === 0) {
8434                return options.keyBinds;
8435            }
8436
8437            options.keyBinds = keyBinds;
8438            return picker;
8439        };
8440
8441        picker.getMoment = function (d) {
8442            return getMoment(d);
8443        };
8444
8445        picker.debug = function (debug) {
8446            if (typeof debug !== 'boolean') {
8447                throw new TypeError('debug() expects a boolean parameter');
8448            }
8449
8450            options.debug = debug;
8451            return picker;
8452        };
8453
8454        picker.allowInputToggle = function (allowInputToggle) {
8455            if (arguments.length === 0) {
8456                return options.allowInputToggle;
8457            }
8458
8459            if (typeof allowInputToggle !== 'boolean') {
8460                throw new TypeError('allowInputToggle() expects a boolean parameter');
8461            }
8462
8463            options.allowInputToggle = allowInputToggle;
8464            return picker;
8465        };
8466
8467        picker.showClose = function (showClose) {
8468            if (arguments.length === 0) {
8469                return options.showClose;
8470            }
8471
8472            if (typeof showClose !== 'boolean') {
8473                throw new TypeError('showClose() expects a boolean parameter');
8474            }
8475
8476            options.showClose = showClose;
8477            return picker;
8478        };
8479
8480        picker.keepInvalid = function (keepInvalid) {
8481            if (arguments.length === 0) {
8482                return options.keepInvalid;
8483            }
8484
8485            if (typeof keepInvalid !== 'boolean') {
8486                throw new TypeError('keepInvalid() expects a boolean parameter');
8487            }
8488            options.keepInvalid = keepInvalid;
8489            return picker;
8490        };
8491
8492        picker.datepickerInput = function (datepickerInput) {
8493            if (arguments.length === 0) {
8494                return options.datepickerInput;
8495            }
8496
8497            if (typeof datepickerInput !== 'string') {
8498                throw new TypeError('datepickerInput() expects a string parameter');
8499            }
8500
8501            options.datepickerInput = datepickerInput;
8502            return picker;
8503        };
8504
8505        picker.parseInputDate = function (parseInputDate) {
8506            if (arguments.length === 0) {
8507                return options.parseInputDate;
8508            }
8509
8510            if (typeof parseInputDate !== 'function') {
8511                throw new TypeError('parseInputDate() sholud be as function');
8512            }
8513
8514            options.parseInputDate = parseInputDate;
8515
8516            return picker;
8517        };
8518
8519        picker.disabledTimeIntervals = function (disabledTimeIntervals) {
8520            ///<signature helpKeyword="$.fn.datetimepicker.disabledTimeIntervals">
8521            ///<summary>Returns an array with the currently set disabled dates on the component.</summary>
8522            ///<returns type="array">options.disabledTimeIntervals</returns>
8523            ///</signature>
8524            ///<signature>
8525            ///<summary>Setting this takes precedence over options.minDate, options.maxDate configuration. Also calling this function removes the configuration of
8526            ///options.enabledDates if such exist.</summary>
8527            ///<param name="dates" locid="$.fn.datetimepicker.disabledTimeIntervals_p:dates">Takes an [ string or Date or moment ] of values and allows the user to select only from those days.</param>
8528            ///</signature>
8529            if (arguments.length === 0) {
8530                return (options.disabledTimeIntervals ? $.extend({}, options.disabledTimeIntervals) : options.disabledTimeIntervals);
8531            }
8532
8533            if (!disabledTimeIntervals) {
8534                options.disabledTimeIntervals = false;
8535                update();
8536                return picker;
8537            }
8538            if (!(disabledTimeIntervals instanceof Array)) {
8539                throw new TypeError('disabledTimeIntervals() expects an array parameter');
8540            }
8541            options.disabledTimeIntervals = disabledTimeIntervals;
8542            update();
8543            return picker;
8544        };
8545
8546        picker.disabledHours = function (hours) {
8547            ///<signature helpKeyword="$.fn.datetimepicker.disabledHours">
8548            ///<summary>Returns an array with the currently set disabled hours on the component.</summary>
8549            ///<returns type="array">options.disabledHours</returns>
8550            ///</signature>
8551            ///<signature>
8552            ///<summary>Setting this takes precedence over options.minDate, options.maxDate configuration. Also calling this function removes the configuration of
8553            ///options.enabledHours if such exist.</summary>
8554            ///<param name="hours" locid="$.fn.datetimepicker.disabledHours_p:hours">Takes an [ int ] of values and disallows the user to select only from those hours.</param>
8555            ///</signature>
8556            if (arguments.length === 0) {
8557                return (options.disabledHours ? $.extend({}, options.disabledHours) : options.disabledHours);
8558            }
8559
8560            if (!hours) {
8561                options.disabledHours = false;
8562                update();
8563                return picker;
8564            }
8565            if (!(hours instanceof Array)) {
8566                throw new TypeError('disabledHours() expects an array parameter');
8567            }
8568            options.disabledHours = indexGivenHours(hours);
8569            options.enabledHours = false;
8570            if (options.useCurrent && !options.keepInvalid) {
8571                var tries = 0;
8572                while (!isValid(date, 'h')) {
8573                    date.add(1, 'h');
8574                    if (tries === 24) {
8575                        throw 'Tried 24 times to find a valid date';
8576                    }
8577                    tries++;
8578                }
8579                setValue(date);
8580            }
8581            update();
8582            return picker;
8583        };
8584
8585        picker.enabledHours = function (hours) {
8586            ///<signature helpKeyword="$.fn.datetimepicker.enabledHours">
8587            ///<summary>Returns an array with the currently set enabled hours on the component.</summary>
8588            ///<returns type="array">options.enabledHours</returns>
8589            ///</signature>
8590            ///<signature>
8591            ///<summary>Setting this takes precedence over options.minDate, options.maxDate configuration. Also calling this function removes the configuration of options.disabledHours if such exist.</summary>
8592            ///<param name="hours" locid="$.fn.datetimepicker.enabledHours_p:hours">Takes an [ int ] of values and allows the user to select only from those hours.</param>
8593            ///</signature>
8594            if (arguments.length === 0) {
8595                return (options.enabledHours ? $.extend({}, options.enabledHours) : options.enabledHours);
8596            }
8597
8598            if (!hours) {
8599                options.enabledHours = false;
8600                update();
8601                return picker;
8602            }
8603            if (!(hours instanceof Array)) {
8604                throw new TypeError('enabledHours() expects an array parameter');
8605            }
8606            options.enabledHours = indexGivenHours(hours);
8607            options.disabledHours = false;
8608            if (options.useCurrent && !options.keepInvalid) {
8609                var tries = 0;
8610                while (!isValid(date, 'h')) {
8611                    date.add(1, 'h');
8612                    if (tries === 24) {
8613                        throw 'Tried 24 times to find a valid date';
8614                    }
8615                    tries++;
8616                }
8617                setValue(date);
8618            }
8619            update();
8620            return picker;
8621        };
8622        /**
8623         * Returns the component's model current viewDate, a moment object or null if not set. Passing a null value unsets the components model current moment. Parsing of the newDate parameter is made using moment library with the options.format and options.useStrict components configuration.
8624         * @param {Takes string, viewDate, moment, null parameter.} newDate
8625         * @returns {viewDate.clone()}
8626         */
8627        picker.viewDate = function (newDate) {
8628            if (arguments.length === 0) {
8629                return viewDate.clone();
8630            }
8631
8632            if (!newDate) {
8633                viewDate = date.clone();
8634                return picker;
8635            }
8636
8637            if (typeof newDate !== 'string' && !moment.isMoment(newDate) && !(newDate instanceof Date)) {
8638                throw new TypeError('viewDate() parameter must be one of [string, moment or Date]');
8639            }
8640
8641            viewDate = parseInputDate(newDate);
8642            viewUpdate();
8643            return picker;
8644        };
8645
8646        // initializing element and component attributes
8647        if (element.is('input')) {
8648            input = element;
8649        } else {
8650            input = element.find(options.datepickerInput);
8651            if (input.length === 0) {
8652                input = element.find('input');
8653            } else if (!input.is('input')) {
8654                throw new Error('CSS class "' + options.datepickerInput + '" cannot be applied to non input element');
8655            }
8656        }
8657
8658        if (element.hasClass('input-group')) {
8659            // in case there is more then one 'input-group-addon' Issue #48
8660            if (element.find('.datepickerbutton').length === 0) {
8661                component = element.find('.input-group-addon');
8662            } else {
8663                component = element.find('.datepickerbutton');
8664            }
8665        }
8666
8667        if (!options.inline && !input.is('input')) {
8668            throw new Error('Could not initialize DateTimePicker without an input element');
8669        }
8670
8671        // Set defaults for date here now instead of in var declaration
8672        date = getMoment();
8673        viewDate = date.clone();
8674
8675        $.extend(true, options, dataToOptions());
8676
8677        picker.options(options);
8678
8679        initFormatting();
8680
8681        attachDatePickerElementEvents();
8682
8683        if (input.prop('disabled')) {
8684            picker.disable();
8685        }
8686        if (input.is('input') && input.val().trim().length !== 0) {
8687            setValue(parseInputDate(input.val().trim()));
8688        }
8689        else if (options.defaultDate && input.attr('placeholder') 
8689=== undefined) {
8690            setValue(options.defaultDate);
8691        }
8692        if (options.inline) {
8693            show();
8694        }
8695        return picker;
8696    };
8697
8698    /********************************************************************************
8699     *
8700     * jQuery plugin constructor and defaults object
8701     *
8702     ********************************************************************************/
8703
8704    /**
8705    * See (http://jquery.com/).
8706    * @name jQuery
8707    * @class
8708    * See the jQuery Library  (http://jquery.com/) for full details.  This just
8709    * documents the function and classes that are added to jQuery by this plug-in.
8710    */
8711    /**
8712     * See (http://jquery.com/)
8713     * @name fn
8714     * @class
8715     * See the jQuery Library  (http://jquery.com/) for full details.  This just
8716     * documents the function and classes that are added to jQuery by this plug-in.
8717     * @memberOf jQuery
8718     */
8719    /**
8720     * Show comments
8721     * @class datetimepicker
8722     * @memberOf jQuery.fn
8723     */
8724    $.fn.datetimepicker = function (options) {
8725        options = options || {};
8726
8727        var args = Array.prototype.slice.call(arguments, 1),
8728            isInstance = true,
8729            thisMethods = ['destroy', 'hide', 'show', 'toggle'],
8730            returnValue;
8731
8732        if (typeof options === 'object') {
8733            return this.each(function () {
8734                var $this = $(this),
8735                    _options;
8736                if (!$this.data('DateTimePicker')) {
8737                    // create a private copy of the defaults object
8738                    _options = $.extend(true, {}, $.fn.datetimepicker.defaults, options);
8739                    $this.data('DateTimePicker', dateTimePicker($this, _options));
8740                }
8741            });
8742        } else if (typeof options === 'string') {
8743            this.each(function () {
8744                var $this = $(this),
8745                    instance = $this.data('DateTimePicker');
8746                if (!instance) {
8747                    throw new Error('bootstrap-datetimepicker("' + options + '") method was called on an element that is not using DateTimePicker');
8748                }
8749
8750                returnValue = instance[options].apply(instance, args);
8751                isInstance = returnValue === instance;
8752            });
8753
8754            if (isInstance || $.inArray(options, thisMethods) > -1) {
8755                return this;
8756            }
8757
8758            return returnValue;
8759        }
8760
8761        throw new TypeError('Invalid arguments for DateTimePicker: ' + options);
8762    };
8763
8764    $.fn.datetimepicker.defaults = {
8765        timeZone: '',
8766        format: false,
8767        dayViewHeaderFormat: 'MMMM YYYY',
8768        extraFormats: false,
8769        stepping: 1,
8770        minDate: false,
8771        maxDate: false,
8772        useCurrent: true,
8773        collapse: true,
8774        locale: moment.locale(),
8775        defaultDate: false,
8776        disabledDates: false,
8777        enabledDates: false,
8778        icons: {
8779            time: 'glyphicon glyphicon-time',
8780            date: 'glyphicon glyphicon-calendar',
8781            up: 'glyphicon glyphicon-chevron-up',
8782            down: 'glyphicon glyphicon-chevron-down',
8783            previous: 'glyphicon glyphicon-chevron-left',
8784            next: 'glyphicon glyphicon-chevron-right',
8785            today: 'glyphicon glyphicon-screenshot',
8786            clear: 'glyphicon glyphicon-trash',
8787            close: 'glyphicon glyphicon-remove'
8788        },
8789        tooltips: {
8790            today: 'Go to today',
8791            clear: 'Clear selection',
8792            close: 'Close the picker',
8793            selectMonth: 'Select Month',
8794            prevMonth: 'Previous Month',
8795            nextMonth: 'Next Month',
8796            selectYear: 'Select Year',
8797            prevYear: 'Previous Year',
8798            nextYear: 'Next Year',
8799            selectDecade: 'Select Decade',
8800            prevDecade: 'Previous Decade',
8801            nextDecade: 'Next Decade',
8802            prevCentury: 'Previous Century',
8803            nextCentury: 'Next Century',
8804            pickHour: 'Pick Hour',
8805            incrementHour: 'Increment Hour',
8806            decrementHour: 'Decrement Hour',
8807            pickMinute: 'Pick Minute',
8808            incrementMinute: 'Increment Minute',
8809            decrementMinute: 'Decrement Minute',
8810            pickSecond: 'Pick Second',
8811            incrementSecond: 'Increment Second',
8812            decrementSecond: 'Decrement Second',
8813            togglePeriod: 'Toggle Period',
8814            selectTime: 'Select Time'
8815        },
8816        useStrict: false,
8817        sideBySide: false,
8818        daysOfWeekDisabled: false,
8819        calendarWeeks: false,
8820        viewMode: 'days',
8821        toolbarPlacement: 'default',
8822        showTodayButton: false,
8823        showClear: false,
8824        showClose: false,
8825        widgetPositioning: {
8826            horizontal: 'auto',
8827            vertical: 'auto'
8828        },
8829        widgetParent: null,
8830        ignoreReadonly: false,
8831        keepOpen: false,
8832        focusOnShow: true,
8833        inline: false,
8834        keepInvalid: false,
8835        datepickerInput: '.datepickerinput',
8836        keyBinds: {
8837            up: function (widget) {
8838                if (!widget) {
8839                    return;
8840                }
8841                var d = this.date() || this.getMoment();
8842                if (widget.find('.datepicker').is(':visible')) {
8843                    this.date(d.clone().subtract(7, 'd'));
8844                } else {
8845                    this.date(d.clone().add(this.stepping(), 'm'));
8846                }
8847            },
8848            down: function (widget) {
8849                if (!widget) {
8850                    this.show();
8851                    return;
8852                }
8853                var d = this.date() || this.getMoment();
8854                if (widget.find('.datepicker').is(':visible')) {
8855                    this.date(d.clone().add(7, 'd'));
8856                } else {
8857                    this.date(d.clone().subtract(this.stepping(), 'm'));
8858                }
8859            },
8860            'control up': function (widget) {
8861                if (!widget) {
8862                    return;
8863                }
8864                var d = this.date() || this.getMoment();
8865                if (widget.find('.datepicker').is(':visible')) {
8866                    this.date(d.clone().subtract(1, 'y'));
8867                } else {
8868                    this.date(d.clone().add(1, 'h'));
8869                }
8870            },
8871            'control down': function (widget) {
8872                if (!widget) {
8873                    return;
8874                }
8875                var d = this.date() || this.getMoment();
8876                if (widget.find('.datepicker').is(':visible')) {
8877                    this.date(d.clone().add(1, 'y'));
8878                } else {
8879                    this.date(d.clone().subtract(1, 'h'));
8880                }
8881            },
8882            left: function (widget) {
8883                if (!widget) {
8884                    return;
8885                }
8886                var d = this.date() || this.getMoment();
8887                if (widget.find('.datepicker').is(':visible')) {
8888                    this.date(d.clone().subtract(1, 'd'));
8889                }
8890            },
8891            right: function (widget) {
8892                if (!widget) {
8893                    return;
8894                }
8895                var d = this.date() || this.getMoment();
8896                if (widget.find('.datepicker').is(':visible')) {
8897                    this.date(d.clone().add(1, 'd'));
8898                }
8899            },
8900            pageUp: function (widget) {
8901                if (!widget) {
8902                    return;
8903                }
8904                var d = this.date() || this.getMoment();
8905                if (widget.find('.datepicker').is(':visible')) {
8906                    this.date(d.clone().subtract(1, 'M'));
8907                }
8908            },
8909            pageDown: function (widget) {
8910                if (!widget) {
8911                    return;
8912                }
8913                var d = this.date() || this.getMoment();
8914                if (widget.find('.datepicker').is(':visible')) {
8915                    this.date(d.clone().add(1, 'M'));
8916                }
8917            },
8918            enter: function () {
8919                this.hide();
8920            },
8921            escape: function () {
8922                this.hide();
8923            },
8924            //tab: function (widget) { //this break the flow of the form. disabling for now
8925            //    var toggle = widget.find('.picker-switch a[data-action="togglePicker"]');
8926            //    if(toggle.length > 0) toggle.click();
8927            //},
8928            'control space': function (widget) {
8929                if (!widget) {
8930                    return;
8931                }
8932                if (widget.find('.timepicker').is(':visible')) {
8933                    widget.find('.btn[data-action="togglePeriod"]').click();
8934                }
8935            },
8936            t: function () {
8937                this.date(this.getMoment());
8938            },
8939            'delete': function () {
8940                this.clear();
8941            }
8942        },
8943        debug: false,
8944        allowInputToggle: false,
8945        disabledTimeIntervals: false,
8946        disabledHours: false,
8947        enabledHours: false,
8948        viewDate: false
8949    };
8950
8951    return $.fn.datetimepicker;
8952}));
8953
8954/**
8955 * @author William DURAND <[email protected]>
8956 * @license MIT Licensed
8957 */
8958!function(e,a){"function"==typeof define&&define.amd?define("Translator",a):"object"==typeof module&&module.exports?module.exports=a():e.Translator=a()}(this,function(){"use strict";function e(e,a){var s,n=p.placeHolderPrefix,c=p.placeHolderSuffix;for(s in a){var r=new RegExp(n+s+c,"g");if(r.test(e)){var t=String(a[s]).replace(new RegExp("\\$","g"),"$$$$");e=e.replace(r,t)}}return e}function a(e,a,n,c,r){var t=n||c||r,i=a,u=t.split("_")[0];if(!(t in l))if(u in l)t=u;else{if(!(r in l))return e;t=r}if(void 0===i||null===i)for(var o=0;o<f.length;o++)if(s(t,f[o],e)||s(u,f[o],e)||s(r,f[o],e)){i=f[o];break}if(s(t,i,e))return l[t][i][e];for(var h,d,p,m;t.length>2&&(h=t.length,d=t.split(/[\s_]+/),p=d[d.length-1],m=p.length,1!==d.length);)if(t=t.substring(0,h-(m+1)),s(t,i,e))return l[t][i][e];return s(r,i,e)?l[r][i][e]:e}function s(e,a,s){return e in l&&(a in l[e]&&s in l[e][a])}function n(e,a,s){var n,t,i=[],l=[],u=e.split(p.pluralSeparator),f=[];for(n=0;n<u.length;n++){var m=u[n];h.test(m)?(f=m.match(h),i[f[0]]=f[f.length-1]):o.test(m)?(f=m.match(o),l.push(f[1])):l.push(m)}for(t in i)if(d.test(t))if(f=t.match(d),f[1]){var g,v=f[2].split(",");for(g in v)if(a==v[g])return i[t]}else{var b=c(f[4]),k=c(f[5]);if(("["===f[3]?a>=b:a>b)&&("]"===f[6]?a<=k:a<k))return i[t]}return l[r(a,s)]||l[0]||void 0}function c(e){return"-Inf"===e?Number.NEGATIVE_INFINITY:"+Inf"===e||"Inf"===e?Number.POSITIVE_INFINITY:parseInt(e,10)}function r(e,a){var s=a;switch("pt_BR"===s&&(s="xbr"),s.length>3&&(s=s.split("_")[0]),s){case"bo":case"dz":case"id":case"ja":case"jv":case"ka":case"km":case"kn":case"ko":case"ms":case"th":case"tr":case"vi":case"zh":return 0;case"af":case"az":case"bn":case"bg":case"ca":case"da":case"de":case"el":case"en":case"eo":case"es":case"et":case"eu":case"fa":case"fi":case"fo":case"fur":case"fy":case"gl":case"gu":case"ha":case"he":case"hu":case"is":case"it":case"ku":case"lb":case"ml":case"mn":case"mr":case"nah":case"nb":case"ne":case"nl":case"nn":case"no":case"om":case"or":case"pa":case"pap":case"ps":case"pt":case"so":case"sq":case"sv":case"sw":case"ta":case"te":case"tk":case"ur":case"zu":return 1==e?0:1;case"am":case"bh":case"fil":case"fr":case"gun":case"hi":case"ln":case"mg":case"nso":case"xbr":case"ti":case"wa":return 0===e||1==e?0:1;case"be":case"bs":case"hr":case"ru":case"sr":case"uk":return e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2;case"cs":case"sk":return 1==e?0:e>=2&&e<=4?1:2;case"ga":return 1==e?0:2==e?1:2;case"lt":return e%10==1&&e%100!=11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2;case"sl":return e%100==1?0:e%100==2?1:e%100==3||e%100==4?2:3;case"mk":return e%10==1?0:1;
8958case"mt":return 1==e?0:0===e||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3;case"lv":return 0===e?0:e%10==1&&e%100!=11?1:2;case"pl":return 1==e?0:e%10>=2&&e%10<=4&&(e%100<12||e%100>14)?1:2;case"cy":return 1==e?0:2==e?1:8==e||11==e?2:3;case"ro":return 1==e?0:0===e||e%100>0&&e%100<20?1:2;case"ar":return 0===e?0:1==e?1:2==e?2:e>=3&&e<=10?3:e>=11&&e<=99?4:5;default:return 0}}function t(e,a){for(var s=0;s<e.length;s++)if(a===e[s])return!0;return!1}function i(){return"undefined"!=typeof document?document.documentElement.lang.replace("-","_"):u}var l={},u="en",f=[],o=new RegExp(/^\w+\: +(.+)$/),h=new RegExp(/^\s*((\{\s*(\-?\d+[\s*,\s*\-?\d+]*)\s*\})|([\[\]])\s*(-Inf|\-?\d+)\s*,\s*(\+?Inf|\-?\d+)\s*([\[\]]))\s?(.+?)$/),d=new RegExp(/^\s*(\{\s*(\-?\d+[\s*,\s*\-?\d+]*)\s*\})|([\[\]])\s*(-Inf|\-?\d+)\s*,\s*(\+?Inf|\-?\d+)\s*([\[\]])/),p={locale:i(),fallback:u,placeHolderPrefix:"%",placeHolderSuffix:"%",defaultDomain:"messages",pluralSeparator:"|",add:function(e,a,s,n){var c=n||this.locale||this.fallback,r=s||this.defaultDomain;return l[c]||(l[c]={}),l[c][r]||(l[c][r]={}),l[c][r][e]=a,!1===t(f,r)&&f.push(r),this},trans:function(s,n,c,r){return e(a(s,c,r,this.locale,this.fallback),n||{})},transChoice:function(s,c,r,t,i){var l=a(s,t,i,this.locale,this.fallback),u=parseInt(c,10);return r=r||{},void 0===r.count&&(r.count=c),void 0===l||isNaN(u)||(l=n(l,u,i||this.locale||this.fallback)),e(l,r)},fromJSON:function(e){if("string"==typeof e&&(e=JSON.parse(e)),e.locale&&(this.locale=e.locale),e.fallback&&(this.fallback=e.fallback),e.defaultDomain&&(this.defaultDomain=e.defaultDomain),e.translations)for(var a in e.translations)for(var s in e.translations[a])for(var n in e.translations[a][s])this.add(n,e.translations[a][s][n],s,a);return this},reset:function(){l={},f=[],this.locale=i()}};return p});
8959(function (t) {
8960// de
8961t.add("alert.browser_update", "Sie benutzen noch den %browserName% Version %browserVersion%. Diese Version ist veraltet und weist erhebliche Sicherheitsl\u00fccken auf.<br>M\u00f6glicherweise k\u00f6nnen Teile der Webseite dadurch nicht richtig dargestellt werden. %linkStart%Bitte aktualisieren Sie Ihren Browser.%linkEnd%", "javascript", "de");
8962t.add("alert.cookie", "Um unsere Webseite f\u00fcr Sie optimal zu gestalten und fortlaufend verbessern zu k\u00f6nnen, werden Daten z.B: in Cookies erhoben. Details zur Datenerhebung entnehmen Sie dem Bereich Datenschutz. Durch die weitere Nutzung der Webseite stimmen Sie der Datenschutzerkl\u00e4rung und der Verwendung von Cookies zu.", "javascript", "de");
8963t.add("alert.newsletter", "Danke f\u00fcr Ihre Registrierung.", "javascript", "de");
8964t.add("datatables.emptyTable", "Keine Daten in der Tabelle vorhanden", "javascript", "de");
8965t.add("datatables.info", "_START_ bis _END_ von _TOTAL_ Eintr\u00e4gen", "javascript", "de");
8966t.add("datatables.infoEmpty", "0 bis 0 von 0 Eintr\u00e4gen", "javascript", "de");
8967t.add("datatables.infoFiltered", "(gefiltert von _MAX_ Eintr\u00e4gen)", "javascript", "de");
8968t.add("datatables.infoPostFix", "", "javascript", "de");
8969t.add("datatables.InfoThousands", ".", "javascript", "de");
8970t.add("datatables.lengthMenu", "_MENU_ Eintr\u00e4ge anzeigen", "javascript", "de");
8971t.add("datatables.lengthMenu.showAll", "Alle", "javascript", "de");
8972t.add("datatables.loadingRecords", "Wird geladen...", "javascript", "de");
8973t.add("datatables.processing", "Bitte warten...", "javascript", "de");
8974t.add("datatables.search", "Suchen", "javascript", "de");
8975t.add("datatables.zeroRecords", "Keine Eintr\u00e4ge vorhanden.", "javascript", "de");
8976t.add("datatables.paginate.first", "Erste", "javascript", "de");
8977t.add("datatables.paginate.previous", "Zur\u00fcck", "javascript", "de");
8978t.add("datatables.paginate.next", "N\u00e4chste", "javascript", "de");
8979t.add("datatables.paginate.last", "Letzte", "javascript", "de");
8980t.add("datatables.aria.sortAscending", "aktivieren, um Spalte aufsteigend zu sortieren", "javascript", "de");
8981t.add("datatables.aria.sortDescending", "aktivieren, um Spalte absteigend zu sortieren", "javascript", "de");
8982})(Translator);
8983
8984(function (t) {
8985// en
8986t.add("alert.browser_update", "You are still using the %browserName% version %browserVersion%. This version is outdated and you have significant security vulnerabilities.<br>This website may therefore not be displayed correctly. %linkStart%Please update your browser.%linkEnd%", "javascript", "en");
8987t.add("alert.cookie", "In order to optimize our website for you and to be able to continuously improve it, data is collected, for example, in cookies. Details on data collection can be found in the Privacy section. By continuing to use the website, you agree to the privacy policy and the use of cookies.", "j
vendor: 26,655 bytes, lines 8987-9159
8987avascript", "en");
8988t.add("alert.newsletter", "Thank you for your registration.", "javascript", "en");
8989t.add("datatables.emptyTable", "No data available in table", "javascript", "en");
8990t.add("datatables.info", "Showing _START_ to _END_ of _TOTAL_ entries", "javascript", "en");
8991t.add("datatables.infoEmpty", "Showing 0 to 0 of 0 entries", "javascript", "en");
8992t.add("datatables.infoFiltered", "(filtered from _MAX_ total entries)", "javascript", "en");
8993t.add("datatables.infoPostFix", "", "javascript", "en");
8994t.add("datatables.InfoThousands", ",", "javascript", "en");
8995t.add("datatables.lengthMenu", "Show _MENU_ entries", "javascript", "en");
8996t.add("datatables.lengthMenu.showAll", "All", "javascript", "en");
8997t.add("datatables.loadingRecords", "Loading...", "javascript", "en");
8998t.add("datatables.processing", "Processing...", "javascript", "en");
8999t.add("datatables.search", "Search", "javascript", "en");
9000t.add("datatables.zeroRecords", "No matching records found", "javascript", "en");
9001t.add("datatables.paginate.first", "First", "javascript", "en");
9002t.add("datatables.paginate.previous", "Previous", "javascript", "en");
9003t.add("datatables.paginate.next", "Next", "javascript", "en");
9004t.add("datatables.paginate.last", "Last", "javascript", "en");
9005t.add("datatables.aria.sortAscending", "activate to sort column ascending", "javascript", "en");
9006t.add("datatables.aria.sortDescending", "activate to sort column descending", "javascript", "en");
9007})(Translator);
9008
9009(function (t) {
9010// es
9011t.add("alert.cookie", "Para optimizar nuestro sitio web y poder mejorarlo continuamente, utilizamos cookies. Al continuar utilizando el sitio web, acepta el uso de cookies.", "javascript", "es");
9012})(Translator);
9013
9014/*!
9015 * JavaScript Cookie v2.0.3
9016 * https://github.com/js-cookie/js-cookie
9017 *
9018 * Copyright 2006, 2015 Klaus Hartl & Fagner Brack
9019 * Released under the MIT license
9020 */
9021(function (factory) {
9022    if (typeof define === 'function' && define.amd) {
9023        define(factory);
9024    } else if (typeof exports === 'object') {
9025        module.exports = factory();
9026    } else {
9027        var _OldCookies = window.Cookies;
9028        var api = window.Cookies = factory(window.jQuery);
9029        api.noConflict = function () {
9030            window.Cookies = _OldCookies;
9031            return api;
9032        };
9033    }
9034}(function () {
9035    function extend () {
9036        var i = 0;
9037        var result = {};
9038        for (; i < arguments.length; i++) {
9039            var attributes = arguments[ i ];
9040            for (var key in attributes) {
9041                result[key] = attributes[key];
9042            }
9043        }
9044        return result;
9045    }
9046
9047    function init (converter) {
9048        function api (key, value, attributes) {
9049            var result;
9050
9051            // Write
9052
9053            if (arguments.length > 1) {
9054                attributes = extend({
9055                    path: '/'
9056                }, api.defaults, attributes);
9057
9058                if (typeof attributes.expires === 'number') {
9059                    var expires = new Date();
9060                    expires.setMilliseconds(expires.getMilliseconds() + attributes.expires * 864e+5);
9061                    attributes.expires = expires;
9062                }
9063
9064                try {
9065                    result = JSON.stringify(value);
9066                    if (/^[\{\[]/.test(result)) {
9067                        value = result;
9068                    }
9069                } catch (e) {}
9070
9071                value = encodeURIComponent(String(value));
9072                value = value.replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g, decodeURIComponent);
9073
9074                key = encodeURIComponent(String(key));
9075                key = key.replace(/%(23|24|26|2B|5E|60|7C)/g, decodeURIComponent);
9076                key = key.replace(/[\(\)]/g, escape);
9077
9078                return (document.cookie = [
9079                    key, '=', value,
9080                    attributes.expires && '; expires=' + attributes.expires.toUTCString(), // use expires attribute, max-age is not supported by IE
9081                    attributes.path    && '; path=' + attributes.path,
9082                    attributes.domain  && '; domain=' + attributes.domain,
9083                    attributes.secure ? '; secure' : ''
9084                ].join(''));
9085            }
9086
9087            // Read
9088
9089            if (!key) {
9090                result = {};
9091            }
9092
9093            // To prevent the for loop in the first place assign an empty array
9094            // in case there are no cookies at all. Also prevents odd result when
9095            // calling "get()"
9096            var cookies = document.cookie ? document.cookie.split('; ') : [];
9097            var rdecode = /(%[0-9A-Z]{2})+/g;
9098            var i = 0;
9099
9100            for (; i < cookies.length; i++) {
9101                var parts = cookies[i].split('=');
9102                var name = parts[0].replace(rdecode, decodeURIComponent);
9103                var cookie = parts.slice(1).join('=');
9104
9105                if (cookie.charAt(0) === '"') {
9106                    cookie = cookie.slice(1, -1);
9107                }
9108
9109                try {
9110                    cookie = converter && converter(cookie, name) || cookie.replace(rdecode, decodeURIComponent);
9111
9112                    if (this.json) {
9113                        try {
9114                            cookie = JSON.parse(cookie);
9115                        } catch (e) {}
9116                    }
9117
9118                    if (key === name) {
9119                        result = cookie;
9120                        break;
9121                    }
9122
9123                    if (!key) {
9124                        result[name] = cookie;
9125                    }
9126                } catch (e) {}
9127            }
9128
9129            return result;
9130        }
9131
9132        api.get = api.set = api;
9133        api.getJSON = function () {
9134            return api.apply({
9135                json: true
9136            }, [].slice.call(arguments));
9137        };
9138        api.defaults = {};
9139
9140        api.remove = function (key, attributes) {
9141            api(key, '', extend(attributes, {
9142                expires: -1
9143            }));
9144        };
9145
9146        api.withConverter = init;
9147
9148        return api;
9149    }
9150
9151    return init();
9152}));
9153
9154/**
9155 * Owl Carousel v2.3.4
9156 * Copyright 2013-2018 David Deutsch
9157 * Licensed under: SEE LICENSE IN https://github.com/OwlCarousel2/OwlCarousel2/blob/master/LICENSE
9158 */
9159!function(a,b,c,d){function e(b,c){this.settings=null,this.options=a.extend({},e.Defaults,c),this.$element=a(b),this._handlers={},this._plugins={},this._supress={},this._current=null,this._speed=null,this._coordinates=[],this._breakpoint=null,this._width=null,this._items=[],this._clones=[],this._mergers=[],this._widths=[],this._invalidated={},this._pipe=[],this._drag={time:null,target:null,pointer:null,stage:{start:null,current:null},direction:null},this._states={current:{},tags:{initializing:["busy"],animating:["busy"],dragging:["interacting"]}},a.each(["onResize","onThrottledResize"],a.proxy(function(b,c){this._handlers[c]=a.proxy(this[c],this)},this)),a.each(e.Plugins,a.proxy(function(a,b){this._plugins[a.charAt(0).toLowerCase()+a.slice(1)]=new b(this)},this)),a.each(e.Workers,a.proxy(function(b,c){this._pipe.push({filter:c.filter,run:a.proxy(c.run,this)})},this)),this.setup(),this.initialize()}e.Defaults={items:3,loop:!1,center:!1,rewind:!1,checkVisibility:!0,mouseDrag:!0,touchDrag:!0,pullDrag:!0,freeDrag:!1,margin:0,stagePadding:0,merge:!1,mergeFit:!0,autoWidth:!1,startPosition:0,rtl:!1,smartSpeed:250,fluidSpeed:!1,dragEndSpeed:!1,responsive:{},responsiveRefreshRate:200,responsiveBaseElement:b,fallbackEasing:"swing",slideTransition:"",info:!1,nestedItemSelector:!1,itemElement:"div",stageElement:"div",refreshClass:"owl-refresh",loadedClass:"owl-loaded",loadingClass:"owl-loading",rtlClass:"owl-rtl",responsiveClass:"owl-responsive",dragClass:"owl-drag",itemClass:"owl-item",stageClass:"owl-stage",stageOuterClass:"owl-stage-outer",grabClass:"owl-grab"},e.Width={Default:"default",Inner:"inner",Outer:"outer"},e.Type={Event:"event",State:"state"},e.Plugins={},e.Workers=[{filter:["width","settings"],run:function(){this._width=this.$element.width()}},{filter:["width","items","settings"],run:function(a){a.current=this._items&&this._items[this.relative(this._current)]}},{filter:["items","settings"],run:function(){this.$stage.children(".cloned").remove()}},{filter:["width","items","settings"],run:function(a){var b=this.settings.margin||"",c=!this.settings.autoWidth,d=this.settings.rtl,e={width:"auto","margin-left":d?b:"","margin-right":d?"":b};!c&&this.$stage.children().css(e),a.css=e}},{filter:["width","items","settings"],run:function(a){var b=(this.width()/this.settings.items).toFixed(3)-this.settings.margin,c=null,d=this._items.length,e=!this.settings.autoWidth,f=[];for(a.items={merge:!1,width:b};d--;)c=this._mergers[d],c=this.settings.mergeFit&&Math.min(c,this.settings.items)||c,a.items.merge=c>1||a.items.merge,f[d]=e?b*c:this._items[d].width();this._widths=f}},{filter:["items","settings"],run:function(){var b=[],c=this._items,d=this.settings,e=Math.max(2*d.items,4),f=2*Math.ceil(c.length/2),g=d.loop&&c.length?d.rewind?e:Math.max(e,f):0,h="",i="";for(g/=2;g>0;)b.push(this.normalize(b.length/2,!0)),h+=c[b[b.length-1]][0].outerHTML,b.push(this.normalize(c.length-1-(b.length-1)/2,!0)),i=c[b[b.length-1]][0].outerHTML+i,g-=1;this._clones=b,a(h).addClass("cloned").appendTo(this.$stage),a(i).addClass("cloned").prependTo(this.$stage)}},{filter:["width","items","settings"],run:function(){for(var a=this.settings.rtl?1:-1,b=this._clones.length+this._items.length,c=-1,d=0,e=0,f=[];++c<b;)d=f[c-1]||0,e=this._widths[this.relative(c)]+this.settings.margin,f.push(d+e*a);this._coordinates=f}},{filter:["width","items","settings"],run:function(){var a=this.settings.stagePadding,b=this._coordinates,c={width:Math.ceil(Math.abs(b[b.length-1]))+2*a,"padding-left":a||"","padding-right":a||""};this.$stage.css(c)}},{filter:["width","items","settings"],run:function(a){var b=this._coordinates.length,c=!this.settings.autoWidth,d=this.$stage.children();if(c&&a.items.merge)for(;b--;)a.css.width=this._widths[this.relative(b)],d.eq(b).css(a.css);else c&&(a.css.width=a.items.width,d.css(a.css))}},{filter:["items"],run:function(){this._coordinates.length<1&&this.$stage.removeAttr("style")}},{filter:["width","items","settings"],run:function(a){a.current=a.current?this.$stage.children().index(a.current):0,a.current=Math.max(this.minimum(),Math.min(this.maximum(),a.current)),this.reset(a.current)}},{filter:["position"],run:function(){this.animate(this.coordinates(this._current))}},{filter:["width","position","items","settings"],run:function(){var a,b,c,d,e=this.settings.rtl?1:-1,f=2*this.settings.stagePadding,g=this.coordinates(this.current())+f,h=g+this.width()*e,i=[];for(c=0,d=this._coordinates.length;c<d;c++)a=this._coordinates[c-1]||0,b=Math.abs(this._coordinates[c])+f*e,(this.op(a,"<=",g)&&this.op(a,">",h)||this.op(b,"<",g)&&this.op(b,">",h))&&i.push(c);this.$stage.children(".active").removeClass("active"),this.$stage.children(":eq("+i.join("), :eq(")+")").addClass("active"),this.$stage.children(".center").removeClass("center"),this.settings.center&&this.$stage.children().eq(this.current()).addClass("center")}}],e.prototype.initializeStage=function(){this.$stage=this.$element.find("."+this.settings.stageClass),this.$stage.length||(this.$element.addClass(this.options.loadingClass),this.$stage=a("<"+this.settings.stageElement+">",{class:this.settings.stageClass}).wrap(a("<div/>",{class:this.settings.stageOuterClass})),this.$element.append(this.$stage.parent()))},e.prototype.initializeItems=function(){var b=this.$element.find(".owl-item");if(b.length)return this._items=b.get().map(function(b){return a(b)}),this._mergers=this._items.map(function(){return 1}),void this.refresh();this.replace(this.$element.children().not(this.$stage.parent())),this.isVisible()?this.refresh():this.invalidate("width"),this.$element.removeClass(this.options.loadingClass).addClass(this.options.loadedClass)},e.prototype.initialize=function(){if(this.enter("initializing"),this.trigger("initialize"),this.$element.toggleClass(this.settings.rtlClass,this.settings.rtl),this.settings.autoWidth&&!this.is("pre-loading")){var a,b,c;a=this.$element.find("img"),b=this.settings.nestedItemSelector?"."+this.settings.nestedItemSelector:d,c=this.$element.children(b).width(),a.length&&c<=0&&this.preloadAutoWidthImages(a)}this.initializeStage(),this.initializeItems(),this.registerEventHandlers(),this.leave("initializing"),this.trigger("initialized")},e.prototype.isVisible=function(){return!this.settings.checkVisibility||this.$element.is(":visible")},e.prototype.setup=function(){var b=this.viewport(),c=this.options.responsive,d=-1,e=null;c?(a.each(c,function(a){a<=b&&a>d&&(d=Number(a))}),e=a.extend({},this.options,c[d]),"function"==typeof e.stagePadding&&(e.stagePadding=e.stagePadding()),delete e.responsive,e.responsiveClass&&this.$element.attr("class",this.$element.attr("class").replace(new RegExp("("+this.options.responsiveClass+"-)\\S+\\s","g"),"$1"+d))):e=a.extend({},this.options),this.trigger("change",{property:{name:"settings",value:e}}),this._breakpoint=d,this.settings=e,this.invalidate("settings"),this.trigger("changed",{property:{name:"settings",value:this.settings}})},e.prototype.optionsLogic=function(){this.settings.autoWidth&&(this.settings.stagePadding=!1,this.settings.merge=!1)},e.prototype.prepare=function(b){var c=this.trigger("prepare",{content:b});return c.data||(c.data=a("<"+this.settings.itemElement+"/>").addClass(this.options.itemClass).append(b)),this.trigger("prepared",{content:c.data}),c.data},e.prototype.update=function(){for(var b=0,c=this._pipe.length,d=a.proxy(function(a){return this[a]},this._invalidated),e={};b<c;)(this._invalidated.all||a.grep(this._pipe[b].filter,d).length>0)&&this._pipe[b].run(e),b++;this._invalidated={},!this.is("valid")&&this.enter("valid")},e.prototype.width=function(a){switch(a=a||e.Width.Default){case e.Width.Inner:case e.Width.Outer:return this._width;default:return this._width-2*this.settings.stagePadding+this.settings.margin}},e.prototype.refresh=function(){this.enter("refreshing"),this.trigger("refresh"),this.setup(),this.optionsLogic(),this.$element.addClass(this.options.refreshClass),this.update(),this.$element.removeClass(this.options.refreshClass),this.leave("refreshing"),this.trigger("refreshed")},e.prototype.onThrottledResize=function(){b.clearTimeout(this.resizeTimer),this.resizeTimer=b.setTimeout(this._handlers.onResize,this.settings.responsiveRefreshRate)},e.prototype.onResize=function(){return!!this._items.length&&(this._width!==this.$element.width()&&(!!this.isVisible()&&(this.enter("resizing"),this.trigger("resize").isDefaultPrevented()?(this.leave("resizing"),!1):(this.invalidate("width"),this.refresh(),this.leave("resizing"),void this.trigger("resized")))))},e.prototype.registerEventHandlers=function(){a.support.transition&&this.$stage.on(a.support.transition.end+".owl.core",a.proxy(this.onTransitionEnd,this)),!1!==this.settings.responsive&&this.on(b,"resize",this._handlers.onThrottledResize),this.settings.mouseDrag&&(this.$element.addClass(this.options.dragClass),this.$stage.on("mousedown.owl.core",a.proxy(this.onDragStart,this)),this.$stage.on("dragstart.owl.core selectstart.owl.core",function(){return!1})),this.settings.touchDrag&&(this.$stage.on("touchstart.owl.core",a.proxy(this.onDragStart,this)),this.$stage.on("touchcancel.owl.core",a.proxy(this.onDragEnd,this)))},e.prototype.onDragStart=function(b){var d=null;3!==b.which&&(a.support.transform?(d=this.$stage.css("transform").replace(/.*\(|\)| /g,"").split(","),d={x:d[16===d.length?12:4],y:d[16===d.length?13:5]}):(d=this.$stage.position(),d={x:this.settings.rtl?d.left+this.$stage.width()-this.width()+this.settings.margin:d.left,y:d.top}),this.is("animating")&&(a.support.transform?this.animate(d.x):this.$stage.stop(),this.invalidate("position")),this.$element.toggleClass(this.options.grabClass,"mousedown"===b.type),this.speed(0),this._drag.time=(new Date).getTime(),this._drag.target=a(b.target),this._drag.stage.start=d,this._drag.stage.current=d,this._drag.pointer=this.pointer(b),a(c).on("mouseup.owl.core touchend.owl.core",a.proxy(this.onDragEnd,this)),a(c).one("mousemove.owl.core touchmove.owl.core",a.proxy(function(b){var d=this.difference(this._drag.pointer,this.pointer(b));a(c).on("mousemove.owl.core touchmove.owl.core",a.proxy(this.onDragMove,this)),Math.abs(d.x)<Math.abs(d.y)&&this.is("valid")||(b.preventDefault(),this.enter("dragging"),this.trigger("drag"))},this)))},e.prototype.onDragMove=function(a){var b=null,c=null,d=null,e=this.difference(this._drag.pointer,this.pointer(a)),f=this.difference(this._drag.stage.start,e);this.is("dragging")&&(a.preventDefault(),this.settings.loop?(b=this.coordinates(this.minimum()),c=this.coordinates(this.maximum()+1)-b,f.x=((f.x-b)%c+c)%c+b):(b=this.settings.rtl?this.coordinates(this.maximum()):this.coordinates(this.minimum()),c=this.settings.rtl?this.coordinates(this.minimum()):this.coordinates(this.maximum()),d=this.settings.pullDrag?-1*e.x/5:0,f.x=Math.max(Math.min(f.x,b+d),c+d)),this._drag.stage.current=f,this.animate(f.x))},e.prototype.onDragEnd=function(b){var d=this.difference(this._drag.pointer,this.pointer(b)),e=this._drag.stage.current,f=d.x>0^this.settings.rtl?"left":"right";a(c).off(".owl.core"),this.$element.removeClass(this.options.grabClass),(0!==d.x&&this.is("dragging")||!this.is("valid"))&&(this.speed(this.settings.dragEndSpeed||this.settings.smartSpeed),this.current(this.closest(e.x,0!==d.x?f:this._drag.direction)),this.invalidate("position"),this.update(),this._drag.direction=f,(Math.abs(d.x)>3||(new Date).getTime()-this._drag.time>300)&&this._drag.target.one("click.owl.core",function(){return!1})),this.is("dragging")&&(this.leave("dragging"),this.trigger("dragged"))},e.prototype.closest=function(b,c){var e=-1,f=30,g=this.width(),h=this.coordinates();return this.settings.freeDrag||a.each(h,a.proxy(function(a,i){return"left"===c&&b>i-f&&b<i+f?e=a:"right"===c&&b>i-g-f&&b<i-g+f?e=a+1:this.op(b,"<",i)&&this.op(b,">",h[a+1]!==d?h[a+1]:i-g)&&(e="left"===c?a+1:a),-1===e},this)),this.settings.loop||(this.op(b,">",h[this.minimum()])?e=b=this.minimum():this.op(b,"<",h[this.maximum()])&&(e=b=this.maximum())),e},e.prototype.animate=function(b){var c=this.speed()>0;this.is("animating")&&this.onTransitionEnd(),c&&(this.enter("animating"),this.trigger("translate")),a.support.transform3d&&a.support.transition?this.$stage.css({transform:"translate3d("+b+"px,0px,0px)",transition:this.speed()/1e3+"s"+(this.settings.slideTransition?" "+this.settings.slideTransition:"")}):c?this.$stage.animate({left:b+"px"},this.speed(),this.settings.fallbackEasing,a.proxy(this.onTransitionEnd,this)):this.$stage.css({left:b+"px"})},e.prototype.is=function(a){return this._states.current[a]&&this._states.current[a]>0},e.prototype.current=function(a){if(a===d)return this._current;if(0===this._items.length)return d;if(a=this.normalize(a),this._current!==a){var b=this.trigger("change",{property:{name:"position",value:a}});b.data!==d&&(a=this.normalize(b.data)),this._current=a,this.invalidate("position"),this.trigger("changed",{property:{name:"position",value:this._current}})}return this._current},e.prototype.invalidate=function(b){return"string"===a.type(b)&&(this._invalidated[b]=!0,this.is("valid")&&this.leave("valid")),a.map(this._invalidated,function(a,b){return b})},e.prototype.reset=function(a){(a=this.normalize(a))!==d&&(this._speed=0,this._current=a,this.suppress(["translate","translated"]),this.animate(this.coordinates(a)),this.release(["translate","translated"]))},e.prototype.normalize=function(a,b){var c=this._items.length,e=b?0:this._clones.length;return!this.isNumeric(a)||c<1?a=d:(a<0||a>=c+e)&&(a=((a-e/2)%c+c)%c+e/2),a},e.prototype.relative=function(a){return a-=this._clones.length/2,this.normalize(a,!0)},e.prototype.maximum=function(a){var b,c,d,e=this.settings,f=this._coordinates.length;if(e.loop)f=this._clones.length/2+this._items.length-1;else if(e.autoWidth||e.merge){if(b=this._items.length)for(c=this._items[--b].width(),d=this.$element.width();b--&&!((c+=this._items[b].width()+this.settings.margin)>d););f=b+1}else f=e.center?this._items.length-1:this._items.length-e.items;return a&&(f-=this._clones.length/2),Math.max(f,0)},e.prototype.minimum=function(a){return a?0:this._clones.length/2},e.prototype.items=function(a){return a===d?this._items.slice():(a=this.normalize(a,!0),this._items[a])},e.prototype.mergers=function(a){return a===d?this._mergers.slice():(a=this.normalize(a,!0),this._mergers[a])},e.prototype.clones=function(b){var c=this._clones.length/2,e=c+this._items.length,f=function(a){return a%2==0?e+a/2:c-(a+1)/2};return b===d?a.map(this._clones,function(a,b){return f(b)}):a.map(this._clones,function(a,c){return a===b?f(c):null})},e.prototype.speed=function(a){return a!==d&&(this._speed=a),this._speed},e.prototype.coordinates=function(b){var c,e=1,f=b-1;return b===d?a.map(this._coordinates,a.proxy(function(a,b){return this.coordinates(b)},this)):(this.settings.center?(this.settings.rtl&&(e=-1,f=b+1),c=this._coordinates[b],c+=(this.width()-c+(this._coordinates[f]||0))/2*e):c=this._coordinates[f]||0,c=Math.ceil(c))},e.prototype.duration=function(a,b,c){return 0===c?0:Math.min(Math.max(Math.abs(b-a),1),6)*Math.abs(c||this.settings.smartSpeed)},e.prototype.to=function(a,b){var c=this.current(),d=null,e=a-this.relative(c),f=(e>0)-(e<0),g=this._items.length,h=this.minimum(),i=this.maximum();this.settings.loop?(!this.settings.rewind&&Math.abs(e)>g/2&&(e+=-1*f*g),a=c+e,(d=((a-h)%g+g)%g+h)!==a&&d-e<=i&&d-e>0&&(c=d-e,a=d,this.reset(c))):this.settings.rewind?(i+=1,a=(a%i+i)%i):a=Math.max(h,Math.min(i,a)),this.speed(this.duration(c,a,b)),this.current(a),this.isVisible()&&this.update()},e.prototype.next=function(a){a=a||!1,this.to(this.relative(this.current())+1,a)},e.prototype.prev=function(a){a=a||!1,this.to(this.relative(this.current())-1,a)},e.prototype.onTransitionEnd=function(a){if(a!==d&&(a.stopPropagation(),(a.target||a.srcElement||a.originalTarget)!==this.$stage.get(0)))return!1;this.leave("animating"),this.trigger("translated")},e.prototype.viewport=function(){var d;return this.options.responsiveBaseElement!==b?d=a(this.options.responsiveBaseElement).width():b.innerWidth?d=b.innerWidth:c.documentElement&&c.documentElement.clientWidth?d=c.documentElement.clientWidth:console.warn("Can not detect viewport width."),d},e.prototype.replace=function(b){this.$stage.empty(),this._items=[],b&&(b=b instanceof jQuery?b:a(b)),this.settings.nestedItemSelector&&(b=b.find("."+this.settings.nestedItemSelector)),b.filter(function(){return 1===this.nodeType}).each(a.proxy(function(a,b){b=this.prepare(b),this.$stage.append(b),this._items.push(b),this._mergers.push(1*b.find("[data-merge]").addBack("[data-merge]").attr("data-merge")||1)},this)),this.reset(this.isNumeric(this.settings.startPosition)?this.settings.startPosition:0),this.invalidate("items")},e.prototype.add=function(b,c){var e=this.relative(this._current);c=c===d?this._items.length:this.normalize(c,!0),b=b instanceof jQuery?b:a(b),this.trigger("add",{content:b,position:c}),b=this.prepare(b),0===this._items.length||c===this._items.length?(0===this._items.length&&this.$stage.append(b),0!==this._items.length&&this._items[c-1].after(b),this._items.push(b),this._mergers.push(1*b.find("[data-merge]").addBack("[data-merge]").attr("data-merge")||1)):(this._items[c].before(b),this._items.splice(c,0,b),this._mergers.splice(c,0,1*b.find("[data-merge]").addBack("[data-merge]").attr("data-merge")||1)),this._items[e]&&this.reset(this._items[e].index()),this.invalidate("items"),this.trigger("added",{content:b,position:c})},e.prototype.remove=function(a){(a=this.normalize(a,!0))!==d&&(this.trigger("remove",{content:this._items[a],position:a}),this._items[a].remove(),this._items.splice(a,1),this._mergers.splice(a,1),this.invalidate("items"),this.trigger("removed",{content:null,position:a}))},e.prototype.preloadAutoWidthImages=function(b){b.each(a.proxy(function(b,c){this.enter("pre-loading"),c=a(c),a(new Image).one("load",a.proxy(function(a){c.attr("src",a.target.src),c.css("opacity",1),this.leave("pre-loading"),!this.is("pre-loading")&&!this.is("initializing")&&this.refresh()},this)).attr("src",c.attr("src")||c.attr("data-src")||c.attr("data-src-retina"))},this))},e.prototype.destroy=function(){this.$element.off(".owl.core"),this.$stage.off(".owl.core"),a(c).off(".owl.core"),!1!==this.settings.responsive&&(b.clearTimeout(this.resizeTimer),this.off(b,"resize",this._handlers.onThrottledResize));for(var d in this._plugins)this._plugins[d].destroy();this.$stage.children(".cloned").remove(),this.$stage.unwrap(),this.$stage.children().contents().unwrap(),this.$stage.children().unwrap(),this.$stage.remove(),this.$element.removeClass(this.options.refreshClass).removeClass(this.options.loadingClass).removeClass(this.options.loadedClass).removeClass(this.options.rtlClass).removeClass(this.options.dragClass).removeClass(this.options.grabClass).attr("class",this.$element.attr("class").replace(new RegExp(this.options.responsiveClass+"-\\S+\\s","g"),"")).removeData("owl.carousel")},e.prototype.op=function(a,b,c){var d=this.settings.rtl;switch(b){case"<":return d?a>c:a<c;case">":return d?a<c:a>c;case">=":return d?a<=c:a>=c;case"<=":return d?a>=c:a<=c}},e.prototype.on=function(a,b,c,d){a.addEventListener?a.addEventListener(b,c,d):a.attachEvent&&a.attachEvent("on"+b,c)},e.prototype.off=function(a,b,c,d){a.removeEventListener?a.removeEventListener(b,c,d):a.detachEvent&&a.detachEvent("on"+b,c)},e.prototype.trigger=function(b,c,d,f,g){var h={item:{count:this._items.length,index:this.current()}},i=a.camelCase(a.grep(["on",b,d],function(a){return a}).join("-").toLowerCase()),j=a.Event([b,"owl",d||"carousel"].join(".").toLowerCase(),a.extend({relatedTarget:this},h,c));return this._supress[b]||(a.each(this._plugins,function(a,b){b.onTrigger&&b.onTrigger(j)}),this.register({type:e.Type.Event,name:b}),this.$element.trigger(j),this.settings&&"function"==typeof this.settings[i]&&this.settings[i].call(this,j)),j},e.prototype.enter=function(b){a.each([b].concat(this._states.tags[b]||[]),a.proxy(function(a,b){this._states.current[b]===d&&(this._states.current[b]=0),this._states.current[b]++},this))},e.prototype.leave=function(b){a.each([b].concat(this._states.tags[b]||[]),a.proxy(function(a,b){this._states.current[b]--},this))},e.prototype.register=function(b){if(b.type===e.Type.Event){if(a.event.special[b.name]||(a.event.special[b.name]={}),!a.event.special[b.name].owl){var c=a.event.special[b.name]._default;a.event.special[b.name]._default=function(a){return!c||!c.apply||a.namespace&&-1!==a.namespace.indexOf("owl")
vendor: 1,311 bytes, line 9159
9159?a.namespace&&a.namespace.indexOf("owl")>-1:c.apply(this,arguments)},a.event.special[b.name].owl=!0}}else b.type===e.Type.State&&(this._states.tags[b.name]?this._states.tags[b.name]=this._states.tags[b.name].concat(b.tags):this._states.tags[b.name]=b.tags,this._states.tags[b.name]=a.grep(this._states.tags[b.name],a.proxy(function(c,d){return a.inArray(c,this._states.tags[b.name])===d},this)))},e.prototype.suppress=function(b){a.each(b,a.proxy(function(a,b){this._supress[b]=!0},this))},e.prototype.release=function(b){a.each(b,a.proxy(function(a,b){delete this._supress[b]},this))},e.prototype.pointer=function(a){var c={x:null,y:null};return a=a.originalEvent||a||b.event,a=a.touches&&a.touches.length?a.touches[0]:a.changedTouches&&a.changedTouches.length?a.changedTouches[0]:a,a.pageX?(c.x=a.pageX,c.y=a.pageY):(c.x=a.clientX,c.y=a.clientY),c},e.prototype.isNumeric=function(a){return!isNaN(parseFloat(a))},e.prototype.difference=function(a,b){return{x:a.x-b.x,y:a.y-b.y}},a.fn.owlCarousel=function(b){var c=Array.prototype.slice.call(arguments,1);return this.each(function(){var d=a(this),f=d.data("owl.carousel");f||(f=new e(this,"object"==typeof b&&b),d.data("owl.carousel",f),a.each(["next","prev","to","destroy","refresh","replace","add","remove"],function(b,c){f.register({type:e.Type.Event,name:c}
vendor: 14,213 bytes, lines 9159-9160
9159),f.$element.on(c+".owl.carousel.core",a.proxy(function(a){a.namespace&&a.relatedTarget!==this&&(this.suppress([c]),f[c].apply(this,[].slice.call(arguments,1)),this.release([c]))},f))})),"string"==typeof b&&"_"!==b.charAt(0)&&f[b].apply(f,c)})},a.fn.owlCarousel.Constructor=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){var e=function(b){this._core=b,this._interval=null,this._visible=null,this._handlers={"initialized.owl.carousel":a.proxy(function(a){a.namespace&&this._core.settings.autoRefresh&&this.watch()},this)},this._core.options=a.extend({},e.Defaults,this._core.options),this._core.$element.on(this._handlers)};e.Defaults={autoRefresh:!0,autoRefreshInterval:500},e.prototype.watch=function(){this._interval||(this._visible=this._core.isVisible(),this._interval=b.setInterval(a.proxy(this.refresh,this),this._core.settings.autoRefreshInterval))},e.prototype.refresh=function(){this._core.isVisible()!==this._visible&&(this._visible=!this._visible,this._core.$element.toggleClass("owl-hidden",!this._visible),this._visible&&this._core.invalidate("width")&&this._core.refresh())},e.prototype.destroy=function(){var a,c;b.clearInterval(this._interval);for(a in this._handlers)this._core.$element.off(a,this._handlers[a]);for(c in Object.getOwnPropertyNames(this))"function"!=typeof this[c]&&(this[c]=null)},a.fn.owlCarousel.Constructor.Plugins.AutoRefresh=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){var e=function(b){this._core=b,this._loaded=[],this._handlers={"initialized.owl.carousel change.owl.carousel resized.owl.carousel":a.proxy(function(b){if(b.namespace&&this._core.settings&&this._core.settings.lazyLoad&&(b.property&&"position"==b.property.name||"initialized"==b.type)){var c=this._core.settings,e=c.center&&Math.ceil(c.items/2)||c.items,f=c.center&&-1*e||0,g=(b.property&&b.property.value!==d?b.property.value:this._core.current())+f,h=this._core.clones().length,i=a.proxy(function(a,b){this.load(b)},this);for(c.lazyLoadEager>0&&(e+=c.lazyLoadEager,c.loop&&(g-=c.lazyLoadEager,e++));f++<e;)this.load(h/2+this._core.relative(g)),h&&a.each(this._core.clones(this._core.relative(g)),i),g++}},this)},this._core.options=a.extend({},e.Defaults,this._core.options),this._core.$element.on(this._handlers)};e.Defaults={lazyLoad:!1,lazyLoadEager:0},e.prototype.load=function(c){var d=this._core.$stage.children().eq(c),e=d&&d.find(".owl-lazy");!e||a.inArray(d.get(0),this._loaded)>-1||(e.each(a.proxy(function(c,d){var e,f=a(d),g=b.devicePixelRatio>1&&f.attr("data-src-retina")||f.attr("data-src")||f.attr("data-srcset");this._core.trigger("load",{element:f,url:g},"lazy"),f.is("img")?f.one("load.owl.lazy",a.proxy(function(){f.css("opacity",1),this._core.trigger("loaded",{element:f,url:g},"lazy")},this)).attr("src",g):f.is("source")?f.one("load.owl.lazy",a.proxy(function(){this._core.trigger("loaded",{element:f,url:g},"lazy")},this)).attr("srcset",g):(e=new Image,e.onload=a.proxy(function(){f.css({"background-image":'url("'+g+'")',opacity:"1"}),this._core.trigger("loaded",{element:f,url:g},"lazy")},this),e.src=g)},this)),this._loaded.push(d.get(0)))},e.prototype.destroy=function(){var a,b;for(a in this.handlers)this._core.$element.off(a,this.handlers[a]);for(b in Object.getOwnPropertyNames(this))"function"!=typeof this[b]&&(this[b]=null)},a.fn.owlCarousel.Constructor.Plugins.Lazy=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){var e=function(c){this._core=c,this._previousHeight=null,this._handlers={"initialized.owl.carousel refreshed.owl.carousel":a.proxy(function(a){a.namespace&&this._core.settings.autoHeight&&this.update()},this),"changed.owl.carousel":a.proxy(function(a){a.namespace&&this._core.settings.autoHeight&&"position"===a.property.name&&this.update()},this),"loaded.owl.lazy":a.proxy(function(a){a.namespace&&this._core.settings.autoHeight&&a.element.closest("."+this._core.settings.itemClass).index()===this._core.current()&&this.update()},this)},this._core.options=a.extend({},e.Defaults,this._core.options),this._core.$element.on(this._handlers),this._intervalId=null;var d=this;a(b).on("load",function(){d._core.settings.autoHeight&&d.update()}),a(b).resize(function(){d._core.settings.autoHeight&&(null!=d._intervalId&&clearTimeout(d._intervalId),d._intervalId=setTimeout(function(){d.update()},250))})};e.Defaults={autoHeight:!1,autoHeightClass:"owl-height"},e.prototype.update=function(){var b=this._core._current,c=b+this._core.settings.items,d=this._core.settings.lazyLoad,e=this._core.$stage.children().toArray().slice(b,c),f=[],g=0;a.each(e,function(b,c){f.push(a(c).height())}),g=Math.max.apply(null,f),g<=1&&d&&this._previousHeight&&(g=this._previousHeight),this._previousHeight=g,this._core.$stage.parent().height(g).addClass(this._core.settings.autoHeightClass)},e.prototype.destroy=function(){var a,b;for(a in this._handlers)this._core.$element.off(a,this._handlers[a]);for(b in Object.getOwnPropertyNames(this))"function"!=typeof this[b]&&(this[b]=null)},a.fn.owlCarousel.Constructor.Plugins.AutoHeight=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){var e=function(b){this._core=b,this._videos={},this._playing=null,this._handlers={"initialized.owl.carousel":a.proxy(function(a){a.namespace&&this._core.register({type:"state",name:"playing",tags:["interacting"]})},this),"resize.owl.carousel":a.proxy(function(a){a.namespace&&this._core.settings.video&&this.isInFullScreen()&&a.preventDefault()},this),"refreshed.owl.carousel":a.proxy(function(a){a.namespace&&this._core.is("resizing")&&this._core.$stage.find(".cloned .owl-video-frame").remove()},this),"changed.owl.carousel":a.proxy(function(a){a.namespace&&"position"===a.property.name&&this._playing&&this.stop()},this),"prepared.owl.carousel":a.proxy(function(b){if(b.namespace){var c=a(b.content).find(".owl-video");c.length&&(c.css("display","none"),this.fetch(c,a(b.content)))}},this)},this._core.options=a.extend({},e.Defaults,this._core.options),this._core.$element.on(this._handlers),this._core.$element.on("click.owl.video",".owl-video-play-icon",a.proxy(function(a){this.play(a)},this))};e.Defaults={video:!1,videoHeight:!1,videoWidth:!1},e.prototype.fetch=function(a,b){var c=function(){return a.attr("data-vimeo-id")?"vimeo":a.attr("data-vzaar-id")?"vzaar":"youtube"}(),d=a.attr("data-vimeo-id")||a.attr("data-youtube-id")||a.attr("data-vzaar-id"),e=a.attr("data-width")||this._core.settings.videoWidth,f=a.attr("data-height")||this._core.settings.videoHeight,g=a.attr("href");if(!g)throw new Error("Missing video URL.");if(d=g.match(/(http:|https:|)\/\/(player.|www.|app.)?(vimeo\.com|youtu(be\.com|\.be|be\.googleapis\.com|be\-nocookie\.com)|vzaar\.com)\/(video\/|videos\/|embed\/|channels\/.+\/|groups\/.+\/|watch\?v=|v\/)?([A-Za-z0-9._%-]*)(\&\S+)?/),d[3].indexOf("youtu")>-1)c="youtube";else if(d[3].indexOf("vimeo")>-1)c="vimeo";else{if(!(d[3].indexOf("vzaar")>-1))throw new Error("Video URL not supported.");c="vzaar"}d=d[6],this._videos[g]={type:c,id:d,width:e,height:f},b.attr("data-video",g),this.thumbnail(a,this._videos[g])},e.prototype.thumbnail=function(b,c){var d,e,f,g=c.width&&c.height?"width:"+c.width+"px;height:"+c.height+"px;":"",h=b.find("img"),i="src",j="",k=this._core.settings,l=function(c){e='<div class="owl-video-play-icon"></div>',d=k.lazyLoad?a("<div/>",{class:"owl-video-tn "+j,srcType:c}):a("<div/>",{class:"owl-video-tn",style:"opacity:1;background-image:url("+c+")"}),b.after(d),b.after(e)};if(b.wrap(a("<div/>",{class:"owl-video-wrapper",style:g})),this._core.settings.lazyLoad&&(i="data-src",j="owl-lazy"),h.length)return l(h.attr(i)),h.remove(),!1;"youtube"===c.type?(f="//img.youtube.com/vi/"+c.id+"/hqdefault.jpg",l(f)):"vimeo"===c.type?a.ajax({type:"GET",url:"//vimeo.com/api/v2/video/"+c.id+".json",jsonp:"callback",dataType:"jsonp",success:function(a){f=a[0].thumbnail_large,l(f)}}):"vzaar"===c.type&&a.ajax({type:"GET",url:"//vzaar.com/api/videos/"+c.id+".json",jsonp:"callback",dataType:"jsonp",success:function(a){f=a.framegrab_url,l(f)}})},e.prototype.stop=function(){this._core.trigger("stop",null,"video"),this._playing.find(".owl-video-frame").remove(),this._playing.removeClass("owl-video-playing"),this._playing=null,this._core.leave("playing"),this._core.trigger("stopped",null,"video")},e.prototype.play=function(b){var c,d=a(b.target),e=d.closest("."+this._core.settings.itemClass),f=this._videos[e.attr("data-video")],g=f.width||"100%",h=f.height||this._core.$stage.height();this._playing||(this._core.enter("playing"),this._core.trigger("play",null,"video"),e=this._core.items(this._core.relative(e.index())),this._core.reset(e.index()),c=a('<iframe frameborder="0" allowfullscreen mozallowfullscreen webkitAllowFullScreen ></iframe>'),c.attr("height",h),c.attr("width",g),"youtube"===f.type?c.attr("src","//www.youtube.com/embed/"+f.id+"?autoplay=1&rel=0&v="+f.id):"vimeo"===f.type?c.attr("src","//player.vimeo.com/video/"+f.id+"?autoplay=1"):"vzaar"===f.type&&c.attr("src","//view.vzaar.com/"+f.id+"/player?autoplay=true"),a(c).wrap('<div class="owl-video-frame" />').insertAfter(e.find(".owl-video")),this._playing=e.addClass("owl-video-playing"))},e.prototype.isInFullScreen=function(){var b=c.fullscreenElement||c.mozFullScreenElement||c.webkitFullscreenElement;return b&&a(b).parent().hasClass("owl-video-frame")},e.prototype.destroy=function(){var a,b;this._core.$element.off("click.owl.video");for(a in this._handlers)this._core.$element.off(a,this._handlers[a]);for(b in Object.getOwnPropertyNames(this))"function"!=typeof this[b]&&(this[b]=null)},a.fn.owlCarousel.Constructor.Plugins.Video=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){var e=function(b){this.core=b,this.core.options=a.extend({},e.Defaults,this.core.options),this.swapping=!0,this.previous=d,this.next=d,this.handlers={"change.owl.carousel":a.proxy(function(a){a.namespace&&"position"==a.property.name&&(this.previous=this.core.current(),this.next=a.property.value)},this),"drag.owl.carousel dragged.owl.carousel translated.owl.carousel":a.proxy(function(a){a.namespace&&(this.swapping="translated"==a.type)},this),"translate.owl.carousel":a.proxy(function(a){a.namespace&&this.swapping&&(this.core.options.animateOut||this.core.options.animateIn)&&this.swap()},this)},this.core.$element.on(this.handlers)};e.Defaults={animateOut:!1,
9160animateIn:!1},e.prototype.swap=function(){if(1===this.core.settings.items&&a.support.animation&&a.support.transition){this.core.speed(0);var b,c=a.proxy(this.clear,this),d=this.core.$stage.children().eq(this.previous),e=this.core.$stage.children().eq(this.next),f=this.core.settings.animateIn,g=this.core.settings.animateOut;this.core.current()!==this.previous&&(g&&(b=this.core.coordinates(this.previous)-this.core.coordinates(this.next),d.one(a.support.animation.end,c).css({left:b+"px"}).addClass("animated owl-animated-out").addClass(g)),f&&e.one(a.support.animation.end,c).addClass("animated owl-animated-in").addClass(f))}},e.prototype.clear=function(b){a(b.target).css({left:""}).removeClass("animated owl-animated-out owl-animated-in").removeClass(this.core.settings.animateIn).removeClass(this.core.settings.animateOut),this.core.onTransitionEnd()},e.prototype.destroy=function(){var a,b;for(a in this.handlers)this.core.$element.off(a,this.handlers[a]);for(b in Object.getOwnPropertyNames(this))"function"!=typeof this[b]&&(this[b]=null)},a.fn.owlCarousel.Constructor.Plugins.Animate=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){var e=function(b){this._core=b,this._call=null,this._time=0,this._timeout=0,this._paused=!0,this._handlers={"changed.owl.carousel":a.proxy(function(a){a.namespace&&"settings"===a.property.name?this._core.settings.autoplay?this.play():this.stop():a.namespace&&"position"===a.property.name&&this._paused&&(this._time=0)},this),"initialized.owl.carousel":a.proxy(function(a){a.namespace&&this._core.settings.autoplay&&this.play()},this),"play.owl.autoplay":a.proxy(function(a,b,c){a.namespace&&this.play(b,c)},this),"stop.owl.autoplay":a.proxy(function(a){a.namespace&&this.stop()},this),"mouseover.owl.autoplay":a.proxy(function(){this._core.settings.autoplayHoverPause&&this._core.is("rotating")&&this.pause()},this),"mouseleave.owl.autoplay":a.proxy(function(){this._core.settings.autoplayHoverPause&&this._core.is("rotating")&&this.play()},this),"touchstart.owl.core":a.proxy(function(){this._core.settings.autoplayHoverPause&&this._core.is("rotating")&&this.pause()},this),"touchend.owl.core":a.proxy(function(){this._core.settings.autoplayHoverPause&&this.play()},this)},this._core.$element.on(this._handlers),this._core.options=a.extend({},e.Defaults,this._core.options)};e.Defaults={autoplay:!1,autoplayTimeout:5e3,autoplayHoverPause:!1,autoplaySpeed:!1},e.prototype._next=function(d){this._call=b.setTimeout(a.proxy(this._next,this,d),this._timeout*(Math.round(this.read()/this._timeout)+1)-this.read()),this._core.is("interacting")||c.hidden||this._core.next(d||this._core.settings.autoplaySpeed)},e.prototype.read=function(){return(new Date).getTime()-this._time},e.prototype.play=function(c,d){var e;this._core.is("rotating")||this._core.enter("rotating"),c=c||this._core.settings.autoplayTimeout,e=Math.min(this._time%(this._timeout||c),c),this._paused?(this._time=this.read(),this._paused=!1):b.clearTimeout(this._call),this._time+=this.read()%c-e,this._timeout=c,this._call=b.setTimeout(a.proxy(this._next,this,d),c-e)},e.prototype.stop=function(){this._core.is("rotating")&&(this._time=0,this._paused=!0,b.clearTimeout(this._call),this._core.leave("rotating"))},e.prototype.pause=function(){this._core.is("rotating")&&!this._paused&&(this._time=this.read(),this._paused=!0,b.clearTimeout(this._call))},e.prototype.destroy=function(){var a,b;this.stop();for(a in this._handlers)this._core.$element.off(a,this._handlers[a]);for(b in Object.getOwnPropertyNames(this))"function"!=typeof this[b]&&(this[b]=null)},a.fn.owlCarousel.Constructor.Plugins.autoplay=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){"use strict";var e=function(b){this._core=b,this._initialized=!1,this._pages=[],this._controls={},this._templates=[],this.$element=this._core.$element,this._overrides={next:this._core.next,prev:this._core.prev,to:this._core.to}
vendor: 5,569 bytes, line 9160
9160,this._handlers={"prepared.owl.carousel":a.proxy(function(b){b.namespace&&this._core.settings.dotsData&&this._templates.push('<div class="'+this._core.settings.dotClass+'">'+a(b.content).find("[data-dot]").addBack("[data-dot]").attr("data-dot")+"</div>")},this),"added.owl.carousel":a.proxy(function(a){a.namespace&&this._core.settings.dotsData&&this._templates.splice(a.position,0,this._templates.pop())},this),"remove.owl.carousel":a.proxy(function(a){a.namespace&&this._core.settings.dotsData&&this._templates.splice(a.position,1)},this),"changed.owl.carousel":a.proxy(function(a){a.namespace&&"position"==a.property.name&&this.draw()},this),"initialized.owl.carousel":a.proxy(function(a){a.namespace&&!this._initialized&&(this._core.trigger("initialize",null,"navigation"),this.initialize(),this.update(),this.draw(),this._initialized=!0,this._core.trigger("initialized",null,"navigation"))},this),"refreshed.owl.carousel":a.proxy(function(a){a.namespace&&this._initialized&&(this._core.trigger("refresh",null,"navigation"),this.update(),this.draw(),this._core.trigger("refreshed",null,"navigation"))},this)},this._core.options=a.extend({},e.Defaults,this._core.options),this.$element.on(this._handlers)};e.Defaults={nav:!1,navText:['<span aria-label="Previous">&#x2039;</span>','<span aria-label="Next">&#x203a;</span>'],navSpeed:!1,navElement:'button type="button" role="presentation"',navContainer:!1,navContainerClass:"owl-nav",navClass:["owl-prev","owl-next"],slideBy:1,dotClass:"owl-dot",dotsClass:"owl-dots",dots:!0,dotsEach:!1,dotsData:!1,dotsSpeed:!1,dotsContainer:!1},e.prototype.initialize=function(){var b,c=this._core.settings;this._controls.$relative=(c.navContainer?a(c.navContainer):a("<div>").addClass(c.navContainerClass).appendTo(this.$element)).addClass("disabled"),this._controls.$previous=a("<"+c.navElement+">").addClass(c.navClass[0]).html(c.navText[0]).prependTo(this._controls.$relative).on("click",a.proxy(function(a){this.prev(c.navSpeed)},this)),this._controls.$next=a("<"+c.navElement+">").addClass(c.navClass[1]).html(c.navText[1]).appendTo(this._controls.$relative).on("click",a.proxy(function(a){this.next(c.navSpeed)},this)),c.dotsData||(this._templates=[a('<button role="button">').addClass(c.dotClass).append(a("<span>")).prop("outerHTML")]),this._controls.$absolute=(c.dotsContainer?a(c.dotsContainer):a("<div>").addClass(c.dotsClass).appendTo(this.$element)).addClass("disabled"),this._controls.$absolute.on("click","button",a.proxy(function(b){var d=a(b.target).parent().is(this._controls.$absolute)?a(b.target).index():a(b.target).parent().index();b.preventDefault(),this.to(d,c.dotsSpeed)},this));for(b in this._overrides)this._core[b]=a.proxy(this[b],this)},e.prototype.destroy=function(){var a,b,c,d,e;e=this._core.settings;for(a in this._handlers)this.$element.off(a,this._handlers[a]);for(b in this._controls)"$relative"===b&&e.navContainer?this._controls[b].html(""):this._controls[b].remove();for(d in this.overides)this._core[d]=this._overrides[d];for(c in Object.getOwnPropertyNames(this))"function"!=typeof this[c]&&(this[c]=null)},e.prototype.update=function(){var a,b,c,d=this._core.clones().length/2,e=d+this._core.items().length,f=this._core.maximum(!0),g=this._core.settings,h=g.center||g.autoWidth||g.dotsData?1:g.dotsEach||g.items;if("page"!==g.slideBy&&(g.slideBy=Math.min(g.slideBy,g.items)),g.dots||"page"==g.slideBy)for(this._pages=[],a=d,b=0,c=0;a<e;a++){if(b>=h||0===b){if(this._pages.push({start:Math.min(f,a-d),end:a-d+h-1}),Math.min(f,a-d)===f)break;b=0,++c}b+=this._core.mergers(this._core.relative(a))}},e.prototype.draw=function(){var b,c=this._core.settings,d=this._core.items().length<=c.items,e=this._core.relative(this._core.current()),f=c.loop||c.rewind;this._controls.$relative.toggleClass("disabled",!c.nav||d),c.nav&&(this._controls.$previous.toggleClass("disabled",!f&&e<=this._core.minimum(!0)),this._controls.$next.toggleClass("disabled",!f&&e>=this._core.maximum(!0))),this._controls.$absolute.toggleClass("disabled",!c.dots||d),c.dots&&(b=this._pages.length-this._controls.$absolute.children().length,c.dotsData&&0!==b?this._controls.$absolute.html(this._templates.join("")):b>0?this._controls.$absolute.append(new Array(b+1).join(this._templates[0])):b<0&&this._controls.$absolute.children().slice(b).remove(),this._controls.$absolute.find(".active").removeClass("active"),this._controls.$absolute.children().eq(a.inArray(this.current(),this._pages)).addClass("active"))},e.prototype.onTrigger=function(b){var c=this._core.settings;b.page={index:a.inArray(this.current(),this._pages),count:this._pages.length,size:c&&(c.center||c.autoWidth||c.dotsData?1:c.dotsEach||c.items)}},e.prototype.current=function(){var b=this._core.relative(this._core.current());return a.grep(this._pages,a.proxy(function(a,c){return a.start<=b&&a.end>=b},this)).pop()},e.prototype.getPosition=function(b){var c,d,e=this._core.settings;return"page"==e.slideBy?(c=a.inArray(this.current(),this._pages),d=this._pages.length,b?++c:--c,c=this._pages[(c%d+d)%d].start):(c=this._core.relative(this._core.current()),d=this._core.items().length,b?c+=e.slideBy:c-=e.slideBy),c},e.prototype.next=function(b){a.proxy(this._overrides.to,this._core)(this.getPosition(!0),b)},e.prototype.prev=function(b){a.proxy(this._overrides.to,this._core)(this.getPosition(!1),b)},e.prototype.to=function(b,c,d){var e;!d&&this._pages.length?(e=this._pages.length,a.proxy(this._overrides.to,this._core)(this._pages[(b%e+e)%e].start,c)):a.proxy(this._overrides.to,this._core)(b,c)},a.fn.owlCarousel.Constructor.Plugins.Navigation=e}(
vendor: 4,259 bytes, lines 9160-9203
9160window.Zepto||window.jQuery,window,document),function(a,b,c,d){"use strict";var e=function(c){this._core=c,this._hashes={},this.$element=this._core.$element,this._handlers={"initialized.owl.carousel":a.proxy(function(c){c.namespace&&"URLHash"===this._core.settings.startPosition&&a(b).trigger("hashchange.owl.navigation")},this),"prepared.owl.carousel":a.proxy(function(b){if(b.namespace){var c=a(b.content).find("[data-hash]").addBack("[data-hash]").attr("data-hash");if(!c)return;this._hashes[c]=b.content}},this),"changed.owl.carousel":a.proxy(function(c){if(c.namespace&&"position"===c.property.name){var d=this._core.items(this._core.relative(this._core.current())),e=a.map(this._hashes,function(a,b){return a===d?b:null}).join();if(!e||b.location.hash.slice(1)===e)return;b.location.hash=e}},this)},this._core.options=a.extend({},e.Defaults,this._core.options),this.$element.on(this._handlers),a(b).on("hashchange.owl.navigation",a.proxy(function(a){var c=b.location.hash.substring(1),e=this._core.$stage.children(),f=this._hashes[c]&&e.index(this._hashes[c]);f!==d&&f!==this._core.current()&&this._core.to(this._core.relative(f),!1,!0)},this))};e.Defaults={URLhashListener:!1},e.prototype.destroy=function(){var c,d;a(b).off("hashchange.owl.navigation");for(c in this._handlers)this._core.$element.off(c,this._handlers[c]);for(d in Object.getOwnPropertyNames(this))"function"!=typeof this[d]&&(this[d]=null)},a.fn.owlCarousel.Constructor.Plugins.Hash=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){function e(b,c){var e=!1,f=b.charAt(0).toUpperCase()+b.slice(1);return a.each((b+" "+h.join(f+" ")+f).split(" "),function(a,b){if(g[b]!==d)return e=!c||b,!1}),e}function f(a){return e(a,!0)}var g=a("<support>").get(0).style,h="Webkit Moz O ms".split(" "),i={transition:{end:{WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd",transition:"transitionend"}},animation:{end:{WebkitAnimation:"webkitAnimationEnd",MozAnimation:"animationend",OAnimation:"oAnimationEnd",animation:"animationend"}}},j={csstransforms:function(){return!!e("transform")},csstransforms3d:function(){return!!e("perspective")},csstransitions:function(){return!!e("transition")},cssanimations:function(){return!!e("animation")}};j.csstransitions()&&(a.support.transition=new String(f("transition")),a.support.transition.end=i.transition.end[a.support.transition]),j.cssanimations()&&(a.support.animation=new String(f("animation")),a.support.animation.end=i.animation.end[a.support.animation]),j.csstransforms()&&(a.support.transform=new String(f("transform")),a.support.transform3d=j.csstransforms3d())}(window.Zepto||window.jQuery,window,document);
9161/*
9162 * jQuery FlexSlider v2.7.1
9163 * Copyright 2012 WooThemes
9164 * Contributing Author: Tyler Smith
9165 */
9166;
9167(function ($) {
9168
9169    var focused = true;
9170
9171    //FlexSlider: Object Instance
9172    $.flexslider = function(el, options) {
9173        var slider = $(el);
9174
9175        // making variables public
9176
9177        //if rtl value was not passed and html is in rtl..enable it by default.
9178        if(typeof options.rtl=='undefined' && $('html').attr('dir')=='rtl'){
9179            options.rtl=true;
9180        }
9181        slider.vars = $.extend({}, $.flexslider.defaults, options);
9182
9183        var namespace = slider.vars.namespace,
9184            msGesture = window.navigator && window.navigator.msPointerEnabled && window.MSGesture,
9185            touch = (( "ontouchstart" in window ) || msGesture || window.DocumentTouch && document instanceof DocumentTouch) && slider.vars.touch,
9186            // deprecating this idea, as devices are being released with both of these events
9187            eventType = "click touchend MSPointerUp keyup",
9188            watchedEvent = "",
9189            watchedEventClearTimer,
9190            vertical = slider.vars.direction === "vertical",
9191            reverse = slider.vars.reverse,
9192            carousel = (slider.vars.itemWidth > 0),
9193            fade = slider.vars.animation === "fade",
9194            asNav = slider.vars.asNavFor !== "",
9195            methods = {};
9196
9197        // Store a reference to the slider object
9198        $.data(el, "flexslider", slider);
9199
9200        // Private slider methods
9201        methods = {
9202            init: function() {
9203                slider.animating = false;
vendor: 9,773 bytes, lines 9204-9382
9204                // Get current slide and make sure it is a number
9205                slider.currentSlide = parseInt( ( slider.vars.startAt ? slider.vars.startAt : 0), 10 );
9206                if ( isNaN( slider.currentSlide ) ) { slider.currentSlide = 0; }
9207                slider.animatingTo = slider.currentSlide;
9208                slider.atEnd = (slider.currentSlide === 0 || slider.currentSlide === slider.last);
9209                slider.containerSelector = slider.vars.selector.substr(0,slider.vars.selector.search(' '));
9210                slider.slides = $(slider.vars.selector, slider);
9211                slider.container = $(slider.containerSelector, slider);
9212                slider.count = slider.slides.length;
9213                // SYNC:
9214                slider.syncExists = $(slider.vars.sync).length > 0;
9215                // SLIDE:
9216                if (slider.vars.animation === "slide") { slider.vars.animation = "swing"; }
9217                slider.prop = (vertical) ? "top" : ( slider.vars.rtl ? "marginRight" : "marginLeft" );
9218                slider.args = {};
9219                // SLIDESHOW:
9220                slider.manualPause = false;
9221                slider.stopped = false;
9222                //PAUSE WHEN INVISIBLE
9223                slider.started = false;
9224                slider.startTimeout = null;
9225                // TOUCH/USECSS:
9226                slider.transitions = !slider.vars.video && !fade && slider.vars.useCSS && (function() {
9227                    var obj = document.createElement('div'),
9228                        props = ['perspectiveProperty', 'WebkitPerspective', 'MozPerspective', 'OPerspective', 'msPerspective'];
9229                    for (var i in props) {
9230                        if ( obj.style[ props[i] ] !== undefined ) {
9231                            slider.pfx = props[i].replace('Perspective','').toLowerCase();
9232                            slider.prop = "-" + slider.pfx + "-transform";
9233                            return true;
9234                        }
9235                    }
9236                    return false;
9237                }());
9238                slider.isFirefox = navigator.userAgent.toLowerCase().indexOf('firefox') > -1;
9239                slider.ensureAnimationEnd = '';
9240                // CONTROLSCONTAINER:
9241                if (slider.vars.controlsContainer !== "") slider.controlsContainer = $(slider.vars.controlsContainer).length > 0 && $(slider.vars.controlsContainer);
9242                // MANUAL:
9243                if (slider.vars.manualControls !== "") slider.manualControls = $(slider.vars.manualControls).length > 0 && $(slider.vars.manualControls);
9244
9245                // CUSTOM DIRECTION NAV:
9246                if (slider.vars.customDirectionNav !== "") slider.customDirectionNav = $(slider.vars.customDirectionNav).length === 2 && $(slider.vars.customDirectionNav);
9247
9248                // RANDOMIZE:
9249                if (slider.vars.randomize) {
9250                    slider.slides.sort(function() { return (Math.round(Math.random())-0.5); });
9251                    slider.container.empty().append(slider.slides);
9252                }
9253
9254                slider.doMath();
9255
9256                // INIT
9257                slider.setup("init");
9258
9259                // CONTROLNAV:
9260                if (slider.vars.controlNav) { methods.controlNav.setup(); }
9261
9262                // DIRECTIONNAV:
9263                if (slider.vars.directionNav) { methods.directionNav.setup(); }
9264
9265                // KEYBOARD:
9266                if (slider.vars.keyboard && ($(slider.containerSelector).length === 1 || slider.vars.multipleKeyboard)) {
9267                    $(document).bind('keyup', function(event) {
9268                        var keycode = event.keyCode;
9269                        if (!slider.animating && (keycode === 39 || keycode === 37)) {
9270                            var target = (slider.vars.rtl?
9271                                    ((keycode === 37) ? slider.getTarget('next') :
9272                                        (keycode === 39) ? slider.getTarget('prev') : false)
9273                                    :
9274                                    ((keycode === 39) ? slider.getTarget('next') :
9275                                        (keycode === 37) ? slider.getTarget('prev') : false)
9276                                )
9277                            ;
9278                            slider.flexAnimate(target, slider.vars.pauseOnAction);
9279                        }
9280                    });
9281                }
9282                // MOUSEWHEEL:
9283                if (slider.vars.mousewheel) {
9284                    slider.bind('mousewheel', function(event, delta, deltaX, deltaY) {
9285                        event.preventDefault();
9286                        var target = (delta < 0) ? slider.getTarget('next') : slider.getTarget('prev');
9287                        slider.flexAnimate(target, slider.vars.pauseOnAction);
9288                    });
9289                }
9290
9291                // PAUSEPLAY
9292                if (slider.vars.pausePlay) { methods.pausePlay.setup(); }
9293
9294                //PAUSE WHEN INVISIBLE
9295                if (slider.vars.slideshow && slider.vars.pauseInvisible) { methods.pauseInvisible.init(); }
9296
9297                // SLIDSESHOW
9298                if (slider.vars.slideshow) {
9299                    if (slider.vars.pauseOnHover) {
9300                        slider.hover(function() {
9301                            if (!slider.manualPlay && !slider.manualPause) { slider.pause(); }
9302                        }, function() {
9303                            if (!slider.manualPause && !slider.manualPlay && !slider.stopped) { slider.play(); }
9304                        });
9305                    }
9306                    // initialize animation
9307                    //If we're visible, or we don't use PageVisibility API
9308                    if(!slider.vars.pauseInvisible || !methods.pauseInvisible.isHidden()) {
9309                        (slider.vars.initDelay > 0) ? slider.startTimeout = setTimeout(slider.play, slider.vars.initDelay) : slider.play();
9310                    }
9311                }
9312
9313                // ASNAV:
9314                if (asNav) { methods.asNav.setup(); }
9315
9316                // TOUCH
9317                if (touch && slider.vars.touch) { methods.touch(); }
9318
9319                // FADE&&SMOOTHHEIGHT || SLIDE:
9320                if (!fade || (fade && slider.vars.smoothHeight)) { $(window).bind("resize orientationchange focus", methods.resize); }
9321
9322                slider.find("img").attr("draggable", "false");
9323
9324                // API: start() Callback
9325                setTimeout(function(){
9326                    slider.vars.start(slider);
9327                }, 200);
9328            },
9329            asNav: {
9330                setup: function() {
9331                    slider.asNav = true;
9332                    slider.animatingTo = Math.floor(slider.currentSlide/slider.move);
9333                    slider.currentItem = slider.currentSlide;
9334                    slider.slides.removeClass(namespace + "active-slide").eq(slider.currentItem).addClass(namespace + "active-slide");
9335                    if(!msGesture){
9336                        slider.slides.on(eventType, function(e){
9337                            e.preventDefault();
9338                            var $slide = $(this),
9339                                target = $slide.index();
9340                            var posFromX;
9341                            if(slider.vars.rtl){
9342                                posFromX = -1*($slide.offset().right - $(slider).scrollLeft()); // Find position of slide relative to right of slider container
9343                            }
9344                            else
9345                            {
9346                                posFromX = $slide.offset().left - $(slider).scrollLeft(); // Find position of slide relative to left of slider container
9347                            }
9348                            if( posFromX <= 0 && $slide.hasClass( namespace + 'active-slide' ) ) {
9349                                slider.flexAnimate(slider.getTarget("prev"), true);
9350                            } else if (!$(slider.vars.asNavFor).data('flexslider').animating && !$slide.hasClass(namespace + "active-slide")) {
9351                                slider.direction = (slider.currentItem < target) ? "next" : "prev";
9352                                slider.flexAnimate(target, slider.vars.pauseOnAction, false, true, true);
9353                            }
9354                        });
9355                    }else{
9356                        el._slider = slider;
9357                        slider.slides.each(function (){
9358                            var that = this;
9359                            that._gesture = new MSGesture();
9360                            that._gesture.target = that;
9361                            that.addEventListener("MSPointerDown", function (e){
9362                                e.preventDefault();
9363                                if(e.currentTarget._gesture) {
9364                                    e.currentTarget._gesture.addPointer(e.pointerId);
9365                                }
9366                            }, false);
9367                            that.addEventListener("MSGestureTap", function (e){
9368                                e.preventDefault();
9369                                var $slide = $(this),
9370                                    target = $slide.index();
9371                                if (!$(slider.vars.asNavFor).data('flexslider').animating && !$slide.hasClass('active')) {
9372                                    slider.direction = (slider.currentItem < target) ? "next" : "prev";
9373                                    slider.flexAnimate(target, slider.vars.pauseOnAction, false, true, true);
9374                                }
9375                            });
9376                        });
9377                    }
9378                }
9379            },
9380            controlNav: {
9381                setup: function() {
9382                    if (!slider.manualControls) {
9383                        methods.controlNav.setupPaging();
9384                    } else { // MANUALCONTROLS:
9385                        methods.controlNav.setupManual();
9386                    }
9387                },
9388                setupPaging: function() {
9389                    var type = (slider.vars.controlNav === "thumbnails") ? 'control-thumbs' : 'control-paging',
9390                        j = 1,
9391                        item,
9392                        slide;
9393
9394                    slider.controlNavScaffold = $('<ol class="'+ namespace + 'control-nav ' + namespace + type + '"></ol>');
9395
9396                    if (slider.pagingCount > 1) {
9397                        for (var i = 0; i < slider.pagingCount; i++) {
9398                            slide = slider.slides.eq(i);
9399                            if ( undefined === slide.attr( 'data-thumb-alt' ) ) { slide.attr( 'data-thumb-alt', '' ); }
9400                            var altText = ( '' !== slide.attr( 'data-thumb-alt' ) ) ? altText = ' alt="' + slide.attr( 'data-thumb-alt' ) + '"' : '';
9401                            item = (slider.vars.controlNav === "thumbnails") ? '<img src="' + slide.attr( 'data-thumb' ) + '"' + altText + '/>' : '<a href="#">' + j + '</a>';
9402                            if ( 'thumbnails' === slider.vars.controlNav && true === slider.vars.thumbCaptions ) {
9403                                var captn = slide.attr( 'data-thumbcaption' );
9404                                if ( '' !== captn && undefined !== captn ) { item += '<span class="' + namespace + 'caption">' + captn + '</span>'; }
9405                            }
9406                            slider.controlNavScaffold.append('<li>' + item + '</li>');
9407                            j++;
9408                        }
9409                    }
9410
9411                    // CONTROLSCONTAINER:
9412                    (slider.controlsContainer) ? $(slider.controlsContainer).append(slider.controlNavScaffold) : slider.append(slider.controlNavScaffold);
9413                    methods.controlNav.set();
9414
9415                    methods.controlNav.active();
9416
9417                    slider.controlNavScaffold.delegate('a, img', eventType, function(event) {
9418                        event.preventDefault();
9419
9420                        if (watchedEvent === "" || watchedEvent === event.type) {
9421                            var $this = $(this),
9422                                target = slider.controlNav.index($this);
9423
9424                            if (!$this.hasClass(namespace + 'active')) {
9425                                slider.direction = (target > slider.currentSlide) ? "next" : "prev";
9426                                slider.flexAnimate(target, slider.vars.pauseOnAction);
9427                            }
9428                        }
9429
9430                        // setup flags to prevent event duplication
9431                        if (watchedEvent === "") {
9432                            watchedEvent = event.type;
9433                        }
9434                        methods.setToClearWatchedEvent();
9435
9436                    });
9437                },
9438                setupManual: function() {
9439                    slider.controlNav = slider.manualControls;
9440                    methods.controlNav.active();
9441
9442                    slider.controlNav.bind(eventType, function(event) {
9443                        event.preventDefault();
9444
9445                        if (watchedEvent === "" || watchedEvent === event.type) {
9446                            var $this = $(this),
9447                                target = slider.controlNav.index($this);
9448
9449                            if (!$this.hasClass(namespace + 'active')) {
9450                                (target > slider.currentSlide) ? slider.direction = "next" : slider.direction = "prev";
9451                                slider.flexAnimate(target, slider.vars.pauseOnAction);
9452                            }
9453                        }
9454
9455                        // setup flags to prevent event duplication
9456                        if (watchedEvent === "") {
9457                            watchedEvent = event.type;
9458                        }
9459                        methods.setToClearWatchedEvent();
9460                    });
9461                },
9462                set: function() {
9463                    var selector = (slider.vars.controlNav === "thumbnails") ? 'img' : 'a';
9464                    slider.controlNav = $('.' + namespace + 'control-nav li ' + selector, (slider.controlsContainer) ? slider.controlsContainer : slider);
9465                },
9466                active: function() {
9467                    slider.controlNav.removeClass(namespace + "active").eq(slider.animatingTo).addClass(namespace + "active");
9468                },
9469                update: function(action, pos) {
9470                    if (slider.pagingCount > 1 && action === "add") {
9471                        slider.controlNavScaffold.append($('<li><a href="#">
vendor: 44,271 bytes, lines 9471-10307
9471' + slider.count + '</a></li>'));
9472                    } else if (slider.pagingCount === 1) {
9473                        slider.controlNavScaffold.find('li').remove();
9474                    } else {
9475                        slider.controlNav.eq(pos).closest('li').remove();
9476                    }
9477                    methods.controlNav.set();
9478                    (slider.pagingCount > 1 && slider.pagingCount !== slider.controlNav.length) ? slider.update(pos, action) : methods.controlNav.active();
9479                }
9480            },
9481            directionNav: {
9482                setup: function() {
9483                    var directionNavScaffold = $('<ul class="' + namespace + 'direction-nav"><li class="' + namespace + 'nav-prev"><a class="' + namespace + 'prev" href="#">' + slider.vars.prevText + '</a></li><li class="' + namespace + 'nav-next"><a class="' + namespace + 'next" href="#">' + slider.vars.nextText + '</a></li></ul>');
9484
9485                    // CUSTOM DIRECTION NAV:
9486                    if (slider.customDirectionNav) {
9487                        slider.directionNav = slider.customDirectionNav;
9488                        // CONTROLSCONTAINER:
9489                    } else if (slider.controlsContainer) {
9490                        $(slider.controlsContainer).append(directionNavScaffold);
9491                        slider.directionNav = $('.' + namespace + 'direction-nav li a', slider.controlsContainer);
9492                    } else {
9493                        slider.append(directionNavScaffold);
9494                        slider.directionNav = $('.' + namespace + 'direction-nav li a', slider);
9495                    }
9496
9497                    methods.directionNav.update();
9498
9499                    slider.directionNav.bind(eventType, function(event) {
9500                        event.preventDefault();
9501                        var target;
9502
9503                        if (watchedEvent === "" || watchedEvent === event.type) {
9504                            target = ($(this).hasClass(namespace + 'next')) ? slider.getTarget('next') : slider.getTarget('prev');
9505                            slider.flexAnimate(target, slider.vars.pauseOnAction);
9506                        }
9507
9508                        // setup flags to prevent event duplication
9509                        if (watchedEvent === "") {
9510                            watchedEvent = event.type;
9511                        }
9512                        methods.setToClearWatchedEvent();
9513                    });
9514                },
9515                update: function() {
9516                    var disabledClass = namespace + 'disabled';
9517                    if (slider.pagingCount === 1) {
9518                        slider.directionNav.addClass(disabledClass).attr('tabindex', '-1');
9519                    } else if (!slider.vars.animationLoop) {
9520                        if (slider.animatingTo === 0) {
9521                            slider.directionNav.removeClass(disabledClass).filter('.' + namespace + "prev").addClass(disabledClass).attr('tabindex', '-1');
9522                        } else if (slider.animatingTo === slider.last) {
9523                            slider.directionNav.removeClass(disabledClass).filter('.' + namespace + "next").addClass(disabledClass).attr('tabindex', '-1');
9524                        } else {
9525                            slider.directionNav.removeClass(disabledClass).removeAttr('tabindex');
9526                        }
9527                    } else {
9528                        slider.directionNav.removeClass(disabledClass).removeAttr('tabindex');
9529                    }
9530                }
9531            },
9532            pausePlay: {
9533                setup: function() {
9534                    var pausePlayScaffold = $('<div class="' + namespace + 'pauseplay"><a href="#"></a></div>');
9535
9536                    // CONTROLSCONTAINER:
9537                    if (slider.controlsContainer) {
9538                        slider.controlsContainer.append(pausePlayScaffold);
9539                        slider.pausePlay = $('.' + namespace + 'pauseplay a', slider.controlsContainer);
9540                    } else {
9541                        slider.append(pausePlayScaffold);
9542                        slider.pausePlay = $('.' + namespace + 'pauseplay a', slider);
9543                    }
9544
9545                    methods.pausePlay.update((slider.vars.slideshow) ? namespace + 'pause' : namespace + 'play');
9546
9547                    slider.pausePlay.bind(eventType, function(event) {
9548                        event.preventDefault();
9549
9550                        if (watchedEvent === "" || watchedEvent === event.type) {
9551                            if ($(this).hasClass(namespace + 'pause')) {
9552                                slider.manualPause = true;
9553                                slider.manualPlay = false;
9554                                slider.pause();
9555                            } else {
9556                                slider.manualPause = false;
9557                                slider.manualPlay = true;
9558                                slider.play();
9559                            }
9560                        }
9561
9562                        // setup flags to prevent event duplication
9563                        if (watchedEvent === "") {
9564                            watchedEvent = event.type;
9565                        }
9566                        methods.setToClearWatchedEvent();
9567                    });
9568                },
9569                update: function(state) {
9570                    (state === "play") ? slider.pausePlay.removeClass(namespace + 'pause').addClass(namespace + 'play').html(slider.vars.playText) : slider.pausePlay.removeClass(namespace + 'play').addClass(namespace + 'pause').html(slider.vars.pauseText);
9571                }
9572            },
9573            touch: function() {
9574                var startX,
9575                    startY,
9576                    offset,
9577                    cwidth,
9578                    dx,
9579                    startT,
9580                    onTouchStart,
9581                    onTouchMove,
9582                    onTouchEnd,
9583                    scrolling = false,
9584                    localX = 0,
9585                    localY = 0,
9586                    accDx = 0;
9587
9588                if(!msGesture){
9589                    onTouchStart = function(e) {
9590                        if (slider.animating) {
9591                            e.preventDefault();
9592                        } else if ( ( window.navigator.msPointerEnabled ) || e.touches.length === 1 ) {
9593                            slider.pause();
9594                            // CAROUSEL:
9595                            cwidth = (vertical) ? slider.h : slider. w;
9596                            startT = Number(new Date());
9597                            // CAROUSEL:
9598
9599                            // Local vars for X and Y points.
9600                            localX = e.touches[0].pageX;
9601                            localY = e.touches[0].pageY;
9602
9603                            offset = (carousel && reverse && slider.animatingTo === slider.last) ? 0 :
9604                                (carousel && reverse) ? slider.limit - (((slider.itemW + slider.vars.itemMargin) * slider.move) * slider.animatingTo) :
9605                                    (carousel && slider.currentSlide === slider.last) ? slider.limit :
9606                                        (carousel) ? ((slider.itemW + slider.vars.itemMargin) * slider.move) * slider.currentSlide :
9607                                            (reverse) ? (slider.last - slider.currentSlide + slider.cloneOffset) * cwidth : (slider.currentSlide + slider.cloneOffset) * cwidth;
9608                            startX = (vertical) ? localY : localX;
9609                            startY = (vertical) ? localX : localY;
9610                            el.addEventListener('touchmove', onTouchMove, false);
9611                            el.addEventListener('touchend', onTouchEnd, false);
9612                        }
9613                    };
9614
9615                    onTouchMove = function(e) {
9616                        // Local vars for X and Y points.
9617
9618                        localX = e.touches[0].pageX;
9619                        localY = e.touches[0].pageY;
9620
9621                        dx = (vertical) ? startX - localY : (slider.vars.rtl?-1:1)*(startX - localX);
9622                        scrolling = (vertical) ? (Math.abs(dx) < Math.abs(localX - startY)) : (Math.abs(dx) < Math.abs(localY - startY));
9623                        var fxms = 500;
9624
9625                        if ( ! scrolling || Number( new Date() ) - startT > fxms ) {
9626                            e.preventDefault();
9627                            if (!fade && slider.transitions) {
9628                                if (!slider.vars.animationLoop) {
9629                                    dx = dx/((slider.currentSlide === 0 && dx < 0 || slider.currentSlide === slider.last && dx > 0) ? (Math.abs(dx)/cwidth+2) : 1);
9630                                }
9631                                slider.setProps(offset + dx, "setTouch");
9632                            }
9633                        }
9634                    };
9635
9636                    onTouchEnd = function(e) {
9637                        // finish the touch by undoing the touch session
9638                        el.removeEventListener('touchmove', onTouchMove, false);
9639
9640                        if (slider.animatingTo === slider.currentSlide && !scrolling && !(dx === null)) {
9641                            var updateDx = (reverse) ? -dx : dx,
9642                                target = (updateDx > 0) ? slider.getTarget('next') : slider.getTarget('prev');
9643
9644                            if (slider.canAdvance(target) && (Number(new Date()) - startT < 550 && Math.abs(updateDx) > 50 || Math.abs(updateDx) > cwidth/2)) {
9645                                slider.flexAnimate(target, slider.vars.pauseOnAction);
9646                            } else {
9647                                if (!fade) { slider.flexAnimate(slider.currentSlide, slider.vars.pauseOnAction, true); }
9648                            }
9649                        }
9650                        el.removeEventListener('touchend', onTouchEnd, false);
9651
9652                        startX = null;
9653                        startY = null;
9654                        dx = null;
9655                        offset = null;
9656                    };
9657
9658                    el.addEventListener('touchstart', onTouchStart, false);
9659                }else{
9660                    el.style.msTouchAction = "none";
9661                    el._gesture = new MSGesture();
9662                    el._gesture.target = el;
9663                    el.addEventListener("MSPointerDown", onMSPointerDown, false);
9664                    el._slider = slider;
9665                    el.addEventListener("MSGestureChange", onMSGestureChange, false);
9666                    el.addEventListener("MSGestureEnd", onMSGestureEnd, false);
9667
9668                    function onMSPointerDown(e){
9669                        e.stopPropagation();
9670                        if (slider.animating) {
9671                            e.preventDefault();
9672                        }else{
9673                            slider.pause();
9674                            el._gesture.addPointer(e.pointerId);
9675                            accDx = 0;
9676                            cwidth = (vertical) ? slider.h : slider. w;
9677                            startT = Number(new Date());
9678                            // CAROUSEL:
9679
9680                            offset = (carousel && reverse && slider.animatingTo === slider.last) ? 0 :
9681                                (carousel && reverse) ? slider.limit - (((slider.itemW + slider.vars.itemMargin) * slider.move) * slider.animatingTo) :
9682                                    (carousel && slider.currentSlide === slider.last) ? slider.limit :
9683                                        (carousel) ? ((slider.itemW + slider.vars.itemMargin) * slider.move) * slider.currentSlide :
9684                                            (reverse) ? (slider.last - slider.currentSlide + slider.cloneOffset) * cwidth : (slider.currentSlide + slider.cloneOffset) * cwidth;
9685                        }
9686                    }
9687
9688                    function onMSGestureChange(e) {
9689                        e.stopPropagation();
9690                        var slider = e.target._slider;
9691                        if(!slider){
9692                            return;
9693                        }
9694                        var transX = -e.translationX,
9695                            transY = -e.translationY;
9696
9697                        //Accumulate translations.
9698                        accDx = accDx + ((vertical) ? transY : transX);
9699                        dx = (slider.vars.rtl?-1:1)*accDx;
9700                        scrolling = (vertical) ? (Math.abs(accDx) < Math.abs(-transX)) : (Math.abs(accDx) < Math.abs(-transY));
9701
9702                        if(e.detail === e.MSGESTURE_FLAG_INERTIA){
9703                            setImmediate(function (){
9704                                el._gesture.stop();
9705                            });
9706
9707                            return;
9708                        }
9709
9710                        if (!scrolling || Number(new Date()) - startT > 500) {
9711                            e.preventDefault();
9712                            if (!fade && slider.transitions) {
9713                                if (!slider.vars.animationLoop) {
9714                                    dx = accDx / ((slider.currentSlide === 0 && accDx < 0 || slider.currentSlide === slider.last && accDx > 0) ? (Math.abs(accDx) / cwidth + 2) : 1);
9715                                }
9716                                slider.setProps(offset + dx, "setTouch");
9717                            }
9718                        }
9719                    }
9720
9721                    function onMSGestureEnd(e) {
9722                        e.stopPropagation();
9723                        var slider = e.target._slider;
9724                        if(!slider){
9725                            return;
9726                        }
9727                        if (slider.animatingTo === slider.currentSlide && !scrolling && !(dx === null)) {
9728                            var updateDx = (reverse) ? -dx : dx,
9729                                target = (updateDx > 0) ? slider.getTarget('next') : slider.getTarget('prev');
9730
9731                            if (slider.canAdvance(target) && (Number(new Date()) - startT < 550 && Math.abs(updateDx) > 50 || Math.abs(updateDx) > cwidth/2)) {
9732                                slider.flexAnimate(target, slider.vars.pauseOnAction);
9733                            } else {
9734                                if (!fade) { slider.flexAnimate(slider.currentSlide, slider.vars.pauseOnAction, true); }
9735                            }
9736                        }
9737
9738                        startX = null;
9739                        startY = null;
9740                        dx = null;
9741                        offset = null;
9742                        accDx = 0;
9743                    }
9744                }
9745            },
9746            resize: function() {
9747                if (!slider.animating && slider.is(':visible')) {
9748                    if (!carousel) { slider.doMath(); }
9749
9750                    if (fade) {
9751                        // SMOOTH HEIGHT:
9752                        methods.smoothHeight();
9753                    } else if (carousel) { //CAROUSEL:
9754                        slider.slides.width(slider.computedW);
9755                        slider.update(slider.pagingCount);
9756                        slider.setProps();
9757                    }
9758                    else if (vertical) { //VERTICAL:
9759                        slider.viewport.height(slider.h);
9760                        slider.setProps(slider.h, "setTotal");
9761                    } else {
9762                        // SMOOTH HEIGHT:
9763                        if (slider.vars.smoothHeight) { methods.smoothHeight(); }
9764                        slider.newSlides.width(slider.computedW);
9765                        slider.setProps(slider.computedW, "setTotal");
9766                    }
9767                }
9768            },
9769            smoothHeight: function(dur) {
9770                if (!vertical || fade) {
9771                    var $obj = (fade) ? slider : slider.viewport;
9772                    (dur) ? $obj.animate({"height": slider.slides.eq(slider.animatingTo).innerHeight()}, dur) : $obj.innerHeight(slider.slides.eq(slider.animatingTo).innerHeight());
9773                }
9774            },
9775            sync: function(action) {
9776                var $obj = $(slider.vars.sync).data("flexslider"),
9777                    target = slider.animatingTo;
9778
9779                switch (action) {
9780                    case "animate": $obj.flexAnimate(target, slider.vars.pauseOnAction, false, true); break;
9781                    case "play": if (!$obj.playing && !$obj.asNav) { $obj.play(); } break;
9782                    case "pause": $obj.pause(); break;
9783                }
9784            },
9785            uniqueID: function($clone) {
9786                // Append _clone to current level and children elements with id attributes
9787                $clone.filter( '[id]' ).add($clone.find( '[id]' )).each(function() {
9788                    var $this = $(this);
9789                    $this.attr( 'id', $this.attr( 'id' ) + '_clone' );
9790                });
9791                return $clone;
9792            },
9793            pauseInvisible: {
9794                visProp: null,
9795                init: function() {
9796                    var visProp = methods.pauseInvisible.getHiddenProp();
9797                    if (visProp) {
9798                        var evtname = visProp.replace(/[H|h]idden/,'') + 'visibilitychange';
9799                        document.addEventListener(evtname, function() {
9800                            if (methods.pauseInvisible.isHidden()) {
9801                                if(slider.startTimeout) {
9802                                    clearTimeout(slider.startTimeout); //If clock is ticking, stop timer and prevent from starting while invisible
9803                                } else {
9804                                    slider.pause(); //Or just pause
9805                                }
9806                            }
9807                            else {
9808                                if(slider.started) {
9809                                    slider.play(); //Initiated before, just play
9810                                } else {
9811                                    if (slider.vars.initDelay > 0) {
9812                                        setTimeout(slider.play, slider.vars.initDelay);
9813                                    } else {
9814                                        slider.play(); //Didn't init before: simply init or wait for it
9815                                    }
9816                                }
9817                            }
9818                        });
9819                    }
9820                },
9821                isHidden: function() {
9822                    var prop = methods.pauseInvisible.getHiddenProp();
9823                    if (!prop) {
9824                        return false;
9825                    }
9826                    return document[prop];
9827                },
9828                getHiddenProp: function() {
9829                    var prefixes = ['webkit','moz','ms','o'];
9830                    // if 'hidden' is natively supported just return it
9831                    if ('hidden' in document) {
9832                        return 'hidden';
9833                    }
9834                    // otherwise loop over all the known prefixes until we find one
9835                    for ( var i = 0; i < prefixes.length; i++ ) {
9836                        if ((prefixes[i] + 'Hidden') in document) {
9837                            return prefixes[i] + 'Hidden';
9838                        }
9839                    }
9840                    // otherwise it's not supported
9841                    return null;
9842                }
9843            },
9844            setToClearWatchedEvent: function() {
9845                clearTimeout(watchedEventClearTimer);
9846                watchedEventClearTimer = setTimeout(function() {
9847                    watchedEvent = "";
9848                }, 3000);
9849            }
9850        };
9851
9852        // public methods
9853        slider.flexAnimate = function(target, pause, override, withSync, fromNav) {
9854            if (!slider.vars.animationLoop && target !== slider.currentSlide) {
9855                slider.direction = (target > slider.currentSlide) ? "next" : "prev";
9856            }
9857
9858            if (asNav && slider.pagingCount === 1) slider.direction = (slider.currentItem < target) ? "next" : "prev";
9859
9860            if (!slider.animating && (slider.canAdvance(target, fromNav) || override) && slider.is(":visible")) {
9861                if (asNav && withSync) {
9862                    var master = $(slider.vars.asNavFor).data('flexslider');
9863                    slider.atEnd = target === 0 || target === slider.count - 1;
9864                    master.flexAnimate(target, true, false, true, fromNav);
9865                    slider.direction = (slider.currentItem < target) ? "next" : "prev";
9866                    master.direction = slider.direction;
9867
9868                    if (Math.ceil((target + 1)/slider.visible) - 1 !== slider.currentSlide && target !== 0) {
9869                        slider.currentItem = target;
9870                        slider.slides.removeClass(namespace + "active-slide").eq(target).addClass(namespace + "active-slide");
9871                        target = Math.floor(target/slider.visible);
9872                    } else {
9873                        slider.currentItem = target;
9874                        slider.slides.removeClass(namespace + "active-slide").eq(target).addClass(namespace + "active-slide");
9875                        return false;
9876                    }
9877                }
9878
9879                slider.animating = true;
9880                slider.animatingTo = target;
9881
9882                // SLIDESHOW:
9883                if (pause) { slider.pause(); }
9884
9885                // API: before() animation Callback
9886                slider.vars.before(slider);
9887
9888                // SYNC:
9889                if (slider.syncExists && !fromNav) { methods.sync("animate"); }
9890
9891                // CONTROLNAV
9892                if (slider.vars.controlNav) { methods.controlNav.active(); }
9893
9894                // !CAROUSEL:
9895                // CANDIDATE: slide active class (for add/remove slide)
9896                if (!carousel) {
9897                    slider.slides.eq(target).addClass(namespace + 'active-slide').siblings().removeClass(namespace + 'active-slide');
9898                    slider.slides.eq(target).nextAll().eq(slider.count - 1).addClass(namespace + 'active-slide');
9899                    slider.slides.eq(target).prevAll().eq(slider.count - 1).addClass(namespace + 'active-slide');
9900                }
9901
9902                // INFINITE LOOP:
9903                // CANDIDATE: atEnd
9904                slider.atEnd = target === 0 || target === slider.last;
9905
9906                // DIRECTIONNAV:
9907                if (slider.vars.directionNav) { methods.directionNav.update(); }
9908
9909                if (target === slider.last) {
9910                    // API: end() of cycle Callback
9911                    slider.vars.end(slider);
9912                    // SLIDESHOW && !INFINITE LOOP:
9913                    if (!slider.vars.animationLoop) { slider.pause(); }
9914                }
9915
9916                // SLIDE:
9917                if (!fade) {
9918                    var dimension = (vertical) ? slider.slides.filter(':first').height() : slider.computedW,
9919                        margin, slideString, calcNext;
9920
9921                    // INFINITE LOOP / REVERSE:
9922                    if (carousel) {
9923                        margin = slider.vars.itemMargin;
9924                        calcNext = ((slider.itemW + margin) * slider.move) * slider.animatingTo;
9925                        slideString = (calcNext > slider.limit && slider.visible !== 1) ? slider.limit : calcNext;
9926                    } else if (slider.currentSlide === 0 && target === slider.count - 1 && slider.vars.animationLoop && slider.direction !== "next") {
9927                        slideString = (reverse) ? (slider.count + slider.cloneOffset) * dimension : dimension * (slider.cloneOffset - 1);
9928                    } else if (slider.currentSlide === slider.last && target === 0 && slider.vars.animationLoop && slider.direction !== "prev") {
9929                        slideString = (reverse) ? dimension * (slider.cloneOffset - 1) : (slider.count + slider.cloneOffset) * dimension;
9930                    } else {
9931                        slideString = (reverse) ? ((slider.count - 1) - target + slider.cloneOffset) * dimension : (target + slider.cloneOffset) * dimension;
9932                    }
9933                    slider.setProps(slideString, "", slider.vars.animationSpeed);
9934                    if (slider.transitions) {
9935                        if (!slider.vars.animationLoop || !slider.atEnd) {
9936                            slider.animating = false;
9937                            slider.currentSlide = slider.animatingTo;
9938                        }
9939                        // Insurance for the ever-so-fickle transitionEnd event
9940                        clearTimeout(slider.ensureAnimationEnd);
9941                        slider.ensureAnimationEnd = setTimeout(function() {
9942                            slider.wrapup(dimension);
9943                        }, slider.vars.animationSpeed + 250);
9944
9945                    } else {
9946                        slider.container.animate(slider.args, slider.vars.animationSpeed, slider.vars.easing, function(){
9947                            slider.wrapup(dimension);
9948                        });
9949                    }
9950                } else { // FADE:
9951                    if (!touch) {
9952                        slider.slides.eq(slider.currentSlide).css({"zIndex": 1}).animate({"opacity": 0}, slider.vars.animationSpeed, slider.vars.easing);
9953                        slider.slides.eq(target).css({"zIndex": 2}).animate({"opacity": 1}, slider.vars.animationSpeed, slider.vars.easing, slider.wrapup);
9954                    } else {
9955                        slider.slides.eq(slider.currentSlide).css({ "opacity": 0, "zIndex": 1 });
9956                        slider.slides.eq(target).css({ "opacity": 1, "zIndex": 2 });
9957                        slider.wrapup(dimension);
9958                    }
9959                }
9960                // SMOOTH HEIGHT:
9961                if (slider.vars.smoothHeight) { methods.smoothHeight(slider.vars.animationSpeed); }
9962            }
9963        };
9964        slider.wrapup = function(dimension) {
9965            // SLIDE:
9966            if (!fade && !carousel) {
9967                if (slider.currentSlide === 0 && slider.animatingTo === slider.last && slider.vars.animationLoop) {
9968                    slider.setProps(dimension, "jumpEnd");
9969                } else if (slider.currentSlide === slider.last && slider.animatingTo === 0 && slider.vars.animationLoop) {
9970                    slider.setProps(dimension, "jumpStart");
9971                }
9972            }
9973            slider.animating = false;
9974            slider.currentSlide = slider.animatingTo;
9975            // API: after() animation Callback
9976            slider.vars.after(slider);
9977        };
9978
9979        // SLIDESHOW:
9980        slider.animateSlides = function() {
9981            if (!slider.animating && focused ) { slider.flexAnimate(slider.getTarget("next")); }
9982        };
9983        // SLIDESHOW:
9984        slider.pause = function() {
9985            clearInterval(slider.animatedSlides);
9986            slider.animatedSlides = null;
9987            slider.playing = false;
9988            // PAUSEPLAY:
9989            if (slider.vars.pausePlay) { methods.pausePlay.update("play"); }
9990            // SYNC:
9991            if (slider.syncExists) { methods.sync("pause"); }
9992        };
9993        // SLIDESHOW:
9994        slider.play = function() {
9995            if (slider.playing) { clearInterval(slider.animatedSlides); }
9996            slider.animatedSlides = slider.animatedSlides || setInterval(slider.animateSlides, slider.vars.slideshowSpeed);
9997            slider.started = slider.playing = true;
9998            // PAUSEPLAY:
9999            if (slider.vars.pausePlay) { methods.pausePlay.update("pause"); }
10000            // SYNC:
10001            if (slider.syncExists) { methods.sync("play"); }
10002        };
10003        // STOP:
10004        slider.stop = function () {
10005            slider.pause();
10006            slider.stopped = true;
10007        };
10008        slider.canAdvance = function(target, fromNav) {
10009            // ASNAV:
10010            var last = (asNav) ? slider.pagingCount - 1 : slider.last;
10011            return (fromNav) ? true :
10012                (asNav && slider.currentItem === slider.count - 1 && target === 0 && slider.direction === "prev") ? true :
10013                    (asNav && slider.currentItem === 0 && target === slider.pagingCount - 1 && slider.direction !== "next") ? false :
10014                        (target === slider.currentSlide && !asNav) ? false :
10015                            (slider.vars.animationLoop) ? true :
10016                                (slider.atEnd && slider.currentSlide === 0 && target === last && slider.direction !== "next") ? false :
10017                                    (slider.atEnd && slider.currentSlide === last && target === 0 && slider.direction === "next") ? false :
10018                                        true;
10019        };
10020        slider.getTarget = function(dir) {
10021            slider.direction = dir;
10022            if (dir === "next") {
10023                return (slider.currentSlide === slider.last) ? 0 : slider.currentSlide + 1;
10024            } else {
10025                return (slider.currentSlide === 0) ? slider.last : slider.currentSlide - 1;
10026            }
10027        };
10028
10029        // SLIDE:
10030        slider.setProps = function(pos, special, dur) {
10031            var target = (function() {
10032                var posCheck = (pos) ? pos : ((slider.itemW + slider.vars.itemMargin) * slider.move) * slider.animatingTo,
10033                    posCalc = (function() {
10034                        if (carousel) {
10035                            return (special === "setTouch") ? pos :
10036                                (reverse && slider.animatingTo === slider.last) ? 0 :
10037                                    (reverse) ? slider.limit - (((slider.itemW + slider.vars.itemMargin) * slider.move) * slider.animatingTo) :
10038                                        (slider.animatingTo === slider.last) ? slider.limit : posCheck;
10039                        } else {
10040                            switch (special) {
10041                                case "setTotal": return (reverse) ? ((slider.count - 1) - slider.currentSlide + slider.cloneOffset) * pos : (slider.currentSlide + slider.cloneOffset) * pos;
10042                                case "setTouch": return (reverse) ? pos : pos;
10043                                case "jumpEnd": return (reverse) ? pos * Math.max(1, slider.cloneOffset) : (slider.count + slider.cloneOffset -1 ) * pos;
10044                                case "jumpStart": return (reverse) ? (slider.count + slider.cloneOffset -1 ) * pos : pos * Math.max(1, slider.cloneOffset);
10045                                default: return pos;
10046                            }
10047                        }
10048                    }());
10049
10050                return (posCalc * ((slider.vars.rtl)?1:-1)) + "px";
10051            }());
10052
10053            if (slider.transitions) {
10054                if (slider.isFirefox) {
10055                    target = (vertical) ? "translate3d(0," + target + ",0)" : "translate3d(" + (parseInt(target)+'px') + ",0,0)";
10056                } else {
10057                    target = (vertical) ? "translate3d(0," + target + ",0)" : "translate3d(" + ((slider.vars.rtl?-1:1)*parseInt(target)+'px') + ",0,0)";
10058                }
10059                dur = (dur !== undefined) ? (dur/1000) + "s" : "0s";
10060                slider.container.css("-" + slider.pfx + "-transition-duration", dur);
10061                slider.container.css("transition-duration", dur);
10062            }
10063
10064            slider.args[slider.prop] = target;
10065            if (slider.transitions || dur === undefined) { slider.container.css(slider.args); }
10066
10067            slider.container.css('transform',target);
10068        };
10069
10070        slider.setup = function(type) {
10071            // SLIDE:
10072            if (!fade) {
10073                var sliderOffset, arr;
10074
10075                if (type === "init") {
10076                    slider.viewport = $('<div class="' + namespace + 'viewport"></div>').css({"overflow": "hidden", "position": "relative"}).appendTo(slider).append(slider.container);
10077                    // INFINITE LOOP:
10078                    slider.cloneCount = 0;
10079                    slider.cloneOffset = 0;
10080                    // REVERSE:
10081                    if (reverse) {
10082                        arr = $.makeArray(slider.slides).reverse();
10083                        slider.slides = $(arr);
10084                        slider.container.empty().append(slider.slides);
10085                    }
10086                }
10087                // INFINITE LOOP && !CAROUSEL:
10088                if (slider.vars.animationLoop && !carousel) {
10089                    slider.cloneCount = 4;
10090                    slider.cloneOffset = 2;
10091                    // clear out old clones
10092                    if (type !== "init") { slider.container.find('.clone').remove(); }
10093                    prevClones = methods.uniqueID(slider.slides.slice( -2 ).clone().addClass('clone')).addClass('prevclone').attr('aria-hidden', 'true');
10094                    afterClones = methods.uniqueID(slider.slides.slice( 0, 2 ).clone().addClass('clone')).attr('aria-hidden', 'true');
10095                    slider.container.append(afterClones).prepend(prevClones);
10096                }
10097                slider.newSlides = $(slider.vars.selector, slider);
10098                sliderOffset = (reverse) ? slider.count - slider.cloneOffset - slider.currentSlide + slider.cloneOffset : slider.currentSlide + slider.cloneOffset;
10099                // VERTICAL:
10100                if (vertical && !carousel) {
10101                    slider.container.height((slider.count + slider.cloneCount) * 200 + "%").css("position", "absolute").width("100%");
10102                    setTimeout(function(){
10103                        slider.newSlides.css({"display": "block"});
10104                        slider.doMath();
10105                        slider.viewport.height(slider.h);
10106                        slider.setProps(sliderOffset * slider.h, "init");
10107                    }, (type === "init") ? 100 : 0);
10108                } else {
10109                    slider.container.width((slider.count + slider.cloneCount) * 200 + "%");
10110                    slider.setProps(sliderOffset * slider.computedW, "init");
10111                    setTimeout(function(){
10112                        slider.doMath();
10113                        if(slider.vars.rtl){
10114                            if (slider.isFirefox) {
10115                                slider.newSlides.css({"width": slider.computedW, "marginRight" : slider.computedM, "float": "right", "display": "block"});
10116                            } else {
10117                                slider.newSlides.css({"width": slider.computedW, "marginRight" : slider.computedM, "float": "left", "display": "block"});
10118                            }
10119
10120                        }
10121                        else{
10122                            slider.newSlides.css({"width": slider.computedW, "marginRight" : slider.computedM, "float": "left", "display": "block"});
10123                        }
10124                        // SMOOTH HEIGHT:
10125                        if (slider.vars.smoothHeight) { methods.smoothHeight(); }
10126                    }, (type === "init") ? 100 : 0);
10127                }
10128            } else { // FADE:
10129                if(slider.vars.rtl){
10130                    slider.slides.css({"width": "100%", "float": 'right', "marginLeft": "-100%", "position": "relative"});
10131                }
10132                else{
10133                    slider.slides.css({"width": "100%", "float": 'left', "marginRight": "-100%", "position": "relative"});
10134                }
10135                if (type === "init") {
10136                    if (!touch) {
10137                        //slider.slides.eq(slider.currentSlide).fadeIn(slider.vars.animationSpeed, slider.vars.easing);
10138                        if (slider.vars.fadeFirstSlide == false) {
10139                            slider.slides.css({ "opacity": 0, "display": "block", "zIndex": 1 }).eq(slider.currentSlide).css({"zIndex": 2}).css({"opacity": 1});
10140                        } else {
10141                            slider.slides.css({ "opacity": 0, "display": "block", "zIndex": 1 }).eq(slider.currentSlide).css({"zIndex": 2}).animate({"opacity": 1},slider.vars.animationSpeed,slider.vars.easing);
10142                        }
10143                    } else {
10144                        slider.slides.css({ "opacity": 0, "display": "block", "webkitTransition": "opacity " + slider.vars.animationSpeed / 1000 + "s ease", "zIndex": 1 }).eq(slider.currentSlide).css({ "opacity": 1, "zIndex": 2});
10145                    }
10146                }
10147                // SMOOTH HEIGHT:
10148                if (slider.vars.smoothHeight) { methods.smoothHeight(); }
10149            }
10150            // !CAROUSEL:
10151            // CANDIDATE: active slide
10152            if (!carousel) { slider.slides.removeClass(namespace + "active-slide").eq(slider.currentSlide).addClass(namespace + "active-slide"); }
10153
10154            //FlexSlider: init() Callback
10155            slider.vars.init(slider);
10156        };
10157
10158        slider.doMath = function() {
10159            var slide = slider.slides.first(),
10160                slideMargin = slider.vars.itemMargin,
10161                minItems = slider.vars.minItems,
10162                maxItems = slider.vars.maxItems;
10163
10164            slider.w = slider.width();
10165            if (slider.isFirefox) { slider.w = slider.width(); }
10166            slider.h = slide.height();
10167            slider.boxPadding = slide.outerWidth() - slide.width();
10168
10169            // CAROUSEL:
10170            if (carousel) {
10171                slider.itemT = slider.vars.itemWidth + slideMargin;
10172                slider.itemM = slideMargin;
10173                slider.minW = (minItems) ? minItems * slider.itemT : slider.w;
10174                slider.maxW = (maxItems) ? (maxItems * slider.itemT) - slideMargin : slider.w;
10175                slider.itemW = (slider.minW > slider.w) ? (slider.w - (slideMargin * (minItems - 1)))/minItems :
10176                    (slider.maxW < slider.w) ? (slider.w - (slideMargin * (maxItems - 1)))/maxItems :
10177                        (slider.vars.itemWidth > slider.w) ? slider.w : slider.vars.itemWidth;
10178
10179                slider.visible = Math.floor(slider.w/(slider.itemW));
10180                slider.move = (slider.vars.move > 0 && slider.vars.move < slider.visible ) ? slider.vars.move : slider.visible;
10181                slider.pagingCount = Math.ceil(((slider.count - slider.visible)/slider.move) + 1);
10182                slider.last =  slider.pagingCount - 1;
10183                slider.limit = (slider.pagingCount === 1) ? 0 :
10184                    (slider.vars.itemWidth > slider.w) ? (slider.itemW * (slider.count - 1)) + (slideMargin * (slider.count - 1)) : ((slider.itemW + slideMargin) * slider.count) - slider.w - slideMargin;
10185            } else {
10186                slider.itemW = slider.w;
10187                slider.itemM = slideMargin;
10188                slider.pagingCount = slider.count;
10189                slider.last = slider.count - 1;
10190            }
10191            slider.computedW = slider.itemW - slider.boxPadding;
10192            slider.computedM = slider.itemM;
10193        };
10194
10195        slider.update = function(pos, action) {
10196            slider.doMath();
10197
10198            // update currentSlide and slider.animatingTo if necessary
10199            if (!carousel) {
10200                if (pos < slider.currentSlide) {
10201                    slider.currentSlide += 1;
10202                } else if (pos <= slider.currentSlide && pos !== 0) {
10203                    slider.currentSlide -= 1;
10204                }
10205                slider.animatingTo = slider.currentSlide;
10206            }
10207
10208            // update controlNav
10209            if (slider.vars.controlNav && !slider.manualControls) {
10210                if ((action === "add" && !carousel) || slider.pagingCount > slider.controlNav.length) {
10211                    methods.controlNav.update("add");
10212                } else if ((action === "remove" && !carousel) || slider.pagingCount < slider.controlNav.length) {
10213                    if (carousel && slider.currentSlide > slider.last) {
10214                        slider.currentSlide -= 1;
10215                        slider.animatingTo -= 1;
10216                    }
10217                    methods.controlNav.update("remove", slider.last);
10218                }
10219            }
10220            // update directionNav
10221            if (slider.vars.directionNav) { methods.directionNav.update(); }
10222
10223        };
10224
10225        slider.addSlide = function(obj, pos) {
10226            var $obj = $(obj);
10227
10228            slider.count += 1;
10229            slider.last = slider.count - 1;
10230
10231            // append new slide
10232            if (vertical && reverse) {
10233                (pos !== undefined) ? slider.slides.eq(slider.count - pos).after($obj) : slider.container.prepend($obj);
10234            } else {
10235                (pos !== undefined) ? slider.slides.eq(pos).before($obj) : slider.container.append($obj);
10236            }
10237
10238            // update currentSlide, animatingTo, controlNav, and directionNav
10239            slider.update(pos, "add");
10240
10241            // update slider.slides
10242            slider.slides = $(slider.vars.selector + ':not(.clone)', slider);
10243            // re-setup the slider to accomdate new slide
10244            slider.setup();
10245
10246            //FlexSlider: added() Callback
10247            slider.vars.added(slider);
10248        };
10249        slider.removeSlide = function(obj) {
10250            var pos = (isNaN(obj)) ? slider.slides.index($(obj)) : obj;
10251
10252            // update count
10253            slider.count -= 1;
10254            slider.last = slider.count - 1;
10255
10256            // remove slide
10257            if (isNaN(obj)) {
10258                $(obj, slider.slides).remove();
10259            } else {
10260                (vertical && reverse) ? slider.slides.eq(slider.last).remove() : slider.slides.eq(obj).remove();
10261            }
10262
10263            // update currentSlide, animatingTo, controlNav, and directionNav
10264            slider.doMath();
10265            slider.update(pos, "remove");
10266
10267            // update slider.slides
10268            slider.slides = $(slider.vars.selector + ':not(.clone)', slider);
10269            // re-setup the slider to accomdate new slide
10270            slider.setup();
10271
10272            // FlexSlider: removed() Callback
10273            slider.vars.removed(slider);
10274        };
10275
10276        //FlexSlider: Initialize
10277        methods.init();
10278    };
10279
10280    // Ensure the slider isn't focussed if the window loses focus.
10281    $( window ).blur( function ( e ) {
10282        focused = false;
10283    }).focus( function ( e ) {
10284        focused = true;
10285    });
10286
10287    //FlexSlider: Default Settings
10288    $.flexslider.defaults = {
10289        namespace: "flex-",             //{NEW} String: Prefix string attached to the class of every element generated by the plugin
10290        selector: ".slides > li",       //{NEW} Selector: Must match a simple pattern. '{container} > {slide}' -- Ignore pattern at your own peril
10291        animation: "fade",              //String: Select your animation type, "fade" or "slide"
10292        easing: "swing",                //{NEW} String: Determines the easing method used in jQuery transitions. jQuery easing plugin is supported!
10293        direction: "horizontal",        //String: Select the sliding direction, "horizontal" or "vertical"
10294        reverse: false,                 //{NEW} Boolean: Reverse the animation direction
10295        animationLoop: true,            //Boolean: Should the animation loop? If false, directionNav will received "disable" classes at either end
10296        smoothHeight: false,            //{NEW} Boolean: Allow height of the slider to animate smoothly in horizontal mode
10297        startAt: 0,                     //Integer: The slide that the slider should start on. Array notation (0 = first slide)
10298        slideshow: true,                //Boolean: Animate slider automatically
10299        slideshowSpeed: 7000,           //Integer: Set the speed of the slideshow cycling, in milliseconds
10300        animationSpeed: 600,            //Integer: Set the speed of animations, in milliseconds
10301        initDelay: 0,                   //{NEW} Integer: Set an initialization delay, in milliseconds
10302        randomize: false,               //Boolean: Randomize slide order
10303        fadeFirstSlide: true,           //Boolean: Fade in the first slide when animation type is "fade"
10304        thumbCaptions: false,           //Boolean: Whether or not to put captions on thumbnails when using the "thumbnails" controlNav.
10305
10306        // Usability features
10307        pauseOnAction: true,            //Boolean: Pause the slideshow when interacting with control elements, highly recommended.
10308        pauseOnHover: false,            //Boolean: Pause the slideshow when hovering over slider, then resume when no longer hovering
10309        pauseInvisible: true,       //{NEW} Boolean: Pause the slideshow when tab is invisible, resume when visible. Provides better UX, lower CPU usage.
10310        useCSS: true,                   //{NEW} Boolean: Slider will use CSS3 transitions if available
10311        touch: true,                    //{NEW} Boolean: Allow touch swipe navigation of the slider on touch-enabled devices
10312        video: false,                   //{NEW} Boolean: If using video in the slider, will prevent CSS3 3D Transforms to avoid graphical glitches
10313
10314        // Primary Controls
10315        controlNav: true,               //Boolean: Create navigation for paging control of each slide? Note: Leave true for manualControls usage
10316        directionNav: true,             //Boolean: Create navigation for previous/next navigation? (true/false)
10317        prevText: "Previous",           //String: Set the text for the "previous" directionNav item
10318        nextText: "Next",               //String: Set the text for the "next" directionNav item
10319
10320        // Secondary Navigation
10321        keyboard: true,                 //Boolean: Allow slider navigating via keyboard left/right keys
10322        multipleKeyboard: false,        //{NEW} Boolean: Allow keyboard navigation to affect multiple sliders. Default behavior cuts out keyboard navigation with more than one slider present.
10323        mousewheel: false,              //{UPDATED} Boolean: Requires jquery.mousewheel.js (https://github.com/brandonaaron/jquery-mousewheel) - Allows slider navigating via mousewheel
10324        pausePlay: false,               //Boolean: Create pause/play dynamic element
10325        pauseText: "Pause",             //String: Set the text for the "pause" pausePlay item
10326        playText: "Play",               //String: Set the text for the "play" pausePlay item
10327
10328        // Special properties
10329        controlsContainer: "",          //{UPDATED} jQuery Object/Selector: Declare which container the navigation elements should be appended too. Default container is the FlexSlider element. Example use would be $(".flexslider-container"). Property is ignored if given element is not found.
10330        manualControls: "",             //{UPDATED} jQuery Object/Selector: Declare custom control navigation. Examples would be $(".flex-control-nav li") or "#tabs-nav li img", etc. The number of elements in your controlNav should match the number of slides/tabs.
10331        customDirectionNav: "",         //{NEW} jQuery Object/Selector: Custom prev / next button. Must be two jQuery elements. In order to make the events work they have to have the classes "prev" and "next" (plus namespace)
10332        sync: "",                       //{NEW} Selector: Mirror the actions performed on this slider with another slider. Use with care.
10333        asNavFor: "",                   //{NEW} Selector: Internal property exposed for turning the slider into a thumbnail navigation for another slider
10334
10335        // Carousel Options
10336        itemWidth: 0,                   //{NEW} Integer: Box-model width of individual carousel items, including horizontal borders and padding.
10337        itemMargin: 0,                  //{NEW} Integer: Margin between carousel items.
10338        minItems: 1,                    //{NEW} Integer: Minimum number of carousel items that should be visible. Items will resize fluidly when below this.
10339        maxItems: 0,                    //{NEW} Integer: Maxmimum number of carousel items that should be visible. Items will resize fluidly when above this limit.
10340        move: 0,                        //{NEW} Integer: Number of carousel items that should move on animation. If 0, slider will move all visible items.
10341        allowOneSlide: true,           //{NEW} Boolean: Whether or not to allow a slider comprised of a single slide
10342
10343        // Browser Specific
10344        isFirefox: false,             // {NEW} Boolean: Set to true when Firefox is the browser used.
10345
10346        // Callback API
10347        start: function(){},            //Callback: function(slider) - Fires when the slider loads the first slide
10348        before: function(){},           //Callback: function(slider) - Fires asynchronously with each slider animation
10349        after: function(){},            //Callback: function(slider) - Fires after each slider animation completes
10350        end: function(){},              //Callback: function(slider) - Fires when the slider reaches the last slide (asynchronous)
10351        added: function(){},            //{NEW} Callback: function(slider) - Fires after a slide is added
10352        removed: function(){},           //{NEW} Callback: function(slider) - Fires after a slide is removed
10353        init: function() {},             //{NEW}
10353 Callback: function(slider) - Fires after the slider is initially setup
10354        rtl: false             //{NEW} Boolean: Whether or not to enable RTL mode
10355    };
10356
10357    //FlexSlider: Plugin Function
10358    $.fn.flexslider = function(options) {
10359        if (options === undefined) { options = {}; }
10360
10361        if (typeof options === "object") {
10362            return this.each(function() {
10363                var $this = $(this),
10364                    selector = (options.selector) ? options.selector : ".slides > li",
10365                    $slides = $this.find(selector);
10366
10367                if ( ( $slides.length === 1 && options.allowOneSlide === false ) || $slides.length === 0 ) {
10368                    $slides.fadeIn(400);
10369                    if (options.start) { options.start($this); }
10370                } else if ($this.data('flexslider') === undefined) {
10371                    new $.flexslider(this, options);
10372                }
10373            });
10374        } else {
10375            // Helper strings to quickly perform functions on the slider
10376            var $slider = $(this).data('flexslider');
10377            switch (options) {
10378                case "play": $slider.play(); break;
10379                case "pause": $slider.pause(); break;
10380                case "stop": $slider.stop(); break;
10381                case "next": $slider.flexAnimate($slider.getTarget("next"), true); break;
10382                case "prev":
10383                case "previous": $slider.flexAnimate($slider.getTarget("prev"), true); break;
10384                default: if (typeof options === "number") { $slider.flexAnimate(options, true); }
10385            }
10386        }
10387    };
10388})(jQuery);
10389
10390/*!
10391 * Isotope PACKAGED v2.0.1
10392 * Filter & sort magical layouts
10393 * http://isotope.metafizzy.co
10394 */
10395
10396(function(t){function e(){}function i(t){function i(e){e.prototype.option||(e.prototype.option=function(e){t.isPlainObject(e)&&(this.options=t.extend(!0,this.options,e))})}function n(e,i){t.fn[e]=function(n){if("string"==typeof n){for(var s=o.call(arguments,1),a=0,u=this.length;u>a;a++){var p=this[a],h=t.data(p,e);if(h)if(t.isFunction(h[n])&&"_"!==n.charAt(0)){var f=h[n].apply(h,s);if(void 0!==f)return f}else r("no such method '"+n+"' for "+e+" instance");else r("cannot call methods on "+e+" prior to initialization; "+"attempted to call '"+n+"'")}return this}return this.each(function(){var o=t.data(this,e);o?(o.option(n),o._init()):(o=new i(this,n),t.data(this,e,o))})}}if(t){var r="undefined"==typeof console?e:function(t){console.error(t)};return t.bridget=function(t,e){i(e),n(t,e)},t.bridget}}var o=Array.prototype.slice;"function"==typeof define&&define.amd?define("jquery-bridget/jquery.bridget",["jquery"],i):i(t.jQuery)})(window),function(t){function e(e){var i=t.event;return i.target=i.target||i.srcElement||e,i}var i=document.documentElement,o=function(){};i.addEventListener?o=function(t,e,i){t.addEventListener(e,i,!1)}:i.attachEvent&&(o=function(t,i,o){t[i+o]=o.handleEvent?function(){var i=e(t);o.handleEvent.call(o,i)}:function(){var i=e(t);o.call(t,i)},t.attachEvent("on"+i,t[i+o])});var n=function(){};i.removeEventListener?n=function(t,e,i){t.removeEventListener(e,i,!1)}:i.detachEvent&&(n=function(t,e,i){t.detachEvent("on"+e,t[e+i]);try{delete t[e+i]}catch(o){t[e+i]=void 0}});var r={bind:o,unbind:n};"function"==typeof define&&define.amd?define("eventie/eventie",r):"object"==typeof exports?module.exports=r:t.eventie=r}(this),function(t){function e(t){"function"==typeof t&&(e.isReady?t():r.push(t))}function i(t){var i="readystatechange"===t.type&&"complete"!==n.readyState;if(!e.isReady&&!i){e.isReady=!0;for(var o=0,s=r.length;s>o;o++){var a=r[o];a()}}}function o(o){return o.bind(n,"DOMContentLoaded",i),o.bind(n,"readystatechange",i),o.bind(t,"load",i),e}var n=t.document,r=[];e.isReady=!1,"function"==typeof define&&define.amd?(e.isReady="function"==typeof requirejs,define("doc-ready/doc-ready",["eventie/eventie"],o)):t.docReady=o(t.eventie)}(this),function(){function t(){}function e(t,e){for(var i=t.length;i--;)if(t[i].listener===e)return i;return-1}function i(t){return function(){return this[t].apply(this,arguments)}}var o=t.prototype,n=this,r=n.EventEmitter;o.getListeners=function(t){var e,i,o=this._getEvents();if(t instanceof RegExp){e={};for(i in o)o.hasOwnProperty(i)&&t.test(i)&&(e[i]=o[i])}else e=o[t]||(o[t]=[]);return e},o.flattenListeners=function(t){var e,i=[];for(e=0;t.length>e;e+=1)i.push(t[e].listener);return i},o.getListenersAsObject=function(t){var e,i=this.getListeners(t);return i instanceof Array&&(e={},e[t]=i),e||i},o.addListener=function(t,i){var o,n=this.getListenersAsObject(t),r="object"==typeof i;for(o in n)n.hasOwnProperty(o)&&-1===e(n[o],i)&&n[o].push(r?i:{listener:i,once:!1});return this},o.on=i("addListener"),o.addOnceListener=function(t,e){return this.addListener(t,{listener:e,once:!0})},o.once=i("addOnceListener"),o.defineEvent=function(t){return this.getListeners(t),this},o.defineEvents=function(t){for(var e=0;t.length>e;e+=1)this.defineEvent(t[e]);return this},o.removeListener=function(t,i){var o,n,r=this.getListenersAsObject(t);for(n in r)r.hasOwnProperty(n)&&(o=e(r[n],i),-1!==o&&r[n].splice(o,1));return this},o.off=i("removeListener"),o.addListeners=function(t,e){return this.manipulateListeners(!1,t,e)},o.removeListeners=function(t,e){return this.manipulateListeners(!0,t,e)}
10396,o.manipulateListeners=function(t,e,i){var o,n,r=t?this.removeListener:this.addListener,s=t?this.removeListeners:this.addListeners;if("object"!=typeof e||e instanceof RegExp)for(o=i.length;o--;)r.call(this,e,i[o]);else for(o in e)e.hasOwnProperty(o)&&(n=e[o])&&("function"==typeof n?r.call(this,o,n):s.call(this,o,n));return this},o.removeEvent=function(t){var e,i=typeof t,o=this._getEvents();if("string"===i)delete o[t];else if(t instanceof RegExp)for(e in o)o.hasOwnProperty(e)&&t.test(e)&&delete o[e];else delete this._events;return this},o.removeAllListeners=i("removeEvent"),o.emitEvent=function(t,e){var i,o,n,r,s=this.getListenersAsObject(t);for(n in s)if(s.hasOwnProperty(n))for(o=s[n].length;o--;)i=s[n][o],i.once===!0&&this.removeListener(t,i.listener),r=i.listener.apply(this,e||[]),r===this._getOnceReturnValue()&&this.removeListener(t,i.listener);return this},o.trigger=i("emitEvent"),o.emit=function(t){var e=Array.prototype.slice.call(arguments,1);return this.emitEvent(t,e)},o.setOnceReturnValue=function(t){return this._onceReturnValue=t,this},o._getOnceReturnValue=function(){return this.hasOwnProperty("_onceReturnValue")?this._onceReturnValue:!0},o._getEvents=function(){return this._events||(this._events={})},t.noConflict=function(){return n.EventEmitter=r,t},"function"==typeof define&&define.amd?define("eventEmitter/EventEmitter",[],function(){return t}):"object"==typeof module&&module.exports?module.exports=t:this.EventEmitter=t}.call(this),function(t){function e(t){if(t){if("string"==typeof o[t])return t;t=t.charAt(0).toUpperCase()+t.slice(1);for(var e,n=0,r=i.length;r>n;n++)if(e=i[n]+t,"string"==typeof o[e])return e}}var i="Webkit Moz ms Ms O".split(" "),o=document.documentElement.style;"function"==typeof define&&define.amd?define("get-style-property/get-style-property",[],function(){return e}):"object"==typeof exports?module.exports=e:t.getStyleProperty=e}(window),function(t){function e(t){var e=parseFloat(t),i=-1===t.indexOf("%")&&!isNaN(e);return i&&e}function i(){for(var t={width:0,height:0,innerWidth:0,innerHeight:0,outerWidth:0,outerHeight:0},e=0,i=s.length;i>e;e++){var o=s[e];t[o]=0}return t}function o(t){function o(t){if("string"==typeof t&&(t=document.querySelector(t)),t&&"object"==typeof t&&t.nodeType){var o=r(t);if("none"===o.display)return i();var n={};n.width=t.offsetWidth,n.height=t.offsetHeight;for(var h=n.isBorderBox=!(!p||!o[p]||"border-box"!==o[p]),f=0,d=s.length;d>f;f++){var l=s[f],c=o[l];c=a(t,c);var y=parseFloat(c);n[l]=isNaN(y)?0:y}var m=n.paddingLeft+n.paddingRight,g=n.paddingTop+n.paddingBottom,v=n.marginLeft+n.marginRight,_=n.marginTop+n.marginBottom,I=n.borderLeftWidth+n.borderRightWidth,L=n.borderTopWidth+n.borderBottomWidth,z=h&&u,S=e(o.width);S!==!1&&(n.width=S+(z?0:m+I));var b=e(o.height);return b!==!1&&(n.height=b+(z?0:g+L)),n.innerWidth=n.width-(m+I),n.innerHeight=n.height-(g+L),n.outerWidth=n.width+v,n.outerHeight=n.height+_,n}}function a(t,e){if(n||-1===e.indexOf("%"))return e;var i=t.style,o=i.left,r=t.runtimeStyle,s=r&&r.left;return s&&(r.left=t.currentStyle.left),i.left=e,e=i.pixelLeft,i.left=o,s&&(r.left=s),e}var u,p=t("boxSizing");return function(){if(p){var t=document.createElement("div");t.style.width="200px",t.style.padding="1px 2px 3px 4px",t.style.borderStyle="solid",t.style.borderWidth="1px 2px 3px 4px",t.style[p]="border-box";var i=document.body||document.documentElement;i.appendChild(t);var o=r(t);u=200===e(o.width),i.removeChild(t)}}(),o}var n=t.getComputedStyle,r=n?function(t){return n(t,null)}:function(t){return t.currentStyle},s=["paddingLeft","paddingRight","paddingTop","paddingBottom","marginLeft","marginRight","marginTop","marginBottom","borderLeftWidth","borderRightWidth","borderTopWidth","borderBottomWidth"];"function"==typeof define&&define.amd?define("get-size/get-size",["get-style-property/get-style-property"],o):"object"==typeof exports?module.exports=o(require("get-style-property")):t.getSize=o(t.getStyleProperty)}(window),function(t,e){function i(t,e){return t[a](e)}function o(t){if(!t.parentNode){var e=document.createDocumentFragment();e.appendChild(t)}}function n(t,e){o(t);for(var i=t.parentNode.querySelectorAll(e),n=0,r=i.length;r>n;n++)if(i[n]===t)return!0;return!1}function r(t,e){return o(t),i(t,e)}var s,a=function(){if(e.matchesSelector)return"matchesSelector";for(var t=["webkit","moz","ms","o"],i=0,o=t.length;o>i;i++){var n=t[i],r=n+"MatchesSelector";if(e[r])return r}}();if(a){var u=document.createElement("div"),p=i(u,"div");s=p?i:r}else s=n;"function"==typeof define&&define.amd?define("matches-selector/matches-selector",[],function(){return s}):window.matchesSelector=s}(this,Element.prototype),function(t){function e(t,e){for(var i in e)t[i]=e[i];return t}function i(t){for(var e in t)return!1;return e=null,!0}function o(t){return t.replace(/([A-Z])/g,function(t){return"-"+t.toLowerCase()})}function n(t,n,r){function a(t,e){t&&(this.element=t,this.layout=e,this.position={x:0,y:0},this._create())}var u=r("transition"),p=r("transform"),h=u&&p,f=!!r("perspective"),d={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"otransitionend",transition:"transitionend"}[u],l=["transform","transition","transitionDuration","transitionProperty"],c=function(){for(var t={},e=0,i=l.length;i>e;e++){var o=l[e],n=r(o);n&&n!==o&&(t[o]=n)}return t}();e(a.prototype,t.prototype),a.prototype._create=function(){this._transn={ingProperties:{},clean:{},onEnd:{}},this.css({position:"absolute"})},a.prototype.handleEvent=function(t){var e="on"+t.type;this[e]&&this[e](t)},a.prototype.getSize=function(){this.size=n(this.element)},a.prototype.css=function(t){var e=this.element.style;for(var i in t){var o=c[i]||i;e[o]=t[i]}},a.prototype.getPosition=function(){var t=s(this.element),e=this.layout.options,i=e.isOriginLeft,o=e.isOriginTop,n=parseInt(t[i?"left":"right"],10),r=parseInt(t[o?"top":"bottom"],10);n=isNaN(n)?0:n,r=isNaN(r)?0:r;var a=this.layout.size;n-=i?a.paddingLeft:a.paddingRight,r-=o?a.paddingTop:a.paddingBottom,this.position.x=n,this.position.y=r},a.prototype.layoutPosition=function(){var t=this.layout.size,e=this.layout.options,i={};
10396e.isOriginLeft?(i.left=this.position.x+t.paddingLeft+"px",i.right=""):(i.right=this.position.x+t.paddingRight+"px",i.left=""),e.isOriginTop?(i.top=this.position.y+t.paddingTop+"px",i.bottom=""):(i.bottom=this.position.y+t.paddingBottom+"px",i.top=""),this.css(i),this.emitEvent("layout",[this])};var y=f?function(t,e){return"translate3d("+t+"px, "+e+"px, 0)"}:function(t,e){return"translate("+t+"px, "+e+"px)"};a.prototype._transitionTo=function(t,e){this.getPosition();var i=this.position.x,o=this.position.y,n=parseInt(t,10),r=parseInt(e,10),s=n===this.position.x&&r===this.position.y;if(this.setPosition(t,e),s&&!this.isTransitioning)return this.layoutPosition(),void 0;var a=t-i,u=e-o,p={},h=this.layout.options;a=h.isOriginLeft?a:-a,u=h.isOriginTop?u:-u,p.transform=y(a,u),this.transition({to:p,onTransitionEnd:{transform:this.layoutPosition},isCleaning:!0})},a.prototype.goTo=function(t,e){this.setPosition(t,e),this.layoutPosition()},a.prototype.moveTo=h?a.prototype._transitionTo:a.prototype.goTo,a.prototype.setPosition=function(t,e){this.position.x=parseInt(t,10),this.position.y=parseInt(e,10)},a.prototype._nonTransition=function(t){this.css(t.to),t.isCleaning&&this._removeStyles(t.to);for(var e in t.onTransitionEnd)t.onTransitionEnd[e].call(this)},a.prototype._transition=function(t){if(!parseFloat(this.layout.options.transitionDuration))return this._nonTransition(t),void 0;var e=this._transn;for(var i in t.onTransitionEnd)e.onEnd[i]=t.onTransitionEnd[i];for(i in t.to)e.ingProperties[i]=!0,t.isCleaning&&(e.clean[i]=!0);if(t.from){this.css(t.from);var o=this.element.offsetHeight;o=null}this.enableTransition(t.to),this.css(t.to),this.isTransitioning=!0};var m=p&&o(p)+",opacity";a.prototype.enableTransition=function(){this.isTransitioning||(this.css({transitionProperty:m,transitionDuration:this.layout.options.transitionDuration}),this.element.addEventListener(d,this,!1))},a.prototype.transition=a.prototype[u?"_transition":"_nonTransition"],a.prototype.onwebkitTransitionEnd=function(t){this.ontransitionend(t)},a.prototype.onotransitionend=function(t){this.ontransitionend(t)};var g={"-webkit-transform":"transform","-moz-transform":"transform","-o-transform":"transform"};a.prototype.ontransitionend=function(t){if(t.target===this.element){var e=this._transn,o=g[t.propertyName]||t.propertyName;if(delete e.ingProperties[o],i(e.ingProperties)&&this.disableTransition(),o in e.clean&&(this.element.style[t.propertyName]="",delete e.clean[o]),o in e.onEnd){var n=e.onEnd[o];n.call(this),delete e.onEnd[o]}this.emitEvent("transitionEnd",[this])}},a.prototype.disableTransition=function(){this.removeTransitionStyles(),this.element.removeEventListener(d,this,!1),this.isTransitioning=!1},a.prototype._removeStyles=function(t){var e={};for(var i in t)e[i]="";this.css(e)};var v={transitionProperty:"",transitionDuration:""};return a.prototype.removeTransitionStyles=function(){this.css(v)},a.prototype.removeElem=function(){this.element.parentNode.removeChild(this.element),this.emitEvent("remove",[this])},a.prototype.remove=function(){if(!u||!parseFloat(this.layout.options.transitionDuration))return this.removeElem(),void 0;var t=this;this.on("transitionEnd",function(){return t.removeElem(),!0}),this.hide()},a.prototype.reveal=function(){delete this.isHidden,this.css({display:""});var t=this.layout.options;this.transition({from:t.hiddenStyle,to:t.visibleStyle,isCleaning:!0})},a.prototype.hide=function(){this.isHidden=!0,this.css({display:""});var t=this.layout.options;this.transition({from:t.visibleStyle,to:t.hiddenStyle,isCleaning:!0,onTransitionEnd:{opacity:function(){this.isHidden&&this.css({display:"none"})}}})},a.prototype.destroy=function(){this.css({position:"",left:"",right:"",top:"",bottom:"",transition:"",transform:""})},a}var r=t.getComputedStyle,s=r?function(t){return r(t,null)}:function(t){return t.currentStyle};"function"==typeof define&&define.amd?define("outlayer/item",["eventEmitter/EventEmitter","get-size/get-size","get-style-property/get-style-property"],n):(t.Outlayer={},t.Outlayer.Item=n(t.EventEmitter,t.getSize,t.getStyleProperty))}(window),function(t){function e(t,e){for(var i in e)t[i]=e[i];return t}function i(t){return"[object Array]"===f.call(t)}function o(t){var e=[];
10396if(i(t))e=t;else if(t&&"number"==typeof t.length)for(var o=0,n=t.length;n>o;o++)e.push(t[o]);else e.push(t);return e}function n(t,e){var i=l(e,t);-1!==i&&e.splice(i,1)}function r(t){return t.replace(/(.)([A-Z])/g,function(t,e,i){return e+"-"+i}).toLowerCase()}function s(i,s,f,l,c,y){function m(t,i){if("string"==typeof t&&(t=a.querySelector(t)),!t||!d(t))return u&&u.error("Bad "+this.constructor.namespace+" element: "+t),void 0;this.element=t,this.options=e({},this.constructor.defaults),this.option(i);var o=++g;this.element.outlayerGUID=o,v[o]=this,this._create(),this.options.isInitLayout&&this.layout()}var g=0,v={};return m.namespace="outlayer",m.Item=y,m.defaults={containerStyle:{position:"relative"},isInitLayout:!0,isOriginLeft:!0,isOriginTop:!0,isResizeBound:!0,isResizingContainer:!0,transitionDuration:"0.4s",hiddenStyle:{opacity:0,transform:"scale(0.001)"},visibleStyle:{opacity:1,transform:"scale(1)"}},e(m.prototype,f.prototype),m.prototype.option=function(t){e(this.options,t)},m.prototype._create=function(){this.reloadItems(),this.stamps=[],this.stamp(this.options.stamp),e(this.element.style,this.options.containerStyle),this.options.isResizeBound&&this.bindResize()},m.prototype.reloadItems=function(){this.items=this._itemize(this.element.children)},m.prototype._itemize=function(t){for(var e=this._filterFindItemElements(t),i=this.constructor.Item,o=[],n=0,r=e.length;r>n;n++){var s=e[n],a=new i(s,this);o.push(a)}return o},m.prototype._filterFindItemElements=function(t){t=o(t);for(var e=this.options.itemSelector,i=[],n=0,r=t.length;r>n;n++){var s=t[n];if(d(s))if(e){c(s,e)&&i.push(s);for(var a=s.querySelectorAll(e),u=0,p=a.length;p>u;u++)i.push(a[u])}else i.push(s)}return i},m.prototype.getItemElements=function(){for(var t=[],e=0,i=this.items.length;i>e;e++)t.push(this.items[e].element);return t},m.prototype.layout=function(){this._resetLayout(),this._manageStamps();var t=void 0!==this.options.isLayoutInstant?this.options.isLayoutInstant:!this._isLayoutInited;this.layoutItems(this.items,t),this._isLayoutInited=!0},m.prototype._init=m.prototype.layout,m.prototype._resetLayout=function(){this.getSize()},m.prototype.getSize=function(){this.size=l(this.element)},m.prototype._getMeasurement=function(t,e){var i,o=this.options[t];o?("string"==typeof o?i=this.element.querySelector(o):d(o)&&(i=o),this[t]=i?l(i)[e]:o):this[t]=0},m.prototype.layoutItems=function(t,e){t=this._getItemsForLayout(t),this._layoutItems(t,e),this._postLayout()},m.prototype._getItemsForLayout=function(t){for(var e=[],i=0,o=t.length;o>i;i++){var n=t[i];n.isIgnored||e.push(n)}return e},m.prototype._layoutItems=function(t,e){function i(){o.emitEvent("layoutComplete",[o,t])}var o=this;if(!t||!t.length)return i(),void 0;this._itemsOn(t,"layout",i);for(var n=[],r=0,s=t.length;s>r;r++){var a=t[r],u=this._getItemLayoutPosition(a);u.item=a,u.isInstant=e||a.isLayoutInstant,n.push(u)}this._processLayoutQueue(n)},m.prototype._getItemLayoutPosition=function(){return{x:0,y:0}},m.prototype._processLayoutQueue=function(t){for(var e=0,i=t.length;i>e;e++){var o=t[e];this._positionItem(o.item,o.x,o.y,o.isInstant)}},m.prototype._positionItem=function(t,e,i,o){o?t.goTo(e,i):t.moveTo(e,i)},m.prototype._postLayout=function(){this.resizeContainer()},m.prototype.resizeContainer=function(){if(this.options.isResizingContainer){var t=this._getContainerSize();t&&(this._setContainerMeasure(t.width,!0),this._setContainerMeasure(t.height,!1))}},m.prototype._getContainerSize=h,m.prototype._setContainerMeasure=function(t,e){if(void 0!==t){var i=this.size;i.isBorderBox&&(t+=e?i.paddingLeft+i.paddingRight+i.borderLeftWidth+i.borderRightWidth:i.paddingBottom+i.paddingTop+i.borderTopWidth+i.borderBottomWidth),t=Math.max(t,0),this.element.style[e?"width":"height"]=t+"px"}},m.prototype._itemsOn=function(t,e,i){function o(){return n++,n===r&&i.call(s),!0}for(var n=0,r=t.length,s=this,a=0,u=t.length;u>a;a++){var p=t[a];p.on(e,o)}},m.prototype.ignore=function(t){var e=this.getItem(t);e&&(e.isIgnored=!0)},m.prototype.unignore=function(t){var e=this.getItem(t);e&&delete e.isIgnored},m.prototype.stamp=function(t){if(t=this._find(t)){this.stamps=this.stamps.
10396concat(t);for(var e=0,i=t.length;i>e;e++){var o=t[e];this.ignore(o)}}},m.prototype.unstamp=function(t){if(t=this._find(t))for(var e=0,i=t.length;i>e;e++){var o=t[e];n(o,this.stamps),this.unignore(o)}},m.prototype._find=function(t){return t?("string"==typeof t&&(t=this.element.querySelectorAll(t)),t=o(t)):void 0},m.prototype._manageStamps=function(){if(this.stamps&&this.stamps.length){this._getBoundingRect();for(var t=0,e=this.stamps.length;e>t;t++){var i=this.stamps[t];this._manageStamp(i)}}},m.prototype._getBoundingRect=function(){var t=this.element.getBoundingClientRect(),e=this.size;this._boundingRect={left:t.left+e.paddingLeft+e.borderLeftWidth,top:t.top+e.paddingTop+e.borderTopWidth,right:t.right-(e.paddingRight+e.borderRightWidth),bottom:t.bottom-(e.paddingBottom+e.borderBottomWidth)}},m.prototype._manageStamp=h,m.prototype._getElementOffset=function(t){var e=t.getBoundingClientRect(),i=this._boundingRect,o=l(t),n={left:e.left-i.left-o.marginLeft,top:e.top-i.top-o.marginTop,right:i.right-e.right-o.marginRight,bottom:i.bottom-e.bottom-o.marginBottom};return n},m.prototype.handleEvent=function(t){var e="on"+t.type;this[e]&&this[e](t)},m.prototype.bindResize=function(){this.isResizeBound||(i.bind(t,"resize",this),this.isResizeBound=!0)},m.prototype.unbindResize=function(){this.isResizeBound&&i.unbind(t,"resize",this),this.isResizeBound=!1},m.prototype.onresize=function(){function t(){e.resize(),delete e.resizeTimeout}this.resizeTimeout&&clearTimeout(this.resizeTimeout);var e=this;this.resizeTimeout=setTimeout(t,100)},m.prototype.resize=function(){this.isResizeBound&&this.needsResizeLayout()&&this.layout()},m.prototype.needsResizeLayout=function(){var t=l(this.element),e=this.size&&t;return e&&t.innerWidth!==this.size.innerWidth},m.prototype.addItems=function(t){var e=this._itemize(t);return e.length&&(this.items=this.items.concat(e)),e},m.prototype.appended=function(t){var e=this.addItems(t);e.length&&(this.layoutItems(e,!0),this.reveal(e))},m.prototype.prepended=function(t){var e=this._itemize(t);if(e.length){var i=this.items.slice(0);this.items=e.concat(i),this._resetLayout(),this._manageStamps(),this.layoutItems(e,!0),this.reveal(e),this.layoutItems(i)}},m.prototype.reveal=function(t){var e=t&&t.length;if(e)for(var i=0;e>i;i++){var o=t[i];o.reveal()}},m.prototype.hide=function(t){var e=t&&t.length;if(e)for(var i=0;e>i;i++){var o=t[i];o.hide()}},m.prototype.getItem=function(t){for(var e=0,i=this.items.length;i>e;e++){var o=this.items[e];if(o.element===t)return o}},m.prototype.getItems=function(t){if(t&&t.length){for(var e=[],i=0,o=t.length;o>i;i++){var n=t[i],r=this.getItem(n);r&&e.push(r)}return e}},m.prototype.remove=function(t){t=o(t);var e=this.getItems(t);if(e&&e.length){this._itemsOn(e,"remove",function(){this.emitEvent("removeComplete",[this,e])});for(var i=0,r=e.length;r>i;i++){var s=e[i];s.remove(),n(s,this.items)}}},m.prototype.destroy=function(){var t=this.element.style;t.height="",t.position="",t.width="";for(var e=0,i=this.items.length;i>e;e++){var o=this.items[e];o.destroy()}this.unbindResize(),delete this.element.outlayerGUID,p&&p.removeData(this.element,this.constructor.namespace)},m.data=function(t){var e=t&&t.outlayerGUID;return e&&v[e]},m.create=function(t,i){function o(){m.apply(this,arguments)}return Object.create?o.prototype=Object.create(m.prototype):e(o.prototype,m.prototype),o.prototype.constructor=o,o.defaults=e({},m.defaults),e(o.defaults,i),o.prototype.settings={},o.namespace=t,o.data=m.data,o.Item=function(){y.apply(this,arguments)},o.Item.prototype=new y,s(function(){for(var e=r(t),i=a.querySelectorAll(".js-"+e),n="data-"+e+"-options",s=0,h=i.length;h>s;s++){var f,d=i[s],l=d.getAttribute(n);try{f=l&&JSON.parse(l)}catch(c){u&&u.error("Error parsing "+n+" on "+d.nodeName.toLowerCase()+(d.id?"#"+d.id:"")+": "+c);continue}var y=new o(d,f);p&&p.data(d,t,y)}}),p&&p.bridget&&p.bridget(t,o),o},m.Item=y,m}var a=t.document,u=t.console,p=t.jQuery,h=function(){},f=Object.prototype.toString,d="object"==typeof HTMLElement?function(t){return t instanceof HTMLElement}:function(t){return t&&"object"==typeof t&&1===t.nodeType&&"string"==typeof t.nodeName},l=Array.prototype.indexOf?function(t,e){return t.indexOf(e)}:function(t,e){for(var i=0,o=t.length;o>i;i++)if(t[i]===e)return i;return-1};"function"==typeof define&&define.amd?define("outlayer/outlayer",["eventie/eventie","doc-ready/doc-ready","eventEmitter/EventEmitter","get-size/get-size","matches-selector/matches-selector","./item"],s):t.Outlayer=s(t.eventie,t.docReady,t.EventEmitter,t.getSize,t.matchesSelector,t.Outlayer.Item)}(window),function(t){function e(t){function e(){t.Item.apply(this,arguments)}e.prototype=new t.Item,e.prototype._create=function(){this.id=this.layout.itemGUID++,t.Item.prototype._create.call(this),this.sortData={}},e.prototype.updateSortData=function(){if(!this.isIgnored){this.sortData.id=this.id,this.sortData["original-order"]=this.id,this.sortData.random=Math.random();var t=this.layout.options.getSortData,e=this.layout._sorters;for(var i in t){var o=e[i];this.sortData[i]=o(this.element,this)}}};var i=e.prototype.destroy;return e.prototype.destroy=function(){i.apply(this,arguments),this.css({display:""})},e}"function"==typeof define&&define.amd?define("isotope/js/item",["outlayer/outlayer"],e):(t.Isotope=t.Isotope||{},t.Isotope.Item=e(t.Outlayer))}(window),function(t){function e(t,e){function i(t){this.isotope=t,t&&(this.options=t.options[this.namespace],this.element=t.element,this.items=t.filteredItems,this.size=t.size)}return function(){function t(t){return function(){return e.prototype[t].apply(this.isotope,arguments)}}for(var o=["_resetLayout","_getItemLayoutPosition","_manageStamp","_getContainerSize","_getElementOffset","needsResizeLayout"],n=0,r=o.length;r>n;n++){var s=o[n];i.prototype[s]=t(s)}}(),i.prototype.needsVerticalResizeLayout=function(){var e=t(this.isotope.element),i=this.isotope.size&&e;
10396return i&&e.innerHeight!==this.isotope.size.innerHeight},i.prototype._getMeasurement=function(){this.isotope._getMeasurement.apply(this,arguments)},i.prototype.getColumnWidth=function(){this.getSegmentSize("column","Width")},i.prototype.getRowHeight=function(){this.getSegmentSize("row","Height")},i.prototype.getSegmentSize=function(t,e){var i=t+e,o="outer"+e;if(this._getMeasurement(i,o),!this[i]){var n=this.getFirstItemSize();this[i]=n&&n[o]||this.isotope.size["inner"+e]}},i.prototype.getFirstItemSize=function(){var e=this.isotope.filteredItems[0];return e&&e.element&&t(e.element)},i.prototype.layout=function(){this.isotope.layout.apply(this.isotope,arguments)},i.prototype.getSize=function(){this.isotope.getSize(),this.size=this.isotope.size},i.modes={},i.create=function(t,e){function o(){i.apply(this,arguments)}return o.prototype=new i,e&&(o.options=e),o.prototype.namespace=t,i.modes[t]=o,o},i}"function"==typeof define&&define.amd?define("isotope/js/layout-mode",["get-size/get-size","outlayer/outlayer"],e):(t.Isotope=t.Isotope||{},t.Isotope.LayoutMode=e(t.getSize,t.Outlayer))}(window),function(t){function e(t,e){var o=t.create("masonry");return o.prototype._resetLayout=function(){this.getSize(),this._getMeasurement("columnWidth","outerWidth"),this._getMeasurement("gutter","outerWidth"),this.measureColumns();var t=this.cols;for(this.colYs=[];t--;)this.colYs.push(0);this.maxY=0},o.prototype.measureColumns=function(){if(this.getContainerWidth(),!this.columnWidth){var t=this.items[0],i=t&&t.element;this.columnWidth=i&&e(i).outerWidth||this.containerWidth}this.columnWidth+=this.gutter,this.cols=Math.floor((this.containerWidth+this.gutter)/this.columnWidth),this.cols=Math.max(this.cols,1)},o.prototype.getContainerWidth=function(){var t=this.options.isFitWidth?this.element.parentNode:this.element,i=e(t);this.containerWidth=i&&i.innerWidth},o.prototype._getItemLayoutPosition=function(t){t.getSize();var e=t.size.outerWidth%this.columnWidth,o=e&&1>e?"round":"ceil",n=Math[o](t.size.outerWidth/this.columnWidth);n=Math.min(n,this.cols);for(var r=this._getColGroup(n),s=Math.min.apply(Math,r),a=i(r,s),u={x:this.columnWidth*a,y:s},p=s+t.size.outerHeight,h=this.cols+1-r.length,f=0;h>f;f++)this.colYs[a+f]=p;return u},o.prototype._getColGroup=function(t){if(2>t)return this.colYs;for(var e=[],i=this.cols+1-t,o=0;i>o;o++){var n=this.colYs.slice(o,o+t);e[o]=Math.max.apply(Math,n)}return e},o.prototype._manageStamp=function(t){var i=e(t),o=this._getElementOffset(t),n=this.options.isOriginLeft?o.left:o.right,r=n+i.outerWidth,s=Math.floor(n/this.columnWidth);s=Math.max(0,s);var a=Math.floor(r/this.columnWidth);a-=r%this.columnWidth?0:1,a=Math.min(this.cols-1,a);for(var u=(this.options.isOriginTop?o.top:o.bottom)+i.outerHeight,p=s;a>=p;p++)this.colYs[p]=Math.max(u,this.colYs[p])},o.prototype._getContainerSize=function(){this.maxY=Math.max.apply(Math,this.colYs);var t={height:this.maxY};return this.options.isFitWidth&&(t.width=this._getContainerFitWidth()),t},o.prototype._getContainerFitWidth=function(){for(var t=0,e=this.cols;--e&&0===this.colYs[e];)t++;return(this.cols-t)*this.columnWidth-this.gutter},o.prototype.needsResizeLayout=function(){var t=this.containerWidth;return this.getContainerWidth(),t!==this.containerWidth},o}var i=Array.prototype.indexOf?function(t,e){return t.indexOf(e)}:function(t,e){for(var i=0,o=t.length;o>i;i++){var n=t[i];if(n===e)return i}return-1};"function"==typeof define&&define.amd?define("masonry/masonry",["outlayer/outlayer","get-size/get-size"],e):t.Masonry=e(t.Outlayer,t.getSize)}(window),function(t){function e(t,e){for(var i in e)t[i]=e[i];return t}function i(t,i){var o=t.create("masonry"),n=o.prototype._getElementOffset,r=o.prototype.layout,s=o.prototype._getMeasurement;e(o.prototype,i.prototype),o.prototype._getElementOffset=n,o.prototype.layout=r,o.prototype._getMeasurement=s;var a=o.prototype.measureColumns;o.prototype.measureColumns=function(){this.items=this.isotope.filteredItems,a.call(this)};var u=o.prototype._manageStamp;return o.prototype._manageStamp=function(){this.options.isOriginLeft=this.isotope.options.isOriginLeft,this.options.isOriginTop=this.isotope.options.isOriginTop,u.apply(this,arguments)},o}"function"==typeof define&&define.amd?define("isotope/js/layout-modes/masonry",["../layout-mode","masonry/masonry"],i):i(t.Isotope.LayoutMode,t.Masonry)}(window),function(t){function e(t){var e=t.create("fitRows");return e.prototype._resetLayout=function(){this.x=0,this.y=0,this.maxY=0},e.prototype._getItemLayoutPosition=function(t){t.getSize(),0!==this.x&&t.size.outerWidth+this.x>this.isotope.size.innerWidth&&(this.x=0,this.y=this.maxY);var e={x:this.x,y:this.y};return this.maxY=Math.max(this.maxY,this.y+t.size.outerHeight),this.x+=t.size.outerWidth,e},e.prototype._getContainerSize=function(){return{height:this.maxY}},e}"function"==typeof define&&define.amd?define("isotope/js/layout-modes/fit-rows",["../layout-mode"],e):e(t.Isotope.LayoutMode)}(window),function(t){function e(t){var e=t.create("vertical",{horizontalAlignment:0});return e.prototype._resetLayout=function(){this.y=0},e.prototype._getItemLayoutPosition=function(t){t.getSize();var e=(this.isotope.size.innerWidth-t.size.outerWidth)*this.options.horizontalAlignment,i=this.y;return this.y+=t.size.outerHeight,{x:e,y:i}},e.prototype._getContainerSize=function(){return{height:this.y}},e}"function"==typeof define&&define.amd?define("isotope/js/layout-modes/vertical",["../layout-mode"],e):e(t.Isotope.LayoutMode)}(window),function(t){function e(t,e){for(var i in e)t[i]=e[i];return t}function i(t){return"[object Array]"===h.call(t)}function o(t){var e=[];
10396if(i(t))e=t;else if(t&&"number"==typeof t.length)for(var o=0,n=t.length;n>o;o++)e.push(t[o]);else e.push(t);return e}function n(t,e){var i=f(e,t);-1!==i&&e.splice(i,1)}function r(t,i,r,u,h){function f(t,e){return function(i,o){for(var n=0,r=t.length;r>n;n++){var s=t[n],a=i.sortData[s],u=o.sortData[s];if(a>u||u>a){var p=void 0!==e[s]?e[s]:e,h=p?1:-1;return(a>u?1:-1)*h}}return 0}}var d=t.create("isotope",{layoutMode:"masonry",isJQueryFiltering:!0,sortAscending:!0});d.Item=u,d.LayoutMode=h,d.prototype._create=function(){this.itemGUID=0,this._sorters={},this._getSorters(),t.prototype._create.call(this),this.modes={},this.filteredItems=this.items,this.sortHistory=["original-order"];for(var e in h.modes)this._initLayoutMode(e)},d.prototype.reloadItems=function(){this.itemGUID=0,t.prototype.reloadItems.call(this)},d.prototype._itemize=function(){for(var e=t.prototype._itemize.apply(this,arguments),i=0,o=e.length;o>i;i++){var n=e[i];n.id=this.itemGUID++}return this._updateItemsSortData(e),e},d.prototype._initLayoutMode=function(t){var i=h.modes[t],o=this.options[t]||{};this.options[t]=i.options?e(i.options,o):o,this.modes[t]=new i(this)},d.prototype.layout=function(){return!this._isLayoutInited&&this.options.isInitLayout?(this.arrange(),void 0):(this._layout(),void 0)},d.prototype._layout=function(){var t=this._getIsInstant();this._resetLayout(),this._manageStamps(),this.layoutItems(this.filteredItems,t),this._isLayoutInited=!0},d.prototype.arrange=function(t){this.option(t),this._getIsInstant(),this.filteredItems=this._filter(this.items),this._sort(),this._layout()},d.prototype._init=d.prototype.arrange,d.prototype._getIsInstant=function(){var t=void 0!==this.options.isLayoutInstant?this.options.isLayoutInstant:!this._isLayoutInited;return this._isInstant=t,t},d.prototype._filter=function(t){function e(){f.reveal(n),f.hide(r)}var i=this.options.filter;i=i||"*";for(var o=[],n=[],r=[],s=this._getFilterTest(i),a=0,u=t.length;u>a;a++){var p=t[a];if(!p.isIgnored){var h=s(p);h&&o.push(p),h&&p.isHidden?n.push(p):h||p.isHidden||r.push(p)}}var f=this;return this._isInstant?this._noTransition(e):e(),o},d.prototype._getFilterTest=function(t){return s&&this.options.isJQueryFiltering?function(e){return s(e.element).is(t)}:"function"==typeof t?function(e){return t(e.element)}:function(e){return r(e.element,t)}},d.prototype.updateSortData=function(t){this._getSorters(),t=o(t);
10397var e=this.getItems(t);e=e.length?e:this.items,this._updateItemsSortData(e)},d.prototype._getSorters=function(){var t=this.options.getSortData;for(var e in t){var i=t[e];this._sorters[e]=l(i)}},d.prototype._updateItemsSortData=function(t){for(var e=0,i=t.length;i>e;e++){var o=t[e];o.updateSortData()}};var l=function(){function t(t){if("string"!=typeof t)return t;var i=a(t).split(" "),o=i[0],n=o.match(/^\[(.+)\]$/),r=n&&n[1],s=e(r,o),u=d.sortDataParsers[i[1]];return t=u?function(t){return t&&u(s(t))}:function(t){return t&&s(t)}}function e(t,e){var i;return i=t?function(e){return e.getAttribute(t)}:function(t){var i=t.querySelector(e);return i&&p(i)}}return t}();d.sortDataParsers={parseInt:function(t){return parseInt(t,10)},parseFloat:function(t){return parseFloat(t)}},d.prototype._sort=function(){var t=this.options.sortBy;if(t){var e=[].concat.apply(t,this.sortHistory),i=f(e,this.options.sortAscending);this.filteredItems.sort(i),t!==this.sortHistory[0]&&this.sortHistory.unshift(t)}},d.prototype._mode=function(){var t=this.options.layoutMode,e=this.modes[t];if(!e)throw Error("No layout mode: "+t);return e.options=this.options[t],e},d.prototype._resetLayout=function(){t.prototype._resetLayout.call(this),this._mode()._resetLayout()},d.prototype._getItemLayoutPosition=function(t){return this._mode()._getItemLayoutPosition(t)},d.prototype._manageStamp=function(t){this._mode()._manageStamp(t)},d.prototype._getContainerSize=function(){return this._mode()._getContainerSize()},d.prototype.needsResizeLayout=function(){return this._mode().needsResizeLayout()},d.prototype.appended=function(t){var e=this.addItems(t);if(e.length){var i=this._filterRevealAdded(e);this.filteredItems=this.filteredItems.concat(i)}},d.prototype.prepended=function(t){var e=this._itemize(t);if(e.length){var i=this.items.slice(0);this.items=e.concat(i),this._resetLayout(),this._manageStamps();var o=this._filterRevealAdded(e);this.layoutItems(i),this.filteredItems=o.concat(this.filteredItems)}},d.prototype._filterRevealAdded=function(t){var e=this._noTransition(function(){return this._filter(t)});return this.layoutItems(e,!0),this.reveal(e),t},d.prototype.insert=function(t){var e=this.addItems(t);if(e.length){var i,o,n=e.length;for(i=0;n>i;i++)o=e[i],this.element.appendChild(o.element);var r=this._filter(e);for(this._noTransition(function(){this.hide(r)}),i=0;n>i;i++)e[i].isLayoutInstant=!0;for(this.arrange(),i=0;n>i;i++)delete e[i].isLayoutInstant;this.reveal(r)}};var c=d.prototype.remove;return d.prototype.remove=function(t){t=o(t);var e=this.getItems(t);if(c.call(this,t),e&&e.length)for(var i=0,r=e.length;r>i;i++){var s=e[i];n(s,this.filteredItems)}},d.prototype.shuffle=function(){for(var t=0,e=this.items.length;e>t;t++){var i=this.items[t];i.sortData.random=Math.random()}this.options.sortBy="random",this._sort(),this._layout()},d.prototype._noTransition=function(t){var e=this.options.transitionDuration;this.options.transitionDuration=0;var i=t.call(this);return this.options.transitionDuration=e,i},d.prototype.getFilteredItemElements=function(){for(var t=[],e=0,i=this.filteredItems.length;i>e;e++)t.push(this.filteredItems[e].element);return t},d}var s=t.jQuery,a=String.prototype.trim?function(t){return t.trim()}:function(t){return t.replace(/^\s+|\s+$/g,"")},u=document.documentElement,p=u.textContent?function(t){return t.textContent}:function(t){return t.innerText},h=Object.prototype.toString,f=Array.prototype.indexOf?function(t,e){return t.indexOf(e)}:function(t,e){for(var i=0,o=t.length;o>i;i++)if(t[i]===e)return i;return-1};"function"==typeof define&&define.amd?define(["outlayer/outlayer","get-size/get-size","matches-selector/matches-selector","isotope/js/item","isotope/js/layout-mode","isotope/js/layout-modes/masonry","isotope/js/layout-modes/fit-rows","isotope/js/layout-modes/vertical"],r):t.Isotope=r(t.Outlayer,t.getSize,t.matchesSelector,t.Isotope.Item,t.Isotope.LayoutMode)}(window);
10398/*!
10399 * jQuery.scrollTo
10400 * Copyright (c) 2007-2015 Ariel Flesler - aflesler<a>gmail<d>com | http://flesler.blogspot.com
10401 * Licensed under MIT
10402 * http://flesler.blogspot.com/2007/10/jqueryscrollto.html
10403 * @projectDescription Lightweight, cross-browser and highly customizable animated scrolling with jQuery
10404 * @author Ariel Flesler
10405 * @version 2.1.0
10406 */
10407;(function(define) {
10408    'use strict';
10409
10410    define(['jquery'], function($) {
10411        var $scrollTo = $.scrollTo = function(target, duration, settings) {
10412            return $(window).scrollTo(target, duration, settings);
10413        };
10414
10415        $scrollTo.defaults = {
10416            axis:'xy',
10417            duration: 0,
10418            limit:true
10419        };
10420
10421        function isWin(elem) {
10422            return !elem.nodeName ||
10423                $.inArray(elem.nodeName.toLowerCase(), ['iframe','#document','html','body']) !== -1;
10424        }
10425
10426        $.fn.scrollTo = function(target, duration, settings) {
10427            if (typeof duration === 'object') {
10428                settings = duration;
10429                duration = 0;
10430            }
10431            if (typeof settings === 'function') {
10432                settings = { onAfter:settings };
10433            }
10434            if (target === 'max') {
10435                target = 9e9;
10436            }
10437
10438            settings = $.extend({}, $scrollTo.defaults, settings);
10439            // Speed is still recognized for backwards compatibility
10440            duration = duration || settings.duration;
10441            // Make sure the settings are given right
10442            var queue = settings.queue && settings.axis.length > 1;
10443            if (queue) {
10444                // Let's keep the overall duration
10445                duration /= 2;
10446            }
10447            settings.offset = both(settings.offset);
10448            settings.over = both(settings.over);
10449
10450            return this.each(function() {
10451                // Null target yields nothing, just like jQuery does
10452                if (target === null) return;
10453
10454                var win = isWin(this),
10455                    elem = win ? this.contentWindow || window : this,
10456                    $elem = $(elem),
10457                    targ = target,
10458                    attr = {},
10459                    toff;
10460
10461                switch (typeof targ) {
10462                    // A number will pass the regex
10463                    case 'number':
10464                    case 'string':
10465                        if (/^([+-]=?)?\d+(\.\d+)?(px|%)?$/.test(targ)) {
10466                            targ = both(targ);
10467                            // We are done
10468                            break;
10469                        }
10470                        // Relative/Absolute selector
10471                        targ = win ? $(targ) : $(targ, elem);
10472                        if (!targ.length) return;
10473                    /* falls through */
10474                    case 'object':
10475                        // DOMElement / jQuery
10476                        if (targ.is || targ.style) {
10477                            // Get the real position of the target
10478                            toff = (targ = $(targ)).offset();
10479                        }
10480                }
10481
10482                var offset = $.isFunction(settings.offset) && settings.offset(elem, targ) || settings.offset;
10483
10484                $.each(settings.axis.split(''), function(i, axis) {
10485                    var Pos	= axis === 'x' ? 'Left' : 'Top',
10486                        pos = Pos.toLowerCase(),
10487                        key = 'scroll' + Pos,
10488                        prev = $elem[key](),
10489                        max = $scrollTo.max(elem, axis);
10490
10491                    if (toff) {// jQuery / DOMElement
10492                        attr[key] = toff[pos] + (win ? 0 : prev - $elem.offset()[pos]);
10493
10494                        // If it's a dom element, reduce the margin
10495                        if (settings.margin) {
10496                            attr[key] -= parseInt(targ.css('margin'+Pos), 10) || 0;
10497                            attr[key] -= parseInt(targ.css('border'+Pos+'Width'), 10) || 0;
10498                        }
10499
10500                        attr[key] += offset[pos] || 0;
10501
10502                        if (settings.over[pos]) {
10503                            // Scroll to a fraction of its width/height
10504                            attr[key] += targ[axis === 'x'?'width':'height']() * 
10504settings.over[pos];
10505                        }
10506                    } else {
10507                        var val = targ[pos];
10508                        // Handle percentage values
10509                        attr[key] = val.slice && val.slice(-1) === '%' ?
10510                        parseFloat(val) / 100 * max
10511                            : val;
10512                    }
10513
10514                    // Number or 'number'
10515                    if (settings.limit && /^\d+$/.test(attr[key])) {
10516                        // Check the limits
10517                        attr[key] = attr[key] <= 0 ? 0 : Math.min(attr[key], max);
10518                    }
10519
10520                    // Don't waste time animating, if there's no need.
10521                    if (!i && settings.axis.length > 1) {
10522                        if (prev === attr[key]) {
10523                            // No animation needed
10524                            attr = {};
10525                        } else if (queue) {
10526                            // Intermediate animation
10527                            animate(settings.onAfterFirst);
10528                            // Don't animate this axis again in the next iteration.
10529                            attr = {};
10530                        }
10531                    }
10532                });
10533
10534                animate(settings.onAfter);
10535
10536                function animate(callback) {
10537                    var opts = $.extend({}, settings, {
10538                        // The queue setting conflicts with animate()
10539                        // Force it to always be true
10540                        queue: true,
10541                        duration: duration,
10542                        complete: callback && function() {
10543                            callback.call(elem, targ, settings);
10544                        }
10545                    });
10546                    $elem.animate(attr, opts);
10547                }
10548            });
10549        };
10550
10551        // Max scrolling position, works on quirks mode
10552        // It only fails (not too badly) on IE, quirks mode.
10553        $scrollTo.max = function(elem, axis) {
10554            var Dim = axis === 'x' ? 'Width' : 'Height',
10555                scroll = 'scroll'+Dim;
10556
10557            if (!isWin(elem))
10558                return elem[scroll] - $(elem)[Dim.toLowerCase()]();
10559
10560            var size = 'client' + Dim,
10561                doc = elem.ownerDocument || elem.document,
10562                html = doc.documentElement,
10563                body = doc.body;
10564
10565            return Math.max(html[scroll], body[scroll]) - Math.min(html[size], body[size]);
10566        };
10567
10568        function both(val) {
10569            return $.isFunction(val) || $.isPlainObject(val) ? val : { top:val, left:val };
10570        }
10571
10572        // Add special hooks so that window scroll properties can be animated
10573        $.Tween.propHooks.scrollLeft =
10574            $.Tween.propHooks.scrollTop = {
10575                get: function(t) {
10576                    return $(t.elem)[t.prop]();
10577                },
10578                set: function(t) {
10579                    var curr = this.get(t);
10580                    // If interrupt is true and user scrolled, stop animating
10581                    if (t.options.interrupt && t._last && t._last !== curr) {
10582                        return $(t.elem).stop();
10583                    }
10584                    var next = Math.round(t.now);
10585                    // Don't waste CPU
10586                    // Browsers don't render floating point scroll
10587                    if (curr !== next) {
10588                        $(t.elem)[t.prop](next);
10589                        t._last = this.get(t);
10590                    }
10591                }
10592            };
10593
10594        // AMD requirement
10595        return $scrollTo;
10596    });
10597}(typeof define === 'function' && define.amd ? define : function(deps, factory) {
10598    'use strict';
10599    if (typeof module !== 'undefined' && module.exports) {
10600        // Node
10601        module.exports = factory(require('jquery'));
10602    } else {
10603        factory(jQuery);
10604    }
10605}));
10606
10607// jQuery SWFObject v1.1.1 MIT/GPL @jon_neal
10608// http://jquery.thewikies.com/swfobject
10609(function(f,h,i){function k(a,c){var b=(a[0]||0)-(c[0]||0);return b>0||!b&&a.length>0&&k(a.slice(1),c.slice(1))}function l(a){if(typeof a!=g)return a;var c=[],b="";for(var d in a){b=typeof a[d]==g?l(a[d]):[d,m?encodeURI(a[d]):a[d]].join("=");c.push(b)}return c.join("&")}function n(a){var c=[];for(var b in a)a[b]&&c.push([b,'="',a[b],'"'].join(""));return c.join(" ")}function o(a){var c=[];for(var b in a)c.push(['<param name="',b,'" value="',l(a[b]),'" />'].join(""));return c.join("")}var g="object",m=true;try{var j=i.description||function(){return(new i("ShockwaveFlash.ShockwaveFlash")).GetVariable("$version")}()}catch(p){j="Unavailable"}var e=j.match(/\d+/g)||[0];f[h]={available:e[0]>0,activeX:i&&!i.name,version:{original:j,array:e,string:e.join("."),major:parseInt(e[0],10)||0,minor:parseInt(e[1],10)||0,release:parseInt(e[2],10)||0},hasVersion:function(a){a=/string|number/.test(typeof a)?a.toString().split("."):/object/.test(typeof a)?[a.major,a.minor]:a||[0,0];return k(e,a)},encodeParams:true,expressInstall:"expressInstall.swf",expressInstallIsActive:false,create:function(a){if
10609(!a.swf||this.expressInstallIsActive||!this.available&&!a.hasVersionFail)return false;if(!this.hasVersion(a.hasVersion||1)){this.expressInstallIsActive=true;if(typeof a.hasVersionFail=="function")if(!a.hasVersionFail.apply(a))return false;a={swf:a.expressInstall||this.expressInstall,height:137,width:214,flashvars:{MMredirectURL:location.href,MMplayerType:this.activeX?"ActiveX":"PlugIn",MMdoctitle:document.title.slice(0,47)+" - Flash Player Installation"}}}attrs={data:a.swf,type:"application/x-shockwave-flash",id:a.id||"flash_"+Math.floor(Math.random()*999999999),width:a.width||320,height:a.height||180,style:a.style||""};m=typeof a.useEncode!=="undefined"?a.useEncode:this.encodeParams;a.movie=a.swf;a.wmode=a.wmode||"opaque";delete a.fallback;delete a.hasVersion;delete a.hasVersionFail;delete a.height;delete a.id;delete a.swf;delete a.useEncode;delete a.width;var c=document.createElement("div");c.innerHTML=["<object ",n(attrs),">",o(a),"</object>"].join("");return c.firstChild}};f.fn[h]=function(a){var c=this.find(g).andSelf().filter(g);/string|object/.test(typeof a)&&this.each(function(){var b=f(this),d;a=typeof a==g?a:{swf:a};a.fallback=this;if(d=f[h].create(a)){b.children().remove();b.html(d)}});typeof a=="function"&&c.each(function(){var b=this;b.jsInteractionTimeoutMs=b.jsInteractionTimeoutMs||0;if(b.jsInteractionTimeoutMs<660)b.clientWidth||b.clientHeight?a.call(b):setTimeout(function(){f(b)[h](a)},b.jsInteractionTimeoutMs+66)});return c}})(jQuery,"flash",navigator.plugins["Shockwave Flash"]||window.ActiveXObject);
10610
10611/*!
10612* @license CreateJS
10613* Visit http://createjs.com/ for documentation, updates and examples.
10614*
10615* Copyright (c) 2011-2015 gskinner.com, inc.
10616*
10617* Distributed under the terms of the MIT license.
10618* http://www.opensource.org/licenses/mit-license.html
10619*
10620* This notice shall be included in all copies or substantial portions of the Software.
10621*/
10622this.createjs=this.createjs||{},createjs.extend=function(a,b){"use strict";function c(){this.constructor=a}return c.prototype=b.prototype,a.prototype=new c},this.createjs=this.createjs||{},createjs.promote=function(a,b){"use strict";var c=a.prototype,d=Object.getPrototypeOf&&Object.getPrototypeOf(c)||c.__proto__;if(d){c[(b+="_")+"constructor"]=d.constructor;for(var e in d)c.hasOwnProperty(e)&&"function"==typeof d[e]&&(c[b+e]=d[e])}return a},this.createjs=this.createjs||{},createjs.indexOf=function(a,b){"use strict";for(var c=0,d=a.length;d>c;c++)if(b===a[c])return c;return-1},this.createjs=this.createjs||{},function(){"use strict";function a(a,b,c){this.type=a,this.target=null,this.currentTarget=null,this.eventPhase=0,this.bubbles=!!b,this.cancelable=!!c,this.timeStamp=(new Date).getTime(),this.defaultPrevented=!1,this.propagationStopped=!1,this.immediatePropagationStopped=!1,this.removed=!1}var b=a.prototype;b.preventDefault=function(){this.defaultPrevented=this.cancelable&&!0},b.stopPropagation=function(){this.propagationStopped=!0},b.stopImmediatePropagation=function(){this.immediatePropagationStopped=this.propagationStopped=!0},b.remove=function(){this.removed=!0},b.clone=function(){return new a(this.type,this.bubbles,this.cancelable)},b.set=function(a){for(var b in a)this[b]=a[b];return this},b.toString=function(){return"[Event (type="+this.type+")]"},createjs.Event=a}(),this.createjs=this.createjs||{},function(){"use strict";function a(){this._listeners=null,this._captureListeners=null}var b=a.prototype;a.initialize=function(a){a.addEventListener=b.addEventListener,a.on=b.on,a.removeEventListener=a.off=b.removeEventListener,a.removeAllEventListeners=b.removeAllEventListeners,a.hasEventListener=b.hasEventListener,a.dispatchEvent=b.dispatchEvent,a._dispatchEvent=b._dispatchEvent,a.willTrigger=b.willTrigger},b.addEventListener=function(a,b,c){var d;d=c?this._captureListeners=this._captureListeners||{}:this._listeners=this._listeners||{};var e=d[a];return e&&this.removeEventListener(a,b,c),e=d[a],e?e.push(b):d[a]=[b],b},b.on=function(a,b,c,d,e,f){return b.handleEvent&&(c=c||b,b=b.handleEvent),c=c||this,this.addEventListener(a,function(a){b.call(c,a,e),d&&a.remove()},f)},b.removeEventListener=function(a,b,c){var d=c?this._captureListeners:this._listeners;if(d){var e=d[a];if(e)for(var f=0,g=e.length;g>f;f++)if(e[f]==b){1==g?delete d[a]:e.splice(f,1);break}}},b.off=b.removeEventListener,b.removeAllEventListeners=function(a){a?(this._listeners&&delete this._listeners[a],this._captureListeners&&delete this._captureListeners[a]):this._listeners=this._captureListeners=null},b.dispatchEvent=function(a,b,c){if("string"==typeof a){var d=this._listeners;if(!(b||d&&d[a]))return!0;a=new createjs.Event(a,b,c)}else a.target&&a.clone&&(a=a.clone());try{a.target=this}catch(e){}if(a.bubbles&&this.parent){for(var f=this,g=[f];f.parent;)g.push(f=f.parent);var h,i=g.length;for(h=i-1;h>=0&&!a.propagationStopped;h--)g[h]._dispatchEvent(a,1+(0==h));for(h=1;i>h&&!a.propagationStopped;h++)g[h]._dispatchEvent(a,3)}else this._dispatchEvent(a,2);return!a.defaultPrevented},b.hasEventListener=function(a){var b=this._listeners,c=this._captureListeners;return!!(b&&b[a]||c&&c[a])},b.willTrigger=function(a){for(var b=this;b;){if(b.hasEventListener(a))return!0;b=b.parent}return!1},b.toString=function(){return"[EventDispatcher]"},b._dispatchEvent=function(a,b){var c,d=1==b?this._captureListeners:this._listeners;if(a&&d){var e=d[a.type];if(!e||!(c=e.length))return;try{a.currentTarget=this}catch(f){}try{a.eventPhase=b}catch(f){}a.removed=!1,e=e.slice();for(var g=0;c>
vendor: 4,646 bytes, line 10622
10622g&&!a.immediatePropagationStopped;g++){var h=e[g];h.handleEvent?h.handleEvent(a):h(a),a.removed&&(this.off(a.type,h,1==b),a.removed=!1)}}},createjs.EventDispatcher=a}(),this.createjs=this.createjs||{},function(){"use strict";function a(){throw"Ticker cannot be instantiated."}a.RAF_SYNCHED="synched",a.RAF="raf",a.TIMEOUT="timeout",a.useRAF=!1,a.timingMode=null,a.maxDelta=0,a.paused=!1,a.removeEventListener=null,a.removeAllEventListeners=null,a.dispatchEvent=null,a.hasEventListener=null,a._listeners=null,createjs.EventDispatcher.initialize(a),a._addEventListener=a.addEventListener,a.addEventListener=function(){return!a._inited&&a.init(),a._addEventListener.apply(a,arguments)},a._inited=!1,a._startTime=0,a._pausedTime=0,a._ticks=0,a._pausedTicks=0,a._interval=50,a._lastTime=0,a._times=null,a._tickTimes=null,a._timerId=null,a._raf=!0,a.setInterval=function(b){a._interval=b,a._inited&&a._setupTick()},a.getInterval=function(){return a._interval},a.setFPS=function(b){a.setInterval(1e3/b)},a.getFPS=function(){return 1e3/a._interval};try{Object.defineProperties(a,{interval:{get:a.getInterval,set:a.setInterval},framerate:{get:a.getFPS,set:a.setFPS}})}catch(b){console.log(b)}a.init=function(){a._inited||(a._inited=!0,a._times=[],a._tickTimes=[],a._startTime=a._getTime(),a._times.push(a._lastTime=0),a.interval=a._interval)},a.reset=function(){if(a._raf){var b=window.cancelAnimationFrame||window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame||window.oCancelAnimationFrame||window.msCancelAnimationFrame;b&&b(a._timerId)}else clearTimeout(a._timerId);a.removeAllEventListeners("tick"),a._timerId=a._times=a._tickTimes=null,a._startTime=a._lastTime=a._ticks=0,a._inited=!1},a.getMeasuredTickTime=function(b){var c=0,d=a._tickTimes;if(!d||d.length<1)return-1;b=Math.min(d.length,b||0|a.getFPS());for(var e=0;b>e;e++)c+=d[e];return c/b},a.getMeasuredFPS=function(b){var c=a._times;return!c||c.length<2?-1:(b=Math.min(c.length-1,b||0|a.getFPS()),1e3/((c[0]-c[b])/b))},a.setPaused=function(b){a.paused=b},a.getPaused=function(){return a.paused},a.getTime=function(b){return a._startTime?a._getTime()-(b?a._pausedTime:0):-1},a.getEventTime=function(b){return a._startTime?(a._lastTime||a._startTime)-(b?a._pausedTime:0):-1},a.getTicks=function(b){return a._ticks-(b?a._pausedTicks:0)},a._handleSynch=function(){a._timerId=null,a._setupTick(),a._getTime()-a._lastTime>=.97*(a._interval-1)&&a._tick()},a._handleRAF=function(){a._timerId=null,a._setupTick(),a._tick()},a._handleTimeout=function(){a._timerId=null,a._setupTick(),a._tick()},a._setupTick=function(){if(null==a._timerId){var b=a.timingMode||a.useRAF&&a.RAF_SYNCHED;if(b==a.RAF_SYNCHED||b==a.RAF){var c=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame;if(c)return a._timerId=c(b==a.RAF?a._handleRAF:a._handleSynch),void(a._raf=!0)}a._raf=!1,a._timerId=setTimeout(a._handleTimeout,a._interval)}},a._tick=function(){var b=a.paused,c=a._getTime(),d=c-a._lastTime;if(a._lastTime=c,a._ticks++,b&&(a._pausedTicks++,a._pausedTime+=d),a.hasEventListener("tick")){var e=new createjs.Event("tick"),f=a.maxDelta;e.delta=f&&d>f?f:d,e.paused=b,e.time=c,e.runTime=c-a._pausedTime,a.dispatchEvent(e)}for(a._tickTimes.unshift(a._getTime()-c);a._tickTimes.length>100;)a._tickTimes.pop();for(a._times.unshift(c);a._times.length>100;)a._times.pop()};var c=window.performance&&(performance.now||performance.mozNow||performance.msNow||performance.oNow||performance.webkitNow);a._getTime=function(){return(c&&c.call(performance)||(new Date).getTime())-a._startTime},createjs.Ticker=a}(),this.createjs=this.createjs||{},function(){"use strict";function a(){throw"UID cannot be instantiated"}a._nextID=0,a.get=function(){return a._nextID++},createjs.UID=a}(),this.createjs=this.createjs||{},function(){"use strict";function a(a,b,c,d,e,f,g,h,i,j,k){this.Event_constructor(a,b,c),this.stageX=d,this.stageY=e,this.rawX=null==i?d:i,this.rawY=null==j?e:j,this.nativeEvent=f,this.pointerID=g,this.primary=!!h,this.relatedTarget=k}var b=createjs.extend(a,createjs.Event);b._get_localX=function(){return this.currentTarget.globalToLocal(this.rawX,this.rawY).x},b._get_localY=function(){return this.currentTarget.globalToLocal(this.rawX,this.rawY).y},b._get_isTouch=function(){return-1!==this.pointerID};try{Object.defineProperties(b,{localX:{get:b._get_localX},localY:{get:b._get_localY},isTouch:{get:b._get_isTouch}})}catch(c){}b.clone=function(){return new a(this.type,this.bubbles,this.cancelable,this.stageX,this.stageY,this.nativeEvent,this.pointerID,this.primary,this.rawX,this.rawY)}
vendor: 4,261 bytes, line 10622
10622,b.toString=function(){return"[MouseEvent (type="+this.type+" stageX="+this.stageX+" stageY="+this.stageY+")]"},createjs.MouseEvent=createjs.promote(a,"Event")}(),this.createjs=this.createjs||{},function(){"use strict";function a(a,b,c,d,e,f){this.setValues(a,b,c,d,e,f)}var b=a.prototype;a.DEG_TO_RAD=Math.PI/180,a.identity=null,b.setValues=function(a,b,c,d,e,f){return this.a=null==a?1:a,this.b=b||0,this.c=c||0,this.d=null==d?1:d,this.tx=e||0,this.ty=f||0,this},b.append=function(a,b,c,d,e,f){var g=this.a,h=this.b,i=this.c,j=this.d;return(1!=a||0!=b||0!=c||1!=d)&&(this.a=g*a+i*b,this.b=h*a+j*b,this.c=g*c+i*d,this.d=h*c+j*d),this.tx=g*e+i*f+this.tx,this.ty=h*e+j*f+this.ty,this},b.prepend=function(a,b,c,d,e,f){var g=this.a,h=this.c,i=this.tx;return this.a=a*g+c*this.b,this.b=b*g+d*this.b,this.c=a*h+c*this.d,this.d=b*h+d*this.d,this.tx=a*i+c*this.ty+e,this.ty=b*i+d*this.ty+f,this},b.appendMatrix=function(a){return this.append(a.a,a.b,a.c,a.d,a.tx,a.ty)},b.prependMatrix=function(a){return this.prepend(a.a,a.b,a.c,a.d,a.tx,a.ty)},b.appendTransform=function(b,c,d,e,f,g,h,i,j){if(f%360)var k=f*a.DEG_TO_RAD,l=Math.cos(k),m=Math.sin(k);else l=1,m=0;return g||h?(g*=a.DEG_TO_RAD,h*=a.DEG_TO_RAD,this.append(Math.cos(h),Math.sin(h),-Math.sin(g),Math.cos(g),b,c),this.append(l*d,m*d,-m*e,l*e,0,0)):this.append(l*d,m*d,-m*e,l*e,b,c),(i||j)&&(this.tx-=i*this.a+j*this.c,this.ty-=i*this.b+j*this.d),this},b.prependTransform=function(b,c,d,e,f,g,h,i,j){if(f%360)var k=f*a.DEG_TO_RAD,l=Math.cos(k),m=Math.sin(k);else l=1,m=0;return(i||j)&&(this.tx-=i,this.ty-=j),g||h?(g*=a.DEG_TO_RAD,h*=a.DEG_TO_RAD,this.prepend(l*d,m*d,-m*e,l*e,0,0),this.prepend(Math.cos(h),Math.sin(h),-Math.sin(g),Math.cos(g),b,c)):this.prepend(l*d,m*d,-m*e,l*e,b,c),this},b.rotate=function(b){b*=a.DEG_TO_RAD;var c=Math.cos(b),d=Math.sin(b),e=this.a,f=this.b;return this.a=e*c+this.c*d,this.b=f*c+this.d*d,this.c=-e*d+this.c*c,this.d=-f*d+this.d*c,this},b.skew=function(b,c){return b*=a.DEG_TO_RAD,c*=a.DEG_TO_RAD,this.append(Math.cos(c),Math.sin(c),-Math.sin(b),Math.cos(b),0,0),this},b.scale=function(a,b){return this.a*=a,this.b*=a,this.c*=b,this.d*=b,this},b.translate=function(a,b){return this.tx+=this.a*a+this.c*b,this.ty+=this.b*a+this.d*b,this},b.identity=function(){return this.a=this.d=1,this.b=this.c=this.tx=this.ty=0,this},b.invert=function(){var a=this.a,b=this.b,c=this.c,d=this.d,e=this.tx,f=a*d-b*c;return this.a=d/f,this.b=-b/f,this.c=-c/f,this.d=a/f,this.tx=(c*this.ty-d*e)/f,this.ty=-(a*this.ty-b*e)/f,this},b.isIdentity=function(){return 0===this.tx&&0===this.ty&&1===this.a&&0===this.b&&0===this.c&&1===this.d},b.equals=function(a){return this.tx===a.tx&&this.ty===a.ty&&this.a===a.a&&this.b===a.b&&this.c===a.c&&this.d===a.d},b.transformPoint=function(a,b,c){return c=c||{},c.x=a*this.a+b*this.c+this.tx,c.y=a*this.b+b*this.d+this.ty,c},b.decompose=function(b){null==b&&(b={}),b.x=this.tx,b.y=this.ty,b.scaleX=Math.sqrt(this.a*this.a+this.b*this.b),b.scaleY=Math.sqrt(this.c*this.c+this.d*this.d);var c=Math.atan2(-this.c,this.d),d=Math.atan2(this.b,this.a),e=Math.abs(1-c/d);return 1e-5>e?(b.rotation=d/a.DEG_TO_RAD,this.a<0&&this.d>=0&&(b.rotation+=b.rotation<=0?180:-180),b.skewX=b.skewY=0):(b.skewX=c/a.DEG_TO_RAD,b.skewY=d/a.DEG_TO_RAD),b},b.copy=function(a){return this.setValues(a.a,a.b,a.c,a.d,a.tx,a.ty)},b.clone=function(){return new a(this.a,this.b,this.c,this.d,this.tx,this.ty)},b.toString=function(){return"[Matrix2D (a="+this.a+" b="+this.b+" c="+this.c+" d="+this.d+" tx="+this.tx+" ty="+this.ty+")]"},a.identity=new a,createjs.Matrix2D=a}(),this.createjs=this.createjs||{},function(){"use strict";function a(a,b,c,d,e){this.setValues(a,b,c,d,e)}var b=a.prototype;b.setValues=function(a,b,c,d,e){return this.visible=null==a?!0:!!a,this.alpha=null==b?1:b,this.shadow=c,this.compositeOperation=d,this.matrix=e||this.matrix&&this.matrix.identity()||new createjs.Matrix2D,this},b.append=function(a,b,c,d,e){return this.alpha*=b,this.shadow=c||this.shadow,this.compositeOperation=d||this.compositeOperation,this.visible=this.visible&&a,e&&this.matrix.appendMatrix(e),this},b.prepend=function(a,b,c,d,e){return this.alpha*=b,this.shadow=this.shadow||c,this.compositeOperation=this.compositeOperation||d,this.visible=this.visible&&a,e&&this.matrix.prependM
vendor: 4,607 bytes, line 10622
10622atrix(e),this},b.identity=function(){return this.visible=!0,this.alpha=1,this.shadow=this.compositeOperation=null,this.matrix.identity(),this},b.clone=function(){return new a(this.alpha,this.shadow,this.compositeOperation,this.visible,this.matrix.clone())},createjs.DisplayProps=a}(),this.createjs=this.createjs||{},function(){"use strict";function a(a,b){this.setValues(a,b)}var b=a.prototype;b.setValues=function(a,b){return this.x=a||0,this.y=b||0,this},b.copy=function(a){return this.x=a.x,this.y=a.y,this},b.clone=function(){return new a(this.x,this.y)},b.toString=function(){return"[Point (x="+this.x+" y="+this.y+")]"},createjs.Point=a}(),this.createjs=this.createjs||{},function(){"use strict";function a(a,b,c,d){this.setValues(a,b,c,d)}var b=a.prototype;b.setValues=function(a,b,c,d){return this.x=a||0,this.y=b||0,this.width=c||0,this.height=d||0,this},b.extend=function(a,b,c,d){return c=c||0,d=d||0,a+c>this.x+this.width&&(this.width=a+c-this.x),b+d>this.y+this.height&&(this.height=b+d-this.y),a<this.x&&(this.width+=this.x-a,this.x=a),b<this.y&&(this.height+=this.y-b,this.y=b),this},b.pad=function(a,b,c,d){return this.x-=b,this.y-=a,this.width+=b+d,this.height+=a+c,this},b.copy=function(a){return this.setValues(a.x,a.y,a.width,a.height)},b.contains=function(a,b,c,d){return c=c||0,d=d||0,a>=this.x&&a+c<=this.x+this.width&&b>=this.y&&b+d<=this.y+this.height},b.union=function(a){return this.clone().extend(a.x,a.y,a.width,a.height)},b.intersection=function(b){var c=b.x,d=b.y,e=c+b.width,f=d+b.height;return this.x>c&&(c=this.x),this.y>d&&(d=this.y),this.x+this.width<e&&(e=this.x+this.width),this.y+this.height<f&&(f=this.y+this.height),c>=e||d>=f?null:new a(c,d,e-c,f-d)},b.intersects=function(a){return a.x<=this.x+this.width&&this.x<=a.x+a.width&&a.y<=this.y+this.height&&this.y<=a.y+a.height},b.isEmpty=function(){return this.width<=0||this.height<=0},b.clone=function(){return new a(this.x,this.y,this.width,this.height)},b.toString=function(){return"[Rectangle (x="+this.x+" y="+this.y+" width="+this.width+" height="+this.height+")]"},createjs.Rectangle=a}(),this.createjs=this.createjs||{},function(){"use strict";function a(a,b,c,d,e,f,g){a.addEventListener&&(this.target=a,this.overLabel=null==c?"over":c,this.outLabel=null==b?"out":b,this.downLabel=null==d?"down":d,this.play=e,this._isPressed=!1,this._isOver=!1,this._enabled=!1,a.mouseChildren=!1,this.enabled=!0,this.handleEvent({}),f&&(g&&(f.actionsEnabled=!1,f.gotoAndStop&&f.gotoAndStop(g)),a.hitArea=f))}var b=a.prototype;b.setEnabled=function(a){if(a!=this._enabled){var b=this.target;this._enabled=a,a?(b.cursor="pointer",b.addEventListener("rollover",this),b.addEventListener("rollout",this),b.addEventListener("mousedown",this),b.addEventListener("pressup",this),b._reset&&(b.__reset=b._reset,b._reset=this._reset)):(b.cursor=null,b.removeEventListener("rollover",this),b.removeEventListener("rollout",this),b.removeEventListener("mousedown",this),b.removeEventListener("pressup",this),b.__reset&&(b._reset=b.__reset,delete b.__reset))}},b.getEnabled=function(){return this._enabled};try{Object.defineProperties(b,{enabled:{get:b.getEnabled,set:b.setEnabled}})}catch(c){}b.toString=function(){return"[ButtonHelper]"},b.handleEvent=function(a){var b,c=this.target,d=a.type;"mousedown"==d?(this._isPressed=!0,b=this.downLabel):"pressup"==d?(this._isPressed=!1,b=this._isOver?this.overLabel:this.outLabel):"rollover"==d?(this._isOver=!0,b=this._isPressed?this.downLabel:this.overLabel):(this._isOver=!1,b=this._isPressed?this.overLabel:this.outLabel),this.play?c.gotoAndPlay&&c.gotoAndPlay(b):c.gotoAndStop&&c.gotoAndStop(b)},b._reset=function(){var a=this.paused;this.__reset(),this.paused=a},createjs.ButtonHelper=a}(),this.createjs=this.createjs||{},function(){"use strict";function a(a,b,c,d){this.color=a||"black",this.offsetX=b||0,this.offsetY=c||0,this.blur=d||0}var b=a.prototype;a.identity=new a("transparent",0,0,0),b.toString=function(){return"[Shadow]"},b.clone=function(){return new a(this.color,this.offsetX,this.offsetY,this.blur)},createjs.Shadow=a}(),this.createjs=this.createjs||{},function(){"use strict";function a(a){this.EventDispatcher_constructor(),this.complete=!0,this.framerate=0,this._animations=null,this._frames=null,this._images=null,this._data=null,this._loadCount=0,this._frameHeight=0,this._frameWidth=0,this._numFrames=0,this._regX=0,this._regY=0,this._spacing=0,this._margin=0,this._parseData(a)}var b=createjs.extend(a,createjs.EventDispatcher);b.getAnimations=function(){return this._animations.slice()};try{Object.defineProperties(b,{animations:{get:b.getAnimations}})}catch(c){}
vendor: 2,257 bytes, line 10622
10622b.getNumFrames=function(a){if(null==a)return this._frames?this._frames.length:this._numFrames||0;var b=this._data[a];return null==b?0:b.frames.length},b.getAnimation=function(a){return this._data[a]},b.getFrame=function(a){var b;return this._frames&&(b=this._frames[a])?b:null},b.getFrameBounds=function(a,b){var c=this.getFrame(a);return c?(b||new createjs.Rectangle).setValues(-c.regX,-c.regY,c.rect.width,c.rect.height):null},b.toString=function(){return"[SpriteSheet]"},b.clone=function(){throw"SpriteSheet cannot be cloned."},b._parseData=function(a){var b,c,d,e;if(null!=a){if(this.framerate=a.framerate||0,a.images&&(c=a.images.length)>0)for(e=this._images=[],b=0;c>b;b++){var f=a.images[b];if("string"==typeof f){var g=f;f=document.createElement("img"),f.src=g}e.push(f),f.getContext||f.naturalWidth||(this._loadCount++,this.complete=!1,function(a,b){f.onload=function(){a._handleImageLoad(b)}}(this,g),function(a,b){f.onerror=function(){a._handleImageError(b)}}(this,g))}if(null==a.frames);else if(Array.isArray(a.frames))for(this._frames=[],e=a.frames,b=0,c=e.length;c>b;b++){var h=e[b];this._frames.push({image:this._images[h[4]?h[4]:0],rect:new createjs.Rectangle(h[0],h[1],h[2],h[3]),regX:h[5]||0,regY:h[6]||0})}else d=a.frames,this._frameWidth=d.width,this._frameHeight=d.height,this._regX=d.regX||0,this._regY=d.regY||0,this._spacing=d.spacing||0,this._margin=d.margin||0,this._numFrames=d.count,0==this._loadCount&&this._calculateFrames();if(this._animations=[],null!=(d=a.animations)){this._data={};var i;for(i in d){var j={name:i},k=d[i];if("number"==typeof k)e=j.frames=[k];else if(Array.isArray(k))if(1==k.length)j.frames=[k[0]];else for(j.speed=k[3],j.next=k[2],e=j.frames=[],b=k[0];b<=k[1];b++)e.push(b);else{j.speed=k.speed,j.next=k.next;var l=k.frames;e=j.frames="number"==typeof l?[l]:l.slice(0)}(j.next===!0||void 0===j.next)&&(j.next=i),(j.next===!1||e.length<2&&j.next==i)&&(j.next=null),j.speed||(j.speed=1),this._animations.push(i),this._data[i]=j}}}},b._handleImageLoad=function(a){0==--this._loadCount&&(this._calculateFrames(),this.complete=!0,this.dispatchEvent("complete"))},b._handleImageError=function(a){var b=new createjs.Event("error");b.src=a,this.dispatchEvent(b),0==--this._loadCount&&this.dispatchEvent("complete"
vendor: 9,871 bytes, line 10622
10622)},b._calculateFrames=function(){if(!this._frames&&0!=this._frameWidth){this._frames=[];var a=this._numFrames||1e5,b=0,c=this._frameWidth,d=this._frameHeight,e=this._spacing,f=this._margin;a:for(var g=0,h=this._images;g<h.length;g++)for(var i=h[g],j=i.width,k=i.height,l=f;k-f-d>=l;){for(var m=f;j-f-c>=m;){if(b>=a)break a;b++,this._frames.push({image:i,rect:new createjs.Rectangle(m,l,c,d),regX:this._regX,regY:this._regY}),m+=c+e}l+=d+e}this._numFrames=b}},createjs.SpriteSheet=createjs.promote(a,"EventDispatcher")}(),this.createjs=this.createjs||{},function(){"use strict";function a(){this.command=null,this._stroke=null,this._strokeStyle=null,this._oldStrokeStyle=null,this._strokeDash=null,this._oldStrokeDash=null,this._strokeIgnoreScale=!1,this._fill=null,this._instructions=[],this._commitIndex=0,this._activeInstructions=[],this._dirty=!1,this._storeIndex=0,this.clear()}var b=a.prototype,c=a;a.getRGB=function(a,b,c,d){return null!=a&&null==c&&(d=b,c=255&a,b=a>>8&255,a=a>>16&255),null==d?"rgb("+a+","+b+","+c+")":"rgba("+a+","+b+","+c+","+d+")"},a.getHSL=function(a,b,c,d){return null==d?"hsl("+a%360+","+b+"%,"+c+"%)":"hsla("+a%360+","+b+"%,"+c+"%,"+d+")"},a.BASE_64={A:0,B:1,C:2,D:3,E:4,F:5,G:6,H:7,I:8,J:9,K:10,L:11,M:12,N:13,O:14,P:15,Q:16,R:17,S:18,T:19,U:20,V:21,W:22,X:23,Y:24,Z:25,a:26,b:27,c:28,d:29,e:30,f:31,g:32,h:33,i:34,j:35,k:36,l:37,m:38,n:39,o:40,p:41,q:42,r:43,s:44,t:45,u:46,v:47,w:48,x:49,y:50,z:51,0:52,1:53,2:54,3:55,4:56,5:57,6:58,7:59,8:60,9:61,"+":62,"/":63},a.STROKE_CAPS_MAP=["butt","round","square"],a.STROKE_JOINTS_MAP=["miter","round","bevel"];var d=createjs.createCanvas?createjs.createCanvas():document.createElement("canvas");d.getContext&&(a._ctx=d.getContext("2d"),d.width=d.height=1),b.getInstructions=function(){return this._updateInstructions(),this._instructions};try{Object.defineProperties(b,{instructions:{get:b.getInstructions}})}catch(e){}b.isEmpty=function(){return!(this._instructions.length||this._activeInstructions.length)},b.draw=function(a,b){this._updateInstructions();for(var c=this._instructions,d=this._storeIndex,e=c.length;e>d;d++)c[d].exec(a,b)},b.drawAsPath=function(a){this._updateInstructions();for(var b,c=this._instructions,d=this._storeIndex,e=c.length;e>d;d++)(b=c[d]).path!==!1&&b.exec(a)},b.moveTo=function(a,b){return this.append(new c.MoveTo(a,b),!0)},b.lineTo=function(a,b){return this.append(new c.LineTo(a,b))},b.arcTo=function(a,b,d,e,f){return this.append(new c.ArcTo(a,b,d,e,f))},b.arc=function(a,b,d,e,f,g){return this.append(new c.Arc(a,b,d,e,f,g))},b.quadraticCurveTo=function(a,b,d,e){return this.append(new c.QuadraticCurveTo(a,b,d,e))},b.bezierCurveTo=function(a,b,d,e,f,g){return this.append(new c.BezierCurveTo(a,b,d,e,f,g))},b.rect=function(a,b,d,e){return this.append(new c.Rect(a,b,d,e))},b.closePath=function(){return this._activeInstructions.length?this.append(new c.ClosePath):this},b.clear=function(){return this._instructions.length=this._activeInstructions.length=this._commitIndex=0,this._strokeStyle=this._oldStrokeStyle=this._stroke=this._fill=this._strokeDash=this._oldStrokeDash=null,this._dirty=this._strokeIgnoreScale=!1,this},b.beginFill=function(a){return this._setFill(a?new c.Fill(a):null)},b.beginLinearGradientFill=function(a,b,d,e,f,g){return this._setFill((new c.Fill).linearGradient(a,b,d,e,f,g))},b.beginRadialGradientFill=function(a,b,d,e,f,g,h,i){return this._setFill((new c.Fill).radialGradient(a,b,d,e,f,g,h,i))},b.beginBitmapFill=function(a,b,d){return this._setFill(new c.Fill(null,d).bitmap(a,b))},b.endFill=function(){return this.beginFill()},b.setStrokeStyle=function(a,b,d,e,f){return this._updateInstructions(!0),this._strokeStyle=this.command=new c.StrokeStyle(a,b,d,e,f),this._stroke&&(this._stroke.ignoreScale=f),this._strokeIgnoreScale=f,this},b.setStrokeDash=function(a,b){return this._updateInstructions(!0),this._strokeDash=this.command=new c.StrokeDash(a,b),this},b.beginStroke=function(a){return this._setStroke(a?new c.Stroke(a):null)},b.beginLinearGradientStroke=function(a,b,d,e,f,g){return this._setStroke((new c.Stroke).linearGradient(a,b,d,e,f,g))},b.beginRadialGradientStroke=function(a,b,d,e,f,g,h,i){return this._setStroke((new c.Stroke).radialGradient(a,b,d,e,f,g,h,i))},b.beginBitmapStroke=function(a,b){return this._setStroke((new c.Stroke).bitmap(a,b))},b.endStroke=function(){return this.beginStroke()},b.curveTo=b.quadraticCurveTo,b.drawRect=b.rect,b.drawRoundRect=function(a,b,c,d,e){return this.drawRoundRectComplex(a,b,c,d,e,e,e,e)},b.drawRoundRectComplex=function(a,b,d,e,f,g,h,i){return this.append(new c.RoundRect(a,b,d,e,f,g,h,i))},b.drawCircle=function(a,b,d){return this.append(new c.Circle(a,b,d))},b.drawEllipse=function(a,b,d,e){return this.append(new c.Ellipse(a,b,d,e))},b.drawPolyStar=function(a,b,d,e,f,g){return this.append(new c.PolyStar(a,b,d,e,f,g))},b.append=function(a,b){return this._activeInstructions.push(a),this.command=a,b||(this._dirty=!0),this},b.decodePath=function(b){for(var c=[this.moveTo,this.lineTo,this.quadraticCurveTo,this.bezierCurveTo,this.closePath],d=[2,2,4,6,0],e=0,f=b.length,g=[],h=0,i=0,j=a.BASE_64;f>e;){var k=b.charAt(e),l=j[k],m=l>>3,n=c[m];if(!n||3&l)throw"bad path data (@"+e+"): "+k;var o=d[m];m||(h=i=0),g.length=0,e++;for(var p=(l>>2&1)+2,q=0;o>q;q++){var r=j[b.charAt(e)],s=r>>5?-1:1;r=(31&r)<<6|j[b.charAt(e+1)],3==p&&(r=r<<6|j[b.charAt(e+2)]),r=s*r/10,q%2?h=r+=h:i=r+=i,g[q]=r,e+=p}n.apply(this,g)}return this},b.store=function(){return this._updateInstructions(!0),this._storeIndex=this._instructions.length,this},b.unstore=function(){return this._storeIndex=0,this},b.clone=function(){var b=new a;return b.command=this.command,b._stroke=this._stroke,b._strokeStyle=this._strokeStyle,b._strokeDash=this._strokeDash,b._strokeIgnoreScale=this._strokeIgnoreScale,b._fill=this._fill,b._instructions=this._instructions.slice(),b._commitIndex=this._commitIndex,b._activeInstructions=this._activeInstructions.slice(),b._dirty=this._dirty,b._storeIndex=this._storeIndex,b},b.toString=function(){return"[Graphics]"},b.mt=b.moveTo,b.lt=b.lineTo,b.at=b.arcTo,b.bt=b.bezierCurveTo,b.qt=b.quadraticCurveTo,b.a=b.arc,b.r=b.rect,b.cp=b.closePath,b.c=b.clear,b.f=b.beginFill,b.lf=b.beginLinearGradientFill,b.rf=b.beginRadialGradientFill,b.bf=b.beginBitmapFill,b.ef=b.endFill,b.ss=b.setStrokeStyle,b.sd=b.setStrokeDash,b.s=b.beginStroke,b.ls=b.beginLinearGradientStroke,b.rs=b.beginRadialGradientStroke,b.bs=b.beginBitmapStroke,b.es=b.endStroke,b.dr=b.drawRect,b.rr=b.drawRoundRect,b.rc=b.drawRoundRectComplex,b.dc=b.drawCircle,b.de=b.drawEllipse,b.dp=b.drawPolyStar,b.p=b.decodePath,b._updateInstructions=function(b){var c=this._instructions,d=this._activeInstructions,e=this._commitIndex;if(this._dirty&&d.length){c.length=e,c.push(a.beginCmd);var f=d.length,g=c.length;c.length=g+f;for(var h=0;f>h;h++)c[h+g]=d[h];this._fill&&c.push(this._fill),this._stroke&&(this._strokeDash!==this._oldStrokeDash&&(this._oldStrokeDash=this._strokeDash,c.push(this._strokeDash)),this._strokeStyle!==this._oldStrokeStyle&&(this._oldStrokeStyle=this._strokeStyle,c.push(this._strokeStyle)),c.push(this._stroke)),this._dirty=!1}b&&(d.length=0,this._commitIndex=c.length)},b._setFill=function(a){return this._updateInstructions(!0),this.command=this._fill=a,this},b._setStroke=function(a){return this._updateInstructions(!0),(this.command=this._stroke=a)&&(a.ignoreScale=this._strokeIgnoreScale),this},(c.LineTo=function(a,b){this.x=a,this.y=b}).prototype.exec=function(a){a.lineTo(this.x,this.y)},(c.MoveTo=function(a,b){this.x=a,this.y=b}).prototype.exec=function(a){a.moveTo(this.x,this.y)},(c.ArcTo=function(a,b,c,d,e){this.x1=a,this.y1=b,this.x2=c,this.y2=d,this.radius=e}).prototype.exec=function(a){a.arcTo(this.x1,this.y1,this.x2,this.y2,this.radius)},(c.Arc=function(a,b,c,d,e,f){this.x=a,this.y=b,this.radius=c,this.startAngle=d,this.endAngle=e,this.anticlockwise=!!f}).prototype.exec=function(a){a.arc(this.x,this.y,this.radius,this.startAngle,this.endAngle,this.anticlockwise)},(c.QuadraticCurveTo=function(a,b,c,d){this.cpx=a,this.cpy=b,this.x=c,this.y=d}).prototype.exec=function(a){a.quadraticCurveTo(this.cpx,this.cpy,this.x,this.y)},(c.BezierCurveTo=function(a,b,c,d,e,f){this.cp1x=a,this.cp1y=b,this.cp2x=c,this.cp2y=d,this.x=e,this.y=f}).prototype.exec=function(a){a.bezierCurveTo(this.cp1x,this.cp1y,this.cp2x,this.cp2y,this.x,this.y)},(c.Rect=function(a,b,c,d){this.x=a,this.y=b,this.w=c,this.h=d}).prototype.exec=function(a){a.rect(this.x,this.y,this.w,this.h)},(c.ClosePath=function(){}).prototype.exec=function(a){a.closePath()},(c.BeginPath=function(){}).prototype.exec=function(a){a.beginPath()},b=(c.Fill=function(a,b){this.style=a,this.matrix=b}).prototype,b.exec=function(a){if(this.style){a.fillStyle=this.style;var b=this.matrix;b&&(a.save(),a.transform(b.a,b.b,b.c,b.d,b.tx,b.ty)),a.fill(),b&&a.restore()}},b.linearGradient=function(b,c,d,e,f,g){for(var h=this.style=a._ctx.createLinearGradient(d,e,f,g),i=0,j=b.length;j>i;i++)h.addColorStop(c[i],b[i]);return h.props={colors:b,ratios:c,x0:d,y0:e,x1:f,y1:g,type:"linear"},this},b.radialGradient=function(b,c,d,e,f,g,h,i){for(var j=this.style=a._ctx.createRadialGradient(d,e,f,g,h,i),k=0,l=b.length;l>k;k++)j.addColorStop(c[k],b[k]);return j.props={colors:b,ratios:c,x0:d,y0:e,r0:f,x1:g,y1:h,r1:i,type:"radial"},this},b.bitmap=function(b,c){if(b.naturalWidth||b.getContext||b.readyState>=2){var d=this.style=a._ctx.createPattern(b,c||"");d.props={image:b,repetition:c,type:"bitmap"}}return this},b.path=!1,b=(c.Stroke=function(a,b){this.style=a,this.ignoreScale=b}).prototype,b.exec=function(a){this.style&&(a.strokeStyle=this.style,this.ignoreScale&&(a.save(),a.setTransform(1,0,0,1,0,0)),a.stroke(),this.ignoreScale&&a.restore())},b.linearGradient=c.Fill.prototype.linearGradient,b.radialGradient=c.Fill.prototype.radialGradient,b.bitmap=c.Fill.prototype.bitmap,b.path=!1,b=(c.StrokeStyle=function(a,b,c,d
vendor: 4,020 bytes, lines 10622-10623
10622,e){this.width=a,this.caps=b,this.joints=c,this.miterLimit=d,this.ignoreScale=e}).prototype,b.exec=function(b){b.lineWidth=null==this.width?"1":this.width,b.lineCap=null==this.caps?"butt":isNaN(this.caps)?this.caps:a.STROKE_CAPS_MAP[this.caps],b.lineJoin=null==this.joints?"miter":isNaN(this.joints)?this.joints:a.STROKE_JOINTS_MAP[this.joints],b.miterLimit=null==this.miterLimit?"10":this.miterLimit,b.ignoreScale=null==this.ignoreScale?!1:this.ignoreScale},b.path=!1,(c.StrokeDash=function(a,b){this.segments=a,this.offset=b||0}).prototype.exec=function(a){a.setLineDash&&(a.setLineDash(this.segments||c.StrokeDash.EMPTY_SEGMENTS),a.lineDashOffset=this.offset||0)},c.StrokeDash.EMPTY_SEGMENTS=[],(c.RoundRect=function(a,b,c,d,e,f,g,h){this.x=a,this.y=b,this.w=c,this.h=d,this.radiusTL=e,this.radiusTR=f,this.radiusBR=g,this.radiusBL=h}).prototype.exec=function(a){var b=(j>i?i:j)/2,c=0,d=0,e=0,f=0,g=this.x,h=this.y,i=this.w,j=this.h,k=this.radiusTL,l=this.radiusTR,m=this.radiusBR,n=this.radiusBL;0>k&&(k*=c=-1),k>b&&(k=b),0>l&&(l*=d=-1),l>b&&(l=b),0>m&&(m*=e=-1),m>b&&(m=b),0>n&&(n*=f=-1),n>b&&(n=b),a.moveTo(g+i-l,h),a.arcTo(g+i+l*d,h-l*d,g+i,h+l,l),a.lineTo(g+i,h+j-m),a.arcTo(g+i+m*e,h+j+m*e,g+i-m,h+j,m),a.lineTo(g+n,h+j),a.arcTo(g-n*f,h+j+n*f,g,h+j-n,n),a.lineTo(g,h+k),a.arcTo(g-k*c,h-k*c,g+k,h,k),a.closePath()},(c.Circle=function(a,b,c){this.x=a,this.y=b,this.radius=c}).prototype.exec=function(a){a.arc(this.x,this.y,this.radius,0,2*Math.PI)},(c.Ellipse=function(a,b,c,d){this.x=a,this.y=b,this.w=c,this.h=d}).prototype.exec=function(a){var b=this.x,c=this.y,d=this.w,e=this.h,f=.5522848,g=d/2*f,h=e/2*f,i=b+d,j=c+e,k=b+d/2,l=c+e/2;a.moveTo(b,l),a.bezierCurveTo(b,l-h,k-g,c,k,c),a.bezierCurveTo(k+g,c,i,l-h,i,l),a.bezierCurveTo(i,l+h,k+g,j,k,j),a.bezierCurveTo(k-g,j,b,l+h,b,l)},(c.PolyStar=function(a,b,c,d,e,f){this.x=a,this.y=b,this.radius=c,this.sides=d,this.pointSize=e,this.angle=f}).prototype.exec=function(a){var b=this.x,c=this.y,d=this.radius,e=(this.angle||0)/180*Math.PI,f=this.sides,g=1-(this.pointSize||0),h=Math.PI/f;a.moveTo(b+Math.cos(e)*d,c+Math.sin(e)*d);for(var i=0;f>i;i++)e+=h,1!=g&&a.lineTo(b+Math.cos(e)*d*g,c+Math.sin(e)*d*g),e+=h,a.lineTo(b+Math.cos(e)*d,c+Math.sin(e)*d);a.closePath()},a.beginCmd=new c.BeginPath,createjs.Graphics=a}(),this.createjs=this.createjs||{},function(){"use strict";function a(){this.EventDispatcher_constructor(),this.alpha=1,this.cacheCanvas=null,this.cacheID=0,this.id=createjs.UID.get(),this.mouseEnabled=!0,this.tickEnabled=!0,this.name=null,this.parent=null,this.regX=0,this.regY=0,this.rotation=0,this.scaleX=1,this.scaleY=1,this.skewX=0,this.skewY=0,this.shadow=null,this.visible=!0,this.x=0,this.y=0,this.transformMatrix=null,this.compositeOperation=null,this.snapToPixel=!0,this.filters=null,
10623this.mask=null,this.hitArea=null,this.cursor=null,this._cacheOffsetX=0,this._cacheOffsetY=0,this._filterOffsetX=0,this._filterOffsetY=0,this._cacheScale=1,this._cacheDataURLID=0,this._cacheDataURL=null,this._props=new createjs.DisplayProps,this._rectangle=new createjs.Rectangle,this._bounds=null}var b=createjs.extend(a,createjs.EventDispatcher);a._MOUSE_EVENTS=["click","dblclick","mousedown","mouseout","mouseover","pressmove","pressup","rollout","rollover"],a.suppressCrossDomainErrors=!1,a._snapToPixelEnabled=!1;var c=createjs.createCanvas?createjs.createCanvas():document.createElement("canvas");c.getContext&&(a._hitTestCanvas=c,a._hitTestContext=c.getContext("2d"),c.width=c.height=1),a._nextCacheID=1,b.getStage=function(){for(var a=this,b=createjs.Stage;a.parent;)a=a.parent;return a instanceof b?a:null};try{Object.defineProperties(b,{stage:{get:b.getStage}})}catch(d){}b.isVisible=function(){return!!(this.visible&&this.alpha>0&&0!=this.scaleX&&0!=this.scaleY)},b.draw=function(a,b){var c=this.cacheCanvas;if(b||!c)return!1;var d=this._cacheScale;return a.drawImage(c,this._cacheOffsetX+this._filterOffsetX,this._cacheOffsetY+this._filterOffsetY,c.width/d,c.height/d),!0},b.updateContext=function(b){var c=this,d=c.mask,e=c._props.matrix;
vendor: 2,788 bytes, line 10623
10623d&&d.graphics&&!d.graphics.isEmpty()&&(d.getMatrix(e),b.transform(e.a,e.b,e.c,e.d,e.tx,e.ty),d.graphics.drawAsPath(b),b.clip(),e.invert(),b.transform(e.a,e.b,e.c,e.d,e.tx,e.ty)),this.getMatrix(e);var f=e.tx,g=e.ty;a._snapToPixelEnabled&&c.snapToPixel&&(f=f+(0>f?-.5:.5)|0,g=g+(0>g?-.5:.5)|0),b.transform(e.a,e.b,e.c,e.d,f,g),b.globalAlpha*=c.alpha,c.compositeOperation&&(b.globalCompositeOperation=c.compositeOperation),c.shadow&&this._applyShadow(b,c.shadow)},b.cache=function(a,b,c,d,e){e=e||1,this.cacheCanvas||(this.cacheCanvas=createjs.createCanvas?createjs.createCanvas():document.createElement("canvas")),this._cacheWidth=c,this._cacheHeight=d,this._cacheOffsetX=a,this._cacheOffsetY=b,this._cacheScale=e,this.updateCache()},b.updateCache=function(b){var c=this.cacheCanvas;if(!c)throw"cache() must be called before updateCache()";var d=this._cacheScale,e=this._cacheOffsetX*d,f=this._cacheOffsetY*d,g=this._cacheWidth,h=this._cacheHeight,i=c.getContext("2d"),j=this._getFilterBounds();e+=this._filterOffsetX=j.x,f+=this._filterOffsetY=j.y,g=Math.ceil(g*d)+j.width,h=Math.ceil(h*d)+j.height,g!=c.width||h!=c.height?(c.width=g,c.height=h):b||i.clearRect(0,0,g+1,h+1),i.save(),i.globalCompositeOperation=b,i.setTransform(d,0,0,d,-e,-f),this.draw(i,!0),this._applyFilters(),i.restore(),this.cacheID=a._nextCacheID++},b.uncache=function(){this._cacheDataURL=this.cacheCanvas=null,this.cacheID=this._cacheOffsetX=this._cacheOffsetY=this._filterOffsetX=this._filterOffsetY=0,this._cacheScale=1},b.getCacheDataURL=function(){return this.cacheCanvas?(this.cacheID!=this._cacheDataURLID&&(this._cacheDataURL=this.cacheCanvas.toDataURL()),this._cacheDataURL):null},b.localToGlobal=function(a,b,c){return this.getConcatenatedMatrix(this._props.matrix).transformPoint(a,b,c||new createjs.Point)},b.globalToLocal=function(a,b,c){return this.getConcatenatedMatrix(this._props.matrix).invert().transformPoint(a,b,c||new createjs.Point)},b.localToLocal=function(a,b,c,d){return d=this.localToGlobal(a,b,d),c.globalToLocal(d.x,d.y,d)},b.setTransform=function(a,b,c,d,e,f,g,h,i){return this.x=a||0,this.y=b||0,this.scaleX=null==c?1:c,this.scaleY=null==d?1:d,this.rotation=e||0,this.skewX=f||0,this.skewY=g||0,this.regX=h||0,this.regY=i||0,this},b.getMatrix=function(a){var b=this,c=a&&a.identity()||new createjs.Matrix2D;return b.transformMatrix?c.copy(b.transformMatrix):c.appendTransform(b.x,b.y,b.scaleX,b.scaleY,b.rotation,b.skewX,b.skewY,b.regX,b.regY)},b.getConcatenatedMatrix=function(a){for(var b=this,c=this.getMatrix(a);b=b.parent;)c.prependMatrix(b.getMatrix(b._props.matrix));return c},b.getConcatenatedDisplayProps=function(a){a=a?a.identity():new createjs.DisplayProps;var b=this,c=b.getMatrix(a.matrix);do a.prepend(b.visible,b.alpha,b.shadow,b.compositeOperation),b!=this&&c.prependM
vendor: 4,722 bytes, line 10623
10623atrix(b.getMatrix(b._props.matrix));while(b=b.parent);return a},b.hitTest=function(b,c){var d=a._hitTestContext;d.setTransform(1,0,0,1,-b,-c),this.draw(d);var e=this._testHit(d);return d.setTransform(1,0,0,1,0,0),d.clearRect(0,0,2,2),e},b.set=function(a){for(var b in a)this[b]=a[b];return this},b.getBounds=function(){if(this._bounds)return this._rectangle.copy(this._bounds);var a=this.cacheCanvas;if(a){var b=this._cacheScale;return this._rectangle.setValues(this._cacheOffsetX,this._cacheOffsetY,a.width/b,a.height/b)}return null},b.getTransformedBounds=function(){return this._getBounds()},b.setBounds=function(a,b,c,d){null==a&&(this._bounds=a),this._bounds=(this._bounds||new createjs.Rectangle).setValues(a,b,c,d)},b.clone=function(){return this._cloneProps(new a)},b.toString=function(){return"[DisplayObject (name="+this.name+")]"},b._cloneProps=function(a){return a.alpha=this.alpha,a.mouseEnabled=this.mouseEnabled,a.tickEnabled=this.tickEnabled,a.name=this.name,a.regX=this.regX,a.regY=this.regY,a.rotation=this.rotation,a.scaleX=this.scaleX,a.scaleY=this.scaleY,a.shadow=this.shadow,a.skewX=this.skewX,a.skewY=this.skewY,a.visible=this.visible,a.x=this.x,a.y=this.y,a.compositeOperation=this.compositeOperation,a.snapToPixel=this.snapToPixel,a.filters=null==this.filters?null:this.filters.slice(0),a.mask=this.mask,a.hitArea=this.hitArea,a.cursor=this.cursor,a._bounds=this._bounds,a},b._applyShadow=function(a,b){b=b||Shadow.identity,a.shadowColor=b.color,a.shadowOffsetX=b.offsetX,a.shadowOffsetY=b.offsetY,a.shadowBlur=b.blur},b._tick=function(a){var b=this._listeners;b&&b.tick&&(a.target=null,a.propagationStopped=a.immediatePropagationStopped=!1,this.dispatchEvent(a))},b._testHit=function(b){try{var c=b.getImageData(0,0,1,1).data[3]>1}catch(d){if(!a.suppressCrossDomainErrors)throw"An error has occurred. This is most likely due to security restrictions on reading canvas pixel data with local or cross-domain images."}return c},b._applyFilters=function(){if(this.filters&&0!=this.filters.length&&this.cacheCanvas)for(var a=this.filters.length,b=this.cacheCanvas.getContext("2d"),c=this.cacheCanvas.width,d=this.cacheCanvas.height,e=0;a>e;e++)this.filters[e].applyFilter(b,0,0,c,d)},b._getFilterBounds=function(a){var b,c=this.filters,d=this._rectangle.setValues(0,0,0,0);if(!c||!(b=c.length))return d;for(var e=0;b>e;e++){var f=this.filters[e];f.getBounds&&f.getBounds(d)}return d},b._getBounds=function(a,b){return this._transformBounds(this.getBounds(),a,b)},b._transformBounds=function(a,b,c){if(!a)return a;var d=a.x,e=a.y,f=a.width,g=a.height,h=this._props.matrix;h=c?h.identity():this.getMatrix(h),(d||e)&&h.appendTransform(0,0,1,1,0,0,0,-d,-e),b&&h.prependMatrix(b);var i=f*h.a,j=f*h.b,k=g*h.c,l=g*h.d,m=h.tx,n=h.ty,o=m,p=m,q=n,r=n;return(d=i+m)<o?o=d:d>p&&(p=d),(d=i+k+m)<o?o=d:d>p&&(p=d),(d=k+m)<o?o=d:d>p&&(p=d),(e=j+n)<q?q=e:e>r&&(r=e),(e=j+l+n)<q?q=e:e>r&&(r=e),(e=l+n)<q?q=e:e>r&&(r=e),a.setValues(o,q,p-o,r-q)},b._hasMouseEventListener=function(){for(var b=a._MOUSE_EVENTS,c=0,d=b.length;d>c;c++)if(this.hasEventListener(b[c]))return!0;return!!this.cursor},createjs.DisplayObject=createjs.promote(a,"EventDispatcher")}(),this.createjs=this.createjs||{},function(){"use strict";function a(){this.DisplayObject_constructor(),this.children=[],this.mouseChildren=!0,this.tickChildren=!0}var b=createjs.extend(a,createjs.DisplayObject);b.getNumChildren=function(){return this.children.length};try{Object.defineProperties(b,{numChildren:{get:b.getNumChildren}})}catch(c){}b.initialize=a,b.isVisible=function(){var a=this.cacheCanvas||this.children.length;return!!(this.visible&&this.alpha>0&&0!=this.scaleX&&0!=this.scaleY&&a)},b.draw=function(a,b){if(this.DisplayObject_draw(a,b))return!0;for(var c=this.children.slice(),d=0,e=c.length;e>d;d++){var f=c[d];f.isVisible()&&(a.save(),f.updateContext(a),f.draw(a),a.restore())}return!0},b.addChild=function(a){if(null==a)return a;var b=arguments.length;if(b>1){for(var c=0;b>c;c++)this.addChild(arguments[c]);return arguments[b-1]}return a.parent&&a.parent.removeChild(a),a.parent=this,this.children.push(a),a.dispatchEvent("added"),a},b.addChildAt=function(a,b){var c=arguments.length,d=arguments[c-1];if(0>d||d>this.children.length)return arguments[c-2];if(c>2){for(var e=0;c-1>e;e++)this.addChildAt(arguments[e],d+e);return arguments[c-2]}return a.parent&&a.parent.removeChild(a),a.parent=this,this.children.splice(b,0,a),a.dispatchEvent("added"),a},b.removeChild=function(a){var b=arguments.length;if(b>1){for(var c=!0,d=0;b>d;d++)c=c&&this.removeChild(arguments[d]);return c}return this.removeChildAt(createjs.indexOf(this.children,a))},b.removeChildAt=function(a){var b=arguments.length;if(b>1){for(var c=[],d=0;b>d;d++)c[d]=arguments[d];
vendor: 3,119 bytes, line 10623
10623c.sort(function(a,b){return b-a});for(var e=!0,d=0;b>d;d++)e=e&&this.removeChildAt(c[d]);return e}if(0>a||a>this.children.length-1)return!1;var f=this.children[a];return f&&(f.parent=null),this.children.splice(a,1),f.dispatchEvent("removed"),!0},b.removeAllChildren=function(){for(var a=this.children;a.length;)this.removeChildAt(0)},b.getChildAt=function(a){return this.children[a]},b.getChildByName=function(a){for(var b=this.children,c=0,d=b.length;d>c;c++)if(b[c].name==a)return b[c];return null},b.sortChildren=function(a){this.children.sort(a)},b.getChildIndex=function(a){return createjs.indexOf(this.children,a)},b.swapChildrenAt=function(a,b){var c=this.children,d=c[a],e=c[b];d&&e&&(c[a]=e,c[b]=d)},b.swapChildren=function(a,b){for(var c,d,e=this.children,f=0,g=e.length;g>f&&(e[f]==a&&(c=f),e[f]==b&&(d=f),null==c||null==d);f++);f!=g&&(e[c]=b,e[d]=a)},b.setChildIndex=function(a,b){var c=this.children,d=c.length;if(!(a.parent!=this||0>b||b>=d)){for(var e=0;d>e&&c[e]!=a;e++);e!=d&&e!=b&&(c.splice(e,1),c.splice(b,0,a))}},b.contains=function(a){for(;a;){if(a==this)return!0;a=a.parent}return!1},b.hitTest=function(a,b){return null!=this.getObjectUnderPoint(a,b)},b.getObjectsUnderPoint=function(a,b,c){var d=[],e=this.localToGlobal(a,b);return this._getObjectsUnderPoint(e.x,e.y,d,c>0,1==c),d},b.getObjectUnderPoint=function(a,b,c){var d=this.localToGlobal(a,b);return this._getObjectsUnderPoint(d.x,d.y,null,c>0,1==c)},b.getBounds=function(){return this._getBounds(null,!0)},b.getTransformedBounds=function(){return this._getBounds()},b.clone=function(b){var c=this._cloneProps(new a);return b&&this._cloneChildren(c),c},b.toString=function(){return"[Container (name="+this.name+")]"},b._tick=function(a){if(this.tickChildren)for(var b=this.children.length-1;b>=0;b--){var c=this.children[b];c.tickEnabled&&c._tick&&c._tick(a)}this.DisplayObject__tick(a)},b._cloneChildren=function(a){a.children.length&&a.removeAllChildren();for(var b=a.children,c=0,d=this.children.length;d>c;c++){var e=this.children[c].clone(!0);e.parent=a,b.push(e)}},b._getObjectsUnderPoint=function(b,c,d,e,f,g){if(g=g||0,!g&&!this._testMask(this,b,c))return null;var h,i=createjs.DisplayObject._hitTestContext;f=f||e&&this._hasMouseEventListener();for(var j=this.children,k=j.length,l=k-1;l>=0;l--){var m=j[l],n=m.hitArea;if(m.visible&&(n||m.isVisible())&&(!e||m.mouseEnabled)&&(n||this._testMask(m,b,c)))if(!n&&m instanceof a){var o=m._getObjectsUnderPoint(b,c,d,e,f,g+1);if(!d&&o)return e&&!this.mouseChildren?this:o}else{if(e&&!f&&!m._hasMouseEventListener())continue;var p=m.getConcatenatedDisplayProps(m._props);if(h=p.matrix,n&&(h.appendMatrix(n.getMatrix(n._props.matrix)),p.alpha=n.alpha),i.globalAlpha=p.alpha,i.setTransform(h.a,h.b,h.c,h.d,h.tx-b,h.ty-c),(n||m).draw(i),!this._testHit(i))continue;if(i.setTransform(1,0,0,1,0,0),i.clearRect(0,0,2,2),!d)return e&&!this.mouseChildren?this:m;d.push(m)}}return null},b._testMask=function(a,b,c){var d=a.mask;if(!d||!d.graphics||d.graphics.isEmpty())return!0;var e=this._props.matrix,f=a.parent;e=f?f.getConcatenatedMatrix(e):e.identity(),e=d.getMatrix(d._props.matrix).prependM
vendor: 16,405 bytes, line 10623
10623atrix(e);var g=createjs.DisplayObject._hitTestContext;return g.setTransform(e.a,e.b,e.c,e.d,e.tx-b,e.ty-c),d.graphics.drawAsPath(g),g.fillStyle="#000",g.fill(),this._testHit(g)?(g.setTransform(1,0,0,1,0,0),g.clearRect(0,0,2,2),!0):!1},b._getBounds=function(a,b){var c=this.DisplayObject_getBounds();if(c)return this._transformBounds(c,a,b);var d=this._props.matrix;d=b?d.identity():this.getMatrix(d),a&&d.prependMatrix(a);for(var e=this.children.length,f=null,g=0;e>g;g++){var h=this.children[g];h.visible&&(c=h._getBounds(d))&&(f?f.extend(c.x,c.y,c.width,c.height):f=c.clone())}return f},createjs.Container=createjs.promote(a,"DisplayObject")}(),this.createjs=this.createjs||{},function(){"use strict";function a(a){this.Container_constructor(),this.autoClear=!0,this.canvas="string"==typeof a?document.getElementById(a):a,this.mouseX=0,this.mouseY=0,this.drawRect=null,this.snapToPixelEnabled=!1,this.mouseInBounds=!1,this.tickOnUpdate=!0,this.mouseMoveOutside=!1,this.preventSelection=!0,this._pointerData={},this._pointerCount=0,this._primaryPointerID=null,this._mouseOverIntervalID=null,this._nextStage=null,this._prevStage=null,this.enableDOMEvents(!0)}var b=createjs.extend(a,createjs.Container);b._get_nextStage=function(){return this._nextStage},b._set_nextStage=function(a){this._nextStage&&(this._nextStage._prevStage=null),a&&(a._prevStage=this),this._nextStage=a};try{Object.defineProperties(b,{nextStage:{get:b._get_nextStage,set:b._set_nextStage}})}catch(c){}b.update=function(a){if(this.canvas&&(this.tickOnUpdate&&this.tick(a),this.dispatchEvent("drawstart",!1,!0)!==!1)){createjs.DisplayObject._snapToPixelEnabled=this.snapToPixelEnabled;var b=this.drawRect,c=this.canvas.getContext("2d");c.setTransform(1,0,0,1,0,0),this.autoClear&&(b?c.clearRect(b.x,b.y,b.width,b.height):c.clearRect(0,0,this.canvas.width+1,this.canvas.height+1)),c.save(),this.drawRect&&(c.beginPath(),c.rect(b.x,b.y,b.width,b.height),c.clip()),this.updateContext(c),this.draw(c,!1),c.restore(),this.dispatchEvent("drawend")}},b.tick=function(a){if(this.tickEnabled&&this.dispatchEvent("tickstart",!1,!0)!==!1){var b=new createjs.Event("tick");if(a)for(var c in a)a.hasOwnProperty(c)&&(b[c]=a[c]);this._tick(b),this.dispatchEvent("tickend")}},b.handleEvent=function(a){"tick"==a.type&&this.update(a)},b.clear=function(){if(this.canvas){var a=this.canvas.getContext("2d");a.setTransform(1,0,0,1,0,0),a.clearRect(0,0,this.canvas.width+1,this.canvas.height+1)}},b.toDataURL=function(a,b){var c,d=this.canvas.getContext("2d"),e=this.canvas.width,f=this.canvas.height;if(a){c=d.getImageData(0,0,e,f);var g=d.globalCompositeOperation;d.globalCompositeOperation="destination-over",d.fillStyle=a,d.fillRect(0,0,e,f)}var h=this.canvas.toDataURL(b||"image/png");return a&&(d.putImageData(c,0,0),d.globalCompositeOperation=g),h},b.enableMouseOver=function(a){if(this._mouseOverIntervalID&&(clearInterval(this._mouseOverIntervalID),this._mouseOverIntervalID=null,0==a&&this._testMouseOver(!0)),null==a)a=20;else if(0>=a)return;var b=this;this._mouseOverIntervalID=setInterval(function(){b._testMouseOver()},1e3/Math.min(50,a))},b.enableDOMEvents=function(a){null==a&&(a=!0);var b,c,d=this._eventListeners;if(!a&&d){for(b in d)c=d[b],c.t.removeEventListener(b,c.f,!1);this._eventListeners=null}else if(a&&!d&&this.canvas){var e=window.addEventListener?window:document,f=this;d=this._eventListeners={},d.mouseup={t:e,f:function(a){f._handleMouseUp(a)}},d.mousemove={t:e,f:function(a){f._handleMouseMove(a)}},d.dblclick={t:this.canvas,f:function(a){f._handleDoubleClick(a)}},d.mousedown={t:this.canvas,f:function(a){f._handleMouseDown(a)}};for(b in d)c=d[b],c.t.addEventListener(b,c.f,!1)}},b.clone=function(){throw"Stage cannot be cloned."},b.toString=function(){return"[Stage (name="+this.name+")]"},b._getElementRect=function(a){var b;try{b=a.getBoundingClientRect()}catch(c){b={top:a.offsetTop,left:a.offsetLeft,width:a.offsetWidth,height:a.offsetHeight}}var d=(window.pageXOffset||document.scrollLeft||0)-(document.clientLeft||document.body.clientLeft||0),e=(window.pageYOffset||document.scrollTop||0)-(document.clientTop||document.body.clientTop||0),f=window.getComputedStyle?getComputedStyle(a,null):a.currentStyle,g=parseInt(f.paddingLeft)+parseInt(f.borderLeftWidth),h=parseInt(f.paddingTop)+parseInt(f.borderTopWidth),i=parseInt(f.paddingRight)+parseInt(f.borderRightWidth),j=parseInt(f.paddingBottom)+parseInt(f.borderBottomWidth);return{left:b.left+d+g,right:b.right+d-i,top:b.top+e+h,bottom:b.bottom+e-j}},b._getPointerData=function(a){var b=this._pointerData[a];return b||(b=this._pointerData[a]={x:0,y:0}),b},b._handleMouseMove=function(a){a||(a=window.event),this._handlePointerMove(-1,a,a.pageX,a.pageY)},b._handlePointerMove=function(a,b,c,d,e){if((!this._prevStage||void 0!==e)&&this.canvas){var f=this._nextStage,g=this._getPointerData(a),h=g.inBounds;this._updatePointerPosition(a,b,c,d),(h||g.inBounds||this.mouseMoveOutside)&&(-1===a&&g.inBounds==!h&&this._dispatchMouseEvent(this,h?"mouseleave":"mouseenter",!1,a,g,b),this._dispatchMouseEvent(this,"stagemousemove",!1,a,g,b),this._dispatchMouseEvent(g.target,"pressmove",!0,a,g,b)),f&&f._handlePointerMove(a,b,c,d,null)}},b._updatePointerPosition=function(a,b,c,d){var e=this._getElementRect(this.canvas);c-=e.left,d-=e.top;var f=this.canvas.width,g=this.canvas.height;c/=(e.right-e.left)/f,d/=(e.bottom-e.top)/g;var h=this._getPointerData(a);(h.inBounds=c>=0&&d>=0&&f-1>=c&&g-1>=d)?(h.x=c,h.y=d):this.mouseMoveOutside&&(h.x=0>c?0:c>f-1?f-1:c,h.y=0>d?0:d>g-1?g-1:d),h.posEvtObj=b,h.rawX=c,h.rawY=d,(a===this._primaryPointerID||-1===a)&&(this.mouseX=h.x,this.mouseY=h.y,this.mouseInBounds=h.inBounds)},b._handleMouseUp=function(a){this._handlePointerUp(-1,a,!1)},b._handlePointerUp=function(a,b,c,d){var e=this._nextStage,f=this._getPointerData(a);if(!this._prevStage||void 0!==d){var g=null,h=f.target;d||!h&&!e||(g=this._getObjectsUnderPoint(f.x,f.y,null,!0)),f.down&&(this._dispatchMouseEvent(this,"stagemouseup",!1,a,f,b,g),f.down=!1),g==h&&this._dispatchMouseEvent(h,"click",!0,a,f,b),this._dispatchMouseEvent(h,"pressup",!0,a,f,b),c?(a==this._primaryPointerID&&(this._primaryPointerID=null),delete this._pointerData[a]):f.target=null,e&&e._handlePointerUp(a,b,c,d||g&&this)}},b._handleMouseDown=function(a){this._handlePointerDown(-1,a,a.pageX,a.pageY)},b._handlePointerDown=function(a,b,c,d,e){this.preventSelection&&b.preventDefault(),(null==this._primaryPointerID||-1===a)&&(this._primaryPointerID=a),null!=d&&this._updatePointerPosition(a,b,c,d);var f=null,g=this._nextStage,h=this._getPointerData(a);e||(f=h.target=this._getObjectsUnderPoint(h.x,h.y,null,!0)),h.inBounds&&(this._dispatchMouseEvent(this,"stagemousedown",!1,a,h,b,f),h.down=!0),this._dispatchMouseEvent(f,"mousedown",!0,a,h,b),g&&g._handlePointerDown(a,b,c,d,e||f&&this)},b._testMouseOver=function(a,b,c){if(!this._prevStage||void 0!==b){var d=this._nextStage;if(!this._mouseOverIntervalID)return void(d&&d._testMouseOver(a,b,c));var e=this._getPointerData(-1);if(e&&(a||this.mouseX!=this._mouseOverX||this.mouseY!=this._mouseOverY||!this.mouseInBounds)){var f,g,h,i=e.posEvtObj,j=c||i&&i.target==this.canvas,k=null,l=-1,m="";!b&&(a||this.mouseInBounds&&j)&&(k=this._getObjectsUnderPoint(this.mouseX,this.mouseY,null,!0),this._mouseOverX=this.mouseX,this._mouseOverY=this.mouseY);var n=this._mouseOverTarget||[],o=n[n.length-1],p=this._mouseOverTarget=[];for(f=k;f;)p.unshift(f),m||(m=f.cursor),f=f.parent;for(this.canvas.style.cursor=m,!b&&c&&(c.canvas.style.cursor=m),g=0,h=p.length;h>g&&p[g]==n[g];g++)l=g;for(o!=k&&this._dispatchMouseEvent(o,"mouseout",!0,-1,e,i,k),g=n.length-1;g>l;g--)this._dispatchMouseEvent(n[g],"rollout",!1,-1,e,i,k);for(g=p.length-1;g>l;g--)this._dispatchMouseEvent(p[g],"rollover",!1,-1,e,i,o);o!=k&&this._dispatchMouseEvent(k,"mouseover",!0,-1,e,i,o),d&&d._testMouseOver(a,b||k&&this,c||j&&this)}}},b._handleDoubleClick=function(a,b){var c=null,d=this._nextStage,e=this._getPointerData(-1);b||(c=this._getObjectsUnderPoint(e.x,e.y,null,!0),this._dispatchMouseEvent(c,"dblclick",!0,-1,e,a)),d&&d._handleDoubleClick(a,b||c&&this)},b._dispatchMouseEvent=function(a,b,c,d,e,f,g){if(a&&(c||a.hasEventListener(b))){var h=new createjs.MouseEvent(b,c,!1,e.x,e.y,f,d,d===this._primaryPointerID||-1===d,e.rawX,e.rawY,g);a.dispatchEvent(h)}},createjs.Stage=createjs.promote(a,"Container")}(),this.createjs=this.createjs||{},function(){function a(a){this.DisplayObject_constructor(),"string"==typeof a?(this.image=document.createElement("img"),this.image.src=a):this.image=a,this.sourceRect=null}var b=createjs.extend(a,createjs.DisplayObject);b.initialize=a,b.isVisible=function(){var a=this.image,b=this.cacheCanvas||a&&(a.naturalWidth||a.getContext||a.readyState>=2);return!!(this.visible&&this.alpha>0&&0!=this.scaleX&&0!=this.scaleY&&b)},b.draw=function(a,b){if(this.DisplayObject_draw(a,b)||!this.image)return!0;var c=this.image,d=this.sourceRect;if(d){var e=d.x,f=d.y,g=e+d.width,h=f+d.height,i=0,j=0,k=c.width,l=c.height;0>e&&(i-=e,e=0),g>k&&(g=k),0>f&&(j-=f,f=0),h>l&&(h=l),a.drawImage(c,e,f,g-e,h-f,i,j,g-e,h-f)}else a.drawImage(c,0,0);return!0},b.getBounds=function(){var a=this.DisplayObject_getBounds();if(a)return a;var b=this.image,c=this.sourceRect||b,d=b&&(b.naturalWidth||b.getContext||b.readyState>=2);return d?this._rectangle.setValues(0,0,c.width,c.height):null},b.clone=function(){var b=new a(this.image);return this.sourceRect&&(b.sourceRect=this.sourceRect.clone()),this._cloneProps(b),b},b.toString=function(){return"[Bitmap (name="+this.name+")]"},createjs.Bitmap=createjs.promote(a,"DisplayObject")}(),this.createjs=this.createjs||{},function(){"use strict";function a(a,b){this.DisplayObject_constructor(),this.currentFrame=0,this.currentAnimation=null,this.paused=!0,this.spriteSheet=a,this.currentAnimationFrame=0,this.framerate=0,this._animation=null,this._currentFrame=null,this._skipAdvance=!1,null!=b&&this.gotoAndPlay(b)}var b=createjs.extend(a,createjs.DisplayObject);b.initialize=a,b.isVisible=function(){var a=this.cacheCanvas||this.spriteSheet.complete;return!!(this.visible&&this.alpha>0&&0!=this.scaleX&&0!=this.scaleY&&a)},b.draw=function(a,b){if(this.DisplayObject_draw(a,b))return!0;this._normalizeFrame();var c=this.spriteSheet.getFrame(0|this._currentFrame);if(!c)return!1;var d=c.rect;return d.width&&d.height&&a.drawImage(c.image,d.x,d.y,d.width,d.height,-c.regX,-c.regY,d.width,d.height),!0},b.play=function(){this.paused=!1},b.stop=function(){this.paused=!0},b.gotoAndPlay=function(a){this.paused=!1,this._skipAdvance=!0,this._goto(a)},b.gotoAndStop=function(a){this.paused=!0,this._goto(a)},b.advance=function(a){var b=this.framerate||this.spriteSheet.framerate,c=b&&null!=a?a/(1e3/b):1;this._normalizeFrame(c)},b.getBounds=function(){return this.DisplayObject_getBounds()||this.spriteSheet.getFrameBounds(this.currentFrame,this._rectangle)},b.clone=function(){return this._cloneProps(new a(this.spriteSheet))},b.toString=function(){return"[Sprite (name="+this.name+")]"},b._cloneProps=function(a){return this.DisplayObject__cloneProps(a),a.currentFrame=this.currentFrame,a.currentAnimation=this.currentAnimation,a.paused=this.paused,a.currentAnimationFrame=this.currentAnimationFrame,a.framerate=this.framerate,a._animation=this._animation,a._currentFrame=this._currentFrame,a._skipAdvance=this._skipAdvance,a},b._tick=function(a){this.paused||(this._skipAdvance||this.advance(a&&a.delta),this._skipAdvance=!1),this.DisplayObject__tick(a)},b._normalizeFrame=function(a){a=a||0;var b,c=this._animation,d=this.paused,e=this._currentFrame;if(c){var f=c.speed||1,g=this.currentAnimationFrame;if(b=c.frames.length,g+a*f>=b){var h=c.next;if(this._dispatchAnimationEnd(c,e,d,h,b-1))return;if(h)return this._goto(h,a-(b-g)/f);this.paused=!0,g=c.frames.length-1}else g+=a*f;this.currentAnimationFrame=g,this._currentFrame=c.frames[0|g]}else if(e=this._currentFrame+=a,b=this.spriteSheet.getNumFrames(),e>=b&&b>0&&!this._dispatchAnimationEnd(c,e,d,b-1)&&(this._currentFrame-=b)>=b)return this._normalizeFrame();e=0|this._currentFrame,this.currentFrame!=e&&(this.currentFrame=e,this.dispatchEvent("change"))},b._dispatchAnimationEnd=function(a,b,c,d,e){var f=a?a.name:null;if(this.hasEventListener("animationend")){var g=new createjs.Event("animationend");g.name=f,g.next=d,this.dispatchEvent(g)}var h=this._animation!=a||this._currentFrame!=b;return h||c||!this.paused||(this.currentAnimationFrame=e,h=!0),h},b._goto=function(a,b){if(this.currentAnimationFrame=0,isNaN(a)){var c=this.spriteSheet.getAnimation(a);c&&(this._animation=c,this.currentAnimation=a,this._normalizeFrame(b))}else this.currentAnimation=this._animation=null,this._currentFrame=a,this._normalizeFrame()},createjs.Sprite=createjs.promote(a,"DisplayObject")}(),this.createjs=this.createjs||{},function(){"use strict";function a(a){this.DisplayObject_constructor(),this.graphics=a?a:new createjs.Graphics}var b=createjs.extend(a,createjs.DisplayObject);b.isVisible=function(){var a=this.cacheCanvas||this.graphics&&!this.graphics.isEmpty();return!!(this.visible&&this.alpha>0&&0!=this.scaleX&&0!=this.scaleY&&a)},b.draw=function(a,b){return this.DisplayObject_draw(a,b)?!0:(this.graphics.draw(a,this),!0)},b.clone=function(b){var c=b&&this.graphics?this.graphics.clone():this.graphics;return this._cloneProps(new a(c))},b.toString=function(){return"[Shape (name="+this.name+")]"},createjs.Shape=createjs.promote(a,"DisplayObject")}(),this.createjs=this.createjs||{},function(){"use strict";function a(a,b,c){this.DisplayObject_constructor(),this.text=a,this.font=b,this.color=c,this.textAlign="left",this.textBaseline="top",this.maxWidth=null,this.outline=0,this.lineHeight=0,this.lineWidth=null}var b=createjs.extend(a,createjs.DisplayObject),c=createjs.createCanvas?createjs.createCanvas():document.createElement("canvas");c.getContext&&(a._workingContext=c.getContext("2d"),c.width=c.height=1),a.H_OFFSETS={start:0,left:0,center:-.5,end:-1,right:-1},a.V_OFFSETS={top:0,hanging:-.01,middle:-.4,alphabetic:-.8,ideographic:-.85,bottom:-1},b.isVisible=function(){var a=this.cacheCanvas||null!=this.text&&""!==this.text;return!!(this.visible&&this.alpha>0&&0!=this.scaleX&&0!=this.scaleY&&a)},b.draw=function(a,b){if(this.DisplayObject_draw(a,b))return!0;var c=this.color||"#000";return this.outline?(a.strokeStyle=c,a.lineWidth=1*this.outline):a.fillStyle=c,this._drawText(this._prepContext(a)),!0},b.getMeasuredWidth=function(){return this._getMeasuredWidth(this.text)},b.getMeasuredLineHeight=function(){return 1.2*this._getMeasuredWidth("M")},b.getMeasuredHeight=function(){return this._drawText(null,{}).height},b.getBounds=function(){var b=this.DisplayObject_getBounds();if(b)return b;if(null==this.text||""===this.text)return null;var c=this._drawText(null,{}),d=this.maxWidth&&this.maxWidth<c.width?this.maxWidth:c.width,e=d*a.H_OFFSETS[this.textAlign||"left"],f=this.lineHeight||this.getMeasuredLineHeight(),g=f*a.V_OFFSETS[this.textBaseline||"top"];return this._rectangle.setValues(e,g,d,c.height)},b.getMetrics=function(){var b={lines:[]};return b.lineHeight=this.lineHeight||this.getMeasuredLineHeight(),b.vOffset=b.lineHeight*a.V_OFFSETS[this.textBaseline||"top"],this._drawText(null,b,b.lines)},b.clone=function(){return this._cloneProps(new a(this.text,this.font,this.color))},b.toString=function(){return"[Text (text="+(this.text.length>20?this.text.substr(0,17)+"...":this.text)+")]"},b._cloneProps=function(a){return this.DisplayObject__cloneProps(a),a.textAlign=this.textAlign,a.textBaseline=this.textBaseline,a.maxWidth=this.maxWidth,a.outline=this.outline,a.lineHeight=this.lineHeight,a.lineWidth=this.lineWidth,a},b._prepContext=function(a){return a.font=this.font||"10px sans-serif",a.textAlign=this.textAlign||"left",a.textBaseline=this.textBaseline||"top",a},b._drawText=function(b,c,d){var e=!!b;e||(b=a._workingContext,b.save(),this._prepContext(b));for(var f=this.lineHeight||this.getMeasuredLineHeight(),g=0,h=0,i=String(this.text).split(/(?:\r\n|\r|\n)/),j=0,k=i.length;k>j;j++){var l=i[j],m=null;if(null!=this.lineWidth&&(m=b.measureText(l).width)>this.lineWidth){var n=l.split(/(\s)/);l=n[0],m=b.measureText(l).width;for(var o=1,p=n.length;p>o;o+=2){var q=b.measureText(n[o]+n[o+1]).width;m+q>this.lineWidth?(e&&this._drawTextLine(b,l,h*f),d&&d.push(l),m>g&&(g=m),l=n[o+1],m=b.measureText(l).width,h++):(l+=n[o]+n[o+1],m+=q)}}e&&this._drawTextLine(b,l,h*f),d&&d.push(l),c&&null==m&&(m=b.measureText(l).width),m>g&&(g=m),h++}
vendor: 17,383 bytes, lines 10623-10624
10623return c&&(c.width=g,c.height=h*f),e||b.restore(),c},b._drawTextLine=function(a,b,c){this.outline?a.strokeText(b,0,c,this.maxWidth||65535):a.fillText(b,0,c,this.maxWidth||65535)},b._getMeasuredWidth=function(b){var c=a._workingContext;c.save();var d=this._prepContext(c).measureText(b).width;return c.restore(),d},createjs.Text=createjs.promote(a,"DisplayObject")}(),this.createjs=this.createjs||{},function(){"use strict";function a(a,b){this.Container_constructor(),this.text=a||"",this.spriteSheet=b,this.lineHeight=0,this.letterSpacing=0,this.spaceWidth=0,this._oldProps={text:0,spriteSheet:0,lineHeight:0,letterSpacing:0,spaceWidth:0}}var b=createjs.extend(a,createjs.Container);a.maxPoolSize=100,a._spritePool=[],b.draw=function(a,b){this.DisplayObject_draw(a,b)||(this._updateText(),this.Container_draw(a,b))},b.getBounds=function(){return this._updateText(),this.Container_getBounds()},b.isVisible=function(){var a=this.cacheCanvas||this.spriteSheet&&this.spriteSheet.complete&&this.text;return!!(this.visible&&this.alpha>0&&0!==this.scaleX&&0!==this.scaleY&&a)},b.clone=function(){return this._cloneProps(new a(this.text,this.spriteSheet))},b.addChild=b.addChildAt=b.removeChild=b.removeChildAt=b.removeAllChildren=function(){},b._cloneProps=function(a){return this.Container__cloneProps(a),a.lineHeight=this.lineHeight,a.letterSpacing=this.letterSpacing,a.spaceWidth=this.spaceWidth,a},b._getFrameIndex=function(a,b){var c,d=b.getAnimation(a);return d||(a!=(c=a.toUpperCase())||a!=(c=a.toLowerCase())||(c=null),c&&(d=b.getAnimation(c))),d&&d.frames[0]},b._getFrame=function(a,b){var c=this._getFrameIndex(a,b);return null==c?c:b.getFrame(c)},b._getLineHeight=function(a){var b=this._getFrame("1",a)||this._getFrame("T",a)||this._getFrame("L",a)||a.getFrame(0);return b?b.rect.height:1},b._getSpaceWidth=function(a){var b=this._getFrame("1",a)||this._getFrame("l",a)||this._getFrame("e",a)||this._getFrame("a",a)||a.getFrame(0);return b?b.rect.width:1},b._updateText=function(){var b,c=0,d=0,e=this._oldProps,f=!1,g=this.spaceWidth,h=this.lineHeight,i=this.spriteSheet,j=a._spritePool,k=this.children,l=0,m=k.length;for(var n in e)e[n]!=this[n]&&(e[n]=this[n],f=!0);if(f){var o=!!this._getFrame(" ",i);o||g||(g=this._getSpaceWidth(i)),h||(h=this._getLineHeight(i));for(var p=0,q=this.text.length;q>p;p++){var r=this.text.charAt(p);if(" "!=r||o)if("\n"!=r&&"\r"!=r){var s=this._getFrameIndex(r,i);null!=s&&(m>l?b=k[l]:(k.push(b=j.length?j.pop():new createjs.Sprite),b.parent=this,m++),b.spriteSheet=i,b.gotoAndStop(s),b.x=c,b.y=d,l++,c+=b.getBounds().width+this.letterSpacing)}else"\r"==r&&"\n"==this.text.charAt(p+1)&&p++,c=0,d+=h;else c+=g}for(;m>l;)j.push(b=k.pop()),b.parent=null,m--;j.length>a.maxPoolSize&&(j.length=a.maxPoolSize)}},createjs.BitmapText=createjs.promote(a,"Container")}(),this.createjs=this.createjs||{},function(){"use strict";function a(b,c,d,e){this.Container_constructor(),!a.inited&&a.init(),this.mode=b||a.INDEPENDENT,this.startPosition=c||0,this.loop=d,this.currentFrame=0,this.timeline=new createjs.Timeline(null,e,{paused:!0,position:c,useTicks:!0}),this.paused=!1,this.actionsEnabled=!0,this.autoReset=!0,this.frameBounds=this.frameBounds||null,this.framerate=null,this._synchOffset=0,this._prevPos=-1,this._prevPosition=0,this._t=0,this._managed={}}function b(){throw"MovieClipPlugin cannot be instantiated."}var c=createjs.extend(a,createjs.Container);a.INDEPENDENT="independent",a.SINGLE_FRAME="single",a.SYNCHED="synched",a.inited=!1,a.init=function(){a.inited||(b.install(),a.inited=!0)},c.getLabels=function(){return this.timeline.getLabels()},c.getCurrentLabel=function(){return this._updateTimeline(),this.timeline.getCurrentLabel()},c.getDuration=function(){return this.timeline.duration;
10624};try{Object.defineProperties(c,{labels:{get:c.getLabels},currentLabel:{get:c.getCurrentLabel},totalFrames:{get:c.getDuration},duration:{get:c.getDuration}})}catch(d){}c.initialize=a,c.isVisible=function(){return!!(this.visible&&this.alpha>0&&0!=this.scaleX&&0!=this.scaleY)},c.draw=function(a,b){return this.DisplayObject_draw(a,b)?!0:(this._updateTimeline(),this.Container_draw(a,b),!0)},c.play=function(){this.paused=!1},c.stop=function(){this.paused=!0},c.gotoAndPlay=function(a){this.paused=!1,this._goto(a)},c.gotoAndStop=function(a){this.paused=!0,this._goto(a)},c.advance=function(b){var c=a.INDEPENDENT;if(this.mode==c){for(var d=this,e=d.framerate;(d=d.parent)&&null==e;)d.mode==c&&(e=d._framerate);this._framerate=e;var f=null!=e&&-1!=e&&null!=b?b/(1e3/e)+this._t:1,g=0|f;for(this._t=f-g;!this.paused&&g--;)this._prevPosition=this._prevPos<0?0:this._prevPosition+1,this._updateTimeline()}},c.clone=function(){throw"MovieClip cannot be cloned."},c.toString=function(){return"[MovieClip (name="+this.name+")]"},c._tick=function(a){this.advance(a&&a.delta),this.Container__tick(a)},c._goto=function(a){var b=this.timeline.resolve(a);null!=b&&(-1==this._prevPos&&(this._prevPos=NaN),this._prevPosition=b,this._t=0,this._updateTimeline())},c._reset=function(){this._prevPos=-1,this._t=this.currentFrame=0,this.paused=!1},c._updateTimeline=function(){var b=this.timeline,c=this.mode!=a.INDEPENDENT;b.loop=null==this.loop?!0:this.loop;var d=c?this.startPosition+(this.mode==a.SINGLE_FRAME?0:this._synchOffset):this._prevPos<0?0:this._prevPosition,e=c||!this.actionsEnabled?createjs.Tween.NONE:null;if(this.currentFrame=b._calcPosition(d),b.setPosition(d,e),this._prevPosition=b._prevPosition,this._prevPos!=b._prevPos){this.currentFrame=this._prevPos=b._prevPos;for(var f in this._managed)this._managed[f]=1;for(var g=b._tweens,h=0,i=g.length;i>h;h++){var j=g[h],k=j._target;if(k!=this&&!j.passive){var l=j._stepPosition;k instanceof createjs.DisplayObject?this._addManagedChild(k,l):this._setState(k.state,l)}}var m=this.children;for(h=m.length-1;h>=0;h--){var n=m[h].id;1==this._managed[n]&&(this.removeChildAt(h),delete this._managed[n])}}},c._setState=function(a,b){if(a)for(var c=a.length-1;c>=0;c--){var d=a[c],e=d.t,f=d.p;for(var g in f)e[g]=f[g];this._addManagedChild(e,b)}},c._addManagedChild=function(b,c){b._off||(this.addChildAt(b,0),b instanceof a&&(b._synchOffset=c,b.mode==a.INDEPENDENT&&b.autoReset&&!this._managed[b.id]&&b._reset()),this._managed[b.id]=2)},c._getBounds=function(a,b){var c=this.DisplayObject_getBounds();return c||(this._updateTimeline(),this.frameBounds&&(c=this._rectangle.copy(this.frameBounds[this.currentFrame]))),c?this._transformBounds(c,a,b):this.Container__getBounds(a,b)},createjs.MovieClip=createjs.promote(a,"Container"),b.priority=100,b.install=function(){createjs.Tween.installPlugin(b,["startPosition"])},b.init=function(a,b,c){return c},b.step=function(){},b.tween=function(b,c,d,e,f,g,h,i){return b.target instanceof a?1==g?f[c]:e[c]:d}}(),this.createjs=this.createjs||{},function(){"use strict";function a(){throw"SpriteSheetUtils cannot be instantiated"}var b=createjs.createCanvas?createjs.createCanvas():document.createElement("canvas");b.getContext&&(a._workingCanvas=b,a._workingContext=b.getContext("2d"),b.width=b.height=1),a.addFlippedFrames=function(b,c,d,e){if(c||d||e){var f=0;c&&a._flip(b,++f,!0,!1),d&&a._flip(b,++f,!1,!0),e&&a._flip(b,++f,!0,!0)}},a.extractFrame=function(b,c){isNaN(c)&&(c=b.getAnimation(c).frames[0]);var d=b.getFrame(c);if(!d)return null;var e=d.rect,f=a._workingCanvas;f.width=e.width,f.height=e.height,a._workingContext.drawImage(d.image,e.x,e.y,e.width,e.height,0,0,e.width,e.height);var g=document.createElement("img");return g.src=f.toDataURL("image/png"),g},a.mergeAlpha=function(a,b,c){c||(c=createjs.createCanvas?createjs.createCanvas():document.createElement("canvas")),c.width=Math.max(b.width,a.width),c.height=Math.max(b.height,a.height);var d=c.getContext("2d");return d.save(),d.drawImage(a,0,0),d.globalCompositeOperation="destination-in",d.drawImage(b,0,0),d.restore(),c},a._flip=function(b,c,d,e){for(var f=b._images,g=a._workingCanvas,h=a._workingContext,i=f.length/c,j=0;i>j;j++){var k=f[j];k.__tmp=j,h.setTransform(1,0,0,1,0,0),h.clearRect(0,0,g.width+1,g.height+1),g.width=k.width,g.height=k.height,h.setTransform(d?-1:1,0,0,e?-1:1,d?k.width:0,e?k.height:0),h.drawImage(k,0,0);var l=document.createElement("img");l.src=g.toDataURL("image/png"),l.width=k.width,l.height=k.height,f.push(l)}var m=b._frames,n=m.length/c;for(j=0;n>j;j++){k=m[j];var o=k.rect.clone();l=f[k.image.__tmp+i*c];var p={image:l,rect:o,regX:k.regX,regY:k.regY};d&&(o.x=l.width-o.x-o.width,p.regX=o.width-k.regX),e&&(o.y=l.height-o.y-o.height,p.regY=o.height-k.regY),m.push(p)}var q="_"+(d?"h":"")+(e?"v":""),r=b._animations,s=b._data,t=r.length/c;for(j=0;t>j;j++){var u=r[j];k=s[u];var v={name:u+q,speed:k.speed,next:k.next,frames:[]};k.next&&(v.next+=q),m=k.frames;for(var w=0,x=m.length;x>w;w++)v.frames.push(m[w]+n*c);s[v.name]=v,r.push(v.name)}},createjs.SpriteSheetUtils=a}(),this.createjs=this.createjs||{},function(){"use strict";function a(a){this.EventDispatcher_constructor(),this.maxWidth=2048,this.maxHeight=2048,this.spriteSheet=null,this.scale=1,this.padding=1,this.timeSlice=.3,this.progress=-1,this.framerate=a||0,this._frames=[],this._animations={},this._data=null,this._nextFrameIndex=0,this._index=0,this._timerID=null,this._scale=1}var b=createjs.extend(a,createjs.EventDispatcher);a.ERR_DIMENSIONS="frame dimensions exceed max spritesheet dimensions",a.ERR_RUNNING="a build is already running",b.addFrame=function(b,c,d,e,f){if(this._data)throw a.ERR_RUNNING;var g=c||b.bounds||b.nominalBounds;return!g&&b.getBounds&&(g=b.getBounds()),g?(d=d||1,this._frames.push({source:b,sourceRect:g,scale:d,funct:e,data:f,index:this._frames.length,height:g.height*d})-1):null},b.addAnimation=function(b,c,d,e){if(this._data)throw a.ERR_RUNNING;this._animations[b]={frames:c,next:d,speed:e}},b.addMovieClip=function(b,c,d,e,f,g){if(this._data)throw a.ERR_RUNNING;var h=b.frameBounds,i=c||b.bounds||b.nominalBounds;if(!i&&b.getBounds&&(i=b.getBounds()),i||h){var j,k,l=this._frames.length,m=b.timeline.duration;for(j=0;m>j;j++){var n=h&&h[j]?h[j]:i;this.addFrame(b,n,d,this._setupMovieClipFrame,{i:j,f:e,d:f})}var o=b.timeline._labels,p=[];for(var q in o)p.push({index:o[q],label:q});if(p.length)for(p.sort(function(a,b){return a.index-b.index}),j=0,k=p.length;k>j;j++){for(var r=p[j].label,s=l+p[j].index,t=l+(j==k-1?m:p[j+1].index),u=[],v=s;t>v;v++)u.push(v);(!g||(r=g(r,b,s,t)))&&this.addAnimation(r,u,!0)}}},b.build=function(){if(this._data)throw a.ERR_RUNNING;for(this._startBuild();this._drawNext(););return this._endBuild(),this.spriteSheet},b.buildAsync=function(b){if(this._data)throw a.ERR_RUNNING;this.timeSlice=b,this._startBuild();var c=this;this._timerID=setTimeout(function(){c._run()},50-50*Math.max(.01,Math.min(.99,this.timeSlice||.3)))},b.stopAsync=function(){clearTimeout(this._timerID),this._data=null},b.clone=function(){throw"SpriteSheetBuilder cannot be cloned."},b.toString=function(){return"[SpriteSheetBuilder]"},b._startBuild=function(){var b=this.padding||0;this.progress=0,this.spriteSheet=null,this._index=0,this._scale=this.scale;var c=[];this._data={images:[],frames:c,framerate:this.framerate,animations:this._animations};var d=this._frames.slice();if(d.sort(function(a,b){return a.height<=b.height?-1:1}),d[d.length-1].height+2*b>this.maxHeight)throw a.ERR_DIMENSIONS;for(var e=0,f=0,g=0;d.length;){var h=this._fillRow(d,e,g,c,b);if(h.w>f&&(f=h.w),e+=h.h,!h.h||!d.length){var i=createjs.createCanvas?createjs.createCanvas():document.createElement("canvas");i.width=this._getSize(f,this.maxWidth),i.height=this._getSize(e,this.maxHeight),this._data.images[g]=i,h.h||(f=e=0,g++)}}},b._setupMovieClipFrame=function(a,b){var c=a.actionsEnabled;a.actionsEnabled=!1,a.gotoAndStop(b.i),a.actionsEnabled=c,b.f&&b.f(a,b.d,b.i)},b._getSize=function(a,b){for(var c=4;Math.pow(2,++c)<a;);return Math.min(b,Math.pow(2,c))},b._fillRow=function(b,c,d,e,f){var g=this.maxWidth,h=this.maxHeight;c+=f;for(var i=h-c,j=f,k=0,l=b.length-1;l>=0;l--){var m=b[l],n=this._scale*m.scale,o=m.sourceRect,p=m.source,q=Math.floor(n*o.x-f),r=Math.floor(n*o.y-f),s=Math.ceil(n*o.height+2*f),t=Math.ceil(n*o.width+2*f);if(t>g)throw a.ERR_DIMENSIONS;s>i||j+t>g||(m.img=d,m.rect=new createjs.Rectangle(j,c,t,s),k=k||s,b.splice(l,1),e[m.index]=[j,c,t,s,d,Math.round(-q+n*p.regX-f),Math.round(-r+n*p.regY-f)],j+=t)}return{w:j,h:k}},b._endBuild=function(){this.spriteSheet=new createjs.SpriteSheet(this._data),this._data=null,this.progress=1,this.dispatchEvent("complete")},b._run=function(){for(var a=50*Math.max(.01,Math.min(.99,this.timeSlice||.3)),b=(new Date).getTime()+a,c=!1;b>(new Date).getTime();)if(!this._drawNext()){c=!0;break}if(c)this._endBuild();else{var d=this;this._timerID=setTimeout(function(){d._run()},50-a)}var e=this.progress=this._index/this._frames.length;if(this.hasEventListener("progress")){var f=new createjs.Event("progress");f.progress=e,this.dispatchEvent(f)}},b._drawNext=function(){var a=this._frames[this._index],b=a.scale*this._scale,c=a.rect,d=a.sourceRect,e=this._data.images[a.img],f=e.getContext("2d");return a.funct&&a.funct(a.source,a.data),f.save(),f.beginPath(),f.rect(c.x,c.y,c.width,c.height),f.clip(),f.translate(Math.ceil(c.x-d.x*b),Math.ceil(c.y-d.y*b)),f.scale(b,b),a.source.draw(f),f.restore(),++this._index<this._frames.length},createjs.SpriteSheetBuilder=createjs.promote(a,"EventDispatcher")}(),this.createjs=this.createjs||{},function(){"use strict";function a(a){this.DisplayObject_constructor(),"string"==typeof a&&(a=document.getElementById(a)),this.mouseEnabled=!1;var b=a.style;b.position="absolute",b.transformOrigin=b.WebkitTransformOrigin=b.msTransformOrigin=b.MozTransformOrigin=b.OTransformOrigin="0% 0%",this.htmlElement=a,this._oldProps=null}var b=createjs.extend(a,createjs.DisplayObject);b.isVisible=function(){return null!=this.htmlElement},b.draw=function(a,b){return!0},b.cache=function(){},b.uncache=function(){},b.updateCache=function(){},b.hitTest=function(){},b.localToGlobal=function(){},b.globalToLocal=function(){},b.localToLocal=function(){},b.clone=function(){throw"DOMElement cannot be cloned."},b.toString=function(){return"[DOMElement (name="+this.name+")]"},b._tick=function(a){var b=this.getStage();b&&b.on("drawend",this._handleDrawEnd,this,!0),this.DisplayObject__tick(a)},b._handleDrawEnd=function(a){var b=this.htmlElement;if(b){var c=b.style,d=this.getConcatenatedDisplayProps(this._props),e=d.matrix,f=d.visible?"visible":"hidden";if(f!=c.visibility&&(c.visibility=f),d.visible){var g=this._oldProps,h=g&&g.matrix,i=1e4;if(!h||!h.equals(e)){var j="matrix("+(e.a*i|0)/i+","+(e.b*i|0)/i+","+(e.c*i|0)/i+","+(e.d*i|0)/i+","+(e.tx+.5|0);c.transform=c.WebkitTransform=c.OTransform=c.msTransform=j+","+(e.ty+.5|0)+")",c.MozTransform=j+"px,"+(e.ty+.5|0)+"px)",g||(g=this._oldProps=new createjs.DisplayProps(!0,NaN)),g.matrix.copy(e)}g.alpha!=d.alpha&&(c.opacity=""+(d.alpha*i|0)/i,g.alpha=d.alpha)}}},createjs.DOMElement=createjs.promote(a,"DisplayObject")}(),this.createjs=this.createjs||{},function(){"use strict";function a(){}var b=a.prototype;b.getBounds=function(a){return a},b.applyFilter=function(a,b,c,d,e,f,g,h){f=f||a,null==g&&(g=b),null==h&&(h=c);try{var i=a.getImageData(b,c,d,e)}catch(j){return!1}return this._applyFilter(i)?(f.putImageData(i,g,h),!0):!1},b.toString=function(){return"[Filter]"},b.clone=function(){return new a},b._applyFilter=function(a){return!0},createjs.Filter=a}(),this.createjs=this.createjs||{},function(){"use strict";function a(a,b,c){(isNaN(a)||0>a)&&(a=0),(isNaN(b)||0>b)&&(b=0),(isNaN(c)||1>c)&&(c=1),this.blurX=0|a,this.blurY=0|b,this.quality=0|c}var b=createjs.extend(a,createjs.Filter);a.MUL_TABLE=[1,171,205,293,57,373,79,137,241,27,391,357,41,19,283,265,497,469,443,421,25,191,365,349,335,161,155,149,9,278,269,261,505,245,475,231,449,437,213,415,405,395,193,377,369,361,353,345,169,331,325,319,313,307,301,37,145,285,281,69,271,267,263,259,509,501,493,243,479,118,465,459,113,446,55,435,429,423,209,413,51,403,199,393,97,3,379,375,371,367,363,359,355,351,347,43,85,337,333,165,327,323,5,317,157,311,77,305,303,75,297,294,73,289,287,71,141,279,277,275,68,135,67,133,33,262,260,129,511,507,503,499,495,491,61,121,481,477,237,235,467,232,115,457,227,451,7,445,221,439,218,433,215,427,425,211,419,417,207,411,409,203,202,401,399,396,197,49,389,387,385,383,95,189,47,187,93,185,23,183,91,181,45,179,89,177,11,175,87,173,345,343,341,339,337,21,167,83,331,329,327,163,81,323,321,319,159,79,315,313,39,155,309,307,153,305,303,151,75,299,149,37,295,147,73,291,145,289,287,143,285,71,141,281,35,279,139,69,275,137,273,17,271,135,269,267,133,265,33,263,131,261,130,259,129,257,1],a.SHG_TABLE=[0,9,10,11,9,12,10,11,12,9,13,13,10,9,13,13,14,14,14,14,10,13,14,14,14,13,13,13,9,14,14,14,15,14,15,14,15,15,14,15,15,15,14,15,15,15,15,15,14,15,15,15,15,15,15,12,14,15,15,13,15,15,15,15,16,16,16,15,16,14,16,16,14,16,13,16,16,16,15,16,13,16,15,16,14,9,16,16,16,16,16,16,16,16,16,13,14,16,16,15,16,16,10,16,15,16,14,16,16,14,16,16,14,16,16,14,15,16,16,16,14,15,14,15,13,16,16,15,17,17,17,17,17,17,14,15,17,17,16,16,17,16,15,17,16,17,11,17,16,17,16,17,16,17,17,16,17,17,16,17,17,16,16,17,17,17,16,14,17,17,17,17,15,16,14,16,15,16,13,16,15,16,14,16,15,16,12,16,15,16,17,17,17,17,17,13,16,15,17,17,17,16,15,17,17,17,16,15,17,17,14,16,17,17,16,17,17,16,15,17,16,14,17,16,15,17,16,17,17,16,17,15,16,17,14,17,16,15,17,16,17,13,17,16,17,17,16,17,14,17,16,17,16,17,16,17,9],b.getBounds=function(a){var b=0|this.blurX,c=0|this.blurY;if(0>=b&&0>=c)return a;
vendor: 11,210 bytes, line 10624
10624var d=Math.pow(this.quality,.2);return(a||new createjs.Rectangle).pad(b*d+1,c*d+1,b*d+1,c*d+1)},b.clone=function(){return new a(this.blurX,this.blurY,this.quality)},b.toString=function(){return"[BlurFilter]"},b._applyFilter=function(b){var c=this.blurX>>1;if(isNaN(c)||0>c)return!1;var d=this.blurY>>1;if(isNaN(d)||0>d)return!1;if(0==c&&0==d)return!1;var e=this.quality;(isNaN(e)||1>e)&&(e=1),e|=0,e>3&&(e=3),1>e&&(e=1);var f=b.data,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=c+c+1|0,w=d+d+1|0,x=0|b.width,y=0|b.height,z=x-1|0,A=y-1|0,B=c+1|0,C=d+1|0,D={r:0,b:0,g:0,a:0},E=D;for(i=1;v>i;i++)E=E.n={r:0,b:0,g:0,a:0};E.n=D;var F={r:0,b:0,g:0,a:0},G=F;for(i=1;w>i;i++)G=G.n={r:0,b:0,g:0,a:0};G.n=F;for(var H=null,I=0|a.MUL_TABLE[c],J=0|a.SHG_TABLE[c],K=0|a.MUL_TABLE[d],L=0|a.SHG_TABLE[d];e-->0;){m=l=0;var M=I,N=J;for(h=y;--h>-1;){for(n=B*(r=f[0|l]),o=B*(s=f[l+1|0]),p=B*(t=f[l+2|0]),q=B*(u=f[l+3|0]),E=D,i=B;--i>-1;)E.r=r,E.g=s,E.b=t,E.a=u,E=E.n;for(i=1;B>i;i++)j=l+((i>z?z:i)<<2)|0,n+=E.r=f[j],o+=E.g=f[j+1],p+=E.b=f[j+2],q+=E.a=f[j+3],E=E.n;for(H=D,g=0;x>g;g++)f[l++]=n*M>>>N,f[l++]=o*M>>>N,f[l++]=p*M>>>N,f[l++]=q*M>>>N,j=m+((j=g+c+1)<z?j:z)<<2,n-=H.r-(H.r=f[j]),o-=H.g-(H.g=f[j+1]),p-=H.b-(H.b=f[j+2]),q-=H.a-(H.a=f[j+3]),H=H.n;m+=x}for(M=K,N=L,g=0;x>g;g++){for(l=g<<2|0,n=C*(r=f[l])|0,o=C*(s=f[l+1|0])|0,p=C*(t=f[l+2|0])|0,q=C*(u=f[l+3|0])|0,G=F,i=0;C>i;i++)G.r=r,G.g=s,G.b=t,G.a=u,G=G.n;for(k=x,i=1;d>=i;i++)l=k+g<<2,n+=G.r=f[l],o+=G.g=f[l+1],p+=G.b=f[l+2],q+=G.a=f[l+3],G=G.n,A>i&&(k+=x);if(l=g,H=F,e>0)for(h=0;y>h;h++)j=l<<2,f[j+3]=u=q*M>>>N,u>0?(f[j]=n*M>>>N,f[j+1]=o*M>>>N,f[j+2]=p*M>>>N):f[j]=f[j+1]=f[j+2]=0,j=g+((j=h+C)<A?j:A)*x<<2,n-=H.r-(H.r=f[j]),o-=H.g-(H.g=f[j+1]),p-=H.b-(H.b=f[j+2]),q-=H.a-(H.a=f[j+3]),H=H.n,l+=x;else for(h=0;y>h;h++)j=l<<2,f[j+3]=u=q*M>>>N,u>0?(u=255/u,f[j]=(n*M>>>N)*u,f[j+1]=(o*M>>>N)*u,f[j+2]=(p*M>>>N)*u):f[j]=f[j+1]=f[j+2]=0,j=g+((j=h+C)<A?j:A)*x<<2,n-=H.r-(H.r=f[j]),o-=H.g-(H.g=f[j+1]),p-=H.b-(H.b=f[j+2]),q-=H.a-(H.a=f[j+3]),H=H.n,l+=x}}return!0},createjs.BlurFilter=createjs.promote(a,"Filter")}(),this.createjs=this.createjs||{},function(){"use strict";function a(a){this.alphaMap=a,this._alphaMap=null,this._mapData=null}var b=createjs.extend(a,createjs.Filter);b.clone=function(){var b=new a(this.alphaMap);return b._alphaMap=this._alphaMap,b._mapData=this._mapData,b},b.toString=function(){return"[AlphaMapFilter]"},b._applyFilter=function(a){if(!this.alphaMap)return!0;if(!this._prepAlphaMap())return!1;for(var b=a.data,c=this._mapData,d=0,e=b.length;e>d;d+=4)b[d+3]=c[d]||0;return!0},b._prepAlphaMap=function(){if(!this.alphaMap)return!1;if(this.alphaMap==this._alphaMap&&this._mapData)return!0;this._mapData=null;var a,b=this._alphaMap=this.alphaMap,c=b;b instanceof HTMLCanvasElement?a=c.getContext("2d"):(c=createjs.createCanvas?createjs.createCanvas():document.createElement("canvas"),c.width=b.width,c.height=b.height,a=c.getContext("2d"),a.drawImage(b,0,0));try{var d=a.getImageData(0,0,b.width,b.height)}catch(e){return!1}return this._mapData=d.data,!0},createjs.AlphaMapFilter=createjs.promote(a,"Filter")}(),this.createjs=this.createjs||{},function(){"use strict";function a(a){this.mask=a}var b=createjs.extend(a,createjs.Filter);b.applyFilter=function(a,b,c,d,e,f,g,h){return this.mask?(f=f||a,null==g&&(g=b),null==h&&(h=c),f.save(),a!=f?!1:(f.globalCompositeOperation="destination-in",f.drawImage(this.mask,g,h),f.restore(),!0)):!0},b.clone=function(){return new a(this.mask)},b.toString=function(){return"[AlphaMaskFilter]"},createjs.AlphaMaskFilter=createjs.promote(a,"Filter")}(),this.createjs=this.createjs||{},function(){"use strict";function a(a,b,c,d,e,f,g,h){this.redMultiplier=null!=a?a:1,this.greenMultiplier=null!=b?b:1,this.blueMultiplier=null!=c?c:1,this.alphaMultiplier=null!=d?d:1,this.redOffset=e||0,this.greenOffset=f||0,this.blueOffset=g||0,this.alphaOffset=h||0}var b=createjs.extend(a,createjs.Filter);b.toString=function(){return"[ColorFilter]"},b.clone=function(){return new a(this.redMultiplier,this.greenMultiplier,this.blueMultiplier,this.alphaMultiplier,this.redOffset,this.greenOffset,this.blueOffset,this.alphaOffset)},b._applyFilter=function(a){for(var b=a.data,c=b.length,d=0;c>d;d+=4)b[d]=b[d]*this.redMultiplier+this.redOffset,b[d+1]=b[d+1]*this.greenMultiplier+this.greenOffset,b[d+2]=b[d+2]*this.blueMultiplier+this.blueOffset,b[d+3]=b[d+3]*this.alphaMultiplier+this.alphaOffset;return!0},createjs.ColorFilter=createjs.promote(a,"Filter")}(),this.createjs=this.createjs||{},function(){"use strict";function a(a,b,c,d){this.setColor(a,b,c,d)}var b=a.prototype;a.DELTA_INDEX=[0,.01,.02,.04,.05,.06,.07,.08,.1,.11,.12,.14,.15,.16,.17,.18,.2,.21,.22,.24,.25,.27,.28,.3,.32,.34,.36,.38,.4,.42,.44,.46,.48,.5,.53,.56,.59,.62,.65,.68,.71,.74,.77,.8,.83,.86,.89,.92,.95,.98,1,1.06,1.12,1.18,1.24,1.3,1.36,1.42,1.48,1.54,1.6,1.66,1.72,1.78,1.84,1.9,1.96,2,2.12,2.25,2.37,2.5,2.62,2.75,2.87,3,3.2,3.4,3.6,3.8,4,4.3,4.7,4.9,5,5.5,6,6.5,6.8,7,7.3,7.5,7.8,8,8.4,8.7,9,9.4,9.6,9.8,10],a.IDENTITY_MATRIX=[1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1],a.LENGTH=a.IDENTITY_MATRIX.length,b.setColor=function(a,b,c,d){return this.reset().adjustColor(a,b,c,d)},b.reset=function(){return this.copy(a.IDENTITY_MATRIX)},b.adjustColor=function(a,b,c,d){return this.adjustHue(d),this.adjustContrast(b),this.adjustBrightness(a),this.adjustSaturation(c)},b.adjustBrightness=function(a){return 0==a||isNaN(a)?this:(a=this._cleanValue(a,255),this._multiplyMatrix([1,0,0,0,a,0,1,0,0,a,0,0,1,0,a,0,0,0,1,0,0,0,0,0,1]),this)},b.adjustContrast=function(b){if(0==b||isNaN(b))return this;b=this._cleanValue(b,100);var c;return 0>b?c=127+b/100*127:(c=b%1,c=0==c?a.DELTA_INDEX[b]:a.DELTA_INDEX[b<<0]*(1-c)+a.DELTA_INDEX[(b<<0)+1]*c,c=127*c+127),this._multiplyMatrix([c/127,0,0,0,.5*(127-c),0,c/127,0,0,.5*(127-c),0,0,c/127,0,.5*(127-c),0,0,0,1,0,0,0,0,0,1]),this},b.adjustSaturation=function(a){if(0==a||isNaN(a))return this;a=this._cleanValue(a,100);var b=1+(a>0?3*a/100:a/100),c=.3086,d=.6094,e=.082;return this._multiplyMatrix([c*(1-b)+b,d*(1-b),e*(1-b),0,0,c*(1-b),d*(1-b)+b,e*(1-b),0,0,c*(1-b),d*(1-b),e*(1-b)+b,0,0,0,0,0,1,0,0,0,0,0,1]),this},b.adjustHue=function(a){if(0==a||isNaN(a))return this;a=this._cleanValue(a,180)/180*Math.PI;var b=Math.cos(a),c=Math.sin(a),d=.213,e=.715,f=.072;return this._multiplyMatrix([d+b*(1-d)+c*-d,e+b*-e+c*-e,f+b*-f+c*(1-f),0,0,d+b*-d+.143*c,e+b*(1-e)+.14*c,f+b*-f+c*-.283,0,0,d+b*-d+c*-(1-d),e+b*-e+c*e,f+b*(1-f)+c*f,0,0,0,0,0,1,0,0,0,0,0,1]),this},b.concat=function(b){return b=this._fixMatrix(b),b.length!=a.LENGTH?this:(this._multiplyMatrix(b),this)},b.clone=function(){return(new a).copy(this)},b.toArray=function(){for(var b=[],c=0,d=a.LENGTH;d>c;c++)b[c]=this[c];return b},b.copy=function(b){for(var c=a.LENGTH,d=0;c>d;d++)this[d]=b[d];return this},b.toString=function(){return"[ColorMatrix]"},b._multiplyMatrix=function(a){var b,c,d,e=[];for(b=0;5>b;b++){for(c=0;5>c;c++)e[c]=this[c+5*b];for(c=0;5>c;c++){var f=0;for(d=0;5>d;d++)f+=a[c+5*d]*e[d];this[c+5*b]=f}}},b._cleanValue=function(a,b){return Math.min(b,Math.max(-b,a))},b._fixMatrix=function(b){return b instanceof a&&(b=b.toArray()),b.length<a.LENGTH?b=b.slice(0,b.length).concat(a.IDENTITY_MATRIX.slice(b.length,a.LENGTH)):b.length>a.LENGTH&&(b=b.slice(0,a.LENGTH)),b},createjs.ColorMatrix=a}(),this.createjs=this.createjs||{},function(){"use strict";function a(a){this.matrix=a}var b=createjs.extend(a,createjs.Filter);b.toString=function(){return"[ColorMatrixFilter]"},b.clone=function(){return new a(this.matrix)},b._applyFilter=function(a){for(var b,c,d,e,f=a.data,g=f.length,h=this.matrix,i=h[0],j=h[1],k=h[2],l=h[3],m=h[4],n=h[5],o=h[6],p=h[7],q=h[8],r=h[9],s=h[10],t=h[11],u=h[12],v=h[13],w=h[14],x=h[15],y=h[16],z=h[17],A=h[18],B=h[19],C=0;g>C;C+=4)b=f[C],c=f[C+1],d=f[C+2],e=f[C+3],f[C]=b*i+c*j+d*k+e*l+m,f[C+1]=b*n+c*o+d*p+e*q+r,f[C+2]=b*s+c*t+d*u+e*v+w,f[C+3]=b*x+c*y+d*z+e*A+B;return!0},createjs.ColorMatrixFilter=createjs.promote(a,"Filter")}(),this.createjs=this.createjs||{},function(){"use strict";function a(){throw"Touch cannot be instantiated"}a.isSupported=function(){return!!("ontouchstart"in window||window.navigator.msPointerEnabled&&window.navigator.msMaxTouchPoints>0||window.navigator.pointerEnabled&&window.navigator.maxTouchPoints>0)},a.enable=function(b,c,d){return b&&b.canvas&&a.isSupported()?b.__touch?!0:(b.__touch={pointers:{},multitouch:!c,preventDefault:!d,count:0},"ontouchstart"in window?a._IOS_enable(b):(window.navigator.msPointerEnabled||window.navigator.pointerEnabled)&&a._IE_enable(b),!0):!1},a.disable=function(b){b&&("ontouchstart"in window?a._IOS_disable(b):(window.navigator.msPointerEnabled||window.navigator.pointerEnabled)&&a._IE_disable(b),delete b.__touch)},a._IOS_enable=function(b){var c=b.canvas,d=b.__touch.f=function(c){a._IOS_handleEvent(b,c)};c.addEventListener("touchstart",d,!1),c.addEventListener("touchmove",d,!1),c.addEventListener("touchend",d,!1),c.addEventListener("touchcancel",d,!1)},a._IOS_disable=function(a){var b=a.canvas;if(b){var c=a.__touch.f;b.removeEventListener("touchstart",c,!1),b.removeEventListener("touchmove",c,!1),b.removeEventListener("touchend",c,!1),b.removeEventListener("touchcancel",c,!1)}},a._IOS_handleEvent=function(a,b){if(a){a.__touch.preventDefault&&b.preventDefault&&b.preventDefault();for(var c=b.changedTouches,d=b.type,e=0,f=c.length;f>e;e++){var g=c[e],h=g.identifier;g.target==a.canvas&&("touchstart"==d?this._handleStart(a,h,b,g.pageX,g.pageY):"touchmove"==d?this._handleMove(a,h,b,g.pageX,g.pageY):("touchend"==d||"touchcancel"==d)&&this._handleEnd(a,h,b))}}},a._IE_enable=function(b){var c=b.canvas,d=b.__touch.f=function(c){a._IE_handleEvent(b,c)};void 0===window.navigator.pointerEnabled?(c.addEventListener("MSPointerDown",d,!1),window.addEventListener("MSPointerMove",d,!1),window.addEventListener("MSPointerUp",d,!1),window.addEventListener("MSPointerCancel",d,!1),b.__touch.preventDefault&&(c.style.msTouchAction="none")):(c.addEventListener("pointerdown",d,!1),window.addEventListener("pointermove",d,!1),window.addEventListener("pointerup",d,!1),window.addEventListener("pointercancel",d,!1),b.__touch.preventDefault&&(c.style.touchAction="none")),b.__touch.activeIDs={}},a._IE_disable=function(a){var b=a.__touch.f;void 0===window.navigator.pointerEnabled?(window.removeEventListener("MSPointerMove",b,!1),window.removeEventListener("MSPointerUp",b,!1),window.removeEventListener("MSPointerCancel",b,!1),a.canvas&&a.canvas.removeEventListener("MSPointerDown",b,!1)):(window.removeEventListener("pointermove",b,!1),window.removeEventListener("pointerup",b,!1),window.removeEventListener("pointercancel",b,!1),a.canvas&&a.canvas.removeEventListener("pointerdown",b,!1))},a._IE_handleEvent=function(a,b){if(a){a.__touch.preventDefault&&b.preventDefault&&b.preventDefault();var c=b.type,d=b.pointerId,e=a.__touch.activeIDs;if("MSPointerDown"==c||"pointerdown"==c){if(b.srcElement!=a.canvas)return;e[d]=!0,this._handleStart(a,d,b,b.pageX,b.pageY)}else e[d]&&("MSPointerMove"==c||"pointermove"==c?this._handleMove(a,d,b,b.pageX,b.pageY):("MSPointerUp"==c||"MSPointerCancel"==c||"pointerup"==c||"pointercancel"==c)&&(delete e[d],this._handleEnd(a,d,b)))}},a._handleStart=function(a,b,c,d,e){var f=a.__touch;
vendor: 101,406 bytes, lines 10624-10627
10624if(f.multitouch||!f.count){var g=f.pointers;g[b]||(g[b]=!0,f.count++,a._handlePointerDown(b,c,d,e))}},a._handleMove=function(a,b,c,d,e){a.__touch.pointers[b]&&a._handlePointerMove(b,c,d,e)},a._handleEnd=function(a,b,c){var d=a.__touch,e=d.pointers;e[b]&&(d.count--,a._handlePointerUp(b,c,!0),delete e[b])},createjs.Touch=a}(),this.createjs=this.createjs||{},function(){"use strict";var a=createjs.EaselJS=createjs.EaselJS||{};a.version="0.8.2",a.buildDate="Thu, 26 Nov 2015 20:44:34 GMT"}(),this.createjs=this.createjs||{},function(){"use strict";var a=createjs.PreloadJS=createjs.PreloadJS||{};a.version="0.6.2",a.buildDate="Thu, 26 Nov 2015 20:44:31 GMT"}(),this.createjs=this.createjs||{},function(){"use strict";createjs.proxy=function(a,b){var c=Array.prototype.slice.call(arguments,2);return function(){return a.apply(b,Array.prototype.slice.call(arguments,0).concat(c))}}}(),this.createjs=this.createjs||{},function(){"use strict";function a(a,b,c){this.Event_constructor("error"),this.title=a,this.message=b,this.data=c}var b=createjs.extend(a,createjs.Event);b.clone=function(){return new createjs.ErrorEvent(this.title,this.message,this.data)},createjs.ErrorEvent=createjs.promote(a,"Event")}(),this.createjs=this.createjs||{},function(a){"use strict";function b(a,b){this.Event_constructor("progress"),this.loaded=a,this.total=null==b?1:b,this.progress=0==b?0:this.loaded/this.total}var c=createjs.extend(b,createjs.Event);c.clone=function(){return new createjs.ProgressEvent(this.loaded,this.total)},createjs.ProgressEvent=createjs.promote(b,"Event")}(window),function(){function a(b,d){function f(a){if(f[a]!==q)return f[a];var b;if("bug-string-char-index"==a)b="a"!="a"[0];else if("json"==a)b=f("json-stringify")&&f("json-parse");else{var c,e='{"a":[1,true,false,null,"\\u0000\\b\\n\\f\\r\\t"]}';if("json-stringify"==a){var i=d.stringify,k="function"==typeof i&&t;if(k){(c=function(){return 1}).toJSON=c;try{k="0"===i(0)&&"0"===i(new g)&&'""'==i(new h)&&i(s)===q&&i(q)===q&&i()===q&&"1"===i(c)&&"[1]"==i([c])&&"[null]"==i([q])&&"null"==i(null)&&"[null,null,null]"==i([q,s,null])&&i({a:[c,!0,!1,null,"\x00\b\n\f\r	"]})==e&&"1"===i(null,c)&&"[\n 1,\n 2\n]"==i([1,2],null,1)&&'"-271821-04-20T00:00:00.000Z"'==i(new j(-864e13))&&'"+275760-09-13T00:00:00.000Z"'==i(new j(864e13))&&'"-000001-01-01T00:00:00.000Z"'==i(new j(-621987552e5))&&'"1969-12-31T23:59:59.999Z"'==i(new j(-1))}catch(l){k=!1}}b=k}if("json-parse"==a){var m=d.parse;if("function"==typeof m)try{if(0===m("0")&&!m(!1)){c=m(e);var n=5==c.a.length&&1===c.a[0];if(n){try{n=!m('"	"')}catch(l){}if(n)try{n=1!==m("01")}catch(l){}if(n)try{n=1!==m("1.")}catch(l){}}}}catch(l){n=!1}b=n}}return f[a]=!!b}b||(b=e.Object()),d||(d=e.Object());var g=b.Number||e.Number,h=b.String||e.String,i=b.Object||e.Object,j=b.Date||e.Date,k=b.SyntaxError||e.SyntaxError,l=b.TypeError||e.TypeError,m=b.Math||e.Math,n=b.JSON||e.JSON;"object"==typeof n&&n&&(d.stringify=n.stringify,d.parse=n.parse);var o,p,q,r=i.prototype,s=r.toString,t=new j(-0xc782b5b800cec);try{t=-109252==t.getUTCFullYear()&&0===t.getUTCMonth()&&1===t.getUTCDate()&&10==t.getUTCHours()&&37==t.getUTCMinutes()&&6==t.getUTCSeconds()&&708==t.getUTCMilliseconds()}catch(u){}if(!f("json")){var v="[object Function]",w="[object Date]",x="[object Number]",y="[object String]",z="[object Array]",A="[object Boolean]",B=f("bug-string-char-index");if(!t)var C=m.floor,D=[0,31,59,90,120,151,181,212,243,273,304,334],E=function(a,b){return D[b]+365*(a-1970)+C((a-1969+(b=+(b>1)))/4)-C((a-1901+b)/100)+C((a-1601+b)/400)};if((o=r.hasOwnProperty)||(o=function(a){var b,c={};return(c.__proto__=null,c.__proto__={toString:1},c).toString!=s?o=function(a){var b=this.__proto__,c=a in(this.__proto__=null,this);return this.__proto__=b,c}:(b=c.constructor,o=function(a){var c=(this.constructor||b).prototype;return a in this&&!(a in c&&this[a]===c[a])}),c=null,o.call(this,a)}),p=function(a,b){var d,e,f,g=0;(d=function(){this.valueOf=0}).prototype.valueOf=0,e=new d;for(f in e)o.call(e,f)&&g++;return d=e=null,g?p=2==g?function(a,b){var c,d={},e=s.call(a)==v;for(c in a)e&&"prototype"==c||o.call(d,c)||!(d[c]=1)||!o.call(a,c)||b(c)}:function(a,b){var c,d,e=s.call(a)==v;for(c in a)e&&"prototype"==c||!o.call(a,c)||(d="constructor"===c)||b(c);(d||o.call(a,c="constructor"))&&b(c)}:(e=["valueOf","toString","toLocaleString","propertyIsEnumerable","isPrototypeOf","hasOwnProperty","constructor"],p=function(a,b){var d,f,g=s.call(a)==v,h=!g&&"function"!=typeof a.constructor&&c[typeof a.hasOwnProperty]&&a.hasOwnProperty||o;for(d in a)g&&"prototype"==d||!h.call(a,d)||b(d);for(f=e.length;d=e[--f];h.call(a,d)&&b(d));}),p(a,b)},!f("json-stringify")){var F={92:"\\\\",34:'\\"',8:"\\b",12:"\\f",10:"\\n",13:"\\r",9:"\\t"},G="000000",H=function(a,b){return(G+(b||0)).slice(-a)},I="\\u00",J=function(a){for(var b='"',c=0,d=a.length,e=!B||d>10,f=e&&(B?a.split(""):a);d>c;c++){var g=a.charCodeAt(c);switch(g){case 8:case 9:case 10:case 12:case 13:case 34:case 92:b+=F[g];break;default:if(32>g){b+=I+H(2,g.toString(16));break}b+=e?f[c]:a.charAt(c)}}return b+'"'},K=function(a,b,c,d,e,f,g){var h,i,j,k,m,n,r,t,u,v,B,D,F,G,I,L;try{h=b[a]}catch(M){}if("object"==typeof h&&h)if(i=s.call(h),i!=w||o.call(h,"toJSON"))"function"==typeof h.toJSON&&(i!=x&&i!=y&&i!=z||o.call(h,"toJSON"))&&(h=h.toJSON(a));else if(h>-1/0&&1/0>h){if(E){for(m=C(h/864e5),j=C(m/365.2425)+1970-1;E(j+1,0)<=m;j++);for(k=C((m-E(j,0))/30.42);E(j,k+1)<=m;k++);m=1+m-E(j,k),n=(h%864e5+864e5)%864e5,r=C(n/36e5)%24,t=C(n/6e4)%60,u=C(n/1e3)%60,v=n%1e3}else j=h.getUTCFullYear(),k=h.getUTCMonth(),m=h.getUTCDate(),r=h.getUTCHours(),t=h.getUTCMinutes(),u=h.getUTCSeconds(),v=h.getUTCMilliseconds();h=(0>=j||j>=1e4?(0>j?"-":"+")+H(6,0>j?-j:j):H(4,j))+"-"+H(2,k+1)+"-"+H(2,m)+"T"+H(2,r)+":"+H(2,t)+":"+H(2,u)+"."+H(3,v)+"Z"}else h=null;if(c&&(h=c.call(b,a,h)),null===h)return"null";if(i=s.call(h),i==A)return""+h;if(i==x)return h>-1/0&&1/0>h?""+h:"null";if(i==y)return J(""+h);if("object"==typeof h){for(G=g.length;G--;)if(g[G]===h)throw l();if(g.push(h),B=[],I=f,f+=e,i==z){for(F=0,G=h.length;G>F;F++)D=K(F,h,c,d,e,f,g),B.push(D===q?"null":D);L=B.length?e?"[\n"+f+B.join(",\n"+f)+"\n"+I+"]":"["+B.join(",")+"]":"[]"}else p(d||h,function(a){var b=K(a,h,c,d,e,f,g);b!==q&&B.push(J(a)+":"+(e?" ":"")+b)}),L=B.length?e?"{\n"+f+B.join(",\n"+f)+"\n"+I+"}":"{"+B.join(",")+"}":"{}";return g.pop(),L}};d.stringify=function(a,b,d){var e,f,g,h;if(c[typeof b]&&b)if((h=s.call(b))==v)f=b;else if(h==z){g={};for(var i,j=0,k=b.length;k>j;i=b[j++],h=s.call(i),(h==y||h==x)&&(g[i]=1));}if(d)if((h=s.call(d))==x){if((d-=d%1)>0)for(e="",d>10&&(d=10);e.length<d;e+=" ");}else h==y&&(e=d.length<=10?d:d.slice(0,10));return K("",(i={},i[""]=a,i),f,g,e,"",[])}}if(!f("json-parse")){var L,M,N=h.fromCharCode,O={92:"\\",34:'"',47:"/",98:"\b",116:"	",110:"\n",102:"\f",114:"\r"},P=function(){throw L=M=null,k()},Q=function(){for(var a,b,c,d,e,f=M,g=f.length;g>L;)switch(e=f.charCodeAt(L)){case 9:case 10:case 13:case 32:L++;break;case 123:case 125:case 91:case 93:case 58:case 44:return a=B?f.charAt(L):f[L],L++,a;case 34:for(a="@",L++;g>L;)if(e=f.charCodeAt(L),32>e)P();else if(92==e)switch(e=f.charCodeAt(++L)){case 92:case 34:
10625case 47:case 98:case 116:case 110:case 102:case 114:a+=O[e],L++;break;case 117:for(b=++L,c=L+4;c>L;L++)e=f.charCodeAt(L),e>=48&&57>=e||e>=97&&102>=e||e>=65&&70>=e||P();a+=N("0x"+f.slice(b,L));break;default:P()}else{if(34==e)break;for(e=f.charCodeAt(L),b=L;e>=32&&92!=e&&34!=e;)e=f.charCodeAt(++L);a+=f.slice(b,L)}if(34==f.charCodeAt(L))return L++,a;P();default:if(b=L,45==e&&(d=!0,e=f.charCodeAt(++L)),e>=48&&57>=e){for(48==e&&(e=f.charCodeAt(L+1),e>=48&&57>=e)&&P(),d=!1;g>L&&(e=f.charCodeAt(L),e>=48&&57>=e);L++);if(46==f.charCodeAt(L)){for(c=++L;g>c&&(e=f.charCodeAt(c),e>=48&&57>=e);c++);c==L&&P(),L=c}if(e=f.charCodeAt(L),101==e||69==e){for(e=f.charCodeAt(++L),(43==e||45==e)&&L++,c=L;g>c&&(e=f.charCodeAt(c),e>=48&&57>=e);c++);c==L&&P(),L=c}return+f.slice(b,L)}if(d&&P(),"true"==f.slice(L,L+4))return L+=4,!0;if("false"==f.slice(L,L+5))return L+=5,!1;if("null"==f.slice(L,L+4))return L+=4,null;P()}return"$"},R=function(a){var b,c;if("$"==a&&P(),"string"==typeof a){if("@"==(B?a.charAt(0):a[0]))return a.slice(1);if("["==a){for(b=[];a=Q(),"]"!=a;c||(c=!0))c&&(","==a?(a=Q(),"]"==a&&P()):P()),","==a&&P(),b.push(R(a));return b}if("{"==a){for(b={};a=Q(),"}"!=a;c||(c=!0))c&&(","==a?(a=Q(),"}"==a&&P()):P()),(","==a||"string"!=typeof a||"@"!=(B?a.charAt(0):a[0])||":"!=Q())&&P(),b[a.slice(1)]=R(Q());return b}P()}return a},S=function(a,b,c){var d=T(a,b,c);d===q?delete a[b]:a[b]=d},T=function(a,b,c){var d,e=a[b];if("object"==typeof e&&e)if(s.call(e)==z)for(d=e.length;d--;)S(e,d,c);else p(e,function(a){S(e,a,c)});return c.call(a,b,e)};d.parse=function(a,b){var c,d;return L=0,M=""+a,c=R(Q()),"$"!=Q()&&P(),L=M=null,b&&s.call(b)==v?T((d={},d[""]=c,d),"",b):c}}}return d.runInContext=a,d}var b="function"==typeof define&&define.amd,c={"function":!0,object:!0},d=c[typeof exports]&&exports&&!exports.nodeType&&exports,e=c[typeof window]&&window||this,f=d&&c[typeof module]&&module&&!module.nodeType&&"object"==typeof global&&global;if(!f||f.global!==f&&f.window!==f&&f.self!==f||(e=f),d&&!b)a(e,d);else{var g=e.JSON,h=e.JSON3,i=!1,j=a(e,e.JSON3={noConflict:function(){return i||(i=!0,e.JSON=g,e.JSON3=h,g=h=null),j}});e.JSON={parse:j.parse,stringify:j.stringify}}b&&define(function(){return j})}.call(this),function(){var a={};a.appendToHead=function(b){a.getHead().appendChild(b)},a.getHead=function(){return document.head||document.getElementsByTagName("head")[0]},a.getBody=function(){return document.body||document.getElementsByTagName("body")[0]},createjs.DomUtils=a}(),function(){var a={};a.parseXML=function(a,b){var c=null;try{if(window.DOMParser){var d=new DOMParser;c=d.parseFromString(a,b)}}catch(e){}if(!c)try{c=new ActiveXObject("Microsoft.XMLDOM"),c.async=!1,c.loadXML(a)}catch(e){c=null}return c},a.parseJSON=function(a){if(null==a)return null;try{return JSON.parse(a)}catch(b){throw b}},createjs.DataUtils=a}(),this.createjs=this.createjs||{},function(){"use strict";function a(){this.src=null,this.type=null,this.id=null,this.maintainOrder=!1,this.callback=null,this.data=null,this.method=createjs.LoadItem.GET,this.values=null,this.headers=null,this.withCredentials=!1,this.mimeType=null,this.crossOrigin=null,this.loadTimeout=c.LOAD_TIMEOUT_DEFAULT}var b=a.prototype={},c=a;c.LOAD_TIMEOUT_DEFAULT=8e3,c.create=function(b){if("string"==typeof b){var d=new a;return d.src=b,d}if(b instanceof c)return b;if(b instanceof Object&&b.src)return null==b.loadTimeout&&(b.loadTimeout=c.LOAD_TIMEOUT_DEFAULT),b;throw new Error("Type not recognized.")},b.set=function(a){for(var b in a)this[b]=a[b];return this},createjs.LoadItem=c}(),function(){var a={};a.ABSOLUTE_PATT=/^(?:\w+:)?\/{2}/i,a.RELATIVE_PATT=/^[.\/]*?\//i,a.EXTENSION_PATT=/\/?[^\/]+\.(\w{1,5})$/i,a.parseURI=function(b){var c={absolute:!1,relative:!1};if(null==b)return c;var d=b.indexOf("?");d>-1&&(b=b.substr(0,d));var e;return a.ABSOLUTE_PATT.test(b)?c.absolute=!0:a.RELATIVE_PATT.test(b)&&(c.relative=!0),(e=b.match(a.EXTENSION_PATT))&&(c.extension=e[1].toLowerCase()),c},a.formatQueryString=function(a,b){if(null==a)throw new Error("You must specify data.");var c=[];for(var d in a)c.push(d+"="+escape(a[d]));return b&&(c=c.concat(b)),c.join("&")},a.buildPath=function(a,b){if(null==b)return a;var c=[],d=a.indexOf("?");if(-1!=d){var e=a.slice(d+1);c=c.concat(e.split("&"))}return-1!=d?a.slice(0,d)+"?"+this.formatQueryString(b,c):a+"?"+this.formatQueryString(b,c)},a.isCrossDomain=function(a){var b=document.createElement("a");b.href=a.src;var c=document.createElement("a");c.href=location.href;var d=""!=b.hostname&&(b.port!=c.port||b.protocol!=c.protocol||b.hostname!=c.hostname);return d},a.isLocal=function(a){var b=document.createElement("a");return b.href=a.src,""==b.hostname&&"file:"==b.protocol},a.isBinary=function(a){switch(a){case createjs.AbstractLoader.IMAGE:case createjs.AbstractLoader.BINARY:return!0;default:return!1}},a.isImageTag=function(a){return a instanceof HTMLImageElement},a.isAudioTag=function(a){return window.HTMLAudioElement?a instanceof HTMLAudioElement:!1},a.isVideoTag=function(a){return window.HTMLVideoElement?a instanceof HTMLVideoElement:!1},a.isText=function(a){switch(a){case createjs.AbstractLoader.TEXT:case createjs.AbstractLoader.JSON:case createjs.AbstractLoader.MANIFEST:case createjs.AbstractLoader.XML:case createjs.AbstractLoader.CSS:case createjs.AbstractLoader.SVG:case createjs.AbstractLoader.JAVASCRIPT:case createjs.AbstractLoader.SPRITESHEET:return!0;default:return!1}},a.getTypeByExtension=function(a){if(null==a)return createjs.AbstractLoader.TEXT;switch(a.toLowerCase()){case"jpeg":case"jpg":case"gif":case"png":case"webp":case"bmp":return createjs.AbstractLoader.IMAGE;case"ogg":case"mp3":case"webm":return createjs.AbstractLoader.SOUND;case"mp4":case"webm":case"ts":return createjs.AbstractLoader.VIDEO;case"json":return createjs.AbstractLoader.JSON;case"xml":return createjs.AbstractLoader.XML;case"css":return createjs.AbstractLoader.CSS;case"js":return createjs.AbstractLoader.JAVASCRIPT;case"svg":return createjs.AbstractLoader.SVG;default:return createjs.AbstractLoader.TEXT}},createjs.RequestUtils=a}(),this.createjs=this.createjs||{},function(){"use strict";function a(a,b,c){this.EventDispatcher_constructor(),this.loaded=!1,this.canceled=!1,this.progress=0,this.type=c,this.resultFormatter=null,a?this._item=createjs.LoadItem.create(a):this._item=null,this._preferXHR=b,this._result=null,this._rawResult=null,this._loadedItems=null,this._tagSrcAttribute=null,this._tag=null}var b=createjs.extend(a,createjs.EventDispatcher),c=a;c.POST="POST",c.GET="GET",c.BINARY="binary",c.CSS="css",c.IMAGE="image",c.JAVASCRIPT="javascript",c.JSON="json",c.JSONP="jsonp",c.MANIFEST="manifest",c.SOUND="sound",c.VIDEO="video",c.SPRITESHEET="spritesheet",c.SVG="svg",c.TEXT="text",c.XML="xml",b.getItem=function(){return this._item},b.getResult=function(a){return a?this._rawResult:this._result},b.getTag=function(){return this._tag},b.setTag=function(a){this._tag=a},b.load=function(){this._createRequest(),this._request.on("complete",this,this),this._request.on("progress",this,this),this._request.on("loadStart",this,this),this._request.on("abort",this,this),this._request.on("timeout",this,this),this._request.on("error",this,this);var a=new createjs.Event("initialize");a.loader=this._request,this.dispatchEvent(a),this._request.load()},b.cancel=function(){this.canceled=!0,this.destroy()},b.destroy=function(){this._request&&(this._request.removeAllEventListeners(),this._request.destroy()),this._request=null,this._item=null,this._rawResult=null,this._result=null,this._loadItems=null,this.removeAllEventListeners()},b.getLoadedItems=function(){return this._loadedItems},b._createRequest=function(){this._preferXHR?this._request=new createjs.XHRRequest(this._item):this._request=new createjs.TagRequest(this._item,this._tag||this._createTag(),this._tagSrcAttribute)},b._createTag=function(a){return null},b._sendLoadStart=function(){this._isCanceled()||this.dispatchEvent("loadstart")},b._sendProgress=function(a){if(!this._isCanceled()){var b=null;"number"==typeof a?(this.progress=a,b=new createjs.ProgressEvent(this.progress)):(b=a,this.progress=a.loaded/a.total,b.progress=this.progress,(isNaN(this.progress)||this.progress==1/0)&&(this.progress=0)),this.hasEventListener("progress")&&this.dispatchEvent(b)}},b._sendComplete=function(){if(!this._isCanceled()){this.loaded=!0;var a=new createjs.Event("complete");a.rawResult=this._rawResult,null!=this._result&&(a.result=this._result),this.dispatchEvent(a)}},b._sendError=function(a){!this._isCanceled()&&this.hasEventListener("error")&&(null==a&&(a=new createjs.ErrorEvent("PRELOAD_ERROR_EMPTY")),this.dispatchEvent(a))},b._isCanceled=function(){return null==window.createjs||this.canceled?!0:!1},b.resultFormatter=null,b.handleEvent=function(a){switch(a.type){case"complete":this._rawResult=a.target._response;var b=this.resultFormatter&&this.resultFormatter(this);b instanceof Function?b.call(this,createjs.proxy(this._resultFormatSuccess,this),createjs.proxy(this._resultFormatFailed,this)):(this._result=b||this._rawResult,this._sendComplete());break;case"progress":this._sendProgress(a);break;case"error":this._sendError(a);break;case"loadstart":this._sendLoadStart();break;case"abort":case"timeout":this._isCanceled()||this.dispatchEvent(new createjs.ErrorEvent("PRELOAD_"+a.type.toUpperCase()+"_ERROR"))}},b._resultFormatSuccess=function(a){this._result=a,this._sendComplete()},b._resultFormatFailed=function(a){this._sendError(a)},b.buildPath=function(a,b){return createjs.RequestUtils.buildPath(a,b)},b.toString=function(){return"[PreloadJS AbstractLoader]"},createjs.AbstractLoader=createjs.promote(a,"EventDispatcher")}(),this.createjs=this.createjs||{},function(){"use strict";function a(a,b,c){this.AbstractLoader_constructor(a,b,c),this.resultFormatter=this._formatResult,this._tagSrcAttribute="src",this.on("initialize",this._updateXHR,this)}var b=createjs.extend(a,createjs.AbstractLoader);b.load=function(){this._tag||(this._tag=this._createTag(this._item.src)),this._tag.preload="auto",this._tag.load(),this.AbstractLoader_load()},b._createTag=function(){},b._createRequest=function(){this._preferXHR?this._request=new createjs.XHRRequest(this._item):this._request=new createjs.MediaTagRequest(this._item,this._tag||this._createTag(),this._tagSrcAttribute)},b._updateXHR=function(a){a.loader.setResponseType&&a.loader.setResponseType("blob")},b._formatResult=function(a){if(this._tag.removeEventListener&&this._tag.removeEventListener("canplaythrough",this._loadedHandler),this._tag.onstalled=null,this._preferXHR){var b=window.URL||window.webkitURL,c=a.getResult(!0);a.getTag().src=b.createObjectURL(c)}return a.getTag()},createjs.AbstractMediaLoader=createjs.promote(a,"AbstractLoader")}(),this.createjs=this.createjs||{},function(){"use strict";var a=function(a){this._item=a},b=createjs.extend(a,createjs.EventDispatcher);b.load=function(){},b.destroy=function(){},b.cancel=function(){},createjs.AbstractRequest=createjs.promote(a,"EventDispatcher")}(),this.createjs=this.createjs||{},function(){"use strict";function a(a,b,c){this.AbstractRequest_constructor(a),this._tag=b,this._tagSrcAttribute=c,this._loadedHandler=createjs.proxy(this._handleTagComplete,this),this._addedToDOM=!1,this._startTagVisibility=null}var b=createjs.extend(a,createjs.AbstractRequest);b.load=function(){this._tag.onload=createjs.proxy(this._handleTagComplete,this),this._tag.onreadystatechange=createjs.proxy(this._handleReadyStateChange,this),this._tag.onerror=createjs.proxy(this._handleError,this);var a=new createjs.Event("initialize");a.loader=this._tag,this.dispatchEvent(a),this._hideTag(),this._loadTimeout=setTimeout(createjs.proxy(this._handleTimeout,this),this._item.loadTimeout),this._tag[this._tagSrcAttribute]=this._item.src,null==this._tag.parentNode&&(window.document.body.appendChild(this._tag),this._addedToDOM=!0)},b.destroy=function(){this._clean(),this._tag=null,this.AbstractRequest_destroy()},b._handleReadyStateChange=function(){clearTimeout(this._loadTimeout);var a=this._tag;("loaded"==a.readyState||"complete"==a.readyState)&&this._handleTagComplete()},b._handleError=function(){this._clean(),this.dispatchEvent("error")},b._handleTagComplete=function(){this._rawResult=this._tag,this._result=this.resultFormatter&&this.resultFormatter(this)||this._rawResult,this._clean(),this._showTag(),this.dispatchEvent("complete")},b._handleTimeout=function(){this._clean(),this.dispatchEvent(new createjs.Event("timeout"))},b._clean=function(){this._tag.onload=null,this._tag.onreadystatechange=null,this._tag.onerror=null,this._addedToDOM&&null!=this._tag.parentNode&&this._tag.parentNode.removeChild(this._tag),clearTimeout(this._loadTimeout)},b._hideTag=function(){this._startTagVisibility=this._tag.style.visibility,this._tag.style.visibility="hidden"},b._showTag=function(){this._tag.style.visibility=this._startTagVisibility},b._handleStalled=function(){},createjs.TagRequest=createjs.promote(a,"AbstractRequest")}(),this.createjs=this.createjs||{},function(){"use strict";function a(a,b,c){this.AbstractRequest_constructor(a),this._tag=b,this._tagSrcAttribute=c,this._loadedHandler=createjs.proxy(this._handleTagComplete,this)}var b=createjs.extend(a,createjs.TagRequest);b.load=function(){var a=createjs.proxy(this._handleStalled,this);this._stalledCallback=a;var b=createjs.proxy(this._handleProgress,this);this._handleProgress=b,this._tag.addEventListener("stalled",a),this._tag.addEventListener("progress",b),this._tag.addEventListener&&this._tag.addEventListener("canplaythrough",this._loadedHandler,!1),this.TagRequest_load()},b._handleReadyStateChange=function(){clearTimeout(this._loadTimeout);var a=this._tag;("loaded"==a.readyState||"complete"==a.readyState)&&this._handleTagComplete()},b._handleStalled=function(){},b._handleProgress=function(a){if(a&&!(a.loaded>0&&0==a.total)){var b=new createjs.ProgressEvent(a.loaded,a.total);this.dispatchEvent(b)}},b._clean=function(){this._tag.removeEventListener&&this._tag.removeEventListener("canplaythrough",this._loadedHandler),this._tag.removeEventListener("stalled",this._stalledCallback),this._tag.removeEventListener("progress",this._progressCallback),this.TagRequest__clean()},createjs.MediaTagRequest=createjs.promote(a,"TagRequest")}(),this.createjs=this.createjs||{},function(){"use strict";function a(a){this.AbstractRequest_constructor(a),this._request=null,this._loadTimeout=null,this._xhrLevel=1,this._response=null,this._rawResponse=null,this._canceled=!1,this._handleLoadStartProxy=createjs.proxy(this._handleLoadStart,this),this._handleProgressProxy=createjs.proxy(this._handleProgress,this),this._handleAbortProxy=createjs.proxy(this._handleAbort,this),this._handleErrorProxy=createjs.proxy(this._handleError,this),this._handleTimeoutProxy=createjs.proxy(this._handleTimeout,this),this._handleLoadProxy=createjs.proxy(this._handleLoad,this),this._handleReadyStateChangeProxy=createjs.proxy(this._handleReadyStateChange,this),!this._createXHR(a)}var b=createjs.extend(a,createjs.AbstractRequest);a.ACTIVEX_VERSIONS=["Msxml2.XMLHTTP.6.0","Msxml2.XMLHTTP.5.0","Msxml2.XMLHTTP.4.0","MSXML2.XMLHTTP.3.0","MSXML2.XMLHTTP","Microsoft.XMLHTTP"],b.getResult=function(a){return a&&this._rawResponse?this._rawResponse:this._response},b.cancel=function(){this.canceled=!0,this._clean(),this._request.abort()},b.load=function(){if(null==this._request)return void this._handleError();null!=this._request.addEventListener?(this._request.addEventListener("loadstart",this._handleLoadStartProxy,!1),this._request.addEventListener("progress",this._handleProgressProxy,!1),this._request.addEventListener("abort",this._handleAbortProxy,!1),this._request.addEventListener("error",this._handleErrorProxy,!1),this._request.addEventListener("timeout",this._handleTimeoutProxy,!1),this._request.addEventListener("load",this._handleLoadProxy,!1),this._request.addEventListener("readystatechange",this._handleReadyStateChangeProxy,!1)):(this._request.onloadstart=this._handleLoadStartProxy,this._request.onprogress=this._handleProgressProxy,this._request.onabort=this._handleAbortProxy,this._request.onerror=this._handleErrorProxy,this._request.ontimeout=this._handleTimeoutProxy,this._request.onload=this._handleLoadProxy,this._request.onreadystatechange=this._handleReadyStateChangeProxy),1==this._xhrLevel&&(this._loadTimeout=setTimeout(createjs.proxy(this._handleTimeout,this),this._item.loadTimeout));try{this._item.values&&this._item.method!=createjs.AbstractLoader.GET?this._item.method==createjs.AbstractLoader.POST&&this._request.send(createjs.RequestUtils.formatQueryString(this._item.values)):this._request.send()}catch(a){this.dispatchEvent(new createjs.ErrorEvent("XHR_SEND",null,a))}},b.setResponseType=function(a){"blob"===a&&(a=window.URL?"blob":"arraybuffer",this._responseType=a),this._request.responseType=a},b.getAllResponseHeaders=function(){return this._request.getAllResponseHeaders instanceof Function?this._request.getAllResponseHeaders():null},b.getResponseHeader=function(a){return this._request.getResponseHeader instanceof Function?this._request.getResponseHeader(a):null},b._handleProgress=function(a){if(a&&!(a.loaded>0&&0==a.total)){var b=new createjs.ProgressEvent(a.loaded,a.total);this.dispatchEvent(b)}},b._handleLoadStart=function(a){clearTimeout(this._loadTimeout),this.dispatchEvent("loadstart")},b._handleAbort=function(a){this._clean(),this.dispatchEvent(new createjs.ErrorEvent("XHR_ABORTED",null,a))},b._handleError=function(a){this._clean(),this.dispatchEvent(new createjs.ErrorEvent(a.message))},b._handleReadyStateChange=function(a){4==this._request.readyState&&this._handleLoad()},b._handleLoad=function(a){if(!this.loaded){this.loaded=!0;var b=this._checkError();if(b)return void this._handleError(b);if(this._response=this._getResponse(),"arraybuffer"===this._responseType)try{this._response=new Blob([this._response])}catch(c){if(window.BlobBuilder=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder||window.MSBlobBuilder,"TypeError"===c.name&&window.BlobBuilder){var d=new BlobBuilder;d.append(this._response),this._response=d.getBlob()}}this._clean(),this.dispatchEvent(new createjs.Event("complete"))}},b._handleTimeout=function(a){this._clean(),this.dispatchEvent(new createjs.ErrorEvent("PRELOAD_TIMEOUT",null,a))},b._checkError=function(){var a=parseInt(this._request.status);switch(a){case 404:case 0:return new Error(a)}return null},b._getResponse=function(){if(null!=this._response)return this._response;if(null!=this._request.response)return this._request.response;try{if(null!=this._request.responseText)return this._request.responseText}catch(a){}try{if(null!=this._request.responseXML)return this._request.responseXML}catch(a){}return null},b._createXHR=function(a){var b=createjs.RequestUtils.isCrossDomain(a),c={},d=null;if(window.XMLHttpRequest)d=new XMLHttpRequest,b&&void 0===d.withCredentials&&window.XDomainRequest&&(d=new XDomainRequest);else{for(var e=0,f=s.ACTIVEX_VERSIONS.length;f>e;e++){var g=s.ACTIVEX_VERSIONS[e];try{d=new ActiveXObject(g);break}catch(h){}}if(null==d)return!1}null==a.mimeType&&createjs.RequestUtils.isText(a.type)&&(a.mimeType="text/plain; charset=utf-8"),a.mimeType&&d.overrideMimeType&&d.overrideMimeType(a.mimeType),this._xhrLevel="string"==typeof d.responseType?2:1;var i=null;if(i=a.method==createjs.AbstractLoader.GET?createjs.RequestUtils.buildPath(a.src,a.values):a.src,d.open(a.method||createjs.AbstractLoader.GET,i,!0),b&&d instanceof XMLHttpRequest&&1==this._xhrLevel&&(c.Origin=location.origin),a.values&&a.method==createjs.AbstractLoader.POST&&(c["Content-Type"]="application/x-www-form-urlencoded"),b||c["X-Requested-With"]||(c["X-Requested-With"]="XMLHttpRequest"),a.headers)for(var j in a.headers)c[j]=a.headers[j];for(j in c)d.setRequestHeader(j,c[j]);return d instanceof XMLHttpRequest&&void 0!==a.withCredentials&&(d.withCredentials=a.withCredentials),this._request=d,!0},b._clean=function(){clearTimeout(this._loadTimeout),null!=this._request.removeEventListener?(this._request.removeEventListener("loadstart",this._handleLoadStartProxy),this._request.removeEventListener("progress",this._handleProgressProxy),this._request.removeEventListener("abort",this._handleAbortProxy),this._request.removeEventListener("error",this._handleErrorProxy),this._request.removeEventListener("timeout",this._handleTimeoutProxy),this._request.removeEventListener("load",this._handleLoadProxy),this._request.removeEventListener("readystatechange",this._handleReadyStateChangeProxy)):(this._request.onloadstart=null,this._request.onprogress=null,this._request.onabort=null,this._request.onerror=null,this._request.ontimeout=null,this._request.onload=null,this._request.onreadystatechange=null)},b.toString=function(){return"[PreloadJS XHRRequest]"},createjs.XHRRequest=createjs.promote(a,"AbstractRequest")}(),this.createjs=this.createjs||{},function(){"use strict";function a(a,b,c){this.AbstractLoader_constructor(),this._plugins=[],this._typeCallbacks={},this._extensionCallbacks={},this.next=null,this.maintainScriptOrder=!0,this.stopOnError=!1,this._maxConnections=1,this._availableLoaders=[createjs.ImageLoader,createjs.JavaScriptLoader,createjs.CSSLoader,createjs.JSONLoader,createjs.JSONPLoader,createjs.SoundLoader,createjs.ManifestLoader,createjs.SpriteSheetLoader,createjs.XMLLoader,createjs.SVGLoader,createjs.BinaryLoader,createjs.VideoLoader,createjs.TextLoader],this._defaultLoaderLength=this._availableLoaders.length,this.init(a,b,c)}var b=createjs.extend(a,createjs.AbstractLoader),c=a;b.init=function(a,b,c){this.useXHR=!0,this.preferXHR=!0,this._preferXHR=!0,this.setPreferXHR(a),this._paused=!1,this._basePath=b,this._crossOrigin=c,this._loadStartWasDispatched=!1,this._currentlyLoadingScript=null,this._currentLoads=[],this._loadQueue=[],this._loadQueueBackup=[],this._loadItemsById={},this._loadItemsBySrc={},this._loadedResults={},this._loadedRawResults={},this._numItems=0,this._numItemsLoaded=0,this._scriptOrder=[],this._loadedScripts=[],this._lastProgress=NaN},c.loadTimeout=8e3,c.LOAD_TIMEOUT=0,c.BINARY=createjs.AbstractLoader.BINARY,c.CSS=createjs.AbstractLoader.CSS,c.IMAGE=createjs.AbstractLoader.IMAGE,c.JAVASCRIPT=createjs.AbstractLoader.JAVASCRIPT,c.JSON=createjs.AbstractLoader.JSON,c.JSONP=createjs.AbstractLoader.JSONP,c.MANIFEST=createjs.AbstractLoader.MANIFEST,c.SOUND=createjs.AbstractLoader.SOUND,c.VIDEO=createjs.AbstractLoader.VIDEO,c.SVG=createjs.AbstractLoader.SVG,c.TEXT=createjs.AbstractLoader.TEXT,c.XML=createjs.AbstractLoader.XML,c.POST=createjs.AbstractLoader.POST,c.GET=createjs.AbstractLoader.GET,b.registerLoader=function(a){if(!a||!a.canLoadItem)throw new Error("loader is of an incorrect type.");if(-1!=this._availableLoaders.indexOf(a))throw new Error("loader already exists.");this._availableLoaders.unshift(a)},b.unregisterLoader=function(a){var b=this._availableLoaders.indexOf(a);-1!=b&&b<this._defaultLoaderLength-1&&this._availableLoaders.splice(b,1)},b.setUseXHR=function(a){return this.setPreferXHR(a)},b.setPreferXHR=function(a){return this.preferXHR=0!=a&&null!=window.XMLHttpRequest,this.preferXHR},b.removeAll=function(){this.remove()},b.remove=function(a){var b=null;if(a&&!Array.isArray(a))b=[a];else if(a)b=a;else if(arguments.length>0)return;var c=!1;if(b){for(;b.length;){var d=b.pop(),e=this.getResult(d);for(f=this._loadQueue.length-1;f>=0;f--)if(g=this._loadQueue[f].getItem(),g.id==d||g.src==d){this._loadQueue.splice(f,1)[0].cancel();break}for(f=this._loadQueueBackup.length-1;f>=0;f--)if(g=this._loadQueueBackup[f].getItem(),g.id==d||g.src==d){this._loadQueueBackup.splice(f,1)[0].cancel();break}if(e)this._disposeItem(this.getItem(d));else for(var f=this._currentLoads.length-1;f>=0;f--){var g=this._currentLoads[f].getItem();if(g.id==d||g.src==d){this._currentLoads.splice(f,1)[0].cancel(),c=!0;break}}}c&&this._loadNext()}else{this.close();for(var h in this._loadItemsById)this._disposeItem(this._loadItemsById[h]);this.init(this.preferXHR,this._basePath)}},b.reset=function(){this.close();for(var a in this._loadItemsById)this._disposeItem(this._loadItemsById[a]);for(var b=[],c=0,d=this._loadQueueBackup.length;d>c;c++)b.push(this._loadQueueBackup[c].getItem());this.loadManifest(b,!1)},b.installPlugin=function(a){if(null!=a&&null!=a.getPreloadHandlers){this._plugins.push(a);var b=a.getPreloadHandlers();if(b.scope=a,null!=b.types)for(var c=0,d=b.types.length;d>c;c++)this._typeCallbacks[b.types[c]]=b;if(null!=b.extensions)for(c=0,d=b.extensions.length;d>c;c++)this._extensionCallbacks[b.extensions[c]]=b}},b.setMaxConnections=function(a){this._maxConnections=a,!this._paused&&this._loadQueue.length>0&&this._loadNext()},b.loadFile=function(a,b,c){if(null==a){var d=new createjs.ErrorEvent("PRELOAD_NO_FILE");return void this._sendError(d)}this._addItem(a,null,c),b!==!1?this.setPaused(!1):this.setPaused(!0)},b.loadManifest=function(a,b,d){var e=null,f=null;if(Array.isArray(a)){if(0==a.length){var g=new createjs.ErrorEvent("PRELOAD_MANIFEST_EMPTY");return void this._sendError(g)}e=a}else if("string"==typeof a)e=[{src:a,type:c.MANIFEST}];else{if("object"!=typeof a){var g=new createjs.ErrorEvent("PRELOAD_MANIFEST_NULL");return void this._sendError(g)}if(void 0!==a.src){if(null==a.type)a.type=c.MANIFEST;else if(a.type!=c.MANIFEST){var g=new createjs.ErrorEvent("PRELOAD_MANIFEST_TYPE");this._sendError(g)}e=[a]}else void 0!==a.manifest&&(e=a.manifest,f=a.path)}for(var h=0,i=e.length;i>h;h++)this._addItem(e[h],f,d);b!==!1?this.setPaused(!1):this.setPaused(!0)},b.load=function(){this.setPaused(!1)},b.getItem=function(a){return this._loadItemsById[a]||this._loadItemsBySrc[a]},b.getResult=function(a,b){var c=this._loadItemsById[a]||this._loadItemsBySrc[a];if(null==c)return null;var d=c.id;return b&&this._loadedRawResults[d]?this._loadedRawResults[d]:this._loadedResults[d]},b.getItems=function(a){var b=[];for(var c in this._loadItemsById){var d=this._loadItemsById[c],e=this.getResult(c);(a!==!0||null!=e)&&b.push({item:d,result:e,rawResult:this.getResult(c,!0)})}return b},b.setPaused=function(a){this._paused=a,this._paused||this._loadNext()},b.close=function(){for(;this._currentLoads.length;)this._currentLoads.pop().cancel();this._scriptOrder.length=0,this._loadedScripts.length=0,this.loadStartWasDispatched=!1,this._itemCount=0,this._lastProgress=NaN},b._addItem=function(a,b,c){var d=this._createLoadItem(a,b,c);if(null!=d){var e=this._createLoader(d);null!=e&&("plugins"in e&&(e.plugins=this._plugins),d._loader=e,this._loadQueue.push(e),this._loadQueueBackup.push(e),this._numItems++,this._updateProgress(),(this.maintainScriptOrder&&d.type==createjs.LoadQueue.JAVASCRIPT||d.maintainOrder===!0)&&(this._scriptOrder.push(d),this._loadedScripts.push(null)))}},b._createLoadItem=function(a,b,c){var d=createjs.LoadItem.create(a);if(null==d)return null;var e="",f=c||this._basePath;if(d.src instanceof Object){if(!d.type)return null;if(b){e=b;var g=createjs.RequestUtils.parseURI(b);null==f||g.absolute||g.relative||(e=f+e)}else null!=f&&(e=f)}else{var h=createjs.RequestUtils.parseURI(d.src);h.extension&&(d.ext=h.extension),null==d.type&&(d.type=createjs.RequestUtils.getTypeByExtension(d.ext));var i=d.src;if(!h.absolute&&!h.relative)if(b){e=b;var g=createjs.RequestUtils.parseURI(b);i=b+i,null==f||g.absolute||g.relative||(e=f+e)}else null!=f&&(e=f);d.src=e+d.src}d.path=e,(void 0===d.id||null===d.id||""===d.id)&&(d.id=i);var j=this._typeCallbacks[d.type]||this._extensionCallbacks[d.ext];if(j){var k=j.callback.call(j.scope,d,this);if(k===!1)return null;k===!0||null!=k&&(d._loader=k),h=createjs.RequestUtils.parseURI(d.src),null!=h.extension&&(d.ext=h.extension)}return this._loadItemsById[d.id]=d,this._loadItemsBySrc[d.src]=d,null==d.crossOrigin&&(d.crossOrigin=this._crossOrigin),d},b._createLoader=function(a){if(null!=a._loader)return a._loader;for(var b=this.preferXHR,c=0;c<this._availableLoaders.length;c++){var d=this._availableLoaders[c];if(d&&d.canLoadItem(a))return new d(a,b)}return null},b._loadNext=function(){if(!this._paused){this._loadStartWasDispatched||(this._sendLoadStart(),this._loadStartWasDispatched=!0),this._numItems==this._numItemsLoaded?(this.loaded=!0,this._sendComplete(),this.next&&this.next.load&&this.next.load()):this.loaded=!1;for(var a=0;a<this._loadQueue.length&&!(this._currentLoads.length>=this._maxConnections);a++){var b=this._loadQueue[a];this._canStartLoad(b)&&(this._loadQueue.splice(a,1),a--,this._loadItem(b))}}},b._loadItem=function(a){a.on("fileload",this._handleFileLoad,this),a.on("progress",this._handleProgress,this),a.on("complete",this._handleFileComplete,this),a.on("error",this._handleError,this),a.on("fileerror",this._handleFileError,this),this._currentLoads.push(a),this._sendFileStart(a.getItem()),a.load()},b._handleFileLoad=function(a){a.target=null,this.dispatchEvent(a)},b._handleFileError=function(a){var b=new createjs.ErrorEvent("FILE_LOAD_ERROR",null,a.item);this._sendError(b)},b._handleError=function(a){var b=a.target;this._numItemsLoaded++,this._finishOrderedItem(b,!0),this._updateProgress();var c=new createjs.ErrorEvent("FILE_LOAD_ERROR",null,b.getItem());this._sendError(c),this.stopOnError?this.setPaused(!0):(this._removeLoadItem(b),this._cleanLoadItem(b),this._loadNext())},b._handleFileComplete=function(a){var b=a.target,c=b.getItem(),d=b.getResult();this._loadedResults[c.id]=d;var e=b.getResult(!0);null!=e&&e!==d&&(this._loadedRawResults[c.id]=e),this._saveLoadedItems(b),this._removeLoadItem(b),this._finishOrderedItem(b)||this._processFinishedLoad(c,b),this._cleanLoadItem(b)},b._saveLoadedItems=function(a){var b=a.getLoadedItems();if(null!==b)for(var c=0;c<b.length;c++){var d=b[c].item;this._loadItemsBySrc[d.src]=d,this._loadItemsById[d.id]=d,this._loadedResults[d.id]=b[c].result,this._loadedRawResults[d.id]=b[c].rawResult}},b._finishOrderedItem=function(a,b){var c=a.getItem();if(this.maintainScriptOrder&&c.type==createjs.LoadQueue.JAVASCRIPT||c.maintainOrder){a instanceof createjs.JavaScriptLoader&&(this._currentlyLoadingScript=!1);var d=createjs.indexOf(this._scriptOrder,c);return-1==d?!1:(this._loadedScripts[d]=b===!0?!0:c,this._checkScriptLoadOrder(),!0)}return!1},b._checkScriptLoadOrder=function(){for(var a=this._loadedScripts.length,b=0;a>b;b++){var c=this._loadedScripts[b];if(null===c)break;if(c!==!0){var d=this._loadedResults[c.id];c.type==createjs.LoadQueue.JAVASCRIPT&&createjs.DomUtils.appendToHead(d);var e=c._loader;this._processFinishedLoad(c,e),this._loadedScripts[b]=!0}}},b._processFinishedLoad=function(a,b){if(this._numItemsLoaded++,!this.maintainScriptOrder&&a.type==createjs.LoadQueue.JAVASCRIPT){var c=b.getTag();createjs.DomUtils.appendToHead(c)}this._updateProgress(),this._sendFileComplete(a,b),this._loadNext()},b._canStartLoad=function(a){if(!this.maintainScriptOrder||a.preferXHR)return!0;var b=a.getItem();if(b.type!=createjs.LoadQueue.JAVASCRIPT)return!0;if(this._currentlyLoadingScript)return!1;for(var c=this._scriptOrder.indexOf(b),d=0;c>d;){var e=this._loadedScripts[d];if(null==e)return!1;d++}return this._currentlyLoadingScript=!0,!0},b._removeLoadItem=function(a){for(var b=this._currentLoads.length,c=0;b>c;c++)if(this._currentLoads[c]==a){this._currentLoads.splice(c,1);break}},b._cleanLoadItem=function(a){var b=a.getItem();b&&delete b._loader},b._handleProgress=function(a){var b=a.target;this._sendFileProgress(b.getItem(),b.progress),this._updateProgress()},b._updateProgress=function(){var a=this._numItemsLoaded/this._numItems,b=this._numItems-this._numItemsLoaded;if(b>0){for(var c=0,d=0,e=this._currentLoads.length;e>d;d++)c+=this._currentLoads[d].progress;a+=c/b*(b/this._numItems)}this._lastProgress!=a&&(this._sendProgress(a),this._lastProgress=a)},b._disposeItem=function(a){delete this._loadedResults[a.id],delete this._loadedRawResults[a.id],delete this._loadItemsById[a.id],delete this._loadItemsBySrc[a.src]},b._sendFileProgress=function(a,b){if(!this._isCanceled()&&!this._paused&&this.hasEventListener("fileprogress")){var c=new createjs.Event("fileprogress");c.progress=b,c.loaded=b,c.total=1,c.item=a,this.dispatchEvent(c)}},b._sendFileComplete=function(a,b){
10626if(!this._isCanceled()&&!this._paused){var c=new createjs.Event("fileload");c.loader=b,c.item=a,c.result=this._loadedResults[a.id],c.rawResult=this._loadedRawResults[a.id],a.completeHandler&&a.completeHandler(c),this.hasEventListener("fileload")&&this.dispatchEvent(c)}},b._sendFileStart=function(a){var b=new createjs.Event("filestart");b.item=a,this.hasEventListener("filestart")&&this.dispatchEvent(b)},b.toString=function(){return"[PreloadJS LoadQueue]"},createjs.LoadQueue=createjs.promote(a,"AbstractLoader")}(),this.createjs=this.createjs||{},function(){"use strict";function a(a){this.AbstractLoader_constructor(a,!0,createjs.AbstractLoader.TEXT)}var b=(createjs.extend(a,createjs.AbstractLoader),a);b.canLoadItem=function(a){return a.type==createjs.AbstractLoader.TEXT},createjs.TextLoader=createjs.promote(a,"AbstractLoader")}(),this.createjs=this.createjs||{},function(){"use strict";function a(a){this.AbstractLoader_constructor(a,!0,createjs.AbstractLoader.BINARY),this.on("initialize",this._updateXHR,this)}var b=createjs.extend(a,createjs.AbstractLoader),c=a;c.canLoadItem=function(a){return a.type==createjs.AbstractLoader.BINARY},b._updateXHR=function(a){a.loader.setResponseType("arraybuffer")},createjs.BinaryLoader=createjs.promote(a,"AbstractLoader")}(),this.createjs=this.createjs||{},function(){"use strict";function a(a,b){this.AbstractLoader_constructor(a,b,createjs.AbstractLoader.CSS),this.resultFormatter=this._formatResult,this._tagSrcAttribute="href",b?this._tag=document.createElement("style"):this._tag=document.createElement("link"),this._tag.rel="stylesheet",this._tag.type="text/css"}var b=createjs.extend(a,createjs.AbstractLoader),c=a;c.canLoadItem=function(a){return a.type==createjs.AbstractLoader.CSS},b._formatResult=function(a){if(this._preferXHR){var b=a.getTag();if(b.styleSheet)b.styleSheet.cssText=a.getResult(!0);else{var c=document.createTextNode(a.getResult(!0));b.appendChild(c)}}else b=this._tag;return createjs.DomUtils.appendToHead(b),b},createjs.CSSLoader=createjs.promote(a,"AbstractLoader")}(),this.createjs=this.createjs||{},function(){"use strict";function a(a,b){this.AbstractLoader_constructor(a,b,createjs.AbstractLoader.IMAGE),this.resultFormatter=this._formatResult,this._tagSrcAttribute="src",createjs.RequestUtils.isImageTag(a)?this._tag=a:createjs.RequestUtils.isImageTag(a.src)?this._tag=a.src:createjs.RequestUtils.isImageTag(a.tag)&&(this._tag=a.tag),null!=this._tag?this._preferXHR=!1:this._tag=document.createElement("img"),this.on("initialize",this._updateXHR,this)}var b=createjs.extend(a,createjs.AbstractLoader),c=a;c.canLoadItem=function(a){return a.type==createjs.AbstractLoader.IMAGE},b.load=function(){if(""!=this._tag.src&&this._tag.complete)return void this._sendComplete();var a=this._item.crossOrigin;1==a&&(a="Anonymous"),null==a||createjs.RequestUtils.isLocal(this._item.src)||(this._tag.crossOrigin=a),this.AbstractLoader_load()},b._updateXHR=function(a){a.loader.mimeType="text/plain; charset=x-user-defined-binary",a.loader.setResponseType&&a.loader.setResponseType("blob")},b._formatResult=function(a){return this._formatImage},b._formatImage=function(a,b){var c=this._tag,d=window.URL||window.webkitURL;if(this._preferXHR)if(d){var e=d.createObjectURL(this.getResult(!0));c.src=e,c.addEventListener("load",this._cleanUpURL,!1),c.addEventListener("error",this._cleanUpURL,!1)}else c.src=this._item.src;else;c.complete?a(c):(c.onload=createjs.proxy(function(){a(this._tag)},this),c.onerror=createjs.proxy(function(){b(_this._tag)},this))},b._cleanUpURL=function(a){var b=window.URL||window.webkitURL;b.revokeObjectURL(a.target.src)},createjs.ImageLoader=createjs.promote(a,"AbstractLoader")}(),this.createjs=this.createjs||{},function(){"use strict";function a(a,b){this.AbstractLoader_constructor(a,b,createjs.AbstractLoader.JAVASCRIPT),this.resultFormatter=this._formatResult,this._tagSrcAttribute="src",this.setTag(document.createElement("script"))}var b=createjs.extend(a,createjs.AbstractLoader),c=a;c.canLoadItem=function(a){return a.type==createjs.AbstractLoader.JAVASCRIPT},b._formatResult=function(a){var b=a.getTag();return this._preferXHR&&(b.text=a.getResult(!0)),b},createjs.JavaScriptLoader=createjs.promote(a,"AbstractLoader")}(),this.createjs=this.createjs||{},function(){"use strict";function a(a){this.AbstractLoader_constructor(a,!0,createjs.AbstractLoader.JSON),this.resultFormatter=this._formatResult}var b=createjs.extend(a,createjs.AbstractLoader),c=a;c.canLoadItem=function(a){return a.type==createjs.AbstractLoader.JSON},b._formatResult=function(a){var b=null;try{b=createjs.DataUtils.parseJSON(a.getResult(!0))}catch(c){var d=new createjs.ErrorEvent("JSON_FORMAT",null,c);return this._sendError(d),c}return b},createjs.JSONLoader=createjs.promote(a,"AbstractLoader")}(),this.createjs=this.createjs||{},function(){"use strict";function a(a){this.AbstractLoader_constructor(a,!1,createjs.AbstractLoader.JSONP),this.setTag(document.createElement("script")),this.getTag().type="text/javascript"}var b=createjs.extend(a,createjs.AbstractLoader),c=a;c.canLoadItem=function(a){return a.type==createjs.AbstractLoader.JSONP},b.cancel=function(){this.AbstractLoader_cancel(),this._dispose()},b.load=function(){if(null==this._item.callback)throw new Error("callback is required for loading JSONP requests.");if(null!=window[this._item.callback])throw new Error("JSONP callback '"+this._item.callback+"' already exists on window. You need to specify a different callback or re-name the current one.");window[this._item.callback]=createjs.proxy(this._handleLoad,this),window.document.body.appendChild(this._tag),this._loadTimeout=setTimeout(createjs.proxy(this._handleTimeout,this),this._item.loadTimeout),this._tag.src=this._item.src},b._handleLoad=function(a){this._result=this._rawResult=a,this._sendComplete(),this._dispose()},b._handleTimeout=function(){this._dispose(),this.dispatchEvent(new createjs.ErrorEvent("timeout"))},b._dispose=function(){window.document.body.removeChild(this._tag),delete window[this._item.callback],clearTimeout(this._loadTimeout)},createjs.JSONPLoader=createjs.promote(a,"AbstractLoader")}(),this.createjs=this.createjs||{},function(){"use strict";function a(a){this.AbstractLoader_constructor(a,null,createjs.AbstractLoader.MANIFEST),this.plugins=null,this._manifestQueue=null}var b=createjs.extend(a,createjs.AbstractLoader),c=a;c.MANIFEST_PROGRESS=.25,c.canLoadItem=function(a){return a.type==createjs.AbstractLoader.MANIFEST},b.load=function(){this.AbstractLoader_load()},b._createRequest=function(){var a=this._item.callback;null!=a?this._request=new createjs.JSONPLoader(this._item):this._request=new createjs.JSONLoader(this._item)},b.handleEvent=function(a){switch(a.type){case"complete":return this._rawResult=a.target.getResult(!0),this._result=a.target.getResult(),this._sendProgress(c.MANIFEST_PROGRESS),void this._loadManifest(this._result);case"progress":return a.loaded*=c.MANIFEST_PROGRESS,this.progress=a.loaded/a.total,(isNaN(this.progress)||this.progress==1/0)&&(this.progress=0),void this._sendProgress(a)}this.AbstractLoader_handleEvent(a)},b.destroy=function(){this.AbstractLoader_destroy(),this._manifestQueue.close()},b._loadManifest=function(a){if(a&&a.manifest){var b=this._manifestQueue=new createjs.LoadQueue;b.on("fileload",this._handleManifestFileLoad,this),b.on("progress",this._handleManifestProgress,this),b.on("complete",this._handleManifestComplete,this,!0),b.on("error",this._handleManifestError,this,!0);for(var c=0,d=this.plugins.length;d>c;c++)b.installPlugin(this.plugins[c]);b.loadManifest(a)}else this._sendComplete()},b._handleManifestFileLoad=function(a){a.target=null,this.dispatchEvent(a)},b._handleManifestComplete=function(a){this._loadedItems=this._manifestQueue.getItems(!0),this._sendComplete()},b._handleManifestProgress=function(a){this.progress=a.progress*(1-c.MANIFEST_PROGRESS)+c.MANIFEST_PROGRESS,this._sendProgress(this.progress)},b._handleManifestError=function(a){var b=new createjs.Event("fileerror");b.item=a.data,this.dispatchEvent(b)},createjs.ManifestLoader=createjs.promote(a,"AbstractLoader")}(),this.createjs=this.createjs||{},function(){"use strict";function a(a,b){this.AbstractMediaLoader_constructor(a,b,createjs.AbstractLoader.SOUND),createjs.RequestUtils.isAudioTag(a)?this._tag=a:createjs.RequestUtils.isAudioTag(a.src)?this._tag=a:createjs.RequestUtils.isAudioTag(a.tag)&&(this._tag=createjs.RequestUtils.isAudioTag(a)?a:a.src),null!=this._tag&&(this._preferXHR=!1)}var b=createjs.extend(a,createjs.AbstractMediaLoader),c=a;c.canLoadItem=function(a){return a.type==createjs.AbstractLoader.SOUND},b._createTag=function(a){var b=document.createElement("audio");return b.autoplay=!1,b.preload="none",b.src=a,b},createjs.SoundLoader=createjs.promote(a,"AbstractMediaLoader")}(),this.createjs=this.createjs||{},function(){"use strict";function a(a,b){this.AbstractMediaLoader_constructor(a,b,createjs.AbstractLoader.VIDEO),createjs.RequestUtils.isVideoTag(a)||createjs.RequestUtils.isVideoTag(a.src)?(this.setTag(createjs.RequestUtils.isVideoTag(a)?a:a.src),this._preferXHR=!1):this.setTag(this._createTag())}var b=createjs.extend(a,createjs.AbstractMediaLoader),c=a;b._createTag=function(){return document.createElement("video")},c.canLoadItem=function(a){return a.type==createjs.AbstractLoader.VIDEO},createjs.VideoLoader=createjs.promote(a,"AbstractMediaLoader")}(),this.createjs=this.createjs||{},function(){"use strict";function a(a,b){this.AbstractLoader_constructor(a,b,createjs.AbstractLoader.SPRITESHEET),this._manifestQueue=null}var b=createjs.extend(a,createjs.AbstractLoader),c=a;c.SPRITESHEET_PROGRESS=.25,c.canLoadItem=function(a){return a.type==createjs.AbstractLoader.SPRITESHEET},b.destroy=function(){this.AbstractLoader_destroy,this._manifestQueue.close()},b._createRequest=function(){var a=this._item.callback;null!=a?this._request=new createjs.JSONPLoader(this._item):this._request=new createjs.JSONLoader(this._item)},b.handleEvent=function(a){switch(a.type){case"complete":return this._rawResult=a.target.getResult(!0),this._result=a.target.getResult(),this._sendProgress(c.SPRITESHEET_PROGRESS),void this._loadManifest(this._result);case"progress":return a.loaded*=c.SPRITESHEET_PROGRESS,this.progress=a.loaded/a.total,(isNaN(this.progress)||this.progress==1/0)&&(this.progress=0),void this._sendProgress(a)}this.AbstractLoader_handleEvent(a)},b._loadManifest=function(a){if(a&&a.images){var b=this._manifestQueue=new createjs.LoadQueue(this._preferXHR,this._item.path,this._item.crossOrigin);b.on("complete",this._handleManifestComplete,this,!0),b.on("fileload",this._handleManifestFileLoad,this),b.on("progress",this._handleManifestProgress,this),b.on("error",this._handleManifestError,this,!0),b.loadManifest(a.images)}},b._handleManifestFileLoad=function(a){var b=a.result;if(null!=b){var c=this.getResult().images,d=c.indexOf(a.item.src);c[d]=b}},b._handleManifestComplete=function(a){this._result=new createjs.SpriteSheet(this._result),this._loadedItems=this._manifestQueue.getItems(!0),this._sendComplete()},b._handleManifestProgress=function(a){this.progress=a.progress*(1-c.SPRITESHEET_PROGRESS)+c.SPRITESHEET_PROGRESS,this._sendProgress(this.progress)},b._handleManifestError=function(a){var b=new createjs.Event("fileerror");b.item=a.data,this.dispatchEvent(b)},createjs.SpriteSheetLoader=createjs.promote(a,"AbstractLoader")}(),this.createjs=this.createjs||{},function(){"use strict";function a(a,b){this.AbstractLoader_constructor(a,b,createjs.AbstractLoader.SVG),this.resultFormatter=this._formatResult,this._tagSrcAttribute="data",b?this.setTag(document.createElement("svg")):(this.setTag(document.createElement("object")),this.getTag().type="image/svg+xml")}var b=createjs.extend(a,createjs.AbstractLoader),c=a;c.canLoadItem=function(a){return a.type==createjs.AbstractLoader.SVG},b._formatResult=function(a){var b=createjs.DataUtils.parseXML(a.getResult(!0),"text/xml"),c=a.getTag();return!this._preferXHR&&document.body.contains(c)&&document.body.removeChild(c),null!=b.documentElement?(c.appendChild(b.documentElement),c.style.visibility="visible",c):b},createjs.SVGLoader=createjs.promote(a,"AbstractLoader")}(),this.createjs=this.createjs||{},function(){"use strict";function a(a){this.AbstractLoader_constructor(a,!0,createjs.AbstractLoader.XML),this.resultFormatter=this._formatResult}var b=createjs.extend(a,createjs.AbstractLoader),c=a;c.canLoadItem=function(a){return a.type==createjs.AbstractLoader.XML},b._formatResult=function(a){return createjs.DataUtils.parseXML(a.getResult(!0),"text/xml")},createjs.XMLLoader=createjs.promote(a,"AbstractLoader")}(),this.createjs=this.createjs||{},function(){var a=createjs.SoundJS=createjs.SoundJS||{};a.version="0.6.2",a.buildDate="Thu, 26 Nov 2015 20:44:31 GMT"}(),this.createjs=this.createjs||{},createjs.indexOf=function(a,b){"use strict";for(var c=0,d=a.length;d>c;c++)if(b===a[c])return c;return-1},this.createjs=this.createjs||{},function(){"use strict";createjs.proxy=function(a,b){var c=Array.prototype.slice.call(arguments,2);return function(){return a.apply(b,Array.prototype.slice.call(arguments,0).concat(c))}}}(),this.createjs=this.createjs||{},function(){"use strict";function a(){throw"BrowserDetect cannot be instantiated"}var b=a.agent=window.navigator.userAgent;a.isWindowPhone=b.indexOf("IEMobile")>-1||b.indexOf("Windows Phone")>-1,a.isFirefox=b.indexOf("Firefox")>-1,a.isOpera=null!=window.opera,a.isChrome=b.indexOf("Chrome")>-1,a.isIOS=(b.indexOf("iPod")>-1||b.indexOf("iPhone")>-1||b.indexOf("iPad")>-1)&&!a.isWindowPhone,a.isAndroid=b.indexOf("Android")>-1&&!a.isWindowPhone,a.isBlackberry=b.indexOf("Blackberry")>-1,createjs.BrowserDetect=a}(),this.createjs=this.createjs||{},function(){"use strict";var a=function(){this.interrupt=null,this.delay=null,this.offset=null,this.loop=null,this.volume=null,this.pan=null,this.startTime=null,this.duration=null},b=a.prototype={},c=a;c.create=function(a){if(a instanceof c||a instanceof Object){var b=new createjs.PlayPropsConfig;return b.set(a),b}throw new Error("Type not recognized.")},b.set=function(a){for(var b in a)this[b]=a[b];return this},b.toString=function(){return"[PlayPropsConfig]"},createjs.PlayPropsConfig=c}(),this.createjs=this.createjs||{},function(){"use strict";function a(){throw"Sound cannot be instantiated"}function b(a,b){this.init(a,b)}var c=a;c.INTERRUPT_ANY="any",c.INTERRUPT_EARLY="early",c.INTERRUPT_LATE="late",c.INTERRUPT_NONE="none",c.PLAY_INITED="playInited",c.PLAY_SUCCEEDED="playSucceeded",c.PLAY_INTERRUPTED="playInterrupted",c.PLAY_FINISHED="playFinished",c.PLAY_FAILED="playFailed",c.SUPPORTED_EXTENSIONS=["mp3","ogg","opus","mpeg","wav","m4a","mp4","aiff","wma","mid"],c.EXTENSION_MAP={m4a:"mp4"},c.FILE_PATTERN=/^(?:(\w+:)\/{2}(\w+(?:\.\w+)*\/?))?([\/.]*?(?:[^?]+)?\/)?((?:[^\/?]+)\.(\w+))(?:\?(\S+)?)?$/,c.defaultInterruptBehavior=c.INTERRUPT_NONE,c.alternateExtensions=[],c.activePlugin=null,c._masterVolume=1,Object.defineProperty(c,"volume",{get:function(){return this._masterVolume},set:function(a){if(null==Number(a))return!1;if(a=Math.max(0,Math.min(1,a)),c._masterVolume=a,!this.activePlugin||!this.activePlugin.setVolume||!this.activePlugin.setVolume(a))for(var b=this._instances,d=0,e=b.length;e>d;d++)b[d].setMasterVolume(a)}}),c._masterMute=!1,Object.defineProperty(c,"muted",{get:function(){return this._masterMute},set:function(a){if(null==a)return!1;if(this._masterMute=a,!this.activePlugin||!this.activePlugin.setMute||!this.activePlugin.setMute(a))for(var b=this._instances,c=0,d=b.length;d>c;c++)b[c].setMasterMute(a);return!0}}),Object.defineProperty(c,"capabilities",{get:function(){return null==c.activePlugin?null:c.activePlugin._capabilities},set:function(a){return!1}}),c._pluginsRegistered=!1,c._lastID=0,c._instances=[],c._idHash={},c._preloadHash={},c._defaultPlayPropsHash={},c.addEventListener=null,c.removeEventListener=null,c.removeAllEventListeners=null,c.dispatchEvent=null,c.hasEventListener=null,c._listeners=null,createjs.EventDispatcher.initialize(c),c.getPreloadHandlers=function(){return{callback:createjs.proxy(c.initLoad,c),types:["sound"],extensions:c.SUPPORTED_EXTENSIONS}},c._handleLoadComplete=function(a){var b=a.target.getItem().src;if(c._preloadHash[b])for(var d=0,e=c._preloadHash[b].length;e>d;d++){var f=c._preloadHash[b][d];if(c._preloadHash[b][d]=!0,c.hasEventListener("fileload")){var a=new createjs.Event("fileload");a.src=f.src,a.id=f.id,a.data=f.data,a.sprite=f.sprite,c.dispatchEvent(a)}}},c._handleLoadError=function(a){var b=a.target.getItem().src;if(c._preloadHash[b])for(var d=0,e=c._preloadHash[b].length;e>d;d++){var f=c._preloadHash[b][d];if(c._preloadHash[b][d]=!1,c.hasEventListener("fileerror")){var a=new createjs.Event("fileerror");a.src=f.src,a.id=f.id,a.data=f.data,a.sprite=f.sprite,c.dispatchEvent(a)}}},c._registerPlugin=function(a){return a.isSupported()?(c.activePlugin=new a,!0):!1},c.registerPlugins=function(a){c._pluginsRegistered=!0;for(var b=0,d=a.length;d>b;b++)if(c._registerPlugin(a[b]))return!0;return!1},c.initializeDefaultPlugins=function(){return null!=c.activePlugin?!0:c._pluginsRegistered?!1:c.registerPlugins([createjs.WebAudioPlugin,createjs.HTMLAudioPlugin])?!0:!1},c.isReady=function(){return null!=c.activePlugin},c.getCapabilities=function(){return null==c.activePlugin?null:c.activePlugin._capabilities},c.getCapability=function(a){return null==c.activePlugin?null:c.activePlugin._capabilities[a]},c.initLoad=function(a){return c._registerSound(a)},c._registerSound=function(a){if(!c.initializeDefaultPlugins())return!1;var d;if(a.src instanceof Object?(d=c._parseSrc(a.src),d.src=a.path+d.src):d=c._parsePath(a.src),null==d)return!1;a.src=d.src,a.type="sound";var e=a.data,f=null;if(null!=e&&(isNaN(e.channels)?isNaN(e)||(f=parseInt(e)):f=parseInt(e.channels),e.audioSprite))for(var g,h=e.audioSprite.length;h--;)g=e.audioSprite[h],c._idHash[g.id]={src:a.src,startTime:parseInt(g.startTime),duration:parseInt(g.duration)},g.defaultPlayProps&&(c._defaultPlayPropsHash[g.id]=createjs.PlayPropsConfig.create(g.defaultPlayProps));null!=a.id&&(c._idHash[a.id]={src:a.src});var i=c.activePlugin.register(a);return b.create(a.src,f),null!=e&&isNaN(e)?a.data.channels=f||b.maxPerChannel():a.data=f||b.maxPerChannel(),i.type&&(a.type=i.type),a.defaultPlayProps&&(c._defaultPlayPropsHash[a.src]=createjs.PlayPropsConfig.create(a.defaultPlayProps)),i},c.registerSound=function(a,b,d,e,f){var g={src:a,id:b,data:d,defaultPlayProps:f};a instanceof Object&&a.src&&(e=b,g=a),g=createjs.LoadItem.create(g),g.path=e,null==e||g.src instanceof Object||(g.src=e+a);var h=c._registerSound(g);if(!h)return!1;if(c._preloadHash[g.src]||(c._preloadHash[g.src]=[]),c._preloadHash[g.src].push(g),1==c._preloadHash[g.src].length)h.on("complete",createjs.proxy(this._handleLoadComplete,this)),h.on("error",createjs.proxy(this._handleLoadError,this)),c.activePlugin.preload(h);else if(1==c._preloadHash[g.src][0])return!0;return g},c.registerSounds=function(a,b){var c=[];a.path&&(b?b+=a.path:b=a.path,a=a.manifest);for(var d=0,e=a.length;e>d;d++)c[d]=createjs.Sound.registerSound(a[d].src,a[d].id,a[d].data,b,a[d].defaultPlayProps);return c},c.removeSound=function(a,d){if(null==c.activePlugin)return!1;a instanceof Object&&a.src&&(a=a.src);var e;if(a instanceof Object?e=c._parseSrc(a):(a=c._getSrcById(a).src,e=c._parsePath(a)),null==e)return!1;a=e.src,null!=d&&(a=d+a);for(var f in c._idHash)c._idHash[f].src==a&&delete c._idHash[f];return b.removeSrc(a),delete c._preloadHash[a],c.activePlugin.removeSound(a),!0},c.removeSounds=function(a,b){var c=[];a.path&&(b?b+=a.path:b=a.path,a=a.manifest);for(var d=0,e=a.length;e>d;d++)c[d]=createjs.Sound.removeSound(a[d].src,b);return c},c.removeAllSounds=function(){c._idHash={},c._preloadHash={},b.removeAll(),c.activePlugin&&c.activePlugin.removeAllSounds()},c.loadComplete=function(a){if(!c.isReady())return!1;var b=c._parsePath(a);return a=b?c._getSrcById(b.src).src:c._getSrcById(a).src,void 0==c._preloadHash[a]?!1:1==c._preloadHash[a][0]},c._parsePath=function(a){"string"!=typeof a&&(a=a.toString());var b=a.match(c.FILE_PATTERN);if(null==b)return!1;for(var d=b[4],e=b[5],f=c.capabilities,g=0;!f[e];)if(e=c.alternateExtensions[g++],g>c.alternateExtensions.length)return null;a=a.replace("."+b[5],"."+e);var h={name:d,src:a,extension:e};return h},c._parseSrc=function(a){var b={name:void 0,src:void 0,extension:void 0},d=c.capabilities;for(var e in a)if(a.hasOwnProperty(e)&&d[e]){b.src=a[e],b.extension=e;break}if(!b.src)return!1;var f=b.src.lastIndexOf("/");return-1!=f?b.name=b.src.slice(f+1):b.name=b.src,b},c.play=function(a,b,d,e,f,g,h,i,j){var k;k=b instanceof Object||b instanceof createjs.PlayPropsConfig?createjs.PlayPropsConfig.create(b):createjs.PlayPropsConfig.create({interrupt:b,delay:d,offset:e,loop:f,volume:g,pan:h,startTime:i,duration:j});var l=c.createInstance(a,k.startTime,k.duration),m=c._playInstance(l,k);return m||l._playFailed(),l},c.createInstance=function(a,d,e){if(!c.initializeDefaultPlugins())return new createjs.DefaultSoundInstance(a,d,e);var f=c._defaultPlayPropsHash[a];a=c._getSrcById(a);var g=c._parsePath(a.src),h=null;return null!=g&&null!=g.src?(b.create(g.src),null==d&&(d=a.startTime),h=c.activePlugin.create(g.src,d,e||a.duration),f=f||c._defaultPlayPropsHash[g.src],f&&h.applyPlayProps(f)):h=new createjs.DefaultSoundInstance(a,d,e),h.uniqueId=c._lastID++,h},c.stop=function(){for(var a=this._instances,b=a.length;b--;)a[b].stop()},c.setVolume=function(a){if(null==Number(a))return!1;if(a=Math.max(0,Math.min(1,a)),c._masterVolume=a,!this.activePlugin||!this.activePlugin.setVolume||!this.activePlugin.setVolume(a))for(var b=this._instances,d=0,e=b.length;e>d;d++)b[d].setMasterVolume(a)},c.getVolume=function(){return this._masterVolume},c.setMute=function(a){if(null==a)return!1;if(this._masterMute=a,!this.activePlugin||!this.activePlugin.setMute||!this.activePlugin.setMute(a))for(var b=this._instances,c=0,d=b.length;d>c;c++)b[c].setMasterMute(a);return!0},c.getMute=function(){return this._masterMute},c.setDefaultPlayProps=function(a,b){a=c._getSrcById(a),c._defaultPlayPropsHash[c._parsePath(a.src).src]=createjs.PlayPropsConfig.create(b)},c.getDefaultPlayProps=function(a){return a=c._getSrcById(a),c._defaultPlayPropsHash[c._parsePath(a.src).src]},c._playInstance=function(a,b){var d=c._defaultPlayPropsHash[a.src]||{};if(null==b.interrupt&&(b.interrupt=d.interrupt||c.defaultInterruptBehavior),null==b.delay&&(b.delay=d.delay||0),null==b.offset&&(b.offset=a.getPosition()),null==b.loop&&(b.loop=a.loop),null==b.volume&&(b.volume=a.volume),null==b.pan&&(b.pan=a.pan),0==b.delay){var e=c._beginPlaying(a,b);if(!e)return!1}else{var f=setTimeout(function(){c._beginPlaying(a,b)},b.delay);a.delayTimeoutId=f}return this._instances.push(a),!0},c._beginPlaying=function(a,c){if(!b.add(a,c.interrupt))return!1;var d=a._beginPlaying(c);if(!d){var e=createjs.indexOf(this._instances,a);return e>-1&&this._instances.splice(e,1),!1}return!0},c._getSrcById=function(a){return c._idHash[a]||{src:a}},c._playFinished=function(a){b.remove(a);var c=createjs.indexOf(this._instances,a);c>-1&&this._instances.splice(c,1)},createjs.Sound=a,b.channels={},b.create=function(a,c){var d=b.get(a);return null==d?(b.channels[a]=new b(a,c),!0):!1},b.removeSrc=function(a){var c=b.get(a);return null==c?!1:(c._removeAll(),delete b.channels[a],!0)},b.removeAll=function(){for(var a in b.channels)b.channels[a]._removeAll();b.channels={}},b.add=function(a,c){var d=b.get(a.src);return null==d?!1:d._add(a,c)},b.remove=function(a){var c=b.get(a.src);return null==c?!1:(c._remove(a),!0)},b.maxPerChannel=function(){return d.maxDefault},b.get=function(a){return b.channels[a]};var d=b.prototype;d.constructor=b,d.src=null,d.max=null,d.maxDefault=100,d.length=0,d.init=function(a,b){this.src=a,this.max=b||this.maxDefault,-1==this.max&&(this.max=this.maxDefault),this._instances=[]},d._get=function(a){return this._instances[a]},d._add=function(a,b){return this._getSlot(b,a)?(this._instances.push(a),this.length++,!0):!1},d._remove=function(a){var b=createjs.indexOf(this._instances,a);return-1==b?!1:(this._instances.splice(b,1),this.length--,!0)},d._removeAll=function(){for(var a=this.length-1;a>=0;a--)this._instances[a].stop()},d._getSlot=function(b,c){var d,e;if(b!=a.INTERRUPT_NONE&&(e=this._get(0),null==e))return!0;for(var f=0,g=this.max;g>f;f++){if(d=this._get(f),null==d)return!0;if(d.playState==a.PLAY_FINISHED||d.playState==a.PLAY_INTERRUPTED||d.playState==a.PLAY_FAILED){e=d;break}b!=a.INTERRUPT_NONE&&(b==a.INTERRUPT_EARLY&&d.getPosition()<e.getPosition()||b==a.INTERRUPT_LATE&&d.getPosition()>e.getPosition())&&(e=d)}return null!=e?(e._interrupt(),this._remove(e),!0):!1},d.toString=function(){return"[Sound SoundChannel]"}}(),this.createjs=this.createjs||{},function(){"use strict";var a=function(a,b,c,d){this.EventDispatcher_constructor(),this.src=a,this.uniqueId=-1,this.playState=null,this.delayTimeoutId=null,this._volume=1,Object.defineProperty(this,"volume",{get:this.getVolume,set:this.setVolume}),this._pan=0,Object.defineProperty(this,"pan",{get:this.getPan,set:this.setPan}),this._startTime=Math.max(0,b||0),Object.defineProperty(this,"startTime",{get:this.getStartTime,set:this.setStartTime}),this._duration=Math.max(0,c||0),Object.defineProperty(this,"duration",{get:this.getDuration,set:this.setDuration}),this._playbackResource=null,Object.defineProperty(this,"playbackResource",{get:this.getPlaybackResource,set:this.setPlaybackResource}),d!==!1&&d!==!0&&this.setPlaybackResource(d),this._position=0,Object.defineProperty(this,"position",{get:this.getPosition,set:this.setPosition}),this._loop=0,Object.defineProperty(this,"loop",{get:this.getLoop,set:this.setLoop}),this._muted=!1,Object.defineProperty(this,"muted",{get:this.getMuted,set:this.setMuted}),this._paused=!1,Object.defineProperty(this,"paused",{get:this.getPaused,set:this.setPaused})},b=createjs.extend(a,createjs.EventDispatcher);b.play=function(a,b,c,d,e,f){var g;return g=a instanceof Object||a instanceof createjs.PlayPropsConfig?createjs.PlayPropsConfig.create(a):createjs.PlayPropsConfig.create({interrupt:a,delay:b,offset:c,loop:d,volume:e,pan:f}),this.playState==createjs.Sound.PLAY_SUCCEEDED?(this.applyPlayProps(g),void(this._paused&&this.setPaused(!1))):(this._cleanUp(),createjs.Sound._playInstance(this,g),this)},b.stop=function(){return this._position=0,this._paused=!1,this._handleStop(),this._cleanUp(),this.playState=createjs.Sound.PLAY_FINISHED,this},b.destroy=function(){this._cleanUp(),this.src=null,this.playbackResource=null,this.removeAllEventListeners()},b.applyPlayProps=function(a){return null!=a.offset&&this.setPosition(a.offset),null!=a.loop&&this.setLoop(a.loop),null!=a.volume&&this.setVolume(a.volume),null!=a.pan&&this.setPan(a.pan),null!=a.startTime&&(this.setStartTime(a.startTime),this.setDuration(a.duration)),this},b.toString=function(){return"[AbstractSoundInstance]"},b.getPaused=function(){return this._paused},b.setPaused=function(a){return a!==!0&&a!==!1||this._paused==a||1==a&&this.playState!=createjs.Sound.PLAY_SUCCEEDED?void 0:(this._paused=a,a?this._pause():this._resume(),clearTimeout(this.delayTimeoutId),this)},b.setVolume=function(a){return a==this._volume?this:(this._volume=Math.max(0,Math.min(1,a)),this._muted||this._updateVolume(),this)},b.getVolume=function(){return this._volume},b.setMuted=function(a){return a===!0||a===!1?(this._muted=a,this._updateVolume(),this):void 0},b.getMuted=function(){return this._muted},b.setPan=function(a){return a==this._pan?this:(this._pan=Math.max(-1,Math.min(1,a)),this._updatePan(),this)},b.getPan=function(){return this._pan},b.getPosition=function(){return this._paused||this.playState!=createjs.Sound.PLAY_SUCCEEDED||(this._position=this._calculateCurrentPosition()),this._position},b.setPosition=function(a){return this._position=Math.max(0,a),this.playState==createjs.Sound.PLAY_SUCCEEDED&&this._updatePosition(),this},b.getStartTime=function(){return this._startTime},b.setStartTime=function(a){return a==this._startTime?this:(this._startTime=Math.max(0,a||0),this._updateStartTime(),this)},b.getDuration=function(){return this._duration},b.setDuration=function(a){return a==this._duration?this:(this._duration=Math.max(0,a||0),this._updateDuration(),this)},b.setPlaybackResource=function(a){return this._playbackResource=a,0==this._duration&&this._setDurationFromSource(),this},b.getPlaybackResource=function(){return this._playbackResource},b.getLoop=function(){return this._loop},b.setLoop=function(a){null!=this._playbackResource&&(0!=this._loop&&0==a?this._removeLooping(a):0==this._loop&&0!=a&&this._addLooping(a)),this._loop=a},b._sendEvent=function(a){var b=new createjs.Event(a);this.dispatchEvent(b)},b._cleanUp=function(){clearTimeout(this.delayTimeoutId),this._handleCleanUp(),this._paused=!1,createjs.Sound._playFinished(this)},b._interrupt=function(){this._cleanUp(),this.playState=createjs.Sound.PLAY_INTERRUPTED,this._sendEvent("interrupted")},b._beginPlaying=function(a){return this.setPosition(a.offset),this.setLoop(a.loop),this.setVolume(a.volume),this.setPan(a.pan),null!=a.startTime&&(this.setStartTime(a.startTime),this.setDuration(a.duration)),null!=this._playbackResource&&this._position<this._duration?(this._paused=!1,this._handleSoundReady(),this.playState=createjs.Sound.PLAY_SUCCEEDED,this._sendEvent("succeeded"),!0):(this._playFailed(),!1)},b._playFailed=function(){this._cleanUp(),this.playState=createjs.Sound.PLAY_FAILED,this._sendEvent("failed")},b._handleSoundComplete=function(a){return this._position=0,0!=this._loop?(this._loop--,this._handleLoop(),void this._sendEvent("loop")):(this._cleanUp(),this.playState=createjs.Sound.PLAY_FINISHED,void this._sendEvent("complete"))},b._handleSoundReady=function(){},b._updateVolume=function(){},b._updatePan=function(){},b._updateStartTime=function(){},b._updateDuration=function(){},b._setDurationFromSource=function(){},b._calculateCurrentPosition=function(){},b._updatePosition=function(){},b._removeLooping=function(a){},b._addLooping=function(a){},b._pause=function(){},b._resume=function(){},b._handleStop=function(){},b._handleCleanUp=function(){},b._handleLoop=function(){},createjs.AbstractSoundInstance=createjs.promote(a,"EventDispatcher"),createjs.DefaultSoundInstance=createjs.AbstractSoundInstance}(),this.createjs=this.createjs||{},function(){"use strict";var a=function(){this._capabilities=null,this._loaders={},this._audioSources={},this._soundInstances={},this._volume=1,this._loaderClass,this._soundInstanceClass},b=a.prototype;a._capabilities=null,a.isSupported=function(){return!0},b.register=function(a){var b=this._loaders[a.src];return b&&!b.canceled?this._loaders[a.src]:(this._audioSources[a.src]=!0,this._soundInstances[a.src]=[],b=new this._loaderClass(a),b.on("complete",this._handlePreloadComplete,this),this._loaders[a.src]=b,b)},b.preload=function(a){a.on("error",this._handlePreloadError,this),a.load()},b.isPreloadStarted=function(a){return null!=this._audioSources[a]},b.isPreloadComplete=function(a){return!(null==this._audioSources[a]||1==this._audioSources[a])},b.removeSound=function(a){if(this._soundInstances[a]){for(var b=this._soundInstances[a].length;b--;){var c=this._soundInstances[a][b];c.destroy()}delete this._soundInstances[a],delete this._audioSources[a],this._loaders[a]&&this._loaders[a].destroy(),delete this._loaders[a]}},b.removeAllSounds=function(){for(var a in this._audioSources)this.removeSound(a)},b.create=function(a,b,c){this.isPreloadStarted(a)||this.preload(this.register(a));var d=new this._soundInstanceClass(a,b,c,this._audioSources[a]);return this._soundInstances[a].push(d),d},b.setVolume=function(a){return this._volume=a,this._updateVolume(),!0},b.getVolume=function(){return this._volume},b.setMute=function(a){return this._updateVolume(),!0},b.toString=function(){return"[AbstractPlugin]"},b._handlePreloadComplete=function(a){var b=a.target.getItem().src;this._audioSources[b]=a.result;for(var c=0,d=this._soundInstances[b].length;d>c;c++){var e=this._soundInstances[b][c];e.setPlaybackResource(this._audioSources[b]);
10627}},b._handlePreloadError=function(a){},b._updateVolume=function(){},createjs.AbstractPlugin=a}(),this.createjs=this.createjs||{},function(){"use strict";function a(a){this.AbstractLoader_constructor(a,!0,createjs.AbstractLoader.SOUND)}var b=createjs.extend(a,createjs.AbstractLoader);a.context=null,b.toString=function(){return"[WebAudioLoader]"},b._createRequest=function(){this._request=new createjs.XHRRequest(this._item,!1),this._request.setResponseType("arraybuffer")},b._sendComplete=function(b){a.context.decodeAudioData(this._rawResult,createjs.proxy(this._handleAudioDecoded,this),createjs.proxy(this._sendError,this))},b._handleAudioDecoded=function(a){this._result=a,this.AbstractLoader__sendComplete()},createjs.WebAudioLoader=createjs.promote(a,"AbstractLoader")}(),this.createjs=this.createjs||{},function(){"use strict";function a(a,b,d,e){this.AbstractSoundInstance_constructor(a,b,d,e),this.gainNode=c.context.createGain(),this.panNode=c.context.createPanner(),this.panNode.panningModel=c._panningModel,this.panNode.connect(this.gainNode),this._updatePan(),this.sourceNode=null,this._soundCompleteTimeout=null,this._sourceNodeNext=null,this._playbackStartTime=0,this._endedHandler=createjs.proxy(this._handleSoundComplete,this)}var b=createjs.extend(a,createjs.AbstractSoundInstance),c=a;c.context=null,c._scratchBuffer=null,c.destinationNode=null,c._panningModel="equalpower",b.destroy=function(){this.AbstractSoundInstance_destroy(),this.panNode.disconnect(0),this.panNode=null,this.gainNode.disconnect(0),this.gainNode=null},b.toString=function(){return"[WebAudioSoundInstance]"},b._updatePan=function(){this.panNode.setPosition(this._pan,0,-.5)},b._removeLooping=function(a){this._sourceNodeNext=this._cleanUpAudioNode(this._sourceNodeNext)},b._addLooping=function(a){this.playState==createjs.Sound.PLAY_SUCCEEDED&&(this._sourceNodeNext=this._createAndPlayAudioNode(this._playbackStartTime,0))},b._setDurationFromSource=function(){this._duration=1e3*this.playbackResource.duration},b._handleCleanUp=function(){this.sourceNode&&this.playState==createjs.Sound.PLAY_SUCCEEDED&&(this.sourceNode=this._cleanUpAudioNode(this.sourceNode),this._sourceNodeNext=this._cleanUpAudioNode(this._sourceNodeNext)),0!=this.gainNode.numberOfOutputs&&this.gainNode.disconnect(0),clearTimeout(this._soundCompleteTimeout),this._playbackStartTime=0},b._cleanUpAudioNode=function(a){if(a){a.stop(0),a.disconnect(0);try{a.buffer=c._scratchBuffer}catch(b){}a=null}return a},b._handleSoundReady=function(a){this.gainNode.connect(c.destinationNode);var b=.001*this._duration,d=.001*this._position;d>b&&(d=b),this.sourceNode=this._createAndPlayAudioNode(c.context.currentTime-b,d),this._playbackStartTime=this.sourceNode.startTime-d,this._soundCompleteTimeout=setTimeout(this._endedHandler,1e3*(b-d)),0!=this._loop&&(this._sourceNodeNext=this._createAndPlayAudioNode(this._playbackStartTime,0))},b._createAndPlayAudioNode=function(a,b){var d=c.context.createBufferSource();d.buffer=this.playbackResource,d.connect(this.panNode);var e=.001*this._duration;return d.startTime=a+e,d.start(d.startTime,b+.001*this._startTime,e-b),d},b._pause=function(){this._position=1e3*(c.context.currentTime-this._playbackStartTime),this.sourceNode=this._cleanUpAudioNode(this.sourceNode),this._sourceNodeNext=this._cleanUpAudioNode(this._sourceNodeNext),0!=this.gainNode.numberOfOutputs&&this.gainNode.disconnect(0),clearTimeout(this._soundCompleteTimeout)},b._resume=function(){this._handleSoundReady()},b._updateVolume=function(){var a=this._muted?0:this._volume;a!=this.gainNode.gain.value&&(this.gainNode.gain.value=a)},b._calculateCurrentPosition=function(){return 1e3*(c.context.currentTime-this._playbackStartTime)},b._updatePosition=function(){this.sourceNode=this._cleanUpAudioNode(this.sourceNode),this._sourceNodeNext=this._cleanUpAudioNode(this._sourceNodeNext),clearTimeout(this._soundCompleteTimeout),this._paused||this._handleSoundReady()},b._handleLoop=function(){this._cleanUpAudioNode(this.sourceNode),this.sourceNode=this._sourceNodeNext,this._playbackStartTime=this.sourceNode.startTime,this._sourceNodeNext=this._createAndPlayAudioNode(this._playbackStartTime,0),this._soundCompleteTimeout=setTimeout(this._endedHandler,this._duration)},b._updateDuration=function(){this.playState==createjs.Sound.PLAY_SUCCEEDED&&(this._pause(),this._resume())},createjs.WebAudioSoundInstance=createjs.promote(a,"AbstractSoundInstance")}(),this.createjs=this.createjs||{},function(){"use strict";function a(){this.AbstractPlugin_constructor(),this._panningModel=c._panningModel,this.context=c.context,this.dynamicsCompressorNode=this.context.createDynamicsCompressor(),this.dynamicsCompressorNode.connect(this.context.destination),this.gainNode=this.context.createGain(),this.gainNode.connect(this.dynamicsCompressorNode),createjs.WebAudioSoundInstance.destinationNode=this.gainNode,this._capabilities=c._capabilities,this._loaderClass=createjs.WebAudioLoader,this._soundInstanceClass=createjs.WebAudioSoundInstance,this._addPropsToClasses()}var b=createjs.extend(a,createjs.AbstractPlugin),c=a;c._capabilities=null,c._panningModel="equalpower",c.context=null,c._scratchBuffer=null,c._unlocked=!1,c.isSupported=function(){var a=createjs.BrowserDetect.isIOS||createjs.BrowserDetect.isAndroid||createjs.BrowserDetect.isBlackberry;return"file:"!=location.protocol||a||this._isFileXHRSupported()?(c._generateCapabilities(),null==c.context?!1:!0):!1},c.playEmptySound=function(){if(null!=c.context){var a=c.context.createBufferSource();a.buffer=c._scratchBuffer,a.connect(c.context.destination),a.start(0,0,0)}},c._isFileXHRSupported=function(){var a=!0,b=new XMLHttpRequest;try{b.open("GET","WebAudioPluginTest.fail",!1)}catch(c){return a=!1}b.onerror=function(){a=!1},b.onload=function(){a=404==this.status||200==this.status||0==this.status&&""!=this.response};try{b.send()}catch(c){a=!1}return a},c._generateCapabilities=function(){if(null==c._capabilities){var a=document.createElement("audio");if(null==a.canPlayType)return null;if(null==c.context)if(window.AudioContext)c.context=new AudioContext;else{if(!window.webkitAudioContext)return null;c.context=new webkitAudioContext}null==c._scratchBuffer&&(c._scratchBuffer=c.context.createBuffer(1,1,22050)),c._compatibilitySetUp(),"ontouchstart"in window&&"running"!=c.context.state&&(c._unlock(),document.addEventListener("mousedown",c._unlock,!0),document.addEventListener("touchend",c._unlock,!0)),c._capabilities={panning:!0,volume:!0,tracks:-1};for(var b=createjs.Sound.SUPPORTED_EXTENSIONS,d=createjs.Sound.EXTENSION_MAP,e=0,f=b.length;f>e;e++){var g=b[e],h=d[g]||g;c._capabilities[g]="no"!=a.canPlayType("audio/"+g)&&""!=a.canPlayType("audio/"+g)||"no"!=a.canPlayType("audio/"+h)&&""!=a.canPlayType("audio/"+h)}c.context.destination.numberOfChannels<2&&(c._capabilities.panning=!1)}},c._compatibilitySetUp=function(){if(c._panningModel="equalpower",!c.context.createGain){c.context.createGain=c.context.createGainNode;var a=c.context.createBufferSource();a.__proto__.start=a.__proto__.noteGrainOn,a.__proto__.stop=a.__proto__.noteOff,c._panningModel=0}},c._unlock=function(){c._unlocked||(c.playEmptySound(),"running"==c.context.state&&(document.removeEventListener("mousedown",c._unlock,!0),document.removeEventListener("touchend",c._unlock,!0),c._unlocked=!0))},b.toString=function(){return"[WebAudioPlugin]"},b._addPropsToClasses=function(){var a=this._soundInstanceClass;a.context=this.context,a._scratchBuffer=c._scratchBuffer,a.destinationNode=this.gainNode,a._panningModel=this._panningModel,this._loaderClass.context=this.context},b._updateVolume=function(){var a=createjs.Sound._masterMute?0:this._volume;a!=this.gainNode.gain.value&&(this.gainNode.gain.value=a)},createjs.WebAudioPlugin=createjs.promote(a,"AbstractPlugin")}(),this.createjs=this.createjs||{},function(){"use strict";function a(){throw"HTMLAudioTagPool cannot be instantiated"}function b(a){this._tags=[]}var c=a;c._tags={},c._tagPool=new b,c._tagUsed={},c.get=function(a){var b=c._tags[a];return null==b?(b=c._tags[a]=c._tagPool.get(),b.src=a):c._tagUsed[a]?(b=c._tagPool.get(),b.src=a):c._tagUsed[a]=!0,b},c.set=function(a,b){b==c._tags[a]?c._tagUsed[a]=!1:c._tagPool.set(b)},c.remove=function(a){var b=c._tags[a];return null==b?!1:(c._tagPool.set(b),delete c._tags[a],delete c._tagUsed[a],!0)},c.getDuration=function(a){var b=c._tags[a];return null!=b&&b.duration?1e3*b.duration:0},createjs.HTMLAudioTagPool=a;var d=b.prototype;d.constructor=b,d.get=function(){var a;return a=0==this._tags.length?this._createTag():this._tags.pop(),null==a.parentNode&&document.body.appendChild(a),a},d.set=function(a){var b=createjs.indexOf(this._tags,a);-1==b&&(this._tags.src=null,this._tags.push(a))},d.toString=function(){return"[TagPool]"},d._createTag=function(){var a=document.createElement("audio");return a.autoplay=!1,a.preload="none",a}}(),this.createjs=this.createjs||{},function(){"use strict";function a(a,b,c,d){this.AbstractSoundInstance_constructor(a,b,c,d),this._audioSpriteStopTime=null,this._delayTimeoutId=null,this._endedHandler=createjs.proxy(this._handleSoundComplete,this),this._readyHandler=createjs.proxy(this._handleTagReady,this),this._stalledHandler=createjs.proxy(this._playFailed,this),this._audioSpriteEndHandler=createjs.proxy(this._handleAudioSpriteLoop,this),this._loopHandler=createjs.proxy(this._handleSoundComplete,this),c?this._audioSpriteStopTime=.001*(b+c):this._duration=createjs.HTMLAudioTagPool.getDuration(this.src)}var b=createjs.extend(a,createjs.AbstractSoundInstance);b.setMasterVolume=function(a){this._updateVolume()},b.setMasterMute=function(a){this._updateVolume()},b.toString=function(){return"[HTMLAudioSoundInstance]"},b._removeLooping=function(){null!=this._playbackResource&&(this._playbackResource.loop=!1,this._playbackResource.removeEventListener(createjs.HTMLAudioPlugin._AUDIO_SEEKED,this._loopHandler,!1))},b._addLooping=function(){null==this._playbackResource||this._audioSpriteStopTime||(this._playbackResource.addEventListener(createjs.HTMLAudioPlugin._AUDIO_SEEKED,this._loopHandler,!1),this._playbackResource.loop=!0)},b._handleCleanUp=function(){var a=this._playbackResource;if(null!=a){a.pause(),a.loop=!1,a.removeEventListener(createjs.HTMLAudioPlugin._AUDIO_ENDED,this._endedHandler,!1),a.removeEventListener(createjs.HTMLAudioPlugin._AUDIO_READY,this._readyHandler,!1),a.removeEventListener(createjs.HTMLAudioPlugin._AUDIO_STALLED,this._stalledHandler,!1),a.removeEventListener(createjs.HTMLAudioPlugin._AUDIO_SEEKED,this._loopHandler,!1),a.removeEventListener(createjs.HTMLAudioPlugin._TIME_UPDATE,this._audioSpriteEndHandler,!1);try{a.currentTime=this._startTime}catch(b){}createjs.HTMLAudioTagPool.set(this.src,a),this._playbackResource=null}},b._beginPlaying=function(a){return this._playbackResource=createjs.HTMLAudioTagPool.get(this.src),this.AbstractSoundInstance__beginPlaying(a)},b._handleSoundReady=function(a){if(4!==this._playbackResource.readyState){var b=this._playbackResource;return b.addEventListener(createjs.HTMLAudioPlugin._AUDIO_READY,this._readyHandler,!1),b.addEventListener(createjs.HTMLAudioPlugin._AUDIO_STALLED,this._stalledHandler,!1),b.preload="auto",void b.load()}this._updateVolume(),this._playbackResource.currentTime=.001*(this._startTime+this._position),this._audioSpriteStopTime?this._playbackResource.addEventListener(createjs.HTMLAudioPlugin._TIME_UPDATE,this._audioSpriteEndHandler,!1):(this._playbackResource.addEventListener(createjs.HTMLAudioPlugin._AUDIO_ENDED,this._endedHandler,!1),0!=this._loop&&(this._playbackResource.addEventListener(createjs.HTMLAudioPlugin._AUDIO_SEEKED,this._loopHandler,!1),this._playbackResource.loop=!0)),this._playbackResource.play()},b._handleTagReady=function(a){this._playbackResource.removeEventListener(createjs.HTMLAudioPlugin._AUDIO_READY,this._readyHandler,!1),this._playbackResource.removeEventListener(createjs.HTMLAudioPlugin._AUDIO_STALLED,this._stalledHandler,!1),this._handleSoundReady()},b._pause=function(){this._playbackResource.pause()},b._resume=function(){this._playbackResource.play()},b._updateVolume=function(){if(null!=this._playbackResource){var a=this._muted||createjs.Sound._masterMute?0:this._volume*createjs.Sound._masterVolume;a!=this._playbackResource.volume&&(this._playbackResource.volume=a)}},b._calculateCurrentPosition=function(){return 1e3*this._playbackResource.currentTime-this._startTime},b._updatePosition=function(){this._playbackResource.removeEventListener(createjs.HTMLAudioPlugin._AUDIO_SEEKED,this._loopHandler,!1),this._playbackResource.addEventListener(createjs.HTMLAudioPlugin._AUDIO_SEEKED,this._handleSetPositionSeek,!1);try{this._playbackResource.currentTime=.001*(this._position+this._startTime)}catch(a){this._handleSetPositionSeek(null)}},b._handleSetPositionSeek=function(a){null!=this._playbackResource&&(this._playbackResource.removeEventListener(createjs.HTMLAudioPlugin._AUDIO_SEEKED,this._handleSetPositionSeek,!1),this._playbackResource.addEventListener(createjs.HTMLAudioPlugin._AUDIO_SEEKED,this._loopHandler,!1))},b._handleAudioSpriteLoop=function(a){this._playbackResource.currentTime<=this._audioSpriteStopTime||(this._playbackResource.pause(),0==this._loop?this._handleSoundComplete(null):(this._position=0,this._loop--,this._playbackResource.currentTime=.001*this._startTime,this._paused||this._playbackResource.play(),this._sendEvent("loop")))},b._handleLoop=function(a){0==this._loop&&(this._playbackResource.loop=!1,this._playbackResource.removeEventListener(createjs.HTMLAudioPlugin._AUDIO_SEEKED,this._loopHandler,!1))},b._updateStartTime=function(){this._audioSpriteStopTime=.001*(this._startTime+this._duration),this.playState==createjs.Sound.PLAY_SUCCEEDED&&(this._playbackResource.removeEventListener(createjs.HTMLAudioPlugin._AUDIO_ENDED,this._endedHandler,!1),this._playbackResource.addEventListener(createjs.HTMLAudioPlugin._TIME_UPDATE,this._audioSpriteEndHandler,!1))},b._updateDuration=function(){this._audioSpriteStopTime=.001*(this._startTime+this._duration),this.playState==createjs.Sound.PLAY_SUCCEEDED&&(this._playbackResource.removeEventListener(createjs.HTMLAudioPlugin._AUDIO_ENDED,this._endedHandler,!1),this._playbackResource.addEventListener(createjs.HTMLAudioPlugin._TIME_UPDATE,this._audioSpriteEndHandler,!1))},b._setDurationFromSource=function(){this._duration=createjs.HTMLAudioTagPool.getDuration(this.src),this._playbackResource=null},createjs.HTMLAudioSoundInstance=createjs.promote(a,"AbstractSoundInstance")}(),this.createjs=this.createjs||{},function(){"use strict";function a(){this.AbstractPlugin_constructor(),this.defaultNumChannels=2,this._capabilities=c._capabilities,this._loaderClass=createjs.SoundLoader,this._soundInstanceClass=createjs.HTMLAudioSoundInstance}var b=createjs.extend(a,createjs.AbstractPlugin),c=a;c.MAX_INSTANCES=30,c._AUDIO_READY="canplaythrough",c._AUDIO_ENDED="ended",c._AUDIO_SEEKED="seeked",c._AUDIO_STALLED="stalled",c._TIME_UPDATE="timeupdate",c._capabilities=null,c.isSupported=function(){return c._generateCapabilities(),null!=c._capabilities},c._generateCapabilities=function(){if(null==c._capabilities){var a=document.createElement("audio");if(null==a.canPlayType)return null;c._capabilities={panning:!1,volume:!0,tracks:-1};for(var b=createjs.Sound.SUPPORTED_EXTENSIONS,d=createjs.Sound.EXTENSION_MAP,e=0,f=b.length;f>e;e++){var g=b[e],h=d[g]||g;c._capabilities[g]="no"!=a.canPlayType("audio/"+g)&&""!=a.canPlayType("audio/"+g)||"no"!=a.canPlayType("audio/"+h)&&""!=a.canPlayType("audio/"+h)}}},b.register=function(a){var b=createjs.HTMLAudioTagPool.get(a.src),c=this.AbstractPlugin_register(a);return c.setTag(b),c},b.removeSound=function(a){this.AbstractPlugin_removeSound(a),createjs.HTMLAudioTagPool.remove(a)},b.create=function(a,b,c){var d=this.AbstractPlugin_create(a,b,c);return d.setPlaybackResource(null),d},b.toString=function(){return"[HTMLAudioPlugin]"},b.setVolume=b.getVolume=b.setMute=null,createjs.HTMLAudioPlugin=createjs.promote(a,"AbstractPlugin")}(),this.createjs=this.createjs||{},function(){"use strict";function a(b,c,d){this.ignoreGlobalPause=!1,this.loop=!1,this.duration=0,this.pluginData=d||{},this.target=b,this.position=null,this.passive=!1,this._paused=!1,this._curQueueProps={},this._initQueueProps={},this._steps=[],this._actions=[],this._prevPosition=0,this._stepPosition=0,this._prevPos=-1,this._target=b,this._useTicks=!1,this._inited=!1,this._registered=!1,c&&(this._useTicks=c.useTicks,this.ignoreGlobalPause=c.ignoreGlobalPause,this.loop=c.loop,c.onChange&&this.addEventListener("change",c.onChange),c.override&&a.removeTweens(b)),c&&c.paused?this._paused=!0:createjs.Tween._register(this,!0),c&&null!=c.position&&this.setPosition(c.position,a.NONE)}var b=createjs.extend(a,createjs.EventDispatcher);a.NONE=0,a.LOOP=1,a.REVERSE=2,a.IGNORE={},a._tweens=[],a._plugins={},a.get=function(b,c,d,e){return e&&a.removeTweens(b),new a(b,c,d)},a.tick=function(b,c){for(var d=a._tweens.slice(),e=d.length-1;e>=0;e--){var f=d[e];c&&!f.ignoreGlobalPause||f._paused||f.tick(f._useTicks?1:b)}},a.handleEvent=function(a){"tick"==a.type&&this.tick(a.delta,a.paused)},a.removeTweens=function(b){if(b.tweenjs_count){for(var c=a._tweens,d=c.length-1;d>=0;d--){var e=c[d];e._target==b&&(e._paused=!0,c.splice(d,1))}b.tweenjs_count=0}},a.removeAllTweens=function(){for(var b=a._tweens,c=0,d=b.length;d>c;c++){var e=b[c];e._paused=!0,e.target&&(e.target.tweenjs_count=0)}b.length=0},a.hasActiveTweens=function(b){return b?null!=b.tweenjs_count&&!!b.tweenjs_count:a._tweens&&!!a._tweens.length},a.installPlugin=function(b,c){var d=b.priority;null==d&&(b.priority=d=0);for(var e=0,f=c.length,g=a._plugins;f>e;e++){var h=c[e];if(g[h]){for(var i=g[h],j=0,k=i.length;k>j&&!(d<i[j].priority);j++);g[h].splice(j,0,b)}else g[h]=[b]}},a._register=function(b,c){var d=b._target,e=a._tweens;if(c&&!b._registered)d&&(d.tweenjs_count=d.tweenjs_count?d.tweenjs_count+1:1),e.push(b),!a._inited&&createjs.Ticker&&(createjs.Ticker.addEventListener("tick",a),a._inited=!0);else if(!c&&b._registered){d&&d.tweenjs_count--;for(var f=e.length;f--;)if(e[f]==b){e.splice(f,1);break}}b._registered=c},b.wait=function(a,b){if(null==a||0>=a)return this;var c=this._cloneProps(this._curQueueProps);return this._addStep({d:a,p0:c,e:this._linearEase,p1:c,v:b})},b.to=function(a,b,c){return(isNaN(b)||0>b)&&(b=0),this._addStep({d:b||0,p0:this._cloneProps(this._curQueueProps),e:c,p1:this._cloneProps(this._appendQueueProps(a))})},b.call=function(a,b,c){return this._addAction({f:a,p:b?b:[this],o:c?c:this._target})},b.set=function(a,b){return this._addAction({f:this._set,o:this,p:[a,b?b:this._target]})},b.play=function(a){return a||(a=this),this.call(a.setPaused,[!1],a)},b.pause=function(a){return a||(a=this),this.call(a.setPaused,[!0],a)},b.setPosition=function(a,b){0>a&&(a=0),null==b&&(b=1);var c=a,d=!1;if(c>=this.duration&&(this.loop?c%=this.duration:(c=this.duration,d=!0)),c==this._prevPos)return d;var e=this._prevPos;if(this.position=this._prevPos=c,this._prevPosition=a,this._target)if(d)this._updateTargetProps(null,1);else if(this._steps.length>0){for(var f=0,g=this._steps.length;g>f&&!(this._steps[f].t>c);f++);var h=this._steps[f-1];this._updateTargetProps(h,(this._stepPosition=c-h.t)/h.d)}return 0!=b&&this._actions.length>0&&(this._useTicks?this._runActions(c,c):1==b&&e>c?(e!=this.duration&&this._runActions(e,this.duration),this._runActions(0,c,!0)):this._runActions(e,c)),d&&this.setPaused(!0),this.dispatchEvent("change"),d},b.tick=function(a){this._paused||this.setPosition(this._prevPosition+a)},b.setPaused=function(b){return this._paused===!!b?this:(this._paused=!!b,a._register(this,!b),this)},b.w=b.wait,b.t=b.to,b.c=b.call,b.s=b.set,b.toString=function(){return"[Tween]"},b.clone=function(){throw"Tween can not be cloned."},b._updateTargetProps=function(b,c){var d,e,f,g,h,i;if(b||1!=c){if(this.passive=!!b.v,this.passive)return;b.e&&(c=b.e(c,0,1,1)),d=b.p0,e=b.p1}else this.passive=!1,d=e=this._curQueueProps;for(var j in this._initQueueProps){null==(g=d[j])&&(d[j]=g=this._initQueueProps[j]),null==(h=e[j])&&(e[j]=h=g),f=g==h||0==c||1==c||"number"!=typeof g?1==c?h:g:g+(h-g)*c;var k=!1;if(i=a._plugins[j])for(var l=0,m=i.length;m>l;l++){var n=i[l].tween(this,j,f,d,e,c,!!b&&d==e,!b);n==a.IGNORE?k=!0:f=n}k||(this._target[j]=f)}},b._runActions=function(a,b,c){var d=a,e=b,f=-1,g=this._actions.length,h=1;for(a>b&&(d=b,e=a,f=g,g=h=-1);(f+=h)!=g;){var i=this._actions[f],j=i.t;(j==e||j>d&&e>j||c&&j==a)&&i.f.apply(i.o,i.p)}},b._appendQueueProps=function(b){var c,d,e,f,g;for(var h in b)if(void 0===this._initQueueProps[h]){if(d=this._target[h],c=a._plugins[h])for(e=0,f=c.length;f>e;e++)d=c[e].init(this,h,d);this._initQueueProps[h]=this._curQueueProps[h]=void 0===d?null:d}else d=this._curQueueProps[h];for(var h in b){if(d=this._curQueueProps[h],c=a._plugins[h])for(g=g||{},e=0,f=c.length;f>e;e++)c[e].step&&c[e].step(this,h,d,b[h],g);this._curQueueProps[h]=b[h]}return g&&this._appendQueueProps(g),this._curQueueProps},b._cloneProps=function(a){var b={};for(var c in a)b[c]=a[c];return b},b._addStep=function(a){return a.d>0&&(this._steps.push(a),a.t=this.duration,this.duration+=a.d),this},b._addAction=function(a){return a.t=this.duration,this._actions.push(a),this},b._set=function(a,b){for(var c in a)b[c]=a[c]},createjs.Tween=createjs.promote(a,"EventDispatcher")}(),this.createjs=this.createjs||{},function(){"use strict";function a(a,b,c){this.EventDispatcher_constructor(),this.ignoreGlobalPause=!1,this.duration=0,this.loop=!1,this.position=null,this._paused=!1,this._tweens=[],this._labels=null,this._labelList=null,this._prevPosition=0,this._prevPos=-1,this._useTicks=!1,this._registered=!1,c&&(this._useTicks=c.useTicks,this.loop=c.loop,this.ignoreGlobalPause=c.ignoreGlobalPause,c.onChange&&this.addEventListener("change",c.onChange)),a&&this.addTween.apply(this,a),this.setLabels(b),c&&c.paused?this._paused=!0:createjs.Tween._register(this,!0),c&&null!=c.position&&this.setPosition(c.position,createjs.Tween.NONE)}var b=createjs.extend(a,createjs.EventDispatcher);b.addTween=function(a){var b=arguments.length;if(b>1){for(var c=0;b>c;c++)this.addTween(arguments[c]);return arguments[0]}return 0==b?null:(this.removeTween(a),this._tweens.push(a),a.setPaused(!0),a._paused=!1,a._useTicks=this._useTicks,a.duration>this.duration&&(this.duration=a.duration),this._prevPos>=0&&a.setPosition(this._prevPos,createjs.Tween.NONE),a)},b.removeTween=function(a){var b=arguments.length;if(b>1){for(var c=!0,d=0;b>d;d++)c=c&&this.removeTween(arguments[d]);return c}if(0==b)return!1;for(var e=this._tweens,d=e.length;d--;)if(e[d]==a)return e.splice(d,1),a.duration>=this.duration&&this.updateDuration(),!0;return!1},b.addLabel=function(a,b){this._labels[a]=b;var c=this._labelList;if(c){for(var d=0,e=c.length;e>d&&!(b<c[d].position);d++);c.splice(d,0,{label:a,position:b})}},b.setLabels=function(a){this._labels=a?a:{}},b.getLabels=function(){var a=this._labelList;if(!a){a=this._labelList=[];var b=this._labels;for(var c in b)a.push({label:c,position:b[c]});a.sort(function(a,b){return a.position-b.position})}return a},b.getCurrentLabel=function(){var a=this.getLabels(),b=this.position,c=a.length;if(c){for(var d=0;c>d&&!(b<a[d].position);d++);return 0==d?null:a[d-1].label}return null},b.gotoAndPlay=function(a){this.setPaused(!1),this._goto(a)},b.gotoAndStop=function(a){this.setPaused(!0),this._goto(a)},b.setPosition=function(a,b){var c=this._calcPosition(a),d=!this.loop&&a>=this.duration;if(c==this._prevPos)return d;this._prevPosition=a,this.position=this._prevPos=c;for(var e=0,f=this._tweens.length;f>e;e++)if(this._tweens[e].setPosition(c,b),c!=this._prevPos)return!1;return d&&this.setPaused(!0),this.dispatchEvent("change"),d},b.setPaused=function(a){this._paused=!!a,createjs.Tween._register(this,!a)},b.updateDuration=function(){this.duration=0;for(var a=0,b=this._tweens.length;b>a;a++){var c=this._tweens[a];c.duration>this.duration&&(this.duration=c.duration)}},b.tick=function(a){this.setPosition(this._prevPosition+a)},b.resolve=function(a){var b=Number(a);return isNaN(b)&&(b=this._labels[a]),b},b.toString=function(){return"[Timeline]"},b.clone=function(){throw"Timeline can not be cloned."},b._goto=function(a){var b=this.resolve(a);null!=b&&this.setPosition(b)},b._calcPosition=function(a){return 0>a?0:a<this.duration?a:this.loop?a%this.duration:this.duration},createjs.Timeline=createjs.promote(a,"EventDispatcher")}(),this.createjs=this.createjs||{},function(){"use strict";function a(){throw"Ease cannot be instantiated."}a.linear=function(a){return a},a.none=a.linear,a.get=function(a){return-1>a&&(a=-1),a>1&&(a=1),function(b){return 0==a?b:0>a?b*(b*-a+1+a):b*((2-b)*a+(1-a))}},a.getPowIn=function(a){return function(b){return Math.pow(b,a)}},a.getPowOut=function(a){return function(b){return 1-Math.pow(1-b,a)}},a.getPowInOut=function(a){return function(b){return(b*=2)<1?.5*Math.pow(b,a):1-.5*Math.abs(Math.pow(2-b,a))}},a.quadIn=a.getPowIn(2),a.quadOut=a.getPowOut(2),a.quadInOut=a.getPowInOut(2),a.cubicIn=a.getPowIn(3),a.cubicOut=a.getPowOut(3),a.cubicInOut=a.getPowInOut(3),a.quartIn=a.getPowIn(4),a.quartOut=a.getPowOut(4),a.quartInOut=a.getPowInOut(4),a.quintIn=a.getPowIn(5),a.quintOut=a.getPowOut(5),a.quintInOut=a.getPowInOut(5),a.sineIn=function(a){return 1-Math.cos(a*Math.PI/2)},a.sineOut=function(a){return Math.sin(a*Math.PI/2)},a.sineInOut=function(a){return-.5*(Math.cos(Math.PI*a)-1)},a.getBackIn=function(a){return function(b){return b*b*((a+1)*b-a)}},a.backIn=a.getBackIn(1.7),a.getBackOut=function(a){return function(b){return--b*b*((a+1)*b+a)+1}},a.backOut=a.getBackOut(1.7),a.getBackInOut=function(a){return a*=1.525,function(b){return(b*=2)<1?.5*(b*b*((a+1)*b-a)):.5*((b-=2)*b*((a+1)*b+a)+2)}},a.backInOut=a.getBackInOut(1.7),a.circIn=function(a){return-(Math.sqrt(1-a*a)-1)},a.circOut=function(a){return Math.sqrt(1- --a*a)},a.circInOut=function(a){return(a*=2)<1?-.5*(Math.sqrt(1-a*a)-1):.5*(Math.sqrt(1-(a-=2)*a)+1)},a.bounceIn=function(b){return 1-a.bounceOut(1-b)},a.bounceOut=function(a){return 1/2.75>a?7.5625*a*a:2/2.75>a?7.5625*(a-=1.5/2.75)*a+.75:2.5/2.75>a?7.5625*(a-=2.25/2.75)*a+.9375:7.5625*(a-=2.625/2.75)*a+.984375},a.bounceInOut=function(b){return.5>b?.5*a.bounceIn(2*b):.5*a.bounceOut(2*b-1)+.5},a.getElasticIn=function(a,b){var c=2*Math.PI;return function(d){if(0==d||1==d)return d;var e=b/c*Math.asin(1/a);return-(a*Math.pow(2,10*(d-=1))*Math.sin((d-e)*c/b))}},a.elasticIn=a.getElasticIn(1,.3),a.getElasticOut=function(a,b){var c=2*Math.PI;return function(d){if(0==d||1==d)return d;var e=b/c*Math.asin(1/a);return a*Math.pow(2,-10*d)*Math.sin((d-e)*c/b)+1}},a.elasticOut=a.getElasticOut(1,.3),a.getElasticInOut=function(a,b){var c=2*Math.PI;return function(d){var e=b/c*Math.asin(1/a);return(d*=2)<1?-.5*(a*Math.pow(2,10*(d-=1))*Math.sin((d-e)*c/b)):a*Math.pow(2,-10*(d-=1))*Math.sin((d-e)*c/b)*.5+1}},a.elasticInOut=a.getElasticInOut(1,.3*1.5),createjs.Ease=a}(),this.createjs=this.createjs||{},function(){"use strict";function a(){throw"MotionGuidePlugin cannot be instantiated."}a.priority=0,a._rotOffS,a._rotOffE,a._rotNormS,a._rotNormE,a.install=function(){return createjs.Tween.installPlugin(a,["guide","x","y","rotation"]),createjs.Tween.IGNORE},a.init=function(a,b,c){var d=a.target;return d.hasOwnProperty("x")||(d.x=0),d.hasOwnProperty("y")||(d.y=0),d.hasOwnProperty("rotation")||(d.rotation=0),"rotation"==b&&(a.__needsRot=!0),"guide"==b?null:c},a.step=function(b,c,d,e,f){if("rotation"==c&&(b.__rotGlobalS=d,b.__rotGlobalE=e,a.testRotData(b,f)),"guide"!=c)return e;var g,h=e;h.hasOwnProperty("path")||(h.path=[]);var i=h.path;if(h.hasOwnProperty("end")||(h.end=1),h.hasOwnProperty("start")||(h.start=d&&d.hasOwnProperty("end")&&d.path===i?d.end:0),h.hasOwnProperty("_segments")&&h._length)return e;var j=i.length,k=10;if(!(j>=6&&(j-2)%4==0))throw"invalid 'path' data, please see documentation for valid paths";h._segments=[],h._length=0;for(var l=2;j>l;l+=4){for(var m,n,o=i[l-2],p=i[l-1],q=i[l+0],r=i[l+1],s=i[l+2],t=i[l+3],u=o,v=p,w=0,x=[],y=1;k>=y;y++){var z=y/k,A=1-z;m=A*A*o+2*A*z*q+z*z*s,n=A*A*p+2*A*z*r+z*z*t,w+=x[x.push(Math.sqrt((g=m-u)*g+(g=n-v)*g))-1],u=m,v=n}h._segments.push(w),h._segments.push(x),h._length+=w}g=h.orient,h.orient=!0;var B={};return a.calc(h,h.start,B),b.__rotPathS=Number(B.rotation.toFixed(5)),a.calc(h,h.end,B),b.__rotPathE=Number(B.rotation.toFixed(5)),h.orient=!1,a.calc(h,h.end,f),h.orient=g,h.orient?(b.__guideData=h,a.testRotData(b,f),e):e},a.testRotData=function(a,b){if(void 0===a.__rotGlobalS||void 0===a.__rotGlobalE){if(a.__needsRot)return;void 0!==a._curQueueProps.rotation?a.__rotGlobalS=a.__rotGlobalE=a._curQueueProps.rotation:a.__rotGlobalS=a.__rotGlobalE=b.rotation=a.target.rotation||0}if(void 0!==a.__guideData){var c=a.__guideData,d=a.__rotGlobalE-a.__rotGlobalS,e=a.__rotPathE-a.__rotPathS,f=d-e;if("auto"==c.orient)f>180?f-=360:-180>f&&(f+=360);else if("cw"==c.orient){for(;0>f;)f+=360;0==f&&d>0&&180!=d&&(f+=360)}else if("ccw"==c.orient){for(f=d-(e>180?360-e:e);f>0;)f-=360;0==f&&0>d&&-180!=d&&(f-=360)}c.rotDelta=f,c.rotOffS=a.__rotGlobalS-a.__rotPathS,a.__rotGlobalS=a.__rotGlobalE=a.__guideData=a.__needsRot=void 0}},a.tween=function(b,c,d,e,f,g,h,i){var j=f.guide;if(void 0==j||j===e.guide)return d;if(j.lastRatio!=g){var k=(j.end-j.start)*(h?j.end:g)+j.start;switch(a.calc(j,k,b.target),j.orient){case"cw":case"ccw":case"auto":b.target.rotation+=j.rotOffS+j.rotDelta*g;break;case"fixed":default:b.target.rotation+=j.rotOffS}j.lastRatio=g}return"rotation"!=c||j.orient&&"false"!=j.orient?b.target[c]:d},a.calc=function(a,b,c){if(void 0==a._segments)throw"Missing critical pre-calculated information, please file a bug";void 0==c&&(c={x:0,y:0,rotation:0});for(var d=a._segments,e=a.path,f=a._length*b,g=d.length-2,h=0;f>d[h]&&g>h;)f-=d[h],h+=2;var i=d[h+1],j=0;for(g=i.length-1;f>i[j]&&g>j;)f-=i[j],j++;var k=j/++g+f/(g*i[j]);h=2*h+2;var l=1-k;return c.x=l*l*e[h-2]+2*l*k*e[h+0]+k*k*e[h+2],c.y=l*l*e[h-1]+2*l*k*e[h+1]+k*k*e[h+3],a.orient&&(c.rotation=57.2957795*Math.atan2((e[h+1]-e[h-1])*l+(e[h+3]-e[h+1])*k,(e[h+0]-e[h-2])*l+(e[h+2]-e[h+0])*k)),c},createjs.MotionGuidePlugin=a}(),this.createjs=this.createjs||{},function(){"use strict";var a=createjs.TweenJS=createjs.TweenJS||{};a.version="0.6.2",a.buildDate="Thu, 26 Nov 2015 20:44:31 GMT"}();
vendor: 2,301 bytes, lines 10627-10628
10627
10628!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n():"function"==typeof define&&define.amd?define(n):n()}(0,function(){"use strict";function e(e){var n=this.constructor;return this.then(function(t){return n.resolve(e()).then(function(){return t})},function(t){return n.resolve(e()).then(function(){return n.reject(t)})})}function n(){}function t(e){if(!(this instanceof t))throw new TypeError("Promises must be constructed via new");if("function"!=typeof e)throw new TypeError("not a function");this._state=0,this._handled=!1,this._value=undefined,this._deferreds=[],u(e,this)}function o(e,n){for(;3===e._state;)e=e._value;0!==e._state?(e._handled=!0,t._immediateFn(function(){var t=1===e._state?n.onFulfilled:n.onRejected;if(null!==t){var o;try{o=t(e._value)}catch(f){return void i(n.promise,f)}r(n.promise,o)}else(1===e._state?r:i)(n.promise,e._value)})):e._deferreds.push(n)}function r(e,n){try{if(n===e)throw new TypeError("A promise cannot be resolved with itself.");if(n&&("object"==typeof n||"function"==typeof n)){var o=n.then;if(n instanceof t)return e._state=3,e._value=n,void f(e);if("function"==typeof o)return void u(function(e,n){return function(){e.apply(n,arguments)}}(o,n),e)}e._state=1,e._value=n,f(e)}catch(r){i(e,r)}}function i(e,n){e._state=2,e._value=n,f(e)}function f(e){2===e._state&&0===e._deferreds.length&&t._immediateFn(function(){e._handled||t._unhandledRejectionFn(e._value)});for(var n=0,r=e._deferreds.length;r>n;n++)o(e,e._deferreds[n]);e._deferreds=null}function u(e,n){var t=!1;try{e(function(e){t||(t=!0,r(n,e))},function(e){t||(t=!0,i(n,e))})}catch(o){if(t)return;t=!0,i(n,o)}}var c=setTimeout;t.prototype["catch"]=function(e){return this.then(null,e)},t.prototype.then=function(e,t){var r=new this.constructor(n);return o(this,new function(e,n,t){this.onFulfilled="function"==typeof e?e:null,this.onRejected="function"==typeof n?n:null,this.promise=t}(e,t,r)),r},t.prototype["finally"]=e,t.all=function(e){return new t(function(n,t){function o(e,f){try{if(f&&("object"==typeof f||"function"==typeof f)){var u=f.then;if("function"==typeof u)return void u.call(f,function(n){o(e,n)},t)}r[e]=f,0==--i&&n(r)}catch(c){t(c)}}if(!e||"undefined"==typeof e.length)throw new TypeError("Promise.all accepts an array");var r=Array.prototype.slice.call(e);
10628if(0===r.length)return n([]);for(var i=r.length,f=0;r.length>f;f++)o(f,r[f])})},t.resolve=function(e){return e&&"object"==typeof e&&e.constructor===t?e:new t(function(n){n(e)})},t.reject=function(e){return new t(function(n,t){t(e)})},t.race=function(e){return new t(function(n,t){for(var o=0,r=e.length;r>o;o++)e[o].then(n,t)})},t._immediateFn="function"==typeof setImmediate&&function(e){setImmediate(e)}||function(e){c(e,0)},t._unhandledRejectionFn=function(e){void 0!==console&&console&&console.warn("Possible Unhandled Promise Rejection:",e)};var l=function(){if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if("undefined"!=typeof global)return global;throw Error("unable to locate global object")}();"Promise"in l?l.Promise.prototype["finally"]||(l.Promise.prototype["finally"]=e):l.Promise=t});
10629
10630/**
10631 * @license Hyphenopoly_Loader 3.0.0 - client side hyphenation
10632 * ©2019  Mathias Nater, Zürich (mathiasnater at gmail dot com)
10633 * https://github.com/mnater/Hyphenopoly
10634 *
10635 * Released under the MIT license
10636 * http://mnater.github.io/Hyphenopoly/LICENSE
10637 */
10638
10639/* global Hyphenopoly */
10640
10641(function H9YL() {
10642    "use strict";
10643    const d = document;
10644    const H = Hyphenopoly;
10645
10646    /**
10647     * Create Object without standard Object-prototype
10648     * @returns {Object} empty object
10649     */
10650    function empty() {
10651        return Object.create(null);
10652    }
10653
10654
10655    /**
10656     * Shorthand for Object.keys(obj).forEach(function () {})
10657     * @param {Object} obj the object to iterate
10658     * @param {function} fn the function to execute
10659     * @returns {undefined}
10660     */
10661    function eachKey(obj, fn) {
10662        Object.keys(obj).forEach(fn);
10663    }
10664
10665    (function configFeat() {
10666        // Set H.clientFeat (either from sessionStorage or empty)
10667        if (H.cacheFeatureTests && sessionStorage.getItem("Hyphenopoly_Loader")) {
10668            H.clientFeat = JSON.parse(sessionStorage.getItem("Hyphenopoly_Loader"));
10669        } else {
10670            H.clientFeat = {
10671                "langs": empty(),
10672                "polyfill": false,
10673                "wasm": null
10674            };
10675        }
10676    }());
10677    (function configPaths() {
10678        // Set defaults for paths and setup
10679        H.dfltPaths = Object.create({
10680            "maindir": "../Hyphenopoly/",
10681            "patterndir": "../Hyphenopoly/patterns/"
10682        });
10683        if (H.paths) {
10684            if (H.paths.patterndir) {
10685                H.dfltPaths.patterndir = H.paths.patterndir;
10686            }
10687            if (H.paths.maindir) {
10688                H.dfltPaths.maindir = H.paths.maindir;
10689            }
10690        }
10691    }());
10692    (function configSetup() {
10693        if (H.setup) {
10694            H.setup.selectors = H.setup.selectors || {".hyphenate": {}};
10695            H.setup.timeout = H.setup.timeout || 1000;
10696            H.setup.hide = H.setup.hide || "all";
10697        } else {
10698            H.setup = {
10699                "hide": "all",
10700                "selectors": {".hyphenate": {}},
10701                "timeout": 1000
10702            };
10703        }
10704    }());
10705    (function configRequire() {
10706        H.lcRequire = new Map();
10707        eachKey(H.require, function copyRequire(k) {
10708            /* eslint-disable security/detect-object-injection */
10709            H.lcRequire.set(k.toLowerCase(), H.require[k]);
10710            /* eslint-enable security/detect-object-injection */
10711        });
10712        if (H.fallbacks) {
10713            H.lcFallbacks = new Map();
10714            eachKey(H.fallbacks, function copyFallbacks(k) {
10715                /* eslint-disable security/detect-object-injection */
10716                H.lcFallbacks.set(
10717                    k.toLowerCase(),
10718                    H.fallbacks[k].toLowerCase()
10719                );
10720                /* eslint-enable security/detect-object-injection */
10721            });
10722        }
10723    }());
10724
10725    H.toggle = function toggle(state) {
10726        if (state === "on") {
10727            const stylesNode = d.getElementById("H9Y_Styles");
10728            if (stylesNode) {
10729                stylesNode.parentNode.removeChild(stylesNode);
10730            }
10731        } else {
10732            const vis = " {visibility: hidden !important}\n";
10733            const sc = d.createElement("style");
10734            sc.id = "H9Y_Styles";
10735            switch (H.setup.hide) {
10736            case "all":
10737                sc.innerHTML = "html" + vis;
10738                break;
10739            case "element":
10740                eachKey(H.setup.selectors, function eachSelector(sel) {
10741                    sc.innerHTML += sel + vis;
10742                });
10743                break;
10744            case "text":
10745                eachKey(H.setup.selectors, function eachSelector(sel) {
10746                    sc.innerHTML += sel + " {color: transparent !important}\n";
10747                });
10748                break;
10749            default:
10750                sc.innerHTML = "";
10751            }
10752            d.getElementsByTagName("head")[0].appendChild(sc);
10753        }
10754    };
10755
10756    (function setupEvents() {
10757        // Events known to the system
10758        const definedEvents = new Map();
10759        // Default events, execution deferred to Hyphenopoly.js
10760        const deferred = [];
10761
10762        /*
10763         * Eegister for custom event handlers, where event is not yet defined
10764         * these events will be correctly registered in Hyphenopoly.js
10765         */
10766        const tempRegister = [];
10767
10768        /**
10769         * Create Event Object
10770         * @param {string} name The Name of the event
10771         * @param {function} defFunc The default method of the event
10772         * @param {boolean} cancellable Is the default cancellable
10773         * @returns {undefined}
10774         */
10775        function define(name, defFunc, cancellable) {
10776            definedEvents.set(name, {
10777                "cancellable": cancellable,
10778                "default": defFunc,
10779                "register": []
10780            });
10781        }
10782
10783        define(
10784            "timeout",
10785            function def(e) {
10786                H.toggle("on");
10787                window.console.info(
10788                    "Hyphenopolys 'FOUHC'-prevention timed out after %dms",
10789                    e.delay
10790                );
10791            },
10792            false
10793        );
10794
10795        define(
10796            "error",
10797            function def(e) {
10798                switch (e.lvl) {
10799                case "info":
10800                    window.console.info(e.msg);
10801                    break;
10802                case "warn":
10803                    window.console.warn(e.msg);
10804                    break;
10805                default:
10806                    window.console.error(e.msg);
10807                }
10808            },
10809            true
10810        );
10811
10812        define(
10813            "contentLoaded",
10814            function def(e) {
10815                deferred.push({
10816                    "data": e,
10817                    "name": "contentLoaded"
10818                });
10819            },
10820            false
10821        );
10822
10823        define(
10824            "engineLoaded",
10825            function def(e) {
10826                deferred.push({
10827                    "data": e,
10828                    "name": "engineLoaded"
10829                });
10830            },
10831            false
10832        );
10833
10834        define(
10835            "hpbLoaded",
10836            function def(e) {
10837                deferred.push({
10838                    "data": e,
10839                    "name": "hpbLoaded"
10840                });
10841            },
10842            false
10843        );
10844
10845        define(
10846            "loadError",
10847            function def(e) {
10848                deferred.push({
10849                    "data": e,
10850                    "name": "loadError"
10851                });
10852            }
10853        );
10854
10855        define(
10856            "tearDown",
10857            null,
10858            true
10859        );
10860
10861        /**
10862         * Dispatch event <name> with arguments <data>
10863         * @param {string} name The name of the event
10864         * @param {Object|undefined} data Data of the event
10865         * @returns {undefined}
10866         */
10867        function dispatch(name, data) {
10868            data = data || empty();
10869            let defaultPrevented = false;
10870            definedEvents.get(name).register.forEach(
10871                function call(currentHandler) {
10872                    data.preventDefault = function preventDefault() {
10873                        if (definedEvents.get(name).cancellable) {
10874                            defaultPrevented = true;
10875                        }
10876                    };
10877                    currentHandler(data);
10878                }
10879            );
10880            if (
10881                !defaultPrevented &&
10882                definedEvents.get(name).default
10883            ) {
10884                definedEvents.get(name).default(data);
10885            }
10886        }
10887
10888        /**
10889         * Add EventListender <handler> to event <name>
10890         * @param {string} name The name of the event
10891         * @param {function} handler Function to register
10892         * @param {boolean} defer If the registration is deferred
10893         * @returns {undefined}
10894         */
10895        function addListener(name, handler, defer) {
10896            if (definedEvents.has(name)) {
10897                definedEvents.get(name).register.push(handler);
10898            } else if (defer) {
10899                tempRegister.push({
10900                    "handler": handler,
10901                    "name": name
10902                });
10903            } else {
10904                H.events.dispatch(
10905                    "error",
10906                    {
10907                        "lvl": "warn",
10908                        "msg": "unknown Event \"" + name + "\" discarded"
10909                    }
10910                );
10911            }
10912        }
10913
10914        if (H.handleEvent) {
10915            eachKey(H.handleEvent, function add(name) {
10916                /* eslint-disable security/detect-object-injection */
10917                addListener(name, H.handleEvent[name], true);
10918                /* eslint-enable security/detect-object-injection */
10919            });
10920        }
10921
10922        H.events = empty();
10923        H.events.deferred = deferred;
10924        H.events.tempRegister = tempRegister;
10925        H.events.dispatch = dispatch;
10926        H.events.define = define;
10927        H.events.addListener = addListener;
10928    }());
10929
10930    /**
10931     * Test if wasm is supported
10932     * @returns {undefined}
10933     */
10934    function featureTestWasm() {
10935        /* eslint-disable no-prototype-builtins */
10936        /**
10937         * Feature test for wasm
10938         * @returns {boolean} support
10939         */
10940        function runWasmTest() {
10941            /*
10942             * This is the original test, without webkit workaround
10943             * if (typeof WebAssembly === "object" &&
10944             *     typeof WebAssembly.instantiate === "function") {
10945             *     const module = new WebAssembly.Module(Uint8Array.from(
10946             *         [0, 97, 115, 109, 1, 0, 0, 0]
10947             *     ));
10948             *     if (WebAssembly.Module.prototype.isPrototypeOf(module)) {
10949             *         return WebAssembly.Instance.prototype.isPrototypeOf(
10950             *             new WebAssembly.Instance(module)
10951             *         );
10952             *     }
10953             * }
10954             * return false;
10955             */
10956
10957            /*
10958             * Wasm feature test with iOS bug detection
10959             * (https://bugs.webkit.org/show_bug.cgi?id=181781)
10960             */
10961            if (
10962                typeof WebAssembly === "object" &&
10963                typeof WebAssembly.instantiate === "function"
10964            ) {
10965                /* eslint-disable array-element-newline */
10966                const module = new WebAssembly.Module(Uint8Array.from([
10967                    0, 97, 115, 109, 1, 0, 0, 0, 1, 6, 1, 96, 1, 127, 1, 127,
10968                    3, 2, 1, 0, 5, 3, 1, 0, 1, 7, 8, 1, 4, 116, 101, 115,
10969                    116, 0, 0, 10, 16, 1, 14, 0, 32, 0, 65, 1, 54, 2, 0, 32,
10970                    0, 40, 2, 0, 11
10971                ]));
10972                /* eslint-enable array-element-newline */
10973                if (WebAssembly.Module.prototype.isPrototypeOf(module)) {
10974                    const inst = new WebAssembly.Instance(module);
10975                    return WebAssembly.Instance.prototype.isPrototypeOf(inst) &&
10976                            (inst.exports.test(4) !== 0);
10977                }
10978            }
10979            return false;
10980        }
10981        /* eslint-enable no-prototype-builtins */
10982        if (H.clientFeat.wasm === null) {
10983            H.clientFeat.wasm = runWasmTest();
10984        }
10985    }
10986
10987    /**
10988     * Load script by adding <script>-tag
10989     * @param {string} path Where the script is stored
10990     * @param {string} filename Filename of the script
10991     * @returns {undefined}
10992     */
10993    function scriptLoader(path, filename) {
10994        const script = d.createElement("script");
10995        script.src = path + filename;
10996        if (filename === "hyphenEngine.asm.js") {
10997            script.addEventListener("load", function listener() {
10998                H.events.dispatch("engineLoaded", {"msg": "asm"});
10999            });
11000        }
11001        d.head.appendChild(script);
11002    }
11003
11004    const loadedBins = new Map();
11005
11006    /**
11007     * Load binary files either with fetch (on new browsers that support wasm)
11008     * or with xmlHttpRequest
11009     * @param {string} path Where the script is stored
11010     * @param {string} fne Filename of the script with extension
11011     * @param {string} name Name of the ressource
11012     * @param {Object} msg Message
11013     * @returns {undefined}
11014     */
11015    function binLoader(path, fne, name, msg) {
11016        /**
11017         * Get bin file using fetch
11018         * @param {string} p Where the script is stored
11019         * @param {string} f Filename of the script with extension
11020         * @param {string} n Name of the ressource
11021         * @param {Object} m Message
11022         * @returns {undefined}
11023         */
11024        function fetchBinary(p, f, n, m) {
11025            if (!loadedBins.has(f)) {
11026                loadedBins.set(f, [m]);
11027                window.fetch(p + f).then(
11028                    function resolve(response) {
11029                        if (response.ok) {
11030                            if (n === "hyphenEngine") {
11031                                H.binaries.set(n, response.arrayBuffer().then(
11032                                    function getModule(buf) {
11033                                        return new WebAssembly.Module(buf);
11034                                    }
11035                                ));
11036                                H.events.dispatch("engineLoaded", {"msg": m});
11037                            } else {
11038                                const files = loadedBins.get(f);
11039                                files.forEach(function eachHpb(rn) {
11040                                    H.binaries.set(
11041                                        rn,
11042                                        (files.length > 1)
11043                                            ? response.clone().arrayBuffer()
11044                                            : response.arrayBuffer()
11045                                    );
11046                                    H.events.dispatch(
11047                                        "hpbLoaded",
11048                                        {"msg": rn}
11049                                    );
11050                                });
11051                            }
11052                        } else {
11053                            H.events.dispatch("loadError", {
11054                                "file": f,
11055                                "msg": m,
11056                                "name": n,
11057                                "path": p
11058                            });
11059                        }
11060                    }
11061                );
11062            } else if (n !== "hyphenEngine") {
11063                loadedBins.get(f).push(m);
11064            }
11065        }
11066
11067        /**
11068         * Get bin file using XHR
11069         * @param {string} p Where the script is stored
11070         * @param {string} f Filename of the script with extension
11071         * @param {string} n Name of the ressource
11072         * @param {Object} m Message
11073         * @returns {undefined}
11074         */
11075        function requestBinary(p, f, n, m) {
11076            /* eslint-disable-next-line no-negated-condition */
11077            if (!loadedBins.has(f)) {
11078                loadedBins.set(f, [m]);
11079                const xhr = new XMLHttpRequest();
11080                xhr.onload = function onload() {
11081                    if (xhr.statusText === "OK") {
11082                        loadedBins.get(f).
11083                            forEach(function eachHpb(rn) {
11084                                H.binaries.set(
11085                                    rn,
11086                                    xhr.response
11087                                );
11088                                H.events.dispatch(
11089                                    "hpbLoaded",
11090                                    {"msg": rn}
11091                                );
11092                            });
11093                    } else {
11094                        H.events.dispatch("loadError", {
11095                            "file": f,
11096                            "msg": m,
11097                            "name": n,
11098                            "path": p
11099                        });
11100                    }
11101                };
11102                xhr.open("GET", p + f);
11103                xhr.responseType = "arraybuffer";
11104                xhr.send();
11105            } else {
11106                loadedBins.get(f).push(m);
11107            }
11108        }
11109        if (H.clientFeat.wasm) {
11110            fetchBinary(path, fne, name, msg);
11111        } else {
11112            requestBinary(path, fne, name, msg);
11113        }
11114    }
11115
11116    /**
11117     * Pre-Allocate memory for (w)asm
11118     * Default is 32 wasm Pages (). For languages with larger .hpb
11119     * files a higher value is needed.
11120     * Get the value from baseData.heapSize in Hyphenopoly.js
11121     * @param {string} lang Language
11122     * @returns {undefined}
11123     */
11124    function allocateMemory(lang) {
11125        const specVal = new Map(
11126            [["de", 55], ["hu", 207], ["nb-no", 92], ["nl", 41]]
11127        );
11128        const wasmPages = specVal.get(lang) || 32;
11129        H.specMems = H.specMems || new Map();
11130        if (H.clientFeat.wasm) {
11131            H.specMems.set(lang, new WebAssembly.Memory({
11132                "initial": wasmPages,
11133                "maximum": 256
11134            }));
11135        } else {
11136            /**
11137             * Polyfill Math.log2
11138             * @param {number} x argument
11139             * @return {number} Log2(x)
11140             */
11141            Math.log2 = Math.log2 || function polyfillLog2(x) {
11142                return Math.log(x) * Math.LOG2E;
11143            };
11144            /* eslint-disable no-bitwise */
11145            const asmPages = (2 << Math.floor(Math.log2(wasmPages))) * 65536;
11146            /* eslint-enable no-bitwise */
11147            H.specMems.set(lang, new ArrayBuffer(asmPages));
11148        }
11149    }
11150
11151    (function featureTestCSSHyphenation() {
11152        const tester = (function tester() {
11153            let fakeBody = null;
11154
11155            const css = (function createCss() {
11156                /* eslint-disable array-element-newline */
11157                const props = [
11158                    "visibility:hidden;",
11159                    "-moz-hyphens:auto;",
11160                    "-webkit-hyphens:auto;",
11161                    "-ms-hyphens:auto;",
11162                    "hyphens:auto;",
11163                    "width:48px;",
11164                    "font-size:12px;",
11165                    "line-height:12px;",
11166                    "border:none;",
11167                    "padding:0;",
11168                    "word-wrap:normal"
11169                ];
11170                /* eslint-enable array-element-newline */
11171                return props.join("");
11172            }());
11173
11174            /**
11175             * Create and append div with CSS-hyphenated word
11176             * @param {string} lang Language
11177             * @returns {undefined}
11178             */
11179            function create(lang) {
11180                /* eslint-disable security/detect-object-injection */
11181                if (H.clientFeat.langs[lang]) {
11182                    return;
11183                }
11184                /* eslint-enable security/detect-object-injection */
11185                fakeBody = fakeBody || d.createElement("body");
11186                const testDiv = d.createElement("div");
11187                testDiv.lang = lang;
11188                testDiv.id = lang;
11189                testDiv.style.cssText = css;
11190                testDiv.appendChild(d.createTextNode(H.lcRequire.get(lang)));
11191                fakeBody.appendChild(testDiv);
11192            }
11193
11194            /**
11195             * Append fakeBody with tests to target (document)
11196             * @param {Object} target Where to append fakeBody
11197             * @returns {Object|null} The body element or null, if no tests
11198             */
11199            function append(target) {
11200                if (fakeBody) {
11201                    target.appendChild(fakeBody);
11202                    return fakeBody;
11203                }
11204                return null;
11205            }
11206
11207            /**
11208             * Remove fakeBody
11209             * @returns {undefined}
11210             */
11211            function clear() {
11212                if (fakeBody) {
11213                    fakeBody.parentNode.removeChild(fakeBody);
11214                }
11215            }
11216            return {
11217                "append": append,
11218                "clear": clear,
11219                "create": create
11220            };
11221        }());
11222
11223        /**
11224         * Checks if hyphens (ev.prefixed) is set to auto for the element.
11225         * @param {Object} elm - the element
11226         * @returns {Boolean} result of the check
11227         */
11228        function checkCSSHyphensSupport(elm) {
11229            return (
11230                elm.style.hyphens === "auto" ||
11231                elm.style.webkitHyphens === "auto" ||
11232                elm.style.msHyphens === "auto" ||
11233                elm.style["-moz-hyphens"] === "auto"
11234            );
11235        }
11236
11237        /**
11238         * Expose the hyphenate-function of a specific language to
11239         * Hyphenopoly.hyphenators.<language>
11240         *
11241         * Hyphenopoly.hyphenators.<language> is a Promise that fullfills
11242         * to hyphenate(entity, sel) as soon as the ressources are loaded
11243         * and the engine is ready.
11244         * If Promises aren't supported (e.g. IE11) a error message is produced.
11245         *
11246         * @param {string} lang - the language
11247         * @returns {undefined}
11248         */
11249        function exposeHyphenateFunction(lang) {
11250            /* eslint-disable security/detect-object-injection */
11251            H.hyphenators = H.hyphenators || empty();
11252            if (!H.hyphenators[lang]) {
11253                if (window.Promise) {
11254                    H.hyphenators[lang] = new Promise(function pro(rs, rj) {
11255                        H.events.addListener("engineReady", function handler(e) {
11256                            if (e.msg === lang) {
11257                                rs(H.createHyphenator(e.msg));
11258                            }
11259                        }, true);
11260                        H.events.addListener("error", function handler(e) {
11261                            if (e.key === lang || e.key === "hyphenEngine") {
11262                                rj(e.msg);
11263                            }
11264                        }, true);
11265                    });
11266                } else {
11267                    H.hyphenators[lang] = {
11268
11269                        /**
11270                         * Fires an error message, if then is called
11271                         * @returns {undefined}
11272                         */
11273                        "then": function () {
11274                            H.events.dispatch(
11275                                "error",
11276                                {"msg": "Promises not supported in this engine. Use a polyfill (e.g. https://github.com/taylorhakes/promise-polyfill)!"}
11277                            );
11278                        }
11279                    };
11280                }
11281            }
11282            /* eslint-enable security/detect-object-injection */
11283        }
11284
11285        /**
11286         * Load all ressources for a required <lang>, check if wasm is supported
11287         * and expose the hyphenate function.
11288         * @param {string} lang The language
11289         * @returns {undefined}
11290         */
11291        function loadPattern(lang) {
11292            let filename = lang + ".hpb";
11293            let langFallback = lang;
11294            if (H.lcFallbacks && H.lcFallbacks.has(lang)) {
11295                langFallback = H.lcFallbacks.get(lang);
11296                filename = langFallback + ".hpb";
11297            }
11298            H.binaries = H.binaries || new Map();
11299            binLoader(H.dfltPaths.patterndir, filename, langFallback, lang);
11300        }
11301        featureTestWasm();
11302        H.lcRequire.forEach(function eachReq(value, lang) {
11303            /* eslint-disable security/detect-object-injection */
11304            if (value === "FORCEHYPHENOPOLY") {
11305                H.clientFeat.polyfill = true;
11306                H.clientFeat.langs[lang] = "H9Y";
11307                loadPattern(lang);
11308            } else if (
11309                H.clientFeat.langs[lang] &&
11310                H.clientFeat.langs[lang] === "H9Y"
11311            ) {
11312                loadPattern(lang);
11313            } else {
11314                tester.create(lang);
11315            }
11316            /* eslint-enable security/detect-object-injection */
11317        });
11318
11319        const testContainer = tester.append(d.documentElement);
11320        if (testContainer !== null) {
11321            H.lcRequire.forEach(function eachReq(value, lang) {
11322                if (value !== "FORCEHYPHENOPOLY") {
11323                    const el = d.getElementById(lang);
11324                    /* eslint-disable security/detect-object-injection */
11325                    if (checkCSSHyphensSupport(el) && el.offsetHeight > 12) {
11326                        H.clientFeat.langs[lang] = "CSS";
11327                    } else {
11328                        H.clientFeat.polyfill = true;
11329                        H.clientFeat.langs[lang] = "H9Y";
11330                        loadPattern(lang);
11331                    }
11332                    /* eslint-enable security/detect-object-injection */
11333                }
11334            });
11335            tester.clear();
11336        }
11337        if (H.clientFeat.polyfill) {
11338            scriptLoader(H.dfltPaths.maindir, "Hyphenopoly.js");
11339            if (H.clientFeat.wasm) {
11340                binLoader(
11341                    H.dfltPaths.maindir,
11342                    "hyphenEngine.wasm",
11343                    "hyphenEngine",
11344                    "wasm"
11345                );
11346            } else {
11347                scriptLoader(H.dfltPaths.maindir, "hyphenEngine.asm.js");
11348            }
11349            eachKey(H.clientFeat.langs, function prepareEach(lang) {
11350                /* eslint-disable security/detect-object-injection */
11351                if (H.clientFeat.langs[lang] === "H9Y") {
11352                    allocateMemory(lang);
11353                    exposeHyphenateFunction(lang);
11354                }
11355                /* eslint-enable security/detect-object-injection */
11356            });
11357        }
11358    }());
11359
11360    /**
11361     * Hides the specified elements and starts the process by
11362     * dispatching a "contentLoaded"-event in Hyphenopoly
11363     * @returns {undefined}
11364     */
11365    function handleDCL() {
11366        if (H.setup.hide.match(/^(?:element|text)$/)) {
11367            H.toggle("off");
11368        }
11369        H.events.dispatch(
11370            "contentLoaded",
11371            {"msg": ["contentLoaded"]}
11372        );
11373    }
11374
11375    if (H.clientFeat.polyfill) {
11376        if (H.setup.hide === "all") {
11377            H.toggle("off");
11378        }
11379        if (H.setup.hide !== "none") {
11380            H.setup.timeOutHandler = window.setTimeout(function timedOut() {
11381                H.toggle("on");
11382                H.events.dispatch("timeout", {"delay": H.setup.timeout});
11383            }, H.setup.timeout);
11384        }
11385        if (d.readyState === "loading") {
11386            d.addEventListener(
11387                "DOMContentLoaded",
11388                handleDCL,
11389                {
11390                    "once": true,
11391                    "passive": true
11392                }
11393            );
11394        } else {
11395            handleDCL();
11396        }
11397    } else {
11398        H.events.dispatch("tearDown", {});
11399        window.Hyphenopoly = null;
11400    }
11401
11402    if (H.cacheFeatureTests) {
11403        sessionStorage.setItem(
11404            "Hyphenopoly_Loader",
11405            JSON.stringify(H.clientFeat)
11406        );
11407    }
11408}());
11409
11410/*
11411 * blueimp Gallery JS 2.14.0
11412 * https://github.com/blueimp/Gallery
11413 *
11414 * Copyright 2013, Sebastian Tschan
11415 * https://blueimp.net
11416 *
11417 * Swipe implementation based on
11418 * https://github.com/bradbirdsall/Swipe
11419 *
11420 * Licensed under the MIT license:
11421 * http://www.opensource.org/licenses/MIT
11422 */
11423
11424/* global define, window, document, DocumentTouch */
11425
11426(function (factory) {
11427    'use strict';
11428    if (typeof define === 'function' && define.amd) {
11429        // Register as an anonymous AMD module:
11430        define(['./blueimp-helper'], factory);
11431    } else {
11432        // Browser globals:
11433        window.blueimp = window.blueimp || {};
11434        window.blueimp.Gallery = factory(
11435            window.blueimp.helper || window.jQuery
11436        );
11437    }
11438}(function ($) {
11439    'use strict';
11440
11441    function Gallery(list, options) {
11442        if (document.body.style.maxHeight === undefined) {
11443            // document.body.style.maxHeight is undefined on IE6 and lower
11444            return null;
11445        }
11446        if (!this || this.options !== Gallery.prototype.options) {
11447            // Called as function instead of as constructor,
11448            // so we simply return a new instance:
11449            return new Gallery(list, options);
11450        }
11451        if (!list || !list.length) {
11452            this.console.log(
11453                'blueimp Gallery: No or empty list provided as first argument.',
11454                list
11455            );
11456            return;
11457        }
11458        this.list = list;
11459        this.num = list.length;
11460        this.initOptions(options);
11461        this.initialize();
11462    }
11463
11464    $.extend(Gallery.prototype, {
11465
11466        options: {
11467            // The Id, element or querySelector of the gallery widget:
11468            container: '#blueimp-gallery',
11469            // The tag name, Id, element or querySelector of the slides container:
11470            slidesContainer: 'div',
11471            // The tag name, Id, element or querySelector of the title element:
11472            titleElement: 'h3',
11473            // The class to add when the gallery is visible:
11474            displayClass: 'blueimp-gallery-display',
11475            // The class to add when the gallery controls are visible:
11476            controlsClass: 'blueimp-gallery-controls',
11477            // The class to add when the gallery only displays one element:
11478            singleClass: 'blueimp-gallery-single',
11479            // The class to add when the left edge has been reached:
11480            leftEdgeClass: 'blueimp-gallery-left',
11481            // The class to add when the right edge has been reached:
11482            rightEdgeClass: 'blueimp-gallery-right',
11483            // The class to add when the automatic slideshow is active:
11484            playingClass: 'blueimp-gallery-playing',
11485            // The class for all slides:
11486            slideClass: 'slide',
11487            // The slide class for loading elements:
11488            slideLoadingClass: 'slide-loading',
11489            // The slide class for elements that failed to load:
11490            slideErrorClass: 'slide-error',
11491            // The class for the content element loaded into each slide:
11492            slideContentClass: 'slide-content',
11493            // The class for the "toggle" control:
11494            toggleClass: 'toggle',
11495            // The class for the "prev" control:
11496            prevClass: 'prev',
11497            // The class for the "next" control:
11498            nextClass: 'next',
11499            // The class for the "close" control:
11500            closeClass: 'close',
11501            // The class for the "play-pause" toggle control:
11502            playPauseClass: 'play-pause',
11503            // The list object property (or data attribute) with the object type:
11504            typeProperty: 'type',
11505            // The list object property (or data attribute) with the object title:
11506            titleProperty: 'title',
11507            // The list object property (or data attribute) with the object URL:
11508            urlProperty: 'href',
11509            // The gallery listens for transitionend events before triggering the
11510            // opened and closed events, unless the following option is set to false:
11511            displayTransition: true,
11512            // Defines if the gallery slides are cleared from the gallery modal,
11513            // or reused for the next gallery initialization:
11514            clearSlides: true,
11515            // Defines if images should be stretched to fill the available space,
11516            // while maintaining their aspect ratio (will only be enabled for browsers
11517            // supporting background-size="contain", which excludes IE < 9).
11518            // Set to "cover", to make images cover all available space (requires
11519            // support for background-size="cover", which excludes IE < 9):
11520            stretchImages: false,
11521            // Toggle the controls on pressing the Return key:
11522            toggleControlsOnReturn: true,
11523            // Toggle the automatic slideshow interval on pressing the Space key:
11524            toggleSlideshowOnSpace: true,
11525            // Navigate the gallery by pressing left and right on the keyboard:
11526            enableKeyboardNavigation: true,
11527            // Close the gallery on pressing the Esc key:
11528            closeOnEscape: true,
11529            // Close the gallery when clicking on an empty slide area:
11530            closeOnSlideClick: true,
11531            // Close the gallery by swiping up or down:
11532            closeOnSwipeUpOrDown: true,
11533            // Emulate touch events on mouse-pointer devices such as desktop browsers:
11534            emulateTouchEvents: true,
11535            // Stop touch events from bubbling up to ancestor elements of the Gallery:
11536            stopTouchEventsPropagation: false,
11537            // Hide the page scrollbars: 
11538            hidePageScrollbars: false,
11539            // Stops any touches on the container from scrolling the page:
11540            disableScroll: true,
11541            // Carousel mode (shortcut for carousel specific options):
11542            carousel: false,
11543            // Allow continuous navigation, moving from last to first
11544            // and from first to last slide:
11545            continuous: true,
11546            // Remove elements outside of the preload range from the DOM:
11547            unloadElements: true,
11548            // Start with the automatic slideshow:
11549            startSlideshow: false,
11550            // Delay in milliseconds between slides for the automatic slideshow:
11551            slideshowInterval: 5000,
11552            // The starting index as integer.
11553            // Can also be an object of the given list,
11554            // or an equal object with the same url property:
11555            index: 0,
11556            // The number of elements to load around the current index:
11557            preloadRange: 2,
11558            // The transition speed between slide changes in milliseconds:
11559            transitionSpeed: 400,
11560            // The transition speed for automatic slide changes, set to an integer
11561            // greater 0 to override the default transition speed:
11562            slideshowTransitionSpeed: undefined,
11563            // The event object for which the default action will be canceled
11564            // on Gallery initialization (e.g. the click event to open the Gallery):
11565            event: undefined,
11566            // Callback function executed when the Gallery is initialized.
11567            // Is called with the gallery instance as "this" object:
11568            onopen: undefined,
11569            // Callback function executed when the Gallery has been initialized
11570            // and the initialization transition has been completed.
11571            // Is called with the gallery instance as "this" object:
11572            onopened: undefined,
11573            // Callback function executed on slide change.
11574            // Is called with the gallery instance as "this" object and the
11575            // current index and slide as arguments:
11576            onslide: undefined,
11577            // Callback function executed after the slide change transition.
11578            // Is called with the gallery instance as "this" object and the
11579            // current index and slide as arguments:
11580            onslideend: undefined,
11581            // Callback function executed on slide content load.
11582            // Is called with the gallery instance as "this" object and the
11583            // slide index and slide element as arguments:
11584            onslidecomplete: undefined,
11585            // Callback function executed when the Gallery is about to be closed.
11586            // Is called with the gallery instance as "this" object:
11587            onclose: undefined,
11588            // Callback function executed when the Gallery has been closed
11589            // and the closing transition has been completed.
11590            // Is called with the gallery instance as "this" object:
11591            onclosed: undefined
11592        },
11593
11594        carouselOptions: {
11595            hidePageScrollbars: false,
11596            toggleControlsOnReturn: false,
11597            toggleSlideshowOnSpace: false,
11598            enableKeyboardNavigation: false,
11599            closeOnEscape: false,
11600            closeOnSlideClick: false,
11601            closeOnSwipeUpOrDown: false,
11602            disableScroll: false,
11603            startSlideshow: true
11604        },
11605
11606        console: window.console && typeof window.console.log === 'function' ?
11607            window.console :
11608            {log: function () {}},
11609
11610        // Detect touch, transition, transform and background-size support:
11611        support: (function (element) {
11612            var support = {
11613                    touch: window.ontouchstart !== undefined ||
11614                        (window.DocumentTouch && document instanceof DocumentTouch)
11615                },
11616                transitions = {
11617                    webkitTransition: {
11618                        end: 'webkitTransitionEnd',
11619                        prefix: '-webkit-'
11620                    },
11621                    MozTransition: {
11622                        end: 'transitionend',
11623                        prefix: '-moz-'
11624                    },
11625                    OTransition: {
11626                        end: 'otransitionend',
11627                        prefix: '-o-'
11628                    },
11629                    transition: {
11630                        end: 'transitionend',
11631                        prefix: ''
11632                    }
11633                },
11634                elementTests = function () {
11635                    var transition = support.transition,
11636                        prop,
11637                        translateZ;
11638                    document.body.appendChild(element);
11639                    if (transition) {
11640                        prop = transition.name.slice(0, -9) + 'ransform';
11641                        if (element.style[prop] !== undefined) {
11642                            element.style[prop] = 'translateZ(0)';
11643                            translateZ = window.getComputedStyle(element)
11644                                .getPropertyValue(transition.prefix + 'transform');
11645                            support.transform = {
11646                                prefix: transition.prefix,
11647                                name: prop,
11648                                translate: true,
11649                                translateZ: !!translateZ && translateZ !== 'none'
11650                            };
11651                        }
11652                    }
11653                    if (element.style.backgroundSize !== undefined) {
11654                        support.backgroundSize = {};
11655                        element.style.backgroundSize = 'contain';
11656                        support.backgroundSize.contain = window
11657                                .getComputedStyle(element)
11658                                .getPropertyValue('background-size') === 'contain';
11659                        element.style.backgroundSize = 'cover';
11660                        support.backgroundSize.cover = window
11661                                .getComputedStyle(element)
11662                                .getPropertyValue('background-size') === 'cover';
11663                    }
11664                    document.body.removeChild(element);
11665                };
11666            (function (support, transitions) {
11667                var prop;
11668                for (prop in transitions) {
11669                    if (transitions.hasOwnProperty(prop) &&
11670                            element.style[prop] !== undefined) {
11671                        support.transition = transitions[prop];
11672                        support.transition.name = prop;
11673                        break;
11674                    }
11675                }
11676            }(support, transitions));
11677            if (document.body) {
11678                elementTests();
11679            } else {
11680                $(document).on('DOMContentLoaded', elementTests);
11681            }
11682            return support;
11683            // Test element, has to be standard HTML and must not be hidden
11684            // for the CSS3 tests using window.getComputedStyle to be applicable:
11685        }(document.createElement('div'))),
11686
11687        requestAnimationFrame: window.requestAnimationFrame ||
11688            window.webkitRequestAnimationFrame ||
11689            window.mozRequestAnimationFrame,
11690
11691        initialize: function () {
11692            this.initStartIndex();
11693            if (this.initWidget() === false) {
11694                return false;
11695            }
11696            this.initEventListeners();
11697            // Load the slide at the given index:
11698            this.onslide(this.index);
11699            // Manually trigger the slideend event for the initial slide:
11700            this.ontransitionend();
11701            // Start the automatic slideshow if applicable:
11702            if (this.options.startSlideshow) {
11703                this.play();
11704            }
11705        },
11706
11707        slide: function (to, speed) {
11708            window.clearTimeout(this.timeout);
11709            var index = this.index,
11710                direction,
11711                naturalDirection,
11712                diff;
11713            if (index === to || this.num === 1) {
11714                return;
11715            }
11716            if (!speed) {
11717                speed = this.options.transitionSpeed;
11718            }
11719            if (this.support.transition) {
11720                if (!this.options.continuous) {
11721                    to = this.circle(to);
11722                }
11723                // 1: backward, -1: forward:
11724                direction = Math.abs(index - to) / (index - to);
11725                // Get the actual position of the slide:
11726                if (this.options.continuous) {
11727                    naturalDirection = direction;
11728                    direction = -this.positions[this.circle(to)] / this.slideWidth;
11729                    // If going forward but to < index, use to = slides.length + to
11730                    // If going backward but to > index, use to = -slides.length + to
11731                    if (direction !== naturalDirection) {
11732                        to = -direction * this.num + to;
11733                    }
11734                }
11735                diff = Math.abs(index - to) - 1;
11736                // Move all the slides between index and to in the right direction:
11737                while (diff) {
11738                    diff -= 1;
11739                    this.move(
11740                        this.circle((to > index ? to : index) - diff - 1),
11741                        this.slideWidth * direction,
11742                        0
11743                    );
11744                }
11745                to = this.circle(to);
11746                this.move(index, this.slideWidth * direction, speed);
11747                this.move(to, 0, speed);
11748                if (this.options.continuous) {
11749                    this.move(
11750                        this.circle(to - direction),
11751                        -(this.slideWidth * direction),
11752                        0
11753                    );
11754                }
11755            } else {
11756                to = this.circle(to);
11757                this.animate(index * -this.slideWidth, to * -this.slideWidth, speed);
11758            }
11759            this.onslide(to);
11760        },
11761
11762        getIndex: function () {
11763            return this.index;
11764        },
11765
11766        getNumber: function () {
11767            return this.num;
11768        },
11769
11770        prev: function () {
11771            if (this.options.continuous || this.index) {
11772                this.slide(this.index - 1);
11773            }
11774        },
11775
11776        next: function () {
11777            if (this.options.continuous || this.index < this.num - 1) {
11778                this.slide(this.index + 1);
11779            }
11780        },
11781
11782        play: function (time) {
11783            var that = this;
11784            window.clearTimeout(this.timeout);
11785            this.interval = time || this.options.slideshowInterval;
11786            if (this.elements[this.index] > 1) {
11787                this.timeout = this.setTimeout(
11788                    (!this.requestAnimationFrame && this.slide) || function (to, speed) {
11789                        that.animationFrameId = that.requestAnimationFrame.call(
11790                            window,
11791                            function () {
11792                                that.slide(to, speed);
11793                            }
11794                        );
11795                    },
11796                    [this.index + 1, this.options.slideshowTransitionSpeed],
11797                    this.interval
11798                );
11799            }
11800            this.container.addClass(this.options.playingClass);
11801        },
11802
11803        pause: function () {
11804            window.clearTimeout(this.timeout);
11805            this.interval = null;
11806            this.container.removeClass(this.options.playingClass);
11807        },
11808
11809        add: function (list) {
11810            var i;
11811            if (!list.concat) {
11812                // Make a real array out of the list to add:
11813                list = Array.prototype.slice.call(list);
11814            }
11815            if (!this.list.concat) {
11816                // Make a real array out of the Gallery list:
11817                this.list = Array.prototype.slice.call(this.list);
11818            }
11819            this.list = this.list.concat(list);
11820            this.num = this.list.length;
11821            if (this.num > 2 && this.options.continuous === null) {
11822                this.options.continuous = true;
11823                this.container.removeClass(this.options.leftEdgeClass);
11824            }
11825            this.container
11826                .removeClass(this.options.rightEdgeClass)
11827                .removeClass(this.options.singleClass);
11828            for (i = this.num - list.length; i < this.num; i += 1) {
11829                this.addSlide(i);
11830                this.positionSlide(i);
11831            }
11832            this.positions.length = this.num;
11833            this.initSlides(true);
11834        },
11835
11836        resetSlides: function () {
11837            this.slidesContainer.empty();
11838            this.slides = [];
11839        },
11840
11841        handleClose: function () {
11842            var options = this.options;
11843            this.destroyEventListeners();
11844            // Cancel the slideshow:
11845            this.pause();
11846            this.container[0].style.display = 'none';
11847            this.container
11848                .removeClass(options.displayClass)
11849                .removeClass(options.singleClass)
11850                .removeClass(options.leftEdgeClass)
11851                .removeClass(options.rightEdgeClass);
11852            if (options.hidePageScrollbars) {
11853                document.body.style.overflow = this.bodyOverflowStyle;
11854            }
11855            if (this.options.clearSlides) {
11856                this.resetSlides();
11857            }
11858            if (this.options.onclosed) {
11859                this.options.onclosed.call(this);
11860            }
11861        },
11862
11863        close: function () {
11864            var that = this,
11865                closeHandler = function (event) {
11866                    if (event.target === that.container[0]) {
11867                        that.container.off(
11868                            that.support.transition.end,
11869                            closeHandler
11870                        );
11871                        that.handleClose();
11872                    }
11873                };
11874            if (this.options.onclose) {
11875                this.options.onclose.call(this);
11876            }
11877            if (this.support.transition && this.options.displayTransition) {
11878                this.container.on(
11879                    this.support.transition.end,
11880                    closeHandler
11881                );
11882                this.container.removeClass(this.options.displayClass);
11883            } else {
11884                this.handleClose();
11885            }
11886        },
11887
11888        circle: function (index) {
11889            // Always return a number inside of the slides index range:
11890            return (this.num + (index % this.num)) % this.num;
11891        },
11892
11893        move: function (index, dist, speed) {
11894            this.translateX(index, dist, speed);
11895            this.positions[index] = dist;
11896        },
11897
11898        translate: function (index, x, y, speed) {
11899            var style = this.slides[index].style,
11900                transition = this.support.transition,
11901                transform = this.support.transform;
11902            style[transition.name + 'Duration'] = speed + 'ms';
11903            style[transform.name] = 'translate(' + x + 'px, ' + y + 'px)' +
11904                (transform.translateZ ? ' translateZ(0)' : '');
11905        },
11906
11907        translateX: function (index, x, speed) {
11908            this.translate(index, x, 0, speed);
11909        },
11910
11911        translateY: function (index, y, speed) {
11912            this.translate(index, 0, y, speed);
11913        },
11914
11915        animate: function (from, to, speed) {
11916            if (!speed) {
11917                this.slidesContainer[0].style.left = to + 'px';
11918                return;
11919            }
11920            var that = this,
11921                start = new Date().getTime(),
11922                timer = window.setInterval(function () {
11923                    var timeElap = new Date().getTime() - start;
11924                    if (timeElap > speed) {
11925                        that.slidesContainer[0].style.left = to + 'px';
11926                        that.ontransitionend();
11927                        window.clearInterval(timer);
11928                        return;
11929                    }
11930                    that.slidesContainer[0].style.left = (((to - from) *
11931                        (Math.floor((timeElap / speed) * 100) / 100)) +
11932                            from) + 'px';
11933                }, 4);
11934        },
11935
11936        preventDefault: function (event) {
11937            if (event.preventDefault) {
11938                event.preventDefault();
11939            } else {
11940                event.returnValue = false;
11941            }
11942        },
11943
11944        stopPropagation: function (event) {
11945            if (event.stopPropagation) {
11946                event.stopPropagation();
11947            } else {
11948                event.cancelBubble = true;
11949            }
11950        },
11951
11952        onresize: function () {
11953            this.initSlides(true);
11954        },
11955
11956        onmousedown: function (event) {
11957            // Trigger on clicks of the left mouse button only
11958            // and exclude video elements:
11959            if (event.which && event.which === 1 &&
11960                    event.target.nodeName !== 'VIDEO') {
11961                // Preventing the default mousedown action is required
11962                // to make touch emulation work with Firefox:
11963                event.preventDefault();
11964                (event.originalEvent || event).touches = [{
11965                    pageX: event.pageX,
11966                    pageY: event.pageY
11967                }];
11968                this.ontouchstart(event);
11969            }
11970        },
11971
11972        onmousemove: function (event) {
11973            if (this.touchStart) {
11974                (event.originalEvent || event).touches = [{
11975                    pageX: event.pageX,
11976                    pageY: event.pageY
11977                }];
11978                this.ontouchmove(event);
11979            }
11980        },
11981
11982        onmouseup: function (event) {
11983            if (this.touchStart) {
11984                this.ontouchend(event);
11985                delete this.touchStart;
11986            }
11987        },
11988
11989        onmouseout: function (event) {
11990            if (this.touchStart) {
11991                var target = event.target,
11992                    related = event.relatedTarget;
11993                if (!related || (related !== target &&
11994                        !$.contains(target, related))) {
11995                    this.onmouseup(event);
11996                }
11997            }
11998        },
11999
12000        ontouchstart: function (event) {
12001            if (this.options.stopTouchEventsPropagation) {
12002                this.stopPropagation(event);
12003            }
12004            // jQuery doesn't copy touch event properties by default,
12005            // so we have to access the originalEvent object:
12006            var touches = (event.originalEvent || event).touches[0];
12007            this.touchStart = {
12008                // Remember the initial touch coordinates:
12009                x: touches.pageX,
12010                y: touches.pageY,
12011                // Store the time to determine touch duration:
12012                time: Date.now()
12013            };
12014            // Helper variable to detect scroll movement:
12015            this.isScrolling = undefined;
12016            // Reset delta values:
12017            this.touchDelta = {};
12018        },
12019
12020        ontouchmove: function (event) {
12021            if (this.options.stopTouchEventsPropagation) {
12022                this.stopPropagation(event);
12023            }
12024            // jQuery doesn't copy touch event properties by default,
12025            // so we have to access the originalEvent object:
12026            var touches = (event.originalEvent || event).touches[0],
12027                scale = (event.originalEvent || event).scale,
12028                index = this.index,
12029                touchDeltaX,
12030                indices;
12031            // Ensure this is a one touch swipe and not, e.g. a pinch:
12032            if (touches.length > 1 || (scale && scale !== 1)) {
12033                return;
12034            }
12035            if (this.options.disableScroll) {
12036                event.preventDefault();
12037            }
12038            // Measure change in x and y coordinates:
12039            this.touchDelta = {
12040                x: touches.pageX - this.touchStart.x,
12041                y: touches.pageY - this.touchStart.y
12042            };
12043            touchDeltaX = this.touchDelta.x;
12044            // Detect if this is a vertical scroll movement (run only once per touch):
12045            if (this.isScrolling === undefined) {
12046                this.isScrolling = this.isScrolling ||
12047                    Math.abs(touchDeltaX) < Math.abs(this.touchDelta.y);
12048            }
12049            if (!this.isScrolling) {
12050                // Always prevent horizontal scroll:
12051                event.preventDefault();
12052                // Stop the slideshow:
12053                window.clearTimeout(this.timeout);
12054                if (this.options.continuous) {
12055                    indices = [
12056                        this.circle(index + 1),
12057                        index,
12058                        this.circle(index - 1)
12059                    ];
12060                } else {
12061                    // Increase resistance if first slide and sliding left
12062                    // or last slide and sliding right:
12063                    this.touchDelta.x = touchDeltaX =
12064                        touchDeltaX /
12065                        (((!index && touchDeltaX > 0) ||
12066                            (index === this.num - 1 && touchDeltaX < 0)) ?
12067                                (Math.abs(touchDeltaX) / this.slideWidth + 1) : 1);
12068                    indices = [index];
12069                    if (index) {
12070                        indices.push(index - 1);
12071                    }
12072                    if (index < this.num - 1) {
12073                        indices.unshift(index + 1);
12074                    }
12075                }
12076                while (indices.length) {
12077                    index = indices.pop();
12078                    this.translateX(index, touchDeltaX + this.positions[index], 0
12078);
12079                }
12080            } else if (this.options.closeOnSwipeUpOrDown) {
12081                this.translateY(index, this.touchDelta.y + this.positions[index], 0);
12082            }
12083        },
12084
12085        ontouchend: function (event) {
12086            if (this.options.stopTouchEventsPropagation) {
12087                this.stopPropagation(event);
12088            }
12089            var index = this.index,
12090                speed = this.options.transitionSpeed,
12091                slideWidth = this.slideWidth,
12092                isShortDuration = Number(Date.now() - this.touchStart.time) < 250,
12093                // Determine if slide attempt triggers next/prev slide:
12094                isValidSlide = (isShortDuration && Math.abs(this.touchDelta.x) > 20) ||
12095                    Math.abs(this.touchDelta.x) > slideWidth / 2,
12096                // Determine if slide attempt is past start or end:
12097                isPastBounds = (!index && this.touchDelta.x > 0) ||
12098                        (index === this.num - 1 && this.touchDelta.x < 0),
12099                isValidClose = !isValidSlide && this.options.closeOnSwipeUpOrDown &&
12100                    ((isShortDuration && Math.abs(this.touchDelta.y) > 20) ||
12101                        Math.abs(this.touchDelta.y) > this.slideHeight / 2),
12102                direction,
12103                indexForward,
12104                indexBackward,
12105                distanceForward,
12106                distanceBackward;
12107            if (this.options.continuous) {
12108                isPastBounds = false;
12109            }
12110            // Determine direction of swipe (true: right, false: left):
12111            direction = this.touchDelta.x < 0 ? -1 : 1;
12112            if (!this.isScrolling) {
12113                if (isValidSlide && !isPastBounds) {
12114                    indexForward = index + direction;
12115                    indexBackward = index - direction;
12116                    distanceForward = slideWidth * direction;
12117                    distanceBackward = -slideWidth * direction;
12118                    if (this.options.continuous) {
12119                        this.move(this.circle(indexForward), distanceForward, 0);
12120                        this.move(this.circle(index - 2 * direction), distanceBackward, 0);
12121                    } else if (indexForward >= 0 &&
12122                            indexForward < this.num) {
12123                        this.move(indexForward, distanceForward, 0);
12124                    }
12125                    this.move(index, this.positions[index] + distanceForward, speed);
12126                    this.move(
12127                        this.circle(indexBackward),
12128                        this.positions[this.circle(indexBackward)] + distanceForward,
12129                        speed
12130                    );
12131                    index = this.circle(indexBackward);
12132                    this.onslide(index);
12133                } else {
12134                    // Move back into position
12135                    if (this.options.continuous) {
12136                        this.move(this.circle(index - 1), -slideWidth, speed);
12137                        this.move(index, 0, speed);
12138                        this.move(this.circle(index + 1), slideWidth, speed);
12139                    } else {
12140                        if (index) {
12141                            this.move(index - 1, -slideWidth, speed);
12142                        }
12143                        this.move(index, 0, speed);
12144                        if (index < this.num - 1) {
12145                            this.move(index + 1, slideWidth, speed);
12146                        }
12147                    }
12148                }
12149            } else {
12150                if (isValidClose) {
12151                    this.close();
12152                } else {
12153                    // Move back into position
12154                    this.translateY(index, 0, speed);
12155                }
12156            }
12157        },
12158
12159        ontouchcancel: function (event) {
12160            if (this.touchStart) {
12161                this.ontouchend(event);
12162                delete this.touchStart;
12163            }
12164        },
12165
12166        ontransitionend: function (event) {
12167            var slide = this.slides[this.index];
12168            if (!event || slide === event.target) {
12169                if (this.interval) {
12170                    this.play();
12171                }
12172                this.setTimeout(
12173                    this.options.onslideend,
12174                    [this.index, slide]
12175                );
12176            }
12177        },
12178
12179        oncomplete: function (event) {
12180            var target = event.target || event.srcElement,
12181                parent = target && target.parentNode,
12182                index;
12183            if (!target || !parent) {
12184                return;
12185            }
12186            index = this.getNodeIndex(parent);
12187            $(parent).removeClass(this.options.slideLoadingClass);
12188            if (event.type === 'error') {
12189                $(parent).addClass(this.options.slideErrorClass);
12190                this.elements[index] = 3; // Fail
12191            } else {
12192                this.elements[index] = 2; // Done
12193            }
12194            // Fix for IE7's lack of support for percentage max-height:
12195            if (target.clientHeight > this.container[0].clientHeight) {
12196                target.style.maxHeight = this.container[0].clientHeight;
12197            }
12198            if (this.interval && this.slides[this.index] === parent) {
12199                this.play();
12200            }
12201            this.setTimeout(
12202                this.options.onslidecomplete,
12203                [index, parent]
12204            );
12205        },
12206
12207        onload: function (event) {
12208            this.oncomplete(event);
12209        },
12210
12211        onerror: function (event) {
12212            this.oncomplete(event);
12213        },
12214
12215        onkeydown: function (event) {
12216            switch (event.which || event.keyCode) {
12217            case 13: // Return
12218                if (this.options.toggleControlsOnReturn) {
12219                    this.preventDefault(event);
12220                    this.toggleControls();
12221                }
12222                break;
12223            case 27: // Esc
12224                if (this.options.closeOnEscape) {
12225                    this.close();
12226                }
12227                break;
12228            case 32: // Space
12229                if (this.options.toggleSlideshowOnSpace) {
12230                    this.preventDefault(event);
12231                    this.toggleSlideshow();
12232                }
12233                break;
12234            case 37: // Left
12235                if (this.options.enableKeyboardNavigation) {
12236                    this.preventDefault(event);
12237                    this.prev();
12238                }
12239                break;
12240            case 39: // Right
12241                if (this.options.enableKeyboardNavigation) {
12242                    this.preventDefault(event);
12243                    this.next();
12244                }
12245                break;
12246            }
12247        },
12248
12249        handleClick: function (event) {
12250            var options = this.options,
12251                target = event.target || event.srcElement,
12252                parent = target.parentNode,
12253                isTarget = function (className) {
12254                    return $(target).hasClass(className) ||
12255                        $(parent).hasClass(className);
12256                };
12257            if (isTarget(options.toggleClass)) {
12258                // Click on "toggle" control
12259                this.preventDefault(event);
12260                this.toggleControls();
12261            } else if (isTarget(options.prevClass)) {
12262                // Click on "prev" control
12263                this.preventDefault(event);
12264                this.prev();
12265            } else if (isTarget(options.nextClass)) {
12266                // Click on "next" control
12267                this.preventDefault(event);
12268                this.next();
12269            } else if (isTarget(options.closeClass)) {
12270                // Click on "close" control
12271                this.preventDefault(event);
12272                this.close();
12273            } else if (isTarget(options.playPauseClass)) {
12274                // Click on "play-pause" control
12275                this.preventDefault(event);
12276                this.toggleSlideshow();
12277            } else if (parent === this.slidesContainer[0]) {
12278                // Click on slide background
12279                this.preventDefault(event);
12280                if (options.closeOnSlideClick) {
12281                    this.close();
12282                } else {
12283                    this.toggleControls();
12284                }
12285            } else if (parent.parentNode &&
12286                    parent.parentNode === this.slidesContainer[0]) {
12287                // Click on displayed element
12288                this.preventDefault(event);
12289                this.toggleControls();
12290            }
12291        },
12292
12293        onclick: function (event) {
12294            if (this.options.emulateTouchEvents &&
12295                    this.touchDelta && (Math.abs(this.touchDelta.x) > 20 ||
12296                        Math.abs(this.touchDelta.y) >
12296 20)) {
12297                delete this.touchDelta;
12298                return;
12299            }
12300            return this.handleClick(event);
12301        },
12302
12303        updateEdgeClasses: function (index) {
12304            if (!index) {
12305                this.container.addClass(this.options.leftEdgeClass);
12306            } else {
12307                this.container.removeClass(this.options.leftEdgeClass);
12308            }
12309            if (index === this.num - 1) {
12310                this.container.addClass(this.options.rightEdgeClass);
12311            } else {
12312                this.container.removeClass(this.options.rightEdgeClass);
12313            }
12314        },
12315
12316        handleSlide: function (index) {
12317            if (!this.options.continuous) {
12318                this.updateEdgeClasses(index);
12319            }
12320            this.loadElements(index);
12321            if (this.options.unloadElements) {
12322                this.unloadElements(index);
12323            }
12324            this.setTitle(index);
12325        },
12326
12327        onslide: function (index) {
12328            this.index = index;
12329            this.handleSlide(index);
12330            this.setTimeout(this.options.onslide, [index, this.slides[index]]);
12331        },
12332
12333        setTitle: function (index) {
12334            var text = this.slides[index].firstChild.title,
12335                titleElement = this.titleElement;
12336            if (titleElement.length) {
12337                this.titleElement.empty();
12338                if (text) {
12339                    titleElement[0].appendChild(document.createTextNode(text));
12340                }
12341            }
12342        },
12343
12344        setTimeout: function (func, args, wait) {
12345            var that = this;
12346            return func && window.setTimeout(function () {
12347                func.apply(that, args || []);
12348            }, wait || 0);
12349        },
12350
12351        imageFactory: function (obj, callback) {
12352            var that = this,
12353                img = this.imagePrototype.cloneNode(false),
12354                url = obj,
12355                backgroundSize = this.options.stretchImages,
12356                called,
12357                element,
12358                callbackWrapper = function (event) {
12359                    if (!called) {
12360                        event = {
12361                            type: event.type,
12362                            target: element
12363                        };
12364                        if (!element.parentNode) {
12365                            // Fix for IE7 firing the load event for
12366                            // cached images before the element could
12367                            // be added to the DOM:
12368                            return that.setTimeout(callbackWrapper, [event]);
12369                        }
12370                        called = true;
12371                        $(img).off('load error', callbackWrapper);
12372                        if (backgroundSize) {
12373                            if (event.type === 'load') {
12374                                element.style.background = 'url("' + url +
12375                                    '") center no-repeat';
12376                                element.style.backgroundSize = backgroundSize;
12377                            }
12378                        }
12379                        callback(event);
12380                    }
12381                },
12382                title;
12383            if (typeof url !== 'string') {
12384                url = this.getItemProperty(obj, this.options.urlProperty);
12385                title = this.getItemProperty(obj, this.options.titleProperty);
12386            }
12387            if (backgroundSize === true) {
12388                backgroundSize = 'contain';
12389            }
12390            backgroundSize = this.support.backgroundSize &&
12391                this.support.backgroundSize[backgroundSize] && backgroundSize;
12392            if (backgroundSize) {
12393                element = this.elementPrototype.cloneNode(false);
12394            } else {
12395                element = img;
12396                img.draggable = false;
12397            }
12398            if (title) {
12399                element.title = title;
12400            }
12401            $(img).on('load error', callbackWrapper);
12402            img.src = url;
12403            return element;
12404        },
12405
12406        createElement: function (obj, callback) {
12407            var type = obj && this.getItemProperty(obj, this.options.typeProperty),
12408                factory = (type && this[type.split('/')[0] + 'Factory']) ||
12409                    this.imageFactory,
12410                element = obj && factory.call(this, obj, callback);
12411            if (!element) {
12412                element = this.elementPrototype.cloneNode(false);
12413                this.setTimeout(callback, [{
12414                    type: 'error',
12415                    target: element
12416                }]);
12417            }
12418            $(element).addClass(this.options.slideContentClass);
12419            return element;
12420        },
12421
12422        loadElement: function (index) {
12423            if (!this.elements[index]) {
12424                if (this.slides[index].firstChild) {
12425                    this.elements[index] = $(this.slides[index])
12426                        .hasClass(this.options.slideErrorClass) ? 3 : 2;
12427                } else {
12428                    this.elements[index] = 1; // Loading
12429                    $(this.slides[index]).addClass(this.options.slideLoadingClass);
12430                    this.slides[index].appendChild(this.createElement(
12431                        this.list[index],
12432                        this.proxyListener
12433                    ));
12434                }
12435            }
12436        },
12437
12438        loadElements: function (index) {
12439            var limit = Math.min(this.num, this.options.preloadRange * 2 + 1),
12440                j = index,
12441                i;
12442            for (i = 0; i < limit; i += 1) {
12443                // First load the current slide element (0),
12444                // then the next one (+1),
12445                // then the previous one (-2),
12446                // then the next after next (+2), etc.:
12447                j += i * (i % 2 === 0 ? -1 : 1);
12448                // Connect the ends of the list to load slide elements for
12449                // continuous navigation:
12450                j = this.circle(j);
12451                this.loadElement(j);
12452            }
12453        },
12454
12455        unloadElements: function (index) {
12456            var i,
12457                slide,
12458                diff;
12459            for (i in this.elements) {
12460                if (this.elements.hasOwnProperty(i)) {
12461                    diff = Math.abs(index - i);
12462                    if (diff > this.options.preloadRange &&
12463                            diff + this.options.preloadRange < this.num) {
12464                        slide = this.slides[i];
12465                        slide.removeChild(slide.firstChild);
12466                        delete this.elements[i];
12467                    }
12468                }
12469            }
12470        },
12471
12472        addSlide: function (index) {
12473            var slide = this.slidePrototype.cloneNode(false);
12474            slide.setAttribute('data-index', index);
12475            this.slidesContainer[0].appendChild(slide);
12476            this.slides.push(slide);
12477        },
12478
12479        positionSlide: function (index) {
12480            var slide = this.slides[index];
12481            slide.style.width = this.slideWidth + 'px';
12482            if (this.support.transition) {
12483                slide.style.left = (index * -this.slideWidth) + 'px';
12484                this.move(index, this.index > index ? -this.slideWidth :
12485                        (this.index < index ? this.slideWidth : 0), 0);
12486            }
12487        },
12488
12489        initSlides: function (reload) {
12490            var clearSlides,
12491                i;
12492            if (!reload) {
12493                this.positions = [];
12494                this.positions.length = this.num;
12495                this.elements = {};
12496                this.imagePrototype = document.createElement('img');
12497                this.elementPrototype = document.createElement('div');
12498                this.slidePrototype = document.createElement('div');
12499                $(this.slidePrototype).addClass(this.options.slideClass);
12500                this.slides = this.slidesContainer[0].children;
12501                clearSlides = this.options.clearSlides ||
12502                    this.slides.length !== this.num;
12503            }
12504            this.slideWidth = this.container[0].offsetWidth;
12505            this.slideHeight = this.container[0].offsetHeight;
12506            this.slidesContainer[0].style.width =
12507                (this.num * this.slideWidth) + 'px';
12508            if (clearSlides) {
12509                this.resetSlides();
12510            }
12511            for (i = 0; i < this.num; i += 1) {
12512                if (clearSlides) {
12513                    this.addSlide(i);
12514                }
12515                this.positionSlide(i);
12516            }
12517            // Reposition the slides before and after the given index:
12518            if (this.options.continuous && this.support.transition) {
12519                this.move(this.circle(this.index - 1), -this.slideWidth, 0);
12520                this.move(this.circle(this.index + 1), this.slideWidth, 0);
12521            }
12522            if (!this.support.transition) {
12523                this.slidesContainer[0].style.left =
12524                    (this.index * -this.slideWidth) + 'px';
12525            }
12526        },
12527
12528        toggleControls: function () {
12529            var controlsClass = this.options.controlsClass;
12530            if (this.container.hasClass(controlsClass)) {
12531                this.container.removeClass(controlsClass);
12532            } else {
12533                this.container.addClass(controlsClass);
12534            }
12535        },
12536
12537        toggleSlideshow: function () {
12538            if (!this.interval) {
12539                this.play();
12540            } else {
12541                this.pause();
12542            }
12543        },
12544
12545        getNodeIndex: function (element) {
12546            return parseInt(element.getAttribute('data-index'), 10);
12547        },
12548
12549        getNestedProperty: function (obj, property) {
12550            property.replace(
12551                // Matches native JavaScript notation in a String,
12552                // e.g. '["doubleQuoteProp"].dotProp[2]'
12553                /\[(?:'([^']+)'|"([^"]+)"|(\d+))\]|(?:(?:^|\.)([^\.\[]+))/g,
12554                function (str, singleQuoteProp, doubleQuoteProp, arrayIndex, dotProp) {
12555                    var prop = dotProp || singleQuoteProp || doubleQuoteProp ||
12556                            (arrayIndex && parseInt(arrayIndex, 10));
12557                    if (str && obj) {
12558                        obj = obj[prop];
12559                    }
12560                }
12561            );
12562            return obj;
12563        },
12564
12565        getDataProperty: function (obj, property) {
12566            if (obj.getAttribute) {
12567                var prop = obj.getAttribute('data-' +
12568                        property.replace(/([A-Z])/g, '-$1').toLowerCase());
12569                if (typeof prop === 'string') {
12570                    if (/^(true|false|null|-?\d+(\.\d+)?|\{[\s\S]*\}|\[[\s\S]*\])$/
12571                            .test(prop)) {
12572                        try {
12573                            return $.parseJSON(prop);
12574                        } catch (ignore) {}
12575                    }
12576                    return prop;
12577                }
12578            }
12579        },
12580
12581        getItemProperty: function (obj, property) {
12582            var prop = obj[property];
12583            if (prop === undefined) {
12584                prop = this.getDataProperty(obj, property);
12585                if (prop === undefined) {
12586                    prop = this.getNestedProperty(obj, property);
12587                }
12588            }
12589            return prop;
12590        },
12591
12592        initStartIndex: function () {
12593            var index = this.options.index,
12594                urlProperty = this.options.urlProperty,
12595                i;
12596            // Check if the index is given as a list object:
12597            if (index && typeof index !== 'number') {
12598                for (i = 0; i < this.num; i += 1) {
12599                    if (this.list[i] === index ||
12600                            this.getItemProperty(this.list[i], urlProperty) ===
12601                                this.getItemProperty(index, urlProperty)) {
12602                        index  = i;
12603                        break;
12604                    }
12605                }
12606            }
12607            // Make sure the index is in the list range:
12608            this.index = this.circle(parseInt(index, 10) || 0);
12609        },
12610
12611        initEventListeners: function () {
12612            var that = this,
12613                slidesContainer = this.slidesContainer,
12614                proxyListener = function (event) {
12615                    var type = that.support.transition &&
12616                            that.support.transition.end === event.type ?
12617                                    'transitionend' : event.type;
12618                    that['on' + type](event);
12619                };
12620            $(window).on('resize', proxyListener);
12621            $(document.body).on('keydown', proxyListener);
12622            this.container.on('click', proxyListener);
12623            if (this.support.touch) {
12624                slidesContainer
12625                    .on('touchstart touchmove touchend touchcancel', proxyListener);
12626            } else if (this.options.emulateTouchEvents &&
12627                    this.support.transition) {
12628                slidesContainer
12629                    .on('mousedown mousemove mouseup mouseout', proxyListener);
12630            }
12631            if (this.support.transition) {
12632                slidesContainer.on(
12633                    this.support.transition.end,
12634                    proxyListener
12635                );
12636            }
12637            this.proxyListener = proxyListener;
12638        },
12639
12640        destroyEventListeners: function () {
12641            var slidesContainer = this.slidesContainer,
12642                proxyListener = this.proxyListener;
12643            $(window).off('resize', proxyListener);
12644            $(document.body).off('keydown', proxyListener);
12645            this.container.off('click', proxyListener);
12646            if (this.support.touch) {
12647                slidesContainer
12648                    .off('touchstart touchmove touchend touchcancel', proxyListener);
12649            } else if (this.options.emulateTouchEvents &&
12650                    this.support.transition) {
12651                slidesContainer
12652                    .off('mousedown mousemove mouseup mouseout', proxyListener);
12653            }
12654            if (this.support.transition) {
12655                slidesContainer.off(
12656                    this.support.transition.end,
12657                    proxyListener
12658                );
12659            }
12660        },
12661
12662        handleOpen: function () {
12663            if (this.options.onopened) {
12664                this.options.onopened.call(this);
12665            }
12666        },
12667
12668        initWidget: function () {
12669            var that = this,
12670                openHandler = function (event) {
12671                    if (event.target === that.container[0]) {
12672                        that.container.off(
12673                            that.support.transition.end,
12674                            openHandler
12675                        );
12676                        that.handleOpen();
12677                    }
12678                };
12679            this.container = $(this.options.container);
12680            if (!this.container.length) {
12681                this.console.log(
12682                    'blueimp Gallery: Widget container not found.',
12683                    this.options.container
12684                );
12685                return false;
12686            }
12687            this.slidesContainer = this.container.find(
12688                this.options.slidesContainer
12689            ).first();
12690            if (!this.slidesContainer.length) {
12691                this.console.log(
12692                    'blueimp Gallery: Slides container not found.',
12693                    this.options.slidesContainer
12694                );
12695                return false;
12696            }
12697            this.titleElement = this.container.find(
12698                this.options.titleElement
12699            ).first();
12700            if (this.num === 1) {
12701                this.container.addClass(this.options.singleClass);
12702            }
12703            if (this.options.onopen) {
12704                this.options.onopen.call(this);
12705            }
12706            if (this.support.transition && this.options.displayTransition) {
12707                this.container.on(
12708                    this.support.transition.end,
12709                    openHandler
12710                );
12711            } else {
12712                this.handleOpen();
12713            }
12714            // Auskommentiert, damit Scrollbar nicht verschwindet
12715            /*if (this.options.hidePageScrollbars) {
12716                // Hide the page scrollbars:
12717                this.bodyOverflowStyle = document.body.style.overflow;
12718                document.body.style.overflow = 'hidden';
12719            }*/
12720            this.container[0].style.display = 'block';
12721            this.initSlides();
12722            this.container.addClass(this.options.displayClass);
12723        },
12724
12725        initOptions: function (options) {
12726            // Create a copy of the prototype options:
12727            this.options = $.extend({}, this.options);
12728            // Check if carousel mode is enabled:
12729            if ((options && options.carousel) ||
12730                    (this.options.carousel && (!options || options.carousel !== false))) {
12731                $.extend(this.options, this.carouselOptions);
12732            }
12733            // Override any given options:
12734            $.extend(this.options, options);
12735            if (this.num < 3) {
12736                // 1 or 2 slides cannot be displayed continuous,
12737                // remember the original option by setting to null instead of false:
12738                this.options.continuous = this.options.continuous ? null : false;
12739            }
12740            if (!this.support.transition) {
12741                this.options.emulateTouchEvents = false;
12742            }
12743            if (this.options.event) {
12744                this.preventDefault(this.options.event);
12745            }
12746        }
12747
12748    });
12749
12750    return Gallery;
12751}));
12752
12753blueimp.Gallery.prototype.textFactory = function (obj, callback) {
12754    var $element = $('<div>').addClass('text-content').attr('title', obj.title),
12755        $content,
12756        html = obj.html || $(obj).data('html');
12757
12758    if (html) {
12759        $content = $(html);
12760        $element.append($content);
12761        $(window).resize();
12762        window.setTimeout(function () {
12763            callback({
12764                type: 'load',
12765                target: $element[0]
12766            });
12767        }, 500);
12768    } else if (obj.href) {
12769        if (obj.href.substring(0, 1) === '#') {
12770            $content = $(obj.href);
12771            if ($content.length) {
12772                $content = $content.clone().removeAttr('id').removeClass('hide');
12773                $content = $('<div>').append($content);
12774                $element.append($content);
12775                $(window).resize();
12776                window.setTimeout(function () {
12777                    callback({
12778                        type: 'load',
12779                        target: $element[0]
12780                    });
12781                }, 500);
12782            }
12783            else {
12784                window.setTimeout(function () {
12785                    callback({
12786                        type: 'error',
12787                        target: $element[0]
12788                    });
12789                }, 500);
12790            }
12791        } else {
12792            $.get(obj.href)
12793                .done(function (result) {
12794                    $content = $(result).find('#content').removeAttr('id');
12795                    $element.append($content);
12796                    $(window).resize();
12797                    callback({
12798                        type: 'load',
12799                        target: $element[0]
12800                    });
12801                })
12802                .fail(function () {
12803                    callback({
12804                        type: 'error',
12805                        target: $element[0]
12806                    });
12807                });
12808        }
12809    }
12810
12811    return $element[0];
12812};
12813
12814$(function () {
12815    $(document).on('click', '.lightbox', function () {
12816        blueimp.Gallery([
12817            {
12818                href: $(this).attr('href'),
12819                type: 'text/html'
12820            }
12821        ], {
12822            closeOnSwipeUpOrDown: false,
12823            disableScroll: false,
12824            emulateTouchEvents: false,
12825            enableKeyboardNavigation: false,
12826            hidePageScrollbars: true,
12827            toggleControlsOnReturn: false,
12828            toggleSlideshowOnSpace: false
12829        });
12830        $(window).resize();
12831        return false;
12832    });
12833});
12834
12835/**
12836 * Project: Bootstrap Hover Dropdown
12837 * Author: Cameron Spear
12838 * Contributors: Mattia Larentis
12839 *
12840 * Dependencies: Bootstrap's Dropdown plugin, jQuery
12841 *
12842 * A simple plugin to enable Bootstrap dropdowns to active on hover and provide a nice user experience.
12843 *
12844 * License: MIT
12845 *
12846 * http://cameronspear.com/blog/bootstrap-dropdown-on-hover-plugin/
12847 */
12848;(function ($, window, undefined) {
12849    // outside the scope of the jQuery plugin to
12850    // keep track of all dropdowns
12851    var $allDropdowns = $();
12852
12853    // if instantlyCloseOthers is true, then it will instantly
12854    // shut other nav items when a new one is hovered over
12855    $.fn.dropdownHover = function (options) {
12856        // don't do anything if touch is supported
12857        // (plugin causes some issues on mobile)
12858        if('ontouchstart' in document) return this; // don't want to affect chaining
12859
12860        // the element we really care about
12861        // is the dropdown-toggle's parent
12862        $allDropdowns = $allDropdowns.add(this.parent());
12863
12864        return this.each(function () {
12865            var $this = $(this),
12866                $parent = $this.parent(),
12867                defaults = {
12868                    delay: 500,
12869                    instantlyCloseOthers: true
12870                },
12871                data = {
12872                    delay: $(this).data('delay'),
12873                    instantlyCloseOthers: $(this).data('close-others')
12874                },
12875                showEvent   = 'show.bs.dropdown',
12876                hideEvent   = 'hide.bs.dropdown',
12877            // shownEvent  = 'shown.bs.dropdown',
12878            // hiddenEvent = 'hidden.bs.dropdown',
12879                settings = $.extend(true, {}, defaults, options, data),
12880                timeout;
12881
12882            $parent.hover(function (event) {
12883                // so a neighbor can't open the dropdown
12884                if(!$parent.hasClass('open') && !$this.is(event.target)) {
12885                    // stop this event, stop executing any code
12886                    // in this callback but continue to propagate
12887                    return true;
12888                }
12889
12890                $allDropdowns.find(':focus').blur();
12891
12892                if(settings.instantlyCloseOthers === true)
12893                    $allDropdowns.removeClass('open');
12894
12895                window.clearTimeout(timeout);
12896                var e = $.Event(showEvent);
12897                $this.trigger(e);
12898                if (e.isDefaultPrevented()) return;
12899                $parent.addClass('open');
12900            }, function () {
12901                timeout = window.setTimeout(function () {
12902                    var e = $.Event(hideEvent);
12903                    $this.trigger(e);
12904                    if (e.isDefaultPrevented()) return;
12905                    $parent.removeClass('open');
12906                }, settings.delay);
12907            });
12908
12909            // this helps with button groups!
12910            $this.hover(function () {
12911                $allDropdowns.find(':focus').blur();
12912
12913                if(settings.instantlyCloseOthers === true)
12914                    $allDropdowns.removeClass('open');
12915
12916                window.clearTimeout(timeout);
12917                $parent.addClass('open');
12918                $this.trigger(showEvent);
12919            });
12920
12921            // handle submenus
12922            $parent.find('.dropdown-submenu').each(function (){
12923                var $this = $(this);
12924                var subTimeout;
12925                $this.hover(function () {
12926                    window.clearTimeout(subTimeout);
12927                    $this.children('.dropdown-menu').show();
12928                    // always close submenu siblings instantly
12929                    $this.siblings().children('.dropdown-menu').hide();
12930                }, function () {
12931                    var $submenu = $this.children('.dropdown-menu');
12932                    subTimeout = window.setTimeout(function () {
12933                        $submenu.hide();
12934                    }, settings.delay);
12935                });
12936            });
12937        });
12938    };
12939
12940    $(document).ready(function () {
12941        // apply dropdownHover to all elements with the data-hover="dropdown" attribute
12942        $('[data-hover="dropdown"]').dropdownHover();
12943    });
12944})(jQuery, this);
12945
12946$(document).ready(function() {
12947    var n, ua = navigator.userAgent;
12948
12949    if (/MSIE (\d+\.\d+);/.test(ua)) {
12950        n = "i";
12951    } else {
12952        n = "x";
12953    }
12954
12955    var v = new Number(RegExp.$1);
12956
12957    if (n === "i" && v < 11) {
12958        var linkStart = '<a href="http://microsoft.com/ie" target="_blank" class="alert-link">',
12959            linkEnd = '</a>';
12960        dfalert('browser-update', Translator.trans('alert.browser_update', {'browserName': 'Internet Explorer', 'browserVersion': v, 'linkStart': linkStart, 'linkEnd': linkEnd}), 'warning');
12961    }
12962});
12963
12964$(document).ready(function () {
12965    var $container = $('.contentbrowser-level-container'),
12966        $preview = $('.contentbrowser .preview');
12967    $('body').on('click', '.contentbrowser a[data-destination-location-id]', function () {
12968        $.ajax({
12969            url: $(this).attr('href') + '/1'
12970        }).done(function (data) {
12971            var $data = $(data),
12972                level = 1,
12973                $dataContainer = $data.find('.contentbrowser-level-container'),
12974                levelRemoveCount = 0;
12975            $preview.html($data.find('.preview').html());
12976
12977            while (true) {
12978                var $containerLevel = $container.children('.level-' + level),
12979                    $dataLevel = $dataContainer.children('.level-' + level);
12980
12981                if ($containerLevel.length && $dataLevel.length) {
12982                    // Level austauschen
12983                    $containerLevel.html($dataLevel.html());
12984                } else if ($containerLevel.length && !$dataLevel.length) {
12985                    // Nicht mehr vorhandenes Level entfernen
12986                    levelRemoveCount++;
12987                    $containerLevel.removeClass('.level-' + level).css({
12988                        'visibility': 'hidden'
12989                    }).animate({'width': 0, 'height': 0}, 800, function () {
12990                        $(this).remove();
12991                        levelRemoveCount--;
12992                        if (0 === levelRemoveCount) {
12993                            cbSlideToLastLevel();
12994                        }
12995                    });
12996                } else if (!$containerLevel.length && $dataLevel.length) {
12997                    // Neues Level hinzufügen
12998                    $container.append($dataLevel);
12999                } else {
13000                    break;
13001                }
13002
13003                level++;
13004            }
13005
13006            $(window).resize();
13007            if (0 === levelRemoveCount) {
13008                cbSlideToLastLevel();
13009            }
13010        });
13011        return false;
13012    });
13013
13014    $('a.contentbrowser-link').click(function () {
13015        var $this = $(this);
13016
13017        $this.toggleClass('open');
13018
13019        if ($this.hasClass('open')) {
13020            var top = $this.offset().top + $this.outerHeight();
13021            $('.contentbrowser').css('top', top).show();
13022            cbSlideToLastLevel()
13023        } else {
13024            $('.contentbrowser').hide();
13025        }
13026
13027        return false;
13028    });
13029
13030    var cbSlideToLastLevel = function () {
13031        $container.stop(true).animate({scrollLeft: $container.children().last().offset().left - $container.offset().left}, 800);
13032    };
13033});
13034
13035(function($) {
13036    /**
13037     * Erstellt eine Nachladeanimation
13038     *
13039     * @param {string} action
13040     * @param {string|jQuery=} content
13041     *
13042     * @returns {jQuery}
13043     */
13044    $.fn.animateLoading = function (action, content) {
13045        var $loadingContainer = this,
13046            $loadingContent = $loadingContainer.children('.loading-content'),
13047            duration = 1000;
13048        if (action === 'start') {
13049            if ($loadingContent.length === 0) {
13050                $loadingContainer.wrapInner('<div class="loading-content"></div>');
13051                $loadingContent = $loadingContainer.children('.loading-content');
13052                $loadingContainer.addClass('loading-container');
13053                if ($loadingContent.children().length === 0) {
13054                    duration = 0;
13055                }
13056                $loadingContent.animate({'opacity': 0.25}, duration, function () {
13057                    $loadingContainer.prepend('<div class="loading"><div></div><div></div><div></div><div></div><div></div></div>');
13058                });
13059            }
13060        } else if (action === 'stop') {
13061            if (typeof content !== 'undefined') {
13062                $loadingContent.html(content);
13063                if (!content) {
13064                    duration = 0;
13065                }
13066            }
13067            $loadingContainer.children('.loading').remove();
13068            $loadingContent.stop(true).animate({'opacity': 1}, duration, function () {
13069                $loadingContainer.removeClass('loading-container');
13070                $loadingContent.children().unwrap();
13071            });
13072        }
13073
13074        return this;
13075    };
13076}(jQuery));
13077
13078/**
13079 * Macht einen Ajax Aufruf mit Ladeanimation
13080 *
13081 * @param {string} url
13082 * @param {jQuery} el
13083 * @param {function=} onDone
13084 * @param {object=} data
13085 * @param {function=} changeData
13086 * @param {string=} methodType
13087 */
13088function dfajax(url, el, onDone, data, changeData, methodType) {
13089    methodType = (typeof methodType !== 'undefined') ?  methodType : 'GET';
13090    el.animateLoading('start');
13091    $.ajax({
13092        type: methodType,
13093        url: url,
13094        data: data
13095    }).done(function (data) {
13096        if (typeof changeData === 'function') {
13097            data = changeData(data);
13098        }
13099        el.animateLoading('stop', data);
13100        $(window).resize();
13101        if (typeof onDone === 'function') {
13102            onDone();
13103        }
13104    });
13105}
13106
13107/**
13108 * Setzt den aktiven Menüpunkt
13109 */
13110function setActiveMenuItem() {
13111    $('nav').find('a').parent().removeClass('active');
13112    var hash = window.History.getState().hash.split('?')[0],
13113        rootHref = $('a.logo').attr('href'),
13114        menuLevelHrefList = hash.substring(rootHref.length).split('/'),
13115        menuLevelHref = rootHref.substring( 0, rootHref.length - 1);
13116
13117    $.each(menuLevelHrefList, function() {
13118        menuLevelHref = menuLevelHref + '/' + this;
13119        $('.nav, #mobile-footer').find('a[href="' + menuLevelHref + '"]').parent().addClass('active').trigger('hover');
13120        $('nav').trigger('update.menu');
13121    });
13122}
13123
13124(function ($, w) {
13125    var _updateHeight = function () {
13126        var height = $('#alerts').outerHeight();
13127        $('body').css('padding-top', height);
13128        $('#mobile-header').css('top', height);
13129    };
13130    var _clickClose = function ($alert) {
13131        $('body').animate({'padding-top': '-=' + $alert.outerHeight()}, 500);
13132        $('#mobile-header').animate({'top': '-=' + $alert.outerHeight()}, 500);
13133        $alert.slideToggle(500, function () {
13134            $alert.alert('close');
13135            _updateHeight();
13136        });
13137    };
13138    $(w).resize(_updateHeight);
13139
13140    /**
13141     * Fügt eine Meldung an den oberen Bildschirmrand ein.
13142     *
13143     * @param {string} id - Einzigartige Bezeichnung der Meldung. Wird als ID für das div genutzt.
13144     * @param {string} text - Der anzuzeigende Text
13145     * @param {string=} type - Typ der Meldung. Mögliche Werte: success, info, warning, danger.
13146     * @param {boolean=} acceptable - Gibt an, ob die Meldung nach dem Klick auf OK per Cookie ausgeblendet bleiben soll.
13147     * @param {boolean=} prepend - Gibt an, ob die Meldung am Anfang oder am Ende eingepflegt werden soll.
13148     */
13149    w.dfalert = function (id, text, type, acceptable, prepend) {
13150        var $alert = $('#alert-' + id);
13151        var $alertSkeleton = $('#alert-skeleton-' + type);
13152
13153        if (!Cookies.get('dfAlert-' + id)) {
13154            if (acceptable === undefined) {
13155                acceptable = false;
13156            }
13157
13158            if (type === undefined) {
13159                type = 'info';
13160            }
13161
13162            if ($alert.length) {
13163                $alert.remove();
13164            }
13165
13166            if (!$alertSkeleton.length) {
13167                console.error('Alert Type "' + type + '" not found');
13168            }
13169
13170            $alert = $alertSkeleton.clone();
13171            $alert.attr('id', 'alert-' + id);
13172            $alert.children('button').removeAttr('data-dismiss');
13173
13174            if (acceptable) {
13175                $alert.addClass('acceptable');
13176            }
13177
13178            $alert.find('.alert-accept, .alert-dismiss').click(function () {
13179                if (acceptable) {
13180                    Cookies.set('dfAlert-' + id, 0, {expires: 365});
13181                }
13182                _clickClose($alert);
13183
13184                return false;
13185            });
13186
13187            $alert.find('.alert-text').html(text);
13188
13189            if (prepend) {
13190                $alert.prependTo('#alerts');
13191            } else {
13192                $alert.appendTo('#alerts');
13193            }
13194
13195            _updateHeight();
13196        }
13197    };
13198
13199    $(function () {
13200        $('#alerts > .alert').each(function () {
13201            var $alert = $(this);
13202            $alert.find('.alert-accept, .alert-dismiss').click(function () {
13203                _clickClose($alert);
13204
13205                return false;
13206            });
13207        });
13208    });
13209})(jQuery, window);
13210
13211(function($) {
13212    /**
13213     * JS Klasse für den Canvas Inhaltstypen
13214     *
13215     * @param $container - Div in dem sich das Canvas befinden soll
13216     * @param options
13217     * @param options.canvasJsPath - Pfad zur Canvas JS
13218     * @param options.spriteSheetPath - Pfad zur Sprite Sheet
13219     * @param options.href - Href des Canvas Links
13220     * @param options.target - Target des Canvas Links
13221     * @param options.width - Width des Canvas
13222     * @param options.height - Height des Canvas
13223     * @returns {jQuery}
13224     */
13225    $.dfcanvas = function($container, options) {
13226        var self = this,
13227            canvas,
13228            stage,
13229            exportRoot,
13230            canvasJsPath = options.canvasJsPath,
13231            spriteSheetPath = options.spriteSheetPath,
13232            href = options.href,
13233            target = options.target;
13234
13235        self.createjs = window.createjs;
13236        self.lib = {};
13237        self.images = {};
13238        self.ss = {};
13239
13240        /**
13241         * Initialisierung
13242         */
13243        var init = function() {
13244            $container.html('');
13245            $.ajax({
13246                url: canvasJsPath,
13247                success: function(data){
13248                    var createjs = self.createjs,
13249                        lib = self.lib,
13250                        images = self.images,
13251                        ss = self.ss,
13252                        $canvas,
13253                        match = data.match(/id: '(.*?)',/);
13254
13255                    eval(data);
13256
13257                    if (match) {
13258                        var comp = AdobeAn.getComposition(match[1]);
13259                        self.lib = lib = comp.getLibrary();
13260                        self.images = comp.getImages();
13261                        self.ss = comp.getSpriteSheet();
13262                    }
13263
13264                    $canvas = $('<canvas width="' + lib.properties.width + '" height="' + lib.properties.height + '"></canvas>').appendTo($container);
13265                    $canvas.parent().css({
13266                        'padding-bottom': (lib.properties.height / lib.properties.width * 100) + '%',
13267                        'width': lib.properties.width + 'px'
13268                    });
13269                    canvas = $canvas[0];
13270                    createjs.MotionGuidePlugin.install();
13271                    lib.properties.manifest[0].src = spriteSheetPath;
13272                    var loader = new createjs.LoadQueue(false);
13273                    loader.addEventListener("fileload", handleFileLoad);
13274                    loader.addEventListener("complete", handleComplete);
13275                    loader.loadManifest(lib.properties.manifest);
13276                },
13277                dataType: "text"
13278            });
13279        };
13280
13281        /**
13282         * Wird ausgeführt, wenn eine Datei geladen wurde
13283         *
13284         * @param evt
13285         */
13286        var handleFileLoad = function (evt) {
13287            if (evt.item.type == "image") { self.images[evt.item.id] = evt.result; }
13288        };
13289
13290        /**
13291         * Wird ausgeführt, wenn das Canvas JS und das SpriteSheet geladen sind
13292         *
13293         * @param evt
13294         */
13295        var handleComplete = function (evt) {
13296            var queue = evt.target;
13297            var ssMetadata = self.lib.ssMetadata;
13298            for(var i=0; i<ssMetadata.length; i++) {
13299                self.ss[ssMetadata[i].name] = new self.createjs.SpriteSheet( {"images": [queue.getResult(ssMetadata[i].name)], "frames": ssMetadata[i].frames} )
13300            }
13301            exportRoot = new self.lib.Canvas();
13302            stage = new self.createjs.Stage(canvas);
13303            stage.addChild(exportRoot);
13304            stage.enableMouseOver();
13305
13306            self.createjs.Ticker.setFPS(self.lib.properties.fps);
13307            self.createjs.Ticker.addEventListener("tick", stage);
13308
13309            // Canvas beim Wechseln des Banners leeren
13310            var $banner = $container.parents('.dfbanner');
13311            $banner.on('shown.dfbanner', destroyWhenHidden);
13312
13313            (function(isResp, respDim, isScale, scaleType) {
13314                var lastW, lastH, lastS=1;
13315                window.addEventListener('resize', resizeCanvas);
13316                resizeCanvas();
13317                function resizeCanvas() {
13318                    var w = self.lib.properties.width, h = self.lib.properties.height;
13319                    var iw = window.innerWidth, ih=window.innerHeight;
13320                    var pRatio = window.devicePixelRatio || 1, xRatio=iw/w, yRatio=ih/h, sRatio=1;
13321                    if(isResp) {
13322                        if((respDim=='width'&&lastW==iw) || (respDim
13322=='height'&&lastH==ih)) {
13323                            sRatio = lastS;
13324                        }
13325                        else if(!isScale) {
13326                            if(iw<w || ih<h)
13327                                sRatio = Math.min(xRatio, yRatio);
13328                        }
13329                        else if(scaleType==1) {
13330                            sRatio = Math.min(xRatio, yRatio);
13331                        }
13332                        else if(scaleType==2) {
13333                            sRatio = Math.max(xRatio, yRatio);
13334                        }
13335                    }
13336                    canvas.width = w*pRatio*sRatio;
13337                    canvas.height = h*pRatio*sRatio;
13338                    canvas.style.width = w*sRatio+'px';
13339                    canvas.style.height = h*sRatio+'px';
13340                    stage.scaleX = pRatio*sRatio;
13341                    stage.scaleY = pRatio*sRatio;
13342                    lastW = iw; lastH = ih; lastS = sRatio;
13343                }
13344            })(false,'both',false,1);
13345        };
13346
13347        /**
13348         * Zerstört die Stage, wenn nicht mehr sichtbar um Resourcen zu sparen
13349         */
13350        var destroyWhenHidden = function () {
13351            if ($container.is(':hidden')) {
13352                $(this).off('shown.dfbanner', destroyWhenHidden);
13353            }
13354        };
13355
13356        /**
13357         * Zerstört die Stage um Resourcen zu sparen
13358         */
13359        self.destroy = function () {
13360            self.createjs.Ticker.removeEventListener("tick", stage);
13361            stage.clear();
13362            $container.removeData('dfcanvas');
13363        };
13364
13365        /**
13366         * Wird ausgeführt, wenn die Canvas Animation fertig ist
13367         */
13368        var animationIsComplete = function () {
13369            if ($container.is(':visible')) {
13370                var $banner = $container.parents('.dfbanner');
13371                if ($banner.length) {
13372                    $banner.dfbanner('next');
13373                }
13374            }
13375            $container.trigger('animationIsComplete.dfcanvas');
13376        };
13377
13378        init();
13379        return self;
13380    };
13381
13382    /**
13383     * jQuery Plugin
13384     *
13385     * @param opts
13386     * @returns {jQuery}
13387     */
13388    $.fn.dfcanvas = function(opts) {
13389        return this.each(function() {
13390            var $this = $(this);
13391
13392            if (!$this.data('dfcanvas')) {
13393                $this.data('dfcanvas', new $.dfcanvas($this, opts))
13394            }
13395
13396            return $this;
13397        });
13398    };
13399})(jQuery);
13400
13401$(document).ready(function(){
13402    var $body = $('body'),
13403        title = $('head').find('title').text();
13404
13405    $body.on('click.bs.collapse.data-api', '[data-toggle=collapse]', function (e) {
13406        e.preventDefault();
13407    });
13408
13409    $body.on('shown.bs.collapse', '.panel-collapse', function () {
13410        var collapseIdentifier = $(this).attr('id').replace('collapse-',''),
13411            href = window.location.href;
13412
13413        window.history.pushState(
13414            null,
13415            title,
13416            href + '/(show)/' + collapseIdentifier + '#collapse-' + collapseIdentifier
13417        );
13418        $(window).resize();
13419    });
13420
13421    $body.on('hidden.bs.collapse', '.panel-collapse', function () {
13422        var collapseIdentifier = $(this).attr('id').replace('collapse-',''),
13423            href = window.location.href;
13424
13425        window.history.pushState(
13426            null,
13427            title,
13428            href.replace('/(show)/' + collapseIdentifier + '#collapse-' + collapseIdentifier, '')
13429        );
13430        $(window).resize();
13431    });
13432});
13433
13434/**
13435 * Stellt Javascriptfunktionen für die Direction Klasse
13436 * @param {dfmap} dfmap
13437 * @param options
13438 */
13439var dfdirection = function (dfmap, options) {
13440    var self = this;
13441
13442    self.settings = {
13443        $form: $(),
13444        locationList: []
13445    };
13446
13447    var geocoder = new google.maps.Geocoder(),
13448        $startInput = $();
13449
13450    /**
13451     * Constructor
13452     * @param options
13453     * @returns {dfdirection}
13454     */
13455    var init = function (options) {
13456        if (options) {
13457            self.settings = $.extend(self.settings, options);
13458        }
13459
13460        var $destinationSelect = self.settings.$form.find('select[name="destination"]'),
13461            $googleLocateButton = self.settings.$form.find('a.button-google-locate'),
13462            $locateButton = self.settings.$form.find('.button-locate'),
13463            directionsService = new google.maps.DirectionsService(),
13464            directionsDisplay = new google.maps.DirectionsRenderer({
13465                polylineOptions: new google.maps.Polyline({
13466                    strokeColor: self.settings.$form.find('#stroke').css('color'),
13467                    strokeWeight: 5
13468                }),
13469                suppressMarkers: true
13470            });
13471
13472        $startInput = self.settings.$form.find('input#start');
13473        directionsDisplay.setMap(dfmap.map);
13474
13475        //Directions Form
13476        $destinationSelect.change(function () {
13477            var destination = self.settings.locationList[$(this).val()];
13478            dfmap.map.panTo(destination);
13479        });
13480        self.settings.$form.submit(function () {
13481            var destination,
13482                origin = $startInput.val();
13483            if ($destinationSelect.length) {
13484                destination = self.settings.locationList[self.settings.$form.find('select[name="destination"]').val()];
13485            } else {
13486                destination = self.settings.locationList[0];
13487            }
13488            directionsService.route(
13489                {
13490                    origin: origin,
13491                    destination: destination,
13492                    travelMode: google.maps.TravelMode.DRIVING
13493                },
13494                function (response, status) {
13495                    if (status === google.maps.DirectionsStatus.OK) {
13496                        directionsDisplay.setDirections(response);
13497                        $googleLocateButton.attr('href', 'https://www.google.de/maps/dir/' + origin + '/' + destination + '/').removeClass('disabled');
13498                    }
13499                }
13500            );
13501
13502            return false;
13503        });
13504
13505        if (location.protocol === 'https:' && navigator.geolocation) {
13506            $locateButton.removeClass('hidden').addClass('visible-xs');
13507        }
13508
13509        $locateButton.click(function (){
13510            navigator.geolocation.getCurrentPosition(fillPosition);
13511            return false;
13512        });
13513
13514        return self;
13515    };
13516
13517    /**
13518     * Füllt die Starttextbox aus
13519     *
13520     * @param position
13521     */
13522    var fillPosition = function (position) {
13523        var lat = position.coords.latitude,
13524            long = position.coords.longitude,
13525            latlng = new google.maps.LatLng(lat, long);
13526
13527        $startInput.val(lat + ', ' + long);
13528
13529        geocoder.geocode({'latLng': latlng}, function (results, status) {
13530            if (status === google.maps.GeocoderStatus.OK) {
13531                if (results[0]) {
13532                    $startInput.val(results[0].formatted_address);
13533                }
13534            }
13535        });
13536    };
13537
13538    return init(options);
13539};
13540
13541(function(w) {
13542    var SCRIPT_SRC = 'https://maps.googleapis.com/maps/api/js?libraries=places&v=3',
13543        isApiLoading = false,
13544        isApiLoaded = false,
13545        isGeoXml3ApiLoading = false,
13546        isGeoXml3ApiLoaded = false;
13547    /**
13548     *
13549     * @param $container
13550     * @param {dfpictogram} dfpictogram
13551     * @param options
13552     * @returns {dfmap}
13553     */
13554    w.dfmap = function ($container, dfpictogram, options) {
13555        var self = this;
13556        self.$container = $container;
13557        self.dfpictogram = dfpictogram;
13558        self.settings = {
13559            key: false,
13560            defaultPositionLat: 52,
13561            defaultPositionLng: 10,
13562            defaultZoom: 5,
13563            draggable: true,
13564            scrollwheel: true,
13565            showBalloon: true,
13566            maxZoom: -1,
13567            clustering: false,
13568            clusteringImagePath: false,
13569            geoKml3Path: false,
13570            markerUrl: false,
13571            markerParams: {}
13572        };
13573        self.map = {};
13574        self.infowindow = {};
13575        self.markers = [];
13576        self.markerClusterer = {};
13577        self.kmlParser = false;
13578
13579        /**
13580         * Constructor
13581         * @param options
13582         * @returns {dfmap}
13583         */
13584        var init = function (options) {
13585            if (options) {
13586                self.settings = $.extend(self.settings, options);
13587            }
13588
13589            _loadApi(function () {
13590                self.map = new google.maps.Map(self.$container[0], {
13591                    center: new google.maps.LatLng(self.settings.defaultPositionLat, self.settings.defaultPositionLng),
13592                    zoom: self.settings.defaultZoom,
13593                    mapTypeControl: true,
13594                    navigationControl: true,
13595                    scaleControl: true,
13596                    draggable: self.settings.draggable,
13597                    mapTypeId: google.maps.MapTypeId.ROADMAP,
13598                    scrollwheel: self.settings.scrollwheel
13599                });
13600                self.infowindow = new google.maps.InfoWindow();
13601
13602                google.maps.event.addListener(self.map, 'click', function () {
13603                    self.infowindow.close();
13604                });
13605
13606                if (self.settings.clustering) {
13607                    self.markerClusterer = new MarkerClusterer(
13608                        self.map,
13609                        self.markers,
13610                        {
13611                            gridSize: 20,
13612                            imagePath: self.settings.clusteringImagePath.split('?')[0],
13613                            maxZoom: 18
13614                        }
13615                    );
13616                } else {
13617                    self.addMarkers(self.markers);
13618                }
13619
13620                $(window).resize(function () {
13621                    var center = self.map.getCenter(),
13622                        newCenter;
13623                    google.maps.event.trigger(self.map, 'resize');
13624                    newCenter = self.map.getCenter();
13625
13626                    if (center.lat() !== newCenter.lat() || center.lng() !== newCenter.lng()) {
13627                        self.map.setCenter(center);
13628                    }
13629                });
13630
13631                $container.trigger('load_map', [self]);
13632            });
13633
13634            return self;
13635        };
13636
13637        /**
13638         * Lädt die Google Map API
13639         * @param {Function} callback - Funktion die ausgeführt wird, wenn die API geladen ist
13640         * @private
13641         */
13642        var _loadApi = function (callback) {
13643            if (isApiLoaded === true) {
13644                callback();
13645            } else if (isApiLoading === true) {
13646                $(window).bind('googleMapsJsLoaded', callback);
13647            } else {
13648                var script = document.createElement('script');
13649                script.src = SCRIPT_SRC + '&callback=googleMapsCallback';
13650                if (self.settings.key) {
13651                    script.src += '&key=' + self.settings.key;
13652                }
13653                script.type = 'text/javascript';
13654                document.getElementsByTagName('head')[0].appendChild(script);
13655                $(window).bind('googleMapsJsLoaded', function() {
13656                    isApiLoaded = true;
13657                });
13658                $(window).bind('googleMapsJsLoaded', callback);
13659                isApiLoading = true;
13660            }
13661        };
13662        /**
13663         * Lädt die GeoXml3 API
13664         * @param {Function} callback - Funktion die ausgeführt wird, wenn die API geladen ist
13665         * @private
13666         */
13667        var _loadGeoXml3Api = function (callback) {
13668            _loadApi(function() {
13669                if (isGeoXml3ApiLoaded === true) {
13670                    callback();
13671                } else if (isGeoXml3ApiLoading === true) {
13672                    $(window).bind('geoXml3JsLoaded', callback);
13673                } else {
13674                    var script = document.createElement('script');
13675                    script.onload = function () {
13676                        $(window).trigger('geoXml3JsLoaded');
13677                    };
13678                    script.src = self.settings.geoKml3Path;
13679                    script.type = 'text/javascript';
13680                    document.getElementsByTagName('head')[0].appendChild(script);
13681                    $(window).bind('geoXml3JsLoaded', function () {
13682                        isGeoXml3ApiLoaded = true;
13683                    });
13684                    $(window).bind('geoXml3JsLoaded', callback);
13685                    isGeoXml3ApiLoading = true;
13686                }
13687            });
13688        };
13689
13690        /**
13691         * Erstellt ein Polygon im XML und setzt ein Klickevent
13692         * @param placemark
13693         * @private
13694         */
13695        var _addKmlPolygon = function (placemark) {
13696            var polygon = self.kmlParser.createPolygon(placemark);
13697            google.maps.event.addListener(polygon, 'click', function () {
13698                self.$container.trigger('kml_click', [placemark]);
13699            });
13700        };
13701
13702        /**
13703         * Fügt einen Marker zur Karte hinzu
13704         * @param {google.maps.Marker} marker - Google Map Marker
13705         */
13706        self.addMarker = function (marker) {
13707            if (self.settings.clustering) {
13708                self.markerClusterer.addMarker(marker);
13709            } else {
13710                marker.setMap(self.map);
13711                self.markers.push(marker);
13712            }
13713        };
13714
13715        /**
13716         * Fügt mehrere Marker zur Karte hinzu
13717         * @param {google.maps.Marker[]} markers - Google Map Markers
13718         */
13719        self.addMarkers = function (markers) {
13720            if (self.settings.clustering) {
13721                self.markerClusterer.addMarkers(markers);
13722            } else {
13723                $.each(markers, function () {
13724                    self.addMarker(this);
13725                })
13726            }
13727        };
13728
13729        /**
13730         * Setzt die Postion und den Zoom der Karte, damit alle Marker sichtbar sind
13731         */
13732        self.fitMapToMarkers = function () {
13733            if (self.settings.clustering) {
13734                if (self.markerClusterer.getMarkers().length) {
13735                    self.markerClusterer.fitMapToMarkers();
13736                }
13737            } else {
13738                if (self.markers.length) {
13739                    var bounds = new google.maps.LatLngBounds();
13740                    $.each(self.markers, function () {
13741                        bounds.extend(this.getPosition());
13742                    });
13743                    self.map.fitBounds(bounds);
13744                }
13745            }
13746
13747            if (self.settings.maxZoom !== -1) {
13748                google.maps.event.addListenerOnce(self.map, 'bounds_changed', function () {
13749                    if (self.map.getZoom() > self.settings.maxZoom) {
13750                        self.map.setZoom(self.settings.maxZoom);
13751                    }
13752                });
13753            }
13754        };
13755
13756        /**
13757         * Ladet Marker anhand der Location Ids per Ajax nach
13758         * @param {Number[]} locationIds - Location Ids der Marker
13759         * @param {Function} callback - Wird ausgeführt, wenn alle Marker geladen sind
13760         */
13761        self.addMarkersByLocationIds = function (locationIds, callback) {
13762            _loadApi(function() {
13763                if (!self.settings.markerUrl) {
13764                    console.error('markerUrl not set');
13765                    return;
13766                }
13767
13768                var steps = 10;
13769
13770                for (var i = 0; i < locationIds.length; i += steps) {
13771                    $.post(
13772                        self.settings.markerUrl,
13773                        {
13774                            locationIds: locationIds.slice(i, i + steps)
13775                        },
13776                        function (data) {
13777                            var markers = [];
13778
13779                            $.each(data.markerList, function () {
13780                                var markerData = this,
13781                                    markerOptions = {
13782                                    position: new google.maps.LatLng(markerData.latitude, markerData.longitude),
13783                                    title: markerData.title
13784                                };
13785
13786                                var marker = new google.maps.Marker(markerOptions);
13787                                self.dfpictogram.setPictogram(marker, markerData);
13788                                markers.push(marker);
13789
13790                                if (self.settings.showBalloon) {
13791                                    google.maps.event.addListener(marker, 'click', function() {
13792                                        $.get(
13793                                            markerData.url,
13794                                            self.settings.markerParams,
13795                                            function (data) {
13796                                                self.infowindow.setContent(data);
13797                                                self.infowindow.open(self.map, marker);
13798                                            }
13799                                        );
13800                                    });
13801                                }
13802                            });
13803
13804                            self.addMarkers(markers);
13805
13806                            if (data.kmlString) {
13807                                self.addKMLString(data.kmlString);
13808                            }
13809
13810                            if (callback) {
13811                                callback();
13812                            }
13813                        }
13814                    );
13815                }
13816            });
13817        };
13818
13819        /**
13820         * Lädt KMLs in die Karte
13821         * @param {string} path - Pfad zur Kml
13822         */
13823        self.addKML = function (path) {
13824            _loadGeoXml3Api(function() {
13825                if (!self.kmlParser) {
13826                    self.kmlParser = new geoXML3.parser({
13827                        map: self.map,
13828                        zoom: false,
13829                        suppressInfoWindows: true,
13830                        createPolygon: _addKmlPolygon
13831                    });
13832                }
13833                self.kmlParser.parse(path);
13834            });
13835        };
13836
13837        /**
13838         * Lädt KMLs in die Karte
13839         * @param {string} content - Inhalt einer Kml
13840         */
13841        self.addKMLString = function (content) {
13842            _loadGeoXml3Api(function() {
13843                if (!self.kmlParser) {
13844                    self.kmlParser = new geoXML3.parser({
13845                        map: self.map,
13846                        zoom: false,
13847                        suppressInfoWindows: true,
13848                        createPolygon: _addKmlPolygon
13849                    });
13850                }
13851                self.kmlParser.parseKmlString(content);
13852            });
13853        };
13854
13855        return init(options);
13856    };
13857})(window);
13858
13859function googleMapsCallback(){
13860    $(window).trigger('googleMapsJsLoaded');
13861}
13862
13863/**
13864 * Berechnung des Radianten.
13865 * @param x
13866 * @returns {number}
13867 */
13868function rad(x) {
13869    return x * Math.PI / 180;
13870}
13871
13872/**
13873 * Berechnet die Entfernung zwischen zwei Positionsangaben. Gibt den Wert in Kilometer als Fließkommazahl zurück.
13874 * @param p1
13875 * @param p2
13876 * @returns {number}
13877 */
13878function getDistanceFromCenter (p1, p2) {
13879    var R = 6378.137; // Earth’s mean radius in km
13880    var dLat = rad(p2.lat() - p1.lat());
13881    var dLong = rad(p2.lng() - p1.lng());
13882    var a = Math.sin(dLat / 2) * Math.sin(dLat / 2) +
13883        Math.cos(rad(p1.lat())) * Math.cos(rad(p2.lat())) *
13884        Math.sin(dLong / 2) * Math.sin(dLong / 2);
13885    var c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a));
13886    var d = R * c;
13887    return d; // returns the distance in km
13888}
13889
13890/**
13891 * Läuft die im Parameter übergebenen Daten durch und füllt das div "distance" mit entsprechender, gerundeter Entfernung.
13892 * @param {string} data
13893 * @param {google.maps.LatLng} center
13894 * @returns {*|jQuery|HTMLElement}
13895 */
13896function updateDistances (data, center) {
13897    var $data = $(data);
13898    $data.find('.position').each(function(){
13899        var $this = $(this),
13900            lat = $this.find('.latitude').text(),
13901            lng = $this.find('.longitude').text(),
13902            mapLatLng = new google.maps.LatLng(lat, lng),
13903            distance = getDistanceFromCenter(center, mapLatLng);
13904
13905        // Runde distance auf eine Nachkommastelle
13906        distance = Math.round(distance * 10) / 10;
13907
13908        // Durchläuft alle Location-Ansichten und füllt das "span" unterhalb des div "distance".
13909        $this.parents('div[class*="content-type-location"]').find('.distance').show().children('span').html(distance);
13910    });
13911    return $data;
13912}
13913
13914/**
13915 * Klasse zum Verwalten von Piktogrammen
13916 * @param {string} options.defaultPictogramList - Liste der Default Pictograms
13917 * @param {string} options.pictogramUrl - Url zum Pictogram Ajax Aufruf
13918 * @param {string} options.categoryUrl - Url zum Category Ajax Aufruf
13919 * @returns {dfpictogram}
13920 */
13921var dfpictogram = function (options) {
13922    var self = this;
13923    self.settings = {
13924        defaultPictogramList: {},
13925        pictogramUrl: false,
13926        categoryUrl: false,
13927        validCategoryList: []
13928    };
13929    var categoryList = {};
13930    var pictogramList = {};
13931    var categoryQueue = {};
13932    var pictogramQueue = {};
13933
13934    /**
13935     * Constructor
13936     * @param options
13937     * @returns {dfpictogram}
13938     */
13939    var init = function (options) {
13940        if (options) {
13941            self.settings = $.extend(self.settings, options);
13942        }
13943
13944        return self;
13945    };
13946
13947    /**
13948     * Setzt das passende Pictogram
13949     * @param {google.maps.Marker} marker - Google Map Marker
13950     * @param {Object} data - Daten zur Auswahl des richtigen Pictograms
13951     * @param {Number} data.pictogram - Content Id eines Pictograms
13952     * @param {Number[]} data.categories - Content Ids der Categories
13953     * @param {string} data.categoryClass - Category Class
13954     * @param {string} data.type - Pictogram Typ (default/cluster)
13955     */
13956    self.setPictogram = function (marker, data) {
13957        marker.setVisible(false);
13958
13959        if (!data.type) {
13960            data.type = 'default';
13961        }
13962        if (data.pictogram) {
13963            return setPictogramById(marker, data.pictogram);
13964        }
13965        if (typeof data.categories === 'object' && data.categories.length) {
13966            return setPictogramByCategories(marker, data.categories, data.categoryClass, data.type);
13967        }
13968
13969        setDefaultPictogram(marker, data.categoryClass, data.type);
13970    };
13971
13972    /**
13973     * Setzt das passende Pictogram anhand der ID
13974     * @param {google.maps.Marker} marker - Google Map Marker
13975     * @param {Number} id - Content Id eines Pictograms
13976     */
13977    var setPictogramById = function (marker, id) {
13978        if (typeof pictogramList[id] === 'undefined') {
13979            if (typeof pictogramQueue[id] === 'undefined') {
13980                $.get(self.settings.pictogramUrl.replace('contentId', id), function (data) {
13981                    pictogramList[id] = {
13982                        url: data.url,
13983                        anchor: new google.maps.Point(data.anchorPointX, data.anchorPointY),
13984                        size: new google.maps.Size(data.sizeX, data.sizeY),
13985                        scaledSize: new google.maps.Size(data.sizeX, data.sizeY)
13986                    };
13987                    $.each(pictogramQueue[id], function () {
13988                        setPictogramById(this, id);
13989                    });
13990                    delete pictogramQueue[id];
13991                });
13992
13993                pictogramQueue[id] = [];
13994            }
13995
13996            pictogramQueue[id].push(marker);
13997            return;
13998        }
13999
14000        marker.setIcon(pictogramList[id]);
14001        marker.setVisible(true);
14002    };
14003
14004    /**
14005     * Setzt das passende Pictogram anhand von Categories und der Category Class
14006     * @param {google.maps.Marker} marker - Google Map Marker
14007     * @param {Number[]} categories - Content Ids der Categories
14008     * @param {string} categoryClass - Category Class
14009     * @param {string} type - Pictogram Typ (default/cluster)
14010     */
14011    var setPictogramByCategories = function (marker, categories, categoryClass, type) {
14012        var multiCategoryPictogramContentId;
14013        if (type !== 'default') {
14014            multiCategoryPictogramContentId = self.settings.defaultPictogramList[type + '_multi_category'];
14015        } else {
14016            multiCategoryPictogramContentId = self.settings.defaultPictogramList['multi_category'];
14017        }
14018        if (self.settings.validCategoryList.length) {
14019            categories = categories.filter(function(el) {
14020                return self.settings.validCategoryList.indexOf(el) >= 0;
14021            });
14022        }
14023        if (categories.length > 1 && multiCategoryPictogramContentId) {
14024            setPictogramById(marker, multiCategoryPictogramContentId);
14025        } else {
14026            $.each(categories, function () {
14027                setPictogramByCategory(marker, this, categoryClass, type);
14028            });
14029        }
14030    };
14031
14032    /**
14033     * Setzt das passende Pictogram anhand der Category und Category Class
14034     * @param {google.maps.Marker} marker - Google Map Marker
14035     * @param {Number[]} category - Content Id der Category
14036     * @param {string} categoryClass - Category Class
14037     * @param {string} type - Pictogram Typ (default/cluster)
14038     */
14039    var setPictogramByCategory = function (marker, category, categoryClass, type) {
14040        if (typeof categoryList[category] === 'undefined') {
14041            if (typeof categoryQueue[category] === 'undefined') {
14042                $.get(self.settings.categoryUrl.replace('contentId', category), function (data) {
14043                    categoryList[category] = {
14044                        'default': data['pictogram'],
14045                        A: data['pictogram_a'],
14046                        B: data['pictogram_b'],
14047                        cluster: data['pictogram_clustering']
14048                    };
14049                    $.each(categoryQueue[category], function () {
14050                        setPictogramByCategory(this.marker, category, this.categoryClass, this.type);
14051                    });
14052                    delete categoryQueue[category];
14053                });
14054
14055                categoryQueue[category] = [];
14056            }
14057
14058            categoryQueue[category].push({
14059                marker: marker,
14060                categoryClass: categoryClass,
14061                type: type
14062            });
14063            return;
14064        }
14065
14066        if (type !== 'default' && categoryList[category][type]) {
14067            setPictogramById(marker, categoryList[category][type]);
14068        } else if (categoryClass && categoryList[category][categoryClass]) {
14069            setPictogramById(marker, categoryList[category][categoryClass]);
14070        } else if (categoryList[category]['default']) {
14071            setPictogramById(marker, categoryList[category]['default']);
14072        } else {
14073            setDefaultPictogram(marker, categoryClass);
14074        }
14075    };
14076
14077    /**
14078     * Setzt das Standard Pictogram anhand der Category Class
14079     * @param {google.maps.Marker} marker - Google Map Marker
14080     * @param {string} categoryClass - Category Class
14081     * @param {string} type - Pictogram Typ (default/cluster)
14082     */
14083    var setDefaultPictogram = function (marker, categoryClass, type) {
14084        if (type !== 'default' && self.settings.defaultPictogramList[type]) {
14085            setPictogramById(marker, self.settings.defaultPictogramList[type]);
14086        } else if (categoryClass && self.settings.defaultPictogramList[categoryClass]) {
14087            setPictogramById(marker, self.settings.defaultPictogramList[categoryClass]);
14088        } else if (self.settings.defaultPictogramList['default']) {
14089            setPictogramById(marker, self.settings.defaultPictogramList['default']);
14090        } else {
14091            marker.setVisible(true);
14092        }
14093    };
14094
14095    return init(options);
14096};
14097
14098(function( w ){
14099    "use strict";
14100
14101    w.dfpicturefill = function() {
14102        var ps = w.document.getElementsByTagName( "span" );
14103
14104        for( var i = 0, il = ps.length; i < il; i++ ){
14105            if( ps[ i ].getAttribute( "data-picture" ) !== null && ps[ i ].offsetParent ){
14106
14107                var sources = ps[ i ].getElementsByTagName( "span" ),
14108                    matches = [];
14109
14110                for( var j = 0, jl = sources.length; j < jl; j++ ){
14111                    var parentMinWidth = sources[ j ].getAttribute( "data-parent-min-width" );
14112                    var media = sources[ j ].getAttribute( "data-media" );
14113                    var parentNode = sources[ j ].parentNode.parentNode;
14114
14115                    if( parentNode.parentNode.localName == "figure"){
14116                        parentNode = parentNode.parentNode;
14117                    }
14118
14119                    if( ( !media || ( w.matchMedia && w.matchMedia( media ).matches ) )
14120                        && ( !parentMinWidth || parentMinWidth <= parentNode.offsetWidth ) ){
14121                        matches.push( sources[ j ] );
14122                    }
14123                }
14124
14125                var picImg = ps[ i ].getElementsByTagName( "img" )[ 0 ];
14126
14127                if( matches.length ){
14128                    var matchedEl = matches.pop();
14129                    if( !picImg || picImg.parentNode.nodeName === "NOSCRIPT" ){
14130                        picImg = w.document.createElement( "img" );
14131                        picImg.alt = ps[ i ].getAttribute( "data-alt" );
14132                        picImg.className = 'img-responsive';
14133                    }
14134                    else if( matchedEl === picImg.parentNode ){
14135                        continue;
14136                    }
14137
14138                    picImg.src = matchedEl.getAttribute( "data-src" );
14139                    matchedEl.appendChild( picImg );
14140                    picImg.removeAttribute("width");
14141                    picImg.removeAttribute("height");
14142                }
14143                else if( picImg ){
14144                    picImg.parentNode.removeChild( picImg );
14145                }
14146            }
14147        }
14148    };
14149
14150    $(w).load(w.dfpicturefill)
14151        .resize(w.dfpicturefill);
14152
14153}( this ));
14154
14155$(function() {
14156    //Picturefill vor Druck ausfüllen
14157    //Chrome unterstützt onbeforeprint nicht, daher Eventlistener auf matchMedia
14158    window.matchMedia('print').addListener(function(mediaType) {
14159        if (mediaType.matches) {
14160            dfpicturefill();
14161        }
14162    });
14163
14164    window.onbeforeprint = dfpicturefill;
14165});
14166
14167(function(win, doc) {
14168    'use strict';
14169    var Snap = Snap || function(userOpts) {
14170        var settings = {
14171                element: null,
14172                dragger: null,
14173                disable: 'none',
14174                addBodyClasses: true,
14175                hyperextensible: true,
14176                resistance: 0.5,
14177                flickThreshold: 50,
14178                transitionSpeed: 0.3,
14179                easing: 'ease',
14180                maxPosition: 266,
14181                minPosition: -266,
14182                tapToClose: true,
14183                touchToDrag: enableSnapperDragging,
14184                slideIntent: 40, // degrees
14185                minDragDistance: 5
14186            },
14187            cache = {
14188                simpleStates: {
14189                    opening: null,
14190                    towards: null,
14191                    hyperExtending: null,
14192                    halfway: null,
14193                    flick: null,
14194                    translation: {
14195                        absolute: 0,
14196                        relative: 0,
14197                        sinceDirectionChange: 0,
14198                        percentage: 0
14199                    }
14200                }
14201            },
14202            eventList = {},
14203            utils = {
14204                hasTouch: ('ontouchstart' in doc.documentElement || win.navigator.msPointerEnabled),
14205                eventType: function(action) {
14206                    var eventTypes = {
14207                        down: (utils.hasTouch ? 'touchstart' : 'mousedown'),
14208                        move: (utils.hasTouch ? 'touchmove' : 'mousemove'),
14209                        up: (utils.hasTouch ? 'touchend' : 'mouseup'),
14210                        out: (utils.hasTouch ? 'touchcancel' : 'mouseout')
14211                    };
14212                    return eventTypes[action];
14213                },
14214                page: function(t, e){
14215                    return (utils.hasTouch && e.touches.length && e.touches[0]) ? e.touches[0]['page'+t] : e['page'+t];
14216                },
14217                klass: {
14218                    has: function(el, name){
14219                        return (el.className).indexOf(name) !== -1;
14220                    },
14221                    add: function(el, name){
14222                        if(!utils.klass.has(el, name) && settings.addBodyClasses){
14223                            el.className += " "+name;
14224                        }
14225                    },
14226                    remove: function(el, name){
14227                        if(settings.addBodyClasses){
14228                            el.className = (el.className).replace(name, "").replace(/^\s+|\s+$/g, '');
14229                        }
14230                    }
14231                },
14232                dispatchEvent: function(type) {
14233                    if (typeof eventList[type] === 'function') {
14234                        return eventList[type].call();
14235                    }
14236                },
14237                vendor: function(){
14238                    var tmp = doc.createElement("div"),
14239                        prefixes = 'webkit Moz O ms'.split(' '),
14240                        i;
14241                    for (i in prefixes) {
14242                        if (typeof tmp.style[prefixes[i] + 'Transition'] !== 'undefined') {
14243                            return prefixes[i];
14244                        }
14245                    }
14246                },
14247                transitionCallback: function(){
14248                    return (cache.vendor==='Moz' || cache.vendor==='ms') ? 'transitionend' : cache.vendor+'TransitionEnd';
14249                },
14250                canTransform: function(){
14251                    return typeof settings.element.style[cache.vendor+'Transform'] !== 'undefined';
14252                },
14253                deepExtend: function(destination, source) {
14254                    var property;
14255                    for (property in source) {
14256                        if (source[property] && source[property].constructor && source[property].constructor === Object) {
14257                            destination[property] = destination[property] || {};
14258                            utils.deepExtend(destination[property], source[property]);
14259                        } else {
14260                            destination[property] = source[property];
14261                        }
14262                    }
14263                    return destination;
14264                },
14265                angleOfDrag: function(x, y) {
14266                    var degrees, theta;
14267                    // Calc Theta
14268                    theta = Math.atan2(-(cache.startDragY - y), (cache.startDragX - x));
14269                    if (theta < 0) {
14270                        theta += 2 * Math.PI;
14271                    }
14272                    // Calc Degrees
14273                    degrees = Math.floor(theta * (180 / Math.PI) - 180);
14274                    if (degrees < 0 && degrees > -180) {
14275                        degrees = 360 - Math.abs(degrees);
14276                    }
14277                    return Math.abs(degrees);
14278                },
14279                events: {
14280                    addEvent: function addEvent(element, eventName, func) {
14281                        if (element.addEventListener) {
14282                            return element.addEventListener(eventName, func, false);
14283                        } else if (element.attachEvent) {
14284                            return element.attachEvent("on" + eventName, func);
14285                        }
14286                    },
14287                    removeEvent: function addEvent(element, eventName, func) {
14288                        if (element.addEventListener) {
14289                            return element.removeEventListener(eventName, func, false);
14290                        } else if (element.attachEvent) {
14291                            return element.detachEvent("on" + eventName, func);
14292                        }
14293                    },
14294                    prevent: function(e) {
14295                        if (e.preventDefault) {
14296                            e.preventDefault();
14297                        } else {
14298                            e.returnValue = false;
14299                        }
14300                    }
14301                },
14302                parentUntil: function(el, attr) {
14303                    var isStr = typeof attr === 'string';
14304                    while (el.parentNode) {
14305                        if (isStr && el.getAttribute && el.getAttribute(attr)){
14306                            return el;
14307                        } else if(!isStr && el === attr){
14308                            return el;
14309                        }
14310                        el = el.parentNode;
14311                    }
14312                    return null;
14313                }
14314            },
14315            action = {
14316                translate: {
14317                    get: {
14318                        matrix: function(index) {
14319
14320                            if( !utils.canTransform() ){
14321                                return parseInt(settings.element.style.left, 10);
14322                            } else {
14323                                var matrix = win.getComputedStyle(settings.element)[cache.vendor+'Transform'].match(/\((.*)\)/),
14324                                    ieOffset = 8;
14325                                if (matrix) {
14326                                    matrix = matrix[1].split(',');
14327                                    if(matrix.length===16){
14328                                        index+=ieOffset;
14329                                    }
14330                                    return parseInt(matrix[index], 10);
14331                                }
14332                                return 0;
14333                            }
14334                        }
14335                    },
14336                    easeCallback: function(){
14337                        settings.element.style[cache.vendor+'Transition'] = '';
14338                        cache.translation = action.translate.get.matrix(4);
14339                        cache.easing = false;
14340                        clearInterval(cache.animatingInterval);
14341
14342                        if(cache.easingTo===0){
14343                            utils.klass.remove(doc.body, 'snapjs-right');
14344                            utils.klass.remove(doc.body, 'snapjs-left');
14345                        }
14346
14347                        utils.dispatchEvent('animated');
14348                        utils.events.removeEvent(settings.element, utils.transitionCallback(), action.translate.easeCallback);
14349                    },
14350                    easeTo: function(n) {
14351
14352                        if( !utils.canTransform() ){
14353                            cache.translation = n;
14354                            action.translate.x(n);
14355                        } else {
14356                            cache.easing = true;
14357                            cache.easingTo = n;
14358
14359                            settings.element.style[cache.vendor+'Transition'] = 'all ' + settings.transitionSpeed + 's ' + settings.easing;
14360
14361                            cache.animatingInterval = setInterval(function() {
14362                                utils.dispatchEvent('animating');
14363                            }, 1);
14364
14365                            utils.events.addEvent(settings.element, utils.transitionCallback(), action.translate.easeCallback);
14366                            action.translate.x(n);
14367                        }
14368                        if(n===0){
14369                            settings.element.style[cache.vendor+'Transform'] = '';
14370                        }
14371                    },
14372                    x: function(n) {
14373                        if( (settings.disable==='left' && n>0) ||
14374                            (settings.disable==='right' && n<0)
14375                            ){ return; }
14376
14377                        if( !settings.hyperextensible ){
14378                            if( n===settings.maxPosition || n>settings.maxPosition ){
14379                                n=settings.maxPosition;
14380                            } else if( n===settings.minPosition || n<settings.minPosition ){
14381                                n=settings.minPosition;
14382                            }
14383                        }
14384
14385                        n = parseInt(n, 10);
14386                        if(isNaN(n)){
14387                            n = 0;
14388                        }
14389
14390                        if( utils.canTransform() ){
14391                            var theTranslate = 'translateX(' + n + 'px)';
14392                            settings.element.style[cache.vendor+'Transform'] = theTranslate;
14393                        } else {
14394                            settings.element.style.width = (win.innerWidth || doc.documentElement.clientWidth)+'px';
14395
14396                            settings.element.style.left = n+'px';
14397                            settings.element.style.right = '';
14398                        }
14399                    }
14400                },
14401                drag: {
14402                    listen: function() {
14403                        cache.translation = 0;
14404                        cache.easing = false;
14405                        utils.events.addEvent(settings.element, utils.eventType('down'), action.drag.startDrag);
14406                        utils.events.addEvent(settings.element, utils.eventType('move'), action.drag.dragging);
14407                        utils.events.addEvent(settings.element, utils.eventType('up'), action.drag.endDrag);
14408                    },
14409                    stopListening: function() {
14410                        utils.events.removeEvent(settings.element, utils.eventType('down'), action.drag.startDrag);
14411                        utils.events.removeEvent(settings.element, utils.eventType('move'), action.drag.dragging);
14412                        utils.events.removeEvent(settings.element, utils.eventType('up'), action.drag.endDrag);
14413                    },
14414                    startDrag: function(e) {
14415                        // No drag on ignored elements
14416                        var target = e.target ? e.target : e.srcElement,
14417                            ignoreParent = utils.parentUntil(target, 'data-snap-ignore');
14418
14419                        if (ignoreParent) {
14420                            utils.dispatchEvent('ignore');
14421                            return;
14422                        }
14423
14424
14425                        if(settings.dragger){
14426                            var dragParent = utils.parentUntil(target, settings.dragger);
14427
14428                            // Only use dragger if we're in a closed state
14429                            if( !dragParent &&
14430                                (cache.translation !== settings.minPosition &&
14431                                    cache.translation !== settings.maxPosition
14432                                    )){
14433                                return;
14434                            }
14435                        }
14436
14437                        utils.dispatchEvent('start');
14438                        settings.element.style[cache.vendor+'Transition'] = '';
14439                        cache.isDragging = true;
14440                        cache.hasIntent = null;
14441                        cache.intentChecked = false;
14442                        cache.startDragX = utils.page('X', e);
14443                        cache.startDragY = utils.page('Y', e);
14444                        cache.dragWatchers = {
14445                            current: 0,
14446                            last: 0,
14447                            hold: 0,
14448                            state: ''
14449                        };
14450                        cache.simpleStates = {
14451                            opening: null,
14452                            towards: null,
14453                            hyperExtending: null,
14454                            halfway: null,
14455                            flick: null,
14456                            translation: {
14457                                absolute: 0,
14458                                relative: 0,
14459                                sinceDirectionChange: 0,
14460                                percentage: 0
14461                            }
14462                        };
14463                    },
14464                    dragging: function(e) {
14465                        if (cache.isDragging && settings.touchToDrag) {
14466
14467                            var thePageX = utils.page('X', e),
14468                                thePageY = utils.page('Y', e),
14469                                translated = cache.translation,
14470                                absoluteTranslation = action.translate.get.matrix(4),
14471                                whileDragX = thePageX - cache.startDragX,
14472                                openingLeft = absoluteTranslation > 0,
14473                                translateTo = whileDragX,
14474                                diff;
14475
14476                            // Shown no intent already
14477                            if((cache.intentChecked && !cache.hasIntent)){
14478                                return;
14479                            }
14480
14481                            if(settings.addBodyClasses){
14482                                if((absoluteTranslation)>0){
14483                                    utils.klass.add(doc.body, 'snapjs-left');
14484                                    utils.klass.remove(doc.body, 'snapjs-right');
14485                                } else if((absoluteTranslation)<0){
14486                                    utils.klass.add(doc.body, 'snapjs-right');
14487                                    utils.klass.remove(doc.body, 'snapjs-left');
14488                                }
14489                            }
14490
14491                            if (cache.hasIntent === false || cache.hasIntent === null) {
14492                                var deg = utils.angleOfDrag(thePageX, thePageY),
14493                                    inRightRange = (deg >= 0 && deg <= settings.slideIntent) || (deg <= 360 && deg > (360 - settings.slideIntent)),
14494                                    inLeftRange = (deg >= 180 && deg <= (180 + settings.slideIntent)) || (deg <= 180 && deg >= (180 - settings.slideIntent));
14495                                if (!inLeftRange && !inRightRange) {
14496                                    cache.hasIntent = false;
14497                                } else {
14498                                    cache.hasIntent = true;
14499                                }
14500                                cache.intentChecked = true;
14501                            }
14502
14503                            if (
14504                                (settings.minDragDistance>=Math.abs(thePageX-cache.startDragX)) || // Has user met minimum drag distance?
14505                                    (cache.hasIntent === false)
14506                                ) {
14507                                return;
14508                            }
14509
14510                            utils.events.prevent(e);
14511                            utils.dispatchEvent('drag');
14512
14513                            cache.dragWatchers.current = thePageX;
14514                            // Determine which direction we are going
14515                            if (cache.dragWatchers.last > thePageX) {
14516                                if (cache.dragWatchers.state !== 'left') {
14517                                    cache.dragWatchers.state = 'left';
14518                                    cache.dragWatchers.hold = thePageX;
14519                                }
14520                                cache.dragWatchers.last = thePageX;
14521                            } else if (cache.dragWatchers.last < thePageX) {
14522                                if (cache.dragWatchers.state !== 'right') {
14523                                    cache.dragWatchers.state = 'right';
14524                                    cache.dragWatchers.hold = thePageX;
14525                                }
14526                                cache.dragWatchers.last = thePageX;
14527                            }
14528                            if (openingLeft) {
14529                                // Pulling too far to the right
14530                                if (settings.maxPosition < absoluteTranslation) {
14531                                    diff = (absoluteTranslation - settings.maxPosition) * settings.resistance;
14532                                    translateTo = whileDragX - diff;
14533                                }
14534                                cache.simpleStates = {
14535                                    opening: 'left',
14536                                    towards: cache.dragWatchers.state,
14537                                    hyperExtending: settings.maxPosition < absoluteTranslation,
14538                                    halfway: absoluteTranslation > (settings.maxPosition / 2),
14539                                    flick: Math.abs(cache.dragWatchers.current - cache.dragWatchers.hold) > settings.flickThreshold,
14540                                    translation: {
14541                                        absolute: absoluteTranslation,
14542                                        relative: whileDragX,
14543                                        sinceDirectionChange: (cache.dragWatchers.current - cache.dragWatchers.hold),
14544                                        percentage: (absoluteTranslation/settings.maxPosition)*100
14545                                    }
14546                                };
14547                            } else {
14548                                // Pulling too far to the left
14549                                if (settings.minPosition > absoluteTranslation) {
14550                                    diff = (absoluteTranslation - settings.minPosition) * settings.resistance;
14551                                    translateTo = whileDragX - diff;
14552                                }
14553                                cache.simpleStates = {
14554                                    opening: 'right',
14555                                    towards: cache.dragWatchers.state,
14556                                    hyperExtending: settings.minPosition > absoluteTranslation,
14557                                    halfway: absoluteTranslation < (settings.minPosition / 2),
14558                                    flick: Math.abs(cache.dragWatchers.current - cache.dragWatchers.hold) > settings.flickThreshold,
14559                                    translation: {
14560                                        absolute: absoluteTranslation,
14561                                        relative: whileDragX,
14562                                        sinceDirectionChange: (cache.dragWatchers.current - cache.dragWatchers.hold),
14563                                        percentage: (absoluteTranslation/settings.minPosition)*100
14564                                    }
14565                                };
14566                            }
14567                            action.translate.x(translateTo + translated);
14568                        }
14569                    },
14570                    endDrag: function(e) {
14571                        if (cache.isDragging) {
14572                            utils.dispatchEvent('end');
14573                            var translated = action.translate.get.matrix(4);
14574
14575                            // Tap Close
14576                            if (cache.dragWatchers.current === 0 && translated !== 0 && settings.tapToClose) {
14577                                utils.dispatchEvent('close');
14578                                utils.events.prevent(e);
14579                                action.translate.easeTo(0);
14580                                cache.isDragging = false;
14581                                cache.startDragX = 0;
14582                                return;
14583                            }
14584
14585                            // Revealing Left
14586                            if (cache.simpleStates.opening === 'left') {
14587                                // Halfway, Flicking, or Too Far Out
14588                                if ((cache.simpleStates.halfway || cache.simpleStates.hyperExtending || cache.simpleStates.flick)) {
14589                                    if (cache.simpleStates.flick && cache.simpleStates.towards === 'left') { // Flicking Closed
14590                                        action.translate.easeTo(0);
14591                                    } else if (
14592                                        (cache.simpleStates.flick && cache.simpleStates.towards === 'right') || // Flicking Open OR
14593                                            (cache.simpleStates.halfway || cache.simpleStates.hyperExtending) // At least halfway open OR hyperextending
14594                                        ) {
14595                                        action.translate.easeTo(settings.maxPosition); // Open Left
14596                                    }
14597                                } else {
14598                                    action.translate.easeTo(0); // Close Left
14599                                }
14600                                // Revealing Right
14601                            } else if (cache.simpleStates.opening === 'right') {
14602                                // Halfway, Flicking, or Too Far Out
14603                                if ((cache.simpleStates.halfway || cache.simpleStates.hyperExtending || cache.simpleStates.flick)) {
14604                                    if (cache.simpleStates.flick && cache.simpleStates.towards === 'right') { // Flicking Closed
14605                                        action.translate.easeTo(0);
14606                                    } else if (
14607                                        (cache.simpleStates.flick && cache.simpleStates.towards === 'left') || // Flicking Open OR
14608                                            (cache.simpleStates.halfway || cache.simpleStates.hyperExtending) // At least halfway open OR hyperextending
14609                                        ) {
14610                                        action.translate.easeTo(settings.minPosition); // Open Right
14611                                    }
14612                                } else {
14613                                    action.translate.easeTo(0); // Close Right
14614                                }
14615                            }
14616                            cache.isDragging = false;
14617                            cache.startDragX = utils.page('X', e);
14618                        }
14619                    }
14620                }
14621            },
14622            init = function(opts) {
14623                if (opts.element) {
14624                    utils.deepExtend(settings, opts);
14625                    cache.vendor = utils.vendor();
14626                    action.drag.listen();
14627                }
14628            };
14629        /*
14630         * Public
14631         */
14632        this.open = function(side) {
14633            utils.dispatchEvent('open');
14634            utils.klass.remove(doc.body, 'snapjs-expand-left');
14635            utils.klass.remove(doc.body, 'snapjs-expand-right');
14636
14637            if (side === 'left') {
14638                cache.simpleStates.opening = 'left';
14639                cache.simpleStates.towards = 'right';
14640                utils.klass.add(doc.body, 'snapjs-left');
14641                utils.klass.remove(doc.body, 'snapjs-right');
14642                action.translate.easeTo(settings.maxPosition);
14643            } else if (side === 'right') {
14644                cache.simpleStates.opening = 'right';
14645                cache.simpleStates.towards = 'left';
14646                utils.klass.remove(doc.body, 'snapjs-left');
14647                utils.klass.add(doc.body, 'snapjs-right');
14648                action.translate.easeTo(settings.minPosition);
14649            }
14650        };
14651        this.close = function() {
14652            utils.dispatchEvent('close');
14653            action.translate.easeTo(0);
14654        };
14655        this.expand = function(side){
14656            var to = win.innerWidth || doc.documentElement.clientWidth;
14657
14658            if(side==='left'){
14659                utils.dispatchEvent('expandLeft');
14660                utils.klass.add(doc.body, 'snapjs-expand-left');
14661                utils.klass.remove(doc.body, 'snapjs-expand-right');
14662            } else {
14663                utils.dispatchEvent('expandRight');
14664                utils.klass.add(doc.body, 'snapjs-expand-right');
14665                utils.klass.remove(doc.body, 'snapjs-expand-left');
14666                to *= -1;
14667            }
14668            action.translate.easeTo(to);
14669        };
14670
14671        this.on = function(evt, fn) {
14672            eventList[evt] = fn;
14673            return this;
14674        };
14675        this.off = function(evt) {
14676            if (eventList[evt]) {
14677                eventList[evt] = false;
14678            }
14679        };
14680
14681        this.enable = function() {
14682            utils.dispatchEvent('enable');
14683            action.drag.listen();
14684        };
14685        this.disable = function() {
14686            utils.dispatchEvent('disable');
14687            action.drag.stopListening();
14688        };
14689
14690        this.settings = function(opts){
14691            utils.deepExtend(settings, opts);
14692        };
14693
14694        this.state = function() {
14695            var state,
14696                fromLeft = action.translate.get.matrix(4);
14697            if (fromLeft === settings.maxPosition) {
14698                state = 'left';
14699            } else if (fromLeft === settings.minPosition) {
14700                state = 'right';
14701            } else {
14702                state = 'closed';
14703            }
14704            return {
14705                state: state,
14706                info: cache.simpleStates
14707            };
14708        };
14709        init(userOpts);
14710    };
14711    if ((typeof module !== 'undefined') && module.exports) {
14712        module.exports = Snap;
14713    }
14714    if (typeof ender === 'undefined') {
14715        this.Snap = Snap;
14716    }
14717    if ((typeof define === "function") && define.amd) {
14718        define("snap", [], function() {
14719            return Snap;
14720        });
14721    }
14722}).call(this, window, document);
14723
14724var snapper;
14725
14726function getScrollY() {
14727    var scrOfY = 0;
14728
14729    if (typeof(window.pageYOffset) === 'number') {
14730        //Netscape compliant
14731        scrOfY = window.pageYOffset;
14732    } else if (document.body && (document.body.scrollLeft || document.body.scrollTop)) {
14733        //DOM compliant
14734        scrOfY = document.body.scrollTop;
14735    } else if (document.documentElement && (document.documentElement.scrollLeft || document.documentElement.scrollTop)) {
14736        //IE6 standards compliant mode
14737        scrOfY = document.documentElement.scrollTop;
14738    }
14739
14740    return scrOfY;
14741}
14742
14743/**
14744 * Dockt Elemente beim Scrollen am oberen Fensterrand an
14745 *
14746 * @param {string} elem - jQuery selector
14747 */
14748function stickyElement(elem) {
14749    var $elem = $(elem),
14750        $placeholder = $elem.wrap('<div class="sticky-container"></div>').parent();
14751    $placeholder.height($elem.innerHeight());
14752    $(window).bind('scroll', function () {
14753        $elem.removeClass('sticky').css('width', 'auto');
14754        if ($(window).scrollTop() >= $elem.parent().offset().top) {
14755            $elem.addClass('sticky').css('width', $elem.parents('.container').css('width'));
14756        }
14757    }).resize(function() {
14758        $elem.removeClass('sticky');
14759        $placeholder.height($elem.innerHeight());
14760        $(window).trigger('scroll');
14761    });
14762}
14763
14764function initSnapper($snapOpen, $snapDrawer) {
14765    var sideMenuAlignment = 'left';
14766
14767    if ($snapOpen.hasClass('snap-open-right')) {
14768        sideMenuAlignment = 'right';
14769    }
14770
14771    var snapper = new Snap({
14772        disable: sideMenuAlignment === 'left' ? 'right' : 'left',
14773        element: $snapDrawer[0],
14774        tapToClose: false
14775    });
14776    var oldDrawerWidth;
14777
14778    $(window).resize(function () {
14779        var colRegEx = new RegExp(/col-/g),
14780            drawerWidth;
14781        if (typeof dfSideMenuWidth === 'undefined' || dfSideMenuWidth === 'full' || $(window).width() < 768) {
14782            drawerWidth = Math.round($(window).width() - 45);
14783        } else if (dfSideMenuWidth === 'initial') {
14784            if (sideMenuAlignment === 'right') {
14785                drawerWidth = Math.round($(window).width() - $snapOpen.offset().left);
14786            } else {
14787                drawerWidth = Math.round($snapOpen.offset().left + $snapOpen.width());
14788            }
14789
14790            drawerWidth = Math.max(drawerWidth, 266)
14791        } else if (colRegEx.test(dfSideMenuWidth)) {
14792            var colSize = dfSideMenuWidth.split('col-');
14793            drawerWidth = Math.round(colSize[1] / 12 * $(window).width());
14794        }
14795        if (!drawerWidth) {
14796            snapper.close();
14797            snapper.disable();
14798        } else if (drawerWidth !== oldDrawerWidth) {
14799            snapper.settings({
14800                maxPosition: drawerWidth,
14801                minPosition: drawerWidth * -1
14802            });
14803            $snapDrawer.innerWidth(drawerWidth);
14804            $snapDrawer.css(sideMenuAlignment, drawerWidth * -1);
14805            if ($snapDrawer.css('transform') !== 'none') {
14806                $snapDrawer.css('transform', 'translateX(-' + drawerWidth + 'px)');
14807            }
14808        }
14809
14810        oldDrawerWidth = drawerWidth;
14811    }).resize();
14812    $('.snap-drawers').click(function (e) {
14813        if (e.target === this) {
14814            snapper.close();
14815        }
14816    });
14817
14818    return snapper;
14819}
14820
14821$(function () {
14822    var $snapDrawer = $('.snap-drawer-menu'),
14823        $body = $('body'),
14824        $snapOpen = $('.snap-open-menu');
14825
14826    $body.on('element.opened', function () {
14827        $body.data('open', true);
14828    });
14829
14830    $body.on('element.closed', function () {
14831        $body.data('open', false);
14832    });
14833
14834    if (enableSnapper && $snapDrawer.length) {
14835        snapper = initSnapper($snapOpen, $snapDrawer);
14836    }
14837
14838    $(document).on('shown.bs.tab', '[data-toggle="tab"]', function () {
14839        $(window).resize();
14840    });
14841
14842    if( /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) ) {
14843        $body.addClass('device-mobile');
14844    }else{
14845        $body.addClass('device-desktop');
14846    }
14847
14848    $('body.device-mobile nav').on('click', 'a.dropdown-toggle', function () {
14849        var $ul = $(this).siblings('ul');
14850        if (!$ul.hasClass('open')) {
14851            $(this).parent().siblings().find('ul.dropdown-menu.open').removeClass('open').hide();
14852            $ul.addClass('open').show();
14853            return false;
14854        }
14855    });
14856
14857    var imageCaptionElementList = $('.image_caption_click, body.device-mobile .image_caption_hover');
14858
14859    imageCaptionElementList.on('click touch', function (e) {
14860        if($(e.target).is('a')) return;
14861        var visibleCaptionList = imageCaptionElementList.find('.attribute-caption > div:visible');
14862        var elCaption = $(this).find('.attribute-caption > div');
14863        var colParent = visibleCaptionList.parents('div[class*="col-"]');
14864        if( !$(this).hasClass('show-caption') ){
14865            imageCaptionElementList.removeClass('show-caption');
14866            $(this).addClass('show-caption');
14867            if( visibleCaptionList.length >= 1 ){
14868                colParent.addClass('collapsing');
14869                visibleCaptionList.slideUp(function () {
14870                    colParent.removeClass('collapsing');
14871                    elCaption.slideDown(function () {
14872                        $.scrollTo($(this), 500);
14873                    });
14874                });
14875            }else{
14876                elCaption.slideDown(function () {
14877                    $.scrollTo($(this), 500);
14878                });
14879            }
14880        }else{
14881            $(this).removeClass('show-caption');
14882            elCaption.slideUp();
14883        }
14884
14885        return false;
14886    });
14887    $body.on('click', '.up-btn', function () {
14888        var $target = $('html, body, .snap-content');
14889        $target.animate({ scrollTop: 0 }, 'slow');
14890        return false;
14891    });
14892
14893    // Kontrollkästchen mit Responsive-Mehrfachauswahlfeldern synchronisieren
14894    $body.on('change','input[type=checkbox]', function () {
14895        var selector = 'select[data-name="' + $(this).attr('name') + '"] option[value="' + $(this).attr('value') + '"]';
14896        $(selector).prop('selected', $(this).prop('checked'));
14897    });
14898    $body.on('change','select[data-name]', function () {
14899        var selectName = $(this).attr('data-name');
14900        $(this).children('option').each(function () {
14901            var selector = 'input[type=checkbox][name="' + selectName + '"][value="' + $(this).attr('value') + '"]',
14902                isSelected = $(this).prop('selected');
14903            isSelected ? $(selector).attr('checked', 'checked') : $(selector).removeAttr('checked');
14904            $(selector).prop('checked', isSelected);
14905        });
14906    });
14907
14908    // Menüpunkte aktivieren
14909    $('nav, .mobile-menu, .side-menu, #meta-menu-top, #meta-menu').find('a').each(function () {
14910        var href = $(this).attr('href'),
14911            cssClass = 'active selected';
14912
14913        if (href.slice(-1) === '/') {
14914            href = href.slice(0, -1);
14915        }
14916
14917        if (href && 0 === location.pathname.indexOf(href)) {
14918            // Entfernt alle vorherigen aktiven Menüpunkte auf der selben Ebene.
14919            $(this).parent().siblings().removeClass(cssClass).children().removeClass(cssClass);
14920            $(this).siblings().removeClass(cssClass);
14921
14922            $(this).addClass(cssClass).parents('li').addClass(cssClass);
14923        }
14924    });
14925    $('.side-menu li.active, .mobile-menu li.active').addClass('open').children('ul').show();
14926
14927    // Nutzung DateTime-Picker
14928    $('input.datepicker').each(function () {
14929        var $this = $(this);
14930        // Unterbinden, dass der Datepicker doppelt initialisiert wird.
14931        if (undefined === $this.data('DateTimePicker')) {
14932            $this.datetimepicker({
14933                format: 'DD.MM.YYYY',
14934                allowInputToggle: true
14935            });
14936        }
14937    });
14938
14939    // Überprüft ob Menüpunkte vorhanden sind und entfernt ggf den Burger
14940    if (!$('.snap-drawers').length) {
14941        $snapOpen.remove();
14942    }
14943
14944    // Eingaben bei Inputfeldern vom Typen Number auf Zahlen beschränken
14945    $("input[type='number']").keydown(function (ev) {
14946        var keyCode = window.event ? ev.keyCode : ev.which;
14947        if (keyCode < 48 || keyCode > 57) {
14948            if (keyCode !== 0 && keyCode !== 8 && keyCode !== 9 && keyCode !== 13 && !ev.ctrlKey && (keyCode < 96 || keyCode > 105)) {
14949                ev.preventDefault();
14950            }
14951        }
14952    });
14953});
14954
14955$(function() {
14956    if (dfStickyMenuEnabled) {
14957        var $body = $('body'),
14958            $stickyMenu = $('nav.navbar-default'),
14959            stickyMenuTop = $stickyMenu.offset().top,
14960            $stickyMenuPlaceholder = $stickyMenu.wrap('<div id="sticky-menu-placeholder"></div>').parent();
14961        $stickyMenuPlaceholder.height($stickyMenu.innerHeight());
14962        $(window).bind('scroll', function () {
14963            if ($(window).scrollTop() >= stickyMenuTop) {
14964                $body.addClass('sticky-menu');
14965            } else {
14966                $body.removeClass('sticky-menu');
14967            }
14968        }).resize(function() {
14969            $body.removeClass('sticky-menu');
14970            stickyMenuTop = $stickyMenu.offset().top;
14971            $stickyMenuPlaceholder.height($stickyMenu.innerHeight());
14972            $(window).trigger('scroll');
14973        });
14974    }
14975});
14976
14977(function($) {
14978    var $window = $(window);
14979
14980    /*
14981     * Public methods
14982     */
14983    $.fn.dftab = function() {
14984        return this.each(function() {
14985            if (undefined == $(this).data('dftab')) {
14986                var plugin = new $.dftab(this);
14987                $(this).data('dftab', plugin);
14988            }
14989        });
14990    };
14991
14992    $.dftab = function(element) {
14993        var plugin = this,
14994            $tab = $(element),
14995            $container = $(),
14996            lastX, listStartMargin, listMinMargin, listMaxMargin,
14997            _setWidth = function() {
14998                $tab.children().width($container.width());
14999            },
15000            _setMargin = function(animate) {
15001                var $activeItem = $tab.children('.active');
15002
15003                if ($activeItem.length) {
15004                    listStartMargin = parseInt( ( $container.width() - $activeItem.outerWidth() ) / 2 + $tab.offset().left - $activeItem.offset().left );
15005                }
15006                else {
15007                    listStartMargin = 0;
15008                }
15009
15010                listMinMargin = parseInt($tab.offset().left - $tab.children('li:last').offset().left + $container.width() - $tab.children('li:last').outerWidth());
15011                listMaxMargin = 0;
15012
15013                if ( animate ) {
15014                    $tab.stop(true).animate({ 'margin-left': listStartMargin }, function() {
15015                        _setArrows();
15016                    });
15017                }
15018                else {
15019                    $tab.stop(true).css( 'margin-left', listStartMargin );
15020                    _setArrows();
15021                }
15022            },
15023            _touchstart = function(event) {
15024                if (event.type == 'touchstart') {
15025                    lastX = event.originalEvent.touches[0].clientX;
15026                }
15027                else {
15028                    lastX = event.clientX;
15029                }
15030                $window.on('touchmove mousemove', _touchmove).on('touchend mouseup', _touchend);
15031                event.preventDefault();
15032            },
15033            _touchmove = function(event) {
15034                var x;
15035
15036                if (event.type == 'touchmove') {
15037                    x = event.originalEvent.touches[0].clientX;
15038                }
15039                else {
15040                    x = event.clientX;
15041                }
15042
15043                var marginLeft = parseInt($tab.css('margin-left')),
15044                    marginChange = x - lastX,
15045                    marginLeftNew = marginLeft + marginChange;
15046
15047                if ( marginLeftNew < listMinMargin ) {
15048                    marginChange = listMinMargin - marginLeft;
15049                }
15050                else if ( marginLeftNew > listMaxMargin ) {
15051                    marginChange = listMaxMargin - marginLeft;
15052                }
15053
15054                $tab.css( 'margin-left', '+=' + marginChange + 'px' );
15055                _setArrows();
15056                lastX = x;
15057            },
15058            _touchend = function() {
15059                $(window).off( 'touchmove touchend mousemove mouseup' );
15060                var marginLeft = parseInt($tab.css('margin-left')),
15061                    $activeItem = $tab.children('.active');
15062                if (listStartMargin - $container.width() / 4 > marginLeft) {
15063                    $activeItem.next().children()[0].click();
15064                }
15065                else if (listStartMargin + $container.width() / 4 < marginLeft) {
15066                    $activeItem.prev().children()[0].click();
15067                }
15068                _setMargin(true);
15069            },
15070            _setArrows = function() {
15071                var $arrowLeft = $container.children('.arrow-left'),
15072                    $arrowRight = $container.children('.arrow-right');
15073
15074                if ( $tab.children('.active').prev(':not(.disabled)').length ) {
15075                    $arrowLeft.show();
15076                }
15077                else {
15078                    $arrowLeft.hide();
15079                }
15080
15081                if ( $tab.children('.active').next(':not(.disabled)').length ) {
15082                    $arrowRight.show();
15083                }
15084                else {
15085                    $arrowRight.hide();
15086                }
15087            },
15088            _setArrowsEvents = function() {
15089                $container.children('.arrow-left').click(function() {
15090                    $tab.children('.active').prev().children()[0].click();
15091                    _setMargin(true);
15092                });
15093                $container.children('.arrow-right').click(function() {
15094                    $tab.children('.active').next().children()[0].click();
15095                    _setMargin(true);
15096                });
15097            };
15098
15099        plugin.init = function() {
15100            $container = $('<div class="dftab-container"><div class="arrow-left"><div class="glyphicon glyphicon-chevron-left"></div></div><div class="arrow-right"><div class="glyphicon glyphicon-chevron-right"></div></div><div class="dftab"></div></div>').insertAfter($tab);
15101            $container.children('.dftab').append($tab);
15102            $tab.on('touchstart mousedown', _touchstart);
15103            _setArrowsEvents();
15104        };
15105
15106        plugin.destroy = function() {
15107            $tab.off('touchstart mousedown', _touchstart);
15108            $window.unbind('resize', plugin.resize);
15109            $tab.css('margin-left', '').children().width('auto');
15110            $tab.insertAfter($container);
15111            $container.remove();
15112        };
15113
15114        plugin.resize = function() {
15115            if (window.matchMedia("(max-width:767px)").matches) {
15116                if ($container.length == 0) {
15117                    plugin.init();
15118                }
15119
15120                _setWidth();
15121                _setMargin(false);
15122            } else if ($container.length) {
15123                plugin.destroy();
15124            }
15125        };
15126
15127        $window.bind('resize', plugin.resize);
15128        plugin.resize();
15129    };
15130})(jQuery);
15131
15132$(function() {
15133    $('.nav-tabs').dftab();
15134});
15135
15136(function ($) {
15137    $.reloadWebcam = function ($webcam) {
15138        var self = this;
15139        self.$webcam = $webcam;
15140        self.src = $webcam.attr('src');
15141        self.interval = $webcam.data('interval') * 1000;
15142
15143        self._reload = function () {
15144            var date = new Date();
15145            self.$webcam.attr('src', self.src + '?time=' + date);
15146            setTimeout(self._reload, self.interval);
15147        };
15148
15149        self._reload();
15150
15151        return self;
15152    };
15153
15154    $.fn.reloadWebcam = function () {
15155        return this.each(function () {
15156            var $this = $(this);
15157
15158            if (!$this.data('reloadWebcam')) {
15159                $this.data('reloadWebcam', new $.reloadWebcam($this));
15160            }
15161
15162            return $this;
15163        });
15164    };
15165})(jQuery);
15166
15167$(document).ready(function () {
15168    $('img.webcam:visible').reloadWebcam();
15169});
15170
15171$(window).resize(function () {
15172    $('img.webcam:visible').reloadWebcam();
15173});
15174
15175function checkCallBack()
15176{
15177    if ($('.attribute-callback input').is( ':checked' ))
15178        $('.attribute-callback-time').show();
15179    else
15180        $('.attribute-callback-time').hide();
15181}
15182
15183$(function()
15184{
15185    checkCallBack();
15186    $( '.attribute-callback input' ).change( checkCallBack );
15187});
15188$(function () {
15189    $('body').on('click', '#diashow a', function() {
15190        var targetGallery = $(this).data('href');
15191        if (targetGallery) {
15192            $('[data-gallery=' + targetGallery + ']:eq(0)').click();
15193        } else {
15194            $('[data-gallery]:eq(0)').click();
15195        }
15196        $('#blueimp-gallery').data('gallery').play();
15197        return false;
15198    });
15199});
15200
15201(function ($) {
15202    $.dfbanner = function ($container) {
15203        var self = this;
15204        self.$container = $container;
15205        self.settings = {};
15206        self.items = [];
15207        self.count = 0;
15208        self.current = 0;
15209        self.$bannerItems = $();
15210        self.$navigation = $();
15211        self.activeTimeout = false;
15212        self.posAllowed = true;
15213        self.hover = false;
15214        self.nextOnHoverOut = false;
15215
15216        self._timeoutAndNext = function () {
15217            var timeout = self.items[self.current].timeout;
15218            clearTimeout(self.activeTimeout);
15219
15220            if (timeout) {
15221                self.activeTimeout = setTimeout(
15222                    function () {
15223                        if (!self.hover) {
15224                            self.next();
15225                        } else {
15226                            self.nextOnHoverOut = true;
15227                        }
15228                    },
15229                    timeout
15230                );
15231            }
15232        };
15233        self._setHeight = function () {
15234            var height, backgroundHeight;
15235
15236            if (self.settings.height === 'auto') {
15237                var bannerItemDiv = self.$bannerItems.children('.banneritem' + self.current);
15238                if (bannerItemDiv.data('backgroundHeight')) {
15239                    backgroundHeight = bannerItemDiv.data('backgroundHeight');
15240                } else {
15241                    height = bannerItemDiv.children('.attribute-item').children().height();
15242                }
15243            } else if (self.settings.height) {
15244                height = self.settings.height;
15245            } else {
15246                return;
15247            }
15248
15249            if (backgroundHeight) {
15250                self.$container.css('height', backgroundHeight + 'px');
15251            } else if (height) {
15252                self.$container.css('padding-bottom', (height / self.$container.width() * 100) + '%');
15253            } else {
15254                setTimeout(self._setHeight, 100);
15255            }
15256        };
15257        self._animateFinished = function () {
15258            var bannerItem = self.$bannerItems.children('.banneritem' + self.current);
15259            $(this).css('display', 'none');
15260            self.posAllowed = true;
15261            self.$container.trigger('shown.dfbanner', [ bannerItem, self.items[self.current].timeout ]);
15262        };
15263        self._setBackground = function (callback) {
15264            if (self.items[self.current].background) {
15265                var bannerImage = new Image();
15266
15267                bannerImage.onload = function () {
15268                    var bannerItemDiv = self.$bannerItems.children('.banneritem' + self.current);
15269                    bannerItemDiv.data('backgroundHeight', this.height);
15270
15271                    bannerItemDiv.css('background-image', 'url(' + self.items[self.current].background + ')');
15272                    bannerItemDiv.css('background-repeat', 'no-repeat');
15273                    bannerItemDiv.css('background-position', 'center');
15274
15275                    if (typeof callback === 'function') {
15276                        callback();
15277                    }
15278                };
15279
15280                bannerImage.src = self.items[self.current].background;
15281                return true;
15282            }
15283
15284            return false;
15285        };
15286        self._createBannerItem = function () {
15287            var bannerItem = $('<div class="banneritem' + self.current + ' banneritemId' + self.items[self.current].contentId + '" />').appendTo(self.$bannerItems);
15288            if (self.settings.position === 'outside') {
15289                $('<div class="container" />').appendTo(bannerItem);
15290            }
15291            return bannerItem;
15292        };
15293        self._setBannerItemContent = function (bannerItem) {
15294            var $attributeItem = $('<div class="attribute-item" />').html(self.items[self.current].element),
15295                currentItem = self.items[self.current],
15296                $bannerItemLink;
15297
15298            if (currentItem.background) {
15299                $attributeItem.addClass('has-background');
15300            }
15301
15302            if (self.settings.position === 'outside') {
15303                bannerItem.children('.container').html($attributeItem);
15304            } else {
15305                bannerItem.html($attributeItem);
15306            }
15307
15308            if (currentItem.href) {
15309                $bannerItemLink = $('<a class="banner-item-link" />').attr('href', currentItem.href);
15310                if (currentItem.target) {
15311                    $bannerItemLink.attr('target', currentItem.target);
15312                }
15313                $bannerItemLink.appendTo(bannerItem);
15314            }
15315        };
15316        self.init = function (options) {
15317            self.$container.html('');
15318
15319            self.settings = $.extend($.fn.dfbanner.defaults, self.$container.data());
15320
15321            if (options) {
15322                self.settings = $.extend(self.settings, options);
15323            }
15324
15325            self.items = self.settings.items;
15326            self.count = self.items.length;
15327
15328            if (self.count) {
15329                if (self.settings.type === 'random') {
15330                    var mapping = [];
15331                    var randomItemKey = false;
15332                    var randomItemKeys = [];
15333                    var randomItems = [];
15334
15335                    $.each(self.items, function (key, item) {
15336                        for (var i = 0; i < item.priority; i++) {
15337                            mapping.push(key);
15338                        }
15339                    });
15340
15341                    for (var i = 0; i < self.count; i++) {
15342                        do {
15343                            randomItemKey = mapping[Math.floor(Math.random() * mapping.length)];
15344                        } while (-1 !== $.inArray(randomItemKey, randomItemKeys));
15345
15346                        randomItemKeys.push(randomItemKey);
15347                    }
15348
15349                    $.each(randomItemKeys, function (key, itemKey) {
15350                        randomItems.push(self.items[itemKey]);
15351                    });
15352
15353                    self.items = randomItems;
15354                }
15355
15356                self.$bannerItems = $('<div class="banneritems" />').appendTo(self.$container);
15357                var bannerItem = self._createBannerItem();
15358                self._setBannerItemContent(bannerItem);
15359                bannerItem.css('z-index', 2);
15360
15361                if (self.count > 1) {
15362                    if (self.settings.pauseonhover) {
15363                        self.$container.hover(function () {
15364                            self.hover = true;
15365                        }, function () {
15366                            self.hover = false;
15367
15368                            if (self.nextOnHoverOut) {
15369                                self.next();
15370                                self.nextOnHoverOut = false;
15371                            }
15372                        });
15373                    }
15374
15375                    $('<a class="prev" href="#" />').click(self.prev).appendTo(self.$container);
15376                    $('<a class="next" href="#" />').click(self.next).appendTo(self.$container);
15377                    self.$navigation = $('<div class="navigation" />').appendTo(self.$container);
15378
15379                    for (var i = 0; i < self.count; i++) {
15380                        $('<a class="item' + i + '" href="#" />').click(function () {
15381                            self.pos($(this).data('pos'));
15382                            return false;
15383                        }).data('pos', i).appendTo(self.$navigation);
15384                    }
15385
15386                    self.$navigation.children('.item' + self.current).addClass('active');
15387
15388                    self._timeoutAndNext();
15389                }
15390
15391                $(window).resize();
15392
15393                if (!self._setBackground(self._setHeight)) {
15394                    self.$container.find('img').on('load', self._setHeight);
15395                    self._setHeight();
15396                }
15397
15398                $(window).resize(self._setHeight);
15399            }
15400
15401            return self;
15402        };
15403
15404        self.next = function () {
15405            var next = self.current + 1;
15406
15407            if (next === self.count) {
15408                next = 0;
15409            }
15410
15411            self.pos(next);
15412            return false;
15413        };
15414
15415        self.prev = function () {
15416            var prev = self.current - 1;
15417
15418            if (prev === -1) {
15419                prev = self.count - 1;
15420            }
15421
15422            self.pos(prev);
15423            return false;
15424        };
15425
15426        self.pos = function (pos) {
15427            if (self.current !== pos && self.posAllowed) {
15428                self.posAllowed = false;
15429
15430                var bannerItemOld = self.$bannerItems.children('.banneritem' + self.current).css({
15431                    'z-index': 2
15432                });
15433                self.$navigation.children('.item' + self.current).removeClass('active');
15434                self.current = pos;
15435                self.$navigation.children('.item' + self.current).addClass('active');
15436
15437                var bannerItem = self.$bannerItems.children('.banneritem' + self.current);
15438
15439                if (bannerItem.length === 0) {
15440                    bannerItem = self._createBannerItem();
15441                }
15442
15443                self._setBannerItemContent(bannerItem);
15444                bannerItem.css({
15445                    'z-index': 1,
15446                    opacity: 1,
15447                    display: 'block'
15448                });
15449                $(window).resize();
15450
15451                self._setBackground();
15452
15453                if (self.settings.animationtype === 'slide') {
15454                    bannerItemOld.slideUp(self.settings.speed, self._animateFinished);
15455                } else if (self.settings.animationtype === 'fade') {
15456                    bannerItemOld.animate({ opacity : 0 }, self.settings.speed, self._animateFinished);
15457                } else {
15458                    alert('dfbanner-animationtype must either be \'slide\' or \'fade\'');
15459                }
15460
15461                self._timeoutAndNext();
15462            }
15463        };
15464
15465        self.animationIsComplete = function () {
15466            if (!self.hover) {
15467                self.next();
15468            } else {
15469                self.nextOnHoverOut = true;
15470            }
15471        };
15472
15473        return self;
15474    };
15475
15476    $.fn.dfbanner = function (opts) {
15477        return this.each(function () {
15478            var $this = $(this);
15479
15480            if ($this.data('dfbanner')) {
15481                if (typeof opts === 'string') {
15482                    opts = opts.split(':');
15483
15484                    var call = $this.data('dfbanner')[opts[0]];
15485
15486                    //  Do we have arguments to pass to the string-function?
15487                    if($.isFunction(call)) {
15488                        return call.apply($this, opts[1] ? opts[1].split(',') : null);
15489                    }
15490                }
15491            } else {
15492                $this.data('dfbanner', new $.dfbanner($this));
15493                $this.data('dfbanner').init(opts);
15494            }
15495
15496            return $this;
15497        });
15498    };
15499
15500    $.fn.dfbanner.defaults = {
15501        'animationtype' : 'fade',
15502        'speed' : 'normal',
15503        'type' : 'sequence',
15504        'pauseonhover' : true,
15505        'position' : 'inside',
15506        'height' : false,
15507        'items' : []
15508    };
15509})(jQuery);
15510
15511function animationIsComplete() {
15512    $('.dfbanner:visible').dfbanner('animationIsComplete');
15513}
15514
15515$(document).ready(function () {
15516    $('.dfbanner:visible').dfbanner();
15517});
15518
15519$(window).resize(function () {
15520    $('.dfbanner:visible').dfbanner();
15521});
15522
15523(function ($) {
15524    $.fn.dfflexbanner = function () {
15525        return this.each(function () {
15526            var $this = $(this);
15527
15528            if (typeof $this.data('flexslider') === 'undefined') {
15529                if ($this.parents('#topbanner').length) {
15530                    $('#topbanner > .container').removeClass('container');
15531                }
15532                var dfflexbanner = $this.flexslider({
15533                    animation: 'slide',
15534                    animationSpeed: $this.data('speed'),
15535                    slideshow: $this.data('autoplay'),
15536                    controlNav: false,
15537                    prevText: '',
15538                    nextText: '',
15539                    slideshowSpeed: $this.data('timeout'),
15540                    randomize: $this.data('randomize'),
15541                    pauseOnHover: $this.data('pauseonhover')
15542                });
15543
15544                window.setTimeout(function () { dfpicturefill() }, 500);
15545
15546                dfflexbanner.resize();
15547            }
15548
15549            return $this;
15550        });
15551    };
15552})(jQuery);
15553
15554$(document).ready(function () {
15555    $('.dfflexbanner:visible').dfflexbanner();
15556});
15557
15558$(window).resize(function () {
15559    $('.dfflexbanner:visible').dfflexbanner();
15560});
15561
15562(function ($) {
15563    $.fn.dfowlcarousel = function () {
15564        return this.each(function () {
15565            var $this = $(this),
15566                drag = true;
15567
15568            if ($this.parents('#topbanner').length) {
15569                $('#topbanner > .container').removeClass('container');
15570            }
15571            // Drag deaktivieren, wenn keine Navigation vorhanden
15572            $this.on('initialized.owl.carousel', function (event) {
15573                dfpicturefill();
15574                if (event.relatedTarget._items.length <= event.relatedTarget.settings.items) {
15575                    drag = false;
15576                    event.relatedTarget.$stage.off('mousedown.owl.core touchstart.owl.core touchcancel.owl.core');
15577                    event.relatedTarget.settings.autoplay = false;
15578                    $this.trigger('stop.owl.autoplay');
15579                }
15580            });
15581            $this.on('refreshed.owl.carousel', function (event) {
15582                if (event.relatedTarget._items.length <= event.relatedTarget.settings.items && drag) {
15583                    drag = false;
15584                    event.relatedTarget.$stage.off('mousedown.owl.core touchstart.owl.core touchcancel.owl.core');
15585                    event.relatedTarget.settings.autoplay = false;
15586                    $this.trigger('stop.owl.autoplay');
15587                } else if (event.relatedTarget._items.length > event.relatedTarget.settings.items && !drag) {
15588                    drag = true;
15589                    event.relatedTarget.$stage.on('mousedown.owl.core', $.proxy(event.relatedTarget.onDragStart, event.relatedTarget));
15590                    event.relatedTarget.$stage.on('touchstart.owl.core', $.proxy(event.relatedTarget.onDragStart, event.relatedTarget));
15591                    event.relatedTarget.$stage.on('touchcancel.owl.core', $.proxy(event.relatedTarget.onDragEnd, event.relatedTarget));
15592                    event.relatedTarget.settings.autoplay = $this.data('autoplay');
15593                    $this.trigger('play.owl.autoplay');
15594                }
15595            });
15596            $this.owlCarousel({
15597                center: true,
15598                items: 1,
15599                loop: true,
15600                dots: false,
15601                autoplay: $this.data('autoplay'),
15602                autoplayTimeout: $this.data('timeout'),
15603                autoplaySpeed: $this.data('speed'),
15604                autoplayHoverPause: $this.data('pauseonhover'),
15605                smartSpeed: $this.data('speed'),
15606                nav: true,
15607                navSpeed: $this.data('speed'),
15608                navText: [
15609                    $this.data('prevtext'),
15610                    $this.data('nexttext')
15611                ],
15612                responsive: {
15613                    768: {
15614                        autoWidth: true
15615                    }
15616                }
15617            });
15618
15619            return $this;
15620        });
15621    };
15622})(jQuery);
15623
15624$(document).ready(function () {
15625    $('.dfowlcarousel').dfowlcarousel();
15626});
15627
15628// Initialisiert den Banner nach einem Resize erneut
15629$(window).resize(function () {
15630    $('.dfowlcarousel').trigger('destroy.owl.carousel').dfowlcarousel();
15631});
15632
15633$(function () {
15634    function getGridSize($flexslider) {
15635        var sliderColumnXs = $flexslider.data('column-size-xs'),
15636            sliderColumnSm = $flexslider.data('column-size-sm'),
15637            sliderColumnMd = $flexslider.data('column-size-md');
15638
15639        sliderColumnXs = (sliderColumnXs > 0) ? sliderColumnXs : 4;
15640        sliderColumnSm = (sliderColumnSm > 0) ? sliderColumnSm : sliderColumnXs;
15641        sliderColumnMd = (sliderColumnMd > 0) ? sliderColumnMd : sliderColumnSm;
15642
15643        return (window.innerWidth < 768) ? (12 / sliderColumnXs) : (window.innerWidth < 992) ? (12 / sliderColumnSm) : (12 / sliderColumnMd);
15644    }
15645
15646    $('.dfslider-flexslider').each(function () {
15647        var $flexslider = $(this),
15648            currentGridSize = getGridSize($flexslider);
15649        $flexslider.flexslider({
15650            animation: 'slide',
15651            animationLoop: $flexslider.data('animation-loop'),
15652            animationSpeed: $flexslider.data('speed'),
15653            slideshow: $flexslider.data('autoplay'),
15654            itemWidth: 188,
15655            itemMargin: 10,
15656            minItems: currentGridSize,
15657            maxItems: currentGridSize,
15658            controlNav: false,
15659            prevText: '',
15660            nextText: ''
15661        });
15662
15663        $(window).resize(function () {
15664            var flexslider = $flexslider.data('flexslider'),
15665                gridSize = getGridSize($flexslider);
15666            if (flexslider && currentGridSize !== gridSize) {
15667                flexslider.vars.minItems = gridSize;
15668                flexslider.vars.maxItems = gridSize;
15669                flexslider.flexAnimate(0, true);
15670                currentGridSize = gridSize;
15671            }
15672        });
15673    });
15674    window.setTimeout(dfpicturefill, 500);
15675});
15676
15677$(function () {
15678    $('.dfslider-owlcarousel').each(function () {
15679        var $this = $(this),
15680            sliderColumnXs = $this.data('column-size-xs'),
15681            sliderColumnSm = $this.data('column-size-sm'),
15682            sliderColumnMd = $this.data('column-size-md'),
15683            responsive = {},
15684            drag = true;
15685
15686        responsive[0] = {
15687            items: (sliderColumnXs > 0) ? Math.round(12 / sliderColumnXs) : 3
15688        };
15689        responsive[768] = {
15690            items: (sliderColumnSm > 0) ? Math.round(12 / sliderColumnSm) : responsive[0].items
15691        };
15692        responsive[992] = {
15693            items: (sliderColumnMd > 0) ? Math.round(12 / sliderColumnMd) : responsive[768].items
15694        };
15695        // Drag deaktivieren, wenn keine Navigation vorhanden
15696        $this.on('initialized.owl.carousel', function (event) {
15697            dfpicturefill();
15698            if (event.relatedTarget._items.length <= event.relatedTarget.settings.items) {
15699                drag = false;
15700                event.relatedTarget.$stage.off('mousedown.owl.core touchstart.owl.core touchcancel.owl.core');
15701                event.relatedTarget.settings.autoplay = false;
15702                $this.trigger('stop.owl.autoplay');
15703            }
15704        });
15705        $this.on('refreshed.owl.carousel', function (event) {
15706            if (event.relatedTarget._items.length <= event.relatedTarget.settings.items && drag) {
15707                drag = false;
15708                event.relatedTarget.$stage.off('mousedown.owl.core touchstart.owl.core touchcancel.owl.core');
15709                event.relatedTarget.settings.autoplay = false;
15710                $this.trigger('stop.owl.autoplay');
15711            } else if (event.relatedTarget._items.length > event.relatedTarget.settings.items && !drag) {
15712                drag = true;
15713                event.relatedTarget.$stage.on('mousedown.owl.core', $.proxy(event.relatedTarget.onDragStart, event.relatedTarget));
15714                event.relatedTarget.$stage.on('touchstart.owl.core', $.proxy(event.relatedTarget.onDragStart, event.relatedTarget));
15715                event.relatedTarget.$stage.on('touchcancel.owl.core', $.proxy(event.relatedTarget.onDragEnd, event.relatedTarget));
15716                event.relatedTarget.settings.autoplay = $this.data('autoplay');
15717                $this.trigger('play.owl.autoplay');
15718            }
15719        });
15720        $this.owlCarousel({
15721            loop: $this.data('loop'),
15722            margin: 10,
15723            dots: false,
15724            autoplay: $this.data('autoplay'),
15725            autoplayTimeout: $this.data('timeout'),
15726            autoplaySpeed: $this.data('speed'),
15727            autoplayHoverPause: $this.data('pauseonhover'),
15728            smartSpeed: $this.data('speed'),
15729            nav: true,
15730            navSpeed: $this.data('speed'),
15731            navText: [
15732                $this.data('prevtext'),
15733                $this.data('nexttext')
15734            ],
15735            responsive: responsive
15736        });
15737    });
15738});
15739
15740/*
15741 * blueimp Gallery jQuery plugin 1.2.2
15742 * https://github.com/blueimp/Gallery
15743 *
15744 * Copyright 2013, Sebastian Tschan
15745 * https://blueimp.net
15746 *
15747 * Licensed under the MIT license:
15748 * http://www.opensource.org/licenses/MIT
15749 */
15750
15751/* global define, window, document */
15752
15753(function (factory) {
15754    'use strict';
15755    if (typeof define === 'function' && define.amd) {
15756        define([
15757            'jquery',
15758            './blueimp-gallery'
15759        ], factory);
15760    } else {
15761        factory(
15762            window.jQuery,
15763            window.blueimp.Gallery
15764        );
15765    }
15766}(function ($, Gallery) {
15767    'use strict';
15768
15769    // Global click handler to open links with data-gallery attribute
15770    // in the Gallery lightbox:
15771    $(document).on('click', '[data-gallery]', function (event) {
15772        // Get the container id from the data-gallery attribute:
15773        var id = $(this).data('gallery'),
15774            widget = $(id),
15775            container = (widget.length && widget) ||
15776                $(Gallery.prototype.options.container),
15777            callbacks = {
15778                onopen: function () {
15779                    container
15780                        .data('gallery', this)
15781                        .trigger('open');
15782                },
15783                onopened: function () {
15784                    container.trigger('opened');
15785                },
15786                onslide: function (index, slide) {
15787                    var text = this.list[index].getAttribute('data-caption'),
15788                        node = this.container.find('.caption');
15789
15790                    $(node).html(text);
15791                    container.trigger('slide', arguments);
15792                },
15793                onslideend: function () {
15794                    container.trigger('slideend', arguments);
15795                },
15796                onslidecomplete: function () {
15797                    container.trigger('slidecomplete', arguments);
15798                },
15799                onclose: function () {
15800                    container.trigger('close');
15801                },
15802                onclosed: function () {
15803                    container
15804                        .trigger('closed')
15805                        .removeData('gallery');
15806                }
15807            },
15808            options = $.extend(
15809                // Retrieve custom options from data-attributes
15810                // on the Gallery widget:
15811                container.data(),
15812                {
15813                    container: container[0],
15814                    index: this,
15815                    event: event,
15816                    urlProperty: 'image'
15817                },
15818                callbacks
15819            ),
15820            // Select all links with the same data-gallery attribute:
15821            links = $('[data-gallery="' + id + '"]');
15822        if (options.filter) {
15823            links = links.filter(options.filter);
15824        }
15825        return new Gallery(links, options);
15826    });
15827
15828}));
15829
15830$(function() {
15831    $('#mobile-footer').on('click', 'a[href="#language"]', function() {
15832        var $this = $(this),
15833            href = $this.attr('href').substring(1),
15834            $container = $('.' + href + '-container');
15835        if ($this.hasClass('active')) {
15836            $container.slideUp();
15837            $this.removeClass('active');
15838        } else {
15839            $container.slideDown();
15840            $this.addClass('active');
15841        }
15842        return false;
15843    })
15844});
15845
15846/* Modernizr 2.7.0 (Custom Build) | MIT & BSD
15847 * Build: http://modernizr.com/download/#-csstransforms3d-canvas-video-input-teststyles-testprop-testallprops-prefixes-domprefixes
15848 */
15849;window.Modernizr=function(a,b,c){function y(a){i.cssText=a}function z(a,b){return y(l.join(a+";")+(b||""))}function A(a,b){return typeof a===b}function B(a,b){return!!~(""+a).indexOf(b)}function C(a,b){for(var d in a){var e=a[d];if(!B(e,"-")&&i[e]!==c)return b=="pfx"?e:!0}return!1}function D(a,b,d){for(var e in a){var f=b[a[e]];if(f!==c)return d===!1?a[e]:A(f,"function")?f.bind(d||b):f}return!1}function E(a,b,c){var d=a.charAt(0).toUpperCase()+a.slice(1),e=(a+" "+n.join(d+" ")+d).split(" ");return A(b,"string")||A(b,"undefined")?C(e,b):(e=(a+" "+o.join(d+" ")+d).split(" "),D(e,b,c))}function F(){e.input=function(c){for(var d=0,e=c.length;d<e;d++)r[c[d]]=c[d]in j;return r.list&&(r.list=!!b.createElement("datalist")&&!!a.HTMLDataListElement),r}("autocomplete autofocus list placeholder max min multiple pattern required step".split(" "))}var d="2.7.0",e={},f=b.documentElement,g="modernizr",h=b.createElement(g),i=h.style,j=b.createElement("input"),k={}.toString,l=" -webkit- -moz- -o- -ms- ".split(" "),m="Webkit Moz O ms",n=m.split(" "),o=m.toLowerCase().split(" "),p={},q={},r={},s=[],t=s.slice,u,v=function(a,c,d,e){var h,i,j,k,l=b.createElement("div"),m=b.body,n=m||b.createElement("body");if(parseInt(d,10))while(d--)j=b.createElement("div"),j.id=e?e[d]:g+(d+1),l.appendChild(j);return h=["&#173;",'<style id="s',g,'">',a,"</style>"].join(""),l.id=g,(m?l:n).innerHTML+=h,n.appendChild(l),m||(n.style.background="",n.style.overflow="hidden",k=f.style.overflow,f.style.overflow="hidden",f.appendChild(n)),i=c(l,a),m?l.parentNode.removeChild(l):(n.parentNode.removeChild(n),f.style.overflow=k),!!i},w={}.hasOwnProperty,x;!A(w,"undefined")&&!A(w.call,"undefined")?x=function(a,b){return w.call(a,b)}:x=function(a,b){return b in a&&A(a.constructor.prototype[b],"undefined")},Function.prototype.bind||(Function.prototype.bind=function(b){var c=this;if(typeof c!="function")throw new TypeError;var d=t.call(arguments,1),e=function(){if(this instanceof e){var a=function(){};a.prototype=c.prototype;var f=new a,g=c.apply(f,d.concat(t.call(arguments)));return Object(g)===g?g:f}return c.apply(b,d.concat(t.call(arguments)))};return e}),p.canvas=function(){var a=b.createElement("canvas");return!!a.getContext&&!!a.getContext("2d")},p.csstransforms3d=function(){var a=!!E("perspective");return a&&"webkitPerspective"in f.style&&v("@media (transform-3d),(-webkit-transform-3d){#modernizr{left:9px;position:absolute;height:3px;}}",function(b,c){a=b.offsetLeft===9&&b.offsetHeight===3}),a},p.video=function(){var a=b.createElement("video"),c=!1;try{if(c=!!a.canPlayType)c=new Boolean(c),c.ogg=a.canPlayType('video/ogg; codecs="theora"').replace(/^no$/,""),c.h264=a.canPlayType('video/mp4; codecs="avc1.42E01E"').replace(/^no$/,""),c.webm=a.canPlayType('video/webm; codecs="vp8, vorbis"').replace(/^no$/,"")}catch(d){}return c};for(var G in p)x(p,G)&&(u=G.toLowerCase(),e[u]=p[G](),s.push((e[u]?"":"no-")+u));return e.input||F(),e.addTest=function(a,b){if(typeof a=="object")for(var d in a)x(a,d)&&e.addTest(d,a[d]);else{a=a.toLowerCase();if(e[a]!==c)return e;b=typeof b=="function"?b():b,typeof enableClasses!="undefined"&&enableClasses&&(f.className+=" "+(b?"":"no-")+a),e[a]=b}return e},y(""),h=j=null,e._version=d,e._prefixes=l,e._domPrefixes=o,e._cssomPrefixes=n,e.testProp=function(a){return C([a])},e.testAllProps=E,e.testStyles=v,e}(this,this.document);
15850$(function() {
15851    $('#carousel').flexslider({
15852        animation: "slide",
15853        controlNav: false,
15854        animationLoop: false,
15855        slideshow: false,
15856        itemWidth: 90,
15857        itemMargin: 10,
15858        minItems: 3,
15859        maxItems: 3,
15860        asNavFor: '#slider'
15861    });
15862    $('#slider').flexslider({
15863        animation: "slide",
15864        controlNav: false,
15865        animationLoop: false,
15866        slideshow: false,
15867        sync: "#carousel"
15868    });
15869    $('.content-view-thumbnail .productslider').flexslider({
15870        animation: "slide",
15871        controlNav: true,
15872        animationLoop: false,
15873        slideshow: false,
15874        prevText: "",
15875        nextText: ""
15876    });
15877    window.setTimeout(function() { dfpicturefill() }, 500);
15878});
15879
15880$(document).ready(function () {
15881    var $sideMenu = $('.side-menu, .mobile-menu');
15882    $sideMenu.children('.active').addClass('open').children('ul').show();
15883
15884    $sideMenu.on('click', '.icon-menu-open', function() {
15885        var $dropDownParent = $(this).parent().parent();
15886
15887        if ($dropDownParent.hasClass('open')) {
15888            $dropDownParent.removeClass('open').children('ul').slideUp();
15889        } else {
15890            $dropDownParent.siblings('.open').removeClass('open').children('ul').slideUp();
15891            $dropDownParent.addClass('open').children('ul').slideDown();
15892        }
15893
15894        return false;
15895    });
15896});
15897
15898// Quelle: http://stackoverflow.com/a/19721089
15899// Demo: http://jsfiddle.net/crustyashish/rGrvf/1/
15900
15901jQuery.fn.highlight = function (pat) {
15902    function innerHighlight(node, pat) {
15903        var skip = 0;
15904        if (node.nodeType == 3) {
15905            var softHyphen = /\u00AD/g,
15906                pos = node.data.replace(softHyphen, '').toUpperCase().indexOf(pat);
15907            if (pos >= 0) {
15908                var spannode = document.createElement('span');
15909                spannode.className = 'highlight';
15910                node.data = node.data.replace(softHyphen, '');
15911                var middlebit = node.splitText(pos);
15912                var endbit = middlebit.splitText(pat.length);
15913                var middleclone = middlebit.cloneNode(true);
15914                spannode.appendChild(middleclone);
15915                middlebit.parentNode.replaceChild(spannode, middlebit);
15916                var lang = document.documentElement.lang;
15917                if (Hyphenopoly && 'undefined' !== typeof Hyphenopoly.hyphenators[lang]) {
15918                    Hyphenopoly.hyphenators[lang].then(function (result) {
15919                        result(node);
15920                    });
15921                }
15922                skip = 1;
15923            }
15924        } else if (node.nodeType === 1 && node.childNodes && !/(script|style)/i.test(node.tagName)) {
15925            for (var i = 0; i < node.childNodes.length; ++i) {
15926                i += innerHighlight(node.childNodes[i], pat);
15927            }
15928        }
15929        return skip;
15930    }
15931    return this.each(function () {
15932        innerHighlight(this, pat.toUpperCase());
15933    });
15934};
15935
15936jQuery.fn.removeHighlight = function () {
15937    function newNormalize(node) {
15938        for (var i = 0, children = node.childNodes, nodeCount = children.length; i < nodeCount; i++) {
15939            var child = children[i];
15940            if (child.nodeType === 1) {
15941                newNormalize(child);
15942                continue;
15943            }
15944            if (child.nodeType !== 3) {
15945                continue;
15946            }
15947            var next = child.nextSibling;
15948            if (next == null || next.nodeType !== 3) {
15949                continue;
15950            }
15951            var combined_text = child.nodeValue + next.nodeValue;
15952            new_node = node.ownerDocument.createTextNode(combined_text);
15953            node.insertBefore(new_node, child);
15954            node.removeChild(child);
15955            node.removeChild(next);
15956            i--;
15957            nodeCount--;
15958        }
15959    }
15960
15961    return this.find("span.highlight").each(function () {
15962        var thisParent = this.parentNode;
15963        thisParent.replaceChild(this.firstChild, this);
15964        newNormalize(thisParent);
15965    }).end();
15966};
15967
15968$(function () {
15969    var $body = $('body'),
15970        $button = $('.snap-open-menu'),
15971        $container = $('.snap-drawer-menu'),
15972        sideMenuAlignment = 'left',
15973        _closeFunction = function () {
15974            if ($button.hasClass('open')) {
15975                $button.removeClass('open');
15976                $button.children('.icon-menu').show();
15977                $button.children('.icon-btn-close').hide();
15978                snapper.close();
15979                window.setTimeout(function () {
15980                    $body.trigger('element.closed');
15981                }, 600);
15982            }
15983        },
15984        _openFunction = function () {
15985            $button.addClass('open');
15986            $button.children('.icon-menu').hide();
15987            $button.children('.icon-btn-close').show();
15988            snapper.open(sideMenuAlignment);
15989            window.setTimeout(function () {
15990                $body.trigger('element.opened');
15991            }, 600);
15992        },
15993        _clickFunction = function () {
15994            if ($button.hasClass('open')) {
15995                _closeFunction();
15996                return false;
15997            }
15998
15999            if ($body.data('open')) {
16000                $body.one('element.closed', _openFunction);
16001                $body.trigger('element.open');
16002                return false;
16003            }
16004
16005            _openFunction();
16006            return false;
16007        };
16008
16009    if (enableSnapper && $button.length && $container.length) {
16010        snapper.on('close', function () {
16011            $body.trigger('element.open');
16012        });
16013        $body.on('element.open', _closeFunction);
16014        if ($button.hasClass('snap-open-right')) {
16015            sideMenuAlignment = 'right';
16016        }
16017        $button.click(_clickFunction);
16018    }
16019});
16020
16021$(function () {
16022    var $body = $('body'),
16023        $button = $('.snap-open-search'),
16024        $container = $('.search-container'),
16025        _closeFunction = function () {
16026            if ($button.hasClass('open')) {
16027                $button.removeClass('open');
16028                $button.children('.icon-btn-search').show();
16029                $button.children('.icon-btn-close').hide();
16030                $container.slideUp(function () {
16031                    $body.trigger('element.closed');
16032                });
16033            }
16034        },
16035        _openFunction = function () {
16036            $button.addClass('open');
16037            $button.children('.icon-btn-search').hide();
16038            $button.children('.icon-btn-close').show();
16039            $container.slideDown(function () {
16040                $container.find('input').focus();
16041                $body.trigger('element.opened');
16042            });
16043        },
16044        _clickFunction = function () {
16045            if ($button.hasClass('open')) {
16046                _closeFunction();
16047                return false;
16048            }
16049
16050            if ($body.data('open')) {
16051                $body.one('element.closed', _openFunction);
16052                $body.trigger('element.open');
16053                return false;
16054            }
16055
16056            _openFunction();
16057            return false;
16058        };
16059
16060    if ($button.length && $container.length) {
16061        $body.on('element.open', _closeFunction);
16062        $button.click(_clickFunction);
16063    }
16064});
16065
16066$(function () {
16067    var $toolbarHeader = $('.toolbar-header');
16068
16069    if ($toolbarHeader.length) {
16070        var $body = $('body'),
16071            toolbarSearchOuterHeight = 0,
16072            setToolbarSearchOuterHeight = function () {
16073                toolbarSearchOuterHeight = $toolbarHeader.outerHeight();
16074                $('.snap-drawers').css('top', toolbarSearchOuterHeight);
16075            },
16076            isMobile = function () {
16077                if (dfsnapMenuDeviceBreakpoint === 'xs') {
16078                    return window.matchMedia("(max-width: 767px)").matches;
16079                }
16080                if (dfsnapMenuDeviceBreakpoint === 'sm') {
16081                    return window.matchMedia("(max-width: 991px)").matches;
16082                }
16083                if (dfsnapMenuDeviceBreakpoint === 'md') {
16084                    return window.matchMedia("(max-width: 1199px)").matches;
16085                }
16086                if (dfsnapMenuDeviceBreakpoint === 'lg') {
16087                    return true;
16088                }
16089            };
16090
16091
16092        setToolbarSearchOuterHeight();
16093
16094        $(window).scroll(function () {
16095            if (!isMobile()) {
16096                var toolbarHeaderHasOffset = $toolbarHeader.offset().top > 0;
16097                if ($(window).scrollTop() > 10 && toolbarHeaderHasOffset && !$toolbarHeader.hasClass('sticky')) {
16098                    $toolbarHeader.addClass('sticky');
16099                    $('.snap-content').css({
16100                        paddingTop: 0
16101                    });
16102                } else if (!toolbarHeaderHasOffset && $toolbarHeader.hasClass('sticky')) {
16103                    $toolbarHeader.removeClass('sticky');
16104                    $body.trigger('element.open');
16105                    $('.snap-content').css({
16106                        paddingTop: 0
16107                    });
16108                }
16109            }
16110        });
16111
16112        if (isMobile()) {
16113            $toolbarHeader.addClass('sticky');
16114            $('.snap-content').css({
16115                paddingTop: toolbarSearchOuterHeight
16116            });
16117        }
16118
16119        $(window).resize(function () {
16120            var toolbarHeaderHasOffset = $toolbarHeader.offset().top > 0;
16121            if (isMobile()) {
16122                $toolbarHeader.addClass('sticky');
16123                $('.snap-content').css({
16124                    paddingTop: toolbarSearchOuterHeight
16125                });
16126            } else if (!isMobile() && !toolbarHeaderHasOffset && $toolbarHeader.hasClass('sticky')) {
16127                $toolbarHeader.removeClass('sticky');
16128                $body.trigger('element.open');
16129                $('.snap-content').css({
16130                    paddingTop: 0
16131                });
16132            }
16133        });
16134        // Offset des Snapdrawers beim Öffnen setzen, da Toolbar-Header evtl. bei Initialisierung keine Höhe hat.
16135        // Z.b. Bei Splashscreens
16136        if (enableSnapper) {
16137            snapper.on('open', setToolbarSearchOuterHeight);
16138        }
16139    }
16140});
16141
16142$(function() {
16143    var bodyFontSize = parseInt(Cookies.get('bodyFontSize')),
16144        $body = $('body'),
16145        $fontsize = $('#fontsize'),
16146        defaultFontsize = parseInt($body.css('font-size'));
16147
16148    if (bodyFontSize) {
16149        $body.css('font-size', bodyFontSize);
16150    } else {
16151        bodyFontSize = defaultFontsize;
16152    }
16153    $fontsize.children(':first').click(function() {
16154        bodyFontSize -= 2;
16155        $body.css('font-size', bodyFontSize);
16156        Cookies.set('bodyFontSize', bodyFontSize);
16157        return false;
16158    });
16159    $fontsize.children(':eq(1)').click(function() {
16160        bodyFontSize = defaultFontsize;
16161        $body.css('font-size', bodyFontSize);
16162        Cookies.remove('bodyFontSize');
16163        return false;
16164    });
16165    $fontsize.children(':last').click(function() {
16166        bodyFontSize += 2;
16167        $body.css('font-size', bodyFontSize);
16168        Cookies.set('bodyFontSize', bodyFontSize);
16169        return false;
16170    });
16171});
16172
16173$(function () {
16174    var $ajaxActionButtonsContainer = $('.ajax-action-buttons');
16175    $ajaxActionButtonsContainer.each(function () {
16176        var $ajaxActionButtonContainer = $(this);
16177        $.post($ajaxActionButtonContainer.data('url'), '', function (result) {
16178            $ajaxActionButtonContainer.append(result)
16179        })
16180    });
16181});
16182
16183$(function(){
16184    var $quickaccess = $('.quickaccess-item');
16185    $quickaccess.click(function (e) {
16186        if (!$('body').hasClass('device-desktop') && e.target == this) {
16187            if($(this).parent().hasClass('open')) {
16188                $(this).parent().removeClass('open')
16189            } else {
16190                $(this).parent().addClass('open')
16191            }
16192        }
16193    });
16194});
16195
16196$(function () {
16197    var $recipientField = $('.ezcca-appointment_recipient');
16198    var $showFormField = $('.ezcca-edit-show_form');
16199
16200    $recipientField.on('keyup', function () {
16201        if (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test($recipientField.val())) {
16202            $showFormField.show()
16203        } else {
16204            $showFormField.hide();
16205            $showFormField.find('input[type=checkbox]').prop('checked', false);
16206        }
16207    });
16208    $recipientField.trigger('keyup');
16209});
16210
16211$(function () {
16212    var $showFormButton = $('.appointment-show-form');
16213    var $form = $('.form-appointment_signup_form');
16214
16215    $showFormButton.on('click', function () {
16216        if ($form.is(":hidden")) {
16217            $form.show();
16218            $showFormButton.text('Anmeldeformular ausblenden')
16219        } else {
16220            $form.hide()
16221            $showFormButton.text('Anmeldeformular anzeigen')
16222        }
16223    });
16224});
16225
16226$(document).ready(function () {
16227    var $sideMenu = $('.bistum-menu');
16228    $sideMenu.children('.active').addClass('open').children('ul').show();
16229
16230    $sideMenu.on('click', '.icon-menu-open', function() {
16231        var $dropDownParent = $(this).parent().parent();
16232
16233        if ($dropDownParent.hasClass('open')) {
16234            $dropDownParent.removeClass('open').children('ul').slideUp();
16235        } else {
16236            $dropDownParent.siblings('.open').removeClass('open').children('ul').slideUp();
16237            $dropDownParent.addClass('open').children('ul').slideDown();
16238        }
16239
16240        return false;
16241    });
16242});
16243
16244/*! Image Map Resizer (imageMapResizer.min.js ) - v1.0.7 - 2018-05-01
16245 *  Desc: Resize HTML imageMap to scaled image.
16246 *  Copyright: (c) 2018 David J. Bradshaw - [email protected]
16247 *  License: MIT
16248 */
16249
16250!function(){"use strict";function a(){function a(){function a(a,d){function e(a){var d=1===(f=1-f)?"width":"height";return c[d]+Math.floor(Number(a)*b[d])}var f=0;j[d].coords=a.split(",").map(e).join(",")}var b={width:l.width/l.naturalWidth,height:l.height/l.naturalHeight},c={width:parseInt(window.getComputedStyle(l,null).getPropertyValue("padding-left"),10),height:parseInt(window.getComputedStyle(l,null).getPropertyValue("padding-top"),10)};k.forEach(a)}function b(a){return a.coords.replace(/ *, */g,",").replace(/ +/g,",")}function c(){clearTimeout(m),m=setTimeout(a,250)}function d(){l.width===l.naturalWidth&&l.height===l.naturalHeight||a()}function e(){l.addEventListener("load",a,!1),window.addEventListener("focus",a,!1),window.addEventListener("resize",c,!1),window.addEventListener("readystatechange",a,!1),document.addEventListener("fullscreenchange",a,!1)}function f(){return"function"==typeof i._resize}
16250function g(a){return document.querySelector('img[usemap="'+a+'"]')}function h(){j=i.getElementsByTagName("area"),k=Array.prototype.map.call(j,b),l=g("#"+i.name)||g(i.name),i._resize=a}var i=this,j=null,k=null,l=null,m=null;f()?i._resize():(h(),e(),d())}function b(){function b(a){if(!a.tagName)throw new TypeError("Object is not a valid DOM element");if("MAP"!==a.tagName.toUpperCase())throw new TypeError("Expected <MAP> tag, found <"+a.tagName+">.")}function c(c){c&&(b(c),a.call(c),d.push(c))}var d;return function(a){switch(d=[],typeof a){case"undefined":case"string":Array.prototype.forEach.call(document.querySelectorAll(a||"map"),c);break;case"object":c(a);break;default:throw new TypeError("Unexpected data type ("+typeof a+").")}return d}}"function"==typeof define&&define.amd?define([],b):"object"==typeof module&&"object"==typeof module.exports?module.exports=b():window.imageMapResize=b(),"jQuery"in window&&(jQuery.fn.imageMapResize=function(){return this.filter("map").each(a).end()})}();
16251
16252$(function () {
16253    var $body = $('body'),
16254        $button = $('.snap-open-quickaccess'),
16255        $container = $('.snap-drawer-quickaccess'),
16256        snapper,
16257        sideMenuAlignment = 'left',
16258        _closeFunction = function () {
16259            if ($button.hasClass('open')) {
16260                $button.removeClass('open');
16261                $button.children('.icon-bist-quickaccess').show();
16262                $button.children('.icon-btn-close').hide();
16263                snapper.close();
16264                window.setTimeout(function () {
16265                    $body.trigger('element.closed');
16266                }, 600);
16267            }
16268        },
16269        _openFunction = function () {
16270            $button.addClass('open');
16271            $button.children('.icon-bist-quickaccess').hide();
16272            $button.children('.icon-btn-close').show();
16273            snapper.open(sideMenuAlignment);
16274            window.setTimeout(function () {
16275                $body.trigger('element.opened');
16276            }, 600);
16277        },
16278        _clickFunction = function () {
16279            if ($button.hasClass('open')) {
16280                _closeFunction();
16281                return false;
16282            }
16283
16284            if ($body.data('open')) {
16285                $body.one('element.closed', _openFunction);
16286                $body.trigger('element.open');
16287                return false;
16288            }
16289
16290            _openFunction();
16291            return false;
16292        };
16293
16294    if (enableSnapper && $button.length && $container.length) {
16295        $container.appendTo('.snap-drawers');
16296        snapper = initSnapper($button, $container);
16297        snapper.on('close', function () {
16298            $body.trigger('element.open');
16299        });
16300        $body.on('element.open', _closeFunction);
16301        if ($button.hasClass('snap-open-right')) {
16302            sideMenuAlignment = 'right';
16303        }
16304        $button.click(_clickFunction);
16305    }
16306});
16307
16308!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.videojs=e()}(this,function(){function t(t,e){return e={exports:{}},t(e,e.exports),e.exports}function e(t,e){Ve(t).forEach(function(n){return e(t[n],n)})}function n(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return Ve(t).reduce(function(n,r){return e(n,t[r],r)},n)}function r(t){for(var n=arguments.length,r=Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return Object.assign?Object.assign.apply(Object,[t].concat(r)):(r.forEach(function(n){n&&e(n,function(e,n){t[n]=e})}),t)}function i(t){return!!t&&"object"===(void 0===t?"undefined":Ie(t))}function o(t){return i(t)&&"[object Object]"===Fe.call(t)&&t.constructor===Object}function s(t){return t.replace(/\n\r?\s*/g,"")}function a(t,e){if(!t||!e)return"";if("function"==typeof oe.getComputedStyle){var n=oe.getComputedStyle(t);return n?n[e]:""}return t.currentStyle[e]||""}function l(t){return"string"==typeof t&&/\S/.test(t)}function c(t){if(/\s/.test(t))throw new Error("class has illegal whitespace characters")}function u(t){return new RegExp("(^|\\s)"+t+"($|\\s)")}function h(){return ue===oe.document&&void 0!==ue.createElement}function p(t){return i(t)&&1===t.nodeType}function d(){try{return oe.parent!==oe.self}catch(t){return!0}}function f(t){return function(e,n){if(!l(e))return ue[t](null);l(n)&&(n=ue.querySelector(n));var r=p(n)?n:ue;return r[t]&&r[t](e)}}function v(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"div",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments[3],i=ue.createElement(t);return Object.getOwnPropertyNames(e).forEach(function(t){var n=e[t];-1!==t.indexOf("aria-")||"role"===t||"type"===t?(Xe.warn(qe(Ke,t,n)),i.setAttribute(t,n)):"textContent"===t?y(i,n):i[t]=n}
vendor: 1,043 bytes, line 16308
16308),Object.getOwnPropertyNames(n).forEach(function(t){i.setAttribute(t,n[t])}),r&&D(i,r),i}function y(t,e){return void 0===t.textContent?t.innerText=e:t.textContent=e,t}function g(t,e){e.firstChild?e.insertBefore(t,e.firstChild):e.appendChild(t)}function m(t,e){return c(e),t.classList?t.classList.contains(e):u(e).test(t.className)}function _(t,e){return t.classList?t.classList.add(e):m(t,e)||(t.className=(t.className+" "+e).trim()),t}function b(t,e){return t.classList?t.classList.remove(e):(c(e),t.className=t.className.split(/\s+/).filter(function(t){return t!==e}).join(" ")),t}function T(t,e,n){var r=m(t,e);if("function"==typeof n&&(n=n(t,e)),"boolean"!=typeof n&&(n=!r),n!==r)return n?_(t,e):b(t,e),t}function C(t,e){Object.getOwnPropertyNames(e).forEach(function(n){var r=e[n];null===r||void 0===r||!1===r?t.removeAttribute(n):t.setAttribute(n,!0===r?"":r)})}function k(t){var e={};if(t&&t.attributes&&t.attributes.length>0)for(var n=t.attributes,r=n.length-1;r>=0;r--){var i=n[r].name,o=n[r].value;"boolean"!=typeof t[i]&&-1===",auto
16308play,controls,playsinline,loop,muted,default,defaultMuted,".indexOf(","+i+",")||(o=null!==o),e[i]=o}return e}function w(t,e){return t.getAttribute(e)}function E(t,e,n){t.setAttribute(e,n)}function S(t,e){t.removeAttribute(e)}function x(){ue.body.focus(),ue.onselectstart=function(){return!1}}function j(){ue.onselectstart=function(){return!0}}function A(t){if(t&&t.getBoundingClientRect&&t.parentNode){var e=t.getBoundingClientRect(),n={};return["bottom","height","left","right","top","width"].forEach(function(t){void 0!==e[t]&&(n[t]=e[t])}),n.height||(n.height=parseFloat(a(t,"height"))),n.width||(n.width=parseFloat(a(t,"width"))),n}}function P(t){var e=void 0;if(t.getBoundingClientRect&&t.parentNode&&(e=t.getBoundingClientRect()),!e)return{left:0,top:0};var n=ue.documentElement,r=ue.body,i=n.clientLeft||r.clientLeft||0,o=oe.pageXOffset||r.scrollLeft,s=e.left+o-i,a=n.clientTop||r.clientTop||0,l=oe.pageYOffset||r.scrollTop,c=e.top+l-a;return{left:Math.round(s),top:Math.round(c)}}function M(t,e){var n={},r=P(t),i=t.offsetWidth,o=t.offsetHeight,s=r.top,a=r.left,l=e.pageY,c=e.pageX;return e.changedTouches&&(c=e.changedTouches[0].pageX,l=e.changedTouches[0].pageY),n.y=Math.max(0,Math.min(1,(s-l+o)/o)),n.x=Math.max(0,Math.min(1,(c-a)/i)),n}function O(t){return i(t)&&3===t.nodeType}function N(t){for(;t.firstChild;)t.removeChild(t.firstChild);return t}function I(t){return"function"==typeof t&&(t=t()),(Array.isArray(t)?t:[t]).map(function(t){return"function"==typeof t&&(t=t()),p(t)||O(t)?t:"string"==typeof t&&/\S/.test(t)?ue.createTextNode(t):void 0}).filter(function(t){return t})}function D(t,e){return I(e).forEach(function(e){return t.appendChild(e)}),t}function L(t,e){return D(N(t),e)}function R(){return Je++}function B(t){var e=t[Ze];return e||(e=t[Ze]=R()),Qe[e]||(Qe[e]={}),Qe[e]}function F(t){var e=t[Ze];return!!e&&!!Object.getOwnPropertyNames(Qe[e]).length}function V(t){var e=t[Ze];if(e){delete Qe[e];try{delete t[Ze]}catch(e){t.removeAttribute?t.removeAttribute(Ze):t[Ze]=null}}}function H(t,e){var n=B(t);0===n.handlers[e].length&&(delete n.handlers[e],t.removeEventListener?t.removeEventListener(e,n.dispatcher,!1):t.detachEvent&&t.detachEvent("on"+e,n.dispatcher)),Object.getOwnPropertyNames(n.handlers).length<=0&&(delete n.handlers,delete n.dispatcher,delete n.disabled),0===Object.getOwnPropertyNames(n).length&&V(t)}function U(t,e,n,r){n.forEach(function(n){t(e,n,r)})}function W(t){function e(){return!0}function n(){return!1}if(!t||!t.isPropagationStopped){var r=t||oe.event;t={};for(var i in r)"layerX"!==i&&"layerY"!==i&&"keyLocation"!==i&&"webkitMovementX"!==i&&"webkitMovementY"!==i&&("returnValue"===i&&r.preventDefault||(t[i]=r[i]));if(t.target||(t.target=t.srcElement||ue),t.relatedTarget||(t.relatedTarget=t.fromElement===t.target?t.toElement:t.fromElement),t.preventDefault=function(){r.preventDefault&&r.preventDefault(),t.returnValue=!1,r.returnValue=!1,t.defaultPrevented=!0},t.defaultPrevented=!1,t.stopPropagation=function(){r.stopPropagation&&r.stopPropagation(),t.cancelBubble=!0,r.cancelBubble=!0,t.isPropagationStopped=e},t.isPropagationStopped=n,t.stopImmediatePropagation=function(){r.stopImmediatePropagation&&r.stopImmediatePropagation(),t.isImmediatePropagationStopped=e,t.stopPropagation()},t.isImmediatePropagationStopped=n,null!==t.clientX&&void 0!==t.clientX){var o=ue.documentElement,s=ue.body;t.pageX=t.clientX+(o&&o.scrollLeft||s&&s.scrollLeft||0)-(o&&o.clientLeft||s&&s.clientLeft||0),t.pageY=t.clientY+(o&&o.scrollTop||s&&s.scrollTop||0)-(o&&o.clientTop||s&&s.clientTop||0)}t.which=t.charCode||t.keyCode,null!==t.button&&void 0!==t.button&&(t.button=1&t.button?0:4&t.button?1:2&t.button?2:0)}return t}function z(t,e,n){if(Array.isArray(e))return U(z,t,e,n);var r=B(t);if(r.handlers||(r.handlers={}),r.handlers[e]||(r.handlers[e]=[]),n.guid||(n.guid=R()),r.handlers[e].push(n),r.dispatcher||(r.disabled=!1,r.dispatcher=function(e,n){if(!r.disabled){e=W(e);var i=r.handlers[e.type];if(i)for(var o=i.slice(0),s=0,a=o.length;s<a&&!e.isImmediatePropagationStopped();s++)try{o[s].call(t,e,n)}catch(t){Xe.error(t)}}}),1===r.handlers[e].length)if(t.addEventListener){var i=!1;tn&&en.indexOf(e)>-1&&(i={passive:!0}),t.addEventListener(e,r.dispatcher,i)}else t.attachEvent&&t.attachEvent("on"+e,r.dispatcher)}function X(t,e,n){if(F(t)){var r=B(t);if(r.handlers){if(Array.isArray(e))return U(X,t,e,n);var i=function(e){r.handlers[e]=[],H(t,e)};if(void 0!==e){var o=r.handlers[e];if(o){if(!n)return void i(e);if(n.guid)for(var s=0;s<o.length;s++)o[s].guid===n.guid&&o.splice(s--,1);H(t,e)}}else for(var a in r.handlers)Object.prototype.hasOwnProperty.call(r.handlers||{},a)&&i(a)}}}function q(t,e,n){var r=F(t)?B(t):{},i=t.parentNode||t.ownerDocument;if("string"==typeof e&&(e={type:e,target:t}),e=W(e),r.dispatcher&&r.dispatcher.call(t,e,n),i&&!e.isPropagationStopped()&&!0===e.bubbles)q.call(null,i,e,n);else if(!i&&!e.defaultPrevented){var o=B(e.target);e.target[e.type]&&(o.disabled=!0,"function"==typeof e.target[e.type]&&e.target[e.type](),o.disabled=!1)}return!e.defaultPrevented}function K(t,e,n){if(Array.isArray(e))return U(K,t,e,n);var r=function r(){X(t,e,r),n.apply(this,arguments)};r.guid=n.guid=n.guid||R(),z(t,e,r)}function Y(t,e){e&&(on=e),oe.setTimeout(sn,t)}function G(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.eventBusKey;if(n){if(!t[n].nodeName)throw new Error('The eventBusKey "'+n+'" does not refer to an element.');t.eventBusEl_=t[n]}else t.eventBusEl_=v("span",{className:"vjs-event-bus"});return r(t,_n),t.on("dispose",function(){return t.off()}),t}function $(t,e){return r(t,bn),t.state=r({},t.state,e),"function"==typeof t.handleStateChanged&&pn(t)&&t.on("statechanged",t.handleStateChanged),t}function J(t){return"string"!=typeof t?t:t.charAt(0).toUpperCase()+t.slice(1)}function Q(t,e){return J(t)===J(e)}function Z(){for(var t={},n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];return r.forEach(function(n){n&&e(n,function(e,n){if(!o(e))return void(t[n]=e);o(t[n])||(t[n]={}),t[n]=Z(t[n],e)})}),t}function tt(t,e,n){if("number"!=typeof e||e<0||e>n)throw new Error("Failed to execute '"+t+"' on 'TimeRanges': The index provided ("+e+") is non-numeric or out of bounds (0-"+n+").")}function et(t,e,n,r){return tt(t,r,n.length-1),n[r][e]}function nt(t){return void 0===t||0===t.length?{length:0,start:function(){throw new Error("This TimeRanges object is empty")},end:function(){throw new Error("This TimeRanges object is empty")}}:{length:t.length,start:et.bind(null,"start",0,t),end:et.bind(null,"end",1,t)}}function rt(t,e){return Array.isArray(t)?nt(t):void 0===t||void 0===e?nt():nt([[t,e]])}function it(t,e){var n=0,r=void 0,i=void 0;if(!e)return 0;t&&t.length||(t=rt(0,0));for(var o=0;o<t.length;o++)r=t.start(o),i=t.end(o),i>e&&(i=e),n+=i-r;return n/e}function ot(t){if(t instanceof ot)return t;"number"==typeof t?this.code=t:"string"==typeof t?this.message=t:i(t)&&("number"==typeof t.code&&(this.code=t.code),r(this,t)),this.message||(this.message=ot.defaultMessages[this.code]||"")}function st(t,e){var n,r=null;try{n=JSON.parse(t,e)}catch(t){r=t}return[r,n]}function at(t){var e=nr.call(t);return"[object Function]"===e||"function"==typeof t&&"[object RegExp]"!==e||"undefined"!=typeof window&&(t===window.setTimeout||t===window.alert||t===window.confirm||t===window.prompt)}function lt(t,e,n){if(!er(e))throw new TypeError("iterator must be a function");arguments.length<3&&(n=this),"[object Array]"===or.call(t)?ct(t,e,n):"string"==typeof t?ut(t,e,n):ht(t,e,n)}function ct(t,e,n){for(var r=0,i=t.length;r<i;r++)sr.call(t,r)&&e.call(n,t[r],r,t)}function ut(t,e,n){for(var r=0,i=t.length;r<i;r++)e.call(n,t.charAt(r),r,t)}function ht(t,e,n){for(var r in t)sr.call(t,r)&&e.call(n,t[r],r,t)}function pt(){for(var t={},e=0;e<arguments.length;e++){var n=arguments[e];for(var r in n)ur.call(n,r)&&(t[r]=n[r])}return t}function dt(t){for(var e in t)if(t.hasOwnProperty(e))return!1;return!0}function ft(t,e,n){var r=t;return er(e)?(n=e,"string"==typeof t&&(r={uri:t})):r=cr(e,{uri:t}),r.callback=n,r}function vt(t,e,n){return e=ft(t,e,n),yt(e)}function yt(t){function e(){4===a.readyState&&setTimeout(i,0)}function n(){var t=void 0;if(t=a.response?a.response:a.responseText||gt(a),y)try{t=JSON.parse(t)}catch(t){}return t}function r(t){return clearTimeout(u),t instanceof Error||(t=new Error(""+(t||"Unknown XMLHttpRequest Error"))),t.statusCode=0,s(t,g)}function i(){if(!c){var e;clearTimeout(u),e=t.useXDR&&void 0===a.status?200:1223===a.status?204:a.status;var r=g,i=null;return 0!==e?(r={body:n(),statusCode:e,method:p,headers:{},url:h,rawRequest:a},a.getAllResponseHeaders&&(r.headers=lr(a.getAllResponseHeaders()))):i=new Error("Internal XMLHttpRequest Error"),s(i,r,r.body)}}if(void 0===t.callback)throw new Error("callback argument missing");var o=!1,s=function(e,n,r){o||(o=!0,t.callback(e,n,r))},a=t.xhr||null;a||(a=t.cors||t.useXDR?new vt.XDomainRequest:new vt.XMLHttpRequest);var l,c,u,h=a.url=t.uri||t.url,p=a.method=t.method||"GET",d=t.body||t.data,f=a.headers=t.headers||{},v=!!t.sync,y=!1,g={body:void 0,headers:{},statusCode:0,method:p,url:h,rawRequest:a};
vendor: 4,578 bytes, line 16308
16308if("json"in t&&!1!==t.json&&(y=!0,f.accept||f.Accept||(f.Accept="application/json"),"GET"!==p&&"HEAD"!==p&&(f["content-type"]||f["Content-Type"]||(f["Content-Type"]="application/json"),d=JSON.stringify(!0===t.json?d:t.json))),a.onreadystatechange=e,a.onload=i,a.onerror=r,a.onprogress=function(){},a.onabort=function(){c=!0},a.ontimeout=r,a.open(p,h,!v,t.username,t.password),v||(a.withCredentials=!!t.withCredentials),!v&&t.timeout>0&&(u=setTimeout(function(){if(!c){c=!0,a.abort("timeout");var t=new Error("XMLHttpRequest timeout");t.code="ETIMEDOUT",r(t)}},t.timeout)),a.setRequestHeader)for(l in f)f.hasOwnProperty(l)&&a.setRequestHeader(l,f[l]);else if(t.headers&&!dt(t.headers))throw new Error("Headers cannot be set on an XDomainRequest object");return"responseType"in t&&(a.responseType=t.responseType),"beforeSend"in t&&"function"==typeof t.beforeSend&&t.beforeSend(a),a.send(d||null),a}function gt(t){if("document"===t.responseType)return t.responseXML;var e=t.responseXML&&"parsererror"===t.responseXML.documentElement.nodeName;return""!==t.responseType||e?null:t.responseXML}function mt(){}function _t(t,e){this.name="ParsingError",this.code=t.code,this.message=e||t.message}function bt(t){function e(t,e,n,r){return 3600*(0|t)+60*(0|e)+(0|n)+(0|r)/1e3}var n=t.match(/^(\d+):(\d{2})(:\d{2})?\.(\d{3})/);return n?n[3]?e(n[1],n[2],n[3].replace(":",""),n[4]):n[1]>59?e(n[1],n[2],0,n[4]):e(0,n[1],n[2],n[4]):null}function Tt(){this.values=kr(null)}function Ct(t,e,n,r){var i=r?t.split(r):[t];for(var o in i)if("string"==typeof i[o]){var s=i[o].split(n);if(2===s.length){var a=s[0],l=s[1];e(a,l)}}}function kt(t,e,n){function r(){var e=bt(t);if(null===e)throw new _t(_t.Errors.BadTimeStamp,"Malformed timestamp: "+o);return t=t.replace(/^[^\sa-zA-Z-]+/,""),e}function i(){t=t.replace(/^\s+/,"")}var o=t;if(i(),e.startTime=r(),i(),"--\x3e"!==t.substr(0,3))throw new _t(_t.Errors.BadTimeStamp,"Malformed time stamp (time stamps must be separated by '--\x3e'): "+o);t=t.substr(3),i(),e.endTime=r(),i(),function(t,e){var r=new Tt;Ct(t,function(t,e){switch(t){case"region":for(var i=n.length-1;i>=0;i--)if(n[i].id===e){r.set(t,n[i].region);break}break;case"vertical":r.alt(t,e,["rl","lr"]);break;case"line":var o=e.split(","),s=o[0];r.integer(t,s),r.percent(t,s)&&r.set("snapToLines",!1),r.alt(t,s,["auto"]),2===o.length&&r.alt("lineAlign",o[1],["start","middle","end"]);break;case"position":o=e.split(","),r.percent(t,o[0]),2===o.length&&r.alt("positionAlign",o[1],["start","middle","end"]);break;case"size":r.percent(t,e);break;case"align":r.alt(t,e,["start","middle","end","left","right"])}},/:/,/\s/),e.region=r.get("region",null),e.vertical=r.get("vertical",""),e.line=r.get("line","auto"),e.lineAlign=r.get("lineAlign","start"),e.snapToLines=r.get("snapToLines",!0),e.size=r.get("size",100),e.align=r.get("align","middle"),e.position=r.get("position",{start:0,left:0,middle:50,end:100,right:100},e.align),e.positionAlign=r.get("positionAlign",{start:"start",left:"start",middle:"middle",end:"end",right:"end"},e.align)}(t,e)}function wt(t,e){function n(t){return wr[t]}for(var r,i=t.document.createElement("div"),o=i,s=[];null!==(r=function(){if(!e)return null;var t=e.match(/^([^<]*)(<[^>]+>?)?/);return function(t){return e=e.substr(t.length),t}(t[1]?t[1]:t[2])}());)if("<"!==r[0])o.appendChild(t.document.createTextNode(function(t){for(;c=t.match(/&(amp|lt|gt|lrm|rlm|nbsp);/);)t=t.replace(c[0],n);return t}(r)));else{if("/"===r[1]){s.length&&s[s.length-1]===r.substr(2).replace(">","")&&(s.pop(),o=o.parentNode);continue}var a,l=bt(r.substr(1,r.length-2));if(l){a=t.document.createProcessingInstruction("timestamp",l),o.appendChild(a);continue}var c=r.match(/^<([^.\s\/0-9>]+)(\.[^\s\\>]+)?([^>\\]+)?(\\?)>?$/);if(!c)continue;if(!(a=function(e,n){var r=Er[e];if(!r)return null;var i=t.document.createElement(r);i.localName=r;var o=Sr[e];return o&&n&&(i[o]=n.trim()),i}(c[1],c[3])))continue;if(!function(t,e){return!xr[e.localName]||xr[e.localName]===t.localName}(o,a))continue;c[2]&&(a.className=c[2].substr(1).replace("."," ")),s.push(c[1]),o.appendChild(a),o=a}return i}function Et(t){for(var e=0;e<jr.length;e++){var n=jr[e];if(t>=n[0]&&t<=n[1])return!0}return!1}function St(t){function e(t,e){for(var n=e.childNodes.length-1;n>=0;n--)t.push(e.childNodes[n])}function n(t){if(!t||!t.length)return null;var r=t.pop(),i=r.textContent||r.innerText;if(i){var o=i.match(/^.*(\n|\r)/);return o?(t.length=0,o[0]):i}return"ruby"===r.tagName?n(t):r.childNodes?(e(t,r),n(t)):void 0}var r,i=[],o="";if(!t||!t.childNodes)return"ltr";for(e(i,t);o=n(i);)for(var s=0;s<o.length;
vendor: 3,953 bytes, line 16308
16308s++)if(r=o.charCodeAt(s),Et(r))return"rtl";return"ltr"}function xt(t){if("number"==typeof t.line&&(t.snapToLines||t.line>=0&&t.line<=100))return t.line;if(!t.track||!t.track.textTrackList||!t.track.textTrackList.mediaElement)return-1;for(var e=t.track,n=e.textTrackList,r=0,i=0;i<n.length&&n[i]!==e;i++)"showing"===n[i].mode&&r++;return-1*++r}function jt(){}function At(t,e,n){var r=/MSIE\s8\.0/.test(navigator.userAgent),i="rgba(255, 255, 255, 1)",o="rgba(0, 0, 0, 0.8)";r&&(i="rgb(255, 255, 255)",o="rgb(0, 0, 0)"),jt.call(this),this.cue=e,this.cueDiv=wt(t,e.text);var s={color:i,backgroundColor:o,position:"relative",left:0,right:0,top:0,bottom:0,display:"inline"};r||(s.writingMode=""===e.vertical?"horizontal-tb":"lr"===e.vertical?"vertical-lr":"vertical-rl",s.unicodeBidi="plaintext"),this.applyStyles(s,this.cueDiv),this.div=t.document.createElement("div"),s={textAlign:"middle"===e.align?"center":e.align,font:n.font,whiteSpace:"pre-line",position:"absolute"},r||(s.direction=St(this.cueDiv),s.writingMode=""===e.vertical?"horizontal-tb":"lr"===e.vertical?"vertical-lr":"vertical-rl".stylesunicodeBidi="plaintext"),this.applyStyles(s),this.div.appendChild(this.cueDiv);var a=0;switch(e.positionAlign){case"start":a=e.position;break;case"middle":a=e.position-e.size/2;break;case"end":a=e.position-e.size}""===e.vertical?this.applyStyles({left:this.formatStyle(a,"%"),width:this.formatStyle(e.size,"%")}):this.applyStyles({top:this.formatStyle(a,"%"),height:this.formatStyle(e.size,"%")}),this.move=function(t){this.applyStyles({top:this.formatStyle(t.top,"px"),bottom:this.formatStyle(t.bottom,"px"),left:this.formatStyle(t.left,"px"),right:this.formatStyle(t.right,"px"),height:this.formatStyle(t.height,"px"),width:this.formatStyle(t.width,"px")})}}function Pt(t){var e,n,r,i,o=/MSIE\s8\.0/.test(navigator.userAgent);if(t.div){n=t.div.offsetHeight,r=t.div.offsetWidth,i=t.div.offsetTop;var s=(s=t.div.childNodes)&&(s=s[0])&&s.getClientRects&&s.getClientRects();t=t.div.getBoundingClientRect(),e=s?Math.max(s[0]&&s[0].height||0,t.height/s.length):0}this.left=t.left,this.right=t.right,this.top=t.top||i,this.height=t.height||n,this.bottom=t.bottom||i+(t.height||n),this.width=t.width||r,this.lineHeight=void 0!==e?e:t.lineHeight,o&&!this.lineHeight&&(this.lineHeight=13)}function Mt(t,e,n,r){var i=new Pt(e),o=e.cue,s=xt(o),a=[];if(o.snapToLines){var l;switch(o.vertical){case"":a=["+y","-y"],l="height";break;case"rl":a=["+x","-x"],l="width";break;case"lr":a=["-x","+x"],l="width"}var c=i.lineHeight,u=c*Math.round(s),h=n[l]+c,p=a[0];Math.abs(u)>h&&(u=u<0?-1:1,u*=Math.ceil(h/c)*c),s<0&&(u+=""===o.vertical?n.height:n.width,a=a.reverse()),i.move(p,u)}else{var d=i.lineHeight/n.height*100;switch(o.lineAlign){case"middle":s-=d/2;break;case"end":s-=d}switch(o.vertical){case"":e.applyStyles({top:e.formatStyle(s,"%")});break;case"rl":e.applyStyles({left:e.formatStyle(s,"%")});break;case"lr":e.applyStyles({right:e.formatStyle(s,"%")})}a=["+y","-x","+x","-y"],i=new Pt(e)}var f=function(t,e){for(var i,o=new Pt(t),s=1,a=0;a<e.length;a++){for(;t.overlapsOppositeAxis(n,e[a])||t.within(n)&&t.overlapsAny(r);)t.move(e[a]);if(t.within(n))return t;var l=t.intersectPercentage(n);s>l&&(i=new Pt(t),s=l),t=new Pt(o)}return i||o}(i,a);e.move(f.toCSSCompatValues(n))}function Ot(){}function Nt(t){return"string"==typeof t&&(!!Mr[t.toLowerCase()]&&t.toLowerCase())}function It(t){return"string"==typeof t&&(!!Or[t.toLowerCase()]&&t.toLowerCase())}function Dt(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)t[r]=n[r]}return t}function Lt(t,e,n){var r=this,i=/MSIE\s8\.0/.test(navigator.userAgent),o={};i?r=document.createElement("custom"):o.enumerable=!0,r.hasBeenReset=!1;var s="",a=!1,l=t,c=e,u=n,h=null,p="",d=!0,f="auto",v="start",y=50,g="middle",m=50,_="middle";if(Object.defineProperty(r,"id",Dt({},o,{get:function(){return s},set:function(t){s=""+t}})),Object.defineProperty(r,"pauseOnExit",Dt({},o,{get:function(){return a}
16308,set:function(t){a=!!t}})),Object.defineProperty(r,"startTime",Dt({},o,{get:function(){return l},set:function(t){if("number"!=typeof t)throw new TypeError("Start time must be set to a number.");l=t,this.hasBeenReset=!0}})),Object.defineProperty(r,"endTime",Dt({},o,{get:function(){return c},set:function(t){if("number"!=typeof t)throw new TypeError("End time must be set to a number.");c=t,this.hasBeenReset=!0}})),Object.defineProperty(r,"text",Dt({},o,{get:function(){return u},set:function(t){u=""+t,this.hasBeenReset=!0}})),Object.defineProperty(r,"region",Dt({},o,{get:function(){return h},set:function(t){h=t,this.hasBeenReset=!0}})),Object.defineProperty(r,"vertical",Dt({},o,{get:function(){return p},set:function(t){var e=Nt(t);if(!1===e)throw new SyntaxError("An invalid or illegal string was specified.");p=e,this.hasBeenReset=!0}})),Object.defineProperty(r,"snapToLines",Dt({},o,{get:function(){return d},set:function(t){d=!!t,this.hasBeenReset=!0}})),Object.defineProperty(r,"line",Dt({},o,{get:function(){return f},set:function(t){if("number"!=typeof t&&t!==Pr)throw new SyntaxError("An invalid number or illegal string was specified.");f=t,this.hasBeenReset=!0}})),Object.defineProperty(r,"lineAlign",Dt({},o,{get:function(){return v},set:function(t){var e=It(t);if(!e)throw new SyntaxError("An invalid or illegal string was specified.");v=e,this.hasBeenReset=!0}})),Object.defineProperty(r,"position",Dt({},o,{get:function(){return y},set:function(t){if(t<0||t>100)throw new Error("Position must be between 0 and 100.");y=t,this.hasBeenReset=!0}})),Object.defineProperty(r,"positionAlign",Dt({},o,{get:function(){return g},set:function(t){var e=It(t);if(!e)throw new SyntaxError("An invalid or illegal string was specified.");g=e,this.hasBeenReset=!0}})),Object.defineProperty(r,"size",Dt({},o,{get:function(){return m},set:function(t){if(t<0||t>100)throw new Error("Size must be between 0 and 100.");m=t,this.hasBeenReset=!0}})),Object.defineProperty(r,"align",Dt({},o,{get:function(){return _},set:function(t){var e=It(t);if(!e)throw new SyntaxError("An invalid or illegal string was specified.");_=e,this.hasBeenReset=!0}})),r.displayState=void 0,i)return r}function Rt(t){return"string"==typeof t&&(!!Ir[t.toLowerCase()]&&t.toLowerCase())}function Bt(t){return"number"==typeof t&&t>=0&&t<=100}function Ft(){var t=100,e=3,n=0,r=100,i=0,o=100,s="";Object.defineProperties(this,{width:{enumerable:!0,get:function(){return t},set:function(e){if(!Bt(e))throw new Error("Width must be between 0 and 100.");t=e}},lines:{enumerable:!0,get:function(){return e},set:function(t){if("number"!=typeof t)throw new TypeError("Lines must be set to a number.");e=t}},regionAnchorY:{enumerable:!0,get:function(){return r},set:function(t){if(!Bt(t))throw new Error("RegionAnchorX must be between 0 and 100.");r=t}},regionAnchorX:{enumerable:!0,get:function(){return n},set:function(t){if(!Bt(t))throw new Error("RegionAnchorY must be between 0 and 100.");n=t}},viewportAnchorY:{enumerable:!0,get:function(){return o},set:function(t){if(!Bt(t))throw new Error("ViewportAnchorY must be between 0 and 100.");o=t}},viewportAnchorX:{enumerable:!0,get:function(){return i},set:function(t){if(!Bt(t))throw new Error("ViewportAnchorX must be between 0 and 100.");i=t}},scroll:{enumerable:!0,get:function(){return s},set:function(t){var e=Rt(t);if(!1===e)throw new SyntaxError("An invalid or illegal string was specified.");s=e}}})}function Vt(t,e,n,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},o=t.textTracks();i.kind=e,n&&(i.label=n),r&&(i.language=r),i.tech=t;var s=new Cr.text.TrackClass(i);return o.addTrack(s),s}function Ht(t,e){Br[t]=Br[t]||[],Br[t].push(e)}function Ut(t,e,n){t.setTimeout(function(){return Kt(e,Br[e.type],n,t)},1)}function Wt(t,e){t.forEach(function(t){return t.setTech&&t.setTech(e)})}function zt(t,e,n){return t.reduceRight(qt(n),e[n]())}function Xt(t,e,n,r){return e[n](t.reduce(qt(n),r))}function qt(t){return function(e,n){return n[t]?n[t](e):e}}function Kt(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments[2],i=arguments[3],o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[],s=arguments.length>5&&void 0!==arguments[5]&&arguments[5],a=e[0],l=e.slice(1);if("string"==typeof a)Kt(t,Br[a],n,i,o,s);else if(a){var c=a(i);c.setSource(r({},t),function(e,r){if(e)return Kt(t,l,n,i,o,s);o.push(c),Kt(r,t.type===r.type?l:Br[r.type],n,i,o,s)})}else l.length?Kt(t,l,n,i,o,s):s?n(t,o):Kt(t,Br["*"],n,i,o,!0)}function Yt(t,e){return"rgba("+parseInt(t[1]+t[1],16)+","+parseInt(t[2]+t[2],16)+","+parseInt(t[3]+t[3],16)+","+e+")"}function Gt(t,e,n){try{t.style[e]=n}catch(t){return}}function $t(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t;t=t<0?0:t;
16308var n=Math.floor(t%60),r=Math.floor(t/60%60),i=Math.floor(t/3600),o=Math.floor(e/60%60),s=Math.floor(e/3600);return(isNaN(t)||t===1/0)&&(i=r=n="-"),i=i>0||s>0?i+":":"",r=((i||o>=10)&&r<10?"0"+r:r)+":",n=n<10?"0"+n:n,i+r+n}function Jt(t,e){if(e&&(t=e(t)),t&&"none"!==t)return t}function Qt(t,e){return Jt(t.options[t.options.selectedIndex].value,e)}function Zt(t,e,n){if(e)for(var r=0;r<t.options.length;r++)if(Jt(t.options[r].value,n)===e){t.selectedIndex=r;break}}function te(t,e,n){var r=void 0;if("string"==typeof t){var o=te.getPlayers();if(0===t.indexOf("#")&&(t=t.slice(1)),o[t])return e&&Xe.warn('Player "'+t+'" is already initialised. Options will not be applied.'),n&&o[t].ready(n),o[t];r=Ye("#"+t)}else r=t;if(!r||!r.nodeName)throw new TypeError("The element or ID supplied is not valid. (videojs)");if(p(r)&&!ue.body.contains(r)&&Xe.warn("The element supplied is not included in the DOM"),r.player||lo.players[r.playerId])return r.player||lo.players[r.playerId];e=e||{},te.hooks("beforesetup").forEach(function(t){var n=t(r,Z(e));if(!i(n)||Array.isArray(n))return void Xe.error("please return an object in beforesetup hooks");e=Z(e,n)});var s=Tn.getComponent("Player"),a=new s(r,e,n);return te.hooks("setup").forEach(function(t){return t(a)}),a}var ee,ne="6.4.0",re="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};ee="undefined"!=typeof window?window:void 0!==re?re:"undefined"!=typeof self?self:{};var ie,oe=ee,se={},ae=(Object.freeze||Object)({default:se}),le=ae&&se||ae,ce=void 0!==re?re:"undefined"!=typeof window?window:{};"undefined"!=typeof document?ie=document:(ie=ce["__GLOBAL_DOCUMENT_CACHE@4"])||(ie=ce["__GLOBAL_DOCUMENT_CACHE@4"]=le);var ue=ie,he=oe.navigator&&oe.navigator.userAgent||"",pe=/AppleWebKit\/([\d.]+)/i.exec(he),de=pe?parseFloat(pe.pop()):null,fe=/iPad/i.test(he),ve=/iPhone/i.test(he)&&!fe,ye=/iPod/i.test(he),ge=ve||fe||ye,me=function(){var t=he.match(/OS (\d+)_/i);return t&&t[1]?t[1]:null}(),_e=/Android/i.test(he),be=function(){var t=he.match(/Android (\d+)(?:\.(\d+))?(?:\.(\d+))*/i);if(!t)return null;var e=t[1]&&parseFloat(t[1]),n=t[2]&&parseFloat(t[2]);return e&&n?parseFloat(t[1]+"."+t[2]):e||null}(),Te=_e&&/webkit/i.test(he)&&be<2.3,Ce=_e&&be<5&&de<537,ke=/Firefox/i.test(he),we=/Edge/i.test(he),Ee=!we&&/Chrome/i.test(he),Se=function(){var t=he.match(/Chrome\/(\d+)/);return t&&t[1]?parseFloat(t[1]):null}(),xe=/MSIE\s8\.0/.test(he),je=function(){var t=/MSIE\s(\d+)\.\d/.exec(he),e=t&&parseFloat(t[1]);return!e&&/Trident\/7.0/i.test(he)&&/rv:11.0/.test(he)&&(e=11),e}(),Ae=/Safari/i.test(he)&&!Ee&&!_e&&!we,Pe=Ae||ge,Me=h()&&("ontouchstart"in oe||oe.DocumentTouch&&oe.document instanceof oe.DocumentTouch),Oe=h()&&"backgroundSize"in oe.document.createElement("video").style,Ne=(Object.freeze||Object)({IS_IPAD:fe,IS_IPHONE:ve,IS_IPOD:ye,IS_IOS:ge,IOS_VERSION:me,IS_ANDROID:_e,ANDROID_VERSION:be,IS_OLD_ANDROID:Te,IS_NATIVE_ANDROID:Ce,IS_FIREFOX:ke,IS_EDGE:we,IS_CHROME:Ee,CHROME_VERSION:Se,IS_IE8:xe,IE_VERSION:je,IS_SAFARI:Ae,IS_ANY_SAFARI:Pe,TOUCH_ENABLED:Me,BACKGROUND_SIZE_SUPPORTED:Oe}),Ie="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},De=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},Le=function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)},Re=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e},Be=function(t,e){return t.raw=e,t},Fe=Object.prototype.toString,Ve=function(t){return i(t)?Object.keys(t):[]},He=void 0,Ue="all",We=[],ze=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:!!je&&je<11,r=He.levels[Ue],o=new RegExp("^("+r+")$");"log"!==t&&e.unshift(t.toUpperCase()+":"),We&&We.push([].concat(e)),e.unshift("VIDEOJS:");var s=oe.console&&oe.console[t];s&&r&&o.test(t)&&(n&&(e=e.map(function(t){if(i(t)||Array.isArray(t))try{return JSON.stringify(t)}catch(e){return String(t)}return String(t)}).join(" ")),s.apply?s[Array.isArray(e)?"apply":"call"](oe.console,e):s(e))};He=function(){for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];ze("log",e)},He.levels={all:"log|warn|error",error:"error",off:"",warn:"warn|error",DEFAULT:Ue},He.level=function(t){if("string"==typeof t){if(!He.levels.hasOwnProperty(t))throw new Error('"'+t+'" in not a valid log level');Ue=t}return Ue},He.history=function(){return We?[].concat(We):[]},He.history.clear=function(){We&&(We.length=0)},He.history.disable=function(){null!==We&&(We.length=0,We=null)},He.history.enable=function(){null===We&&(We=[])},He.error=function(){for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];return ze("error",e)},He.warn=function(){for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];return ze("warn",e)};var Xe=He,qe=function(t){for(var e="",n=0;n<arguments.length;n++)e+=s(t[n])+(arguments[n+1]||"");return e},Ke=Be(["Setting attributes in the second argument of createEl()\n                has been deprecated. Use the third argument instead.\n                createEl(type, properties, attributes). Attempting to set "," to ","."],["Setting attributes in the second argument of createEl()\n                has been deprecated. Use the third argument instead.\n                createEl(type, properties, attributes). Attempting to set "," to ","."]),Ye=f("querySelector"),Ge=f("querySelectorAll"),$e=(Object.freeze||Object)({isReal:h,isEl:p,isInFrame:d,createEl:v,textContent:y,prependTo:g,hasClass:m,addClass:_,removeClass:b,toggleClass:T,setAttributes:C,getAttributes:k,getAttribute:w,setAttribute:E,removeAttribute:S,blockTextSelection:x,unblockTextSelection:j,getBoundingClientRect:A,findPosition:P,getPointerPosition:M,isTextNode:O,emptyEl:N,normalizeContent:I,appendContent:D,insertContent:L,$:Ye,$$:Ge}),Je=1,Qe={},Ze="vdata"+(new Date).getTime(),tn=!1;!function(){try{var t=Object.defineProperty({},"passive",{get:function(){tn=!0}});oe.addEventListener("test",null,t)}catch(t){}}();var en=["touchstart","touchmove"],nn=(Object.freeze||Object)({fixEvent:W,on:z,off:X,trigger:q,one:K}),rn=!1,on=void 0,sn=function(){if(h()){
16309var t=ue.getElementsByTagName("video"),e=ue.getElementsByTagName("audio"),n=[];if(t&&t.length>0)for(var r=0,i=t.length;r<i;r++)n.push(t[r]);if(e&&e.length>0)for(var o=0,s=e.length;o<s;o++)n.push(e[o]);if(n&&n.length>0)for(var a=0,l=n.length;a<l;a++){var c=n[a];if(!c||!c.getAttribute){Y(1);break}if(void 0===c.player){var u=c.getAttribute("data-setup");null!==u&&on(c)}}else rn||Y(1)}};h()&&"complete"===ue.readyState?rn=!0:K(oe,"load",function(){rn=!0});var an=function(t){var e=ue.createElement("style");return e.className=t,e},ln=function(t,e){t.styleSheet?t.styleSheet.cssText=e:t.textContent=e},cn=function(t,e,n){e.guid||(e.guid=R());var r=function(){return e.apply(t,arguments)};return r.guid=n?n+"_"+e.guid:e.guid,r},un=function(t,e){var n=Date.now();return function(){var r=Date.now();r-n>=e&&(t.apply(void 0,arguments),n=r)}},hn=function(){};hn.prototype.allowedEvents_={},hn.prototype.on=function(t,e){var n=this.addEventListener;this.addEventListener=function(){},z(this,t,e),this.addEventListener=n},hn.prototype.addEventListener=hn.prototype.on,hn.prototype.off=function(t,e){X(this,t,e)},hn.prototype.removeEventListener=hn.prototype.off,hn.prototype.one=function(t,e){var n=this.addEventListener;this.addEventListener=function(){},K(this,t,e),this.addEventListener=n},hn.prototype.trigger=function(t){var e=t.type||t;"string"==typeof t&&(t={type:e}),t=W(t),this.allowedEvents_[e]&&this["on"+e]&&this["on"+e](t),q(this,t)},hn.prototype.dispatchEvent=hn.prototype.trigger;var pn=function(t){return t instanceof hn||!!t.eventBusEl_&&["on","one","off","trigger"].every(function(e){return"function"==typeof t[e]}
vendor: 11,354 bytes, line 16309
16309)},dn=function(t){return"string"==typeof t&&/\S/.test(t)||Array.isArray(t)&&!!t.length},fn=function(t){if(!t.nodeName&&!pn(t))throw new Error("Invalid target; must be a DOM node or evented object.")},vn=function(t){if(!dn(t))throw new Error("Invalid event type; must be a non-empty string or array.")},yn=function(t){if("function"!=typeof t)throw new Error("Invalid listener; must be a function.")},gn=function(t,e){var n=e.length<3||e[0]===t||e[0]===t.eventBusEl_,r=void 0,i=void 0,o=void 0;return n?(r=t.eventBusEl_,e.length>=3&&e.shift(),i=e[0],o=e[1]):(r=e[0],i=e[1],o=e[2]),fn(r),vn(i),yn(o),o=cn(t,o),{isTargetingSelf:n,target:r,type:i,listener:o}},mn=function(t,e,n,r){fn(t),t.nodeName?nn[e](t,n,r):t[e](n,r)},_n={on:function(){for(var t=this,e=arguments.length,n=Array(e),r=0;r<e;r++)n[r]=arguments[r];var i=gn(this,n),o=i.isTargetingSelf,s=i.target,a=i.type,l=i.listener;if(mn(s,"on",a,l),!o){var c=function(){return t.off(s,a,l)};c.guid=l.guid;var u=function(){return t.off("dispose",c)};u.guid=l.guid,mn(this,"on","dispose",c),mn(s,"on","dispose",u)}},one:function(){for(var t=this,e=arguments.length,n=Array(e),r=0;r<e;r++)n[r]=arguments[r];var i=gn(this,n),o=i.isTargetingSelf,s=i.target,a=i.type,l=i.listener;if(o)mn(s,"one",a,l);else{var c=function e(){for(var n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];t.off(s,a,e),l.apply(null,r)};c.guid=l.guid,mn(s,"one",a,c)}},off:function(t,e,n){if(!t||dn(t))X(this.eventBusEl_,t,e);else{var r=t,i=e;fn(r),vn(i),yn(n),n=cn(this,n),this.off("dispose",n),r.nodeName?(X(r,i,n),X(r,"dispose",n)):pn(r)&&(r.off(i,n),r.off("dispose",n))}},trigger:function(t,e){return q(this.eventBusEl_,t,e)}},bn={state:{},setState:function(t){var n=this;"function"==typeof t&&(t=t());var r=void 0;return e(t,function(t,e){n.state[e]!==t&&(r=r||{},r[e]={from:n.state[e],to:t}),n.state[e]=t}),r&&pn(this)&&this.trigger({changes:r,type:"statechanged"}),r}},Tn=function(){function t(e,n,r){if(De(this,t),!e&&this.play?this.player_=e=this:this.player_=e,this.options_=Z({},this.options_),n=this.options_=Z(this.options_,n),this.id_=n.id||n.el&&n.el.id,!this.id_){var i=e&&e.id&&e.id()||"no_player";this.id_=i+"_component_"+R()}this.name_=n.name||null,n.el?this.el_=n.el:!1!==n.createEl&&(this.el_=this.createEl()),G(this,{eventBusKey:this.el_?"el_":null}),$(this,this.constructor.defaultState),this.children_=[],this.childIndex_={},this.childNameIndex_={},!1!==n.initChildren&&this.initChildren(),this.ready(r),!1!==n.reportTouchActivity&&this.enableTouchActivity()}return t.prototype.dispose=function(){if(this.trigger({type:"dispose",bubbles:!1}),this.children_)for(var t=this.children_.length-1;t>=0;t--)this.children_[t].dispose&&this.children_[t].dispose();this.children_=null,this.childIndex_=null,this.childNameIndex_=null,this.el_&&(this.el_.parentNode&&this.el_.parentNode.removeChild(this.el_),V(this.el_),this.el_=null)},t.prototype.player=function(){return this.player_},t.prototype.options=function(t){return Xe.warn("this.options() has been deprecated and will be moved to the constructor in 6.0"),t?(this.options_=Z(this.options_,t),this.options_):this.options_},t.prototype.el=function(){return this.el_},t.prototype.createEl=function(t,e,n){return v(t,e,n)},t.prototype.localize=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t,r=this.player_.language&&this.player_.language(),i=this.player_.languages&&this.player_.languages(),o=i&&i[r],s=r&&r.split("-")[0],a=i&&i[s],l=n;return o&&o[t]?l=o[t]:a&&a[t]&&(l=a[t]),e&&(l=l.replace(/\{(\d+)\}/g,function(t,n){var r=e[n-1],i=r;return void 0===r&&(i=t),i})),l},t.prototype.contentEl=function(){return this.contentEl_||this.el_},t.prototype.id=function(){return this.id_},t.prototype.name=function(){return this.name_},t.prototype.children=function(){return this.children_},t.prototype.getChildById=function(t){return this.childIndex_[t]},t.prototype.getChild=function(t){if(t)return t=J(t),this.childNameIndex_[t]},t.prototype.addChild=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.children_.length,i=void 0,o=void 0;if("string"==typeof e){o=J(e);var s=n.componentClass||o;n.name=o;var a=t.getComponent(s);if(!a)throw new Error("Component "+s+" does not exist");if("function"!=typeof a)return null;i=new a(this.player_||this,n)}else i=e;if(this.children_.splice(r,0,i),"function"==typeof i.id&&(this.childIndex_[i.id()]=i),o=o||i.name&&J(i.name()),o&&(this.childNameIndex_[o]=i),"function"==typeof i.el&&i.el()){var l=this.contentEl().children,c=l[r]||null;this.contentEl().insertBefore(i.el(),c)}return i},t.prototype.removeChild=function(t){if("string"==typeof t&&(t=this.getChild(t)),t&&this.children_){for(var e=!1,n=this.children_.length-1;n>=0;n--)if(this.children_[n]===t){e=!0,this.children_.splice(n,1);break}if(e){this.childIndex_[t.id()]=null,this.childNameIndex_[t.name()]=null;var r=t.el();r&&r.parentNode===this.contentEl()&&this.contentEl().removeChild(t.el())}}},t.prototype.initChildren=function(){var e=this,n=this.options_.children;if(n){var r=this.options_,i=function(t){var n=t.name,i=t.opts;if(void 0!==r[n]&&(i=r[n]),!1!==i){!0===i&&(i={}),i.playerOptions=e.options_.playerOptions;var o=e.addChild(n,i);o&&(e[n]=o)}},o=void 0,s=t.getComponent("Tech");o=Array.isArray(n)?n:Object.keys(n),o.concat(Object.keys(this.options_).filter(function(t){return!o.some(function(e){return"string"==typeof e?t===e:t===e.name})})).map(function(t){var r=void 0,i=void 0;return"string"==typeof t?(r=t,i=n[r]||e.options_[r]||{}):(r=t.name,i=t),{name:r,opts:i}}).filter(function(e){var n=t.getComponent(e.opts.componentClass||J(e.name));return n&&!s.isTech(n)}).forEach(i)}},t.prototype.buildCSSClass=function(){return""},t.prototype.ready=function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(t)return this.isReady_?void(e?t.call(this):this.setTimeout(t,1)):(this.readyQueue_=this.readyQueue_||[],void this.readyQueue_.push(t))},t.prototype.triggerReady=function(){this.isReady_=!0,this.setTimeout(function(){var t=this.readyQueue_;this.readyQueue_=[],t&&t.length>0&&t.forEach(function(t){t.call(this)},this),this.trigger("ready")},1)},t.prototype.$=function(t,e){return Ye(t,e||this.contentEl())},t.prototype.$$=function(t,e){return Ge(t,e||this.contentEl())},t.prototype.hasClass=function(t){return m(this.el_,t)},t.prototype.addClass=function(t){_(this.el_,t)},t.prototype.removeClass=function(t){b(this.el_,t)},t.prototype.toggleClass=function(t,e){T(this.el_,t,e)},t.prototype.show=function(){this.removeClass("vjs-hidden")},t.prototype.hide=function(){this.addClass("vjs-hidden")},t.prototype.lockShowing=function(){this.addClass("vjs-lock-showing")},t.prototype.unlockShowing=function(){this.removeClass("vjs-lock-showing")},t.prototype.getAttribute=function(t){return w(this.el_,t)},t.prototype.setAttribute=function(t,e){E(this.el_,t,e)},t.prototype.removeAttribute=function(t){S(this.el_,t)},t.prototype.width=function(t,e){return this.dimension("width",t,e)},t.prototype.height=function(t,e){return this.dimension("height",t,e)},t.prototype.dimensions=function(t,e){this.width(t,!0),this.height(e)},t.prototype.dimension=function(t,e,n){if(void 0!==e)return null!==e&&e===e||(e=0),-1!==(""+e).indexOf("%")||-1!==(""+e).indexOf("px")?this.el_.style[t]=e:this.el_.style[t]="auto"===e?"":e+"px",void(n||this.trigger("componentresize"));if(!this.el_)return 0;var r=this.el_.style[t],i=r.indexOf("px");return-1!==i?parseInt(r.slice(0,i),10):parseInt(this.el_["offset"+J(t)],10)},t.prototype.currentDimension=function(t){var e=0;if("width"!==t&&"height"!==t)throw new Error("currentDimension only accepts width or height value");if("function"==typeof oe.getComputedStyle){var n=oe.getComputedStyle(this.el_);e=n.getPropertyValue(t)||n[t]}if(0===(e=parseFloat(e))){var r="offset"+J(t);e=this.el_[r]}return e},t.prototype.currentDimensions=function(){return{width:this.currentDimension("width"),height:this.currentDimension("height")}},t.prototype.currentWidth=function(){return this.currentDimension("width")},t.prototype.currentHeight=function(){return this.currentDimension("height")},t.prototype.focus=function(){this.el_.focus()},t.prototype.blur=function(){this.el_.blur()},t.prototype.emitTapEvents=function(){var t=0,e=null,n=void 0;this.on("touchstart",function(r){1===r.touches.length&&(e={pageX:r.touches[0].pageX,pageY:r.touches[0].pageY},t=(new Date).getTime(),n=!0)}),this.on("touchmove",function(t){if(t.touches.length>1)n=!1;else if(e){var r=t.touches[0].pageX-e.pageX,i=t.touches[0].pageY-e.pageY,o=Math.sqrt(r*r+i*i);o>10&&(n=!1)}});var r=function(){n=!1};this.on("touchleave",r),this.on("touchcancel",r),this.on("touchend",function(r){if(e=null,!0===n){(new Date).getTime()-t<200&&(r.preventDefault(),this.trigger("tap"))}})},t.prototype.enableTouchActivity=function(){if(this.player()&&this.player().reportUserActivity){var t=cn(this.player(),this.player().reportUserActivity),e=void 0;this.on("touchstart",function(){t(),this.clearInterval(e),e=this.setInterval(t,250)});var n=function(n){t(),this.clearInterval(e)};this.on("touchmove",t),this.on("touchend",n),this.on("touchcancel",n)}},t.prototype.setTimeout=function(t,e){var n=this;t=cn(this,t);var r=oe.setTimeout(t,e),i=function(){return n.clearTimeout(r)};return i.guid="vjs-timeout-"+r,this.on("dispose",i),r},t.prototype.clearTimeout=function(t){oe.clearTimeout(t);var e=function(){};return e.guid="vjs-timeout-"+t,this.off("dispose",e),t},t.prototype.setInterval=function(t,e){var n=this;t=cn(this,t);var r=oe.setInterval(t,e),i=function(){return n.clearInterval(r)};return i.guid="vjs-interval-"+r,this.on("dispose",i),r},t.prototype.clearInterval=function(t){oe.clearInterval(t);var e=function(){};return e.guid="vjs-interval-"+t,this.off("dispose",e),t},t.prototype.requestAnimationFrame=function(t){var e=this;if(this.supportsRaf_){t=cn(this,t);var n=oe.requestAnimationFrame(t),r=function(){return e.cancelAnimationFrame(n)};return r.guid="vjs-raf-"+n,this.on("dispose",r),n}return this.setTimeout(t,1e3/60)},t.prototype.cancelAnimationFrame=function(t){if(this.supportsRaf_){oe.cancelAnimationFrame(t);var e=function(){};return e.guid="vjs-raf-"+t,this.off("dispose",e),t}return this.clearTimeout(t)},t.registerComponent=function(e,n){if("string"!=typeof e||!e)throw new Error('Illegal component name, "'+e+'"; must be a non-empty string.');var r=t.getComponent("Tech"),i=r&&r.isTech(n),o=t===n||t.prototype.isPrototypeOf(n.prototype);if(i||!o){var s=void 0;throw s=i?"techs must be registered using Tech.registerTech()":"must be a Component subclass",new Error('Illegal component, "'+e+'"; '+s+".")}e=J(e),t.components_||(t.components_={});var a=t.getComponent("Player");if("Player"===e&&a&&a.players){var l=a.players,c=Object.keys(l);if(l&&c.length>0&&c.map(function(t){return l[t]}).every(Boolean))throw new Error("Can not register Player component after player has been created.")}return t.components_[e]=n,n},t.getComponent=function(e){if(e)return e=J(e),t.components_&&t.components_[e]?t.components_[e]:void 0},t}();Tn.prototype.supportsRaf_="function"==typeof oe.requestAnimationFrame&&"function"==typeof oe.cancelAnimationFrame,Tn.registerComponent("Component",Tn);for(var Cn={},kn=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror"],["
16309webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror"],["webkitRequestFullScreen","webkitCancelFullScreen","webkitCurrentFullScreenElement","webkitCancelFullScreen","webkitfullscreenchange","webkitfullscreenerror"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError"]],wn=kn[0],En=void 0,Sn=0;Sn<kn.length;Sn++)if(kn[Sn][1]in ue){En=kn[Sn];break}if(En)for(var xn=0;xn<En.length;xn++)Cn[wn[xn]]=En[xn];ot.prototype.code=0,ot.prototype.message="",ot.prototype.status=null,ot.errorTypes=["MEDIA_ERR_CUSTOM","MEDIA_ERR_ABORTED","MEDIA_ERR_NETWORK","MEDIA_ERR_DECODE","MEDIA_ERR_SRC_NOT_SUPPORTED","MEDIA_ERR_ENCRYPTED"],ot.defaultMessages={1:"You aborted the media playback",2:"A network error caused the media download to fail part-way.",3:"The media playback was aborted due to a corruption problem or because the media used features your browser did not support.",4:"The media could not be loaded, either because the server or network failed or because the format is not supported.",5:"The media is encrypted and we do not have the keys to decrypt it."};for(var jn=0;jn<ot.errorTypes.length;jn++)ot[ot.errorTypes[jn]]=jn,ot.prototype[ot.errorTypes[jn]]=jn;var An=st,Pn=function(t){return["kind","label","language","id","inBandMetadataTrackDispatchType","mode","src"].reduce(function(e,n,r){return t[n]&&(e[n]=t[n]),e},{cues:t.cues&&Array.prototype.map.call(t.cues,function(t){return{startTime:t.startTime,endTime:t.endTime,text:t.text,id:t.id}})})},Mn=function(t){var e=t.$$("track"),n=Array.prototype.map.call(e,function(t){return t.track});return Array.prototype.map.call(e,function(t){var e=Pn(t.track);return t.src&&(e.src=t.src),e}).concat(Array.prototype.filter.call(t.textTracks(),function(t){return-1===n.indexOf(t)}).map(Pn))},On=function(t,e){return t.forEach(function(t){var n=e.addRemoteTextTrack(t).track;!t.src&&t.cues&&t.cues.forEach(function(t){return n.addCue(t)})}),e.textTracks()},Nn={textTracksToJson:Mn,jsonToTextTracks:On,trackToJson_:Pn},In="vjs-modal-dialog",Dn=function(t){function e(n,r){De(this,e);var i=Re(this,t.call(this,n,r));return i.opened_=i.hasBeenOpened_=i.hasBeenFilled_=!1,i.closeable(!i.options_.uncloseable),i.content(i.options_.content),i.contentEl_=v("div",{className:In+"-content"},{role:"document"}),i.descEl_=v("p",{className:In+"-description vjs-control-text",id:i.el().getAttribute("aria-describedby")}),y(i.descEl_,i.description()),i.el_.appendChild(i.descEl_),i.el_.appendChild(i.contentEl_),i}return Le(e,t),e.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:this.buildCSSClass(),tabIndex:-1},{"aria-describedby":this.id()+"_description","aria-hidden":"true","aria-label":this.label(),role:"dialog"})},e.prototype.buildCSSClass=function(){return In+" vjs-hidden "+t.prototype.buildCSSClass.call(this)},e.prototype.handleKeyPress=function(t){27===t.which&&this.closeable()&&this.close()},e.prototype.label=function(){return this.localize(this.options_.label||"Modal Window")},e.prototype.description=function(){var t=this.options_.description||this.localize("This is a modal window.");return this.closeable()&&(t+=" "+this.localize("This modal can be closed by pressing the Escape key or activating the close button.")),t},e.prototype.open=function(){if(!this.opened_){var t=this.player();this.trigger("beforemodalopen"),this.opened_=!0,(this.options_.fillAlways||!this.hasBeenOpened_&&!this.hasBeenFilled_)&&this.fill(),this.wasPlaying_=!t.paused(),this.options_.pauseOnOpen&&this.wasPlaying_&&t.pause(),this.closeable()&&this.on(this.el_.ownerDocument,"keydown",cn(this,this.handleKeyPress)),this.hadControls_=t.controls(),t.controls(!1),this.show(),this.conditionalFocus_(),this.el().setAttribute("aria-hidden","false"),this.trigger("modalopen"),this.hasBeenOpened_=!0}},e.prototype.opened=function(t){return"boolean"==typeof t&&this[t?"open":"close"](),this.opened_},e.prototype.close=function(){if(this.opened_){var t=this.player();this.trigger("beforemodalclose"),this.opened_=!1,this.wasPlaying_&&this.options_.pauseOnOpe
16309n&&t.play(),this.closeable()&&this.off(this.el_.ownerDocument,"keydown",cn(this,this.handleKeyPress)),this.hadControls_&&t.controls(!0),this.hide(),this.el().setAttribute("aria-hidden","true"),this.trigger("modalclose"),this.conditionalBlur_(),this.options_.temporary&&this.dispose()}},e.prototype.closeable=function(t){if("boolean"==typeof t){var e=this.closeable_=!!t,n=this.getChild("closeButton");if(e&&!n){var r=this.contentEl_;this.contentEl_=this.el_,n=this.addChild("closeButton",{controlText:"Close Modal Dialog"}),this.contentEl_=r,this.on(n,"close",this.close)}!e&&n&&(this.off(n,"close",this.close),this.removeChild(n),n.dispose())}return this.closeable_},e.prototype.fill=function(){this.fillWith(this.content())},e.prototype.fillWith=function(t){var e=this.contentEl(),n=e.parentNode,r=e.nextSibling;this.trigger("beforemodalfill"),this.hasBeenFilled_=!0,n.removeChild(e),this.empty(),L(e,t),this.trigger("modalfill"),r?n.insertBefore(e,r):n.appendChild(e);var i=this.getChild("closeButton");i&&n.appendChild(i.el_)},e.prototype.empty=function(){this.trigger("beforemodalempty"),N(this.contentEl()),this.trigger("modalempty")},e.prototype.content=function(t){return void 0!==t&&(this.content_=t),this.content_},e.prototype.conditionalFocus_=function(){var t=ue.activeElement,e=this.player_.el_;this.previouslyActiveEl_=null,(e.contains(t)||e===t)&&(this.previouslyActiveEl_=t,this.focus(),this.on(ue,"keydown",this.handleKeyDown))},e.prototype.conditionalBlur_=function(){this.previouslyActiveEl_&&(this.previouslyActiveEl_.focus(),this.previouslyActiveEl_=null),this.off(ue,"keydown",this.handleKeyDown)},e.prototype.handleKeyDown=function(t){if(9===t.which){for(var e=this.focusableEls_(),n=this.el_.querySelector(":focus"),r=void 0,i=0;i<e.length;i++)if(n===e[i]){r=i;break}ue.activeElement===this.el_&&(r=0),t.shiftKey&&0===r?(e[e.length-1].focus(),t.preventDefault()):t.shiftKey||r!==e.length-1||(e[0].focus(),t.preventDefault())}},e.prototype.focusableEls_=function(){var t=this.el_.querySelectorAll("*");return Array.prototype.filter.call(t,function(t){return(t instanceof oe.HTMLAnchorElement||t instanceof oe.HTMLAreaElement)&&t.hasAttribute("href")||(t instanceof oe.HTMLInputElement||t instanceof oe.HTMLSelectElement||t instanceof oe.HTMLTextAreaElement||t instanceof oe.HTMLButtonElement)&&!t.hasAttribute("disabled")||t instanceof oe.HTMLIFrameElement||t instanceof oe.HTMLObjectElement||t instanceof oe.HTMLEmbedElement||t.hasAttribute("tabindex")&&-1!==t.getAttribute("tabindex")||t.hasAttribute("contenteditable")})},e}(Tn);Dn.prototype.options_={pauseOnOpen:!0,temporary:!0},Tn.registerComponent("ModalDialog",Dn);var Ln=function(t){function e(){var n,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;De(this,e);var o=Re(this,t.call(this));if(!i&&(i=o,xe)){i=ue.createElement("custom");for(var s in e.prototype)"constructor"!==s&&(i[s]=e.prototype[s])}i.tracks_=[],Object.defineProperty(i,"length",{get:function(){return this.tracks_.length}});for(var a=0;a<r.length;a++)i.addTrack(r[a]);return n=i,Re(o,n)}return Le(e,t),e.prototype.addTrack=function(t){var e=this.tracks_.length;""+e in this||Object.defineProperty(this,e,{get:function(){return this.tracks_[e]}}),-1===this.tracks_.indexOf(t)&&(this.tracks_.push(t),this.trigger({track:t,type:"addtrack"}))},e.prototype.removeTrack=function(t){for(var e=void 0,n=0,r=this.length;n<r;n++)if(this[n]===t){e=this[n],e.off&&e.off(),this.tracks_.splice(n,1);break}e&&this.trigger({track:e,type:"removetrack"})},e.prototype.getTrackById=function(t){for(var e=null,n=0,r=this.length;n<r;n++){var i=this[n];if(i.id===t){e=i;break}}return e},e}(hn);Ln.prototype.allowedEvents_={change:"change",addtrack:"addtrack",removetrack:"removetrack"};for(var Rn in Ln.prototype.allowedEvents_)Ln.prototype["on"+Rn]=null;var Bn=function(t,e){for(var n=0;n<t.length;n++)Object.keys(t[n]).length&&e.id!==t[n].id&&(t[n].enabled=!1)},Fn=function(t){function e(){var n,r,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];De(this,e);for(var o=void 0,s=i.length-1;s>=0;s--)if(i[s].enabled){Bn(i,i[s]);break}if(xe){o=ue.createElement("custom");for(var a in Ln.prototype)"constructor"!==a&&(o[a]=Ln.prototype[a]);for(var l in e.prototype)"constructor"!==l&&(o[l]=e.prototype[l])}return o=n=Re(this,t.call(this,i,o)),o.changing_=!1,r=o,Re(n,r)}return Le(e,t),e.prototype.addTrack=function(e){var n=this;e.enabled&&Bn(this,e),t.prototype.addTrack.call(this,e),e.addEventListener&&e.addEventListener("enabledchange",function(){n.changing_||(n.changing_=!0,Bn(n,e),n.changing_=!1,n.trigger("change"))})},e}(Ln),Vn=function(t,e){for(var n=0;n<t.length;n++)Object.keys(t[n]).length&&e.id!==t[n].id&&(t[n].selected=!1)},Hn=function(t){function e(){var n,r,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];De(this,e);for(var o=void 0,s=i.length-1;s>=0;s--)if(i[s].selected){Vn(i,i[s]);break}if(xe){o=ue.createElement("custom");for(var a in Ln.prototype)"constructor"!==a&&(o[a]=Ln.prototype[a]);for(var l in e.prototype)"constructor"!==l&&(o[l]=e.prototype[l])}return o=n=Re(this,t.call(this,i,o)),o.changing_=!1,Object.defineProperty(o,"selectedIndex",{get:function(){for(var t=0;t<this.length;t++)if(this[t].selected)return t;return-1},set:function(){}}),r=o,Re(n,r)}return Le(e,t),e.prototype.addTrack=function(e){var n=this;e.selected&&Vn(this,e),t.prototype.addTrack.call(this,e),e.addEventListener&&e.addEventListener("selectedchange",function(){n.changing_||(n.changing_=!0,Vn(n,e),n.changing_=!1,n.trigger("change"))})},e}(Ln),Un=function(t){function e(){var n,r,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];De(this,e);var o=void 0;if(xe){o=ue.createElement("custom");for(var s in Ln.prototype)"constructor"!==s&&(o[s]=Ln.prototype[s]);for(var a in e.prototype)"constructor"!==a&&(o[a]=e.prototype[a])}return o=n=Re(this,t.call(this,i,o)),r=o,Re(n,r)}return Le(e,t),e.prototype.addTrack=function(e){t.prototype.addTrack.call(this,e),e.addEventListener("modechange",cn(this,function(){this.trigger("change")})),-1===["metadata","chapters"].indexOf(e.kind)&&e.addEventListener("modechange",cn(this,function(){this.trigger("selectedlanguagechange")}))},e}(Ln),Wn=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];De(this,t);var n=this;if(xe){n=ue.createElement("custom");for(var r in t.prototype)"constructor"!==r&&(n[r]=t.prototype[r])}n.trackElements_=[],Object.defineProperty(n,"length",{get:function(){return this.trackElements_.length}});for(var i=0,o=e.length;i<o;i++)n.addTrackElement_(e[i]);if(xe)return n}return t.prototype.addTrackElement_=function(t){var e=this.trackElements_.length;""+e in this||Object.defineProperty(this,e,{get:function(){return this.trackElements_[e]}}
16309),-1===this.trackElements_.indexOf(t)&&this.trackElements_.push(t)},t.prototype.getTrackElementByTrack_=function(t){for(var e=void 0,n=0,r=this.trackElements_.length;n<r;n++)if(t===this.trackElements_[n].track){e=this.trackElements_[n];break}return e},t.prototype.removeTrackElement_=function(t){for(var e=0,n=this.trackElements_.length;e<n;e++)if(t===this.trackElements_[e]){this.trackElements_.splice(e,1);break}},t}(),zn=function(){function t(e){De(this,t);var n=this;if(xe){n=ue.createElement("custom");for(var r in t.prototype)"constructor"!==r&&(n[r]=t.prototype[r])}if(t.prototype.setCues_.call(n,e),Object.defineProperty(n,"length",{get:function(){return this.length_}}),xe)return n}return t.prototype.setCues_=function(t){var e=this.length||0,n=0,r=t.length;this.cues_=t,this.length_=t.length;var i=function(t){""+t in this||Object.defineProperty(this,""+t,{get:function(){return this.cues_[t]}})};if(e<r)for(n=e;n<r;n++)i.call(this,n)},t.prototype.getCueById=function(t){for(var e=null,n=0,r=this.length;n<r;n++){var i=this[n];if(i.id===t){e=i;break}}return e},t}(),Xn={alternative:"alternative",captions:"captions",main:"main",sign:"sign",subtitles:"subtitles",commentary:"commentary"},qn={alternative:"alternative",descriptions:"descriptions",main:"main","main-desc":"main-desc",translation:"translation",commentary:"commentary"},Kn={subtitles:"subtitles",captions:"captions",descriptions:"descriptions",chapters:"chapters",metadata:"metadata"},Yn={disabled:"disabled",hidden:"hidden",showing:"showing"},Gn=function(t){function e(){var n,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};De(this,e);var i=Re(this,t.call(this)),o=i;if(xe){o=ue.createElement("custom");for(var s in e.prototype)"constructor"!==s&&(o[s]=e.prototype[s])}var a={id:r.id||"vjs_track_"+R(),kind:r.kind||"",label:r.label||"",language:r.language||""};for(var l in a)!function(t){Object.defineProperty(o,t,{get:function(){return a[t]},set:function(){}})}(l);return n=o,Re(i,n)}return Le(e,t),e}(hn),$n=function(t){var e=["protocol","hostname","port","pathname","search","hash","host"],n=ue.createElement("a");n.href=t;var r=""===n.host&&"file:"!==n.protocol,i=void 0;r&&(i=ue.createElement("div"),i.innerHTML='<a href="'+t+'"></a>',n=i.firstChild,i.setAttribute("style","display:none; position:absolute;"),ue.body.appendChild(i));for(var o={},s=0;s<e.length;s++)o[e[s]]=n[e[s]];return"http:"===o.protocol&&(o.host=o.host.replace(/:80$/,"")),"https:"===o.protocol&&(o.host=o.host.replace(/:443$/,"")),o.protocol||(o.protocol=oe.location.protocol),r&&ue.body.removeChild(i),o},Jn=function(t){if(!t.match(/^https?:\/\//)){var e=ue.createElement("div");e.innerHTML='<a href="'+t+'">x</a>',t=e.firstChild.href}return t},Qn=function(t){if("string"==typeof t){var e=/^(\/?)([\s\S]*?)((?:\.{1,2}|[^\/]+?)(\.([^\.\/\?]+)))(?:[\/]*|[\?].*)$/i,n=e.exec(t);if(n)return n.pop().toLowerCase()}return""},Zn=function(t){var e=oe.location,n=$n(t);return(":"===n.protocol?e.protocol:n.protocol)+n.host!==e.protocol+e.host},tr=(Object.freeze||Object)({parseUrl:$n,getAbsoluteURL:Jn,getFileExtension:Qn,isCrossOrigin:Zn}),er=at,nr=Object.prototype.toString,rr=t(function(t,e){function n(t){return t.replace(/^\s*|\s*$/g,"")}e=t.exports=n,e.left=function(t){return t.replace(/^\s*/,"")},e.right=function(t){return t.replace(/\s*$/,"")}}),ir=lt,or=Object.prototype.toString,sr=Object.prototype.hasOwnProperty,ar=function(t){return"[object Array]"===Object.prototype.toString.call(t)},lr=function(t){if(!t)return{};var e={};return ir(rr(t).split("\n"),function(t){var n=t.indexOf(":"),r=rr(t.slice(0,n)).toLowerCase(),i=rr(t.slice(n+1));void 0===e[r]?e[r]=i:ar(e[r])?e[r].push(i):e[r]=[e[r],i]}),e},cr=pt,ur=Object.prototype.hasOwnProperty,hr=vt;vt.XMLHttpRequest=oe.XMLHttpRequest||mt,vt.XDomainRequest="withCredentials"in new vt.XMLHttpRequest?vt.XMLHttpRequest:oe.XDomainRequest,function(t,e){for(var n=0;n<t.length;n++)e(t[n])}(["get","put","post","patch","head","delete"],function(t){vt["delete"===t?"del":t]=function(e,n,r){return n=ft(e,n,r),n.method=t.toUpperCase(),yt(n)}});var pr=function(t,e){var n=new oe.WebVTT.Parser(oe,oe.vttjs,oe.WebVTT.StringDecoder()),r=[];n.oncue=function(t){e.addCue(t)},n.onparsingerror=function(t){r.push(t)},n.onflush=function(){e.trigger({type:"loadeddata",target:e})},n.parse(t),r.length>0&&(oe.console&&oe.console.groupCollapsed&&oe.console.groupCollapsed("Text Track parsing errors for "+e.src),r.forEach(function(t){return Xe.error(t)}),oe.console&&oe.console.groupEnd&&oe.console.groupEnd()),n.flush()},dr=function(t,e){var n={uri:t},r=Zn(t);r&&(n.cors=r),hr(n,cn(this,function(t,n,r){if(t)return Xe.error(t,n);if(e.loaded_=!0,"function"!=typeof oe.WebVTT){if(e.tech_){var i=function(){return pr(r,e)};e.tech_.on("vttjsloaded",i),e.tech_.on("vttjserror",function(){Xe.error("vttjs failed to load, stopping trying to process "+e.src),e.tech_.off("vttjsloaded",i)})}}else pr(r,e)}))},fr=function(t){function e(){var n,r,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};
16309if(De(this,e),!i.tech)throw new Error("A tech was not provided.");var o=Z(i,{kind:Kn[i.kind]||"subtitles",language:i.language||i.srclang||""}),s=Yn[o.mode]||"disabled",a=o.default;"metadata"!==o.kind&&"chapters"!==o.kind||(s="hidden");var l=n=Re(this,t.call(this,o));if(l.tech_=o.tech,xe)for(var c in e.prototype)"constructor"!==c&&(l[c]=e.prototype[c]);l.cues_=[],l.activeCues_=[];var u=new zn(l.cues_),h=new zn(l.activeCues_),p=!1,d=cn(l,function(){this.activeCues,p&&(this.trigger("cuechange"),p=!1)});return"disabled"!==s&&l.tech_.ready(function(){l.tech_.on("timeupdate",d)},!0),Object.defineProperty(l,"default",{get:function(){return a},set:function(){}}),Object.defineProperty(l,"mode",{get:function(){return s},set:function(t){var e=this;Yn[t]&&(s=t,"showing"===s&&this.tech_.ready(function(){e.tech_.on("timeupdate",d)},!0),this.trigger("modechange"))}}),Object.defineProperty(l,"cues",{get:function(){return this.loaded_?u:null},set:function(){}}),Object.defineProperty(l,"activeCues",{get:function(){if(!this.loaded_)return null;if(0===this.cues.length)return h;for(var t=this.tech_.currentTime(),e=[],n=0,r=this.cues.length;n<r;n++){var i=this.cues[n];i.startTime<=t&&i.endTime>=t?e.push(i):i.startTime===i.endTime&&i.startTime<=t&&i.startTime+.5>=t&&e.push(i)}if(p=!1,e.length!==this.activeCues_.length)p=!0;else for(var o=0;o<e.length;o++)-1===this.activeCues_.indexOf(e[o])&&(p=!0);return this.activeCues_=e,h.setCues_(this.activeCues_),h},set:function(){}}),o.src?(l.src=o.src,dr(o.src,l)):l.loaded_=!0,r=l,Re(n,r)}return Le(e,t),e.prototype.addCue=function(t){var e=t;if(oe.vttjs&&!(t instanceof oe.vttjs.VTTCue)){e=new oe.vttjs.VTTCue(t.startTime,t.endTime,t.text);for(var n in t)n in e||(e[n]=t[n]);e.id=t.id,e.originalCue_=t}for(var r=this.tech_.textTracks(),i=0;i<r.length;i++)r[i]!==this&&r[i].removeCue(e);this.cues_.push(e),this.cues.setCues_(this.cues_)},e.prototype.removeCue=function(t){for(var e=this.cues_.length;e--;){var n=this.cues_[e];if(n===t||n.originalCue_&&n.originalCue_===t){this.cues_.splice(e,1),this.cues.setCues_(this.cues_);break}}},e}(Gn);fr.prototype.allowedEvents_={cuechange:"cuechange"};var vr=function(t){function e(){var n,r,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};De(this,e);var o=Z(i,{kind:qn[i.kind]||""}),s=n=Re(this,t.call(this,o)),a=!1;if(xe)for(var l in e.prototype)"constructor"!==l&&(s[l]=e.prototype[l]);return Object.defineProperty(s,"enabled",{get:function(){return a}
16309,set:function(t){"boolean"==typeof t&&t!==a&&(a=t,this.trigger("enabledchange"))}}),o.enabled&&(s.enabled=o.enabled),s.loaded_=!0,r=s,Re(n,r)}return Le(e,t),e}(Gn),yr=function(t){function e(){var n,r,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};De(this,e);var o=Z(i,{kind:Xn[i.kind]||""}),s=n=Re(this,t.call(this,o)),a=!1;if(xe)for(var l in e.prototype)"constructor"!==l&&(s[l]=e.prototype[l]);return Object.defineProperty(s,"selected",{get:function(){
16310return a},set:function(t){"boolean"==typeof t&&t!==a&&(a=t,this.trigger("selectedchange"))}}),o.selected&&(s.selected=o.selected),r=s,Re(n,r)}return Le(e,t),e}(Gn),gr=0,mr=2,_r=function(t){function e(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};De(this,e);var r=Re(this,t.call(this)),i=void 0,o=r;if(xe){o=ue.createElement("custom");for(var s in e.prototype)"constructor"!==s&&(o[s]=e.prototype[s])}var a=new fr(n);if(o.kind=a.kind,o.src=a.src,o.srclang=a.language,o.label=a.label,o.default=a.default,Object.defineProperty(o,"readyState",{get:function(){return i}}),Object.defineProperty(o,"track",{get:function(){return a}}),i=gr,a.addEventListener("loadeddata",function(){i=mr,o.trigger({type:"load",target:o})}),xe){var l;return l=o,Re(r,l)}return r}return Le(e,t),e}(hn);_r.prototype.allowedEvents_={load:"load"},_r.NONE=gr,_r.LOADING=1,_r.LOADED=mr,_r.ERROR=3;var br={audio:{ListClass:Fn,TrackClass:vr,capitalName:"Audio"},video:{ListClass:Hn,TrackClass:yr,capitalName:"Video"},text:{ListClass:Un,TrackClass:fr,capitalName:"Text"}};Object.keys(br).forEach(function(t){br[t].getterName=t+"Tracks",br[t].privateName=t+"Tracks_"});var Tr={remoteText:{ListClass:Un,TrackClass:fr,capitalName:"RemoteText",getterName:"remoteTextTracks",privateName:"remoteTextTracks_"},remoteTextEl:{ListClass:Wn,TrackClass:_r,capitalName:"RemoteTextTrackEls",getterName:"remoteTextTrackEls",privateName:"remoteTextTrackEls_"}},Cr=Z(br,Tr);Tr.names=Object.keys(Tr),br.names=Object.keys(br),Cr.names=[].concat(Tr.names).concat(br.names);var kr=Object.create||function(){function t(){}return function(e){if(1!==arguments.length)throw new Error("Object.create shim only accepts one parameter.");return t.prototype=e,new t}}();_t.prototype=kr(Error.prototype),_t.prototype.constructor=_t,_t.Errors={BadSignature:{code:0,message:"Malformed WebVTT signature."},BadTimeStamp:{code:1,message:"Malformed time stamp."}},Tt.prototype={set:function(t,e){this.get(t)||""===e||(this.values[t]=e)},get:function(t,e,n){return n?this.has(t)?this.values[t]:e[n]:this.has(t)?this.values[t]:e},has:function(t){return t in this.values},alt:function(t,e,n){for(var r=0;r<n.length;++r)if(e===n[r]){this.set(t,e);break}},integer:function(t,e){/^-?\d+$/.test(e)&&this.set(t,parseInt(e,10))},percent:function(t,e){return!!(e.match(/^([\d]{1,3})(\.[\d]*)?%$/)&&(e=parseFloat(e))>=0&&e<=100)&&(this.set(t,e),!0)}};var wr={"&amp;":"&","&lt;":"<","&gt;":">","&lrm;":"‎","&rlm;":"‏","&nbsp;":" "},Er={c:"span",i:"i",b:"b",u:"u",ruby:"ruby",rt:"rt",v:"span",lang:"span"},Sr={v:"title",lang:"lang"},xr={rt:"ruby"},jr=[[1470,1470],[1472,1472],[1475,1475],[1478,1478],[1488,1514],[1520,1524],[1544,1544],[1547,1547],[1549,1549],[1563,1563],[1566,1610],[1645,1647],[1649,1749],[1765,1766],[1774,1775],[1786,1805],[1807,1808],[1810,1839],[1869,1957],[1969,1969],[1984,2026],[2036,2037],[2042,2042],[2048,2069],[2074,2074],[2084,2084],[2088,2088],[2096,2110],[2112,2136],[2142,2142],[2208,2208],[2210,2220],[8207,8207],[64285,64285],[64287,64296],[64298,64310],[64312,64316],[64318,64318],[64320,64321],[64323,64324],[64326,64449],[64467,64829],[64848,64911],[64914,64967],[65008,65020],[65136,65140],[65142,65276],[67584,67589],[67592,67592],[67594,67637],[67639,67640],[67644,67644],[67647,67669],[67671,67679],[67840,67867],[67872,67897],[67903,67903],[67968,68023],[68030,68031],[68096,68096],[68112,68115],[68117,68119],[68121,68147],[68160,68167],[68176,68184],[68192,68223],[68352,68405],[68416,68437],[68440,68466],[68472,68479],[68608,68680],[126464,126467],[126469,126495],[126497,126498],[126500,126500],[126503,126503],[126505,126514],[126516,126519],[126521,126521],[126523,126523],[126530,126530],[126535,126535],[126537,126537],[126539,126539],[126541,126543],[126545,126546],[126548,126548],[126551,126551
vendor: 5,486 bytes, line 16310
16310],[126553,126553],[126555,126555],[126557,126557],[126559,126559],[126561,126562],[126564,126564],[126567,126570],[126572,126578],[126580,126583],[126585,126588],[126590,126590],[126592,126601],[126603,126619],[126625,126627],[126629,126633],[126635,126651],[1114109,1114109]];jt.prototype.applyStyles=function(t,e){e=e||this.div;for(var n in t)t.hasOwnProperty(n)&&(e.style[n]=t[n])},jt.prototype.formatStyle=function(t,e){return 0===t?0:t+e},At.prototype=kr(jt.prototype),At.prototype.constructor=At,Pt.prototype.move=function(t,e){switch(e=void 0!==e?e:this.lineHeight,t){case"+x":this.left+=e,this.right+=e;break;case"-x":this.left-=e,this.right-=e;break;case"+y":this.top+=e,this.bottom+=e;break;case"-y":this.top-=e,this.bottom-=e}},Pt.prototype.overlaps=function(t){return this.left<t.right&&this.right>t.left&&this.top<t.bottom&&this.bottom>t.top},Pt.prototype.overlapsAny=function(t){for(var e=0;e<t.length;e++)if(this.overlaps(t[e]))return!0;return!1},Pt.prototype.within=function(t){return this.top>=t.top&&this.bottom<=t.bottom&&this.left>=t.left&&this.right<=t.right},Pt.prototype.overlapsOppositeAxis=function(t,e){switch(e){case"+x":return this.left<t.left;case"-x":return this.right>t.right;case"+y":return this.top<t.top;case"-y":return this.bottom>t.bottom}},Pt.prototype.intersectPercentage=function(t){return Math.max(0,Math.min(this.right,t.right)-Math.max(this.left,t.left))*Math.max(0,Math.min(this.bottom,t.bottom)-Math.max(this.top,t.top))/(this.height*this.width)},Pt.prototype.toCSSCompatValues=function(t){return{top:this.top-t.top,bottom:t.bottom-this.bottom,left:this.left-t.left,right:t.right-this.right,height:this.height,width:this.width}},Pt.getSimpleBoxPosition=function(t){var e=t.div?t.div.offsetHeight:t.tagName?t.offsetHeight:0,n=t.div?t.div.offsetWidth:t.tagName?t.offsetWidth:0,r=t.div?t.div.offsetTop:t.tagName?t.offsetTop:0;return t=t.div?t.div.getBoundingClientRect():t.tagName?t.getBoundingClientRect():t,{left:t.left,right:t.right,top:t.top||r,height:t.height||e,bottom:t.bottom||r+(t.height||e),width:t.width||n}},Ot.StringDecoder=function(){return{decode:function(t){if(!t)return"";if("string"!=typeof t)throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(t))}}},Ot.convertCueToDOMTree=function(t,e){return t&&e?wt(t,e):null};Ot.processCues=function(t,e,n){if(!t||!e||!n)return null;for(;n.firstChild;)n.removeChild(n.firstChild);var r=t.document.createElement("div");if(r.style.position="absolute",r.style.left="0",r.style.right="0",r.style.top="0",r.style.bottom="0",r.style.margin="1.5%",n.appendChild(r),function(t){for(var e=0;e<t.length;e++)if(t[e].hasBeenReset||!t[e].displayState)return!0;return!1}(e)){var i=[],o=Pt.getSimpleBoxPosition(r),s=Math.round(.05*o.height*100)/100,a={font:s+"px sans-serif"};!function(){for(var n,s,l=0;l<e.length;l++)s=e[l],n=new At(t,s,a),r.appendChild(n.div),Mt(t,n,o,i),s.displayState=n.div,i.push(Pt.getSimpleBoxPosition(n))}()}else for(var l=0;l<e.length;l++)r.appendChild(e[l].displayState)},Ot.Parser=function(t,e,n){n||(n=e,e={}),e||(e={}),this.window=t,this.vttjs=e,this.state="INITIAL",this.buffer="",this.decoder=n||new TextDecoder("utf8"),this.regionList=[]},Ot.Parser.prototype={reportOrThrowError:function(t){if(!(t instanceof _t))throw t;this.onparsingerror&&this.onparsingerror(t)},parse:function(t){function e(){for(var t=i.buffer,e=0;e<t.length&&"\r"!==t[e]&&"\n"!==t[e];)++e;var n=t.substr(0,e);return"\r"===t[e]&&++e,"\n"===t[e]&&++e,i.buffer=t.substr(e),n}function n(t){var e=new Tt;if(Ct(t,function(t,n){switch(t){case"id":e.set(t,n);break;case"width":e.percent(t,n);break;case"lines":e.integer(t,n);break;case"regionanchor":case"viewportanchor":var r=n.split(",");if(2!==r.length)break;var i=new Tt;if(i.percent("x",r[0]),i.percent("y",r[1]),!i.has("x")||!i.has("y"))break;e.set(t+"X",i.get("x")),e.set(t+"Y",i.get("y"));break;case"scroll":e.alt(t,n,["up"])}},/=/,/\s/),e.has("id")){var n=new(i.vttjs.VTTRegion||i.window.VTTRegion);n.width=e.get("width",100),n.lines=e.get("lines",3),n.regionAnchorX=e.get("regionanchorX",0),n.regionAnchorY=e.get("regionanchorY",100),n.viewportAnchorX=e.get("viewportanchorX",0),n.viewportAnchorY=e.get("viewportanchorY",100),n.scroll=e.get("scroll",""),i.onregion&&i.onregion(n),i.regionList.push({id:e.get("id"),region:n})}}function r(t){var e=new Tt;Ct(t,function(t,n){switch(t){case"MPEGT":e.integer(t+"S",n);break;case"LOCA":e.set(t+"L",bt(n))}},/[^\d]:/,/,/),i.ontimestampmap&&i.ontimestampmap({MPEGTS:e.get("MPEGTS"),LOCAL:e.get("LOCAL")})}var i=this;t&&(i.buffer+=i.decoder.decode(t,{stream:!0}));try{var o;if("INITIAL"===i.state){if(!/\r\n|\n/.test(i.buffer))return this;o=e();var s=o.match(/^WEBVTT([ \t].*)?$/);if(!s||!s[0])throw new _t(_t.Errors.BadSignature);i.state="HEADER"}for(var a=!1;i.buffer;){if(!/\r\n|\n/.test(i.buffer))return this;switch(a?a=!1:o=e(),i.state){case"HEADER":/:/.test(o)?function(t){t.match(/X-TIMESTAMP-MAP/)?Ct(t,function(t,e){switch(t){case"X-TIMESTAMP-MAP":r(e)}},/=/):Ct(t,function(t,e){switch(t){case"Region":n(e)}},/:/)}(o):o||(i.state="ID");continue;case"NOTE":o||(i.state="ID");continue;case"ID":if(/^NOTE($|[ \t])/.test(o)){i.state="NOTE";break}if(!o)continue;if(i.cue=new(i.vttjs.VTTCue||i.window.VTTCue)(0,0,""),i.state="CUE",-1===o.indexOf("--\x3e")){i.cue.id=o;continue}case"CUE":try{kt(o,i.cue,i.regionList)}catch(t){i.reportOrThrowError(t),i.cue=null,i.state="BADCUE";continue}i.state="CUETEXT";continue;case"CUETEXT":var l=-1!==o.indexOf("--\x3e");
16310if(!o||l&&(a=!0)){i.oncue&&i.oncue(i.cue),i.cue=null,i.state="ID";continue}i.cue.text&&(i.cue.text+="\n"),i.cue.text+=o;continue;case"BADCUE":o||(i.state="ID");continue}}}catch(t){i.reportOrThrowError(t),"CUETEXT"===i.state&&i.cue&&i.oncue&&i.oncue(i.cue),i.cue=null,i.state="INITIAL"===i.state?"BADWEBVTT":"BADCUE"}return this},flush:function(){var t=this;try{if(t.buffer+=t.decoder.decode(),(t.cue||"HEADER"===t.state)&&(t.buffer+="\n\n",t.parse()),"INITIAL"===t.state)throw new _t(_t.Errors.BadSignature)}catch(e){t.reportOrThrowError(e)}return t.onflush&&t.onflush(),this}};var Ar=Ot,Pr="auto",Mr={"":!0,lr:!0,rl:!0},Or={start:!0,middle:!0,end:!0,left:!0,right:!0};Lt.prototype.getCueAsHTML=function(){return WebVTT.convertCueToDOMTree(window,this.text)};var Nr=Lt,Ir={"":!0,up:!0},Dr=Ft,Lr=t(function(t){var e=t.exports={WebVTT:Ar,VTTCue:Nr,VTTRegion:Dr};oe.vttjs=e,oe.WebVTT=e.WebVTT;var n=e.VTTCue,r=e.VTTRegion,i=oe.VTTCue,o=oe.VTTRegion;e.shim=function(){oe.VTTCue=n,oe.VTTRegion=r},e.restore=function(){oe.VTTCue=i,oe.VTTRegion=o},oe.VTTCue||e.shim()}),Rr=function(t){function e(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){};De(this,e),n.reportTouchActivity=!1;var i=Re(this,t.call(this,null,n,r));return i.hasStarted_=!1,i.on("playing",function(){this.hasStarted_=!0}),i.on("loadstart",function(){this.hasStarted_=!1}),Cr.names.forEach(function(t){var e=Cr[t];n&&n[e.getterName]&&(i[e.privateName]=n[e.getterName])}),i.featuresProgressEvents||i.manualProgressOn(),i.featuresTimeupdateEvents||i.manualTimeUpdatesOn(),["Text","Audio","Video"].forEach(function(t){!1===n["native"+t+"Tracks"]&&(i["featuresNative"+t+"Tracks"]=!1)}),!1===n.nativeCaptions||!1===n.nativeTextTracks?i.featuresNativeTextTracks=!1:!0!==n.nativeCaptions&&!0!==n.nativeTextTracks||(i.featuresNativeTextTracks=!0),i.featuresNativeTextTracks||i.emulateTextTracks(),i.autoRemoteTextTracks_=new Cr.text.ListClass,i.initTrackListeners(),n.nativeControlsForTouch||i.emitTapEvents(),i.constructor&&(i.name_=i.constructor.name||"Unknown Tech"),i}return Le(e,t),e.prototype.manualProgressOn=function(){this.on("durationchange",this.onDurationChange),this.manualProgress=!0,this.one("ready",this.trackProgress)},e.prototype.manualProgressOff=function(){this.manualProgress=!1,this.stopTrackingProgress(),this.off("durationchange",this.onDurationChange)},e.prototype.trackProgress=function(t){this.stopTrackingProgress(),this.progressInterval=this.setInterval(cn(this,function(){var t=this.bufferedPercent();this.bufferedPercent_!==t&&this.trigger("progress"),this.bufferedPercent_=t,1===t&&this.stopTrackingProgress()}),500)},e.prototype.onDurationChange=function(t){this.duration_=this.duration()},e.prototype.buffered=function(){return rt(0,0)},e.prototype.bufferedPercent=function(){return it(this.buffered(),this.duration_)},e.prototype.stopTrackingProgress=function(){this.clearInterval(this.progressInterval)},e.prototype.manualTimeUpdatesOn=function(){this.manualTimeUpdates=!0,this.on("play",this.trackCurrentTime),this.on("pause",this.stopTrackingCurrentTime)},e.prototype.manualTimeUpdatesOff=function(){this.manualTimeUpdates=!1,this.stopTrackingCurrentTime(),this.off("play",this.trackCurrentTime),this.off("pause",this.stopTrackingCurrentTime)},e.prototype.trackCurrentTime=function(){this.currentTimeInterval&&this.stopTrackingCurrentTime(),this.currentTimeInterval=this.setInterval(function(){this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},250)},e.prototype.stopTrackingCurrentTime=function(){this.clearInterval(this.currentTimeInterval),this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},e.prototype.dispose=function(){this.clearTracks(br.names),this.manualProgress&&this.manualProgressOff(),this.manualTimeUpdates&&this.manualTimeUpdatesOff(),t.prototype.dispose.call(this)},e.prototype.clearTracks=function(t){var e=this;t=[].concat(t),t.forEach(function(t){for(var n=e[t+"Tracks"]()||[],r=n.length;r--;){var i=n[r];"text"===t&&e.removeRemoteTextTrack(i),n.removeTrack(i)}})},e.prototype.cleanupAutoTextTracks=function(){for(var t=this.autoRemoteTextTracks_||[],e=t.length;e--;){var n=t[e];this.removeRemoteTextTrack(n)}},e.prototype.reset=function(){},e.prototype.error=function(t){return void 0!==t&&(this.error_=new ot(t),this.trigger("error")),this.error_},e.prototype.played=function(){return this.hasStarted_?rt(0,0):rt()},e.prototype.setCurrentTime=function(){this.manualTimeUpdates&&this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},e.prototype.initTrackListeners=function(){var t=this;
vendor: 39,923 bytes, lines 16310-16311
16310br.names.forEach(function(e){var n=br[e],r=function(){t.trigger(e+"trackchange")},i=t[n.getterName]();i.addEventListener("removetrack",r),i.addEventListener("addtrack",r),t.on("dispose",function(){i.removeEventListener("removetrack",r),i.removeEventListener("addtrack",r)})})},e.prototype.addWebVttScript_=function(){var t=this;if(!oe.WebVTT)if(ue.body.contains(this.el())){if(!this.options_["vtt.js"]&&o(Lr)&&Object.keys(Lr).length>0)return void this.trigger("vttjsloaded");var e=ue.createElement("script");e.src=this.options_["vtt.js"]||"https://vjs.zencdn.net/vttjs/0.12.4/vtt.min.js",e.onload=function(){t.trigger("vttjsloaded")},e.onerror=function(){t.trigger("vttjserror")},this.on("dispose",function(){e.onload=null,e.onerror=null}),oe.WebVTT=!0,this.el().parentNode.appendChild(e)}else this.ready(this.addWebVttScript_)},e.prototype.emulateTextTracks=function(){var t=this,e=this.textTracks(),n=this.remoteTextTracks(),r=function(t){return e.addTrack(t.track)},i=function(t){return e.removeTrack(t.track)};n.on("addtrack",r),n.on("removetrack",i),this.addWebVttScript_();var o=function(){return t.trigger("texttrackchange")},s=function(){o();for(var t=0;t<e.length;t++){var n=e[t];n.removeEventListener("cuechange",o),"showing"===n.mode&&n.addEventListener("cuechange",o)}};s(),e.addEventListener("change",s),e.addEventListener("addtrack",s),e.addEventListener("removetrack",s),this.on("dispose",function(){n.off("addtrack",r),n.off("removetrack",i),e.removeEventListener("change",s),e.removeEventListener("addtrack",s),e.removeEventListener("removetrack",s);for(var t=0;t<e.length;t++){e[t].removeEventListener("cuechange",o)}})},e.prototype.addTextTrack=function(t,e,n){if(!t)throw new Error("TextTrack kind is required but was not provided");return Vt(this,t,e,n)},e.prototype.createRemoteTextTrack=function(t){var e=Z(t,{tech:this});return new Tr.remoteTextEl.TrackClass(e)},e.prototype.addRemoteTextTrack=function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments[1],r=this.createRemoteTextTrack(e);return!0!==n&&!1!==n&&(Xe.warn('Calling addRemoteTextTrack without explicitly setting the "manualCleanup" parameter to `true` is deprecated and default to `false` in future version of video.js'),n=!0),this.remoteTextTrackEls().addTrackElement_(r),this.remoteTextTracks().addTrack(r.track),!0!==n&&this.ready(function(){return t.autoRemoteTextTracks_.addTrack(r.track)}),r},e.prototype.removeRemoteTextTrack=function(t){var e=this.remoteTextTrackEls().getTrackElementByTrack_(t);this.remoteTextTrackEls().removeTrackElement_(e),this.remoteTextTracks().removeTrack(t),this.autoRemoteTextTracks_.removeTrack(t)},e.prototype.getVideoPlaybackQuality=function(){return{}},e.prototype.setPoster=function(){},e.prototype.playsinline=function(){},e.prototype.setPlaysinline=function(){},e.prototype.canPlayType=function(){return""},e.canPlayType=function(){return""},e.canPlaySource=function(t,n){return e.canPlayType(t.type)},e.isTech=function(t){return t.prototype instanceof e||t instanceof e||t===e},e.registerTech=function(t,n){if(e.techs_||(e.techs_={}),!e.isTech(n))throw new Error("Tech "+t+" must be a Tech");if(!e.canPlayType)throw new Error("Techs must have a static canPlayType method on them");if(!e.canPlaySource)throw new Error("Techs must have a static canPlaySource method on them");return t=J(t),e.techs_[t]=n,"Tech"!==t&&e.defaultTechOrder_.push(t),n},e.getTech=function(t){if(t)return t=J(t),e.techs_&&e.techs_[t]?e.techs_[t]:oe&&oe.videojs&&oe.videojs[t]?(Xe.warn("The "+t+" tech was added to the videojs object when it should be registered using videojs.registerTech(name, tech)"),oe.videojs[t]):void 0},e}(Tn);Cr.names.forEach(function(t){var e=Cr[t];Rr.prototype[e.getterName]=function(){return this[e.privateName]=this[e.privateName]||new e.ListClass,this[e.privateName]}}),Rr.prototype.featuresVolumeControl=!0,Rr.prototype.featuresFullscreenResize=!1,Rr.prototype.featuresPlaybackRate=!1,Rr.prototype.featuresProgressEvents=!1,Rr.prototype.featuresTimeupdateEvents=!1,Rr.prototype.featuresNativeTextTracks=!1,Rr.withSourceHandlers=function(t){t.registerSourceHandler=function(e,n){var r=t.sourceHandlers;r||(r=t.sourceHandlers=[]),void 0===n&&(n=r.length),r.splice(n,0,e)},t.canPlayType=function(e){for(var n=t.sourceHandlers||[],r=void 0,i=0;i<n.length;i++)if(r=n[i].canPlayType(e))return r;return""},t.selectSourceHandler=function(e,n){for(var r=t.sourceHandlers||[],i=0;i<r.length;i++)if(r[i].canHandleSource(e,n))return r[i];return null},t.canPlaySource=function(e,n){var r=t.selectSourceHandler(e,n);return r?r.canHandleSource(e,n):""},["seekable","duration"].forEach(function(t){var e=this[t];"function"==typeof e&&(this[t]=function(){return this.sourceHandler_&&this.sourceHandler_[t]?this.sourceHandler_[t].apply(this.sourceHandler_,arguments):e.apply(this,arguments)})},t.prototype),t.prototype.setSource=function(e){var n=t.selectSourceHandler(e,this.options_);n||(t.nativeSourceHandler?n=t.nativeSourceHandler:Xe.error("No source hander found for the current source.")),this.disposeSourceHandler(),this.off("dispose",this.disposeSourceHandler),n!==t.nativeSourceHandler&&(this.currentSource_=e),this.sourceHandler_=n.handleSource(e,this,this.options_),this.on("dispose",this.disposeSourceHandler)},t.prototype.disposeSourceHandler=function(){this.currentSource_&&(this.clearTracks(["audio","video"]),this.currentSource_=null),this.cleanupAutoTextTracks(),this.sourceHandler_&&(this.sourceHandler_.dispose&&this.sourceHandler_.dispose(),this.sourceHandler_=null)}},Tn.registerComponent("Tech",Rr),Rr.registerTech("Tech",Rr),Rr.defaultTechOrder_=[];var Br={},Fr={buffered:1,currentTime:1,duration:1,seekable:1,played:1},Vr={setCurrentTime:1},Hr=function t(e){if(Array.isArray(e)){var n=[];e.forEach(function(e){e=t(e),Array.isArray(e)?n=n.concat(e):i(e)&&n.push(e)}),e=n}else e="string"==typeof e&&e.trim()?[{src:e}]:i(e)&&"string"==typeof e.src&&e.src&&e.src.trim()?[e]:[];return e},Ur=function(t){function e(n,r,i){De(this,e);var o=Z({createEl:!1},r),s=Re(this,t.call(this,n,o,i));if(r.playerOptions.sources&&0!==r.playerOptions.sources.length)n.src(r.playerOptions.sources);else for(var a=0,l=r.playerOptions.techOrder;a<l.length;a++){var c=J(l[a]),u=Rr.getTech(c);if(c||(u=Tn.getComponent(c)),u&&u.isSupported()){n.loadTech_(c);break}}return s}return Le(e,t),e}(Tn);Tn.registerComponent("MediaLoader",Ur);var Wr=function(t){function e(n,r){De(this,e);var i=Re(this,t.call(this,n,r));return i.emitTapEvents(),i.enable(),i}return Le(e,t),e.prototype.createEl=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"div",n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};n=r({innerHTML:'<span aria-hidden="true" class="vjs-icon-placeholder"></span>',className:this.buildCSSClass(),tabIndex:0},n),"button"===e&&Xe.error("Creating a ClickableComponent with an HTML element of "+e+" is not supported; use a Button instead."),i=r({role:"button","aria-live":"polite"},i),this.tabIndex_=n.tabIndex;var o=t.prototype.createEl.call(this,e,n,i);return this.createControlTextEl(o),o},e.prototype.createControlTextEl=function(t){return this.controlTextEl_=v("span",{className:"vjs-control-text"}),t&&t.appendChild(this.controlTextEl_),this.controlText(this.controlText_,t),this.controlTextEl_},e.prototype.controlText=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.el();if(!t)return this.controlText_||"Need Text";var n=this.localize(t);this.controlText_=t,y(this.controlTextEl_,n),this.nonIconControl||e.setAttribute("title",n)},e.prototype.buildCSSClass=function(){return"vjs-control vjs-button "+t.prototype.buildCSSClass.call(this)},e.prototype.enable=function(){this.enabled_||(this.enabled_=!0,this.removeClass("vjs-disabled"),this.el_.setAttribute("aria-disabled","false"),void 0!==this.tabIndex_&&this.el_.setAttribute("tabIndex",this.tabIndex_),this.on(["tap","click"],this.handleClick),this.on("focus",this.handleFocus),this.on("blur",this.handleBlur))},e.prototype.disable=function(){this.enabled_=!1,this.addClass("vjs-disabled"),this.el_.setAttribute("aria-disabled","true"),void 0!==this.tabIndex_&&this.el_.removeAttribute("tabIndex"),this.off(["tap","click"],this.handleClick),this.off("focus",this.handleFocus),this.off("blur",this.handleBlur)},e.prototype.handleClick=function(t){},e.prototype.handleFocus=function(t){z(ue,"keydown",cn(this,this.handleKeyPress))},e.prototype.handleKeyPress=function(e){32===e.which||13===e.which?(e.preventDefault(),this.trigger("click")):t.prototype.handleKeyPress&&t.prototype.handleKeyPress.call(this,e)},e.prototype.handleBlur=function(t){X(ue,"keydown",cn(this,this.handleKeyPress))},e}(Tn);Tn.registerComponent("ClickableComponent",Wr);var zr=function(t){function e(n,r){De(this,e);var i=Re(this,t.call(this,n,r));return i.update(),n.on("posterchange",cn(i,i.update)),i}return Le(e,t),e.prototype.dispose=function(){this.player().off("posterchange",this.update),t.prototype.dispose.call(this)},e.prototype.createEl=function(){var t=v("div",{className:"vjs-poster",tabIndex:-1});return Oe||(this.fallbackImg_=v("img"),t.appendChild(this.fallbackImg_)),t},e.prototype.update=function(t){var e=this.player().poster();this.setSrc(e),e?this.show():this.hide()},e.prototype.setSrc=function(t){if(this.fallbackImg_)this.fallbackImg_.src=t;else{var e="";t&&(e='url("'+t+'")'),this.el_.style.backgroundImage=e}},e.prototype.handleClick=function(t){this.player_.controls()&&(this.player_.paused()?this.player_.play():this.player_.pause())},e}(Wr);Tn.registerComponent("PosterImage",zr);var Xr={monospace:"monospace",sansSerif:"sans-serif",serif:"serif",monospaceSansSerif:'"Andale Mono", "Lucida Console", monospace',monospaceSerif:'"Courier New", monospace',proportionalSansSerif:"sans-serif",proportionalSerif:"serif",casual:'"Comic Sans MS", Impact, fantasy',script:'"Monotype Corsiva", cursive',smallcaps:'"Andale Mono", "Lucida Console", monospace, sans-serif'},qr=function(t){function e(n,r,i){De(this,e);var o=Re(this,t.call(this,n,r,i));return n.on("loadstart",cn(o,o.toggleDisplay)),n.on("texttrackchange",cn(o,o.updateDisplay)),n.on("loadstart",cn(o,o.preselectTrack)),n.ready(cn(o,function(){if(n.tech_&&n.tech_.featuresNativeTextTracks)return void this.hide();n.on("fullscreenchange",cn(this,this.updateDisplay));for(var t=this.options_.playerOptions.tracks||[],e=0;e<t.length;e++)this.player_.addRemoteTextTrack(t[e],!0);this.preselectTrack()})),o}return Le(e,t),e.prototype.preselectTrack=function(){for(var t={captions:1,subtitles:1},e=this.player_.textTracks(),n=this.player_.cache_.selectedLanguage,r=void 0,i=void 0,o=void 0,s=0;s<e.length;s++){var a=e[s];n&&n.enabled&&n.language===a.language?a.kind===n.kind?o=a:o||(o=a):n&&!n.enabled?(o=null,r=null,i=null):a.default&&("descriptions"!==a.kind||r?a.kind in t&&!i&&(i=a):r=a)}o?o.mode="showing":i?i.mode="showing":r&&(r.mode="showing")},e.prototype.toggleDisplay=function(){this.player_.tech_&&this.player_.tech_.featuresNativeTextTracks?this.hide():this.show()},e.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-text-track-display"},{"aria-live":"off","aria-atomic":"true"})},e.prototype.clearDisplay=function(){"function"==typeof oe.WebVTT&&oe.WebVTT.processCues(oe,[],this.el_)},e.prototype.updateDisplay=function(){var t=this.player_.textTracks();this.clearDisplay();for(var e=null,n=null,r=t.length;r--;){var i=t[r];"showing"===i.mode&&("descriptions"===i.kind?e=i:n=i)}n?("off"!==this.getAttribute("aria-live")&&this.setAttribute("aria-live","off"),this.updateForTrack(n)):e&&("assertive"!==this.getAttribute("aria-live")&&this.setAttribute("aria-live","assertive"),this.updateForTrack(e))},e.prototype.updateForTrack=function(t){if("function"==typeof oe.WebVTT&&t.activeCues){for(var e=this.player_.textTrackSettings.getValues(),n=[],r=0;r<t.activeCues.length;r++)n.push(t.activeCues[r]);oe.WebVTT.processCues(oe,n,this.el_);for(var i=n.length;i--;){var o=n[i];if(o){var s=o.displayState;if(e.color&&(s.firstChild.style.color=e.color),e.textOpacity&&Gt(s.firstChild,"color",Yt(e.color||"#fff",e.textOpacity)),e.backgroundColor&&(s.firstChild.style.backgroundColor=e.backgroundColor),e.backgroundOpacity&&Gt(s.firstChild,"backgroundColor",Yt(e.backgroundColor||"#000",e.backgroundOpacity)),e.windowColor&&(e.windowOpacity?Gt(s,"backgroundColor",Yt(e.windowColor,e.windowOpacity)):s.style.backgroundColor=e.windowColor),e.edgeStyle&&("dropshadow"===e.edgeStyle?s.firstChild.style.textShadow="2px 2px 3px #222, 2px 2px 4px #222, 2px 2px 5px #222":"raised"===e.edgeStyle?s.firstChild.style.textShadow="1px 1px #222, 2px 2px #222, 3px 3px #222":"depressed"===e.edgeStyle?s.firstChild.style.textShadow="1px 1px #ccc, 0 1px #ccc, -1px -1px #222, 0 -1px #222":"uniform"===e.edgeStyle&&(s.firstChild.style.textShadow="0 0 4px #222, 0 0 4px #222, 0 0 4px #222, 0 0 4px #222")),e.fontPercent&&1!==e.fontPercent){var a=oe.parseFloat(s.style.fontSize);s.style.fontSize=a*e.fontPercent+"px",s.style.height="auto",s.style.top="auto",s.style.bottom="2px"}e.fontFamily&&"default"!==e.fontFamily&&("small-caps"===e.fontFamily?s.firstChild.style.fontVariant="small-caps":s.firstChild.style.fontFamily=Xr[e.fontFamily])}}}},e}(Tn);Tn.registerComponent("TextTrackDisplay",qr);var Kr=function(t){function e(){return De(this,e),Re(this,t.apply(this,arguments))}return Le(e,t),e.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-loading-spinner",dir:"ltr"})},e}(Tn);Tn.registerComponent("LoadingSpinner",Kr);var Yr=function(t){function e(){return De(this,e),Re(this,t.apply(this,arguments))}return Le(e,t),e.prototype.createEl=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};t="button",e=r({innerHTML:'<span aria-hidden="true" class="vjs-icon-placeholder"></span>',className:this.buildCSSClass()},e),n=r({type:"button","aria-live":"polite"},n);var i=Tn.prototype.createEl.call(this,t,e,n);return this.createControlTextEl(i),i},e.prototype.addChild=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.constructor.name;return Xe.warn("Adding an actionable (user controllable) child to a Button ("+n+") is not supported; use a ClickableComponent instead."),Tn.prototype.addChild.call(this,t,e)},e.prototype.enable=function(){t.prototype.enable.call(this),this.el_.removeAttribute("disabled")},e.prototype.disable=function(){t.prototype.disable.call(this),this.el_.setAttribute("disabled","disabled")},e.prototype.handleKeyPress=function(e){32!==e.which&&13!==e.which&&t.prototype.handleKeyPress.call(this,e)},e}(Wr);Tn.registerComponent("Button",Yr);var Gr=function(t){function e(n,r){De(this,e);var i=Re(this,t.call(this,n,r));return i.mouseused_=!1,i.on("mousedown",i.handleMouseDown),i}return Le(e,t),e.prototype.buildCSSClass=function(){return"vjs-big-play-button"},e.prototype.handleClick=function(t){var e=this.player_.play();if(!(this.mouseused_&&t.clientX&&t.clientY)){var n=this.player_.getChild("controlBar"),r=n&&n.getChild("playToggle");if(!r)return void this.player_.focus();var i=function(){return r.focus()};if(e&&e.then){var o=function(){};e.then(i,o)}else this.setTimeout(i,1)}},e.prototype.handleKeyPress=function(e){this.mouseused_=!1,t.prototype.handleKeyPress.call(this,e)},e.prototype.handleMouseDown=function(t){this.mouseused_=!0},e}(Yr);Gr.prototype.controlText_="Play Video",Tn.registerComponent("BigPlayButton",Gr);var $r=function(t){function e(n,r){De(this,e);var i=Re(this,t.call(this,n,r));return i.controlText(r&&r.controlText||i.localize("Close")),i}return Le(e,t),e.prototype.buildCSSClass=function(){return"vjs-close-button "+t.prototype.buildCSSClass.call(this)},e.prototype.handleClick=function(t){this.trigger({type:"close",bubbles:!1})},e}(Yr);Tn.registerComponent("CloseButton",$r);var Jr=function(t){function e(n,r){De(this,e);var i=Re(this,t.call(this,n,r));return i.on(n,"play",i.handlePlay),i.on(n,"pause",i.handlePause),i.on(n,"ended",i.handleEnded),i}return Le(e,t),e.prototype.buildCSSClass=function(){return"vjs-play-control "+t.prototype.buildCSSClass.call(this)},e.prototype.handleClick=function(t){this.player_.paused()?this.player_.play():this.player_.pause()},e.prototype.handleSeeked=function(t){this.removeClass("vjs-ended"),this.player_.paused()?this.handlePause(t):this.handlePlay(t)},e.prototype.handlePlay=function(t){this.removeClass("vjs-ended"),this.removeClass("vjs-paused"),this.addClass("vjs-playing"),this.controlText("Pause")},e.prototype.handlePause=function(t){this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.controlText("Play")},e.prototype.handleEnded=function(t){this.removeClass("vjs-playing"),this.addClass("vjs-ended"),this.controlText("Replay"),this.one(this.player_,"seeked",this.handleSeeked)},e}(Yr);Jr.prototype.controlText_="Play",Tn.registerComponent("PlayToggle",Jr);var Qr=function(t){function e(n,r){De(this,e);var i=Re(this,t.call(this,n,r));return i.throttledUpdateContent=un(cn(i,i.updateContent),25),i.on(n,"timeupdate",i.throttledUpdateContent),i}return Le(e,t),e.prototype.createEl=function(e){var n=this.buildCSSClass(),r=t.prototype.createEl.call(this,"div",{className:n+" vjs-time-control vjs-control"});return this.contentEl_=v("div",{className:n+"-display"},{"aria-live":"off"},v("span",{className:"vjs-control-text",textContent:this.localize(this.controlText_)})),this.updateTextNode_(),r.appendChild(this.contentEl_),r},e.prototype.updateTextNode_=function(){if(this.contentEl_){for(;this.contentEl_.firstChild;)this.contentEl_.removeChild(this.contentEl_.firstChild);this.textNode_=ue.createTextNode(this.formattedTime_||"0:00"),this.contentEl_.appendChild(this.textNode_)}},e.prototype.formatTime_=function(t){return $t(t)},e.prototype.updateFormattedTime_=function(t){var e=this.formatTime_(t);e!==this.formattedTime_&&(this.formattedTime_=e,this.requestAnimationFrame(this.updateTextNode_))},e.prototype.updateContent=function(t){},e}(Tn);Qr.prototype.controlText_="Time",
16311Tn.registerComponent("TimeDisplay",Qr);var Zr=function(t){function e(n,r){De(this,e);var i=Re(this,t.call(this,n,r));return i.on(n,"ended",i.handleEnded),i}return Le(e,t),e.prototype.buildCSSClass=function(){return"vjs-current-time"},e.prototype.updateContent=function(t){var e=this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime();this.updateFormattedTime_(e)},e.prototype.handleEnded=function(t){this.player_.duration()&&this.updateFormattedTime_(this.player_.duration())},e}(Qr);Zr.prototype.controlText_="Current Time",Tn.registerComponent("CurrentTimeDisplay",Zr);var ti=function(t){function e(n,r){De(this,e);var i=Re(this,t.call(this,n,r));return i.on(n,"durationchange",i.updateContent),i.on(n,"loadedmetadata",i.throttledUpdateContent),i}return Le(e,t),e.prototype.buildCSSClass=function(){return"vjs-duration"},e.prototype.updateContent=function(t){var e=this.player_.duration();e&&this.duration_!==e&&(this.duration_=e,this.updateFormattedTime_(e))},e}(Qr);ti.prototype.controlText_="Duration Time",Tn.registerComponent("DurationDisplay",ti);var ei=function(t){function e(){return De(this,e),Re(this,t.apply(this,arguments))}return Le(e,t),e.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-time-control vjs-time-divider",innerHTML:"<div><span>/</span></div>"})},e}(Tn);Tn.registerComponent("TimeDivider",ei);var ni=function(t){function e(n,r){De(this,e);var i=Re(this,t.call(this,n,r));return i.on(n,"durationchange",i.throttledUpdateContent),i.on(n,"ended",i.handleEnded),i}return Le(e,t),e.prototype.buildCSSClass=function(){return"vjs-remaining-time"},e.prototype.formatTime_=function(e){return"-"+t.prototype.formatTime_.call(this,e)},e.prototype.updateContent=function(t){this.player_.duration()&&(this.player_.remainingTimeDisplay?this.updateFormattedTime_(this.player_.remainingTimeDisplay()):this.updateFormattedTime_(this.player_.remainingTime()))},e.prototype.handleEnded=function(t){this.player_.duration()&&this.updateFormattedTime_(0)},e}(Qr);ni.prototype.controlText_="Remaining Time",Tn.registerComponent("RemainingTimeDisplay",ni);var ri=function(t){function e(n,r){De(this,e);var i=Re(this,t.call(this,n,r));return i.updateShowing(),i.on(i.player(),"durationchange",i.updateShowing),i}return Le(e,t),e.prototype.createEl=function(){var e=t.prototype.createEl.call(this,"div",{className:"vjs-live-control vjs-control"});return this.contentEl_=v("div",{className:"vjs-live-display",innerHTML:'<span class="vjs-control-text">'+this.localize("Stream Type")+"</span>"+this.localize("LIVE")},{"aria-live":"off"}),e.appendChild(this.contentEl_),e},e.prototype.updateShowing=function(t){this.player().duration()===1/0?this.show():this.hide()},e}(Tn);Tn.registerComponent("LiveDisplay",ri);var ii=function(t){function e(n,r){De(this,e);var i=Re(this,t.call(this,n,r));return i.bar=i.getChild(i.options_.barName),i.vertical(!!i.options_.vertical),i.enable(),i}return Le(e,t),e.prototype.enabled=function(){return this.enabled_},e.prototype.enable=function(){this.enabled()||(this.on("mousedown",this.handleMouseDown),this.on("touchstart",this.handleMouseDown),this.on("focus",this.handleFocus),this.on("blur",this.handleBlur),this.on("click",this.handleClick),this.on(this.player_,"controlsvisible",this.update),this.playerEvent&&this.on(this.player_,this.playerEvent,this.update),this.removeClass("disabled"),this.setAttribute("tabindex",0),this.enabled_=!0)},e.prototype.disable=function(){if(this.enabled()){var t=this.bar.el_.ownerDocument;this.off("mousedown",this.handleMouseDown),this.off("touchstart",this.handleMouseDown),this.off("focus",this.handleFocus),this.off("blur",this.handleBlur),this.off("click",this.handleClick),this.off(this.player_,"controlsvisible",this.update),this.off(t,"mousemove",this.handleMouseMove),this.off(t,"mouseup",this.handleMouseUp),this.off(t,"touchmove",this.handleMouseMove),this.off(t,"touchend",this.handleMouseUp),this.removeAttribute("tabindex"),this.addClass("disabled"),this.playerEvent&&this.off(this.player_,this.playerEvent,this.update),this.enabled_=!1}},e.prototype.createEl=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return n.className=n.className+" vjs-slider",n=r({tabIndex:0},n),i=r({role:"slider","aria-valuenow":0,"aria-valuemin":0,"aria-valuemax":100,tabIndex:0},i),t.prototype.createEl.call(this,e,n,i)},e.prototype.handleMouseDown=function(t){var e=this.bar.el_.ownerDocument;t.preventDefault(),x(),this.addClass("vjs-sliding"),this.trigger("slideractive"),this.on(e,"mousemove",this.handleMouseMove),this.on(e,"mouseup",this.handleMouseUp),this.on(e,"touchmove",this.handleMouseMove),this.on(e,"touchend",this.handleMouseUp),this.handleMouseMove(t)},e.prototype.handleMouseMove=function(t){},e.prototype.handleMouseUp=function(){var t=this.bar.el_.ownerDocument;j(),this.removeClass("vjs-sliding"),this.trigger("sliderinactive"),this.off(t,"mousemove",this.handleMouseMove),this.off(t,"mouseup",this.handleMouseUp),this.off(t,"touchmove",this.handleMouseMove),this.off(t,"touchend",this.handleMouseUp),this.update()},e.prototype.update=function(){if(this.el_){var t=this.getPercent(),e=this.bar;if(e){("number"!=typeof t||t!==t||t<0||t===1/0)&&(t=0);var n=(100*t).toFixed(2)+"%",r=e.el().style;return this.vertical()?r.height=n:r.width=n,t}}},e.prototype.calculateDistance=function(t){var e=M(this.el_,t);return this.vertical()?e.y:e.x},e.prototype.handleFocus=function(){this.on(this.bar.el_.ownerDocument,"keydown",this.handleKeyPress)},e.prototype.handleKeyPress=function(t){37===t.which||40===t.which?(t.preventDefault(),this.stepBack()):38!==t.which&&39!==t.which||(t.preventDefault(),this.stepForward())},e.prototype.handleBlur=function(){this.off(this.bar.el_.ownerDocument,"keydown",this.handleKeyPress)},e.prototype.handleClick=function(t){t.stopImmediatePropagation(),t.preventDefault()},e.prototype.vertical=function(t){if(void 0===t)return this.vertical_||!1;this.vertical_=!!t,this.vertical_?this.addClass("vjs-slider-vertical"):this.addClass("vjs-slider-horizontal")},e}(Tn);Tn.registerComponent("Slider",ii);var oi=function(t){function e(n,r){De(this,e);var i=Re(this,t.call(this,n,r));return i.partEls_=[],i.on(n,"progress",i.update),i}return Le(e,t),e.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-load-progress",innerHTML:'<span class="vjs-control-text"><span>'+this.localize("Loaded")+"</span>: 0%</span>"})},e.prototype.update=function(t){var e=this.player_.buffered(),n=this.player_.duration(),r=this.player_.bufferedEnd(),i=this.partEls_,o=function(t,e){var n=t/e||0;return 100*(n>=1?1:n)+"%"};this.el_.style.width=o(r,n);for(var s=0;s<e.length;s++){var a=e.start(s),l=e.end(s),c=i[s];c||(c=this.el_.appendChild(v()),i[s]=c),c.style.left=o(a,r),c.style.width=o(l-a,r)}for(var u=i.length;u>e.length;u--)this.el_.removeChild(i[u-1]);i.length=e.length},e}(Tn);Tn.registerComponent("LoadProgressBar",oi);var si=function(t){function e(){return De(this,e),Re(this,t.apply(this,arguments))}return Le(e,t),e.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-time-tooltip"})},e.prototype.update=function(t,e,n){var r=A(this.el_),i=A(this.player_.el()),o=t.width*e;if(i&&r){var s=t.left-i.left+o,a=t.width-o+(i.right-t.right),l=r.width/2;s<l?l+=l-s:a<l&&(l=a),l<0?l=0:l>r.width&&(l=r.width),this.el_.style.right="-"+l+"px",y(this.el_,n)}},e}(Tn);Tn.registerComponent("TimeTooltip",si);var ai=function(t){function e(){return De(this,e),Re(this,t.apply(this,arguments))}return Le(e,t),e.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-play-progress vjs-slider-bar",innerHTML:'<span class="vjs-control-text"><span>'+this.localize("Progress")+"</span>: 0%</span>"})},e.prototype.update=function(t,e){var n=this;this.rafId_&&this.cancelAnimationFrame(this.rafId_),this.rafId_=this.requestAnimationFrame(function(){var r=n.player_.scrubbing()?n.player_.getCache().currentTime:n.player_.currentTime(),i=$t(r,n.player_.duration()),o=n.getChild("timeTooltip");o&&o.update(t,e,i)})},e}(Tn);ai.prototype.options_={children:[]},je&&!(je>8)||ge||_e||ai.prototype.options_.children.push("timeTooltip"),Tn.registerComponent("PlayProgressBar",ai);var li=function(t){function e(n,r){De(this,e);var i=Re(this,t.call(this,n,r));return i.update=un(cn(i,i.update),25),i}return Le(e,t),e.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-mouse-display"})},e.prototype.update=function(t,e){var n=this;this.rafId_&&this.cancelAnimationFrame(this.rafId_),this.rafId_=this.requestAnimationFrame(function(){var r=n.player_.duration(),i=$t(e*r,r);n.el_.style.left=t.width*e+"px",n.getChild("timeTooltip").update(t,e,i)})},e}(Tn);li.prototype.options_={children:["timeTooltip"]},Tn.registerComponent("MouseTimeDisplay",li);var ci=function(t){function e(n,r){De(this,e);var i=Re(this,t.call(this,n,r));return i.update=un(cn(i,i.update),50),i.on(n,"timeupdate",i.update),i.on(n,"ended",i.handleEnded),i}return Le(e,t),e.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-progress-holder"},{"aria-label":this.localize("Progress Bar")})},e.prototype.update_=function(t,e){var n=this.player_.duration();this.el_.setAttribute("aria-valuenow",(100*e).toFixed(2)),this.el_.setAttribute("aria-valuetext",this.localize("progress bar timing: currentTime={1} duration={2}",[$t(t,n),$t(n,n)],"{1} of {2}")),this.bar.update(A(this.el_),e)},e.prototype.update=function(e){var n=t.prototype.update.call(this);return this.update_(this.getCurrentTime_(),n),n},e.prototype.getCurrentTime_=function(){return this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime()},e.prototype.handleEnded=function(t){this.update_(this.player_.duration(),1)},e.prototype.getPercent=function(){var t=this.getCurrentTime_()/this.player_.duration();return t>=1?1:t},e.prototype.handleMouseDown=function(e){this.player_.scrubbing(!0),this.videoWasPlaying=!this.player_.paused(),this.player_.pause(),t.prototype.handleMouseDown.call(this,e)},e.prototype.handleMouseMove=function(t){var e=this.calculateDistance(t)*this.player_.duration();e===this.player_.duration()&&(e-=.1),this.player_.currentTime(e)},e.prototype.enable=function(){t.prototype.enable.call(this);var e=this.getChild("mouseTimeDisplay");e&&e.show()},e.prototype.disable=function(){t.prototype.disable.call(this);var e=this.getChild("mouseTimeDisplay");e&&e.hide()},e.prototype.handleMouseUp=function(e){t.prototype.handleMouseUp.call(this,e),this.player_.scrubbing(!1),this.videoWasPlaying&&this.player_.play()},e.prototype.stepForward=function(){this.player_.currentTime(this.player_.currentTime()+5)},e.prototype.stepBack=function(){this.player_.currentTime(this.player_.currentTime()-5)},e.prototype.handleAction=function(t){this.player_.paused()?this.player_.play():this.player_.pause()},e.prototype.handleKeyPress=function(e){32===e.which||13===e.which?(e.preventDefault(),this.handleAction(e)):t.prototype.handleKeyPress&&t.prototype.handleKeyPress.call(this,e)},e}(ii);ci.prototype.options_={children:["loadProgressBar","playProgressBar"],barName:"playProgressBar"},je&&!(je>8)||ge||_e||ci.prototype.options_.children.splice(1,0,"mouseTimeDisplay"),ci.prototype.playerEvent="timeupdate",Tn.registerComponent("SeekBar",ci);var ui=function(t){function e(n,r){De(this,e);var i=Re(this,t.call(this,n,r));return i.handleMouseMove=un(cn(i,i.handleMouseMove),25),i.throttledHandleMouseSeek=un(cn(i,i.handleMouseSeek),25),i.enable(),i}return Le(e,t),e.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-progress-control vjs-control"})},e.prototype.handleMouseMove=function(t){var e=this.getChild("seekBar"),n=e.getChild("mouseTimeDisplay"),r=e.el(),i=A(r),o=M(r,t).x;o>1?o=1:o<0&&(o=0),n&&n.update(i,o)},e.prototype.handleMouseSeek=function(t){this.getChild("seekBar").handleMouseMove(t)},e.prototype.enabled=function(){return this.enabled_},e.prototype.disable=function(){this.children().forEach(function(t){return t.disable&&t.disable()}),this.enabled()&&(this.off(["mousedown","touchstart"],this.handleMouseDown),this.off(this.el_,"mousemove",this.handleMouseMove),this.handleMouseUp(),this.addClass("disabled"),this.enabled_=!1)},e.prototype.enable=function(){this.children().forEach(function(t){return t.enable&&t.enable()}),this.enabled()||(this.on(["mousedown","touchstart"],this.handleMouseDown),this.on(this.el_,"mousemove",this.handleMouseMove),this.removeClass("disabled"),this.enabled_=!0)},e.prototype.handleMouseDown=function(t){var e=this.el_.ownerDocument;this.on(e,"mousemove",this.throttledHandleMouseSeek),this.on(e,"touchmove",this.throttledHandleMouseSeek),this.on(e,"mouseup",this.handleMouseUp),this.on(e,"touchend",this.handleMouseUp)},e.prototype.handleMouseUp=function(t){var e=this.el_.ownerDocument;this.off(e,"mousemove",this.throttledHandleMouseSeek),this.off(e,"touchmove",this.throttledHandleMouseSeek),this.off(e,"mouseup",this.handleMouseUp),this.off(e,"touchend",this.handleMouseUp)},e}(Tn);ui.prototype.options_={children:["seekBar"]},Tn.registerComponent("ProgressControl",ui);var hi=function(t){function e(n,r){De(this,e);var i=Re(this,t.call(this,n,r));return i.on(n,"fullscreenchange",i.handleFullscreenChange),i}return Le(e,t),e.prototype.buildCSSClass=function(){return"vjs-fullscreen-control "+t.prototype.buildCSSClass.call(this)},e.prototype.handleFullscreenChange=function(t){this.player_.isFullscreen()?this.controlText("Non-Fullscreen"):this.controlText("Fullscreen")},e.prototype.handleClick=function(t){this.player_.isFullscreen()?this.player_.exitFullscreen():this.player_.requestFullscreen()},e}(Yr);hi.prototype.controlText_="Fullscreen",Tn.registerComponent("FullscreenToggle",hi);var pi=function(t,e){e.tech_&&!e.tech_.featuresVolumeControl&&t.addClass("vjs-hidden"),t.on(e,"loadstart",function(){e.tech_.featuresVolumeControl?t.removeClass("vjs-hidden"):t.addClass("vjs-hidden")})},di=function(t){function e(){return De(this,e),Re(this,t.apply(this,arguments))}return Le(e,t),e.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-volume-level",innerHTML:'<span class="vjs-control-text"></span>'})},e}(Tn);Tn.registerComponent("VolumeLevel",di);var fi=function(t){function e(n,r){De(this,e);var i=Re(this,t.call(this,n,r));return i.on("slideractive",i.updateLastVolume_),i.on(n,"volumechange",i.updateARIAAttributes),n.ready(function(){return i.updateARIAAttributes()}),i}return Le(e,t),e.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-volume-bar vjs-slider-bar"},{"aria-label":this.localize("Volume Level"),"aria-live":"polite"})},e.prototype.handleMouseMove=function(t){this.checkMuted(),this.player_.volume(this.calculateDistance(t))},e.prototype.checkMuted=function(){this.player_.muted()&&this.player_.muted(!1)},e.prototype.getPercent=function(){return this.player_.muted()?0:this.player_.volume()},e.prototype.stepForward=function(){this.checkMuted(),this.player_.volume(this.player_.volume()+.1)},e.prototype.stepBack=function(){this.checkMuted(),this.player_.volume(this.player_.volume()-.1)},e.prototype.updateARIAAttributes=function(t){var e=this.player_.muted()?0:this.volumeAsPercentage_();this.el_.setAttribute("aria-valuenow",e),this.el_.setAttribute("aria-valuetext",e+"%")},e.prototype.volumeAsPercentage_=function(){return Math.round(100*this.player_.volume())},e.prototype.updateLastVolume_=function(){var t=this,e=this.player_.volume();this.one("sliderinactive",function(){0===t.player_.volume()&&t.player_.lastVolume_(e)})},e}(ii);fi.prototype.options_={children:["volumeLevel"],barName:"volumeLevel"},fi.prototype.playerEvent="volumechange",Tn.registerComponent("VolumeBar",fi);var vi=function(t){function e(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};De(this,e),r.vertical=r.vertical||!1,(void 0===r.volumeBar||o(r.volumeBar))&&(r.volumeBar=r.volumeBar||{},r.volumeBar.vertical=r.vertical);var i=Re(this,t.call(this,n,r));return pi(i,n),i.throttledHandleMouseMove=un(cn(i,i.handleMouseMove),25),i.on("mousedown",i.handleMouseDown),i.on("touchstart",i.handleMouseDown),i.on(i.volumeBar,["focus","slideractive"],function(){i.volumeBar.addClass("vjs-slider-active"),i.addClass("vjs-slider-active"),i.trigger("slideractive")}),i.on(i.volumeBar,["blur","sliderinactive"],function(){i.volumeBar.removeClass("vjs-slider-active"),i.removeClass("vjs-slider-active"),i.trigger("sliderinactive")}),i}return Le(e,t),e.prototype.createEl=function(){var e="vjs-volume-horizontal";return this.options_.vertical&&(e="vjs-volume-vertical"),t.prototype.createEl.call(this,"div",{className:"vjs-volume-control vjs-control "+e})},e.prototype.handleMouseDown=function(t){var e=this.el_.ownerDocument;this.on(e,"mousemove",this.throttledHandleMouseMove),this.on(e,"touchmove",this.throttledHandleMouseMove),this.on(e,"mouseup",this.handleMouseUp),this.on(e,"touchend",this.handleMouseUp)},e.prototype.handleMouseUp=function(t){var e=this.el_.ownerDocument;this.off(e,"mousemove",this.throttledHandleMouseMove),this.off(e,"touchmove",this.throttledHandleMouseMove),this.off(e,"mouseup",this.handleMouseUp),this.off(e,"touchend",this.handleMouseUp)},e.prototype.handleMouseMove=function(t){this.volumeBar.handleMouseMove(t)},e}(Tn);vi.prototype.options_={children:["volumeBar"]},Tn.registerComponent("VolumeControl",vi);var yi=function(t){function e(n,r){De(this,e);var i=Re(this,t.call(this,n,r));return pi(i,n),i.on(n,["loadstart","volumechange"],i.update),i}return Le(e,t),e.prototype.buildCSSClass=function(){return"vjs-mute-control "+t.prototype.buildCSSClass.call(this)},e.prototype.handleClick=function(t){var e=this.player_.volume(),n=this.player_.lastVolume_();if(0===e){var r=n<.1?.1:n;this.player_.volume(r),this.player_.muted(!1)}else this.player_.muted(!this.player_.muted())},e.prototype.update=function(t){this.updateIcon_(),this.updateControlText_()},e.prototype.updateIcon_=function(){var t=this.player_.volume(),e=3;0===t||this.player_.muted()?e=0:t<.33?e=1:t<.67&&(e=2);for(var n=0;n<4;n++)b(this.el_,"vjs-vol-"+n);_(this.el_,"vjs-vol-"+e)},e.prototype.updateControlText_=function(){var t=this.player_.muted()||0===this.player_.volume(),e=t?"Unmute":"Mute";this.controlText()!==e&&this.controlText(e)},e}(Yr);yi.prototype.controlText_="Mute",Tn.registerComponent("MuteToggle",yi);var gi=function(t){function e(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};De(this,e),void 0!==r.inline?r.inline=r.inline:r.inline=!0,(void 0===r.volumeControl||o(r.volumeControl))&&(r.volumeControl=r.volumeControl||{},r.volumeControl.vertical=!r.inline);var i=Re(this,t.call(this,n,r));return pi(i,n),i.on(i.volumeControl,["slideractive"],i.sliderActive_),i.on(i.muteToggle,"focus",i.sliderActive_),i.on(i.volumeControl,["sliderinactive"],i.sliderInactive_),i.on(i.muteToggle,"blur",i.sliderInactive_),i}return Le(e,t),e.prototype.sliderActive_=function(){this.addClass("vjs-slider-active")},e.prototype.sliderInactive_=function(){this.removeClass("vjs-slider-active")},e.prototype.createEl=function(){var e="vjs-volume-panel-horizontal";return this.options_.inline||(e="vjs-volume-panel-vertical"),t.prototype.createEl.call(this,"div",{className:"vjs-volume-panel vjs-control "+e})},e}(Tn);gi.prototype.options_={children:["muteToggle","volumeControl"]},Tn.registerComponent("VolumePanel",gi);var mi=function(t){function e(n,r){De(this,e);var i=Re(this,t.call(this,n,r));return r&&(i.menuButton_=r.menuButton),i.focusedChild_=-1,i.on("keydown",i.handleKeyPress),i}return Le(e,t),e.prototype.addItem=function(t){this.addChild(t),t.on("click",cn(this,function(e){this.menuButton_&&(this.menuButton_.unpressButton(),"CaptionSettingsMenuItem"!==t.name()&&this.menuButton_.focus())}))},e.prototype.createEl=function(){var e=this.options_.contentElType||"ul";this.contentEl_=v(e,{className:"vjs-menu-content"}),this.contentEl_.setAttribute("role","menu");var n=t.prototype.createEl.call(this,"div",{append:this.contentEl_,className:"vjs-menu"});return n.appendChild(this.contentEl_),z(n,"click",function(t){t.preventDefault(),t.stopImmediatePropagation()}),n},e.prototype.handleKeyPress=function(t){37===t.which||40===t.which?(t.preventDefault(),this.stepForward()):38!==t.which&&39!==t.which||(t.preventDefault(),this.stepBack())},e.prototype.stepForward=function(){var t=0;void 0!==this.focusedChild_&&(t=this.focusedChild_+1),this.focus(t)},e.prototype.stepBack=function(){var t=0;void 0!==this.focusedChild_&&(t=this.focusedChild_-1),this.focus(t)},e.prototype.focus=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=this.children().slice();e.length&&e[0].className&&/vjs-menu-title/.test(e[0].className)&&e.shift(),e.length>0&&(t<0?t=0:t>=e.length&&(t=e.length-1),this.focusedChild_=t,e[t].el_.focus())},e}(Tn);Tn.registerComponent("Menu",mi);var _i=function(t){function e(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};De(this,e);var i=Re(this,t.call(this,n,r));i.menuButton_=new Yr(n,r),i.menuButton_.controlText(i.controlText_),i.menuButton_.el_.setAttribute("aria-haspopup","true");var o=Yr.prototype.buildCSSClass();return i.menuButton_.el_.className=i.buildCSSClass()+" "+o,i.menuButton_.removeClass("vjs-control"),i.addChild(i.menuButton_),i.update(),i.enabled_=!0,i.on(i.menuButton_,"tap",i.handleClick),i.on(i.menuButton_,"click",i.handleClick),i.on(i.menuButton_,"focus",i.handleFocus),i.on(i.menuButton_,"blur",i.handleBlur),i.on("keydown",i.handleSubmenuKeyPress),i}return Le(e,t),e.prototype.update=function(){var t=this.createMenu();this.menu&&this.removeChild(this.menu),this.menu=t,this.addChild(t),this.buttonPressed_=!1,this.menuButton_.el_.setAttribute("aria-expanded","fal
16311se"),this.items&&this.items.length<=this.hideThreshold_?this.hide():this.show()},e.prototype.createMenu=function(){var t=new mi(this.player_,{menuButton:this});if(this.hideThreshold_=0,this.options_.title){var e=v("li",{className:"vjs-menu-title",innerHTML:J(this.options_.title),tabIndex:-1});this.hideThreshold_+=1,t.children_.unshift(e),g(e,t.contentEl())}if(this.items=this.createItems(),this.items)for(var n=0;n<this.items.length;n++)t.addItem(this.items[n]);return t},e.prototype.createItems=function(){},e.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:this.buildWrapperCSSClass()},{})},e.prototype.buildWrapperCSSClass=function(){var e="vjs-menu-button";return!0===this.options_.inline?e+="-inline":e+="-popup","vjs-menu-button "+e+" "+Yr.prototype.buildCSSClass()+" "+t.prototype.buildCSSClass.call(this)},e.prototype.buildCSSClass=function(){var e="vjs-menu-button";return!0===this.options_.inline?e+="-inline":e+="-popup","vjs-menu-button "+e+" "+t.prototype.buildCSSClass.call(this)},e.prototype.controlText=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.menuButton_.el();return this.menuButton_.controlText(t,e)},e.prototype.handleClick=function(t){this.one(this.menu.contentEl(),"mouseleave",cn(this,function(t){this.unpressButton(),this.el_.blur()})),this.buttonPressed_?this.unpressButton():this.pressButton()},e.prototype.focus=function(){this.menuButton_.focus()},e.prototype.blur=function(){this.menuButton_.blur()},e.prototype.handleFocus=function(){z(ue,"keydown",cn(this,this.handleKeyPress))},e.prototype.handleBlur=function(){X(ue,"keydown",cn(this,this.handleKeyPress))},e.prototype.handleKeyPress=function(t){27===t.which||9===t.which?(this.buttonPressed_&&this.unpressButton(),9!==t.which&&(t.preventDefault(),this.menuButton_.el_.focus())):38!==t.which&&40!==t.which||this.buttonPressed_||(this.pressButton(),t.preventDefault())},e.prototype.handleSubmenuKeyPress=function(t){27!==t.which&&9!==t.which||(this.buttonPressed_&&this.unpressButton(),9!==t.which&&(t.preventDefault(),this.menuButton_.el_.focus()))},e.prototype.pressButton=function(){this.enabled_&&(this.buttonPressed_=!0,this.menu.lockShowing(),this.menuButton_.el_.setAttribute("aria-expanded","true"),ge||d()||this.menu.focus())},e.prototype.unpressButton=function(){this.enabled_&&(this.buttonPressed_=!1,this.menu.unlockShowing(),this.menuButton_.el_.setAttribute("aria-expanded","false"))},e.prototype.disable=function(){this.unpressButton(),this.enabled_=!1,this.addClass("vjs-disabled"),this.menuButton_.disable()},e.prototype.enable=function(){this.enabled_=!0,this.removeClass("vjs-disabled"),this.menuButton_.enable()},e}(Tn);Tn.registerComponent("MenuButton",_i);var bi=function(t){function e(n,r){De(this,e);var i=r.tracks,o=Re(this,t.call(this,n,r));if(o.items.length<=1&&o.hide(),!i)return Re(o);var s=cn(o,o.update);return i.addEventListener("removetrack",s),i.addEventListener("addtrack",s),o.player_.on("ready",s),o.player_.on("dispose",function(){i.removeEventListener("removetrack",s),i.removeEventListener("addtrack",s)}),o}return Le(e,t),e}(_i);Tn.registerComponent("TrackButton",bi);var Ti=function(t){function e(n,r){De(this,e);var i=Re(this,t.call(this,n,r));return i.selectable=r.selectable,i.selected(r.selected),i.selectable?i.el_.setAttribute("role","menuitemcheckbox"):i.el_.setAttribute("role","menuitem"),i}return Le(e,t),e.prototype.createEl=function(e,n,i){return this.nonIconControl=!0,t.prototype.createEl.call(this,"li",r({className:"vjs-menu-item",innerHTML:'<span class="vjs-menu-item-text">'+this.localize(this.options_.label)+"</span>",tabIndex:-1},n),i)},e.prototype.handleClick=function(t){this.selected(!0)},e.prototype.selected=function(t){this.selectable&&(t?(this.addClass("vjs-selected"),this.el_.setAttribute("aria-checked","true"),this.controlText(", selected")):(this.removeClass("vjs-selected"),this.el_.setAttribute("aria-checked","false"),this.controlText(" ")))},e}(Wr);Tn.registerComponent("MenuItem",Ti);var Ci=function(t){function e(n,r){De(this,e);var i=r.track,o=n.textTracks();r.label=i.label||i.language||"Unknown",r.selected="showing"===i.mode;var s=Re(this,t.call(this,n,r));s.track=i;var a=cn(s,s.handleTracksChange),l=cn(s,s.handleSelectedLanguageChange);
vendor: 18,699 bytes, lines 16311-16312
16311if(n.on(["loadstart","texttrackchange"],a),o.addEventListener("change",a),o.addEventListener("selectedlanguagechange",l),s.on("dispose",function(){o.removeEventListener("change",a),o.removeEventListener("selectedlanguagechange",l)}),void 0===o.onchange){var c=void 0;s.on(["tap","click"],function(){if("object"!==Ie(oe.Event))try{c=new oe.Event("change")}catch(t){}c||(c=ue.createEvent("Event"),c.initEvent("change",!0,!0)),o.dispatchEvent(c)})}return s}return Le(e,t),e.prototype.handleClick=function(e){var n=this.track.kind,r=this.track.kinds,i=this.player_.textTracks();if(r||(r=[n]),t.prototype.handleClick.call(this,e),i)for(var o=0;o<i.length;o++){var s=i[o];s===this.track&&r.indexOf(s.kind)>-1?"showing"!==s.mode&&(s.mode="showing"):"disabled"!==s.mode&&(s.mode="disabled")}},e.prototype.handleTracksChange=function(t){this.selected("showing"===this.track.mode)},e.prototype.handleSelectedLanguageChange=function(t){if("showing"===this.track.mode){var e=this.player_.cache_.selectedLanguage;if(e&&e.enabled&&e.language===this.track.language&&e.kind!==this.track.kind)return;this.player_.cache_.selectedLanguage={enabled:!0,language:this.track.language,kind:this.track.kind}}},e}(Ti);Tn.registerComponent("TextTrackMenuItem",Ci);var ki=function(t){function e(n,r){De(this,e),r.track={player:n,kind:r.kind,kinds:r.kinds,default:!1,mode:"disabled"},r.kinds||(r.kinds=[r.kind]),r.label?r.track.label=r.label:r.track.label=r.kinds.join(" and ")+" off",r.selectable=!0;var i=Re(this,t.call(this,n,r));return i.selected(!0),i}return Le(e,t),e.prototype.handleTracksChange=function(t){for(var e=this.player().textTracks(),n=!0,r=0,i=e.length;r<i;r++){var o=e[r];if(this.options_.kinds.indexOf(o.kind)>-1&&"showing"===o.mode){n=!1;break}}this.selected(n)},e.prototype.handleSelectedLanguageChange=function(t){for(var e=this.player().textTracks(),n=!0,r=0,i=e.length;r<i;r++){var o=e[r];if(["captions","descriptions","subtitles"].indexOf(o.kind)>-1&&"showing"===o.mode){n=!1;break}}n&&(this.player_.cache_.selectedLanguage={enabled:!1})},e}(Ci);Tn.registerComponent("OffTextTrackMenuItem",ki);var wi=function(t){function e(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return De(this,e),r.tracks=n.textTracks(),Re(this,t.call(this,n,r))}return Le(e,t),e.prototype.createItems=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Ci,n=void 0;this.label_&&(n=this.label_+" off"),t.push(new ki(this.player_,{kinds:this.kinds_,kind:this.kind_,label:n})),this.hideThreshold_+=1;var r=this.player_.textTracks();Array.isArray(this.kinds_)||(this.kinds_=[this.kind_]);for(var i=0;i<r.length;i++){var o=r[i];if(this.kinds_.indexOf(o.kind)>-1){var s=new e(this.player_,{track:o,selectable:!0});s.addClass("vjs-"+o.kind+"-menu-item"),t.push(s)}}return t},e}(bi);Tn.registerComponent("TextTrackButton",wi);var Ei=function(t){function e(n,r){De(this,e);var i=r.track,o=r.cue,s=n.currentTime();r.selectable=!0,r.label=o.text,r.selected=o.startTime<=s&&s<o.endTime;var a=Re(this,t.call(this,n,r));return a.track=i,a.cue=o,i.addEventListener("cuechange",cn(a,a.update)),a}return Le(e,t),e.prototype.handleClick=function(e){t.prototype.handleClick.call(this),this.player_.currentTime(this.cue.startTime),this.update(this.cue.startTime)},e.prototype.update=function(t){var e=this.cue,n=this.player_.currentTime();this.selected(e.startTime<=n&&n<e.endTime)},e}(Ti);Tn.registerComponent("ChaptersTrackMenuItem",Ei);var Si=function(t){function e(n,r,i){return De(this,e),Re(this,t.call(this,n,r,i))}return Le(e,t),e.prototype.buildCSSClass=function(){return"vjs-chapters-button "+t.prototype.buildCSSClass.call(this)},e.prototype.buildWrapperCSSClass=function(){return"vjs-chapters-button "+t.prototype.buildWrapperCSSClass.call(this)},e.prototype.update=function(e){this.track_&&(!e||"addtrack"!==e.type&&"removetrack"!==e.type)||this.setTrack(this.findChaptersTrack()),t.prototype.update.call(this)},e.prototype.setTrack=function(t){if(this.track_!==t){if(this.updateHandler_||(this.updateHandler_=this.update.bind(this)),this.track_){var e=this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_);e&&e.removeEventListener("load",this.updateHandler_),this.track_=null}if(this.track_=t,this.track_){this.track_.mode="hidden";var n=this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_);n&&n.addEventListener("load",this.updateHandler_)}}},e.prototype.findChaptersTrack=function(){for(var t=this.player_.textTracks()||[],e=t.length-1;e>=0;e--){var n=t[e];if(n.kind===this.kind_)return n}},e.prototype.getMenuCaption=function(){return this.track_&&this.track_.label?this.track_.label:this.localize(J(this.kind_))},e.prototype.createMenu=function(){return this.options_.title=this.getMenuCaption(),t.prototype.createMenu.call(this)},e.prototype.createItems=function(){var t=[];if(!this.track_)return t;var e=this.track_.cues;if(!e)return t;for(var n=0,r=e.length;n<r;n++){var i=e[n],o=new Ei(this.player_,{track:this.track_,cue:i});t.push(o)}return t},e}(wi);Si.prototype.kind_="chapters",Si.prototype.controlText_="Chapters",Tn.registerComponent("ChaptersButton",Si);var xi=function(t){function e(n,r,i){De(this,e);var o=Re(this,t.call(this,n,r,i)),s=n.textTracks(),a=cn(o,o.handleTracksChange);return s.addEventListener("change",a),o.on("dispose",function(){s.removeEventListener("change",a)}),o}return Le(e,t),e.prototype.handleTracksChange=function(t){for(var e=this.player().textTracks(),n=!1,r=0,i=e.length;r<i;r++){var o=e[r];if(o.kind!==this.kind_&&"showing"===o.mode){n=!0;break}}n?this.disable():this.enable()},e.prototype.buildCSSClass=function(){return"vjs-descriptions-button "+t.prototype.buildCSSClass.call(this)},e.prototype.buildWrapperCSSClass=function(){return"vjs-descriptions-button "+t.prototype.buildWrapperCSSClass.call(this)},e}(wi)
16312;xi.prototype.kind_="descriptions",xi.prototype.controlText_="Descriptions",Tn.registerComponent("DescriptionsButton",xi);var ji=function(t){function e(n,r,i){return De(this,e),Re(this,t.call(this,n,r,i))}return Le(e,t),e.prototype.buildCSSClass=function(){return"vjs-subtitles-button "+t.prototype.buildCSSClass.call(this)},e.prototype.buildWrapperCSSClass=function(){return"vjs-subtitles-button "+t.prototype.buildWrapperCSSClass.call(this)},e}(wi);ji.prototype.kind_="subtitles",ji.prototype.controlText_="Subtitles",Tn.registerComponent("SubtitlesButton",ji);var Ai=function(t){function e(n,r){De(this,e),r.track={player:n,kind:r.kind,label:r.kind+" settings",selectable:!1,default:!1,mode:"disabled"},r.selectable=!1,r.name="CaptionSettingsMenuItem";var i=Re(this,t.call(this,n,r));return i.addClass("vjs-texttrack-settings"),i.controlText(", opens "+r.kind+" settings dialog"),i}return Le(e,t),e.prototype.handleClick=function(t){this.player().getChild("textTrackSettings").open()},e}(Ci);Tn.registerComponent("CaptionSettingsMenuItem",Ai);var Pi=function(t){function e(n,r,i){return De(this,e),Re(this,t.call(this,n,r,i))}return Le(e,t),e.prototype.buildCSSClass=function(){return"vjs-captions-button "+t.prototype.buildCSSClass.call(this)},e.prototype.buildWrapperCSSClass=function(){return"vjs-captions-button "+t.prototype.buildWrapperCSSClass.call(this)},e.prototype.createItems=function(){var e=[];return this.player().tech_&&this.player().tech_.featuresNativeTextTracks||(e.push(new Ai(this.player_,{kind:this.kind_})),this.hideThreshold_+=1),t.prototype.createItems.call(this,e)},e}(wi);Pi.prototype.kind_="captions",Pi.prototype.controlText_="Captions",Tn.registerComponent("CaptionsButton",Pi);var Mi=function(t){function e(){return De(this,e),Re(this,t.apply(this,arguments))}return Le(e,t),e.prototype.createEl=function(e,n,i){var o='<span class="vjs-menu-item-text">'+this.localize(this.options_.label);return"captions"===this.options_.track.kind&&(o+='\n        <span aria-hidden="true" class="vjs-icon-placeholder"></span>\n        <span class="vjs-control-text"> '+this.localize("Captions")+"</span>\n      "),o+="</span>",t.prototype.createEl.call(this,e,r({innerHTML:o},n),i)},e}(Ci);Tn.registerComponent("SubsCapsMenuItem",Mi);var Oi=function(t){function e(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};De(this,e);var i=Re(this,t.call(this,n,r));return i.label_="subtitles",["en","en-us","en-ca","fr-ca"].indexOf(i.player_.language_)>-1&&(i.label_="captions"),i.menuButton_.controlText(J(i.label_)),i}return Le(e,t),e.prototype.buildCSSClass=function(){return"vjs-subs-caps-button "+t.prototype.buildCSSClass.call(this)},e.prototype.buildWrapperCSSClass=function(){return"vjs-subs-caps-button "+t.prototype.buildWrapperCSSClass.call(this)},e.prototype.createItems=function(){var e=[];return this.player().tech_&&this.player().tech_.featuresNativeTextTracks||(e.push(new Ai(this.player_,{kind:this.label_})),this.hideThreshold_+=1),e=t.prototype.createItems.call(this,e,Mi)},e}(wi);Oi.prototype.kinds_=["captions","subtitles"],Oi.prototype.controlText_="Subtitles",Tn.registerComponent("SubsCapsButton",Oi);var Ni=function(t){function e(n,r){De(this,e);var i=r.track,o=n.audioTracks();r.label=i.label||i.language||"Unknown",r.selected=i.enabled;var s=Re(this,t.call(this,n,r));s.track=i;var a=cn(s,s.handleTracksChange);return o.addEventListener("change",a),s.on("dispose",function(){o.removeEventListener("change",a)}),s}return Le(e,t),e.prototype.handleClick=function(e){var n=this.player_.audioTracks();t.prototype.handleClick.call(this,e);for(var r=0;r<n.length;r++){var i=n[r];i.enabled=i===this.track}},e.prototype.handleTracksChange=function(t){this.selected(this.track.enabled)},e}(Ti);Tn.registerComponent("AudioTrackMenuItem",Ni);var Ii=function(t){function e(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return De(this,e),r.tracks=n.audioTracks(),Re(this,t.call(this,n,r))}return Le(e,t),e.prototype.buildCSSClass=function(){return"vjs-audio-button "+t.prototype.buildCSSClass.call(this)},e.prototype.buildWrapperCSSClass=function(){return"vjs-audio-button "+t.prototype.buildWrapperCSSClass.call(this)},e.prototype.createItems=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.hideThreshold_=1;for(var e=this.player_.audioTracks(),n=0;n<e.length;n++){var r=e[n];t.push(new Ni(this.player_,{track:r,selectable:!0}))}return t},e}(bi);Ii.prototype.controlText_="Audio Track",Tn.registerComponent("AudioTrackButton",Ii);var Di=function(t){function e(n,r){De(this,e);var i=r.rate,o=parseFloat(i,10);r.label=i,r.selected=1===o,r.selectable=!0;var s=Re(this,t.call(this,n,r));return s.label=i,s.rate=o,s.on(n,"ratechange",s.update),s}return Le(e,t),e.prototype.handleClick=function(e){t.prototype.handleClick.call(this),this.player().playbackRate(this.rate)},e.prototype.update=function(t){this.selected(this.player().playbackRate()===this.rate)},e}(Ti);Di.prototype.contentElType="button",Tn.registerComponent("PlaybackRateMenuItem",Di);var Li=function(t){function e(n,r){De(this,e);var i=Re(this,t.call(this,n,r));return i.updateVisibility(),i.updateLabel(),i.on(n,"loadstart",i.updateVisibility),i.on(n,"ratechange",i.updateLabel),i}return Le(e,t),e.prototype.createEl=function(){var e=t.prototype.createEl.call(this);return this.labelEl_=v("div",{className:"vjs-playback-rate-value",innerHTML:"1x"}),e.appendChild(this.labelEl_),e},e.prototype.buildCSSClass=function(){return"vjs-playback-rate "+t.prototype.buildCSSClass.call(this)},e.prototype.buildWrapperCSSClass=function(){return"vjs-playback-rate "+t.prototype.buildWrapperCSSClass.call(this)},e.prototype.createMenu=function(){var t=new mi(this.player()),e=this.playbackRates();if(e)for(var n=e.length-1;n>=0;n--)t.addChild(new Di(this.player(),{rate:e[n]+"x"}));return t},e.prototype.updateARIAAttributes=function(){this.el().setAttribute("aria-valuenow",this.player().playbackRate())},e.prototype.handleClick=function(t){for(var e=this.player().playbackRate(),n=this.playbackRates(),r=n[0],i=0;i<n.length;i++)if(n[i]>e){r=n[i];break}this.player().playbackRate(r)},e.prototype.playbackRates=function(){return this.options_.playbackRates||this.options_.playerOptions&&this.options_.playerOptions.playbackRates},e.prototype.playbackRateSupported=function(){return this.player().tech_&&this.player().tech_.featuresPlaybackRate&&this.playbackRates()&&this.playbackRates().length>0},e.prototype.updateVisibility=function(t){this.playbackRateSupported()?this.removeClass("vjs-hidden"):this.addClass("vjs-hidden")},e.prototype.updateLabel=function(t){this.playbackRateSupported()&&(this.labelEl_.innerHTML=this.player().playbackRate()+"x")},e}(_i);Li.prototype.controlText_="Playback Rate",Tn.registerComponent("PlaybackRateMenuButton",Li);var Ri=function(t){function e(){return De(this,e),Re(this,t.apply(this,arguments))}return Le(e,t),e.prototype.buildCSSClass=function(){return"vjs-spacer "+t.prototype.buildCSSClass.call(this)},e.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:this.buildCSSClass()})},e}(Tn);Tn.registerComponent("Spacer",Ri);var Bi=function(t){function e(){return De(this,e),Re(this,t.apply(this,arguments))}return Le(e,t),e.prototype.buildCSSClass=function(){return"vjs-custom-control-spacer "+t.prototype.buildCSSClass.call(this)},e.prototype.createEl=function(){var e=t.prototype.createEl.call(this,{className:this.buildCSSClass()});return e.innerHTML="&nbsp;",e},e}(Ri);Tn.registerComponent("CustomControlSpacer",Bi);var Fi=function(t){function e(){return De(this,e),Re(this,t.apply(this,arguments))}return Le(e,t),e.prototype.createEl=function(){return t.prototype.createEl.call(this,"div",{className:"vjs-control-bar",dir:"ltr"},{role:"group"})},e}(Tn);Fi.prototype.options_={children:["playToggle","volumePanel","currentTimeDisplay","timeDivider","durationDisplay","progressControl","liveDisplay","remainingTimeDisplay","customControlSpacer","playbackRateMenuButton","chaptersButton","descriptionsButton","subsCapsButton","audioTrackButton","fullscreenToggle"]},Tn.registerComponent("ControlBar",Fi);var Vi=function(t){function e(n,r){De(this,e);var i=Re(this,t.call(this,n,r));return i.on(n,"error",i.open),i}return Le(e,t),e.prototype.buildCSSClass=function(){return"vjs-error-display "+t.prototype.buildCSSClass.call(this)},e.prototype.content=function(){var t=this.player().error();return t?this.localize(t.message):""},e}(Dn);Vi.prototype.options_=Z(Dn.prototype.options_,{pauseOnOpen:!1,fillAlways:!0,temporary:!1,uncloseable:!0}),Tn.registerComponent("ErrorDisplay",Vi);var Hi=["#000","Black"],Ui=["#00F","Blue"],Wi=["#0FF","Cyan"],zi=["#0F0","Green"],Xi=["#F0F","Magenta"],qi=["#F00","Red"],Ki=["#FFF","White"],Yi=["#FF0","Yellow"],Gi=["1","Opaque"],$i=["0.5","Semi-Transparent"],Ji=["0","Transparent"],Qi={backgroundColor:{selector:".vjs-bg-color > select",id:"captions-background-color-%s",label:"Color",options:[Hi,Ki,qi,zi,Ui,Yi,Xi,Wi]},backgroundOpacity:{selector:".vjs-bg-opacity > select",id:"captions-background-opacity-%s",label:"Transparency",options:[Gi,$i,Ji]},color:{selector:".vjs-fg-color > select",id:"captions-foreground-color-%s",label:"Color",options:[Ki,Hi,qi,zi,Ui,Yi,Xi,Wi]},edgeStyle:{selector:".vjs-edge-style > select",id:"%s",label:"Text Edge Style",options:[["none","None"],["raised","Raised"],["depressed","Depressed"],["uniform","Uniform"],["dropshadow","Dropshadow"]]},fontFamily:{selector:".vjs-font-family > select",id:"captions-font-family-%s",label:"Font Family",options:[["proportionalSansSerif","Proportional Sans-Serif"],["monospaceSansSerif","Monospace Sans-Serif"],["proportionalSerif","Proportional Serif"],["monospaceSerif","Monospace Serif"],["casual","Casual"],["script","Script"],["small-caps","Small Caps"]]},fontPercent:{selector:".vjs-font-percent > select",id:"captions-font-size-%s",label:"Font Size",options:[["0.50","50%"],["0.75","75%"],["1.00","100%"],["1.25","125%"],["1.50","150%"],["1.75","175%"],["2.00","200%"],["3.00","300%"],["4.00","400%"]],default:2,parser:function(t){return"1.00"===t?null:Number(t)}},textOpacity:{selector:".vjs-text-opacity > select",id:"captions-foreground-opacity-%s",label:"Transparency",options:[Gi,$i]},windowColor:{selector:".vjs-window-color > select",id:"captions-window-color-%s",label:"Color"},windowOpacity:{selector:".vjs-window-opacity > select",id:"captions-window-opacity-%s",label:"Transparency",options:[Ji,$i,Gi]}};Qi.windowColor.options=Qi.backgroundColor.options;var Zi=function(t){function r(n,i){De(this,r),i.temporary=!1;var o=Re(this,t.call(this,n,i));return o.updateDisplay=cn(o,o.updateDisplay),o.fill(),o.hasBeenOpened_=o.hasBeenFilled_=!0,o.endDialog=v("p",{className:"vjs-control-text",textContent:o.localize("End of dialog window.")}),o.el().appendChild(o.endDialog),o.setDefaults(),void 0===i.persistTextTrackSettings&&(o.options_.persistTextTrackSettings=o.options_.playerOptions.persistTextTrackSettings),o.on(o.$(".vjs-done-button"),"click",function(){o.saveSettings(),o.close()}),o.on(o.$(".vjs-default-button"),"click",function(){o.setDefaults(),o.updateDisplay()}),e(Qi,function(t){o.on(o.$(t.selector),"change",o.updateDisplay)}),o.options_.persistTextTrackSettings&&o.restoreSettings(),o}return Le(r,t),r.prototype.createElSelect_=function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"label",i=Qi[t],o=i.id.replace("%s",this.id_);return["<"+r+' id="'+o+'" class="'+("label"===r?"vjs-label":"")+'">',this.localize(i.label),"</"+r+">",'<select aria-labelledby="'+(""!==n?n+" ":"")+o+'">'].concat(i.options.map(function(t){var r=o+"-"+t[1];return['<option id="'+r+'" value="'+t[0]+'" ','aria-labelledby="'+(""!==n?n+" ":"")+o+" "+r+'">',e.localize(t[1]),"</option>"].join("")})).concat("</select>").join("")},r.prototype.createElFgColor_=function(){var t="captions-text-legend-"+this.id_;return['<fieldset class="vjs-fg-color vjs-track-setting">','<legend id="'+t+'">',this.localize("Text"),"</legend>",this.createElSelect_("color",t),'<span class="vjs-text-opacity vjs-opacity">',this.createElSelect_("textOpacity",t),"</span>","</fieldset>"].join("")},r.prototype.createElBgColor_=function(){var t="captions-background-"+this.id_;return['<fieldset class="vjs-bg-color vjs-track-setting">','<legend id="'+t+'">',this.localize("Background"),"</legend>",this.createElSelect_("backgroundColor",t),'<span class="vjs-bg-opacity vjs-opacity">',this.createElSelect_("backgroundOpacity",t),"</span>","</fieldset>"].join("")},r.prototype.createElWinColor_=function(){var t="captions-window-"+this.id_;return['<fieldset class="vjs-window-color vjs-track-setting">','<legend id="'+t+'">',this.localize("Window"),"</legend>",this.createElSelect_("windowColor",t),'<span class="vjs-window-opacity vjs-opacity">
16312',this.createElSelect_("windowOpacity",t),"</span>","</fieldset>"].join("")},r.prototype.createElColors_=function(){return v("div",{className:"vjs-track-settings-colors",innerHTML:[this.createElFgColor_(),this.createElBgColor_(),this.createElWinColor_()].join("")})},r.prototype.createElFont_=function(){return v("div",{className:'vjs-track-settings-font">',innerHTML:['<fieldset class="vjs-font-percent vjs-track-setting">',this.createElSelect_("fontPercent","","legend"),"</fieldset>",'<fieldset class="vjs-edge-style vjs-track-setting">',this.createElSelect_("edgeStyle","","legend"),"</fieldset>",'<fieldset class="vjs-font-family vjs-track-setting">',this.createElSelect_("fontFamily","","legend"),"</fieldset>"].join("")})},r.prototype.createElControls_=function(){var t=this.localize("restore all settings to the default values");return v("div",{className:"vjs-track-settings-controls",innerHTML:['<button class="vjs-default-button" title="'+t+'">',this.localize("Reset"),'<span class="vjs-control-text"> '+t+"</span>","</button>",'<button class="vjs-done-button">'+this.localize("Done")+"</button>"].join("")})},r.prototype.content=function(){return[this.createElColors_(),this.createElFont_(),this.createElControls_()]},r.prototype.label=function(){return this.localize("Caption Settings Dialog")},r.prototype.description=function(){return this.localize("Beginning of dialog window. Escape will cancel and close the window.")},r.prototype.buildCSSClass=function(){return t.prototype.buildCSSClass.call(this)+" vjs-text-track-settings"},r.prototype.getValues=function(){var t=this;return n(Qi,function(e,n,r){var i=Qt(t.$(n.selector),n.parser);return void 0!==i&&(e[r]=i),e},{})},r.prototype.setValues=function(t){var n=this;e(Qi,function(e,r){Zt(n.$(e.selector),t[r],e.parser)})},r.prototype.setDefaults=function(){var t=this;e(Qi,function(e){var n=e.hasOwnProperty("default")?e.default:0;t.$(e.selector).selectedIndex=n})},r.prototype.restoreSettings=function(){var t=void 0;try{t=JSON.parse(oe.localStorage.getItem("vjs-text-track-settings"))}catch(t){Xe.warn(t)}t&&this.setValues(t)},r.prototype.saveSettings=function(){if(this.options_.persistTextTrackSettings){var t=this.getValues();try{Object.keys(t).length?oe.localStorage.setItem("vjs-text-track-settings",JSON.stringify(t)):oe.localStorage.removeItem("vjs-text-track-settings")}catch(t){Xe.warn(t)}}},r.prototype.updateDisplay=function(){var t=this.player_.getChild("textTrackDisplay");t&&t.updateDisplay()},r.prototype.conditionalBlur_=function(){this.previouslyActiveEl_=null,this.off(ue,"keydown",this.handleKeyDown);var t=this.player_.controlBar,e=t&&t.subsCapsButton,n=t&&t.captionsButton;e?e.focus():n&&n.focus()},r}(Dn);Tn.registerComponent("TextTrackSettings",Zi);var to=Be(["Text Tracks are being loaded from another origin but the crossorigin attribute isn't used.\n            This may prevent text tracks from loading."],["Text Tracks are being loaded from another origin but the crossorigin attribute isn't used.\n            This may prevent text tracks from loading."]),eo=function(t){function e(n,r){De(this,e);var i=Re(this,t.call(this,n,r)),o=n.source,s=!1;if(o&&(i.el_.currentSrc!==o.src||n.tag&&3===n.tag.initNetworkState_)?i.setSource(o):i.handleLateInit_(i.el_),i.el_.hasChildNodes()){for(var a=i.el_.childNodes,l=a.length,c=[];l--;){var u=a[l];"track"===u.nodeName.toLowerCase()&&(i.featuresNativeTextTracks?(i.remoteTextTrackEls().addTrackElement_(u),i.remoteTextTracks().addTrack(u.track),i.textTracks().addTrack(u.track),s||i.el_.hasAttribute("crossorigin")||!Zn(u.src)||(s=!0)):c.push(u))}for(var h=0;h<c.length;h++)i.el_.removeChild(c[h])}return i.proxyNativeTracks_(),i.featuresNativeTextTracks&&s&&Xe.warn(qe(to)),i.restoreMetadataTracksInIOSNativePlayer_(),(Me||ve||Ce)&&!0===n.nativeControlsForTouch&&i.setControls(!0),i.proxyWebkitFullscreen_(),i.triggerReady(),i}return Le(e,t),e.prototype.dispose=function(){e.disposeMediaElement(this.el_),t.prototype.dispose.call(this)},e.prototype.restoreMetadataTracksInIOSNativePlayer_=function(){var t=this.textTracks(),e=void 0,n=function(){e=[];for(var n=0;n<t.length;n++){var r=t[n];"metadata"===r.kind&&e.push({track:r,storedMode:r.mode})}};n(),t.addEventListener("change",n);var r=function n(){for(var r=0;r<e.length;r++){var i=e[r];"disabled"===i.track.mode&&i.track.mode!==i.storedMode&&(i.track.mode=i.storedMode)}t.removeEventListener("change",n)};this.on("webkitbeginfullscreen",function(){t.removeEventListener("change",n),t.removeEventListener("change",r),t.addEventListener("change",r)}),this.on("webkitendfullscreen",function(){t.removeEventListener("change",n),t.addEventListener("change",n),t.removeEventListener("change",r)})},e.prototype.proxyNativeTracks_=function(){var t=this;
vendor: 9,508 bytes, line 16312
16312br.names.forEach(function(e){var n=br[e],r=t.el()[n.getterName],i=t[n.getterName]();if(t["featuresNative"+n.capitalName+"Tracks"]&&r&&r.addEventListener){var o={change:function(t){i.trigger({type:"change",target:i,currentTarget:i,srcElement:i})},addtrack:function(t){i.addTrack(t.track)},removetrack:function(t){i.removeTrack(t.track)}},s=function(){for(var t=[],e=0;e<i.length;e++){for(var n=!1,o=0;o<r.length;o++)if(r[o]===i[e]){n=!0;break}n||t.push(i[e])}for(;t.length;)i.removeTrack(t.shift())};Object.keys(o).forEach(function(e){var n=o[e];r.addEventListener(e,n),t.on("dispose",function(t){return r.removeEventListener(e,n)})}),t.on("loadstart",s),t.on("dispose",function(e){return t.off("loadstart",s)})}})},e.prototype.createEl=function(){var t=this.options_.tag;if(!t||!this.options_.playerElIngest&&!this.movingMediaElementInDOM){if(t){var n=t.cloneNode(!0);t.parentNode&&t.parentNode.insertBefore(n,t),e.disposeMediaElement(t),t=n}else{t=ue.createElement("video");var i=this.options_.tag&&k(this.options_.tag),o=Z({},i);Me&&!0===this.options_.nativeControlsForTouch||delete o.controls,C(t,r(o,{id:this.options_.techId,class:"vjs-tech"}))}t.playerId=this.options_.playerId}void 0!==this.options_.preload&&E(t,"preload",this.options_.preload);for(var s=["loop","muted","playsinline","autoplay"],a=s.length-1;a>=0;a--){var l=s[a],c=this.options_[l];void 0!==c&&(c?E(t,l,l):S(t,l),t[l]=c)}return t},e.prototype.handleLateInit_=function(t){if(0!==t.networkState&&3!==t.networkState){if(0===t.readyState){var e=!1,n=function(){e=!0};this.on("loadstart",n);var r=function(){e||this.trigger("loadstart")};return this.on("loadedmetadata",r),void this.ready(function(){this.off("loadstart",n),this.off("loadedmetadata",r),e||this.trigger("loadstart")})}var i=["loadstart"];i.push("loadedmetadata"),t.readyState>=2&&i.push("loadeddata"),t.readyState>=3&&i.push("canplay"),t.readyState>=4&&i.push("canplaythrough"),this.ready(function(){i.forEach(function(t){this.trigger(t)},this)})}},e.prototype.setCurrentTime=function(t){try{this.el_.currentTime=t}catch(t){Xe(t,"Video is not ready. (Video.js)")}},e.prototype.duration=function(){var t=this;if(this.el_.duration===1/0&&_e&&Ee&&0===this.el_.currentTime){var e=function e(){t.el_.currentTime>0&&(t.el_.duration===1/0&&t.trigger("durationchange"),t.off("timeupdate",e))};return this.on("timeupdate",e),NaN}return this.el_.duration||NaN},e.prototype.width=function(){return this.el_.offsetWidth},e.prototype.height=function(){return this.el_.offsetHeight},e.prototype.proxyWebkitFullscreen_=function(){var t=this;if("webkitDisplayingFullscreen"in this.el_){var e=function(){this.trigger("fullscreenchange",{isFullscreen:!1})},n=function(){"webkitPresentationMode"in this.el_&&"picture-in-picture"!==this.el_.webkitPresentationMode&&(this.one("webkitendfullscreen",e),this.trigger("fullscreenchange",{isFullscreen:!0}))};this.on("webkitbeginfullscreen",n),this.on("dispose",function(){t.off("webkitbeginfullscreen",n),t.off("webkitendfullscreen",e)})}},e.prototype.supportsFullScreen=function(){if("function"==typeof this.el_.webkitEnterFullScreen){var t=oe.navigator&&oe.navigator.userAgent||"";if(/Android/.test(t)||!/Chrome|Mac OS X 10.5/.test(t))return!0}return!1},e.prototype.enterFullScreen=function(){var t=this.el_;t.paused&&t.networkState<=t.HAVE_METADATA?(this.el_.play(),this.setTimeout(function(){t.pause(),t.webkitEnterFullScreen()},0)):t.webkitEnterFullScreen()},e.prototype.exitFullScreen=function(){this.el_.webkitExitFullScreen()},e.prototype.src=function(t){if(void 0===t)return this.el_.src;this.setSrc(t)},e.prototype.reset=function(){e.resetMediaElement(this.el_)},e.prototype.currentSrc=function(){return this.currentSource_?this.currentSource_.src:this.el_.currentSrc},e.prototype.setControls=function(t){this.el_.controls=!!t},e.prototype.addTextTrack=function(e,n,r){return this.featuresNativeTextTracks?this.el_.addTextTrack(e,n,r):t.prototype.addTextTrack.call(this,e,n,r)},e.prototype.createRemoteTextTrack=function(e){if(!this.featuresNativeTextTracks)return t.prototype.createRemoteTextTrack.call(this,e);var n=ue.createElement("track");return e.kind&&(n.kind=e.kind),e.label&&(n.label=e.label),(e.language||e.srclang)&&(n.srclang=e.language||e.srclang),e.default&&(n.default=e.default),e.id&&(n.id=e.id),e.src&&(n.src=e.src),n},e.prototype.addRemoteTextTrack=function(e,n){var r=t.prototype.addRemoteTextTrack.call(this,e,n);return this.featuresNativeTextTracks&&this.el().appendChild(r),r},e.prototype.removeRemoteTextTrack=function(e){if(t.prototype.removeRemoteTextTrack.call(this,e),this.featuresNativeTextTracks)for(var n=this.$$("track"),r=n.length;r--;)e!==n[r]&&e!==n[r].track||this.el().removeChild(n[r])},e.prototype.getVideoPlaybackQuality=function(){if("function"==typeof this.el().getVideoPlaybackQuality)return this.el().getVideoPlaybackQuality();var t={};return void 0!==this.el().webkitDroppedFrameCount&&void 0!==this.el().webkitDecodedFrameCount&&(t.droppedVideoFrames=this.el().webkitDroppedFrameCount,t.totalVideoFrames=this.el().webkitDecodedFrameCount),oe.performance&&"function"==typeof oe.performance.now?t.creationTime=oe.performance.now():oe.performance&&oe.performance.timing&&"number"==typeof oe.performance.timing.navigationStart&&(t.creationTime=oe.Date.now()-oe.performance.timing.navigationStart),t},e}(Rr);if(h()){eo.TEST_VID=ue.createElement("video");var no=ue.createElement("track");no.kind="captions",no.srclang="en",no.label="English",eo.TEST_VID.appendChild(no)}eo.isSupported=function(){try{eo.TEST_VID.volume=.5}catch(t){return!1}return!(!eo.TEST_VID||!eo.TEST_VID.canPlayType)},eo.canPlayType=function(t){return eo.TEST_VID.canPlayType(t)},eo.canPlaySource=function(t,e){return eo.canPlayType(t.type)},eo.canControlVolume=function(){try{var t=eo.TEST_VID.volume;return eo.TEST_VID.volume=t/2+.1,t!==eo.TEST_VID.volume}catch(t){return!1}},eo.canControlPlaybackRate=function(){if(_e&&Ee&&Se<58)return!1;try{var t=eo.TEST_VID.playbackRate;return eo.TEST_VID.playbackRate=t/2+.1,t!==eo.TEST_VID.playbackRate}catch(t){return!1}},eo.supportsNativeTextTracks=function(){return Pe},eo.supportsNativeVideoTracks=function(){return!(!eo.TEST_VID||!eo.TEST_VID.videoTracks)},eo.supportsNativeAudioTracks=function(){return!(!eo.TEST_VID||!eo.TEST_VID.audioTracks)},eo.Events=["loadstart","suspend","abort","error","emptied","stalled","loadedmetadata","loadeddata","canplay","canplaythrough","playing","waiting","seeking","seeked","ended","durationchange","timeupdate","progress","play","pause","ratechange","resize","volumechange"],eo.prototype.featuresVolumeControl=eo.canControlVolume(),eo.prototype.featuresPlaybackRate=eo.canControlPlaybackRate(),eo.prototype.movingMediaElementInDOM=!ge,eo.prototype.featuresFullscreenResize=!0,eo.prototype.featuresProgressEvents=!0,eo.prototype.featuresTimeupdateEvents=!0,eo.prototype.featuresNativeTextTracks=eo.supportsNativeTextTracks(),eo.prototype.featuresNativeVideoTracks=eo.supportsNativeVideoTracks(),eo.prototype.featuresNativeAudioTracks=eo.supportsNativeAudioTracks();var ro=eo.TEST_VID&&eo.TEST_VID.constructor.prototype.canPlayType,io=/^application\/(?:x-|vnd\.apple\.)mpegurl/i,oo=/^video\/mp4/i;eo.patchCanPlayType=function(){be>=4&&!ke?eo.TEST_VID.constructor.prototype.canPlayType=function(t){return t&&io.test(t)?"maybe":ro.call(this,t)}:Te&&(eo.TEST_VID.constructor.prototype.canPlayType=function(t){return t&&oo.test(t)?"maybe":ro.call(this,t)})},eo.unpatchCanPlayType=function(){var t=eo.TEST_VID.constructor.prototype.canPlayType;return eo.TEST_VID.constructor.prototype.canPlayType=ro,t},eo.patchCanPlayType(),eo.disposeMediaElement=function(t){if(t){for(t.parentNode&&t.parentNode.removeChild(t);t.hasChildNodes();)t.removeChild(t.firstChild);t.removeAttribute("src"),"function"==typeof t.load&&function(){try{t.load()}catch(t){}}()}},eo.resetMediaElement=function(t){if(t){for(var e=t.querySelectorAll("source"),n=e.length;n--;)t.removeChild(e[n]);t.removeAttribute("src"),"function"==typeof t.load&&function(){try{t.load()}catch(t){}}()}},["muted","defaultMuted","autoplay","controls","loop","playsinline"].forEach(function(t){eo.prototype[t]=function(){return this.el_[t]||this.el_.hasAttribute(t)}}),["muted","defaultMuted","autoplay","loop","playsinline"].forEach(function(t){eo.prototype["set"+J(t)]=function(e){this.el_[t]=e,e?this.el_.setAttribute(t,t):this.el_.removeAttribute(t)}}),["paused","currentTime","buffered","volume","poster","preload","error","seeking","seekable","ended","playbackRate","defaultPlaybackRate","played","networkState","readyState","videoWidth","videoHeight"].forEach(function(t){eo.prototype[t]=function(){return this.el_[t]}}),["volume","src","poster","preload","playbackRate","defaultPlaybackRate"].forEach(function(t){eo.prototype["set"+J(t)]=function(e){this.el_[t]=e}}),["pause","load","play"].forEach(function(t){eo.prototype[t]=function(){return this.el_[t]()}}),Rr.withSourceHandlers(eo),eo.nativeSourceHandler={},eo.nativeSourceHandler.canPlayType=function(t){try{return eo.TEST_VID.canPlayType(t)}catch(t){return""}},eo.nativeSourceHandler.canHandleSource=function(t,e){if(t.type)return eo.nativeSourceHandler.canPlayType(t.type);if(t.src){var n=Qn(t.src);return eo.nativeSourceHandler.canPlayType("video/"+n)}return""},eo.nativeSourceHandler.handleSource=function(t,e,n){e.setSrc(t.src)},eo.nativeSourceHandler.dispose=function(){},eo.registerSourceHandler(eo.nativeSourceHandler),Rr.registerTech("Html5",eo);var so=Be(["\n        Using the tech directly can be dangerous. I hope you know 
16312what you're doing.\n        See https://github.com/videojs/video.js/issues/2617 for more info.\n      "],["\n        Using the tech directly can be dangerous. I hope you know what you're doing.\n        See https://github.com/videojs/video.js/issues/2617 for more info.\n      "]),ao=["progress","abort","suspend","emptied","stalled","loadedmetadata","loadeddata","timeupdate","ratechange","resize","volumechange","texttrackchange"],lo=function(t){function e(n,i,o){if(De(this,e),n.id=n.id||"vjs_video_"+R(),i=r(e.getTagSettings(n),i),i.initChildren=!1,i.createEl=!1,i.reportTouchActivity=!1,!i.language)if("function"==typeof n.closest){var s=n.closest("[lang]");s&&(i.language=s.getAttribute("lang"))}else for(var a=n;a&&1===a.nodeType;){if(k(a).hasOwnProperty("lang")){i.language=a.getAttribute("lang");break}a=a.parentNode}var l=Re(this,t.call(this,null,i,o));if(l.isReady_=!1,l.hasStarted_=!1,!l.options_||!l.options_.techOrder||!l.options_.techOrder.length)throw new Error("No techOrder specified. Did you overwrite videojs.options instead of just changing the properties you want to override?");if(l.tag=n,l.tagAttributes=n&&k(n),l.language(l.options_.language),i.languages){var c={};Object.getOwnPropertyNames(i.languages).forEach(function(t){c[t.toLowerCase()]=i.languages[t]}),l.languages_=c}else l.languages_=e.prototype.options_.languages;l.cache_={},l.poster_=i.poster||"",l.controls_=!!i.controls,l.cache_.lastVolume=1,n.controls=!1,l.scrubbing_=!1,l.el_=l.createEl(),G(l,{eventBusKey:"el_"});var u=Z(l.options_);if(i.plugins){var h=i.plugins;Object.keys(h).forEach(function(t){if("function"!=typeof this[t])throw new Error('plugin "'+t+'" does not exist');this[t](h[t])},l)}l.options_.playerOptions=u,l.middleware_=[],l.initChildren(),l.isAudio("audio"===n.nodeName.toLowerCase()),l.controls()?l.addClass("vjs-controls-enabled"):l.addClass("vjs-controls-disabled"),l.el_.setAttribute("role","region"),l.isAudio()?l.el_.setAttribute("aria-label",l.localize("Audio Player")):l.el_.setAttribute("aria-label",l.localize("Video Player")),l.isAudio()&&l.addClass("vjs-audio"),l.flexNotSupported_()&&l.addClass("vjs-no-flex"),ge||l.addClass("vjs-workinghover"),e.players[l.id_]=l;var p=ne.split(".")[0];return l.addClass("vjs-v"+p),l.userActive(!0),l.reportUserActivity(),l.listenForUserActivity_(),l.on("fullscreenchange",l.handleFullscreenChange_),l.on("stageclick",l.handleStageClick_),l.changingSrc_=!1,l}return Le(e,t),e.prototype.dispose=function(){this.trigger("dispose"),this.off("dispose"),this.styleEl_&&this.styleEl_.parentNode&&this.styleEl_.parentNode.removeChild(this.styleEl_),e.players[this.id_]=null,this.tag&&this.tag.player&&(this.tag.player=null),this.el_&&this.el_.player&&(this.el_.player=null),this.tech_&&this.tech_.dispose(),t.prototype.dispose.call(this)},e.prototype.createEl=function(){var e=this.tag,n=void 0,r=this.playerElIngest_=e.parentNode&&e.parentNode.hasAttribute&&e.parentNode.hasAttribute("data-vjs-player");n=this.el_=r?e.parentNode:t.prototype.createEl.call(this,"div"),e.setAttribute("tabindex","-1"),e.removeAttribute("width"),e.removeAttribute("height");var i=k(e);if(Object.getOwnPropertyNames(i).forEach(function(t){"class"===t?n.className+=" "+i[t]:n.setAttribute(t,i[t])}),e.playerId=e.id,e.id+="_html5_api",e.className="vjs-tech",e.player=n.player=this,this.addClass("vjs-paused"),!0!==oe.VIDEOJS_NO_DYNAMIC_STYLE){this.styleEl_=an("vjs-styles-dimensions");var o=Ye(".vjs-styles-defaults"),s=Ye("head");s.insertBefore(this.styleEl_,o?o.nextSibling:s.firstChild)}this.width(this.options_.width),this.height(this.options_.height),this.fluid(this.options_.fluid),this.aspectRatio(this.options_.aspectRatio);for(var a=e.getElementsByTagName("a"),l=0;l<a.length;l++){var c=a.item(l);_(c,"vjs-hidden"),c.setAttribute("hidden","hidden")}return e.initNetworkState_=e.networkState,e.parentNode&&!r&&e.parentNode.insertBefore(n,e),g(e,n),this.children_.unshift(e),this.el_.setAttribute("lang",this.language_),this.el_=n,n},e.prototype.width=function(t){return this.dimension("width",t)},e.prototype.height=function(t){return this.dimension("height",t)},e.prototype.dimension=function(t,e){var n=t+"_";if(void 0===e)return this[n]||0;if(""===e)return this[n]=void 0,void this.updateStyleEl_();var r=parseFloat(e);
16312if(isNaN(r))return void Xe.error('Improper value "'+e+'" supplied for for '+t);this[n]=r,this.updateStyleEl_()},e.prototype.fluid=function(t){if(void 0===t)return!!this.fluid_;this.fluid_=!!t,t?this.addClass("vjs-fluid"):this.removeClass("vjs-fluid"),this.updateStyleEl_()},e.prototype.aspectRatio=function(t){if(void 0===t)return this.aspectRatio_;if(!/^\d+\:\d+$/.test(t))throw new Error("Improper value supplied for aspect ratio. The format should be width:height, for example 16:9.");this.aspectRatio_=t,this.fluid(!0),this.updateStyleEl_()},e.prototype.updateStyleEl_=function(){if(!0===oe.VIDEOJS_NO_DYNAMIC_STYLE){
16313var t="number"==typeof this.width_?this.width_:this.options_.width,e="number"==typeof this.height_?this.height_:this.options_.height,n=this.tech_&&this.tech_.el();return void(n&&(t>=0&&(n.width=t),e>=0&&(n.height=e)))}var r=void 0,i=void 0,o=void 0,s=void 0;o=void 0!==this.aspectRatio_&&"auto"!==this.aspectRatio_?this.aspectRatio_:this.videoWidth()>0?this.videoWidth()+":"+this.videoHeight():"16:9";var a=o.split(":"),l=a[1]/a[0];r=void 0!==this.width_?this.width_:void 0!==this.height_?this.height_/l:this.videoWidth()||300,i=void 0!==this.height_?this.height_:r*l,s=/^[^a-zA-Z]/.test(this.id())?"dimensions-"+this.id():this.id()+"-dimensions",this.addClass(s),ln(this.styleEl_,"\n      ."+s+" {\n        width: "+r+"px;\n        height: "+i+"px;\n      }\n\n      ."+s+".vjs-fluid {\n        padding-top: "+100*l+"%;\n      }\n    ")},e.prototype.loadTech_=function(t,e){var n=this;this.tech_&&this.unloadTech_();var i=J(t),o=t.charAt(0).toLowerCase()+t.slice(1);"Html5"!==i&&this.tag&&(Rr.getTech("Html5").disposeMediaElement(this.tag),this.tag.player=null,this.tag=null),this.techName_=i,this.isReady_=!1;var s={source:e,nativeControlsForTouch:this.options_.nativeControlsForTouch,playerId:this.id(),techId:this.id()+"_"+i+"_api",autoplay:this.options_.autoplay,playsinline:this.options_.playsinline,preload:this.options_.preload,loop:this.options_.loop,muted:this.options_.muted,poster:this.poster(),language:this.language(),playerElIngest:this.playerElIngest_||!1,"vtt.js":this.options_["vtt.js"]};Cr.names.forEach(function(t){var e=Cr[t];s[e.getterName]=n[e.privateName]}),r(s,this.options_[i]),r(s,this.options_[o]),r(s,this.options_[t.toLowerCase()]),this.tag&&(s.tag=this.tag),e&&e.src===this.cache_.src&&this.cache_.currentTime>0&&(s.startTime=this.cache_.currentTime);var a=Rr.getTech(t);if(!a)throw new Error("No Tech named '"+i+"' exists! '"+i+"' should be registered using videojs.registerTech()'");this.tech_=new a(s),this.tech_.ready(cn(this,this.handleTechReady_),!0),Nn.jsonToTextTracks(this.textTracksJson_||[],this.tech_),ao.forEach(function(t){n.on(n.tech_,t,n["handleTech"+J(t)+"_"])}),this.on(this.tech_,"loadstart",this.handleTechLoadStart_),this.on(this.tech_,"waiting",this.handleTechWaiting_),this.on(this.tech_,"canplay",this.handleTechCanPlay_),this.on(this.tech_,"canplaythrough",this.handleTechCanPlayThrough_),this.on(this.tech_,"playing",this.handleTechPlaying_),this.on(this.tech_,"ended",this.handleTechEnded_),this.on(this.tech_,"seeking",this.handleTechSeeking_),this.on(this.tech_,"seeked",this.handleTechSeeked_),this.on(this.tech_,"play",this.handleTechPlay_),this.on(this.tech_,"firstplay",this.handleTechFirstPlay_),this.on(this.tech_,"pause",this.handleTechPause_),this.on(this.tech_,"durationchange",this.handleTechDurationChange_),this.on(this.tech_,"fullscreenchange",this.handleTechFullscreenChange_),this.on(this.tech_,"error",this.handleTechError_),this.on(this.tech_,"loadedmetadata",this.updateStyleEl_),this.on(this.tech_,"posterchange",this.handleTechPosterChange_),this.on(this.tech_,"textdata",this.handleTechTextData_),this.usingNativeControls(this.techGet_("controls")),this.controls()&&!this.usingNativeControls()&&this.addTechControlsListeners_(),this.tech_.el().parentNode===this.el()||"Html5"===i&&this.tag||g(this.tech_.el(),this.el()),this.tag&&(this.tag.player=null,this.tag=null)},e.prototype.unloadTech_=function(){var t=this;Cr.names.forEach(function(e){var n=Cr[e];t[n.privateName]=t[n.getterName]()}),this.textTracksJson_=Nn.textTracksToJson(this.tech_),this.isReady_=!1,this.tech_.dispose(),this.tech_=!1},e.prototype.tech=function(t){return void 0===t&&Xe.warn(qe(so)),this.tech_}
16313,e.prototype.addTechControlsListeners_=function(){this.removeTechControlsListeners_(),this.on(this.tech_,"mousedown",this.handleTechClick_),this.on(this.tech_,"touchstart",this.handleTechTouchStart_),this.on(this.tech_,"touchmove",this.handleTechTouchMove_),this.on(this.tech_,"touchend",this.handleTechTouchEnd_),this.on(this.tech_,"tap",this.handleTechTap_)},e.prototype.removeTechControlsListeners_=function(){this.off(this.tech_,"tap",this.handleTechTap_),this.off(this.tech_,"touchstart",this.handleTechTouchStart_),this.off(this.tech_,"touchmove",this.handleTechTouchMove_),this.off(this.tech_,"touchend",this.handleTechTouchEnd_),this.off(this.tech_,"mousedown",this.handleTechClick_)},e.prototype.handleTechReady_=function(){if(this.triggerReady(),this.cache_.volume&&this.techCall_("setVolume",this.cache_.volume),this.handleTechPosterChange_(),this.handleTechDurationChange_(),(this.src()||this.currentSrc())&&this.tag&&this.options_.autoplay&&this.paused())try{delete this.tag.poster}catch(t){Xe("deleting tag.poster throws in some browsers",t)}},e.prototype.handleTechLoadStart_=function(){this.removeClass("vjs-ended"),this.removeClass("vjs-seeking"),this.error(null),this.paused()?(this.hasStarted(!1),this.trigger("loadstart")):(this.trigger("loadstart"),this.trigger("firstplay"))},e.prototype.hasStarted=function(t){if(void 0===t)return this.hasStarted_;t!==this.hasStarted_&&(this.hasStarted_=t,this.hasStarted_?(this.addClass("vjs-has-started"),this.trigger("firstplay")):this.removeClass("vjs-has-started"))},e.prototype.handleTechPlay_=function(){this.removeClass("vjs-ended"),this.removeClass("vjs-paused"),this.addClass("vjs-playing"),this.hasStarted(!0),this.trigger("play")},e.prototype.handleTechWaiting_=function(){var t=this;this.addClass("vjs-waiting"),this.trigger("waiting"),this.one("timeupdate",function(){return t.removeClass("vjs-waiting")})},e.prototype.handleTechCanPlay_=function(){this.removeClass("vjs-waiting"),this.trigger("canplay")},e.prototype.handleTechCanPlayThrough_=function(){this.removeClass("vjs-waiting"),this.trigger("canplaythrough")},e.prototype.handleTechPlaying_=function(){this.removeClass("vjs-waiting"),this.trigger("playing")},e.prototype.handleTechSeeking_=function(){this.addClass("vjs-seeking"),this.trigger("seeking")},e.prototype.handleTechSeeked_=function(){this.removeClass("vjs-seeking"),this.trigger("seeked")},e.prototype.handleTechFirstPlay_=function(){this.options_.starttime&&(Xe.warn("Passing the `starttime` option to the player will be deprecated 
16313in 6.0"),this.currentTime(this.options_.starttime)),this.addClass("vjs-has-started"),this.trigger("firstplay")},e.prototype.handleTechPause_=function(){this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.trigger("pause")},e.prototype.handleTechEnded_=function(){this.addClass("vjs-ended"),this.options_.loop?(this.currentTime(0),this.play()):this.paused()||this.pause(),this.trigger("ended")},e.prototype.handleTechDurationChange_=function(){this.duration(this.techGet_("duration"))},e.prototype.handleTechClick_=function(t){0===t.button&&this.controls()&&(this.paused()?this.play():this.pause())},e.prototype.handleTechTap_=function(){this.userActive(!this.userActive())},e.prototype.handleTechTouchStart_=function(){this.userWasActive=this.userActive()},e.prototype.handleTechTouchMove_=function(){this.userWasActive&&this.reportUserActivity()},e.prototype.handleTechTouchEnd_=function(t){t.preventDefault()},e.prototype.handleFullscreenChange_=function(){this.isFullscreen()?this.addClass("vjs-fullscreen"):this.removeClass("vjs-fullscreen")},e.prototype.handleStageClick_=function(){this.reportUserActivity()},e.prototype.handleTechFullscreenChange_=function(t,e){e&&this.isFullscreen(e.isFullscreen),this.trigger("fullscreenchange")},e.prototype.handleTechError_=function(){var t=this.tech_.error();this.error(t)},e.prototype.handleTechTextData_=function(){var t=null;arguments.length>1&&(t=arguments[1]),this.trigger("textdata",t)},e.prototype.getCache=function(){return this.cache_},e.prototype.techCall_=function(t,e){this.ready(function(){if(t in Vr)return Xt(this.middleware_,this.tech_,t,e);try{this.tech_&&this.tech_[t](e)}catch(t){throw Xe(t),t}},!0)},e.prototype.techGet_=function(t){if(this.tech_&&this.tech_.isReady_){if(t in Fr)return zt(this.middleware_,this.tech_,t);try{return this.tech_[t]()}catch(e){if(void 0===this.tech_[t])throw Xe("Video.js: "+t+" method not defined for "+this.techName_+" playback technology.",e),e;if("TypeError"===e.name)throw Xe("Video.js: "+t+" unavailable on "+this.techName_+" playback technology element.",e),this.tech_.isReady_=!1,e;throw Xe(e),e}}},e.prototype.play=function(){if(this.changingSrc_)this.ready(function(){var t=this.techGet_("play");void 0!==t&&"function"==typeof t.then&&t.then(null,function(t){})});else{if(this.isReady_&&(this.src()||this.currentSrc()))return this.techGet_("play");this.ready(function(){this.tech_.one("loadstart",function(){var t=this.play();void 0!==t&&"function"==typeof t.then&&t.then(null,function(t){})})})}},e.prototype.pause=function(){this.techCall_("pause")},e.prototype.paused=function(){return!1!==this.techGet_("paused")},e.prototype.played=function(){return this.techGet_("played")||rt(0,0)},e.prototype.scrubbing=function(t){if(void 0===t)return this.scrubbing_;this.scrubbing_=!!t,t?this.addClass("vjs-scrubbing"):this.removeClass("vjs-scrubbing")},e.prototype.currentTime=function(t){return void 0!==t?void this.techCall_("setCurrentTime",t):(this.cache_.currentTime=this.techGet_("currentTime")||0,this.cache_.currentTime)},e.prototype.duration=function(t){if(void 0===t)return void 0!==this.cache_.duration?this.cache_.duration:NaN;t=parseFloat(t),t<0&&(t=1/0),t!==this.cache_.duration&&(this.cache_.duration=t,t===1/0?this.addClass("vjs-live"):this.removeClass("vjs-live"),this.trigger("durationchange"))},e.prototype.remainingTime=function(){return this.duration()-this.currentTime()},e.prototype.remainingTimeDisplay=function(){return Math.floor(this.duration())-Math.floor(this.currentTime())},e.prototype.buffered=function(){var t=this.techGet_("buffered");return t&&t.length||(t=rt(0,0)),t},e.prototype.bufferedPercent=function(){return it(this.buffered(),this.duration())},e.prototype.bufferedEnd=function(){var t=this.buffered(),e=this.duration(),n=t.end(t.length-1);return n>e&&(n=e),n},e.prototype.volume=function(t){var e=void 0;return void 0!==t?(e=Math.max(0,Math.min(1,parseFloat(t))),this.cache_.volume=e,this.techCall_("setVolume",e),void(e>0&&this.lastVolume_(e))):(e=parseFloat(this.techGet_("volume")),isNaN(e)?1:e)},e.prototype.muted=function(t){return void 0!==t?void this.techCall_("setMuted",t):this.techGet_("muted")||!1},e.prototype.defaultMuted=function(t){return void 0!==t?this.techCall_("setDefaultMuted",t):this.techGet_("defaultMuted")||!1},e.prototype.lastVolume_=function(t){return void 0!==t&&0!==t?void(this.cache_.lastVolume=t):this.cache_.lastVolume},e.prototype.supportsFullScreen=function(){return this.techGet_("supportsFullScreen")||!1},e.prototype.isFullscreen=function(t){return void 0!==t?void(this.isFullscreen_=!!t):!!this.isFullscreen_},e.prototype.requestFullscreen=function(){var t=Cn;this.isFullscreen(!0),t.requestFullscreen?(z(ue,t.fullscreenchange,cn(this,function e(n){this.isFullscreen(ue[t.fullscreenElement]),!1===this.isFullscreen()&&X(ue,t.fullscreenchange,e),this.trigger("fullscreenchange")})),this.el_[t.requestFullscreen]()):this.tech_.supportsFullScreen()?this.techCall_("enterFullScreen"):(this.enterFullWindow(),this.trigger("fullscreenchange"))},e.prototype.exitFullscreen=function(){var t=Cn;this.isFullscreen(!1),t.requestFullscreen?ue[t.exitFullscreen]():this.tech_.supportsFullScreen()?this.techCall_("exitFullScreen"):(this.exitFullWindow(),this.trigger("fullscreenchange"))},e.prototype.enterFullWindow=function(){this.isFullWindow=!0,this.docOrigOverflow=ue.documentElement.style.overflow,z(ue,"keydown",cn(this,this.fullWindowOnEscKey)),ue.documentElement.style.overflow="hidden",_(ue.body,"vjs-full-window"),this.trigger("enterFullWindow")},e.prototype.fullWindowOnEscKey=function(t){27===t.keyCode&&(!0===this.isFullscreen()?this.exitFullscreen():this.exitFullWindow())},e.prototype.exitFullWindow=function(){this.isFullWindow=!1,X(ue,"keydown",this.fullWindowOnEscKey),ue.documentElement.style.overflow=this.docOrigOverflow,b(ue.body,"vjs-full-window"),this.trigger("exitFullWindow")},e.prototype.canPlayType=function(t){for(var e=void 0,n=0,r=this.options_.techOrder;n<r.length;n++){var i=r[n],o=Rr.getTech(i);if(o||(o=Tn.getComponent(i)),o){if(o.isSupported()&&(e=o.canPlayType(t)))return e}else Xe.error('The "'+i+'" tech is undefined. Skipped browser support check for that tech.')}return""},e.prototype.selectSource=function(t){var e=this,n=this.options_.techOrder.map(function(t){return[t,Rr.getTech(t)]}).filter(function(t){var e=t[0],n=t[1];return n?n.isSupported():(Xe.error('The "'+e+'" tech is undefined. Skipped browser support check for that tech.'),!1)}
16313),r=function(t,e,n){var r=void 0;return t.some(function(t){return e.some(function(e){if(r=n(t,e))return!0})}),r},i=function(t,n){var r=t[0];if(t[1].canPlaySource(n,e.options_[r.toLowerCase()]))return{source:n,tech:r}};return(this.options_.sourceOrder?r(t,n,function(t){return function(e,n){return t(n,e)}}(i)):r(n,t,i))||!1},e.prototype.src=function(t){var e=this;if(void 0===t)return this.cache_.src||"";var n=Hr(t);if(!n.length)return void this.setTimeout(function(){this.error({code:4,message:this.localize(this.options_.notSupportedMessage)})},0);this.cache_.sources=n,this.changingSrc_=!0,this.cache_.source=n[0],Ut(this,n[0],function(t,r){if(e.middleware_=r,e.src_(t))return n.length>1?e.src(n.slice(1)):(e.setTimeout(function(){this.error({code:4,message:this.localize(this.options_.notSupportedMessage)})},0),void e.triggerReady());e.changingSrc_=!1,e.cache_.src=t.src,Wt(r,e.tech_)})},e.prototype.src_=function(t){var e=this.selectSource([t]);return!e||(Q(e.tech,this.techName_)?(this.ready(function(){this.tech_.constructor.prototype.hasOwnProperty("setSource")?this.techCall_("setSource",t):this.techCall_("src",t.src),"auto"===this.options_.preload&&this.load()},!0),!1):(this.changingSrc_=!0,this.loadTech_(e.tech,e.source),!1))},e.prototype.load=function(){this.techCall_("load")},e.prototype.reset=function(){this.loadTech_(this.options_.techOrder[0],null),this.techCall_("reset")},e.prototype.currentSources=function(){var t=this.currentSource(),e=[];return 0!==Object.keys(t).length&&e.push(t),this.cache_.sources||e},e.prototype.currentSource=function(){return this.cache_.source||{}},e.prototype.currentSrc=function(){return this.currentSource()&&this.currentSource().src||""},e.prototype.currentType=function(){return this.currentSource()&&this.currentSource().type||""},e.prototype.preload=function(t){return void 0!==t?(this.techCall_("setPreload",t),void(this.options_.preload=t)):this.techGet_("preload")},e.prototype.autoplay=function(t){return void 0!==t?(this.techCall_("setAutoplay",t),void(this.options_.autoplay=t)):this.techGet_("autoplay",t)},e.prototype.playsinline=function(t){return void 0!==t?(this.techCall_("setPlaysinline",t),this.options_.playsinline=t,this):this.techGet_("playsinline")},e.prototype.loop=function(t){return void 0!==t?(this.techCall_("setLoop",t),void(this.options_.loop=t)):this.techGet_("loop")},e.prototype.poster=function(t){if(void 0===t)return this.poster_;t||(t=""),this.poster_=t,this.techCall_("setPoster",t),this.trigger("posterchange")},e.prototype.handleTechPosterChange_=function(){!this.poster_&&this.tech_&&this.tech_.poster&&(this.poster_=this.tech_.poster()||"",this.trigger("posterchange"))},e.prototype.controls=function(t){return void 0!==t?(t=!!t,void(this.controls_!==t&&(this.controls_=t,this.usingNativeControls()&&this.techCall_("setControls",t),t?(this.removeClass("vjs-controls-disabled"),this.addClass("vjs-controls-enabled"),this.trigger("controlsenabled"),this.usingNativeControls()||this.addTechControlsListeners_()):(this.removeClass("vjs-controls-enabled"),this.addClass("vjs-controls-disabled"),this.trigger("controlsdisabled"),this.usingNativeControls()||this.removeTechControlsListeners_())))):!!this.controls_},e.prototype.usingNativeControls=function(t){return void 0!==t?(t=!!t,void(this.usingNativeControls_!==t&&(this.usingNativeControls_=t,t?(this.addClass("vjs-using-native-controls"),this.trigger("usingnativecontrols")):(this.removeClass("vjs-using-native-controls"),this.trigger("usingcustomcontrols"))))):!!this.usingNativeControls_},e.prototype.error=function(t){return void 0===t?this.error_||null:null===t?(this.error_=t,this.removeClass("vjs-error"),void(this.errorDisplay&&this.errorDisplay.close())):(this.error_=new ot(t),this.addClass("vjs-error"),Xe.error("(CODE:"+this.error_.code+" "+ot.errorTypes[this.error_.code]+")",this.error_.message,this.error_),void this.trigger("error"))},e.prototype.reportUserActivity=function(t){this.userActivity_=!0},e.prototype.userActive=function(t){return void 0!==t?void((t=!!t)!==this.userActive_&&(this.userActive_=t,t?(this.userActivity_=!0,this.removeClass("vjs-user-inactive"),this.addClass("vjs-user-active"),this.trigger("useractive")):(this.userActivity_=!1,this.tech_&&this.tech_.one("mousemove",function(t){t.stopPropagation(),t.preventDefault()}),this.removeClass("vjs-user-active"),this.addClass("vjs-user-inactive"),this.trigger("userinactive")))):this.userActive_},e.prototype.listenForUserActivity_=function(){var t=void 0,e=void 0,n=void 0,r=cn(this,this.reportUserActivity),i=function(t){t.screenX===e&&t.screenY===n||(e=t.screenX,n=t.screenY,r())},o=function(){r(),this.clearInterval(t),t=this.setInterval(r,250)},s=function(e){r(),this.clearInterval(t)};this.on("mousedown",o),this.on("mousemove",i),this.on("mouseup",s),this.on("keydown",r),this.on("keyup",r);var a=void 0;this.setInterval(function(){if(this.userActivity_){this.userActivity_=!1,this.userActive(!0),this.clearTimeout(a);var t=this.options_.inactivityTimeout;t>0&&(a=this.setTimeout(function(){this.userActivity_||this.userActive(!1)},t))}},250)},e.prototype.playbackRate=function(t){return void 0!==t?void this.techCall_("setPlaybackRate",t):this.tech_&&this.tech_.featuresPlaybackRate?this.techGet_("playbackRate"):1},e.prototype.defaultPlaybackRate=function(t){return void 0!==t?this.techCall_("setDefaultPlaybackRate",t):this.tech_&&this.tech_.featuresPlaybackRate?this.techGet_("defaultPlaybackRate"):1},e.prototype.isAudio=function(t){return void 0!==t?void(this.isAudio_=!!t):!!this.isAudio_},e.prototype.addTextTrack=function(t,e,n){if(this.tech_)return this.tech_.addTextTrack(t,e,n)},e.prototype.addRemoteTextTrack=function(t,e){if(this.tech_)return this.tech_.addRemoteTextTrack(t,e)},e.prototype.removeRemoteTextTrack=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.track,n=void 0===e?arguments[0]:e;if(this.tech_)return this.tech_.removeRemoteTextTrack(n)},e.prototype.getVideoPlaybackQuality=function(){return this.techGet_("getVideoPlaybackQuality")},e.prototype.videoWidth=function(){return this.tech_&&this.tech_.videoWidth&&this.tech_.videoWidth()||0},e.prototype.videoHeight=function(){return this.tech_&&this.tech_.videoHeight&&this.tech_.videoHeight()||0},e.prototype.language=function(t){if(void 0===t)return this.language_;this.language_=String(t).toLowerCase()},e.prototype.languages=function(){return Z(e.prototype.options_.languages,this.languages_)},e.prototype.toJSON=function(){var t=Z(this.options_),e=t.tracks;t.tracks=[];for(var n=0;n<e.length;n++){var r=e[n];r=Z(r),r.player=void 0,t.tracks[n]=r}return t},e.prototype.createModal=function(t,e){var n=this;e=e||{},e.content=t||"";var r=new Dn(this,e);return this.addChild(r),r.on("dispose",function(){n.removeChild(r)}),r.open(),r},e.getTagSettings=function(t){var e={sources:[],tracks:[]},n=k(t),i=n["data-setup"];if(m(t,"vjs-fluid")&&(n.fluid=!0),null!==i){var o=An(i||"{}"),s=o[0],a=o[1];s&&Xe.error(s),r(n,a)}if(r(e,n),t.hasChildNodes())for(var l=t.childNodes,c=0,u=l.length;c<u;c++){var h=l[c],p=h.nodeName.toLowerCase();"source"===p?e.sources.push(k(h)):"track"===p&&e.tracks.push(k(h))}return e},e.prototype.flexNotSupported_=function(){var t=ue.createElement("i");return!("flexBasis"in t.style||"webkitFlexBasis"in t.style||"mozFlexBasis"in t.style||"msFlexBasis"in t.style||"msFlexOrder"in t.style)}
vendor: 5,704 bytes, line 16313
16313,e}(Tn);Cr.names.forEach(function(t){var e=Cr[t];lo.prototype[e.getterName]=function(){return this.tech_?this.tech_[e.getterName]():(this[e.privateName]=this[e.privateName]||new e.ListClass,this[e.privateName])}}),lo.players={};var co=oe.navigator;lo.prototype.options_={techOrder:Rr.defaultTechOrder_,html5:{},flash:{},inactivityTimeout:2e3,playbackRates:[],children:["mediaLoader","posterImage","textTrackDisplay","loadingSpinner","bigPlayButton","controlBar","errorDisplay","textTrackSettings"],language:co&&(co.languages&&co.languages[0]||co.userLanguage||co.language)||"en",languages:{},notSupportedMessage:"No compatible source was found for this media."},["ended","seeking","seekable","networkState","readyState"].forEach(function(t){lo.prototype[t]=function(){return this.techGet_(t)}}),ao.forEach(function(t){lo.prototype["handleTech"+J(t)+"_"]=function(){return this.trigger(t)}}),Tn.registerComponent("Player",lo);var uo={},ho=function(t){return uo.hasOwnProperty(t)},po=function(t){return ho(t)?uo[t]:void 0},fo=function(t,e){t.activePlugins_=t.activePlugins_||{},t.activePlugins_[e]=!0},vo=function(t,e,n){var r=(n?"before":"")+"pluginsetup";t.trigger(r,e),t.trigger(r+":"+e.name,e)},yo=function(t,e){var n=function(){vo(this,{name:t,plugin:e,instance:null},!0);var n=e.apply(this,arguments);return fo(this,t),vo(this,{name:t,plugin:e,instance:n}),n};return Object.keys(e).forEach(function(t){n[t]=e[t]}),n},go=function(t,e){return e.prototype.name=t,function(){vo(this,{name:t,plugin:e,instance:null},!0);for(var n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];var o=new(Function.prototype.bind.apply(e,[null].concat([this].concat(r))));return this[t]=function(){return o},vo(this,o.getEventHash()),o}},mo=function(){function t(e){if(De(this,t),this.constructor===t)throw new Error("Plugin must be sub-classed; not directly instantiated.");this.player=e,G(this),delete this.trigger,$(this,this.constructor.defaultState),fo(e,this.name),this.dispose=cn(this,this.dispose),e.on("dispose",this.dispose)}return t.prototype.getEventHash=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return t.name=this.name,t.plugin=this.constructor,t.instance=this,t},t.prototype.trigger=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return q(this.eventBusEl_,t,this.getEventHash(e))},t.prototype.handleStateChanged=function(t){},t.prototype.dispose=function(){var t=this.name,e=this.player;this.trigger("dispose"),this.off(),e.off("dispose",this.dispose),e.activePlugins_[t]=!1,this.player=this.state=null,e[t]=go(t,uo[t])},t.isBasic=function(e){var n="string"==typeof e?po(e):e;return"function"==typeof n&&!t.prototype.isPrototypeOf(n.prototype)},t.registerPlugin=function(e,n){if("string"!=typeof e)throw new Error('Illegal plugin name, "'+e+'", must be a string, was '+(void 0===e?"undefined":Ie(e))+".");if(ho(e))Xe.warn('A plugin named "'+e+'" already exists. You may want to avoid re-registering plugins!');else if(lo.prototype.hasOwnProperty(e))throw new Error('Illegal plugin name, "'+e+'", cannot share a name with an existing player method!');if("function"!=typeof n)throw new Error('Illegal plugin for "'+e+'", must be a function, was '+(void 0===n?"undefined":Ie(n))+".");return uo[e]=n,"plugin"!==e&&(t.isBasic(n)?lo.prototype[e]=yo(e,n):lo.prototype[e]=go(e,n)),n},t.deregisterPlugin=function(t){if("plugin"===t)throw new Error("Cannot de-register base plugin.");ho(t)&&(delete uo[t],delete lo.prototype[t])},t.getPlugins=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Object.keys(uo),e=void 0;return t.forEach(function(t){var n=po(t);n&&(e=e||{},e[t]=n)}),e},t.getPluginVersion=function(t){var e=po(t);return e&&e.VERSION||""},t}();mo.getPlugin=po,mo.BASE_PLUGIN_NAME="plugin",mo.registerPlugin("plugin",mo),lo.prototype.usingPlugin=function(t){return!!this.activePlugins_&&!0===this.activePlugins_[t]},lo.prototype.hasPlugin=function(t){return!!ho(t)};var _o=function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+(void 0===e?"undefined":Ie(e)));t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(t.super_=e)},bo=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=function(){t.apply(this,arguments)},r={};"object"===(void 0===e?"undefined":Ie(e))?(e.constructor!==Object.prototype.constructor&&(n=e.constructor),r=e):"function"==typeof e&&(n=e),_o(n,t);for(var i in r)r.hasOwnProperty(i)&&(n.prototype[i]=r[i]);return n};if("undefined"==typeof HTMLVideoElement&&h()&&(ue.createElement("video"),ue.createElement("audio"),ue.createElement("track")),te.hooks_={},te.hooks=function(t,e){return te.hooks_[t]=te.hooks_[t]||[],e&&(te.hooks_[t]=te.hooks_[t].concat(e)),te.hooks_[t]},te.hook=function(t,e){te.hooks(t,e)},te.hookOnce=function(t,e){te.hooks(t,[].concat(e).map(function(e){return function n(){te.removeHook(t,n),e.apply(void 0,arguments)}}))},te.removeHook=function(t,e){var n=te.hooks(t).indexOf(e);return!(n<=-1)&&(te.hooks_[t]=te.hooks_[t].slice(),te.hooks_[t].splice(n,1),!0)},!0!==oe.VIDEOJS_NO_DYNAMIC_STYLE&&h()){var To=Ye(".vjs-styles-defaults");if(!To){To=an("vjs-styles-defaults");var Co=Ye("head");Co&&Co.insertBefore(To,Co.firstChild),ln(To,"\n      .video-js {\n        width: 300px;\n        height: 150px;\n      }\n\n      .vjs-fluid {\n        padding-top: 56.25%\n      }\n    ")}}return Y(1,te),te.VERSION=ne,te.options=lo.prototype.options_,te.getPlayers=function(){return lo.players},te.players=lo.players,te.getComponent=Tn.getComponent,te.registerComponent=function(t,e){Rr.isTech(e)&&Xe.warn("The "+t+" tech w
16313as registered as a component. It should instead be registered using videojs.registerTech(name, tech)"),Tn.registerComponent.call(Tn,t,e)},te.getTech=Rr.getTech,te.registerTech=Rr.registerTech,te.use=Ht,te.browser=Ne,te.TOUCH_ENABLED=Me,te.extend=bo,te.mergeOptions=Z,te.bind=cn,te.registerPlugin=mo.registerPlugin,te.plugin=function(t,e){return Xe.warn("videojs.plugin() is deprecated; use videojs.registerPlugin() instead"),mo.registerPlugin(t,e)},te.getPlugins=mo.getPlugins,te.getPlugin=mo.getPlugin,te.getPluginVersion=mo.getPluginVersion,te.addLanguage=function(t,e){var n;return t=(""+t).toLowerCase(),te.options.languages=Z(te.options.languages,(n={},n[t]=e,n)),te.options.languages[t]},te.log=Xe,te.createTimeRange=te.createTimeRanges=rt,te.formatTime=$t,te.parseUrl=$n,te.isCrossOrigin=Zn,te.EventTarget=hn,te.on=z,te.one=K,te.off=X,te.trigger=q,te.xhr=hr,te.TextTrack=fr,te.AudioTrack=vr,te.VideoTrack=yr,["isEl","isTextNode","createEl","hasClass","addClass","removeClass","toggleClass","setAttributes","getAttributes","emptyEl","appendContent","insertContent"].forEach(function(t){te[t]=function(){return Xe.warn("videojs."+t+"() is deprecated; use videojs.dom."+t+"() instead"),$e[t].apply(null,arguments)}}),te.computedStyle=a,te.dom=$e,te.url=tr,te});
16314
16315(function($) {
16316    $.fn.dfvideo = function() {
16317        if (!$(this).length) {
16318            return this;
16319        }
16320
16321        $.each(this, function() {
16322            videojs(this, {
16323                'autoplay': $(this).data('autoplay') == 1
16324            });
16325        });
16326
16327        return this;
16328    };
16329})(jQuery);
16330
16331$(document).ready(function(){
16332    $('.dfvideo:visible').dfvideo();
16333});
16334
16335$(window).resize(function() {
16336    $('.dfvideo:visible').dfvideo();
16337});
16338
16339$(function() {
16340    var $slider = $('.slider');
16341    $slider.after('<div class="main-slider flexslider flexslider-init"><div class="slide-container"></div></div>');
16342    var $mainSlider = $('.main-slider');
16343    $mainSlider.clone().attr('class', 'thumbnail-slider flexslider flexslider-init').insertAfter('.main-slider');
16344    $slider.find('figure').parent().clone().appendTo('.main-slider div.slide-container');
16345    $slider.find('figure').clone().appendTo('.thumbnail-slider div.slide-container').wrap("<div></div>");
16346    $slider.remove();
16347
16348    $('.thumbnail-slider').flexslider({
16349        selector: "div.slide-container > *",
16350        animation: "slide",
16351        animationLoop: false,
16352        slideshow: false,
16353        animationSpeed: dfFlexsliderAnimationSpeed,
16354        controlNav: false,
16355        multipleKeyboard: true,
16356        itemWidth: 140,
16357        itemMargin: 20,
16358        minItems: 2,
16359        maxItems: 4,
16360        asNavFor: '.main-slider'
16361    });
16362
16363    $mainSlider.flexslider({
16364        smoothHeight: true,
16365        selector: "div.slide-container > *",
16366        animation: "slide",
16367        multipleKeyboard: true,
16368        controlNav: false,
16369        animationLoop: false,
16370        slideshow: false,
16371        animationSpeed: dfFlexsliderAnimationSpeed,
16372        sync: ".thumbnail-slider",
16373        start: function(){
16374            $('.flexslider').animate(
16375                {
16376                    opacity:1
16377                },
16378                500,
16379                function() {
16380                    $('.flexslider-init').removeClass('flexslider-init');
16381                    $(window).resize();
16382                }
16383            )
16384        }
16385    });
16386});
16387
16388$(function () {
16389    var $form = $('form[name="appointment_signup_form"]'),
16390        $error = $form.find('.form-group.has-error'),
16391        checkOnBeforeUnload = false;
16392
16393    if ($error.length > 0) {
16394        $('.appointment-show-form.btn').click();
16395        $error[0].scrollIntoView();
16396    }
16397
16398    $form.find('select, input, textarea').on('change keypress paste', function() {
16399        checkOnBeforeUnload = true;
16400    });
16401
16402    $form.on('submit', function(){
16403        checkOnBeforeUnload = false;
16404    });
16405
16406    window.onbeforeunload = function() {
16407        if (checkOnBeforeUnload) {
16408            return true;
16409        }
16410    }
16411});
16412
16413var setChildrenMaxHeight = function () {
16414    var $childrenItems = $(this).find('.content-view-thumbnail').css('min-height', 0),
16415        heights = $childrenItems.map(function () {
16416            return $(this).innerHeight();
16417        }).get(),
16418        maxHeight = Math.max.apply(null, heights);
16419    if (maxHeight) {
16420        $childrenItems.css('min-height', maxHeight);
16421    }
16422};
16423
16424$(function () {
16425    var $slider = $('.dfslider-owlcarousel');
16426    $slider.each(setChildrenMaxHeight);
16427    window.setTimeout(function () {
16428        $slider.each(setChildrenMaxHeight);
16429    }, 500);
16430    $slider.on('refreshed.owl.carousel', function (event) {
16431        setChildrenMaxHeight.bind(event.relatedTarget.$stage)();
16432    });
16433});

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.