!function(t){var e={};function i(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,i),o.l=!0,o.exports}i.m=t,i.c=e,i.d=function(t,e,n){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)i.d(n,o,function(e){return t[e]}.bind(null,o));return n},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=8)}([,function(t,e,i){var n;
/*!
 * jQuery JavaScript Library v3.4.1
 * https://jquery.com/
 *
 * Includes Sizzle.js
 * https://sizzlejs.com/
 *
 * Copyright JS Foundation and other contributors
 * Released under the MIT license
 * https://jquery.org/license
 *
 * Date: 2019-05-01T21:04Z
 */
/*!
 * jQuery JavaScript Library v3.4.1
 * https://jquery.com/
 *
 * Includes Sizzle.js
 * https://sizzlejs.com/
 *
 * Copyright JS Foundation and other contributors
 * Released under the MIT license
 * https://jquery.org/license
 *
 * Date: 2019-05-01T21:04Z
 */
!function(e,i){"use strict";"object"==typeof t.exports?t.exports=e.document?i(e,!0):function(t){if(!t.document)throw new Error("jQuery requires a window with a document");return i(t)}:i(e)}("undefined"!=typeof window?window:this,function(i,o){"use strict";var s=[],r=i.document,a=Object.getPrototypeOf,l=s.slice,c=s.concat,u=s.push,d=s.indexOf,h={},p=h.toString,f=h.hasOwnProperty,m=f.toString,v=m.call(Object),g={},y=function(t){return"function"==typeof t&&"number"!=typeof t.nodeType},b=function(t){return null!=t&&t===t.window},w={type:!0,src:!0,nonce:!0,noModule:!0};function x(t,e,i){var n,o,s=(i=i||r).createElement("script");if(s.text=t,e)for(n in w)(o=e[n]||e.getAttribute&&e.getAttribute(n))&&s.setAttribute(n,o);i.head.appendChild(s).parentNode.removeChild(s)}function T(t){return null==t?t+"":"object"==typeof t||"function"==typeof t?h[p.call(t)]||"object":typeof t}var k=function(t,e){return new k.fn.init(t,e)},C=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;function S(t){var e=!!t&&"length"in t&&t.length,i=T(t);return!y(t)&&!b(t)&&("array"===i||0===e||"number"==typeof e&&e>0&&e-1 in t)}k.fn=k.prototype={jquery:"3.4.1",constructor:k,length:0,toArray:function(){return l.call(this)},get:function(t){return null==t?l.call(this):t<0?this[t+this.length]:this[t]},pushStack:function(t){var e=k.merge(this.constructor(),t);return e.prevObject=this,e},each:function(t){return k.each(this,t)},map:function(t){return this.pushStack(k.map(this,function(e,i){return t.call(e,i,e)}))},slice:function(){return this.pushStack(l.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(t){var e=this.length,i=+t+(t<0?e:0);return this.pushStack(i>=0&&i<e?[this[i]]:[])},end:function(){return this.prevObject||this.constructor()},push:u,sort:s.sort,splice:s.splice},k.extend=k.fn.extend=function(){var t,e,i,n,o,s,r=arguments[0]||{},a=1,l=arguments.length,c=!1;for("boolean"==typeof r&&(c=r,r=arguments[a]||{},a++),"object"==typeof r||y(r)||(r={}),a===l&&(r=this,a--);a<l;a++)if(null!=(t=arguments[a]))for(e in t)n=t[e],"__proto__"!==e&&r!==n&&(c&&n&&(k.isPlainObject(n)||(o=Array.isArray(n)))?(i=r[e],s=o&&!Array.isArray(i)?[]:o||k.isPlainObject(i)?i:{},o=!1,r[e]=k.extend(c,s,n)):void 0!==n&&(r[e]=n));return r},k.extend({expando:"jQuery"+("3.4.1"+Math.random()).replace(/\D/g,""),isReady:!0,error:function(t){throw new Error(t)},noop:function(){},isPlainObject:function(t){var e,i;return!(!t||"[object Object]"!==p.call(t))&&(!(e=a(t))||"function"==typeof(i=f.call(e,"constructor")&&e.constructor)&&m.call(i)===v)},isEmptyObject:function(t){var e;for(e in t)return!1;return!0},globalEval:function(t,e){x(t,{nonce:e&&e.nonce})},each:function(t,e){var i,n=0;if(S(t))for(i=t.length;n<i&&!1!==e.call(t[n],n,t[n]);n++);else for(n in t)if(!1===e.call(t[n],n,t[n]))break;return t},trim:function(t){return null==t?"":(t+"").replace(C,"")},makeArray:function(t,e){var i=e||[];return null!=t&&(S(Object(t))?k.merge(i,"string"==typeof t?[t]:t):u.call(i,t)),i},inArray:function(t,e,i){return null==e?-1:d.call(e,t,i)},merge:function(t,e){for(var i=+e.length,n=0,o=t.length;n<i;n++)t[o++]=e[n];return t.length=o,t},grep:function(t,e,i){for(var n=[],o=0,s=t.length,r=!i;o<s;o++)!e(t[o],o)!==r&&n.push(t[o]);return n},map:function(t,e,i){var n,o,s=0,r=[];if(S(t))for(n=t.length;s<n;s++)null!=(o=e(t[s],s,i))&&r.push(o);else for(s in t)null!=(o=e(t[s],s,i))&&r.push(o);return c.apply([],r)},guid:1,support:g}),"function"==typeof Symbol&&(k.fn[Symbol.iterator]=s[Symbol.iterator]),k.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(t,e){h["[object "+e+"]"]=e.toLowerCase()});var D=
/*!
 * Sizzle CSS Selector Engine v2.3.4
 * https://sizzlejs.com/
 *
 * Copyright JS Foundation and other contributors
 * Released under the MIT license
 * https://js.foundation/
 *
 * Date: 2019-04-08
 */
function(t){var e,i,n,o,s,r,a,l,c,u,d,h,p,f,m,v,g,y,b,w="sizzle"+1*new Date,x=t.document,T=0,k=0,C=lt(),S=lt(),D=lt(),E=lt(),M=function(t,e){return t===e&&(d=!0),0},L={}.hasOwnProperty,$=[],N=$.pop,A=$.push,z=$.push,O=$.slice,j=function(t,e){for(var i=0,n=t.length;i<n;i++)if(t[i]===e)return i;return-1},I="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",H="[\\x20\\t\\r\\n\\f]",P="(?:\\\\.|[\\w-]|[^\0-\\xa0])+",R="\\["+H+"*("+P+")(?:"+H+"*([*^$|!~]?=)"+H+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+P+"))|)"+H+"*\\]",F=":("+P+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+R+")*)|.*)\\)|)",_=new RegExp(H+"+","g"),q=new RegExp("^"+H+"+|((?:^|[^\\\\])(?:\\\\.)*)"+H+"+$","g"),U=new RegExp("^"+H+"*,"+H+"*"),B=new RegExp("^"+H+"*([>+~]|"+H+")"+H+"*"),Y=new RegExp(H+"|>"),W=new RegExp(F),V=new RegExp("^"+P+"$"),X={ID:new RegExp("^#("+P+")"),CLASS:new RegExp("^\\.("+P+")"),TAG:new RegExp("^("+P+"|[*])"),ATTR:new RegExp("^"+R),PSEUDO:new RegExp("^"+F),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+H+"*(even|odd|(([+-]|)(\\d*)n|)"+H+"*(?:([+-]|)"+H+"*(\\d+)|))"+H+"*\\)|)","i"),bool:new RegExp("^(?:"+I+")$","i"),needsContext:new RegExp("^"+H+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+H+"*((?:-\\d)?\\d*)"+H+"*\\)|)(?=[^-]|$)","i")},G=/HTML$/i,J=/^(?:input|select|textarea|button)$/i,Z=/^h\d$/i,K=/^[^{]+\{\s*\[native \w/,Q=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,tt=/[+~]/,et=new RegExp("\\\\([\\da-f]{1,6}"+H+"?|("+H+")|.)","ig"),it=function(t,e,i){var n="0x"+e-65536;return n!=n||i?e:n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320)},nt=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ot=function(t,e){return e?"\0"===t?"�":t.slice(0,-1)+"\\"+t.charCodeAt(t.length-1).toString(16)+" ":"\\"+t},st=function(){h()},rt=wt(function(t){return!0===t.disabled&&"fieldset"===t.nodeName.toLowerCase()},{dir:"parentNode",next:"legend"});try{z.apply($=O.call(x.childNodes),x.childNodes),$[x.childNodes.length].nodeType}catch(t){z={apply:$.length?function(t,e){A.apply(t,O.call(e))}:function(t,e){for(var i=t.length,n=0;t[i++]=e[n++];);t.length=i-1}}}function at(t,e,n,o){var s,a,c,u,d,f,g,y=e&&e.ownerDocument,T=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==T&&9!==T&&11!==T)return n;if(!o&&((e?e.ownerDocument||e:x)!==p&&h(e),e=e||p,m)){if(11!==T&&(d=Q.exec(t)))if(s=d[1]){if(9===T){if(!(c=e.getElementById(s)))return n;if(c.id===s)return n.push(c),n}else if(y&&(c=y.getElementById(s))&&b(e,c)&&c.id===s)return n.push(c),n}else{if(d[2])return z.apply(n,e.getElementsByTagName(t)),n;if((s=d[3])&&i.getElementsByClassName&&e.getElementsByClassName)return z.apply(n,e.getElementsByClassName(s)),n}if(i.qsa&&!E[t+" "]&&(!v||!v.test(t))&&(1!==T||"object"!==e.nodeName.toLowerCase())){if(g=t,y=e,1===T&&Y.test(t)){for((u=e.getAttribute("id"))?u=u.replace(nt,ot):e.setAttribute("id",u=w),a=(f=r(t)).length;a--;)f[a]="#"+u+" "+bt(f[a]);g=f.join(","),y=tt.test(t)&&gt(e.parentNode)||e}try{return z.apply(n,y.querySelectorAll(g)),n}catch(e){E(t,!0)}finally{u===w&&e.removeAttribute("id")}}}return l(t.replace(q,"$1"),e,n,o)}function lt(){var t=[];return function e(i,o){return t.push(i+" ")>n.cacheLength&&delete e[t.shift()],e[i+" "]=o}}function ct(t){return t[w]=!0,t}function ut(t){var e=p.createElement("fieldset");try{return!!t(e)}catch(t){return!1}finally{e.parentNode&&e.parentNode.removeChild(e),e=null}}function dt(t,e){for(var i=t.split("|"),o=i.length;o--;)n.attrHandle[i[o]]=e}function ht(t,e){var i=e&&t,n=i&&1===t.nodeType&&1===e.nodeType&&t.sourceIndex-e.sourceIndex;if(n)return n;if(i)for(;i=i.nextSibling;)if(i===e)return-1;return t?1:-1}function pt(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function ft(t){return function(e){var i=e.nodeName.toLowerCase();return("input"===i||"button"===i)&&e.type===t}}function mt(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&rt(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function vt(t){return ct(function(e){return e=+e,ct(function(i,n){for(var o,s=t([],i.length,e),r=s.length;r--;)i[o=s[r]]&&(i[o]=!(n[o]=i[o]))})})}function gt(t){return t&&void 0!==t.getElementsByTagName&&t}for(e in i=at.support={},s=at.isXML=function(t){var e=t.namespaceURI,i=(t.ownerDocument||t).documentElement;return!G.test(e||i&&i.nodeName||"HTML")},h=at.setDocument=function(t){var e,o,r=t?t.ownerDocument||t:x;return r!==p&&9===r.nodeType&&r.documentElement?(f=(p=r).documentElement,m=!s(p),x!==p&&(o=p.defaultView)&&o.top!==o&&(o.addEventListener?o.addEventListener("unload",st,!1):o.attachEvent&&o.attachEvent("onunload",st)),i.attributes=ut(function(t){return t.className="i",!t.getAttribute("className")}),i.getElementsByTagName=ut(function(t){return t.appendChild(p.createComment("")),!t.getElementsByTagName("*").length}),i.getElementsByClassName=K.test(p.getElementsByClassName),i.getById=ut(function(t){return f.appendChild(t).id=w,!p.getElementsByName||!p.getElementsByName(w).length}),i.getById?(n.filter.ID=function(t){var e=t.replace(et,it);return function(t){return t.getAttribute("id")===e}},n.find.ID=function(t,e){if(void 0!==e.getElementById&&m){var i=e.getElementById(t);return i?[i]:[]}}):(n.filter.ID=function(t){var e=t.replace(et,it);return function(t){var i=void 0!==t.getAttributeNode&&t.getAttributeNode("id");return i&&i.value===e}},n.find.ID=function(t,e){if(void 0!==e.getElementById&&m){var i,n,o,s=e.getElementById(t);if(s){if((i=s.getAttributeNode("id"))&&i.value===t)return[s];for(o=e.getElementsByName(t),n=0;s=o[n++];)if((i=s.getAttributeNode("id"))&&i.value===t)return[s]}return[]}}),n.find.TAG=i.getElementsByTagName?function(t,e){return void 0!==e.getElementsByTagName?e.getElementsByTagName(t):i.qsa?e.querySelectorAll(t):void 0}:function(t,e){var i,n=[],o=0,s=e.getElementsByTagName(t);if("*"===t){for(;i=s[o++];)1===i.nodeType&&n.push(i);return n}return s},n.find.CLASS=i.getElementsByClassName&&function(t,e){if(void 0!==e.getElementsByClassName&&m)return e.getElementsByClassName(t)},g=[],v=[],(i.qsa=K.test(p.querySelectorAll))&&(ut(function(t){f.appendChild(t).innerHTML="<a id='"+w+"'></a><select id='"+w+"-\r\\' msallowcapture=''><option selected=''></option></select>",t.querySelectorAll("[msallowcapture^='']").length&&v.push("[*^$]="+H+"*(?:''|\"\")"),t.querySelectorAll("[selected]").length||v.push("\\["+H+"*(?:value|"+I+")"),t.querySelectorAll("[id~="+w+"-]").length||v.push("~="),t.querySelectorAll(":checked").length||v.push(":checked"),t.querySelectorAll("a#"+w+"+*").length||v.push(".#.+[+~]")}),ut(function(t){t.innerHTML="<a href='' disabled='disabled'></a><select disabled='disabled'><option/></select>";var e=p.createElement("input");e.setAttribute("type","hidden"),t.appendChild(e).setAttribute("name","D"),t.querySelectorAll("[name=d]").length&&v.push("name"+H+"*[*^$|!~]?="),2!==t.querySelectorAll(":enabled").length&&v.push(":enabled",":disabled"),f.appendChild(t).disabled=!0,2!==t.querySelectorAll(":disabled").length&&v.push(":enabled",":disabled"),t.querySelectorAll("*,:x"),v.push(",.*:")})),(i.matchesSelector=K.test(y=f.matches||f.webkitMatchesSelector||f.mozMatchesSelector||f.oMatchesSelector||f.msMatchesSelector))&&ut(function(t){i.disconnectedMatch=y.call(t,"*"),y.call(t,"[s!='']:x"),g.push("!=",F)}),v=v.length&&new RegExp(v.join("|")),g=g.length&&new RegExp(g.join("|")),e=K.test(f.compareDocumentPosition),b=e||K.test(f.contains)?function(t,e){var i=9===t.nodeType?t.documentElement:t,n=e&&e.parentNode;return t===n||!(!n||1!==n.nodeType||!(i.contains?i.contains(n):t.compareDocumentPosition&&16&t.compareDocumentPosition(n)))}:function(t,e){if(e)for(;e=e.parentNode;)if(e===t)return!0;return!1},M=e?function(t,e){if(t===e)return d=!0,0;var n=!t.compareDocumentPosition-!e.compareDocumentPosition;return n||(1&(n=(t.ownerDocument||t)===(e.ownerDocument||e)?t.compareDocumentPosition(e):1)||!i.sortDetached&&e.compareDocumentPosition(t)===n?t===p||t.ownerDocument===x&&b(x,t)?-1:e===p||e.ownerDocument===x&&b(x,e)?1:u?j(u,t)-j(u,e):0:4&n?-1:1)}:function(t,e){if(t===e)return d=!0,0;var i,n=0,o=t.parentNode,s=e.parentNode,r=[t],a=[e];if(!o||!s)return t===p?-1:e===p?1:o?-1:s?1:u?j(u,t)-j(u,e):0;if(o===s)return ht(t,e);for(i=t;i=i.parentNode;)r.unshift(i);for(i=e;i=i.parentNode;)a.unshift(i);for(;r[n]===a[n];)n++;return n?ht(r[n],a[n]):r[n]===x?-1:a[n]===x?1:0},p):p},at.matches=function(t,e){return at(t,null,null,e)},at.matchesSelector=function(t,e){if((t.ownerDocument||t)!==p&&h(t),i.matchesSelector&&m&&!E[e+" "]&&(!g||!g.test(e))&&(!v||!v.test(e)))try{var n=y.call(t,e);if(n||i.disconnectedMatch||t.document&&11!==t.document.nodeType)return n}catch(t){E(e,!0)}return at(e,p,null,[t]).length>0},at.contains=function(t,e){return(t.ownerDocument||t)!==p&&h(t),b(t,e)},at.attr=function(t,e){(t.ownerDocument||t)!==p&&h(t);var o=n.attrHandle[e.toLowerCase()],s=o&&L.call(n.attrHandle,e.toLowerCase())?o(t,e,!m):void 0;return void 0!==s?s:i.attributes||!m?t.getAttribute(e):(s=t.getAttributeNode(e))&&s.specified?s.value:null},at.escape=function(t){return(t+"").replace(nt,ot)},at.error=function(t){throw new Error("Syntax error, unrecognized expression: "+t)},at.uniqueSort=function(t){var e,n=[],o=0,s=0;if(d=!i.detectDuplicates,u=!i.sortStable&&t.slice(0),t.sort(M),d){for(;e=t[s++];)e===t[s]&&(o=n.push(s));for(;o--;)t.splice(n[o],1)}return u=null,t},o=at.getText=function(t){var e,i="",n=0,s=t.nodeType;if(s){if(1===s||9===s||11===s){if("string"==typeof t.textContent)return t.textContent;for(t=t.firstChild;t;t=t.nextSibling)i+=o(t)}else if(3===s||4===s)return t.nodeValue}else for(;e=t[n++];)i+=o(e);return i},(n=at.selectors={cacheLength:50,createPseudo:ct,match:X,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(t){return t[1]=t[1].replace(et,it),t[3]=(t[3]||t[4]||t[5]||"").replace(et,it),"~="===t[2]&&(t[3]=" "+t[3]+" "),t.slice(0,4)},CHILD:function(t){return t[1]=t[1].toLowerCase(),"nth"===t[1].slice(0,3)?(t[3]||at.error(t[0]),t[4]=+(t[4]?t[5]+(t[6]||1):2*("even"===t[3]||"odd"===t[3])),t[5]=+(t[7]+t[8]||"odd"===t[3])):t[3]&&at.error(t[0]),t},PSEUDO:function(t){var e,i=!t[6]&&t[2];return X.CHILD.test(t[0])?null:(t[3]?t[2]=t[4]||t[5]||"":i&&W.test(i)&&(e=r(i,!0))&&(e=i.indexOf(")",i.length-e)-i.length)&&(t[0]=t[0].slice(0,e),t[2]=i.slice(0,e)),t.slice(0,3))}},filter:{TAG:function(t){var e=t.replace(et,it).toLowerCase();return"*"===t?function(){return!0}:function(t){return t.nodeName&&t.nodeName.toLowerCase()===e}},CLASS:function(t){var e=C[t+" "];return e||(e=new RegExp("(^|"+H+")"+t+"("+H+"|$)"))&&C(t,function(t){return e.test("string"==typeof t.className&&t.className||void 0!==t.getAttribute&&t.getAttribute("class")||"")})},ATTR:function(t,e,i){return function(n){var o=at.attr(n,t);return null==o?"!="===e:!e||(o+="","="===e?o===i:"!="===e?o!==i:"^="===e?i&&0===o.indexOf(i):"*="===e?i&&o.indexOf(i)>-1:"$="===e?i&&o.slice(-i.length)===i:"~="===e?(" "+o.replace(_," ")+" ").indexOf(i)>-1:"|="===e&&(o===i||o.slice(0,i.length+1)===i+"-"))}},CHILD:function(t,e,i,n,o){var s="nth"!==t.slice(0,3),r="last"!==t.slice(-4),a="of-type"===e;return 1===n&&0===o?function(t){return!!t.parentNode}:function(e,i,l){var c,u,d,h,p,f,m=s!==r?"nextSibling":"previousSibling",v=e.parentNode,g=a&&e.nodeName.toLowerCase(),y=!l&&!a,b=!1;if(v){if(s){for(;m;){for(h=e;h=h[m];)if(a?h.nodeName.toLowerCase()===g:1===h.nodeType)return!1;f=m="only"===t&&!f&&"nextSibling"}return!0}if(f=[r?v.firstChild:v.lastChild],r&&y){for(b=(p=(c=(u=(d=(h=v)[w]||(h[w]={}))[h.uniqueID]||(d[h.uniqueID]={}))[t]||[])[0]===T&&c[1])&&c[2],h=p&&v.childNodes[p];h=++p&&h&&h[m]||(b=p=0)||f.pop();)if(1===h.nodeType&&++b&&h===e){u[t]=[T,p,b];break}}else if(y&&(b=p=(c=(u=(d=(h=e)[w]||(h[w]={}))[h.uniqueID]||(d[h.uniqueID]={}))[t]||[])[0]===T&&c[1]),!1===b)for(;(h=++p&&h&&h[m]||(b=p=0)||f.pop())&&((a?h.nodeName.toLowerCase()!==g:1!==h.nodeType)||!++b||(y&&((u=(d=h[w]||(h[w]={}))[h.uniqueID]||(d[h.uniqueID]={}))[t]=[T,b]),h!==e)););return(b-=o)===n||b%n==0&&b/n>=0}}},PSEUDO:function(t,e){var i,o=n.pseudos[t]||n.setFilters[t.toLowerCase()]||at.error("unsupported pseudo: "+t);return o[w]?o(e):o.length>1?(i=[t,t,"",e],n.setFilters.hasOwnProperty(t.toLowerCase())?ct(function(t,i){for(var n,s=o(t,e),r=s.length;r--;)t[n=j(t,s[r])]=!(i[n]=s[r])}):function(t){return o(t,0,i)}):o}},pseudos:{not:ct(function(t){var e=[],i=[],n=a(t.replace(q,"$1"));return n[w]?ct(function(t,e,i,o){for(var s,r=n(t,null,o,[]),a=t.length;a--;)(s=r[a])&&(t[a]=!(e[a]=s))}):function(t,o,s){return e[0]=t,n(e,null,s,i),e[0]=null,!i.pop()}}),has:ct(function(t){return function(e){return at(t,e).length>0}}),contains:ct(function(t){return t=t.replace(et,it),function(e){return(e.textContent||o(e)).indexOf(t)>-1}}),lang:ct(function(t){return V.test(t||"")||at.error("unsupported lang: "+t),t=t.replace(et,it).toLowerCase(),function(e){var i;do{if(i=m?e.lang:e.getAttribute("xml:lang")||e.getAttribute("lang"))return(i=i.toLowerCase())===t||0===i.indexOf(t+"-")}while((e=e.parentNode)&&1===e.nodeType);return!1}}),target:function(e){var i=t.location&&t.location.hash;return i&&i.slice(1)===e.id},root:function(t){return t===f},focus:function(t){return t===p.activeElement&&(!p.hasFocus||p.hasFocus())&&!!(t.type||t.href||~t.tabIndex)},enabled:mt(!1),disabled:mt(!0),checked:function(t){var e=t.nodeName.toLowerCase();return"input"===e&&!!t.checked||"option"===e&&!!t.selected},selected:function(t){return t.parentNode&&t.parentNode.selectedIndex,!0===t.selected},empty:function(t){for(t=t.firstChild;t;t=t.nextSibling)if(t.nodeType<6)return!1;return!0},parent:function(t){return!n.pseudos.empty(t)},header:function(t){return Z.test(t.nodeName)},input:function(t){return J.test(t.nodeName)},button:function(t){var e=t.nodeName.toLowerCase();return"input"===e&&"button"===t.type||"button"===e},text:function(t){var e;return"input"===t.nodeName.toLowerCase()&&"text"===t.type&&(null==(e=t.getAttribute("type"))||"text"===e.toLowerCase())},first:vt(function(){return[0]}),last:vt(function(t,e){return[e-1]}),eq:vt(function(t,e,i){return[i<0?i+e:i]}),even:vt(function(t,e){for(var i=0;i<e;i+=2)t.push(i);return t}),odd:vt(function(t,e){for(var i=1;i<e;i+=2)t.push(i);return t}),lt:vt(function(t,e,i){for(var n=i<0?i+e:i>e?e:i;--n>=0;)t.push(n);return t}),gt:vt(function(t,e,i){for(var n=i<0?i+e:i;++n<e;)t.push(n);return t})}}).pseudos.nth=n.pseudos.eq,{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})n.pseudos[e]=pt(e);for(e in{submit:!0,reset:!0})n.pseudos[e]=ft(e);function yt(){}function bt(t){for(var e=0,i=t.length,n="";e<i;e++)n+=t[e].value;return n}function wt(t,e,i){var n=e.dir,o=e.next,s=o||n,r=i&&"parentNode"===s,a=k++;return e.first?function(e,i,o){for(;e=e[n];)if(1===e.nodeType||r)return t(e,i,o);return!1}:function(e,i,l){var c,u,d,h=[T,a];if(l){for(;e=e[n];)if((1===e.nodeType||r)&&t(e,i,l))return!0}else for(;e=e[n];)if(1===e.nodeType||r)if(u=(d=e[w]||(e[w]={}))[e.uniqueID]||(d[e.uniqueID]={}),o&&o===e.nodeName.toLowerCase())e=e[n]||e;else{if((c=u[s])&&c[0]===T&&c[1]===a)return h[2]=c[2];if(u[s]=h,h[2]=t(e,i,l))return!0}return!1}}function xt(t){return t.length>1?function(e,i,n){for(var o=t.length;o--;)if(!t[o](e,i,n))return!1;return!0}:t[0]}function Tt(t,e,i,n,o){for(var s,r=[],a=0,l=t.length,c=null!=e;a<l;a++)(s=t[a])&&(i&&!i(s,n,o)||(r.push(s),c&&e.push(a)));return r}function kt(t,e,i,n,o,s){return n&&!n[w]&&(n=kt(n)),o&&!o[w]&&(o=kt(o,s)),ct(function(s,r,a,l){var c,u,d,h=[],p=[],f=r.length,m=s||function(t,e,i){for(var n=0,o=e.length;n<o;n++)at(t,e[n],i);return i}(e||"*",a.nodeType?[a]:a,[]),v=!t||!s&&e?m:Tt(m,h,t,a,l),g=i?o||(s?t:f||n)?[]:r:v;if(i&&i(v,g,a,l),n)for(c=Tt(g,p),n(c,[],a,l),u=c.length;u--;)(d=c[u])&&(g[p[u]]=!(v[p[u]]=d));if(s){if(o||t){if(o){for(c=[],u=g.length;u--;)(d=g[u])&&c.push(v[u]=d);o(null,g=[],c,l)}for(u=g.length;u--;)(d=g[u])&&(c=o?j(s,d):h[u])>-1&&(s[c]=!(r[c]=d))}}else g=Tt(g===r?g.splice(f,g.length):g),o?o(null,r,g,l):z.apply(r,g)})}function Ct(t){for(var e,i,o,s=t.length,r=n.relative[t[0].type],a=r||n.relative[" "],l=r?1:0,u=wt(function(t){return t===e},a,!0),d=wt(function(t){return j(e,t)>-1},a,!0),h=[function(t,i,n){var o=!r&&(n||i!==c)||((e=i).nodeType?u(t,i,n):d(t,i,n));return e=null,o}];l<s;l++)if(i=n.relative[t[l].type])h=[wt(xt(h),i)];else{if((i=n.filter[t[l].type].apply(null,t[l].matches))[w]){for(o=++l;o<s&&!n.relative[t[o].type];o++);return kt(l>1&&xt(h),l>1&&bt(t.slice(0,l-1).concat({value:" "===t[l-2].type?"*":""})).replace(q,"$1"),i,l<o&&Ct(t.slice(l,o)),o<s&&Ct(t=t.slice(o)),o<s&&bt(t))}h.push(i)}return xt(h)}return yt.prototype=n.filters=n.pseudos,n.setFilters=new yt,r=at.tokenize=function(t,e){var i,o,s,r,a,l,c,u=S[t+" "];if(u)return e?0:u.slice(0);for(a=t,l=[],c=n.preFilter;a;){for(r in i&&!(o=U.exec(a))||(o&&(a=a.slice(o[0].length)||a),l.push(s=[])),i=!1,(o=B.exec(a))&&(i=o.shift(),s.push({value:i,type:o[0].replace(q," ")}),a=a.slice(i.length)),n.filter)!(o=X[r].exec(a))||c[r]&&!(o=c[r](o))||(i=o.shift(),s.push({value:i,type:r,matches:o}),a=a.slice(i.length));if(!i)break}return e?a.length:a?at.error(t):S(t,l).slice(0)},a=at.compile=function(t,e){var i,o=[],s=[],a=D[t+" "];if(!a){for(e||(e=r(t)),i=e.length;i--;)(a=Ct(e[i]))[w]?o.push(a):s.push(a);(a=D(t,function(t,e){var i=e.length>0,o=t.length>0,s=function(s,r,a,l,u){var d,f,v,g=0,y="0",b=s&&[],w=[],x=c,k=s||o&&n.find.TAG("*",u),C=T+=null==x?1:Math.random()||.1,S=k.length;for(u&&(c=r===p||r||u);y!==S&&null!=(d=k[y]);y++){if(o&&d){for(f=0,r||d.ownerDocument===p||(h(d),a=!m);v=t[f++];)if(v(d,r||p,a)){l.push(d);break}u&&(T=C)}i&&((d=!v&&d)&&g--,s&&b.push(d))}if(g+=y,i&&y!==g){for(f=0;v=e[f++];)v(b,w,r,a);if(s){if(g>0)for(;y--;)b[y]||w[y]||(w[y]=N.call(l));w=Tt(w)}z.apply(l,w),u&&!s&&w.length>0&&g+e.length>1&&at.uniqueSort(l)}return u&&(T=C,c=x),b};return i?ct(s):s}(s,o))).selector=t}return a},l=at.select=function(t,e,i,o){var s,l,c,u,d,h="function"==typeof t&&t,p=!o&&r(t=h.selector||t);if(i=i||[],1===p.length){if((l=p[0]=p[0].slice(0)).length>2&&"ID"===(c=l[0]).type&&9===e.nodeType&&m&&n.relative[l[1].type]){if(!(e=(n.find.ID(c.matches[0].replace(et,it),e)||[])[0]))return i;h&&(e=e.parentNode),t=t.slice(l.shift().value.length)}for(s=X.needsContext.test(t)?0:l.length;s--&&(c=l[s],!n.relative[u=c.type]);)if((d=n.find[u])&&(o=d(c.matches[0].replace(et,it),tt.test(l[0].type)&&gt(e.parentNode)||e))){if(l.splice(s,1),!(t=o.length&&bt(l)))return z.apply(i,o),i;break}}return(h||a(t,p))(o,e,!m,i,!e||tt.test(t)&&gt(e.parentNode)||e),i},i.sortStable=w.split("").sort(M).join("")===w,i.detectDuplicates=!!d,h(),i.sortDetached=ut(function(t){return 1&t.compareDocumentPosition(p.createElement("fieldset"))}),ut(function(t){return t.innerHTML="<a href='#'></a>","#"===t.firstChild.getAttribute("href")})||dt("type|href|height|width",function(t,e,i){if(!i)return t.getAttribute(e,"type"===e.toLowerCase()?1:2)}),i.attributes&&ut(function(t){return t.innerHTML="<input/>",t.firstChild.setAttribute("value",""),""===t.firstChild.getAttribute("value")})||dt("value",function(t,e,i){if(!i&&"input"===t.nodeName.toLowerCase())return t.defaultValue}),ut(function(t){return null==t.getAttribute("disabled")})||dt(I,function(t,e,i){var n;if(!i)return!0===t[e]?e.toLowerCase():(n=t.getAttributeNode(e))&&n.specified?n.value:null}),at}(i);k.find=D,k.expr=D.selectors,k.expr[":"]=k.expr.pseudos,k.uniqueSort=k.unique=D.uniqueSort,k.text=D.getText,k.isXMLDoc=D.isXML,k.contains=D.contains,k.escapeSelector=D.escape;var E=function(t,e,i){for(var n=[],o=void 0!==i;(t=t[e])&&9!==t.nodeType;)if(1===t.nodeType){if(o&&k(t).is(i))break;n.push(t)}return n},M=function(t,e){for(var i=[];t;t=t.nextSibling)1===t.nodeType&&t!==e&&i.push(t);return i},L=k.expr.match.needsContext;function $(t,e){return t.nodeName&&t.nodeName.toLowerCase()===e.toLowerCase()}var N=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function A(t,e,i){return y(e)?k.grep(t,function(t,n){return!!e.call(t,n,t)!==i}):e.nodeType?k.grep(t,function(t){return t===e!==i}):"string"!=typeof e?k.grep(t,function(t){return d.call(e,t)>-1!==i}):k.filter(e,t,i)}k.filter=function(t,e,i){var n=e[0];return i&&(t=":not("+t+")"),1===e.length&&1===n.nodeType?k.find.matchesSelector(n,t)?[n]:[]:k.find.matches(t,k.grep(e,function(t){return 1===t.nodeType}))},k.fn.extend({find:function(t){var e,i,n=this.length,o=this;if("string"!=typeof t)return this.pushStack(k(t).filter(function(){for(e=0;e<n;e++)if(k.contains(o[e],this))return!0}));for(i=this.pushStack([]),e=0;e<n;e++)k.find(t,o[e],i);return n>1?k.uniqueSort(i):i},filter:function(t){return this.pushStack(A(this,t||[],!1))},not:function(t){return this.pushStack(A(this,t||[],!0))},is:function(t){return!!A(this,"string"==typeof t&&L.test(t)?k(t):t||[],!1).length}});var z,O=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(k.fn.init=function(t,e,i){var n,o;if(!t)return this;if(i=i||z,"string"==typeof t){if(!(n="<"===t[0]&&">"===t[t.length-1]&&t.length>=3?[null,t,null]:O.exec(t))||!n[1]&&e)return!e||e.jquery?(e||i).find(t):this.constructor(e).find(t);if(n[1]){if(e=e instanceof k?e[0]:e,k.merge(this,k.parseHTML(n[1],e&&e.nodeType?e.ownerDocument||e:r,!0)),N.test(n[1])&&k.isPlainObject(e))for(n in e)y(this[n])?this[n](e[n]):this.attr(n,e[n]);return this}return(o=r.getElementById(n[2]))&&(this[0]=o,this.length=1),this}return t.nodeType?(this[0]=t,this.length=1,this):y(t)?void 0!==i.ready?i.ready(t):t(k):k.makeArray(t,this)}).prototype=k.fn,z=k(r);var j=/^(?:parents|prev(?:Until|All))/,I={children:!0,contents:!0,next:!0,prev:!0};function H(t,e){for(;(t=t[e])&&1!==t.nodeType;);return t}k.fn.extend({has:function(t){var e=k(t,this),i=e.length;return this.filter(function(){for(var t=0;t<i;t++)if(k.contains(this,e[t]))return!0})},closest:function(t,e){var i,n=0,o=this.length,s=[],r="string"!=typeof t&&k(t);if(!L.test(t))for(;n<o;n++)for(i=this[n];i&&i!==e;i=i.parentNode)if(i.nodeType<11&&(r?r.index(i)>-1:1===i.nodeType&&k.find.matchesSelector(i,t))){s.push(i);break}return this.pushStack(s.length>1?k.uniqueSort(s):s)},index:function(t){return t?"string"==typeof t?d.call(k(t),this[0]):d.call(this,t.jquery?t[0]:t):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(t,e){return this.pushStack(k.uniqueSort(k.merge(this.get(),k(t,e))))},addBack:function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}}),k.each({parent:function(t){var e=t.parentNode;return e&&11!==e.nodeType?e:null},parents:function(t){return E(t,"parentNode")},parentsUntil:function(t,e,i){return E(t,"parentNode",i)},next:function(t){return H(t,"nextSibling")},prev:function(t){return H(t,"previousSibling")},nextAll:function(t){return E(t,"nextSibling")},prevAll:function(t){return E(t,"previousSibling")},nextUntil:function(t,e,i){return E(t,"nextSibling",i)},prevUntil:function(t,e,i){return E(t,"previousSibling",i)},siblings:function(t){return M((t.parentNode||{}).firstChild,t)},children:function(t){return M(t.firstChild)},contents:function(t){return void 0!==t.contentDocument?t.contentDocument:($(t,"template")&&(t=t.content||t),k.merge([],t.childNodes))}},function(t,e){k.fn[t]=function(i,n){var o=k.map(this,e,i);return"Until"!==t.slice(-5)&&(n=i),n&&"string"==typeof n&&(o=k.filter(n,o)),this.length>1&&(I[t]||k.uniqueSort(o),j.test(t)&&o.reverse()),this.pushStack(o)}});var P=/[^\x20\t\r\n\f]+/g;function R(t){return t}function F(t){throw t}function _(t,e,i,n){var o;try{t&&y(o=t.promise)?o.call(t).done(e).fail(i):t&&y(o=t.then)?o.call(t,e,i):e.apply(void 0,[t].slice(n))}catch(t){i.apply(void 0,[t])}}k.Callbacks=function(t){t="string"==typeof t?function(t){var e={};return k.each(t.match(P)||[],function(t,i){e[i]=!0}),e}(t):k.extend({},t);var e,i,n,o,s=[],r=[],a=-1,l=function(){for(o=o||t.once,n=e=!0;r.length;a=-1)for(i=r.shift();++a<s.length;)!1===s[a].apply(i[0],i[1])&&t.stopOnFalse&&(a=s.length,i=!1);t.memory||(i=!1),e=!1,o&&(s=i?[]:"")},c={add:function(){return s&&(i&&!e&&(a=s.length-1,r.push(i)),function e(i){k.each(i,function(i,n){y(n)?t.unique&&c.has(n)||s.push(n):n&&n.length&&"string"!==T(n)&&e(n)})}(arguments),i&&!e&&l()),this},remove:function(){return k.each(arguments,function(t,e){for(var i;(i=k.inArray(e,s,i))>-1;)s.splice(i,1),i<=a&&a--}),this},has:function(t){return t?k.inArray(t,s)>-1:s.length>0},empty:function(){return s&&(s=[]),this},disable:function(){return o=r=[],s=i="",this},disabled:function(){return!s},lock:function(){return o=r=[],i||e||(s=i=""),this},locked:function(){return!!o},fireWith:function(t,i){return o||(i=[t,(i=i||[]).slice?i.slice():i],r.push(i),e||l()),this},fire:function(){return c.fireWith(this,arguments),this},fired:function(){return!!n}};return c},k.extend({Deferred:function(t){var e=[["notify","progress",k.Callbacks("memory"),k.Callbacks("memory"),2],["resolve","done",k.Callbacks("once memory"),k.Callbacks("once memory"),0,"resolved"],["reject","fail",k.Callbacks("once memory"),k.Callbacks("once memory"),1,"rejected"]],n="pending",o={state:function(){return n},always:function(){return s.done(arguments).fail(arguments),this},catch:function(t){return o.then(null,t)},pipe:function(){var t=arguments;return k.Deferred(function(i){k.each(e,function(e,n){var o=y(t[n[4]])&&t[n[4]];s[n[1]](function(){var t=o&&o.apply(this,arguments);t&&y(t.promise)?t.promise().progress(i.notify).done(i.resolve).fail(i.reject):i[n[0]+"With"](this,o?[t]:arguments)})}),t=null}).promise()},then:function(t,n,o){var s=0;function r(t,e,n,o){return function(){var a=this,l=arguments,c=function(){var i,c;if(!(t<s)){if((i=n.apply(a,l))===e.promise())throw new TypeError("Thenable self-resolution");c=i&&("object"==typeof i||"function"==typeof i)&&i.then,y(c)?o?c.call(i,r(s,e,R,o),r(s,e,F,o)):(s++,c.call(i,r(s,e,R,o),r(s,e,F,o),r(s,e,R,e.notifyWith))):(n!==R&&(a=void 0,l=[i]),(o||e.resolveWith)(a,l))}},u=o?c:function(){try{c()}catch(i){k.Deferred.exceptionHook&&k.Deferred.exceptionHook(i,u.stackTrace),t+1>=s&&(n!==F&&(a=void 0,l=[i]),e.rejectWith(a,l))}};t?u():(k.Deferred.getStackHook&&(u.stackTrace=k.Deferred.getStackHook()),i.setTimeout(u))}}return k.Deferred(function(i){e[0][3].add(r(0,i,y(o)?o:R,i.notifyWith)),e[1][3].add(r(0,i,y(t)?t:R)),e[2][3].add(r(0,i,y(n)?n:F))}).promise()},promise:function(t){return null!=t?k.extend(t,o):o}},s={};return k.each(e,function(t,i){var r=i[2],a=i[5];o[i[1]]=r.add,a&&r.add(function(){n=a},e[3-t][2].disable,e[3-t][3].disable,e[0][2].lock,e[0][3].lock),r.add(i[3].fire),s[i[0]]=function(){return s[i[0]+"With"](this===s?void 0:this,arguments),this},s[i[0]+"With"]=r.fireWith}),o.promise(s),t&&t.call(s,s),s},when:function(t){var e=arguments.length,i=e,n=Array(i),o=l.call(arguments),s=k.Deferred(),r=function(t){return function(i){n[t]=this,o[t]=arguments.length>1?l.call(arguments):i,--e||s.resolveWith(n,o)}};if(e<=1&&(_(t,s.done(r(i)).resolve,s.reject,!e),"pending"===s.state()||y(o[i]&&o[i].then)))return s.then();for(;i--;)_(o[i],r(i),s.reject);return s.promise()}});var q=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;k.Deferred.exceptionHook=function(t,e){i.console&&i.console.warn&&t&&q.test(t.name)&&i.console.warn("jQuery.Deferred exception: "+t.message,t.stack,e)},k.readyException=function(t){i.setTimeout(function(){throw t})};var U=k.Deferred();function B(){r.removeEventListener("DOMContentLoaded",B),i.removeEventListener("load",B),k.ready()}k.fn.ready=function(t){return U.then(t).catch(function(t){k.readyException(t)}),this},k.extend({isReady:!1,readyWait:1,ready:function(t){(!0===t?--k.readyWait:k.isReady)||(k.isReady=!0,!0!==t&&--k.readyWait>0||U.resolveWith(r,[k]))}}),k.ready.then=U.then,"complete"===r.readyState||"loading"!==r.readyState&&!r.documentElement.doScroll?i.setTimeout(k.ready):(r.addEventListener("DOMContentLoaded",B),i.addEventListener("load",B));var Y=function(t,e,i,n,o,s,r){var a=0,l=t.length,c=null==i;if("object"===T(i))for(a in o=!0,i)Y(t,e,a,i[a],!0,s,r);else if(void 0!==n&&(o=!0,y(n)||(r=!0),c&&(r?(e.call(t,n),e=null):(c=e,e=function(t,e,i){return c.call(k(t),i)})),e))for(;a<l;a++)e(t[a],i,r?n:n.call(t[a],a,e(t[a],i)));return o?t:c?e.call(t):l?e(t[0],i):s},W=/^-ms-/,V=/-([a-z])/g;function X(t,e){return e.toUpperCase()}function G(t){return t.replace(W,"ms-").replace(V,X)}var J=function(t){return 1===t.nodeType||9===t.nodeType||!+t.nodeType};function Z(){this.expando=k.expando+Z.uid++}Z.uid=1,Z.prototype={cache:function(t){var e=t[this.expando];return e||(e={},J(t)&&(t.nodeType?t[this.expando]=e:Object.defineProperty(t,this.expando,{value:e,configurable:!0}))),e},set:function(t,e,i){var n,o=this.cache(t);if("string"==typeof e)o[G(e)]=i;else for(n in e)o[G(n)]=e[n];return o},get:function(t,e){return void 0===e?this.cache(t):t[this.expando]&&t[this.expando][G(e)]},access:function(t,e,i){return void 0===e||e&&"string"==typeof e&&void 0===i?this.get(t,e):(this.set(t,e,i),void 0!==i?i:e)},remove:function(t,e){var i,n=t[this.expando];if(void 0!==n){if(void 0!==e){i=(e=Array.isArray(e)?e.map(G):(e=G(e))in n?[e]:e.match(P)||[]).length;for(;i--;)delete n[e[i]]}(void 0===e||k.isEmptyObject(n))&&(t.nodeType?t[this.expando]=void 0:delete t[this.expando])}},hasData:function(t){var e=t[this.expando];return void 0!==e&&!k.isEmptyObject(e)}};var K=new Z,Q=new Z,tt=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,et=/[A-Z]/g;function it(t,e,i){var n;if(void 0===i&&1===t.nodeType)if(n="data-"+e.replace(et,"-$&").toLowerCase(),"string"==typeof(i=t.getAttribute(n))){try{i=function(t){return"true"===t||"false"!==t&&("null"===t?null:t===+t+""?+t:tt.test(t)?JSON.parse(t):t)}(i)}catch(t){}Q.set(t,e,i)}else i=void 0;return i}k.extend({hasData:function(t){return Q.hasData(t)||K.hasData(t)},data:function(t,e,i){return Q.access(t,e,i)},removeData:function(t,e){Q.remove(t,e)},_data:function(t,e,i){return K.access(t,e,i)},_removeData:function(t,e){K.remove(t,e)}}),k.fn.extend({data:function(t,e){var i,n,o,s=this[0],r=s&&s.attributes;if(void 0===t){if(this.length&&(o=Q.get(s),1===s.nodeType&&!K.get(s,"hasDataAttrs"))){for(i=r.length;i--;)r[i]&&0===(n=r[i].name).indexOf("data-")&&(n=G(n.slice(5)),it(s,n,o[n]));K.set(s,"hasDataAttrs",!0)}return o}return"object"==typeof t?this.each(function(){Q.set(this,t)}):Y(this,function(e){var i;if(s&&void 0===e)return void 0!==(i=Q.get(s,t))?i:void 0!==(i=it(s,t))?i:void 0;this.each(function(){Q.set(this,t,e)})},null,e,arguments.length>1,null,!0)},removeData:function(t){return this.each(function(){Q.remove(this,t)})}}),k.extend({queue:function(t,e,i){var n;if(t)return e=(e||"fx")+"queue",n=K.get(t,e),i&&(!n||Array.isArray(i)?n=K.access(t,e,k.makeArray(i)):n.push(i)),n||[]},dequeue:function(t,e){e=e||"fx";var i=k.queue(t,e),n=i.length,o=i.shift(),s=k._queueHooks(t,e);"inprogress"===o&&(o=i.shift(),n--),o&&("fx"===e&&i.unshift("inprogress"),delete s.stop,o.call(t,function(){k.dequeue(t,e)},s)),!n&&s&&s.empty.fire()},_queueHooks:function(t,e){var i=e+"queueHooks";return K.get(t,i)||K.access(t,i,{empty:k.Callbacks("once memory").add(function(){K.remove(t,[e+"queue",i])})})}}),k.fn.extend({queue:function(t,e){var i=2;return"string"!=typeof t&&(e=t,t="fx",i--),arguments.length<i?k.queue(this[0],t):void 0===e?this:this.each(function(){var i=k.queue(this,t,e);k._queueHooks(this,t),"fx"===t&&"inprogress"!==i[0]&&k.dequeue(this,t)})},dequeue:function(t){return this.each(function(){k.dequeue(this,t)})},clearQueue:function(t){return this.queue(t||"fx",[])},promise:function(t,e){var i,n=1,o=k.Deferred(),s=this,r=this.length,a=function(){--n||o.resolveWith(s,[s])};for("string"!=typeof t&&(e=t,t=void 0),t=t||"fx";r--;)(i=K.get(s[r],t+"queueHooks"))&&i.empty&&(n++,i.empty.add(a));return a(),o.promise(e)}});var nt=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,ot=new RegExp("^(?:([+-])=|)("+nt+")([a-z%]*)$","i"),st=["Top","Right","Bottom","Left"],rt=r.documentElement,at=function(t){return k.contains(t.ownerDocument,t)},lt={composed:!0};rt.getRootNode&&(at=function(t){return k.contains(t.ownerDocument,t)||t.getRootNode(lt)===t.ownerDocument});var ct=function(t,e){return"none"===(t=e||t).style.display||""===t.style.display&&at(t)&&"none"===k.css(t,"display")},ut=function(t,e,i,n){var o,s,r={};for(s in e)r[s]=t.style[s],t.style[s]=e[s];for(s in o=i.apply(t,n||[]),e)t.style[s]=r[s];return o};function dt(t,e,i,n){var o,s,r=20,a=n?function(){return n.cur()}:function(){return k.css(t,e,"")},l=a(),c=i&&i[3]||(k.cssNumber[e]?"":"px"),u=t.nodeType&&(k.cssNumber[e]||"px"!==c&&+l)&&ot.exec(k.css(t,e));if(u&&u[3]!==c){for(l/=2,c=c||u[3],u=+l||1;r--;)k.style(t,e,u+c),(1-s)*(1-(s=a()/l||.5))<=0&&(r=0),u/=s;u*=2,k.style(t,e,u+c),i=i||[]}return i&&(u=+u||+l||0,o=i[1]?u+(i[1]+1)*i[2]:+i[2],n&&(n.unit=c,n.start=u,n.end=o)),o}var ht={};function pt(t){var e,i=t.ownerDocument,n=t.nodeName,o=ht[n];return o||(e=i.body.appendChild(i.createElement(n)),o=k.css(e,"display"),e.parentNode.removeChild(e),"none"===o&&(o="block"),ht[n]=o,o)}function ft(t,e){for(var i,n,o=[],s=0,r=t.length;s<r;s++)(n=t[s]).style&&(i=n.style.display,e?("none"===i&&(o[s]=K.get(n,"display")||null,o[s]||(n.style.display="")),""===n.style.display&&ct(n)&&(o[s]=pt(n))):"none"!==i&&(o[s]="none",K.set(n,"display",i)));for(s=0;s<r;s++)null!=o[s]&&(t[s].style.display=o[s]);return t}k.fn.extend({show:function(){return ft(this,!0)},hide:function(){return ft(this)},toggle:function(t){return"boolean"==typeof t?t?this.show():this.hide():this.each(function(){ct(this)?k(this).show():k(this).hide()})}});var mt=/^(?:checkbox|radio)$/i,vt=/<([a-z][^\/\0>\x20\t\r\n\f]*)/i,gt=/^$|^module$|\/(?:java|ecma)script/i,yt={option:[1,"<select multiple='multiple'>","</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};function bt(t,e){var i;return i=void 0!==t.getElementsByTagName?t.getElementsByTagName(e||"*"):void 0!==t.querySelectorAll?t.querySelectorAll(e||"*"):[],void 0===e||e&&$(t,e)?k.merge([t],i):i}function wt(t,e){for(var i=0,n=t.length;i<n;i++)K.set(t[i],"globalEval",!e||K.get(e[i],"globalEval"))}yt.optgroup=yt.option,yt.tbody=yt.tfoot=yt.colgroup=yt.caption=yt.thead,yt.th=yt.td;var xt,Tt,kt=/<|&#?\w+;/;function Ct(t,e,i,n,o){for(var s,r,a,l,c,u,d=e.createDocumentFragment(),h=[],p=0,f=t.length;p<f;p++)if((s=t[p])||0===s)if("object"===T(s))k.merge(h,s.nodeType?[s]:s);else if(kt.test(s)){for(r=r||d.appendChild(e.createElement("div")),a=(vt.exec(s)||["",""])[1].toLowerCase(),l=yt[a]||yt._default,r.innerHTML=l[1]+k.htmlPrefilter(s)+l[2],u=l[0];u--;)r=r.lastChild;k.merge(h,r.childNodes),(r=d.firstChild).textContent=""}else h.push(e.createTextNode(s));for(d.textContent="",p=0;s=h[p++];)if(n&&k.inArray(s,n)>-1)o&&o.push(s);else if(c=at(s),r=bt(d.appendChild(s),"script"),c&&wt(r),i)for(u=0;s=r[u++];)gt.test(s.type||"")&&i.push(s);return d}xt=r.createDocumentFragment().appendChild(r.createElement("div")),(Tt=r.createElement("input")).setAttribute("type","radio"),Tt.setAttribute("checked","checked"),Tt.setAttribute("name","t"),xt.appendChild(Tt),g.checkClone=xt.cloneNode(!0).cloneNode(!0).lastChild.checked,xt.innerHTML="<textarea>x</textarea>",g.noCloneChecked=!!xt.cloneNode(!0).lastChild.defaultValue;var St=/^key/,Dt=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Et=/^([^.]*)(?:\.(.+)|)/;function Mt(){return!0}function Lt(){return!1}function $t(t,e){return t===function(){try{return r.activeElement}catch(t){}}()==("focus"===e)}function Nt(t,e,i,n,o,s){var r,a;if("object"==typeof e){for(a in"string"!=typeof i&&(n=n||i,i=void 0),e)Nt(t,a,i,n,e[a],s);return t}if(null==n&&null==o?(o=i,n=i=void 0):null==o&&("string"==typeof i?(o=n,n=void 0):(o=n,n=i,i=void 0)),!1===o)o=Lt;else if(!o)return t;return 1===s&&(r=o,(o=function(t){return k().off(t),r.apply(this,arguments)}).guid=r.guid||(r.guid=k.guid++)),t.each(function(){k.event.add(this,e,o,n,i)})}function At(t,e,i){i?(K.set(t,e,!1),k.event.add(t,e,{namespace:!1,handler:function(t){var n,o,s=K.get(this,e);if(1&t.isTrigger&&this[e]){if(s.length)(k.event.special[e]||{}).delegateType&&t.stopPropagation();else if(s=l.call(arguments),K.set(this,e,s),n=i(this,e),this[e](),s!==(o=K.get(this,e))||n?K.set(this,e,!1):o={},s!==o)return t.stopImmediatePropagation(),t.preventDefault(),o.value}else s.length&&(K.set(this,e,{value:k.event.trigger(k.extend(s[0],k.Event.prototype),s.slice(1),this)}),t.stopImmediatePropagation())}})):void 0===K.get(t,e)&&k.event.add(t,e,Mt)}k.event={global:{},add:function(t,e,i,n,o){var s,r,a,l,c,u,d,h,p,f,m,v=K.get(t);if(v)for(i.handler&&(i=(s=i).handler,o=s.selector),o&&k.find.matchesSelector(rt,o),i.guid||(i.guid=k.guid++),(l=v.events)||(l=v.events={}),(r=v.handle)||(r=v.handle=function(e){return void 0!==k&&k.event.triggered!==e.type?k.event.dispatch.apply(t,arguments):void 0}),c=(e=(e||"").match(P)||[""]).length;c--;)p=m=(a=Et.exec(e[c])||[])[1],f=(a[2]||"").split(".").sort(),p&&(d=k.event.special[p]||{},p=(o?d.delegateType:d.bindType)||p,d=k.event.special[p]||{},u=k.extend({type:p,origType:m,data:n,handler:i,guid:i.guid,selector:o,needsContext:o&&k.expr.match.needsContext.test(o),namespace:f.join(".")},s),(h=l[p])||((h=l[p]=[]).delegateCount=0,d.setup&&!1!==d.setup.call(t,n,f,r)||t.addEventListener&&t.addEventListener(p,r)),d.add&&(d.add.call(t,u),u.handler.guid||(u.handler.guid=i.guid)),o?h.splice(h.delegateCount++,0,u):h.push(u),k.event.global[p]=!0)},remove:function(t,e,i,n,o){var s,r,a,l,c,u,d,h,p,f,m,v=K.hasData(t)&&K.get(t);if(v&&(l=v.events)){for(c=(e=(e||"").match(P)||[""]).length;c--;)if(p=m=(a=Et.exec(e[c])||[])[1],f=(a[2]||"").split(".").sort(),p){for(d=k.event.special[p]||{},h=l[p=(n?d.delegateType:d.bindType)||p]||[],a=a[2]&&new RegExp("(^|\\.)"+f.join("\\.(?:.*\\.|)")+"(\\.|$)"),r=s=h.length;s--;)u=h[s],!o&&m!==u.origType||i&&i.guid!==u.guid||a&&!a.test(u.namespace)||n&&n!==u.selector&&("**"!==n||!u.selector)||(h.splice(s,1),u.selector&&h.delegateCount--,d.remove&&d.remove.call(t,u));r&&!h.length&&(d.teardown&&!1!==d.teardown.call(t,f,v.handle)||k.removeEvent(t,p,v.handle),delete l[p])}else for(p in l)k.event.remove(t,p+e[c],i,n,!0);k.isEmptyObject(l)&&K.remove(t,"handle events")}},dispatch:function(t){var e,i,n,o,s,r,a=k.event.fix(t),l=new Array(arguments.length),c=(K.get(this,"events")||{})[a.type]||[],u=k.event.special[a.type]||{};for(l[0]=a,e=1;e<arguments.length;e++)l[e]=arguments[e];if(a.delegateTarget=this,!u.preDispatch||!1!==u.preDispatch.call(this,a)){for(r=k.event.handlers.call(this,a,c),e=0;(o=r[e++])&&!a.isPropagationStopped();)for(a.currentTarget=o.elem,i=0;(s=o.handlers[i++])&&!a.isImmediatePropagationStopped();)a.rnamespace&&!1!==s.namespace&&!a.rnamespace.test(s.namespace)||(a.handleObj=s,a.data=s.data,void 0!==(n=((k.event.special[s.origType]||{}).handle||s.handler).apply(o.elem,l))&&!1===(a.result=n)&&(a.preventDefault(),a.stopPropagation()));return u.postDispatch&&u.postDispatch.call(this,a),a.result}},handlers:function(t,e){var i,n,o,s,r,a=[],l=e.delegateCount,c=t.target;if(l&&c.nodeType&&!("click"===t.type&&t.button>=1))for(;c!==this;c=c.parentNode||this)if(1===c.nodeType&&("click"!==t.type||!0!==c.disabled)){for(s=[],r={},i=0;i<l;i++)void 0===r[o=(n=e[i]).selector+" "]&&(r[o]=n.needsContext?k(o,this).index(c)>-1:k.find(o,this,null,[c]).length),r[o]&&s.push(n);s.length&&a.push({elem:c,handlers:s})}return c=this,l<e.length&&a.push({elem:c,handlers:e.slice(l)}),a},addProp:function(t,e){Object.defineProperty(k.Event.prototype,t,{enumerable:!0,configurable:!0,get:y(e)?function(){if(this.originalEvent)return e(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[t]},set:function(e){Object.defineProperty(this,t,{enumerable:!0,configurable:!0,writable:!0,value:e})}})},fix:function(t){return t[k.expando]?t:new k.Event(t)},special:{load:{noBubble:!0},click:{setup:function(t){var e=this||t;return mt.test(e.type)&&e.click&&$(e,"input")&&At(e,"click",Mt),!1},trigger:function(t){var e=this||t;return mt.test(e.type)&&e.click&&$(e,"input")&&At(e,"click"),!0},_default:function(t){var e=t.target;return mt.test(e.type)&&e.click&&$(e,"input")&&K.get(e,"click")||$(e,"a")}},beforeunload:{postDispatch:function(t){void 0!==t.result&&t.originalEvent&&(t.originalEvent.returnValue=t.result)}}}},k.removeEvent=function(t,e,i){t.removeEventListener&&t.removeEventListener(e,i)},k.Event=function(t,e){if(!(this instanceof k.Event))return new k.Event(t,e);t&&t.type?(this.originalEvent=t,this.type=t.type,this.isDefaultPrevented=t.defaultPrevented||void 0===t.defaultPrevented&&!1===t.returnValue?Mt:Lt,this.target=t.target&&3===t.target.nodeType?t.target.parentNode:t.target,this.currentTarget=t.currentTarget,this.relatedTarget=t.relatedTarget):this.type=t,e&&k.extend(this,e),this.timeStamp=t&&t.timeStamp||Date.now(),this[k.expando]=!0},k.Event.prototype={constructor:k.Event,isDefaultPrevented:Lt,isPropagationStopped:Lt,isImmediatePropagationStopped:Lt,isSimulated:!1,preventDefault:function(){var t=this.originalEvent;this.isDefaultPrevented=Mt,t&&!this.isSimulated&&t.preventDefault()},stopPropagation:function(){var t=this.originalEvent;this.isPropagationStopped=Mt,t&&!this.isSimulated&&t.stopPropagation()},stopImmediatePropagation:function(){var t=this.originalEvent;this.isImmediatePropagationStopped=Mt,t&&!this.isSimulated&&t.stopImmediatePropagation(),this.stopPropagation()}},k.each({altKey:!0,bubbles:!0,cancelable:!0,changedTouches:!0,ctrlKey:!0,detail:!0,eventPhase:!0,metaKey:!0,pageX:!0,pageY:!0,shiftKey:!0,view:!0,char:!0,code:!0,charCode:!0,key:!0,keyCode:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pointerId:!0,pointerType:!0,screenX:!0,screenY:!0,targetTouches:!0,toElement:!0,touches:!0,which:function(t){var e=t.button;return null==t.which&&St.test(t.type)?null!=t.charCode?t.charCode:t.keyCode:!t.which&&void 0!==e&&Dt.test(t.type)?1&e?1:2&e?3:4&e?2:0:t.which}},k.event.addProp),k.each({focus:"focusin",blur:"focusout"},function(t,e){k.event.special[t]={setup:function(){return At(this,t,$t),!1},trigger:function(){return At(this,t),!0},delegateType:e}}),k.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(t,e){k.event.special[t]={delegateType:e,bindType:e,handle:function(t){var i,n=this,o=t.relatedTarget,s=t.handleObj;return o&&(o===n||k.contains(n,o))||(t.type=s.origType,i=s.handler.apply(this,arguments),t.type=e),i}}}),k.fn.extend({on:function(t,e,i,n){return Nt(this,t,e,i,n)},one:function(t,e,i,n){return Nt(this,t,e,i,n,1)},off:function(t,e,i){var n,o;if(t&&t.preventDefault&&t.handleObj)return n=t.handleObj,k(t.delegateTarget).off(n.namespace?n.origType+"."+n.namespace:n.origType,n.selector,n.handler),this;if("object"==typeof t){for(o in t)this.off(o,e,t[o]);return this}return!1!==e&&"function"!=typeof e||(i=e,e=void 0),!1===i&&(i=Lt),this.each(function(){k.event.remove(this,t,i,e)})}});var zt=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([a-z][^\/\0>\x20\t\r\n\f]*)[^>]*)\/>/gi,Ot=/<script|<style|<link/i,jt=/checked\s*(?:[^=]|=\s*.checked.)/i,It=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;function Ht(t,e){return $(t,"table")&&$(11!==e.nodeType?e:e.firstChild,"tr")&&k(t).children("tbody")[0]||t}function Pt(t){return t.type=(null!==t.getAttribute("type"))+"/"+t.type,t}function Rt(t){return"true/"===(t.type||"").slice(0,5)?t.type=t.type.slice(5):t.removeAttribute("type"),t}function Ft(t,e){var i,n,o,s,r,a,l,c;if(1===e.nodeType){if(K.hasData(t)&&(s=K.access(t),r=K.set(e,s),c=s.events))for(o in delete r.handle,r.events={},c)for(i=0,n=c[o].length;i<n;i++)k.event.add(e,o,c[o][i]);Q.hasData(t)&&(a=Q.access(t),l=k.extend({},a),Q.set(e,l))}}function _t(t,e){var i=e.nodeName.toLowerCase();"input"===i&&mt.test(t.type)?e.checked=t.checked:"input"!==i&&"textarea"!==i||(e.defaultValue=t.defaultValue)}function qt(t,e,i,n){e=c.apply([],e);var o,s,r,a,l,u,d=0,h=t.length,p=h-1,f=e[0],m=y(f);if(m||h>1&&"string"==typeof f&&!g.checkClone&&jt.test(f))return t.each(function(o){var s=t.eq(o);m&&(e[0]=f.call(this,o,s.html())),qt(s,e,i,n)});if(h&&(s=(o=Ct(e,t[0].ownerDocument,!1,t,n)).firstChild,1===o.childNodes.length&&(o=s),s||n)){for(a=(r=k.map(bt(o,"script"),Pt)).length;d<h;d++)l=o,d!==p&&(l=k.clone(l,!0,!0),a&&k.merge(r,bt(l,"script"))),i.call(t[d],l,d);if(a)for(u=r[r.length-1].ownerDocument,k.map(r,Rt),d=0;d<a;d++)l=r[d],gt.test(l.type||"")&&!K.access(l,"globalEval")&&k.contains(u,l)&&(l.src&&"module"!==(l.type||"").toLowerCase()?k._evalUrl&&!l.noModule&&k._evalUrl(l.src,{nonce:l.nonce||l.getAttribute("nonce")}):x(l.textContent.replace(It,""),l,u))}return t}function Ut(t,e,i){for(var n,o=e?k.filter(e,t):t,s=0;null!=(n=o[s]);s++)i||1!==n.nodeType||k.cleanData(bt(n)),n.parentNode&&(i&&at(n)&&wt(bt(n,"script")),n.parentNode.removeChild(n));return t}k.extend({htmlPrefilter:function(t){return t.replace(zt,"<$1></$2>")},clone:function(t,e,i){var n,o,s,r,a=t.cloneNode(!0),l=at(t);if(!(g.noCloneChecked||1!==t.nodeType&&11!==t.nodeType||k.isXMLDoc(t)))for(r=bt(a),n=0,o=(s=bt(t)).length;n<o;n++)_t(s[n],r[n]);if(e)if(i)for(s=s||bt(t),r=r||bt(a),n=0,o=s.length;n<o;n++)Ft(s[n],r[n]);else Ft(t,a);return(r=bt(a,"script")).length>0&&wt(r,!l&&bt(t,"script")),a},cleanData:function(t){for(var e,i,n,o=k.event.special,s=0;void 0!==(i=t[s]);s++)if(J(i)){if(e=i[K.expando]){if(e.events)for(n in e.events)o[n]?k.event.remove(i,n):k.removeEvent(i,n,e.handle);i[K.expando]=void 0}i[Q.expando]&&(i[Q.expando]=void 0)}}}),k.fn.extend({detach:function(t){return Ut(this,t,!0)},remove:function(t){return Ut(this,t)},text:function(t){return Y(this,function(t){return void 0===t?k.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=t)})},null,t,arguments.length)},append:function(){return qt(this,arguments,function(t){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||Ht(this,t).appendChild(t)})},prepend:function(){return qt(this,arguments,function(t){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var e=Ht(this,t);e.insertBefore(t,e.firstChild)}})},before:function(){return qt(this,arguments,function(t){this.parentNode&&this.parentNode.insertBefore(t,this)})},after:function(){return qt(this,arguments,function(t){this.parentNode&&this.parentNode.insertBefore(t,this.nextSibling)})},empty:function(){for(var t,e=0;null!=(t=this[e]);e++)1===t.nodeType&&(k.cleanData(bt(t,!1)),t.textContent="");return this},clone:function(t,e){return t=null!=t&&t,e=null==e?t:e,this.map(function(){return k.clone(this,t,e)})},html:function(t){return Y(this,function(t){var e=this[0]||{},i=0,n=this.length;if(void 0===t&&1===e.nodeType)return e.innerHTML;if("string"==typeof t&&!Ot.test(t)&&!yt[(vt.exec(t)||["",""])[1].toLowerCase()]){t=k.htmlPrefilter(t);try{for(;i<n;i++)1===(e=this[i]||{}).nodeType&&(k.cleanData(bt(e,!1)),e.innerHTML=t);e=0}catch(t){}}e&&this.empty().append(t)},null,t,arguments.length)},replaceWith:function(){var t=[];return qt(this,arguments,function(e){var i=this.parentNode;k.inArray(this,t)<0&&(k.cleanData(bt(this)),i&&i.replaceChild(e,this))},t)}}),k.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(t,e){k.fn[t]=function(t){for(var i,n=[],o=k(t),s=o.length-1,r=0;r<=s;r++)i=r===s?this:this.clone(!0),k(o[r])[e](i),u.apply(n,i.get());return this.pushStack(n)}});var Bt=new RegExp("^("+nt+")(?!px)[a-z%]+$","i"),Yt=function(t){var e=t.ownerDocument.defaultView;return e&&e.opener||(e=i),e.getComputedStyle(t)},Wt=new RegExp(st.join("|"),"i");function Vt(t,e,i){var n,o,s,r,a=t.style;return(i=i||Yt(t))&&(""!==(r=i.getPropertyValue(e)||i[e])||at(t)||(r=k.style(t,e)),!g.pixelBoxStyles()&&Bt.test(r)&&Wt.test(e)&&(n=a.width,o=a.minWidth,s=a.maxWidth,a.minWidth=a.maxWidth=a.width=r,r=i.width,a.width=n,a.minWidth=o,a.maxWidth=s)),void 0!==r?r+"":r}function Xt(t,e){return{get:function(){if(!t())return(this.get=e).apply(this,arguments);delete this.get}}}!function(){function t(){if(u){c.style.cssText="position:absolute;left:-11111px;width:60px;margin-top:1px;padding:0;border:0",u.style.cssText="position:relative;display:block;box-sizing:border-box;overflow:scroll;margin:auto;border:1px;padding:1px;width:60%;top:1%",rt.appendChild(c).appendChild(u);var t=i.getComputedStyle(u);n="1%"!==t.top,l=12===e(t.marginLeft),u.style.right="60%",a=36===e(t.right),o=36===e(t.width),u.style.position="absolute",s=12===e(u.offsetWidth/3),rt.removeChild(c),u=null}}function e(t){return Math.round(parseFloat(t))}var n,o,s,a,l,c=r.createElement("div"),u=r.createElement("div");u.style&&(u.style.backgroundClip="content-box",u.cloneNode(!0).style.backgroundClip="",g.clearCloneStyle="content-box"===u.style.backgroundClip,k.extend(g,{boxSizingReliable:function(){return t(),o},pixelBoxStyles:function(){return t(),a},pixelPosition:function(){return t(),n},reliableMarginLeft:function(){return t(),l},scrollboxSize:function(){return t(),s}}))}();var Gt=["Webkit","Moz","ms"],Jt=r.createElement("div").style,Zt={};function Kt(t){var e=k.cssProps[t]||Zt[t];return e||(t in Jt?t:Zt[t]=function(t){for(var e=t[0].toUpperCase()+t.slice(1),i=Gt.length;i--;)if((t=Gt[i]+e)in Jt)return t}(t)||t)}var Qt=/^(none|table(?!-c[ea]).+)/,te=/^--/,ee={position:"absolute",visibility:"hidden",display:"block"},ie={letterSpacing:"0",fontWeight:"400"};function ne(t,e,i){var n=ot.exec(e);return n?Math.max(0,n[2]-(i||0))+(n[3]||"px"):e}function oe(t,e,i,n,o,s){var r="width"===e?1:0,a=0,l=0;if(i===(n?"border":"content"))return 0;for(;r<4;r+=2)"margin"===i&&(l+=k.css(t,i+st[r],!0,o)),n?("content"===i&&(l-=k.css(t,"padding"+st[r],!0,o)),"margin"!==i&&(l-=k.css(t,"border"+st[r]+"Width",!0,o))):(l+=k.css(t,"padding"+st[r],!0,o),"padding"!==i?l+=k.css(t,"border"+st[r]+"Width",!0,o):a+=k.css(t,"border"+st[r]+"Width",!0,o));return!n&&s>=0&&(l+=Math.max(0,Math.ceil(t["offset"+e[0].toUpperCase()+e.slice(1)]-s-l-a-.5))||0),l}function se(t,e,i){var n=Yt(t),o=(!g.boxSizingReliable()||i)&&"border-box"===k.css(t,"boxSizing",!1,n),s=o,r=Vt(t,e,n),a="offset"+e[0].toUpperCase()+e.slice(1);if(Bt.test(r)){if(!i)return r;r="auto"}return(!g.boxSizingReliable()&&o||"auto"===r||!parseFloat(r)&&"inline"===k.css(t,"display",!1,n))&&t.getClientRects().length&&(o="border-box"===k.css(t,"boxSizing",!1,n),(s=a in t)&&(r=t[a])),(r=parseFloat(r)||0)+oe(t,e,i||(o?"border":"content"),s,n,r)+"px"}function re(t,e,i,n,o){return new re.prototype.init(t,e,i,n,o)}k.extend({cssHooks:{opacity:{get:function(t,e){if(e){var i=Vt(t,"opacity");return""===i?"1":i}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{},style:function(t,e,i,n){if(t&&3!==t.nodeType&&8!==t.nodeType&&t.style){var o,s,r,a=G(e),l=te.test(e),c=t.style;if(l||(e=Kt(a)),r=k.cssHooks[e]||k.cssHooks[a],void 0===i)return r&&"get"in r&&void 0!==(o=r.get(t,!1,n))?o:c[e];"string"===(s=typeof i)&&(o=ot.exec(i))&&o[1]&&(i=dt(t,e,o),s="number"),null!=i&&i==i&&("number"!==s||l||(i+=o&&o[3]||(k.cssNumber[a]?"":"px")),g.clearCloneStyle||""!==i||0!==e.indexOf("background")||(c[e]="inherit"),r&&"set"in r&&void 0===(i=r.set(t,i,n))||(l?c.setProperty(e,i):c[e]=i))}},css:function(t,e,i,n){var o,s,r,a=G(e);return te.test(e)||(e=Kt(a)),(r=k.cssHooks[e]||k.cssHooks[a])&&"get"in r&&(o=r.get(t,!0,i)),void 0===o&&(o=Vt(t,e,n)),"normal"===o&&e in ie&&(o=ie[e]),""===i||i?(s=parseFloat(o),!0===i||isFinite(s)?s||0:o):o}}),k.each(["height","width"],function(t,e){k.cssHooks[e]={get:function(t,i,n){if(i)return!Qt.test(k.css(t,"display"))||t.getClientRects().length&&t.getBoundingClientRect().width?se(t,e,n):ut(t,ee,function(){return se(t,e,n)})},set:function(t,i,n){var o,s=Yt(t),r=!g.scrollboxSize()&&"absolute"===s.position,a=(r||n)&&"border-box"===k.css(t,"boxSizing",!1,s),l=n?oe(t,e,n,a,s):0;return a&&r&&(l-=Math.ceil(t["offset"+e[0].toUpperCase()+e.slice(1)]-parseFloat(s[e])-oe(t,e,"border",!1,s)-.5)),l&&(o=ot.exec(i))&&"px"!==(o[3]||"px")&&(t.style[e]=i,i=k.css(t,e)),ne(0,i,l)}}}),k.cssHooks.marginLeft=Xt(g.reliableMarginLeft,function(t,e){if(e)return(parseFloat(Vt(t,"marginLeft"))||t.getBoundingClientRect().left-ut(t,{marginLeft:0},function(){return t.getBoundingClientRect().left}))+"px"}),k.each({margin:"",padding:"",border:"Width"},function(t,e){k.cssHooks[t+e]={expand:function(i){for(var n=0,o={},s="string"==typeof i?i.split(" "):[i];n<4;n++)o[t+st[n]+e]=s[n]||s[n-2]||s[0];return o}},"margin"!==t&&(k.cssHooks[t+e].set=ne)}),k.fn.extend({css:function(t,e){return Y(this,function(t,e,i){var n,o,s={},r=0;if(Array.isArray(e)){for(n=Yt(t),o=e.length;r<o;r++)s[e[r]]=k.css(t,e[r],!1,n);return s}return void 0!==i?k.style(t,e,i):k.css(t,e)},t,e,arguments.length>1)}}),k.Tween=re,re.prototype={constructor:re,init:function(t,e,i,n,o,s){this.elem=t,this.prop=i,this.easing=o||k.easing._default,this.options=e,this.start=this.now=this.cur(),this.end=n,this.unit=s||(k.cssNumber[i]?"":"px")},cur:function(){var t=re.propHooks[this.prop];return t&&t.get?t.get(this):re.propHooks._default.get(this)},run:function(t){var e,i=re.propHooks[this.prop];return this.options.duration?this.pos=e=k.easing[this.easing](t,this.options.duration*t,0,1,this.options.duration):this.pos=e=t,this.now=(this.end-this.start)*e+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),i&&i.set?i.set(this):re.propHooks._default.set(this),this}},re.prototype.init.prototype=re.prototype,re.propHooks={_default:{get:function(t){var e;return 1!==t.elem.nodeType||null!=t.elem[t.prop]&&null==t.elem.style[t.prop]?t.elem[t.prop]:(e=k.css(t.elem,t.prop,""))&&"auto"!==e?e:0},set:function(t){k.fx.step[t.prop]?k.fx.step[t.prop](t):1!==t.elem.nodeType||!k.cssHooks[t.prop]&&null==t.elem.style[Kt(t.prop)]?t.elem[t.prop]=t.now:k.style(t.elem,t.prop,t.now+t.unit)}}},re.propHooks.scrollTop=re.propHooks.scrollLeft={set:function(t){t.elem.nodeType&&t.elem.parentNode&&(t.elem[t.prop]=t.now)}},k.easing={linear:function(t){return t},swing:function(t){return.5-Math.cos(t*Math.PI)/2},_default:"swing"},k.fx=re.prototype.init,k.fx.step={};var ae,le,ce=/^(?:toggle|show|hide)$/,ue=/queueHooks$/;function de(){le&&(!1===r.hidden&&i.requestAnimationFrame?i.requestAnimationFrame(de):i.setTimeout(de,k.fx.interval),k.fx.tick())}function he(){return i.setTimeout(function(){ae=void 0}),ae=Date.now()}function pe(t,e){var i,n=0,o={height:t};for(e=e?1:0;n<4;n+=2-e)o["margin"+(i=st[n])]=o["padding"+i]=t;return e&&(o.opacity=o.width=t),o}function fe(t,e,i){for(var n,o=(me.tweeners[e]||[]).concat(me.tweeners["*"]),s=0,r=o.length;s<r;s++)if(n=o[s].call(i,e,t))return n}function me(t,e,i){var n,o,s=0,r=me.prefilters.length,a=k.Deferred().always(function(){delete l.elem}),l=function(){if(o)return!1;for(var e=ae||he(),i=Math.max(0,c.startTime+c.duration-e),n=1-(i/c.duration||0),s=0,r=c.tweens.length;s<r;s++)c.tweens[s].run(n);return a.notifyWith(t,[c,n,i]),n<1&&r?i:(r||a.notifyWith(t,[c,1,0]),a.resolveWith(t,[c]),!1)},c=a.promise({elem:t,props:k.extend({},e),opts:k.extend(!0,{specialEasing:{},easing:k.easing._default},i),originalProperties:e,originalOptions:i,startTime:ae||he(),duration:i.duration,tweens:[],createTween:function(e,i){var n=k.Tween(t,c.opts,e,i,c.opts.specialEasing[e]||c.opts.easing);return c.tweens.push(n),n},stop:function(e){var i=0,n=e?c.tweens.length:0;if(o)return this;for(o=!0;i<n;i++)c.tweens[i].run(1);return e?(a.notifyWith(t,[c,1,0]),a.resolveWith(t,[c,e])):a.rejectWith(t,[c,e]),this}}),u=c.props;for(!function(t,e){var i,n,o,s,r;for(i in t)if(o=e[n=G(i)],s=t[i],Array.isArray(s)&&(o=s[1],s=t[i]=s[0]),i!==n&&(t[n]=s,delete t[i]),(r=k.cssHooks[n])&&"expand"in r)for(i in s=r.expand(s),delete t[n],s)i in t||(t[i]=s[i],e[i]=o);else e[n]=o}(u,c.opts.specialEasing);s<r;s++)if(n=me.prefilters[s].call(c,t,u,c.opts))return y(n.stop)&&(k._queueHooks(c.elem,c.opts.queue).stop=n.stop.bind(n)),n;return k.map(u,fe,c),y(c.opts.start)&&c.opts.start.call(t,c),c.progress(c.opts.progress).done(c.opts.done,c.opts.complete).fail(c.opts.fail).always(c.opts.always),k.fx.timer(k.extend(l,{elem:t,anim:c,queue:c.opts.queue})),c}k.Animation=k.extend(me,{tweeners:{"*":[function(t,e){var i=this.createTween(t,e);return dt(i.elem,t,ot.exec(e),i),i}]},tweener:function(t,e){y(t)?(e=t,t=["*"]):t=t.match(P);for(var i,n=0,o=t.length;n<o;n++)i=t[n],me.tweeners[i]=me.tweeners[i]||[],me.tweeners[i].unshift(e)},prefilters:[function(t,e,i){var n,o,s,r,a,l,c,u,d="width"in e||"height"in e,h=this,p={},f=t.style,m=t.nodeType&&ct(t),v=K.get(t,"fxshow");for(n in i.queue||(null==(r=k._queueHooks(t,"fx")).unqueued&&(r.unqueued=0,a=r.empty.fire,r.empty.fire=function(){r.unqueued||a()}),r.unqueued++,h.always(function(){h.always(function(){r.unqueued--,k.queue(t,"fx").length||r.empty.fire()})})),e)if(o=e[n],ce.test(o)){if(delete e[n],s=s||"toggle"===o,o===(m?"hide":"show")){if("show"!==o||!v||void 0===v[n])continue;m=!0}p[n]=v&&v[n]||k.style(t,n)}if((l=!k.isEmptyObject(e))||!k.isEmptyObject(p))for(n in d&&1===t.nodeType&&(i.overflow=[f.overflow,f.overflowX,f.overflowY],null==(c=v&&v.display)&&(c=K.get(t,"display")),"none"===(u=k.css(t,"display"))&&(c?u=c:(ft([t],!0),c=t.style.display||c,u=k.css(t,"display"),ft([t]))),("inline"===u||"inline-block"===u&&null!=c)&&"none"===k.css(t,"float")&&(l||(h.done(function(){f.display=c}),null==c&&(u=f.display,c="none"===u?"":u)),f.display="inline-block")),i.overflow&&(f.overflow="hidden",h.always(function(){f.overflow=i.overflow[0],f.overflowX=i.overflow[1],f.overflowY=i.overflow[2]})),l=!1,p)l||(v?"hidden"in v&&(m=v.hidden):v=K.access(t,"fxshow",{display:c}),s&&(v.hidden=!m),m&&ft([t],!0),h.done(function(){for(n in m||ft([t]),K.remove(t,"fxshow"),p)k.style(t,n,p[n])})),l=fe(m?v[n]:0,n,h),n in v||(v[n]=l.start,m&&(l.end=l.start,l.start=0))}],prefilter:function(t,e){e?me.prefilters.unshift(t):me.prefilters.push(t)}}),k.speed=function(t,e,i){var n=t&&"object"==typeof t?k.extend({},t):{complete:i||!i&&e||y(t)&&t,duration:t,easing:i&&e||e&&!y(e)&&e};return k.fx.off?n.duration=0:"number"!=typeof n.duration&&(n.duration in k.fx.speeds?n.duration=k.fx.speeds[n.duration]:n.duration=k.fx.speeds._default),null!=n.queue&&!0!==n.queue||(n.queue="fx"),n.old=n.complete,n.complete=function(){y(n.old)&&n.old.call(this),n.queue&&k.dequeue(this,n.queue)},n},k.fn.extend({fadeTo:function(t,e,i,n){return this.filter(ct).css("opacity",0).show().end().animate({opacity:e},t,i,n)},animate:function(t,e,i,n){var o=k.isEmptyObject(t),s=k.speed(e,i,n),r=function(){var e=me(this,k.extend({},t),s);(o||K.get(this,"finish"))&&e.stop(!0)};return r.finish=r,o||!1===s.queue?this.each(r):this.queue(s.queue,r)},stop:function(t,e,i){var n=function(t){var e=t.stop;delete t.stop,e(i)};return"string"!=typeof t&&(i=e,e=t,t=void 0),e&&!1!==t&&this.queue(t||"fx",[]),this.each(function(){var e=!0,o=null!=t&&t+"queueHooks",s=k.timers,r=K.get(this);if(o)r[o]&&r[o].stop&&n(r[o]);else for(o in r)r[o]&&r[o].stop&&ue.test(o)&&n(r[o]);for(o=s.length;o--;)s[o].elem!==this||null!=t&&s[o].queue!==t||(s[o].anim.stop(i),e=!1,s.splice(o,1));!e&&i||k.dequeue(this,t)})},finish:function(t){return!1!==t&&(t=t||"fx"),this.each(function(){var e,i=K.get(this),n=i[t+"queue"],o=i[t+"queueHooks"],s=k.timers,r=n?n.length:0;for(i.finish=!0,k.queue(this,t,[]),o&&o.stop&&o.stop.call(this,!0),e=s.length;e--;)s[e].elem===this&&s[e].queue===t&&(s[e].anim.stop(!0),s.splice(e,1));for(e=0;e<r;e++)n[e]&&n[e].finish&&n[e].finish.call(this);delete i.finish})}}),k.each(["toggle","show","hide"],function(t,e){var i=k.fn[e];k.fn[e]=function(t,n,o){return null==t||"boolean"==typeof t?i.apply(this,arguments):this.animate(pe(e,!0),t,n,o)}}),k.each({slideDown:pe("show"),slideUp:pe("hide"),slideToggle:pe("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(t,e){k.fn[t]=function(t,i,n){return this.animate(e,t,i,n)}}),k.timers=[],k.fx.tick=function(){var t,e=0,i=k.timers;for(ae=Date.now();e<i.length;e++)(t=i[e])()||i[e]!==t||i.splice(e--,1);i.length||k.fx.stop(),ae=void 0},k.fx.timer=function(t){k.timers.push(t),k.fx.start()},k.fx.interval=13,k.fx.start=function(){le||(le=!0,de())},k.fx.stop=function(){le=null},k.fx.speeds={slow:600,fast:200,_default:400},k.fn.delay=function(t,e){return t=k.fx&&k.fx.speeds[t]||t,e=e||"fx",this.queue(e,function(e,n){var o=i.setTimeout(e,t);n.stop=function(){i.clearTimeout(o)}})},function(){var t=r.createElement("input"),e=r.createElement("select").appendChild(r.createElement("option"));t.type="checkbox",g.checkOn=""!==t.value,g.optSelected=e.selected,(t=r.createElement("input")).value="t",t.type="radio",g.radioValue="t"===t.value}();var ve,ge=k.expr.attrHandle;k.fn.extend({attr:function(t,e){return Y(this,k.attr,t,e,arguments.length>1)},removeAttr:function(t){return this.each(function(){k.removeAttr(this,t)})}}),k.extend({attr:function(t,e,i){var n,o,s=t.nodeType;if(3!==s&&8!==s&&2!==s)return void 0===t.getAttribute?k.prop(t,e,i):(1===s&&k.isXMLDoc(t)||(o=k.attrHooks[e.toLowerCase()]||(k.expr.match.bool.test(e)?ve:void 0)),void 0!==i?null===i?void k.removeAttr(t,e):o&&"set"in o&&void 0!==(n=o.set(t,i,e))?n:(t.setAttribute(e,i+""),i):o&&"get"in o&&null!==(n=o.get(t,e))?n:null==(n=k.find.attr(t,e))?void 0:n)},attrHooks:{type:{set:function(t,e){if(!g.radioValue&&"radio"===e&&$(t,"input")){var i=t.value;return t.setAttribute("type",e),i&&(t.value=i),e}}}},removeAttr:function(t,e){var i,n=0,o=e&&e.match(P);if(o&&1===t.nodeType)for(;i=o[n++];)t.removeAttribute(i)}}),ve={set:function(t,e,i){return!1===e?k.removeAttr(t,i):t.setAttribute(i,i),i}},k.each(k.expr.match.bool.source.match(/\w+/g),function(t,e){var i=ge[e]||k.find.attr;ge[e]=function(t,e,n){var o,s,r=e.toLowerCase();return n||(s=ge[r],ge[r]=o,o=null!=i(t,e,n)?r:null,ge[r]=s),o}});var ye=/^(?:input|select|textarea|button)$/i,be=/^(?:a|area)$/i;function we(t){return(t.match(P)||[]).join(" ")}function xe(t){return t.getAttribute&&t.getAttribute("class")||""}function Te(t){return Array.isArray(t)?t:"string"==typeof t&&t.match(P)||[]}k.fn.extend({prop:function(t,e){return Y(this,k.prop,t,e,arguments.length>1)},removeProp:function(t){return this.each(function(){delete this[k.propFix[t]||t]})}}),k.extend({prop:function(t,e,i){var n,o,s=t.nodeType;if(3!==s&&8!==s&&2!==s)return 1===s&&k.isXMLDoc(t)||(e=k.propFix[e]||e,o=k.propHooks[e]),void 0!==i?o&&"set"in o&&void 0!==(n=o.set(t,i,e))?n:t[e]=i:o&&"get"in o&&null!==(n=o.get(t,e))?n:t[e]},propHooks:{tabIndex:{get:function(t){var e=k.find.attr(t,"tabindex");return e?parseInt(e,10):ye.test(t.nodeName)||be.test(t.nodeName)&&t.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),g.optSelected||(k.propHooks.selected={get:function(t){var e=t.parentNode;return e&&e.parentNode&&e.parentNode.selectedIndex,null},set:function(t){var e=t.parentNode;e&&(e.selectedIndex,e.parentNode&&e.parentNode.selectedIndex)}}),k.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){k.propFix[this.toLowerCase()]=this}),k.fn.extend({addClass:function(t){var e,i,n,o,s,r,a,l=0;if(y(t))return this.each(function(e){k(this).addClass(t.call(this,e,xe(this)))});if((e=Te(t)).length)for(;i=this[l++];)if(o=xe(i),n=1===i.nodeType&&" "+we(o)+" "){for(r=0;s=e[r++];)n.indexOf(" "+s+" ")<0&&(n+=s+" ");o!==(a=we(n))&&i.setAttribute("class",a)}return this},removeClass:function(t){var e,i,n,o,s,r,a,l=0;if(y(t))return this.each(function(e){k(this).removeClass(t.call(this,e,xe(this)))});if(!arguments.length)return this.attr("class","");if((e=Te(t)).length)for(;i=this[l++];)if(o=xe(i),n=1===i.nodeType&&" "+we(o)+" "){for(r=0;s=e[r++];)for(;n.indexOf(" "+s+" ")>-1;)n=n.replace(" "+s+" "," ");o!==(a=we(n))&&i.setAttribute("class",a)}return this},toggleClass:function(t,e){var i=typeof t,n="string"===i||Array.isArray(t);return"boolean"==typeof e&&n?e?this.addClass(t):this.removeClass(t):y(t)?this.each(function(i){k(this).toggleClass(t.call(this,i,xe(this),e),e)}):this.each(function(){var e,o,s,r;if(n)for(o=0,s=k(this),r=Te(t);e=r[o++];)s.hasClass(e)?s.removeClass(e):s.addClass(e);else void 0!==t&&"boolean"!==i||((e=xe(this))&&K.set(this,"__className__",e),this.setAttribute&&this.setAttribute("class",e||!1===t?"":K.get(this,"__className__")||""))})},hasClass:function(t){var e,i,n=0;for(e=" "+t+" ";i=this[n++];)if(1===i.nodeType&&(" "+we(xe(i))+" ").indexOf(e)>-1)return!0;return!1}});var ke=/\r/g;k.fn.extend({val:function(t){var e,i,n,o=this[0];return arguments.length?(n=y(t),this.each(function(i){var o;1===this.nodeType&&(null==(o=n?t.call(this,i,k(this).val()):t)?o="":"number"==typeof o?o+="":Array.isArray(o)&&(o=k.map(o,function(t){return null==t?"":t+""})),(e=k.valHooks[this.type]||k.valHooks[this.nodeName.toLowerCase()])&&"set"in e&&void 0!==e.set(this,o,"value")||(this.value=o))})):o?(e=k.valHooks[o.type]||k.valHooks[o.nodeName.toLowerCase()])&&"get"in e&&void 0!==(i=e.get(o,"value"))?i:"string"==typeof(i=o.value)?i.replace(ke,""):null==i?"":i:void 0}}),k.extend({valHooks:{option:{get:function(t){var e=k.find.attr(t,"value");return null!=e?e:we(k.text(t))}},select:{get:function(t){var e,i,n,o=t.options,s=t.selectedIndex,r="select-one"===t.type,a=r?null:[],l=r?s+1:o.length;for(n=s<0?l:r?s:0;n<l;n++)if(((i=o[n]).selected||n===s)&&!i.disabled&&(!i.parentNode.disabled||!$(i.parentNode,"optgroup"))){if(e=k(i).val(),r)return e;a.push(e)}return a},set:function(t,e){for(var i,n,o=t.options,s=k.makeArray(e),r=o.length;r--;)((n=o[r]).selected=k.inArray(k.valHooks.option.get(n),s)>-1)&&(i=!0);return i||(t.selectedIndex=-1),s}}}}),k.each(["radio","checkbox"],function(){k.valHooks[this]={set:function(t,e){if(Array.isArray(e))return t.checked=k.inArray(k(t).val(),e)>-1}},g.checkOn||(k.valHooks[this].get=function(t){return null===t.getAttribute("value")?"on":t.value})}),g.focusin="onfocusin"in i;var Ce=/^(?:focusinfocus|focusoutblur)$/,Se=function(t){t.stopPropagation()};k.extend(k.event,{trigger:function(t,e,n,o){var s,a,l,c,u,d,h,p,m=[n||r],v=f.call(t,"type")?t.type:t,g=f.call(t,"namespace")?t.namespace.split("."):[];if(a=p=l=n=n||r,3!==n.nodeType&&8!==n.nodeType&&!Ce.test(v+k.event.triggered)&&(v.indexOf(".")>-1&&(g=v.split("."),v=g.shift(),g.sort()),u=v.indexOf(":")<0&&"on"+v,(t=t[k.expando]?t:new k.Event(v,"object"==typeof t&&t)).isTrigger=o?2:3,t.namespace=g.join("."),t.rnamespace=t.namespace?new RegExp("(^|\\.)"+g.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=void 0,t.target||(t.target=n),e=null==e?[t]:k.makeArray(e,[t]),h=k.event.special[v]||{},o||!h.trigger||!1!==h.trigger.apply(n,e))){if(!o&&!h.noBubble&&!b(n)){for(c=h.delegateType||v,Ce.test(c+v)||(a=a.parentNode);a;a=a.parentNode)m.push(a),l=a;l===(n.ownerDocument||r)&&m.push(l.defaultView||l.parentWindow||i)}for(s=0;(a=m[s++])&&!t.isPropagationStopped();)p=a,t.type=s>1?c:h.bindType||v,(d=(K.get(a,"events")||{})[t.type]&&K.get(a,"handle"))&&d.apply(a,e),(d=u&&a[u])&&d.apply&&J(a)&&(t.result=d.apply(a,e),!1===t.result&&t.preventDefault());return t.type=v,o||t.isDefaultPrevented()||h._default&&!1!==h._default.apply(m.pop(),e)||!J(n)||u&&y(n[v])&&!b(n)&&((l=n[u])&&(n[u]=null),k.event.triggered=v,t.isPropagationStopped()&&p.addEventListener(v,Se),n[v](),t.isPropagationStopped()&&p.removeEventListener(v,Se),k.event.triggered=void 0,l&&(n[u]=l)),t.result}},simulate:function(t,e,i){var n=k.extend(new k.Event,i,{type:t,isSimulated:!0});k.event.trigger(n,null,e)}}),k.fn.extend({trigger:function(t,e){return this.each(function(){k.event.trigger(t,e,this)})},triggerHandler:function(t,e){var i=this[0];if(i)return k.event.trigger(t,e,i,!0)}}),g.focusin||k.each({focus:"focusin",blur:"focusout"},function(t,e){var i=function(t){k.event.simulate(e,t.target,k.event.fix(t))};k.event.special[e]={setup:function(){var n=this.ownerDocument||this,o=K.access(n,e);o||n.addEventListener(t,i,!0),K.access(n,e,(o||0)+1)},teardown:function(){var n=this.ownerDocument||this,o=K.access(n,e)-1;o?K.access(n,e,o):(n.removeEventListener(t,i,!0),K.remove(n,e))}}});var De=i.location,Ee=Date.now(),Me=/\?/;k.parseXML=function(t){var e;if(!t||"string"!=typeof t)return null;try{e=(new i.DOMParser).parseFromString(t,"text/xml")}catch(t){e=void 0}return e&&!e.getElementsByTagName("parsererror").length||k.error("Invalid XML: "+t),e};var Le=/\[\]$/,$e=/\r?\n/g,Ne=/^(?:submit|button|image|reset|file)$/i,Ae=/^(?:input|select|textarea|keygen)/i;function ze(t,e,i,n){var o;if(Array.isArray(e))k.each(e,function(e,o){i||Le.test(t)?n(t,o):ze(t+"["+("object"==typeof o&&null!=o?e:"")+"]",o,i,n)});else if(i||"object"!==T(e))n(t,e);else for(o in e)ze(t+"["+o+"]",e[o],i,n)}k.param=function(t,e){var i,n=[],o=function(t,e){var i=y(e)?e():e;n[n.length]=encodeURIComponent(t)+"="+encodeURIComponent(null==i?"":i)};if(null==t)return"";if(Array.isArray(t)||t.jquery&&!k.isPlainObject(t))k.each(t,function(){o(this.name,this.value)});else for(i in t)ze(i,t[i],e,o);return n.join("&")},k.fn.extend({serialize:function(){return k.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var t=k.prop(this,"elements");return t?k.makeArray(t):this}).filter(function(){var t=this.type;return this.name&&!k(this).is(":disabled")&&Ae.test(this.nodeName)&&!Ne.test(t)&&(this.checked||!mt.test(t))}).map(function(t,e){var i=k(this).val();return null==i?null:Array.isArray(i)?k.map(i,function(t){return{name:e.name,value:t.replace($e,"\r\n")}}):{name:e.name,value:i.replace($e,"\r\n")}}).get()}});var Oe=/%20/g,je=/#.*$/,Ie=/([?&])_=[^&]*/,He=/^(.*?):[ \t]*([^\r\n]*)$/gm,Pe=/^(?:GET|HEAD)$/,Re=/^\/\//,Fe={},_e={},qe="*/".concat("*"),Ue=r.createElement("a");function Be(t){return function(e,i){"string"!=typeof e&&(i=e,e="*");var n,o=0,s=e.toLowerCase().match(P)||[];if(y(i))for(;n=s[o++];)"+"===n[0]?(n=n.slice(1)||"*",(t[n]=t[n]||[]).unshift(i)):(t[n]=t[n]||[]).push(i)}}function Ye(t,e,i,n){var o={},s=t===_e;function r(a){var l;return o[a]=!0,k.each(t[a]||[],function(t,a){var c=a(e,i,n);return"string"!=typeof c||s||o[c]?s?!(l=c):void 0:(e.dataTypes.unshift(c),r(c),!1)}),l}return r(e.dataTypes[0])||!o["*"]&&r("*")}function We(t,e){var i,n,o=k.ajaxSettings.flatOptions||{};for(i in e)void 0!==e[i]&&((o[i]?t:n||(n={}))[i]=e[i]);return n&&k.extend(!0,t,n),t}Ue.href=De.href,k.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:De.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(De.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":qe,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":k.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(t,e){return e?We(We(t,k.ajaxSettings),e):We(k.ajaxSettings,t)},ajaxPrefilter:Be(Fe),ajaxTransport:Be(_e),ajax:function(t,e){"object"==typeof t&&(e=t,t=void 0),e=e||{};var n,o,s,a,l,c,u,d,h,p,f=k.ajaxSetup({},e),m=f.context||f,v=f.context&&(m.nodeType||m.jquery)?k(m):k.event,g=k.Deferred(),y=k.Callbacks("once memory"),b=f.statusCode||{},w={},x={},T="canceled",C={readyState:0,getResponseHeader:function(t){var e;if(u){if(!a)for(a={};e=He.exec(s);)a[e[1].toLowerCase()+" "]=(a[e[1].toLowerCase()+" "]||[]).concat(e[2]);e=a[t.toLowerCase()+" "]}return null==e?null:e.join(", ")},getAllResponseHeaders:function(){return u?s:null},setRequestHeader:function(t,e){return null==u&&(t=x[t.toLowerCase()]=x[t.toLowerCase()]||t,w[t]=e),this},overrideMimeType:function(t){return null==u&&(f.mimeType=t),this},statusCode:function(t){var e;if(t)if(u)C.always(t[C.status]);else for(e in t)b[e]=[b[e],t[e]];return this},abort:function(t){var e=t||T;return n&&n.abort(e),S(0,e),this}};if(g.promise(C),f.url=((t||f.url||De.href)+"").replace(Re,De.protocol+"//"),f.type=e.method||e.type||f.method||f.type,f.dataTypes=(f.dataType||"*").toLowerCase().match(P)||[""],null==f.crossDomain){c=r.createElement("a");try{c.href=f.url,c.href=c.href,f.crossDomain=Ue.protocol+"//"+Ue.host!=c.protocol+"//"+c.host}catch(t){f.crossDomain=!0}}if(f.data&&f.processData&&"string"!=typeof f.data&&(f.data=k.param(f.data,f.traditional)),Ye(Fe,f,e,C),u)return C;for(h in(d=k.event&&f.global)&&0==k.active++&&k.event.trigger("ajaxStart"),f.type=f.type.toUpperCase(),f.hasContent=!Pe.test(f.type),o=f.url.replace(je,""),f.hasContent?f.data&&f.processData&&0===(f.contentType||"").indexOf("application/x-www-form-urlencoded")&&(f.data=f.data.replace(Oe,"+")):(p=f.url.slice(o.length),f.data&&(f.processData||"string"==typeof f.data)&&(o+=(Me.test(o)?"&":"?")+f.data,delete f.data),!1===f.cache&&(o=o.replace(Ie,"$1"),p=(Me.test(o)?"&":"?")+"_="+Ee+++p),f.url=o+p),f.ifModified&&(k.lastModified[o]&&C.setRequestHeader("If-Modified-Since",k.lastModified[o]),k.etag[o]&&C.setRequestHeader("If-None-Match",k.etag[o])),(f.data&&f.hasContent&&!1!==f.contentType||e.contentType)&&C.setRequestHeader("Content-Type",f.contentType),C.setRequestHeader("Accept",f.dataTypes[0]&&f.accepts[f.dataTypes[0]]?f.accepts[f.dataTypes[0]]+("*"!==f.dataTypes[0]?", "+qe+"; q=0.01":""):f.accepts["*"]),f.headers)C.setRequestHeader(h,f.headers[h]);if(f.beforeSend&&(!1===f.beforeSend.call(m,C,f)||u))return C.abort();if(T="abort",y.add(f.complete),C.done(f.success),C.fail(f.error),n=Ye(_e,f,e,C)){if(C.readyState=1,d&&v.trigger("ajaxSend",[C,f]),u)return C;f.async&&f.timeout>0&&(l=i.setTimeout(function(){C.abort("timeout")},f.timeout));try{u=!1,n.send(w,S)}catch(t){if(u)throw t;S(-1,t)}}else S(-1,"No Transport");function S(t,e,r,a){var c,h,p,w,x,T=e;u||(u=!0,l&&i.clearTimeout(l),n=void 0,s=a||"",C.readyState=t>0?4:0,c=t>=200&&t<300||304===t,r&&(w=function(t,e,i){for(var n,o,s,r,a=t.contents,l=t.dataTypes;"*"===l[0];)l.shift(),void 0===n&&(n=t.mimeType||e.getResponseHeader("Content-Type"));if(n)for(o in a)if(a[o]&&a[o].test(n)){l.unshift(o);break}if(l[0]in i)s=l[0];else{for(o in i){if(!l[0]||t.converters[o+" "+l[0]]){s=o;break}r||(r=o)}s=s||r}if(s)return s!==l[0]&&l.unshift(s),i[s]}(f,C,r)),w=function(t,e,i,n){var o,s,r,a,l,c={},u=t.dataTypes.slice();if(u[1])for(r in t.converters)c[r.toLowerCase()]=t.converters[r];for(s=u.shift();s;)if(t.responseFields[s]&&(i[t.responseFields[s]]=e),!l&&n&&t.dataFilter&&(e=t.dataFilter(e,t.dataType)),l=s,s=u.shift())if("*"===s)s=l;else if("*"!==l&&l!==s){if(!(r=c[l+" "+s]||c["* "+s]))for(o in c)if((a=o.split(" "))[1]===s&&(r=c[l+" "+a[0]]||c["* "+a[0]])){!0===r?r=c[o]:!0!==c[o]&&(s=a[0],u.unshift(a[1]));break}if(!0!==r)if(r&&t.throws)e=r(e);else try{e=r(e)}catch(t){return{state:"parsererror",error:r?t:"No conversion from "+l+" to "+s}}}return{state:"success",data:e}}(f,w,C,c),c?(f.ifModified&&((x=C.getResponseHeader("Last-Modified"))&&(k.lastModified[o]=x),(x=C.getResponseHeader("etag"))&&(k.etag[o]=x)),204===t||"HEAD"===f.type?T="nocontent":304===t?T="notmodified":(T=w.state,h=w.data,c=!(p=w.error))):(p=T,!t&&T||(T="error",t<0&&(t=0))),C.status=t,C.statusText=(e||T)+"",c?g.resolveWith(m,[h,T,C]):g.rejectWith(m,[C,T,p]),C.statusCode(b),b=void 0,d&&v.trigger(c?"ajaxSuccess":"ajaxError",[C,f,c?h:p]),y.fireWith(m,[C,T]),d&&(v.trigger("ajaxComplete",[C,f]),--k.active||k.event.trigger("ajaxStop")))}return C},getJSON:function(t,e,i){return k.get(t,e,i,"json")},getScript:function(t,e){return k.get(t,void 0,e,"script")}}),k.each(["get","post"],function(t,e){k[e]=function(t,i,n,o){return y(i)&&(o=o||n,n=i,i=void 0),k.ajax(k.extend({url:t,type:e,dataType:o,data:i,success:n},k.isPlainObject(t)&&t))}}),k._evalUrl=function(t,e){return k.ajax({url:t,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}},dataFilter:function(t){k.globalEval(t,e)}})},k.fn.extend({wrapAll:function(t){var e;return this[0]&&(y(t)&&(t=t.call(this[0])),e=k(t,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&e.insertBefore(this[0]),e.map(function(){for(var t=this;t.firstElementChild;)t=t.firstElementChild;return t}).append(this)),this},wrapInner:function(t){return y(t)?this.each(function(e){k(this).wrapInner(t.call(this,e))}):this.each(function(){var e=k(this),i=e.contents();i.length?i.wrapAll(t):e.append(t)})},wrap:function(t){var e=y(t);return this.each(function(i){k(this).wrapAll(e?t.call(this,i):t)})},unwrap:function(t){return this.parent(t).not("body").each(function(){k(this).replaceWith(this.childNodes)}),this}}),k.expr.pseudos.hidden=function(t){return!k.expr.pseudos.visible(t)},k.expr.pseudos.visible=function(t){return!!(t.offsetWidth||t.offsetHeight||t.getClientRects().length)},k.ajaxSettings.xhr=function(){try{return new i.XMLHttpRequest}catch(t){}};var Ve={0:200,1223:204},Xe=k.ajaxSettings.xhr();g.cors=!!Xe&&"withCredentials"in Xe,g.ajax=Xe=!!Xe,k.ajaxTransport(function(t){var e,n;if(g.cors||Xe&&!t.crossDomain)return{send:function(o,s){var r,a=t.xhr();if(a.open(t.type,t.url,t.async,t.username,t.password),t.xhrFields)for(r in t.xhrFields)a[r]=t.xhrFields[r];for(r in t.mimeType&&a.overrideMimeType&&a.overrideMimeType(t.mimeType),t.crossDomain||o["X-Requested-With"]||(o["X-Requested-With"]="XMLHttpRequest"),o)a.setRequestHeader(r,o[r]);e=function(t){return function(){e&&(e=n=a.onload=a.onerror=a.onabort=a.ontimeout=a.onreadystatechange=null,"abort"===t?a.abort():"error"===t?"number"!=typeof a.status?s(0,"error"):s(a.status,a.statusText):s(Ve[a.status]||a.status,a.statusText,"text"!==(a.responseType||"text")||"string"!=typeof a.responseText?{binary:a.response}:{text:a.responseText},a.getAllResponseHeaders()))}},a.onload=e(),n=a.onerror=a.ontimeout=e("error"),void 0!==a.onabort?a.onabort=n:a.onreadystatechange=function(){4===a.readyState&&i.setTimeout(function(){e&&n()})},e=e("abort");try{a.send(t.hasContent&&t.data||null)}catch(t){if(e)throw t}},abort:function(){e&&e()}}}),k.ajaxPrefilter(function(t){t.crossDomain&&(t.contents.script=!1)}),k.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(t){return k.globalEval(t),t}}}),k.ajaxPrefilter("script",function(t){void 0===t.cache&&(t.cache=!1),t.crossDomain&&(t.type="GET")}),k.ajaxTransport("script",function(t){var e,i;if(t.crossDomain||t.scriptAttrs)return{send:function(n,o){e=k("<script>").attr(t.scriptAttrs||{}).prop({charset:t.scriptCharset,src:t.url}).on("load error",i=function(t){e.remove(),i=null,t&&o("error"===t.type?404:200,t.type)}),r.head.appendChild(e[0])},abort:function(){i&&i()}}});var Ge,Je=[],Ze=/(=)\?(?=&|$)|\?\?/;k.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var t=Je.pop()||k.expando+"_"+Ee++;return this[t]=!0,t}}),k.ajaxPrefilter("json jsonp",function(t,e,n){var o,s,r,a=!1!==t.jsonp&&(Ze.test(t.url)?"url":"string"==typeof t.data&&0===(t.contentType||"").indexOf("application/x-www-form-urlencoded")&&Ze.test(t.data)&&"data");if(a||"jsonp"===t.dataTypes[0])return o=t.jsonpCallback=y(t.jsonpCallback)?t.jsonpCallback():t.jsonpCallback,a?t[a]=t[a].replace(Ze,"$1"+o):!1!==t.jsonp&&(t.url+=(Me.test(t.url)?"&":"?")+t.jsonp+"="+o),t.converters["script json"]=function(){return r||k.error(o+" was not called"),r[0]},t.dataTypes[0]="json",s=i[o],i[o]=function(){r=arguments},n.always(function(){void 0===s?k(i).removeProp(o):i[o]=s,t[o]&&(t.jsonpCallback=e.jsonpCallback,Je.push(o)),r&&y(s)&&s(r[0]),r=s=void 0}),"script"}),g.createHTMLDocument=((Ge=r.implementation.createHTMLDocument("").body).innerHTML="<form></form><form></form>",2===Ge.childNodes.length),k.parseHTML=function(t,e,i){return"string"!=typeof t?[]:("boolean"==typeof e&&(i=e,e=!1),e||(g.createHTMLDocument?((n=(e=r.implementation.createHTMLDocument("")).createElement("base")).href=r.location.href,e.head.appendChild(n)):e=r),s=!i&&[],(o=N.exec(t))?[e.createElement(o[1])]:(o=Ct([t],e,s),s&&s.length&&k(s).remove(),k.merge([],o.childNodes)));var n,o,s},k.fn.load=function(t,e,i){var n,o,s,r=this,a=t.indexOf(" ");return a>-1&&(n=we(t.slice(a)),t=t.slice(0,a)),y(e)?(i=e,e=void 0):e&&"object"==typeof e&&(o="POST"),r.length>0&&k.ajax({url:t,type:o||"GET",dataType:"html",data:e}).done(function(t){s=arguments,r.html(n?k("<div>").append(k.parseHTML(t)).find(n):t)}).always(i&&function(t,e){r.each(function(){i.apply(this,s||[t.responseText,e,t])})}),this},k.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(t,e){k.fn[e]=function(t){return this.on(e,t)}}),k.expr.pseudos.animated=function(t){return k.grep(k.timers,function(e){return t===e.elem}).length},k.offset={setOffset:function(t,e,i){var n,o,s,r,a,l,c=k.css(t,"position"),u=k(t),d={};"static"===c&&(t.style.position="relative"),a=u.offset(),s=k.css(t,"top"),l=k.css(t,"left"),("absolute"===c||"fixed"===c)&&(s+l).indexOf("auto")>-1?(r=(n=u.position()).top,o=n.left):(r=parseFloat(s)||0,o=parseFloat(l)||0),y(e)&&(e=e.call(t,i,k.extend({},a))),null!=e.top&&(d.top=e.top-a.top+r),null!=e.left&&(d.left=e.left-a.left+o),"using"in e?e.using.call(t,d):u.css(d)}},k.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){k.offset.setOffset(this,t,e)});var e,i,n=this[0];return n?n.getClientRects().length?(e=n.getBoundingClientRect(),i=n.ownerDocument.defaultView,{top:e.top+i.pageYOffset,left:e.left+i.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var t,e,i,n=this[0],o={top:0,left:0};if("fixed"===k.css(n,"position"))e=n.getBoundingClientRect();else{for(e=this.offset(),i=n.ownerDocument,t=n.offsetParent||i.documentElement;t&&(t===i.body||t===i.documentElement)&&"static"===k.css(t,"position");)t=t.parentNode;t&&t!==n&&1===t.nodeType&&((o=k(t).offset()).top+=k.css(t,"borderTopWidth",!0),o.left+=k.css(t,"borderLeftWidth",!0))}return{top:e.top-o.top-k.css(n,"marginTop",!0),left:e.left-o.left-k.css(n,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var t=this.offsetParent;t&&"static"===k.css(t,"position");)t=t.offsetParent;return t||rt})}}),k.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,e){var i="pageYOffset"===e;k.fn[t]=function(n){return Y(this,function(t,n,o){var s;if(b(t)?s=t:9===t.nodeType&&(s=t.defaultView),void 0===o)return s?s[e]:t[n];s?s.scrollTo(i?s.pageXOffset:o,i?o:s.pageYOffset):t[n]=o},t,n,arguments.length)}}),k.each(["top","left"],function(t,e){k.cssHooks[e]=Xt(g.pixelPosition,function(t,i){if(i)return i=Vt(t,e),Bt.test(i)?k(t).position()[e]+"px":i})}),k.each({Height:"height",Width:"width"},function(t,e){k.each({padding:"inner"+t,content:e,"":"outer"+t},function(i,n){k.fn[n]=function(o,s){var r=arguments.length&&(i||"boolean"!=typeof o),a=i||(!0===o||!0===s?"margin":"border");return Y(this,function(e,i,o){var s;return b(e)?0===n.indexOf("outer")?e["inner"+t]:e.document.documentElement["client"+t]:9===e.nodeType?(s=e.documentElement,Math.max(e.body["scroll"+t],s["scroll"+t],e.body["offset"+t],s["offset"+t],s["client"+t])):void 0===o?k.css(e,i,a):k.style(e,i,o,a)},e,r?o:void 0,r)}})}),k.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(t,e){k.fn[e]=function(t,i){return arguments.length>0?this.on(e,null,t,i):this.trigger(e)}}),k.fn.extend({hover:function(t,e){return this.mouseenter(t).mouseleave(e||t)}}),k.fn.extend({bind:function(t,e,i){return this.on(t,null,e,i)},unbind:function(t,e){return this.off(t,null,e)},delegate:function(t,e,i,n){return this.on(e,t,i,n)},undelegate:function(t,e,i){return 1===arguments.length?this.off(t,"**"):this.off(e,t||"**",i)}}),k.proxy=function(t,e){var i,n,o;if("string"==typeof e&&(i=t[e],e=t,t=i),y(t))return n=l.call(arguments,2),(o=function(){return t.apply(e||this,n.concat(l.call(arguments)))}).guid=t.guid=t.guid||k.guid++,o},k.holdReady=function(t){t?k.readyWait++:k.ready(!0)},k.isArray=Array.isArray,k.parseJSON=JSON.parse,k.nodeName=$,k.isFunction=y,k.isWindow=b,k.camelCase=G,k.type=T,k.now=Date.now,k.isNumeric=function(t){var e=k.type(t);return("number"===e||"string"===e)&&!isNaN(t-parseFloat(t))},void 0===(n=function(){return k}.apply(e,[]))||(t.exports=n);var Ke=i.jQuery,Qe=i.$;return k.noConflict=function(t){return i.$===k&&(i.$=Qe),t&&i.jQuery===k&&(i.jQuery=Ke),k},o||(i.jQuery=i.$=k),k})},function(t,e,i){(function(i){var n,o,s;void 0!==i||window||this.window||this.global,o=[],n=function(t){"use strict";var e={},i="iziToast",n=(document.querySelector("body"),!!/Mobi/.test(navigator.userAgent)),o=/Chrome/.test(navigator.userAgent)&&/Google Inc/.test(navigator.vendor),s="undefined"!=typeof InstallTrigger,r="ontouchstart"in document.documentElement,a=["bottomRight","bottomLeft","bottomCenter","topRight","topLeft","topCenter","center"],l=568,c={};e.children={};var u={id:null,class:"",title:"",titleColor:"",titleSize:"",titleLineHeight:"",message:"",messageColor:"",messageSize:"",messageLineHeight:"",backgroundColor:"",theme:"light",color:"",icon:"",iconText:"",iconColor:"",iconUrl:null,image:"",imageWidth:50,maxWidth:null,zindex:null,layout:1,balloon:!1,close:!0,closeOnEscape:!1,closeOnClick:!1,displayMode:0,position:"bottomRight",target:"",targetFirst:!0,timeout:5e3,rtl:!1,animateInside:!0,drag:!0,pauseOnHover:!0,resetOnHover:!1,progressBar:!0,progressBarColor:"",progressBarEasing:"linear",overlay:!1,overlayClose:!1,overlayColor:"rgba(0, 0, 0, 0.6)",transitionIn:"fadeInUp",transitionOut:"fadeOut",transitionInMobile:"fadeInUp",transitionOutMobile:"fadeOutDown",buttons:{},inputs:{},onOpening:function(){},onOpened:function(){},onClosing:function(){},onClosed:function(){}};if("remove"in Element.prototype||(Element.prototype.remove=function(){this.parentNode&&this.parentNode.removeChild(this)}),"function"!=typeof window.CustomEvent){var d=function(t,e){e=e||{bubbles:!1,cancelable:!1,detail:void 0};var i=document.createEvent("CustomEvent");return i.initCustomEvent(t,e.bubbles,e.cancelable,e.detail),i};d.prototype=window.Event.prototype,window.CustomEvent=d}var h=function(t,e,i){if("[object Object]"===Object.prototype.toString.call(t))for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.call(i,t[n],n,t);else if(t)for(var o=0,s=t.length;s>o;o++)e.call(i,t[o],o,t)},p=function(t,e){var i={};return h(t,function(e,n){i[n]=t[n]}),h(e,function(t,n){i[n]=e[n]}),i},f=function(t){var e=document.createDocumentFragment(),i=document.createElement("div");for(i.innerHTML=t;i.firstChild;)e.appendChild(i.firstChild);return e},m={move:function(t,e,n,r){var a,l=180;0!==r&&(t.classList.add(i+"-dragged"),t.style.transform="translateX("+r+"px)",r>0?.3>(a=(l-r)/l)&&e.hide(p(n,{transitionOut:"fadeOutRight",transitionOutMobile:"fadeOutRight"}),t,"drag"):.3>(a=(l+r)/l)&&e.hide(p(n,{transitionOut:"fadeOutLeft",transitionOutMobile:"fadeOutLeft"}),t,"drag"),t.style.opacity=a,.3>a&&((o||s)&&(t.style.left=r+"px"),t.parentNode.style.opacity=.3,this.stopMoving(t,null)))},startMoving:function(t,e,i,n){n=n||window.event;var o=r?n.touches[0].clientX:n.clientX,s=t.style.transform.replace("px)","");s=s.replace("translateX(","");var a=o-s;i.transitionIn&&t.classList.remove(i.transitionIn),i.transitionInMobile&&t.classList.remove(i.transitionInMobile),t.style.transition="",r?document.ontouchmove=function(n){n.preventDefault();var o=(n=n||window.event).touches[0].clientX,s=o-a;m.move(t,e,i,s)}:document.onmousemove=function(n){n.preventDefault();var o=(n=n||window.event).clientX,s=o-a;m.move(t,e,i,s)}},stopMoving:function(t,e){r?document.ontouchmove=function(){}:document.onmousemove=function(){},t.style.opacity="",t.style.transform="",t.classList.contains(i+"-dragged")&&(t.classList.remove(i+"-dragged"),t.style.transition="transform 0.4s ease, opacity 0.4s ease",setTimeout(function(){t.style.transition=""},400))}};return e.setSetting=function(t,i,n){e.children[t][i]=n},e.getSetting=function(t,i){return e.children[t][i]},e.destroy=function(){h(document.querySelectorAll("."+i+"-overlay"),function(t,e){t.remove()}),h(document.querySelectorAll("."+i+"-wrapper"),function(t,e){t.remove()}),h(document.querySelectorAll("."+i),function(t,e){t.remove()}),this.children={},document.removeEventListener(i+"-opened",{},!1),document.removeEventListener(i+"-opening",{},!1),document.removeEventListener(i+"-closing",{},!1),document.removeEventListener(i+"-closed",{},!1),document.removeEventListener("keyup",{},!1),c={}},e.settings=function(t){e.destroy(),c=t,u=p(u,t||{})},h({info:{color:"blue",icon:"ico-info"},success:{color:"green",icon:"ico-success"},warning:{color:"orange",icon:"ico-warning"},error:{color:"red",icon:"ico-error"},question:{color:"yellow",icon:"ico-question"}},function(t,i){e[i]=function(e){var i=p(c,e||{});i=p(t,i||{}),this.show(i)}}),e.progress=function(t,e,n){var o=this,s=e.getAttribute("data-iziToast-ref"),r=p(this.children[s],t||{}),a=e.querySelector("."+i+"-progressbar div");return{start:function(){void 0===r.time.REMAINING&&(e.classList.remove(i+"-reseted"),null!==a&&(a.style.transition="width "+r.timeout+"ms "+r.progressBarEasing,a.style.width="0%"),r.time.START=(new Date).getTime(),r.time.END=r.time.START+r.timeout,r.time.TIMER=setTimeout(function(){clearTimeout(r.time.TIMER),e.classList.contains(i+"-closing")||(o.hide(r,e,"timeout"),"function"==typeof n&&n.apply(o))},r.timeout),o.setSetting(s,"time",r.time))},pause:function(){if(void 0!==r.time.START&&!e.classList.contains(i+"-paused")&&!e.classList.contains(i+"-reseted")){if(e.classList.add(i+"-paused"),r.time.REMAINING=r.time.END-(new Date).getTime(),clearTimeout(r.time.TIMER),o.setSetting(s,"time",r.time),null!==a){var t=window.getComputedStyle(a),l=t.getPropertyValue("width");a.style.transition="none",a.style.width=l}"function"==typeof n&&setTimeout(function(){n.apply(o)},10)}},resume:function(){void 0!==r.time.REMAINING?(e.classList.remove(i+"-paused"),null!==a&&(a.style.transition="width "+r.time.REMAINING+"ms "+r.progressBarEasing,a.style.width="0%"),r.time.END=(new Date).getTime()+r.time.REMAINING,r.time.TIMER=setTimeout(function(){clearTimeout(r.time.TIMER),e.classList.contains(i+"-closing")||(o.hide(r,e,"timeout"),"function"==typeof n&&n.apply(o))},r.time.REMAINING),o.setSetting(s,"time",r.time)):this.start()},reset:function(){clearTimeout(r.time.TIMER),delete r.time.REMAINING,o.setSetting(s,"time",r.time),e.classList.add(i+"-reseted"),e.classList.remove(i+"-paused"),null!==a&&(a.style.transition="none",a.style.width="100%"),"function"==typeof n&&setTimeout(function(){n.apply(o)},10)}}},e.hide=function(t,e,o){"object"!=typeof e&&(e=document.querySelector(e));var s=this,r=p(this.children[e.getAttribute("data-iziToast-ref")],t||{});r.closedBy=o||null,delete r.time.REMAINING,e.classList.add(i+"-closing"),function(){var t=document.querySelector("."+i+"-overlay");if(null!==t){var e=t.getAttribute("data-iziToast-ref"),n=(e=e.split(",")).indexOf(String(r.ref));-1!==n&&e.splice(n,1),t.setAttribute("data-iziToast-ref",e.join()),0===e.length&&(t.classList.remove("fadeIn"),t.classList.add("fadeOut"),setTimeout(function(){t.remove()},700))}}(),r.transitionIn&&e.classList.remove(r.transitionIn),r.transitionInMobile&&e.classList.remove(r.transitionInMobile),n||window.innerWidth<=l?r.transitionOutMobile&&e.classList.add(r.transitionOutMobile):r.transitionOut&&e.classList.add(r.transitionOut);var a=e.parentNode.offsetHeight;e.parentNode.style.height=a+"px",e.style.pointerEvents="none",(!n||window.innerWidth>l)&&(e.parentNode.style.transitionDelay="0.2s");try{var c=new CustomEvent(i+"-closing",{detail:r,bubbles:!0,cancelable:!0});document.dispatchEvent(c)}catch(t){console.warn(t)}setTimeout(function(){e.parentNode.style.height="0px",e.parentNode.style.overflow="",setTimeout(function(){delete s.children[r.ref],e.parentNode.remove();try{var t=new CustomEvent(i+"-closed",{detail:r,bubbles:!0,cancelable:!0});document.dispatchEvent(t)}catch(t){console.warn(t)}void 0!==r.onClosed&&r.onClosed.apply(null,[r,e,o])},1e3)},200),void 0!==r.onClosing&&r.onClosing.apply(null,[r,e,o])},e.show=function(t){var o=this,s=p(c,t||{});if((s=p(u,s)).time={},null===s.id&&(s.id=function(t){return btoa(encodeURIComponent(t)).replace(/=/g,"")}(s.title+s.message+s.color)),1===s.displayMode||"once"==s.displayMode)try{if(document.querySelectorAll("."+i+"#"+s.id).length>0)return!1}catch(t){console.warn("["+i+"] Could not find an element with this selector: #"+s.id+". Try to set an valid id.")}if(2===s.displayMode||"replace"==s.displayMode)try{h(document.querySelectorAll("."+i+"#"+s.id),function(t,e){o.hide(s,t,"replaced")})}catch(t){console.warn("["+i+"] Could not find an element with this selector: #"+s.id+". Try to set an valid id.")}s.ref=(new Date).getTime()+Math.floor(1e7*Math.random()+1),e.children[s.ref]=s;var d,v={body:document.querySelector("body"),overlay:document.createElement("div"),toast:document.createElement("div"),toastBody:document.createElement("div"),toastTexts:document.createElement("div"),toastCapsule:document.createElement("div"),cover:document.createElement("div"),buttons:document.createElement("div"),inputs:document.createElement("div"),icon:s.iconUrl?document.createElement("img"):document.createElement("i"),wrapper:null};v.toast.setAttribute("data-iziToast-ref",s.ref),v.toast.appendChild(v.toastBody),v.toastCapsule.appendChild(v.toast),function(){if(v.toast.classList.add(i),v.toast.classList.add(i+"-opening"),v.toastCapsule.classList.add(i+"-capsule"),v.toastBody.classList.add(i+"-body"),v.toastTexts.classList.add(i+"-texts"),n||window.innerWidth<=l?s.transitionInMobile&&v.toast.classList.add(s.transitionInMobile):s.transitionIn&&v.toast.classList.add(s.transitionIn),s.class){var t=s.class.split(" ");h(t,function(t,e){v.toast.classList.add(t)})}s.id&&(v.toast.id=s.id),s.rtl&&(v.toast.classList.add(i+"-rtl"),v.toast.setAttribute("dir","rtl")),s.layout>1&&v.toast.classList.add(i+"-layout"+s.layout),s.balloon&&v.toast.classList.add(i+"-balloon"),s.maxWidth&&(isNaN(s.maxWidth)?v.toast.style.maxWidth=s.maxWidth:v.toast.style.maxWidth=s.maxWidth+"px"),""===s.theme&&"light"===s.theme||v.toast.classList.add(i+"-theme-"+s.theme),s.color&&(function(t){return"#"==t.substring(0,1)||"rgb"==t.substring(0,3)||"hsl"==t.substring(0,3)}(s.color)?v.toast.style.background=s.color:v.toast.classList.add(i+"-color-"+s.color)),s.backgroundColor&&(v.toast.style.background=s.backgroundColor,s.balloon&&(v.toast.style.borderColor=s.backgroundColor))}(),s.image&&(v.cover.classList.add(i+"-cover"),v.cover.style.width=s.imageWidth+"px",function(t){try{return btoa(atob(t))==t}catch(t){return!1}}(s.image.replace(/ /g,""))?v.cover.style.backgroundImage="url(data:image/png;base64,"+s.image.replace(/ /g,"")+")":v.cover.style.backgroundImage="url("+s.image+")",s.rtl?v.toastBody.style.marginRight=s.imageWidth+10+"px":v.toastBody.style.marginLeft=s.imageWidth+10+"px",v.toast.appendChild(v.cover)),s.close?(v.buttonClose=document.createElement("button"),v.buttonClose.type="button",v.buttonClose.classList.add(i+"-close"),v.buttonClose.addEventListener("click",function(t){t.target,o.hide(s,v.toast,"button")}),v.toast.appendChild(v.buttonClose)):s.rtl?v.toast.style.paddingLeft="18px":v.toast.style.paddingRight="18px",s.progressBar&&(v.progressBar=document.createElement("div"),v.progressBarDiv=document.createElement("div"),v.progressBar.classList.add(i+"-progressbar"),v.progressBarDiv.style.background=s.progressBarColor,v.progressBar.appendChild(v.progressBarDiv),v.toast.appendChild(v.progressBar)),s.timeout&&(s.pauseOnHover&&!s.resetOnHover&&(v.toast.addEventListener("mouseenter",function(t){o.progress(s,v.toast).pause()}),v.toast.addEventListener("mouseleave",function(t){o.progress(s,v.toast).resume()})),s.resetOnHover&&(v.toast.addEventListener("mouseenter",function(t){o.progress(s,v.toast).reset()}),v.toast.addEventListener("mouseleave",function(t){o.progress(s,v.toast).start()}))),s.iconUrl?(v.icon.setAttribute("class",i+"-icon"),v.icon.setAttribute("src",s.iconUrl)):s.icon&&(v.icon.setAttribute("class",i+"-icon "+s.icon),s.iconText&&v.icon.appendChild(document.createTextNode(s.iconText)),s.iconColor&&(v.icon.style.color=s.iconColor)),(s.icon||s.iconUrl)&&(s.rtl?v.toastBody.style.paddingRight="33px":v.toastBody.style.paddingLeft="33px",v.toastBody.appendChild(v.icon)),s.title.length>0&&(v.strong=document.createElement("strong"),v.strong.classList.add(i+"-title"),v.strong.appendChild(f(s.title)),v.toastTexts.appendChild(v.strong),s.titleColor&&(v.strong.style.color=s.titleColor),s.titleSize&&(isNaN(s.titleSize)?v.strong.style.fontSize=s.titleSize:v.strong.style.fontSize=s.titleSize+"px"),s.titleLineHeight&&(isNaN(s.titleSize)?v.strong.style.lineHeight=s.titleLineHeight:v.strong.style.lineHeight=s.titleLineHeight+"px")),s.message.length>0&&(v.p=document.createElement("p"),v.p.classList.add(i+"-message"),v.p.appendChild(f(s.message)),v.toastTexts.appendChild(v.p),s.messageColor&&(v.p.style.color=s.messageColor),s.messageSize&&(isNaN(s.titleSize)?v.p.style.fontSize=s.messageSize:v.p.style.fontSize=s.messageSize+"px"),s.messageLineHeight&&(isNaN(s.titleSize)?v.p.style.lineHeight=s.messageLineHeight:v.p.style.lineHeight=s.messageLineHeight+"px")),s.title.length>0&&s.message.length>0&&(s.rtl?v.strong.style.marginLeft="10px":2===s.layout||s.rtl||(v.strong.style.marginRight="10px")),v.toastBody.appendChild(v.toastTexts),s.inputs.length>0&&(v.inputs.classList.add(i+"-inputs"),h(s.inputs,function(t,e){v.inputs.appendChild(f(t[0])),(d=v.inputs.childNodes)[e].classList.add(i+"-inputs-child"),t[3]&&setTimeout(function(){d[e].focus()},300),d[e].addEventListener(t[1],function(e){var i=t[2];return i(o,v.toast,this,e)})}),v.toastBody.appendChild(v.inputs)),s.buttons.length>0&&(v.buttons.classList.add(i+"-buttons"),h(s.buttons,function(t,e){v.buttons.appendChild(f(t[0]));var n=v.buttons.childNodes;n[e].classList.add(i+"-buttons-child"),t[2]&&setTimeout(function(){n[e].focus()},300),n[e].addEventListener("click",function(e){e.preventDefault();var i=t[1];return i(o,v.toast,this,e,d)})})),v.toastBody.appendChild(v.buttons),s.message.length>0&&(s.inputs.length>0||s.buttons.length>0)&&(v.p.style.marginBottom="0"),(s.inputs.length>0||s.buttons.length>0)&&(s.rtl?v.toastTexts.style.marginLeft="10px":v.toastTexts.style.marginRight="10px",s.inputs.length>0&&s.buttons.length>0&&(s.rtl?v.inputs.style.marginLeft="8px":v.inputs.style.marginRight="8px")),v.toastCapsule.style.visibility="hidden",setTimeout(function(){var t=v.toast.offsetHeight,e=v.toast.currentStyle||window.getComputedStyle(v.toast),i=e.marginTop;i=i.split("px"),i=parseInt(i[0]);var n=e.marginBottom;n=n.split("px"),n=parseInt(n[0]),v.toastCapsule.style.visibility="",v.toastCapsule.style.height=t+n+i+"px",setTimeout(function(){v.toastCapsule.style.height="auto",s.target&&(v.toastCapsule.style.overflow="visible")},500),s.timeout&&o.progress(s,v.toast).start()},100),function(){var t=s.position;if(s.target)v.wrapper=document.querySelector(s.target),v.wrapper.classList.add(i+"-target"),s.targetFirst?v.wrapper.insertBefore(v.toastCapsule,v.wrapper.firstChild):v.wrapper.appendChild(v.toastCapsule);else{if(-1==a.indexOf(s.position))return void console.warn("["+i+"] Incorrect position.\nIt can be › "+a);t=n||window.innerWidth<=l?"bottomLeft"==s.position||"bottomRight"==s.position||"bottomCenter"==s.position?i+"-wrapper-bottomCenter":"topLeft"==s.position||"topRight"==s.position||"topCenter"==s.position?i+"-wrapper-topCenter":i+"-wrapper-center":i+"-wrapper-"+t,v.wrapper=document.querySelector("."+i+"-wrapper."+t),v.wrapper||(v.wrapper=document.createElement("div"),v.wrapper.classList.add(i+"-wrapper"),v.wrapper.classList.add(t),document.body.appendChild(v.wrapper)),"topLeft"==s.position||"topCenter"==s.position||"topRight"==s.position?v.wrapper.insertBefore(v.toastCapsule,v.wrapper.firstChild):v.wrapper.appendChild(v.toastCapsule)}isNaN(s.zindex)?console.warn("["+i+"] Invalid zIndex."):v.wrapper.style.zIndex=s.zindex}(),s.overlay&&(null!==document.querySelector("."+i+"-overlay.fadeIn")?(v.overlay=document.querySelector("."+i+"-overlay"),v.overlay.setAttribute("data-iziToast-ref",v.overlay.getAttribute("data-iziToast-ref")+","+s.ref),isNaN(s.zindex)||null===s.zindex||(v.overlay.style.zIndex=s.zindex-1)):(v.overlay.classList.add(i+"-overlay"),v.overlay.classList.add("fadeIn"),v.overlay.style.background=s.overlayColor,v.overlay.setAttribute("data-iziToast-ref",s.ref),isNaN(s.zindex)||null===s.zindex||(v.overlay.style.zIndex=s.zindex-1),document.querySelector("body").appendChild(v.overlay)),s.overlayClose?(v.overlay.removeEventListener("click",{}),v.overlay.addEventListener("click",function(t){o.hide(s,v.toast,"overlay")})):v.overlay.removeEventListener("click",{})),function(){if(s.animateInside){v.toast.classList.add(i+"-animateInside");var t=[200,100,300];"bounceInLeft"!=s.transitionIn&&"bounceInRight"!=s.transitionIn||(t=[400,200,400]),s.title.length>0&&setTimeout(function(){v.strong.classList.add("slideIn")},t[0]),s.message.length>0&&setTimeout(function(){v.p.classList.add("slideIn")},t[1]),(s.icon||s.iconUrl)&&setTimeout(function(){v.icon.classList.add("revealIn")},t[2]);var e=150;s.buttons.length>0&&v.buttons&&setTimeout(function(){h(v.buttons.childNodes,function(t,i){setTimeout(function(){t.classList.add("revealIn")},e),e+=150})},s.inputs.length>0?150:0),s.inputs.length>0&&v.inputs&&(e=150,h(v.inputs.childNodes,function(t,i){setTimeout(function(){t.classList.add("revealIn")},e),e+=150}))}}(),s.onOpening.apply(null,[s,v.toast]);try{var g=new CustomEvent(i+"-opening",{detail:s,bubbles:!0,cancelable:!0});document.dispatchEvent(g)}catch(t){console.warn(t)}setTimeout(function(){v.toast.classList.remove(i+"-opening"),v.toast.classList.add(i+"-opened");try{var t=new CustomEvent(i+"-opened",{detail:s,bubbles:!0,cancelable:!0});document.dispatchEvent(t)}catch(t){console.warn(t)}s.onOpened.apply(null,[s,v.toast])},1e3),s.drag&&(r?(v.toast.addEventListener("touchstart",function(t){m.startMoving(this,o,s,t)},!1),v.toast.addEventListener("touchend",function(t){m.stopMoving(this,t)},!1)):(v.toast.addEventListener("mousedown",function(t){t.preventDefault(),m.startMoving(this,o,s,t)},!1),v.toast.addEventListener("mouseup",function(t){t.preventDefault(),m.stopMoving(this,t)},!1))),s.closeOnEscape&&document.addEventListener("keyup",function(t){27==(t=t||window.event).keyCode&&o.hide(s,v.toast,"esc")}),s.closeOnClick&&v.toast.addEventListener("click",function(t){o.hide(s,v.toast,"toast")}),o.toast=v.toast},e}(),void 0===(s="function"==typeof n?n.apply(e,o):n)||(t.exports=s)}).call(this,i(4))},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n={get:function(t){var e=document.cookie.match("(^|;) ?"+t+"=([^;]*)(;|$)"),i=e?unescape(e[2]):e;try{i=JSON.parse(i)}catch(t){}return i},set:function(t,e){var i=arguments.length<=2||void 0===arguments[2]?{}:arguments[2],n=t+"="+escape(JSON.stringify(e))+"; path="+(i.path?escape(i.path):"/");return i.domain&&(n+="; domain="+escape(i.domain)),i.secure&&(n+="; secure"),i.expires&&(n+="; expires="+i.expires),i.live&&(n+="; expires="+o(i.live)),document.cookie=n,e},remove:function(t){var e=this.get(t);return this.set(t,e,{live:-1}),e}};function o(t){var e=new Date;return e.setDate(e.getDate()+parseInt(t)),e.setMinutes(e.getMinutes()-e.getTimezoneOffset()),e.toUTCString()}e.default=n,t.exports=e.default},function(t,e){var i;i=function(){return this}();try{i=i||new Function("return this")()}catch(t){"object"==typeof window&&(i=window)}t.exports=i},,,,function(t,e,i){"use strict";i.r(e),function(t){i(9),i(10);var e=i(3),n=i.n(e),o=i(2),s=i.n(o);t.fn.editable.defaults.mode="inline",t(function(){var t=n.a.get("toast");t&&(s.a.success({title:t,position:"topRight",timeout:3e3}),n.a.remove("toast"))}),window.delete_key=function(e){t.ajax({method:"delete",url:e,success:function(t){0==t.code?(n.a.set("toast","Delete Success!"),window.location.assign(t.data)):s.a.error({title:"Error!",message:t.error,position:"topRight"})}}),t("#fire-modal-1").modal("hide")}}.call(this,i(1))},function(t,e,i){(function(t,e){var i,n;
/*! X-editable - v1.5.3 
* In-place editing with Twitter Bootstrap, jQuery UI or pure jQuery
* http://github.com/vitalets/x-editable
* Copyright (c) 2018 Vitaliy Potapov; Licensed MIT */
!function(t){"use strict";var e=function(e,i){this.options=t.extend({},t.fn.editableform.defaults,i),this.$div=t(e),this.options.scope||(this.options.scope=this)};e.prototype={constructor:e,initInput:function(){this.input=this.options.input,this.value=this.input.str2value(this.options.value),this.input.prerender()},initTemplate:function(){this.$form=t(t.fn.editableform.template)},initButtons:function(){var e=this.$form.find(".editable-buttons");e.append(t.fn.editableform.buttons),"bottom"===this.options.showbuttons&&e.addClass("editable-buttons-bottom")},render:function(){this.$loading=t(t.fn.editableform.loading),this.$div.empty().append(this.$loading),this.initTemplate(),this.options.showbuttons?this.initButtons():this.$form.find(".editable-buttons").remove(),this.showLoading(),this.isSaving=!1,this.$div.triggerHandler("rendering"),this.initInput(),this.$form.find("div.editable-input").append(this.input.$tpl),this.$div.append(this.$form),t.when(this.input.render()).then(t.proxy(function(){if(this.options.showbuttons||this.input.autosubmit(),this.$form.find(".editable-cancel").click(t.proxy(this.cancel,this)),this.input.error)this.error(this.input.error),this.$form.find(".editable-submit").attr("disabled",!0),this.input.$input.attr("disabled",!0),this.$form.submit(function(t){t.preventDefault()});else{this.error(!1),this.input.$input.removeAttr("disabled"),this.$form.find(".editable-submit").removeAttr("disabled");var e=null===this.value||void 0===this.value||""===this.value?this.options.defaultValue:this.value;this.input.value2input(e),this.$form.submit(t.proxy(this.submit,this))}this.$div.triggerHandler("rendered"),this.showForm(),this.input.postrender&&this.input.postrender()},this))},cancel:function(){this.$div.triggerHandler("cancel")},showLoading:function(){var t,e;this.$form?(t=this.$form.outerWidth(),e=this.$form.outerHeight(),t&&this.$loading.width(t),e&&this.$loading.height(e),this.$form.hide()):(t=this.$loading.parent().width())&&this.$loading.width(t),this.$loading.show()},showForm:function(t){this.$loading.hide(),this.$form.show(),!1!==t&&this.input.activate(),this.$div.triggerHandler("show")},error:function(e){var i,n=this.$form.find(".control-group"),o=this.$form.find(".editable-error-block");if(!1===e)n.removeClass(t.fn.editableform.errorGroupClass),o.removeClass(t.fn.editableform.errorBlockClass).empty().hide();else{if(e){i=(""+e).split("\n");for(var s=0;s<i.length;s++)i[s]=t("<div>").text(i[s]).html();e=i.join("<br>")}n.addClass(t.fn.editableform.errorGroupClass),o.addClass(t.fn.editableform.errorBlockClass).html(e).show()}},submit:function(e){e.stopPropagation(),e.preventDefault();var i=this.input.input2value(),n=this.validate(i);if("object"===t.type(n)&&void 0!==n.newValue){if(i=n.newValue,this.input.value2input(i),"string"==typeof n.msg)return this.error(n.msg),void this.showForm()}else if(n)return this.error(n),void this.showForm();if(this.options.savenochange||this.input.value2str(i)!==this.input.value2str(this.value)){var o=this.input.value2submit(i);this.isSaving=!0,t.when(this.save(o)).done(t.proxy(function(t){this.isSaving=!1;var e="function"==typeof this.options.success?this.options.success.call(this.options.scope,t,i):null;return!1===e?(this.error(!1),void this.showForm(!1)):"string"==typeof e?(this.error(e),void this.showForm()):(e&&"object"==typeof e&&e.hasOwnProperty("newValue")&&(i=e.newValue),this.error(!1),this.value=i,void this.$div.triggerHandler("save",{newValue:i,submitValue:o,response:t}))},this)).fail(t.proxy(function(t){var e;this.isSaving=!1,e="function"==typeof this.options.error?this.options.error.call(this.options.scope,t,i):"string"==typeof t?t:t.responseText||t.statusText||"Unknown error!",this.error(e),this.showForm()},this))}else this.$div.triggerHandler("nochange")},save:function(e){this.options.pk=t.fn.editableutils.tryParseJson(this.options.pk,!0);var i,n="function"==typeof this.options.pk?this.options.pk.call(this.options.scope):this.options.pk;if(!!("function"==typeof this.options.url||this.options.url&&("always"===this.options.send||"auto"===this.options.send&&null!=n)))return this.showLoading(),i={name:this.options.name||"",value:e,pk:n},"function"==typeof this.options.params?i=this.options.params.call(this.options.scope,i):(this.options.params=t.fn.editableutils.tryParseJson(this.options.params,!0),t.extend(i,this.options.params)),"function"==typeof this.options.url?this.options.url.call(this.options.scope,i):t.ajax(t.extend({url:this.options.url,data:i,type:"POST"},this.options.ajaxOptions))},validate:function(t){if(void 0===t&&(t=this.value),"function"==typeof this.options.validate)return this.options.validate.call(this.options.scope,t)},option:function(t,e){t in this.options&&(this.options[t]=e),"value"===t&&this.setValue(e)},setValue:function(t,e){this.value=e?this.input.str2value(t):t,this.$form&&this.$form.is(":visible")&&this.input.value2input(this.value)}},t.fn.editableform=function(i){var n=arguments;return this.each(function(){var o=t(this),s=o.data("editableform"),r="object"==typeof i&&i;s||o.data("editableform",s=new e(this,r)),"string"==typeof i&&s[i].apply(s,Array.prototype.slice.call(n,1))})},t.fn.editableform.Constructor=e,t.fn.editableform.defaults={type:"text",url:null,params:null,name:null,pk:null,value:null,defaultValue:null,send:"auto",validate:null,success:null,error:null,ajaxOptions:null,showbuttons:!0,scope:null,savenochange:!1},t.fn.editableform.template='<form class="form-inline editableform"><div class="control-group"><div><div class="editable-input"></div><div class="editable-buttons"></div></div><div class="editable-error-block"></div></div></form>',t.fn.editableform.loading='<div class="editableform-loading"></div>',t.fn.editableform.buttons='<button type="submit" class="editable-submit">ok</button><button type="button" class="editable-cancel">cancel</button>',t.fn.editableform.errorGroupClass=null,t.fn.editableform.errorBlockClass="editable-error",t.fn.editableform.engine="jquery"}(t),function(t){"use strict";t.fn.editableutils={inherit:function(t,e){var i=function(){};i.prototype=e.prototype,t.prototype=new i,t.prototype.constructor=t,t.superclass=e.prototype},setCursorPosition:function(t,e){if(t.setSelectionRange)try{t.setSelectionRange(e,e)}catch(t){}else if(t.createTextRange){var i=t.createTextRange();i.collapse(!0),i.moveEnd("character",e),i.moveStart("character",e),i.select()}},tryParseJson:function(t,e){if("string"==typeof t&&t.length&&t.match(/^[\{\[].*[\}\]]$/))if(e)try{t=new Function("return "+t)()}catch(t){}finally{return t}else t=new Function("return "+t)();return t},sliceObj:function(e,i,n){var o,s,r={};if(!t.isArray(i)||!i.length)return r;for(var a=0;a<i.length;a++)o=i[a],e.hasOwnProperty(o)&&(r[o]=e[o]),!0!==n&&(s=o.toLowerCase(),e.hasOwnProperty(s)&&(r[o]=e[s]));return r},getConfigData:function(e){var i={};return t.each(e[0].dataset,function(t,e){("object"!=typeof e||e&&"object"==typeof e&&(e.constructor===Object||e.constructor===Array))&&(i[t]=e)}),i},objectKeys:function(t){if(Object.keys)return Object.keys(t);if(t!==Object(t))throw new TypeError("Object.keys called on a non-object");var e,i=[];for(e in t)Object.prototype.hasOwnProperty.call(t,e)&&i.push(e);return i},escape:function(e){return t("<div>").text(e).html()},itemsByValue:function(e,i,n){if(!i||null===e)return[];if("function"!=typeof n){var o=n||"value";n=function(t){return t[o]}}var s=t.isArray(e),r=[],a=this;return t.each(i,function(i,o){if(o.children)r=r.concat(a.itemsByValue(e,o.children,n));else if(s)t.grep(e,function(t){return t==(o&&"object"==typeof o?n(o):o)}).length&&r.push(o);else{var l=o&&"object"==typeof o?n(o):o;e==l&&r.push(o)}}),r},createInput:function(e){var i,n=e.type;return"date"===n&&("inline"===e.mode?t.fn.editabletypes.datefield?n="datefield":t.fn.editabletypes.dateuifield&&(n="dateuifield"):t.fn.editabletypes.date?n="date":t.fn.editabletypes.dateui&&(n="dateui"),"date"!==n||t.fn.editabletypes.date||(n="combodate")),"datetime"===n&&"inline"===e.mode&&(n="datetimefield"),"wysihtml5"!==n||t.fn.editabletypes[n]||(n="textarea"),"function"==typeof t.fn.editabletypes[n]?new(i=t.fn.editabletypes[n])(this.sliceObj(e,this.objectKeys(i.defaults))):(t.error("Unknown type: "+n),!1)},supportsTransitions:function(){var t=(document.body||document.documentElement).style,e="transition",i=["Moz","Webkit","Khtml","O","ms"];if("string"==typeof t[e])return!0;e=e.charAt(0).toUpperCase()+e.substr(1);for(var n=0;n<i.length;n++)if("string"==typeof t[i[n]+e])return!0;return!1}}}(t),function(t){"use strict";var i=function(t,e){this.init(t,e)},n=function(t,e){this.init(t,e)};i.prototype={containerName:null,containerDataName:null,innerCss:null,containerClass:"editable-container editable-popup",defaults:{},init:function(e,n){this.$element=t(e),this.options=t.extend({},t.fn.editableContainer.defaults,n),this.splitOptions(),this.formOptions.scope=this.$element[0],this.initContainer(),this.delayedHide=!1,this.$element.on("destroyed",t.proxy(function(){this.destroy()},this)),t(document).data("editable-handlers-attached")||(t(document).on("keyup.editable",function(e){27===e.which&&t(".editable-open").editableContainer("hide","cancel")}),t(document).on("click.editable",function(e){var n,o=t(e.target),s=[".editable-container",".ui-datepicker-header",".datepicker",".modal-backdrop",".bootstrap-wysihtml5-insert-image-modal",".bootstrap-wysihtml5-insert-link-modal"];if(!t(".select2-drop-mask").is(":visible")&&t.contains(document.documentElement,e.target)&&!o.is(document)){for(n=0;n<s.length;n++)if(o.is(s[n])||o.parents(s[n]).length)return;i.prototype.closeOthers(e.target)}}),t(document).data("editable-handlers-attached",!0))},splitOptions:function(){if(this.containerOptions={},this.formOptions={},!t.fn[this.containerName])throw new Error(this.containerName+" not found. Have you included corresponding js file?");for(var e in this.options)e in this.defaults?this.containerOptions[e]=this.options[e]:this.formOptions[e]=this.options[e]},tip:function(){return this.container()?this.container().$tip:null},container:function(){var t;return this.containerDataName&&(t=this.$element.data(this.containerDataName))?t:t=this.$element.data(this.containerName)},call:function(){this.$element[this.containerName].apply(this.$element,arguments)},initContainer:function(){this.call(this.containerOptions)},renderForm:function(){this.$form.editableform(this.formOptions).on({save:t.proxy(this.save,this),nochange:t.proxy(function(){this.hide("nochange")},this),cancel:t.proxy(function(){this.hide("cancel")},this),show:t.proxy(function(){this.delayedHide?(this.hide(this.delayedHide.reason),this.delayedHide=!1):this.setPosition()},this),rendering:t.proxy(this.setPosition,this),resize:t.proxy(this.setPosition,this),rendered:t.proxy(function(){this.$element.triggerHandler("shown",t(this.options.scope).data("editable"))},this)}).editableform("render")},show:function(e){this.$element.addClass("editable-open"),!1!==e&&this.closeOthers(this.$element[0]),this.innerShow(),this.tip().addClass(this.containerClass),this.$form,this.$form=t("<div>"),this.tip().is(this.innerCss)?this.tip().append(this.$form):this.tip().find(this.innerCss).append(this.$form),this.renderForm()},hide:function(t){this.tip()&&this.tip().is(":visible")&&this.$element.hasClass("editable-open")&&(this.$form.data("editableform").isSaving?this.delayedHide={reason:t}:(this.delayedHide=!1,this.$element.removeClass("editable-open"),this.innerHide(),this.$element.triggerHandler("hidden",t||"manual")))},innerShow:function(){},innerHide:function(){},toggle:function(t){this.container()&&this.tip()&&this.tip().is(":visible")?this.hide():this.show(t)},setPosition:function(){},save:function(t,e){this.$element.triggerHandler("save",e),this.hide("save")},option:function(t,e){this.options[t]=e,t in this.containerOptions?(this.containerOptions[t]=e,this.setContainerOption(t,e)):(this.formOptions[t]=e,this.$form&&this.$form.editableform("option",t,e))},setContainerOption:function(t,e){this.call("option",t,e)},destroy:function(){this.hide(),this.innerDestroy(),this.$element.off("destroyed"),this.$element.removeData("editableContainer")},innerDestroy:function(){},closeOthers:function(e){t(".editable-open").each(function(i,n){if(n!==e&&!t(n).find(e).length){var o=t(n),s=o.data("editableContainer");s&&("cancel"===s.options.onblur?o.data("editableContainer").hide("onblur"):"submit"===s.options.onblur&&o.data("editableContainer").tip().find("form").submit())}})},activate:function(){this.tip&&this.tip().is(":visible")&&this.$form&&this.$form.data("editableform").input.activate()}},t.fn.editableContainer=function(e){var o=arguments;return this.each(function(){var s=t(this),r=s.data("editableContainer"),a="object"==typeof e&&e,l="inline"===a.mode?n:i;r||s.data("editableContainer",r=new l(this,a)),"string"==typeof e&&r[e].apply(r,Array.prototype.slice.call(o,1))})},t.fn.editableContainer.Popup=i,t.fn.editableContainer.Inline=n,t.fn.editableContainer.defaults={value:null,placement:"top",autohide:!0,onblur:"cancel",anim:!1,mode:"popup"},e.event.special.destroyed={remove:function(t){t.handler&&t.handler()}}}(t),function(t){"use strict";t.extend(t.fn.editableContainer.Inline.prototype,t.fn.editableContainer.Popup.prototype,{containerName:"editableform",innerCss:".editable-inline",containerClass:"editable-container editable-inline",initContainer:function(){this.$tip=t("<span></span>"),this.options.anim||(this.options.anim=0)},splitOptions:function(){this.containerOptions={},this.formOptions=this.options},tip:function(){return this.$tip},innerShow:function(){this.$element.hide(),this.tip().insertAfter(this.$element).show()},innerHide:function(){this.$tip.hide(this.options.anim,t.proxy(function(){this.$element.show(),this.innerDestroy()},this))},innerDestroy:function(){this.tip()&&this.tip().empty().remove()}})}(t),function(t){"use strict";var e=function(e,i){this.$element=t(e),this.options=t.extend({},t.fn.editable.defaults,i,t.fn.editableutils.getConfigData(this.$element)),this.options.selector?this.initLive():this.init(),this.options.highlight&&!t.fn.editableutils.supportsTransitions()&&(this.options.highlight=!1)};e.prototype={constructor:e,init:function(){var e,i=!1;if(this.options.name=this.options.name||this.$element.attr("id"),this.options.scope=this.$element[0],this.input=t.fn.editableutils.createInput(this.options),this.input){switch(void 0===this.options.value||null===this.options.value?(this.value=this.input.html2value(t.trim(this.$element.html())),i=!0):(this.options.value=t.fn.editableutils.tryParseJson(this.options.value,!0),"string"==typeof this.options.value?this.value=this.input.str2value(this.options.value):this.value=this.options.value),this.$element.addClass("editable"),"textarea"===this.input.type&&this.$element.addClass("editable-pre-wrapped"),"manual"!==this.options.toggle?(this.$element.addClass("editable-click"),this.$element.on(this.options.toggle+".editable",t.proxy(function(t){if(this.options.disabled||t.preventDefault(),"mouseenter"===this.options.toggle)this.show();else{var e="click"!==this.options.toggle;this.toggle(e)}},this))):this.$element.attr("tabindex",-1),"function"==typeof this.options.display&&(this.options.autotext="always"),this.options.autotext){case"always":e=!0;break;case"auto":e=!t.trim(this.$element.text()).length&&null!==this.value&&void 0!==this.value&&!i;break;default:e=!1}t.when(!e||this.render()).then(t.proxy(function(){this.options.disabled?this.disable():this.enable(),this.$element.triggerHandler("init",this)},this))}},initLive:function(){var e=this.options.selector;this.options.selector=!1,this.options.autotext="never",this.$element.on(this.options.toggle+".editable",e,t.proxy(function(i){var n=t(i.target).closest(e);n.data("editable")||(n.hasClass(this.options.emptyclass)&&n.empty(),n.editable(this.options).trigger(i))},this))},render:function(t){if(!1!==this.options.display)return this.input.value2htmlFinal?this.input.value2html(this.value,this.$element[0],this.options.display,t):"function"==typeof this.options.display?this.options.display.call(this.$element[0],this.value,t):this.input.value2html(this.value,this.$element[0])},enable:function(){this.options.disabled=!1,this.$element.removeClass("editable-disabled"),this.handleEmpty(this.isEmpty),"manual"!==this.options.toggle&&"-1"===this.$element.attr("tabindex")&&this.$element.removeAttr("tabindex")},disable:function(){this.options.disabled=!0,this.hide(),this.$element.addClass("editable-disabled"),this.handleEmpty(this.isEmpty),this.$element.attr("tabindex",-1)},toggleDisabled:function(){this.options.disabled?this.enable():this.disable()},option:function(e,i){if(e&&"object"==typeof e)t.each(e,t.proxy(function(e,i){this.option(t.trim(e),i)},this));else{if(this.options[e]=i,"disabled"===e)return i?this.disable():this.enable();"value"===e&&this.setValue(i),this.container&&this.container.option(e,i),this.input.option&&this.input.option(e,i)}},handleEmpty:function(e){!1!==this.options.display&&(void 0!==e?this.isEmpty=e:"function"==typeof this.input.isEmpty?this.isEmpty=this.input.isEmpty(this.$element):this.isEmpty=""===t.trim(this.$element.html()),this.options.disabled?this.isEmpty&&(this.$element.empty(),this.options.emptyclass&&this.$element.removeClass(this.options.emptyclass)):this.isEmpty?(this.$element.html(this.options.emptytext),this.options.emptyclass&&this.$element.addClass(this.options.emptyclass)):this.options.emptyclass&&this.$element.removeClass(this.options.emptyclass))},show:function(e){if(!this.options.disabled){if(this.container){if(this.container.tip().is(":visible"))return}else{var i=t.extend({},this.options,{value:this.value,input:this.input});this.$element.editableContainer(i),this.$element.on("save.internal",t.proxy(this.save,this)),this.container=this.$element.data("editableContainer")}this.container.show(e)}},hide:function(){this.container&&this.container.hide()},toggle:function(t){this.container&&this.container.tip().is(":visible")?this.hide():this.show(t)},save:function(t,e){if(this.options.unsavedclass){var i=!1;(i=(i=(i=(i=i||"function"==typeof this.options.url)||!1===this.options.display)||void 0!==e.response)||this.options.savenochange&&this.input.value2str(this.value)!==this.input.value2str(e.newValue))?this.$element.removeClass(this.options.unsavedclass):this.$element.addClass(this.options.unsavedclass)}if(this.options.highlight){var n=this.$element,o=n.css("background-color");n.css("background-color",this.options.highlight),setTimeout(function(){"transparent"===o&&(o=""),n.css("background-color",o),n.addClass("editable-bg-transition"),setTimeout(function(){n.removeClass("editable-bg-transition")},1700)},10)}this.setValue(e.newValue,!1,e.response)},validate:function(){if("function"==typeof this.options.validate)return this.options.validate.call(this,this.value)},setValue:function(e,i,n){this.value=i?this.input.str2value(e):e,this.container&&this.container.option("value",this.value),t.when(this.render(n)).then(t.proxy(function(){this.handleEmpty()},this))},activate:function(){this.container&&this.container.activate()},destroy:function(){this.disable(),this.container&&this.container.destroy(),this.input.destroy(),"manual"!==this.options.toggle&&(this.$element.removeClass("editable-click"),this.$element.off(this.options.toggle+".editable")),this.$element.off("save.internal"),this.$element.removeClass("editable editable-open editable-disabled"),this.$element.removeData("editable")}},t.fn.editable=function(i){var n={},o=arguments,s="editable";switch(i){case"validate":return this.each(function(){var e,i=t(this).data(s);i&&(e=i.validate())&&(n[i.options.name]=e)}),n;case"getValue":return 2===arguments.length&&!0===arguments[1]?n=this.eq(0).data(s).value:this.each(function(){var e=t(this).data(s);e&&void 0!==e.value&&null!==e.value&&(n[e.options.name]=e.input.value2submit(e.value))}),n;case"submit":var r=arguments[1]||{},a=this,l=this.editable("validate");if(t.isEmptyObject(l)){var c={};if(1===a.length){var u=a.data("editable"),d={name:u.options.name||"",value:u.input.value2submit(u.value),pk:"function"==typeof u.options.pk?u.options.pk.call(u.options.scope):u.options.pk};"function"==typeof u.options.params?d=u.options.params.call(u.options.scope,d):(u.options.params=t.fn.editableutils.tryParseJson(u.options.params,!0),t.extend(d,u.options.params)),c={url:u.options.url,data:d,type:"POST"},r.success=r.success||u.options.success,r.error=r.error||u.options.error}else{var h=this.editable("getValue");c={url:r.url,data:h,type:"POST"}}c.success="function"==typeof r.success?function(t){r.success.call(a,t,r)}:t.noop,c.error="function"==typeof r.error?function(){r.error.apply(a,arguments)}:t.noop,r.ajaxOptions&&t.extend(c,r.ajaxOptions),r.data&&t.extend(c.data,r.data),t.ajax(c)}else"function"==typeof r.error&&r.error.call(a,l);return this}return this.each(function(){var n=t(this),r=n.data(s),a="object"==typeof i&&i;a&&a.selector?r=new e(this,a):(r||n.data(s,r=new e(this,a)),"string"==typeof i&&r[i].apply(r,Array.prototype.slice.call(o,1)))})},t.fn.editable.defaults={type:"text",disabled:!1,toggle:"click",emptytext:"Empty",autotext:"auto",value:null,display:null,emptyclass:"editable-empty",unsavedclass:"editable-unsaved",selector:null,highlight:"#FFFF80"}}(t),function(t){"use strict";t.fn.editabletypes={};var e=function(){};e.prototype={init:function(e,i,n){this.type=e,this.options=t.extend({},n,i)},prerender:function(){this.$tpl=t(this.options.tpl),this.$input=this.$tpl,this.$clear=null,this.error=null},render:function(){},value2html:function(e,i){t(i)[this.options.escape?"text":"html"](t.trim(e))},html2value:function(e){return t("<div>").html(e).text()},value2str:function(t){return String(t)},str2value:function(t){return t},value2submit:function(t){return t},value2input:function(t){this.$input.val(t)},input2value:function(){return this.$input.val()},activate:function(){this.$input.is(":visible")&&this.$input.focus()},clear:function(){this.$input.val(null)},escape:function(e){return t("<div>").text(e).html()},autosubmit:function(){},destroy:function(){},setClass:function(){this.options.inputclass&&this.$input.addClass(this.options.inputclass)},setAttr:function(t){void 0!==this.options[t]&&null!==this.options[t]&&this.$input.attr(t,this.options[t])},option:function(t,e){this.options[t]=e}},e.defaults={tpl:"",inputclass:null,escape:!0,scope:null,showbuttons:!0},t.extend(t.fn.editabletypes,{abstractinput:e})}(t),function(t){"use strict";var e=function(t){};t.fn.editableutils.inherit(e,t.fn.editabletypes.abstractinput),t.extend(e.prototype,{render:function(){var e=t.Deferred();return this.error=null,this.onSourceReady(function(){this.renderList(),e.resolve()},function(){this.error=this.options.sourceError,e.resolve()}),e.promise()},html2value:function(t){return null},value2html:function(e,i,n,o){var s=t.Deferred(),r=function(){"function"==typeof n?n.call(i,e,this.sourceData,o):this.value2htmlFinal(e,i),s.resolve()};return null===e?r.call(this):this.onSourceReady(r,function(){s.resolve()}),s.promise()},onSourceReady:function(e,i){var n;if(t.isFunction(this.options.source)?(n=this.options.source.call(this.options.scope),this.sourceData=null):n=this.options.source,this.options.sourceCache&&t.isArray(this.sourceData))e.call(this);else{try{n=t.fn.editableutils.tryParseJson(n,!1)}catch(t){return void i.call(this)}if("string"==typeof n){if(this.options.sourceCache){var o,s=n;if(t(document).data(s)||t(document).data(s,{}),!1===(o=t(document).data(s)).loading&&o.sourceData)return this.sourceData=o.sourceData,this.doPrepend(),void e.call(this);if(!0===o.loading)return o.callbacks.push(t.proxy(function(){this.sourceData=o.sourceData,this.doPrepend(),e.call(this)},this)),void o.err_callbacks.push(t.proxy(i,this));o.loading=!0,o.callbacks=[],o.err_callbacks=[]}var r=t.extend({url:n,type:"get",cache:!1,dataType:"json",success:t.proxy(function(n){o&&(o.loading=!1),this.sourceData=this.makeArray(n),t.isArray(this.sourceData)?(o&&(o.sourceData=this.sourceData,t.each(o.callbacks,function(){this.call()})),this.doPrepend(),e.call(this)):(i.call(this),o&&t.each(o.err_callbacks,function(){this.call()}))},this),error:t.proxy(function(){i.call(this),o&&(o.loading=!1,t.each(o.err_callbacks,function(){this.call()}))},this)},this.options.sourceOptions);t.ajax(r)}else this.sourceData=this.makeArray(n),t.isArray(this.sourceData)?(this.doPrepend(),e.call(this)):i.call(this)}},doPrepend:function(){null!==this.options.prepend&&void 0!==this.options.prepend&&(t.isArray(this.prependData)||(t.isFunction(this.options.prepend)&&(this.options.prepend=this.options.prepend.call(this.options.scope)),this.options.prepend=t.fn.editableutils.tryParseJson(this.options.prepend,!0),"string"==typeof this.options.prepend&&(this.options.prepend={"":this.options.prepend}),this.prependData=this.makeArray(this.options.prepend)),t.isArray(this.prependData)&&t.isArray(this.sourceData)&&(this.sourceData=this.prependData.concat(this.sourceData)))},renderList:function(){},value2htmlFinal:function(t,e){},makeArray:function(e){var i,n,o,s,r=[];if(!e||"string"==typeof e)return null;if(t.isArray(e)){s=function(t,e){if(n={value:t,text:e},i++>=2)return!1};for(var a=0;a<e.length;a++)"object"==typeof(o=e[a])?(i=0,t.each(o,s),1===i?r.push(n):i>1&&(o.children&&(o.children=this.makeArray(o.children)),r.push(o))):r.push({value:o,text:o})}else t.each(e,function(t,e){r.push({value:t,text:e})});return r},option:function(t,e){this.options[t]=e,"source"===t&&(this.sourceData=null),"prepend"===t&&(this.prependData=null)}}),e.defaults=t.extend({},t.fn.editabletypes.abstractinput.defaults,{source:null,prepend:!1,sourceError:"Error when loading list",sourceCache:!0,sourceOptions:null}),t.fn.editabletypes.list=e}(t),function(t){"use strict";var e=function(t){this.init("text",t,e.defaults)};t.fn.editableutils.inherit(e,t.fn.editabletypes.abstractinput),t.extend(e.prototype,{render:function(){this.renderClear(),this.setClass(),this.setAttr("placeholder")},activate:function(){this.$input.is(":visible")&&(this.$input.focus(),this.$input.is("input,textarea")&&!this.$input.is('[type="checkbox"],[type="range"]')&&t.fn.editableutils.setCursorPosition(this.$input.get(0),this.$input.val().length),this.toggleClear&&this.toggleClear())},renderClear:function(){this.options.clear&&(this.$clear=t('<span class="editable-clear-x"></span>'),this.$input.after(this.$clear).css("padding-right",24).keyup(t.proxy(function(e){if(!~t.inArray(e.keyCode,[40,38,9,13,27])){clearTimeout(this.t);var i=this;this.t=setTimeout(function(){i.toggleClear(e)},100)}},this)).parent().css("position","relative"),this.$clear.click(t.proxy(this.clear,this)))},postrender:function(){},toggleClear:function(t){if(this.$clear){var e=this.$input.val().length,i=this.$clear.is(":visible");e&&!i&&this.$clear.show(),!e&&i&&this.$clear.hide()}},clear:function(){this.$clear.hide(),this.$input.val("").focus()}}),e.defaults=t.extend({},t.fn.editabletypes.abstractinput.defaults,{tpl:'<input type="text">',placeholder:null,clear:!0}),t.fn.editabletypes.text=e}(t),function(t){"use strict";var e=function(t){this.init("textarea",t,e.defaults)};t.fn.editableutils.inherit(e,t.fn.editabletypes.abstractinput),t.extend(e.prototype,{render:function(){this.setClass(),this.setAttr("placeholder"),this.setAttr("rows"),this.$input.keydown(function(e){e.ctrlKey&&13===e.which&&t(this).closest("form").submit()})},activate:function(){t.fn.editabletypes.text.prototype.activate.call(this)}}),e.defaults=t.extend({},t.fn.editabletypes.abstractinput.defaults,{tpl:"<textarea></textarea>",inputclass:"input-large",placeholder:null,rows:7}),t.fn.editabletypes.textarea=e}(t),function(t){"use strict";var e=function(t){this.init("select",t,e.defaults)};t.fn.editableutils.inherit(e,t.fn.editabletypes.list),t.extend(e.prototype,{renderList:function(){this.$input.empty();var e=this.options.escape,i=function(n,o){var s;if(t.isArray(o))for(var r=0;r<o.length;r++)if(s={},o[r].children)s.label=o[r].text,n.append(i(t("<optgroup>",s),o[r].children));else{s.value=o[r].value,o[r].disabled&&(s.disabled=!0);var a=t("<option>",s);a[e?"text":"html"](o[r].text),n.append(a)}return n};i(this.$input,this.sourceData),this.setClass(),this.$input.on("keydown.editable",function(e){13===e.which&&t(this).closest("form").submit()})},value2htmlFinal:function(e,i){var n="",o=t.fn.editableutils.itemsByValue(e,this.sourceData);o.length&&(n=o[0].text),t.fn.editabletypes.abstractinput.prototype.value2html.call(this,n,i)},autosubmit:function(){this.$input.off("keydown.editable").on("change.editable",function(){t(this).closest("form").submit()})}}),e.defaults=t.extend({},t.fn.editabletypes.list.defaults,{tpl:"<select></select>"}),t.fn.editabletypes.select=e}(t),function(t){"use strict";var e=function(t){this.init("checklist",t,e.defaults)};t.fn.editableutils.inherit(e,t.fn.editabletypes.list),t.extend(e.prototype,{renderList:function(){var e;if(this.$tpl.empty(),t.isArray(this.sourceData)){for(var i=0;i<this.sourceData.length;i++){e=t("<label>").append(t("<input>",{type:"checkbox",value:this.sourceData[i].value}));var n=t("<span>");n[this.options.escape?"text":"html"](" "+this.sourceData[i].text),e.append(n),t("<div>").append(e).appendTo(this.$tpl)}this.$input=this.$tpl.find('input[type="checkbox"]'),this.setClass()}},value2str:function(e){return t.isArray(e)?e.sort().join(t.trim(this.options.separator)):""},str2value:function(e){var i,n=null;return"string"==typeof e&&e.length?(i=new RegExp("\\s*"+t.trim(this.options.separator)+"\\s*"),n=e.split(i)):n=t.isArray(e)?e:[e],n},value2input:function(e){this.$input.prop("checked",!1),t.isArray(e)&&e.length&&this.$input.each(function(i,n){var o=t(n);t.each(e,function(t,e){o.val()==e&&o.prop("checked",!0)})})},input2value:function(){var e=[];return this.$input.filter(":checked").each(function(i,n){e.push(t(n).val())}),e},value2htmlFinal:function(e,i){var n=[],o=t.fn.editableutils.itemsByValue(e,this.sourceData),s=this.options.escape;o.length?(t.each(o,function(e,i){var o=s?t.fn.editableutils.escape(i.text):i.text;n.push(o)}),t(i).html(n.join("<br>"))):t(i).empty()},activate:function(){this.$input.first().focus()},autosubmit:function(){this.$input.on("keydown",function(e){13===e.which&&t(this).closest("form").submit()})}}),e.defaults=t.extend({},t.fn.editabletypes.list.defaults,{tpl:'<div class="editable-checklist"></div>',inputclass:null,separator:","}),t.fn.editabletypes.checklist=e}(t),function(t){"use strict";var e=function(t){this.init("password",t,e.defaults)};t.fn.editableutils.inherit(e,t.fn.editabletypes.text),t.extend(e.prototype,{value2html:function(e,i){e?t(i).text("[hidden]"):t(i).empty()},html2value:function(t){return null}}),e.defaults=t.extend({},t.fn.editabletypes.text.defaults,{tpl:'<input type="password">'}),t.fn.editabletypes.password=e}(t),function(t){"use strict";var e=function(t){this.init("email",t,e.defaults)};t.fn.editableutils.inherit(e,t.fn.editabletypes.text),e.defaults=t.extend({},t.fn.editabletypes.text.defaults,{tpl:'<input type="email">'}),t.fn.editabletypes.email=e}(t),function(t){"use strict";var e=function(t){this.init("url",t,e.defaults)};t.fn.editableutils.inherit(e,t.fn.editabletypes.text),e.defaults=t.extend({},t.fn.editabletypes.text.defaults,{tpl:'<input type="url">'}),t.fn.editabletypes.url=e}(t),function(t){"use strict";var e=function(t){this.init("tel",t,e.defaults)};t.fn.editableutils.inherit(e,t.fn.editabletypes.text),e.defaults=t.extend({},t.fn.editabletypes.text.defaults,{tpl:'<input type="tel">'}),t.fn.editabletypes.tel=e}(t),function(t){"use strict";var e=function(t){this.init("number",t,e.defaults)};t.fn.editableutils.inherit(e,t.fn.editabletypes.text),t.extend(e.prototype,{render:function(){e.superclass.render.call(this),this.setAttr("min"),this.setAttr("max"),this.setAttr("step")},postrender:function(){this.$clear&&this.$clear.css({right:24})}}),e.defaults=t.extend({},t.fn.editabletypes.text.defaults,{tpl:'<input type="number">',inputclass:"input-mini",min:null,max:null,step:null}),t.fn.editabletypes.number=e}(t),function(t){"use strict";var e=function(t){this.init("range",t,e.defaults)};t.fn.editableutils.inherit(e,t.fn.editabletypes.number),t.extend(e.prototype,{render:function(){this.$input=this.$tpl.filter("input"),this.setClass(),this.setAttr("min"),this.setAttr("max"),this.setAttr("step"),this.$input.on("input",function(){t(this).siblings("output").text(t(this).val())})},activate:function(){this.$input.focus()}}),e.defaults=t.extend({},t.fn.editabletypes.number.defaults,{tpl:'<input type="range"><output style="width: 30px; display: inline-block"></output>',inputclass:"input-medium"}),t.fn.editabletypes.range=e}(t),function(t){"use strict";var e=function(t){this.init("time",t,e.defaults)};t.fn.editableutils.inherit(e,t.fn.editabletypes.abstractinput),t.extend(e.prototype,{render:function(){this.setClass()}}),e.defaults=t.extend({},t.fn.editabletypes.abstractinput.defaults,{tpl:'<input type="time">'}),t.fn.editabletypes.time=e}(t),function(t){"use strict";var e=function(i){if(this.init("select2",i,e.defaults),i.select2=i.select2||{},this.sourceData=null,i.placeholder&&(i.select2.placeholder=i.placeholder),!i.select2.tags&&i.source){var n=i.source;t.isFunction(i.source)&&(n=i.source.call(i.scope)),"string"==typeof n?(i.select2.ajax=i.select2.ajax||{},i.select2.ajax.data||(i.select2.ajax.data=function(t){return{query:t}}),i.select2.ajax.results||(i.select2.ajax.results=function(t){return{results:t}}),i.select2.ajax.url=n):(this.sourceData=this.convertSource(n),i.select2.data=this.sourceData)}if(this.options.select2=t.extend({},e.defaults.select2,i.select2),this.isMultiple=this.options.select2.tags||this.options.select2.multiple,this.isRemote="ajax"in this.options.select2,this.idFunc=this.options.select2.id,"function"!=typeof this.idFunc){var o=this.idFunc||"id";this.idFunc=function(t){return t[o]}}this.formatSelection=this.options.select2.formatSelection,"function"!=typeof this.formatSelection&&(this.formatSelection=function(t){return t.text})};t.fn.editableutils.inherit(e,t.fn.editabletypes.abstractinput),t.extend(e.prototype,{render:function(){this.setClass(),this.isRemote&&this.$input.on("select2-loaded",t.proxy(function(t){this.sourceData=t.items.results},this)),this.isMultiple&&this.$input.on("change",function(){t(this).closest("form").parent().triggerHandler("resize")})},value2html:function(i,n){var o,s="",r=this;this.options.select2.tags?o=i:this.sourceData&&(o=t.fn.editableutils.itemsByValue(i,this.sourceData,this.idFunc)),t.isArray(o)?(s=[],t.each(o,function(t,e){s.push(e&&"object"==typeof e?r.formatSelection(e):e)})):o&&(s=r.formatSelection(o)),s=t.isArray(s)?s.join(this.options.viewseparator):s,e.superclass.value2html.call(this,s,n)},html2value:function(t){return this.options.select2.tags?this.str2value(t,this.options.viewseparator):null},value2input:function(e){if(t.isArray(e)&&(e=e.join(this.getSeparator())),this.$input.data("select2")?this.$input.val(e).trigger("change",!0):(this.$input.val(e),this.$input.select2(this.options.select2)),this.isRemote&&!this.isMultiple&&!this.options.select2.initSelection){var i=this.options.select2.id,n=this.options.select2.formatSelection;if(!i&&!n){var o=t(this.options.scope);if(!o.data("editable").isEmpty){var s={id:e,text:o.text()};this.$input.select2("data",s)}}}},input2value:function(){return this.$input.select2("val")},str2value:function(e,i){if("string"!=typeof e||!this.isMultiple)return e;var n,o,s;if(i=i||this.getSeparator(),null===e||e.length<1)return null;for(o=0,s=(n=e.split(i)).length;o<s;o+=1)n[o]=t.trim(n[o]);return n},autosubmit:function(){this.$input.on("change",function(e,i){i||t(this).closest("form").submit()})},getSeparator:function(){return this.options.select2.separator||t.fn.select2.defaults.separator},convertSource:function(e){if(t.isArray(e)&&e.length&&void 0!==e[0].value)for(var i=0;i<e.length;i++)void 0!==e[i].value&&(e[i].id=e[i].value,delete e[i].value);return e},activate:function(){this.$input.select2("open")},destroy:function(){this.$input&&this.$input.data("select2")&&this.$input.select2("destroy")}}),e.defaults=t.extend({},t.fn.editabletypes.abstractinput.defaults,{tpl:'<input type="hidden">',select2:null,placeholder:null,source:null,viewseparator:", "}),t.fn.editabletypes.select2=e}(t),i=t,(n=function(t,e){this.$element=i(t),this.$element.is("input")?(this.options=i.extend({},i.fn.combodate.defaults,e,this.$element.data()),this.init()):i.error("Combodate should be applied to INPUT element")}).prototype={constructor:n,init:function(){this.map={day:["D","date"],month:["M","month"],year:["Y","year"],hour:["[Hh]","hours"],minute:["m","minutes"],second:["s","seconds"],ampm:["[Aa]",""]},this.$widget=i('<span class="combodate"></span>').html(this.getTemplate()),this.initCombos(),this.datetime=null,this.$widget.on("change","select",i.proxy(function(t){this.$element.val(this.getValue()).change(),this.options.smartDays&&(i(t.target).is(".month")||i(t.target).is(".year"))&&this.fillCombo("day")},this)),this.$widget.find("select").css("width","auto"),this.$element.hide().after(this.$widget),this.setValue(this.$element.val()||this.options.value)},getTemplate:function(){var t=this.options.template,e=this.$element.prop("disabled"),n=this.options.customClass;return i.each(this.map,function(e,i){i=i[0];var n=new RegExp(i+"+"),o=i.length>1?i.substring(1,2):i;t=t.replace(n,"{"+o+"}")}),t=t.replace(/ /g,"&nbsp;"),i.each(this.map,function(i,o){var s=(o=o[0]).length>1?o.substring(1,2):o;t=t.replace("{"+s+"}",'<select class="'+i+" "+n+'"'+(e?' disabled="disabled"':"")+"></select>")}),t},initCombos:function(){for(var t in this.map){var e=this.$widget.find("."+t);this["$"+t]=e.length?e:null,this.fillCombo(t)}},fillCombo:function(t){var e=this["$"+t];if(e){var i=this["fill"+t.charAt(0).toUpperCase()+t.slice(1)](),n=e.val();e.empty();for(var o=0;o<i.length;o++)e.append('<option value="'+i[o][0]+'">'+i[o][1]+"</option>");e.val(n)}},fillCommon:function(t){var e,i=[];if("name"===this.options.firstItem){var n="function"==typeof(e=moment.localeData?moment.localeData()._relativeTime:moment.relativeTime||moment.langData()._relativeTime)[t]?e[t](1,!0,t,!1):e[t];n=n.split(" ").reverse()[0],i.push(["",n])}else"empty"===this.options.firstItem&&i.push(["",""]);return i},fillDay:function(){var t,e,i=this.fillCommon("d"),n=-1!==this.options.template.indexOf("DD"),o=31;if(this.options.smartDays&&this.$month&&this.$year){var s=parseInt(this.$month.val(),10),r=parseInt(this.$year.val(),10);isNaN(s)||isNaN(r)||(o=moment([r,s]).daysInMonth())}for(e=1;e<=o;e++)t=n?this.leadZero(e):e,i.push([e,t]);return i},fillMonth:function(){var t,e,i=this.fillCommon("M"),n=-1!==this.options.template.indexOf("MMMMMM"),o=-1!==this.options.template.indexOf("MMMMM"),s=-1!==this.options.template.indexOf("MMMM"),r=-1!==this.options.template.indexOf("MMM"),a=-1!==this.options.template.indexOf("MM");for(e=0;e<=11;e++)t=n?moment().date(1).month(e).format("MM - MMMM"):o?moment().date(1).month(e).format("MM - MMM"):s?moment().date(1).month(e).format("MMMM"):r?moment().date(1).month(e).format("MMM"):a?this.leadZero(e+1):e+1,i.push([e,t]);return i},fillYear:function(){var t,e,i=[],n=-1!==this.options.template.indexOf("YYYY");for(e=this.options.maxYear;e>=this.options.minYear;e--)t=n?e:(e+"").substring(2),i[this.options.yearDescending?"push":"unshift"]([e,t]);return i=this.fillCommon("y").concat(i)},fillHour:function(){var t,e,i=this.fillCommon("h"),n=-1!==this.options.template.indexOf("h"),o=(this.options.template.indexOf("H"),-1!==this.options.template.toLowerCase().indexOf("hh")),s=n?12:23;for(e=n?1:0;e<=s;e++)t=o?this.leadZero(e):e,i.push([e,t]);return i},fillMinute:function(){var t,e,i=this.fillCommon("m"),n=-1!==this.options.template.indexOf("mm");for(e=0;e<=59;e+=this.options.minuteStep)t=n?this.leadZero(e):e,i.push([e,t]);return i},fillSecond:function(){var t,e,i=this.fillCommon("s"),n=-1!==this.options.template.indexOf("ss");for(e=0;e<=59;e+=this.options.secondStep)t=n?this.leadZero(e):e,i.push([e,t]);return i},fillAmpm:function(){var t=-1!==this.options.template.indexOf("a");return this.options.template.indexOf("A"),[["am",t?"am":"AM"],["pm",t?"pm":"PM"]]},getValue:function(t){var e,n={},o=this,s=!1;return i.each(this.map,function(t,e){var i;if("ampm"!==t)return o["$"+t]?n[t]=parseInt(o["$"+t].val(),10):(i=o.datetime?o.datetime[e[1]]():"day"===t?1:0,n[t]=i),isNaN(n[t])?(s=!0,!1):void 0}),s?"":(this.$ampm&&(12===n.hour?n.hour="am"===this.$ampm.val()?0:12:n.hour="am"===this.$ampm.val()?n.hour:n.hour+12),e=moment([n.year,n.month,n.day,n.hour,n.minute,n.second]),this.highlight(e),null===(t=void 0===t?this.options.format:t)?e.isValid()?e:null:e.isValid()?e.format(t):"")},setValue:function(t){if(t){var e="string"==typeof t?moment(t,this.options.format,!0):moment(t),n=this,o={};e.isValid()?(i.each(this.map,function(t,i){"ampm"!==t&&(o[t]=e[i[1]]())}),this.$ampm&&(o.hour>=12?(o.ampm="pm",o.hour>12&&(o.hour-=12)):(o.ampm="am",0===o.hour&&(o.hour=12))),i.each(o,function(t,e){n["$"+t]&&("minute"===t&&n.options.minuteStep>1&&n.options.roundTime&&(e=s(n["$"+t],e)),"second"===t&&n.options.secondStep>1&&n.options.roundTime&&(e=s(n["$"+t],e)),n["$"+t].val(e))}),this.options.smartDays&&this.fillCombo("day"),this.$element.val(e.format(this.options.format)).change(),this.datetime=e):this.datetime=null}function s(t,e){var n={};return t.children("option").each(function(t,o){var s,r=i(o).attr("value");""!==r&&(s=Math.abs(r-e),(void 0===n.distance||s<n.distance)&&(n={value:r,distance:s}))}),n.value}},highlight:function(t){t.isValid()?this.options.errorClass?this.$widget.removeClass(this.options.errorClass):this.$widget.find("select").css("border-color",this.borderColor):this.options.errorClass?this.$widget.addClass(this.options.errorClass):(this.borderColor||(this.borderColor=this.$widget.find("select").css("border-color")),this.$widget.find("select").css("border-color","red"))},leadZero:function(t){return t<=9?"0"+t:t},destroy:function(){this.$widget.remove(),this.$element.removeData("combodate").show()}},i.fn.combodate=function(t){var e,o=Array.apply(null,arguments);return o.shift(),"getValue"===t&&this.length&&(e=this.eq(0).data("combodate"))?e.getValue.apply(e,o):this.each(function(){var e=i(this),s=e.data("combodate"),r="object"==typeof t&&t;s||e.data("combodate",s=new n(this,r)),"string"==typeof t&&"function"==typeof s[t]&&s[t].apply(s,o)})},i.fn.combodate.defaults={format:"DD-MM-YYYY HH:mm",template:"D / MMM / YYYY   H : mm",value:null,minYear:1970,maxYear:(new Date).getFullYear(),yearDescending:!0,minuteStep:5,secondStep:1,firstItem:"empty",errorClass:null,customClass:"",roundTime:!0,smartDays:!1},function(t){"use strict";var e=function(i){this.init("combodate",i,e.defaults),this.options.viewformat||(this.options.viewformat=this.options.format),i.combodate=t.fn.editableutils.tryParseJson(i.combodate,!0),this.options.combodate=t.extend({},e.defaults.combodate,i.combodate,{format:this.options.format,template:this.options.template})};t.fn.editableutils.inherit(e,t.fn.editabletypes.abstractinput),t.extend(e.prototype,{render:function(){this.$input.combodate(this.options.combodate),"bs3"===t.fn.editableform.engine&&this.$input.siblings().find("select").addClass("form-control"),this.options.inputclass&&this.$input.siblings().find("select").addClass(this.options.inputclass)},value2html:function(t,i){var n=t?t.format(this.options.viewformat):"";e.superclass.value2html.call(this,n,i)},html2value:function(t){return t?moment(t,this.options.viewformat):null},value2str:function(t){return t?t.format(this.options.format):""},str2value:function(t){return t?moment(t,this.options.format):null},value2submit:function(t){return this.value2str(t)},value2input:function(t){this.$input.combodate("setValue",t)},input2value:function(){return this.$input.combodate("getValue",null)},activate:function(){this.$input.siblings(".combodate").find("select").eq(0).focus()},autosubmit:function(){}}),e.defaults=t.extend({},t.fn.editabletypes.abstractinput.defaults,{tpl:'<input type="text">',inputclass:null,format:"YYYY-MM-DD",viewformat:null,template:"D / MMM / YYYY",combodate:null}),t.fn.editabletypes.combodate=e}(t),function(t){"use strict";var e=t.fn.editableform.Constructor.prototype.initInput;t.extend(t.fn.editableform.Constructor.prototype,{initTemplate:function(){this.$form=t(t.fn.editableform.template),this.$form.find(".control-group").addClass("form-group"),this.$form.find(".editable-error-block").addClass("help-block")},initInput:function(){e.apply(this);var i=null===this.input.options.inputclass||!1===this.input.options.inputclass,n="text,select,textarea,password,email,url,tel,number,range,time,typeaheadjs".split(",");~t.inArray(this.input.type,n)&&(this.input.$input.addClass("form-control"),i&&(this.input.options.inputclass="form-control-sm",this.input.$input.addClass("form-control-sm")));for(var o=this.$form.find(".editable-buttons"),s=i?["form-control-sm"]:this.input.options.inputclass.split(" "),r=0;r<s.length;r++)"input-lg"===s[r].toLowerCase()&&o.find("button").removeClass("btn-sm").addClass("btn-lg")}}),t.fn.editableform.buttons='<button type="submit" class="btn btn-primary btn-sm editable-submit"><i class="fa fa-check" aria-hidden="true"></i></button><button type="button" class="btn btn-default btn-sm editable-cancel"><i class="fa fa-times" aria-hidden="true"></i></button>',t.fn.editableform.errorGroupClass="has-error",t.fn.editableform.errorBlockClass=null,t.fn.editableform.engine="bs4"}(t),function(t){"use strict";t.extend(t.fn.editableContainer.Popup.prototype,{containerName:"popover",containerDataName:"bs.popover",innerCss:".popover-body",defaults:t.fn.popover.Constructor.DEFAULTS,initContainer:function(){var e;t.extend(this.containerOptions,{trigger:"manual",selector:!1,content:" ",template:this.defaults.template}),this.$element.data("template")&&(e=this.$element.data("template"),this.$element.removeData("template")),this.call(this.containerOptions),e&&this.$element.data("template",e)},innerShow:function(){this.call("show")},innerHide:function(){this.call("hide")},innerDestroy:function(){this.call("dispose")},setContainerOption:function(t,e){this.container().options[t]=e},setPosition:function(){(function(){}).call(this.container())},tip:function(){return this.container()?t(this.container().tip):null}})}(t),function(t){function e(){return new Date(Date.UTC.apply(Date,arguments))}var i=function(e,i){this._process_options(i),this.element=t(e),this.isInline=!1,this.isInput=this.element.is("input"),this.component=!!this.element.is(".date")&&this.element.find(".add-on, .btn"),this.hasInput=this.component&&this.element.find("input").length,this.component&&0===this.component.length&&(this.component=!1),this.picker=t(d.template),this._buildEvents(),this._attachEvents(),this.isInline?this.picker.addClass("datepicker-inline").appendTo(this.element):this.picker.addClass("datepicker-dropdown dropdown-menu"),this.o.rtl&&(this.picker.addClass("datepicker-rtl"),this.picker.find(".prev i, .next i").toggleClass("icon-arrow-left icon-arrow-right")),this.viewMode=this.o.startView,this.o.calendarWeeks&&this.picker.find("tfoot th.today").attr("colspan",function(t,e){return parseInt(e)+1}),this._allow_update=!1,this.setStartDate(this.o.startDate),this.setEndDate(this.o.endDate),this.setDaysOfWeekDisabled(this.o.daysOfWeekDisabled),this.fillDow(),this.fillMonths(),this._allow_update=!0,this.update(),this.showMode(),this.isInline&&this.show()};i.prototype={constructor:i,_process_options:function(e){this._o=t.extend({},this._o,e);var i=this.o=t.extend({},this._o),n=i.language;switch(u[n]||(n=n.split("-")[0],u[n]||(n=l.language)),i.language=n,i.startView){case 2:case"decade":i.startView=2;break;case 1:case"year":i.startView=1;break;default:i.startView=0}switch(i.minViewMode){case 1:case"months":i.minViewMode=1;break;case 2:case"years":i.minViewMode=2;break;default:i.minViewMode=0}i.startView=Math.max(i.startView,i.minViewMode),i.weekStart%=7,i.weekEnd=(i.weekStart+6)%7;var o=d.parseFormat(i.format);i.startDate!==-1/0&&(i.startDate=d.parseDate(i.startDate,o,i.language)),i.endDate!==1/0&&(i.endDate=d.parseDate(i.endDate,o,i.language)),i.daysOfWeekDisabled=i.daysOfWeekDisabled||[],t.isArray(i.daysOfWeekDisabled)||(i.daysOfWeekDisabled=i.daysOfWeekDisabled.split(/[,\s]*/)),i.daysOfWeekDisabled=t.map(i.daysOfWeekDisabled,function(t){return parseInt(t,10)})},_events:[],_secondaryEvents:[],_applyEvents:function(t){for(var e,i,n=0;n<t.length;n++)e=t[n][0],i=t[n][1],e.on(i)},_unapplyEvents:function(t){for(var e,i,n=0;n<t.length;n++)e=t[n][0],i=t[n][1],e.off(i)},_buildEvents:function(){this.isInput?this._events=[[this.element,{focus:t.proxy(this.show,this),keyup:t.proxy(this.update,this),keydown:t.proxy(this.keydown,this)}]]:this.component&&this.hasInput?this._events=[[this.element.find("input"),{focus:t.proxy(this.show,this),keyup:t.proxy(this.update,this),keydown:t.proxy(this.keydown,this)}],[this.component,{click:t.proxy(this.show,this)}]]:this.element.is("div")?this.isInline=!0:this._events=[[this.element,{click:t.proxy(this.show,this)}]],this._secondaryEvents=[[this.picker,{click:t.proxy(this.click,this)}],[t(window),{resize:t.proxy(this.place,this)}],[t(document),{mousedown:t.proxy(function(t){this.element.is(t.target)||this.element.find(t.target).size()||this.picker.is(t.target)||this.picker.find(t.target).size()||this.hide()},this)}]]},_attachEvents:function(){this._detachEvents(),this._applyEvents(this._events)},_detachEvents:function(){this._unapplyEvents(this._events)},_attachSecondaryEvents:function(){this._detachSecondaryEvents(),this._applyEvents(this._secondaryEvents)},_detachSecondaryEvents:function(){this._unapplyEvents(this._secondaryEvents)},_trigger:function(e,i){var n=i||this.date,o=new Date(n.getTime()+6e4*n.getTimezoneOffset());this.element.trigger({type:e,date:o,format:t.proxy(function(t){var e=t||this.o.format;return d.formatDate(n,e,this.o.language)},this)})},show:function(t){this.isInline||this.picker.appendTo("body"),this.picker.show(),this.height=this.component?this.component.outerHeight():this.element.outerHeight(),this.place(),this._attachSecondaryEvents(),t&&t.preventDefault(),this._trigger("show")},hide:function(t){this.isInline||this.picker.is(":visible")&&(this.picker.hide().detach(),this._detachSecondaryEvents(),this.viewMode=this.o.startView,this.showMode(),this.o.forceParse&&(this.isInput&&this.element.val()||this.hasInput&&this.element.find("input").val())&&this.setValue(),this._trigger("hide"))},remove:function(){this.hide(),this._detachEvents(),this._detachSecondaryEvents(),this.picker.remove(),delete this.element.data().datepicker,this.isInput||delete this.element.data().date},getDate:function(){var t=this.getUTCDate();return new Date(t.getTime()+6e4*t.getTimezoneOffset())},getUTCDate:function(){return this.date},setDate:function(t){this.setUTCDate(new Date(t.getTime()-6e4*t.getTimezoneOffset()))},setUTCDate:function(t){this.date=t,this.setValue()},setValue:function(){var t=this.getFormattedDate();this.isInput?this.element.val(t):this.component&&this.element.find("input").val(t)},getFormattedDate:function(t){return void 0===t&&(t=this.o.format),d.formatDate(this.date,t,this.o.language)},setStartDate:function(t){this._process_options({startDate:t}),this.update(),this.updateNavArrows()},setEndDate:function(t){this._process_options({endDate:t}),this.update(),this.updateNavArrows()},setDaysOfWeekDisabled:function(t){this._process_options({daysOfWeekDisabled:t}),this.update(),this.updateNavArrows()},place:function(){if(!this.isInline){var e=parseInt(this.element.parents().filter(function(){return"auto"!=t(this).css("z-index")}).first().css("z-index"))+10,i=this.component?this.component.parent().offset():this.element.offset(),n=this.component?this.component.outerHeight(!0):this.element.outerHeight(!0);this.picker.css({top:i.top+n,left:i.left,zIndex:e})}},_allow_update:!0,update:function(){if(this._allow_update){var t,e=!1;arguments&&arguments.length&&("string"==typeof arguments[0]||arguments[0]instanceof Date)?(t=arguments[0],e=!0):(t=this.isInput?this.element.val():this.element.data("date")||this.element.find("input").val(),delete this.element.data().date),this.date=d.parseDate(t,this.o.format,this.o.language),e&&this.setValue(),this.date<this.o.startDate?this.viewDate=new Date(this.o.startDate):this.date>this.o.endDate?this.viewDate=new Date(this.o.endDate):this.viewDate=new Date(this.date),this.fill()}},fillDow:function(){var t=this.o.weekStart,e="<tr>";if(this.o.calendarWeeks){var i='<th class="cw">&nbsp;</th>';e+=i,this.picker.find(".datepicker-days thead tr:first-child").prepend(i)}for(;t<this.o.weekStart+7;)e+='<th class="dow">'+u[this.o.language].daysMin[t++%7]+"</th>";e+="</tr>",this.picker.find(".datepicker-days thead").append(e)},fillMonths:function(){for(var t="",e=0;e<12;)t+='<span class="month">'+u[this.o.language].monthsShort[e++]+"</span>";this.picker.find(".datepicker-months td").html(t)},setRange:function(e){e&&e.length?this.range=t.map(e,function(t){return t.valueOf()}):delete this.range,this.fill()},getClassNames:function(e){var i=[],n=this.viewDate.getUTCFullYear(),o=this.viewDate.getUTCMonth(),s=this.date.valueOf(),r=new Date;return e.getUTCFullYear()<n||e.getUTCFullYear()==n&&e.getUTCMonth()<o?i.push("old"):(e.getUTCFullYear()>n||e.getUTCFullYear()==n&&e.getUTCMonth()>o)&&i.push("new"),this.o.todayHighlight&&e.getUTCFullYear()==r.getFullYear()&&e.getUTCMonth()==r.getMonth()&&e.getUTCDate()==r.getDate()&&i.push("today"),s&&e.valueOf()==s&&i.push("active"),(e.valueOf()<this.o.startDate||e.valueOf()>this.o.endDate||-1!==t.inArray(e.getUTCDay(),this.o.daysOfWeekDisabled))&&i.push("disabled"),this.range&&(e>this.range[0]&&e<this.range[this.range.length-1]&&i.push("range"),-1!=t.inArray(e.valueOf(),this.range)&&i.push("selected")),i},fill:function(){var i,n=new Date(this.viewDate),o=n.getUTCFullYear(),s=n.getUTCMonth(),r=this.o.startDate!==-1/0?this.o.startDate.getUTCFullYear():-1/0,a=this.o.startDate!==-1/0?this.o.startDate.getUTCMonth():-1/0,l=this.o.endDate!==1/0?this.o.endDate.getUTCFullYear():1/0,c=this.o.endDate!==1/0?this.o.endDate.getUTCMonth():1/0;this.date&&this.date.valueOf();this.picker.find(".datepicker-days thead th.datepicker-switch").text(u[this.o.language].months[s]+" "+o),this.picker.find("tfoot th.today").text(u[this.o.language].today).toggle(!1!==this.o.todayBtn),this.picker.find("tfoot th.clear").text(u[this.o.language].clear).toggle(!1!==this.o.clearBtn),this.updateNavArrows(),this.fillMonths();var h=e(o,s-1,28,0,0,0,0),p=d.getDaysInMonth(h.getUTCFullYear(),h.getUTCMonth());h.setUTCDate(p),h.setUTCDate(p-(h.getUTCDay()-this.o.weekStart+7)%7);var f=new Date(h);f.setUTCDate(f.getUTCDate()+42),f=f.valueOf();for(var m,v=[];h.valueOf()<f;){if(h.getUTCDay()==this.o.weekStart&&(v.push("<tr>"),this.o.calendarWeeks)){var g=new Date(+h+(this.o.weekStart-h.getUTCDay()-7)%7*864e5),y=new Date(+g+(11-g.getUTCDay())%7*864e5),b=new Date(+(b=e(y.getUTCFullYear(),0,1))+(11-b.getUTCDay())%7*864e5),w=(y-b)/864e5/7+1;v.push('<td class="cw">'+w+"</td>")}(m=this.getClassNames(h)).push("day");var x=this.o.beforeShowDay(h);void 0===x?x={}:"boolean"==typeof x?x={enabled:x}:"string"==typeof x&&(x={classes:x}),!1===x.enabled&&m.push("disabled"),x.classes&&(m=m.concat(x.classes.split(/\s+/))),x.tooltip&&(i=x.tooltip),m=t.unique(m),v.push('<td class="'+m.join(" ")+'"'+(i?' title="'+i+'"':"")+">"+h.getUTCDate()+"</td>"),h.getUTCDay()==this.o.weekEnd&&v.push("</tr>"),h.setUTCDate(h.getUTCDate()+1)}this.picker.find(".datepicker-days tbody").empty().append(v.join(""));var T=this.date&&this.date.getUTCFullYear(),k=this.picker.find(".datepicker-months").find("th:eq(1)").text(o).end().find("span").removeClass("active");T&&T==o&&k.eq(this.date.getUTCMonth()).addClass("active"),(o<r||o>l)&&k.addClass("disabled"),o==r&&k.slice(0,a).addClass("disabled"),o==l&&k.slice(c+1).addClass("disabled"),v="",o=10*parseInt(o/10,10);var C=this.picker.find(".datepicker-years").find("th:eq(1)").text(o+"-"+(o+9)).end().find("td");o-=1;for(var S=-1;S<11;S++)v+='<span class="year'+(-1==S?" old":10==S?" new":"")+(T==o?" active":"")+(o<r||o>l?" disabled":"")+'">'+o+"</span>",o+=1;C.html(v)},updateNavArrows:function(){if(this._allow_update){var t=new Date(this.viewDate),e=t.getUTCFullYear(),i=t.getUTCMonth();switch(this.viewMode){case 0:this.o.startDate!==-1/0&&e<=this.o.startDate.getUTCFullYear()&&i<=this.o.startDate.getUTCMonth()?this.picker.find(".prev").css({visibility:"hidden"}):this.picker.find(".prev").css({visibility:"visible"}),this.o.endDate!==1/0&&e>=this.o.endDate.getUTCFullYear()&&i>=this.o.endDate.getUTCMonth()?this.picker.find(".next").css({visibility:"hidden"}):this.picker.find(".next").css({visibility:"visible"});break;case 1:case 2:this.o.startDate!==-1/0&&e<=this.o.startDate.getUTCFullYear()?this.picker.find(".prev").css({visibility:"hidden"}):this.picker.find(".prev").css({visibility:"visible"}),this.o.endDate!==1/0&&e>=this.o.endDate.getUTCFullYear()?this.picker.find(".next").css({visibility:"hidden"}):this.picker.find(".next").css({visibility:"visible"})}}},click:function(i){i.preventDefault();var n=t(i.target).closest("span, td, th");if(1==n.length)switch(n[0].nodeName.toLowerCase()){case"th":switch(n[0].className){case"datepicker-switch":this.showMode(1);break;case"prev":case"next":var o=d.modes[this.viewMode].navStep*("prev"==n[0].className?-1:1);switch(this.viewMode){case 0:this.viewDate=this.moveMonth(this.viewDate,o);break;case 1:case 2:this.viewDate=this.moveYear(this.viewDate,o)}this.fill();break;case"today":var s=new Date;s=e(s.getFullYear(),s.getMonth(),s.getDate(),0,0,0),this.showMode(-2);var r="linked"==this.o.todayBtn?null:"view";this._setDate(s,r);break;case"clear":var a;this.isInput?a=this.element:this.component&&(a=this.element.find("input")),a&&a.val("").change(),this._trigger("changeDate"),this.update(),this.o.autoclose&&this.hide()}break;case"span":if(!n.is(".disabled")){if(this.viewDate.setUTCDate(1),n.is(".month")){var l=1,c=n.parent().find("span").index(n),u=this.viewDate.getUTCFullYear();this.viewDate.setUTCMonth(c),this._trigger("changeMonth",this.viewDate),1===this.o.minViewMode&&this._setDate(e(u,c,l,0,0,0,0))}else{u=parseInt(n.text(),10)||0,l=1,c=0;this.viewDate.setUTCFullYear(u),this._trigger("changeYear",this.viewDate),2===this.o.minViewMode&&this._setDate(e(u,c,l,0,0,0,0))}this.showMode(-1),this.fill()}break;case"td":if(n.is(".day")&&!n.is(".disabled")){l=parseInt(n.text(),10)||1,u=this.viewDate.getUTCFullYear(),c=this.viewDate.getUTCMonth();n.is(".old")?0===c?(c=11,u-=1):c-=1:n.is(".new")&&(11==c?(c=0,u+=1):c+=1),this._setDate(e(u,c,l,0,0,0,0))}}},_setDate:function(t,e){var i;e&&"date"!=e||(this.date=new Date(t)),e&&"view"!=e||(this.viewDate=new Date(t)),this.fill(),this.setValue(),this._trigger("changeDate"),this.isInput?i=this.element:this.component&&(i=this.element.find("input")),i&&(i.change(),!this.o.autoclose||e&&"date"!=e||this.hide())},moveMonth:function(t,e){if(!e)return t;var i,n,o=new Date(t.valueOf()),s=o.getUTCDate(),r=o.getUTCMonth(),a=Math.abs(e);if(e=e>0?1:-1,1==a)n=-1==e?function(){return o.getUTCMonth()==r}:function(){return o.getUTCMonth()!=i},i=r+e,o.setUTCMonth(i),(i<0||i>11)&&(i=(i+12)%12);else{for(var l=0;l<a;l++)o=this.moveMonth(o,e);i=o.getUTCMonth(),o.setUTCDate(s),n=function(){return i!=o.getUTCMonth()}}for(;n();)o.setUTCDate(--s),o.setUTCMonth(i);return o},moveYear:function(t,e){return this.moveMonth(t,12*e)},dateWithinRange:function(t){return t>=this.o.startDate&&t<=this.o.endDate},keydown:function(t){if(this.picker.is(":not(:visible)"))27==t.keyCode&&this.show();else{var e,i,n,o,s=!1;switch(t.keyCode){case 27:this.hide(),t.preventDefault();break;case 37:case 39:if(!this.o.keyboardNavigation)break;e=37==t.keyCode?-1:1,t.ctrlKey?(i=this.moveYear(this.date,e),n=this.moveYear(this.viewDate,e)):t.shiftKey?(i=this.moveMonth(this.date,e),n=this.moveMonth(this.viewDate,e)):((i=new Date(this.date)).setUTCDate(this.date.getUTCDate()+e),(n=new Date(this.viewDate)).setUTCDate(this.viewDate.getUTCDate()+e)),this.dateWithinRange(i)&&(this.date=i,this.viewDate=n,this.setValue(),this.update(),t.preventDefault(),s=!0);break;case 38:case 40:if(!this.o.keyboardNavigation)break;e=38==t.keyCode?-1:1,t.ctrlKey?(i=this.moveYear(this.date,e),n=this.moveYear(this.viewDate,e)):t.shiftKey?(i=this.moveMonth(this.date,e),n=this.moveMonth(this.viewDate,e)):((i=new Date(this.date)).setUTCDate(this.date.getUTCDate()+7*e),(n=new Date(this.viewDate)).setUTCDate(this.viewDate.getUTCDate()+7*e)),this.dateWithinRange(i)&&(this.date=i,this.viewDate=n,this.setValue(),this.update(),t.preventDefault(),s=!0);break;case 13:this.hide(),t.preventDefault();break;case 9:this.hide()}if(s)this._trigger("changeDate"),this.isInput?o=this.element:this.component&&(o=this.element.find("input")),o&&o.change()}},showMode:function(t){t&&(this.viewMode=Math.max(this.o.minViewMode,Math.min(2,this.viewMode+t))),this.picker.find(">div").hide().filter(".datepicker-"+d.modes[this.viewMode].clsName).css("display","block"),this.updateNavArrows()}};var n=function(e,i){this.element=t(e),this.inputs=t.map(i.inputs,function(t){return t.jquery?t[0]:t}),delete i.inputs,t(this.inputs).datepicker(i).bind("changeDate",t.proxy(this.dateUpdated,this)),this.pickers=t.map(this.inputs,function(e){return t(e).data("datepicker")}),this.updateDates()};function o(e,i){var n=t(e).data(),o={},s=new RegExp("^"+i.toLowerCase()+"([A-Z])");i=new RegExp("^"+i.toLowerCase());for(var r in n)i.test(r)&&(o[r.replace(s,function(t,e){return e.toLowerCase()})]=n[r]);return o}function s(e){var i={};if(u[e]||(e=e.split("-")[0],u[e])){var n=u[e];return t.each(c,function(t,e){e in n&&(i[e]=n[e])}),i}}n.prototype={updateDates:function(){this.dates=t.map(this.pickers,function(t){return t.date}),this.updateRanges()},updateRanges:function(){var e=t.map(this.dates,function(t){return t.valueOf()});t.each(this.pickers,function(t,i){i.setRange(e)})},dateUpdated:function(e){var i=t(e.target).data("datepicker").getUTCDate(),n=t.inArray(e.target,this.inputs),o=this.inputs.length;if(-1!=n){if(i<this.dates[n])for(;n>=0&&i<this.dates[n];)this.pickers[n--].setUTCDate(i);else if(i>this.dates[n])for(;n<o&&i>this.dates[n];)this.pickers[n++].setUTCDate(i);this.updateDates()}},remove:function(){t.map(this.pickers,function(t){t.remove()}),delete this.element.data().datepicker}};var r=t.fn.datepicker,a=t.fn.datepicker=function(e){var r,a=Array.apply(null,arguments);return a.shift(),this.each(function(){var c=t(this),u=c.data("datepicker"),d="object"==typeof e&&e;if(!u){var h=o(this,"date"),p=s(t.extend({},l,h,d).language),f=t.extend({},l,p,h,d);if(c.is(".input-daterange")||f.inputs){var m={inputs:f.inputs||c.find("input").toArray()};c.data("datepicker",u=new n(this,t.extend(f,m)))}else c.data("datepicker",u=new i(this,f))}if("string"==typeof e&&"function"==typeof u[e]&&void 0!==(r=u[e].apply(u,a)))return!1}),void 0!==r?r:this},l=t.fn.datepicker.defaults={autoclose:!1,beforeShowDay:t.noop,calendarWeeks:!1,clearBtn:!1,daysOfWeekDisabled:[],endDate:1/0,forceParse:!0,format:"mm/dd/yyyy",keyboardNavigation:!0,language:"en",minViewMode:0,rtl:!1,startDate:-1/0,startView:0,todayBtn:!1,todayHighlight:!1,weekStart:0},c=t.fn.datepicker.locale_opts=["format","rtl","weekStart"];t.fn.datepicker.Constructor=i;var u=t.fn.datepicker.dates={en:{days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],daysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat","Sun"],daysMin:["Su","Mo","Tu","We","Th","Fr","Sa","Su"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],monthsShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],today:"Today",clear:"Clear"}},d={modes:[{clsName:"days",navFnc:"Month",navStep:1},{clsName:"months",navFnc:"FullYear",navStep:1},{clsName:"years",navFnc:"FullYear",navStep:10}],isLeapYear:function(t){return t%4==0&&t%100!=0||t%400==0},getDaysInMonth:function(t,e){return[31,d.isLeapYear(t)?29:28,31,30,31,30,31,31,30,31,30,31][e]},validParts:/dd?|DD?|mm?|MM?|yy(?:yy)?/g,nonpunctuation:/[^ -\/:-@\[\u3400-\u9fff-`{-~\t\n\r]+/g,parseFormat:function(t){var e=t.replace(this.validParts,"\0").split("\0"),i=t.match(this.validParts);if(!e||!e.length||!i||0===i.length)throw new Error("Invalid date format.");return{separators:e,parts:i}},parseDate:function(n,o,s){if(n instanceof Date)return n;if("string"==typeof o&&(o=d.parseFormat(o)),/^[\-+]\d+[dmwy]([\s,]+[\-+]\d+[dmwy])*$/.test(n)){var r,a=/([\-+]\d+)([dmwy])/,l=n.match(/([\-+]\d+)([dmwy])/g);n=new Date;for(var c=0;c<l.length;c++)switch(f=a.exec(l[c]),r=parseInt(f[1]),f[2]){case"d":n.setUTCDate(n.getUTCDate()+r);break;case"m":n=i.prototype.moveMonth.call(i.prototype,n,r);break;case"w":n.setUTCDate(n.getUTCDate()+7*r);break;case"y":n=i.prototype.moveYear.call(i.prototype,n,r)}return e(n.getUTCFullYear(),n.getUTCMonth(),n.getUTCDate(),0,0,0)}l=n&&n.match(this.nonpunctuation)||[],n=new Date;var h,p,f,m={},v=["yyyy","yy","M","MM","m","mm","d","dd"],g={yyyy:function(t,e){return t.setUTCFullYear(e)},yy:function(t,e){return t.setUTCFullYear(2e3+e)},m:function(t,e){for(e-=1;e<0;)e+=12;for(e%=12,t.setUTCMonth(e);t.getUTCMonth()!=e;)t.setUTCDate(t.getUTCDate()-1);return t},d:function(t,e){return t.setUTCDate(e)}};g.M=g.MM=g.mm=g.m,g.dd=g.d,n=e(n.getFullYear(),n.getMonth(),n.getDate(),0,0,0);var y=o.parts.slice();if(l.length!=y.length&&(y=t(y).filter(function(e,i){return-1!==t.inArray(i,v)}).toArray()),l.length==y.length){c=0;for(var b=y.length;c<b;c++){if(h=parseInt(l[c],10),f=y[c],isNaN(h))switch(f){case"MM":p=t(u[s].months).filter(function(){var t=this.slice(0,l[c].length);return t==l[c].slice(0,t.length)}),h=t.inArray(p[0],u[s].months)+1;break;case"M":p=t(u[s].monthsShort).filter(function(){var t=this.slice(0,l[c].length);return t==l[c].slice(0,t.length)}),h=t.inArray(p[0],u[s].monthsShort)+1}m[f]=h}var w;for(c=0;c<v.length;c++)(w=v[c])in m&&!isNaN(m[w])&&g[w](n,m[w])}return n},formatDate:function(e,i,n){"string"==typeof i&&(i=d.parseFormat(i));var o={d:e.getUTCDate(),D:u[n].daysShort[e.getUTCDay()],DD:u[n].days[e.getUTCDay()],m:e.getUTCMonth()+1,M:u[n].monthsShort[e.getUTCMonth()],MM:u[n].months[e.getUTCMonth()],yy:e.getUTCFullYear().toString().substring(2),yyyy:e.getUTCFullYear()};o.dd=(o.d<10?"0":"")+o.d,o.mm=(o.m<10?"0":"")+o.m;e=[];for(var s=t.extend([],i.separators),r=0,a=i.parts.length;r<=a;r++)s.length&&e.push(s.shift()),e.push(o[i.parts[r]]);return e.join("")},headTemplate:'<thead><tr><th class="prev"><i class="icon-arrow-left"/></th><th colspan="5" class="datepicker-switch"></th><th class="next"><i class="icon-arrow-right"/></th></tr></thead>',contTemplate:'<tbody><tr><td colspan="7"></td></tr></tbody>',footTemplate:'<tfoot><tr><th colspan="7" class="today"></th></tr><tr><th colspan="7" class="clear"></th></tr></tfoot>'};d.template='<div class="datepicker"><div class="datepicker-days"><table class=" table-condensed">'+d.headTemplate+"<tbody></tbody>"+d.footTemplate+'</table></div><div class="datepicker-months"><table class="table-condensed">'+d.headTemplate+d.contTemplate+d.footTemplate+'</table></div><div class="datepicker-years"><table class="table-condensed">'+d.headTemplate+d.contTemplate+d.footTemplate+"</table></div></div>",t.fn.datepicker.DPGlobal=d,t.fn.datepicker.noConflict=function(){return t.fn.datepicker=r,this},t(document).on("focus.datepicker.data-api click.datepicker.data-api",'[data-provide="datepicker"]',function(e){var i=t(this);i.data("datepicker")||(e.preventDefault(),a.call(i,"show"))}),t(function(){a.call(t('[data-provide="datepicker-inline"]'))})}(t),function(t){"use strict";t.fn.bdatepicker=t.fn.datepicker.noConflict(),t.fn.datepicker||(t.fn.datepicker=t.fn.bdatepicker);var e=function(t){this.init("date",t,e.defaults),this.initPicker(t,e.defaults)};t.fn.editableutils.inherit(e,t.fn.editabletypes.abstractinput),t.extend(e.prototype,{initPicker:function(e,i){this.options.viewformat||(this.options.viewformat=this.options.format),e.datepicker=t.fn.editableutils.tryParseJson(e.datepicker,!0),this.options.datepicker=t.extend({},i.datepicker,e.datepicker,{format:this.options.viewformat}),this.options.datepicker.language=this.options.datepicker.language||"en",this.dpg=t.fn.bdatepicker.DPGlobal,this.parsedFormat=this.dpg.parseFormat(this.options.format),this.parsedViewFormat=this.dpg.parseFormat(this.options.viewformat)},render:function(){this.$input.bdatepicker(this.options.datepicker),this.options.clear&&(this.$clear=t('<a href="#"></a>').html(this.options.clear).click(t.proxy(function(t){t.preventDefault(),t.stopPropagation(),this.clear()},this)),this.$tpl.parent().append(t('<div class="editable-clear">').append(this.$clear)))},value2html:function(t,i){var n=t?this.dpg.formatDate(t,this.parsedViewFormat,this.options.datepicker.language):"";e.superclass.value2html.call(this,n,i)},html2value:function(t){return this.parseDate(t,this.parsedViewFormat)},value2str:function(t){return t?this.dpg.formatDate(t,this.parsedFormat,this.options.datepicker.language):""},str2value:function(t){return this.parseDate(t,this.parsedFormat)},value2submit:function(t){return this.value2str(t)},value2input:function(t){this.$input.bdatepicker("update",t)},input2value:function(){return this.$input.data("datepicker").date},activate:function(){},clear:function(){this.$input.data("datepicker").date=null,this.$input.find(".active").removeClass("active"),this.options.showbuttons||this.$input.closest("form").submit()},autosubmit:function(){this.$input.on("mouseup",".day",function(e){if(!t(e.currentTarget).is(".old")&&!t(e.currentTarget).is(".new")){var i=t(this).closest("form");setTimeout(function(){i.submit()},200)}})},parseDate:function(t,e){var i=null;return t&&(i=this.dpg.parseDate(t,e,this.options.datepicker.language),"string"==typeof t&&t!==this.dpg.formatDate(i,e,this.options.datepicker.language)&&(i=null)),i}}),e.defaults=t.extend({},t.fn.editabletypes.abstractinput.defaults,{tpl:'<div class="editable-date well"></div>',inputclass:null,format:"yyyy-mm-dd",viewformat:null,datepicker:{weekStart:0,startView:0,minViewMode:0,autoclose:!1},clear:"&times; clear"}),t.fn.editabletypes.date=e}(t),function(t){"use strict";var e=function(t){this.init("datefield",t,e.defaults),this.initPicker(t,e.defaults)};t.fn.editableutils.inherit(e,t.fn.editabletypes.date),t.extend(e.prototype,{render:function(){this.$input=this.$tpl.find("input"),this.setClass(),this.setAttr("placeholder"),this.$input.bdatepicker(this.options.datepicker),this.$input.off("focus keydown"),this.$input.keyup(t.proxy(function(){this.$tpl.removeData("date"),this.$tpl.bdatepicker("update")},this))},value2input:function(t){this.$input.val(t?this.dpg.formatDate(t,this.parsedViewFormat,this.options.datepicker.language):""),this.$tpl.bdatepicker("update")},input2value:function(){return this.html2value(this.$input.val())},activate:function(){t.fn.editabletypes.text.prototype.activate.call(this)},autosubmit:function(){}}),e.defaults=t.extend({},t.fn.editabletypes.date.defaults,{tpl:'<div class="input-append date"><input type="text"/><span class="add-on"><i class="icon-th"></i></span></div>',inputclass:"input-small",datepicker:{weekStart:0,startView:0,minViewMode:0,autoclose:!0}}),t.fn.editabletypes.datefield=e}(t),function(t){"use strict";var e=function(t){this.init("datetime",t,e.defaults),this.initPicker(t,e.defaults)};t.fn.editableutils.inherit(e,t.fn.editabletypes.abstractinput),t.extend(e.prototype,{initPicker:function(e,i){this.options.viewformat||(this.options.viewformat=this.options.format),e.datetimepicker=t.fn.editableutils.tryParseJson(e.datetimepicker,!0),this.options.datetimepicker=t.extend({},i.datetimepicker,e.datetimepicker,{format:this.options.viewformat}),this.options.datetimepicker.language=this.options.datetimepicker.language||"en",this.dpg=t.fn.datetimepicker.DPGlobal,this.parsedFormat=this.dpg.parseFormat(this.options.format,this.options.formatType),this.parsedViewFormat=this.dpg.parseFormat(this.options.viewformat,this.options.formatType)},render:function(){this.$input.datetimepicker(this.options.datetimepicker),this.$input.on("changeMode",function(e){var i=t(this).closest("form").parent();setTimeout(function(){i.triggerHandler("resize")},0)}),this.options.clear&&(this.$clear=t('<a href="#"></a>').html(this.options.clear).click(t.proxy(function(t){t.preventDefault(),t.stopPropagation(),this.clear()},this)),this.$tpl.parent().append(t('<div class="editable-clear">').append(this.$clear)))},value2html:function(t,i){var n=t?this.dpg.formatDate(this.toUTC(t),this.parsedViewFormat,this.options.datetimepicker.language,this.options.formatType):"";if(!i)return n;e.superclass.value2html.call(this,n,i)},html2value:function(t){var e=this.parseDate(t,this.parsedViewFormat);return e?this.fromUTC(e):null},value2str:function(t){return t?this.dpg.formatDate(this.toUTC(t),this.parsedFormat,this.options.datetimepicker.language,this.options.formatType):""},str2value:function(t){var e=this.parseDate(t,this.parsedFormat);return e?this.fromUTC(e):null},value2submit:function(t){return this.value2str(t)},value2input:function(t){t&&this.$input.data("datetimepicker").setDate(t)},input2value:function(){var t=this.$input.data("datetimepicker");return t.date?t.getDate():null},activate:function(){},clear:function(){this.$input.data("datetimepicker").date=null,this.$input.find(".active").removeClass("active"),this.options.showbuttons||this.$input.closest("form").submit()},autosubmit:function(){this.$input.on("mouseup",".minute",function(e){var i=t(this).closest("form");setTimeout(function(){i.submit()},200)})},toUTC:function(t){return t?new Date(t.valueOf()-6e4*t.getTimezoneOffset()):t},fromUTC:function(t){return t?new Date(t.valueOf()+6e4*t.getTimezoneOffset()):t},parseDate:function(t,e){var i=null;return t&&(i=this.dpg.parseDate(t,e,this.options.datetimepicker.language,this.options.formatType),"string"==typeof t&&t!==this.dpg.formatDate(i,e,this.options.datetimepicker.language,this.options.formatType)&&(i=null)),i}}),e.defaults=t.extend({},t.fn.editabletypes.abstractinput.defaults,{tpl:'<div class="editable-date well"></div>',inputclass:null,format:"yyyy-mm-dd hh:ii",formatType:"standard",viewformat:null,datetimepicker:{todayHighlight:!1,autoclose:!1},clear:"&times; clear"}),t.fn.editabletypes.datetime=e}(t),function(t){"use strict";var e=function(t){this.init("datetimefield",t,e.defaults),this.initPicker(t,e.defaults)};t.fn.editableutils.inherit(e,t.fn.editabletypes.datetime),t.extend(e.prototype,{render:function(){this.$input=this.$tpl.find("input"),this.setClass(),this.setAttr("placeholder"),this.$tpl.datetimepicker(this.options.datetimepicker),this.$input.off("focus keydown"),this.$input.keyup(t.proxy(function(){this.$tpl.removeData("date"),this.$tpl.datetimepicker("update")},this))},value2input:function(t){this.$input.val(this.value2html(t)),this.$tpl.datetimepicker("update")},input2value:function(){return this.html2value(this.$input.val())},activate:function(){t.fn.editabletypes.text.prototype.activate.call(this)},autosubmit:function(){}}),e.defaults=t.extend({},t.fn.editabletypes.datetime.defaults,{tpl:'<div class="input-append date"><input type="text"/><span class="add-on"><i class="icon-th"></i></span></div>',inputclass:"input-medium",datetimepicker:{todayHighlight:!1,autoclose:!0}}),t.fn.editabletypes.datetimefield=e}(t)}).call(this,i(1),i(1))},function(t,e,i){var n,o,s;o=[i(1)],void 0===(s="function"==typeof(n=function(t){"use strict";var e=!1,i=!1,n=0,o=2e3,s=0,r=t,a=document,l=window,c=r(l),u=[],d=l.requestAnimationFrame||l.webkitRequestAnimationFrame||l.mozRequestAnimationFrame||!1,h=l.cancelAnimationFrame||l.webkitCancelAnimationFrame||l.mozCancelAnimationFrame||!1;if(d)l.cancelAnimationFrame||(h=function(t){});else{var p=0;d=function(t,e){var i=(new Date).getTime(),n=Math.max(0,16-(i-p)),o=l.setTimeout(function(){t(i+n)},n);return p=i+n,o},h=function(t){l.clearTimeout(t)}}var f=l.MutationObserver||l.WebKitMutationObserver||!1,m=Date.now||function(){return(new Date).getTime()},v={zindex:"auto",cursoropacitymin:0,cursoropacitymax:1,cursorcolor:"#424242",cursorwidth:"6px",cursorborder:"1px solid #fff",cursorborderradius:"5px",scrollspeed:40,mousescrollstep:27,touchbehavior:!1,emulatetouch:!1,hwacceleration:!0,usetransition:!0,boxzoom:!1,dblclickzoom:!0,gesturezoom:!0,grabcursorenabled:!0,autohidemode:!0,background:"",iframeautoresize:!0,cursorminheight:32,preservenativescrolling:!0,railoffset:!1,railhoffset:!1,bouncescroll:!0,spacebarenabled:!0,railpadding:{top:0,right:0,left:0,bottom:0},disableoutline:!0,horizrailenabled:!0,railalign:"right",railvalign:"bottom",enabletranslate3d:!0,enablemousewheel:!0,enablekeyboard:!0,smoothscroll:!0,sensitiverail:!0,enablemouselockapi:!0,cursorfixedheight:!1,directionlockdeadzone:6,hidecursordelay:400,nativeparentscrolling:!0,enablescrollonselection:!0,overflowx:!0,overflowy:!0,cursordragspeed:.3,rtlmode:"auto",cursordragontouch:!1,oneaxismousemode:"auto",scriptpath:function(){var t=a.currentScript||function(){var t=a.getElementsByTagName("script");return!!t.length&&t[t.length-1]}(),e=t?t.src.split("?")[0]:"";return e.split("/").length>0?e.split("/").slice(0,-1).join("/")+"/":""}(),preventmultitouchscrolling:!0,disablemutationobserver:!1,enableobserver:!0,scrollbarid:!1},g=!1,y=function(){if(g)return g;var t=a.createElement("DIV"),e=t.style,i=navigator.userAgent,n=navigator.platform,o={};return o.haspointerlock="pointerLockElement"in a||"webkitPointerLockElement"in a||"mozPointerLockElement"in a,o.isopera="opera"in l,o.isopera12=o.isopera&&"getUserMedia"in navigator,o.isoperamini="[object OperaMini]"===Object.prototype.toString.call(l.operamini),o.isie="all"in a&&"attachEvent"in t&&!o.isopera,o.isieold=o.isie&&!("msInterpolationMode"in e),o.isie7=o.isie&&!o.isieold&&(!("documentMode"in a)||7===a.documentMode),o.isie8=o.isie&&"documentMode"in a&&8===a.documentMode,o.isie9=o.isie&&"performance"in l&&9===a.documentMode,o.isie10=o.isie&&"performance"in l&&10===a.documentMode,o.isie11="msRequestFullscreen"in t&&a.documentMode>=11,o.ismsedge="msCredentials"in l,o.ismozilla="MozAppearance"in e,o.iswebkit=!o.ismsedge&&"WebkitAppearance"in e,o.ischrome=o.iswebkit&&"chrome"in l,o.ischrome38=o.ischrome&&"touchAction"in e,o.ischrome22=!o.ischrome38&&o.ischrome&&o.haspointerlock,o.ischrome26=!o.ischrome38&&o.ischrome&&"transition"in e,o.cantouch="ontouchstart"in a.documentElement||"ontouchstart"in l,o.hasw3ctouch=!!l.PointerEvent&&(navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0),o.hasmstouch=!o.hasw3ctouch&&(l.MSPointerEvent||!1),o.ismac=/^mac$/i.test(n),o.isios=o.cantouch&&/iphone|ipad|ipod/i.test(n),o.isios4=o.isios&&!("seal"in Object),o.isios7=o.isios&&"webkitHidden"in a,o.isios8=o.isios&&"hidden"in a,o.isios10=o.isios&&l.Proxy,o.isandroid=/android/i.test(i),o.haseventlistener="addEventListener"in t,o.trstyle=!1,o.hastransform=!1,o.hastranslate3d=!1,o.transitionstyle=!1,o.hastransition=!1,o.transitionend=!1,o.trstyle="transform",o.hastransform="transform"in e||function(){for(var t=["msTransform","webkitTransform","MozTransform","OTransform"],i=0,n=t.length;i<n;i++)if(void 0!==e[t[i]]){o.trstyle=t[i];break}o.hastransform=!!o.trstyle}(),o.hastransform&&(e[o.trstyle]="translate3d(1px,2px,3px)",o.hastranslate3d=/translate3d/.test(e[o.trstyle])),o.transitionstyle="transition",o.prefixstyle="",o.transitionend="transitionend",o.hastransition="transition"in e||function(){o.transitionend=!1;for(var t=["webkitTransition","msTransition","MozTransition","OTransition","OTransition","KhtmlTransition"],i=["-webkit-","-ms-","-moz-","-o-","-o","-khtml-"],n=["webkitTransitionEnd","msTransitionEnd","transitionend","otransitionend","oTransitionEnd","KhtmlTransitionEnd"],s=0,r=t.length;s<r;s++)if(t[s]in e){o.transitionstyle=t[s],o.prefixstyle=i[s],o.transitionend=n[s];break}o.ischrome26&&(o.prefixstyle=i[1]),o.hastransition=o.transitionstyle}(),o.cursorgrabvalue=function(){var t=["grab","-webkit-grab","-moz-grab"];(o.ischrome&&!o.ischrome38||o.isie)&&(t=[]);for(var i=0,n=t.length;i<n;i++){var s=t[i];if(e.cursor=s,e.cursor==s)return s}return"url(https://cdnjs.cloudflare.com/ajax/libs/slider-pro/1.3.0/css/images/openhand.cur),n-resize"}(),o.hasmousecapture="setCapture"in t,o.hasMutationObserver=!1!==f,t=null,g=o,o},b=function(t,p){function g(){var t=C.doc.css($.trstyle);return!(!t||"matrix"!=t.substr(0,6))&&t.replace(/^.*\((.*)\)$/g,"$1").replace(/px/g,"").split(/, +/)}function b(t,e,i){var n=t.css(e),o=parseFloat(n);if(isNaN(o)){var s=3==(o=z[n]||0)?i?C.win.outerHeight()-C.win.innerHeight():C.win.outerWidth()-C.win.innerWidth():1;return C.isie8&&o&&(o+=1),s?o:0}return o}function x(t,e,i,n){C._bind(t,e,function(n){var o={original:n=n||l.event,target:n.target||n.srcElement,type:"wheel",deltaMode:"MozMousePixelScroll"==n.type?0:1,deltaX:0,deltaZ:0,preventDefault:function(){return n.preventDefault?n.preventDefault():n.returnValue=!1,!1},stopImmediatePropagation:function(){n.stopImmediatePropagation?n.stopImmediatePropagation():n.cancelBubble=!0}};return"mousewheel"==e?(n.wheelDeltaX&&(o.deltaX=-.025*n.wheelDeltaX),n.wheelDeltaY&&(o.deltaY=-.025*n.wheelDeltaY),!o.deltaY&&!o.deltaX&&(o.deltaY=-.025*n.wheelDelta)):o.deltaY=n.detail,i.call(t,o)},n)}function T(t,e,i,n){C.scrollrunning||(C.newscrolly=C.getScrollTop(),C.newscrollx=C.getScrollLeft(),R=m());var o=m()-R;if(R=m(),o>350?F=1:F+=(2-F)/10,e=e*F|0,t=t*F|0){if(n)if(t<0){if(C.getScrollLeft()>=C.page.maxw)return!0}else if(C.getScrollLeft()<=0)return!0;var s=t>0?1:-1;P!==s&&(C.scrollmom&&C.scrollmom.stop(),C.newscrollx=C.getScrollLeft(),P=s),C.lastdeltax-=t}if(e){if(function(){var t=C.getScrollTop();if(e<0){if(t>=C.page.maxh)return!0}else if(t<=0)return!0}()){if(D.nativeparentscrolling&&i&&!C.ispage&&!C.zoomactive)return!0;var r=C.view.h>>1;C.newscrolly<-r?(C.newscrolly=-r,e=-1):C.newscrolly>C.page.maxh+r?(C.newscrolly=C.page.maxh+r,e=1):e=0}var a=e>0?1:-1;H!==a&&(C.scrollmom&&C.scrollmom.stop(),C.newscrolly=C.getScrollTop(),H=a),C.lastdeltay-=e}(e||t)&&C.synched("relativexy",function(){var t=C.lastdeltay+C.newscrolly;C.lastdeltay=0;var e=C.lastdeltax+C.newscrollx;C.lastdeltax=0,C.rail.drag||C.doScrollPos(e,t)})}function k(t,e,i){var n,o;return!(i||!_)||(0===t.deltaMode?(n=-t.deltaX*(D.mousescrollstep/54)|0,o=-t.deltaY*(D.mousescrollstep/54)|0):1===t.deltaMode&&(n=-t.deltaX*D.mousescrollstep*50/80|0,o=-t.deltaY*D.mousescrollstep*50/80|0),e&&D.oneaxismousemode&&0===n&&o&&(n=o,o=0,i&&(n<0?C.getScrollLeft()>=C.page.maxw:C.getScrollLeft()<=0)&&(o=n,n=0)),C.isrtlmode&&(n=-n),T(n,o,i,!0)?void(i&&(_=!0)):(_=!1,t.stopImmediatePropagation(),t.preventDefault()))}var C=this;this.version="3.7.6",this.name="nicescroll",this.me=p;var S=r("body"),D=this.opt={doc:S,win:!1};if(r.extend(D,v),D.snapbackspeed=80,t)for(var E in D)void 0!==t[E]&&(D[E]=t[E]);if(D.disablemutationobserver&&(f=!1),this.doc=D.doc,this.iddoc=this.doc&&this.doc[0]&&this.doc[0].id||"",this.ispage=/^BODY|HTML/.test(D.win?D.win[0].nodeName:this.doc[0].nodeName),this.haswrapper=!1!==D.win,this.win=D.win||(this.ispage?c:this.doc),this.docscroll=this.ispage&&!this.haswrapper?c:this.win,this.body=S,this.viewport=!1,this.isfixed=!1,this.iframe=!1,this.isiframe="IFRAME"==this.doc[0].nodeName&&"IFRAME"==this.win[0].nodeName,this.istextarea="TEXTAREA"==this.win[0].nodeName,this.forcescreen=!1,this.canshowonmouseevent="scroll"!=D.autohidemode,this.onmousedown=!1,this.onmouseup=!1,this.onmousemove=!1,this.onmousewheel=!1,this.onkeypress=!1,this.ongesturezoom=!1,this.onclick=!1,this.onscrollstart=!1,this.onscrollend=!1,this.onscrollcancel=!1,this.onzoomin=!1,this.onzoomout=!1,this.view=!1,this.page=!1,this.scroll={x:0,y:0},this.scrollratio={x:0,y:0},this.cursorheight=20,this.scrollvaluemax=0,"auto"==D.rtlmode){var M=this.win[0]==l?this.body:this.win,L=M.css("writing-mode")||M.css("-webkit-writing-mode")||M.css("-ms-writing-mode")||M.css("-moz-writing-mode");"horizontal-tb"==L||"lr-tb"==L||""===L?(this.isrtlmode="rtl"==M.css("direction"),this.isvertical=!1):(this.isrtlmode="vertical-rl"==L||"tb"==L||"tb-rl"==L||"rl-tb"==L,this.isvertical="vertical-rl"==L||"tb"==L||"tb-rl"==L)}else this.isrtlmode=!0===D.rtlmode,this.isvertical=!1;if(this.scrollrunning=!1,this.scrollmom=!1,this.observer=!1,this.observerremover=!1,this.observerbody=!1,!1!==D.scrollbarid)this.id=D.scrollbarid;else do{this.id="ascrail"+o++}while(a.getElementById(this.id));this.rail=!1,this.cursor=!1,this.cursorfreezed=!1,this.selectiondrag=!1,this.zoom=!1,this.zoomactive=!1,this.hasfocus=!1,this.hasmousefocus=!1,this.railslocked=!1,this.locked=!1,this.hidden=!1,this.cursoractive=!0,this.wheelprevented=!1,this.overflowx=D.overflowx,this.overflowy=D.overflowy,this.nativescrollingarea=!1,this.checkarea=0,this.events=[],this.saved={},this.delaylist={},this.synclist={},this.lastdeltax=0,this.lastdeltay=0,this.detected=y();var $=r.extend({},this.detected);this.canhwscroll=$.hastransform&&D.hwacceleration,this.ishwscroll=this.canhwscroll&&C.haswrapper,this.isrtlmode?this.isvertical?this.hasreversehr=!($.iswebkit||$.isie||$.isie11):this.hasreversehr=!($.iswebkit||$.isie&&!$.isie10&&!$.isie11):this.hasreversehr=!1,this.istouchcapable=!1,($.cantouch||!$.hasw3ctouch&&!$.hasmstouch)&&(!$.cantouch||$.isios||$.isandroid||!$.iswebkit&&!$.ismozilla)||(this.istouchcapable=!0),D.enablemouselockapi||($.hasmousecapture=!1,$.haspointerlock=!1),this.debounced=function(t,e,i){C&&(C.delaylist[t]||(C.delaylist[t]={h:d(function(){C.delaylist[t].fn.call(C),C.delaylist[t]=!1},i)},e.call(C)),C.delaylist[t].fn=e)},this.synched=function(t,e){C.synclist[t]?C.synclist[t]=e:(C.synclist[t]=e,d(function(){C&&(C.synclist[t]&&C.synclist[t].call(C),C.synclist[t]=null)}))},this.unsynched=function(t){C.synclist[t]&&(C.synclist[t]=!1)},this.css=function(t,e){for(var i in e)C.saved.css.push([t,i,t.css(i)]),t.css(i,e[i])},this.scrollTop=function(t){return void 0===t?C.getScrollTop():C.setScrollTop(t)},this.scrollLeft=function(t){return void 0===t?C.getScrollLeft():C.setScrollLeft(t)};var N=function(t,e,i,n,o,s,r){this.st=t,this.ed=e,this.spd=i,this.p1=n||0,this.p2=o||1,this.p3=s||0,this.p4=r||1,this.ts=m(),this.df=e-t};if(N.prototype={B2:function(t){return 3*(1-t)*(1-t)*t},B3:function(t){return 3*(1-t)*t*t},B4:function(t){return t*t*t},getPos:function(){return(m()-this.ts)/this.spd},getNow:function(){var t=(m()-this.ts)/this.spd,e=this.B2(t)+this.B3(t)+this.B4(t);return t>=1?this.ed:this.st+this.df*e|0},update:function(t,e){return this.st=this.getNow(),this.ed=t,this.spd=e,this.ts=m(),this.df=this.ed-this.st,this}},this.ishwscroll){this.doc.translate={x:0,y:0,tx:"0px",ty:"0px"},$.hastranslate3d&&$.isios&&this.doc.css("-webkit-backface-visibility","hidden"),this.getScrollTop=function(t){if(!t){var e=g();if(e)return 16==e.length?-e[13]:-e[5];if(C.timerscroll&&C.timerscroll.bz)return C.timerscroll.bz.getNow()}return C.doc.translate.y},this.getScrollLeft=function(t){if(!t){var e=g();if(e)return 16==e.length?-e[12]:-e[4];if(C.timerscroll&&C.timerscroll.bh)return C.timerscroll.bh.getNow()}return C.doc.translate.x},this.notifyScrollEvent=function(t){var e=a.createEvent("UIEvents");e.initUIEvent("scroll",!1,!1,l,1),e.niceevent=!0,t.dispatchEvent(e)};var A=this.isrtlmode?1:-1;$.hastranslate3d&&D.enabletranslate3d?(this.setScrollTop=function(t,e){C.doc.translate.y=t,C.doc.translate.ty=-1*t+"px",C.doc.css($.trstyle,"translate3d("+C.doc.translate.tx+","+C.doc.translate.ty+",0)"),e||C.notifyScrollEvent(C.win[0])},this.setScrollLeft=function(t,e){C.doc.translate.x=t,C.doc.translate.tx=t*A+"px",C.doc.css($.trstyle,"translate3d("+C.doc.translate.tx+","+C.doc.translate.ty+",0)"),e||C.notifyScrollEvent(C.win[0])}):(this.setScrollTop=function(t,e){C.doc.translate.y=t,C.doc.translate.ty=-1*t+"px",C.doc.css($.trstyle,"translate("+C.doc.translate.tx+","+C.doc.translate.ty+")"),e||C.notifyScrollEvent(C.win[0])},this.setScrollLeft=function(t,e){C.doc.translate.x=t,C.doc.translate.tx=t*A+"px",C.doc.css($.trstyle,"translate("+C.doc.translate.tx+","+C.doc.translate.ty+")"),e||C.notifyScrollEvent(C.win[0])})}else this.getScrollTop=function(){return C.docscroll.scrollTop()},this.setScrollTop=function(t){C.docscroll.scrollTop(t)},this.getScrollLeft=function(){return C.hasreversehr?C.detected.ismozilla?C.page.maxw-Math.abs(C.docscroll.scrollLeft()):C.page.maxw-C.docscroll.scrollLeft():C.docscroll.scrollLeft()},this.setScrollLeft=function(t){return setTimeout(function(){if(C)return C.hasreversehr&&(t=C.detected.ismozilla?-(C.page.maxw-t):C.page.maxw-t),C.docscroll.scrollLeft(t)},1)};this.getTarget=function(t){return!!t&&(t.target?t.target:!!t.srcElement&&t.srcElement)},this.hasParent=function(t,e){if(!t)return!1;for(var i=t.target||t.srcElement||t||!1;i&&i.id!=e;)i=i.parentNode||!1;return!1!==i};var z={thin:1,medium:3,thick:5};this.getDocumentScrollOffset=function(){return{top:l.pageYOffset||a.documentElement.scrollTop,left:l.pageXOffset||a.documentElement.scrollLeft}},this.getOffset=function(){if(C.isfixed){var t=C.win.offset(),e=C.getDocumentScrollOffset();return t.top-=e.top,t.left-=e.left,t}var i=C.win.offset();if(!C.viewport)return i;var n=C.viewport.offset();return{top:i.top-n.top,left:i.left-n.left}},this.updateScrollBar=function(t){var e,i;if(C.ishwscroll)C.rail.css({height:C.win.innerHeight()-(D.railpadding.top+D.railpadding.bottom)}),C.railh&&C.railh.css({width:C.win.innerWidth()-(D.railpadding.left+D.railpadding.right)});else{var n=C.getOffset();if((e={top:n.top,left:n.left-(D.railpadding.left+D.railpadding.right)}).top+=b(C.win,"border-top-width",!0),e.left+=C.rail.align?C.win.outerWidth()-b(C.win,"border-right-width")-C.rail.width:b(C.win,"border-left-width"),(i=D.railoffset)&&(i.top&&(e.top+=i.top),i.left&&(e.left+=i.left)),C.railslocked||C.rail.css({top:e.top,left:e.left,height:(t?t.h:C.win.innerHeight())-(D.railpadding.top+D.railpadding.bottom)}),C.zoom&&C.zoom.css({top:e.top+1,left:1==C.rail.align?e.left-20:e.left+C.rail.width+4}),C.railh&&!C.railslocked){e={top:n.top,left:n.left},(i=D.railhoffset)&&(i.top&&(e.top+=i.top),i.left&&(e.left+=i.left));var o=C.railh.align?e.top+b(C.win,"border-top-width",!0)+C.win.innerHeight()-C.railh.height:e.top+b(C.win,"border-top-width",!0),s=e.left+b(C.win,"border-left-width");C.railh.css({top:o-(D.railpadding.top+D.railpadding.bottom),left:s,width:C.railh.width})}}},this.doRailClick=function(t,e,i){var n,o,s,r;C.railslocked||(C.cancelEvent(t),"pageY"in t||(t.pageX=t.clientX+a.documentElement.scrollLeft,t.pageY=t.clientY+a.documentElement.scrollTop),e?(n=i?C.doScrollLeft:C.doScrollTop,s=i?(t.pageX-C.railh.offset().left-C.cursorwidth/2)*C.scrollratio.x:(t.pageY-C.rail.offset().top-C.cursorheight/2)*C.scrollratio.y,C.unsynched("relativexy"),n(0|s)):(n=i?C.doScrollLeftBy:C.doScrollBy,s=i?C.scroll.x:C.scroll.y,r=i?t.pageX-C.railh.offset().left:t.pageY-C.rail.offset().top,o=i?C.view.w:C.view.h,n(s>=r?o:-o)))},C.newscrolly=C.newscrollx=0,C.hasanimationframe="requestAnimationFrame"in l,C.hascancelanimationframe="cancelAnimationFrame"in l,C.hasborderbox=!1,this.init=function(){if(C.saved.css=[],$.isoperamini)return!0;if($.isandroid&&!("hidden"in a))return!0;D.emulatetouch=D.emulatetouch||D.touchbehavior,C.hasborderbox=l.getComputedStyle&&"border-box"===l.getComputedStyle(a.body)["box-sizing"];var t={"overflow-y":"hidden"};if(($.isie11||$.isie10)&&(t["-ms-overflow-style"]="none"),C.ishwscroll&&(this.doc.css($.transitionstyle,$.prefixstyle+"transform 0ms ease-out"),$.transitionend&&C.bind(C.doc,$.transitionend,C.onScrollTransitionEnd,!1)),C.zindex="auto",C.ispage||"auto"!=D.zindex?C.zindex=D.zindex:C.zindex=function(){var t=C.win;if("zIndex"in t)return t.zIndex();for(;t.length>0;){if(9==t[0].nodeType)return!1;var e=t.css("zIndex");if(!isNaN(e)&&0!==e)return parseInt(e);t=t.parent()}return!1}()||"auto",!C.ispage&&"auto"!=C.zindex&&C.zindex>s&&(s=C.zindex),C.isie&&0===C.zindex&&"auto"==D.zindex&&(C.zindex="auto"),!C.ispage||!$.isieold){var o=C.docscroll;C.ispage&&(o=C.haswrapper?C.win:C.doc),C.css(o,t),C.ispage&&($.isie11||$.isie)&&C.css(r("html"),t),!$.isios||C.ispage||C.haswrapper||C.css(S,{"-webkit-overflow-scrolling":"touch"});var u=r(a.createElement("div"));u.css({position:"relative",top:0,float:"right",width:D.cursorwidth,height:0,"background-color":D.cursorcolor,border:D.cursorborder,"background-clip":"padding-box","-webkit-border-radius":D.cursorborderradius,"-moz-border-radius":D.cursorborderradius,"border-radius":D.cursorborderradius}),u.addClass("nicescroll-cursors"),C.cursor=u;var d=r(a.createElement("div"));d.attr("id",C.id),d.addClass("nicescroll-rails nicescroll-rails-vr");var h,p,m=["left","right","top","bottom"];for(var v in m)p=m[v],(h=D.railpadding[p]||0)&&d.css("padding-"+p,h+"px");d.append(u),d.width=Math.max(parseFloat(D.cursorwidth),u.outerWidth()),d.css({width:d.width+"px",zIndex:C.zindex,background:D.background,cursor:"default"}),d.visibility=!0,d.scrollable=!0,d.align="left"==D.railalign?0:1,C.rail=d,C.rail.drag=!1;var g,y=!1;if(!D.boxzoom||C.ispage||$.isieold||(y=a.createElement("div"),C.bind(y,"click",C.doZoom),C.bind(y,"mouseenter",function(){C.zoom.css("opacity",D.cursoropacitymax)}),C.bind(y,"mouseleave",function(){C.zoom.css("opacity",D.cursoropacitymin)}),C.zoom=r(y),C.zoom.css({cursor:"pointer",zIndex:C.zindex,backgroundImage:"url("+D.scriptpath+"zoomico.png)",height:18,width:18,backgroundPosition:"0 0"}),D.dblclickzoom&&C.bind(C.win,"dblclick",C.doZoom),$.cantouch&&D.gesturezoom&&(C.ongesturezoom=function(t){return t.scale>1.5&&C.doZoomIn(t),t.scale<.8&&C.doZoomOut(t),C.cancelEvent(t)},C.bind(C.win,"gestureend",C.ongesturezoom))),C.railh=!1,D.horizrailenabled&&(C.css(o,{overflowX:"hidden"}),(u=r(a.createElement("div"))).css({position:"absolute",top:0,height:D.cursorwidth,width:0,backgroundColor:D.cursorcolor,border:D.cursorborder,backgroundClip:"padding-box","-webkit-border-radius":D.cursorborderradius,"-moz-border-radius":D.cursorborderradius,"border-radius":D.cursorborderradius}),$.isieold&&u.css("overflow","hidden"),u.addClass("nicescroll-cursors"),C.cursorh=u,(g=r(a.createElement("div"))).attr("id",C.id+"-hr"),g.addClass("nicescroll-rails nicescroll-rails-hr"),g.height=Math.max(parseFloat(D.cursorwidth),u.outerHeight()),g.css({height:g.height+"px",zIndex:C.zindex,background:D.background}),g.append(u),g.visibility=!0,g.scrollable=!0,g.align="top"==D.railvalign?0:1,C.railh=g,C.railh.drag=!1),C.ispage)d.css({position:"fixed",top:0,height:"100%"}),d.css(d.align?{right:0}:{left:0}),C.body.append(d),C.railh&&(g.css({position:"fixed",left:0,width:"100%"}),g.css(g.align?{bottom:0}:{top:0}),C.body.append(g));else{if(C.ishwscroll){"static"==C.win.css("position")&&C.css(C.win,{position:"relative"});var b="HTML"==C.win[0].nodeName?C.body:C.win;r(b).scrollTop(0).scrollLeft(0),C.zoom&&(C.zoom.css({position:"absolute",top:1,right:0,"margin-right":d.width+4}),b.append(C.zoom)),d.css({position:"absolute",top:0}),d.css(d.align?{right:0}:{left:0}),b.append(d),g&&(g.css({position:"absolute",left:0,bottom:0}),g.css(g.align?{bottom:0}:{top:0}),b.append(g))}else{C.isfixed="fixed"==C.win.css("position");var x=C.isfixed?"fixed":"absolute";C.isfixed||(C.viewport=C.getViewport(C.win[0])),C.viewport&&(C.body=C.viewport,/fixed|absolute/.test(C.viewport.css("position"))||C.css(C.viewport,{position:"relative"})),d.css({position:x}),C.zoom&&C.zoom.css({position:x}),C.updateScrollBar(),C.body.append(d),C.zoom&&C.body.append(C.zoom),C.railh&&(g.css({position:x}),C.body.append(g))}$.isios&&C.css(C.win,{"-webkit-tap-highlight-color":"rgba(0,0,0,0)","-webkit-touch-callout":"none"}),D.disableoutline&&($.isie&&C.win.attr("hideFocus","true"),$.iswebkit&&C.win.css("outline","none"))}if(!1===D.autohidemode?(C.autohidedom=!1,C.rail.css({opacity:D.cursoropacitymax}),C.railh&&C.railh.css({opacity:D.cursoropacitymax})):!0===D.autohidemode||"leave"===D.autohidemode?(C.autohidedom=r().add(C.rail),$.isie8&&(C.autohidedom=C.autohidedom.add(C.cursor)),C.railh&&(C.autohidedom=C.autohidedom.add(C.railh)),C.railh&&$.isie8&&(C.autohidedom=C.autohidedom.add(C.cursorh))):"scroll"==D.autohidemode?(C.autohidedom=r().add(C.rail),C.railh&&(C.autohidedom=C.autohidedom.add(C.railh))):"cursor"==D.autohidemode?(C.autohidedom=r().add(C.cursor),C.railh&&(C.autohidedom=C.autohidedom.add(C.cursorh))):"hidden"==D.autohidemode&&(C.autohidedom=!1,C.hide(),C.railslocked=!1),$.cantouch||C.istouchcapable||D.emulatetouch||$.hasmstouch){C.scrollmom=new w(C),C.ontouchstart=function(t){if(C.locked)return!1;if(t.pointerType&&("mouse"===t.pointerType||t.pointerType===t.MSPOINTER_TYPE_MOUSE))return!1;if(C.hasmoving=!1,C.scrollmom.timer&&(C.triggerScrollEnd(),C.scrollmom.stop()),!C.railslocked){var e=C.getTarget(t);if(e&&/INPUT/i.test(e.nodeName)&&/range/i.test(e.type))return C.stopPropagation(t);var i="mousedown"===t.type;if(!("clientX"in t)&&"changedTouches"in t&&(t.clientX=t.changedTouches[0].clientX,t.clientY=t.changedTouches[0].clientY),C.forcescreen){var n=t;(t={original:t.original?t.original:t}).clientX=n.screenX,t.clientY=n.screenY}if(C.rail.drag={x:t.clientX,y:t.clientY,sx:C.scroll.x,sy:C.scroll.y,st:C.getScrollTop(),sl:C.getScrollLeft(),pt:2,dl:!1,tg:e},C.ispage||!D.directionlockdeadzone)C.rail.drag.dl="f";else{var o={w:c.width(),h:c.height()},s=C.getContentSize(),a=s.h-o.h,l=s.w-o.w;C.rail.scrollable&&!C.railh.scrollable?C.rail.drag.ck=a>0&&"v":!C.rail.scrollable&&C.railh.scrollable?C.rail.drag.ck=l>0&&"h":C.rail.drag.ck=!1}if(D.emulatetouch&&C.isiframe&&$.isie){var u=C.win.position();C.rail.drag.x+=u.left,C.rail.drag.y+=u.top}if(C.hasmoving=!1,C.lastmouseup=!1,C.scrollmom.reset(t.clientX,t.clientY),e&&i){if(!/INPUT|SELECT|BUTTON|TEXTAREA/i.test(e.nodeName))return $.hasmousecapture&&e.setCapture(),D.emulatetouch?(e.onclick&&!e._onclick&&(e._onclick=e.onclick,e.onclick=function(t){if(C.hasmoving)return!1;e._onclick.call(this,t)}),C.cancelEvent(t)):C.stopPropagation(t);/SUBMIT|CANCEL|BUTTON/i.test(r(e).attr("type"))&&(C.preventclick={tg:e,click:!1})}}},C.ontouchend=function(t){if(!C.rail.drag)return!0;if(2==C.rail.drag.pt){if(t.pointerType&&("mouse"===t.pointerType||t.pointerType===t.MSPOINTER_TYPE_MOUSE))return!1;C.rail.drag=!1;var e="mouseup"===t.type;if(C.hasmoving&&(C.scrollmom.doMomentum(),C.lastmouseup=!0,C.hideCursor(),$.hasmousecapture&&a.releaseCapture(),e))return C.cancelEvent(t)}else if(1==C.rail.drag.pt)return C.onmouseup(t)};var T=D.emulatetouch&&C.isiframe&&!$.hasmousecapture,k=.3*D.directionlockdeadzone|0;C.ontouchmove=function(t,e){if(!C.rail.drag)return!0;if(t.targetTouches&&D.preventmultitouchscrolling&&t.targetTouches.length>1)return!0;if(t.pointerType&&("mouse"===t.pointerType||t.pointerType===t.MSPOINTER_TYPE_MOUSE))return!0;if(2==C.rail.drag.pt){var i,n;if("changedTouches"in t&&(t.clientX=t.changedTouches[0].clientX,t.clientY=t.changedTouches[0].clientY),n=i=0,T&&!e){var o=C.win.position();n=-o.left,i=-o.top}var s=t.clientY+i,r=s-C.rail.drag.y,l=t.clientX+n,c=l-C.rail.drag.x,u=C.rail.drag.st-r;if(C.ishwscroll&&D.bouncescroll)u<0?u=Math.round(u/2):u>C.page.maxh&&(u=C.page.maxh+Math.round((u-C.page.maxh)/2));else if(u<0?(u=0,s=0):u>C.page.maxh&&(u=C.page.maxh,s=0),0===s&&!C.hasmoving)return C.ispage||(C.rail.drag=!1),!0;var d=C.getScrollLeft();if(C.railh&&C.railh.scrollable&&(d=C.isrtlmode?c-C.rail.drag.sl:C.rail.drag.sl-c,C.ishwscroll&&D.bouncescroll?d<0?d=Math.round(d/2):d>C.page.maxw&&(d=C.page.maxw+Math.round((d-C.page.maxw)/2)):(d<0&&(d=0,l=0),d>C.page.maxw&&(d=C.page.maxw,l=0))),!C.hasmoving){if(C.rail.drag.y===t.clientY&&C.rail.drag.x===t.clientX)return C.cancelEvent(t);var h=Math.abs(r),p=Math.abs(c),f=D.directionlockdeadzone;if(C.rail.drag.ck?"v"==C.rail.drag.ck?p>f&&h<=k?C.rail.drag=!1:h>f&&(C.rail.drag.dl="v"):"h"==C.rail.drag.ck&&(h>f&&p<=k?C.rail.drag=!1:p>f&&(C.rail.drag.dl="h")):h>f&&p>f?C.rail.drag.dl="f":h>f?C.rail.drag.dl=p>k?"f":"v":p>f&&(C.rail.drag.dl=h>k?"f":"h"),!C.rail.drag.dl)return C.cancelEvent(t);C.triggerScrollStart(t.clientX,t.clientY,0,0,0),C.hasmoving=!0}return C.preventclick&&!C.preventclick.click&&(C.preventclick.click=C.preventclick.tg.onclick||!1,C.preventclick.tg.onclick=C.onpreventclick),C.rail.drag.dl&&("v"==C.rail.drag.dl?d=C.rail.drag.sl:"h"==C.rail.drag.dl&&(u=C.rail.drag.st)),C.synched("touchmove",function(){C.rail.drag&&2==C.rail.drag.pt&&(C.prepareTransition&&C.resetTransition(),C.rail.scrollable&&C.setScrollTop(u),C.scrollmom.update(l,s),C.railh&&C.railh.scrollable?(C.setScrollLeft(d),C.showCursor(u,d)):C.showCursor(u),$.isie10&&a.selection.clear())}),C.cancelEvent(t)}return 1==C.rail.drag.pt?C.onmousemove(t):void 0},C.ontouchstartCursor=function(t,e){if(!C.rail.drag||3==C.rail.drag.pt){if(C.locked)return C.cancelEvent(t);C.cancelScroll(),C.rail.drag={x:t.touches[0].clientX,y:t.touches[0].clientY,sx:C.scroll.x,sy:C.scroll.y,pt:3,hr:!!e};var i=C.getTarget(t);return!C.ispage&&$.hasmousecapture&&i.setCapture(),C.isiframe&&!$.hasmousecapture&&(C.saved.csspointerevents=C.doc.css("pointer-events"),C.css(C.doc,{"pointer-events":"none"})),C.cancelEvent(t)}},C.ontouchendCursor=function(t){if(C.rail.drag){if($.hasmousecapture&&a.releaseCapture(),C.isiframe&&!$.hasmousecapture&&C.doc.css("pointer-events",C.saved.csspointerevents),3!=C.rail.drag.pt)return;return C.rail.drag=!1,C.cancelEvent(t)}},C.ontouchmoveCursor=function(t){if(C.rail.drag){if(3!=C.rail.drag.pt)return;if(C.cursorfreezed=!0,C.rail.drag.hr){C.scroll.x=C.rail.drag.sx+(t.touches[0].clientX-C.rail.drag.x),C.scroll.x<0&&(C.scroll.x=0);var e=C.scrollvaluemaxw;C.scroll.x>e&&(C.scroll.x=e)}else{C.scroll.y=C.rail.drag.sy+(t.touches[0].clientY-C.rail.drag.y),C.scroll.y<0&&(C.scroll.y=0);var i=C.scrollvaluemax;C.scroll.y>i&&(C.scroll.y=i)}return C.synched("touchmove",function(){C.rail.drag&&3==C.rail.drag.pt&&(C.showCursor(),C.rail.drag.hr?C.doScrollLeft(Math.round(C.scroll.x*C.scrollratio.x),D.cursordragspeed):C.doScrollTop(Math.round(C.scroll.y*C.scrollratio.y),D.cursordragspeed))}),C.cancelEvent(t)}}}if(C.onmousedown=function(t,e){if(!C.rail.drag||1==C.rail.drag.pt){if(C.railslocked)return C.cancelEvent(t);C.cancelScroll(),C.rail.drag={x:t.clientX,y:t.clientY,sx:C.scroll.x,sy:C.scroll.y,pt:1,hr:e||!1};var i=C.getTarget(t);return $.hasmousecapture&&i.setCapture(),C.isiframe&&!$.hasmousecapture&&(C.saved.csspointerevents=C.doc.css("pointer-events"),C.css(C.doc,{"pointer-events":"none"})),C.hasmoving=!1,C.cancelEvent(t)}},C.onmouseup=function(t){if(C.rail.drag)return 1!=C.rail.drag.pt||($.hasmousecapture&&a.releaseCapture(),C.isiframe&&!$.hasmousecapture&&C.doc.css("pointer-events",C.saved.csspointerevents),C.rail.drag=!1,C.cursorfreezed=!1,C.hasmoving&&C.triggerScrollEnd(),C.cancelEvent(t))},C.onmousemove=function(t){if(C.rail.drag){if(1!==C.rail.drag.pt)return;if($.ischrome&&0===t.which)return C.onmouseup(t);if(C.cursorfreezed=!0,C.hasmoving||C.triggerScrollStart(t.clientX,t.clientY,0,0,0),C.hasmoving=!0,C.rail.drag.hr){C.scroll.x=C.rail.drag.sx+(t.clientX-C.rail.drag.x),C.scroll.x<0&&(C.scroll.x=0);var e=C.scrollvaluemaxw;C.scroll.x>e&&(C.scroll.x=e)}else{C.scroll.y=C.rail.drag.sy+(t.clientY-C.rail.drag.y),C.scroll.y<0&&(C.scroll.y=0);var i=C.scrollvaluemax;C.scroll.y>i&&(C.scroll.y=i)}return C.synched("mousemove",function(){C.cursorfreezed&&(C.showCursor(),C.rail.drag.hr?C.scrollLeft(Math.round(C.scroll.x*C.scrollratio.x)):C.scrollTop(Math.round(C.scroll.y*C.scrollratio.y)))}),C.cancelEvent(t)}C.checkarea=0},$.cantouch||D.emulatetouch)C.onpreventclick=function(t){if(C.preventclick)return C.preventclick.tg.onclick=C.preventclick.click,C.preventclick=!1,C.cancelEvent(t)},C.onclick=!$.isios&&function(t){return!C.lastmouseup||(C.lastmouseup=!1,C.cancelEvent(t))},D.grabcursorenabled&&$.cursorgrabvalue&&(C.css(C.ispage?C.doc:C.win,{cursor:$.cursorgrabvalue}),C.css(C.rail,{cursor:$.cursorgrabvalue}));else{var E=function(t){if(C.selectiondrag){if(t){var e=C.win.outerHeight(),i=t.pageY-C.selectiondrag.top;i>0&&i<e&&(i=0),i>=e&&(i-=e),C.selectiondrag.df=i}if(0!==C.selectiondrag.df){var n=-2*C.selectiondrag.df/6|0;C.doScrollBy(n),C.debounced("doselectionscroll",function(){E()},50)}}};C.hasTextSelected="getSelection"in a?function(){return a.getSelection().rangeCount>0}:"selection"in a?function(){return"None"!=a.selection.type}:function(){return!1},C.onselectionstart=function(t){C.ispage||(C.selectiondrag=C.win.offset())},C.onselectionend=function(t){C.selectiondrag=!1},C.onselectiondrag=function(t){C.selectiondrag&&C.hasTextSelected()&&C.debounced("selectionscroll",function(){E(t)},250)}}if($.hasw3ctouch?(C.css(C.ispage?r("html"):C.win,{"touch-action":"none"}),C.css(C.rail,{"touch-action":"none"}),C.css(C.cursor,{"touch-action":"none"}),C.bind(C.win,"pointerdown",C.ontouchstart),C.bind(a,"pointerup",C.ontouchend),C.delegate(a,"pointermove",C.ontouchmove)):$.hasmstouch?(C.css(C.ispage?r("html"):C.win,{"-ms-touch-action":"none"}),C.css(C.rail,{"-ms-touch-action":"none"}),C.css(C.cursor,{"-ms-touch-action":"none"}),C.bind(C.win,"MSPointerDown",C.ontouchstart),C.bind(a,"MSPointerUp",C.ontouchend),C.delegate(a,"MSPointerMove",C.ontouchmove),C.bind(C.cursor,"MSGestureHold",function(t){t.preventDefault()}),C.bind(C.cursor,"contextmenu",function(t){t.preventDefault()})):$.cantouch&&(C.bind(C.win,"touchstart",C.ontouchstart,!1,!0),C.bind(a,"touchend",C.ontouchend,!1,!0),C.bind(a,"touchcancel",C.ontouchend,!1,!0),C.delegate(a,"touchmove",C.ontouchmove,!1,!0)),D.emulatetouch&&(C.bind(C.win,"mousedown",C.ontouchstart,!1,!0),C.bind(a,"mouseup",C.ontouchend,!1,!0),C.bind(a,"mousemove",C.ontouchmove,!1,!0)),(D.cursordragontouch||!$.cantouch&&!D.emulatetouch)&&(C.rail.css({cursor:"default"}),C.railh&&C.railh.css({cursor:"default"}),C.jqbind(C.rail,"mouseenter",function(){if(!C.ispage&&!C.win.is(":visible"))return!1;C.canshowonmouseevent&&C.showCursor(),C.rail.active=!0}),C.jqbind(C.rail,"mouseleave",function(){C.rail.active=!1,C.rail.drag||C.hideCursor()}),D.sensitiverail&&(C.bind(C.rail,"click",function(t){C.doRailClick(t,!1,!1)}),C.bind(C.rail,"dblclick",function(t){C.doRailClick(t,!0,!1)}),C.bind(C.cursor,"click",function(t){C.cancelEvent(t)}),C.bind(C.cursor,"dblclick",function(t){C.cancelEvent(t)})),C.railh&&(C.jqbind(C.railh,"mouseenter",function(){if(!C.ispage&&!C.win.is(":visible"))return!1;C.canshowonmouseevent&&C.showCursor(),C.rail.active=!0}),C.jqbind(C.railh,"mouseleave",function(){C.rail.active=!1,C.rail.drag||C.hideCursor()}),D.sensitiverail&&(C.bind(C.railh,"click",function(t){C.doRailClick(t,!1,!0)}),C.bind(C.railh,"dblclick",function(t){C.doRailClick(t,!0,!0)}),C.bind(C.cursorh,"click",function(t){C.cancelEvent(t)}),C.bind(C.cursorh,"dblclick",function(t){C.cancelEvent(t)})))),D.cursordragontouch&&(this.istouchcapable||$.cantouch)&&(C.bind(C.cursor,"touchstart",C.ontouchstartCursor),C.bind(C.cursor,"touchmove",C.ontouchmoveCursor),C.bind(C.cursor,"touchend",C.ontouchendCursor),C.cursorh&&C.bind(C.cursorh,"touchstart",function(t){C.ontouchstartCursor(t,!0)}),C.cursorh&&C.bind(C.cursorh,"touchmove",C.ontouchmoveCursor),C.cursorh&&C.bind(C.cursorh,"touchend",C.ontouchendCursor)),D.emulatetouch||$.isandroid||$.isios?(C.bind($.hasmousecapture?C.win:a,"mouseup",C.ontouchend),C.onclick&&C.bind(a,"click",C.onclick),D.cursordragontouch?(C.bind(C.cursor,"mousedown",C.onmousedown),C.bind(C.cursor,"mouseup",C.onmouseup),C.cursorh&&C.bind(C.cursorh,"mousedown",function(t){C.onmousedown(t,!0)}),C.cursorh&&C.bind(C.cursorh,"mouseup",C.onmouseup)):(C.bind(C.rail,"mousedown",function(t){t.preventDefault()}),C.railh&&C.bind(C.railh,"mousedown",function(t){t.preventDefault()}))):(C.bind($.hasmousecapture?C.win:a,"mouseup",C.onmouseup),C.bind(a,"mousemove",C.onmousemove),C.onclick&&C.bind(a,"click",C.onclick),C.bind(C.cursor,"mousedown",C.onmousedown),C.bind(C.cursor,"mouseup",C.onmouseup),C.railh&&(C.bind(C.cursorh,"mousedown",function(t){C.onmousedown(t,!0)}),C.bind(C.cursorh,"mouseup",C.onmouseup)),!C.ispage&&D.enablescrollonselection&&(C.bind(C.win[0],"mousedown",C.onselectionstart),C.bind(a,"mouseup",C.onselectionend),C.bind(C.cursor,"mouseup",C.onselectionend),C.cursorh&&C.bind(C.cursorh,"mouseup",C.onselectionend),C.bind(a,"mousemove",C.onselectiondrag)),C.zoom&&(C.jqbind(C.zoom,"mouseenter",function(){C.canshowonmouseevent&&C.showCursor(),C.rail.active=!0}),C.jqbind(C.zoom,"mouseleave",function(){C.rail.active=!1,C.rail.drag||C.hideCursor()}))),D.enablemousewheel&&(C.isiframe||C.mousewheel($.isie&&C.ispage?a:C.win,C.onmousewheel),C.mousewheel(C.rail,C.onmousewheel),C.railh&&C.mousewheel(C.railh,C.onmousewheelhr)),C.ispage||$.cantouch||/HTML|^BODY/.test(C.win[0].nodeName)||(C.win.attr("tabindex")||C.win.attr({tabindex:++n}),C.bind(C.win,"focus",function(t){e=C.getTarget(t).id||C.getTarget(t)||!1,C.hasfocus=!0,C.canshowonmouseevent&&C.noticeCursor()}),C.bind(C.win,"blur",function(t){e=!1,C.hasfocus=!1}),C.bind(C.win,"mouseenter",function(t){i=C.getTarget(t).id||C.getTarget(t)||!1,C.hasmousefocus=!0,C.canshowonmouseevent&&C.noticeCursor()}),C.bind(C.win,"mouseleave",function(t){i=!1,C.hasmousefocus=!1,C.rail.drag||C.hideCursor()})),C.onkeypress=function(t){if(C.railslocked&&0===C.page.maxh)return!0;t=t||l.event;var n=C.getTarget(t);if(n&&/INPUT|TEXTAREA|SELECT|OPTION/.test(n.nodeName)&&(!n.getAttribute("type")&&!n.type||!/submit|button|cancel/i.tp))return!0;if(r(n).attr("contenteditable"))return!0;if(C.hasfocus||C.hasmousefocus&&!e||C.ispage&&!e&&!i){var o=t.keyCode;if(C.railslocked&&27!=o)return C.cancelEvent(t);var s=t.ctrlKey||!1,a=t.shiftKey||!1,c=!1;switch(o){case 38:case 63233:C.doScrollBy(72),c=!0;break;case 40:case 63235:C.doScrollBy(-72),c=!0;break;case 37:case 63232:C.railh&&(s?C.doScrollLeft(0):C.doScrollLeftBy(72),c=!0);break;case 39:case 63234:C.railh&&(s?C.doScrollLeft(C.page.maxw):C.doScrollLeftBy(-72),c=!0);break;case 33:case 63276:C.doScrollBy(C.view.h),c=!0;break;case 34:case 63277:C.doScrollBy(-C.view.h),c=!0;break;case 36:case 63273:C.railh&&s?C.doScrollPos(0,0):C.doScrollTo(0),c=!0;break;case 35:case 63275:C.railh&&s?C.doScrollPos(C.page.maxw,C.page.maxh):C.doScrollTo(C.page.maxh),c=!0;break;case 32:D.spacebarenabled&&(a?C.doScrollBy(C.view.h):C.doScrollBy(-C.view.h),c=!0);break;case 27:C.zoomactive&&(C.doZoom(),c=!0)}if(c)return C.cancelEvent(t)}},D.enablekeyboard&&C.bind(a,$.isopera&&!$.isopera12?"keypress":"keydown",C.onkeypress),C.bind(a,"keydown",function(t){t.ctrlKey&&(C.wheelprevented=!0)}),C.bind(a,"keyup",function(t){t.ctrlKey||(C.wheelprevented=!1)}),C.bind(l,"blur",function(t){C.wheelprevented=!1}),C.bind(l,"resize",C.onscreenresize),C.bind(l,"orientationchange",C.onscreenresize),C.bind(l,"load",C.lazyResize),$.ischrome&&!C.ispage&&!C.haswrapper){var M=C.win.attr("style"),L=parseFloat(C.win.css("width"))+1;C.win.css("width",L),C.synched("chromefix",function(){C.win.attr("style",M)})}if(C.onAttributeChange=function(t){C.lazyResize(C.isieold?250:30)},D.enableobserver&&(C.isie11||!1===f||(C.observerbody=new f(function(t){if(t.forEach(function(t){if("attributes"==t.type)return S.hasClass("modal-open")&&S.hasClass("modal-dialog")&&!r.contains(r(".modal-dialog")[0],C.doc[0])?C.hide():C.show()}),C.me.clientWidth!=C.page.width||C.me.clientHeight!=C.page.height)return C.lazyResize(30)}),C.observerbody.observe(a.body,{childList:!0,subtree:!0,characterData:!1,attributes:!0,attributeFilter:["class"]})),!C.ispage&&!C.haswrapper)){var N=C.win[0];!1!==f?(C.observer=new f(function(t){t.forEach(C.onAttributeChange)}),C.observer.observe(N,{childList:!0,characterData:!1,attributes:!0,subtree:!1}),C.observerremover=new f(function(t){t.forEach(function(t){if(t.removedNodes.length>0)for(var e in t.removedNodes)if(C&&t.removedNodes[e]===N)return C.remove()})}),C.observerremover.observe(N.parentNode,{childList:!0,characterData:!1,attributes:!1,subtree:!1})):(C.bind(N,$.isie&&!$.isie9?"propertychange":"DOMAttrModified",C.onAttributeChange),$.isie9&&N.attachEvent("onpropertychange",C.onAttributeChange),C.bind(N,"DOMNodeRemoved",function(t){t.target===N&&C.remove()}))}!C.ispage&&D.boxzoom&&C.bind(l,"resize",C.resizeZoom),C.istextarea&&(C.bind(C.win,"keydown",C.lazyResize),C.bind(C.win,"mouseup",C.lazyResize)),C.lazyResize(30)}if("IFRAME"==this.doc[0].nodeName){var A=function(){var e;C.iframexd=!1;try{(e="contentDocument"in this?this.contentDocument:this.contentWindow._doc).domain}catch(t){C.iframexd=!0,e=!1}if(C.iframexd)return"console"in l&&console.log("NiceScroll error: policy restriced iframe"),!0;if(C.forcescreen=!0,C.isiframe&&(C.iframe={doc:r(e),html:C.doc.contents().find("html")[0],body:C.doc.contents().find("body")[0]},C.getContentSize=function(){return{w:Math.max(C.iframe.html.scrollWidth,C.iframe.body.scrollWidth),h:Math.max(C.iframe.html.scrollHeight,C.iframe.body.scrollHeight)}},C.docscroll=r(C.iframe.body)),!$.isios&&D.iframeautoresize&&!C.isiframe){C.win.scrollTop(0),C.doc.height("");var i=Math.max(e.getElementsByTagName("html")[0].scrollHeight,e.body.scrollHeight);C.doc.height(i)}C.lazyResize(30),C.css(r(C.iframe.body),t),$.isios&&C.haswrapper&&C.css(r(e.body),{"-webkit-transform":"translate3d(0,0,0)"}),"contentWindow"in this?C.bind(this.contentWindow,"scroll",C.onscroll):C.bind(e,"scroll",C.onscroll),D.enablemousewheel&&C.mousewheel(e,C.onmousewheel),D.enablekeyboard&&C.bind(e,$.isopera?"keypress":"keydown",C.onkeypress),$.cantouch?(C.bind(e,"touchstart",C.ontouchstart),C.bind(e,"touchmove",C.ontouchmove)):D.emulatetouch&&(C.bind(e,"mousedown",C.ontouchstart),C.bind(e,"mousemove",function(t){return C.ontouchmove(t,!0)}),D.grabcursorenabled&&$.cursorgrabvalue&&C.css(r(e.body),{cursor:$.cursorgrabvalue})),C.bind(e,"mouseup",C.ontouchend),C.zoom&&(D.dblclickzoom&&C.bind(e,"dblclick",C.doZoom),C.ongesturezoom&&C.bind(e,"gestureend",C.ongesturezoom))};this.doc[0].readyState&&"complete"===this.doc[0].readyState&&setTimeout(function(){A.call(C.doc[0],!1)},500),C.bind(this.doc,"load",A)}},this.showCursor=function(t,e){if(C.cursortimeout&&(clearTimeout(C.cursortimeout),C.cursortimeout=0),C.rail){if(C.autohidedom&&(C.autohidedom.stop().css({opacity:D.cursoropacitymax}),C.cursoractive=!0),C.rail.drag&&1==C.rail.drag.pt||(void 0!==t&&!1!==t&&(C.scroll.y=t/C.scrollratio.y|0),void 0!==e&&(C.scroll.x=e/C.scrollratio.x|0)),C.cursor.css({height:C.cursorheight,top:C.scroll.y}),C.cursorh){var i=C.hasreversehr?C.scrollvaluemaxw-C.scroll.x:C.scroll.x;C.cursorh.css({width:C.cursorwidth,left:!C.rail.align&&C.rail.visibility?i+C.rail.width:i}),C.cursoractive=!0}C.zoom&&C.zoom.stop().css({opacity:D.cursoropacitymax})}},this.hideCursor=function(t){C.cursortimeout||C.rail&&C.autohidedom&&(C.hasmousefocus&&"leave"===D.autohidemode||(C.cursortimeout=setTimeout(function(){C.rail.active&&C.showonmouseevent||(C.autohidedom.stop().animate({opacity:D.cursoropacitymin}),C.zoom&&C.zoom.stop().animate({opacity:D.cursoropacitymin}),C.cursoractive=!1),C.cursortimeout=0},t||D.hidecursordelay)))},this.noticeCursor=function(t,e,i){C.showCursor(e,i),C.rail.active||C.hideCursor(t)},this.getContentSize=C.ispage?function(){return{w:Math.max(a.body.scrollWidth,a.documentElement.scrollWidth),h:Math.max(a.body.scrollHeight,a.documentElement.scrollHeight)}}:C.haswrapper?function(){return{w:C.doc[0].offsetWidth,h:C.doc[0].offsetHeight}}:function(){return{w:C.docscroll[0].scrollWidth,h:C.docscroll[0].scrollHeight}},this.onResize=function(t,e){if(!C||!C.win)return!1;var i=C.page.maxh,n=C.page.maxw,o=C.view.h,s=C.view.w;if(C.view={w:C.ispage?C.win.width():C.win[0].clientWidth,h:C.ispage?C.win.height():C.win[0].clientHeight},C.page=e||C.getContentSize(),C.page.maxh=Math.max(0,C.page.h-C.view.h),C.page.maxw=Math.max(0,C.page.w-C.view.w),C.page.maxh==i&&C.page.maxw==n&&C.view.w==s&&C.view.h==o){if(C.ispage)return C;var r=C.win.offset();if(C.lastposition){var a=C.lastposition;if(a.top==r.top&&a.left==r.left)return C}C.lastposition=r}return 0===C.page.maxh?(C.hideRail(),C.scrollvaluemax=0,C.scroll.y=0,C.scrollratio.y=0,C.cursorheight=0,C.setScrollTop(0),C.rail&&(C.rail.scrollable=!1)):(C.page.maxh-=D.railpadding.top+D.railpadding.bottom,C.rail.scrollable=!0),0===C.page.maxw?(C.hideRailHr(),C.scrollvaluemaxw=0,C.scroll.x=0,C.scrollratio.x=0,C.cursorwidth=0,C.setScrollLeft(0),C.railh&&(C.railh.scrollable=!1)):(C.page.maxw-=D.railpadding.left+D.railpadding.right,C.railh&&(C.railh.scrollable=D.horizrailenabled)),C.railslocked=C.locked||0===C.page.maxh&&0===C.page.maxw,C.railslocked?(C.ispage||C.updateScrollBar(C.view),!1):(C.hidden||(C.rail.visibility||C.showRail(),C.railh&&!C.railh.visibility&&C.showRailHr()),C.istextarea&&C.win.css("resize")&&"none"!=C.win.css("resize")&&(C.view.h-=20),C.cursorheight=Math.min(C.view.h,Math.round(C.view.h*(C.view.h/C.page.h))),C.cursorheight=D.cursorfixedheight?D.cursorfixedheight:Math.max(D.cursorminheight,C.cursorheight),C.cursorwidth=Math.min(C.view.w,Math.round(C.view.w*(C.view.w/C.page.w))),C.cursorwidth=D.cursorfixedheight?D.cursorfixedheight:Math.max(D.cursorminheight,C.cursorwidth),C.scrollvaluemax=C.view.h-C.cursorheight-(D.railpadding.top+D.railpadding.bottom),C.hasborderbox||(C.scrollvaluemax-=C.cursor[0].offsetHeight-C.cursor[0].clientHeight),C.railh&&(C.railh.width=C.page.maxh>0?C.view.w-C.rail.width:C.view.w,C.scrollvaluemaxw=C.railh.width-C.cursorwidth-(D.railpadding.left+D.railpadding.right)),C.ispage||C.updateScrollBar(C.view),C.scrollratio={x:C.page.maxw/C.scrollvaluemaxw,y:C.page.maxh/C.scrollvaluemax},C.getScrollTop()>C.page.maxh?C.doScrollTop(C.page.maxh):(C.scroll.y=C.getScrollTop()/C.scrollratio.y|0,C.scroll.x=C.getScrollLeft()/C.scrollratio.x|0,C.cursoractive&&C.noticeCursor()),C.scroll.y&&0===C.getScrollTop()&&C.doScrollTo(C.scroll.y*C.scrollratio.y|0),C)},this.resize=C.onResize;var O=0;this.onscreenresize=function(t){clearTimeout(O);var e=!C.ispage&&!C.haswrapper;e&&C.hideRails(),O=setTimeout(function(){C&&(e&&C.showRails(),C.resize()),O=0},120)},this.lazyResize=function(t){return clearTimeout(O),t=isNaN(t)?240:t,O=setTimeout(function(){C&&C.resize(),O=0},t),C},this.jqbind=function(t,e,i){C.events.push({e:t,n:e,f:i,q:!0}),r(t).on(e,i)},this.mousewheel=function(t,e,i){var n="jquery"in t?t[0]:t;if("onwheel"in a.createElement("div"))C._bind(n,"wheel",e,i||!1);else{var o=void 0!==a.onmousewheel?"mousewheel":"DOMMouseScroll";x(n,o,e,i||!1),"DOMMouseScroll"==o&&x(n,"MozMousePixelScroll",e,i||!1)}};var j=!1;if($.haseventlistener){try{var I=Object.defineProperty({},"passive",{get:function(){j=!0}});l.addEventListener("test",null,I)}catch(t){}this.stopPropagation=function(t){return!!t&&((t=t.original?t.original:t).stopPropagation(),!1)},this.cancelEvent=function(t){return t.cancelable&&t.preventDefault(),t.stopImmediatePropagation(),t.preventManipulation&&t.preventManipulation(),!1}}else Event.prototype.preventDefault=function(){this.returnValue=!1},Event.prototype.stopPropagation=function(){this.cancelBubble=!0},l.constructor.prototype.addEventListener=a.constructor.prototype.addEventListener=Element.prototype.addEventListener=function(t,e,i){this.attachEvent("on"+t,e)},l.constructor.prototype.removeEventListener=a.constructor.prototype.removeEventListener=Element.prototype.removeEventListener=function(t,e,i){this.detachEvent("on"+t,e)},this.cancelEvent=function(t){return(t=t||l.event)&&(t.cancelBubble=!0,t.cancel=!0,t.returnValue=!1),!1},this.stopPropagation=function(t){return(t=t||l.event)&&(t.cancelBubble=!0),!1};this.delegate=function(t,e,i,n,o){var s=u[e]||!1;s||(s={a:[],l:[],f:function(t){for(var e=s.l,i=!1,n=e.length-1;n>=0;n--)if(!1===(i=e[n].call(t.target,t)))return!1;return i}},C.bind(t,e,s.f,n,o),u[e]=s),C.ispage?(s.a=[C.id].concat(s.a),s.l=[i].concat(s.l)):(s.a.push(C.id),s.l.push(i))},this.undelegate=function(t,e,i,n,o){var s=u[e]||!1;if(s&&s.l)for(var r=0,a=s.l.length;r<a;r++)s.a[r]===C.id&&(s.a.splice(r),s.l.splice(r),0===s.a.length&&(C._unbind(t,e,s.l.f),u[e]=null))},this.bind=function(t,e,i,n,o){var s="jquery"in t?t[0]:t;C._bind(s,e,i,n||!1,o||!1)},this._bind=function(t,e,i,n,o){C.events.push({e:t,n:e,f:i,b:n,q:!1}),j&&o?t.addEventListener(e,i,{passive:!1,capture:n}):t.addEventListener(e,i,n||!1)},this._unbind=function(t,e,i,n){u[e]?C.undelegate(t,e,i,n):t.removeEventListener(e,i,n)},this.unbindAll=function(){for(var t=0;t<C.events.length;t++){var e=C.events[t];e.q?e.e.unbind(e.n,e.f):C._unbind(e.e,e.n,e.f,e.b)}},this.showRails=function(){return C.showRail().showRailHr()},this.showRail=function(){return 0===C.page.maxh||!C.ispage&&"none"==C.win.css("display")||(C.rail.visibility=!0,C.rail.css("display","block")),C},this.showRailHr=function(){return C.railh&&(0===C.page.maxw||!C.ispage&&"none"==C.win.css("display")||(C.railh.visibility=!0,C.railh.css("display","block"))),C},this.hideRails=function(){return C.hideRail().hideRailHr()},this.hideRail=function(){return C.rail.visibility=!1,C.rail.css("display","none"),C},this.hideRailHr=function(){return C.railh&&(C.railh.visibility=!1,C.railh.css("display","none")),C},this.show=function(){return C.hidden=!1,C.railslocked=!1,C.showRails()},this.hide=function(){return C.hidden=!0,C.railslocked=!0,C.hideRails()},this.toggle=function(){return C.hidden?C.show():C.hide()},this.remove=function(){for(var t in C.stop(),C.cursortimeout&&clearTimeout(C.cursortimeout),C.delaylist)C.delaylist[t]&&h(C.delaylist[t].h);C.doZoomOut(),C.unbindAll(),$.isie9&&C.win[0].detachEvent("onpropertychange",C.onAttributeChange),!1!==C.observer&&C.observer.disconnect(),!1!==C.observerremover&&C.observerremover.disconnect(),!1!==C.observerbody&&C.observerbody.disconnect(),C.events=null,C.cursor&&C.cursor.remove(),C.cursorh&&C.cursorh.remove(),C.rail&&C.rail.remove(),C.railh&&C.railh.remove(),C.zoom&&C.zoom.remove();for(var e=0;e<C.saved.css.length;e++){var i=C.saved.css[e];i[0].css(i[1],void 0===i[2]?"":i[2])}C.saved=!1,C.me.data("__nicescroll","");var n=r.nicescroll;for(var o in n.each(function(t){if(this&&this.id===C.id){delete n[t];for(var e=++t;e<n.length;e++,t++)n[t]=n[e];--n.length&&delete n[n.length]}}),C)C[o]=null,delete C[o];C=null},this.scrollstart=function(t){return this.onscrollstart=t,C},this.scrollend=function(t){return this.onscrollend=t,C},this.scrollcancel=function(t){return this.onscrollcancel=t,C},this.zoomin=function(t){return this.onzoomin=t,C},this.zoomout=function(t){return this.onzoomout=t,C},this.isScrollable=function(t){var e=t.target?t.target:t;if("OPTION"==e.nodeName)return!0;for(;e&&1==e.nodeType&&e!==this.me[0]&&!/^BODY|HTML/.test(e.nodeName);){var i=r(e),n=i.css("overflowY")||i.css("overflowX")||i.css("overflow")||"";if(/scroll|auto/.test(n))return e.clientHeight!=e.scrollHeight;e=!!e.parentNode&&e.parentNode}return!1},this.getViewport=function(t){for(var e=!(!t||!t.parentNode)&&t.parentNode;e&&1==e.nodeType&&!/^BODY|HTML/.test(e.nodeName);){var i=r(e);if(/fixed|absolute/.test(i.css("position")))return i;var n=i.css("overflowY")||i.css("overflowX")||i.css("overflow")||"";if(/scroll|auto/.test(n)&&e.clientHeight!=e.scrollHeight)return i;if(i.getNiceScroll().length>0)return i;e=!!e.parentNode&&e.parentNode}return!1},this.triggerScrollStart=function(t,e,i,n,o){if(C.onscrollstart){var s={type:"scrollstart",current:{x:t,y:e},request:{x:i,y:n},end:{x:C.newscrollx,y:C.newscrolly},speed:o};C.onscrollstart.call(C,s)}},this.triggerScrollEnd=function(){if(C.onscrollend){var t=C.getScrollLeft(),e=C.getScrollTop(),i={type:"scrollend",current:{x:t,y:e},end:{x:t,y:e}};C.onscrollend.call(C,i)}};var H=0,P=0,R=0,F=1,_=!1;if(this.onmousewheel=function(t){if(C.wheelprevented||C.locked)return!1;if(C.railslocked)return C.debounced("checkunlock",C.resize,250),!1;if(C.rail.drag)return C.cancelEvent(t);if("auto"===D.oneaxismousemode&&0!==t.deltaX&&(D.oneaxismousemode=!1),D.oneaxismousemode&&0===t.deltaX&&!C.rail.scrollable)return!C.railh||!C.railh.scrollable||C.onmousewheelhr(t);var e=m(),i=!1;if(D.preservenativescrolling&&C.checkarea+600<e&&(C.nativescrollingarea=C.isScrollable(t),i=!0),C.checkarea=e,C.nativescrollingarea)return!0;var n=k(t,!1,i);return n&&(C.checkarea=0),n},this.onmousewheelhr=function(t){if(!C.wheelprevented){if(C.railslocked||!C.railh.scrollable)return!0;if(C.rail.drag)return C.cancelEvent(t);var e=m(),i=!1;return D.preservenativescrolling&&C.checkarea+600<e&&(C.nativescrollingarea=C.isScrollable(t),i=!0),C.checkarea=e,!!C.nativescrollingarea||(C.railslocked?C.cancelEvent(t):k(t,!0,i))}},this.stop=function(){return C.cancelScroll(),C.scrollmon&&C.scrollmon.stop(),C.cursorfreezed=!1,C.scroll.y=Math.round(C.getScrollTop()*(1/C.scrollratio.y)),C.noticeCursor(),C},this.getTransitionSpeed=function(t){return 80+t/72*D.scrollspeed|0},D.smoothscroll)if(C.ishwscroll&&$.hastransition&&D.usetransition&&D.smoothscroll){var q="";this.resetTransition=function(){q="",C.doc.css($.prefixstyle+"transition-duration","0ms")},this.prepareTransition=function(t,e){var i=e?t:C.getTransitionSpeed(t),n=i+"ms";return q!==n&&(q=n,C.doc.css($.prefixstyle+"transition-duration",n)),i},this.doScrollLeft=function(t,e){var i=C.scrollrunning?C.newscrolly:C.getScrollTop();C.doScrollPos(t,i,e)},this.doScrollTop=function(t,e){var i=C.scrollrunning?C.newscrollx:C.getScrollLeft();C.doScrollPos(i,t,e)},this.cursorupdate={running:!1,start:function(){var t=this;if(!t.running){t.running=!0;var e=function(){t.running&&d(e),C.showCursor(C.getScrollTop(),C.getScrollLeft()),C.notifyScrollEvent(C.win[0])};d(e)}},stop:function(){this.running=!1}},this.doScrollPos=function(t,e,i){var n=C.getScrollTop(),o=C.getScrollLeft();if(((C.newscrolly-n)*(e-n)<0||(C.newscrollx-o)*(t-o)<0)&&C.cancelScroll(),D.bouncescroll?(e<0?e=e/2|0:e>C.page.maxh&&(e=C.page.maxh+(e-C.page.maxh)/2|0),t<0?t=t/2|0:t>C.page.maxw&&(t=C.page.maxw+(t-C.page.maxw)/2|0)):(e<0?e=0:e>C.page.maxh&&(e=C.page.maxh),t<0?t=0:t>C.page.maxw&&(t=C.page.maxw)),C.scrollrunning&&t==C.newscrollx&&e==C.newscrolly)return!1;C.newscrolly=e,C.newscrollx=t;var s=C.getScrollTop(),r=C.getScrollLeft(),a={};a.x=t-r,a.y=e-s;var l=0|Math.sqrt(a.x*a.x+a.y*a.y),c=C.prepareTransition(l);C.scrollrunning||(C.scrollrunning=!0,C.triggerScrollStart(r,s,t,e,c),C.cursorupdate.start()),C.scrollendtrapped=!0,$.transitionend||(C.scrollendtrapped&&clearTimeout(C.scrollendtrapped),C.scrollendtrapped=setTimeout(C.onScrollTransitionEnd,c)),C.setScrollTop(C.newscrolly),C.setScrollLeft(C.newscrollx)},this.cancelScroll=function(){if(!C.scrollendtrapped)return!0;var t=C.getScrollTop(),e=C.getScrollLeft();return C.scrollrunning=!1,$.transitionend||clearTimeout($.transitionend),C.scrollendtrapped=!1,C.resetTransition(),C.setScrollTop(t),C.railh&&C.setScrollLeft(e),C.timerscroll&&C.timerscroll.tm&&clearInterval(C.timerscroll.tm),C.timerscroll=!1,C.cursorfreezed=!1,C.cursorupdate.stop(),C.showCursor(t,e),C},this.onScrollTransitionEnd=function(){if(C.scrollendtrapped){var t=C.getScrollTop(),e=C.getScrollLeft();if(t<0?t=0:t>C.page.maxh&&(t=C.page.maxh),e<0?e=0:e>C.page.maxw&&(e=C.page.maxw),t!=C.newscrolly||e!=C.newscrollx)return C.doScrollPos(e,t,D.snapbackspeed);C.scrollrunning&&C.triggerScrollEnd(),C.scrollrunning=!1,C.scrollendtrapped=!1,C.resetTransition(),C.timerscroll=!1,C.setScrollTop(t),C.railh&&C.setScrollLeft(e),C.cursorupdate.stop(),C.noticeCursor(!1,t,e),C.cursorfreezed=!1}}}else this.doScrollLeft=function(t,e){var i=C.scrollrunning?C.newscrolly:C.getScrollTop();C.doScrollPos(t,i,e)},this.doScrollTop=function(t,e){var i=C.scrollrunning?C.newscrollx:C.getScrollLeft();C.doScrollPos(i,t,e)},this.doScrollPos=function(t,e,i){var n=C.getScrollTop(),o=C.getScrollLeft();((C.newscrolly-n)*(e-n)<0||(C.newscrollx-o)*(t-o)<0)&&C.cancelScroll();var s=!1;if(C.bouncescroll&&C.rail.visibility||(e<0?(e=0,s=!0):e>C.page.maxh&&(e=C.page.maxh,s=!0)),C.bouncescroll&&C.railh.visibility||(t<0?(t=0,s=!0):t>C.page.maxw&&(t=C.page.maxw,s=!0)),C.scrollrunning&&C.newscrolly===e&&C.newscrollx===t)return!0;C.newscrolly=e,C.newscrollx=t,C.dst={},C.dst.x=t-o,C.dst.y=e-n,C.dst.px=o,C.dst.py=n;var r=0|Math.sqrt(C.dst.x*C.dst.x+C.dst.y*C.dst.y),a=C.getTransitionSpeed(r);C.bzscroll={};var l=s?1:.58;C.bzscroll.x=new N(o,C.newscrollx,a,0,0,l,1),C.bzscroll.y=new N(n,C.newscrolly,a,0,0,l,1),m();var c=function(){if(C.scrollrunning){var t=C.bzscroll.y.getPos();C.setScrollLeft(C.bzscroll.x.getNow()),C.setScrollTop(C.bzscroll.y.getNow()),t<=1?C.timer=d(c):(C.scrollrunning=!1,C.timer=0,C.triggerScrollEnd())}};C.scrollrunning||(C.triggerScrollStart(o,n,t,e,a),C.scrollrunning=!0,C.timer=d(c))},this.cancelScroll=function(){return C.timer&&h(C.timer),C.timer=0,C.bzscroll=!1,C.scrollrunning=!1,C};else this.doScrollLeft=function(t,e){var i=C.getScrollTop();C.doScrollPos(t,i,e)},this.doScrollTop=function(t,e){var i=C.getScrollLeft();C.doScrollPos(i,t,e)},this.doScrollPos=function(t,e,i){var n=t>C.page.maxw?C.page.maxw:t;n<0&&(n=0);var o=e>C.page.maxh?C.page.maxh:e;o<0&&(o=0),C.synched("scroll",function(){C.setScrollTop(o),C.setScrollLeft(n)})},this.cancelScroll=function(){};this.doScrollBy=function(t,e){T(0,t)},this.doScrollLeftBy=function(t,e){T(t,0)},this.doScrollTo=function(t,e){var i=e?Math.round(t*C.scrollratio.y):t;i<0?i=0:i>C.page.maxh&&(i=C.page.maxh),C.cursorfreezed=!1,C.doScrollTop(t)},this.checkContentSize=function(){var t=C.getContentSize();t.h==C.page.h&&t.w==C.page.w||C.resize(!1,t)},C.onscroll=function(t){C.rail.drag||C.cursorfreezed||C.synched("scroll",function(){C.scroll.y=Math.round(C.getScrollTop()/C.scrollratio.y),C.railh&&(C.scroll.x=Math.round(C.getScrollLeft()/C.scrollratio.x)),C.noticeCursor()})},C.bind(C.docscroll,"scroll",C.onscroll),this.doZoomIn=function(t){if(!C.zoomactive){C.zoomactive=!0,C.zoomrestore={style:{}};var e=["position","top","left","zIndex","backgroundColor","marginTop","marginBottom","marginLeft","marginRight"],i=C.win[0].style;for(var n in e){var o=e[n];C.zoomrestore.style[o]=void 0!==i[o]?i[o]:""}C.zoomrestore.style.width=C.win.css("width"),C.zoomrestore.style.height=C.win.css("height"),C.zoomrestore.padding={w:C.win.outerWidth()-C.win.width(),h:C.win.outerHeight()-C.win.height()},$.isios4&&(C.zoomrestore.scrollTop=c.scrollTop(),c.scrollTop(0)),C.win.css({position:$.isios4?"absolute":"fixed",top:0,left:0,zIndex:s+100,margin:0});var r=C.win.css("backgroundColor");return(""===r||/transparent|rgba\(0, 0, 0, 0\)|rgba\(0,0,0,0\)/.test(r))&&C.win.css("backgroundColor","#fff"),C.rail.css({zIndex:s+101}),C.zoom.css({zIndex:s+102}),C.zoom.css("backgroundPosition","0 -18px"),C.resizeZoom(),C.onzoomin&&C.onzoomin.call(C),C.cancelEvent(t)}},this.doZoomOut=function(t){if(C.zoomactive)return C.zoomactive=!1,C.win.css("margin",""),C.win.css(C.zoomrestore.style),$.isios4&&c.scrollTop(C.zoomrestore.scrollTop),C.rail.css({"z-index":C.zindex}),C.zoom.css({"z-index":C.zindex}),C.zoomrestore=!1,C.zoom.css("backgroundPosition","0 0"),C.onResize(),C.onzoomout&&C.onzoomout.call(C),C.cancelEvent(t)},this.doZoom=function(t){return C.zoomactive?C.doZoomOut(t):C.doZoomIn(t)},this.resizeZoom=function(){if(C.zoomactive){var t=C.getScrollTop();C.win.css({width:c.width()-C.zoomrestore.padding.w+"px",height:c.height()-C.zoomrestore.padding.h+"px"}),C.onResize(),C.setScrollTop(Math.min(C.page.maxh,t))}},this.init(),r.nicescroll.push(this)},w=function(t){var e=this;this.nc=t,this.lastx=0,this.lasty=0,this.speedx=0,this.speedy=0,this.lasttime=0,this.steptime=0,this.snapx=!1,this.snapy=!1,this.demulx=0,this.demuly=0,this.lastscrollx=-1,this.lastscrolly=-1,this.chkx=0,this.chky=0,this.timer=0,this.reset=function(t,i){e.stop(),e.steptime=0,e.lasttime=m(),e.speedx=0,e.speedy=0,e.lastx=t,e.lasty=i,e.lastscrollx=-1,e.lastscrolly=-1},this.update=function(t,i){var n=m();e.steptime=n-e.lasttime,e.lasttime=n;var o=i-e.lasty,s=t-e.lastx,r=e.nc.getScrollTop()+o,a=e.nc.getScrollLeft()+s;e.snapx=a<0||a>e.nc.page.maxw,e.snapy=r<0||r>e.nc.page.maxh,e.speedx=s,e.speedy=o,e.lastx=t,e.lasty=i},this.stop=function(){e.nc.unsynched("domomentum2d"),e.timer&&clearTimeout(e.timer),e.timer=0,e.lastscrollx=-1,e.lastscrolly=-1},this.doSnapy=function(t,i){var n=!1;i<0?(i=0,n=!0):i>e.nc.page.maxh&&(i=e.nc.page.maxh,n=!0),t<0?(t=0,n=!0):t>e.nc.page.maxw&&(t=e.nc.page.maxw,n=!0),n?e.nc.doScrollPos(t,i,e.nc.opt.snapbackspeed):e.nc.triggerScrollEnd()},this.doMomentum=function(t){var i=m(),n=t?i+t:e.lasttime,o=e.nc.getScrollLeft(),s=e.nc.getScrollTop(),r=e.nc.page.maxh,a=e.nc.page.maxw;e.speedx=a>0?Math.min(60,e.speedx):0,e.speedy=r>0?Math.min(60,e.speedy):0;var l=n&&i-n<=60;(s<0||s>r||o<0||o>a)&&(l=!1);var c=!(!e.speedy||!l)&&e.speedy,u=!(!e.speedx||!l)&&e.speedx;if(c||u){var d=Math.max(16,e.steptime);if(d>50){var h=d/50;e.speedx*=h,e.speedy*=h,d=50}e.demulxy=0,e.lastscrollx=e.nc.getScrollLeft(),e.chkx=e.lastscrollx,e.lastscrolly=e.nc.getScrollTop(),e.chky=e.lastscrolly;var p=e.lastscrollx,f=e.lastscrolly,v=function(){var t=m()-i>600?.04:.02;e.speedx&&(p=Math.floor(e.lastscrollx-e.speedx*(1-e.demulxy)),e.lastscrollx=p,(p<0||p>a)&&(t=.1)),e.speedy&&(f=Math.floor(e.lastscrolly-e.speedy*(1-e.demulxy)),e.lastscrolly=f,(f<0||f>r)&&(t=.1)),e.demulxy=Math.min(1,e.demulxy+t),e.nc.synched("domomentum2d",function(){e.speedx&&(e.nc.getScrollLeft(),e.chkx=p,e.nc.setScrollLeft(p)),e.speedy&&(e.nc.getScrollTop(),e.chky=f,e.nc.setScrollTop(f)),e.timer||(e.nc.hideCursor(),e.doSnapy(p,f))}),e.demulxy<1?e.timer=setTimeout(v,d):(e.stop(),e.nc.hideCursor(),e.doSnapy(p,f))};v()}else e.doSnapy(e.nc.getScrollLeft(),e.nc.getScrollTop())}},x=t.fn.scrollTop;t.cssHooks.pageYOffset={get:function(t,e,i){var n=r.data(t,"__nicescroll")||!1;return n&&n.ishwscroll?n.getScrollTop():x.call(t)},set:function(t,e){var i=r.data(t,"__nicescroll")||!1;return i&&i.ishwscroll?i.setScrollTop(parseInt(e)):x.call(t,e),this}},t.fn.scrollTop=function(t){if(void 0===t){var e=!!this[0]&&(r.data(this[0],"__nicescroll")||!1);return e&&e.ishwscroll?e.getScrollTop():x.call(this)}return this.each(function(){var e=r.data(this,"__nicescroll")||!1;e&&e.ishwscroll?e.setScrollTop(parseInt(t)):x.call(r(this),t)})};var T=t.fn.scrollLeft;r.cssHooks.pageXOffset={get:function(t,e,i){var n=r.data(t,"__nicescroll")||!1;return n&&n.ishwscroll?n.getScrollLeft():T.call(t)},set:function(t,e){var i=r.data(t,"__nicescroll")||!1;return i&&i.ishwscroll?i.setScrollLeft(parseInt(e)):T.call(t,e),this}},t.fn.scrollLeft=function(t){if(void 0===t){var e=!!this[0]&&(r.data(this[0],"__nicescroll")||!1);return e&&e.ishwscroll?e.getScrollLeft():T.call(this)}return this.each(function(){var e=r.data(this,"__nicescroll")||!1;e&&e.ishwscroll?e.setScrollLeft(parseInt(t)):T.call(r(this),t)})};var k=function(t){var e=this;if(this.length=0,this.name="nicescrollarray",this.each=function(t){return r.each(e,t),e},this.push=function(t){e[e.length]=t,e.length++},this.eq=function(t){return e[t]},t)for(var i=0;i<t.length;i++){var n=r.data(t[i],"__nicescroll")||!1;n&&(this[this.length]=n,this.length++)}return this};!function(t,e,i){for(var n=0,o=e.length;n<o;n++)i(t,e[n])}(k.prototype,["show","hide","toggle","onResize","resize","remove","stop","doScrollPos"],function(t,e){t[e]=function(){var t=arguments;return this.each(function(){this[e].apply(this,t)})}}),t.fn.getNiceScroll=function(t){return void 0===t?new k(this):this[t]&&r.data(this[t],"__nicescroll")||!1},(t.expr.pseudos||t.expr[":"]).nicescroll=function(t){return void 0!==r.data(t,"__nicescroll")},r.fn.niceScroll=function(t,e){void 0!==e||"object"!=typeof t||"jquery"in t||(e=t,t=!1);var i=new k;return this.each(function(){var n=r(this),o=r.extend({},e);if(t){var s=r(t);o.doc=s.length>1?r(t,n):s,o.win=n}!("doc"in o)||"win"in o||(o.win=n);var a=n.data("__nicescroll")||!1;a||(o.doc=o.doc||n,a=new b(o,n),n.data("__nicescroll",a)),i.push(a)}),1===i.length?i[0]:i},l.NiceScroll={getjQuery:function(){return t}},r.nicescroll||(r.nicescroll=new k,r.nicescroll.options=v)})?n.apply(e,o):n)||(t.exports=s)}]);