PageSourceSearch

https://www.udalsarea2030.eus/bundles/scripts?v=S85d_5RfwiakuQpGu3licBJzxNIs37zAdqE89sN9MpQ1

js udalsarea2030.eus collected 2026-10-08 09:45:15 UTC 728,844 bytes, 18,970 lines download raw bytes

1/* Minification failed. Returning unminified contents.
2(18727,1283-1284): run-time error JS1300: Strict-mode does not allow assignment to undefined variables: j
3(18727,1298-1299): run-time error JS1294: Strict-mode does not allow ++ or -- on certain objects: j
4 */
5/*! jQuery v3.1.1 | (c) jQuery Foundation | jquery.org/license */
vendor: 30,769 bytes, lines 5-6
5
6!function(a,b){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){"use strict";var c=[],d=a.document,e=Object.getPrototypeOf,f=c.slice,g=c.concat,h=c.push,i=c.indexOf,j={},k=j.toString,l=j.hasOwnProperty,m=l.toString,n=m.call(Object),o={};function p(a,b){b=b||d;var c=b.createElement("script");c.text=a,b.head.appendChild(c).parentNode.removeChild(c)}var q="3.1.1",r=function(a,b){return new r.fn.init(a,b)},s=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,t=/^-ms-/,u=/-([a-z])/g,v=function(a,b){return b.toUpperCase()};r.fn=r.prototype={jquery:q,constructor:r,length:0,toArray:function(){return f.call(this)},get:function(a){return null==a?f.call(this):a<0?this[a+this.length]:this[a]},pushStack:function(a){var b=r.merge(this.constructor(),a);return b.prevObject=this,b},each:function(a){return r.each(this,a)},map:function(a){return this.pushStack(r.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(f.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(a<0?b:0);return this.pushStack(c>=0&&c<b?[this[c]]:[])},end:function(){return this.prevObject||this.constructor()},push:h,sort:c.sort,splice:c.splice},r.extend=r.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||r.isFunction(g)||(g={}),h===i&&(g=this,h--);h<i;h++)if(null!=(a=arguments[h]))for(b in a)c=g[b],d=a[b],g!==d&&(j&&d&&(r.isPlainObject(d)||(e=r.isArray(d)))?(e?(e=!1,f=c&&r.isArray(c)?c:[]):f=c&&r.isPlainObject(c)?c:{},g[b]=r.extend(j,f,d)):void 0!==d&&(g[b]=d));return g},r.extend({expando:"jQuery"+(q+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===r.type(a)},isArray:Array.isArray,isWindow:function(a){return null!=a&&a===a.window},isNumeric:function(a){var b=r.type(a);return("number"===b||"string"===b)&&!isNaN(a-parseFloat(a))},isPlainObject:function(a){var b,c;return!(!a||"[object Object]"!==k.call(a))&&(!(b=e(a))||(c=l.call(b,"constructor")&&b.constructor,"function"==typeof c&&m.call(c)===n))},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?j[k.call(a)]||"object":typeof a},globalEval:function(a){p(a)},camelCase:function(a){return a.replace(t,"ms-").replace(u,v)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b){var c,d=0;if(w(a)){for(c=a.length;d<c;d++)if(b.call(a[d],d,a[d])===!1)break}else for(d in a)if(b.call(a[d],d,a[d])===!1)break;return a},trim:function(a){return null==a?"":(a+"").replace(s,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(w(Object(a))?r.merge(c,"string"==typeof a?[a]:a):h.call(c,a)),c},inArray:function(a,b,c){return null==b?-1:i.call(b,a,c)},merge:function(a,b){for(var c=+b.length,d=0,e=a.length;d<c;d++)a[e++]=b[d];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;f<g;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,c){var d,e,f=0,h=[];if(w(a))for(d=a.length;f<d;f++)e=b(a[f],f,c),null!=e&&h.push(e);else for(f in a)e=b(a[f],f,c),null!=e&&h.push(e);return g.apply([],h)},guid:1,proxy:function(a,b){var c,d,e;if("string"==typeof b&&(c=a[b],b=a,a=c),r.isFunction(a))return d=f.call(arguments,2),e=function(){return a.apply(b||this,d.concat(f.call(arguments)))},e.guid=a.guid=a.guid||r.guid++,e},now:Date.now,support:o}),"function"==typeof Symbol&&(r.fn[Symbol.iterator]=c[Symbol.iterator]),r.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(a,b){j["[object "+b+"]"]=b.toLowerCase()});function w(a){var b=!!a&&"length"in a&&a.length,c=r.type(a);return"function"!==c&&!r.isWindow(a)&&("array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a)}var x=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u="sizzle"+1*new Date,v=a.document,w=0,x=0,y=ha(),z=ha(),A=ha(),B=function(a,b){return a===b&&(l=!0),0},C={}.hasOwnProperty,D=[],E=D.pop,F=D.push,G=D.push,H=D.slice,I=function(a,b){for(var c=0,d=a.length;c<d;c++)if(a[c]===b)return c;return-1},J="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",K="[\\x20\\t\\r\\n\\f]",L="(?:\\\\.|[\\w-]|[^\0-\\xa0])+",M="\\["+K+"*("+L+")(?:"+K+"*([*^$|!~]?=)"+K+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+L+"))|)"+K+"*\\]",N=":("+L+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+M+")*)|.*)\\)|)",O=new RegExp(K+"+","g"),P=new RegExp("^"+K+"+|((?:^|[^\\\\])(?:\\\\.)*)"+K+"+$","g"),Q=new RegExp("^"+K+"*,"+K+"*"),R=new RegExp("^"+K+"*([>+~]|"+K+")"+K+"*"),S=new RegExp("="+K+"*([^\\]'\"]*?)"+K+"*\\]","g"),T=new RegExp(N),U=new RegExp("^"+L+"$"),V={ID:new RegExp("^#("+L+")"),CLASS:new RegExp("^\\.("+L+")"),TAG:new RegExp("^("+L+"|[*])"),ATTR:new RegExp("^"+M),PSEUDO:new RegExp("^"+N),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+K+"*(even|odd|(([+-]|)(\\d*)n|)"+K+"*(?:([+-]|)"+K+"*(\\d+)|))"+K+"*\\)|)","i"),bool:new RegExp("^(?:"+J+")$","i"),needsContext:new RegExp("^"+K+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+K+"*((?:-\\d)?\\d*)"+K+"*\\)|)(?=[^-]|$)","i")},W=/^(?:input|select|textarea|button)$/i,X=/^h\d$/i,Y=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,$=/[+~]/,_=new RegExp("\\\\([\\da-f]{1,6}"+K+"?|("+K+")|.)","ig"),aa=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:d<0?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)},ba=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ca=function(a,b){return b?"\0"===a?"\ufffd":a.slice(0,-1)+"\\"+a.charCodeAt(a.length-1).toString(16)+" ":"\\"+a},da=function(){m()},ea=ta(function(a){return a.disabled===!0&&("form"in a||"label"in a)},{dir:"parentNode",next:"legend"});try{G.apply(D=H.call(v.childNodes),v.childNodes),D[v.childNodes.length].nodeType}catch(fa){G={apply:D.length?function(a,b){F.apply(a,H.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function ga(a,b,d,e){var f,h,j,k,l,o,r,s=b&&b.ownerDocument,w=b?b.nodeType:9;if(d=d||[],"string"!=typeof a||!a||1!==w&&9!==w&&11!==w)return d;if(!e&&((b?b.ownerDocument||b:v)!==n&&m(b),b=b||n,p)){if(11!==w&&(l=Z.exec(a)))if(f=l[1]){if(9===w){if(!(j=b.getElementById(f)))return d;if(j.id===f)return d.push(j),d}else if(s&&(j=s.getElementById(f))&&t(b,j)&&j.id===f)return d.push(j),d}else{if(l[2])return G.apply(d,b.getElementsByTagName(a)),d;if((f=l[3])&&c.getElementsByClassName&&b.getElementsByClassName)return G.apply(d,b.getElementsByClassName(f)),d}if(c.qsa&&!A[a+" "]&&(!q||!q.test(a))){if(1!==w)s=b,r=a;else if("object"!==b.nodeName.toLowerCase()){(k=b.getAttribute("id"))?k=k.replace(ba,ca):b.setAttribute("id",k=u),o=g(a),h=o.length;while(h--)o[h]="#"+k+" "+sa(o[h]);r=o.join(","),s=$.test(a)&&qa(b.parentNode)||b}if(r)try{return G.apply(d,s.querySelectorAll(r)),d}catch(x){}finally{k===u&&b.removeAttribute("id")}}}return i(a.replace(P,"$1"),b,d,e)}function ha(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function ia(a){return a[u]=!0,a}function ja(a){var b=n.createElement("fieldset");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function ka(a,b){var c=a.split("|"),e=c.length;while(e--)d.attrHandle[c[e]]=b}function la(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&a.sourceIndex-b.sourceIndex;if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function ma(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function na(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function oa(a){return function(b){return"form"in b?b.parentNode&&b.disabled===!1?"label"in b?"label"in b.parentNode?b.parentNode.disabled===a:b.disabled===a:b.isDisabled===a||b.isDisabled!==!a&&ea(b)===a:b.disabled===a:"label"in b&&b.disabled===a}}function pa(a){return ia(function(b){return b=+b,ia(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function qa(a){return a&&"undefined"!=typeof a.getElementsByTagName&&a}c=ga.support={},f=ga.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return!!b&&"HTML"!==b.nodeName},m=ga.setDocument=function(a){var b,e,g=a?a.ownerDocument||a:v;return g!==n&&9===g.nodeType&&g.documentElement?(n=g,o=n.documentElement,p=!f(n),v!==n&&(e=n.defaultView)&&e.top!==e&&(e.addEventListener?e.addEventListener("unload",da,!1):e.attachEvent&&e.attachEvent("onunload",da)),c.attributes=ja(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=ja(function(a){return a.appendChild(n.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=Y.test(n.getElementsByClassName),c.getById=ja(function(a){return o.appendChild(a).id=u,!n.getElementsByName||!n.getElementsByName(u).length}),c.getById?(d.filter.ID=function(a){var b=a.replace(_,aa);return function(a){return a.getAttribute("id")===b}},d.find.ID=function(a,b){if("undefined"!=typeof b.getElementById&&p){var c=b.getElementById(a);return c?[c]:[]}}):(d.filter.ID=function(a){var b=a.replace(_,aa);return function(a){var c="undefined"!=typeof a.getAttributeNode&&a.getAttributeNode("id");return c&&c.value===b}},d.find.ID=function(a,b){if("undefined"!=typeof b.getElementById&&p){var c,d,e,f=b.getElementById(a);if(f){if(c=f.getAttributeNode("id"),c&&c.value===a)return[f];e=b.getElementsByName(a),d=0;while(f=e[d++])if(c=f.getAttributeNode("id"),c&&c.value===a)return[f]}return[]}}),d.find.TAG=c.getElementsByTagName?function(a,b){return"undefined"!=typeof b.getElementsByTagName?b.getElementsByTagName(a):c.qsa?b.querySelectorAll(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){if("undefined"!=typeof b.getElementsByClassName&&p)return b.getElementsByClassName(a)},r=[],q=[],(c.qsa=Y.test(n.querySelectorAll))&&(ja(function(a){o.appendChild(a).innerHTML="<a id='"+u+"'></a><select id='"+u+"-\r\\' msallowcapture=''><option selected=''></option></select>",a.querySelectorAll("[msallowcapture^='']").length&&q.push("[*^$]="+K+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||q.push("\\["+K+"*(?:value|"+J+")"),a.querySelectorAll("[id~="+u+"-]").length||q.push("~="),a.querySelectorAll(":checked").length||q.push(":checked"),a.querySelectorAll("a#"+u+"+*").length||q.push(".#.+[+~]")}),ja(function(a){a.innerHTML="<a href='' disabled='disabled'></a><select disabled='disabled'><option/></select>";var b=n.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&q.push("name"+K+"*[*^$|!~]?="),2!==a.querySelectorAll(":enabled").length&&q.push(":enabled",":disabled"),o.appendChild(a).disabled=!0,2!==a.querySelectorAll(":disabled").length&&q.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),q.push(",.*:")})),(c.matchesSelector=Y.test(s=o.matches||o.webkitMatchesSelector||o.mozMatchesSelector||o.oMatchesSelector||o.msMatchesSelector))&&ja(function(a){c.disconnectedMatch=s.call(a,"*"),s.call(a,"[s!='']:x"),r.push("!=",N)}),q=q.length&&new RegExp(q.join("|")),r=r.length&&new RegExp(r.join("|")),b=Y.test(o.compareDocumentPosition),t=b||Y.test(o.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},B=b?function(a,b){if(a===b)return l=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===n||a.ownerDocument===v&&t(v,a)?-1:b===n||b.ownerDocument===v&&t(v,b)?1:k?I(k,a)-I(k,b):0:4&d?-1:1)}:function(a,b){if(a===b)return l=!0,0;var c,d=0,e=a.parentNode,f=b.parentNode,g=[a],h=[b];if(!e||!f)return a===n?-1:b===n?1:e?-1:f?1:k?I(k,a)-I(k,b):0;if(e===f)return la(a,b);c=a;while(c=c.parentNode)g.unshift(c);c=b;while(c=c.parentNode)h.unshift(c);while(g[d]===h[d])d++;return d?la(g[d],h[d]):g[d]===v?-1:h[d]===v?1:0},n):n},ga.matches=function(a,b){return ga(a,null,null,b)},ga.matchesSelector=function(a,b){if((a.ownerDocument||a)!==n&&m(a),b=b.replace(S,"='$1']"),c.matchesSelector&&p&&!A[b+" "]&&(!r||!r.test(b))&&(!q||!q.test(b)))try{var d=s.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return ga(b,n,null,[a]).length>0},ga.contains=function(a,b){return(a.ownerDocument||a)!==n&&m(a),t(a,b)},ga.attr=function(a,b){(a.ownerDocument||a)!==n&&m(a);var e=d.attrHandle[b.toLowerCase()],f=e&&C.call(d.attrHandle,b.toLowerCase())?e(a,b,!p):void 0;return void 0!==f?f:c.attributes||!p?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},ga.escape=function(a){return(a+"").replace(ba,ca)},ga.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},ga.uniqueSort=function(a){var b,d=[],e=0,f=0;if(l=!c.detectDuplicates,k=!c.sortStable&&a.slice(0),a.sort(B),l){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return k=null,a},e=ga.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=ga.selectors={cacheLength:50,createPseudo:ia,match:V,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(_,aa),a[3]=(a[3]||a[4]||a[5]||"").replace(_,aa),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||ga.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&ga.error(a[0]),a},PSEUDO:function(a){var b,c=!a[6]&&a[2];return V.CHILD.test(a[0])?null:(a[3]?a[2]=a[4]||a[5]||"":c&&T.test(c)&&(b=g(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(_,aa).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=y[a+" "];return b||(b=new RegExp("(^|"+K+")"+a+"("+K+"|$)"))&&y(a,function(a){return b.test("string"==typeof a.className&&a.className||"undefined"!=typeof a.getAttribute&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=ga.attr(d,a);return null==e?"!="===b:!b||(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e.replace(O," ")+" ").indexOf(c)>-1:"|="===b&&(e===c||e.slice(0,c.length+1)===c+"-"))}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h,t=!1;if(q){if(f){while(p){m=b;while(m=m[p])if(h?m.nodeName.toLowerCase()===r:1===m.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){m=q,l=m[u]||(m[u]={}),k=l[m.uniqueID]||(l[m.uniqueID]={}),j=k[a]||[],n=j[0]===w&&j[1],t=n&&j[2],m=n&&q.childNodes[n];while(m=++n&&m&&m[p]||(t=n=0)||o.pop())if(1===m.nodeType&&++t&&m===b){k[a]=[w,n,t];break}}else if(s&&(m=b,l=m[u]||(m[u]={}),k=l[m.uniqueID]||(l[m.uniqueID]={}),j=k[a]||[],n=j[0]===w&&j[1],t=n),t===!1)while(m=++n&&m&&m[p]||(t=n=0)||o.pop())if((h?m.nodeName.toLowerCase()===r:1===m.nodeType)&&++t&&(s&&(l=m[u]||(m[u]={}),k=l[m.uniqueID]||(l[m.uniqueID]={}),k[a]=[w,t]),m===b))break;return t-=e,t===d||t%d===0&&t/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||ga.error("unsupported pseudo: "+a);return e[u]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?ia(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=I(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:ia(function(a){var b=[],c=[],d=h(a.replace(P,"$1"));return d[u]?ia(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),b[0]=null,!c.pop()}}),has:ia(function(a){return function(b){return ga(a,b).length>0}}),contains:ia(function(a){return a=a.replace(_,aa),function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:ia(function(a){return U.test(a||"")||ga.error("unsupported lang: "+a),a=a.replace(_,aa).toLowerCase(),function(b){var c;do if(c=p?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===o},focus:function(a){return a===n.activeElement&&(!n.hasFocus||n.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:oa(!1),disabled:oa(!0),checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return X.test(a.nodeName)},input:function(a){return W.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:pa(function(){return[0]}),last:pa(function(a,b){return[b-1]}),eq:pa(function(a,b,c){return[c<0?c+b:c]}),even:pa(function(a,b){for(var c=0;c<b;c+=2)a.push(c);return a}),odd:pa(function(a,b){for(var c=1;c<b;c+=2)a.push(c);return a}),lt:pa(function(a,b,c){for(var d=c<0?c+b:c;--d>=0;)a.push(d);return a}),gt:pa(function(a,b,c){for(var d=c<0?c+b:c;++d<b;)a.push(d);return a})}},d.pseudos.nth=d.pseudos.eq;for(b in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})d.pseudos[b]=ma(b);for(b in{submit:!0,reset:!0})d.pseudos[b]=na(b);function ra(){}ra.prototype=d.filters=d.pseudos,d.setFilters=new ra,g=ga.tokenize=function(a,b){var c,e,f,g,h,i,j,k=z[a+" "];if(k)return b?0:k.slice(0);h=a,i=[],j=d.preFilter;while(h){c&&!(e=Q.exec(h))||(e&&(h=h.slice(e[0].length)||h),i.push(f=[])),c=!1,(e=R.exec(h))&&(c=e.shift(),f.push({value:c,type:e[0].replace(P," ")}),h=h.slice(c.length));for(g in d.filter)!(e=V[g].exec(h))||j[g]&&!(e=j[g](e))||(c=e.shift(),f.push({value:c,type:g,matches:e}),h=h.slice(c.length));if(!c)break}return b?h.length:h?ga.error(a):z(a,i).slice(0)};function sa(a){for(var b=0,c=a.length,d="";b<c;b++)d+=a[b].value;return d}function ta(a,b,c){var d=b.dir,e=b.next,f=e||d,g=c&&"parentNode"===f,h=x++;return b.first?function(b,c,e){while(b=b[d])if(1===b.nodeType||g)return a(b,c,e);return!1}:function(b,c,i){var j,k,l,m=[w,h];if(i){while(b=b[d])if((1===b.nodeType||g)&&a(b,c,i))return!0}else while(b=b[d])if(1===b.nodeType||g)if(l=b[u]||(b[u]={}),k=l[b.uniqueID]||(l[b.uniqueID]={}),e&&e===b.nodeName.toLowerCase())b=b[d]||b;else{if((j=k[f])&&j[0]===w&&j[1]===h)return m[2]=j[2];if(k[f]=m,m[2]=a(b,c,i))return!0}return!1}}function ua(a){return a.length>1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function va(a,b,c){for(var d=0,e=b.length;d<e;d++)ga(a,b[d],c);return c}function wa(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;h<i;h++)(f=a[h])&&(c&&!c(f,d,e)||(g.push(f),j&&b.push(h)));return g}function xa(a,b,c,d,e,f){return d&&!d[u]&&(d=xa(d)),e&&!e[u]&&(e=xa(e,f)),ia(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||va(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:wa(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=wa(r,n),d(j,[],h,i),k=j.length;while(k--)(l=j[k])&&(r[n[k]]=!(q[n[k]]=l))}if(f){if(e||a){if(e){j=[],k=r.length;while(k--)(l=r[k])&&j.push(q[k]=l);e(null,r=[],j,i)}k=r.length;while(k--)(l=r[k])&&(j=e?I(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}else r=wa(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):G.apply(g,r)})}function ya(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],h=g||d.relative[" "],i=g?1:0,k=ta(function(a){return a===b},h,!0),l=ta(function(a){return I(b,a)>-1},h,!0),m=[function(a,c,d){var e=!g&&(d||c!==j)||((b=c).nodeType?k(a,c,d):l(a,c,d));return b=null,e}];i<f;i++)if(c=d.relative[a[i].type])m=[ta(ua(m),c)];else{if(c=d.filter[a[i].type].apply(null,a[i].matches),c[u]){for(e=++i;e<f;e++)if(d.relative[a[e].type])break;return xa(i>1&&ua(m),i>1&&sa(a.slice(0,i-1).concat({value:" "===a[i-2].type?"*":""})).replace(P,"$1"),c,i<e&&ya(a.slice(i,e)),e<f&&ya(a=a.slice(e)),e<f&&sa(a))}m.push(c)}return ua(m)}function za(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,h,i,k){var l,o,q,r=0,s="0",t=f&&[],u=[],v=j,x=f||e&&d.find.TAG("*",k),y=w+=null==v?1:Math.random()||.1,z=x.length;for(k&&(j=g===n||g||k);s!==z&&null!=(l=x[s]);s++){if(e&&l){o=0,g||l.ownerDocument===n||(m(l),h=!p);while(q=a[o++])if(q(l,g||n,h)){i.push(l);break}k&&(w=y)}c&&((l=!q&&l)&&r--,f&&t.push(l))}if(r+=s,c&&s!==r){o=0;while(q=b[o++])q(t,u,g,h);if(f){if(r>0)while(s--)t[s]||u[s]||(u[s]=E.call(i));u=wa(u)}G.apply(i,u),k&&!f&&u.length>0&&r+b.length>1&&ga.uniqueSort(i)}return k&&(w=y,j=v),t};return c?ia(f):f}return h=ga.compile=function(a,b){var c,d=[],e=[],f=A[a+" "];if(!f){b||(b=g(a)),c=b.length;while(c--)f=ya(b[c]),f[u]?d.push(f):e.push(f);f=A(a,za(e,d)),f.selector=a}return f},i=ga.select=function(a,b,c,e){var f,i,j,k,l,m="function"==typeof a&&a,n=!e&&g(a=m.selector||a);if(c=c||[],1===n.length){if(i=n[0]=n[0].slice(0),i.length>2&&"ID"===(j=i[0]).type&&9===b.nodeType&&p&&d.relative[i[1].type]){if(b=(d.find.ID(j.matches[0].replace(_,aa),b)||[])[0],!b)return c;m&&(b=b.parentNode),a=a.slice(i.shift().value.length)}f=V.needsContext.test(a)?0:i.length;while(f--){if(j=i[f],d.relative[k=j.type])break;if((l=d.find[k])&&(e=l(j.matches[0].replace(_,aa),$.test(i[0].type)&&qa(b.parentNode)||b))){if(i.splice(f,1),a=e.length&&sa(i),!a)return G.apply(c,e),c;break}}}return(m||h(a,n))(e,b,!p,c,!b||$.test(a)&&qa(b.parentNode)||b),c},c.sortStable=u.split("").sort(B).join("")===u,c.detectDuplicates=!!l,m(),c.sortDetached=ja(function(a){return 1&a.compareDocumentPosition(n.createElement("fieldset"))}),ja(function(a){return a.innerHTML="<a href='#'></a>","#"===a.firstChild.getAttribute("href")})||ka("type|href|height|width",function(a,b,c){if(!c)return a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&ja(function(a){return a.innerHTML="<input/>",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||ka("value",function(a,b,c){if(!c&&"input"===a.nodeName.toLowerCase())return a.defaultValue}),ja(function(a){return null==a.getAttribute("disabled")})||ka(J,function(a,b,c){var d;if(!c)return a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),ga}(a);r.find=x,r.expr=x.selectors,r.expr[":"]=r.expr.pseudos,r.uniqueSort=r.unique=x.uniqueSort,r.text=x.getText,r.isXMLDoc=x.isXML,r.contains=x.contains,r.escapeSelector=x.escape;var y=function(a,b,c){var d=[],e=void 0!==c;while((a=a[b])&&9!==a.nodeType)if(1===a.nodeType){if(e&&r(a).is(c))break;d.push(a)}return d},z=function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c},A=r.expr.match.needsContext,B=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i,C=/^.[^:#\[\.,]*$/;function D(a,b,c){return r.isFunction(b)?r.grep(a,function(a,d){return!!b.call(a,d,a)!==c}):b.nodeType?r.grep(a,function(a){return a===b!==c}):"string"!=typeof b?r.grep(a,function(a){return i.call(b,a)>-1!==c}):C.test(b)?r.filter(b,a,c):(b=r.filter(b,a),r.grep(a,function(a){return i.call(b,a)>-1!==c&&1===a.nodeType}))}r.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?r.find.matchesSelector(d,a)?[d]:[]:r.find.matches(a,r.grep(b,function(a){return 1===a.nodeType}))},r.fn.extend({find:function(a){var b,c,d=this.length,e=this;if("string"!=typeof a)return this.pushStack(r(a).filter(function(){for(b=0;b<d;b++)if(r.contains(e[b],this))return!0}));for(c=this.pushStack([]),b=0;b<d;b++)r.find(a,e[b],c);return d>1?r.uniqueSort(c):c},filter:function(a){return this.pushStack(D(this,a||[],!1))},not:function(a){return this.pushStack(D(this,a||[],!0))},is:function(a){return!!D(this,"string"==typeof a&&A.test(a)?r(a):a||[],!1).length}});var E,F=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/,G=r.fn.init=function(a,b,c){var e,f;if(!a)return this;if(c=c||E,"string"==typeof a){if(e="<"===a[0]&&">"===a[a.length-1]&&a.length>=3?[null,a,null]:F.exec(a),!e||!e[1]&&b)return!b||b.jquery?(b||c).find(a):this.constructor(b).find(a);if(e[1]){if(b=b instanceof r?b[0]:b,r.merge(this,r.parseHTML(e[1],b&&b.nodeType?b.ownerDocument||b:d,!0)),B.test(e[1])&&r.isPlainObject(b))for(e in b)r.isFunction(this[e])?this[e](b[e]):this.attr(e,b[e]);return this}return f=d.getElementById(e[2]),f&&(this[0]=f,this.length=1),this}return a.nodeType?(this[0]=a,this.length=1,this):r.isFunction(a)?void 0!==c.ready?c.ready(a):a(r):r.makeArray(a,this)};G.prototype=r.fn,E=r(d);var H=/^(?:parents|prev(?:Until|All))/,I={children:!0,contents:!0,next:!0,prev:!0};r.fn.extend({has:function(a){var b=r(a,this),c=b.length;return this.filter(function(){for(var a=0;a<c;a++)if(r.contains(this,b[a]))return!0})},closest:function(a,b){var c,d=0,e=this.length,f=[],g="string"!=typeof a&&r(a);if(!A.test(a))for(;d<e;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&r.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?r.uniqueSort(f):f)},index:function(a){return a?"string"==typeof a?i.call(r(a),this[0]):i.call(this,a.jquery?a[0]:a):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(r.uniqueSort(r.merge(this.get(),r(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function J(a,b){while((a=a[b])&&1!==a.nodeType);return a}r.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return y(a,"parentNode")},parentsUntil:function(a,b,c){return y(a,"parentNode",c)},next:function(a){return J(a,"nextSibling")},prev:function(a){return J(a,"previousSibling")},nextAll:function(a){return y(a,"nextSibling")},prevAll:function(a){return y(a,"previousSibling")},nextUntil:function(a,b,c){return y(a,"nextSibling",c)},prevUntil:function(a,b,c){return y(a,"previousSibling",c)},siblings:function(a){return z((a.parentNode||{}).firstChild,a)},children:function(a){return z(a.firstChild)},contents:function(a){return a.contentDocument||r.merge([],a.childNodes)}},function(a,b){r.fn[a]=function(c,d){var e=r.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=r.filter(d,e)),this.length>1&&(I[a]||r.uniqueSort(e),H.test(a)&&e.reverse()),this.pushStack(e)}});var K=/[^\x20\t\r\n\f]+/g;function L(a){var b={};return r.each(a.match(K)||[],function(a,c){b[c]=!0}),b}r.Callbacks=function(a){a="string"==typeof a?L(a):r.extend({},a);var b,c,d,e,f=[],g=[],h=-1,i=function(){for(e=a.once,d=b=!0;g.length;h=-1){c=g.shift();while(++h<f.length)f[h].apply(c[0],c[1])===!1&&a.stopOnFalse&&(h=f.length,c=!1)}a.memory||(c=!1),b=!1,e&&(f=c?[]:"")},j={add:function(){return f&&(c&&!b&&(h=f.length-1,g.push(c)),function d(b){r.each(b,function(b,c){r.isFunction(c)?a.unique&&j.has(c)||f.push(c):c&&c.length&&"string"!==r.type(c)&&d(c)})}(arguments),c&&!b&&i()),this},remove:function(){return r.each(arguments,function(a,b){var c;while((c=r.inArray(b,f,c))>-1)f.splice(c,1),c<=h&&h--}),this},has:function(a){return a?r.inArray(a,f)>-1:f.length>0},empty:function(){return f&&(f=[]),this},disable:function(){return e=g=[],f=c="",this},disabled:function(){return!f},lock:function(){return e=g=[],c||b||(f=c=""),this},locked:function(){return!!e},fireWith:function(a,c){return e||(c=c||[],c=[a,c.slice?c.slice():c],g.push(c),b||i()),this},fire:function(){return j.fireWith(this,arguments),this},fired:function(){return!!d}};return j};function M(a){return a}function N(a){throw a}function O(a,b,c){var d;try{a&&r.isFunction(d=a.promise)?d.call(a).done(b).fail(c):a&&r.isFunction(d=a.then)?d.call(a,b,c):b.call(void 0,a)}catch(a){c.call(void 0,a)}}r.extend({Deferred:function(b){var c=[["notify","progress",r.Callbacks("memory"),r.Callbacks("memory"),2],["resolve","done",r.Callbacks("once memory"),r.Callbacks("once memory"),0,"resolved"],["reject","fail",r.Callbacks("once memory"),r.Callbacks("once memory"),1,"rejected"]],d="pending",e={state:function(){return d},always:function(){return f.done(arguments).fail(arguments),this},"catch":function(a){return e.then(null,a)},pipe:function(){var a=arguments;return r.Deferred(function(b){r.each(c,function(c,d){var e=r.isFunction(a[d[4]])&&a[d[4]];f[d[1]](function(){var a=e&&e.apply(this,arguments);a&&r.isFunction(a.promise)?a.promise().progress(b.notify).done(b.resolve).fail(b.reject):b[d[0]+"With"](this,e?[a]:arguments)})}),a=null}).promise()},then:function(b,d,e){var f=0;function g(b,c,d,e){return function(){var h=this,i=arguments,j=function(){var a,j;if(!(b<f)){if(a=d.apply(h,i),a===c.promise())throw new TypeError("Thenable self-resolution");j=a&&("object"==typeof a||"function"==typeof a)&&a.then,r.isFunction(j)?e?j.call(a,g(f,c,M,e),g(f,c,N,e)):(f++,j.call(a,g(f,c,M,e),g(f,c,N,e),g(f,c,M,c.notifyWith))):(d!==M&&(h=void 0,i=[a]),(e||c.resolveWith)(h,i))}},k=e?j:function(){try{j()}catch(a){r.Deferred.exceptionHook&&r.Deferred.exceptionHook(a,k.stackTrace),b+1>=f&&(d!==N&&(h=void 0,i=[a]),c.rejectWith(h,i))}};b?k():(r.Deferred.getStackHook&&(k.stackTrace=r.Deferred.getStackHook()),a.setTimeout(k))}}return r.Deferred(function(a){c[0][3].add(g(0,a,r.isFunction(e)?e:M,a.notifyWith)),c[1][3].add(g(0,a,r.isFunction(b)?b:M)),c[2][3].add(g(0,a,r.isFunction(d)?d:N))}).promise()},promise:function(a){return null!=a?r.extend(a,e):e}},f={};return r.each(c,function(a,b){var g=b[2],h=b[5];
vendor: 4,104 bytes, lines 6-7
6e[b[1]]=g.add,h&&g.add(function(){d=h},c[3-a][2].disable,c[0][2].lock),g.add(b[3].fire),f[b[0]]=function(){return f[b[0]+"With"](this===f?void 0:this,arguments),this},f[b[0]+"With"]=g.fireWith}),e.promise(f),b&&b.call(f,f),f},when:function(a){var b=arguments.length,c=b,d=Array(c),e=f.call(arguments),g=r.Deferred(),h=function(a){return function(c){d[a]=this,e[a]=arguments.length>1?f.call(arguments):c,--b||g.resolveWith(d,e)}};if(b<=1&&(O(a,g.done(h(c)).resolve,g.reject),"pending"===g.state()||r.isFunction(e[c]&&e[c].then)))return g.then();while(c--)O(e[c],h(c),g.reject);return g.promise()}});var P=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;r.Deferred.exceptionHook=function(b,c){a.console&&a.console.warn&&b&&P.test(b.name)&&a.console.warn("jQuery.Deferred exception: "+b.message,b.stack,c)},r.readyException=function(b){a.setTimeout(function(){throw b})};var Q=r.Deferred();r.fn.ready=function(a){return Q.then(a)["catch"](function(a){r.readyException(a)}),this},r.extend({isReady:!1,readyWait:1,holdReady:function(a){a?r.readyWait++:r.ready(!0)},ready:function(a){(a===!0?--r.readyWait:r.isReady)||(r.isReady=!0,a!==!0&&--r.readyWait>0||Q.resolveWith(d,[r]))}}),r.ready.then=Q.then;function R(){d.removeEventListener("DOMContentLoaded",R),
7a.removeEventListener("load",R),r.ready()}"complete"===d.readyState||"loading"!==d.readyState&&!d.documentElement.doScroll?a.setTimeout(r.ready):(d.addEventListener("DOMContentLoaded",R),a.addEventListener("load",R));var S=function(a,b,c,d,e,f,g){var h=0,i=a.length,j=null==c;if("object"===r.type(c)){e=!0;for(h in c)S(a,b,h,c[h],!0,f,g)}else if(void 0!==d&&(e=!0,r.isFunction(d)||(g=!0),j&&(g?(b.call(a,d),b=null):(j=b,b=function(a,b,c){return j.call(r(a),c)})),b))for(;h<i;h++)b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)));return e?a:j?b.call(a):i?b(a[0],c):f},T=function(a){return 1===a.nodeType||9===a.nodeType||!+a.nodeType};function U(){this.expando=r.expando+U.uid++}U.uid=1,U.prototype={cache:function(a){var b=a[this.expando];return b||(b={},T(a)&&(a.nodeType?a[this.expando]=b:Object.defineProperty(a,this.expando,{value:b,configurable:!0}))),b},set:function(a,b,c){var d,e=this.cache(a);if("string"==typeof b)e[r.camelCase(b)]=c;else for(d in b)e[r.camelCase(d)]=b[d];return e},get:function(a,b){return void 0===b?this.cache(a):a[this.expando]&&a[this.expando][r.camelCase(b)]},access:function(a,b,c){return void 0===b||b&&"string"==typeof b&&void 0===c?this.get(a,b):(this.set(a,b,c),void 0!==c?c:b)},remove:function(a,b){var c,d=a[this.expando];if(void 0!==d){if(void 0!==b){r.isArray(b)?b=b.map(r.camelCase):(b=r.camelCase(b),b=b in d?[b]:b.match(K)||[]),c=b.length;while(c--)delete d[b[c]]}(void 0===b||r.isEmptyObject(d))&&(a.nodeType?a[this.expando]=void 0:delete a[this.expando])}},hasData:function(a){var b=a[this.expando];return void 0!==b&&!r.isEmptyObject(b)}};var V=new U,W=new U,X=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,Y=/[A-Z]/g;function Z(a){return"true"===a||"false"!==a&&("null"===a?null:a===+a+""?+a:X.test(a)?JSON.parse(a):a)}function $(a,b,c){var d;if(void 0===c&&1===a.nodeType)if(d="data-"+b.replace(Y,"-$&").toLowerCase(),c=a.getAttribute(d),"string"==typeof c){try{c=Z(c)}catch(e){}W.set(a,b,c)}else c=void 0;return c}r.extend({hasData:function(a){return W.hasData(a)||V.hasData(a)},data:function(a,b,c){return W.access(a,b,c)},removeData:function(a,b){W.remove(a,b)},_data:function(a,b,c){return V.access(a,b,c)},_removeData:function(a,b){V.remove(a,b)}}),r.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=W.get(f),1===f.nodeType&&!V.get(f,"hasDataAttrs"))){c=g.length;while(c--)g[c]&&(d=g[c].name,0===d.indexOf("data-")&&(d=r.camelCase(d.slice(5)),$(f,d,e[d])));V.set(f,"hasDataAttrs",!0)}return e}return"object"==typeof a?this.each(function(){W.set(this,a)}):S(this,function(b){var c;if(f&&void 0===b){if(c=W.get(f,a),void 0!==c)return c;if(c=$(f,a),void 0!==c)return c}else this.each(function(){W.set(this,a,b)})},null,b,arguments.length>1,null,!0)},removeData:function(a){return this.each(function(){W.remove(this,a)})}}),r.extend({queue:function(a,b,c){var d;
vendor: 27,582 bytes, line 7
7if(a)return b=(b||"fx")+"queue",d=V.get(a,b),c&&(!d||r.isArray(c)?d=V.access(a,b,r.makeArray(c)):d.push(c)),d||[]},dequeue:function(a,b){b=b||"fx";var c=r.queue(a,b),d=c.length,e=c.shift(),f=r._queueHooks(a,b),g=function(){r.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return V.get(a,c)||V.access(a,c,{empty:r.Callbacks("once memory").add(function(){V.remove(a,[b+"queue",c])})})}}),r.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.length<c?r.queue(this[0],a):void 0===b?this:this.each(function(){var c=r.queue(this,a,b);r._queueHooks(this,a),"fx"===a&&"inprogress"!==c[0]&&r.dequeue(this,a)})},dequeue:function(a){return this.each(function(){r.dequeue(this,a)})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,b){var c,d=1,e=r.Deferred(),f=this,g=this.length,h=function(){--d||e.resolveWith(f,[f])};"string"!=typeof a&&(b=a,a=void 0),a=a||"fx";while(g--)c=V.get(f[g],a+"queueHooks"),c&&c.empty&&(d++,c.empty.add(h));return h(),e.promise(b)}});var _=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,aa=new RegExp("^(?:([+-])=|)("+_+")([a-z%]*)$","i"),ba=["Top","Right","Bottom","Left"],ca=function(a,b){return a=b||a,"none"===a.style.display||""===a.style.display&&r.contains(a.ownerDocument,a)&&"none"===r.css(a,"display")},da=function(a,b,c,d){var e,f,g={};for(f in b)g[f]=a.style[f],a.style[f]=b[f];e=c.apply(a,d||[]);for(f in b)a.style[f]=g[f];return e};function ea(a,b,c,d){var e,f=1,g=20,h=d?function(){return d.cur()}:function(){return r.css(a,b,"")},i=h(),j=c&&c[3]||(r.cssNumber[b]?"":"px"),k=(r.cssNumber[b]||"px"!==j&&+i)&&aa.exec(r.css(a,b));if(k&&k[3]!==j){j=j||k[3],c=c||[],k=+i||1;do f=f||".5",k/=f,r.style(a,b,k+j);while(f!==(f=h()/i)&&1!==f&&--g)}return c&&(k=+k||+i||0,e=c[1]?k+(c[1]+1)*c[2]:+c[2],d&&(d.unit=j,d.start=k,d.end=e)),e}var fa={};function ga(a){var b,c=a.ownerDocument,d=a.nodeName,e=fa[d];return e?e:(b=c.body.appendChild(c.createElement(d)),e=r.css(b,"display"),b.parentNode.removeChild(b),"none"===e&&(e="block"),fa[d]=e,e)}function ha(a,b){for(var c,d,e=[],f=0,g=a.length;f<g;f++)d=a[f],d.style&&(c=d.style.display,b?("none"===c&&(e[f]=V.get(d,"display")||null,e[f]||(d.style.display="")),""===d.style.display&&ca(d)&&(e[f]=ga(d))):"none"!==c&&(e[f]="none",V.set(d,"display",c)));for(f=0;f<g;f++)null!=e[f]&&(a[f].style.display=e[f]);return a}r.fn.extend({show:function(){return ha(this,!0)},hide:function(){return ha(this)},toggle:function(a){return"boolean"==typeof a?a?this.show():this.hide():this.each(function(){ca(this)?r(this).show():r(this).hide()})}});var ia=/^(?:checkbox|radio)$/i,ja=/<([a-z][^\/\0>\x20\t\r\n\f]+)/i,ka=/^$|\/(?:java|ecma)script/i,la={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,"",""]};la.optgroup=la.option,la.tbody=la.tfoot=la.colgroup=la.caption=la.thead,la.th=la.td;function ma(a,b){var c;return c="undefined"!=typeof a.getElementsByTagName?a.getElementsByTagName(b||"*"):"undefined"!=typeof a.querySelectorAll?a.querySelectorAll(b||"*"):[],void 0===b||b&&r.nodeName(a,b)?r.merge([a],c):c}function na(a,b){for(var c=0,d=a.length;c<d;c++)V.set(a[c],"globalEval",!b||V.get(b[c],"globalEval"))}var oa=/<|&#?\w+;/;function pa(a,b,c,d,e){for(var f,g,h,i,j,k,l=b.createDocumentFragment(),m=[],n=0,o=a.length;n<o;n++)if(f=a[n],f||0===f)if("object"===r.type(f))r.merge(m,f.nodeType?[f]:f);else if(oa.test(f)){g=g||l.appendChild(b.createElement("div")),h=(ja.exec(f)||["",""])[1].toLowerCase(),i=la[h]||la._default,g.innerHTML=i[1]+r.htmlPrefilter(f)+i[2],k=i[0];while(k--)g=g.lastChild;r.merge(m,g.childNodes),g=l.firstChild,g.textContent=""}else m.push(b.createTextNode(f));l.textContent="",n=0;while(f=m[n++])if(d&&r.inArray(f,d)>-1)e&&e.push(f);else if(j=r.contains(f.ownerDocument,f),g=ma(l.appendChild(f),"script"),j&&na(g),c){k=0;while(f=g[k++])ka.test(f.type||"")&&c.push(f)}return l}!function(){var a=d.createDocumentFragment(),b=a.appendChild(d.createElement("div")),c=d.createElement("input");c.setAttribute("type","radio"),c.setAttribute("checked","checked"),c.setAttribute("name","t"),b.appendChild(c),o.checkClone=b.cloneNode(!0).cloneNode(!0).lastChild.checked,b.innerHTML="<textarea>x</textarea>",o.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue}();var qa=d.documentElement,ra=/^key/,sa=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,ta=/^([^.]*)(?:\.(.+)|)/;function ua(){return!0}function va(){return!1}function wa(){try{return d.activeElement}catch(a){}}function xa(a,b,c,d,e,f){var g,h;if("object"==typeof b){"string"!=typeof c&&(d=d||c,c=void 0);for(h in b)xa(a,h,c,d,b[h],f);return a}if(null==d&&null==e?(e=c,d=c=void 0):null==e&&("string"==typeof c?(e=d,d=void 0):(e=d,d=c,c=void 0)),e===!1)e=va;else if(!e)return a;return 1===f&&(g=e,e=function(a){return r().off(a),g.apply(this,arguments)},e.guid=g.guid||(g.guid=r.guid++)),a.each(function(){r.event.add(this,b,e,d,c)})}r.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,n,o,p,q=V.get(a);if(q){c.handler&&(f=c,c=f.handler,e=f.selector),e&&r.find.matchesSelector(qa,e),c.guid||(c.guid=r.guid++),(i=q.events)||(i=q.events={}),(g=q.handle)||(g=q.handle=function(b){return"undefined"!=typeof r&&r.event.triggered!==b.type?r.event.dispatch.apply(a,arguments):void 0}),b=(b||"").match(K)||[""],j=b.length;while(j--)h=ta.exec(b[j])||[],n=p=h[1],o=(h[2]||"").split(".").sort(),n&&(l=r.event.special[n]||{},n=(e?l.delegateType:l.bindType)||n,l=r.event.special[n]||{},k=r.extend({type:n,origType:p,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&r.expr.match.needsContext.test(e),namespace:o.join(".")},f),(m=i[n])||(m=i[n]=[],m.delegateCount=0,l.setup&&l.setup.call(a,d,o,g)!==!1||a.addEventListener&&a.addEventListener(n,g)),l.add&&(l.add.call(a,k),k.handler.guid||(k.handler.guid=c.guid)),e?m.splice(m.delegateCount++,0,k):m.push(k),r.event.global[n]=!0)}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,n,o,p,q=V.hasData(a)&&V.get(a);if(q&&(i=q.events)){b=(b||"").match(K)||[""],j=b.length;while(j--)if(h=ta.exec(b[j])||[],n=p=h[1],o=(h[2]||"").split(".").sort(),n){l=r.event.special[n]||{},n=(d?l.delegateType:l.bindType)||n,m=i[n]||[],h=h[2]&&new RegExp("(^|\\.)"+o.join("\\.(?:.*\\.|)")+"(\\.|$)"),g=f=m.length;while(f--)k=m[f],!e&&p!==k.origType||c&&c.guid!==k.guid||h&&!h.test(k.namespace)||d&&d!==k.selector&&("**"!==d||!k.selector)||(m.splice(f,1),k.selector&&m.delegateCount--,l.remove&&l.remove.call(a,k));g&&!m.length&&(l.teardown&&l.teardown.call(a,o,q.handle)!==!1||r.removeEvent(a,n,q.handle),delete i[n])}else for(n in i)r.event.remove(a,n+b[j],c,d,!0);r.isEmptyObject(i)&&V.remove(a,"handle events")}},dispatch:function(a){var b=r.event.fix(a),c,d,e,f,g,h,i=new Array(arguments.length),j=(V.get(this,"events")||{})[b.type]||[],k=r.event.special[b.type]||{};for(i[0]=b,c=1;c<arguments.length;c++)i[c]=arguments[c];if(b.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,b)!==!1){h=r.event.handlers.call(this,b,j),c=0;while((f=h[c++])&&!b.isPropagationStopped()){b.currentTarget=f.elem,d=0;while((g=f.handlers[d++])&&!b.isImmediatePropagationStopped())b.rnamespace&&!b.rnamespace.test(g.namespace)||(b.handleObj=g,b.data=g.data,e=((r.event.special[g.origType]||{}).handle||g.handler).apply(f.elem,i),void 0!==e&&(b.result=e)===!1&&(b.preventDefault(),b.stopPropagation()))}return k.postDispatch&&k.postDispatch.call(this,b),b.result}},handlers:function(a,b){var c,d,e,f,g,h=[],i=b.delegateCount,j=a.target;if(i&&j.nodeType&&!("click"===a.type&&a.button>=1))for(;j!==this;j=j.parentNode||this)if(1===j.nodeType&&("click"!==a.type||j.disabled!==!0)){for(f=[],g={},c=0;c<i;c++)d=b[c],e=d.selector+" ",void 0===g[e]&&(g[e]=d.needsContext?r(e,this).index(j)>-1:r.find(e,this,null,[j]).length),g[e]&&f.push(d);f.length&&h.push({elem:j,handlers:f})}return j=this,i<b.length&&h.push({elem:j,handlers:b.slice(i)}),h},addProp:function(a,b){Object.defineProperty(r.Event.prototype,a,{enumerable:!0,configurable:!0,get:r.isFunction(b)?function(){if(this.originalEvent)return b(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[a]},set:function(b){Object.defineProperty(this,a,{enumerable:!0,configurable:!0,writable:!0,value:b})}})},fix:function(a){return a[r.expando]?a:new r.Event(a)},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==wa()&&this.focus)return this.focus(),!1},delegateType:"focusin"},blur:{trigger:function(){if(this===wa()&&this.blur)return this.blur(),!1},delegateType:"focusout"},click:{trigger:function(){if("checkbox"===this.type&&this.click&&r.nodeName(this,"input"))return this.click(),!1},_default:function(a){return r.nodeName(a.target,"a")}},beforeunload:{postDispatch:function(a){void 0!==a.result&&a.originalEvent&&(a.originalEvent.returnValue=a.result)}}}},r.removeEvent=function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c)},r.Event=function(a,b){return this instanceof r.Event?(a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||void 0===a.defaultPrevented&&a.returnValue===!1?ua:va,this.target=a.target&&3===a.target.nodeType?a.target.parentNode:a.target,this.currentTarget=a.currentTarget,this.relatedTarget=a.relatedTarget):this.type=a,b&&r.extend(this,b),this.timeStamp=a&&a.timeStamp||r.now(),void(this[r.expando]=!0)):new r.Event(a,b)},r.Event.prototype={constructor:r.Event,isDefaultPrevented:va,isPropagationStopped:va,isImmediatePropagationStopped:va,isSimulated:!1,preventDefault:function(){var a=this.originalEvent;this.isDefaultPrevented=ua,a&&!this.isSimulated&&a.preventDefault()},stopPropagation:function(){var a=this.originalEvent;this.isPropagationStopped=ua,a&&!this.isSimulated&&a.stopPropagation()},stopImmediatePropagation:function(){var a=this.originalEvent;this.isImmediatePropagationStopped=ua,a&&!this.isSimulated&&a.stopImmediatePropagation(),this.stopPropagation()}},r.each({altKey:!0,bubbles:!0,cancelable:!0,changedTouches:!0,ctrlKey:!0,detail:!0,eventPhase:!0,metaKey:!0,pageX:!0,pageY:!0,shiftKey:!0,view:!0,"char":!0,charCode:!0,key:!0,keyCode:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pointerId:!0,pointerType:!0,screenX:!0,screenY:!0,targetTouches:!0,toElement:!0,touches:!0,which:function(a){var b=a.button;return null==a.which&&ra.test(a.type)?null!=a.charCode?a.charCode:a.keyCode:!a.which&&void 0!==b&&sa.test(a.type)?1&b?1:2&b?3:4&b?2:0:a.which}},r.event.addProp),r.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(a,b){r.event.special[a]={delegateType:b,bindType:b,handle:function(a){var c,d=this,e=a.relatedTarget,f=a.handleObj;return e&&(e===d||r.contains(d,e))||(a.type=f.origType,c=f.handler.apply(this,arguments),a.type=b),c}}}),r.fn.extend({on:function(a,b,c,d){return xa(this,a,b,c,d)},one:function(a,b,c,d){return xa(this,a,b,c,d,1)},off:function(a,b,c){var d,e;if(a&&a.preventDefault&&a.handleObj)return d=a.handleObj,r(a.delegateTarget).off(d.namespace?d.origType+"."+d.namespace:d.origType,d.selector,d.handler),this;if("object"==typeof a){for(e in a)this.off(e,b,a[e]);return this}return b!==!1&&"function"!=typeof b||(c=b,b=void 0),c===!1&&(c=va),this.each(function(){r.event.remove(this,a,c,b)})}});var ya=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([a-z][^\/\0>\x20\t\r\n\f]*)[^>]*)\/>/gi,za=/<script|<style|<link/i,Aa=/checked\s*(?:[^=]|=\s*.checked.)/i,Ba=/^true\/(.*)/,Ca=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;function Da(a,b){return r.nodeName(a,"table")&&r.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a:a}function Ea(a){return a.type=(null!==a.getAttribute("type"))+"/"+a.type,a}function Fa(a){var b=Ba.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function Ga(a,b){var c,d,e,f,g,h,i,j;if(1===b.nodeType){if(V.hasData(a)&&(f=V.access(a),g=V.set(b,f),j=f.events)){delete g.handle,g.events={};for(e in j)for(c=0,d=j[e].length;c<d;c++)r.event.add(b,e,j[e][c])}W.hasData(a)&&(h=W.access(a),i=r.extend({},h),W.set(b,i))}}function Ha(a,b){var c=b.nodeName.toLowerCase();"input"===c&&ia.test(a.type)?b.checked=a.checked:"input"!==c&&"textarea"!==c||(b.defaultValue=a.defaultValue)}function Ia(a,b,c,d){b=g.apply([],b);var e,f,h,i,j,k,l=0,m=a.length,n=m-1,q=b[0],s=r.isFunction(q);if(s||m>1&&"string"==typeof q&&!o.checkClone&&Aa.test(q))return a.each(function(e){var f=a.eq(e);s&&(b[0]=q.call(this,e,f.html())),Ia(f,b,c,d)});if(m&&(e=pa(b,a[0].ownerDocument,!1,a,d),f=e.firstChild,1===e.childNodes.length&&(e=f),f||d)){for(h=r.map(ma(e,"script"),Ea),i=h.length;l<m;l++)j=e,l!==n&&(j=r.clone(j,!0,!0),i&&r.merge(h,ma(j,"script"))),c.call(a[l],j,l);if(i)for(k=h[h.length-1].ownerDocument,r.map(h,Fa),l=0;l<i;l++)j=h[l],ka.test(j.type||"")&&!V.access(j,"globalEval")&&r.contains(k,j)&&(j.src?r._evalUrl&&r._evalUrl(j.src):p(j.textContent.replace(Ca,""),k))}return a}function Ja(a,b,c){for(var d,e=b?r.filter(b,a):a,f=0;null!=(d=e[f]);f++)c||1!==d.nodeType||r.cleanData(ma(d)),d.parentNode&&(c&&r.contains(d.ownerDocument,d)&&na(ma(d,"script")),d.parentNode.removeChild(d));return a}r.extend({htmlPrefilter:function(a){return a.replace(ya,"<$1></$2>")},clone:function(a,b,c){var d,e,f,g,h=a.cloneNode(!0),i=r.contains(a.ownerDocument,a);if(!(o.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||r.isXMLDoc(a)))for(g=ma(h),f=ma(a),d=0,e=f.length;d<e;d++)Ha(f[d],g[d]);if(b)if(c)for(f=f||ma(a),g=g||ma(h),d=0,e=f.length;d<e;d++)Ga(f[d],g[d]);else Ga(a,h);return g=ma(h,"script"),g.length>0&&na(g,!i&&ma(a,"script")),h},cleanData:function(a){for(var b,c,d,e=r.event.special,f=0;void 0!==(c=a[f]);f++)if(T(c)){if(b=c[V.expando]){if(b.events)for(d in b.events)e[d]?r.event.remove(c,d):r.removeEvent(c,d,b.handle);c[V.expando]=void 0}c[W.expando]&&(c[W.expando]=void 0)}}}),r.fn.extend({detach:function(a){return Ja(this,a,!0)},remove:function(a){return Ja(this,a)},text:function(a){return S(this,function(a){return void 0===a?r.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=a)})},null,a,arguments.length)},append:function(){return Ia(this,arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=Da(this,a);b.appendChild(a)}})},prepend:function(){return Ia(this,arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=Da(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return Ia(this,arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return Ia(this,arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},empty:function(){for(var a,b=0;null!=(a=this[b]);b++)1===a.nodeType&&(r.cleanData(ma(a,!1)),a.textContent="");return this},clone:function(a,b){return a=null!=a&&a,b=null==b?a:b,this.map(function(){return r.clone(this,a,b)})},html:function(a){return S(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a&&1===b.nodeType)return b.innerHTML;if("string"==typeof a&&!za.test(a)&&!la[(ja.exec(a)||["",""])[1].toLowerCase()]){a=r.htmlPrefilter(a);try{for(;c<d;c++)b=this[c]||{},1===b.nodeType&&(r.cleanData(ma(b,!1)),b.innerHTML=a);b=0}catch(e){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=[];return Ia(this,arguments,function(b){var c=this.parentNode;r.inArray(this,a)<0&&(r.cleanData(ma(this)),c&&c.replaceChild(b,this))},a)}}),r.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){r.fn[a]=function(a){for(var c,d=[],e=r(a),f=e.length-1,g=0;g<=f;g++)c=g===f?this:this.clone(!0),r(e[g])[b](c),h.apply(d,c.get());return this.pushStack(d)}});var Ka=/^margin/,La=new RegExp("^("+_+")(?!px)[a-z%]+$","i"),Ma=function(b){var c=b.ownerDocument.defaultView;return c&&c.opener||(c=a),c.getComputedStyle(b)};!function(){function b(){if(i){i.style.cssText="box-sizing:border-box;position:relative;display:block;margin:auto;border:1px;padding:1px;top:1%;width:50%",i.innerHTML="",qa.appendChild(h);var b=a.getComputedStyle(i);c="1%"!==b.top,g="2px"===b.marginLeft,e="4px"===b.width,i.style.marginRight="50%",f="4px"===b.marginRight,qa.removeChild(h),i=null}}var c,e,f,g,h=d.createElement("div"),i=d.createElement("div");i.style&&(i.style.backgroundClip="content-box",i.cloneNode(!0).style.backgroundClip="",o.clearCloneStyle="content-box"===i.style.backgroundClip,h.style.cssText="border:0;width:8px;height:0;top:0;left:-9999px;padding:0;margin-top:1px;position:absolute",h.appendChild(i),r.extend(o,{pixelPosition:function(){return b(),c},boxSizingReliable:function(){return b(),e},pixelMarginRight:function(){return b(),f},reliableMarginLeft:function(){return b(),g}}))}();function Na(a,b,c){var d,e,f,g,h=a.style;return c=c||Ma(a),c&&(g=c.getPropertyValue(b)||c[b],""!==g||r.contains(a.ownerDocument,a)||(g=r.style(a,b)),!o.pixelMarginRight()&&La.test(g)&&Ka.test(b)&&(d=h.width,e=h.minWidth,f=h.maxWidth,h.minWidth=h.maxWidth=h.width=g,g=c.width,h.width=d,h.minWidth=e,h.maxWidth=f)),void 0!==g?g+"":g}function Oa(a,b){return{get:function(){return a()?void delete this.get:(this.get=b).apply(this,arguments)}}}var Pa=/^(none|table(?!-c[ea]).+)/,Qa={position:"absolute",visibility:"hidden",display:"block"},Ra={letterSpacing:"0",fontWeight:"400"},Sa=["Webkit","Moz","ms"],Ta=d.createElement("div").style;function Ua(a){if(a in Ta)return a;var b=a[0].toUpperCase()+a.slice(1),c=Sa.length;while(c--)if(a=Sa[c]+b,a in Ta)return a}function Va(a,b,c){var d=aa.exec(b);return d?Math.max(0,d[2]-(c||0))+(d[3]||"px"):b}function Wa(a,b,c,d,e){var f,g=0;for(f=c===(d?"border":"content")?4:"width"===b?1:0;f<4;f+=2)"margin"===c&&(g+=r.css(a,c+ba[f],!0,e)),d?("content"===c&&(g-=r.css(a,"padding"+ba[f],!0,e)),"margin"!==c&&(g-=r.css(a,"border"+ba[f]+"Width",!0,e))):(g+=r.css(a,"padding"+ba[f],!0,e),"padding"!==c&&(g+=r.css(a,"border"+ba[f]+"Width",!0,e)));return g}function Xa(a,b,c){var d,e=!0,f=Ma(a),g="border-box"===r.css(a,"boxSizing",!1,f);if(a.getClientRects().length&&(d=a.getBoundingClientRect()[b]),d<=0||null==d){if(d=Na(a,b,f),(d<0||null==d)&&(d=a.style[b]),La.test(d))return d;e=g&&(o.boxSizingReliable()||d===a.style[b]),d=parseFloat(d)||0}return d+Wa(a,b,c||(g?"border":"content"),e,f)+"px"}r.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=Na(a,"opacity");return""===c?"1":c}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":"cssFloat"},style:function(a,b,c,d){if(a&&3!==a.nodeType&&8!==a.nodeType&&a.style){var e,f,g,h=r.camelCase(b),i=a.style;return b=r.cssProps[h]||(r.cssProps[h]=Ua(h)||h),g=r.cssHooks[b]||r.cssHooks[h],void 0===c?g&&"get"in g&&void 0!==(e=g.get(a,!1,d))?e:i[b]:(f=typeof c,"string"===f&&(e=aa.exec(c))&&e[1]&&(c=ea(a,b,e),f="number"),null!=c&&c===c&&("number"===f&&(c+=e&&e[3]||(r.cssNumber[h]?"":"px")),o.clearCloneStyle||""!==c||0!==b.indexOf("background")||(i[b]="inherit"),g&&"set"in g&&void 0===(c=g.set(a,c,d))||(i[b]=c)),void 0)}},css:function(a,b,c,d){var e,f,g,h=r.camelCase(b);return b=r.cssProps[h]||(r.cssProps[h]=Ua(h)||h),g=r.cssHooks[b]||r.cssHooks[h],g&&"get"in g&&(e=g.get(a,!0,c)),void 0===e&&(e=Na(a,b,d)),"normal"===e&&b in Ra&&(e=Ra[b]),""===c||c?(f=parseFloat(e),c===!0||isFinite(f)?f||0:e):e}}),r.each(["height","width"],function(a,b){r.cssHooks[b]={get:function(a,c,d){if(c)return!Pa.test(r.css(a,"display"))||a.getClientRects().length&&a.getBoundingClientRect().width?Xa(a,b,d):da(a,Qa,function(){return Xa(a,b,d)})},set:function(a,c,d){var e,f=d&&Ma(a),g=d&&Wa(a,b,d,"border-box"===r.css(a,"boxSizing",!1,f),f);return g&&(e=aa.exec(c))&&"px"!==(e[3]||"px")&&(a.style[b]=c,c=r.css(a,b)),Va(a,c,g)}}}),r.cssHooks.marginLeft=Oa(o.reliableMarginLeft,function(a,b){if(b)return(parseFloat(Na(a,"marginLeft"))||a.getBoundingClientRect().left-da(a,{marginLeft:0},function(){return a.getBoundingClientRect().left}))+"px"}),r.each({margin:"",padding:"",border:"Width"},function(a,b){r.cssHooks[a+b]={expand:function(c){for(var d=0,e={},f="string"==typeof c?c.split(" "):[c];d<4;d++)e[a+ba[d]+b]=f[d]||f[d-2]||f[0];return e}},Ka.test(a)||(r.cssHooks[a+b].set=Va)}),r.fn.extend({css:function(a,b){return S(this,function(a,b,c){var d,e,f={},g=0;if(r.isArray(b)){for(d=Ma(a),e=b.length;g<e;g++)f[b[g]]=r.css(a,b[g],!1,d);return f}return void 0!==c?r.style(a,b,c):r.css(a,b)},a,b,arguments.length>1)}});function Ya(a,b,c,d,e){return new Ya.prototype.init(a,b,c,d,e)}r.Tween=Ya,Ya.prototype={constructor:Ya,init:function(a,b,c,d,e,f){this.elem=a,this.prop=c,this.easing=e||r.easing._default,this.options=b,this.start=this.now=this.cur(),this.end=d,this.unit=f||(r.cssNumber[c]?"":"px")},cur:function(){var a=Ya.propHooks[this.prop];return a&&a.get?a.get(this):Ya.propHooks._default.get(this)},run:function(a){var b,c=Ya.propHooks[this.prop];return this.options.duration?this.pos=b=r.easing[this.easing](a,this.options.duration*a,0,1,this.options.duration):this.pos=b=a,this.now=(this.end-this.start)*b+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),c&&c.set?c.set(this):Ya.propHooks._default.set(this),this}},Ya.prototype.init.prototype=Ya.prototype,Ya.propHooks={_default:{get:function(a){var b;return 1!==a.elem.nodeType||null!=a.elem[a.prop]&&null==a.elem.style[a.prop]?a.elem[a.prop]:(b=r.css(a.elem,a.prop,""),b&&"auto"!==b?b:0)},set:function(a){r.fx.step[a.prop]?r.fx.step[a.prop](a):1!==a.elem.nodeType||null==a.elem.style[r.cssProps[a.prop]]&&!r.cssHooks[a.prop]?a.elem[a.prop]=a.now:r.style(a.elem,a.prop,a.now+a.unit)}}},Ya.propHooks.scrollTop=Ya.propHooks.scrollLeft={set:function(a){a.elem.nodeType&&a.elem.parentNode&&(a.elem[a.prop]=a.now)}},r.easing={linear:function(a){return a},swing:function(a){return.5-Math.cos(a*Math.PI)/2},_default:"swing"},r.fx=Ya.prototype.init,r.fx.step={};var Za,$a,_a=/^(?:toggle|show|hide)$/,ab=/queueHooks$/;function bb(){$a&&(a.requestAnimationFrame(bb),r.fx.tick())}function cb(){return a.setTimeout(function(){Za=void 0}),Za=r.now()}function db(a,b){var c,d=0,e={height:a};for(b=b?1:0;d<4;d+=2-b)c=ba[d],e["margin"+c]=e["padding"+c]=a;return b&&(e.opacity=e.width=a),e}function eb(a,b,c){for(var d,e=(hb.tweeners[b]||[]).concat(hb.tweeners["*"]),f=0,g=e.length;f<g;f++)if(d=e[f].call(c,b,a))return d}function fb(a,b,c){var d,e,f,g,h,i,j,k,l="width"in b||"height"in b,m=this,n={},o=a.style,p=a.nodeType&&ca(a),q=V.get(a,"fxshow");c.queue||(g=r._queueHooks(a,"fx"),null==g.unqueued&&(g.unqueued=0,h=g.empty.fire,g.empty.fire=function(){g.unqueued||h()}),g.unqueued++,m.always(function(){m.always(function(){g.unqueued--,r.queue(a,"fx").length||g.empty.fire()})}));for(d in b)if(e=b[d],_a.test(e)){if(delete b[d],f=f||"toggle"===e,e===(p?"hide":"show")){if("show"!==e||!q||void 0===q[d])continue;p=!0}n[d]=q&&q[d]||r.style(a,d)}if(i=!r.isEmptyObject(b),i||!r.isEmptyObject(n)){l&&1===a.nodeType&&(c.overflow=[o.overflow,o.overflowX,o.overflowY],j=q&&q.display,null==j&&(j=V.get(a,"display")),k=r.css(a,"display"),"none"===k&&(j?k=j:(ha([a],!0),j=a.style.display||j,k=r.css(a,"display"),ha([a]))),("inline"===k||"inline-block"===k&&null!=j)&&"none"===r.css(a,"float")&&(i||(m.done(function(){o.display=j}),null==j&&(k=o.display,j="none"===k?"":k)),o.display="inline-block")),c.overflow&&(o.overflow="hidden",m.always(function(){o.overflow=c.overflow[0],o.overflowX=c.overflow[1],o.overflowY=c.overflow[2]})),i=!1;for(d in n)i||(q?"hidden"in q&&(p=q.hidden):q=V.access(a,"fxshow",{display:j}),f&&(q.hidden=!p),p&&ha([a],!0),m.done(function(){p||ha([a]),V.remove(a,"fxshow");for(d in n)r.style(a,d,n[d])})),i=eb(p?q[d]:0,d,m),d in q||(q[d]=i.start,p&&(i.end=i.start,i.start=0))}}function gb(a,b){var c,d,e,f,g;for(c in a)if(d=r.camelCase(c),e=b[d],f=a[c],r.isArray(f)&&(e=f[1],f=a[c]=f[0]),c!==d&&(a[d]=f,delete a[c]),g=r.cssHooks[d],g&&"expand"in g){f=g.expand(f),delete a[d];for(c in f)c in a||(a[c]=f[c],b[c]=e)}else b[d]=e}function hb(a,b,c){var d,e,f=0,g=hb.prefilters.length,h=r.Deferred().always(function(){delete i.elem}),i=function(){if(e)return!1;for(var b=Za||cb(),c=Math.max(0,j.startTime+j.duration-b),d=c/j.duration||0,f=1-d,g=0,i=j.tweens.length;g<i;g++)j.tweens[g].run(f);return h.notifyWith(a,[j,f,c]),f<1&&i?c:(h.resolveWith(a,[j]),!1)},j=h.promise({elem:a,props:r.extend({},b),opts:r.extend(!0,{specialEasing:{},easing:r.easing._default},c),originalProperties:b,originalOptions:c,startTime:Za||cb(),duration:c.duration,tweens:[],createTween:function(b,c){var d=r.Tween(a,j.opts,b,c,j.opts.specialEasing[b]||j.opts.easing);return j.tweens.push(d),d},stop:function(b){var c=0,d=b?j.tweens.length:0;if(e)return this;for(e=!0;c<d;c++)j.tweens[c].run(1);return b?(h.notifyWith(a,[j,1,0]),h.resolveWith(a,[j,b])):h.rejectWith(a,[j,b]),this}}),k=j.props;for(gb(k,j.opts.specialEasing);f<g;f++)if(d=hb.prefilters[f].call(j,a,k,j.opts))return r.isFunction(d.stop)&&(r._queueHooks(j.elem,j.opts.queue).stop=r.proxy(d.stop,d)),d;return r.map(k,eb,j),r.isFunction(j.opts.start)&&j.opts.start.call(a,j),r.fx.timer(r.extend(i,{elem:a,anim:j,queue:j.opts.queue})),j.progress(j.opts.progress).done(j.opts.done,j.opts.complete).fail(j.opts.fail).always(j.opts.always)}r.Animation=r.extend(hb,{tweeners:{"*":[function(a,b){var c=this.createTween(a,b);return ea(c.elem,a,aa.exec(b),c),c}]},tweener:function(a,b){r.isFunction(a)?(b=a,a=["*"]):a=a.match(K);for(var c,d=0,e=a.length;d<e;d++)c=a[d],hb.tweeners[c]=hb.tweeners[c]||[],hb.tweeners[c].unshift(b)},prefilters:[fb],prefilter:function(a,b){b?hb.prefilters.unshift(a):hb.prefilters.push(a)}}),r.speed=function(a,b,c){var e=a&&"object"==typeof a?r.extend({},a):{complete:c||!c&&b||r.isFunction(a)&&a,duration:a,easing:c&&b||b&&!r.isFunction(b)&&b};return r.fx.off||d.hidden?e.duration=0:"number"!=typeof e.duration&&(e.duration in r.fx.speeds?e.duration=r.fx.speeds[e.duration]:e.duration=r.fx.speeds._default),null!=e.queue&&e.queue!==!0||(e.queue="fx"),e.old=e.complete,e.complete=function(){r.isFunction(e.old)&&e.old.call(this),e.queue&&r.dequeue(this,e.queue)},e},r.fn.extend({fadeTo:function(a,b,c,d){return this.filter(ca).css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){var e=r.isEmptyObject(a),f=r.speed(b,c,d),g=function(){var b=hb(this,r.extend({},a),f);(e||V.get(this,"finish"))&&b.stop(!0)};return g.finish=g,e||f.queue===!1?this.each(g):this.queue(f.queue,g)},stop:function(a,b,c){var d=function(a){var b=a.stop;delete a.stop,b(c)};return"string"!=typeof a&&(c=b,b=a,a=void 0),b&&a!==!1&&this.queue(a||"fx",[]),this.each(function(){var b=!0,e=null!=a&&a+"queueHooks",f=r.timers,g=V.get(this);if(e)g[e]&&g[e].stop&&d(g[e]);else for(e in g)g[e]&&g[e].stop&&ab.test(e)&&d(g[e]);for(e=f.length;e--;)f[e].elem!==this||null!=a&&f[e].queue!==a||(f[e].anim.stop(c),b=!1,f.splice(e,1));!b&&c||r.dequeue(this,a)})},finish:function(a){return a!==!1&&(a=a||"fx"),this.each(function(){var b,c=V.get(this),d=c[a+"queue"],e=c[a+"queueHooks"],f=r.timers,g=d?d.length:0;for(c.finish=!0,r.queue(this,a,[]),e&&e.stop&&e.stop.call(this,!0),b=f.length;b--;)f[b].elem===this&&f[b].queue===a&&(f[b].anim.stop(!0),f.splice(b,1));for(b=0;b<g;b++)d[b]&&d[b].finish&&d[b].finish.call(this);delete c.finish})}}),r.each(["toggle","show","hide"],function(a,b){var c=r.fn[b];r.fn[b]=function(a,d,e){return null==a||"boolean"==typeof a?c.apply(this,arguments):this.animate(db
vendor: 4,600 bytes, lines 7-8
7(b,!0),a,d,e)}}),r.each({slideDown:db("show"),slideUp:db("hide"),slideToggle:db("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){r.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),r.timers=[],r.fx.tick=function(){var a,b=0,c=r.timers;for(Za=r.now();b<c.length;b++)a=c[b],a()||c[b]!==a||c.splice(b--,1);c.length||r.fx.stop(),Za=void 0},r.fx.timer=function(a){r.timers.push(a),a()?r.fx.start():r.timers.pop()},r.fx.interval=13,r.fx.start=function(){$a||($a=a.requestAnimationFrame?a.requestAnimationFrame(bb):a.setInterval(r.fx.tick,r.fx.interval))},r.fx.stop=function(){a.cancelAnimationFrame?a.cancelAnimationFrame($a):a.clearInterval($a),$a=null},r.fx.speeds={slow:600,fast:200,_default:400},r.fn.delay=function(b,c){return b=r.fx?r.fx.speeds[b]||b:b,c=c||"fx",this.queue(c,function(c,d){var e=a.setTimeout(c,b);d.stop=function(){a.clearTimeout(e)}})},function(){var a=d.createElement("input"),b=d.createElement("select"),c=b.appendChild(d.createElement("option"));a.type="checkbox",o.checkOn=""!==a.value,o.optSelected=c.selected,a=d.createElement("input"),a.value="t",a.type="radio",o.radioValue="t"===a.value}();var ib,jb=r.expr.attrHandle;r.fn.extend({attr:function(a,b){return S(this,r.attr,a,b,arguments.length>1)},removeAttr:function(a){return this.each(function(){r.removeAttr(this,a)})}}),r.extend({attr:function(a,b,c){var d,e,f=a.nodeType;if(3!==f&&8!==f&&2!==f)return"undefined"==typeof a.getAttribute?r.prop(a,b,c):(1===f&&r.isXMLDoc(a)||(e=r.attrHooks[b.toLowerCase()]||(r.expr.match.bool.test(b)?ib:void 0)),
8void 0!==c?null===c?void r.removeAttr(a,b):e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:(a.setAttribute(b,c+""),c):e&&"get"in e&&null!==(d=e.get(a,b))?d:(d=r.find.attr(a,b),null==d?void 0:d))},attrHooks:{type:{set:function(a,b){if(!o.radioValue&&"radio"===b&&r.nodeName(a,"input")){var c=a.value;return a.setAttribute("type",b),c&&(a.value=c),b}}}},removeAttr:function(a,b){var c,d=0,e=b&&b.match(K);if(e&&1===a.nodeType)while(c=e[d++])a.removeAttribute(c)}}),ib={set:function(a,b,c){return b===!1?r.removeAttr(a,c):a.setAttribute(c,c),c}},r.each(r.expr.match.bool.source.match(/\w+/g),function(a,b){var c=jb[b]||r.find.attr;jb[b]=function(a,b,d){var e,f,g=b.toLowerCase();return d||(f=jb[g],jb[g]=e,e=null!=c(a,b,d)?g:null,jb[g]=f),e}});var kb=/^(?:input|select|textarea|button)$/i,lb=/^(?:a|area)$/i;r.fn.extend({prop:function(a,b){return S(this,r.prop,a,b,arguments.length>1)},removeProp:function(a){return this.each(function(){delete this[r.propFix[a]||a]})}}),r.extend({prop:function(a,b,c){var d,e,f=a.nodeType;if(3!==f&&8!==f&&2!==f)return 1===f&&r.isXMLDoc(a)||(b=r.propFix[b]||b,e=r.propHooks[b]),void 0!==c?e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:a[b]=c:e&&"get"in e&&null!==(d=e.get(a,b))?d:a[b]},propHooks:{tabIndex:{get:function(a){var b=r.find.attr(a,"tabindex");return b?parseInt(b,10):kb.test(a.nodeName)||lb.test(a.nodeName)&&a.href?0:-1}}},propFix:{"for":"htmlFor","class":"className"}}),o.optSelected||(r.propHooks.selected={get:function(a){var b=a.parentNode;return b&&b.parentNode&&b.parentNode.selectedIndex,null},set:function(a){var b=a.parentNode;b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex)}}),r.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){r.propFix[this.toLowerCase()]=this});function mb(a){var b=a.match(K)||[];return b.join(" ")}function nb(a){return a.getAttribute&&a.getAttribute("class")||""}r.fn.extend({addClass:function(a){var b,c,d,e,f,g,h,i=0;if(r.isFunction(a))return this.each(function(b){r(this).addClass(a.call(this,b,nb(this)))});if("string"==typeof a&&a){b=a.match(K)||[];while(c=this[i++])if(e=nb(c),d=1===c.nodeType&&" "+mb(e)+" "){g=0;while(f=b[g++])d.indexOf(" "+f+" ")<0&&(d+=f+" ");h=mb(d),e!==h&&c.setAttribute("class",h)}}return this},removeClass:function(a){var b,c,d,e,f,g,h,i=0;if(r.isFunction(a))return this.each(function(b){r(this).removeClass(a.call(this,b,nb(this)))});if(!arguments.length)return this.attr("class","");if("string"==typeof a&&a){b=a.match(K)||[];while(c=this[i++])if(e=nb(c),d=1===c.nodeType&&" "+mb(e)+" "){g=0;while(f=b[g++])while(d.indexOf(" "+f+" ")>-1)d=d.replace(" "+f+" "," ");h=mb(d),e!==h&&c.setAttribute("class",h)}}return this},toggleClass:function(a,b){var c=typeof a;return"boolean"==typeof b&&"string"===c?b?this.addClass(a):this.removeClass(a):r.isFunction(a)?this.each(function(c){r(this).toggleClass(a.call(this,c,nb(this),b),b)}):this.each(function(){var b,d,e,f;if("string"===c){d=0,e=r(this),f=a.match(K)||[];
vendor: 19,588 bytes, line 8
8while(b=f[d++])e.hasClass(b)?e.removeClass(b):e.addClass(b)}else void 0!==a&&"boolean"!==c||(b=nb(this),b&&V.set(this,"__className__",b),this.setAttribute&&this.setAttribute("class",b||a===!1?"":V.get(this,"__className__")||""))})},hasClass:function(a){var b,c,d=0;b=" "+a+" ";while(c=this[d++])if(1===c.nodeType&&(" "+mb(nb(c))+" ").indexOf(b)>-1)return!0;return!1}});var ob=/\r/g;r.fn.extend({val:function(a){var b,c,d,e=this[0];{if(arguments.length)return d=r.isFunction(a),this.each(function(c){var e;1===this.nodeType&&(e=d?a.call(this,c,r(this).val()):a,null==e?e="":"number"==typeof e?e+="":r.isArray(e)&&(e=r.map(e,function(a){return null==a?"":a+""})),b=r.valHooks[this.type]||r.valHooks[this.nodeName.toLowerCase()],b&&"set"in b&&void 0!==b.set(this,e,"value")||(this.value=e))});if(e)return b=r.valHooks[e.type]||r.valHooks[e.nodeName.toLowerCase()],b&&"get"in b&&void 0!==(c=b.get(e,"value"))?c:(c=e.value,"string"==typeof c?c.replace(ob,""):null==c?"":c)}}}),r.extend({valHooks:{option:{get:function(a){var b=r.find.attr(a,"value");return null!=b?b:mb(r.text(a))}},select:{get:function(a){var b,c,d,e=a.options,f=a.selectedIndex,g="select-one"===a.type,h=g?null:[],i=g?f+1:e.length;for(d=f<0?i:g?f:0;d<i;d++)if(c=e[d],(c.selected||d===f)&&!c.disabled&&(!c.parentNode.disabled||!r.nodeName(c.parentNode,"optgroup"))){if(b=r(c).val(),g)return b;h.push(b)}return h},set:function(a,b){var c,d,e=a.options,f=r.makeArray(b),g=e.length;while(g--)d=e[g],(d.selected=r.inArray(r.valHooks.option.get(d),f)>-1)&&(c=!0);return c||(a.selectedIndex=-1),f}}}}),r.each(["radio","checkbox"],function(){r.valHooks[this]={set:function(a,b){if(r.isArray(b))return a.checked=r.inArray(r(a).val(),b)>-1}},o.checkOn||(r.valHooks[this].get=function(a){return null===a.getAttribute("value")?"on":a.value})});var pb=/^(?:focusinfocus|focusoutblur)$/;r.extend(r.event,{trigger:function(b,c,e,f){var g,h,i,j,k,m,n,o=[e||d],p=l.call(b,"type")?b.type:b,q=l.call(b,"namespace")?b.namespace.split("."):[];if(h=i=e=e||d,3!==e.nodeType&&8!==e.nodeType&&!pb.test(p+r.event.triggered)&&(p.indexOf(".")>-1&&(q=p.split("."),p=q.shift(),q.sort()),k=p.indexOf(":")<0&&"on"+p,b=b[r.expando]?b:new r.Event(p,"object"==typeof b&&b),b.isTrigger=f?2:3,b.namespace=q.join("."),b.rnamespace=b.namespace?new RegExp("(^|\\.)"+q.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,b.result=void 0,b.target||(b.target=e),c=null==c?[b]:r.makeArray(c,[b]),n=r.event.special[p]||{},f||!n.trigger||n.trigger.apply(e,c)!==!1)){if(!f&&!n.noBubble&&!r.isWindow(e)){for(j=n.delegateType||p,pb.test(j+p)||(h=h.parentNode);h;h=h.parentNode)o.push(h),i=h;i===(e.ownerDocument||d)&&o.push(i.defaultView||i.parentWindow||a)}g=0;while((h=o[g++])&&!b.isPropagationStopped())b.type=g>1?j:n.bindType||p,m=(V.get(h,"events")||{})[b.type]&&V.get(h,"handle"),m&&m.apply(h,c),m=k&&h[k],m&&m.apply&&T(h)&&(b.result=m.apply(h,c),b.result===!1&&b.preventDefault());return b.type=p,f||b.isDefaultPrevented()||n._default&&n._default.apply(o.pop(),c)!==!1||!T(e)||k&&r.isFunction(e[p])&&!r.isWindow(e)&&(i=e[k],i&&(e[k]=null),r.event.triggered=p,e[p](),r.event.triggered=void 0,i&&(e[k]=i)),b.result}},simulate:function(a,b,c){var d=r.extend(new r.Event,c,{type:a,isSimulated:!0});r.event.trigger(d,null,b)}}),r.fn.extend({trigger:function(a,b){return this.each(function(){r.event.trigger(a,b,this)})},triggerHandler:function(a,b){var c=this[0];if(c)return r.event.trigger(a,b,c,!0)}}),r.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(a,b){r.fn[b]=function(a,c){return arguments.length>0?this.on(b,null,a,c):this.trigger(b)}}),r.fn.extend({hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)}}),o.focusin="onfocusin"in a,o.focusin||r.each({focus:"focusin",blur:"focusout"},function(a,b){var c=function(a){r.event.simulate(b,a.target,r.event.fix(a))};r.event.special[b]={setup:function(){var d=this.ownerDocument||this,e=V.access(d,b);e||d.addEventListener(a,c,!0),V.access(d,b,(e||0)+1)},teardown:function(){var d=this.ownerDocument||this,e=V.access(d,b)-1;e?V.access(d,b,e):(d.removeEventListener(a,c,!0),V.remove(d,b))}}});var qb=a.location,rb=r.now(),sb=/\?/;r.parseXML=function(b){var c;if(!b||"string"!=typeof b)return null;try{c=(new a.DOMParser).parseFromString(b,"text/xml")}catch(d){c=void 0}return c&&!c.getElementsByTagName("parsererror").length||r.error("Invalid XML: "+b),c};var tb=/\[\]$/,ub=/\r?\n/g,vb=/^(?:submit|button|image|reset|file)$/i,wb=/^(?:input|select|textarea|keygen)/i;function xb(a,b,c,d){var e;if(r.isArray(b))r.each(b,function(b,e){c||tb.test(a)?d(a,e):xb(a+"["+("object"==typeof e&&null!=e?b:"")+"]",e,c,d)});else if(c||"object"!==r.type(b))d(a,b);else for(e in b)xb(a+"["+e+"]",b[e],c,d)}r.param=function(a,b){var c,d=[],e=function(a,b){var c=r.isFunction(b)?b():b;d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(null==c?"":c)};if(r.isArray(a)||a.jquery&&!r.isPlainObject(a))r.each(a,function(){e(this.name,this.value)});else for(c in a)xb(c,a[c],b,e);return d.join("&")},r.fn.extend({serialize:function(){return r.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var a=r.prop(this,"elements");return a?r.makeArray(a):this}).filter(function(){var a=this.type;return this.name&&!r(this).is(":disabled")&&wb.test(this.nodeName)&&!vb.test(a)&&(this.checked||!ia.test(a))}).map(function(a,b){var c=r(this).val();return null==c?null:r.isArray(c)?r.map(c,function(a){return{name:b.name,value:a.replace(ub,"\r\n")}}):{name:b.name,value:c.replace(ub,"\r\n")}}).get()}});var yb=/%20/g,zb=/#.*$/,Ab=/([?&])_=[^&]*/,Bb=/^(.*?):[ \t]*([^\r\n]*)$/gm,Cb=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Db=/^(?:GET|HEAD)$/,Eb=/^\/\//,Fb={},Gb={},Hb="*/".concat("*"),Ib=d.createElement("a");Ib.href=qb.href;function Jb(a){return function(b,c){"string"!=typeof b&&(c=b,b="*");var d,e=0,f=b.toLowerCase().match(K)||[];if(r.isFunction(c))while(d=f[e++])"+"===d[0]?(d=d.slice(1)||"*",(a[d]=a[d]||[]).unshift(c)):(a[d]=a[d]||[]).push(c)}}function Kb(a,b,c,d){var e={},f=a===Gb;function g(h){var i;return e[h]=!0,r.each(a[h]||[],function(a,h){var j=h(b,c,d);return"string"!=typeof j||f||e[j]?f?!(i=j):void 0:(b.dataTypes.unshift(j),g(j),!1)}),i}return g(b.dataTypes[0])||!e["*"]&&g("*")}function Lb(a,b){var c,d,e=r.ajaxSettings.flatOptions||{};for(c in b)void 0!==b[c]&&((e[c]?a:d||(d={}))[c]=b[c]);return d&&r.extend(!0,a,d),a}function Mb(a,b,c){var d,e,f,g,h=a.contents,i=a.dataTypes;while("*"===i[0])i.shift(),void 0===d&&(d=a.mimeType||b.getResponseHeader("Content-Type"));if(d)for(e in h)if(h[e]&&h[e].test(d)){i.unshift(e);break}if(i[0]in c)f=i[0];else{for(e in c){if(!i[0]||a.converters[e+" "+i[0]]){f=e;break}g||(g=e)}f=f||g}if(f)return f!==i[0]&&i.unshift(f),c[f]}function Nb(a,b,c,d){var e,f,g,h,i,j={},k=a.dataTypes.slice();if(k[1])for(g in a.converters)j[g.toLowerCase()]=a.converters[g];f=k.shift();while(f)if(a.responseFields[f]&&(c[a.responseFields[f]]=b),!i&&d&&a.dataFilter&&(b=a.dataFilter(b,a.dataType)),i=f,f=k.shift())if("*"===f)f=i;else if("*"!==i&&i!==f){if(g=j[i+" "+f]||j["* "+f],!g)for(e in j)if(h=e.split(" "),h[1]===f&&(g=j[i+" "+h[0]]||j["* "+h[0]])){g===!0?g=j[e]:j[e]!==!0&&(f=h[0],k.unshift(h[1]));break}if(g!==!0)if(g&&a["throws"])b=g(b);else try{b=g(b)}catch(l){return{state:"parsererror",error:g?l:"No conversion from "+i+" to "+f}}}return{state:"success",data:b}}r.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:qb.href,type:"GET",isLocal:Cb.test(qb.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Hb,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":r.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(a,b){return b?Lb(Lb(a,r.ajaxSettings),b):Lb(r.ajaxSettings,a)},ajaxPrefilter:Jb(Fb),ajaxTransport:Jb(Gb),ajax:function(b,c){"object"==typeof b&&(c=b,b=void 0),c=c||{};var e,f,g,h,i,j,k,l,m,n,o=r.ajaxSetup({},c),p=o.context||o,q=o.context&&(p.nodeType||p.jquery)?r(p):r.event,s=r.Deferred(),t=r.Callbacks("once memory"),u=o.statusCode||{},v={},w={},x="canceled",y={readyState:0,getResponseHeader:function(a){var b;if(k){if(!h){h={};while(b=Bb.exec(g))h[b[1].toLowerCase()]=b[2]}b=h[a.toLowerCase()]}return null==b?null:b},getAllResponseHeaders:function(){return k?g:null},setRequestHeader:function(a,b){return null==k&&(a=w[a.toLowerCase()]=w[a.toLowerCase()]||a,v[a]=b),this},overrideMimeType:function(a){return null==k&&(o.mimeType=a),this},statusCode:function(a){var b;if(a)if(k)y.always(a[y.status]);else for(b in a)u[b]=[u[b],a[b]];return this},abort:function(a){var b=a||x;return e&&e.abort(b),A(0,b),this}};if(s.promise(y),o.url=((b||o.url||qb.href)+"").replace(Eb,qb.protocol+"//"),o.type=c.method||c.type||o.method||o.type,o.dataTypes=(o.dataType||"*").toLowerCase().match(K)||[""],null==o.crossDomain){j=d.createElement("a");try{j.href=o.url,j.href=j.href,o.crossDomain=Ib.protocol+"//"+Ib.host!=j.protocol+"//"+j.host}catch(z){o.crossDomain=!0}}if(o.data&&o.processData&&"string"!=typeof o.data&&(o.data=r.param(o.data,o.traditional)),Kb(Fb,o,c,y),k)return y;l=r.event&&o.global,l&&0===r.active++&&r.event.trigger("ajaxStart"),o.type=o.type.toUpperCase(),o.hasContent=!Db.test(o.type),f=o.url.replace(zb,""),o.hasContent?o.data&&o.processData&&0===(o.contentType||"").indexOf("application/x-www-form-urlencoded")&&(o.data=o.data.replace(yb,"+")):(n=o.url.slice(f.length),o.data&&(f+=(sb.test(f)?"&":"?")+o.data,delete o.data),o.cache===!1&&(f=f.replace(Ab,"$1"),n=(sb.test(f)?"&":"?")+"_="+rb++ +n),o.url=f+n),o.ifModified&&(r.lastModified[f]&&y.setRequestHeader("If-Modified-Since",r.lastModified[f]),r.etag[f]&&y.setRequestHeader("If-None-Match",r.etag[f])),(o.data&&o.hasContent&&o.contentType!==!1||c.contentType)&&y.setRequestHeader("Content-Type",o.contentType),y.setRequestHeader("Accept",o.dataTypes[0]&&o.accepts[o.dataTypes[0]]?o.accepts[o.dataTypes[0]]+("*"!==o.dataTypes[0]?", "+Hb+"; q=0.01":""):o.accepts["*"]);for(m in o.headers)y.setRequestHeader(m,o.headers[m]);if(o.beforeSend&&(o.beforeSend.call(p,y,o)===!1||k))return y.abort();if(x="abort",t.add(o.complete),y.done(o.success),y.fail(o.error),e=Kb(Gb,o,c,y)){if(y.readyState=1,l&&q.trigger("ajaxSend",[y,o]),k)return y;o.async&&o.timeout>0&&(i=a.setTimeout(function(){y.abort("timeout")},o.timeout));try{k=!1,e.send(v,A)}catch(z){if(k)throw z;A(-1,z)}}else A(-1,"No Transport");function A(b,c,d,h){var j,m,n,v,w,x=c;k||(k=!0,i&&a.clearTimeout(i),e=void 0,g=h||"",y.readyState=b>0?4:0,j=b>=200&&b<300||304===b,d&&(v=Mb(o,y,d)),v=Nb(o,v,y,j),j?(o.ifModified&&(w=y.getResponseHeader("Last-Modified"),w&&(r.lastModified[f]=w),w=y.getResponseHeader("etag"),w&&(r.etag[f]=w)),204===b||"HEAD"===o.type?x="nocontent":304===b?x="notmodified":(x=v.state,m=v.data,n=v.error,j=!n)):(n=x,!b&&x||(x="error",b<0&&(b=0))),y.status=b,y.statusText=(c||x)+"",j?s.resolveWith(p,[m,x,y]):s.rejectWith(p,[y,x,n]),y.statusCode(u),u=void 0,l&&q.trigger(j?"ajaxSuccess":"ajaxError",[y,o,j?m:n]),t.fireWith(p,[y,x]),l&&(q.trigger("ajaxComplete",[y,o]),--r.active||r.event.trigger("ajaxStop")))}return y},getJSON:function(a,b,c){return r.get(a,b,c,"json")},getScript:function(a,b){return r.get(a,void 0,b,"script")}}),r.each(["get","post"],function(a,b){r[b]=function(a,c,d,e){return r.isFunction(c)&&(e=e||d,d=c,c=void 0),r.ajax(r.extend({url:a,type:b,dataType:e,data:c,success:d},r.isPlainObject(a)&&a))}}),r._evalUrl=function(a){return r.ajax({url:a,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,"throws":!0})},r.fn.extend({wrapAll:function(a){var b;return this[0]&&(r.isFunction(a)&&(a=a.call(this[0])),b=r(a,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstElementChild)a=a.firstElementChild;return a}).append(this)),this},wrapInner:function(a){return r.isFunction(a)?this.each(function(b){r(this).wrapInner(a.call(this,b))}):this.each(function(){var b=r(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=r.isFunction(a);return this.each(function(c){r(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(a){return this.parent(a).not("body").each(function(){r(this).replaceWith(this.childNodes)}),this}}),r.expr.pseudos.hidden=function(a){return!r.expr.pseudos.visible(a)},r.expr.pseudos.visible=function(a){return!!(a.offsetWidth||a.offsetHeight||a.getClientRects().length)},r.ajaxSettings.xhr=function(){try{return new a.XMLHttpRequest}catch(b){}};var Ob={0:200,1223:204},Pb=r.ajaxSettings.xhr();o.cors=!!Pb&&"withCredentials"in Pb,o.ajax=Pb=!!Pb,r.ajaxTransport(function(b){var c,d;if(o.cors||Pb&&!b.crossDomain)return{send:function(e,f){var g,h=b.xhr();if(h.open(b.type,b.url,b.async,b.username,b.password),b.xhrFields)for(g in b.xhrFields)h[g]=b.xhrFields[g];b.mimeType&&h.overrideMimeType&&h.overrideMimeType(b.mimeType),b.crossDomain||e["X-Requested-With"]||(e["X-Requested-With"]="XMLHttpRequest");for(g in e)h.setRequestHeader(g,e[g]);c=function(a){return function(){c&&(c=d=h.onload=h.onerror=h.onabort=h.onreadystatechange=null,"abort"===a?h.abort():"error"===a?"number"!=typeof h.status?f(0,"error"):f(h.status,h.statusText):f(Ob[h.status]||h.status,h.statusText,"text"!==(h.responseType||"text")||"string"!=typeof h.responseText?{binary:h.response}:{text:h.responseText},h.getAllResponseHeaders()))}},h.onload=c(),d=h.onerror=c("error"),void 0!==h.onabort?h.onabort=d:h.onreadystatechange=function(){4===h.readyState&&a.setTimeout(function(){c&&d()})},c=c("abort");try{h.send(b.hasContent&&b.data||null)}catch(i){if(c)throw i}},abort:function(){c&&c()}}}),r.ajaxPrefilter(function(a){a.crossDomain&&(a.contents.script=!1)}),r.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(a){return r.globalEval(a),a}}}),r.ajaxPrefilter("script",function(a){void 0===a.cache&&(a.cache=!1),a.crossDomain&&(a.type="GET")}),r.ajaxTransport("script",function(a){if(a.crossDomain){var b,c;return{send:function(e,f){b=r("<script>").prop({charset:a.scriptCharset,src:a.url}).on("load error",c=function(a){b.remove(),c=null,a&&f("error"===a.type?404:200,a.type)}),d.head.appendChild(b[0])},abort:function(){c&&c()}}}});var Qb=[],Rb=/(=)\?(?=&|$)|\?\?/;r.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var a=Qb.pop()||r.expando+"_"+rb++;return this[a]=!0,a}}),r.ajaxPrefilter("json jsonp",function(b,c,d){var e,f,g,h=b.jsonp!==!1&&(Rb.test(b.url)?"url":"string"==typeof b.data&&0===(b.contentType||"").indexOf("application/x-www-form-urlencoded")&&Rb.test(b.data)&&"data");if(h||"jsonp"===b.dataTypes[0])return e=b.jsonpCallback=r.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,h?b[h]=b[h].replace(Rb,"$1"+e):b.jsonp!==!1&&(b.url+=(sb.test(b.url)?"&":"?")+b.jsonp+"="+e),b.converters["script json"]=function(){return g||r.error(e+" was not called"),g[0]},b.dataTypes[0]="json",f=a[e],a[e]=function(){g=arguments},d.always(function(){void 0===f?r(a).removeProp(e):a[e]=f,b[e]&&(b.jsonpCallback=c.jsonpCallback,Qb.push(e)),g&&r.isFunction(f)&&f(g[0]),g=f=void 0}),"script"}),o.createHTMLDocument=function(){var a=d.implementation.createHTMLDocument("").body;return a.innerHTML="<form></form><form></form>",2===a.childNodes.length}(),r.parseHTML=function(a,b,c){if("string"!=typeof a)return[];"boolean"==typeof b&&(c=b,b=!1);var e,f,g;return b||(o.createHTMLDocument?(b=d.implementation.createHTMLDocument(""),e=b.createElement("base"),e.href=d.location.href,b.head.appendChild(e)):b=d),f=B.exec(a),g=!c&&[],f?[b.createElement(f[1])]:(f=pa([a],b,g),g&&g.length&&r(g).remove(),r.merge([],f.childNodes))},r.fn.load=function(a,b,c){var d,e,f,g=this,h=a.indexOf(" ");return h>-1&&(d=mb(a.slice(h)),a=a.slice(0,h)),r.isFunction(b)?(c=b,b=void 0):b&&"object"==typeof b&&(e="POST"),g.length>0&&r.ajax({url:a,type:e||"GET",dataType:"html",data:b}).done(function(a){f=arguments,g.html(d?r("<div>").append(r.parseHTML(a)).find(d):a)}).always(c&&function(a,b){g.each(function(){c.apply(this,f||[a.responseText,b,a])})}),this},r.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(a,b){r.fn[b]=function(a){return this.on(b,a)}}),r.expr.pseudos.animated=function(a){return r.grep(r.timers,function(b){return a===b.elem}).length};function Sb(a){return r.isWindow(a)?a:9===a.nodeType&&a.defaultView}r.offset={setOffset:function(a,b,c){var d,e,f,g,h,i,j,k=r.css(a,"position"),l=r(a),m={};"static"===k&&(a.style.position="relative"),h=l.offset(),f=r.css(a,"top"),i=r.css(a,"left"),j=("absolute"===k||"fixed"===k)&&(f+i).indexOf("auto")>-1,j?(d=l.position(),g=d.top,e=d.left):(g=parseFloat(f)||0,e=parseFloat(i)||0),r.isFunction(b)&&(b=b.call(a,c,r.extend({},h))),null!=b.top&&(m.top=b.top-h.top+g),null!=b.left&&(m.left=b.left-h.left+e),"using"in b?b.using.call(a,m):l.css(m)}},r.fn.extend({offset:function(a){if(arguments.length)return void 0===a?this:this.each(function(b){r.offset.setOffset(this,a,b)});var b,c,d,e,f=this[0];if(f)return f.getClientRects().length?(d=f.getBoundingClientRect(),d.width||d.height?(e=f.ownerDocument,c=Sb(e),b=e.documentElement,{top:d.top+c.pageYOffset-b.clientTop,left:d.left+c.pageXOffset-b.clientLeft}):d):{top:0,left:0}},position:function(){if(this[0]){var a,b,c=this[0],d={top:0,left:0};return"fixed"===r.css(c,"position")?b=c.getBoundingClientRect():(a=this.offsetParent(),b=this.offset(),r.nodeName(a[0],"html")||(d=a.offset()),d={top:d.top+r.css(a[0],"borderTopWidth",!0),left:d.left+r.css(a[0],"borderLeftWidth",!0)}),{top:b.top-d.top-r.css(c,"marginTop",!0),left:b.left-d.left-r.css(c,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var a=this.offsetParent;while(a&&"static"===r.css(a,"position"))a=a.offsetParent;return a||qa})}}),r.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(a,b){var c="pageYOffset"===b;r.fn[a]=function(d){return S(this,function(a,d,e){var f=Sb(a);return void 0===e?f?f[b]:a[d]:void(f?f.scrollTo(c?f.pageXOffset:e,c?e:f.pageYOffset):a[d]=e)},a,d,arguments.length)}}),r.each(["top","left"],function(a,b){r.cssHooks[b]=Oa(o.pixelPosition,function(a,c){if(c)return c=Na(a,b),La.test(c)?r(a).position()[b]+"px":c})}),r.each({Height:"height",Width:"width"},function(a,b){r.each({padding:"inner"+a,content:b,"":"outer"+a},function(c,d){r.fn[d]=function(e,f){var g=arguments.length&&(c||"boolean"!=typeof e),h=c||(e===!0||f===!0?"margin":"border");return S(this,function(b,c,e){var f;return r.isWindow(b)?0===d.indexOf("outer")?b["inner"+a]:b.document.documentElement["client"+a]:9===b.nodeType?(f=b.documentElement,Math.max(b.body["scroll"+a],f["scroll"+a],b.body["offset"+a],f["offset"+a],f["client"+a])):void 0===e?r.css(b,c,h):r.style(b,c,e,h)},b,g?e:void 0,g)}})}),r.fn.extend({bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return 1===arguments.length?this.off(a,"**"):this.off(b,a||"**",c)}}),r.parseJSON=JSON.parse,"function"==typeof define&&define.amd&&define("jquery",[],function(){return r});var Tb=a.jQuery,Ub=a.$;return r.noConflict=function(b){return a.$===r&&(a.$=Ub),b&&a.jQuery===r&&(a.jQuery=Tb),r},b||(a.jQuery=a.$=r),r});
8
9;
10/*! jQuery UI - v1.12.1 - 2016-09-14
11* http://jqueryui.com
12* Includes: widget.js, position.js, data.js, disable-selection.js, effect.js, effects/effect-blind.js, effects/effect-bounce.js, effects/effect-clip.js, effects/effect-drop.js, effects/effect-explode.js, effects/effect-fade.js, effects/effect-fold.js, effects/effect-highlight.js, effects/effect-puff.js, effects/effect-pulsate.js, effects/effect-scale.js, effects/effect-shake.js, effects/effect-size.js, effects/effect-slide.js, effects/effect-transfer.js, focusable.js, form-reset-mixin.js, jquery-1-7.js, keycode.js, labels.js, scroll-parent.js, tabbable.js, unique-id.js, widgets/accordion.js, widgets/autocomplete.js, widgets/button.js, widgets/checkboxradio.js, widgets/controlgroup.js, widgets/datepicker.js, widgets/dialog.js, widgets/draggable.js, widgets/droppable.js, widgets/menu.js, widgets/mouse.js, widgets/progressbar.js, widgets/resizable.js, widgets/selectable.js, widgets/selectmenu.js, widgets/slider.js, widgets/sortable.js, widgets/spinner.js, widgets/tabs.js, widgets/tooltip.js
13* Copyright jQuery Foundation and other contributors; Licensed MIT */
14
15(function( factory ) {
16	if ( typeof define === "function" && define.amd ) {
17
18		// AMD. Register as an anonymous module.
19		define([ "jquery" ], factory );
20	} else {
21
22		// Browser globals
23		factory( jQuery );
24	}
25}(function( $ ) {
26
27$.ui = $.ui || {};
28
29var version = $.ui.version = "1.12.1";
30
31
32/*!
33 * jQuery UI Widget 1.12.1
34 * http://jqueryui.com
vendor: 19,885 bytes, lines 35-738
35 *
36 * Copyright jQuery Foundation and other contributors
37 * Released under the MIT license.
38 * http://jquery.org/license
39 */
40
41//>>label: Widget
42//>>group: Core
43//>>description: Provides a factory for creating stateful widgets with a common API.
44//>>docs: http://api.jqueryui.com/jQuery.widget/
45//>>demos: http://jqueryui.com/widget/
46
47
48
49var widgetUuid = 0;
50var widgetSlice = Array.prototype.slice;
51
52$.cleanData = ( function( orig ) {
53	return function( elems ) {
54		var events, elem, i;
55		for ( i = 0; ( elem = elems[ i ] ) != null; i++ ) {
56			try {
57
58				// Only trigger remove when necessary to save time
59				events = $._data( elem, "events" );
60				if ( events && events.remove ) {
61					$( elem ).triggerHandler( "remove" );
62				}
63
64			// Http://bugs.jquery.com/ticket/8235
65			} catch ( e ) {}
66		}
67		orig( elems );
68	};
69} )( $.cleanData );
70
71$.widget = function( name, base, prototype ) {
72	var existingConstructor, constructor, basePrototype;
73
74	// ProxiedPrototype allows the provided prototype to remain unmodified
75	// so that it can be used as a mixin for multiple widgets (#8876)
76	var proxiedPrototype = {};
77
78	var namespace = name.split( "." )[ 0 ];
79	name = name.split( "." )[ 1 ];
80	var fullName = namespace + "-" + name;
81
82	if ( !prototype ) {
83		prototype = base;
84		base = $.Widget;
85	}
86
87	if ( $.isArray( prototype ) ) {
88		prototype = $.extend.apply( null, [ {} ].concat( prototype ) );
89	}
90
91	// Create selector for plugin
92	$.expr[ ":" ][ fullName.toLowerCase() ] = function( elem ) {
93		return !!$.data( elem, fullName );
94	};
95
96	$[ namespace ] = $[ namespace ] || {};
97	existingConstructor = $[ namespace ][ name ];
98	constructor = $[ namespace ][ name ] = function( options, element ) {
99
100		// Allow instantiation without "new" keyword
101		if ( !this._createWidget ) {
102			return new constructor( options, element );
103		}
104
105		// Allow instantiation without initializing for simple inheritance
106		// must use "new" keyword (the code above always passes args)
107		if ( arguments.length ) {
108			this._createWidget( options, element );
109		}
110	};
111
112	// Extend with the existing constructor to carry over any static properties
113	$.extend( constructor, existingConstructor, {
114		version: prototype.version,
115
116		// Copy the object used to create the prototype in case we need to
117		// redefine the widget later
118		_proto: $.extend( {}, prototype ),
119
120		// Track widgets that inherit from this widget in case this widget is
121		// redefined after a widget inherits from it
122		_childConstructors: []
123	} );
124
125	basePrototype = new base();
126
127	// We need to make the options hash a property directly on the new instance
128	// otherwise we'll modify the options hash on the prototype that we're
129	// inheriting from
130	basePrototype.options = $.widget.extend( {}, basePrototype.options );
131	$.each( prototype, function( prop, value ) {
132		if ( !$.isFunction( value ) ) {
133			proxiedPrototype[ prop ] = value;
134			return;
135		}
136		proxiedPrototype[ prop ] = ( function() {
137			function _super() {
138				return base.prototype[ prop ].apply( this, arguments );
139			}
140
141			function _superApply( args ) {
142				return base.prototype[ prop ].apply( this, args );
143			}
144
145			return function() {
146				var __super = this._super;
147				var __superApply = this._superApply;
148				var returnValue;
149
150				this._super = _super;
151				this._superApply = _superApply;
152
153				returnValue = value.apply( this, arguments );
154
155				this._super = __super;
156				this._superApply = __superApply;
157
158				return returnValue;
159			};
160		} )();
161	} );
162	constructor.prototype = $.widget.extend( basePrototype, {
163
164		// TODO: remove support for widgetEventPrefix
165		// always use the name + a colon as the prefix, e.g., draggable:start
166		// don't prefix for widgets that aren't DOM-based
167		widgetEventPrefix: existingConstructor ? ( basePrototype.widgetEventPrefix || name ) : name
168	}, proxiedPrototype, {
169		constructor: constructor,
170		namespace: namespace,
171		widgetName: name,
172		widgetFullName: fullName
173	} );
174
175	// If this widget is being redefined then we need to find all widgets that
176	// are inheriting from it and redefine all of them so that they inherit from
177	// the new version of this widget. We're essentially trying to replace one
178	// level in the prototype chain.
179	if ( existingConstructor ) {
180		$.each( existingConstructor._childConstructors, function( i, child ) {
181			var childPrototype = child.prototype;
182
183			// Redefine the child widget using the same prototype that was
184			// originally used, but inherit from the new version of the base
185			$.widget( childPrototype.namespace + "." + childPrototype.widgetName, constructor,
186				child._proto );
187		} );
188
189		// Remove the list of existing child constructors from the old constructor
190		// so the old child constructors can be garbage collected
191		delete existingConstructor._childConstructors;
192	} else {
193		base._childConstructors.push( constructor );
194	}
195
196	$.widget.bridge( name, constructor );
197
198	return constructor;
199};
200
201$.widget.extend = function( target ) {
202	var input = widgetSlice.call( arguments, 1 );
203	var inputIndex = 0;
204	var inputLength = input.length;
205	var key;
206	var value;
207
208	for ( ; inputIndex < inputLength; inputIndex++ ) {
209		for ( key in input[ inputIndex ] ) {
210			value = input[ inputIndex ][ key ];
211			if ( input[ inputIndex ].hasOwnProperty( key ) && value !== undefined ) {
212
213				// Clone objects
214				if ( $.isPlainObject( value ) ) {
215					target[ key ] = $.isPlainObject( target[ key ] ) ?
216						$.widget.extend( {}, target[ key ], value ) :
217
218						// Don't extend strings, arrays, etc. with objects
219						$.widget.extend( {}, value );
220
221				// Copy everything else by reference
222				} else {
223					target[ key ] = value;
224				}
225			}
226		}
227	}
228	return target;
229};
230
231$.widget.bridge = function( name, object ) {
232	var fullName = object.prototype.widgetFullName || name;
233	$.fn[ name ] = function( options ) {
234		var isMethodCall = typeof options === "string";
235		var args = widgetSlice.call( arguments, 1 );
236		var returnValue = this;
237
238		if ( isMethodCall ) {
239
240			// If this is an empty collection, we need to have the instance method
241			// return undefined instead of the jQuery instance
242			if ( !this.length && options === "instance" ) {
243				returnValue = undefined;
244			} else {
245				this.each( function() {
246					var methodValue;
247					var instance = $.data( this, fullName );
248
249					if ( options === "instance" ) {
250						returnValue = instance;
251						return false;
252					}
253
254					if ( !instance ) {
255						return $.error( "cannot call methods on " + name +
256							" prior to initialization; " +
257							"attempted to call method '" + options + "'" );
258					}
259
260					if ( !$.isFunction( instance[ options ] ) || options.charAt( 0 ) === "_" ) {
261						return $.error( "no such method '" + options + "' for " + name +
262							" widget instance" );
263					}
264
265					methodValue = instance[ options ].apply( instance, args );
266
267					if ( methodValue !== instance && methodValue !== undefined ) {
268						returnValue = methodValue && methodValue.jquery ?
269							returnValue.pushStack( methodValue.get() ) :
270							methodValue;
271						return false;
272					}
273				} );
274			}
275		} else {
276
277			// Allow multiple hashes to be passed on init
278			if ( args.length ) {
279				options = $.widget.extend.apply( null, [ options ].concat( args ) );
280			}
281
282			this.each( function() {
283				var instance = $.data( this, fullName );
284				if ( instance ) {
285					instance.option( options || {} );
286					if ( instance._init ) {
287						instance._init();
288					}
289				} else {
290					$.data( this, fullName, new object( options, this ) );
291				}
292			} );
293		}
294
295		return returnValue;
296	};
297};
298
299$.Widget = function( /* options, element */ ) {};
300$.Widget._childConstructors = [];
301
302$.Widget.prototype = {
303	widgetName: "widget",
304	widgetEventPrefix: "",
305	defaultElement: "<div>",
306
307	options: {
308		classes: {},
309		disabled: false,
310
311		// Callbacks
312		create: null
313	},
314
315	_createWidget: function( options, element ) {
316		element = $( element || this.defaultElement || this )[ 0 ];
317		this.element = $( element );
318		this.uuid = widgetUuid++;
319		this.eventNamespace = "." + this.widgetName + this.uuid;
320
321		this.bindings = $();
322		this.hoverable = $();
323		this.focusable = $();
324		this.classesElementLookup = {};
325
326		if ( element !== this ) {
327			$.data( element, this.widgetFullName, this );
328			this._on( true, this.element, {
329				remove: function( event ) {
330					if ( event.target === element ) {
331						this.destroy();
332					}
333				}
334			} );
335			this.document = $( element.style ?
336
337				// Element within the document
338				element.ownerDocument :
339
340				// Element is window or document
341				element.document || element );
342			this.window = $( this.document[ 0 ].defaultView || this.document[ 0 ].parentWindow );
343		}
344
345		this.options = $.widget.extend( {},
346			this.options,
347			this._getCreateOptions(),
348			options );
349
350		this._create();
351
352		if ( this.options.disabled ) {
353			this._setOptionDisabled( this.options.disabled );
354		}
355
356		this._trigger( "create", null, this._getCreateEventData() );
357		this._init();
358	},
359
360	_getCreateOptions: function() {
361		return {};
362	},
363
364	_getCreateEventData: $.noop,
365
366	_create: $.noop,
367
368	_init: $.noop,
369
370	destroy: function() {
371		var that = this;
372
373		this._destroy();
374		$.each( this.classesElementLookup, function( key, value ) {
375			that._removeClass( value, key );
376		} );
377
378		// We can probably remove the unbind calls in 2.0
379		// all event bindings should go through this._on()
380		this.element
381			.off( this.eventNamespace )
382			.removeData( this.widgetFullName );
383		this.widget()
384			.off( this.eventNamespace )
385			.removeAttr( "aria-disabled" );
386
387		// Clean up events and states
388		this.bindings.off( this.eventNamespace );
389	},
390
391	_destroy: $.noop,
392
393	widget: function() {
394		return this.element;
395	},
396
397	option: function( key, value ) {
398		var options = key;
399		var parts;
400		var curOption;
401		var i;
402
403		if ( arguments.length === 0 ) {
404
405			// Don't return a reference to the internal hash
406			return $.widget.extend( {}, this.options );
407		}
408
409		if ( typeof key === "string" ) {
410
411			// Handle nested keys, e.g., "foo.bar" => { foo: { bar: ___ } }
412			options = {};
413			parts = key.split( "." );
414			key = parts.shift();
415			if ( parts.length ) {
416				curOption = options[ key ] = $.widget.extend( {}, this.options[ key ] );
417				for ( i = 0; i < parts.length - 1; i++ ) {
418					curOption[ parts[ i ] ] = curOption[ parts[ i ] ] || {};
419					curOption = curOption[ parts[ i ] ];
420				}
421				key = parts.pop();
422				if ( arguments.length === 1 ) {
423					return curOption[ key ] === undefined ? null : curOption[ key ];
424				}
425				curOption[ key ] = value;
426			} else {
427				if ( arguments.length === 1 ) {
428					return this.options[ key ] === undefined ? null : this.options[ key ];
429				}
430				options[ key ] = value;
431			}
432		}
433
434		this._setOptions( options );
435
436		return this;
437	},
438
439	_setOptions: function( options ) {
440		var key;
441
442		for ( key in options ) {
443			this._setOption( key, options[ key ] );
444		}
445
446		return this;
447	},
448
449	_setOption: function( key, value ) {
450		if ( key === "classes" ) {
451			this._setOptionClasses( value );
452		}
453
454		this.options[ key ] = value;
455
456		if ( key === "disabled" ) {
457			this._setOptionDisabled( value );
458		}
459
460		return this;
461	},
462
463	_setOptionClasses: function( value ) {
464		var classKey, elements, currentElements;
465
466		for ( classKey in value ) {
467			currentElements = this.classesElementLookup[ classKey ];
468			if ( value[ classKey ] === this.options.classes[ classKey ] ||
469					!currentElements ||
470					!currentElements.length ) {
471				continue;
472			}
473
474			// We are doing this to create a new jQuery object because the _removeClass() call
475			// on the next line is going to destroy the reference to the current elements being
476			// tracked. We need to save a copy of this collection so that we can add the new classes
477			// below.
478			elements = $( currentElements.get() );
479			this._removeClass( currentElements, classKey );
480
481			// We don't use _addClass() here, because that uses this.options.classes
482			// for generating the string of classes. We want to use the value passed in from
483			// _setOption(), this is the new value of the classes option which was passed to
484			// _setOption(). We pass this value directly to _classes().
485			elements.addClass( this._classes( {
486				element: elements,
487				keys: classKey,
488				classes: value,
489				add: true
490			} ) );
491		}
492	},
493
494	_setOptionDisabled: function( value ) {
495		this._toggleClass( this.widget(), this.widgetFullName + "-disabled", null, !!value );
496
497		// If the widget is becoming disabled, then nothing is interactive
498		if ( value ) {
499			this._removeClass( this.hoverable, null, "ui-state-hover" );
500			this._removeClass( this.focusable, null, "ui-state-focus" );
501		}
502	},
503
504	enable: function() {
505		return this._setOptions( { disabled: false } );
506	},
507
508	disable: function() {
509		return this._setOptions( { disabled: true } );
510	},
511
512	_classes: function( options ) {
513		var full = [];
514		var that = this;
515
516		options = $.extend( {
517			element: this.element,
518			classes: this.options.classes || {}
519		}, options );
520
521		function processClassString( classes, checkOption ) {
522			var current, i;
523			for ( i = 0; i < classes.length; i++ ) {
524				current = that.classesElementLookup[ classes[ i ] ] || $();
525				if ( options.add ) {
526					current = $( $.unique( current.get().concat( options.element.get() ) ) );
527				} else {
528					current = $( current.not( options.element ).get() );
529				}
530				that.classesElementLookup[ classes[ i ] ] = current;
531				full.push( classes[ i ] );
532				if ( checkOption && options.classes[ classes[ i ] ] ) {
533					full.push( options.classes[ classes[ i ] ] );
534				}
535			}
536		}
537
538		this._on( options.element, {
539			"remove": "_untrackClassesElement"
540		} );
541
542		if ( options.keys ) {
543			processClassString( options.keys.match( /\S+/g ) || [], true );
544		}
545		if ( options.extra ) {
546			processClassString( options.extra.match( /\S+/g ) || [] );
547		}
548
549		return full.join( " " );
550	},
551
552	_untrackClassesElement: function( event ) {
553		var that = this;
554		$.each( that.classesElementLookup, function( key, value ) {
555			if ( $.inArray( event.target, value ) !== -1 ) {
556				that.classesElementLookup[ key ] = $( value.not( event.target ).get() );
557			}
558		} );
559	},
560
561	_removeClass: function( element, keys, extra ) {
562		return this._toggleClass( element, keys, extra, false );
563	},
564
565	_addClass: function( element, keys, extra ) {
566		return this._toggleClass( element, keys, extra, true );
567	},
568
569	_toggleClass: function( element, keys, extra, add ) {
570		add = ( typeof add === "boolean" ) ? add : extra;
571		var shift = ( typeof element === "string" || element === null ),
572			options = {
573				extra: shift ? keys : extra,
574				keys: shift ? element : keys,
575				element: shift ? this.element : element,
576				add: add
577			};
578		options.element.toggleClass( this._classes( options ), add );
579		return this;
580	},
581
582	_on: function( suppressDisabledCheck, element, handlers ) {
583		var delegateElement;
584		var instance = this;
585
586		// No suppressDisabledCheck flag, shuffle arguments
587		if ( typeof suppressDisabledCheck !== "boolean" ) {
588			handlers = element;
589			element = suppressDisabledCheck;
590			suppressDisabledCheck = false;
591		}
592
593		// No element argument, shuffle and use this.element
594		if ( !handlers ) {
595			handlers = element;
596			element = this.element;
597			delegateElement = this.widget();
598		} else {
599			element = delegateElement = $( element );
600			this.bindings = this.bindings.add( element );
601		}
602
603		$.each( handlers, function( event, handler ) {
604			function handlerProxy() {
605
606				// Allow widgets to customize the disabled handling
607				// - disabled as an array instead of boolean
608				// - disabled class as method for disabling individual parts
609				if ( !suppressDisabledCheck &&
610						( instance.options.disabled === true ||
611						$( this ).hasClass( "ui-state-disabled" ) ) ) {
612					return;
613				}
614				return ( typeof handler === "string" ? instance[ handler ] : handler )
615					.apply( instance, arguments );
616			}
617
618			// Copy the guid so direct unbinding works
619			if ( typeof handler !== "string" ) {
620				handlerProxy.guid = handler.guid =
621					handler.guid || handlerProxy.guid || $.guid++;
622			}
623
624			var match = event.match( /^([\w:-]*)\s*(.*)$/ );
625			var eventName = match[ 1 ] + instance.eventNamespace;
626			var selector = match[ 2 ];
627
628			if ( selector ) {
629				delegateElement.on( eventName, selector, handlerProxy );
630			} else {
631				element.on( eventName, handlerProxy );
632			}
633		} );
634	},
635
636	_off: function( element, eventName ) {
637		eventName = ( eventName || "" ).split( " " ).join( this.eventNamespace + " " ) +
638			this.eventNamespace;
639		element.off( eventName ).off( eventName );
640
641		// Clear the stack to avoid memory leaks (#10056)
642		this.bindings = $( this.bindings.not( element ).get() );
643		this.focusable = $( this.focusable.not( element ).get() );
644		this.hoverable = $( this.hoverable.not( element ).get() );
645	},
646
647	_delay: function( handler, delay ) {
648		function handlerProxy() {
649			return ( typeof handler === "string" ? instance[ handler ] : handler )
650				.apply( instance, arguments );
651		}
652		var instance = this;
653		return setTimeout( handlerProxy, delay || 0 );
654	},
655
656	_hoverable: function( element ) {
657		this.hoverable = this.hoverable.add( element );
658		this._on( element, {
659			mouseenter: function( event ) {
660				this._addClass( $( event.currentTarget ), null, "ui-state-hover" );
661			},
662			mouseleave: function( event ) {
663				this._removeClass( $( event.currentTarget ), null, "ui-state-hover" );
664			}
665		} );
666	},
667
668	_focusable: function( element ) {
669		this.focusable = this.focusable.add( element );
670		this._on( element, {
671			focusin: function( event ) {
672				this._addClass( $( event.currentTarget ), null, "ui-state-focus" );
673			},
674			focusout: function( event ) {
675				this._removeClass( $( event.currentTarget ), null, "ui-state-focus" );
676			}
677		} );
678	},
679
680	_trigger: function( type, event, data ) {
681		var prop, orig;
682		var callback = this.options[ type ];
683
684		data = data || {};
685		event = $.Event( event );
686		event.type = ( type === this.widgetEventPrefix ?
687			type :
688			this.widgetEventPrefix + type ).toLowerCase();
689
690		// The original event may come from any element
691		// so we need to reset the target on the new event
692		event.target = this.element[ 0 ];
693
694		// Copy original event properties over to the new event
695		orig = event.originalEvent;
696		if ( orig ) {
697			for ( prop in orig ) {
698				if ( !( prop in event ) ) {
699					event[ prop ] = orig[ prop ];
700				}
701			}
702		}
703
704		this.element.trigger( event, data );
705		return !( $.isFunction( callback ) &&
706			callback.apply( this.element[ 0 ], [ event ].concat( data ) ) === false ||
707			event.isDefaultPrevented() );
708	}
709};
710
711$.each( { show: "fadeIn", hide: "fadeOut" }, function( method, defaultEffect ) {
712	$.Widget.prototype[ "_" + method ] = function( element, options, callback ) {
713		if ( typeof options === "string" ) {
714			options = { effect: options };
715		}
716
717		var hasOptions;
718		var effectName = !options ?
719			method :
720			options === true || typeof options === "number" ?
721				defaultEffect :
722				options.effect || defaultEffect;
723
724		options = options || {};
725		if ( typeof options === "number" ) {
726			options = { duration: options };
727		}
728
729		hasOptions = !$.isEmptyObject( options );
730		options.complete = callback;
731
732		if ( options.delay ) {
733			element.delay( options.delay );
734		}
735
736		if ( hasOptions && $.effects && $.effects.effect[ effectName ] ) {
737			element[ method ]( options );
738		} else if ( effectName !== method && element[ effectName ] ) {
vendor: 4,982 bytes, lines 739-918
739			element[ effectName ]( options.duration, options.easing, callback );
740		} else {
741			element.queue( function( next ) {
742				$( this )[ method ]();
743				if ( callback ) {
744					callback.call( element[ 0 ] );
745				}
746				next();
747			} );
748		}
749	};
750} );
751
752var widget = $.widget;
753
754
755/*!
756 * jQuery UI Position 1.12.1
757 * http://jqueryui.com
758 *
759 * Copyright jQuery Foundation and other contributors
760 * Released under the MIT license.
761 * http://jquery.org/license
762 *
763 * http://api.jqueryui.com/position/
764 */
765
766//>>label: Position
767//>>group: Core
768//>>description: Positions elements relative to other elements.
769//>>docs: http://api.jqueryui.com/position/
770//>>demos: http://jqueryui.com/position/
771
772
773( function() {
774var cachedScrollbarWidth,
775	max = Math.max,
776	abs = Math.abs,
777	rhorizontal = /left|center|right/,
778	rvertical = /top|center|bottom/,
779	roffset = /[\+\-]\d+(\.[\d]+)?%?/,
780	rposition = /^\w+/,
781	rpercent = /%$/,
782	_position = $.fn.position;
783
784function getOffsets( offsets, width, height ) {
785	return [
786		parseFloat( offsets[ 0 ] ) * ( rpercent.test( offsets[ 0 ] ) ? width / 100 : 1 ),
787		parseFloat( offsets[ 1 ] ) * ( rpercent.test( offsets[ 1 ] ) ? height / 100 : 1 )
788	];
789}
790
791function parseCss( element, property ) {
792	return parseInt( $.css( element, property ), 10 ) || 0;
793}
794
795function getDimensions( elem ) {
796	var raw = elem[ 0 ];
797	if ( raw.nodeType === 9 ) {
798		return {
799			width: elem.width(),
800			height: elem.height(),
801			offset: { top: 0, left: 0 }
802		};
803	}
804	if ( $.isWindow( raw ) ) {
805		return {
806			width: elem.width(),
807			height: elem.height(),
808			offset: { top: elem.scrollTop(), left: elem.scrollLeft() }
809		};
810	}
811	if ( raw.preventDefault ) {
812		return {
813			width: 0,
814			height: 0,
815			offset: { top: raw.pageY, left: raw.pageX }
816		};
817	}
818	return {
819		width: elem.outerWidth(),
820		height: elem.outerHeight(),
821		offset: elem.offset()
822	};
823}
824
825$.position = {
826	scrollbarWidth: function() {
827		if ( cachedScrollbarWidth !== undefined ) {
828			return cachedScrollbarWidth;
829		}
830		var w1, w2,
831			div = $( "<div " +
832				"style='display:block;position:absolute;width:50px;height:50px;overflow:hidden;'>" +
833				"<div style='height:100px;width:auto;'></div></div>" ),
834			innerDiv = div.children()[ 0 ];
835
836		$( "body" ).append( div );
837		w1 = innerDiv.offsetWidth;
838		div.css( "overflow", "scroll" );
839
840		w2 = innerDiv.offsetWidth;
841
842		if ( w1 === w2 ) {
843			w2 = div[ 0 ].clientWidth;
844		}
845
846		div.remove();
847
848		return ( cachedScrollbarWidth = w1 - w2 );
849	},
850	getScrollInfo: function( within ) {
851		var overflowX = within.isWindow || within.isDocument ? "" :
852				within.element.css( "overflow-x" ),
853			overflowY = within.isWindow || within.isDocument ? "" :
854				within.element.css( "overflow-y" ),
855			hasOverflowX = overflowX === "scroll" ||
856				( overflowX === "auto" && within.width < within.element[ 0 ].scrollWidth ),
857			hasOverflowY = overflowY === "scroll" ||
858				( overflowY === "auto" && within.height < within.element[ 0 ].scrollHeight );
859		return {
860			width: hasOverflowY ? $.position.scrollbarWidth() : 0,
861			height: hasOverflowX ? $.position.scrollbarWidth() : 0
862		};
863	},
864	getWithinInfo: function( element ) {
865		var withinElement = $( element || window ),
866			isWindow = $.isWindow( withinElement[ 0 ] ),
867			isDocument = !!withinElement[ 0 ] && withinElement[ 0 ].nodeType === 9,
868			hasOffset = !isWindow && !isDocument;
869		return {
870			element: withinElement,
871			isWindow: isWindow,
872			isDocument: isDocument,
873			offset: hasOffset ? $( element ).offset() : { left: 0, top: 0 },
874			scrollLeft: withinElement.scrollLeft(),
875			scrollTop: withinElement.scrollTop(),
876			width: withinElement.outerWidth(),
877			height: withinElement.outerHeight()
878		};
879	}
880};
881
882$.fn.position = function( options ) {
883	if ( !options || !options.of ) {
884		return _position.apply( this, arguments );
885	}
886
887	// Make a copy, we don't want to modify arguments
888	options = $.extend( {}, options );
889
890	var atOffset, targetWidth, targetHeight, targetOffset, basePosition, dimensions,
891		target = $( options.of ),
892		within = $.position.getWithinInfo( options.within ),
893		scrollInfo = $.position.getScrollInfo( within ),
894		collision = ( options.collision || "flip" ).split( " " ),
895		offsets = {};
896
897	dimensions = getDimensions( target );
898	if ( target[ 0 ].preventDefault ) {
899
900		// Force left top to allow flipping
901		options.at = "left top";
902	}
903	targetWidth = dimensions.width;
904	targetHeight = dimensions.height;
905	targetOffset = dimensions.offset;
906
907	// Clone to reuse original targetOffset later
908	basePosition = $.extend( {}, targetOffset );
909
910	// Force my and at to have valid horizontal and vertical positions
911	// if a value is missing or invalid, it will be converted to center
912	$.each( [ "my", "at" ], function() {
913		var pos = ( options[ this ] || "" ).split( " " ),
914			horizontalOffset,
915			verticalOffset;
916
917		if ( pos.length === 1 ) {
918			pos = rhorizontal.test( pos[ 0 ] ) ?
vendor: 10,483 bytes, lines 919-1245
919				pos.concat( [ "center" ] ) :
920				rvertical.test( pos[ 0 ] ) ?
921					[ "center" ].concat( pos ) :
922					[ "center", "center" ];
923		}
924		pos[ 0 ] = rhorizontal.test( pos[ 0 ] ) ? pos[ 0 ] : "center";
925		pos[ 1 ] = rvertical.test( pos[ 1 ] ) ? pos[ 1 ] : "center";
926
927		// Calculate offsets
928		horizontalOffset = roffset.exec( pos[ 0 ] );
929		verticalOffset = roffset.exec( pos[ 1 ] );
930		offsets[ this ] = [
931			horizontalOffset ? horizontalOffset[ 0 ] : 0,
932			verticalOffset ? verticalOffset[ 0 ] : 0
933		];
934
935		// Reduce to just the positions without the offsets
936		options[ this ] = [
937			rposition.exec( pos[ 0 ] )[ 0 ],
938			rposition.exec( pos[ 1 ] )[ 0 ]
939		];
940	} );
941
942	// Normalize collision option
943	if ( collision.length === 1 ) {
944		collision[ 1 ] = collision[ 0 ];
945	}
946
947	if ( options.at[ 0 ] === "right" ) {
948		basePosition.left += targetWidth;
949	} else if ( options.at[ 0 ] === "center" ) {
950		basePosition.left += targetWidth / 2;
951	}
952
953	if ( options.at[ 1 ] === "bottom" ) {
954		basePosition.top += targetHeight;
955	} else if ( options.at[ 1 ] === "center" ) {
956		basePosition.top += targetHeight / 2;
957	}
958
959	atOffset = getOffsets( offsets.at, targetWidth, targetHeight );
960	basePosition.left += atOffset[ 0 ];
961	basePosition.top += atOffset[ 1 ];
962
963	return this.each( function() {
964		var collisionPosition, using,
965			elem = $( this ),
966			elemWidth = elem.outerWidth(),
967			elemHeight = elem.outerHeight(),
968			marginLeft = parseCss( this, "marginLeft" ),
969			marginTop = parseCss( this, "marginTop" ),
970			collisionWidth = elemWidth + marginLeft + parseCss( this, "marginRight" ) +
971				scrollInfo.width,
972			collisionHeight = elemHeight + marginTop + parseCss( this, "marginBottom" ) +
973				scrollInfo.height,
974			position = $.extend( {}, basePosition ),
975			myOffset = getOffsets( offsets.my, elem.outerWidth(), elem.outerHeight() );
976
977		if ( options.my[ 0 ] === "right" ) {
978			position.left -= elemWidth;
979		} else if ( options.my[ 0 ] === "center" ) {
980			position.left -= elemWidth / 2;
981		}
982
983		if ( options.my[ 1 ] === "bottom" ) {
984			position.top -= elemHeight;
985		} else if ( options.my[ 1 ] === "center" ) {
986			position.top -= elemHeight / 2;
987		}
988
989		position.left += myOffset[ 0 ];
990		position.top += myOffset[ 1 ];
991
992		collisionPosition = {
993			marginLeft: marginLeft,
994			marginTop: marginTop
995		};
996
997		$.each( [ "left", "top" ], function( i, dir ) {
998			if ( $.ui.position[ collision[ i ] ] ) {
999				$.ui.position[ collision[ i ] ][ dir ]( position, {
1000					targetWidth: targetWidth,
1001					targetHeight: targetHeight,
1002					elemWidth: elemWidth,
1003					elemHeight: elemHeight,
1004					collisionPosition: collisionPosition,
1005					collisionWidth: collisionWidth,
1006					collisionHeight: collisionHeight,
1007					offset: [ atOffset[ 0 ] + myOffset[ 0 ], atOffset [ 1 ] + myOffset[ 1 ] ],
1008					my: options.my,
1009					at: options.at,
1010					within: within,
1011					elem: elem
1012				} );
1013			}
1014		} );
1015
1016		if ( options.using ) {
1017
1018			// Adds feedback as second argument to using callback, if present
1019			using = function( props ) {
1020				var left = targetOffset.left - position.left,
1021					right = left + targetWidth - elemWidth,
1022					top = targetOffset.top - position.top,
1023					bottom = top + targetHeight - elemHeight,
1024					feedback = {
1025						target: {
1026							element: target,
1027							left: targetOffset.left,
1028							top: targetOffset.top,
1029							width: targetWidth,
1030							height: targetHeight
1031						},
1032						element: {
1033							element: elem,
1034							left: position.left,
1035							top: position.top,
1036							width: elemWidth,
1037							height: elemHeight
1038						},
1039						horizontal: right < 0 ? "left" : left > 0 ? "right" : "center",
1040						vertical: bottom < 0 ? "top" : top > 0 ? "bottom" : "middle"
1041					};
1042				if ( targetWidth < elemWidth && abs( left + right ) < targetWidth ) {
1043					feedback.horizontal = "center";
1044				}
1045				if ( targetHeight < elemHeight && abs( top + bottom ) < targetHeight ) {
1046					feedback.vertical = "middle";
1047				}
1048				if ( max( abs( left ), abs( right ) ) > max( abs( top ), abs( bottom ) ) ) {
1049					feedback.important = "horizontal";
1050				} else {
1051					feedback.important = "vertical";
1052				}
1053				options.using.call( this, props, feedback );
1054			};
1055		}
1056
1057		elem.offset( $.extend( position, { using: using } ) );
1058	} );
1059};
1060
1061$.ui.position = {
1062	fit: {
1063		left: function( position, data ) {
1064			var within = data.within,
1065				withinOffset = within.isWindow ? within.scrollLeft : within.offset.left,
1066				outerWidth = within.width,
1067				collisionPosLeft = position.left - data.collisionPosition.marginLeft,
1068				overLeft = withinOffset - collisionPosLeft,
1069				overRight = collisionPosLeft + data.collisionWidth - outerWidth - withinOffset,
1070				newOverRight;
1071
1072			// Element is wider than within
1073			if ( data.collisionWidth > outerWidth ) {
1074
1075				// Element is initially over the left side of within
1076				if ( overLeft > 0 && overRight <= 0 ) {
1077					newOverRight = position.left + overLeft + data.collisionWidth - outerWidth -
1078						withinOffset;
1079					position.left += overLeft - newOverRight;
1080
1081				// Element is initially over right side of within
1082				} else if ( overRight > 0 && overLeft <= 0 ) {
1083					position.left = withinOffset;
1084
1085				// Element is initially over both left and right sides of within
1086				} else {
1087					if ( overLeft > overRight ) {
1088						position.left = withinOffset + outerWidth - data.collisionWidth;
1089					} else {
1090						position.left = withinOffset;
1091					}
1092				}
1093
1094			// Too far left -> align with left edge
1095			} else if ( overLeft > 0 ) {
1096				position.left += overLeft;
1097
1098			// Too far right -> align with right edge
1099			} else if ( overRight > 0 ) {
1100				position.left -= overRight;
1101
1102			// Adjust based on position and margin
1103			} else {
1104				position.left = max( position.left - collisionPosLeft, position.left );
1105			}
1106		},
1107		top: function( position, data ) {
1108			var within = data.within,
1109				withinOffset = within.isWindow ? within.scrollTop : within.offset.top,
1110				outerHeight = data.within.height,
1111				collisionPosTop = position.top - data.collisionPosition.marginTop,
1112				overTop = withinOffset - collisionPosTop,
1113				overBottom = collisionPosTop + data.collisionHeight - outerHeight - withinOffset,
1114				newOverBottom;
1115
1116			// Element is taller than within
1117			if ( data.collisionHeight > outerHeight ) {
1118
1119				// Element is initially over the top of within
1120				if ( overTop > 0 && overBottom <= 0 ) {
1121					newOverBottom = position.top + overTop + data.collisionHeight - outerHeight -
1122						withinOffset;
1123					position.top += overTop - newOverBottom;
1124
1125				// Element is initially over bottom of within
1126				} else if ( overBottom > 0 && overTop <= 0 ) {
1127					position.top = withinOffset;
1128
1129				// Element is initially over both top and bottom of within
1130				} else {
1131					if ( overTop > overBottom ) {
1132						position.top = withinOffset + outerHeight - data.collisionHeight;
1133					} else {
1134						position.top = withinOffset;
1135					}
1136				}
1137
1138			// Too far up -> align with top
1139			} else if ( overTop > 0 ) {
1140				position.top += overTop;
1141
1142			// Too far down -> align with bottom edge
1143			} else if ( overBottom > 0 ) {
1144				position.top -= overBottom;
1145
1146			// Adjust based on position and margin
1147			} else {
1148				position.top = max( position.top - collisionPosTop, position.top );
1149			}
1150		}
1151	},
1152	flip: {
1153		left: function( position, data ) {
1154			var within = data.within,
1155				withinOffset = within.offset.left + within.scrollLeft,
1156				outerWidth = within.width,
1157				offsetLeft = within.isWindow ? within.scrollLeft : within.offset.left,
1158				collisionPosLeft = position.left - data.collisionPosition.marginLeft,
1159				overLeft = collisionPosLeft - offsetLeft,
1160				overRight = collisionPosLeft + data.collisionWidth - outerWidth - offsetLeft,
1161				myOffset = data.my[ 0 ] === "left" ?
1162					-data.elemWidth :
1163					data.my[ 0 ] === "right" ?
1164						data.elemWidth :
1165						0,
1166				atOffset = data.at[ 0 ] === "left" ?
1167					data.targetWidth :
1168					data.at[ 0 ] === "right" ?
1169						-data.targetWidth :
1170						0,
1171				offset = -2 * data.offset[ 0 ],
1172				newOverRight,
1173				newOverLeft;
1174
1175			if ( overLeft < 0 ) {
1176				newOverRight = position.left + myOffset + atOffset + offset + data.collisionWidth -
1177					outerWidth - withinOffset;
1178				if ( newOverRight < 0 || newOverRight < abs( overLeft ) ) {
1179					position.left += myOffset + atOffset + offset;
1180				}
1181			} else if ( overRight > 0 ) {
1182				newOverLeft = position.left - data.collisionPosition.marginLeft + myOffset +
1183					atOffset + offset - offsetLeft;
1184				if ( newOverLeft > 0 || abs( newOverLeft ) < overRight ) {
1185					position.left += myOffset + atOffset + offset;
1186				}
1187			}
1188		},
1189		top: function( position, data ) {
1190			var within = data.within,
1191				withinOffset = within.offset.top + within.scrollTop,
1192				outerHeight = within.height,
1193				offsetTop = within.isWindow ? within.scrollTop : within.offset.top,
1194				collisionPosTop = position.top - data.collisionPosition.marginTop,
1195				overTop = collisionPosTop - offsetTop,
1196				overBottom = collisionPosTop + data.collisionHeight - outerHeight - offsetTop,
1197				top = data.my[ 1 ] === "top",
1198				myOffset = top ?
1199					-data.elemHeight :
1200					data.my[ 1 ] === "bottom" ?
1201						data.elemHeight :
1202						0,
1203				atOffset = data.at[ 1 ] === "top" ?
1204					data.targetHeight :
1205					data.at[ 1 ] === "bottom" ?
1206						-data.targetHeight :
1207						0,
1208				offset = -2 * data.offset[ 1 ],
1209				newOverTop,
1210				newOverBottom;
1211			if ( overTop < 0 ) {
1212				newOverBottom = position.top + myOffset + atOffset + offset + data.collisionHeight -
1213					outerHeight - withinOffset;
1214				if ( newOverBottom < 0 || newOverBottom < abs( overTop ) ) {
1215					position.top += myOffset + atOffset + offset;
1216				}
1217			} else if ( overBottom > 0 ) {
1218				newOverTop = position.top - data.collisionPosition.marginTop + myOffset + atOffset +
1219					offset - offsetTop;
1220				if ( newOverTop > 0 || abs( newOverTop ) < overBottom ) {
1221					position.top += myOffset + atOffset + offset;
1222				}
1223			}
1224		}
1225	},
1226	flipfit: {
1227		left: function() {
1228			$.ui.position.flip.left.apply( this, arguments );
1229			$.ui.position.fit.left.apply( this, arguments );
1230		},
1231		top: function() {
1232			$.ui.position.flip.top.apply( this, arguments );
1233			$.ui.position.fit.top.apply( this, arguments );
1234		}
1235	}
1236};
1237
1238} )();
1239
1240var position = $.ui.position;
1241
1242
1243/*!
1244 * jQuery UI :data 1.12.1
1245 * http://jqueryui.com
vendor: 5,137 bytes, lines 1246-1451
1246 *
1247 * Copyright jQuery Foundation and other contributors
1248 * Released under the MIT license.
1249 * http://jquery.org/license
1250 */
1251
1252//>>label: :data Selector
1253//>>group: Core
1254//>>description: Selects elements which have data stored under the specified key.
1255//>>docs: http://api.jqueryui.com/data-selector/
1256
1257
1258var data = $.extend( $.expr[ ":" ], {
1259	data: $.expr.createPseudo ?
1260		$.expr.createPseudo( function( dataName ) {
1261			return function( elem ) {
1262				return !!$.data( elem, dataName );
1263			};
1264		} ) :
1265
1266		// Support: jQuery <1.8
1267		function( elem, i, match ) {
1268			return !!$.data( elem, match[ 3 ] );
1269		}
1270} );
1271
1272/*!
1273 * jQuery UI Disable Selection 1.12.1
1274 * http://jqueryui.com
1275 *
1276 * Copyright jQuery Foundation and other contributors
1277 * Released under the MIT license.
1278 * http://jquery.org/license
1279 */
1280
1281//>>label: disableSelection
1282//>>group: Core
1283//>>description: Disable selection of text content within the set of matched elements.
1284//>>docs: http://api.jqueryui.com/disableSelection/
1285
1286// This file is deprecated
1287
1288
1289var disableSelection = $.fn.extend( {
1290	disableSelection: ( function() {
1291		var eventType = "onselectstart" in document.createElement( "div" ) ?
1292			"selectstart" :
1293			"mousedown";
1294
1295		return function() {
1296			return this.on( eventType + ".ui-disableSelection", function( event ) {
1297				event.preventDefault();
1298			} );
1299		};
1300	} )(),
1301
1302	enableSelection: function() {
1303		return this.off( ".ui-disableSelection" );
1304	}
1305} );
1306
1307
1308/*!
1309 * jQuery UI Effects 1.12.1
1310 * http://jqueryui.com
1311 *
1312 * Copyright jQuery Foundation and other contributors
1313 * Released under the MIT license.
1314 * http://jquery.org/license
1315 */
1316
1317//>>label: Effects Core
1318//>>group: Effects
1319// jscs:disable maximumLineLength
1320//>>description: Extends the internal jQuery effects. Includes morphing and easing. Required by all other effects.
1321// jscs:enable maximumLineLength
1322//>>docs: http://api.jqueryui.com/category/effects-core/
1323//>>demos: http://jqueryui.com/effect/
1324
1325
1326
1327var dataSpace = "ui-effects-",
1328	dataSpaceStyle = "ui-effects-style",
1329	dataSpaceAnimated = "ui-effects-animated",
1330
1331	// Create a local jQuery because jQuery Color relies on it and the
1332	// global may not exist with AMD and a custom build (#10199)
1333	jQuery = $;
1334
1335$.effects = {
1336	effect: {}
1337};
1338
1339/*!
1340 * jQuery Color Animations v2.1.2
1341 * https://github.com/jquery/jquery-color
1342 *
1343 * Copyright 2014 jQuery Foundation and other contributors
1344 * Released under the MIT license.
1345 * http://jquery.org/license
1346 *
1347 * Date: Wed Jan 16 08:47:09 2013 -0600
1348 */
1349( function( jQuery, undefined ) {
1350
1351	var stepHooks = "backgroundColor borderBottomColor borderLeftColor borderRightColor " +
1352		"borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor",
1353
1354	// Plusequals test for += 100 -= 100
1355	rplusequals = /^([\-+])=\s*(\d+\.?\d*)/,
1356
1357	// A set of RE's that can match strings and generate color tuples.
1358	stringParsers = [ {
1359			re: /rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,
1360			parse: function( execResult ) {
1361				return [
1362					execResult[ 1 ],
1363					execResult[ 2 ],
1364					execResult[ 3 ],
1365					execResult[ 4 ]
1366				];
1367			}
1368		}, {
1369			re: /rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,
1370			parse: function( execResult ) {
1371				return [
1372					execResult[ 1 ] * 2.55,
1373					execResult[ 2 ] * 2.55,
1374					execResult[ 3 ] * 2.55,
1375					execResult[ 4 ]
1376				];
1377			}
1378		}, {
1379
1380			// This regex ignores A-F because it's compared against an already lowercased string
1381			re: /#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/,
1382			parse: function( execResult ) {
1383				return [
1384					parseInt( execResult[ 1 ], 16 ),
1385					parseInt( execResult[ 2 ], 16 ),
1386					parseInt( execResult[ 3 ], 16 )
1387				];
1388			}
1389		}, {
1390
1391			// This regex ignores A-F because it's compared against an already lowercased string
1392			re: /#([a-f0-9])([a-f0-9])([a-f0-9])/,
1393			parse: function( execResult ) {
1394				return [
1395					parseInt( execResult[ 1 ] + execResult[ 1 ], 16 ),
1396					parseInt( execResult[ 2 ] + execResult[ 2 ], 16 ),
1397					parseInt( execResult[ 3 ] + execResult[ 3 ], 16 )
1398				];
1399			}
1400		}, {
1401			re: /hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,
1402			space: "hsla",
1403			parse: function( execResult ) {
1404				return [
1405					execResult[ 1 ],
1406					execResult[ 2 ] / 100,
1407					execResult[ 3 ] / 100,
1408					execResult[ 4 ]
1409				];
1410			}
1411		} ],
1412
1413	// JQuery.Color( )
1414	color = jQuery.Color = function( color, green, blue, alpha ) {
1415		return new jQuery.Color.fn.parse( color, green, blue, alpha );
1416	},
1417	spaces = {
1418		rgba: {
1419			props: {
1420				red: {
1421					idx: 0,
1422					type: "byte"
1423				},
1424				green: {
1425					idx: 1,
1426					type: "byte"
1427				},
1428				blue: {
1429					idx: 2,
1430					type: "byte"
1431				}
1432			}
1433		},
1434
1435		hsla: {
1436			props: {
1437				hue: {
1438					idx: 0,
1439					type: "degrees"
1440				},
1441				saturation: {
1442					idx: 1,
1443					type: "percent"
1444				},
1445				lightness: {
1446					idx: 2,
1447					type: "percent"
1448				}
1449			}
1450		}
1451	},
vendor: 18,301 bytes, lines 1452-2174
1452	propTypes = {
1453		"byte": {
1454			floor: true,
1455			max: 255
1456		},
1457		"percent": {
1458			max: 1
1459		},
1460		"degrees": {
1461			mod: 360,
1462			floor: true
1463		}
1464	},
1465	support = color.support = {},
1466
1467	// Element for support tests
1468	supportElem = jQuery( "<p>" )[ 0 ],
1469
1470	// Colors = jQuery.Color.names
1471	colors,
1472
1473	// Local aliases of functions called often
1474	each = jQuery.each;
1475
1476// Determine rgba support immediately
1477supportElem.style.cssText = "background-color:rgba(1,1,1,.5)";
1478support.rgba = supportElem.style.backgroundColor.indexOf( "rgba" ) > -1;
1479
1480// Define cache name and alpha properties
1481// for rgba and hsla spaces
1482each( spaces, function( spaceName, space ) {
1483	space.cache = "_" + spaceName;
1484	space.props.alpha = {
1485		idx: 3,
1486		type: "percent",
1487		def: 1
1488	};
1489} );
1490
1491function clamp( value, prop, allowEmpty ) {
1492	var type = propTypes[ prop.type ] || {};
1493
1494	if ( value == null ) {
1495		return ( allowEmpty || !prop.def ) ? null : prop.def;
1496	}
1497
1498	// ~~ is an short way of doing floor for positive numbers
1499	value = type.floor ? ~~value : parseFloat( value );
1500
1501	// IE will pass in empty strings as value for alpha,
1502	// which will hit this case
1503	if ( isNaN( value ) ) {
1504		return prop.def;
1505	}
1506
1507	if ( type.mod ) {
1508
1509		// We add mod before modding to make sure that negatives values
1510		// get converted properly: -10 -> 350
1511		return ( value + type.mod ) % type.mod;
1512	}
1513
1514	// For now all property types without mod have min and max
1515	return 0 > value ? 0 : type.max < value ? type.max : value;
1516}
1517
1518function stringParse( string ) {
1519	var inst = color(),
1520		rgba = inst._rgba = [];
1521
1522	string = string.toLowerCase();
1523
1524	each( stringParsers, function( i, parser ) {
1525		var parsed,
1526			match = parser.re.exec( string ),
1527			values = match && parser.parse( match ),
1528			spaceName = parser.space || "rgba";
1529
1530		if ( values ) {
1531			parsed = inst[ spaceName ]( values );
1532
1533			// If this was an rgba parse the assignment might happen twice
1534			// oh well....
1535			inst[ spaces[ spaceName ].cache ] = parsed[ spaces[ spaceName ].cache ];
1536			rgba = inst._rgba = parsed._rgba;
1537
1538			// Exit each( stringParsers ) here because we matched
1539			return false;
1540		}
1541	} );
1542
1543	// Found a stringParser that handled it
1544	if ( rgba.length ) {
1545
1546		// If this came from a parsed string, force "transparent" when alpha is 0
1547		// chrome, (and maybe others) return "transparent" as rgba(0,0,0,0)
1548		if ( rgba.join() === "0,0,0,0" ) {
1549			jQuery.extend( rgba, colors.transparent );
1550		}
1551		return inst;
1552	}
1553
1554	// Named colors
1555	return colors[ string ];
1556}
1557
1558color.fn = jQuery.extend( color.prototype, {
1559	parse: function( red, green, blue, alpha ) {
1560		if ( red === undefined ) {
1561			this._rgba = [ null, null, null, null ];
1562			return this;
1563		}
1564		if ( red.jquery || red.nodeType ) {
1565			red = jQuery( red ).css( green );
1566			green = undefined;
1567		}
1568
1569		var inst = this,
1570			type = jQuery.type( red ),
1571			rgba = this._rgba = [];
1572
1573		// More than 1 argument specified - assume ( red, green, blue, alpha )
1574		if ( green !== undefined ) {
1575			red = [ red, green, blue, alpha ];
1576			type = "array";
1577		}
1578
1579		if ( type === "string" ) {
1580			return this.parse( stringParse( red ) || colors._default );
1581		}
1582
1583		if ( type === "array" ) {
1584			each( spaces.rgba.props, function( key, prop ) {
1585				rgba[ prop.idx ] = clamp( red[ prop.idx ], prop );
1586			} );
1587			return this;
1588		}
1589
1590		if ( type === "object" ) {
1591			if ( red instanceof color ) {
1592				each( spaces, function( spaceName, space ) {
1593					if ( red[ space.cache ] ) {
1594						inst[ space.cache ] = red[ space.cache ].slice();
1595					}
1596				} );
1597			} else {
1598				each( spaces, function( spaceName, space ) {
1599					var cache = space.cache;
1600					each( space.props, function( key, prop ) {
1601
1602						// If the cache doesn't exist, and we know how to convert
1603						if ( !inst[ cache ] && space.to ) {
1604
1605							// If the value was null, we don't need to copy it
1606							// if the key was alpha, we don't need to copy it either
1607							if ( key === "alpha" || red[ key ] == null ) {
1608								return;
1609							}
1610							inst[ cache ] = space.to( inst._rgba );
1611						}
1612
1613						// This is the only case where we allow nulls for ALL properties.
1614						// call clamp with alwaysAllowEmpty
1615						inst[ cache ][ prop.idx ] = clamp( red[ key ], prop, true );
1616					} );
1617
1618					// Everything defined but alpha?
1619					if ( inst[ cache ] &&
1620							jQuery.inArray( null, inst[ cache ].slice( 0, 3 ) ) < 0 ) {
1621
1622						// Use the default of 1
1623						inst[ cache ][ 3 ] = 1;
1624						if ( space.from ) {
1625							inst._rgba = space.from( inst[ cache ] );
1626						}
1627					}
1628				} );
1629			}
1630			return this;
1631		}
1632	},
1633	is: function( compare ) {
1634		var is = color( compare ),
1635			same = true,
1636			inst = this;
1637
1638		each( spaces, function( _, space ) {
1639			var localCache,
1640				isCache = is[ space.cache ];
1641			if ( isCache ) {
1642				localCache = inst[ space.cache ] || space.to && space.to( inst._rgba ) || [];
1643				each( space.props, function( _, prop ) {
1644					if ( isCache[ prop.idx ] != null ) {
1645						same = ( isCache[ prop.idx ] === localCache[ prop.idx ] );
1646						return same;
1647					}
1648				} );
1649			}
1650			return same;
1651		} );
1652		return same;
1653	},
1654	_space: function() {
1655		var used = [],
1656			inst = this;
1657		each( spaces, function( spaceName, space ) {
1658			if ( inst[ space.cache ] ) {
1659				used.push( spaceName );
1660			}
1661		} );
1662		return used.pop();
1663	},
1664	transition: function( other, distance ) {
1665		var end = color( other ),
1666			spaceName = end._space(),
1667			space = spaces[ spaceName ],
1668			startColor = this.alpha() === 0 ? color( "transparent" ) : this,
1669			start = startColor[ space.cache ] || space.to( startColor._rgba ),
1670			result = start.slice();
1671
1672		end = end[ space.cache ];
1673		each( space.props, function( key, prop ) {
1674			var index = prop.idx,
1675				startValue = start[ index ],
1676				endValue = end[ index ],
1677				type = propTypes[ prop.type ] || {};
1678
1679			// If null, don't override start value
1680			if ( endValue === null ) {
1681				return;
1682			}
1683
1684			// If null - use end
1685			if ( startValue === null ) {
1686				result[ index ] = endValue;
1687			} else {
1688				if ( type.mod ) {
1689					if ( endValue - startValue > type.mod / 2 ) {
1690						startValue += type.mod;
1691					} else if ( startValue - endValue > type.mod / 2 ) {
1692						startValue -= type.mod;
1693					}
1694				}
1695				result[ index ] = clamp( ( endValue - startValue ) * distance + startValue, prop );
1696			}
1697		} );
1698		return this[ spaceName ]( result );
1699	},
1700	blend: function( opaque ) {
1701
1702		// If we are already opaque - return ourself
1703		if ( this._rgba[ 3 ] === 1 ) {
1704			return this;
1705		}
1706
1707		var rgb = this._rgba.slice(),
1708			a = rgb.pop(),
1709			blend = color( opaque )._rgba;
1710
1711		return color( jQuery.map( rgb, function( v, i ) {
1712			return ( 1 - a ) * blend[ i ] + a * v;
1713		} ) );
1714	},
1715	toRgbaString: function() {
1716		var prefix = "rgba(",
1717			rgba = jQuery.map( this._rgba, function( v, i ) {
1718				return v == null ? ( i > 2 ? 1 : 0 ) : v;
1719			} );
1720
1721		if ( rgba[ 3 ] === 1 ) {
1722			rgba.pop();
1723			prefix = "rgb(";
1724		}
1725
1726		return prefix + rgba.join() + ")";
1727	},
1728	toHslaString: function() {
1729		var prefix = "hsla(",
1730			hsla = jQuery.map( this.hsla(), function( v, i ) {
1731				if ( v == null ) {
1732					v = i > 2 ? 1 : 0;
1733				}
1734
1735				// Catch 1 and 2
1736				if ( i && i < 3 ) {
1737					v = Math.round( v * 100 ) + "%";
1738				}
1739				return v;
1740			} );
1741
1742		if ( hsla[ 3 ] === 1 ) {
1743			hsla.pop();
1744			prefix = "hsl(";
1745		}
1746		return prefix + hsla.join() + ")";
1747	},
1748	toHexString: function( includeAlpha ) {
1749		var rgba = this._rgba.slice(),
1750			alpha = rgba.pop();
1751
1752		if ( includeAlpha ) {
1753			rgba.push( ~~( alpha * 255 ) );
1754		}
1755
1756		return "#" + jQuery.map( rgba, function( v ) {
1757
1758			// Default to 0 when nulls exist
1759			v = ( v || 0 ).toString( 16 );
1760			return v.length === 1 ? "0" + v : v;
1761		} ).join( "" );
1762	},
1763	toString: function() {
1764		return this._rgba[ 3 ] === 0 ? "transparent" : this.toRgbaString();
1765	}
1766} );
1767color.fn.parse.prototype = color.fn;
1768
1769// Hsla conversions adapted from:
1770// https://code.google.com/p/maashaack/source/browse/packages/graphics/trunk/src/graphics/colors/HUE2RGB.as?r=5021
1771
1772function hue2rgb( p, q, h ) {
1773	h = ( h + 1 ) % 1;
1774	if ( h * 6 < 1 ) {
1775		return p + ( q - p ) * h * 6;
1776	}
1777	if ( h * 2 < 1 ) {
1778		return q;
1779	}
1780	if ( h * 3 < 2 ) {
1781		return p + ( q - p ) * ( ( 2 / 3 ) - h ) * 6;
1782	}
1783	return p;
1784}
1785
1786spaces.hsla.to = function( rgba ) {
1787	if ( rgba[ 0 ] == null || rgba[ 1 ] == null || rgba[ 2 ] == null ) {
1788		return [ null, null, null, rgba[ 3 ] ];
1789	}
1790	var r = rgba[ 0 ] / 255,
1791		g = rgba[ 1 ] / 255,
1792		b = rgba[ 2 ] / 255,
1793		a = rgba[ 3 ],
1794		max = Math.max( r, g, b ),
1795		min = Math.min( r, g, b ),
1796		diff = max - min,
1797		add = max + min,
1798		l = add * 0.5,
1799		h, s;
1800
1801	if ( min === max ) {
1802		h = 0;
1803	} else if ( r === max ) {
1804		h = ( 60 * ( g - b ) / diff ) + 360;
1805	} else if ( g === max ) {
1806		h = ( 60 * ( b - r ) / diff ) + 120;
1807	} else {
1808		h = ( 60 * ( r - g ) / diff ) + 240;
1809	}
1810
1811	// Chroma (diff) == 0 means greyscale which, by definition, saturation = 0%
1812	// otherwise, saturation is based on the ratio of chroma (diff) to lightness (add)
1813	if ( diff === 0 ) {
1814		s = 0;
1815	} else if ( l <= 0.5 ) {
1816		s = diff / add;
1817	} else {
1818		s = diff / ( 2 - add );
1819	}
1820	return [ Math.round( h ) % 360, s, l, a == null ? 1 : a ];
1821};
1822
1823spaces.hsla.from = function( hsla ) {
1824	if ( hsla[ 0 ] == null || hsla[ 1 ] == null || hsla[ 2 ] == null ) {
1825		return [ null, null, null, hsla[ 3 ] ];
1826	}
1827	var h = hsla[ 0 ] / 360,
1828		s = hsla[ 1 ],
1829		l = hsla[ 2 ],
1830		a = hsla[ 3 ],
1831		q = l <= 0.5 ? l * ( 1 + s ) : l + s - l * s,
1832		p = 2 * l - q;
1833
1834	return [
1835		Math.round( hue2rgb( p, q, h + ( 1 / 3 ) ) * 255 ),
1836		Math.round( hue2rgb( p, q, h ) * 255 ),
1837		Math.round( hue2rgb( p, q, h - ( 1 / 3 ) ) * 255 ),
1838		a
1839	];
1840};
1841
1842each( spaces, function( spaceName, space ) {
1843	var props = space.props,
1844		cache = space.cache,
1845		to = space.to,
1846		from = space.from;
1847
1848	// Makes rgba() and hsla()
1849	color.fn[ spaceName ] = function( value ) {
1850
1851		// Generate a cache for this space if it doesn't exist
1852		if ( to && !this[ cache ] ) {
1853			this[ cache ] = to( this._rgba );
1854		}
1855		if ( value === undefined ) {
1856			return this[ cache ].slice();
1857		}
1858
1859		var ret,
1860			type = jQuery.type( value ),
1861			arr = ( type === "array" || type === "object" ) ? value : arguments,
1862			local = this[ cache ].slice();
1863
1864		each( props, function( key, prop ) {
1865			var val = arr[ type === "object" ? key : prop.idx ];
1866			if ( val == null ) {
1867				val = local[ prop.idx ];
1868			}
1869			local[ prop.idx ] = clamp( val, prop );
1870		} );
1871
1872		if ( from ) {
1873			ret = color( from( local ) );
1874			ret[ cache ] = local;
1875			return ret;
1876		} else {
1877			return color( local );
1878		}
1879	};
1880
1881	// Makes red() green() blue() alpha() hue() saturation() lightness()
1882	each( props, function( key, prop ) {
1883
1884		// Alpha is included in more than one space
1885		if ( color.fn[ key ] ) {
1886			return;
1887		}
1888		color.fn[ key ] = function( value ) {
1889			var vtype = jQuery.type( value ),
1890				fn = ( key === "alpha" ? ( this._hsla ? "hsla" : "rgba" ) : spaceName ),
1891				local = this[ fn ](),
1892				cur = local[ prop.idx ],
1893				match;
1894
1895			if ( vtype === "undefined" ) {
1896				return cur;
1897			}
1898
1899			if ( vtype === "function" ) {
1900				value = value.call( this, cur );
1901				vtype = jQuery.type( value );
1902			}
1903			if ( value == null && prop.empty ) {
1904				return this;
1905			}
1906			if ( vtype === "string" ) {
1907				match = rplusequals.exec( value );
1908				if ( match ) {
1909					value = cur + parseFloat( match[ 2 ] ) * ( match[ 1 ] === "+" ? 1 : -1 );
1910				}
1911			}
1912			local[ prop.idx ] = value;
1913			return this[ fn ]( local );
1914		};
1915	} );
1916} );
1917
1918// Add cssHook and .fx.step function for each named hook.
1919// accept a space separated string of properties
1920color.hook = function( hook ) {
1921	var hooks = hook.split( " " );
1922	each( hooks, function( i, hook ) {
1923		jQuery.cssHooks[ hook ] = {
1924			set: function( elem, value ) {
1925				var parsed, curElem,
1926					backgroundColor = "";
1927
1928				if ( value !== "transparent" && ( jQuery.type( value ) !== "string" ||
1929						( parsed = stringParse( value ) ) ) ) {
1930					value = color( parsed || value );
1931					if ( !support.rgba && value._rgba[ 3 ] !== 1 ) {
1932						curElem = hook === "backgroundColor" ? elem.parentNode : elem;
1933						while (
1934							( backgroundColor === "" || backgroundColor === "transparent" ) &&
1935							curElem && curElem.style
1936						) {
1937							try {
1938								backgroundColor = jQuery.css( curElem, "backgroundColor" );
1939								curElem = curElem.parentNode;
1940							} catch ( e ) {
1941							}
1942						}
1943
1944						value = value.blend( backgroundColor && backgroundColor !== "transparent" ?
1945							backgroundColor :
1946							"_default" );
1947					}
1948
1949					value = value.toRgbaString();
1950				}
1951				try {
1952					elem.style[ hook ] = value;
1953				} catch ( e ) {
1954
1955					// Wrapped to prevent IE from throwing errors on "invalid" values like
1956					// 'auto' or 'inherit'
1957				}
1958			}
1959		};
1960		jQuery.fx.step[ hook ] = function( fx ) {
1961			if ( !fx.colorInit ) {
1962				fx.start = color( fx.elem, hook );
1963				fx.end = color( fx.end );
1964				fx.colorInit = true;
1965			}
1966			jQuery.cssHooks[ hook ].set( fx.elem, fx.start.transition( fx.end, fx.pos ) );
1967		};
1968	} );
1969
1970};
1971
1972color.hook( stepHooks );
1973
1974jQuery.cssHooks.borderColor = {
1975	expand: function( value ) {
1976		var expanded = {};
1977
1978		each( [ "Top", "Right", "Bottom", "Left" ], function( i, part ) {
1979			expanded[ "border" + part + "Color" ] = value;
1980		} );
1981		return expanded;
1982	}
1983};
1984
1985// Basic color names only.
1986// Usage of any of the other color names requires adding yourself or including
1987// jquery.color.svg-names.js.
1988colors = jQuery.Color.names = {
1989
1990	// 4.1. Basic color keywords
1991	aqua: "#00ffff",
1992	black: "#000000",
1993	blue: "#0000ff",
1994	fuchsia: "#ff00ff",
1995	gray: "#808080",
1996	green: "#008000",
1997	lime: "#00ff00",
1998	maroon: "#800000",
1999	navy: "#000080",
2000	olive: "#808000",
2001	purple: "#800080",
2002	red: "#ff0000",
2003	silver: "#c0c0c0",
2004	teal: "#008080",
2005	white: "#ffffff",
2006	yellow: "#ffff00",
2007
2008	// 4.2.3. "transparent" color keyword
2009	transparent: [ null, null, null, 0 ],
2010
2011	_default: "#ffffff"
2012};
2013
2014} )( jQuery );
2015
2016/******************************************************************************/
2017/****************************** CLASS ANIMATIONS ******************************/
2018/******************************************************************************/
2019( function() {
2020
2021var classAnimationActions = [ "add", "remove", "toggle" ],
2022	shorthandStyles = {
2023		border: 1,
2024		borderBottom: 1,
2025		borderColor: 1,
2026		borderLeft: 1,
2027		borderRight: 1,
2028		borderTop: 1,
2029		borderWidth: 1,
2030		margin: 1,
2031		padding: 1
2032	};
2033
2034$.each(
2035	[ "borderLeftStyle", "borderRightStyle", "borderBottomStyle", "borderTopStyle" ],
2036	function( _, prop ) {
2037		$.fx.step[ prop ] = function( fx ) {
2038			if ( fx.end !== "none" && !fx.setAttr || fx.pos === 1 && !fx.setAttr ) {
2039				jQuery.style( fx.elem, prop, fx.end );
2040				fx.setAttr = true;
2041			}
2042		};
2043	}
2044);
2045
2046function getElementStyles( elem ) {
2047	var key, len,
2048		style = elem.ownerDocument.defaultView ?
2049			elem.ownerDocument.defaultView.getComputedStyle( elem, null ) :
2050			elem.currentStyle,
2051		styles = {};
2052
2053	if ( style && style.length && style[ 0 ] && style[ style[ 0 ] ] ) {
2054		len = style.length;
2055		while ( len-- ) {
2056			key = style[ len ];
2057			if ( typeof style[ key ] === "string" ) {
2058				styles[ $.camelCase( key ) ] = style[ key ];
2059			}
2060		}
2061
2062	// Support: Opera, IE <9
2063	} else {
2064		for ( key in style ) {
2065			if ( typeof style[ key ] === "string" ) {
2066				styles[ key ] = style[ key ];
2067			}
2068		}
2069	}
2070
2071	return styles;
2072}
2073
2074function styleDifference( oldStyle, newStyle ) {
2075	var diff = {},
2076		name, value;
2077
2078	for ( name in newStyle ) {
2079		value = newStyle[ name ];
2080		if ( oldStyle[ name ] !== value ) {
2081			if ( !shorthandStyles[ name ] ) {
2082				if ( $.fx.step[ name ] || !isNaN( parseFloat( value ) ) ) {
2083					diff[ name ] = value;
2084				}
2085			}
2086		}
2087	}
2088
2089	return diff;
2090}
2091
2092// Support: jQuery <1.8
2093if ( !$.fn.addBack ) {
2094	$.fn.addBack = function( selector ) {
2095		return this.add( selector == null ?
2096			this.prevObject : this.prevObject.filter( selector )
2097		);
2098	};
2099}
2100
2101$.effects.animateClass = function( value, duration, easing, callback ) {
2102	var o = $.speed( duration, easing, callback );
2103
2104	return this.queue( function() {
2105		var animated = $( this ),
2106			baseClass = animated.attr( "class" ) || "",
2107			applyClassChange,
2108			allAnimations = o.children ? animated.find( "*" ).addBack() : animated;
2109
2110		// Map the animated objects to store the original styles.
2111		allAnimations = allAnimations.map( function() {
2112			var el = $( this );
2113			return {
2114				el: el,
2115				start: getElementStyles( this )
2116			};
2117		} );
2118
2119		// Apply class change
2120		applyClassChange = function() {
2121			$.each( classAnimationActions, function( i, action ) {
2122				if ( value[ action ] ) {
2123					animated[ action + "Class" ]( value[ action ] );
2124				}
2125			} );
2126		};
2127		applyClassChange();
2128
2129		// Map all animated objects again - calculate new styles and diff
2130		allAnimations = allAnimations.map( function() {
2131			this.end = getElementStyles( this.el[ 0 ] );
2132			this.diff = styleDifference( this.start, this.end );
2133			return this;
2134		} );
2135
2136		// Apply original class
2137		animated.attr( "class", baseClass );
2138
2139		// Map all animated objects again - this time collecting a promise
2140		allAnimations = allAnimations.map( function() {
2141			var styleInfo = this,
2142				dfd = $.Deferred(),
2143				opts = $.extend( {}, o, {
2144					queue: false,
2145					complete: function() {
2146						dfd.resolve( styleInfo );
2147					}
2148				} );
2149
2150			this.el.animate( this.diff, opts );
2151			return dfd.promise();
2152		} );
2153
2154		// Once all animations have completed:
2155		$.when.apply( $, allAnimations.get() ).done( function() {
2156
2157			// Set the final class
2158			applyClassChange();
2159
2160			// For each animated element,
2161			// clear all css properties that were animated
2162			$.each( arguments, function() {
2163				var el = this.el;
2164				$.each( this.diff, function( key ) {
2165					el.css( key, "" );
2166				} );
2167			} );
2168
2169			// This is guarnteed to be there if you use jQuery.speed()
2170			// it also handles dequeuing the next anim...
2171			o.complete.call( animated[ 0 ] );
2172		} );
2173	} );
2174};
vendor: 5,123 bytes, lines 2175-2355
2175
2176$.fn.extend( {
2177	addClass: ( function( orig ) {
2178		return function( classNames, speed, easing, callback ) {
2179			return speed ?
2180				$.effects.animateClass.call( this,
2181					{ add: classNames }, speed, easing, callback ) :
2182				orig.apply( this, arguments );
2183		};
2184	} )( $.fn.addClass ),
2185
2186	removeClass: ( function( orig ) {
2187		return function( classNames, speed, easing, callback ) {
2188			return arguments.length > 1 ?
2189				$.effects.animateClass.call( this,
2190					{ remove: classNames }, speed, easing, callback ) :
2191				orig.apply( this, arguments );
2192		};
2193	} )( $.fn.removeClass ),
2194
2195	toggleClass: ( function( orig ) {
2196		return function( classNames, force, speed, easing, callback ) {
2197			if ( typeof force === "boolean" || force === undefined ) {
2198				if ( !speed ) {
2199
2200					// Without speed parameter
2201					return orig.apply( this, arguments );
2202				} else {
2203					return $.effects.animateClass.call( this,
2204						( force ? { add: classNames } : { remove: classNames } ),
2205						speed, easing, callback );
2206				}
2207			} else {
2208
2209				// Without force parameter
2210				return $.effects.animateClass.call( this,
2211					{ toggle: classNames }, force, speed, easing );
2212			}
2213		};
2214	} )( $.fn.toggleClass ),
2215
2216	switchClass: function( remove, add, speed, easing, callback ) {
2217		return $.effects.animateClass.call( this, {
2218			add: add,
2219			remove: remove
2220		}, speed, easing, callback );
2221	}
2222} );
2223
2224} )();
2225
2226/******************************************************************************/
2227/*********************************** EFFECTS **********************************/
2228/******************************************************************************/
2229
2230( function() {
2231
2232if ( $.expr && $.expr.filters && $.expr.filters.animated ) {
2233	$.expr.filters.animated = ( function( orig ) {
2234		return function( elem ) {
2235			return !!$( elem ).data( dataSpaceAnimated ) || orig( elem );
2236		};
2237	} )( $.expr.filters.animated );
2238}
2239
2240if ( $.uiBackCompat !== false ) {
2241	$.extend( $.effects, {
2242
2243		// Saves a set of properties in a data storage
2244		save: function( element, set ) {
2245			var i = 0, length = set.length;
2246			for ( ; i < length; i++ ) {
2247				if ( set[ i ] !== null ) {
2248					element.data( dataSpace + set[ i ], element[ 0 ].style[ set[ i ] ] );
2249				}
2250			}
2251		},
2252
2253		// Restores a set of previously saved properties from a data storage
2254		restore: function( element, set ) {
2255			var val, i = 0, length = set.length;
2256			for ( ; i < length; i++ ) {
2257				if ( set[ i ] !== null ) {
2258					val = element.data( dataSpace + set[ i ] );
2259					element.css( set[ i ], val );
2260				}
2261			}
2262		},
2263
2264		setMode: function( el, mode ) {
2265			if ( mode === "toggle" ) {
2266				mode = el.is( ":hidden" ) ? "show" : "hide";
2267			}
2268			return mode;
2269		},
2270
2271		// Wraps the element around a wrapper that copies position properties
2272		createWrapper: function( element ) {
2273
2274			// If the element is already wrapped, return it
2275			if ( element.parent().is( ".ui-effects-wrapper" ) ) {
2276				return element.parent();
2277			}
2278
2279			// Wrap the element
2280			var props = {
2281					width: element.outerWidth( true ),
2282					height: element.outerHeight( true ),
2283					"float": element.css( "float" )
2284				},
2285				wrapper = $( "<div></div>" )
2286					.addClass( "ui-effects-wrapper" )
2287					.css( {
2288						fontSize: "100%",
2289						background: "transparent",
2290						border: "none",
2291						margin: 0,
2292						padding: 0
2293					} ),
2294
2295				// Store the size in case width/height are defined in % - Fixes #5245
2296				size = {
2297					width: element.width(),
2298					height: element.height()
2299				},
2300				active = document.activeElement;
2301
2302			// Support: Firefox
2303			// Firefox incorrectly exposes anonymous content
2304			// https://bugzilla.mozilla.org/show_bug.cgi?id=561664
2305			try {
2306				active.id;
2307			} catch ( e ) {
2308				active = document.body;
2309			}
2310
2311			element.wrap( wrapper );
2312
2313			// Fixes #7595 - Elements lose focus when wrapped.
2314			if ( element[ 0 ] === active || $.contains( element[ 0 ], active ) ) {
2315				$( active ).trigger( "focus" );
2316			}
2317
2318			// Hotfix for jQuery 1.4 since some change in wrap() seems to actually
2319			// lose the reference to the wrapped element
2320			wrapper = element.parent();
2321
2322			// Transfer positioning properties to the wrapper
2323			if ( element.css( "position" ) === "static" ) {
2324				wrapper.css( { position: "relative" } );
2325				element.css( { position: "relative" } );
2326			} else {
2327				$.extend( props, {
2328					position: element.css( "position" ),
2329					zIndex: element.css( "z-index" )
2330				} );
2331				$.each( [ "top", "left", "bottom", "right" ], function( i, pos ) {
2332					props[ pos ] = element.css( pos );
2333					if ( isNaN( parseInt( props[ pos ], 10 ) ) ) {
2334						props[ pos ] = "auto";
2335					}
2336				} );
2337				element.css( {
2338					position: "relative",
2339					top: 0,
2340					left: 0,
2341					right: "auto",
2342					bottom: "auto"
2343				} );
2344			}
2345			element.css( size );
2346
2347			return wrapper.css( props ).show();
2348		},
2349
2350		removeWrapper: function( element ) {
2351			var active = document.activeElement;
2352
2353			if ( element.parent().is( ".ui-effects-wrapper" ) ) {
2354				element.parent().replaceWith( element );
2355
vendor: 16,570 bytes, lines 2356-2991
2356				// Fixes #7595 - Elements lose focus when wrapped.
2357				if ( element[ 0 ] === active || $.contains( element[ 0 ], active ) ) {
2358					$( active ).trigger( "focus" );
2359				}
2360			}
2361
2362			return element;
2363		}
2364	} );
2365}
2366
2367$.extend( $.effects, {
2368	version: "1.12.1",
2369
2370	define: function( name, mode, effect ) {
2371		if ( !effect ) {
2372			effect = mode;
2373			mode = "effect";
2374		}
2375
2376		$.effects.effect[ name ] = effect;
2377		$.effects.effect[ name ].mode = mode;
2378
2379		return effect;
2380	},
2381
2382	scaledDimensions: function( element, percent, direction ) {
2383		if ( percent === 0 ) {
2384			return {
2385				height: 0,
2386				width: 0,
2387				outerHeight: 0,
2388				outerWidth: 0
2389			};
2390		}
2391
2392		var x = direction !== "horizontal" ? ( ( percent || 100 ) / 100 ) : 1,
2393			y = direction !== "vertical" ? ( ( percent || 100 ) / 100 ) : 1;
2394
2395		return {
2396			height: element.height() * y,
2397			width: element.width() * x,
2398			outerHeight: element.outerHeight() * y,
2399			outerWidth: element.outerWidth() * x
2400		};
2401
2402	},
2403
2404	clipToBox: function( animation ) {
2405		return {
2406			width: animation.clip.right - animation.clip.left,
2407			height: animation.clip.bottom - animation.clip.top,
2408			left: animation.clip.left,
2409			top: animation.clip.top
2410		};
2411	},
2412
2413	// Injects recently queued functions to be first in line (after "inprogress")
2414	unshift: function( element, queueLength, count ) {
2415		var queue = element.queue();
2416
2417		if ( queueLength > 1 ) {
2418			queue.splice.apply( queue,
2419				[ 1, 0 ].concat( queue.splice( queueLength, count ) ) );
2420		}
2421		element.dequeue();
2422	},
2423
2424	saveStyle: function( element ) {
2425		element.data( dataSpaceStyle, element[ 0 ].style.cssText );
2426	},
2427
2428	restoreStyle: function( element ) {
2429		element[ 0 ].style.cssText = element.data( dataSpaceStyle ) || "";
2430		element.removeData( dataSpaceStyle );
2431	},
2432
2433	mode: function( element, mode ) {
2434		var hidden = element.is( ":hidden" );
2435
2436		if ( mode === "toggle" ) {
2437			mode = hidden ? "show" : "hide";
2438		}
2439		if ( hidden ? mode === "hide" : mode === "show" ) {
2440			mode = "none";
2441		}
2442		return mode;
2443	},
2444
2445	// Translates a [top,left] array into a baseline value
2446	getBaseline: function( origin, original ) {
2447		var y, x;
2448
2449		switch ( origin[ 0 ] ) {
2450		case "top":
2451			y = 0;
2452			break;
2453		case "middle":
2454			y = 0.5;
2455			break;
2456		case "bottom":
2457			y = 1;
2458			break;
2459		default:
2460			y = origin[ 0 ] / original.height;
2461		}
2462
2463		switch ( origin[ 1 ] ) {
2464		case "left":
2465			x = 0;
2466			break;
2467		case "center":
2468			x = 0.5;
2469			break;
2470		case "right":
2471			x = 1;
2472			break;
2473		default:
2474			x = origin[ 1 ] / original.width;
2475		}
2476
2477		return {
2478			x: x,
2479			y: y
2480		};
2481	},
2482
2483	// Creates a placeholder element so that the original element can be made absolute
2484	createPlaceholder: function( element ) {
2485		var placeholder,
2486			cssPosition = element.css( "position" ),
2487			position = element.position();
2488
2489		// Lock in margins first to account for form elements, which
2490		// will change margin if you explicitly set height
2491		// see: http://jsfiddle.net/JZSMt/3/ https://bugs.webkit.org/show_bug.cgi?id=107380
2492		// Support: Safari
2493		element.css( {
2494			marginTop: element.css( "marginTop" ),
2495			marginBottom: element.css( "marginBottom" ),
2496			marginLeft: element.css( "marginLeft" ),
2497			marginRight: element.css( "marginRight" )
2498		} )
2499		.outerWidth( element.outerWidth() )
2500		.outerHeight( element.outerHeight() );
2501
2502		if ( /^(static|relative)/.test( cssPosition ) ) {
2503			cssPosition = "absolute";
2504
2505			placeholder = $( "<" + element[ 0 ].nodeName + ">" ).insertAfter( element ).css( {
2506
2507				// Convert inline to inline block to account for inline elements
2508				// that turn to inline block based on content (like img)
2509				display: /^(inline|ruby)/.test( element.css( "display" ) ) ?
2510					"inline-block" :
2511					"block",
2512				visibility: "hidden",
2513
2514				// Margins need to be set to account for margin collapse
2515				marginTop: element.css( "marginTop" ),
2516				marginBottom: element.css( "marginBottom" ),
2517				marginLeft: element.css( "marginLeft" ),
2518				marginRight: element.css( "marginRight" ),
2519				"float": element.css( "float" )
2520			} )
2521			.outerWidth( element.outerWidth() )
2522			.outerHeight( element.outerHeight() )
2523			.addClass( "ui-effects-placeholder" );
2524
2525			element.data( dataSpace + "placeholder", placeholder );
2526		}
2527
2528		element.css( {
2529			position: cssPosition,
2530			left: position.left,
2531			top: position.top
2532		} );
2533
2534		return placeholder;
2535	},
2536
2537	removePlaceholder: function( element ) {
2538		var dataKey = dataSpace + "placeholder",
2539				placeholder = element.data( dataKey );
2540
2541		if ( placeholder ) {
2542			placeholder.remove();
2543			element.removeData( dataKey );
2544		}
2545	},
2546
2547	// Removes a placeholder if it exists and restores
2548	// properties that were modified during placeholder creation
2549	cleanUp: function( element ) {
2550		$.effects.restoreStyle( element );
2551		$.effects.removePlaceholder( element );
2552	},
2553
2554	setTransition: function( element, list, factor, value ) {
2555		value = value || {};
2556		$.each( list, function( i, x ) {
2557			var unit = element.cssUnit( x );
2558			if ( unit[ 0 ] > 0 ) {
2559				value[ x ] = unit[ 0 ] * factor + unit[ 1 ];
2560			}
2561		} );
2562		return value;
2563	}
2564} );
2565
2566// Return an effect options object for the given parameters:
2567function _normalizeArguments( effect, options, speed, callback ) {
2568
2569	// Allow passing all options as the first parameter
2570	if ( $.isPlainObject( effect ) ) {
2571		options = effect;
2572		effect = effect.effect;
2573	}
2574
2575	// Convert to an object
2576	effect = { effect: effect };
2577
2578	// Catch (effect, null, ...)
2579	if ( options == null ) {
2580		options = {};
2581	}
2582
2583	// Catch (effect, callback)
2584	if ( $.isFunction( options ) ) {
2585		callback = options;
2586		speed = null;
2587		options = {};
2588	}
2589
2590	// Catch (effect, speed, ?)
2591	if ( typeof options === "number" || $.fx.speeds[ options ] ) {
2592		callback = speed;
2593		speed = options;
2594		options = {};
2595	}
2596
2597	// Catch (effect, options, callback)
2598	if ( $.isFunction( speed ) ) {
2599		callback = speed;
2600		speed = null;
2601	}
2602
2603	// Add options to effect
2604	if ( options ) {
2605		$.extend( effect, options );
2606	}
2607
2608	speed = speed || options.duration;
2609	effect.duration = $.fx.off ? 0 :
2610		typeof speed === "number" ? speed :
2611		speed in $.fx.speeds ? $.fx.speeds[ speed ] :
2612		$.fx.speeds._default;
2613
2614	effect.complete = callback || options.complete;
2615
2616	return effect;
2617}
2618
2619function standardAnimationOption( option ) {
2620
2621	// Valid standard speeds (nothing, number, named speed)
2622	if ( !option || typeof option === "number" || $.fx.speeds[ option ] ) {
2623		return true;
2624	}
2625
2626	// Invalid strings - treat as "normal" speed
2627	if ( typeof option === "string" && !$.effects.effect[ option ] ) {
2628		return true;
2629	}
2630
2631	// Complete callback
2632	if ( $.isFunction( option ) ) {
2633		return true;
2634	}
2635
2636	// Options hash (but not naming an effect)
2637	if ( typeof option === "object" && !option.effect ) {
2638		return true;
2639	}
2640
2641	// Didn't match any standard API
2642	return false;
2643}
2644
2645$.fn.extend( {
2646	effect: function( /* effect, options, speed, callback */ ) {
2647		var args = _normalizeArguments.apply( this, arguments ),
2648			effectMethod = $.effects.effect[ args.effect ],
2649			defaultMode = effectMethod.mode,
2650			queue = args.queue,
2651			queueName = queue || "fx",
2652			complete = args.complete,
2653			mode = args.mode,
2654			modes = [],
2655			prefilter = function( next ) {
2656				var el = $( this ),
2657					normalizedMode = $.effects.mode( el, mode ) || defaultMode;
2658
2659				// Sentinel for duck-punching the :animated psuedo-selector
2660				el.data( dataSpaceAnimated, true );
2661
2662				// Save effect mode for later use,
2663				// we can't just call $.effects.mode again later,
2664				// as the .show() below destroys the initial state
2665				modes.push( normalizedMode );
2666
2667				// See $.uiBackCompat inside of run() for removal of defaultMode in 1.13
2668				if ( defaultMode && ( normalizedMode === "show" ||
2669						( normalizedMode === defaultMode && normalizedMode === "hide" ) ) ) {
2670					el.show();
2671				}
2672
2673				if ( !defaultMode || normalizedMode !== "none" ) {
2674					$.effects.saveStyle( el );
2675				}
2676
2677				if ( $.isFunction( next ) ) {
2678					next();
2679				}
2680			};
2681
2682		if ( $.fx.off || !effectMethod ) {
2683
2684			// Delegate to the original method (e.g., .show()) if possible
2685			if ( mode ) {
2686				return this[ mode ]( args.duration, complete );
2687			} else {
2688				return this.each( function() {
2689					if ( complete ) {
2690						complete.call( this );
2691					}
2692				} );
2693			}
2694		}
2695
2696		function run( next ) {
2697			var elem = $( this );
2698
2699			function cleanup() {
2700				elem.removeData( dataSpaceAnimated );
2701
2702				$.effects.cleanUp( elem );
2703
2704				if ( args.mode === "hide" ) {
2705					elem.hide();
2706				}
2707
2708				done();
2709			}
2710
2711			function done() {
2712				if ( $.isFunction( complete ) ) {
2713					complete.call( elem[ 0 ] );
2714				}
2715
2716				if ( $.isFunction( next ) ) {
2717					next();
2718				}
2719			}
2720
2721			// Override mode option on a per element basis,
2722			// as toggle can be either show or hide depending on element state
2723			args.mode = modes.shift();
2724
2725			if ( $.uiBackCompat !== false && !defaultMode ) {
2726				if ( elem.is( ":hidden" ) ? mode === "hide" : mode === "show" ) {
2727
2728					// Call the core method to track "olddisplay" properly
2729					elem[ mode ]();
2730					done();
2731				} else {
2732					effectMethod.call( elem[ 0 ], args, done );
2733				}
2734			} else {
2735				if ( args.mode === "none" ) {
2736
2737					// Call the core method to track "olddisplay" properly
2738					elem[ mode ]();
2739					done();
2740				} else {
2741					effectMethod.call( elem[ 0 ], args, cleanup );
2742				}
2743			}
2744		}
2745
2746		// Run prefilter on all elements first to ensure that
2747		// any showing or hiding happens before placeholder creation,
2748		// which ensures that any layout changes are correctly captured.
2749		return queue === false ?
2750			this.each( prefilter ).each( run ) :
2751			this.queue( queueName, prefilter ).queue( queueName, run );
2752	},
2753
2754	show: ( function( orig ) {
2755		return function( option ) {
2756			if ( standardAnimationOption( option ) ) {
2757				return orig.apply( this, arguments );
2758			} else {
2759				var args = _normalizeArguments.apply( this, arguments );
2760				args.mode = "show";
2761				return this.effect.call( this, args );
2762			}
2763		};
2764	} )( $.fn.show ),
2765
2766	hide: ( function( orig ) {
2767		return function( option ) {
2768			if ( standardAnimationOption( option ) ) {
2769				return orig.apply( this, arguments );
2770			} else {
2771				var args = _normalizeArguments.apply( this, arguments );
2772				args.mode = "hide";
2773				return this.effect.call( this, args );
2774			}
2775		};
2776	} )( $.fn.hide ),
2777
2778	toggle: ( function( orig ) {
2779		return function( option ) {
2780			if ( standardAnimationOption( option ) || typeof option === "boolean" ) {
2781				return orig.apply( this, arguments );
2782			} else {
2783				var args = _normalizeArguments.apply( this, arguments );
2784				args.mode = "toggle";
2785				return this.effect.call( this, args );
2786			}
2787		};
2788	} )( $.fn.toggle ),
2789
2790	cssUnit: function( key ) {
2791		var style = this.css( key ),
2792			val = [];
2793
2794		$.each( [ "em", "px", "%", "pt" ], function( i, unit ) {
2795			if ( style.indexOf( unit ) > 0 ) {
2796				val = [ parseFloat( style ), unit ];
2797			}
2798		} );
2799		return val;
2800	},
2801
2802	cssClip: function( clipObj ) {
2803		if ( clipObj ) {
2804			return this.css( "clip", "rect(" + clipObj.top + "px " + clipObj.right + "px " +
2805				clipObj.bottom + "px " + clipObj.left + "px)" );
2806		}
2807		return parseClip( this.css( "clip" ), this );
2808	},
2809
2810	transfer: function( options, done ) {
2811		var element = $( this ),
2812			target = $( options.to ),
2813			targetFixed = target.css( "position" ) === "fixed",
2814			body = $( "body" ),
2815			fixTop = targetFixed ? body.scrollTop() : 0,
2816			fixLeft = targetFixed ? body.scrollLeft() : 0,
2817			endPosition = target.offset(),
2818			animation = {
2819				top: endPosition.top - fixTop,
2820				left: endPosition.left - fixLeft,
2821				height: target.innerHeight(),
2822				width: target.innerWidth()
2823			},
2824			startPosition = element.offset(),
2825			transfer = $( "<div class='ui-effects-transfer'></div>" )
2826				.appendTo( "body" )
2827				.addClass( options.className )
2828				.css( {
2829					top: startPosition.top - fixTop,
2830					left: startPosition.left - fixLeft,
2831					height: element.innerHeight(),
2832					width: element.innerWidth(),
2833					position: targetFixed ? "fixed" : "absolute"
2834				} )
2835				.animate( animation, options.duration, options.easing, function() {
2836					transfer.remove();
2837					if ( $.isFunction( done ) ) {
2838						done();
2839					}
2840				} );
2841	}
2842} );
2843
2844function parseClip( str, element ) {
2845		var outerWidth = element.outerWidth(),
2846			outerHeight = element.outerHeight(),
2847			clipRegex = /^rect\((-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto)\)$/,
2848			values = clipRegex.exec( str ) || [ "", 0, outerWidth, outerHeight, 0 ];
2849
2850		return {
2851			top: parseFloat( values[ 1 ] ) || 0,
2852			right: values[ 2 ] === "auto" ? outerWidth : parseFloat( values[ 2 ] ),
2853			bottom: values[ 3 ] === "auto" ? outerHeight : parseFloat( values[ 3 ] ),
2854			left: parseFloat( values[ 4 ] ) || 0
2855		};
2856}
2857
2858$.fx.step.clip = function( fx ) {
2859	if ( !fx.clipInit ) {
2860		fx.start = $( fx.elem ).cssClip();
2861		if ( typeof fx.end === "string" ) {
2862			fx.end = parseClip( fx.end, fx.elem );
2863		}
2864		fx.clipInit = true;
2865	}
2866
2867	$( fx.elem ).cssClip( {
2868		top: fx.pos * ( fx.end.top - fx.start.top ) + fx.start.top,
2869		right: fx.pos * ( fx.end.right - fx.start.right ) + fx.start.right,
2870		bottom: fx.pos * ( fx.end.bottom - fx.start.bottom ) + fx.start.bottom,
2871		left: fx.pos * ( fx.end.left - fx.start.left ) + fx.start.left
2872	} );
2873};
2874
2875} )();
2876
2877/******************************************************************************/
2878/*********************************** EASING ***********************************/
2879/******************************************************************************/
2880
2881( function() {
2882
2883// Based on easing equations from Robert Penner (http://www.robertpenner.com/easing)
2884
2885var baseEasings = {};
2886
2887$.each( [ "Quad", "Cubic", "Quart", "Quint", "Expo" ], function( i, name ) {
2888	baseEasings[ name ] = function( p ) {
2889		return Math.pow( p, i + 2 );
2890	};
2891} );
2892
2893$.extend( baseEasings, {
2894	Sine: function( p ) {
2895		return 1 - Math.cos( p * Math.PI / 2 );
2896	},
2897	Circ: function( p ) {
2898		return 1 - Math.sqrt( 1 - p * p );
2899	},
2900	Elastic: function( p ) {
2901		return p === 0 || p === 1 ? p :
2902			-Math.pow( 2, 8 * ( p - 1 ) ) * Math.sin( ( ( p - 1 ) * 80 - 7.5 ) * Math.PI / 15 );
2903	},
2904	Back: function( p ) {
2905		return p * p * ( 3 * p - 2 );
2906	},
2907	Bounce: function( p ) {
2908		var pow2,
2909			bounce = 4;
2910
2911		while ( p < ( ( pow2 = Math.pow( 2, --bounce ) ) - 1 ) / 11 ) {}
2912		return 1 / Math.pow( 4, 3 - bounce ) - 7.5625 * Math.pow( ( pow2 * 3 - 2 ) / 22 - p, 2 );
2913	}
2914} );
2915
2916$.each( baseEasings, function( name, easeIn ) {
2917	$.easing[ "easeIn" + name ] = easeIn;
2918	$.easing[ "easeOut" + name ] = function( p ) {
2919		return 1 - easeIn( 1 - p );
2920	};
2921	$.easing[ "easeInOut" + name ] = function( p ) {
2922		return p < 0.5 ?
2923			easeIn( p * 2 ) / 2 :
2924			1 - easeIn( p * -2 + 2 ) / 2;
2925	};
2926} );
2927
2928} )();
2929
2930var effect = $.effects;
2931
2932
2933/*!
2934 * jQuery UI Effects Blind 1.12.1
2935 * http://jqueryui.com
2936 *
2937 * Copyright jQuery Foundation and other contributors
2938 * Released under the MIT license.
2939 * http://jquery.org/license
2940 */
2941
2942//>>label: Blind Effect
2943//>>group: Effects
2944//>>description: Blinds the element.
2945//>>docs: http://api.jqueryui.com/blind-effect/
2946//>>demos: http://jqueryui.com/effect/
2947
2948
2949
2950var effectsEffectBlind = $.effects.define( "blind", "hide", function( options, done ) {
2951	var map = {
2952			up: [ "bottom", "top" ],
2953			vertical: [ "bottom", "top" ],
2954			down: [ "top", "bottom" ],
2955			left: [ "right", "left" ],
2956			horizontal: [ "right", "left" ],
2957			right: [ "left", "right" ]
2958		},
2959		element = $( this ),
2960		direction = options.direction || "up",
2961		start = element.cssClip(),
2962		animate = { clip: $.extend( {}, start ) },
2963		placeholder = $.effects.createPlaceholder( element );
2964
2965	animate.clip[ map[ direction ][ 0 ] ] = animate.clip[ map[ direction ][ 1 ] ];
2966
2967	if ( options.mode === "show" ) {
2968		element.cssClip( animate.clip );
2969		if ( placeholder ) {
2970			placeholder.css( $.effects.clipToBox( animate ) );
2971		}
2972
2973		animate.clip = start;
2974	}
2975
2976	if ( placeholder ) {
2977		placeholder.animate( $.effects.clipToBox( animate ), options.duration, options.easing );
2978	}
2979
2980	element.animate( animate, {
2981		queue: false,
2982		duration: options.duration,
2983		easing: options.easing,
2984		complete: done
2985	} );
2986} );
2987
2988
2989/*!
2990 * jQuery UI Effects Bounce 1.12.1
2991 * http://jqueryui.com
vendor: 10,588 bytes, lines 2992-3398
2992 *
2993 * Copyright jQuery Foundation and other contributors
2994 * Released under the MIT license.
2995 * http://jquery.org/license
2996 */
2997
2998//>>label: Bounce Effect
2999//>>group: Effects
3000//>>description: Bounces an element horizontally or vertically n times.
3001//>>docs: http://api.jqueryui.com/bounce-effect/
3002//>>demos: http://jqueryui.com/effect/
3003
3004
3005
3006var effectsEffectBounce = $.effects.define( "bounce", function( options, done ) {
3007	var upAnim, downAnim, refValue,
3008		element = $( this ),
3009
3010		// Defaults:
3011		mode = options.mode,
3012		hide = mode === "hide",
3013		show = mode === "show",
3014		direction = options.direction || "up",
3015		distance = options.distance,
3016		times = options.times || 5,
3017
3018		// Number of internal animations
3019		anims = times * 2 + ( show || hide ? 1 : 0 ),
3020		speed = options.duration / anims,
3021		easing = options.easing,
3022
3023		// Utility:
3024		ref = ( direction === "up" || direction === "down" ) ? "top" : "left",
3025		motion = ( direction === "up" || direction === "left" ),
3026		i = 0,
3027
3028		queuelen = element.queue().length;
3029
3030	$.effects.createPlaceholder( element );
3031
3032	refValue = element.css( ref );
3033
3034	// Default distance for the BIGGEST bounce is the outer Distance / 3
3035	if ( !distance ) {
3036		distance = element[ ref === "top" ? "outerHeight" : "outerWidth" ]() / 3;
3037	}
3038
3039	if ( show ) {
3040		downAnim = { opacity: 1 };
3041		downAnim[ ref ] = refValue;
3042
3043		// If we are showing, force opacity 0 and set the initial position
3044		// then do the "first" animation
3045		element
3046			.css( "opacity", 0 )
3047			.css( ref, motion ? -distance * 2 : distance * 2 )
3048			.animate( downAnim, speed, easing );
3049	}
3050
3051	// Start at the smallest distance if we are hiding
3052	if ( hide ) {
3053		distance = distance / Math.pow( 2, times - 1 );
3054	}
3055
3056	downAnim = {};
3057	downAnim[ ref ] = refValue;
3058
3059	// Bounces up/down/left/right then back to 0 -- times * 2 animations happen here
3060	for ( ; i < times; i++ ) {
3061		upAnim = {};
3062		upAnim[ ref ] = ( motion ? "-=" : "+=" ) + distance;
3063
3064		element
3065			.animate( upAnim, speed, easing )
3066			.animate( downAnim, speed, easing );
3067
3068		distance = hide ? distance * 2 : distance / 2;
3069	}
3070
3071	// Last Bounce when Hiding
3072	if ( hide ) {
3073		upAnim = { opacity: 0 };
3074		upAnim[ ref ] = ( motion ? "-=" : "+=" ) + distance;
3075
3076		element.animate( upAnim, speed, easing );
3077	}
3078
3079	element.queue( done );
3080
3081	$.effects.unshift( element, queuelen, anims + 1 );
3082} );
3083
3084
3085/*!
3086 * jQuery UI Effects Clip 1.12.1
3087 * http://jqueryui.com
3088 *
3089 * Copyright jQuery Foundation and other contributors
3090 * Released under the MIT license.
3091 * http://jquery.org/license
3092 */
3093
3094//>>label: Clip Effect
3095//>>group: Effects
3096//>>description: Clips the element on and off like an old TV.
3097//>>docs: http://api.jqueryui.com/clip-effect/
3098//>>demos: http://jqueryui.com/effect/
3099
3100
3101
3102var effectsEffectClip = $.effects.define( "clip", "hide", function( options, done ) {
3103	var start,
3104		animate = {},
3105		element = $( this ),
3106		direction = options.direction || "vertical",
3107		both = direction === "both",
3108		horizontal = both || direction === "horizontal",
3109		vertical = both || direction === "vertical";
3110
3111	start = element.cssClip();
3112	animate.clip = {
3113		top: vertical ? ( start.bottom - start.top ) / 2 : start.top,
3114		right: horizontal ? ( start.right - start.left ) / 2 : start.right,
3115		bottom: vertical ? ( start.bottom - start.top ) / 2 : start.bottom,
3116		left: horizontal ? ( start.right - start.left ) / 2 : start.left
3117	};
3118
3119	$.effects.createPlaceholder( element );
3120
3121	if ( options.mode === "show" ) {
3122		element.cssClip( animate.clip );
3123		animate.clip = start;
3124	}
3125
3126	element.animate( animate, {
3127		queue: false,
3128		duration: options.duration,
3129		easing: options.easing,
3130		complete: done
3131	} );
3132
3133} );
3134
3135
3136/*!
3137 * jQuery UI Effects Drop 1.12.1
3138 * http://jqueryui.com
3139 *
3140 * Copyright jQuery Foundation and other contributors
3141 * Released under the MIT license.
3142 * http://jquery.org/license
3143 */
3144
3145//>>label: Drop Effect
3146//>>group: Effects
3147//>>description: Moves an element in one direction and hides it at the same time.
3148//>>docs: http://api.jqueryui.com/drop-effect/
3149//>>demos: http://jqueryui.com/effect/
3150
3151
3152
3153var effectsEffectDrop = $.effects.define( "drop", "hide", function( options, done ) {
3154
3155	var distance,
3156		element = $( this ),
3157		mode = options.mode,
3158		show = mode === "show",
3159		direction = options.direction || "left",
3160		ref = ( direction === "up" || direction === "down" ) ? "top" : "left",
3161		motion = ( direction === "up" || direction === "left" ) ? "-=" : "+=",
3162		oppositeMotion = ( motion === "+=" ) ? "-=" : "+=",
3163		animation = {
3164			opacity: 0
3165		};
3166
3167	$.effects.createPlaceholder( element );
3168
3169	distance = options.distance ||
3170		element[ ref === "top" ? "outerHeight" : "outerWidth" ]( true ) / 2;
3171
3172	animation[ ref ] = motion + distance;
3173
3174	if ( show ) {
3175		element.css( animation );
3176
3177		animation[ ref ] = oppositeMotion + distance;
3178		animation.opacity = 1;
3179	}
3180
3181	// Animate
3182	element.animate( animation, {
3183		queue: false,
3184		duration: options.duration,
3185		easing: options.easing,
3186		complete: done
3187	} );
3188} );
3189
3190
3191/*!
3192 * jQuery UI Effects Explode 1.12.1
3193 * http://jqueryui.com
3194 *
3195 * Copyright jQuery Foundation and other contributors
3196 * Released under the MIT license.
3197 * http://jquery.org/license
3198 */
3199
3200//>>label: Explode Effect
3201//>>group: Effects
3202// jscs:disable maximumLineLength
3203//>>description: Explodes an element in all directions into n pieces. Implodes an element to its original wholeness.
3204// jscs:enable maximumLineLength
3205//>>docs: http://api.jqueryui.com/explode-effect/
3206//>>demos: http://jqueryui.com/effect/
3207
3208
3209
3210var effectsEffectExplode = $.effects.define( "explode", "hide", function( options, done ) {
3211
3212	var i, j, left, top, mx, my,
3213		rows = options.pieces ? Math.round( Math.sqrt( options.pieces ) ) : 3,
3214		cells = rows,
3215		element = $( this ),
3216		mode = options.mode,
3217		show = mode === "show",
3218
3219		// Show and then visibility:hidden the element before calculating offset
3220		offset = element.show().css( "visibility", "hidden" ).offset(),
3221
3222		// Width and height of a piece
3223		width = Math.ceil( element.outerWidth() / cells ),
3224		height = Math.ceil( element.outerHeight() / rows ),
3225		pieces = [];
3226
3227	// Children animate complete:
3228	function childComplete() {
3229		pieces.push( this );
3230		if ( pieces.length === rows * cells ) {
3231			animComplete();
3232		}
3233	}
3234
3235	// Clone the element for each row and cell.
3236	for ( i = 0; i < rows; i++ ) { // ===>
3237		top = offset.top + i * height;
3238		my = i - ( rows - 1 ) / 2;
3239
3240		for ( j = 0; j < cells; j++ ) { // |||
3241			left = offset.left + j * width;
3242			mx = j - ( cells - 1 ) / 2;
3243
3244			// Create a clone of the now hidden main element that will be absolute positioned
3245			// within a wrapper div off the -left and -top equal to size of our pieces
3246			element
3247				.clone()
3248				.appendTo( "body" )
3249				.wrap( "<div></div>" )
3250				.css( {
3251					position: "absolute",
3252					visibility: "visible",
3253					left: -j * width,
3254					top: -i * height
3255				} )
3256
3257				// Select the wrapper - make it overflow: hidden and absolute positioned based on
3258				// where the original was located +left and +top equal to the size of pieces
3259				.parent()
3260					.addClass( "ui-effects-explode" )
3261					.css( {
3262						position: "absolute",
3263						overflow: "hidden",
3264						width: width,
3265						height: height,
3266						left: left + ( show ? mx * width : 0 ),
3267						top: top + ( show ? my * height : 0 ),
3268						opacity: show ? 0 : 1
3269					} )
3270					.animate( {
3271						left: left + ( show ? 0 : mx * width ),
3272						top: top + ( show ? 0 : my * height ),
3273						opacity: show ? 1 : 0
3274					}, options.duration || 500, options.easing, childComplete );
3275		}
3276	}
3277
3278	function animComplete() {
3279		element.css( {
3280			visibility: "visible"
3281		} );
3282		$( pieces ).remove();
3283		done();
3284	}
3285} );
3286
3287
3288/*!
3289 * jQuery UI Effects Fade 1.12.1
3290 * http://jqueryui.com
3291 *
3292 * Copyright jQuery Foundation and other contributors
3293 * Released under the MIT license.
3294 * http://jquery.org/license
3295 */
3296
3297//>>label: Fade Effect
3298//>>group: Effects
3299//>>description: Fades the element.
3300//>>docs: http://api.jqueryui.com/fade-effect/
3301//>>demos: http://jqueryui.com/effect/
3302
3303
3304
3305var effectsEffectFade = $.effects.define( "fade", "toggle", function( options, done ) {
3306	var show = options.mode === "show";
3307
3308	$( this )
3309		.css( "opacity", show ? 0 : 1 )
3310		.animate( {
3311			opacity: show ? 1 : 0
3312		}, {
3313			queue: false,
3314			duration: options.duration,
3315			easing: options.easing,
3316			complete: done
3317		} );
3318} );
3319
3320
3321/*!
3322 * jQuery UI Effects Fold 1.12.1
3323 * http://jqueryui.com
3324 *
3325 * Copyright jQuery Foundation and other contributors
3326 * Released under the MIT license.
3327 * http://jquery.org/license
3328 */
3329
3330//>>label: Fold Effect
3331//>>group: Effects
3332//>>description: Folds an element first horizontally and then vertically.
3333//>>docs: http://api.jqueryui.com/fold-effect/
3334//>>demos: http://jqueryui.com/effect/
3335
3336
3337
3338var effectsEffectFold = $.effects.define( "fold", "hide", function( options, done ) {
3339
3340	// Create element
3341	var element = $( this ),
3342		mode = options.mode,
3343		show = mode === "show",
3344		hide = mode === "hide",
3345		size = options.size || 15,
3346		percent = /([0-9]+)%/.exec( size ),
3347		horizFirst = !!options.horizFirst,
3348		ref = horizFirst ? [ "right", "bottom" ] : [ "bottom", "right" ],
3349		duration = options.duration / 2,
3350
3351		placeholder = $.effects.createPlaceholder( element ),
3352
3353		start = element.cssClip(),
3354		animation1 = { clip: $.extend( {}, start ) },
3355		animation2 = { clip: $.extend( {}, start ) },
3356
3357		distance = [ start[ ref[ 0 ] ], start[ ref[ 1 ] ] ],
3358
3359		queuelen = element.queue().length;
3360
3361	if ( percent ) {
3362		size = parseInt( percent[ 1 ], 10 ) / 100 * distance[ hide ? 0 : 1 ];
3363	}
3364	animation1.clip[ ref[ 0 ] ] = size;
3365	animation2.clip[ ref[ 0 ] ] = size;
3366	animation2.clip[ ref[ 1 ] ] = 0;
3367
3368	if ( show ) {
3369		element.cssClip( animation2.clip );
3370		if ( placeholder ) {
3371			placeholder.css( $.effects.clipToBox( animation2 ) );
3372		}
3373
3374		animation2.clip = start;
3375	}
3376
3377	// Animate
3378	element
3379		.queue( function( next ) {
3380			if ( placeholder ) {
3381				placeholder
3382					.animate( $.effects.clipToBox( animation1 ), duration, options.easing )
3383					.animate( $.effects.clipToBox( animation2 ), duration, options.easing );
3384			}
3385
3386			next();
3387		} )
3388		.animate( animation1, duration, options.easing )
3389		.animate( animation2, duration, options.easing )
3390		.queue( done );
3391
3392	$.effects.unshift( element, queuelen, 4 );
3393} );
3394
3395
3396/*!
3397 * jQuery UI Effects Highlight 1.12.1
3398 * http://jqueryui.com
vendor: 6,249 bytes, lines 3399-3618
3399 *
3400 * Copyright jQuery Foundation and other contributors
3401 * Released under the MIT license.
3402 * http://jquery.org/license
3403 */
3404
3405//>>label: Highlight Effect
3406//>>group: Effects
3407//>>description: Highlights the background of an element in a defined color for a custom duration.
3408//>>docs: http://api.jqueryui.com/highlight-effect/
3409//>>demos: http://jqueryui.com/effect/
3410
3411
3412
3413var effectsEffectHighlight = $.effects.define( "highlight", "show", function( options, done ) {
3414	var element = $( this ),
3415		animation = {
3416			backgroundColor: element.css( "backgroundColor" )
3417		};
3418
3419	if ( options.mode === "hide" ) {
3420		animation.opacity = 0;
3421	}
3422
3423	$.effects.saveStyle( element );
3424
3425	element
3426		.css( {
3427			backgroundImage: "none",
3428			backgroundColor: options.color || "#ffff99"
3429		} )
3430		.animate( animation, {
3431			queue: false,
3432			duration: options.duration,
3433			easing: options.easing,
3434			complete: done
3435		} );
3436} );
3437
3438
3439/*!
3440 * jQuery UI Effects Size 1.12.1
3441 * http://jqueryui.com
3442 *
3443 * Copyright jQuery Foundation and other contributors
3444 * Released under the MIT license.
3445 * http://jquery.org/license
3446 */
3447
3448//>>label: Size Effect
3449//>>group: Effects
3450//>>description: Resize an element to a specified width and height.
3451//>>docs: http://api.jqueryui.com/size-effect/
3452//>>demos: http://jqueryui.com/effect/
3453
3454
3455
3456var effectsEffectSize = $.effects.define( "size", function( options, done ) {
3457
3458	// Create element
3459	var baseline, factor, temp,
3460		element = $( this ),
3461
3462		// Copy for children
3463		cProps = [ "fontSize" ],
3464		vProps = [ "borderTopWidth", "borderBottomWidth", "paddingTop", "paddingBottom" ],
3465		hProps = [ "borderLeftWidth", "borderRightWidth", "paddingLeft", "paddingRight" ],
3466
3467		// Set options
3468		mode = options.mode,
3469		restore = mode !== "effect",
3470		scale = options.scale || "both",
3471		origin = options.origin || [ "middle", "center" ],
3472		position = element.css( "position" ),
3473		pos = element.position(),
3474		original = $.effects.scaledDimensions( element ),
3475		from = options.from || original,
3476		to = options.to || $.effects.scaledDimensions( element, 0 );
3477
3478	$.effects.createPlaceholder( element );
3479
3480	if ( mode === "show" ) {
3481		temp = from;
3482		from = to;
3483		to = temp;
3484	}
3485
3486	// Set scaling factor
3487	factor = {
3488		from: {
3489			y: from.height / original.height,
3490			x: from.width / original.width
3491		},
3492		to: {
3493			y: to.height / original.height,
3494			x: to.width / original.width
3495		}
3496	};
3497
3498	// Scale the css box
3499	if ( scale === "box" || scale === "both" ) {
3500
3501		// Vertical props scaling
3502		if ( factor.from.y !== factor.to.y ) {
3503			from = $.effects.setTransition( element, vProps, factor.from.y, from );
3504			to = $.effects.setTransition( element, vProps, factor.to.y, to );
3505		}
3506
3507		// Horizontal props scaling
3508		if ( factor.from.x !== factor.to.x ) {
3509			from = $.effects.setTransition( element, hProps, factor.from.x, from );
3510			to = $.effects.setTransition( element, hProps, factor.to.x, to );
3511		}
3512	}
3513
3514	// Scale the content
3515	if ( scale === "content" || scale === "both" ) {
3516
3517		// Vertical props scaling
3518		if ( factor.from.y !== factor.to.y ) {
3519			from = $.effects.setTransition( element, cProps, factor.from.y, from );
3520			to = $.effects.setTransition( element, cProps, factor.to.y, to );
3521		}
3522	}
3523
3524	// Adjust the position properties based on the provided origin points
3525	if ( origin ) {
3526		baseline = $.effects.getBaseline( origin, original );
3527		from.top = ( original.outerHeight - from.outerHeight ) * baseline.y + pos.top;
3528		from.left = ( original.outerWidth - from.outerWidth ) * baseline.x + pos.left;
3529		to.top = ( original.outerHeight - to.outerHeight ) * baseline.y + pos.top;
3530		to.left = ( original.outerWidth - to.outerWidth ) * baseline.x + pos.left;
3531	}
3532	element.css( from );
3533
3534	// Animate the children if desired
3535	if ( scale === "content" || scale === "both" ) {
3536
3537		vProps = vProps.concat( [ "marginTop", "marginBottom" ] ).concat( cProps );
3538		hProps = hProps.concat( [ "marginLeft", "marginRight" ] );
3539
3540		// Only animate children with width attributes specified
3541		// TODO: is this right? should we include anything with css width specified as well
3542		element.find( "*[width]" ).each( function() {
3543			var child = $( this ),
3544				childOriginal = $.effects.scaledDimensions( child ),
3545				childFrom = {
3546					height: childOriginal.height * factor.from.y,
3547					width: childOriginal.width * factor.from.x,
3548					outerHeight: childOriginal.outerHeight * factor.from.y,
3549					outerWidth: childOriginal.outerWidth * factor.from.x
3550				},
3551				childTo = {
3552					height: childOriginal.height * factor.to.y,
3553					width: childOriginal.width * factor.to.x,
3554					outerHeight: childOriginal.height * factor.to.y,
3555					outerWidth: childOriginal.width * factor.to.x
3556				};
3557
3558			// Vertical props scaling
3559			if ( factor.from.y !== factor.to.y ) {
3560				childFrom = $.effects.setTransition( child, vProps, factor.from.y, childFrom );
3561				childTo = $.effects.setTransition( child, vProps, factor.to.y, childTo );
3562			}
3563
3564			// Horizontal props scaling
3565			if ( factor.from.x !== factor.to.x ) {
3566				childFrom = $.effects.setTransition( child, hProps, factor.from.x, childFrom );
3567				childTo = $.effects.setTransition( child, hProps, factor.to.x, childTo );
3568			}
3569
3570			if ( restore ) {
3571				$.effects.saveStyle( child );
3572			}
3573
3574			// Animate children
3575			child.css( childFrom );
3576			child.animate( childTo, options.duration, options.easing, function() {
3577
3578				// Restore children
3579				if ( restore ) {
3580					$.effects.restoreStyle( child );
3581				}
3582			} );
3583		} );
3584	}
3585
3586	// Animate
3587	element.animate( to, {
3588		queue: false,
3589		duration: options.duration,
3590		easing: options.easing,
3591		complete: function() {
3592
3593			var offset = element.offset();
3594
3595			if ( to.opacity === 0 ) {
3596				element.css( "opacity", from.opacity );
3597			}
3598
3599			if ( !restore ) {
3600				element
3601					.css( "position", position === "static" ? "relative" : position )
3602					.offset( offset );
3603
3604				// Need to save style here so that automatic style restoration
3605				// doesn't restore to the original styles from before the animation.
3606				$.effects.saveStyle( element );
3607			}
3608
3609			done();
3610		}
3611	} );
3612
3613} );
3614
3615
3616/*!
3617 * jQuery UI Effects Scale 1.12.1
3618 * http://jqueryui.com
vendor: 4,797 bytes, lines 3619-3796
3619 *
3620 * Copyright jQuery Foundation and other contributors
3621 * Released under the MIT license.
3622 * http://jquery.org/license
3623 */
3624
3625//>>label: Scale Effect
3626//>>group: Effects
3627//>>description: Grows or shrinks an element and its content.
3628//>>docs: http://api.jqueryui.com/scale-effect/
3629//>>demos: http://jqueryui.com/effect/
3630
3631
3632
3633var effectsEffectScale = $.effects.define( "scale", function( options, done ) {
3634
3635	// Create element
3636	var el = $( this ),
3637		mode = options.mode,
3638		percent = parseInt( options.percent, 10 ) ||
3639			( parseInt( options.percent, 10 ) === 0 ? 0 : ( mode !== "effect" ? 0 : 100 ) ),
3640
3641		newOptions = $.extend( true, {
3642			from: $.effects.scaledDimensions( el ),
3643			to: $.effects.scaledDimensions( el, percent, options.direction || "both" ),
3644			origin: options.origin || [ "middle", "center" ]
3645		}, options );
3646
3647	// Fade option to support puff
3648	if ( options.fade ) {
3649		newOptions.from.opacity = 1;
3650		newOptions.to.opacity = 0;
3651	}
3652
3653	$.effects.effect.size.call( this, newOptions, done );
3654} );
3655
3656
3657/*!
3658 * jQuery UI Effects Puff 1.12.1
3659 * http://jqueryui.com
3660 *
3661 * Copyright jQuery Foundation and other contributors
3662 * Released under the MIT license.
3663 * http://jquery.org/license
3664 */
3665
3666//>>label: Puff Effect
3667//>>group: Effects
3668//>>description: Creates a puff effect by scaling the element up and hiding it at the same time.
3669//>>docs: http://api.jqueryui.com/puff-effect/
3670//>>demos: http://jqueryui.com/effect/
3671
3672
3673
3674var effectsEffectPuff = $.effects.define( "puff", "hide", function( options, done ) {
3675	var newOptions = $.extend( true, {}, options, {
3676		fade: true,
3677		percent: parseInt( options.percent, 10 ) || 150
3678	} );
3679
3680	$.effects.effect.scale.call( this, newOptions, done );
3681} );
3682
3683
3684/*!
3685 * jQuery UI Effects Pulsate 1.12.1
3686 * http://jqueryui.com
3687 *
3688 * Copyright jQuery Foundation and other contributors
3689 * Released under the MIT license.
3690 * http://jquery.org/license
3691 */
3692
3693//>>label: Pulsate Effect
3694//>>group: Effects
3695//>>description: Pulsates an element n times by changing the opacity to zero and back.
3696//>>docs: http://api.jqueryui.com/pulsate-effect/
3697//>>demos: http://jqueryui.com/effect/
3698
3699
3700
3701var effectsEffectPulsate = $.effects.define( "pulsate", "show", function( options, done ) {
3702	var element = $( this ),
3703		mode = options.mode,
3704		show = mode === "show",
3705		hide = mode === "hide",
3706		showhide = show || hide,
3707
3708		// Showing or hiding leaves off the "last" animation
3709		anims = ( ( options.times || 5 ) * 2 ) + ( showhide ? 1 : 0 ),
3710		duration = options.duration / anims,
3711		animateTo = 0,
3712		i = 1,
3713		queuelen = element.queue().length;
3714
3715	if ( show || !element.is( ":visible" ) ) {
3716		element.css( "opacity", 0 ).show();
3717		animateTo = 1;
3718	}
3719
3720	// Anims - 1 opacity "toggles"
3721	for ( ; i < anims; i++ ) {
3722		element.animate( { opacity: animateTo }, duration, options.easing );
3723		animateTo = 1 - animateTo;
3724	}
3725
3726	element.animate( { opacity: animateTo }, duration, options.easing );
3727
3728	element.queue( done );
3729
3730	$.effects.unshift( element, queuelen, anims + 1 );
3731} );
3732
3733
3734/*!
3735 * jQuery UI Effects Shake 1.12.1
3736 * http://jqueryui.com
3737 *
3738 * Copyright jQuery Foundation and other contributors
3739 * Released under the MIT license.
3740 * http://jquery.org/license
3741 */
3742
3743//>>label: Shake Effect
3744//>>group: Effects
3745//>>description: Shakes an element horizontally or vertically n times.
3746//>>docs: http://api.jqueryui.com/shake-effect/
3747//>>demos: http://jqueryui.com/effect/
3748
3749
3750
3751var effectsEffectShake = $.effects.define( "shake", function( options, done ) {
3752
3753	var i = 1,
3754		element = $( this ),
3755		direction = options.direction || "left",
3756		distance = options.distance || 20,
3757		times = options.times || 3,
3758		anims = times * 2 + 1,
3759		speed = Math.round( options.duration / anims ),
3760		ref = ( direction === "up" || direction === "down" ) ? "top" : "left",
3761		positiveMotion = ( direction === "up" || direction === "left" ),
3762		animation = {},
3763		animation1 = {},
3764		animation2 = {},
3765
3766		queuelen = element.queue().length;
3767
3768	$.effects.createPlaceholder( element );
3769
3770	// Animation
3771	animation[ ref ] = ( positiveMotion ? "-=" : "+=" ) + distance;
3772	animation1[ ref ] = ( positiveMotion ? "+=" : "-=" ) + distance * 2;
3773	animation2[ ref ] = ( positiveMotion ? "-=" : "+=" ) + distance * 2;
3774
3775	// Animate
3776	element.animate( animation, speed, options.easing );
3777
3778	// Shakes
3779	for ( ; i < times; i++ ) {
3780		element
3781			.animate( animation1, speed, options.easing )
3782			.animate( animation2, speed, options.easing );
3783	}
3784
3785	element
3786		.animate( animation1, speed, options.easing )
3787		.animate( animation, speed / 2, options.easing )
3788		.queue( done );
3789
3790	$.effects.unshift( element, queuelen, anims + 1 );
3791} );
3792
3793
3794/*!
3795 * jQuery UI Effects Slide 1.12.1
3796 * http://jqueryui.com
vendor: 4,781 bytes, lines 3797-3968
3797 *
3798 * Copyright jQuery Foundation and other contributors
3799 * Released under the MIT license.
3800 * http://jquery.org/license
3801 */
3802
3803//>>label: Slide Effect
3804//>>group: Effects
3805//>>description: Slides an element in and out of the viewport.
3806//>>docs: http://api.jqueryui.com/slide-effect/
3807//>>demos: http://jqueryui.com/effect/
3808
3809
3810
3811var effectsEffectSlide = $.effects.define( "slide", "show", function( options, done ) {
3812	var startClip, startRef,
3813		element = $( this ),
3814		map = {
3815			up: [ "bottom", "top" ],
3816			down: [ "top", "bottom" ],
3817			left: [ "right", "left" ],
3818			right: [ "left", "right" ]
3819		},
3820		mode = options.mode,
3821		direction = options.direction || "left",
3822		ref = ( direction === "up" || direction === "down" ) ? "top" : "left",
3823		positiveMotion = ( direction === "up" || direction === "left" ),
3824		distance = options.distance ||
3825			element[ ref === "top" ? "outerHeight" : "outerWidth" ]( true ),
3826		animation = {};
3827
3828	$.effects.createPlaceholder( element );
3829
3830	startClip = element.cssClip();
3831	startRef = element.position()[ ref ];
3832
3833	// Define hide animation
3834	animation[ ref ] = ( positiveMotion ? -1 : 1 ) * distance + startRef;
3835	animation.clip = element.cssClip();
3836	animation.clip[ map[ direction ][ 1 ] ] = animation.clip[ map[ direction ][ 0 ] ];
3837
3838	// Reverse the animation if we're showing
3839	if ( mode === "show" ) {
3840		element.cssClip( animation.clip );
3841		element.css( ref, animation[ ref ] );
3842		animation.clip = startClip;
3843		animation[ ref ] = startRef;
3844	}
3845
3846	// Actually animate
3847	element.animate( animation, {
3848		queue: false,
3849		duration: options.duration,
3850		easing: options.easing,
3851		complete: done
3852	} );
3853} );
3854
3855
3856/*!
3857 * jQuery UI Effects Transfer 1.12.1
3858 * http://jqueryui.com
3859 *
3860 * Copyright jQuery Foundation and other contributors
3861 * Released under the MIT license.
3862 * http://jquery.org/license
3863 */
3864
3865//>>label: Transfer Effect
3866//>>group: Effects
3867//>>description: Displays a transfer effect from one element to another.
3868//>>docs: http://api.jqueryui.com/transfer-effect/
3869//>>demos: http://jqueryui.com/effect/
3870
3871
3872
3873var effect;
3874if ( $.uiBackCompat !== false ) {
3875	effect = $.effects.define( "transfer", function( options, done ) {
3876		$( this ).transfer( options, done );
3877	} );
3878}
3879var effectsEffectTransfer = effect;
3880
3881
3882/*!
3883 * jQuery UI Focusable 1.12.1
3884 * http://jqueryui.com
3885 *
3886 * Copyright jQuery Foundation and other contributors
3887 * Released under the MIT license.
3888 * http://jquery.org/license
3889 */
3890
3891//>>label: :focusable Selector
3892//>>group: Core
3893//>>description: Selects elements which can be focused.
3894//>>docs: http://api.jqueryui.com/focusable-selector/
3895
3896
3897
3898// Selectors
3899$.ui.focusable = function( element, hasTabindex ) {
3900	var map, mapName, img, focusableIfVisible, fieldset,
3901		nodeName = element.nodeName.toLowerCase();
3902
3903	if ( "area" === nodeName ) {
3904		map = element.parentNode;
3905		mapName = map.name;
3906		if ( !element.href || !mapName || map.nodeName.toLowerCase() !== "map" ) {
3907			return false;
3908		}
3909		img = $( "img[usemap='#" + mapName + "']" );
3910		return img.length > 0 && img.is( ":visible" );
3911	}
3912
3913	if ( /^(input|select|textarea|button|object)$/.test( nodeName ) ) {
3914		focusableIfVisible = !element.disabled;
3915
3916		if ( focusableIfVisible ) {
3917
3918			// Form controls within a disabled fieldset are disabled.
3919			// However, controls within the fieldset's legend do not get disabled.
3920			// Since controls generally aren't placed inside legends, we skip
3921			// this portion of the check.
3922			fieldset = $( element ).closest( "fieldset" )[ 0 ];
3923			if ( fieldset ) {
3924				focusableIfVisible = !fieldset.disabled;
3925			}
3926		}
3927	} else if ( "a" === nodeName ) {
3928		focusableIfVisible = element.href || hasTabindex;
3929	} else {
3930		focusableIfVisible = hasTabindex;
3931	}
3932
3933	return focusableIfVisible && $( element ).is( ":visible" ) && visible( $( element ) );
3934};
3935
3936// Support: IE 8 only
3937// IE 8 doesn't resolve inherit to visible/hidden for computed values
3938function visible( element ) {
3939	var visibility = element.css( "visibility" );
3940	while ( visibility === "inherit" ) {
3941		element = element.parent();
3942		visibility = element.css( "visibility" );
3943	}
3944	return visibility !== "hidden";
3945}
3946
3947$.extend( $.expr[ ":" ], {
3948	focusable: function( element ) {
3949		return $.ui.focusable( element, $.attr( element, "tabindex" ) != null );
3950	}
3951} );
3952
3953var focusable = $.ui.focusable;
3954
3955
3956
3957
3958// Support: IE8 Only
3959// IE8 does not support the form attribute and when it is supplied. It overwrites the form prop
3960// with a string, so we need to find the proper form.
3961var form = $.fn.form = function() {
3962	return typeof this[ 0 ].form === "string" ? this.closest( "form" ) : $( this[ 0 ].form );
3963};
3964
3965
3966/*!
3967 * jQuery UI Form Reset Mixin 1.12.1
3968 * http://jqueryui.com
vendor: 4,779 bytes, lines 3969-4156
3969 *
3970 * Copyright jQuery Foundation and other contributors
3971 * Released under the MIT license.
3972 * http://jquery.org/license
3973 */
3974
3975//>>label: Form Reset Mixin
3976//>>group: Core
3977//>>description: Refresh input widgets when their form is reset
3978//>>docs: http://api.jqueryui.com/form-reset-mixin/
3979
3980
3981
3982var formResetMixin = $.ui.formResetMixin = {
3983	_formResetHandler: function() {
3984		var form = $( this );
3985
3986		// Wait for the form reset to actually happen before refreshing
3987		setTimeout( function() {
3988			var instances = form.data( "ui-form-reset-instances" );
3989			$.each( instances, function() {
3990				this.refresh();
3991			} );
3992		} );
3993	},
3994
3995	_bindFormResetHandler: function() {
3996		this.form = this.element.form();
3997		if ( !this.form.length ) {
3998			return;
3999		}
4000
4001		var instances = this.form.data( "ui-form-reset-instances" ) || [];
4002		if ( !instances.length ) {
4003
4004			// We don't use _on() here because we use a single event handler per form
4005			this.form.on( "reset.ui-form-reset", this._formResetHandler );
4006		}
4007		instances.push( this );
4008		this.form.data( "ui-form-reset-instances", instances );
4009	},
4010
4011	_unbindFormResetHandler: function() {
4012		if ( !this.form.length ) {
4013			return;
4014		}
4015
4016		var instances = this.form.data( "ui-form-reset-instances" );
4017		instances.splice( $.inArray( this, instances ), 1 );
4018		if ( instances.length ) {
4019			this.form.data( "ui-form-reset-instances", instances );
4020		} else {
4021			this.form
4022				.removeData( "ui-form-reset-instances" )
4023				.off( "reset.ui-form-reset" );
4024		}
4025	}
4026};
4027
4028
4029/*!
4030 * jQuery UI Support for jQuery core 1.7.x 1.12.1
4031 * http://jqueryui.com
4032 *
4033 * Copyright jQuery Foundation and other contributors
4034 * Released under the MIT license.
4035 * http://jquery.org/license
4036 *
4037 */
4038
4039//>>label: jQuery 1.7 Support
4040//>>group: Core
4041//>>description: Support version 1.7.x of jQuery core
4042
4043
4044
4045// Support: jQuery 1.7 only
4046// Not a great way to check versions, but since we only support 1.7+ and only
4047// need to detect <1.8, this is a simple check that should suffice. Checking
4048// for "1.7." would be a bit safer, but the version string is 1.7, not 1.7.0
4049// and we'll never reach 1.70.0 (if we do, we certainly won't be supporting
4050// 1.7 anymore). See #11197 for why we're not using feature detection.
4051if ( $.fn.jquery.substring( 0, 3 ) === "1.7" ) {
4052
4053	// Setters for .innerWidth(), .innerHeight(), .outerWidth(), .outerHeight()
4054	// Unlike jQuery Core 1.8+, these only support numeric values to set the
4055	// dimensions in pixels
4056	$.each( [ "Width", "Height" ], function( i, name ) {
4057		var side = name === "Width" ? [ "Left", "Right" ] : [ "Top", "Bottom" ],
4058			type = name.toLowerCase(),
4059			orig = {
4060				innerWidth: $.fn.innerWidth,
4061				innerHeight: $.fn.innerHeight,
4062				outerWidth: $.fn.outerWidth,
4063				outerHeight: $.fn.outerHeight
4064			};
4065
4066		function reduce( elem, size, border, margin ) {
4067			$.each( side, function() {
4068				size -= parseFloat( $.css( elem, "padding" + this ) ) || 0;
4069				if ( border ) {
4070					size -= parseFloat( $.css( elem, "border" + this + "Width" ) ) || 0;
4071				}
4072				if ( margin ) {
4073					size -= parseFloat( $.css( elem, "margin" + this ) ) || 0;
4074				}
4075			} );
4076			return size;
4077		}
4078
4079		$.fn[ "inner" + name ] = function( size ) {
4080			if ( size === undefined ) {
4081				return orig[ "inner" + name ].call( this );
4082			}
4083
4084			return this.each( function() {
4085				$( this ).css( type, reduce( this, size ) + "px" );
4086			} );
4087		};
4088
4089		$.fn[ "outer" + name ] = function( size, margin ) {
4090			if ( typeof size !== "number" ) {
4091				return orig[ "outer" + name ].call( this, size );
4092			}
4093
4094			return this.each( function() {
4095				$( this ).css( type, reduce( this, size, true, margin ) + "px" );
4096			} );
4097		};
4098	} );
4099
4100	$.fn.addBack = function( selector ) {
4101		return this.add( selector == null ?
4102			this.prevObject : this.prevObject.filter( selector )
4103		);
4104	};
4105}
4106
4107;
4108/*!
4109 * jQuery UI Keycode 1.12.1
4110 * http://jqueryui.com
4111 *
4112 * Copyright jQuery Foundation and other contributors
4113 * Released under the MIT license.
4114 * http://jquery.org/license
4115 */
4116
4117//>>label: Keycode
4118//>>group: Core
4119//>>description: Provide keycodes as keynames
4120//>>docs: http://api.jqueryui.com/jQuery.ui.keyCode/
4121
4122
4123var keycode = $.ui.keyCode = {
4124	BACKSPACE: 8,
4125	COMMA: 188,
4126	DELETE: 46,
4127	DOWN: 40,
4128	END: 35,
4129	ENTER: 13,
4130	ESCAPE: 27,
4131	HOME: 36,
4132	LEFT: 37,
4133	PAGE_DOWN: 34,
4134	PAGE_UP: 33,
4135	PERIOD: 190,
4136	RIGHT: 39,
4137	SPACE: 32,
4138	TAB: 9,
4139	UP: 38
4140};
4141
4142
4143
4144
4145// Internal use only
4146var escapeSelector = $.ui.escapeSelector = ( function() {
4147	var selectorEscape = /([!"#$%&'()*+,./:;<=>?@[\]^`{|}~])/g;
4148	return function( selector ) {
4149		return selector.replace( selectorEscape, "\\$1" );
4150	};
4151} )();
4152
4153
4154/*!
4155 * jQuery UI Labels 1.12.1
4156 * http://jqueryui.com
vendor: 5,256 bytes, lines 4157-4360
4157 *
4158 * Copyright jQuery Foundation and other contributors
4159 * Released under the MIT license.
4160 * http://jquery.org/license
4161 */
4162
4163//>>label: labels
4164//>>group: Core
4165//>>description: Find all the labels associated with a given input
4166//>>docs: http://api.jqueryui.com/labels/
4167
4168
4169
4170var labels = $.fn.labels = function() {
4171	var ancestor, selector, id, labels, ancestors;
4172
4173	// Check control.labels first
4174	if ( this[ 0 ].labels && this[ 0 ].labels.length ) {
4175		return this.pushStack( this[ 0 ].labels );
4176	}
4177
4178	// Support: IE <= 11, FF <= 37, Android <= 2.3 only
4179	// Above browsers do not support control.labels. Everything below is to support them
4180	// as well as document fragments. control.labels does not work on document fragments
4181	labels = this.eq( 0 ).parents( "label" );
4182
4183	// Look for the label based on the id
4184	id = this.attr( "id" );
4185	if ( id ) {
4186
4187		// We don't search against the document in case the element
4188		// is disconnected from the DOM
4189		ancestor = this.eq( 0 ).parents().last();
4190
4191		// Get a full set of top level ancestors
4192		ancestors = ancestor.add( ancestor.length ? ancestor.siblings() : this.siblings() );
4193
4194		// Create a selector for the label based on the id
4195		selector = "label[for='" + $.ui.escapeSelector( id ) + "']";
4196
4197		labels = labels.add( ancestors.find( selector ).addBack( selector ) );
4198
4199	}
4200
4201	// Return whatever we have found for labels
4202	return this.pushStack( labels );
4203};
4204
4205
4206/*!
4207 * jQuery UI Scroll Parent 1.12.1
4208 * http://jqueryui.com
4209 *
4210 * Copyright jQuery Foundation and other contributors
4211 * Released under the MIT license.
4212 * http://jquery.org/license
4213 */
4214
4215//>>label: scrollParent
4216//>>group: Core
4217//>>description: Get the closest ancestor element that is scrollable.
4218//>>docs: http://api.jqueryui.com/scrollParent/
4219
4220
4221
4222var scrollParent = $.fn.scrollParent = function( includeHidden ) {
4223	var position = this.css( "position" ),
4224		excludeStaticParent = position === "absolute",
4225		overflowRegex = includeHidden ? /(auto|scroll|hidden)/ : /(auto|scroll)/,
4226		scrollParent = this.parents().filter( function() {
4227			var parent = $( this );
4228			if ( excludeStaticParent && parent.css( "position" ) === "static" ) {
4229				return false;
4230			}
4231			return overflowRegex.test( parent.css( "overflow" ) + parent.css( "overflow-y" ) +
4232				parent.css( "overflow-x" ) );
4233		} ).eq( 0 );
4234
4235	return position === "fixed" || !scrollParent.length ?
4236		$( this[ 0 ].ownerDocument || document ) :
4237		scrollParent;
4238};
4239
4240
4241/*!
4242 * jQuery UI Tabbable 1.12.1
4243 * http://jqueryui.com
4244 *
4245 * Copyright jQuery Foundation and other contributors
4246 * Released under the MIT license.
4247 * http://jquery.org/license
4248 */
4249
4250//>>label: :tabbable Selector
4251//>>group: Core
4252//>>description: Selects elements which can be tabbed to.
4253//>>docs: http://api.jqueryui.com/tabbable-selector/
4254
4255
4256
4257var tabbable = $.extend( $.expr[ ":" ], {
4258	tabbable: function( element ) {
4259		var tabIndex = $.attr( element, "tabindex" ),
4260			hasTabindex = tabIndex != null;
4261		return ( !hasTabindex || tabIndex >= 0 ) && $.ui.focusable( element, hasTabindex );
4262	}
4263} );
4264
4265
4266/*!
4267 * jQuery UI Unique ID 1.12.1
4268 * http://jqueryui.com
4269 *
4270 * Copyright jQuery Foundation and other contributors
4271 * Released under the MIT license.
4272 * http://jquery.org/license
4273 */
4274
4275//>>label: uniqueId
4276//>>group: Core
4277//>>description: Functions to generate and remove uniqueId's
4278//>>docs: http://api.jqueryui.com/uniqueId/
4279
4280
4281
4282var uniqueId = $.fn.extend( {
4283	uniqueId: ( function() {
4284		var uuid = 0;
4285
4286		return function() {
4287			return this.each( function() {
4288				if ( !this.id ) {
4289					this.id = "ui-id-" + ( ++uuid );
4290				}
4291			} );
4292		};
4293	} )(),
4294
4295	removeUniqueId: function() {
4296		return this.each( function() {
4297			if ( /^ui-id-\d+$/.test( this.id ) ) {
4298				$( this ).removeAttr( "id" );
4299			}
4300		} );
4301	}
4302} );
4303
4304
4305/*!
4306 * jQuery UI Accordion 1.12.1
4307 * http://jqueryui.com
4308 *
4309 * Copyright jQuery Foundation and other contributors
4310 * Released under the MIT license.
4311 * http://jquery.org/license
4312 */
4313
4314//>>label: Accordion
4315//>>group: Widgets
4316// jscs:disable maximumLineLength
4317//>>description: Displays collapsible content panels for presenting information in a limited amount of space.
4318// jscs:enable maximumLineLength
4319//>>docs: http://api.jqueryui.com/accordion/
4320//>>demos: http://jqueryui.com/accordion/
4321//>>css.structure: ../../themes/base/core.css
4322//>>css.structure: ../../themes/base/accordion.css
4323//>>css.theme: ../../themes/base/theme.css
4324
4325
4326
4327var widgetsAccordion = $.widget( "ui.accordion", {
4328	version: "1.12.1",
4329	options: {
4330		active: 0,
4331		animate: {},
4332		classes: {
4333			"ui-accordion-header": "ui-corner-top",
4334			"ui-accordion-header-collapsed": "ui-corner-all",
4335			"ui-accordion-content": "ui-corner-bottom"
4336		},
4337		collapsible: false,
4338		event: "click",
4339		header: "> li > :first-child, > :not(li):even",
4340		heightStyle: "auto",
4341		icons: {
4342			activeHeader: "ui-icon-triangle-1-s",
4343			header: "ui-icon-triangle-1-e"
4344		},
4345
4346		// Callbacks
4347		activate: null,
4348		beforeActivate: null
4349	},
4350
4351	hideProps: {
4352		borderTopWidth: "hide",
4353		borderBottomWidth: "hide",
4354		paddingTop: "hide",
4355		paddingBottom: "hide",
4356		height: "hide"
4357	},
4358
4359	showProps: {
4360		borderTopWidth: "show",
vendor: 5,248 bytes, lines 4361-4563
4361		borderBottomWidth: "show",
4362		paddingTop: "show",
4363		paddingBottom: "show",
4364		height: "show"
4365	},
4366
4367	_create: function() {
4368		var options = this.options;
4369
4370		this.prevShow = this.prevHide = $();
4371		this._addClass( "ui-accordion", "ui-widget ui-helper-reset" );
4372		this.element.attr( "role", "tablist" );
4373
4374		// Don't allow collapsible: false and active: false / null
4375		if ( !options.collapsible && ( options.active === false || options.active == null ) ) {
4376			options.active = 0;
4377		}
4378
4379		this._processPanels();
4380
4381		// handle negative values
4382		if ( options.active < 0 ) {
4383			options.active += this.headers.length;
4384		}
4385		this._refresh();
4386	},
4387
4388	_getCreateEventData: function() {
4389		return {
4390			header: this.active,
4391			panel: !this.active.length ? $() : this.active.next()
4392		};
4393	},
4394
4395	_createIcons: function() {
4396		var icon, children,
4397			icons = this.options.icons;
4398
4399		if ( icons ) {
4400			icon = $( "<span>" );
4401			this._addClass( icon, "ui-accordion-header-icon", "ui-icon " + icons.header );
4402			icon.prependTo( this.headers );
4403			children = this.active.children( ".ui-accordion-header-icon" );
4404			this._removeClass( children, icons.header )
4405				._addClass( children, null, icons.activeHeader )
4406				._addClass( this.headers, "ui-accordion-icons" );
4407		}
4408	},
4409
4410	_destroyIcons: function() {
4411		this._removeClass( this.headers, "ui-accordion-icons" );
4412		this.headers.children( ".ui-accordion-header-icon" ).remove();
4413	},
4414
4415	_destroy: function() {
4416		var contents;
4417
4418		// Clean up main element
4419		this.element.removeAttr( "role" );
4420
4421		// Clean up headers
4422		this.headers
4423			.removeAttr( "role aria-expanded aria-selected aria-controls tabIndex" )
4424			.removeUniqueId();
4425
4426		this._destroyIcons();
4427
4428		// Clean up content panels
4429		contents = this.headers.next()
4430			.css( "display", "" )
4431			.removeAttr( "role aria-hidden aria-labelledby" )
4432			.removeUniqueId();
4433
4434		if ( this.options.heightStyle !== "content" ) {
4435			contents.css( "height", "" );
4436		}
4437	},
4438
4439	_setOption: function( key, value ) {
4440		if ( key === "active" ) {
4441
4442			// _activate() will handle invalid values and update this.options
4443			this._activate( value );
4444			return;
4445		}
4446
4447		if ( key === "event" ) {
4448			if ( this.options.event ) {
4449				this._off( this.headers, this.options.event );
4450			}
4451			this._setupEvents( value );
4452		}
4453
4454		this._super( key, value );
4455
4456		// Setting collapsible: false while collapsed; open first panel
4457		if ( key === "collapsible" && !value && this.options.active === false ) {
4458			this._activate( 0 );
4459		}
4460
4461		if ( key === "icons" ) {
4462			this._destroyIcons();
4463			if ( value ) {
4464				this._createIcons();
4465			}
4466		}
4467	},
4468
4469	_setOptionDisabled: function( value ) {
4470		this._super( value );
4471
4472		this.element.attr( "aria-disabled", value );
4473
4474		// Support: IE8 Only
4475		// #5332 / #6059 - opacity doesn't cascade to positioned elements in IE
4476		// so we need to add the disabled class to the headers and panels
4477		this._toggleClass( null, "ui-state-disabled", !!value );
4478		this._toggleClass( this.headers.add( this.headers.next() ), null, "ui-state-disabled",
4479			!!value );
4480	},
4481
4482	_keydown: function( event ) {
4483		if ( event.altKey || event.ctrlKey ) {
4484			return;
4485		}
4486
4487		var keyCode = $.ui.keyCode,
4488			length = this.headers.length,
4489			currentIndex = this.headers.index( event.target ),
4490			toFocus = false;
4491
4492		switch ( event.keyCode ) {
4493		case keyCode.RIGHT:
4494		case keyCode.DOWN:
4495			toFocus = this.headers[ ( currentIndex + 1 ) % length ];
4496			break;
4497		case keyCode.LEFT:
4498		case keyCode.UP:
4499			toFocus = this.headers[ ( currentIndex - 1 + length ) % length ];
4500			break;
4501		case keyCode.SPACE:
4502		case keyCode.ENTER:
4503			this._eventHandler( event );
4504			break;
4505		case keyCode.HOME:
4506			toFocus = this.headers[ 0 ];
4507			break;
4508		case keyCode.END:
4509			toFocus = this.headers[ length - 1 ];
4510			break;
4511		}
4512
4513		if ( toFocus ) {
4514			$( event.target ).attr( "tabIndex", -1 );
4515			$( toFocus ).attr( "tabIndex", 0 );
4516			$( toFocus ).trigger( "focus" );
4517			event.preventDefault();
4518		}
4519	},
4520
4521	_panelKeyDown: function( event ) {
4522		if ( event.keyCode === $.ui.keyCode.UP && event.ctrlKey ) {
4523			$( event.currentTarget ).prev().trigger( "focus" );
4524		}
4525	},
4526
4527	refresh: function() {
4528		var options = this.options;
4529		this._processPanels();
4530
4531		// Was collapsed or no panel
4532		if ( ( options.active === false && options.collapsible === true ) ||
4533				!this.headers.length ) {
4534			options.active = false;
4535			this.active = $();
4536
4537		// active false only when collapsible is true
4538		} else if ( options.active === false ) {
4539			this._activate( 0 );
4540
4541		// was active, but active panel is gone
4542		} else if ( this.active.length && !$.contains( this.element[ 0 ], this.active[ 0 ] ) ) {
4543
4544			// all remaining panel are disabled
4545			if ( this.headers.length === this.headers.find( ".ui-state-disabled" ).length ) {
4546				options.active = false;
4547				this.active = $();
4548
4549			// activate previous panel
4550			} else {
4551				this._activate( Math.max( 0, options.active - 1 ) );
4552			}
4553
4554		// was active, active panel still exists
4555		} else {
4556
4557			// make sure active index is correct
4558			options.active = this.headers.index( this.active );
4559		}
4560
4561		this._destroyIcons();
4562
4563		this._refresh();
vendor: 6,800 bytes, lines 4564-4801
4564	},
4565
4566	_processPanels: function() {
4567		var prevHeaders = this.headers,
4568			prevPanels = this.panels;
4569
4570		this.headers = this.element.find( this.options.header );
4571		this._addClass( this.headers, "ui-accordion-header ui-accordion-header-collapsed",
4572			"ui-state-default" );
4573
4574		this.panels = this.headers.next().filter( ":not(.ui-accordion-content-active)" ).hide();
4575		this._addClass( this.panels, "ui-accordion-content", "ui-helper-reset ui-widget-content" );
4576
4577		// Avoid memory leaks (#10056)
4578		if ( prevPanels ) {
4579			this._off( prevHeaders.not( this.headers ) );
4580			this._off( prevPanels.not( this.panels ) );
4581		}
4582	},
4583
4584	_refresh: function() {
4585		var maxHeight,
4586			options = this.options,
4587			heightStyle = options.heightStyle,
4588			parent = this.element.parent();
4589
4590		this.active = this._findActive( options.active );
4591		this._addClass( this.active, "ui-accordion-header-active", "ui-state-active" )
4592			._removeClass( this.active, "ui-accordion-header-collapsed" );
4593		this._addClass( this.active.next(), "ui-accordion-content-active" );
4594		this.active.next().show();
4595
4596		this.headers
4597			.attr( "role", "tab" )
4598			.each( function() {
4599				var header = $( this ),
4600					headerId = header.uniqueId().attr( "id" ),
4601					panel = header.next(),
4602					panelId = panel.uniqueId().attr( "id" );
4603				header.attr( "aria-controls", panelId );
4604				panel.attr( "aria-labelledby", headerId );
4605			} )
4606			.next()
4607				.attr( "role", "tabpanel" );
4608
4609		this.headers
4610			.not( this.active )
4611				.attr( {
4612					"aria-selected": "false",
4613					"aria-expanded": "false",
4614					tabIndex: -1
4615				} )
4616				.next()
4617					.attr( {
4618						"aria-hidden": "true"
4619					} )
4620					.hide();
4621
4622		// Make sure at least one header is in the tab order
4623		if ( !this.active.length ) {
4624			this.headers.eq( 0 ).attr( "tabIndex", 0 );
4625		} else {
4626			this.active.attr( {
4627				"aria-selected": "true",
4628				"aria-expanded": "true",
4629				tabIndex: 0
4630			} )
4631				.next()
4632					.attr( {
4633						"aria-hidden": "false"
4634					} );
4635		}
4636
4637		this._createIcons();
4638
4639		this._setupEvents( options.event );
4640
4641		if ( heightStyle === "fill" ) {
4642			maxHeight = parent.height();
4643			this.element.siblings( ":visible" ).each( function() {
4644				var elem = $( this ),
4645					position = elem.css( "position" );
4646
4647				if ( position === "absolute" || position === "fixed" ) {
4648					return;
4649				}
4650				maxHeight -= elem.outerHeight( true );
4651			} );
4652
4653			this.headers.each( function() {
4654				maxHeight -= $( this ).outerHeight( true );
4655			} );
4656
4657			this.headers.next()
4658				.each( function() {
4659					$( this ).height( Math.max( 0, maxHeight -
4660						$( this ).innerHeight() + $( this ).height() ) );
4661				} )
4662				.css( "overflow", "auto" );
4663		} else if ( heightStyle === "auto" ) {
4664			maxHeight = 0;
4665			this.headers.next()
4666				.each( function() {
4667					var isVisible = $( this ).is( ":visible" );
4668					if ( !isVisible ) {
4669						$( this ).show();
4670					}
4671					maxHeight = Math.max( maxHeight, $( this ).css( "height", "" ).height() );
4672					if ( !isVisible ) {
4673						$( this ).hide();
4674					}
4675				} )
4676				.height( maxHeight );
4677		}
4678	},
4679
4680	_activate: function( index ) {
4681		var active = this._findActive( index )[ 0 ];
4682
4683		// Trying to activate the already active panel
4684		if ( active === this.active[ 0 ] ) {
4685			return;
4686		}
4687
4688		// Trying to collapse, simulate a click on the currently active header
4689		active = active || this.active[ 0 ];
4690
4691		this._eventHandler( {
4692			target: active,
4693			currentTarget: active,
4694			preventDefault: $.noop
4695		} );
4696	},
4697
4698	_findActive: function( selector ) {
4699		return typeof selector === "number" ? this.headers.eq( selector ) : $();
4700	},
4701
4702	_setupEvents: function( event ) {
4703		var events = {
4704			keydown: "_keydown"
4705		};
4706		if ( event ) {
4707			$.each( event.split( " " ), function( index, eventName ) {
4708				events[ eventName ] = "_eventHandler";
4709			} );
4710		}
4711
4712		this._off( this.headers.add( this.headers.next() ) );
4713		this._on( this.headers, events );
4714		this._on( this.headers.next(), { keydown: "_panelKeyDown" } );
4715		this._hoverable( this.headers );
4716		this._focusable( this.headers );
4717	},
4718
4719	_eventHandler: function( event ) {
4720		var activeChildren, clickedChildren,
4721			options = this.options,
4722			active = this.active,
4723			clicked = $( event.currentTarget ),
4724			clickedIsActive = clicked[ 0 ] === active[ 0 ],
4725			collapsing = clickedIsActive && options.collapsible,
4726			toShow = collapsing ? $() : clicked.next(),
4727			toHide = active.next(),
4728			eventData = {
4729				oldHeader: active,
4730				oldPanel: toHide,
4731				newHeader: collapsing ? $() : clicked,
4732				newPanel: toShow
4733			};
4734
4735		event.preventDefault();
4736
4737		if (
4738
4739				// click on active header, but not collapsible
4740				( clickedIsActive && !options.collapsible ) ||
4741
4742				// allow canceling activation
4743				( this._trigger( "beforeActivate", event, eventData ) === false ) ) {
4744			return;
4745		}
4746
4747		options.active = collapsing ? false : this.headers.index( clicked );
4748
4749		// When the call to ._toggle() comes after the class changes
4750		// it causes a very odd bug in IE 8 (see #6720)
4751		this.active = clickedIsActive ? $() : clicked;
4752		this._toggle( eventData );
4753
4754		// Switch classes
4755		// corner classes on the previously active header stay after the animation
4756		this._removeClass( active, "ui-accordion-header-active", "ui-state-active" );
4757		if ( options.icons ) {
4758			activeChildren = active.children( ".ui-accordion-header-icon" );
4759			this._removeClass( activeChildren, null, options.icons.activeHeader )
4760				._addClass( activeChildren, null, options.icons.header );
4761		}
4762
4763		if ( !clickedIsActive ) {
4764			this._removeClass( clicked, "ui-accordion-header-collapsed" )
4765				._addClass( clicked, "ui-accordion-header-active", "ui-state-active" );
4766			if ( options.icons ) {
4767				clickedChildren = clicked.children( ".ui-accordion-header-icon" );
4768				this._removeClass( clickedChildren, null, options.icons.header )
4769					._addClass( clickedChildren, null, options.icons.activeHeader );
4770			}
4771
4772			this._addClass( clicked.next(), "ui-accordion-content-active" );
4773		}
4774	},
4775
4776	_toggle: function( data ) {
4777		var toShow = data.newPanel,
4778			toHide = this.prevShow.length ? this.prevShow : data.oldPanel;
4779
4780		// Handle activating a panel during the animation for another activation
4781		this.prevShow.add( this.prevHide ).stop( true, true );
4782		this.prevShow = toShow;
4783		this.prevHide = toHide;
4784
4785		if ( this.options.animate ) {
4786			this._animate( toShow, toHide, data );
4787		} else {
4788			toHide.hide();
4789			toShow.show();
4790			this._toggleComplete( data );
4791		}
4792
4793		toHide.attr( {
4794			"aria-hidden": "true"
4795		} );
4796		toHide.prev().attr( {
4797			"aria-selected": "false",
4798			"aria-expanded": "false"
4799		} );
4800
4801		// if we're switching panels, remove the old header from the tab order
vendor: 7,571 bytes, lines 4802-5072
4802		// if we're opening from collapsed state, remove the previous header from the tab order
4803		// if we're collapsing, then keep the collapsing header in the tab order
4804		if ( toShow.length && toHide.length ) {
4805			toHide.prev().attr( {
4806				"tabIndex": -1,
4807				"aria-expanded": "false"
4808			} );
4809		} else if ( toShow.length ) {
4810			this.headers.filter( function() {
4811				return parseInt( $( this ).attr( "tabIndex" ), 10 ) === 0;
4812			} )
4813				.attr( "tabIndex", -1 );
4814		}
4815
4816		toShow
4817			.attr( "aria-hidden", "false" )
4818			.prev()
4819				.attr( {
4820					"aria-selected": "true",
4821					"aria-expanded": "true",
4822					tabIndex: 0
4823				} );
4824	},
4825
4826	_animate: function( toShow, toHide, data ) {
4827		var total, easing, duration,
4828			that = this,
4829			adjust = 0,
4830			boxSizing = toShow.css( "box-sizing" ),
4831			down = toShow.length &&
4832				( !toHide.length || ( toShow.index() < toHide.index() ) ),
4833			animate = this.options.animate || {},
4834			options = down && animate.down || animate,
4835			complete = function() {
4836				that._toggleComplete( data );
4837			};
4838
4839		if ( typeof options === "number" ) {
4840			duration = options;
4841		}
4842		if ( typeof options === "string" ) {
4843			easing = options;
4844		}
4845
4846		// fall back from options to animation in case of partial down settings
4847		easing = easing || options.easing || animate.easing;
4848		duration = duration || options.duration || animate.duration;
4849
4850		if ( !toHide.length ) {
4851			return toShow.animate( this.showProps, duration, easing, complete );
4852		}
4853		if ( !toShow.length ) {
4854			return toHide.animate( this.hideProps, duration, easing, complete );
4855		}
4856
4857		total = toShow.show().outerHeight();
4858		toHide.animate( this.hideProps, {
4859			duration: duration,
4860			easing: easing,
4861			step: function( now, fx ) {
4862				fx.now = Math.round( now );
4863			}
4864		} );
4865		toShow
4866			.hide()
4867			.animate( this.showProps, {
4868				duration: duration,
4869				easing: easing,
4870				complete: complete,
4871				step: function( now, fx ) {
4872					fx.now = Math.round( now );
4873					if ( fx.prop !== "height" ) {
4874						if ( boxSizing === "content-box" ) {
4875							adjust += fx.now;
4876						}
4877					} else if ( that.options.heightStyle !== "content" ) {
4878						fx.now = Math.round( total - toHide.outerHeight() - adjust );
4879						adjust = 0;
4880					}
4881				}
4882			} );
4883	},
4884
4885	_toggleComplete: function( data ) {
4886		var toHide = data.oldPanel,
4887			prev = toHide.prev();
4888
4889		this._removeClass( toHide, "ui-accordion-content-active" );
4890		this._removeClass( prev, "ui-accordion-header-active" )
4891			._addClass( prev, "ui-accordion-header-collapsed" );
4892
4893		// Work around for rendering bug in IE (#5421)
4894		if ( toHide.length ) {
4895			toHide.parent()[ 0 ].className = toHide.parent()[ 0 ].className;
4896		}
4897		this._trigger( "activate", null, data );
4898	}
4899} );
4900
4901
4902
4903var safeActiveElement = $.ui.safeActiveElement = function( document ) {
4904	var activeElement;
4905
4906	// Support: IE 9 only
4907	// IE9 throws an "Unspecified error" accessing document.activeElement from an <iframe>
4908	try {
4909		activeElement = document.activeElement;
4910	} catch ( error ) {
4911		activeElement = document.body;
4912	}
4913
4914	// Support: IE 9 - 11 only
4915	// IE may return null instead of an element
4916	// Interestingly, this only seems to occur when NOT in an iframe
4917	if ( !activeElement ) {
4918		activeElement = document.body;
4919	}
4920
4921	// Support: IE 11 only
4922	// IE11 returns a seemingly empty object in some cases when accessing
4923	// document.activeElement from an <iframe>
4924	if ( !activeElement.nodeName ) {
4925		activeElement = document.body;
4926	}
4927
4928	return activeElement;
4929};
4930
4931
4932/*!
4933 * jQuery UI Menu 1.12.1
4934 * http://jqueryui.com
4935 *
4936 * Copyright jQuery Foundation and other contributors
4937 * Released under the MIT license.
4938 * http://jquery.org/license
4939 */
4940
4941//>>label: Menu
4942//>>group: Widgets
4943//>>description: Creates nestable menus.
4944//>>docs: http://api.jqueryui.com/menu/
4945//>>demos: http://jqueryui.com/menu/
4946//>>css.structure: ../../themes/base/core.css
4947//>>css.structure: ../../themes/base/menu.css
4948//>>css.theme: ../../themes/base/theme.css
4949
4950
4951
4952var widgetsMenu = $.widget( "ui.menu", {
4953	version: "1.12.1",
4954	defaultElement: "<ul>",
4955	delay: 300,
4956	options: {
4957		icons: {
4958			submenu: "ui-icon-caret-1-e"
4959		},
4960		items: "> *",
4961		menus: "ul",
4962		position: {
4963			my: "left top",
4964			at: "right top"
4965		},
4966		role: "menu",
4967
4968		// Callbacks
4969		blur: null,
4970		focus: null,
4971		select: null
4972	},
4973
4974	_create: function() {
4975		this.activeMenu = this.element;
4976
4977		// Flag used to prevent firing of the click handler
4978		// as the event bubbles up through nested menus
4979		this.mouseHandled = false;
4980		this.element
4981			.uniqueId()
4982			.attr( {
4983				role: this.options.role,
4984				tabIndex: 0
4985			} );
4986
4987		this._addClass( "ui-menu", "ui-widget ui-widget-content" );
4988		this._on( {
4989
4990			// Prevent focus from sticking to links inside menu after clicking
4991			// them (focus should always stay on UL during navigation).
4992			"mousedown .ui-menu-item": function( event ) {
4993				event.preventDefault();
4994			},
4995			"click .ui-menu-item": function( event ) {
4996				var target = $( event.target );
4997				var active = $( $.ui.safeActiveElement( this.document[ 0 ] ) );
4998				if ( !this.mouseHandled && target.not( ".ui-state-disabled" ).length ) {
4999					this.select( event );
5000
5001					// Only set the mouseHandled flag if the event will bubble, see #9469.
5002					if ( !event.isPropagationStopped() ) {
5003						this.mouseHandled = true;
5004					}
5005
5006					// Open submenu on click
5007					if ( target.has( ".ui-menu" ).length ) {
5008						this.expand( event );
5009					} else if ( !this.element.is( ":focus" ) &&
5010							active.closest( ".ui-menu" ).length ) {
5011
5012						// Redirect focus to the menu
5013						this.element.trigger( "focus", [ true ] );
5014
5015						// If the active item is on the top level, let it stay active.
5016						// Otherwise, blur the active item since it is no longer visible.
5017						if ( this.active && this.active.parents( ".ui-menu" ).length === 1 ) {
5018							clearTimeout( this.timer );
5019						}
5020					}
5021				}
5022			},
5023			"mouseenter .ui-menu-item": function( event ) {
5024
5025				// Ignore mouse events while typeahead is active, see #10458.
5026				// Prevents focusing the wrong item when typeahead causes a scroll while the mouse
5027				// is over an item in the menu
5028				if ( this.previousFilter ) {
5029					return;
5030				}
5031
5032				var actualTarget = $( event.target ).closest( ".ui-menu-item" ),
5033					target = $( event.currentTarget );
5034
5035				// Ignore bubbled events on parent items, see #11641
5036				if ( actualTarget[ 0 ] !== target[ 0 ] ) {
5037					return;
5038				}
5039
5040				// Remove ui-state-active class from siblings of the newly focused menu item
5041				// to avoid a jump caused by adjacent elements both having a class with a border
5042				this._removeClass( target.siblings().children( ".ui-state-active" ),
5043					null, "ui-state-active" );
5044				this.focus( event, target );
5045			},
5046			mouseleave: "collapseAll",
5047			"mouseleave .ui-menu": "collapseAll",
5048			focus: function( event, keepActiveItem ) {
5049
5050				// If there's already an active item, keep it active
5051				// If not, activate the first item
5052				var item = this.active || this.element.find( this.options.items ).eq( 0 );
5053
5054				if ( !keepActiveItem ) {
5055					this.focus( event, item );
5056				}
5057			},
5058			blur: function( event ) {
5059				this._delay( function() {
5060					var notContained = !$.contains(
5061						this.element[ 0 ],
5062						$.ui.safeActiveElement( this.document[ 0 ] )
5063					);
5064					if ( notContained ) {
5065						this.collapseAll( event );
5066					}
5067				} );
5068			},
5069			keydown: "_keydown"
5070		} );
5071
5072		this.refresh();
vendor: 4,401 bytes, lines 5073-5236
5073
5074		// Clicks outside of a menu collapse any open menus
5075		this._on( this.document, {
5076			click: function( event ) {
5077				if ( this._closeOnDocumentClick( event ) ) {
5078					this.collapseAll( event );
5079				}
5080
5081				// Reset the mouseHandled flag
5082				this.mouseHandled = false;
5083			}
5084		} );
5085	},
5086
5087	_destroy: function() {
5088		var items = this.element.find( ".ui-menu-item" )
5089				.removeAttr( "role aria-disabled" ),
5090			submenus = items.children( ".ui-menu-item-wrapper" )
5091				.removeUniqueId()
5092				.removeAttr( "tabIndex role aria-haspopup" );
5093
5094		// Destroy (sub)menus
5095		this.element
5096			.removeAttr( "aria-activedescendant" )
5097			.find( ".ui-menu" ).addBack()
5098				.removeAttr( "role aria-labelledby aria-expanded aria-hidden aria-disabled " +
5099					"tabIndex" )
5100				.removeUniqueId()
5101				.show();
5102
5103		submenus.children().each( function() {
5104			var elem = $( this );
5105			if ( elem.data( "ui-menu-submenu-caret" ) ) {
5106				elem.remove();
5107			}
5108		} );
5109	},
5110
5111	_keydown: function( event ) {
5112		var match, prev, character, skip,
5113			preventDefault = true;
5114
5115		switch ( event.keyCode ) {
5116		case $.ui.keyCode.PAGE_UP:
5117			this.previousPage( event );
5118			break;
5119		case $.ui.keyCode.PAGE_DOWN:
5120			this.nextPage( event );
5121			break;
5122		case $.ui.keyCode.HOME:
5123			this._move( "first", "first", event );
5124			break;
5125		case $.ui.keyCode.END:
5126			this._move( "last", "last", event );
5127			break;
5128		case $.ui.keyCode.UP:
5129			this.previous( event );
5130			break;
5131		case $.ui.keyCode.DOWN:
5132			this.next( event );
5133			break;
5134		case $.ui.keyCode.LEFT:
5135			this.collapse( event );
5136			break;
5137		case $.ui.keyCode.RIGHT:
5138			if ( this.active && !this.active.is( ".ui-state-disabled" ) ) {
5139				this.expand( event );
5140			}
5141			break;
5142		case $.ui.keyCode.ENTER:
5143		case $.ui.keyCode.SPACE:
5144			this._activate( event );
5145			break;
5146		case $.ui.keyCode.ESCAPE:
5147			this.collapse( event );
5148			break;
5149		default:
5150			preventDefault = false;
5151			prev = this.previousFilter || "";
5152			skip = false;
5153
5154			// Support number pad values
5155			character = event.keyCode >= 96 && event.keyCode <= 105 ?
5156				( event.keyCode - 96 ).toString() : String.fromCharCode( event.keyCode );
5157
5158			clearTimeout( this.filterTimer );
5159
5160			if ( character === prev ) {
5161				skip = true;
5162			} else {
5163				character = prev + character;
5164			}
5165
5166			match = this._filterMenuItems( character );
5167			match = skip && match.index( this.active.next() ) !== -1 ?
5168				this.active.nextAll( ".ui-menu-item" ) :
5169				match;
5170
5171			// If no matches on the current filter, reset to the last character pressed
5172			// to move down the menu to the first item that starts with that character
5173			if ( !match.length ) {
5174				character = String.fromCharCode( event.keyCode );
5175				match = this._filterMenuItems( character );
5176			}
5177
5178			if ( match.length ) {
5179				this.focus( event, match );
5180				this.previousFilter = character;
5181				this.filterTimer = this._delay( function() {
5182					delete this.previousFilter;
5183				}, 1000 );
5184			} else {
5185				delete this.previousFilter;
5186			}
5187		}
5188
5189		if ( preventDefault ) {
5190			event.preventDefault();
5191		}
5192	},
5193
5194	_activate: function( event ) {
5195		if ( this.active && !this.active.is( ".ui-state-disabled" ) ) {
5196			if ( this.active.children( "[aria-haspopup='true']" ).length ) {
5197				this.expand( event );
5198			} else {
5199				this.select( event );
5200			}
5201		}
5202	},
5203
5204	refresh: function() {
5205		var menus, items, newSubmenus, newItems, newWrappers,
5206			that = this,
5207			icon = this.options.icons.submenu,
5208			submenus = this.element.find( this.options.menus );
5209
5210		this._toggleClass( "ui-menu-icons", null, !!this.element.find( ".ui-icon" ).length );
5211
5212		// Initialize nested menus
5213		newSubmenus = submenus.filter( ":not(.ui-menu)" )
5214			.hide()
5215			.attr( {
5216				role: this.options.role,
5217				"aria-hidden": "true",
5218				"aria-expanded": "false"
5219			} )
5220			.each( function() {
5221				var menu = $( this ),
5222					item = menu.prev(),
5223					submenuCaret = $( "<span>" ).data( "ui-menu-submenu-caret", true );
5224
5225				that._addClass( submenuCaret, "ui-menu-icon", "ui-icon " + icon );
5226				item
5227					.attr( "aria-haspopup", "true" )
5228					.prepend( submenuCaret );
5229				menu.attr( "aria-labelledby", item.attr( "id" ) );
5230			} );
5231
5232		this._addClass( newSubmenus, "ui-menu", "ui-widget ui-widget-content ui-front" );
5233
5234		menus = submenus.add( this.element );
5235		items = menus.find( this.options.items );
5236
vendor: 4,715 bytes, lines 5237-5399
5237		// Initialize menu-items containing spaces and/or dashes only as dividers
5238		items.not( ".ui-menu-item" ).each( function() {
5239			var item = $( this );
5240			if ( that._isDivider( item ) ) {
5241				that._addClass( item, "ui-menu-divider", "ui-widget-content" );
5242			}
5243		} );
5244
5245		// Don't refresh list items that are already adapted
5246		newItems = items.not( ".ui-menu-item, .ui-menu-divider" );
5247		newWrappers = newItems.children()
5248			.not( ".ui-menu" )
5249				.uniqueId()
5250				.attr( {
5251					tabIndex: -1,
5252					role: this._itemRole()
5253				} );
5254		this._addClass( newItems, "ui-menu-item" )
5255			._addClass( newWrappers, "ui-menu-item-wrapper" );
5256
5257		// Add aria-disabled attribute to any disabled menu item
5258		items.filter( ".ui-state-disabled" ).attr( "aria-disabled", "true" );
5259
5260		// If the active item has been removed, blur the menu
5261		if ( this.active && !$.contains( this.element[ 0 ], this.active[ 0 ] ) ) {
5262			this.blur();
5263		}
5264	},
5265
5266	_itemRole: function() {
5267		return {
5268			menu: "menuitem",
5269			listbox: "option"
5270		}[ this.options.role ];
5271	},
5272
5273	_setOption: function( key, value ) {
5274		if ( key === "icons" ) {
5275			var icons = this.element.find( ".ui-menu-icon" );
5276			this._removeClass( icons, null, this.options.icons.submenu )
5277				._addClass( icons, null, value.submenu );
5278		}
5279		this._super( key, value );
5280	},
5281
5282	_setOptionDisabled: function( value ) {
5283		this._super( value );
5284
5285		this.element.attr( "aria-disabled", String( value ) );
5286		this._toggleClass( null, "ui-state-disabled", !!value );
5287	},
5288
5289	focus: function( event, item ) {
5290		var nested, focused, activeParent;
5291		this.blur( event, event && event.type === "focus" );
5292
5293		this._scrollIntoView( item );
5294
5295		this.active = item.first();
5296
5297		focused = this.active.children( ".ui-menu-item-wrapper" );
5298		this._addClass( focused, null, "ui-state-active" );
5299
5300		// Only update aria-activedescendant if there's a role
5301		// otherwise we assume focus is managed elsewhere
5302		if ( this.options.role ) {
5303			this.element.attr( "aria-activedescendant", focused.attr( "id" ) );
5304		}
5305
5306		// Highlight active parent menu item, if any
5307		activeParent = this.active
5308			.parent()
5309				.closest( ".ui-menu-item" )
5310					.children( ".ui-menu-item-wrapper" );
5311		this._addClass( activeParent, null, "ui-state-active" );
5312
5313		if ( event && event.type === "keydown" ) {
5314			this._close();
5315		} else {
5316			this.timer = this._delay( function() {
5317				this._close();
5318			}, this.delay );
5319		}
5320
5321		nested = item.children( ".ui-menu" );
5322		if ( nested.length && event && ( /^mouse/.test( event.type ) ) ) {
5323			this._startOpening( nested );
5324		}
5325		this.activeMenu = item.parent();
5326
5327		this._trigger( "focus", event, { item: item } );
5328	},
5329
5330	_scrollIntoView: function( item ) {
5331		var borderTop, paddingTop, offset, scroll, elementHeight, itemHeight;
5332		if ( this._hasScroll() ) {
5333			borderTop = parseFloat( $.css( this.activeMenu[ 0 ], "borderTopWidth" ) ) || 0;
5334			paddingTop = parseFloat( $.css( this.activeMenu[ 0 ], "paddingTop" ) ) || 0;
5335			offset = item.offset().top - this.activeMenu.offset().top - borderTop - paddingTop;
5336			scroll = this.activeMenu.scrollTop();
5337			elementHeight = this.activeMenu.height();
5338			itemHeight = item.outerHeight();
5339
5340			if ( offset < 0 ) {
5341				this.activeMenu.scrollTop( scroll + offset );
5342			} else if ( offset + itemHeight > elementHeight ) {
5343				this.activeMenu.scrollTop( scroll + offset - elementHeight + itemHeight );
5344			}
5345		}
5346	},
5347
5348	blur: function( event, fromFocus ) {
5349		if ( !fromFocus ) {
5350			clearTimeout( this.timer );
5351		}
5352
5353		if ( !this.active ) {
5354			return;
5355		}
5356
5357		this._removeClass( this.active.children( ".ui-menu-item-wrapper" ),
5358			null, "ui-state-active" );
5359
5360		this._trigger( "blur", event, { item: this.active } );
5361		this.active = null;
5362	},
5363
5364	_startOpening: function( submenu ) {
5365		clearTimeout( this.timer );
5366
5367		// Don't open if already open fixes a Firefox bug that caused a .5 pixel
5368		// shift in the submenu position when mousing over the caret icon
5369		if ( submenu.attr( "aria-hidden" ) !== "true" ) {
5370			return;
5371		}
5372
5373		this.timer = this._delay( function() {
5374			this._close();
5375			this._open( submenu );
5376		}, this.delay );
5377	},
5378
5379	_open: function( submenu ) {
5380		var position = $.extend( {
5381			of: this.active
5382		}, this.options.position );
5383
5384		clearTimeout( this.timer );
5385		this.element.find( ".ui-menu" ).not( submenu.parents( ".ui-menu" ) )
5386			.hide()
5387			.attr( "aria-hidden", "true" );
5388
5389		submenu
5390			.show()
5391			.removeAttr( "aria-hidden" )
5392			.attr( "aria-expanded", "true" )
5393			.position( position );
5394	},
5395
5396	collapseAll: function( event, all ) {
5397		clearTimeout( this.timer );
5398		this.timer = this._delay( function() {
5399
vendor: 36,980 bytes, lines 5400-6719
5400			// If we were passed an event, look for the submenu that contains the event
5401			var currentMenu = all ? this.element :
5402				$( event && event.target ).closest( this.element.find( ".ui-menu" ) );
5403
5404			// If we found no valid submenu ancestor, use the main menu to close all
5405			// sub menus anyway
5406			if ( !currentMenu.length ) {
5407				currentMenu = this.element;
5408			}
5409
5410			this._close( currentMenu );
5411
5412			this.blur( event );
5413
5414			// Work around active item staying active after menu is blurred
5415			this._removeClass( currentMenu.find( ".ui-state-active" ), null, "ui-state-active" );
5416
5417			this.activeMenu = currentMenu;
5418		}, this.delay );
5419	},
5420
5421	// With no arguments, closes the currently active menu - if nothing is active
5422	// it closes all menus.  If passed an argument, it will search for menus BELOW
5423	_close: function( startMenu ) {
5424		if ( !startMenu ) {
5425			startMenu = this.active ? this.active.parent() : this.element;
5426		}
5427
5428		startMenu.find( ".ui-menu" )
5429			.hide()
5430			.attr( "aria-hidden", "true" )
5431			.attr( "aria-expanded", "false" );
5432	},
5433
5434	_closeOnDocumentClick: function( event ) {
5435		return !$( event.target ).closest( ".ui-menu" ).length;
5436	},
5437
5438	_isDivider: function( item ) {
5439
5440		// Match hyphen, em dash, en dash
5441		return !/[^\-\u2014\u2013\s]/.test( item.text() );
5442	},
5443
5444	collapse: function( event ) {
5445		var newItem = this.active &&
5446			this.active.parent().closest( ".ui-menu-item", this.element );
5447		if ( newItem && newItem.length ) {
5448			this._close();
5449			this.focus( event, newItem );
5450		}
5451	},
5452
5453	expand: function( event ) {
5454		var newItem = this.active &&
5455			this.active
5456				.children( ".ui-menu " )
5457					.find( this.options.items )
5458						.first();
5459
5460		if ( newItem && newItem.length ) {
5461			this._open( newItem.parent() );
5462
5463			// Delay so Firefox will not hide activedescendant change in expanding submenu from AT
5464			this._delay( function() {
5465				this.focus( event, newItem );
5466			} );
5467		}
5468	},
5469
5470	next: function( event ) {
5471		this._move( "next", "first", event );
5472	},
5473
5474	previous: function( event ) {
5475		this._move( "prev", "last", event );
5476	},
5477
5478	isFirstItem: function() {
5479		return this.active && !this.active.prevAll( ".ui-menu-item" ).length;
5480	},
5481
5482	isLastItem: function() {
5483		return this.active && !this.active.nextAll( ".ui-menu-item" ).length;
5484	},
5485
5486	_move: function( direction, filter, event ) {
5487		var next;
5488		if ( this.active ) {
5489			if ( direction === "first" || direction === "last" ) {
5490				next = this.active
5491					[ direction === "first" ? "prevAll" : "nextAll" ]( ".ui-menu-item" )
5492					.eq( -1 );
5493			} else {
5494				next = this.active
5495					[ direction + "All" ]( ".ui-menu-item" )
5496					.eq( 0 );
5497			}
5498		}
5499		if ( !next || !next.length || !this.active ) {
5500			next = this.activeMenu.find( this.options.items )[ filter ]();
5501		}
5502
5503		this.focus( event, next );
5504	},
5505
5506	nextPage: function( event ) {
5507		var item, base, height;
5508
5509		if ( !this.active ) {
5510			this.next( event );
5511			return;
5512		}
5513		if ( this.isLastItem() ) {
5514			return;
5515		}
5516		if ( this._hasScroll() ) {
5517			base = this.active.offset().top;
5518			height = this.element.height();
5519			this.active.nextAll( ".ui-menu-item" ).each( function() {
5520				item = $( this );
5521				return item.offset().top - base - height < 0;
5522			} );
5523
5524			this.focus( event, item );
5525		} else {
5526			this.focus( event, this.activeMenu.find( this.options.items )
5527				[ !this.active ? "first" : "last" ]() );
5528		}
5529	},
5530
5531	previousPage: function( event ) {
5532		var item, base, height;
5533		if ( !this.active ) {
5534			this.next( event );
5535			return;
5536		}
5537		if ( this.isFirstItem() ) {
5538			return;
5539		}
5540		if ( this._hasScroll() ) {
5541			base = this.active.offset().top;
5542			height = this.element.height();
5543			this.active.prevAll( ".ui-menu-item" ).each( function() {
5544				item = $( this );
5545				return item.offset().top - base + height > 0;
5546			} );
5547
5548			this.focus( event, item );
5549		} else {
5550			this.focus( event, this.activeMenu.find( this.options.items ).first() );
5551		}
5552	},
5553
5554	_hasScroll: function() {
5555		return this.element.outerHeight() < this.element.prop( "scrollHeight" );
5556	},
5557
5558	select: function( event ) {
5559
5560		// TODO: It should never be possible to not have an active item at this
5561		// point, but the tests don't trigger mouseenter before click.
5562		this.active = this.active || $( event.target ).closest( ".ui-menu-item" );
5563		var ui = { item: this.active };
5564		if ( !this.active.has( ".ui-menu" ).length ) {
5565			this.collapseAll( event, true );
5566		}
5567		this._trigger( "select", event, ui );
5568	},
5569
5570	_filterMenuItems: function( character ) {
5571		var escapedCharacter = character.replace( /[\-\[\]{}()*+?.,\\\^$|#\s]/g, "\\$&" ),
5572			regex = new RegExp( "^" + escapedCharacter, "i" );
5573
5574		return this.activeMenu
5575			.find( this.options.items )
5576
5577				// Only match on items, not dividers or other content (#10571)
5578				.filter( ".ui-menu-item" )
5579					.filter( function() {
5580						return regex.test(
5581							$.trim( $( this ).children( ".ui-menu-item-wrapper" ).text() ) );
5582					} );
5583	}
5584} );
5585
5586
5587/*!
5588 * jQuery UI Autocomplete 1.12.1
5589 * http://jqueryui.com
5590 *
5591 * Copyright jQuery Foundation and other contributors
5592 * Released under the MIT license.
5593 * http://jquery.org/license
5594 */
5595
5596//>>label: Autocomplete
5597//>>group: Widgets
5598//>>description: Lists suggested words as the user is typing.
5599//>>docs: http://api.jqueryui.com/autocomplete/
5600//>>demos: http://jqueryui.com/autocomplete/
5601//>>css.structure: ../../themes/base/core.css
5602//>>css.structure: ../../themes/base/autocomplete.css
5603//>>css.theme: ../../themes/base/theme.css
5604
5605
5606
5607$.widget( "ui.autocomplete", {
5608	version: "1.12.1",
5609	defaultElement: "<input>",
5610	options: {
5611		appendTo: null,
5612		autoFocus: false,
5613		delay: 300,
5614		minLength: 1,
5615		position: {
5616			my: "left top",
5617			at: "left bottom",
5618			collision: "none"
5619		},
5620		source: null,
5621
5622		// Callbacks
5623		change: null,
5624		close: null,
5625		focus: null,
5626		open: null,
5627		response: null,
5628		search: null,
5629		select: null
5630	},
5631
5632	requestIndex: 0,
5633	pending: 0,
5634
5635	_create: function() {
5636
5637		// Some browsers only repeat keydown events, not keypress events,
5638		// so we use the suppressKeyPress flag to determine if we've already
5639		// handled the keydown event. #7269
5640		// Unfortunately the code for & in keypress is the same as the up arrow,
5641		// so we use the suppressKeyPressRepeat flag to avoid handling keypress
5642		// events when we know the keydown event was used to modify the
5643		// search term. #7799
5644		var suppressKeyPress, suppressKeyPressRepeat, suppressInput,
5645			nodeName = this.element[ 0 ].nodeName.toLowerCase(),
5646			isTextarea = nodeName === "textarea",
5647			isInput = nodeName === "input";
5648
5649		// Textareas are always multi-line
5650		// Inputs are always single-line, even if inside a contentEditable element
5651		// IE also treats inputs as contentEditable
5652		// All other element types are determined by whether or not they're contentEditable
5653		this.isMultiLine = isTextarea || !isInput && this._isContentEditable( this.element );
5654
5655		this.valueMethod = this.element[ isTextarea || isInput ? "val" : "text" ];
5656		this.isNewMenu = true;
5657
5658		this._addClass( "ui-autocomplete-input" );
5659		this.element.attr( "autocomplete", "off" );
5660
5661		this._on( this.element, {
5662			keydown: function( event ) {
5663				if ( this.element.prop( "readOnly" ) ) {
5664					suppressKeyPress = true;
5665					suppressInput = true;
5666					suppressKeyPressRepeat = true;
5667					return;
5668				}
5669
5670				suppressKeyPress = false;
5671				suppressInput = false;
5672				suppressKeyPressRepeat = false;
5673				var keyCode = $.ui.keyCode;
5674				switch ( event.keyCode ) {
5675				case keyCode.PAGE_UP:
5676					suppressKeyPress = true;
5677					this._move( "previousPage", event );
5678					break;
5679				case keyCode.PAGE_DOWN:
5680					suppressKeyPress = true;
5681					this._move( "nextPage", event );
5682					break;
5683				case keyCode.UP:
5684					suppressKeyPress = true;
5685					this._keyEvent( "previous", event );
5686					break;
5687				case keyCode.DOWN:
5688					suppressKeyPress = true;
5689					this._keyEvent( "next", event );
5690					break;
5691				case keyCode.ENTER:
5692
5693					// when menu is open and has focus
5694					if ( this.menu.active ) {
5695
5696						// #6055 - Opera still allows the keypress to occur
5697						// which causes forms to submit
5698						suppressKeyPress = true;
5699						event.preventDefault();
5700						this.menu.select( event );
5701					}
5702					break;
5703				case keyCode.TAB:
5704					if ( this.menu.active ) {
5705						this.menu.select( event );
5706					}
5707					break;
5708				case keyCode.ESCAPE:
5709					if ( this.menu.element.is( ":visible" ) ) {
5710						if ( !this.isMultiLine ) {
5711							this._value( this.term );
5712						}
5713						this.close( event );
5714
5715						// Different browsers have different default behavior for escape
5716						// Single press can mean undo or clear
5717						// Double press in IE means clear the whole form
5718						event.preventDefault();
5719					}
5720					break;
5721				default:
5722					suppressKeyPressRepeat = true;
5723
5724					// search timeout should be triggered before the input value is changed
5725					this._searchTimeout( event );
5726					break;
5727				}
5728			},
5729			keypress: function( event ) {
5730				if ( suppressKeyPress ) {
5731					suppressKeyPress = false;
5732					if ( !this.isMultiLine || this.menu.element.is( ":visible" ) ) {
5733						event.preventDefault();
5734					}
5735					return;
5736				}
5737				if ( suppressKeyPressRepeat ) {
5738					return;
5739				}
5740
5741				// Replicate some key handlers to allow them to repeat in Firefox and Opera
5742				var keyCode = $.ui.keyCode;
5743				switch ( event.keyCode ) {
5744				case keyCode.PAGE_UP:
5745					this._move( "previousPage", event );
5746					break;
5747				case keyCode.PAGE_DOWN:
5748					this._move( "nextPage", event );
5749					break;
5750				case keyCode.UP:
5751					this._keyEvent( "previous", event );
5752					break;
5753				case keyCode.DOWN:
5754					this._keyEvent( "next", event );
5755					break;
5756				}
5757			},
5758			input: function( event ) {
5759				if ( suppressInput ) {
5760					suppressInput = false;
5761					event.preventDefault();
5762					return;
5763				}
5764				this._searchTimeout( event );
5765			},
5766			focus: function() {
5767				this.selectedItem = null;
5768				this.previous = this._value();
5769			},
5770			blur: function( event ) {
5771				if ( this.cancelBlur ) {
5772					delete this.cancelBlur;
5773					return;
5774				}
5775
5776				clearTimeout( this.searching );
5777				this.close( event );
5778				this._change( event );
5779			}
5780		} );
5781
5782		this._initSource();
5783		this.menu = $( "<ul>" )
5784			.appendTo( this._appendTo() )
5785			.menu( {
5786
5787				// disable ARIA support, the live region takes care of that
5788				role: null
5789			} )
5790			.hide()
5791			.menu( "instance" );
5792
5793		this._addClass( this.menu.element, "ui-autocomplete", "ui-front" );
5794		this._on( this.menu.element, {
5795			mousedown: function( event ) {
5796
5797				// prevent moving focus out of the text field
5798				event.preventDefault();
5799
5800				// IE doesn't prevent moving focus even with event.preventDefault()
5801				// so we set a flag to know when we should ignore the blur event
5802				this.cancelBlur = true;
5803				this._delay( function() {
5804					delete this.cancelBlur;
5805
5806					// Support: IE 8 only
5807					// Right clicking a menu item or selecting text from the menu items will
5808					// result in focus moving out of the input. However, we've already received
5809					// and ignored the blur event because of the cancelBlur flag set above. So
5810					// we restore focus to ensure that the menu closes properly based on the user's
5811					// next actions.
5812					if ( this.element[ 0 ] !== $.ui.safeActiveElement( this.document[ 0 ] ) ) {
5813						this.element.trigger( "focus" );
5814					}
5815				} );
5816			},
5817			menufocus: function( event, ui ) {
5818				var label, item;
5819
5820				// support: Firefox
5821				// Prevent accidental activation of menu items in Firefox (#7024 #9118)
5822				if ( this.isNewMenu ) {
5823					this.isNewMenu = false;
5824					if ( event.originalEvent && /^mouse/.test( event.originalEvent.type ) ) {
5825						this.menu.blur();
5826
5827						this.document.one( "mousemove", function() {
5828							$( event.target ).trigger( event.originalEvent );
5829						} );
5830
5831						return;
5832					}
5833				}
5834
5835				item = ui.item.data( "ui-autocomplete-item" );
5836				if ( false !== this._trigger( "focus", event, { item: item } ) ) {
5837
5838					// use value to match what will end up in the input, if it was a key event
5839					if ( event.originalEvent && /^key/.test( event.originalEvent.type ) ) {
5840						this._value( item.value );
5841					}
5842				}
5843
5844				// Announce the value in the liveRegion
5845				label = ui.item.attr( "aria-label" ) || item.value;
5846				if ( label && $.trim( label ).length ) {
5847					this.liveRegion.children().hide();
5848					$( "<div>" ).text( label ).appendTo( this.liveRegion );
5849				}
5850			},
5851			menuselect: function( event, ui ) {
5852				var item = ui.item.data( "ui-autocomplete-item" ),
5853					previous = this.previous;
5854
5855				// Only trigger when focus was lost (click on menu)
5856				if ( this.element[ 0 ] !== $.ui.safeActiveElement( this.document[ 0 ] ) ) {
5857					this.element.trigger( "focus" );
5858					this.previous = previous;
5859
5860					// #6109 - IE triggers two focus events and the second
5861					// is asynchronous, so we need to reset the previous
5862					// term synchronously and asynchronously :-(
5863					this._delay( function() {
5864						this.previous = previous;
5865						this.selectedItem = item;
5866					} );
5867				}
5868
5869				if ( false !== this._trigger( "select", event, { item: item } ) ) {
5870					this._value( item.value );
5871				}
5872
5873				// reset the term after the select event
5874				// this allows custom select handling to work properly
5875				this.term = this._value();
5876
5877				this.close( event );
5878				this.selectedItem = item;
5879			}
5880		} );
5881
5882		this.liveRegion = $( "<div>", {
5883			role: "status",
5884			"aria-live": "assertive",
5885			"aria-relevant": "additions"
5886		} )
5887			.appendTo( this.document[ 0 ].body );
5888
5889		this._addClass( this.liveRegion, null, "ui-helper-hidden-accessible" );
5890
5891		// Turning off autocomplete prevents the browser from remembering the
5892		// value when navigating through history, so we re-enable autocomplete
5893		// if the page is unloaded before the widget is destroyed. #7790
5894		this._on( this.window, {
5895			beforeunload: function() {
5896				this.element.removeAttr( "autocomplete" );
5897			}
5898		} );
5899	},
5900
5901	_destroy: function() {
5902		clearTimeout( this.searching );
5903		this.element.removeAttr( "autocomplete" );
5904		this.menu.element.remove();
5905		this.liveRegion.remove();
5906	},
5907
5908	_setOption: function( key, value ) {
5909		this._super( key, value );
5910		if ( key === "source" ) {
5911			this._initSource();
5912		}
5913		if ( key === "appendTo" ) {
5914			this.menu.element.appendTo( this._appendTo() );
5915		}
5916		if ( key === "disabled" && value && this.xhr ) {
5917			this.xhr.abort();
5918		}
5919	},
5920
5921	_isEventTargetInWidget: function( event ) {
5922		var menuElement = this.menu.element[ 0 ];
5923
5924		return event.target === this.element[ 0 ] ||
5925			event.target === menuElement ||
5926			$.contains( menuElement, event.target );
5927	},
5928
5929	_closeOnClickOutside: function( event ) {
5930		if ( !this._isEventTargetInWidget( event ) ) {
5931			this.close();
5932		}
5933	},
5934
5935	_appendTo: function() {
5936		var element = this.options.appendTo;
5937
5938		if ( element ) {
5939			element = element.jquery || element.nodeType ?
5940				$( element ) :
5941				this.document.find( element ).eq( 0 );
5942		}
5943
5944		if ( !element || !element[ 0 ] ) {
5945			element = this.element.closest( ".ui-front, dialog" );
5946		}
5947
5948		if ( !element.length ) {
5949			element = this.document[ 0 ].body;
5950		}
5951
5952		return element;
5953	},
5954
5955	_initSource: function() {
5956		var array, url,
5957			that = this;
5958		if ( $.isArray( this.options.source ) ) {
5959			array = this.options.source;
5960			this.source = function( request, response ) {
5961				response( $.ui.autocomplete.filter( array, request.term ) );
5962			};
5963		} else if ( typeof this.options.source === "string" ) {
5964			url = this.options.source;
5965			this.source = function( request, response ) {
5966				if ( that.xhr ) {
5967					that.xhr.abort();
5968				}
5969				that.xhr = $.ajax( {
5970					url: url,
5971					data: request,
5972					dataType: "json",
5973					success: function( data ) {
5974						response( data );
5975					},
5976					error: function() {
5977						response( [] );
5978					}
5979				} );
5980			};
5981		} else {
5982			this.source = this.options.source;
5983		}
5984	},
5985
5986	_searchTimeout: function( event ) {
5987		clearTimeout( this.searching );
5988		this.searching = this._delay( function() {
5989
5990			// Search if the value has changed, or if the user retypes the same value (see #7434)
5991			var equalValues = this.term === this._value(),
5992				menuVisible = this.menu.element.is( ":visible" ),
5993				modifierKey = event.altKey || event.ctrlKey || event.metaKey || event.shiftKey;
5994
5995			if ( !equalValues || ( equalValues && !menuVisible && !modifierKey ) ) {
5996				this.selectedItem = null;
5997				this.search( null, event );
5998			}
5999		}, this.options.delay );
6000	},
6001
6002	search: function( value, event ) {
6003		value = value != null ? value : this._value();
6004
6005		// Always save the actual value, not the one passed as an argument
6006		this.term = this._value();
6007
6008		if ( value.length < this.options.minLength ) {
6009			return this.close( event );
6010		}
6011
6012		if ( this._trigger( "search", event ) === false ) {
6013			return;
6014		}
6015
6016		return this._search( value );
6017	},
6018
6019	_search: function( value ) {
6020		this.pending++;
6021		this._addClass( "ui-autocomplete-loading" );
6022		this.cancelSearch = false;
6023
6024		this.source( { term: value }, this._response() );
6025	},
6026
6027	_response: function() {
6028		var index = ++this.requestIndex;
6029
6030		return $.proxy( function( content ) {
6031			if ( index === this.requestIndex ) {
6032				this.__response( content );
6033			}
6034
6035			this.pending--;
6036			if ( !this.pending ) {
6037				this._removeClass( "ui-autocomplete-loading" );
6038			}
6039		}, this );
6040	},
6041
6042	__response: function( content ) {
6043		if ( content ) {
6044			content = this._normalize( content );
6045		}
6046		this._trigger( "response", null, { content: content } );
6047		if ( !this.options.disabled && content && content.length && !this.cancelSearch ) {
6048			this._suggest( content );
6049			this._trigger( "open" );
6050		} else {
6051
6052			// use ._close() instead of .close() so we don't cancel future searches
6053			this._close();
6054		}
6055	},
6056
6057	close: function( event ) {
6058		this.cancelSearch = true;
6059		this._close( event );
6060	},
6061
6062	_close: function( event ) {
6063
6064		// Remove the handler that closes the menu on outside clicks
6065		this._off( this.document, "mousedown" );
6066
6067		if ( this.menu.element.is( ":visible" ) ) {
6068			this.menu.element.hide();
6069			this.menu.blur();
6070			this.isNewMenu = true;
6071			this._trigger( "close", event );
6072		}
6073	},
6074
6075	_change: function( event ) {
6076		if ( this.previous !== this._value() ) {
6077			this._trigger( "change", event, { item: this.selectedItem } );
6078		}
6079	},
6080
6081	_normalize: function( items ) {
6082
6083		// assume all items have the right format when the first item is complete
6084		if ( items.length && items[ 0 ].label && items[ 0 ].value ) {
6085			return items;
6086		}
6087		return $.map( items, function( item ) {
6088			if ( typeof item === "string" ) {
6089				return {
6090					label: item,
6091					value: item
6092				};
6093			}
6094			return $.extend( {}, item, {
6095				label: item.label || item.value,
6096				value: item.value || item.label
6097			} );
6098		} );
6099	},
6100
6101	_suggest: function( items ) {
6102		var ul = this.menu.element.empty();
6103		this._renderMenu( ul, items );
6104		this.isNewMenu = true;
6105		this.menu.refresh();
6106
6107		// Size and position menu
6108		ul.show();
6109		this._resizeMenu();
6110		ul.position( $.extend( {
6111			of: this.element
6112		}, this.options.position ) );
6113
6114		if ( this.options.autoFocus ) {
6115			this.menu.next();
6116		}
6117
6118		// Listen for interactions outside of the widget (#6642)
6119		this._on( this.document, {
6120			mousedown: "_closeOnClickOutside"
6121		} );
6122	},
6123
6124	_resizeMenu: function() {
6125		var ul = this.menu.element;
6126		ul.outerWidth( Math.max(
6127
6128			// Firefox wraps long text (possibly a rounding bug)
6129			// so we add 1px to avoid the wrapping (#7513)
6130			ul.width( "" ).outerWidth() + 1,
6131			this.element.outerWidth()
6132		) );
6133	},
6134
6135	_renderMenu: function( ul, items ) {
6136		var that = this;
6137		$.each( items, function( index, item ) {
6138			that._renderItemData( ul, item );
6139		} );
6140	},
6141
6142	_renderItemData: function( ul, item ) {
6143		return this._renderItem( ul, item ).data( "ui-autocomplete-item", item );
6144	},
6145
6146	_renderItem: function( ul, item ) {
6147		return $( "<li>" )
6148			.append( $( "<div>" ).text( item.label ) )
6149			.appendTo( ul );
6150	},
6151
6152	_move: function( direction, event ) {
6153		if ( !this.menu.element.is( ":visible" ) ) {
6154			this.search( null, event );
6155			return;
6156		}
6157		if ( this.menu.isFirstItem() && /^previous/.test( direction ) ||
6158				this.menu.isLastItem() && /^next/.test( direction ) ) {
6159
6160			if ( !this.isMultiLine ) {
6161				this._value( this.term );
6162			}
6163
6164			this.menu.blur();
6165			return;
6166		}
6167		this.menu[ direction ]( event );
6168	},
6169
6170	widget: function() {
6171		return this.menu.element;
6172	},
6173
6174	_value: function() {
6175		return this.valueMethod.apply( this.element, arguments );
6176	},
6177
6178	_keyEvent: function( keyEvent, event ) {
6179		if ( !this.isMultiLine || this.menu.element.is( ":visible" ) ) {
6180			this._move( keyEvent, event );
6181
6182			// Prevents moving cursor to beginning/end of the text field in some browsers
6183			event.preventDefault();
6184		}
6185	},
6186
6187	// Support: Chrome <=50
6188	// We should be able to just use this.element.prop( "isContentEditable" )
6189	// but hidden elements always report false in Chrome.
6190	// https://code.google.com/p/chromium/issues/detail?id=313082
6191	_isContentEditable: function( element ) {
6192		if ( !element.length ) {
6193			return false;
6194		}
6195
6196		var editable = element.prop( "contentEditable" );
6197
6198		if ( editable === "inherit" ) {
6199		  return this._isContentEditable( element.parent() );
6200		}
6201
6202		return editable === "true";
6203	}
6204} );
6205
6206$.extend( $.ui.autocomplete, {
6207	escapeRegex: function( value ) {
6208		return value.replace( /[\-\[\]{}()*+?.,\\\^$|#\s]/g, "\\$&" );
6209	},
6210	filter: function( array, term ) {
6211		var matcher = new RegExp( $.ui.autocomplete.escapeRegex( term ), "i" );
6212		return $.grep( array, function( value ) {
6213			return matcher.test( value.label || value.value || value );
6214		} );
6215	}
6216} );
6217
6218// Live region extension, adding a `messages` option
6219// NOTE: This is an experimental API. We are still investigating
6220// a full solution for string manipulation and internationalization.
6221$.widget( "ui.autocomplete", $.ui.autocomplete, {
6222	options: {
6223		messages: {
6224			noResults: "No search results.",
6225			results: function( amount ) {
6226				return amount + ( amount > 1 ? " results are" : " result is" ) +
6227					" available, use up and down arrow keys to navigate.";
6228			}
6229		}
6230	},
6231
6232	__response: function( content ) {
6233		var message;
6234		this._superApply( arguments );
6235		if ( this.options.disabled || this.cancelSearch ) {
6236			return;
6237		}
6238		if ( content && content.length ) {
6239			message = this.options.messages.results( content.length );
6240		} else {
6241			message = this.options.messages.noResults;
6242		}
6243		this.liveRegion.children().hide();
6244		$( "<div>" ).text( message ).appendTo( this.liveRegion );
6245	}
6246} );
6247
6248var widgetsAutocomplete = $.ui.autocomplete;
6249
6250
6251/*!
6252 * jQuery UI Controlgroup 1.12.1
6253 * http://jqueryui.com
6254 *
6255 * Copyright jQuery Foundation and other contributors
6256 * Released under the MIT license.
6257 * http://jquery.org/license
6258 */
6259
6260//>>label: Controlgroup
6261//>>group: Widgets
6262//>>description: Visually groups form control widgets
6263//>>docs: http://api.jqueryui.com/controlgroup/
6264//>>demos: http://jqueryui.com/controlgroup/
6265//>>css.structure: ../../themes/base/core.css
6266//>>css.structure: ../../themes/base/controlgroup.css
6267//>>css.theme: ../../themes/base/theme.css
6268
6269
6270var controlgroupCornerRegex = /ui-corner-([a-z]){2,6}/g;
6271
6272var widgetsControlgroup = $.widget( "ui.controlgroup", {
6273	version: "1.12.1",
6274	defaultElement: "<div>",
6275	options: {
6276		direction: "horizontal",
6277		disabled: null,
6278		onlyVisible: true,
6279		items: {
6280			"button": "input[type=button], input[type=submit], input[type=reset], button, a",
6281			"controlgroupLabel": ".ui-controlgroup-label",
6282			"checkboxradio": "input[type='checkbox'], input[type='radio']",
6283			"selectmenu": "select",
6284			"spinner": ".ui-spinner-input"
6285		}
6286	},
6287
6288	_create: function() {
6289		this._enhance();
6290	},
6291
6292	// To support the enhanced option in jQuery Mobile, we isolate DOM manipulation
6293	_enhance: function() {
6294		this.element.attr( "role", "toolbar" );
6295		this.refresh();
6296	},
6297
6298	_destroy: function() {
6299		this._callChildMethod( "destroy" );
6300		this.childWidgets.removeData( "ui-controlgroup-data" );
6301		this.element.removeAttr( "role" );
6302		if ( this.options.items.controlgroupLabel ) {
6303			this.element
6304				.find( this.options.items.controlgroupLabel )
6305				.find( ".ui-controlgroup-label-contents" )
6306				.contents().unwrap();
6307		}
6308	},
6309
6310	_initWidgets: function() {
6311		var that = this,
6312			childWidgets = [];
6313
6314		// First we iterate over each of the items options
6315		$.each( this.options.items, function( widget, selector ) {
6316			var labels;
6317			var options = {};
6318
6319			// Make sure the widget has a selector set
6320			if ( !selector ) {
6321				return;
6322			}
6323
6324			if ( widget === "controlgroupLabel" ) {
6325				labels = that.element.find( selector );
6326				labels.each( function() {
6327					var element = $( this );
6328
6329					if ( element.children( ".ui-controlgroup-label-contents" ).length ) {
6330						return;
6331					}
6332					element.contents()
6333						.wrapAll( "<span class='ui-controlgroup-label-contents'></span>" );
6334				} );
6335				that._addClass( labels, null, "ui-widget ui-widget-content ui-state-default" );
6336				childWidgets = childWidgets.concat( labels.get() );
6337				return;
6338			}
6339
6340			// Make sure the widget actually exists
6341			if ( !$.fn[ widget ] ) {
6342				return;
6343			}
6344
6345			// We assume everything is in the middle to start because we can't determine
6346			// first / last elements until all enhancments are done.
6347			if ( that[ "_" + widget + "Options" ] ) {
6348				options = that[ "_" + widget + "Options" ]( "middle" );
6349			} else {
6350				options = { classes: {} };
6351			}
6352
6353			// Find instances of this widget inside controlgroup and init them
6354			that.element
6355				.find( selector )
6356				.each( function() {
6357					var element = $( this );
6358					var instance = element[ widget ]( "instance" );
6359
6360					// We need to clone the default options for this type of widget to avoid
6361					// polluting the variable options which has a wider scope than a single widget.
6362					var instanceOptions = $.widget.extend( {}, options );
6363
6364					// If the button is the child of a spinner ignore it
6365					// TODO: Find a more generic solution
6366					if ( widget === "button" && element.parent( ".ui-spinner" ).length ) {
6367						return;
6368					}
6369
6370					// Create the widget if it doesn't exist
6371					if ( !instance ) {
6372						instance = element[ widget ]()[ widget ]( "instance" );
6373					}
6374					if ( instance ) {
6375						instanceOptions.classes =
6376							that._resolveClassesValues( instanceOptions.classes, instance );
6377					}
6378					element[ widget ]( instanceOptions );
6379
6380					// Store an instance of the controlgroup to be able to reference
6381					// from the outermost element for changing options and refresh
6382					var widgetElement = element[ widget ]( "widget" );
6383					$.data( widgetElement[ 0 ], "ui-controlgroup-data",
6384						instance ? instance : element[ widget ]( "instance" ) );
6385
6386					childWidgets.push( widgetElement[ 0 ] );
6387				} );
6388		} );
6389
6390		this.childWidgets = $( $.unique( childWidgets ) );
6391		this._addClass( this.childWidgets, "ui-controlgroup-item" );
6392	},
6393
6394	_callChildMethod: function( method ) {
6395		this.childWidgets.each( function() {
6396			var element = $( this ),
6397				data = element.data( "ui-controlgroup-data" );
6398			if ( data && data[ method ] ) {
6399				data[ method ]();
6400			}
6401		} );
6402	},
6403
6404	_updateCornerClass: function( element, position ) {
6405		var remove = "ui-corner-top ui-corner-bottom ui-corner-left ui-corner-right ui-corner-all";
6406		var add = this._buildSimpleOptions( position, "label" ).classes.label;
6407
6408		this._removeClass( element, null, remove );
6409		this._addClass( element, null, add );
6410	},
6411
6412	_buildSimpleOptions: function( position, key ) {
6413		var direction = this.options.direction === "vertical";
6414		var result = {
6415			classes: {}
6416		};
6417		result.classes[ key ] = {
6418			"middle": "",
6419			"first": "ui-corner-" + ( direction ? "top" : "left" ),
6420			"last": "ui-corner-" + ( direction ? "bottom" : "right" ),
6421			"only": "ui-corner-all"
6422		}[ position ];
6423
6424		return result;
6425	},
6426
6427	_spinnerOptions: function( position ) {
6428		var options = this._buildSimpleOptions( position, "ui-spinner" );
6429
6430		options.classes[ "ui-spinner-up" ] = "";
6431		options.classes[ "ui-spinner-down" ] = "";
6432
6433		return options;
6434	},
6435
6436	_buttonOptions: function( position ) {
6437		return this._buildSimpleOptions( position, "ui-button" );
6438	},
6439
6440	_checkboxradioOptions: function( position ) {
6441		return this._buildSimpleOptions( position, "ui-checkboxradio-label" );
6442	},
6443
6444	_selectmenuOptions: function( position ) {
6445		var direction = this.options.direction === "vertical";
6446		return {
6447			width: direction ? "auto" : false,
6448			classes: {
6449				middle: {
6450					"ui-selectmenu-button-open": "",
6451					"ui-selectmenu-button-closed": ""
6452				},
6453				first: {
6454					"ui-selectmenu-button-open": "ui-corner-" + ( direction ? "top" : "tl" ),
6455					"ui-selectmenu-button-closed": "ui-corner-" + ( direction ? "top" : "left" )
6456				},
6457				last: {
6458					"ui-selectmenu-button-open": direction ? "" : "ui-corner-tr",
6459					"ui-selectmenu-button-closed": "ui-corner-" + ( direction ? "bottom" : "right" )
6460				},
6461				only: {
6462					"ui-selectmenu-button-open": "ui-corner-top",
6463					"ui-selectmenu-button-closed": "ui-corner-all"
6464				}
6465
6466			}[ position ]
6467		};
6468	},
6469
6470	_resolveClassesValues: function( classes, instance ) {
6471		var result = {};
6472		$.each( classes, function( key ) {
6473			var current = instance.options.classes[ key ] || "";
6474			current = $.trim( current.replace( controlgroupCornerRegex, "" ) );
6475			result[ key ] = ( current + " " + classes[ key ] ).replace( /\s+/g, " " );
6476		} );
6477		return result;
6478	},
6479
6480	_setOption: function( key, value ) {
6481		if ( key === "direction" ) {
6482			this._removeClass( "ui-controlgroup-" + this.options.direction );
6483		}
6484
6485		this._super( key, value );
6486		if ( key === "disabled" ) {
6487			this._callChildMethod( value ? "disable" : "enable" );
6488			return;
6489		}
6490
6491		this.refresh();
6492	},
6493
6494	refresh: function() {
6495		var children,
6496			that = this;
6497
6498		this._addClass( "ui-controlgroup ui-controlgroup-" + this.options.direction );
6499
6500		if ( this.options.direction === "horizontal" ) {
6501			this._addClass( null, "ui-helper-clearfix" );
6502		}
6503		this._initWidgets();
6504
6505		children = this.childWidgets;
6506
6507		// We filter here because we need to track all childWidgets not just the visible ones
6508		if ( this.options.onlyVisible ) {
6509			children = children.filter( ":visible" );
6510		}
6511
6512		if ( children.length ) {
6513
6514			// We do this last because we need to make sure all enhancment is done
6515			// before determining first and last
6516			$.each( [ "first", "last" ], function( index, value ) {
6517				var instance = children[ value ]().data( "ui-controlgroup-data" );
6518
6519				if ( instance && that[ "_" + instance.widgetName + "Options" ] ) {
6520					var options = that[ "_" + instance.widgetName + "Options" ](
6521						children.length === 1 ? "only" : value
6522					);
6523					options.classes = that._resolveClassesValues( options.classes, instance );
6524					instance.element[ instance.widgetName ]( options );
6525				} else {
6526					that._updateCornerClass( children[ value ](), value );
6527				}
6528			} );
6529
6530			// Finally call the refresh method on each of the child widgets.
6531			this._callChildMethod( "refresh" );
6532		}
6533	}
6534} );
6535
6536/*!
6537 * jQuery UI Checkboxradio 1.12.1
6538 * http://jqueryui.com
6539 *
6540 * Copyright jQuery Foundation and other contributors
6541 * Released under the MIT license.
6542 * http://jquery.org/license
6543 */
6544
6545//>>label: Checkboxradio
6546//>>group: Widgets
6547//>>description: Enhances a form with multiple themeable checkboxes or radio buttons.
6548//>>docs: http://api.jqueryui.com/checkboxradio/
6549//>>demos: http://jqueryui.com/checkboxradio/
6550//>>css.structure: ../../themes/base/core.css
6551//>>css.structure: ../../themes/base/button.css
6552//>>css.structure: ../../themes/base/checkboxradio.css
6553//>>css.theme: ../../themes/base/theme.css
6554
6555
6556
6557$.widget( "ui.checkboxradio", [ $.ui.formResetMixin, {
6558	version: "1.12.1",
6559	options: {
6560		disabled: null,
6561		label: null,
6562		icon: true,
6563		classes: {
6564			"ui-checkboxradio-label": "ui-corner-all",
6565			"ui-checkboxradio-icon": "ui-corner-all"
6566		}
6567	},
6568
6569	_getCreateOptions: function() {
6570		var disabled, labels;
6571		var that = this;
6572		var options = this._super() || {};
6573
6574		// We read the type here, because it makes more sense to throw a element type error first,
6575		// rather then the error for lack of a label. Often if its the wrong type, it
6576		// won't have a label (e.g. calling on a div, btn, etc)
6577		this._readType();
6578
6579		labels = this.element.labels();
6580
6581		// If there are multiple labels, use the last one
6582		this.label = $( labels[ labels.length - 1 ] );
6583		if ( !this.label.length ) {
6584			$.error( "No label found for checkboxradio widget" );
6585		}
6586
6587		this.originalLabel = "";
6588
6589		// We need to get the label text but this may also need to make sure it does not contain the
6590		// input itself.
6591		this.label.contents().not( this.element[ 0 ] ).each( function() {
6592
6593			// The label contents could be text, html, or a mix. We concat each element to get a
6594			// string representation of the label, without the input as part of it.
6595			that.originalLabel += this.nodeType === 3 ? $( this ).text() : this.outerHTML;
6596		} );
6597
6598		// Set the label option if we found label text
6599		if ( this.originalLabel ) {
6600			options.label = this.originalLabel;
6601		}
6602
6603		disabled = this.element[ 0 ].disabled;
6604		if ( disabled != null ) {
6605			options.disabled = disabled;
6606		}
6607		return options;
6608	},
6609
6610	_create: function() {
6611		var checked = this.element[ 0 ].checked;
6612
6613		this._bindFormResetHandler();
6614
6615		if ( this.options.disabled == null ) {
6616			this.options.disabled = this.element[ 0 ].disabled;
6617		}
6618
6619		this._setOption( "disabled", this.options.disabled );
6620		this._addClass( "ui-checkboxradio", "ui-helper-hidden-accessible" );
6621		this._addClass( this.label, "ui-checkboxradio-label", "ui-button ui-widget" );
6622
6623		if ( this.type === "radio" ) {
6624			this._addClass( this.label, "ui-checkboxradio-radio-label" );
6625		}
6626
6627		if ( this.options.label && this.options.label !== this.originalLabel ) {
6628			this._updateLabel();
6629		} else if ( this.originalLabel ) {
6630			this.options.label = this.originalLabel;
6631		}
6632
6633		this._enhance();
6634
6635		if ( checked ) {
6636			this._addClass( this.label, "ui-checkboxradio-checked", "ui-state-active" );
6637			if ( this.icon ) {
6638				this._addClass( this.icon, null, "ui-state-hover" );
6639			}
6640		}
6641
6642		this._on( {
6643			change: "_toggleClasses",
6644			focus: function() {
6645				this._addClass( this.label, null, "ui-state-focus ui-visual-focus" );
6646			},
6647			blur: function() {
6648				this._removeClass( this.label, null, "ui-state-focus ui-visual-focus" );
6649			}
6650		} );
6651	},
6652
6653	_readType: function() {
6654		var nodeName = this.element[ 0 ].nodeName.toLowerCase();
6655		this.type = this.element[ 0 ].type;
6656		if ( nodeName !== "input" || !/radio|checkbox/.test( this.type ) ) {
6657			$.error( "Can't create checkboxradio on element.nodeName=" + nodeName +
6658				" and element.type=" + this.type );
6659		}
6660	},
6661
6662	// Support jQuery Mobile enhanced option
6663	_enhance: function() {
6664		this._updateIcon( this.element[ 0 ].checked );
6665	},
6666
6667	widget: function() {
6668		return this.label;
6669	},
6670
6671	_getRadioGroup: function() {
6672		var group;
6673		var name = this.element[ 0 ].name;
6674		var nameSelector = "input[name='" + $.ui.escapeSelector( name ) + "']";
6675
6676		if ( !name ) {
6677			return $( [] );
6678		}
6679
6680		if ( this.form.length ) {
6681			group = $( this.form[ 0 ].elements ).filter( nameSelector );
6682		} else {
6683
6684			// Not inside a form, check all inputs that also are not inside a form
6685			group = $( nameSelector ).filter( function() {
6686				return $( this ).form().length === 0;
6687			} );
6688		}
6689
6690		return group.not( this.element );
6691	},
6692
6693	_toggleClasses: function() {
6694		var checked = this.element[ 0 ].checked;
6695		this._toggleClass( this.label, "ui-checkboxradio-checked", "ui-state-active", checked );
6696
6697		if ( this.options.icon && this.type === "checkbox" ) {
6698			this._toggleClass( this.icon, null, "ui-icon-check ui-state-checked", checked )
6699				._toggleClass( this.icon, null, "ui-icon-blank", !checked );
6700		}
6701
6702		if ( this.type === "radio" ) {
6703			this._getRadioGroup()
6704				.each( function() {
6705					var instance = $( this ).checkboxradio( "instance" );
6706
6707					if ( instance ) {
6708						instance._removeClass( instance.label,
6709							"ui-checkboxradio-checked", "ui-state-active" );
6710					}
6711				} );
6712		}
6713	},
6714
6715	_destroy: function() {
6716		this._unbindFormResetHandler();
6717
6718		if ( this.icon ) {
6719			this.icon.remove();
vendor: 4,659 bytes, lines 6720-6893
6720			this.iconSpace.remove();
6721		}
6722	},
6723
6724	_setOption: function( key, value ) {
6725
6726		// We don't allow the value to be set to nothing
6727		if ( key === "label" && !value ) {
6728			return;
6729		}
6730
6731		this._super( key, value );
6732
6733		if ( key === "disabled" ) {
6734			this._toggleClass( this.label, null, "ui-state-disabled", value );
6735			this.element[ 0 ].disabled = value;
6736
6737			// Don't refresh when setting disabled
6738			return;
6739		}
6740		this.refresh();
6741	},
6742
6743	_updateIcon: function( checked ) {
6744		var toAdd = "ui-icon ui-icon-background ";
6745
6746		if ( this.options.icon ) {
6747			if ( !this.icon ) {
6748				this.icon = $( "<span>" );
6749				this.iconSpace = $( "<span> </span>" );
6750				this._addClass( this.iconSpace, "ui-checkboxradio-icon-space" );
6751			}
6752
6753			if ( this.type === "checkbox" ) {
6754				toAdd += checked ? "ui-icon-check ui-state-checked" : "ui-icon-blank";
6755				this._removeClass( this.icon, null, checked ? "ui-icon-blank" : "ui-icon-check" );
6756			} else {
6757				toAdd += "ui-icon-blank";
6758			}
6759			this._addClass( this.icon, "ui-checkboxradio-icon", toAdd );
6760			if ( !checked ) {
6761				this._removeClass( this.icon, null, "ui-icon-check ui-state-checked" );
6762			}
6763			this.icon.prependTo( this.label ).after( this.iconSpace );
6764		} else if ( this.icon !== undefined ) {
6765			this.icon.remove();
6766			this.iconSpace.remove();
6767			delete this.icon;
6768		}
6769	},
6770
6771	_updateLabel: function() {
6772
6773		// Remove the contents of the label ( minus the icon, icon space, and input )
6774		var contents = this.label.contents().not( this.element[ 0 ] );
6775		if ( this.icon ) {
6776			contents = contents.not( this.icon[ 0 ] );
6777		}
6778		if ( this.iconSpace ) {
6779			contents = contents.not( this.iconSpace[ 0 ] );
6780		}
6781		contents.remove();
6782
6783		this.label.append( this.options.label );
6784	},
6785
6786	refresh: function() {
6787		var checked = this.element[ 0 ].checked,
6788			isDisabled = this.element[ 0 ].disabled;
6789
6790		this._updateIcon( checked );
6791		this._toggleClass( this.label, "ui-checkboxradio-checked", "ui-state-active", checked );
6792		if ( this.options.label !== null ) {
6793			this._updateLabel();
6794		}
6795
6796		if ( isDisabled !== this.options.disabled ) {
6797			this._setOptions( { "disabled": isDisabled } );
6798		}
6799	}
6800
6801} ] );
6802
6803var widgetsCheckboxradio = $.ui.checkboxradio;
6804
6805
6806/*!
6807 * jQuery UI Button 1.12.1
6808 * http://jqueryui.com
6809 *
6810 * Copyright jQuery Foundation and other contributors
6811 * Released under the MIT license.
6812 * http://jquery.org/license
6813 */
6814
6815//>>label: Button
6816//>>group: Widgets
6817//>>description: Enhances a form with themeable buttons.
6818//>>docs: http://api.jqueryui.com/button/
6819//>>demos: http://jqueryui.com/button/
6820//>>css.structure: ../../themes/base/core.css
6821//>>css.structure: ../../themes/base/button.css
6822//>>css.theme: ../../themes/base/theme.css
6823
6824
6825
6826$.widget( "ui.button", {
6827	version: "1.12.1",
6828	defaultElement: "<button>",
6829	options: {
6830		classes: {
6831			"ui-button": "ui-corner-all"
6832		},
6833		disabled: null,
6834		icon: null,
6835		iconPosition: "beginning",
6836		label: null,
6837		showLabel: true
6838	},
6839
6840	_getCreateOptions: function() {
6841		var disabled,
6842
6843			// This is to support cases like in jQuery Mobile where the base widget does have
6844			// an implementation of _getCreateOptions
6845			options = this._super() || {};
6846
6847		this.isInput = this.element.is( "input" );
6848
6849		disabled = this.element[ 0 ].disabled;
6850		if ( disabled != null ) {
6851			options.disabled = disabled;
6852		}
6853
6854		this.originalLabel = this.isInput ? this.element.val() : this.element.html();
6855		if ( this.originalLabel ) {
6856			options.label = this.originalLabel;
6857		}
6858
6859		return options;
6860	},
6861
6862	_create: function() {
6863		if ( !this.option.showLabel & !this.options.icon ) {
6864			this.options.showLabel = true;
6865		}
6866
6867		// We have to check the option again here even though we did in _getCreateOptions,
6868		// because null may have been passed on init which would override what was set in
6869		// _getCreateOptions
6870		if ( this.options.disabled == null ) {
6871			this.options.disabled = this.element[ 0 ].disabled || false;
6872		}
6873
6874		this.hasTitle = !!this.element.attr( "title" );
6875
6876		// Check to see if the label needs to be set or if its already correct
6877		if ( this.options.label && this.options.label !== this.originalLabel ) {
6878			if ( this.isInput ) {
6879				this.element.val( this.options.label );
6880			} else {
6881				this.element.html( this.options.label );
6882			}
6883		}
6884		this._addClass( "ui-button", "ui-widget" );
6885		this._setOption( "disabled", this.options.disabled );
6886		this._enhance();
6887
6888		if ( this.element.is( "a" ) ) {
6889			this._on( {
6890				"keyup": function( event ) {
6891					if ( event.keyCode === $.ui.keyCode.SPACE ) {
6892						event.preventDefault();
6893
vendor: 7,743 bytes, lines 6894-7176
6894						// Support: PhantomJS <= 1.9, IE 8 Only
6895						// If a native click is available use it so we actually cause navigation
6896						// otherwise just trigger a click event
6897						if ( this.element[ 0 ].click ) {
6898							this.element[ 0 ].click();
6899						} else {
6900							this.element.trigger( "click" );
6901						}
6902					}
6903				}
6904			} );
6905		}
6906	},
6907
6908	_enhance: function() {
6909		if ( !this.element.is( "button" ) ) {
6910			this.element.attr( "role", "button" );
6911		}
6912
6913		if ( this.options.icon ) {
6914			this._updateIcon( "icon", this.options.icon );
6915			this._updateTooltip();
6916		}
6917	},
6918
6919	_updateTooltip: function() {
6920		this.title = this.element.attr( "title" );
6921
6922		if ( !this.options.showLabel && !this.title ) {
6923			this.element.attr( "title", this.options.label );
6924		}
6925	},
6926
6927	_updateIcon: function( option, value ) {
6928		var icon = option !== "iconPosition",
6929			position = icon ? this.options.iconPosition : value,
6930			displayBlock = position === "top" || position === "bottom";
6931
6932		// Create icon
6933		if ( !this.icon ) {
6934			this.icon = $( "<span>" );
6935
6936			this._addClass( this.icon, "ui-button-icon", "ui-icon" );
6937
6938			if ( !this.options.showLabel ) {
6939				this._addClass( "ui-button-icon-only" );
6940			}
6941		} else if ( icon ) {
6942
6943			// If we are updating the icon remove the old icon class
6944			this._removeClass( this.icon, null, this.options.icon );
6945		}
6946
6947		// If we are updating the icon add the new icon class
6948		if ( icon ) {
6949			this._addClass( this.icon, null, value );
6950		}
6951
6952		this._attachIcon( position );
6953
6954		// If the icon is on top or bottom we need to add the ui-widget-icon-block class and remove
6955		// the iconSpace if there is one.
6956		if ( displayBlock ) {
6957			this._addClass( this.icon, null, "ui-widget-icon-block" );
6958			if ( this.iconSpace ) {
6959				this.iconSpace.remove();
6960			}
6961		} else {
6962
6963			// Position is beginning or end so remove the ui-widget-icon-block class and add the
6964			// space if it does not exist
6965			if ( !this.iconSpace ) {
6966				this.iconSpace = $( "<span> </span>" );
6967				this._addClass( this.iconSpace, "ui-button-icon-space" );
6968			}
6969			this._removeClass( this.icon, null, "ui-wiget-icon-block" );
6970			this._attachIconSpace( position );
6971		}
6972	},
6973
6974	_destroy: function() {
6975		this.element.removeAttr( "role" );
6976
6977		if ( this.icon ) {
6978			this.icon.remove();
6979		}
6980		if ( this.iconSpace ) {
6981			this.iconSpace.remove();
6982		}
6983		if ( !this.hasTitle ) {
6984			this.element.removeAttr( "title" );
6985		}
6986	},
6987
6988	_attachIconSpace: function( iconPosition ) {
6989		this.icon[ /^(?:end|bottom)/.test( iconPosition ) ? "before" : "after" ]( this.iconSpace );
6990	},
6991
6992	_attachIcon: function( iconPosition ) {
6993		this.element[ /^(?:end|bottom)/.test( iconPosition ) ? "append" : "prepend" ]( this.icon );
6994	},
6995
6996	_setOptions: function( options ) {
6997		var newShowLabel = options.showLabel === undefined ?
6998				this.options.showLabel :
6999				options.showLabel,
7000			newIcon = options.icon === undefined ? this.options.icon : options.icon;
7001
7002		if ( !newShowLabel && !newIcon ) {
7003			options.showLabel = true;
7004		}
7005		this._super( options );
7006	},
7007
7008	_setOption: function( key, value ) {
7009		if ( key === "icon" ) {
7010			if ( value ) {
7011				this._updateIcon( key, value );
7012			} else if ( this.icon ) {
7013				this.icon.remove();
7014				if ( this.iconSpace ) {
7015					this.iconSpace.remove();
7016				}
7017			}
7018		}
7019
7020		if ( key === "iconPosition" ) {
7021			this._updateIcon( key, value );
7022		}
7023
7024		// Make sure we can't end up with a button that has neither text nor icon
7025		if ( key === "showLabel" ) {
7026				this._toggleClass( "ui-button-icon-only", null, !value );
7027				this._updateTooltip();
7028		}
7029
7030		if ( key === "label" ) {
7031			if ( this.isInput ) {
7032				this.element.val( value );
7033			} else {
7034
7035				// If there is an icon, append it, else nothing then append the value
7036				// this avoids removal of the icon when setting label text
7037				this.element.html( value );
7038				if ( this.icon ) {
7039					this._attachIcon( this.options.iconPosition );
7040					this._attachIconSpace( this.options.iconPosition );
7041				}
7042			}
7043		}
7044
7045		this._super( key, value );
7046
7047		if ( key === "disabled" ) {
7048			this._toggleClass( null, "ui-state-disabled", value );
7049			this.element[ 0 ].disabled = value;
7050			if ( value ) {
7051				this.element.blur();
7052			}
7053		}
7054	},
7055
7056	refresh: function() {
7057
7058		// Make sure to only check disabled if its an element that supports this otherwise
7059		// check for the disabled class to determine state
7060		var isDisabled = this.element.is( "input, button" ) ?
7061			this.element[ 0 ].disabled : this.element.hasClass( "ui-button-disabled" );
7062
7063		if ( isDisabled !== this.options.disabled ) {
7064			this._setOptions( { disabled: isDisabled } );
7065		}
7066
7067		this._updateTooltip();
7068	}
7069} );
7070
7071// DEPRECATED
7072if ( $.uiBackCompat !== false ) {
7073
7074	// Text and Icons options
7075	$.widget( "ui.button", $.ui.button, {
7076		options: {
7077			text: true,
7078			icons: {
7079				primary: null,
7080				secondary: null
7081			}
7082		},
7083
7084		_create: function() {
7085			if ( this.options.showLabel && !this.options.text ) {
7086				this.options.showLabel = this.options.text;
7087			}
7088			if ( !this.options.showLabel && this.options.text ) {
7089				this.options.text = this.options.showLabel;
7090			}
7091			if ( !this.options.icon && ( this.options.icons.primary ||
7092					this.options.icons.secondary ) ) {
7093				if ( this.options.icons.primary ) {
7094					this.options.icon = this.options.icons.primary;
7095				} else {
7096					this.options.icon = this.options.icons.secondary;
7097					this.options.iconPosition = "end";
7098				}
7099			} else if ( this.options.icon ) {
7100				this.options.icons.primary = this.options.icon;
7101			}
7102			this._super();
7103		},
7104
7105		_setOption: function( key, value ) {
7106			if ( key === "text" ) {
7107				this._super( "showLabel", value );
7108				return;
7109			}
7110			if ( key === "showLabel" ) {
7111				this.options.text = value;
7112			}
7113			if ( key === "icon" ) {
7114				this.options.icons.primary = value;
7115			}
7116			if ( key === "icons" ) {
7117				if ( value.primary ) {
7118					this._super( "icon", value.primary );
7119					this._super( "iconPosition", "beginning" );
7120				} else if ( value.secondary ) {
7121					this._super( "icon", value.secondary );
7122					this._super( "iconPosition", "end" );
7123				}
7124			}
7125			this._superApply( arguments );
7126		}
7127	} );
7128
7129	$.fn.button = ( function( orig ) {
7130		return function() {
7131			if ( !this.length || ( this.length && this[ 0 ].tagName !== "INPUT" ) ||
7132					( this.length && this[ 0 ].tagName === "INPUT" && (
7133						this.attr( "type" ) !== "checkbox" && this.attr( "type" ) !== "radio"
7134					) ) ) {
7135				return orig.apply( this, arguments );
7136			}
7137			if ( !$.ui.checkboxradio ) {
7138				$.error( "Checkboxradio widget missing" );
7139			}
7140			if ( arguments.length === 0 ) {
7141				return this.checkboxradio( {
7142					"icon": false
7143				} );
7144			}
7145			return this.checkboxradio.apply( this, arguments );
7146		};
7147	} )( $.fn.button );
7148
7149	$.fn.buttonset = function() {
7150		if ( !$.ui.controlgroup ) {
7151			$.error( "Controlgroup widget missing" );
7152		}
7153		if ( arguments[ 0 ] === "option" && arguments[ 1 ] === "items" && arguments[ 2 ] ) {
7154			return this.controlgroup.apply( this,
7155				[ arguments[ 0 ], "items.button", arguments[ 2 ] ] );
7156		}
7157		if ( arguments[ 0 ] === "option" && arguments[ 1 ] === "items" ) {
7158			return this.controlgroup.apply( this, [ arguments[ 0 ], "items.button" ] );
7159		}
7160		if ( typeof arguments[ 0 ] === "object" && arguments[ 0 ].items ) {
7161			arguments[ 0 ].items = {
7162				button: arguments[ 0 ].items
7163			};
7164		}
7165		return this.controlgroup.apply( this, arguments );
7166	};
7167}
7168
7169var widgetsButton = $.ui.button;
7170
7171
7172// jscs:disable maximumLineLength
7173/* jscs:disable requireCamelCaseOrUpperCaseIdentifiers */
7174/*!
7175 * jQuery UI Datepicker 1.12.1
7176 * http://jqueryui.com
vendor: 4,553 bytes, lines 7177-7263
7177 *
7178 * Copyright jQuery Foundation and other contributors
7179 * Released under the MIT license.
7180 * http://jquery.org/license
7181 */
7182
7183//>>label: Datepicker
7184//>>group: Widgets
7185//>>description: Displays a calendar from an input or inline for selecting dates.
7186//>>docs: http://api.jqueryui.com/datepicker/
7187//>>demos: http://jqueryui.com/datepicker/
7188//>>css.structure: ../../themes/base/core.css
7189//>>css.structure: ../../themes/base/datepicker.css
7190//>>css.theme: ../../themes/base/theme.css
7191
7192
7193
7194$.extend( $.ui, { datepicker: { version: "1.12.1" } } );
7195
7196var datepicker_instActive;
7197
7198function datepicker_getZindex( elem ) {
7199	var position, value;
7200	while ( elem.length && elem[ 0 ] !== document ) {
7201
7202		// Ignore z-index if position is set to a value where z-index is ignored by the browser
7203		// This makes behavior of this function consistent across browsers
7204		// WebKit always returns auto if the element is positioned
7205		position = elem.css( "position" );
7206		if ( position === "absolute" || position === "relative" || position === "fixed" ) {
7207
7208			// IE returns 0 when zIndex is not specified
7209			// other browsers return a string
7210			// we ignore the case of nested elements with an explicit value of 0
7211			// <div style="z-index: -10;"><div style="z-index: 0;"></div></div>
7212			value = parseInt( elem.css( "zIndex" ), 10 );
7213			if ( !isNaN( value ) && value !== 0 ) {
7214				return value;
7215			}
7216		}
7217		elem = elem.parent();
7218	}
7219
7220	return 0;
7221}
7222/* Date picker manager.
7223   Use the singleton instance of this class, $.datepicker, to interact with the date picker.
7224   Settings for (groups of) date pickers are maintained in an instance object,
7225   allowing multiple different settings on the same page. */
7226
7227function Datepicker() {
7228	this._curInst = null; // The current instance in use
7229	this._keyEvent = false; // If the last event was a key event
7230	this._disabledInputs = []; // List of date picker inputs that have been disabled
7231	this._datepickerShowing = false; // True if the popup picker is showing , false if not
7232	this._inDialog = false; // True if showing within a "dialog", false if not
7233	this._mainDivId = "ui-datepicker-div"; // The ID of the main datepicker division
7234	this._inlineClass = "ui-datepicker-inline"; // The name of the inline marker class
7235	this._appendClass = "ui-datepicker-append"; // The name of the append marker class
7236	this._triggerClass = "ui-datepicker-trigger"; // The name of the trigger marker class
7237	this._dialogClass = "ui-datepicker-dialog"; // The name of the dialog marker class
7238	this._disableClass = "ui-datepicker-disabled"; // The name of the disabled covering marker class
7239	this._unselectableClass = "ui-datepicker-unselectable"; // The name of the unselectable cell marker class
7240	this._currentClass = "ui-datepicker-current-day"; // The name of the current day marker class
7241	this._dayOverClass = "ui-datepicker-days-cell-over"; // The name of the day hover marker class
7242	this.regional = []; // Available regional settings, indexed by language code
7243	this.regional[ "" ] = { // Default regional settings
7244		closeText: "Done", // Display text for close link
7245		prevText: "Prev", // Display text for previous month link
7246		nextText: "Next", // Display text for next month link
7247		currentText: "Today", // Display text for current month link
7248		monthNames: [ "January","February","March","April","May","June",
7249			"July","August","September","October","November","December" ], // Names of months for drop-down and formatting
7250		monthNamesShort: [ "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" ], // For formatting
7251		dayNames: [ "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday" ], // For formatting
7252		dayNamesShort: [ "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat" ], // For formatting
7253		dayNamesMin: [ "Su","Mo","Tu","We","Th","Fr","Sa" ], // Column headings for days starting at Sunday
7254		weekHeader: "Wk", // Column header for week of the year
7255		dateFormat: "mm/dd/yy", // See format options on parseDate
7256		firstDay: 0, // The first day of the week, Sun = 0, Mon = 1, ...
7257		isRTL: false, // True if right-to-left language, false if left-to-right
7258		showMonthAfterYear: false, // True if the year select precedes month, false for month then year
7259		yearSuffix: "" // Additional text to append to the year in the month headers
7260	};
7261	this._defaults = { // Global defaults for all the date picker instances
7262		showOn: "focus", // "focus" for popup on focus,
7263			// "button" for trigger button, or "both" for either
vendor: 6,761 bytes, lines 7264-7396
7264		showAnim: "fadeIn", // Name of jQuery animation for popup
7265		showOptions: {}, // Options for enhanced animations
7266		defaultDate: null, // Used when field is blank: actual date,
7267			// +/-number for offset from today, null for today
7268		appendText: "", // Display text following the input box, e.g. showing the format
7269		buttonText: "...", // Text for trigger button
7270		buttonImage: "", // URL for trigger button image
7271		buttonImageOnly: false, // True if the image appears alone, false if it appears on a button
7272		hideIfNoPrevNext: false, // True to hide next/previous month links
7273			// if not applicable, false to just disable them
7274		navigationAsDateFormat: false, // True if date formatting applied to prev/today/next links
7275		gotoCurrent: false, // True if today link goes back to current selection instead
7276		changeMonth: false, // True if month can be selected directly, false if only prev/next
7277		changeYear: false, // True if year can be selected directly, false if only prev/next
7278		yearRange: "c-10:c+10", // Range of years to display in drop-down,
7279			// either relative to today's year (-nn:+nn), relative to currently displayed year
7280			// (c-nn:c+nn), absolute (nnnn:nnnn), or a combination of the above (nnnn:-n)
7281		showOtherMonths: false, // True to show dates in other months, false to leave blank
7282		selectOtherMonths: false, // True to allow selection of dates in other months, false for unselectable
7283		showWeek: false, // True to show week of the year, false to not show it
7284		calculateWeek: this.iso8601Week, // How to calculate the week of the year,
7285			// takes a Date and returns the number of the week for it
7286		shortYearCutoff: "+10", // Short year values < this are in the current century,
7287			// > this are in the previous century,
7288			// string value starting with "+" for current year + value
7289		minDate: null, // The earliest selectable date, or null for no limit
7290		maxDate: null, // The latest selectable date, or null for no limit
7291		duration: "fast", // Duration of display/closure
7292		beforeShowDay: null, // Function that takes a date and returns an array with
7293			// [0] = true if selectable, false if not, [1] = custom CSS class name(s) or "",
7294			// [2] = cell title (optional), e.g. $.datepicker.noWeekends
7295		beforeShow: null, // Function that takes an input field and
7296			// returns a set of custom settings for the date picker
7297		onSelect: null, // Define a callback function when a date is selected
7298		onChangeMonthYear: null, // Define a callback function when the month or year is changed
7299		onClose: null, // Define a callback function when the datepicker is closed
7300		numberOfMonths: 1, // Number of months to show at a time
7301		showCurrentAtPos: 0, // The position in multipe months at which to show the current month (starting at 0)
7302		stepMonths: 1, // Number of months to step back/forward
7303		stepBigMonths: 12, // Number of months to step back/forward for the big links
7304		altField: "", // Selector for an alternate field to store selected dates into
7305		altFormat: "", // The date format to use for the alternate field
7306		constrainInput: true, // The input is constrained by the current date format
7307		showButtonPanel: false, // True to show button panel, false to not show it
7308		autoSize: false, // True to size the input for the date format, false to leave as is
7309		disabled: false // The initial disabled state
7310	};
7311	$.extend( this._defaults, this.regional[ "" ] );
7312	this.regional.en = $.extend( true, {}, this.regional[ "" ] );
7313	this.regional[ "en-US" ] = $.extend( true, {}, this.regional.en );
7314	this.dpDiv = datepicker_bindHover( $( "<div id='" + this._mainDivId + "' class='ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>" ) );
7315}
7316
7317$.extend( Datepicker.prototype, {
7318	/* Class name added to elements to indicate already configured with a date picker. */
7319	markerClassName: "hasDatepicker",
7320
7321	//Keep track of the maximum number of rows displayed (see #7043)
7322	maxRows: 4,
7323
7324	// TODO rename to "widget" when switching to widget factory
7325	_widgetDatepicker: function() {
7326		return this.dpDiv;
7327	},
7328
7329	/* Override the default settings for all instances of the date picker.
7330	 * @param  settings  object - the new settings to use as defaults (anonymous object)
7331	 * @return the manager object
7332	 */
7333	setDefaults: function( settings ) {
7334		datepicker_extendRemove( this._defaults, settings || {} );
7335		return this;
7336	},
7337
7338	/* Attach the date picker to a jQuery selection.
7339	 * @param  target	element - the target input field or division or span
7340	 * @param  settings  object - the new settings to use for this date picker instance (anonymous)
7341	 */
7342	_attachDatepicker: function( target, settings ) {
7343		var nodeName, inline, inst;
7344		nodeName = target.nodeName.toLowerCase();
7345		inline = ( nodeName === "div" || nodeName === "span" );
7346		if ( !target.id ) {
7347			this.uuid += 1;
7348			target.id = "dp" + this.uuid;
7349		}
7350		inst = this._newInst( $( target ), inline );
7351		inst.settings = $.extend( {}, settings || {} );
7352		if ( nodeName === "input" ) {
7353			this._connectDatepicker( target, inst );
7354		} else if ( inline ) {
7355			this._inlineDatepicker( target, inst );
7356		}
7357	},
7358
7359	/* Create a new instance object. */
7360	_newInst: function( target, inline ) {
7361		var id = target[ 0 ].id.replace( /([^A-Za-z0-9_\-])/g, "\\\\$1" ); // escape jQuery meta chars
7362		return { id: id, input: target, // associated target
7363			selectedDay: 0, selectedMonth: 0, selectedYear: 0, // current selection
7364			drawMonth: 0, drawYear: 0, // month being drawn
7365			inline: inline, // is datepicker inline or not
7366			dpDiv: ( !inline ? this.dpDiv : // presentation div
7367			datepicker_bindHover( $( "<div class='" + this._inlineClass + " ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>" ) ) ) };
7368	},
7369
7370	/* Attach the date picker to an input field. */
7371	_connectDatepicker: function( target, inst ) {
7372		var input = $( target );
7373		inst.append = $( [] );
7374		inst.trigger = $( [] );
7375		if ( input.hasClass( this.markerClassName ) ) {
7376			return;
7377		}
7378		this._attachments( input, inst );
7379		input.addClass( this.markerClassName ).on( "keydown", this._doKeyDown ).
7380			on( "keypress", this._doKeyPress ).on( "keyup", this._doKeyUp );
7381		this._autoSize( inst );
7382		$.data( target, "datepicker", inst );
7383
7384		//If disabled option is true, disable the datepicker once it has been attached to the input (see ticket #5665)
7385		if ( inst.settings.disabled ) {
7386			this._disableDatepicker( target );
7387		}
7388	},
7389
7390	/* Make attachments based on settings. */
7391	_attachments: function( input, inst ) {
7392		var showOn, buttonText, buttonImage,
7393			appendText = this._get( inst, "appendText" ),
7394			isRTL = this._get( inst, "isRTL" );
7395
7396		if ( inst.append ) {
vendor: 6,192 bytes, lines 7397-7554
7397			inst.append.remove();
7398		}
7399		if ( appendText ) {
7400			inst.append = $( "<span class='" + this._appendClass + "'>" + appendText + "</span>" );
7401			input[ isRTL ? "before" : "after" ]( inst.append );
7402		}
7403
7404		input.off( "focus", this._showDatepicker );
7405
7406		if ( inst.trigger ) {
7407			inst.trigger.remove();
7408		}
7409
7410		showOn = this._get( inst, "showOn" );
7411		if ( showOn === "focus" || showOn === "both" ) { // pop-up date picker when in the marked field
7412			input.on( "focus", this._showDatepicker );
7413		}
7414		if ( showOn === "button" || showOn === "both" ) { // pop-up date picker when button clicked
7415			buttonText = this._get( inst, "buttonText" );
7416			buttonImage = this._get( inst, "buttonImage" );
7417			inst.trigger = $( this._get( inst, "buttonImageOnly" ) ?
7418				$( "<img/>" ).addClass( this._triggerClass ).
7419					attr( { src: buttonImage, alt: buttonText, title: buttonText } ) :
7420				$( "<button type='button'></button>" ).addClass( this._triggerClass ).
7421					html( !buttonImage ? buttonText : $( "<img/>" ).attr(
7422					{ src:buttonImage, alt:buttonText, title:buttonText } ) ) );
7423			input[ isRTL ? "before" : "after" ]( inst.trigger );
7424			inst.trigger.on( "click", function() {
7425				if ( $.datepicker._datepickerShowing && $.datepicker._lastInput === input[ 0 ] ) {
7426					$.datepicker._hideDatepicker();
7427				} else if ( $.datepicker._datepickerShowing && $.datepicker._lastInput !== input[ 0 ] ) {
7428					$.datepicker._hideDatepicker();
7429					$.datepicker._showDatepicker( input[ 0 ] );
7430				} else {
7431					$.datepicker._showDatepicker( input[ 0 ] );
7432				}
7433				return false;
7434			} );
7435		}
7436	},
7437
7438	/* Apply the maximum length for the date format. */
7439	_autoSize: function( inst ) {
7440		if ( this._get( inst, "autoSize" ) && !inst.inline ) {
7441			var findMax, max, maxI, i,
7442				date = new Date( 2009, 12 - 1, 20 ), // Ensure double digits
7443				dateFormat = this._get( inst, "dateFormat" );
7444
7445			if ( dateFormat.match( /[DM]/ ) ) {
7446				findMax = function( names ) {
7447					max = 0;
7448					maxI = 0;
7449					for ( i = 0; i < names.length; i++ ) {
7450						if ( names[ i ].length > max ) {
7451							max = names[ i ].length;
7452							maxI = i;
7453						}
7454					}
7455					return maxI;
7456				};
7457				date.setMonth( findMax( this._get( inst, ( dateFormat.match( /MM/ ) ?
7458					"monthNames" : "monthNamesShort" ) ) ) );
7459				date.setDate( findMax( this._get( inst, ( dateFormat.match( /DD/ ) ?
7460					"dayNames" : "dayNamesShort" ) ) ) + 20 - date.getDay() );
7461			}
7462			inst.input.attr( "size", this._formatDate( inst, date ).length );
7463		}
7464	},
7465
7466	/* Attach an inline date picker to a div. */
7467	_inlineDatepicker: function( target, inst ) {
7468		var divSpan = $( target );
7469		if ( divSpan.hasClass( this.markerClassName ) ) {
7470			return;
7471		}
7472		divSpan.addClass( this.markerClassName ).append( inst.dpDiv );
7473		$.data( target, "datepicker", inst );
7474		this._setDate( inst, this._getDefaultDate( inst ), true );
7475		this._updateDatepicker( inst );
7476		this._updateAlternate( inst );
7477
7478		//If disabled option is true, disable the datepicker before showing it (see ticket #5665)
7479		if ( inst.settings.disabled ) {
7480			this._disableDatepicker( target );
7481		}
7482
7483		// Set display:block in place of inst.dpDiv.show() which won't work on disconnected elements
7484		// http://bugs.jqueryui.com/ticket/7552 - A Datepicker created on a detached div has zero height
7485		inst.dpDiv.css( "display", "block" );
7486	},
7487
7488	/* Pop-up the date picker in a "dialog" box.
7489	 * @param  input element - ignored
7490	 * @param  date	string or Date - the initial date to display
7491	 * @param  onSelect  function - the function to call when a date is selected
7492	 * @param  settings  object - update the dialog date picker instance's settings (anonymous object)
7493	 * @param  pos int[2] - coordinates for the dialog's position within the screen or
7494	 *					event - with x/y coordinates or
7495	 *					leave empty for default (screen centre)
7496	 * @return the manager object
7497	 */
7498	_dialogDatepicker: function( input, date, onSelect, settings, pos ) {
7499		var id, browserWidth, browserHeight, scrollX, scrollY,
7500			inst = this._dialogInst; // internal instance
7501
7502		if ( !inst ) {
7503			this.uuid += 1;
7504			id = "dp" + this.uuid;
7505			this._dialogInput = $( "<input type='text' id='" + id +
7506				"' style='position: absolute; top: -100px; width: 0px;'/>" );
7507			this._dialogInput.on( "keydown", this._doKeyDown );
7508			$( "body" ).append( this._dialogInput );
7509			inst = this._dialogInst = this._newInst( this._dialogInput, false );
7510			inst.settings = {};
7511			$.data( this._dialogInput[ 0 ], "datepicker", inst );
7512		}
7513		datepicker_extendRemove( inst.settings, settings || {} );
7514		date = ( date && date.constructor === Date ? this._formatDate( inst, date ) : date );
7515		this._dialogInput.val( date );
7516
7517		this._pos = ( pos ? ( pos.length ? pos : [ pos.pageX, pos.pageY ] ) : null );
7518		if ( !this._pos ) {
7519			browserWidth = document.documentElement.clientWidth;
7520			browserHeight = document.documentElement.clientHeight;
7521			scrollX = document.documentElement.scrollLeft || document.body.scrollLeft;
7522			scrollY = document.documentElement.scrollTop || document.body.scrollTop;
7523			this._pos = // should use actual width/height below
7524				[ ( browserWidth / 2 ) - 100 + scrollX, ( browserHeight / 2 ) - 150 + scrollY ];
7525		}
7526
7527		// Move input on screen for focus, but hidden behind dialog
7528		this._dialogInput.css( "left", ( this._pos[ 0 ] + 20 ) + "px" ).css( "top", this._pos[ 1 ] + "px" );
7529		inst.settings.onSelect = onSelect;
7530		this._inDialog = true;
7531		this.dpDiv.addClass( this._dialogClass );
7532		this._showDatepicker( this._dialogInput[ 0 ] );
7533		if ( $.blockUI ) {
7534			$.blockUI( this.dpDiv );
7535		}
7536		$.data( this._dialogInput[ 0 ], "datepicker", inst );
7537		return this;
7538	},
7539
7540	/* Detach a datepicker from its control.
7541	 * @param  target	element - the target input field or division or span
7542	 */
7543	_destroyDatepicker: function( target ) {
7544		var nodeName,
7545			$target = $( target ),
7546			inst = $.data( target, "datepicker" );
7547
7548		if ( !$target.hasClass( this.markerClassName ) ) {
7549			return;
7550		}
7551
7552		nodeName = target.nodeName.toLowerCase();
7553		$.removeData( target, "datepicker" );
7554		if ( nodeName === "input" ) {
vendor: 12,111 bytes, lines 7555-7895
7555			inst.append.remove();
7556			inst.trigger.remove();
7557			$target.removeClass( this.markerClassName ).
7558				off( "focus", this._showDatepicker ).
7559				off( "keydown", this._doKeyDown ).
7560				off( "keypress", this._doKeyPress ).
7561				off( "keyup", this._doKeyUp );
7562		} else if ( nodeName === "div" || nodeName === "span" ) {
7563			$target.removeClass( this.markerClassName ).empty();
7564		}
7565
7566		if ( datepicker_instActive === inst ) {
7567			datepicker_instActive = null;
7568		}
7569	},
7570
7571	/* Enable the date picker to a jQuery selection.
7572	 * @param  target	element - the target input field or division or span
7573	 */
7574	_enableDatepicker: function( target ) {
7575		var nodeName, inline,
7576			$target = $( target ),
7577			inst = $.data( target, "datepicker" );
7578
7579		if ( !$target.hasClass( this.markerClassName ) ) {
7580			return;
7581		}
7582
7583		nodeName = target.nodeName.toLowerCase();
7584		if ( nodeName === "input" ) {
7585			target.disabled = false;
7586			inst.trigger.filter( "button" ).
7587				each( function() { this.disabled = false; } ).end().
7588				filter( "img" ).css( { opacity: "1.0", cursor: "" } );
7589		} else if ( nodeName === "div" || nodeName === "span" ) {
7590			inline = $target.children( "." + this._inlineClass );
7591			inline.children().removeClass( "ui-state-disabled" );
7592			inline.find( "select.ui-datepicker-month, select.ui-datepicker-year" ).
7593				prop( "disabled", false );
7594		}
7595		this._disabledInputs = $.map( this._disabledInputs,
7596			function( value ) { return ( value === target ? null : value ); } ); // delete entry
7597	},
7598
7599	/* Disable the date picker to a jQuery selection.
7600	 * @param  target	element - the target input field or division or span
7601	 */
7602	_disableDatepicker: function( target ) {
7603		var nodeName, inline,
7604			$target = $( target ),
7605			inst = $.data( target, "datepicker" );
7606
7607		if ( !$target.hasClass( this.markerClassName ) ) {
7608			return;
7609		}
7610
7611		nodeName = target.nodeName.toLowerCase();
7612		if ( nodeName === "input" ) {
7613			target.disabled = true;
7614			inst.trigger.filter( "button" ).
7615				each( function() { this.disabled = true; } ).end().
7616				filter( "img" ).css( { opacity: "0.5", cursor: "default" } );
7617		} else if ( nodeName === "div" || nodeName === "span" ) {
7618			inline = $target.children( "." + this._inlineClass );
7619			inline.children().addClass( "ui-state-disabled" );
7620			inline.find( "select.ui-datepicker-month, select.ui-datepicker-year" ).
7621				prop( "disabled", true );
7622		}
7623		this._disabledInputs = $.map( this._disabledInputs,
7624			function( value ) { return ( value === target ? null : value ); } ); // delete entry
7625		this._disabledInputs[ this._disabledInputs.length ] = target;
7626	},
7627
7628	/* Is the first field in a jQuery collection disabled as a datepicker?
7629	 * @param  target	element - the target input field or division or span
7630	 * @return boolean - true if disabled, false if enabled
7631	 */
7632	_isDisabledDatepicker: function( target ) {
7633		if ( !target ) {
7634			return false;
7635		}
7636		for ( var i = 0; i < this._disabledInputs.length; i++ ) {
7637			if ( this._disabledInputs[ i ] === target ) {
7638				return true;
7639			}
7640		}
7641		return false;
7642	},
7643
7644	/* Retrieve the instance data for the target control.
7645	 * @param  target  element - the target input field or division or span
7646	 * @return  object - the associated instance data
7647	 * @throws  error if a jQuery problem getting data
7648	 */
7649	_getInst: function( target ) {
7650		try {
7651			return $.data( target, "datepicker" );
7652		}
7653		catch ( err ) {
7654			throw "Missing instance data for this datepicker";
7655		}
7656	},
7657
7658	/* Update or retrieve the settings for a date picker attached to an input field or division.
7659	 * @param  target  element - the target input field or division or span
7660	 * @param  name	object - the new settings to update or
7661	 *				string - the name of the setting to change or retrieve,
7662	 *				when retrieving also "all" for all instance settings or
7663	 *				"defaults" for all global defaults
7664	 * @param  value   any - the new value for the setting
7665	 *				(omit if above is an object or to retrieve a value)
7666	 */
7667	_optionDatepicker: function( target, name, value ) {
7668		var settings, date, minDate, maxDate,
7669			inst = this._getInst( target );
7670
7671		if ( arguments.length === 2 && typeof name === "string" ) {
7672			return ( name === "defaults" ? $.extend( {}, $.datepicker._defaults ) :
7673				( inst ? ( name === "all" ? $.extend( {}, inst.settings ) :
7674				this._get( inst, name ) ) : null ) );
7675		}
7676
7677		settings = name || {};
7678		if ( typeof name === "string" ) {
7679			settings = {};
7680			settings[ name ] = value;
7681		}
7682
7683		if ( inst ) {
7684			if ( this._curInst === inst ) {
7685				this._hideDatepicker();
7686			}
7687
7688			date = this._getDateDatepicker( target, true );
7689			minDate = this._getMinMaxDate( inst, "min" );
7690			maxDate = this._getMinMaxDate( inst, "max" );
7691			datepicker_extendRemove( inst.settings, settings );
7692
7693			// reformat the old minDate/maxDate values if dateFormat changes and a new minDate/maxDate isn't provided
7694			if ( minDate !== null && settings.dateFormat !== undefined && settings.minDate === undefined ) {
7695				inst.settings.minDate = this._formatDate( inst, minDate );
7696			}
7697			if ( maxDate !== null && settings.dateFormat !== undefined && settings.maxDate === undefined ) {
7698				inst.settings.maxDate = this._formatDate( inst, maxDate );
7699			}
7700			if ( "disabled" in settings ) {
7701				if ( settings.disabled ) {
7702					this._disableDatepicker( target );
7703				} else {
7704					this._enableDatepicker( target );
7705				}
7706			}
7707			this._attachments( $( target ), inst );
7708			this._autoSize( inst );
7709			this._setDate( inst, date );
7710			this._updateAlternate( inst );
7711			this._updateDatepicker( inst );
7712		}
7713	},
7714
7715	// Change method deprecated
7716	_changeDatepicker: function( target, name, value ) {
7717		this._optionDatepicker( target, name, value );
7718	},
7719
7720	/* Redraw the date picker attached to an input field or division.
7721	 * @param  target  element - the target input field or division or span
7722	 */
7723	_refreshDatepicker: function( target ) {
7724		var inst = this._getInst( target );
7725		if ( inst ) {
7726			this._updateDatepicker( inst );
7727		}
7728	},
7729
7730	/* Set the dates for a jQuery selection.
7731	 * @param  target element - the target input field or division or span
7732	 * @param  date	Date - the new date
7733	 */
7734	_setDateDatepicker: function( target, date ) {
7735		var inst = this._getInst( target );
7736		if ( inst ) {
7737			this._setDate( inst, date );
7738			this._updateDatepicker( inst );
7739			this._updateAlternate( inst );
7740		}
7741	},
7742
7743	/* Get the date(s) for the first entry in a jQuery selection.
7744	 * @param  target element - the target input field or division or span
7745	 * @param  noDefault boolean - true if no default date is to be used
7746	 * @return Date - the current date
7747	 */
7748	_getDateDatepicker: function( target, noDefault ) {
7749		var inst = this._getInst( target );
7750		if ( inst && !inst.inline ) {
7751			this._setDateFromField( inst, noDefault );
7752		}
7753		return ( inst ? this._getDate( inst ) : null );
7754	},
7755
7756	/* Handle keystrokes. */
7757	_doKeyDown: function( event ) {
7758		var onSelect, dateStr, sel,
7759			inst = $.datepicker._getInst( event.target ),
7760			handled = true,
7761			isRTL = inst.dpDiv.is( ".ui-datepicker-rtl" );
7762
7763		inst._keyEvent = true;
7764		if ( $.datepicker._datepickerShowing ) {
7765			switch ( event.keyCode ) {
7766				case 9: $.datepicker._hideDatepicker();
7767						handled = false;
7768						break; // hide on tab out
7769				case 13: sel = $( "td." + $.datepicker._dayOverClass + ":not(." +
7770									$.datepicker._currentClass + ")", inst.dpDiv );
7771						if ( sel[ 0 ] ) {
7772							$.datepicker._selectDay( event.target, inst.selectedMonth, inst.selectedYear, sel[ 0 ] );
7773						}
7774
7775						onSelect = $.datepicker._get( inst, "onSelect" );
7776						if ( onSelect ) {
7777							dateStr = $.datepicker._formatDate( inst );
7778
7779							// Trigger custom callback
7780							onSelect.apply( ( inst.input ? inst.input[ 0 ] : null ), [ dateStr, inst ] );
7781						} else {
7782							$.datepicker._hideDatepicker();
7783						}
7784
7785						return false; // don't submit the form
7786				case 27: $.datepicker._hideDatepicker();
7787						break; // hide on escape
7788				case 33: $.datepicker._adjustDate( event.target, ( event.ctrlKey ?
7789							-$.datepicker._get( inst, "stepBigMonths" ) :
7790							-$.datepicker._get( inst, "stepMonths" ) ), "M" );
7791						break; // previous month/year on page up/+ ctrl
7792				case 34: $.datepicker._adjustDate( event.target, ( event.ctrlKey ?
7793							+$.datepicker._get( inst, "stepBigMonths" ) :
7794							+$.datepicker._get( inst, "stepMonths" ) ), "M" );
7795						break; // next month/year on page down/+ ctrl
7796				case 35: if ( event.ctrlKey || event.metaKey ) {
7797							$.datepicker._clearDate( event.target );
7798						}
7799						handled = event.ctrlKey || event.metaKey;
7800						break; // clear on ctrl or command +end
7801				case 36: if ( event.ctrlKey || event.metaKey ) {
7802							$.datepicker._gotoToday( event.target );
7803						}
7804						handled = event.ctrlKey || event.metaKey;
7805						break; // current on ctrl or command +home
7806				case 37: if ( event.ctrlKey || event.metaKey ) {
7807							$.datepicker._adjustDate( event.target, ( isRTL ? +1 : -1 ), "D" );
7808						}
7809						handled = event.ctrlKey || event.metaKey;
7810
7811						// -1 day on ctrl or command +left
7812						if ( event.originalEvent.altKey ) {
7813							$.datepicker._adjustDate( event.target, ( event.ctrlKey ?
7814								-$.datepicker._get( inst, "stepBigMonths" ) :
7815								-$.datepicker._get( inst, "stepMonths" ) ), "M" );
7816						}
7817
7818						// next month/year on alt +left on Mac
7819						break;
7820				case 38: if ( event.ctrlKey || event.metaKey ) {
7821							$.datepicker._adjustDate( event.target, -7, "D" );
7822						}
7823						handled = event.ctrlKey || event.metaKey;
7824						break; // -1 week on ctrl or command +up
7825				case 39: if ( event.ctrlKey || event.metaKey ) {
7826							$.datepicker._adjustDate( event.target, ( isRTL ? -1 : +1 ), "D" );
7827						}
7828						handled = event.ctrlKey || event.metaKey;
7829
7830						// +1 day on ctrl or command +right
7831						if ( event.originalEvent.altKey ) {
7832							$.datepicker._adjustDate( event.target, ( event.ctrlKey ?
7833								+$.datepicker._get( inst, "stepBigMonths" ) :
7834								+$.datepicker._get( inst, "stepMonths" ) ), "M" );
7835						}
7836
7837						// next month/year on alt +right
7838						break;
7839				case 40: if ( event.ctrlKey || event.metaKey ) {
7840							$.datepicker._adjustDate( event.target, +7, "D" );
7841						}
7842						handled = event.ctrlKey || event.metaKey;
7843						break; // +1 week on ctrl or command +down
7844				default: handled = false;
7845			}
7846		} else if ( event.keyCode === 36 && event.ctrlKey ) { // display the date picker on ctrl+home
7847			$.datepicker._showDatepicker( this );
7848		} else {
7849			handled = false;
7850		}
7851
7852		if ( handled ) {
7853			event.preventDefault();
7854			event.stopPropagation();
7855		}
7856	},
7857
7858	/* Filter entered characters - based on date format. */
7859	_doKeyPress: function( event ) {
7860		var chars, chr,
7861			inst = $.datepicker._getInst( event.target );
7862
7863		if ( $.datepicker._get( inst, "constrainInput" ) ) {
7864			chars = $.datepicker._possibleChars( $.datepicker._get( inst, "dateFormat" ) );
7865			chr = String.fromCharCode( event.charCode == null ? event.keyCode : event.charCode );
7866			return event.ctrlKey || event.metaKey || ( chr < " " || !chars || chars.indexOf( chr ) > -1 );
7867		}
7868	},
7869
7870	/* Synchronise manual entry and field/alternate field. */
7871	_doKeyUp: function( event ) {
7872		var date,
7873			inst = $.datepicker._getInst( event.target );
7874
7875		if ( inst.input.val() !== inst.lastVal ) {
7876			try {
7877				date = $.datepicker.parseDate( $.datepicker._get( inst, "dateFormat" ),
7878					( inst.input ? inst.input.val() : null ),
7879					$.datepicker._getFormatConfig( inst ) );
7880
7881				if ( date ) { // only if valid
7882					$.datepicker._setDateFromField( inst );
7883					$.datepicker._updateAlternate( inst );
7884					$.datepicker._updateDatepicker( inst );
7885				}
7886			}
7887			catch ( err ) {
7888			}
7889		}
7890		return true;
7891	},
7892
7893	/* Pop-up the date picker for a given input field.
7894	 * If false returned from beforeShow event handler do not show.
7895	 * @param  input  element - the input field attached to the date picker or
vendor: 1,885 bytes, lines 7896-7953
7896	 *					event - if triggered by focus
7897	 */
7898	_showDatepicker: function( input ) {
7899		input = input.target || input;
7900		if ( input.nodeName.toLowerCase() !== "input" ) { // find from button/image trigger
7901			input = $( "input", input.parentNode )[ 0 ];
7902		}
7903
7904		if ( $.datepicker._isDisabledDatepicker( input ) || $.datepicker._lastInput === input ) { // already here
7905			return;
7906		}
7907
7908		var inst, beforeShow, beforeShowSettings, isFixed,
7909			offset, showAnim, duration;
7910
7911		inst = $.datepicker._getInst( input );
7912		if ( $.datepicker._curInst && $.datepicker._curInst !== inst ) {
7913			$.datepicker._curInst.dpDiv.stop( true, true );
7914			if ( inst && $.datepicker._datepickerShowing ) {
7915				$.datepicker._hideDatepicker( $.datepicker._curInst.input[ 0 ] );
7916			}
7917		}
7918
7919		beforeShow = $.datepicker._get( inst, "beforeShow" );
7920		beforeShowSettings = beforeShow ? beforeShow.apply( input, [ input, inst ] ) : {};
7921		if ( beforeShowSettings === false ) {
7922			return;
7923		}
7924		datepicker_extendRemove( inst.settings, beforeShowSettings );
7925
7926		inst.lastVal = null;
7927		$.datepicker._lastInput = input;
7928		$.datepicker._setDateFromField( inst );
7929
7930		if ( $.datepicker._inDialog ) { // hide cursor
7931			input.value = "";
7932		}
7933		if ( !$.datepicker._pos ) { // position below input
7934			$.datepicker._pos = $.datepicker._findPos( input );
7935			$.datepicker._pos[ 1 ] += input.offsetHeight; // add the height
7936		}
7937
7938		isFixed = false;
7939		$( input ).parents().each( function() {
7940			isFixed |= $( this ).css( "position" ) === "fixed";
7941			return !isFixed;
7942		} );
7943
7944		offset = { left: $.datepicker._pos[ 0 ], top: $.datepicker._pos[ 1 ] };
7945		$.datepicker._pos = null;
7946
7947		//to avoid flashes on Firefox
7948		inst.dpDiv.empty();
7949
7950		// determine sizing offscreen
7951		inst.dpDiv.css( { position: "absolute", display: "block", top: "-1000px" } );
7952		$.datepicker._updateDatepicker( inst );
7953
vendor: 12,837 bytes, lines 7954-8306
7954		// fix width for dynamic number of date pickers
7955		// and adjust position before showing
7956		offset = $.datepicker._checkOffset( inst, offset, isFixed );
7957		inst.dpDiv.css( { position: ( $.datepicker._inDialog && $.blockUI ?
7958			"static" : ( isFixed ? "fixed" : "absolute" ) ), display: "none",
7959			left: offset.left + "px", top: offset.top + "px" } );
7960
7961		if ( !inst.inline ) {
7962			showAnim = $.datepicker._get( inst, "showAnim" );
7963			duration = $.datepicker._get( inst, "duration" );
7964			inst.dpDiv.css( "z-index", datepicker_getZindex( $( input ) ) + 1 );
7965			$.datepicker._datepickerShowing = true;
7966
7967			if ( $.effects && $.effects.effect[ showAnim ] ) {
7968				inst.dpDiv.show( showAnim, $.datepicker._get( inst, "showOptions" ), duration );
7969			} else {
7970				inst.dpDiv[ showAnim || "show" ]( showAnim ? duration : null );
7971			}
7972
7973			if ( $.datepicker._shouldFocusInput( inst ) ) {
7974				inst.input.trigger( "focus" );
7975			}
7976
7977			$.datepicker._curInst = inst;
7978		}
7979	},
7980
7981	/* Generate the date picker content. */
7982	_updateDatepicker: function( inst ) {
7983		this.maxRows = 4; //Reset the max number of rows being displayed (see #7043)
7984		datepicker_instActive = inst; // for delegate hover events
7985		inst.dpDiv.empty().append( this._generateHTML( inst ) );
7986		this._attachHandlers( inst );
7987
7988		var origyearshtml,
7989			numMonths = this._getNumberOfMonths( inst ),
7990			cols = numMonths[ 1 ],
7991			width = 17,
7992			activeCell = inst.dpDiv.find( "." + this._dayOverClass + " a" );
7993
7994		if ( activeCell.length > 0 ) {
7995			datepicker_handleMouseover.apply( activeCell.get( 0 ) );
7996		}
7997
7998		inst.dpDiv.removeClass( "ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4" ).width( "" );
7999		if ( cols > 1 ) {
8000			inst.dpDiv.addClass( "ui-datepicker-multi-" + cols ).css( "width", ( width * cols ) + "em" );
8001		}
8002		inst.dpDiv[ ( numMonths[ 0 ] !== 1 || numMonths[ 1 ] !== 1 ? "add" : "remove" ) +
8003			"Class" ]( "ui-datepicker-multi" );
8004		inst.dpDiv[ ( this._get( inst, "isRTL" ) ? "add" : "remove" ) +
8005			"Class" ]( "ui-datepicker-rtl" );
8006
8007		if ( inst === $.datepicker._curInst && $.datepicker._datepickerShowing && $.datepicker._shouldFocusInput( inst ) ) {
8008			inst.input.trigger( "focus" );
8009		}
8010
8011		// Deffered render of the years select (to avoid flashes on Firefox)
8012		if ( inst.yearshtml ) {
8013			origyearshtml = inst.yearshtml;
8014			setTimeout( function() {
8015
8016				//assure that inst.yearshtml didn't change.
8017				if ( origyearshtml === inst.yearshtml && inst.yearshtml ) {
8018					inst.dpDiv.find( "select.ui-datepicker-year:first" ).replaceWith( inst.yearshtml );
8019				}
8020				origyearshtml = inst.yearshtml = null;
8021			}, 0 );
8022		}
8023	},
8024
8025	// #6694 - don't focus the input if it's already focused
8026	// this breaks the change event in IE
8027	// Support: IE and jQuery <1.9
8028	_shouldFocusInput: function( inst ) {
8029		return inst.input && inst.input.is( ":visible" ) && !inst.input.is( ":disabled" ) && !inst.input.is( ":focus" );
8030	},
8031
8032	/* Check positioning to remain on screen. */
8033	_checkOffset: function( inst, offset, isFixed ) {
8034		var dpWidth = inst.dpDiv.outerWidth(),
8035			dpHeight = inst.dpDiv.outerHeight(),
8036			inputWidth = inst.input ? inst.input.outerWidth() : 0,
8037			inputHeight = inst.input ? inst.input.outerHeight() : 0,
8038			viewWidth = document.documentElement.clientWidth + ( isFixed ? 0 : $( document ).scrollLeft() ),
8039			viewHeight = document.documentElement.clientHeight + ( isFixed ? 0 : $( document ).scrollTop() );
8040
8041		offset.left -= ( this._get( inst, "isRTL" ) ? ( dpWidth - inputWidth ) : 0 );
8042		offset.left -= ( isFixed && offset.left === inst.input.offset().left ) ? $( document ).scrollLeft() : 0;
8043		offset.top -= ( isFixed && offset.top === ( inst.input.offset().top + inputHeight ) ) ? $( document ).scrollTop() : 0;
8044
8045		// Now check if datepicker is showing outside window viewport - move to a better place if so.
8046		offset.left -= Math.min( offset.left, ( offset.left + dpWidth > viewWidth && viewWidth > dpWidth ) ?
8047			Math.abs( offset.left + dpWidth - viewWidth ) : 0 );
8048		offset.top -= Math.min( offset.top, ( offset.top + dpHeight > viewHeight && viewHeight > dpHeight ) ?
8049			Math.abs( dpHeight + inputHeight ) : 0 );
8050
8051		return offset;
8052	},
8053
8054	/* Find an object's position on the screen. */
8055	_findPos: function( obj ) {
8056		var position,
8057			inst = this._getInst( obj ),
8058			isRTL = this._get( inst, "isRTL" );
8059
8060		while ( obj && ( obj.type === "hidden" || obj.nodeType !== 1 || $.expr.filters.hidden( obj ) ) ) {
8061			obj = obj[ isRTL ? "previousSibling" : "nextSibling" ];
8062		}
8063
8064		position = $( obj ).offset();
8065		return [ position.left, position.top ];
8066	},
8067
8068	/* Hide the date picker from view.
8069	 * @param  input  element - the input field attached to the date picker
8070	 */
8071	_hideDatepicker: function( input ) {
8072		var showAnim, duration, postProcess, onClose,
8073			inst = this._curInst;
8074
8075		if ( !inst || ( input && inst !== $.data( input, "datepicker" ) ) ) {
8076			return;
8077		}
8078
8079		if ( this._datepickerShowing ) {
8080			showAnim = this._get( inst, "showAnim" );
8081			duration = this._get( inst, "duration" );
8082			postProcess = function() {
8083				$.datepicker._tidyDialog( inst );
8084			};
8085
8086			// DEPRECATED: after BC for 1.8.x $.effects[ showAnim ] is not needed
8087			if ( $.effects && ( $.effects.effect[ showAnim ] || $.effects[ showAnim ] ) ) {
8088				inst.dpDiv.hide( showAnim, $.datepicker._get( inst, "showOptions" ), duration, postProcess );
8089			} else {
8090				inst.dpDiv[ ( showAnim === "slideDown" ? "slideUp" :
8091					( showAnim === "fadeIn" ? "fadeOut" : "hide" ) ) ]( ( showAnim ? duration : null ), postProcess );
8092			}
8093
8094			if ( !showAnim ) {
8095				postProcess();
8096			}
8097			this._datepickerShowing = false;
8098
8099			onClose = this._get( inst, "onClose" );
8100			if ( onClose ) {
8101				onClose.apply( ( inst.input ? inst.input[ 0 ] : null ), [ ( inst.input ? inst.input.val() : "" ), inst ] );
8102			}
8103
8104			this._lastInput = null;
8105			if ( this._inDialog ) {
8106				this._dialogInput.css( { position: "absolute", left: "0", top: "-100px" } );
8107				if ( $.blockUI ) {
8108					$.unblockUI();
8109					$( "body" ).append( this.dpDiv );
8110				}
8111			}
8112			this._inDialog = false;
8113		}
8114	},
8115
8116	/* Tidy up after a dialog display. */
8117	_tidyDialog: function( inst ) {
8118		inst.dpDiv.removeClass( this._dialogClass ).off( ".ui-datepicker-calendar" );
8119	},
8120
8121	/* Close date picker if clicked elsewhere. */
8122	_checkExternalClick: function( event ) {
8123		if ( !$.datepicker._curInst ) {
8124			return;
8125		}
8126
8127		var $target = $( event.target ),
8128			inst = $.datepicker._getInst( $target[ 0 ] );
8129
8130		if ( ( ( $target[ 0 ].id !== $.datepicker._mainDivId &&
8131				$target.parents( "#" + $.datepicker._mainDivId ).length === 0 &&
8132				!$target.hasClass( $.datepicker.markerClassName ) &&
8133				!$target.closest( "." + $.datepicker._triggerClass ).length &&
8134				$.datepicker._datepickerShowing && !( $.datepicker._inDialog && $.blockUI ) ) ) ||
8135			( $target.hasClass( $.datepicker.markerClassName ) && $.datepicker._curInst !== inst ) ) {
8136				$.datepicker._hideDatepicker();
8137		}
8138	},
8139
8140	/* Adjust one of the date sub-fields. */
8141	_adjustDate: function( id, offset, period ) {
8142		var target = $( id ),
8143			inst = this._getInst( target[ 0 ] );
8144
8145		if ( this._isDisabledDatepicker( target[ 0 ] ) ) {
8146			return;
8147		}
8148		this._adjustInstDate( inst, offset +
8149			( period === "M" ? this._get( inst, "showCurrentAtPos" ) : 0 ), // undo positioning
8150			period );
8151		this._updateDatepicker( inst );
8152	},
8153
8154	/* Action for current link. */
8155	_gotoToday: function( id ) {
8156		var date,
8157			target = $( id ),
8158			inst = this._getInst( target[ 0 ] );
8159
8160		if ( this._get( inst, "gotoCurrent" ) && inst.currentDay ) {
8161			inst.selectedDay = inst.currentDay;
8162			inst.drawMonth = inst.selectedMonth = inst.currentMonth;
8163			inst.drawYear = inst.selectedYear = inst.currentYear;
8164		} else {
8165			date = new Date();
8166			inst.selectedDay = date.getDate();
8167			inst.drawMonth = inst.selectedMonth = date.getMonth();
8168			inst.drawYear = inst.selectedYear = date.getFullYear();
8169		}
8170		this._notifyChange( inst );
8171		this._adjustDate( target );
8172	},
8173
8174	/* Action for selecting a new month/year. */
8175	_selectMonthYear: function( id, select, period ) {
8176		var target = $( id ),
8177			inst = this._getInst( target[ 0 ] );
8178
8179		inst[ "selected" + ( period === "M" ? "Month" : "Year" ) ] =
8180		inst[ "draw" + ( period === "M" ? "Month" : "Year" ) ] =
8181			parseInt( select.options[ select.selectedIndex ].value, 10 );
8182
8183		this._notifyChange( inst );
8184		this._adjustDate( target );
8185	},
8186
8187	/* Action for selecting a day. */
8188	_selectDay: function( id, month, year, td ) {
8189		var inst,
8190			target = $( id );
8191
8192		if ( $( td ).hasClass( this._unselectableClass ) || this._isDisabledDatepicker( target[ 0 ] ) ) {
8193			return;
8194		}
8195
8196		inst = this._getInst( target[ 0 ] );
8197		inst.selectedDay = inst.currentDay = $( "a", td ).html();
8198		inst.selectedMonth = inst.currentMonth = month;
8199		inst.selectedYear = inst.currentYear = year;
8200		this._selectDate( id, this._formatDate( inst,
8201			inst.currentDay, inst.currentMonth, inst.currentYear ) );
8202	},
8203
8204	/* Erase the input field and hide the date picker. */
8205	_clearDate: function( id ) {
8206		var target = $( id );
8207		this._selectDate( target, "" );
8208	},
8209
8210	/* Update the input field with the selected date. */
8211	_selectDate: function( id, dateStr ) {
8212		var onSelect,
8213			target = $( id ),
8214			inst = this._getInst( target[ 0 ] );
8215
8216		dateStr = ( dateStr != null ? dateStr : this._formatDate( inst ) );
8217		if ( inst.input ) {
8218			inst.input.val( dateStr );
8219		}
8220		this._updateAlternate( inst );
8221
8222		onSelect = this._get( inst, "onSelect" );
8223		if ( onSelect ) {
8224			onSelect.apply( ( inst.input ? inst.input[ 0 ] : null ), [ dateStr, inst ] );  // trigger custom callback
8225		} else if ( inst.input ) {
8226			inst.input.trigger( "change" ); // fire the change event
8227		}
8228
8229		if ( inst.inline ) {
8230			this._updateDatepicker( inst );
8231		} else {
8232			this._hideDatepicker();
8233			this._lastInput = inst.input[ 0 ];
8234			if ( typeof( inst.input[ 0 ] ) !== "object" ) {
8235				inst.input.trigger( "focus" ); // restore focus
8236			}
8237			this._lastInput = null;
8238		}
8239	},
8240
8241	/* Update any alternate field to synchronise with the main field. */
8242	_updateAlternate: function( inst ) {
8243		var altFormat, date, dateStr,
8244			altField = this._get( inst, "altField" );
8245
8246		if ( altField ) { // update alternate field too
8247			altFormat = this._get( inst, "altFormat" ) || this._get( inst, "dateFormat" );
8248			date = this._getDate( inst );
8249			dateStr = this.formatDate( altFormat, date, this._getFormatConfig( inst ) );
8250			$( altField ).val( dateStr );
8251		}
8252	},
8253
8254	/* Set as beforeShowDay function to prevent selection of weekends.
8255	 * @param  date  Date - the date to customise
8256	 * @return [boolean, string] - is this date selectable?, what is its CSS class?
8257	 */
8258	noWeekends: function( date ) {
8259		var day = date.getDay();
8260		return [ ( day > 0 && day < 6 ), "" ];
8261	},
8262
8263	/* Set as calculateWeek to determine the week of the year based on the ISO 8601 definition.
8264	 * @param  date  Date - the date to get the week for
8265	 * @return  number - the number of the week within the year that contains this date
8266	 */
8267	iso8601Week: function( date ) {
8268		var time,
8269			checkDate = new Date( date.getTime() );
8270
8271		// Find Thursday of this week starting on Monday
8272		checkDate.setDate( checkDate.getDate() + 4 - ( checkDate.getDay() || 7 ) );
8273
8274		time = checkDate.getTime();
8275		checkDate.setMonth( 0 ); // Compare with Jan 1
8276		checkDate.setDate( 1 );
8277		return Math.floor( Math.round( ( time - checkDate ) / 86400000 ) / 7 ) + 1;
8278	},
8279
8280	/* Parse a string value into a date object.
8281	 * See formatDate below for the possible formats.
8282	 *
8283	 * @param  format string - the expected format of the date
8284	 * @param  value string - the date in the above format
8285	 * @param  settings Object - attributes include:
8286	 *					shortYearCutoff  number - the cutoff year for determining the century (optional)
8287	 *					dayNamesShort	string[7] - abbreviated names of the days from Sunday (optional)
8288	 *					dayNames		string[7] - names of the days from Sunday (optional)
8289	 *					monthNamesShort string[12] - abbreviated names of the months (optional)
8290	 *					monthNames		string[12] - names of the months (optional)
8291	 * @return  Date - the extracted date value or null if value is blank
8292	 */
8293	parseDate: function( format, value, settings ) {
8294		if ( format == null || value == null ) {
8295			throw "Invalid arguments";
8296		}
8297
8298		value = ( typeof value === "object" ? value.toString() : value + "" );
8299		if ( value === "" ) {
8300			return null;
8301		}
8302
8303		var iFormat, dim, extra,
8304			iValue = 0,
8305			shortYearCutoffTemp = ( settings ? settings.shortYearCutoff : null ) || this._defaults.shortYearCutoff,
8306			shortYearCutoff = ( typeof shortYearCutoffTemp !== "string" ? shortYearCutoffTemp 
vendor: 15,177 bytes, lines 8306-8782
8306:
8307				new Date().getFullYear() % 100 + parseInt( shortYearCutoffTemp, 10 ) ),
8308			dayNamesShort = ( settings ? settings.dayNamesShort : null ) || this._defaults.dayNamesShort,
8309			dayNames = ( settings ? settings.dayNames : null ) || this._defaults.dayNames,
8310			monthNamesShort = ( settings ? settings.monthNamesShort : null ) || this._defaults.monthNamesShort,
8311			monthNames = ( settings ? settings.monthNames : null ) || this._defaults.monthNames,
8312			year = -1,
8313			month = -1,
8314			day = -1,
8315			doy = -1,
8316			literal = false,
8317			date,
8318
8319			// Check whether a format character is doubled
8320			lookAhead = function( match ) {
8321				var matches = ( iFormat + 1 < format.length && format.charAt( iFormat + 1 ) === match );
8322				if ( matches ) {
8323					iFormat++;
8324				}
8325				return matches;
8326			},
8327
8328			// Extract a number from the string value
8329			getNumber = function( match ) {
8330				var isDoubled = lookAhead( match ),
8331					size = ( match === "@" ? 14 : ( match === "!" ? 20 :
8332					( match === "y" && isDoubled ? 4 : ( match === "o" ? 3 : 2 ) ) ) ),
8333					minSize = ( match === "y" ? size : 1 ),
8334					digits = new RegExp( "^\\d{" + minSize + "," + size + "}" ),
8335					num = value.substring( iValue ).match( digits );
8336				if ( !num ) {
8337					throw "Missing number at position " + iValue;
8338				}
8339				iValue += num[ 0 ].length;
8340				return parseInt( num[ 0 ], 10 );
8341			},
8342
8343			// Extract a name from the string value and convert to an index
8344			getName = function( match, shortNames, longNames ) {
8345				var index = -1,
8346					names = $.map( lookAhead( match ) ? longNames : shortNames, function( v, k ) {
8347						return [ [ k, v ] ];
8348					} ).sort( function( a, b ) {
8349						return -( a[ 1 ].length - b[ 1 ].length );
8350					} );
8351
8352				$.each( names, function( i, pair ) {
8353					var name = pair[ 1 ];
8354					if ( value.substr( iValue, name.length ).toLowerCase() === name.toLowerCase() ) {
8355						index = pair[ 0 ];
8356						iValue += name.length;
8357						return false;
8358					}
8359				} );
8360				if ( index !== -1 ) {
8361					return index + 1;
8362				} else {
8363					throw "Unknown name at position " + iValue;
8364				}
8365			},
8366
8367			// Confirm that a literal character matches the string value
8368			checkLiteral = function() {
8369				if ( value.charAt( iValue ) !== format.charAt( iFormat ) ) {
8370					throw "Unexpected literal at position " + iValue;
8371				}
8372				iValue++;
8373			};
8374
8375		for ( iFormat = 0; iFormat < format.length; iFormat++ ) {
8376			if ( literal ) {
8377				if ( format.charAt( iFormat ) === "'" && !lookAhead( "'" ) ) {
8378					literal = false;
8379				} else {
8380					checkLiteral();
8381				}
8382			} else {
8383				switch ( format.charAt( iFormat ) ) {
8384					case "d":
8385						day = getNumber( "d" );
8386						break;
8387					case "D":
8388						getName( "D", dayNamesShort, dayNames );
8389						break;
8390					case "o":
8391						doy = getNumber( "o" );
8392						break;
8393					case "m":
8394						month = getNumber( "m" );
8395						break;
8396					case "M":
8397						month = getName( "M", monthNamesShort, monthNames );
8398						break;
8399					case "y":
8400						year = getNumber( "y" );
8401						break;
8402					case "@":
8403						date = new Date( getNumber( "@" ) );
8404						year = date.getFullYear();
8405						month = date.getMonth() + 1;
8406						day = date.getDate();
8407						break;
8408					case "!":
8409						date = new Date( ( getNumber( "!" ) - this._ticksTo1970 ) / 10000 );
8410						year = date.getFullYear();
8411						month = date.getMonth() + 1;
8412						day = date.getDate();
8413						break;
8414					case "'":
8415						if ( lookAhead( "'" ) ) {
8416							checkLiteral();
8417						} else {
8418							literal = true;
8419						}
8420						break;
8421					default:
8422						checkLiteral();
8423				}
8424			}
8425		}
8426
8427		if ( iValue < value.length ) {
8428			extra = value.substr( iValue );
8429			if ( !/^\s+/.test( extra ) ) {
8430				throw "Extra/unparsed characters found in date: " + extra;
8431			}
8432		}
8433
8434		if ( year === -1 ) {
8435			year = new Date().getFullYear();
8436		} else if ( year < 100 ) {
8437			year += new Date().getFullYear() - new Date().getFullYear() % 100 +
8438				( year <= shortYearCutoff ? 0 : -100 );
8439		}
8440
8441		if ( doy > -1 ) {
8442			month = 1;
8443			day = doy;
8444			do {
8445				dim = this._getDaysInMonth( year, month - 1 );
8446				if ( day <= dim ) {
8447					break;
8448				}
8449				month++;
8450				day -= dim;
8451			} while ( true );
8452		}
8453
8454		date = this._daylightSavingAdjust( new Date( year, month - 1, day ) );
8455		if ( date.getFullYear() !== year || date.getMonth() + 1 !== month || date.getDate() !== day ) {
8456			throw "Invalid date"; // E.g. 31/02/00
8457		}
8458		return date;
8459	},
8460
8461	/* Standard date formats. */
8462	ATOM: "yy-mm-dd", // RFC 3339 (ISO 8601)
8463	COOKIE: "D, dd M yy",
8464	ISO_8601: "yy-mm-dd",
8465	RFC_822: "D, d M y",
8466	RFC_850: "DD, dd-M-y",
8467	RFC_1036: "D, d M y",
8468	RFC_1123: "D, d M yy",
8469	RFC_2822: "D, d M yy",
8470	RSS: "D, d M y", // RFC 822
8471	TICKS: "!",
8472	TIMESTAMP: "@",
8473	W3C: "yy-mm-dd", // ISO 8601
8474
8475	_ticksTo1970: ( ( ( 1970 - 1 ) * 365 + Math.floor( 1970 / 4 ) - Math.floor( 1970 / 100 ) +
8476		Math.floor( 1970 / 400 ) ) * 24 * 60 * 60 * 10000000 ),
8477
8478	/* Format a date object into a string value.
8479	 * The format can be combinations of the following:
8480	 * d  - day of month (no leading zero)
8481	 * dd - day of month (two digit)
8482	 * o  - day of year (no leading zeros)
8483	 * oo - day of year (three digit)
8484	 * D  - day name short
8485	 * DD - day name long
8486	 * m  - month of year (no leading zero)
8487	 * mm - month of year (two digit)
8488	 * M  - month name short
8489	 * MM - month name long
8490	 * y  - year (two digit)
8491	 * yy - year (four digit)
8492	 * @ - Unix timestamp (ms since 01/01/1970)
8493	 * ! - Windows ticks (100ns since 01/01/0001)
8494	 * "..." - literal text
8495	 * '' - single quote
8496	 *
8497	 * @param  format string - the desired format of the date
8498	 * @param  date Date - the date value to format
8499	 * @param  settings Object - attributes include:
8500	 *					dayNamesShort	string[7] - abbreviated names of the days from Sunday (optional)
8501	 *					dayNames		string[7] - names of the days from Sunday (optional)
8502	 *					monthNamesShort string[12] - abbreviated names of the months (optional)
8503	 *					monthNames		string[12] - names of the months (optional)
8504	 * @return  string - the date in the above format
8505	 */
8506	formatDate: function( format, date, settings ) {
8507		if ( !date ) {
8508			return "";
8509		}
8510
8511		var iFormat,
8512			dayNamesShort = ( settings ? settings.dayNamesShort : null ) || this._defaults.dayNamesShort,
8513			dayNames = ( settings ? settings.dayNames : null ) || this._defaults.dayNames,
8514			monthNamesShort = ( settings ? settings.monthNamesShort : null ) || this._defaults.monthNamesShort,
8515			monthNames = ( settings ? settings.monthNames : null ) || this._defaults.monthNames,
8516
8517			// Check whether a format character is doubled
8518			lookAhead = function( match ) {
8519				var matches = ( iFormat + 1 < format.length && format.charAt( iFormat + 1 ) === match );
8520				if ( matches ) {
8521					iFormat++;
8522				}
8523				return matches;
8524			},
8525
8526			// Format a number, with leading zero if necessary
8527			formatNumber = function( match, value, len ) {
8528				var num = "" + value;
8529				if ( lookAhead( match ) ) {
8530					while ( num.length < len ) {
8531						num = "0" + num;
8532					}
8533				}
8534				return num;
8535			},
8536
8537			// Format a name, short or long as requested
8538			formatName = function( match, value, shortNames, longNames ) {
8539				return ( lookAhead( match ) ? longNames[ value ] : shortNames[ value ] );
8540			},
8541			output = "",
8542			literal = false;
8543
8544		if ( date ) {
8545			for ( iFormat = 0; iFormat < format.length; iFormat++ ) {
8546				if ( literal ) {
8547					if ( format.charAt( iFormat ) === "'" && !lookAhead( "'" ) ) {
8548						literal = false;
8549					} else {
8550						output += format.charAt( iFormat );
8551					}
8552				} else {
8553					switch ( format.charAt( iFormat ) ) {
8554						case "d":
8555							output += formatNumber( "d", date.getDate(), 2 );
8556							break;
8557						case "D":
8558							output += formatName( "D", date.getDay(), dayNamesShort, dayNames );
8559							break;
8560						case "o":
8561							output += formatNumber( "o",
8562								Math.round( ( new Date( date.getFullYear(), date.getMonth(), date.getDate() ).getTime() - new Date( date.getFullYear(), 0, 0 ).getTime() ) / 86400000 ), 3 );
8563							break;
8564						case "m":
8565							output += formatNumber( "m", date.getMonth() + 1, 2 );
8566							break;
8567						case "M":
8568							output += formatName( "M", date.getMonth(), monthNamesShort, monthNames );
8569							break;
8570						case "y":
8571							output += ( lookAhead( "y" ) ? date.getFullYear() :
8572								( date.getFullYear() % 100 < 10 ? "0" : "" ) + date.getFullYear() % 100 );
8573							break;
8574						case "@":
8575							output += date.getTime();
8576							break;
8577						case "!":
8578							output += date.getTime() * 10000 + this._ticksTo1970;
8579							break;
8580						case "'":
8581							if ( lookAhead( "'" ) ) {
8582								output += "'";
8583							} else {
8584								literal = true;
8585							}
8586							break;
8587						default:
8588							output += format.charAt( iFormat );
8589					}
8590				}
8591			}
8592		}
8593		return output;
8594	},
8595
8596	/* Extract all possible characters from the date format. */
8597	_possibleChars: function( format ) {
8598		var iFormat,
8599			chars = "",
8600			literal = false,
8601
8602			// Check whether a format character is doubled
8603			lookAhead = function( match ) {
8604				var matches = ( iFormat + 1 < format.length && format.charAt( iFormat + 1 ) === match );
8605				if ( matches ) {
8606					iFormat++;
8607				}
8608				return matches;
8609			};
8610
8611		for ( iFormat = 0; iFormat < format.length; iFormat++ ) {
8612			if ( literal ) {
8613				if ( format.charAt( iFormat ) === "'" && !lookAhead( "'" ) ) {
8614					literal = false;
8615				} else {
8616					chars += format.charAt( iFormat );
8617				}
8618			} else {
8619				switch ( format.charAt( iFormat ) ) {
8620					case "d": case "m": case "y": case "@":
8621						chars += "0123456789";
8622						break;
8623					case "D": case "M":
8624						return null; // Accept anything
8625					case "'":
8626						if ( lookAhead( "'" ) ) {
8627							chars += "'";
8628						} else {
8629							literal = true;
8630						}
8631						break;
8632					default:
8633						chars += format.charAt( iFormat );
8634				}
8635			}
8636		}
8637		return chars;
8638	},
8639
8640	/* Get a setting value, defaulting if necessary. */
8641	_get: function( inst, name ) {
8642		return inst.settings[ name ] !== undefined ?
8643			inst.settings[ name ] : this._defaults[ name ];
8644	},
8645
8646	/* Parse existing date and initialise date picker. */
8647	_setDateFromField: function( inst, noDefault ) {
8648		if ( inst.input.val() === inst.lastVal ) {
8649			return;
8650		}
8651
8652		var dateFormat = this._get( inst, "dateFormat" ),
8653			dates = inst.lastVal = inst.input ? inst.input.val() : null,
8654			defaultDate = this._getDefaultDate( inst ),
8655			date = defaultDate,
8656			settings = this._getFormatConfig( inst );
8657
8658		try {
8659			date = this.parseDate( dateFormat, dates, settings ) || defaultDate;
8660		} catch ( event ) {
8661			dates = ( noDefault ? "" : dates );
8662		}
8663		inst.selectedDay = date.getDate();
8664		inst.drawMonth = inst.selectedMonth = date.getMonth();
8665		inst.drawYear = inst.selectedYear = date.getFullYear();
8666		inst.currentDay = ( dates ? date.getDate() : 0 );
8667		inst.currentMonth = ( dates ? date.getMonth() : 0 );
8668		inst.currentYear = ( dates ? date.getFullYear() : 0 );
8669		this._adjustInstDate( inst );
8670	},
8671
8672	/* Retrieve the default date shown on opening. */
8673	_getDefaultDate: function( inst ) {
8674		return this._restrictMinMax( inst,
8675			this._determineDate( inst, this._get( inst, "defaultDate" ), new Date() ) );
8676	},
8677
8678	/* A date may be specified as an exact value or a relative one. */
8679	_determineDate: function( inst, date, defaultDate ) {
8680		var offsetNumeric = function( offset ) {
8681				var date = new Date();
8682				date.setDate( date.getDate() + offset );
8683				return date;
8684			},
8685			offsetString = function( offset ) {
8686				try {
8687					return $.datepicker.parseDate( $.datepicker._get( inst, "dateFormat" ),
8688						offset, $.datepicker._getFormatConfig( inst ) );
8689				}
8690				catch ( e ) {
8691
8692					// Ignore
8693				}
8694
8695				var date = ( offset.toLowerCase().match( /^c/ ) ?
8696					$.datepicker._getDate( inst ) : null ) || new Date(),
8697					year = date.getFullYear(),
8698					month = date.getMonth(),
8699					day = date.getDate(),
8700					pattern = /([+\-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g,
8701					matches = pattern.exec( offset );
8702
8703				while ( matches ) {
8704					switch ( matches[ 2 ] || "d" ) {
8705						case "d" : case "D" :
8706							day += parseInt( matches[ 1 ], 10 ); break;
8707						case "w" : case "W" :
8708							day += parseInt( matches[ 1 ], 10 ) * 7; break;
8709						case "m" : case "M" :
8710							month += parseInt( matches[ 1 ], 10 );
8711							day = Math.min( day, $.datepicker._getDaysInMonth( year, month ) );
8712							break;
8713						case "y": case "Y" :
8714							year += parseInt( matches[ 1 ], 10 );
8715							day = Math.min( day, $.datepicker._getDaysInMonth( year, month ) );
8716							break;
8717					}
8718					matches = pattern.exec( offset );
8719				}
8720				return new Date( year, month, day );
8721			},
8722			newDate = ( date == null || date === "" ? defaultDate : ( typeof date === "string" ? offsetString( date ) :
8723				( typeof date === "number" ? ( isNaN( date ) ? defaultDate : offsetNumeric( date ) ) : new Date( date.getTime() ) ) ) );
8724
8725		newDate = ( newDate && newDate.toString() === "Invalid Date" ? defaultDate : newDate );
8726		if ( newDate ) {
8727			newDate.setHours( 0 );
8728			newDate.setMinutes( 0 );
8729			newDate.setSeconds( 0 );
8730			newDate.setMilliseconds( 0 );
8731		}
8732		return this._daylightSavingAdjust( newDate );
8733	},
8734
8735	/* Handle switch to/from daylight saving.
8736	 * Hours may be non-zero on daylight saving cut-over:
8737	 * > 12 when midnight changeover, but then cannot generate
8738	 * midnight datetime, so jump to 1AM, otherwise reset.
8739	 * @param  date  (Date) the date to check
8740	 * @return  (Date) the corrected date
8741	 */
8742	_daylightSavingAdjust: function( date ) {
8743		if ( !date ) {
8744			return null;
8745		}
8746		date.setHours( date.getHours() > 12 ? date.getHours() + 2 : 0 );
8747		return date;
8748	},
8749
8750	/* Set the date(s) directly. */
8751	_setDate: function( inst, date, noChange ) {
8752		var clear = !date,
8753			origMonth = inst.selectedMonth,
8754			origYear = inst.selectedYear,
8755			newDate = this._restrictMinMax( inst, this._determineDate( inst, date, new Date() ) );
8756
8757		inst.selectedDay = inst.currentDay = newDate.getDate();
8758		inst.drawMonth = inst.selectedMonth = inst.currentMonth = newDate.getMonth();
8759		inst.drawYear = inst.selectedYear = inst.currentYear = newDate.getFullYear();
8760		if ( ( origMonth !== inst.selectedMonth || origYear !== inst.selectedYear ) && !noChange ) {
8761			this._notifyChange( inst );
8762		}
8763		this._adjustInstDate( inst );
8764		if ( inst.input ) {
8765			inst.input.val( clear ? "" : this._formatDate( inst ) );
8766		}
8767	},
8768
8769	/* Retrieve the date(s) directly. */
8770	_getDate: function( inst ) {
8771		var startDate = ( !inst.currentYear || ( inst.input && inst.input.val() === "" ) ? null :
8772			this._daylightSavingAdjust( new Date(
8773			inst.currentYear, inst.currentMonth, inst.currentDay ) ) );
8774			return startDate;
8775	},
8776
8777	/* Attach the onxxx handlers.  These are declared statically so
8778	 * they work with static code transformers like Caja.
8779	 */
8780	_attachHandlers: function( inst ) {
8781		var stepMonths = this._get( inst, "stepMonths" ),
8782			id = "#" + inst.id.replace( /\\\\/g, "\\" );
vendor: 42,013 bytes, lines 8783-9967
8783		inst.dpDiv.find( "[data-handler]" ).map( function() {
8784			var handler = {
8785				prev: function() {
8786					$.datepicker._adjustDate( id, -stepMonths, "M" );
8787				},
8788				next: function() {
8789					$.datepicker._adjustDate( id, +stepMonths, "M" );
8790				},
8791				hide: function() {
8792					$.datepicker._hideDatepicker();
8793				},
8794				today: function() {
8795					$.datepicker._gotoToday( id );
8796				},
8797				selectDay: function() {
8798					$.datepicker._selectDay( id, +this.getAttribute( "data-month" ), +this.getAttribute( "data-year" ), this );
8799					return false;
8800				},
8801				selectMonth: function() {
8802					$.datepicker._selectMonthYear( id, this, "M" );
8803					return false;
8804				},
8805				selectYear: function() {
8806					$.datepicker._selectMonthYear( id, this, "Y" );
8807					return false;
8808				}
8809			};
8810			$( this ).on( this.getAttribute( "data-event" ), handler[ this.getAttribute( "data-handler" ) ] );
8811		} );
8812	},
8813
8814	/* Generate the HTML for the current state of the date picker. */
8815	_generateHTML: function( inst ) {
8816		var maxDraw, prevText, prev, nextText, next, currentText, gotoDate,
8817			controls, buttonPanel, firstDay, showWeek, dayNames, dayNamesMin,
8818			monthNames, monthNamesShort, beforeShowDay, showOtherMonths,
8819			selectOtherMonths, defaultDate, html, dow, row, group, col, selectedDate,
8820			cornerClass, calender, thead, day, daysInMonth, leadDays, curRows, numRows,
8821			printDate, dRow, tbody, daySettings, otherMonth, unselectable,
8822			tempDate = new Date(),
8823			today = this._daylightSavingAdjust(
8824				new Date( tempDate.getFullYear(), tempDate.getMonth(), tempDate.getDate() ) ), // clear time
8825			isRTL = this._get( inst, "isRTL" ),
8826			showButtonPanel = this._get( inst, "showButtonPanel" ),
8827			hideIfNoPrevNext = this._get( inst, "hideIfNoPrevNext" ),
8828			navigationAsDateFormat = this._get( inst, "navigationAsDateFormat" ),
8829			numMonths = this._getNumberOfMonths( inst ),
8830			showCurrentAtPos = this._get( inst, "showCurrentAtPos" ),
8831			stepMonths = this._get( inst, "stepMonths" ),
8832			isMultiMonth = ( numMonths[ 0 ] !== 1 || numMonths[ 1 ] !== 1 ),
8833			currentDate = this._daylightSavingAdjust( ( !inst.currentDay ? new Date( 9999, 9, 9 ) :
8834				new Date( inst.currentYear, inst.currentMonth, inst.currentDay ) ) ),
8835			minDate = this._getMinMaxDate( inst, "min" ),
8836			maxDate = this._getMinMaxDate( inst, "max" ),
8837			drawMonth = inst.drawMonth - showCurrentAtPos,
8838			drawYear = inst.drawYear;
8839
8840		if ( drawMonth < 0 ) {
8841			drawMonth += 12;
8842			drawYear--;
8843		}
8844		if ( maxDate ) {
8845			maxDraw = this._daylightSavingAdjust( new Date( maxDate.getFullYear(),
8846				maxDate.getMonth() - ( numMonths[ 0 ] * numMonths[ 1 ] ) + 1, maxDate.getDate() ) );
8847			maxDraw = ( minDate && maxDraw < minDate ? minDate : maxDraw );
8848			while ( this._daylightSavingAdjust( new Date( drawYear, drawMonth, 1 ) ) > maxDraw ) {
8849				drawMonth--;
8850				if ( drawMonth < 0 ) {
8851					drawMonth = 11;
8852					drawYear--;
8853				}
8854			}
8855		}
8856		inst.drawMonth = drawMonth;
8857		inst.drawYear = drawYear;
8858
8859		prevText = this._get( inst, "prevText" );
8860		prevText = ( !navigationAsDateFormat ? prevText : this.formatDate( prevText,
8861			this._daylightSavingAdjust( new Date( drawYear, drawMonth - stepMonths, 1 ) ),
8862			this._getFormatConfig( inst ) ) );
8863
8864		prev = ( this._canAdjustMonth( inst, -1, drawYear, drawMonth ) ?
8865			"<a class='ui-datepicker-prev ui-corner-all' data-handler='prev' data-event='click'" +
8866			" title='" + prevText + "'><span class='ui-icon ui-icon-circle-triangle-" + ( isRTL ? "e" : "w" ) + "'>" + prevText + "</span></a>" :
8867			( hideIfNoPrevNext ? "" : "<a class='ui-datepicker-prev ui-corner-all ui-state-disabled' title='" + prevText + "'><span class='ui-icon ui-icon-circle-triangle-" + ( isRTL ? "e" : "w" ) + "'>" + prevText + "</span></a>" ) );
8868
8869		nextText = this._get( inst, "nextText" );
8870		nextText = ( !navigationAsDateFormat ? nextText : this.formatDate( nextText,
8871			this._daylightSavingAdjust( new Date( drawYear, drawMonth + stepMonths, 1 ) ),
8872			this._getFormatConfig( inst ) ) );
8873
8874		next = ( this._canAdjustMonth( inst, +1, drawYear, drawMonth ) ?
8875			"<a class='ui-datepicker-next ui-corner-all' data-handler='next' data-event='click'" +
8876			" title='" + nextText + "'><span class='ui-icon ui-icon-circle-triangle-" + ( isRTL ? "w" : "e" ) + "'>" + nextText + "</span></a>" :
8877			( hideIfNoPrevNext ? "" : "<a class='ui-datepicker-next ui-corner-all ui-state-disabled' title='" + nextText + "'><span class='ui-icon ui-icon-circle-triangle-" + ( isRTL ? "w" : "e" ) + "'>" + nextText + "</span></a>" ) );
8878
8879		currentText = this._get( inst, "currentText" );
8880		gotoDate = ( this._get( inst, "gotoCurrent" ) && inst.currentDay ? currentDate : today );
8881		currentText = ( !navigationAsDateFormat ? currentText :
8882			this.formatDate( currentText, gotoDate, this._getFormatConfig( inst ) ) );
8883
8884		controls = ( !inst.inline ? "<button type='button' class='ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all' data-handler='hide' data-event='click'>" +
8885			this._get( inst, "closeText" ) + "</button>" : "" );
8886
8887		buttonPanel = ( showButtonPanel ) ? "<div class='ui-datepicker-buttonpane ui-widget-content'>" + ( isRTL ? controls : "" ) +
8888			( this._isInRange( inst, gotoDate ) ? "<button type='button' class='ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all' data-handler='today' data-event='click'" +
8889			">" + currentText + "</button>" : "" ) + ( isRTL ? "" : controls ) + "</div>" : "";
8890
8891		firstDay = parseInt( this._get( inst, "firstDay" ), 10 );
8892		firstDay = ( isNaN( firstDay ) ? 0 : firstDay );
8893
8894		showWeek = this._get( inst, "showWeek" );
8895		dayNames = this._get( inst, "dayNames" );
8896		dayNamesMin = this._get( inst, "dayNamesMin" );
8897		monthNames = this._get( inst, "monthNames" );
8898		monthNamesShort = this._get( inst, "monthNamesShort" );
8899		beforeShowDay = this._get( inst, "beforeShowDay" );
8900		showOtherMonths = this._get( inst, "showOtherMonths" );
8901		selectOtherMonths = this._get( inst, "selectOtherMonths" );
8902		defaultDate = this._getDefaultDate( inst );
8903		html = "";
8904
8905		for ( row = 0; row < numMonths[ 0 ]; row++ ) {
8906			group = "";
8907			this.maxRows = 4;
8908			for ( col = 0; col < numMonths[ 1 ]; col++ ) {
8909				selectedDate = this._daylightSavingAdjust( new Date( drawYear, drawMonth, inst.selectedDay ) );
8910				cornerClass = " ui-corner-all";
8911				calender = "";
8912				if ( isMultiMonth ) {
8913					calender += "<div class='ui-datepicker-group";
8914					if ( numMonths[ 1 ] > 1 ) {
8915						switch ( col ) {
8916							case 0: calender += " ui-datepicker-group-first";
8917								cornerClass = " ui-corner-" + ( isRTL ? "right" : "left" ); break;
8918							case numMonths[ 1 ] - 1: calender += " ui-datepicker-group-last";
8919								cornerClass = " ui-corner-" + ( isRTL ? "left" : "right" ); break;
8920							default: calender += " ui-datepicker-group-middle"; cornerClass = ""; break;
8921						}
8922					}
8923					calender += "'>";
8924				}
8925				calender += "<div class='ui-datepicker-header ui-widget-header ui-helper-clearfix" + cornerClass + "'>" +
8926					( /all|left/.test( cornerClass ) && row === 0 ? ( isRTL ? next : prev ) : "" ) +
8927					( /all|right/.test( cornerClass ) && row === 0 ? ( isRTL ? prev : next ) : "" ) +
8928					this._generateMonthYearHeader( inst, drawMonth, drawYear, minDate, maxDate,
8929					row > 0 || col > 0, monthNames, monthNamesShort ) + // draw month headers
8930					"</div><table class='ui-datepicker-calendar'><thead>" +
8931					"<tr>";
8932				thead = ( showWeek ? "<th class='ui-datepicker-week-col'>" + this._get( inst, "weekHeader" ) + "</th>" : "" );
8933				for ( dow = 0; dow < 7; dow++ ) { // days of the week
8934					day = ( dow + firstDay ) % 7;
8935					thead += "<th scope='col'" + ( ( dow + firstDay + 6 ) % 7 >= 5 ? " class='ui-datepicker-week-end'" : "" ) + ">" +
8936						"<span title='" + dayNames[ day ] + "'>" + dayNamesMin[ day ] + "</span></th>";
8937				}
8938				calender += thead + "</tr></thead><tbody>";
8939				daysInMonth = this._getDaysInMonth( drawYear, drawMonth );
8940				if ( drawYear === inst.selectedYear && drawMonth === inst.selectedMonth ) {
8941					inst.selectedDay = Math.min( inst.selectedDay, daysInMonth );
8942				}
8943				leadDays = ( this._getFirstDayOfMonth( drawYear, drawMonth ) - firstDay + 7 ) % 7;
8944				curRows = Math.ceil( ( leadDays + daysInMonth ) / 7 ); // calculate the number of rows to generate
8945				numRows = ( isMultiMonth ? this.maxRows > curRows ? this.maxRows : curRows : curRows ); //If multiple months, use the higher number of rows (see #7043)
8946				this.maxRows = numRows;
8947				printDate = this._daylightSavingAdjust( new Date( drawYear, drawMonth, 1 - leadDays ) );
8948				for ( dRow = 0; dRow < numRows; dRow++ ) { // create date picker rows
8949					calender += "<tr>";
8950					tbody = ( !showWeek ? "" : "<td class='ui-datepicker-week-col'>" +
8951						this._get( inst, "calculateWeek" )( printDate ) + "</td>" );
8952					for ( dow = 0; dow < 7; dow++ ) { // create date picker days
8953						daySettings = ( beforeShowDay ?
8954							beforeShowDay.apply( ( inst.input ? inst.input[ 0 ] : null ), [ printDate ] ) : [ true, "" ] );
8955						otherMonth = ( printDate.getMonth() !== drawMonth );
8956						unselectable = ( otherMonth && !selectOtherMonths ) || !daySettings[ 0 ] ||
8957							( minDate && printDate < minDate ) || ( maxDate && printDate > maxDate );
8958						tbody += "<td class='" +
8959							( ( dow + firstDay + 6 ) % 7 >= 5 ? " ui-datepicker-week-end" : "" ) + // highlight weekends
8960							( otherMonth ? " ui-datepicker-other-month" : "" ) + // highlight days from other months
8961							( ( printDate.getTime() === selectedDate.getTime() && drawMonth === inst.selectedMonth && inst._keyEvent ) || // user pressed key
8962							( defaultDate.getTime() === printDate.getTime() && defaultDate.getTime() === selectedDate.getTime() ) ?
8963
8964							// or defaultDate is current printedDate and defaultDate is selectedDate
8965							" " + this._dayOverClass : "" ) + // highlight selected day
8966							( unselectable ? " " + this._unselectableClass + " ui-state-disabled" : "" ) +  // highlight unselectable days
8967							( otherMonth && !showOtherMonths ? "" : " " + daySettings[ 1 ] + // highlight custom dates
8968							( printDate.getTime() === currentDate.getTime() ? " " + this._currentClass : "" ) + // highlight selected day
8969							( printDate.getTime() === today.getTime() ? " ui-datepicker-today" : "" ) ) + "'" + // highlight today (if different)
8970							( ( !otherMonth || showOtherMonths ) && daySettings[ 2 ] ? " title='" + daySettings[ 2 ].replace( /'/g, "&#39;" ) + "'" : "" ) + // cell title
8971							( unselectable ? "" : " data-handler='selectDay' data-event='click' data-month='" + printDate.getMonth() + "' data-year='" + printDate.getFullYear() + "'" ) + ">" + // actions
8972							( otherMonth && !showOtherMonths ? "&#xa0;" : // display for other months
8973							( unselectable ? "<span class='ui-state-default'>" + printDate.getDate() + "</span>" : "<a class='ui-state-default" +
8974							( printDate.getTime() === today.getTime() ? " ui-state-highlight" : "" ) +
8975							( printDate.getTime() === currentDate.getTime() ? " ui-state-active" : "" ) + // highlight selected day
8976							( otherMonth ? " ui-priority-secondary" : "" ) + // distinguish dates from other months
8977							"' href='#'>" + printDate.getDate() + "</a>" ) ) + "</td>"; // display selectable date
8978						printDate.setDate( printDate.getDate() + 1 );
8979						printDate = this._daylightSavingAdjust( printDate );
8980					}
8981					calender += tbody + "</tr>";
8982				}
8983				drawMonth++;
8984				if ( drawMonth > 11 ) {
8985					drawMonth = 0;
8986					drawYear++;
8987				}
8988				calender += "</tbody></table>" + ( isMultiMonth ? "</div>" +
8989							( ( numMonths[ 0 ] > 0 && col === numMonths[ 1 ] - 1 ) ? "<div class='ui-datepicker-row-break'></div>" : "" ) : "" );
8990				group += calender;
8991			}
8992			html += group;
8993		}
8994		html += buttonPanel;
8995		inst._keyEvent = false;
8996		return html;
8997	},
8998
8999	/* Generate the month and year header. */
9000	_generateMonthYearHeader: function( inst, drawMonth, drawYear, minDate, maxDate,
9001			secondary, monthNames, monthNamesShort ) {
9002
9003		var inMinYear, inMaxYear, month, years, thisYear, determineYear, year, endYear,
9004			changeMonth = this._get( inst, "changeMonth" ),
9005			changeYear = this._get( inst, "changeYear" ),
9006			showMonthAfterYear = this._get( inst, "showMonthAfterYear" ),
9007			html = "<div class='ui-datepicker-title'>",
9008			monthHtml = "";
9009
9010		// Month selection
9011		if ( secondary || !changeMonth ) {
9012			monthHtml += "<span class='ui-datepicker-month'>" + monthNames[ drawMonth ] + "</span>";
9013		} else {
9014			inMinYear = ( minDate && minDate.getFullYear() === drawYear );
9015			inMaxYear = ( maxDate && maxDate.getFullYear() === drawYear );
9016			monthHtml += "<select class='ui-datepicker-month' data-handler='selectMonth' data-event='change'>";
9017			for ( month = 0; month < 12; month++ ) {
9018				if ( ( !inMinYear || month >= minDate.getMonth() ) && ( !inMaxYear || month <= maxDate.getMonth() ) ) {
9019					monthHtml += "<option value='" + month + "'" +
9020						( month === drawMonth ? " selected='selected'" : "" ) +
9021						">" + monthNamesShort[ month ] + "</option>";
9022				}
9023			}
9024			monthHtml += "</select>";
9025		}
9026
9027		if ( !showMonthAfterYear ) {
9028			html += monthHtml + ( secondary || !( changeMonth && changeYear ) ? "&#xa0;" : "" );
9029		}
9030
9031		// Year selection
9032		if ( !inst.yearshtml ) {
9033			inst.yearshtml = "";
9034			if ( secondary || !changeYear ) {
9035				html += "<span class='ui-datepicker-year'>" + drawYear + "</span>";
9036			} else {
9037
9038				// determine range of years to display
9039				years = this._get( inst, "yearRange" ).split( ":" );
9040				thisYear = new Date().getFullYear();
9041				determineYear = function( value ) {
9042					var year = ( value.match( /c[+\-].*/ ) ? drawYear + parseInt( value.substring( 1 ), 10 ) :
9043						( value.match( /[+\-].*/ ) ? thisYear + parseInt( value, 10 ) :
9044						parseInt( value, 10 ) ) );
9045					return ( isNaN( year ) ? thisYear : year );
9046				};
9047				year = determineYear( years[ 0 ] );
9048				endYear = Math.max( year, determineYear( years[ 1 ] || "" ) );
9049				year = ( minDate ? Math.max( year, minDate.getFullYear() ) : year );
9050				endYear = ( maxDate ? Math.min( endYear, maxDate.getFullYear() ) : endYear );
9051				inst.yearshtml += "<select class='ui-datepicker-year' data-handler='selectYear' data-event='change'>";
9052				for ( ; year <= endYear; year++ ) {
9053					inst.yearshtml += "<option value='" + year + "'" +
9054						( year === drawYear ? " selected='selected'" : "" ) +
9055						">" + year + "</option>";
9056				}
9057				inst.yearshtml += "</select>";
9058
9059				html += inst.yearshtml;
9060				inst.yearshtml = null;
9061			}
9062		}
9063
9064		html += this._get( inst, "yearSuffix" );
9065		if ( showMonthAfterYear ) {
9066			html += ( secondary || !( changeMonth && changeYear ) ? "&#xa0;" : "" ) + monthHtml;
9067		}
9068		html += "</div>"; // Close datepicker_header
9069		return html;
9070	},
9071
9072	/* Adjust one of the date sub-fields. */
9073	_adjustInstDate: function( inst, offset, period ) {
9074		var year = inst.selectedYear + ( period === "Y" ? offset : 0 ),
9075			month = inst.selectedMonth + ( period === "M" ? offset : 0 ),
9076			day = Math.min( inst.selectedDay, this._getDaysInMonth( year, month ) ) + ( period === "D" ? offset : 0 ),
9077			date = this._restrictMinMax( inst, this._daylightSavingAdjust( new Date( year, month, day ) ) );
9078
9079		inst.selectedDay = date.getDate();
9080		inst.drawMonth = inst.selectedMonth = date.getMonth();
9081		inst.drawYear = inst.selectedYear = date.getFullYear();
9082		if ( period === "M" || period === "Y" ) {
9083			this._notifyChange( inst );
9084		}
9085	},
9086
9087	/* Ensure a date is within any min/max bounds. */
9088	_restrictMinMax: function( inst, date ) {
9089		var minDate = this._getMinMaxDate( inst, "min" ),
9090			maxDate = this._getMinMaxDate( inst, "max" ),
9091			newDate = ( minDate && date < minDate ? minDate : date );
9092		return ( maxDate && newDate > maxDate ? maxDate : newDate );
9093	},
9094
9095	/* Notify change of month/year. */
9096	_notifyChange: function( inst ) {
9097		var onChange = this._get( inst, "onChangeMonthYear" );
9098		if ( onChange ) {
9099			onChange.apply( ( inst.input ? inst.input[ 0 ] : null ),
9100				[ inst.selectedYear, inst.selectedMonth + 1, inst ] );
9101		}
9102	},
9103
9104	/* Determine the number of months to show. */
9105	_getNumberOfMonths: function( inst ) {
9106		var numMonths = this._get( inst, "numberOfMonths" );
9107		return ( numMonths == null ? [ 1, 1 ] : ( typeof numMonths === "number" ? [ 1, numMonths ] : numMonths ) );
9108	},
9109
9110	/* Determine the current maximum date - ensure no time components are set. */
9111	_getMinMaxDate: function( inst, minMax ) {
9112		return this._determineDate( inst, this._get( inst, minMax + "Date" ), null );
9113	},
9114
9115	/* Find the number of days in a given month. */
9116	_getDaysInMonth: function( year, month ) {
9117		return 32 - this._daylightSavingAdjust( new Date( year, month, 32 ) ).getDate();
9118	},
9119
9120	/* Find the day of the week of the first of a month. */
9121	_getFirstDayOfMonth: function( year, month ) {
9122		return new Date( year, month, 1 ).getDay();
9123	},
9124
9125	/* Determines if we should allow a "next/prev" month display change. */
9126	_canAdjustMonth: function( inst, offset, curYear, curMonth ) {
9127		var numMonths = this._getNumberOfMonths( inst ),
9128			date = this._daylightSavingAdjust( new Date( curYear,
9129			curMonth + ( offset < 0 ? offset : numMonths[ 0 ] * numMonths[ 1 ] ), 1 ) );
9130
9131		if ( offset < 0 ) {
9132			date.setDate( this._getDaysInMonth( date.getFullYear(), date.getMonth() ) );
9133		}
9134		return this._isInRange( inst, date );
9135	},
9136
9137	/* Is the given date in the accepted range? */
9138	_isInRange: function( inst, date ) {
9139		var yearSplit, currentYear,
9140			minDate = this._getMinMaxDate( inst, "min" ),
9141			maxDate = this._getMinMaxDate( inst, "max" ),
9142			minYear = null,
9143			maxYear = null,
9144			years = this._get( inst, "yearRange" );
9145			if ( years ) {
9146				yearSplit = years.split( ":" );
9147				currentYear = new Date().getFullYear();
9148				minYear = parseInt( yearSplit[ 0 ], 10 );
9149				maxYear = parseInt( yearSplit[ 1 ], 10 );
9150				if ( yearSplit[ 0 ].match( /[+\-].*/ ) ) {
9151					minYear += currentYear;
9152				}
9153				if ( yearSplit[ 1 ].match( /[+\-].*/ ) ) {
9154					maxYear += currentYear;
9155				}
9156			}
9157
9158		return ( ( !minDate || date.getTime() >= minDate.getTime() ) &&
9159			( !maxDate || date.getTime() <= maxDate.getTime() ) &&
9160			( !minYear || date.getFullYear() >= minYear ) &&
9161			( !maxYear || date.getFullYear() <= maxYear ) );
9162	},
9163
9164	/* Provide the configuration settings for formatting/parsing. */
9165	_getFormatConfig: function( inst ) {
9166		var shortYearCutoff = this._get( inst, "shortYearCutoff" );
9167		shortYearCutoff = ( typeof shortYearCutoff !== "string" ? shortYearCutoff :
9168			new Date().getFullYear() % 100 + parseInt( shortYearCutoff, 10 ) );
9169		return { shortYearCutoff: shortYearCutoff,
9170			dayNamesShort: this._get( inst, "dayNamesShort" ), dayNames: this._get( inst, "dayNames" ),
9171			monthNamesShort: this._get( inst, "monthNamesShort" ), monthNames: this._get( inst, "monthNames" ) };
9172	},
9173
9174	/* Format the given date for display. */
9175	_formatDate: function( inst, day, month, year ) {
9176		if ( !day ) {
9177			inst.currentDay = inst.selectedDay;
9178			inst.currentMonth = inst.selectedMonth;
9179			inst.currentYear = inst.selectedYear;
9180		}
9181		var date = ( day ? ( typeof day === "object" ? day :
9182			this._daylightSavingAdjust( new Date( year, month, day ) ) ) :
9183			this._daylightSavingAdjust( new Date( inst.currentYear, inst.currentMonth, inst.currentDay ) ) );
9184		return this.formatDate( this._get( inst, "dateFormat" ), date, this._getFormatConfig( inst ) );
9185	}
9186} );
9187
9188/*
9189 * Bind hover events for datepicker elements.
9190 * Done via delegate so the binding only occurs once in the lifetime of the parent div.
9191 * Global datepicker_instActive, set by _updateDatepicker allows the handlers to find their way back to the active picker.
9192 */
9193function datepicker_bindHover( dpDiv ) {
9194	var selector = "button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a";
9195	return dpDiv.on( "mouseout", selector, function() {
9196			$( this ).removeClass( "ui-state-hover" );
9197			if ( this.className.indexOf( "ui-datepicker-prev" ) !== -1 ) {
9198				$( this ).removeClass( "ui-datepicker-prev-hover" );
9199			}
9200			if ( this.className.indexOf( "ui-datepicker-next" ) !== -1 ) {
9201				$( this ).removeClass( "ui-datepicker-next-hover" );
9202			}
9203		} )
9204		.on( "mouseover", selector, datepicker_handleMouseover );
9205}
9206
9207function datepicker_handleMouseover() {
9208	if ( !$.datepicker._isDisabledDatepicker( datepicker_instActive.inline ? datepicker_instActive.dpDiv.parent()[ 0 ] : datepicker_instActive.input[ 0 ] ) ) {
9209		$( this ).parents( ".ui-datepicker-calendar" ).find( "a" ).removeClass( "ui-state-hover" );
9210		$( this ).addClass( "ui-state-hover" );
9211		if ( this.className.indexOf( "ui-datepicker-prev" ) !== -1 ) {
9212			$( this ).addClass( "ui-datepicker-prev-hover" );
9213		}
9214		if ( this.className.indexOf( "ui-datepicker-next" ) !== -1 ) {
9215			$( this ).addClass( "ui-datepicker-next-hover" );
9216		}
9217	}
9218}
9219
9220/* jQuery extend now ignores nulls! */
9221function datepicker_extendRemove( target, props ) {
9222	$.extend( target, props );
9223	for ( var name in props ) {
9224		if ( props[ name ] == null ) {
9225			target[ name ] = props[ name ];
9226		}
9227	}
9228	return target;
9229}
9230
9231/* Invoke the datepicker functionality.
9232   @param  options  string - a command, optionally followed by additional parameters or
9233					Object - settings for attaching new datepicker functionality
9234   @return  jQuery object */
9235$.fn.datepicker = function( options ) {
9236
9237	/* Verify an empty collection wasn't passed - Fixes #6976 */
9238	if ( !this.length ) {
9239		return this;
9240	}
9241
9242	/* Initialise the date picker. */
9243	if ( !$.datepicker.initialized ) {
9244		$( document ).on( "mousedown", $.datepicker._checkExternalClick );
9245		$.datepicker.initialized = true;
9246	}
9247
9248	/* Append datepicker main container to body if not exist. */
9249	if ( $( "#" + $.datepicker._mainDivId ).length === 0 ) {
9250		$( "body" ).append( $.datepicker.dpDiv );
9251	}
9252
9253	var otherArgs = Array.prototype.slice.call( arguments, 1 );
9254	if ( typeof options === "string" && ( options === "isDisabled" || options === "getDate" || options === "widget" ) ) {
9255		return $.datepicker[ "_" + options + "Datepicker" ].
9256			apply( $.datepicker, [ this[ 0 ] ].concat( otherArgs ) );
9257	}
9258	if ( options === "option" && arguments.length === 2 && typeof arguments[ 1 ] === "string" ) {
9259		return $.datepicker[ "_" + options + "Datepicker" ].
9260			apply( $.datepicker, [ this[ 0 ] ].concat( otherArgs ) );
9261	}
9262	return this.each( function() {
9263		typeof options === "string" ?
9264			$.datepicker[ "_" + options + "Datepicker" ].
9265				apply( $.datepicker, [ this ].concat( otherArgs ) ) :
9266			$.datepicker._attachDatepicker( this, options );
9267	} );
9268};
9269
9270$.datepicker = new Datepicker(); // singleton instance
9271$.datepicker.initialized = false;
9272$.datepicker.uuid = new Date().getTime();
9273$.datepicker.version = "1.12.1";
9274
9275var widgetsDatepicker = $.datepicker;
9276
9277
9278
9279
9280// This file is deprecated
9281var ie = $.ui.ie = !!/msie [\w.]+/.exec( navigator.userAgent.toLowerCase() );
9282
9283/*!
9284 * jQuery UI Mouse 1.12.1
9285 * http://jqueryui.com
9286 *
9287 * Copyright jQuery Foundation and other contributors
9288 * Released under the MIT license.
9289 * http://jquery.org/license
9290 */
9291
9292//>>label: Mouse
9293//>>group: Widgets
9294//>>description: Abstracts mouse-based interactions to assist in creating certain widgets.
9295//>>docs: http://api.jqueryui.com/mouse/
9296
9297
9298
9299var mouseHandled = false;
9300$( document ).on( "mouseup", function() {
9301	mouseHandled = false;
9302} );
9303
9304var widgetsMouse = $.widget( "ui.mouse", {
9305	version: "1.12.1",
9306	options: {
9307		cancel: "input, textarea, button, select, option",
9308		distance: 1,
9309		delay: 0
9310	},
9311	_mouseInit: function() {
9312		var that = this;
9313
9314		this.element
9315			.on( "mousedown." + this.widgetName, function( event ) {
9316				return that._mouseDown( event );
9317			} )
9318			.on( "click." + this.widgetName, function( event ) {
9319				if ( true === $.data( event.target, that.widgetName + ".preventClickEvent" ) ) {
9320					$.removeData( event.target, that.widgetName + ".preventClickEvent" );
9321					event.stopImmediatePropagation();
9322					return false;
9323				}
9324			} );
9325
9326		this.started = false;
9327	},
9328
9329	// TODO: make sure destroying one instance of mouse doesn't mess with
9330	// other instances of mouse
9331	_mouseDestroy: function() {
9332		this.element.off( "." + this.widgetName );
9333		if ( this._mouseMoveDelegate ) {
9334			this.document
9335				.off( "mousemove." + this.widgetName, this._mouseMoveDelegate )
9336				.off( "mouseup." + this.widgetName, this._mouseUpDelegate );
9337		}
9338	},
9339
9340	_mouseDown: function( event ) {
9341
9342		// don't let more than one widget handle mouseStart
9343		if ( mouseHandled ) {
9344			return;
9345		}
9346
9347		this._mouseMoved = false;
9348
9349		// We may have missed mouseup (out of window)
9350		( this._mouseStarted && this._mouseUp( event ) );
9351
9352		this._mouseDownEvent = event;
9353
9354		var that = this,
9355			btnIsLeft = ( event.which === 1 ),
9356
9357			// event.target.nodeName works around a bug in IE 8 with
9358			// disabled inputs (#7620)
9359			elIsCancel = ( typeof this.options.cancel === "string" && event.target.nodeName ?
9360				$( event.target ).closest( this.options.cancel ).length : false );
9361		if ( !btnIsLeft || elIsCancel || !this._mouseCapture( event ) ) {
9362			return true;
9363		}
9364
9365		this.mouseDelayMet = !this.options.delay;
9366		if ( !this.mouseDelayMet ) {
9367			this._mouseDelayTimer = setTimeout( function() {
9368				that.mouseDelayMet = true;
9369			}, this.options.delay );
9370		}
9371
9372		if ( this._mouseDistanceMet( event ) && this._mouseDelayMet( event ) ) {
9373			this._mouseStarted = ( this._mouseStart( event ) !== false );
9374			if ( !this._mouseStarted ) {
9375				event.preventDefault();
9376				return true;
9377			}
9378		}
9379
9380		// Click event may never have fired (Gecko & Opera)
9381		if ( true === $.data( event.target, this.widgetName + ".preventClickEvent" ) ) {
9382			$.removeData( event.target, this.widgetName + ".preventClickEvent" );
9383		}
9384
9385		// These delegates are required to keep context
9386		this._mouseMoveDelegate = function( event ) {
9387			return that._mouseMove( event );
9388		};
9389		this._mouseUpDelegate = function( event ) {
9390			return that._mouseUp( event );
9391		};
9392
9393		this.document
9394			.on( "mousemove." + this.widgetName, this._mouseMoveDelegate )
9395			.on( "mouseup." + this.widgetName, this._mouseUpDelegate );
9396
9397		event.preventDefault();
9398
9399		mouseHandled = true;
9400		return true;
9401	},
9402
9403	_mouseMove: function( event ) {
9404
9405		// Only check for mouseups outside the document if you've moved inside the document
9406		// at least once. This prevents the firing of mouseup in the case of IE<9, which will
9407		// fire a mousemove event if content is placed under the cursor. See #7778
9408		// Support: IE <9
9409		if ( this._mouseMoved ) {
9410
9411			// IE mouseup check - mouseup happened when mouse was out of window
9412			if ( $.ui.ie && ( !document.documentMode || document.documentMode < 9 ) &&
9413					!event.button ) {
9414				return this._mouseUp( event );
9415
9416			// Iframe mouseup check - mouseup occurred in another document
9417			} else if ( !event.which ) {
9418
9419				// Support: Safari <=8 - 9
9420				// Safari sets which to 0 if you press any of the following keys
9421				// during a drag (#14461)
9422				if ( event.originalEvent.altKey || event.originalEvent.ctrlKey ||
9423						event.originalEvent.metaKey || event.originalEvent.shiftKey ) {
9424					this.ignoreMissingWhich = true;
9425				} else if ( !this.ignoreMissingWhich ) {
9426					return this._mouseUp( event );
9427				}
9428			}
9429		}
9430
9431		if ( event.which || event.button ) {
9432			this._mouseMoved = true;
9433		}
9434
9435		if ( this._mouseStarted ) {
9436			this._mouseDrag( event );
9437			return event.preventDefault();
9438		}
9439
9440		if ( this._mouseDistanceMet( event ) && this._mouseDelayMet( event ) ) {
9441			this._mouseStarted =
9442				( this._mouseStart( this._mouseDownEvent, event ) !== false );
9443			( this._mouseStarted ? this._mouseDrag( event ) : this._mouseUp( event ) );
9444		}
9445
9446		return !this._mouseStarted;
9447	},
9448
9449	_mouseUp: function( event ) {
9450		this.document
9451			.off( "mousemove." + this.widgetName, this._mouseMoveDelegate )
9452			.off( "mouseup." + this.widgetName, this._mouseUpDelegate );
9453
9454		if ( this._mouseStarted ) {
9455			this._mouseStarted = false;
9456
9457			if ( event.target === this._mouseDownEvent.target ) {
9458				$.data( event.target, this.widgetName + ".preventClickEvent", true );
9459			}
9460
9461			this._mouseStop( event );
9462		}
9463
9464		if ( this._mouseDelayTimer ) {
9465			clearTimeout( this._mouseDelayTimer );
9466			delete this._mouseDelayTimer;
9467		}
9468
9469		this.ignoreMissingWhich = false;
9470		mouseHandled = false;
9471		event.preventDefault();
9472	},
9473
9474	_mouseDistanceMet: function( event ) {
9475		return ( Math.max(
9476				Math.abs( this._mouseDownEvent.pageX - event.pageX ),
9477				Math.abs( this._mouseDownEvent.pageY - event.pageY )
9478			) >= this.options.distance
9479		);
9480	},
9481
9482	_mouseDelayMet: function( /* event */ ) {
9483		return this.mouseDelayMet;
9484	},
9485
9486	// These are placeholder methods, to be overriden by extending plugin
9487	_mouseStart: function( /* event */ ) {},
9488	_mouseDrag: function( /* event */ ) {},
9489	_mouseStop: function( /* event */ ) {},
9490	_mouseCapture: function( /* event */ ) { return true; }
9491} );
9492
9493
9494
9495
9496// $.ui.plugin is deprecated. Use $.widget() extensions instead.
9497var plugin = $.ui.plugin = {
9498	add: function( module, option, set ) {
9499		var i,
9500			proto = $.ui[ module ].prototype;
9501		for ( i in set ) {
9502			proto.plugins[ i ] = proto.plugins[ i ] || [];
9503			proto.plugins[ i ].push( [ option, set[ i ] ] );
9504		}
9505	},
9506	call: function( instance, name, args, allowDisconnected ) {
9507		var i,
9508			set = instance.plugins[ name ];
9509
9510		if ( !set ) {
9511			return;
9512		}
9513
9514		if ( !allowDisconnected && ( !instance.element[ 0 ].parentNode ||
9515				instance.element[ 0 ].parentNode.nodeType === 11 ) ) {
9516			return;
9517		}
9518
9519		for ( i = 0; i < set.length; i++ ) {
9520			if ( instance.options[ set[ i ][ 0 ] ] ) {
9521				set[ i ][ 1 ].apply( instance.element, args );
9522			}
9523		}
9524	}
9525};
9526
9527
9528
9529var safeBlur = $.ui.safeBlur = function( element ) {
9530
9531	// Support: IE9 - 10 only
9532	// If the <body> is blurred, IE will switch windows, see #9420
9533	if ( element && element.nodeName.toLowerCase() !== "body" ) {
9534		$( element ).trigger( "blur" );
9535	}
9536};
9537
9538
9539/*!
9540 * jQuery UI Draggable 1.12.1
9541 * http://jqueryui.com
9542 *
9543 * Copyright jQuery Foundation and other contributors
9544 * Released under the MIT license.
9545 * http://jquery.org/license
9546 */
9547
9548//>>label: Draggable
9549//>>group: Interactions
9550//>>description: Enables dragging functionality for any element.
9551//>>docs: http://api.jqueryui.com/draggable/
9552//>>demos: http://jqueryui.com/draggable/
9553//>>css.structure: ../../themes/base/draggable.css
9554
9555
9556
9557$.widget( "ui.draggable", $.ui.mouse, {
9558	version: "1.12.1",
9559	widgetEventPrefix: "drag",
9560	options: {
9561		addClasses: true,
9562		appendTo: "parent",
9563		axis: false,
9564		connectToSortable: false,
9565		containment: false,
9566		cursor: "auto",
9567		cursorAt: false,
9568		grid: false,
9569		handle: false,
9570		helper: "original",
9571		iframeFix: false,
9572		opacity: false,
9573		refreshPositions: false,
9574		revert: false,
9575		revertDuration: 500,
9576		scope: "default",
9577		scroll: true,
9578		scrollSensitivity: 20,
9579		scrollSpeed: 20,
9580		snap: false,
9581		snapMode: "both",
9582		snapTolerance: 20,
9583		stack: false,
9584		zIndex: false,
9585
9586		// Callbacks
9587		drag: null,
9588		start: null,
9589		stop: null
9590	},
9591	_create: function() {
9592
9593		if ( this.options.helper === "original" ) {
9594			this._setPositionRelative();
9595		}
9596		if ( this.options.addClasses ) {
9597			this._addClass( "ui-draggable" );
9598		}
9599		this._setHandleClassName();
9600
9601		this._mouseInit();
9602	},
9603
9604	_setOption: function( key, value ) {
9605		this._super( key, value );
9606		if ( key === "handle" ) {
9607			this._removeHandleClassName();
9608			this._setHandleClassName();
9609		}
9610	},
9611
9612	_destroy: function() {
9613		if ( ( this.helper || this.element ).is( ".ui-draggable-dragging" ) ) {
9614			this.destroyOnClear = true;
9615			return;
9616		}
9617		this._removeHandleClassName();
9618		this._mouseDestroy();
9619	},
9620
9621	_mouseCapture: function( event ) {
9622		var o = this.options;
9623
9624		// Among others, prevent a drag on a resizable-handle
9625		if ( this.helper || o.disabled ||
9626				$( event.target ).closest( ".ui-resizable-handle" ).length > 0 ) {
9627			return false;
9628		}
9629
9630		//Quit if we're not on a valid handle
9631		this.handle = this._getHandle( event );
9632		if ( !this.handle ) {
9633			return false;
9634		}
9635
9636		this._blurActiveElement( event );
9637
9638		this._blockFrames( o.iframeFix === true ? "iframe" : o.iframeFix );
9639
9640		return true;
9641
9642	},
9643
9644	_blockFrames: function( selector ) {
9645		this.iframeBlocks = this.document.find( selector ).map( function() {
9646			var iframe = $( this );
9647
9648			return $( "<div>" )
9649				.css( "position", "absolute" )
9650				.appendTo( iframe.parent() )
9651				.outerWidth( iframe.outerWidth() )
9652				.outerHeight( iframe.outerHeight() )
9653				.offset( iframe.offset() )[ 0 ];
9654		} );
9655	},
9656
9657	_unblockFrames: function() {
9658		if ( this.iframeBlocks ) {
9659			this.iframeBlocks.remove();
9660			delete this.iframeBlocks;
9661		}
9662	},
9663
9664	_blurActiveElement: function( event ) {
9665		var activeElement = $.ui.safeActiveElement( this.document[ 0 ] ),
9666			target = $( event.target );
9667
9668		// Don't blur if the event occurred on an element that is within
9669		// the currently focused element
9670		// See #10527, #12472
9671		if ( target.closest( activeElement ).length ) {
9672			return;
9673		}
9674
9675		// Blur any element that currently has focus, see #4261
9676		$.ui.safeBlur( activeElement );
9677	},
9678
9679	_mouseStart: function( event ) {
9680
9681		var o = this.options;
9682
9683		//Create and append the visible helper
9684		this.helper = this._createHelper( event );
9685
9686		this._addClass( this.helper, "ui-draggable-dragging" );
9687
9688		//Cache the helper size
9689		this._cacheHelperProportions();
9690
9691		//If ddmanager is used for droppables, set the global draggable
9692		if ( $.ui.ddmanager ) {
9693			$.ui.ddmanager.current = this;
9694		}
9695
9696		/*
9697		 * - Position generation -
9698		 * This block generates everything position related - it's the core of draggables.
9699		 */
9700
9701		//Cache the margins of the original element
9702		this._cacheMargins();
9703
9704		//Store the helper's css position
9705		this.cssPosition = this.helper.css( "position" );
9706		this.scrollParent = this.helper.scrollParent( true );
9707		this.offsetParent = this.helper.offsetParent();
9708		this.hasFixedAncestor = this.helper.parents().filter( function() {
9709				return $( this ).css( "position" ) === "fixed";
9710			} ).length > 0;
9711
9712		//The element's absolute position on the page minus margins
9713		this.positionAbs = this.element.offset();
9714		this._refreshOffsets( event );
9715
9716		//Generate the original position
9717		this.originalPosition = this.position = this._generatePosition( event, false );
9718		this.originalPageX = event.pageX;
9719		this.originalPageY = event.pageY;
9720
9721		//Adjust the mouse offset relative to the helper if "cursorAt" is supplied
9722		( o.cursorAt && this._adjustOffsetFromHelper( o.cursorAt ) );
9723
9724		//Set a containment if given in the options
9725		this._setContainment();
9726
9727		//Trigger event + callbacks
9728		if ( this._trigger( "start", event ) === false ) {
9729			this._clear();
9730			return false;
9731		}
9732
9733		//Recache the helper size
9734		this._cacheHelperProportions();
9735
9736		//Prepare the droppable offsets
9737		if ( $.ui.ddmanager && !o.dropBehaviour ) {
9738			$.ui.ddmanager.prepareOffsets( this, event );
9739		}
9740
9741		// Execute the drag once - this causes the helper not to be visible before getting its
9742		// correct position
9743		this._mouseDrag( event, true );
9744
9745		// If the ddmanager is used for droppables, inform the manager that dragging has started
9746		// (see #5003)
9747		if ( $.ui.ddmanager ) {
9748			$.ui.ddmanager.dragStart( this, event );
9749		}
9750
9751		return true;
9752	},
9753
9754	_refreshOffsets: function( event ) {
9755		this.offset = {
9756			top: this.positionAbs.top - this.margins.top,
9757			left: this.positionAbs.left - this.margins.left,
9758			scroll: false,
9759			parent: this._getParentOffset(),
9760			relative: this._getRelativeOffset()
9761		};
9762
9763		this.offset.click = {
9764			left: event.pageX - this.offset.left,
9765			top: event.pageY - this.offset.top
9766		};
9767	},
9768
9769	_mouseDrag: function( event, noPropagation ) {
9770
9771		// reset any necessary cached properties (see #5009)
9772		if ( this.hasFixedAncestor ) {
9773			this.offset.parent = this._getParentOffset();
9774		}
9775
9776		//Compute the helpers position
9777		this.position = this._generatePosition( event, true );
9778		this.positionAbs = this._convertPositionTo( "absolute" );
9779
9780		//Call plugins and callbacks and use the resulting position if something is returned
9781		if ( !noPropagation ) {
9782			var ui = this._uiHash();
9783			if ( this._trigger( "drag", event, ui ) === false ) {
9784				this._mouseUp( new $.Event( "mouseup", event ) );
9785				return false;
9786			}
9787			this.position = ui.position;
9788		}
9789
9790		this.helper[ 0 ].style.left = this.position.left + "px";
9791		this.helper[ 0 ].style.top = this.position.top + "px";
9792
9793		if ( $.ui.ddmanager ) {
9794			$.ui.ddmanager.drag( this, event );
9795		}
9796
9797		return false;
9798	},
9799
9800	_mouseStop: function( event ) {
9801
9802		//If we are using droppables, inform the manager about the drop
9803		var that = this,
9804			dropped = false;
9805		if ( $.ui.ddmanager && !this.options.dropBehaviour ) {
9806			dropped = $.ui.ddmanager.drop( this, event );
9807		}
9808
9809		//if a drop comes from outside (a sortable)
9810		if ( this.dropped ) {
9811			dropped = this.dropped;
9812			this.dropped = false;
9813		}
9814
9815		if ( ( this.options.revert === "invalid" && !dropped ) ||
9816				( this.options.revert === "valid" && dropped ) ||
9817				this.options.revert === true || ( $.isFunction( this.options.revert ) &&
9818				this.options.revert.call( this.element, dropped ) )
9819		) {
9820			$( this.helper ).animate(
9821				this.originalPosition,
9822				parseInt( this.options.revertDuration, 10 ),
9823				function() {
9824					if ( that._trigger( "stop", event ) !== false ) {
9825						that._clear();
9826					}
9827				}
9828			);
9829		} else {
9830			if ( this._trigger( "stop", event ) !== false ) {
9831				this._clear();
9832			}
9833		}
9834
9835		return false;
9836	},
9837
9838	_mouseUp: function( event ) {
9839		this._unblockFrames();
9840
9841		// If the ddmanager is used for droppables, inform the manager that dragging has stopped
9842		// (see #5003)
9843		if ( $.ui.ddmanager ) {
9844			$.ui.ddmanager.dragStop( this, event );
9845		}
9846
9847		// Only need to focus if the event occurred on the draggable itself, see #10527
9848		if ( this.handleElement.is( event.target ) ) {
9849
9850			// The interaction is over; whether or not the click resulted in a drag,
9851			// focus the element
9852			this.element.trigger( "focus" );
9853		}
9854
9855		return $.ui.mouse.prototype._mouseUp.call( this, event );
9856	},
9857
9858	cancel: function() {
9859
9860		if ( this.helper.is( ".ui-draggable-dragging" ) ) {
9861			this._mouseUp( new $.Event( "mouseup", { target: this.element[ 0 ] } ) );
9862		} else {
9863			this._clear();
9864		}
9865
9866		return this;
9867
9868	},
9869
9870	_getHandle: function( event ) {
9871		return this.options.handle ?
9872			!!$( event.target ).closest( this.element.find( this.options.handle ) ).length :
9873			true;
9874	},
9875
9876	_setHandleClassName: function() {
9877		this.handleElement = this.options.handle ?
9878			this.element.find( this.options.handle ) : this.element;
9879		this._addClass( this.handleElement, "ui-draggable-handle" );
9880	},
9881
9882	_removeHandleClassName: function() {
9883		this._removeClass( this.handleElement, "ui-draggable-handle" );
9884	},
9885
9886	_createHelper: function( event ) {
9887
9888		var o = this.options,
9889			helperIsFunction = $.isFunction( o.helper ),
9890			helper = helperIsFunction ?
9891				$( o.helper.apply( this.element[ 0 ], [ event ] ) ) :
9892				( o.helper === "clone" ?
9893					this.element.clone().removeAttr( "id" ) :
9894					this.element );
9895
9896		if ( !helper.parents( "body" ).length ) {
9897			helper.appendTo( ( o.appendTo === "parent" ?
9898				this.element[ 0 ].parentNode :
9899				o.appendTo ) );
9900		}
9901
9902		// Http://bugs.jqueryui.com/ticket/9446
9903		// a helper function can return the original element
9904		// which wouldn't have been set to relative in _create
9905		if ( helperIsFunction && helper[ 0 ] === this.element[ 0 ] ) {
9906			this._setPositionRelative();
9907		}
9908
9909		if ( helper[ 0 ] !== this.element[ 0 ] &&
9910				!( /(fixed|absolute)/ ).test( helper.css( "position" ) ) ) {
9911			helper.css( "position", "absolute" );
9912		}
9913
9914		return helper;
9915
9916	},
9917
9918	_setPositionRelative: function() {
9919		if ( !( /^(?:r|a|f)/ ).test( this.element.css( "position" ) ) ) {
9920			this.element[ 0 ].style.position = "relative";
9921		}
9922	},
9923
9924	_adjustOffsetFromHelper: function( obj ) {
9925		if ( typeof obj === "string" ) {
9926			obj = obj.split( " " );
9927		}
9928		if ( $.isArray( obj ) ) {
9929			obj = { left: +obj[ 0 ], top: +obj[ 1 ] || 0 };
9930		}
9931		if ( "left" in obj ) {
9932			this.offset.click.left = obj.left + this.margins.left;
9933		}
9934		if ( "right" in obj ) {
9935			this.offset.click.left = this.helperProportions.width - obj.right + this.margins.left;
9936		}
9937		if ( "top" in obj ) {
9938			this.offset.click.top = obj.top + this.margins.top;
9939		}
9940		if ( "bottom" in obj ) {
9941			this.offset.click.top = this.helperProportions.height - obj.bottom + this.margins.top;
9942		}
9943	},
9944
9945	_isRootNode: function( element ) {
9946		return ( /(html|body)/i ).test( element.tagName ) || element === this.document[ 0 ];
9947	},
9948
9949	_getParentOffset: function() {
9950
9951		//Get the offsetParent and cache its position
9952		var po = this.offsetParent.offset(),
9953			document = this.document[ 0 ];
9954
9955		// This is a special case where we need to modify a offset calculated on start, since the
9956		// following happened:
9957		// 1. The position of the helper is absolute, so it's position is calculated based on the
9958		// next positioned parent
9959		// 2. The actual offset parent is a child of the scroll parent, and the scroll parent isn't
9960		// the document, which means that the scroll is included in the initial calculation of the
9961		// offset of the parent, and never recalculated upon drag
9962		if ( this.cssPosition === "absolute" && this.scrollParent[ 0 ] !== document &&
9963				$.contains( this.scrollParent[ 0 ], this.offsetParent[ 0 ] ) ) {
9964			po.left += this.scrollParent.scrollLeft();
9965			po.top += this.scrollParent.scrollTop();
9966		}
9967
vendor: 13,156 bytes, lines 9968-10396
9968		if ( this._isRootNode( this.offsetParent[ 0 ] ) ) {
9969			po = { top: 0, left: 0 };
9970		}
9971
9972		return {
9973			top: po.top + ( parseInt( this.offsetParent.css( "borderTopWidth" ), 10 ) || 0 ),
9974			left: po.left + ( parseInt( this.offsetParent.css( "borderLeftWidth" ), 10 ) || 0 )
9975		};
9976
9977	},
9978
9979	_getRelativeOffset: function() {
9980		if ( this.cssPosition !== "relative" ) {
9981			return { top: 0, left: 0 };
9982		}
9983
9984		var p = this.element.position(),
9985			scrollIsRootNode = this._isRootNode( this.scrollParent[ 0 ] );
9986
9987		return {
9988			top: p.top - ( parseInt( this.helper.css( "top" ), 10 ) || 0 ) +
9989				( !scrollIsRootNode ? this.scrollParent.scrollTop() : 0 ),
9990			left: p.left - ( parseInt( this.helper.css( "left" ), 10 ) || 0 ) +
9991				( !scrollIsRootNode ? this.scrollParent.scrollLeft() : 0 )
9992		};
9993
9994	},
9995
9996	_cacheMargins: function() {
9997		this.margins = {
9998			left: ( parseInt( this.element.css( "marginLeft" ), 10 ) || 0 ),
9999			top: ( parseInt( this.element.css( "marginTop" ), 10 ) || 0 ),
10000			right: ( parseInt( this.element.css( "marginRight" ), 10 ) || 0 ),
10001			bottom: ( parseInt( this.element.css( "marginBottom" ), 10 ) || 0 )
10002		};
10003	},
10004
10005	_cacheHelperProportions: function() {
10006		this.helperProportions = {
10007			width: this.helper.outerWidth(),
10008			height: this.helper.outerHeight()
10009		};
10010	},
10011
10012	_setContainment: function() {
10013
10014		var isUserScrollable, c, ce,
10015			o = this.options,
10016			document = this.document[ 0 ];
10017
10018		this.relativeContainer = null;
10019
10020		if ( !o.containment ) {
10021			this.containment = null;
10022			return;
10023		}
10024
10025		if ( o.containment === "window" ) {
10026			this.containment = [
10027				$( window ).scrollLeft() - this.offset.relative.left - this.offset.parent.left,
10028				$( window ).scrollTop() - this.offset.relative.top - this.offset.parent.top,
10029				$( window ).scrollLeft() + $( window ).width() -
10030					this.helperProportions.width - this.margins.left,
10031				$( window ).scrollTop() +
10032					( $( window ).height() || document.body.parentNode.scrollHeight ) -
10033					this.helperProportions.height - this.margins.top
10034			];
10035			return;
10036		}
10037
10038		if ( o.containment === "document" ) {
10039			this.containment = [
10040				0,
10041				0,
10042				$( document ).width() - this.helperProportions.width - this.margins.left,
10043				( $( document ).height() || document.body.parentNode.scrollHeight ) -
10044					this.helperProportions.height - this.margins.top
10045			];
10046			return;
10047		}
10048
10049		if ( o.containment.constructor === Array ) {
10050			this.containment = o.containment;
10051			return;
10052		}
10053
10054		if ( o.containment === "parent" ) {
10055			o.containment = this.helper[ 0 ].parentNode;
10056		}
10057
10058		c = $( o.containment );
10059		ce = c[ 0 ];
10060
10061		if ( !ce ) {
10062			return;
10063		}
10064
10065		isUserScrollable = /(scroll|auto)/.test( c.css( "overflow" ) );
10066
10067		this.containment = [
10068			( parseInt( c.css( "borderLeftWidth" ), 10 ) || 0 ) +
10069				( parseInt( c.css( "paddingLeft" ), 10 ) || 0 ),
10070			( parseInt( c.css( "borderTopWidth" ), 10 ) || 0 ) +
10071				( parseInt( c.css( "paddingTop" ), 10 ) || 0 ),
10072			( isUserScrollable ? Math.max( ce.scrollWidth, ce.offsetWidth ) : ce.offsetWidth ) -
10073				( parseInt( c.css( "borderRightWidth" ), 10 ) || 0 ) -
10074				( parseInt( c.css( "paddingRight" ), 10 ) || 0 ) -
10075				this.helperProportions.width -
10076				this.margins.left -
10077				this.margins.right,
10078			( isUserScrollable ? Math.max( ce.scrollHeight, ce.offsetHeight ) : ce.offsetHeight ) -
10079				( parseInt( c.css( "borderBottomWidth" ), 10 ) || 0 ) -
10080				( parseInt( c.css( "paddingBottom" ), 10 ) || 0 ) -
10081				this.helperProportions.height -
10082				this.margins.top -
10083				this.margins.bottom
10084		];
10085		this.relativeContainer = c;
10086	},
10087
10088	_convertPositionTo: function( d, pos ) {
10089
10090		if ( !pos ) {
10091			pos = this.position;
10092		}
10093
10094		var mod = d === "absolute" ? 1 : -1,
10095			scrollIsRootNode = this._isRootNode( this.scrollParent[ 0 ] );
10096
10097		return {
10098			top: (
10099
10100				// The absolute mouse position
10101				pos.top	+
10102
10103				// Only for relative positioned nodes: Relative offset from element to offset parent
10104				this.offset.relative.top * mod +
10105
10106				// The offsetParent's offset without borders (offset + border)
10107				this.offset.parent.top * mod -
10108				( ( this.cssPosition === "fixed" ?
10109					-this.offset.scroll.top :
10110					( scrollIsRootNode ? 0 : this.offset.scroll.top ) ) * mod )
10111			),
10112			left: (
10113
10114				// The absolute mouse position
10115				pos.left +
10116
10117				// Only for relative positioned nodes: Relative offset from element to offset parent
10118				this.offset.relative.left * mod +
10119
10120				// The offsetParent's offset without borders (offset + border)
10121				this.offset.parent.left * mod	-
10122				( ( this.cssPosition === "fixed" ?
10123					-this.offset.scroll.left :
10124					( scrollIsRootNode ? 0 : this.offset.scroll.left ) ) * mod )
10125			)
10126		};
10127
10128	},
10129
10130	_generatePosition: function( event, constrainPosition ) {
10131
10132		var containment, co, top, left,
10133			o = this.options,
10134			scrollIsRootNode = this._isRootNode( this.scrollParent[ 0 ] ),
10135			pageX = event.pageX,
10136			pageY = event.pageY;
10137
10138		// Cache the scroll
10139		if ( !scrollIsRootNode || !this.offset.scroll ) {
10140			this.offset.scroll = {
10141				top: this.scrollParent.scrollTop(),
10142				left: this.scrollParent.scrollLeft()
10143			};
10144		}
10145
10146		/*
10147		 * - Position constraining -
10148		 * Constrain the position to a mix of grid, containment.
10149		 */
10150
10151		// If we are not dragging yet, we won't check for options
10152		if ( constrainPosition ) {
10153			if ( this.containment ) {
10154				if ( this.relativeContainer ) {
10155					co = this.relativeContainer.offset();
10156					containment = [
10157						this.containment[ 0 ] + co.left,
10158						this.containment[ 1 ] + co.top,
10159						this.containment[ 2 ] + co.left,
10160						this.containment[ 3 ] + co.top
10161					];
10162				} else {
10163					containment = this.containment;
10164				}
10165
10166				if ( event.pageX - this.offset.click.left < containment[ 0 ] ) {
10167					pageX = containment[ 0 ] + this.offset.click.left;
10168				}
10169				if ( event.pageY - this.offset.click.top < containment[ 1 ] ) {
10170					pageY = containment[ 1 ] + this.offset.click.top;
10171				}
10172				if ( event.pageX - this.offset.click.left > containment[ 2 ] ) {
10173					pageX = containment[ 2 ] + this.offset.click.left;
10174				}
10175				if ( event.pageY - this.offset.click.top > containment[ 3 ] ) {
10176					pageY = containment[ 3 ] + this.offset.click.top;
10177				}
10178			}
10179
10180			if ( o.grid ) {
10181
10182				//Check for grid elements set to 0 to prevent divide by 0 error causing invalid
10183				// argument errors in IE (see ticket #6950)
10184				top = o.grid[ 1 ] ? this.originalPageY + Math.round( ( pageY -
10185					this.originalPageY ) / o.grid[ 1 ] ) * o.grid[ 1 ] : this.originalPageY;
10186				pageY = containment ? ( ( top - this.offset.click.top >= containment[ 1 ] ||
10187					top - this.offset.click.top > containment[ 3 ] ) ?
10188						top :
10189						( ( top - this.offset.click.top >= containment[ 1 ] ) ?
10190							top - o.grid[ 1 ] : top + o.grid[ 1 ] ) ) : top;
10191
10192				left = o.grid[ 0 ] ? this.originalPageX +
10193					Math.round( ( pageX - this.originalPageX ) / o.grid[ 0 ] ) * o.grid[ 0 ] :
10194					this.originalPageX;
10195				pageX = containment ? ( ( left - this.offset.click.left >= containment[ 0 ] ||
10196					left - this.offset.click.left > containment[ 2 ] ) ?
10197						left :
10198						( ( left - this.offset.click.left >= containment[ 0 ] ) ?
10199							left - o.grid[ 0 ] : left + o.grid[ 0 ] ) ) : left;
10200			}
10201
10202			if ( o.axis === "y" ) {
10203				pageX = this.originalPageX;
10204			}
10205
10206			if ( o.axis === "x" ) {
10207				pageY = this.originalPageY;
10208			}
10209		}
10210
10211		return {
10212			top: (
10213
10214				// The absolute mouse position
10215				pageY -
10216
10217				// Click offset (relative to the element)
10218				this.offset.click.top -
10219
10220				// Only for relative positioned nodes: Relative offset from element to offset parent
10221				this.offset.relative.top -
10222
10223				// The offsetParent's offset without borders (offset + border)
10224				this.offset.parent.top +
10225				( this.cssPosition === "fixed" ?
10226					-this.offset.scroll.top :
10227					( scrollIsRootNode ? 0 : this.offset.scroll.top ) )
10228			),
10229			left: (
10230
10231				// The absolute mouse position
10232				pageX -
10233
10234				// Click offset (relative to the element)
10235				this.offset.click.left -
10236
10237				// Only for relative positioned nodes: Relative offset from element to offset parent
10238				this.offset.relative.left -
10239
10240				// The offsetParent's offset without borders (offset + border)
10241				this.offset.parent.left +
10242				( this.cssPosition === "fixed" ?
10243					-this.offset.scroll.left :
10244					( scrollIsRootNode ? 0 : this.offset.scroll.left ) )
10245			)
10246		};
10247
10248	},
10249
10250	_clear: function() {
10251		this._removeClass( this.helper, "ui-draggable-dragging" );
10252		if ( this.helper[ 0 ] !== this.element[ 0 ] && !this.cancelHelperRemoval ) {
10253			this.helper.remove();
10254		}
10255		this.helper = null;
10256		this.cancelHelperRemoval = false;
10257		if ( this.destroyOnClear ) {
10258			this.destroy();
10259		}
10260	},
10261
10262	// From now on bulk stuff - mainly helpers
10263
10264	_trigger: function( type, event, ui ) {
10265		ui = ui || this._uiHash();
10266		$.ui.plugin.call( this, type, [ event, ui, this ], true );
10267
10268		// Absolute position and offset (see #6884 ) have to be recalculated after plugins
10269		if ( /^(drag|start|stop)/.test( type ) ) {
10270			this.positionAbs = this._convertPositionTo( "absolute" );
10271			ui.offset = this.positionAbs;
10272		}
10273		return $.Widget.prototype._trigger.call( this, type, event, ui );
10274	},
10275
10276	plugins: {},
10277
10278	_uiHash: function() {
10279		return {
10280			helper: this.helper,
10281			position: this.position,
10282			originalPosition: this.originalPosition,
10283			offset: this.positionAbs
10284		};
10285	}
10286
10287} );
10288
10289$.ui.plugin.add( "draggable", "connectToSortable", {
10290	start: function( event, ui, draggable ) {
10291		var uiSortable = $.extend( {}, ui, {
10292			item: draggable.element
10293		} );
10294
10295		draggable.sortables = [];
10296		$( draggable.options.connectToSortable ).each( function() {
10297			var sortable = $( this ).sortable( "instance" );
10298
10299			if ( sortable && !sortable.options.disabled ) {
10300				draggable.sortables.push( sortable );
10301
10302				// RefreshPositions is called at drag start to refresh the containerCache
10303				// which is used in drag. This ensures it's initialized and synchronized
10304				// with any changes that might have happened on the page since initialization.
10305				sortable.refreshPositions();
10306				sortable._trigger( "activate", event, uiSortable );
10307			}
10308		} );
10309	},
10310	stop: function( event, ui, draggable ) {
10311		var uiSortable = $.extend( {}, ui, {
10312			item: draggable.element
10313		} );
10314
10315		draggable.cancelHelperRemoval = false;
10316
10317		$.each( draggable.sortables, function() {
10318			var sortable = this;
10319
10320			if ( sortable.isOver ) {
10321				sortable.isOver = 0;
10322
10323				// Allow this sortable to handle removing the helper
10324				draggable.cancelHelperRemoval = true;
10325				sortable.cancelHelperRemoval = false;
10326
10327				// Use _storedCSS To restore properties in the sortable,
10328				// as this also handles revert (#9675) since the draggable
10329				// may have modified them in unexpected ways (#8809)
10330				sortable._storedCSS = {
10331					position: sortable.placeholder.css( "position" ),
10332					top: sortable.placeholder.css( "top" ),
10333					left: sortable.placeholder.css( "left" )
10334				};
10335
10336				sortable._mouseStop( event );
10337
10338				// Once drag has ended, the sortable should return to using
10339				// its original helper, not the shared helper from draggable
10340				sortable.options.helper = sortable.options._helper;
10341			} else {
10342
10343				// Prevent this Sortable from removing the helper.
10344				// However, don't set the draggable to remove the helper
10345				// either as another connected Sortable may yet handle the removal.
10346				sortable.cancelHelperRemoval = true;
10347
10348				sortable._trigger( "deactivate", event, uiSortable );
10349			}
10350		} );
10351	},
10352	drag: function( event, ui, draggable ) {
10353		$.each( draggable.sortables, function() {
10354			var innermostIntersecting = false,
10355				sortable = this;
10356
10357			// Copy over variables that sortable's _intersectsWith uses
10358			sortable.positionAbs = draggable.positionAbs;
10359			sortable.helperProportions = draggable.helperProportions;
10360			sortable.offset.click = draggable.offset.click;
10361
10362			if ( sortable._intersectsWith( sortable.containerCache ) ) {
10363				innermostIntersecting = true;
10364
10365				$.each( draggable.sortables, function() {
10366
10367					// Copy over variables that sortable's _intersectsWith uses
10368					this.positionAbs = draggable.positionAbs;
10369					this.helperProportions = draggable.helperProportions;
10370					this.offset.click = draggable.offset.click;
10371
10372					if ( this !== sortable &&
10373							this._intersectsWith( this.containerCache ) &&
10374							$.contains( sortable.element[ 0 ], this.element[ 0 ] ) ) {
10375						innermostIntersecting = false;
10376					}
10377
10378					return innermostIntersecting;
10379				} );
10380			}
10381
10382			if ( innermostIntersecting ) {
10383
10384				// If it intersects, we use a little isOver variable and set it once,
10385				// so that the move-in stuff gets fired only once.
10386				if ( !sortable.isOver ) {
10387					sortable.isOver = 1;
10388
10389					// Store draggable's parent in case we need to reappend to it later.
10390					draggable._parent = ui.helper.parent();
10391
10392					sortable.currentItem = ui.helper
10393						.appendTo( sortable.element )
10394						.data( "ui-sortable-item", true );
10395
10396					// Store helper option to later restore it
vendor: 11,429 bytes, lines 10397-10771
10397					sortable.options._helper = sortable.options.helper;
10398
10399					sortable.options.helper = function() {
10400						return ui.helper[ 0 ];
10401					};
10402
10403					// Fire the start events of the sortable with our passed browser event,
10404					// and our own helper (so it doesn't create a new one)
10405					event.target = sortable.currentItem[ 0 ];
10406					sortable._mouseCapture( event, true );
10407					sortable._mouseStart( event, true, true );
10408
10409					// Because the browser event is way off the new appended portlet,
10410					// modify necessary variables to reflect the changes
10411					sortable.offset.click.top = draggable.offset.click.top;
10412					sortable.offset.click.left = draggable.offset.click.left;
10413					sortable.offset.parent.left -= draggable.offset.parent.left -
10414						sortable.offset.parent.left;
10415					sortable.offset.parent.top -= draggable.offset.parent.top -
10416						sortable.offset.parent.top;
10417
10418					draggable._trigger( "toSortable", event );
10419
10420					// Inform draggable that the helper is in a valid drop zone,
10421					// used solely in the revert option to handle "valid/invalid".
10422					draggable.dropped = sortable.element;
10423
10424					// Need to refreshPositions of all sortables in the case that
10425					// adding to one sortable changes the location of the other sortables (#9675)
10426					$.each( draggable.sortables, function() {
10427						this.refreshPositions();
10428					} );
10429
10430					// Hack so receive/update callbacks work (mostly)
10431					draggable.currentItem = draggable.element;
10432					sortable.fromOutside = draggable;
10433				}
10434
10435				if ( sortable.currentItem ) {
10436					sortable._mouseDrag( event );
10437
10438					// Copy the sortable's position because the draggable's can potentially reflect
10439					// a relative position, while sortable is always absolute, which the dragged
10440					// element has now become. (#8809)
10441					ui.position = sortable.position;
10442				}
10443			} else {
10444
10445				// If it doesn't intersect with the sortable, and it intersected before,
10446				// we fake the drag stop of the sortable, but make sure it doesn't remove
10447				// the helper by using cancelHelperRemoval.
10448				if ( sortable.isOver ) {
10449
10450					sortable.isOver = 0;
10451					sortable.cancelHelperRemoval = true;
10452
10453					// Calling sortable's mouseStop would trigger a revert,
10454					// so revert must be temporarily false until after mouseStop is called.
10455					sortable.options._revert = sortable.options.revert;
10456					sortable.options.revert = false;
10457
10458					sortable._trigger( "out", event, sortable._uiHash( sortable ) );
10459					sortable._mouseStop( event, true );
10460
10461					// Restore sortable behaviors that were modfied
10462					// when the draggable entered the sortable area (#9481)
10463					sortable.options.revert = sortable.options._revert;
10464					sortable.options.helper = sortable.options._helper;
10465
10466					if ( sortable.placeholder ) {
10467						sortable.placeholder.remove();
10468					}
10469
10470					// Restore and recalculate the draggable's offset considering the sortable
10471					// may have modified them in unexpected ways. (#8809, #10669)
10472					ui.helper.appendTo( draggable._parent );
10473					draggable._refreshOffsets( event );
10474					ui.position = draggable._generatePosition( event, true );
10475
10476					draggable._trigger( "fromSortable", event );
10477
10478					// Inform draggable that the helper is no longer in a valid drop zone
10479					draggable.dropped = false;
10480
10481					// Need to refreshPositions of all sortables just in case removing
10482					// from one sortable changes the location of other sortables (#9675)
10483					$.each( draggable.sortables, function() {
10484						this.refreshPositions();
10485					} );
10486				}
10487			}
10488		} );
10489	}
10490} );
10491
10492$.ui.plugin.add( "draggable", "cursor", {
10493	start: function( event, ui, instance ) {
10494		var t = $( "body" ),
10495			o = instance.options;
10496
10497		if ( t.css( "cursor" ) ) {
10498			o._cursor = t.css( "cursor" );
10499		}
10500		t.css( "cursor", o.cursor );
10501	},
10502	stop: function( event, ui, instance ) {
10503		var o = instance.options;
10504		if ( o._cursor ) {
10505			$( "body" ).css( "cursor", o._cursor );
10506		}
10507	}
10508} );
10509
10510$.ui.plugin.add( "draggable", "opacity", {
10511	start: function( event, ui, instance ) {
10512		var t = $( ui.helper ),
10513			o = instance.options;
10514		if ( t.css( "opacity" ) ) {
10515			o._opacity = t.css( "opacity" );
10516		}
10517		t.css( "opacity", o.opacity );
10518	},
10519	stop: function( event, ui, instance ) {
10520		var o = instance.options;
10521		if ( o._opacity ) {
10522			$( ui.helper ).css( "opacity", o._opacity );
10523		}
10524	}
10525} );
10526
10527$.ui.plugin.add( "draggable", "scroll", {
10528	start: function( event, ui, i ) {
10529		if ( !i.scrollParentNotHidden ) {
10530			i.scrollParentNotHidden = i.helper.scrollParent( false );
10531		}
10532
10533		if ( i.scrollParentNotHidden[ 0 ] !== i.document[ 0 ] &&
10534				i.scrollParentNotHidden[ 0 ].tagName !== "HTML" ) {
10535			i.overflowOffset = i.scrollParentNotHidden.offset();
10536		}
10537	},
10538	drag: function( event, ui, i  ) {
10539
10540		var o = i.options,
10541			scrolled = false,
10542			scrollParent = i.scrollParentNotHidden[ 0 ],
10543			document = i.document[ 0 ];
10544
10545		if ( scrollParent !== document && scrollParent.tagName !== "HTML" ) {
10546			if ( !o.axis || o.axis !== "x" ) {
10547				if ( ( i.overflowOffset.top + scrollParent.offsetHeight ) - event.pageY <
10548						o.scrollSensitivity ) {
10549					scrollParent.scrollTop = scrolled = scrollParent.scrollTop + o.scrollSpeed;
10550				} else if ( event.pageY - i.overflowOffset.top < o.scrollSensitivity ) {
10551					scrollParent.scrollTop = scrolled = scrollParent.scrollTop - o.scrollSpeed;
10552				}
10553			}
10554
10555			if ( !o.axis || o.axis !== "y" ) {
10556				if ( ( i.overflowOffset.left + scrollParent.offsetWidth ) - event.pageX <
10557						o.scrollSensitivity ) {
10558					scrollParent.scrollLeft = scrolled = scrollParent.scrollLeft + o.scrollSpeed;
10559				} else if ( event.pageX - i.overflowOffset.left < o.scrollSensitivity ) {
10560					scrollParent.scrollLeft = scrolled = scrollParent.scrollLeft - o.scrollSpeed;
10561				}
10562			}
10563
10564		} else {
10565
10566			if ( !o.axis || o.axis !== "x" ) {
10567				if ( event.pageY - $( document ).scrollTop() < o.scrollSensitivity ) {
10568					scrolled = $( document ).scrollTop( $( document ).scrollTop() - o.scrollSpeed );
10569				} else if ( $( window ).height() - ( event.pageY - $( document ).scrollTop() ) <
10570						o.scrollSensitivity ) {
10571					scrolled = $( document ).scrollTop( $( document ).scrollTop() + o.scrollSpeed );
10572				}
10573			}
10574
10575			if ( !o.axis || o.axis !== "y" ) {
10576				if ( event.pageX - $( document ).scrollLeft() < o.scrollSensitivity ) {
10577					scrolled = $( document ).scrollLeft(
10578						$( document ).scrollLeft() - o.scrollSpeed
10579					);
10580				} else if ( $( window ).width() - ( event.pageX - $( document ).scrollLeft() ) <
10581						o.scrollSensitivity ) {
10582					scrolled = $( document ).scrollLeft(
10583						$( document ).scrollLeft() + o.scrollSpeed
10584					);
10585				}
10586			}
10587
10588		}
10589
10590		if ( scrolled !== false && $.ui.ddmanager && !o.dropBehaviour ) {
10591			$.ui.ddmanager.prepareOffsets( i, event );
10592		}
10593
10594	}
10595} );
10596
10597$.ui.plugin.add( "draggable", "snap", {
10598	start: function( event, ui, i ) {
10599
10600		var o = i.options;
10601
10602		i.snapElements = [];
10603
10604		$( o.snap.constructor !== String ? ( o.snap.items || ":data(ui-draggable)" ) : o.snap )
10605			.each( function() {
10606				var $t = $( this ),
10607					$o = $t.offset();
10608				if ( this !== i.element[ 0 ] ) {
10609					i.snapElements.push( {
10610						item: this,
10611						width: $t.outerWidth(), height: $t.outerHeight(),
10612						top: $o.top, left: $o.left
10613					} );
10614				}
10615			} );
10616
10617	},
10618	drag: function( event, ui, inst ) {
10619
10620		var ts, bs, ls, rs, l, r, t, b, i, first,
10621			o = inst.options,
10622			d = o.snapTolerance,
10623			x1 = ui.offset.left, x2 = x1 + inst.helperProportions.width,
10624			y1 = ui.offset.top, y2 = y1 + inst.helperProportions.height;
10625
10626		for ( i = inst.snapElements.length - 1; i >= 0; i-- ) {
10627
10628			l = inst.snapElements[ i ].left - inst.margins.left;
10629			r = l + inst.snapElements[ i ].width;
10630			t = inst.snapElements[ i ].top - inst.margins.top;
10631			b = t + inst.snapElements[ i ].height;
10632
10633			if ( x2 < l - d || x1 > r + d || y2 < t - d || y1 > b + d ||
10634					!$.contains( inst.snapElements[ i ].item.ownerDocument,
10635					inst.snapElements[ i ].item ) ) {
10636				if ( inst.snapElements[ i ].snapping ) {
10637					( inst.options.snap.release &&
10638						inst.options.snap.release.call(
10639							inst.element,
10640							event,
10641							$.extend( inst._uiHash(), { snapItem: inst.snapElements[ i ].item } )
10642						) );
10643				}
10644				inst.snapElements[ i ].snapping = false;
10645				continue;
10646			}
10647
10648			if ( o.snapMode !== "inner" ) {
10649				ts = Math.abs( t - y2 ) <= d;
10650				bs = Math.abs( b - y1 ) <= d;
10651				ls = Math.abs( l - x2 ) <= d;
10652				rs = Math.abs( r - x1 ) <= d;
10653				if ( ts ) {
10654					ui.position.top = inst._convertPositionTo( "relative", {
10655						top: t - inst.helperProportions.height,
10656						left: 0
10657					} ).top;
10658				}
10659				if ( bs ) {
10660					ui.position.top = inst._convertPositionTo( "relative", {
10661						top: b,
10662						left: 0
10663					} ).top;
10664				}
10665				if ( ls ) {
10666					ui.position.left = inst._convertPositionTo( "relative", {
10667						top: 0,
10668						left: l - inst.helperProportions.width
10669					} ).left;
10670				}
10671				if ( rs ) {
10672					ui.position.left = inst._convertPositionTo( "relative", {
10673						top: 0,
10674						left: r
10675					} ).left;
10676				}
10677			}
10678
10679			first = ( ts || bs || ls || rs );
10680
10681			if ( o.snapMode !== "outer" ) {
10682				ts = Math.abs( t - y1 ) <= d;
10683				bs = Math.abs( b - y2 ) <= d;
10684				ls = Math.abs( l - x1 ) <= d;
10685				rs = Math.abs( r - x2 ) <= d;
10686				if ( ts ) {
10687					ui.position.top = inst._convertPositionTo( "relative", {
10688						top: t,
10689						left: 0
10690					} ).top;
10691				}
10692				if ( bs ) {
10693					ui.position.top = inst._convertPositionTo( "relative", {
10694						top: b - inst.helperProportions.height,
10695						left: 0
10696					} ).top;
10697				}
10698				if ( ls ) {
10699					ui.position.left = inst._convertPositionTo( "relative", {
10700						top: 0,
10701						left: l
10702					} ).left;
10703				}
10704				if ( rs ) {
10705					ui.position.left = inst._convertPositionTo( "relative", {
10706						top: 0,
10707						left: r - inst.helperProportions.width
10708					} ).left;
10709				}
10710			}
10711
10712			if ( !inst.snapElements[ i ].snapping && ( ts || bs || ls || rs || first ) ) {
10713				( inst.options.snap.snap &&
10714					inst.options.snap.snap.call(
10715						inst.element,
10716						event,
10717						$.extend( inst._uiHash(), {
10718							snapItem: inst.snapElements[ i ].item
10719						} ) ) );
10720			}
10721			inst.snapElements[ i ].snapping = ( ts || bs || ls || rs || first );
10722
10723		}
10724
10725	}
10726} );
10727
10728$.ui.plugin.add( "draggable", "stack", {
10729	start: function( event, ui, instance ) {
10730		var min,
10731			o = instance.options,
10732			group = $.makeArray( $( o.stack ) ).sort( function( a, b ) {
10733				return ( parseInt( $( a ).css( "zIndex" ), 10 ) || 0 ) -
10734					( parseInt( $( b ).css( "zIndex" ), 10 ) || 0 );
10735			} );
10736
10737		if ( !group.length ) { return; }
10738
10739		min = parseInt( $( group[ 0 ] ).css( "zIndex" ), 10 ) || 0;
10740		$( group ).each( function( i ) {
10741			$( this ).css( "zIndex", min + i );
10742		} );
10743		this.css( "zIndex", ( min + group.length ) );
10744	}
10745} );
10746
10747$.ui.plugin.add( "draggable", "zIndex", {
10748	start: function( event, ui, instance ) {
10749		var t = $( ui.helper ),
10750			o = instance.options;
10751
10752		if ( t.css( "zIndex" ) ) {
10753			o._zIndex = t.css( "zIndex" );
10754		}
10755		t.css( "zIndex", o.zIndex );
10756	},
10757	stop: function( event, ui, instance ) {
10758		var o = instance.options;
10759
10760		if ( o._zIndex ) {
10761			$( ui.helper ).css( "zIndex", o._zIndex );
10762		}
10763	}
10764} );
10765
10766var widgetsDraggable = $.ui.draggable;
10767
10768
10769/*!
10770 * jQuery UI Resizable 1.12.1
10771 * http://jqueryui.com
vendor: 6,932 bytes, lines 10772-11050
10772 *
10773 * Copyright jQuery Foundation and other contributors
10774 * Released under the MIT license.
10775 * http://jquery.org/license
10776 */
10777
10778//>>label: Resizable
10779//>>group: Interactions
10780//>>description: Enables resize functionality for any element.
10781//>>docs: http://api.jqueryui.com/resizable/
10782//>>demos: http://jqueryui.com/resizable/
10783//>>css.structure: ../../themes/base/core.css
10784//>>css.structure: ../../themes/base/resizable.css
10785//>>css.theme: ../../themes/base/theme.css
10786
10787
10788
10789$.widget( "ui.resizable", $.ui.mouse, {
10790	version: "1.12.1",
10791	widgetEventPrefix: "resize",
10792	options: {
10793		alsoResize: false,
10794		animate: false,
10795		animateDuration: "slow",
10796		animateEasing: "swing",
10797		aspectRatio: false,
10798		autoHide: false,
10799		classes: {
10800			"ui-resizable-se": "ui-icon ui-icon-gripsmall-diagonal-se"
10801		},
10802		containment: false,
10803		ghost: false,
10804		grid: false,
10805		handles: "e,s,se",
10806		helper: false,
10807		maxHeight: null,
10808		maxWidth: null,
10809		minHeight: 10,
10810		minWidth: 10,
10811
10812		// See #7960
10813		zIndex: 90,
10814
10815		// Callbacks
10816		resize: null,
10817		start: null,
10818		stop: null
10819	},
10820
10821	_num: function( value ) {
10822		return parseFloat( value ) || 0;
10823	},
10824
10825	_isNumber: function( value ) {
10826		return !isNaN( parseFloat( value ) );
10827	},
10828
10829	_hasScroll: function( el, a ) {
10830
10831		if ( $( el ).css( "overflow" ) === "hidden" ) {
10832			return false;
10833		}
10834
10835		var scroll = ( a && a === "left" ) ? "scrollLeft" : "scrollTop",
10836			has = false;
10837
10838		if ( el[ scroll ] > 0 ) {
10839			return true;
10840		}
10841
10842		// TODO: determine which cases actually cause this to happen
10843		// if the element doesn't have the scroll set, see if it's possible to
10844		// set the scroll
10845		el[ scroll ] = 1;
10846		has = ( el[ scroll ] > 0 );
10847		el[ scroll ] = 0;
10848		return has;
10849	},
10850
10851	_create: function() {
10852
10853		var margins,
10854			o = this.options,
10855			that = this;
10856		this._addClass( "ui-resizable" );
10857
10858		$.extend( this, {
10859			_aspectRatio: !!( o.aspectRatio ),
10860			aspectRatio: o.aspectRatio,
10861			originalElement: this.element,
10862			_proportionallyResizeElements: [],
10863			_helper: o.helper || o.ghost || o.animate ? o.helper || "ui-resizable-helper" : null
10864		} );
10865
10866		// Wrap the element if it cannot hold child nodes
10867		if ( this.element[ 0 ].nodeName.match( /^(canvas|textarea|input|select|button|img)$/i ) ) {
10868
10869			this.element.wrap(
10870				$( "<div class='ui-wrapper' style='overflow: hidden;'></div>" ).css( {
10871					position: this.element.css( "position" ),
10872					width: this.element.outerWidth(),
10873					height: this.element.outerHeight(),
10874					top: this.element.css( "top" ),
10875					left: this.element.css( "left" )
10876				} )
10877			);
10878
10879			this.element = this.element.parent().data(
10880				"ui-resizable", this.element.resizable( "instance" )
10881			);
10882
10883			this.elementIsWrapper = true;
10884
10885			margins = {
10886				marginTop: this.originalElement.css( "marginTop" ),
10887				marginRight: this.originalElement.css( "marginRight" ),
10888				marginBottom: this.originalElement.css( "marginBottom" ),
10889				marginLeft: this.originalElement.css( "marginLeft" )
10890			};
10891
10892			this.element.css( margins );
10893			this.originalElement.css( "margin", 0 );
10894
10895			// support: Safari
10896			// Prevent Safari textarea resize
10897			this.originalResizeStyle = this.originalElement.css( "resize" );
10898			this.originalElement.css( "resize", "none" );
10899
10900			this._proportionallyResizeElements.push( this.originalElement.css( {
10901				position: "static",
10902				zoom: 1,
10903				display: "block"
10904			} ) );
10905
10906			// Support: IE9
10907			// avoid IE jump (hard set the margin)
10908			this.originalElement.css( margins );
10909
10910			this._proportionallyResize();
10911		}
10912
10913		this._setupHandles();
10914
10915		if ( o.autoHide ) {
10916			$( this.element )
10917				.on( "mouseenter", function() {
10918					if ( o.disabled ) {
10919						return;
10920					}
10921					that._removeClass( "ui-resizable-autohide" );
10922					that._handles.show();
10923				} )
10924				.on( "mouseleave", function() {
10925					if ( o.disabled ) {
10926						return;
10927					}
10928					if ( !that.resizing ) {
10929						that._addClass( "ui-resizable-autohide" );
10930						that._handles.hide();
10931					}
10932				} );
10933		}
10934
10935		this._mouseInit();
10936	},
10937
10938	_destroy: function() {
10939
10940		this._mouseDestroy();
10941
10942		var wrapper,
10943			_destroy = function( exp ) {
10944				$( exp )
10945					.removeData( "resizable" )
10946					.removeData( "ui-resizable" )
10947					.off( ".resizable" )
10948					.find( ".ui-resizable-handle" )
10949						.remove();
10950			};
10951
10952		// TODO: Unwrap at same DOM position
10953		if ( this.elementIsWrapper ) {
10954			_destroy( this.element );
10955			wrapper = this.element;
10956			this.originalElement.css( {
10957				position: wrapper.css( "position" ),
10958				width: wrapper.outerWidth(),
10959				height: wrapper.outerHeight(),
10960				top: wrapper.css( "top" ),
10961				left: wrapper.css( "left" )
10962			} ).insertAfter( wrapper );
10963			wrapper.remove();
10964		}
10965
10966		this.originalElement.css( "resize", this.originalResizeStyle );
10967		_destroy( this.originalElement );
10968
10969		return this;
10970	},
10971
10972	_setOption: function( key, value ) {
10973		this._super( key, value );
10974
10975		switch ( key ) {
10976		case "handles":
10977			this._removeHandles();
10978			this._setupHandles();
10979			break;
10980		default:
10981			break;
10982		}
10983	},
10984
10985	_setupHandles: function() {
10986		var o = this.options, handle, i, n, hname, axis, that = this;
10987		this.handles = o.handles ||
10988			( !$( ".ui-resizable-handle", this.element ).length ?
10989				"e,s,se" : {
10990					n: ".ui-resizable-n",
10991					e: ".ui-resizable-e",
10992					s: ".ui-resizable-s",
10993					w: ".ui-resizable-w",
10994					se: ".ui-resizable-se",
10995					sw: ".ui-resizable-sw",
10996					ne: ".ui-resizable-ne",
10997					nw: ".ui-resizable-nw"
10998				} );
10999
11000		this._handles = $();
11001		if ( this.handles.constructor === String ) {
11002
11003			if ( this.handles === "all" ) {
11004				this.handles = "n,e,s,w,se,sw,ne,nw";
11005			}
11006
11007			n = this.handles.split( "," );
11008			this.handles = {};
11009
11010			for ( i = 0; i < n.length; i++ ) {
11011
11012				handle = $.trim( n[ i ] );
11013				hname = "ui-resizable-" + handle;
11014				axis = $( "<div>" );
11015				this._addClass( axis, "ui-resizable-handle " + hname );
11016
11017				axis.css( { zIndex: o.zIndex } );
11018
11019				this.handles[ handle ] = ".ui-resizable-" + handle;
11020				this.element.append( axis );
11021			}
11022
11023		}
11024
11025		this._renderAxis = function( target ) {
11026
11027			var i, axis, padPos, padWrapper;
11028
11029			target = target || this.element;
11030
11031			for ( i in this.handles ) {
11032
11033				if ( this.handles[ i ].constructor === String ) {
11034					this.handles[ i ] = this.element.children( this.handles[ i ] ).first().show();
11035				} else if ( this.handles[ i ].jquery || this.handles[ i ].nodeType ) {
11036					this.handles[ i ] = $( this.handles[ i ] );
11037					this._on( this.handles[ i ], { "mousedown": that._mouseDown } );
11038				}
11039
11040				if ( this.elementIsWrapper &&
11041						this.originalElement[ 0 ]
11042							.nodeName
11043							.match( /^(textarea|input|select|button)$/i ) ) {
11044					axis = $( this.handles[ i ], this.element );
11045
11046					padWrapper = /sw|ne|nw|se|n|s/.test( i ) ?
11047						axis.outerHeight() :
11048						axis.outerWidth();
11049
11050					padPos = [ "padding",
vendor: 4,678 bytes, lines 11051-11231
11051						/ne|nw|n/.test( i ) ? "Top" :
11052						/se|sw|s/.test( i ) ? "Bottom" :
11053						/^e$/.test( i ) ? "Right" : "Left" ].join( "" );
11054
11055					target.css( padPos, padWrapper );
11056
11057					this._proportionallyResize();
11058				}
11059
11060				this._handles = this._handles.add( this.handles[ i ] );
11061			}
11062		};
11063
11064		// TODO: make renderAxis a prototype function
11065		this._renderAxis( this.element );
11066
11067		this._handles = this._handles.add( this.element.find( ".ui-resizable-handle" ) );
11068		this._handles.disableSelection();
11069
11070		this._handles.on( "mouseover", function() {
11071			if ( !that.resizing ) {
11072				if ( this.className ) {
11073					axis = this.className.match( /ui-resizable-(se|sw|ne|nw|n|e|s|w)/i );
11074				}
11075				that.axis = axis && axis[ 1 ] ? axis[ 1 ] : "se";
11076			}
11077		} );
11078
11079		if ( o.autoHide ) {
11080			this._handles.hide();
11081			this._addClass( "ui-resizable-autohide" );
11082		}
11083	},
11084
11085	_removeHandles: function() {
11086		this._handles.remove();
11087	},
11088
11089	_mouseCapture: function( event ) {
11090		var i, handle,
11091			capture = false;
11092
11093		for ( i in this.handles ) {
11094			handle = $( this.handles[ i ] )[ 0 ];
11095			if ( handle === event.target || $.contains( handle, event.target ) ) {
11096				capture = true;
11097			}
11098		}
11099
11100		return !this.options.disabled && capture;
11101	},
11102
11103	_mouseStart: function( event ) {
11104
11105		var curleft, curtop, cursor,
11106			o = this.options,
11107			el = this.element;
11108
11109		this.resizing = true;
11110
11111		this._renderProxy();
11112
11113		curleft = this._num( this.helper.css( "left" ) );
11114		curtop = this._num( this.helper.css( "top" ) );
11115
11116		if ( o.containment ) {
11117			curleft += $( o.containment ).scrollLeft() || 0;
11118			curtop += $( o.containment ).scrollTop() || 0;
11119		}
11120
11121		this.offset = this.helper.offset();
11122		this.position = { left: curleft, top: curtop };
11123
11124		this.size = this._helper ? {
11125				width: this.helper.width(),
11126				height: this.helper.height()
11127			} : {
11128				width: el.width(),
11129				height: el.height()
11130			};
11131
11132		this.originalSize = this._helper ? {
11133				width: el.outerWidth(),
11134				height: el.outerHeight()
11135			} : {
11136				width: el.width(),
11137				height: el.height()
11138			};
11139
11140		this.sizeDiff = {
11141			width: el.outerWidth() - el.width(),
11142			height: el.outerHeight() - el.height()
11143		};
11144
11145		this.originalPosition = { left: curleft, top: curtop };
11146		this.originalMousePosition = { left: event.pageX, top: event.pageY };
11147
11148		this.aspectRatio = ( typeof o.aspectRatio === "number" ) ?
11149			o.aspectRatio :
11150			( ( this.originalSize.width / this.originalSize.height ) || 1 );
11151
11152		cursor = $( ".ui-resizable-" + this.axis ).css( "cursor" );
11153		$( "body" ).css( "cursor", cursor === "auto" ? this.axis + "-resize" : cursor );
11154
11155		this._addClass( "ui-resizable-resizing" );
11156		this._propagate( "start", event );
11157		return true;
11158	},
11159
11160	_mouseDrag: function( event ) {
11161
11162		var data, props,
11163			smp = this.originalMousePosition,
11164			a = this.axis,
11165			dx = ( event.pageX - smp.left ) || 0,
11166			dy = ( event.pageY - smp.top ) || 0,
11167			trigger = this._change[ a ];
11168
11169		this._updatePrevProperties();
11170
11171		if ( !trigger ) {
11172			return false;
11173		}
11174
11175		data = trigger.apply( this, [ event, dx, dy ] );
11176
11177		this._updateVirtualBoundaries( event.shiftKey );
11178		if ( this._aspectRatio || event.shiftKey ) {
11179			data = this._updateRatio( data, event );
11180		}
11181
11182		data = this._respectSize( data, event );
11183
11184		this._updateCache( data );
11185
11186		this._propagate( "resize", event );
11187
11188		props = this._applyChanges();
11189
11190		if ( !this._helper && this._proportionallyResizeElements.length ) {
11191			this._proportionallyResize();
11192		}
11193
11194		if ( !$.isEmptyObject( props ) ) {
11195			this._updatePrevProperties();
11196			this._trigger( "resize", event, this.ui() );
11197			this._applyChanges();
11198		}
11199
11200		return false;
11201	},
11202
11203	_mouseStop: function( event ) {
11204
11205		this.resizing = false;
11206		var pr, ista, soffseth, soffsetw, s, left, top,
11207			o = this.options, that = this;
11208
11209		if ( this._helper ) {
11210
11211			pr = this._proportionallyResizeElements;
11212			ista = pr.length && ( /textarea/i ).test( pr[ 0 ].nodeName );
11213			soffseth = ista && this._hasScroll( pr[ 0 ], "left" ) ? 0 : that.sizeDiff.height;
11214			soffsetw = ista ? 0 : that.sizeDiff.width;
11215
11216			s = {
11217				width: ( that.helper.width()  - soffsetw ),
11218				height: ( that.helper.height() - soffseth )
11219			};
11220			left = ( parseFloat( that.element.css( "left" ) ) +
11221				( that.position.left - that.originalPosition.left ) ) || null;
11222			top = ( parseFloat( that.element.css( "top" ) ) +
11223				( that.position.top - that.originalPosition.top ) ) || null;
11224
11225			if ( !o.animate ) {
11226				this.element.css( $.extend( s, { top: top, left: left } ) );
11227			}
11228
11229			that.helper.height( that.size.height );
11230			that.helper.width( that.size.width );
11231
vendor: 6,168 bytes, lines 11232-11472
11232			if ( this._helper && !o.animate ) {
11233				this._proportionallyResize();
11234			}
11235		}
11236
11237		$( "body" ).css( "cursor", "auto" );
11238
11239		this._removeClass( "ui-resizable-resizing" );
11240
11241		this._propagate( "stop", event );
11242
11243		if ( this._helper ) {
11244			this.helper.remove();
11245		}
11246
11247		return false;
11248
11249	},
11250
11251	_updatePrevProperties: function() {
11252		this.prevPosition = {
11253			top: this.position.top,
11254			left: this.position.left
11255		};
11256		this.prevSize = {
11257			width: this.size.width,
11258			height: this.size.height
11259		};
11260	},
11261
11262	_applyChanges: function() {
11263		var props = {};
11264
11265		if ( this.position.top !== this.prevPosition.top ) {
11266			props.top = this.position.top + "px";
11267		}
11268		if ( this.position.left !== this.prevPosition.left ) {
11269			props.left = this.position.left + "px";
11270		}
11271		if ( this.size.width !== this.prevSize.width ) {
11272			props.width = this.size.width + "px";
11273		}
11274		if ( this.size.height !== this.prevSize.height ) {
11275			props.height = this.size.height + "px";
11276		}
11277
11278		this.helper.css( props );
11279
11280		return props;
11281	},
11282
11283	_updateVirtualBoundaries: function( forceAspectRatio ) {
11284		var pMinWidth, pMaxWidth, pMinHeight, pMaxHeight, b,
11285			o = this.options;
11286
11287		b = {
11288			minWidth: this._isNumber( o.minWidth ) ? o.minWidth : 0,
11289			maxWidth: this._isNumber( o.maxWidth ) ? o.maxWidth : Infinity,
11290			minHeight: this._isNumber( o.minHeight ) ? o.minHeight : 0,
11291			maxHeight: this._isNumber( o.maxHeight ) ? o.maxHeight : Infinity
11292		};
11293
11294		if ( this._aspectRatio || forceAspectRatio ) {
11295			pMinWidth = b.minHeight * this.aspectRatio;
11296			pMinHeight = b.minWidth / this.aspectRatio;
11297			pMaxWidth = b.maxHeight * this.aspectRatio;
11298			pMaxHeight = b.maxWidth / this.aspectRatio;
11299
11300			if ( pMinWidth > b.minWidth ) {
11301				b.minWidth = pMinWidth;
11302			}
11303			if ( pMinHeight > b.minHeight ) {
11304				b.minHeight = pMinHeight;
11305			}
11306			if ( pMaxWidth < b.maxWidth ) {
11307				b.maxWidth = pMaxWidth;
11308			}
11309			if ( pMaxHeight < b.maxHeight ) {
11310				b.maxHeight = pMaxHeight;
11311			}
11312		}
11313		this._vBoundaries = b;
11314	},
11315
11316	_updateCache: function( data ) {
11317		this.offset = this.helper.offset();
11318		if ( this._isNumber( data.left ) ) {
11319			this.position.left = data.left;
11320		}
11321		if ( this._isNumber( data.top ) ) {
11322			this.position.top = data.top;
11323		}
11324		if ( this._isNumber( data.height ) ) {
11325			this.size.height = data.height;
11326		}
11327		if ( this._isNumber( data.width ) ) {
11328			this.size.width = data.width;
11329		}
11330	},
11331
11332	_updateRatio: function( data ) {
11333
11334		var cpos = this.position,
11335			csize = this.size,
11336			a = this.axis;
11337
11338		if ( this._isNumber( data.height ) ) {
11339			data.width = ( data.height * this.aspectRatio );
11340		} else if ( this._isNumber( data.width ) ) {
11341			data.height = ( data.width / this.aspectRatio );
11342		}
11343
11344		if ( a === "sw" ) {
11345			data.left = cpos.left + ( csize.width - data.width );
11346			data.top = null;
11347		}
11348		if ( a === "nw" ) {
11349			data.top = cpos.top + ( csize.height - data.height );
11350			data.left = cpos.left + ( csize.width - data.width );
11351		}
11352
11353		return data;
11354	},
11355
11356	_respectSize: function( data ) {
11357
11358		var o = this._vBoundaries,
11359			a = this.axis,
11360			ismaxw = this._isNumber( data.width ) && o.maxWidth && ( o.maxWidth < data.width ),
11361			ismaxh = this._isNumber( data.height ) && o.maxHeight && ( o.maxHeight < data.height ),
11362			isminw = this._isNumber( data.width ) && o.minWidth && ( o.minWidth > data.width ),
11363			isminh = this._isNumber( data.height ) && o.minHeight && ( o.minHeight > data.height ),
11364			dw = this.originalPosition.left + this.originalSize.width,
11365			dh = this.originalPosition.top + this.originalSize.height,
11366			cw = /sw|nw|w/.test( a ), ch = /nw|ne|n/.test( a );
11367		if ( isminw ) {
11368			data.width = o.minWidth;
11369		}
11370		if ( isminh ) {
11371			data.height = o.minHeight;
11372		}
11373		if ( ismaxw ) {
11374			data.width = o.maxWidth;
11375		}
11376		if ( ismaxh ) {
11377			data.height = o.maxHeight;
11378		}
11379
11380		if ( isminw && cw ) {
11381			data.left = dw - o.minWidth;
11382		}
11383		if ( ismaxw && cw ) {
11384			data.left = dw - o.maxWidth;
11385		}
11386		if ( isminh && ch ) {
11387			data.top = dh - o.minHeight;
11388		}
11389		if ( ismaxh && ch ) {
11390			data.top = dh - o.maxHeight;
11391		}
11392
11393		// Fixing jump error on top/left - bug #2330
11394		if ( !data.width && !data.height && !data.left && data.top ) {
11395			data.top = null;
11396		} else if ( !data.width && !data.height && !data.top && data.left ) {
11397			data.left = null;
11398		}
11399
11400		return data;
11401	},
11402
11403	_getPaddingPlusBorderDimensions: function( element ) {
11404		var i = 0,
11405			widths = [],
11406			borders = [
11407				element.css( "borderTopWidth" ),
11408				element.css( "borderRightWidth" ),
11409				element.css( "borderBottomWidth" ),
11410				element.css( "borderLeftWidth" )
11411			],
11412			paddings = [
11413				element.css( "paddingTop" ),
11414				element.css( "paddingRight" ),
11415				element.css( "paddingBottom" ),
11416				element.css( "paddingLeft" )
11417			];
11418
11419		for ( ; i < 4; i++ ) {
11420			widths[ i ] = ( parseFloat( borders[ i ] ) || 0 );
11421			widths[ i ] += ( parseFloat( paddings[ i ] ) || 0 );
11422		}
11423
11424		return {
11425			height: widths[ 0 ] + widths[ 2 ],
11426			width: widths[ 1 ] + widths[ 3 ]
11427		};
11428	},
11429
11430	_proportionallyResize: function() {
11431
11432		if ( !this._proportionallyResizeElements.length ) {
11433			return;
11434		}
11435
11436		var prel,
11437			i = 0,
11438			element = this.helper || this.element;
11439
11440		for ( ; i < this._proportionallyResizeElements.length; i++ ) {
11441
11442			prel = this._proportionallyResizeElements[ i ];
11443
11444			// TODO: Seems like a bug to cache this.outerDimensions
11445			// considering that we are in a loop.
11446			if ( !this.outerDimensions ) {
11447				this.outerDimensions = this._getPaddingPlusBorderDimensions( prel );
11448			}
11449
11450			prel.css( {
11451				height: ( element.height() - this.outerDimensions.height ) || 0,
11452				width: ( element.width() - this.outerDimensions.width ) || 0
11453			} );
11454
11455		}
11456
11457	},
11458
11459	_renderProxy: function() {
11460
11461		var el = this.element, o = this.options;
11462		this.elementOffset = el.offset();
11463
11464		if ( this._helper ) {
11465
11466			this.helper = this.helper || $( "<div style='overflow:hidden;'></div>" );
11467
11468			this._addClass( this.helper, this._helper );
11469			this.helper.css( {
11470				width: this.element.outerWidth(),
11471				height: this.element.outerHeight(),
11472				position: "absolute",
vendor: 1,421 bytes, lines 11473-11520
11473				left: this.elementOffset.left + "px",
11474				top: this.elementOffset.top + "px",
11475				zIndex: ++o.zIndex //TODO: Don't modify option
11476			} );
11477
11478			this.helper
11479				.appendTo( "body" )
11480				.disableSelection();
11481
11482		} else {
11483			this.helper = this.element;
11484		}
11485
11486	},
11487
11488	_change: {
11489		e: function( event, dx ) {
11490			return { width: this.originalSize.width + dx };
11491		},
11492		w: function( event, dx ) {
11493			var cs = this.originalSize, sp = this.originalPosition;
11494			return { left: sp.left + dx, width: cs.width - dx };
11495		},
11496		n: function( event, dx, dy ) {
11497			var cs = this.originalSize, sp = this.originalPosition;
11498			return { top: sp.top + dy, height: cs.height - dy };
11499		},
11500		s: function( event, dx, dy ) {
11501			return { height: this.originalSize.height + dy };
11502		},
11503		se: function( event, dx, dy ) {
11504			return $.extend( this._change.s.apply( this, arguments ),
11505				this._change.e.apply( this, [ event, dx, dy ] ) );
11506		},
11507		sw: function( event, dx, dy ) {
11508			return $.extend( this._change.s.apply( this, arguments ),
11509				this._change.w.apply( this, [ event, dx, dy ] ) );
11510		},
11511		ne: function( event, dx, dy ) {
11512			return $.extend( this._change.n.apply( this, arguments ),
11513				this._change.e.apply( this, [ event, dx, dy ] ) );
11514		},
11515		nw: function( event, dx, dy ) {
11516			return $.extend( this._change.n.apply( this, arguments ),
11517				this._change.w.apply( this, [ event, dx, dy ] ) );
11518		}
11519	},
11520
vendor: 9,740 bytes, lines 11521-11886
11521	_propagate: function( n, event ) {
11522		$.ui.plugin.call( this, n, [ event, this.ui() ] );
11523		( n !== "resize" && this._trigger( n, event, this.ui() ) );
11524	},
11525
11526	plugins: {},
11527
11528	ui: function() {
11529		return {
11530			originalElement: this.originalElement,
11531			element: this.element,
11532			helper: this.helper,
11533			position: this.position,
11534			size: this.size,
11535			originalSize: this.originalSize,
11536			originalPosition: this.originalPosition
11537		};
11538	}
11539
11540} );
11541
11542/*
11543 * Resizable Extensions
11544 */
11545
11546$.ui.plugin.add( "resizable", "animate", {
11547
11548	stop: function( event ) {
11549		var that = $( this ).resizable( "instance" ),
11550			o = that.options,
11551			pr = that._proportionallyResizeElements,
11552			ista = pr.length && ( /textarea/i ).test( pr[ 0 ].nodeName ),
11553			soffseth = ista && that._hasScroll( pr[ 0 ], "left" ) ? 0 : that.sizeDiff.height,
11554			soffsetw = ista ? 0 : that.sizeDiff.width,
11555			style = {
11556				width: ( that.size.width - soffsetw ),
11557				height: ( that.size.height - soffseth )
11558			},
11559			left = ( parseFloat( that.element.css( "left" ) ) +
11560				( that.position.left - that.originalPosition.left ) ) || null,
11561			top = ( parseFloat( that.element.css( "top" ) ) +
11562				( that.position.top - that.originalPosition.top ) ) || null;
11563
11564		that.element.animate(
11565			$.extend( style, top && left ? { top: top, left: left } : {} ), {
11566				duration: o.animateDuration,
11567				easing: o.animateEasing,
11568				step: function() {
11569
11570					var data = {
11571						width: parseFloat( that.element.css( "width" ) ),
11572						height: parseFloat( that.element.css( "height" ) ),
11573						top: parseFloat( that.element.css( "top" ) ),
11574						left: parseFloat( that.element.css( "left" ) )
11575					};
11576
11577					if ( pr && pr.length ) {
11578						$( pr[ 0 ] ).css( { width: data.width, height: data.height } );
11579					}
11580
11581					// Propagating resize, and updating values for each animation step
11582					that._updateCache( data );
11583					that._propagate( "resize", event );
11584
11585				}
11586			}
11587		);
11588	}
11589
11590} );
11591
11592$.ui.plugin.add( "resizable", "containment", {
11593
11594	start: function() {
11595		var element, p, co, ch, cw, width, height,
11596			that = $( this ).resizable( "instance" ),
11597			o = that.options,
11598			el = that.element,
11599			oc = o.containment,
11600			ce = ( oc instanceof $ ) ?
11601				oc.get( 0 ) :
11602				( /parent/.test( oc ) ) ? el.parent().get( 0 ) : oc;
11603
11604		if ( !ce ) {
11605			return;
11606		}
11607
11608		that.containerElement = $( ce );
11609
11610		if ( /document/.test( oc ) || oc === document ) {
11611			that.containerOffset = {
11612				left: 0,
11613				top: 0
11614			};
11615			that.containerPosition = {
11616				left: 0,
11617				top: 0
11618			};
11619
11620			that.parentData = {
11621				element: $( document ),
11622				left: 0,
11623				top: 0,
11624				width: $( document ).width(),
11625				height: $( document ).height() || document.body.parentNode.scrollHeight
11626			};
11627		} else {
11628			element = $( ce );
11629			p = [];
11630			$( [ "Top", "Right", "Left", "Bottom" ] ).each( function( i, name ) {
11631				p[ i ] = that._num( element.css( "padding" + name ) );
11632			} );
11633
11634			that.containerOffset = element.offset();
11635			that.containerPosition = element.position();
11636			that.containerSize = {
11637				height: ( element.innerHeight() - p[ 3 ] ),
11638				width: ( element.innerWidth() - p[ 1 ] )
11639			};
11640
11641			co = that.containerOffset;
11642			ch = that.containerSize.height;
11643			cw = that.containerSize.width;
11644			width = ( that._hasScroll ( ce, "left" ) ? ce.scrollWidth : cw );
11645			height = ( that._hasScroll ( ce ) ? ce.scrollHeight : ch ) ;
11646
11647			that.parentData = {
11648				element: ce,
11649				left: co.left,
11650				top: co.top,
11651				width: width,
11652				height: height
11653			};
11654		}
11655	},
11656
11657	resize: function( event ) {
11658		var woset, hoset, isParent, isOffsetRelative,
11659			that = $( this ).resizable( "instance" ),
11660			o = that.options,
11661			co = that.containerOffset,
11662			cp = that.position,
11663			pRatio = that._aspectRatio || event.shiftKey,
11664			cop = {
11665				top: 0,
11666				left: 0
11667			},
11668			ce = that.containerElement,
11669			continueResize = true;
11670
11671		if ( ce[ 0 ] !== document && ( /static/ ).test( ce.css( "position" ) ) ) {
11672			cop = co;
11673		}
11674
11675		if ( cp.left < ( that._helper ? co.left : 0 ) ) {
11676			that.size.width = that.size.width +
11677				( that._helper ?
11678					( that.position.left - co.left ) :
11679					( that.position.left - cop.left ) );
11680
11681			if ( pRatio ) {
11682				that.size.height = that.size.width / that.aspectRatio;
11683				continueResize = false;
11684			}
11685			that.position.left = o.helper ? co.left : 0;
11686		}
11687
11688		if ( cp.top < ( that._helper ? co.top : 0 ) ) {
11689			that.size.height = that.size.height +
11690				( that._helper ?
11691					( that.position.top - co.top ) :
11692					that.position.top );
11693
11694			if ( pRatio ) {
11695				that.size.width = that.size.height * that.aspectRatio;
11696				continueResize = false;
11697			}
11698			that.position.top = that._helper ? co.top : 0;
11699		}
11700
11701		isParent = that.containerElement.get( 0 ) === that.element.parent().get( 0 );
11702		isOffsetRelative = /relative|absolute/.test( that.containerElement.css( "position" ) );
11703
11704		if ( isParent && isOffsetRelative ) {
11705			that.offset.left = that.parentData.left + that.position.left;
11706			that.offset.top = that.parentData.top + that.position.top;
11707		} else {
11708			that.offset.left = that.element.offset().left;
11709			that.offset.top = that.element.offset().top;
11710		}
11711
11712		woset = Math.abs( that.sizeDiff.width +
11713			( that._helper ?
11714				that.offset.left - cop.left :
11715				( that.offset.left - co.left ) ) );
11716
11717		hoset = Math.abs( that.sizeDiff.height +
11718			( that._helper ?
11719				that.offset.top - cop.top :
11720				( that.offset.top - co.top ) ) );
11721
11722		if ( woset + that.size.width >= that.parentData.width ) {
11723			that.size.width = that.parentData.width - woset;
11724			if ( pRatio ) {
11725				that.size.height = that.size.width / that.aspectRatio;
11726				continueResize = false;
11727			}
11728		}
11729
11730		if ( hoset + that.size.height >= that.parentData.height ) {
11731			that.size.height = that.parentData.height - hoset;
11732			if ( pRatio ) {
11733				that.size.width = that.size.height * that.aspectRatio;
11734				continueResize = false;
11735			}
11736		}
11737
11738		if ( !continueResize ) {
11739			that.position.left = that.prevPosition.left;
11740			that.position.top = that.prevPosition.top;
11741			that.size.width = that.prevSize.width;
11742			that.size.height = that.prevSize.height;
11743		}
11744	},
11745
11746	stop: function() {
11747		var that = $( this ).resizable( "instance" ),
11748			o = that.options,
11749			co = that.containerOffset,
11750			cop = that.containerPosition,
11751			ce = that.containerElement,
11752			helper = $( that.helper ),
11753			ho = helper.offset(),
11754			w = helper.outerWidth() - that.sizeDiff.width,
11755			h = helper.outerHeight() - that.sizeDiff.height;
11756
11757		if ( that._helper && !o.animate && ( /relative/ ).test( ce.css( "position" ) ) ) {
11758			$( this ).css( {
11759				left: ho.left - cop.left - co.left,
11760				width: w,
11761				height: h
11762			} );
11763		}
11764
11765		if ( that._helper && !o.animate && ( /static/ ).test( ce.css( "position" ) ) ) {
11766			$( this ).css( {
11767				left: ho.left - cop.left - co.left,
11768				width: w,
11769				height: h
11770			} );
11771		}
11772	}
11773} );
11774
11775$.ui.plugin.add( "resizable", "alsoResize", {
11776
11777	start: function() {
11778		var that = $( this ).resizable( "instance" ),
11779			o = that.options;
11780
11781		$( o.alsoResize ).each( function() {
11782			var el = $( this );
11783			el.data( "ui-resizable-alsoresize", {
11784				width: parseFloat( el.width() ), height: parseFloat( el.height() ),
11785				left: parseFloat( el.css( "left" ) ), top: parseFloat( el.css( "top" ) )
11786			} );
11787		} );
11788	},
11789
11790	resize: function( event, ui ) {
11791		var that = $( this ).resizable( "instance" ),
11792			o = that.options,
11793			os = that.originalSize,
11794			op = that.originalPosition,
11795			delta = {
11796				height: ( that.size.height - os.height ) || 0,
11797				width: ( that.size.width - os.width ) || 0,
11798				top: ( that.position.top - op.top ) || 0,
11799				left: ( that.position.left - op.left ) || 0
11800			};
11801
11802			$( o.alsoResize ).each( function() {
11803				var el = $( this ), start = $( this ).data( "ui-resizable-alsoresize" ), style = {},
11804					css = el.parents( ui.originalElement[ 0 ] ).length ?
11805							[ "width", "height" ] :
11806							[ "width", "height", "top", "left" ];
11807
11808				$.each( css, function( i, prop ) {
11809					var sum = ( start[ prop ] || 0 ) + ( delta[ prop ] || 0 );
11810					if ( sum && sum >= 0 ) {
11811						style[ prop ] = sum || null;
11812					}
11813				} );
11814
11815				el.css( style );
11816			} );
11817	},
11818
11819	stop: function() {
11820		$( this ).removeData( "ui-resizable-alsoresize" );
11821	}
11822} );
11823
11824$.ui.plugin.add( "resizable", "ghost", {
11825
11826	start: function() {
11827
11828		var that = $( this ).resizable( "instance" ), cs = that.size;
11829
11830		that.ghost = that.originalElement.clone();
11831		that.ghost.css( {
11832			opacity: 0.25,
11833			display: "block",
11834			position: "relative",
11835			height: cs.height,
11836			width: cs.width,
11837			margin: 0,
11838			left: 0,
11839			top: 0
11840		} );
11841
11842		that._addClass( that.ghost, "ui-resizable-ghost" );
11843
11844		// DEPRECATED
11845		// TODO: remove after 1.12
11846		if ( $.uiBackCompat !== false && typeof that.options.ghost === "string" ) {
11847
11848			// Ghost option
11849			that.ghost.addClass( this.options.ghost );
11850		}
11851
11852		that.ghost.appendTo( that.helper );
11853
11854	},
11855
11856	resize: function() {
11857		var that = $( this ).resizable( "instance" );
11858		if ( that.ghost ) {
11859			that.ghost.css( {
11860				position: "relative",
11861				height: that.size.height,
11862				width: that.size.width
11863			} );
11864		}
11865	},
11866
11867	stop: function() {
11868		var that = $( this ).resizable( "instance" );
11869		if ( that.ghost && that.helper ) {
11870			that.helper.get( 0 ).removeChild( that.ghost.get( 0 ) );
11871		}
11872	}
11873
11874} );
11875
11876$.ui.plugin.add( "resizable", "grid", {
11877
11878	resize: function() {
11879		var outerDimensions,
11880			that = $( this ).resizable( "instance" ),
11881			o = that.options,
11882			cs = that.size,
11883			os = that.originalSize,
11884			op = that.originalPosition,
11885			a = that.axis,
11886			grid = typeof o.grid === "number" ? [ o.grid, o.grid ] : o.grid,
vendor: 4,400 bytes, lines 11887-12067
11887			gridX = ( grid[ 0 ] || 1 ),
11888			gridY = ( grid[ 1 ] || 1 ),
11889			ox = Math.round( ( cs.width - os.width ) / gridX ) * gridX,
11890			oy = Math.round( ( cs.height - os.height ) / gridY ) * gridY,
11891			newWidth = os.width + ox,
11892			newHeight = os.height + oy,
11893			isMaxWidth = o.maxWidth && ( o.maxWidth < newWidth ),
11894			isMaxHeight = o.maxHeight && ( o.maxHeight < newHeight ),
11895			isMinWidth = o.minWidth && ( o.minWidth > newWidth ),
11896			isMinHeight = o.minHeight && ( o.minHeight > newHeight );
11897
11898		o.grid = grid;
11899
11900		if ( isMinWidth ) {
11901			newWidth += gridX;
11902		}
11903		if ( isMinHeight ) {
11904			newHeight += gridY;
11905		}
11906		if ( isMaxWidth ) {
11907			newWidth -= gridX;
11908		}
11909		if ( isMaxHeight ) {
11910			newHeight -= gridY;
11911		}
11912
11913		if ( /^(se|s|e)$/.test( a ) ) {
11914			that.size.width = newWidth;
11915			that.size.height = newHeight;
11916		} else if ( /^(ne)$/.test( a ) ) {
11917			that.size.width = newWidth;
11918			that.size.height = newHeight;
11919			that.position.top = op.top - oy;
11920		} else if ( /^(sw)$/.test( a ) ) {
11921			that.size.width = newWidth;
11922			that.size.height = newHeight;
11923			that.position.left = op.left - ox;
11924		} else {
11925			if ( newHeight - gridY <= 0 || newWidth - gridX <= 0 ) {
11926				outerDimensions = that._getPaddingPlusBorderDimensions( this );
11927			}
11928
11929			if ( newHeight - gridY > 0 ) {
11930				that.size.height = newHeight;
11931				that.position.top = op.top - oy;
11932			} else {
11933				newHeight = gridY - outerDimensions.height;
11934				that.size.height = newHeight;
11935				that.position.top = op.top + os.height - newHeight;
11936			}
11937			if ( newWidth - gridX > 0 ) {
11938				that.size.width = newWidth;
11939				that.position.left = op.left - ox;
11940			} else {
11941				newWidth = gridX - outerDimensions.width;
11942				that.size.width = newWidth;
11943				that.position.left = op.left + os.width - newWidth;
11944			}
11945		}
11946	}
11947
11948} );
11949
11950var widgetsResizable = $.ui.resizable;
11951
11952
11953/*!
11954 * jQuery UI Dialog 1.12.1
11955 * http://jqueryui.com
11956 *
11957 * Copyright jQuery Foundation and other contributors
11958 * Released under the MIT license.
11959 * http://jquery.org/license
11960 */
11961
11962//>>label: Dialog
11963//>>group: Widgets
11964//>>description: Displays customizable dialog windows.
11965//>>docs: http://api.jqueryui.com/dialog/
11966//>>demos: http://jqueryui.com/dialog/
11967//>>css.structure: ../../themes/base/core.css
11968//>>css.structure: ../../themes/base/dialog.css
11969//>>css.theme: ../../themes/base/theme.css
11970
11971
11972
11973$.widget( "ui.dialog", {
11974	version: "1.12.1",
11975	options: {
11976		appendTo: "body",
11977		autoOpen: true,
11978		buttons: [],
11979		classes: {
11980			"ui-dialog": "ui-corner-all",
11981			"ui-dialog-titlebar": "ui-corner-all"
11982		},
11983		closeOnEscape: true,
11984		closeText: "Close",
11985		draggable: true,
11986		hide: null,
11987		height: "auto",
11988		maxHeight: null,
11989		maxWidth: null,
11990		minHeight: 150,
11991		minWidth: 150,
11992		modal: false,
11993		position: {
11994			my: "center",
11995			at: "center",
11996			of: window,
11997			collision: "fit",
11998
11999			// Ensure the titlebar is always visible
12000			using: function( pos ) {
12001				var topOffset = $( this ).css( pos ).offset().top;
12002				if ( topOffset < 0 ) {
12003					$( this ).css( "top", pos.top - topOffset );
12004				}
12005			}
12006		},
12007		resizable: true,
12008		show: null,
12009		title: null,
12010		width: 300,
12011
12012		// Callbacks
12013		beforeClose: null,
12014		close: null,
12015		drag: null,
12016		dragStart: null,
12017		dragStop: null,
12018		focus: null,
12019		open: null,
12020		resize: null,
12021		resizeStart: null,
12022		resizeStop: null
12023	},
12024
12025	sizeRelatedOptions: {
12026		buttons: true,
12027		height: true,
12028		maxHeight: true,
12029		maxWidth: true,
12030		minHeight: true,
12031		minWidth: true,
12032		width: true
12033	},
12034
12035	resizableRelatedOptions: {
12036		maxHeight: true,
12037		maxWidth: true,
12038		minHeight: true,
12039		minWidth: true
12040	},
12041
12042	_create: function() {
12043		this.originalCss = {
12044			display: this.element[ 0 ].style.display,
12045			width: this.element[ 0 ].style.width,
12046			minHeight: this.element[ 0 ].style.minHeight,
12047			maxHeight: this.element[ 0 ].style.maxHeight,
12048			height: this.element[ 0 ].style.height
12049		};
12050		this.originalPosition = {
12051			parent: this.element.parent(),
12052			index: this.element.parent().children().index( this.element )
12053		};
12054		this.originalTitle = this.element.attr( "title" );
12055		if ( this.options.title == null && this.originalTitle != null ) {
12056			this.options.title = this.originalTitle;
12057		}
12058
12059		// Dialogs can't be disabled
12060		if ( this.options.disabled ) {
12061			this.options.disabled = false;
12062		}
12063
12064		this._createWrapper();
12065
12066		this.element
12067			.show()
vendor: 34,211 bytes, lines 12068-13351
12068			.removeAttr( "title" )
12069			.appendTo( this.uiDialog );
12070
12071		this._addClass( "ui-dialog-content", "ui-widget-content" );
12072
12073		this._createTitlebar();
12074		this._createButtonPane();
12075
12076		if ( this.options.draggable && $.fn.draggable ) {
12077			this._makeDraggable();
12078		}
12079		if ( this.options.resizable && $.fn.resizable ) {
12080			this._makeResizable();
12081		}
12082
12083		this._isOpen = false;
12084
12085		this._trackFocus();
12086	},
12087
12088	_init: function() {
12089		if ( this.options.autoOpen ) {
12090			this.open();
12091		}
12092	},
12093
12094	_appendTo: function() {
12095		var element = this.options.appendTo;
12096		if ( element && ( element.jquery || element.nodeType ) ) {
12097			return $( element );
12098		}
12099		return this.document.find( element || "body" ).eq( 0 );
12100	},
12101
12102	_destroy: function() {
12103		var next,
12104			originalPosition = this.originalPosition;
12105
12106		this._untrackInstance();
12107		this._destroyOverlay();
12108
12109		this.element
12110			.removeUniqueId()
12111			.css( this.originalCss )
12112
12113			// Without detaching first, the following becomes really slow
12114			.detach();
12115
12116		this.uiDialog.remove();
12117
12118		if ( this.originalTitle ) {
12119			this.element.attr( "title", this.originalTitle );
12120		}
12121
12122		next = originalPosition.parent.children().eq( originalPosition.index );
12123
12124		// Don't try to place the dialog next to itself (#8613)
12125		if ( next.length && next[ 0 ] !== this.element[ 0 ] ) {
12126			next.before( this.element );
12127		} else {
12128			originalPosition.parent.append( this.element );
12129		}
12130	},
12131
12132	widget: function() {
12133		return this.uiDialog;
12134	},
12135
12136	disable: $.noop,
12137	enable: $.noop,
12138
12139	close: function( event ) {
12140		var that = this;
12141
12142		if ( !this._isOpen || this._trigger( "beforeClose", event ) === false ) {
12143			return;
12144		}
12145
12146		this._isOpen = false;
12147		this._focusedElement = null;
12148		this._destroyOverlay();
12149		this._untrackInstance();
12150
12151		if ( !this.opener.filter( ":focusable" ).trigger( "focus" ).length ) {
12152
12153			// Hiding a focused element doesn't trigger blur in WebKit
12154			// so in case we have nothing to focus on, explicitly blur the active element
12155			// https://bugs.webkit.org/show_bug.cgi?id=47182
12156			$.ui.safeBlur( $.ui.safeActiveElement( this.document[ 0 ] ) );
12157		}
12158
12159		this._hide( this.uiDialog, this.options.hide, function() {
12160			that._trigger( "close", event );
12161		} );
12162	},
12163
12164	isOpen: function() {
12165		return this._isOpen;
12166	},
12167
12168	moveToTop: function() {
12169		this._moveToTop();
12170	},
12171
12172	_moveToTop: function( event, silent ) {
12173		var moved = false,
12174			zIndices = this.uiDialog.siblings( ".ui-front:visible" ).map( function() {
12175				return +$( this ).css( "z-index" );
12176			} ).get(),
12177			zIndexMax = Math.max.apply( null, zIndices );
12178
12179		if ( zIndexMax >= +this.uiDialog.css( "z-index" ) ) {
12180			this.uiDialog.css( "z-index", zIndexMax + 1 );
12181			moved = true;
12182		}
12183
12184		if ( moved && !silent ) {
12185			this._trigger( "focus", event );
12186		}
12187		return moved;
12188	},
12189
12190	open: function() {
12191		var that = this;
12192		if ( this._isOpen ) {
12193			if ( this._moveToTop() ) {
12194				this._focusTabbable();
12195			}
12196			return;
12197		}
12198
12199		this._isOpen = true;
12200		this.opener = $( $.ui.safeActiveElement( this.document[ 0 ] ) );
12201
12202		this._size();
12203		this._position();
12204		this._createOverlay();
12205		this._moveToTop( null, true );
12206
12207		// Ensure the overlay is moved to the top with the dialog, but only when
12208		// opening. The overlay shouldn't move after the dialog is open so that
12209		// modeless dialogs opened after the modal dialog stack properly.
12210		if ( this.overlay ) {
12211			this.overlay.css( "z-index", this.uiDialog.css( "z-index" ) - 1 );
12212		}
12213
12214		this._show( this.uiDialog, this.options.show, function() {
12215			that._focusTabbable();
12216			that._trigger( "focus" );
12217		} );
12218
12219		// Track the dialog immediately upon openening in case a focus event
12220		// somehow occurs outside of the dialog before an element inside the
12221		// dialog is focused (#10152)
12222		this._makeFocusTarget();
12223
12224		this._trigger( "open" );
12225	},
12226
12227	_focusTabbable: function() {
12228
12229		// Set focus to the first match:
12230		// 1. An element that was focused previously
12231		// 2. First element inside the dialog matching [autofocus]
12232		// 3. Tabbable element inside the content element
12233		// 4. Tabbable element inside the buttonpane
12234		// 5. The close button
12235		// 6. The dialog itself
12236		var hasFocus = this._focusedElement;
12237		if ( !hasFocus ) {
12238			hasFocus = this.element.find( "[autofocus]" );
12239		}
12240		if ( !hasFocus.length ) {
12241			hasFocus = this.element.find( ":tabbable" );
12242		}
12243		if ( !hasFocus.length ) {
12244			hasFocus = this.uiDialogButtonPane.find( ":tabbable" );
12245		}
12246		if ( !hasFocus.length ) {
12247			hasFocus = this.uiDialogTitlebarClose.filter( ":tabbable" );
12248		}
12249		if ( !hasFocus.length ) {
12250			hasFocus = this.uiDialog;
12251		}
12252		hasFocus.eq( 0 ).trigger( "focus" );
12253	},
12254
12255	_keepFocus: function( event ) {
12256		function checkFocus() {
12257			var activeElement = $.ui.safeActiveElement( this.document[ 0 ] ),
12258				isActive = this.uiDialog[ 0 ] === activeElement ||
12259					$.contains( this.uiDialog[ 0 ], activeElement );
12260			if ( !isActive ) {
12261				this._focusTabbable();
12262			}
12263		}
12264		event.preventDefault();
12265		checkFocus.call( this );
12266
12267		// support: IE
12268		// IE <= 8 doesn't prevent moving focus even with event.preventDefault()
12269		// so we check again later
12270		this._delay( checkFocus );
12271	},
12272
12273	_createWrapper: function() {
12274		this.uiDialog = $( "<div>" )
12275			.hide()
12276			.attr( {
12277
12278				// Setting tabIndex makes the div focusable
12279				tabIndex: -1,
12280				role: "dialog"
12281			} )
12282			.appendTo( this._appendTo() );
12283
12284		this._addClass( this.uiDialog, "ui-dialog", "ui-widget ui-widget-content ui-front" );
12285		this._on( this.uiDialog, {
12286			keydown: function( event ) {
12287				if ( this.options.closeOnEscape && !event.isDefaultPrevented() && event.keyCode &&
12288						event.keyCode === $.ui.keyCode.ESCAPE ) {
12289					event.preventDefault();
12290					this.close( event );
12291					return;
12292				}
12293
12294				// Prevent tabbing out of dialogs
12295				if ( event.keyCode !== $.ui.keyCode.TAB || event.isDefaultPrevented() ) {
12296					return;
12297				}
12298				var tabbables = this.uiDialog.find( ":tabbable" ),
12299					first = tabbables.filter( ":first" ),
12300					last = tabbables.filter( ":last" );
12301
12302				if ( ( event.target === last[ 0 ] || event.target === this.uiDialog[ 0 ] ) &&
12303						!event.shiftKey ) {
12304					this._delay( function() {
12305						first.trigger( "focus" );
12306					} );
12307					event.preventDefault();
12308				} else if ( ( event.target === first[ 0 ] ||
12309						event.target === this.uiDialog[ 0 ] ) && event.shiftKey ) {
12310					this._delay( function() {
12311						last.trigger( "focus" );
12312					} );
12313					event.preventDefault();
12314				}
12315			},
12316			mousedown: function( event ) {
12317				if ( this._moveToTop( event ) ) {
12318					this._focusTabbable();
12319				}
12320			}
12321		} );
12322
12323		// We assume that any existing aria-describedby attribute means
12324		// that the dialog content is marked up properly
12325		// otherwise we brute force the content as the description
12326		if ( !this.element.find( "[aria-describedby]" ).length ) {
12327			this.uiDialog.attr( {
12328				"aria-describedby": this.element.uniqueId().attr( "id" )
12329			} );
12330		}
12331	},
12332
12333	_createTitlebar: function() {
12334		var uiDialogTitle;
12335
12336		this.uiDialogTitlebar = $( "<div>" );
12337		this._addClass( this.uiDialogTitlebar,
12338			"ui-dialog-titlebar", "ui-widget-header ui-helper-clearfix" );
12339		this._on( this.uiDialogTitlebar, {
12340			mousedown: function( event ) {
12341
12342				// Don't prevent click on close button (#8838)
12343				// Focusing a dialog that is partially scrolled out of view
12344				// causes the browser to scroll it into view, preventing the click event
12345				if ( !$( event.target ).closest( ".ui-dialog-titlebar-close" ) ) {
12346
12347					// Dialog isn't getting focus when dragging (#8063)
12348					this.uiDialog.trigger( "focus" );
12349				}
12350			}
12351		} );
12352
12353		// Support: IE
12354		// Use type="button" to prevent enter keypresses in textboxes from closing the
12355		// dialog in IE (#9312)
12356		this.uiDialogTitlebarClose = $( "<button type='button'></button>" )
12357			.button( {
12358				label: $( "<a>" ).text( this.options.closeText ).html(),
12359				icon: "ui-icon-closethick",
12360				showLabel: false
12361			} )
12362			.appendTo( this.uiDialogTitlebar );
12363
12364		this._addClass( this.uiDialogTitlebarClose, "ui-dialog-titlebar-close" );
12365		this._on( this.uiDialogTitlebarClose, {
12366			click: function( event ) {
12367				event.preventDefault();
12368				this.close( event );
12369			}
12370		} );
12371
12372		uiDialogTitle = $( "<span>" ).uniqueId().prependTo( this.uiDialogTitlebar );
12373		this._addClass( uiDialogTitle, "ui-dialog-title" );
12374		this._title( uiDialogTitle );
12375
12376		this.uiDialogTitlebar.prependTo( this.uiDialog );
12377
12378		this.uiDialog.attr( {
12379			"aria-labelledby": uiDialogTitle.attr( "id" )
12380		} );
12381	},
12382
12383	_title: function( title ) {
12384		if ( this.options.title ) {
12385			title.text( this.options.title );
12386		} else {
12387			title.html( "&#160;" );
12388		}
12389	},
12390
12391	_createButtonPane: function() {
12392		this.uiDialogButtonPane = $( "<div>" );
12393		this._addClass( this.uiDialogButtonPane, "ui-dialog-buttonpane",
12394			"ui-widget-content ui-helper-clearfix" );
12395
12396		this.uiButtonSet = $( "<div>" )
12397			.appendTo( this.uiDialogButtonPane );
12398		this._addClass( this.uiButtonSet, "ui-dialog-buttonset" );
12399
12400		this._createButtons();
12401	},
12402
12403	_createButtons: function() {
12404		var that = this,
12405			buttons = this.options.buttons;
12406
12407		// If we already have a button pane, remove it
12408		this.uiDialogButtonPane.remove();
12409		this.uiButtonSet.empty();
12410
12411		if ( $.isEmptyObject( buttons ) || ( $.isArray( buttons ) && !buttons.length ) ) {
12412			this._removeClass( this.uiDialog, "ui-dialog-buttons" );
12413			return;
12414		}
12415
12416		$.each( buttons, function( name, props ) {
12417			var click, buttonOptions;
12418			props = $.isFunction( props ) ?
12419				{ click: props, text: name } :
12420				props;
12421
12422			// Default to a non-submitting button
12423			props = $.extend( { type: "button" }, props );
12424
12425			// Change the context for the click callback to be the main element
12426			click = props.click;
12427			buttonOptions = {
12428				icon: props.icon,
12429				iconPosition: props.iconPosition,
12430				showLabel: props.showLabel,
12431
12432				// Deprecated options
12433				icons: props.icons,
12434				text: props.text
12435			};
12436
12437			delete props.click;
12438			delete props.icon;
12439			delete props.iconPosition;
12440			delete props.showLabel;
12441
12442			// Deprecated options
12443			delete props.icons;
12444			if ( typeof props.text === "boolean" ) {
12445				delete props.text;
12446			}
12447
12448			$( "<button></button>", props )
12449				.button( buttonOptions )
12450				.appendTo( that.uiButtonSet )
12451				.on( "click", function() {
12452					click.apply( that.element[ 0 ], arguments );
12453				} );
12454		} );
12455		this._addClass( this.uiDialog, "ui-dialog-buttons" );
12456		this.uiDialogButtonPane.appendTo( this.uiDialog );
12457	},
12458
12459	_makeDraggable: function() {
12460		var that = this,
12461			options = this.options;
12462
12463		function filteredUi( ui ) {
12464			return {
12465				position: ui.position,
12466				offset: ui.offset
12467			};
12468		}
12469
12470		this.uiDialog.draggable( {
12471			cancel: ".ui-dialog-content, .ui-dialog-titlebar-close",
12472			handle: ".ui-dialog-titlebar",
12473			containment: "document",
12474			start: function( event, ui ) {
12475				that._addClass( $( this ), "ui-dialog-dragging" );
12476				that._blockFrames();
12477				that._trigger( "dragStart", event, filteredUi( ui ) );
12478			},
12479			drag: function( event, ui ) {
12480				that._trigger( "drag", event, filteredUi( ui ) );
12481			},
12482			stop: function( event, ui ) {
12483				var left = ui.offset.left - that.document.scrollLeft(),
12484					top = ui.offset.top - that.document.scrollTop();
12485
12486				options.position = {
12487					my: "left top",
12488					at: "left" + ( left >= 0 ? "+" : "" ) + left + " " +
12489						"top" + ( top >= 0 ? "+" : "" ) + top,
12490					of: that.window
12491				};
12492				that._removeClass( $( this ), "ui-dialog-dragging" );
12493				that._unblockFrames();
12494				that._trigger( "dragStop", event, filteredUi( ui ) );
12495			}
12496		} );
12497	},
12498
12499	_makeResizable: function() {
12500		var that = this,
12501			options = this.options,
12502			handles = options.resizable,
12503
12504			// .ui-resizable has position: relative defined in the stylesheet
12505			// but dialogs have to use absolute or fixed positioning
12506			position = this.uiDialog.css( "position" ),
12507			resizeHandles = typeof handles === "string" ?
12508				handles :
12509				"n,e,s,w,se,sw,ne,nw";
12510
12511		function filteredUi( ui ) {
12512			return {
12513				originalPosition: ui.originalPosition,
12514				originalSize: ui.originalSize,
12515				position: ui.position,
12516				size: ui.size
12517			};
12518		}
12519
12520		this.uiDialog.resizable( {
12521			cancel: ".ui-dialog-content",
12522			containment: "document",
12523			alsoResize: this.element,
12524			maxWidth: options.maxWidth,
12525			maxHeight: options.maxHeight,
12526			minWidth: options.minWidth,
12527			minHeight: this._minHeight(),
12528			handles: resizeHandles,
12529			start: function( event, ui ) {
12530				that._addClass( $( this ), "ui-dialog-resizing" );
12531				that._blockFrames();
12532				that._trigger( "resizeStart", event, filteredUi( ui ) );
12533			},
12534			resize: function( event, ui ) {
12535				that._trigger( "resize", event, filteredUi( ui ) );
12536			},
12537			stop: function( event, ui ) {
12538				var offset = that.uiDialog.offset(),
12539					left = offset.left - that.document.scrollLeft(),
12540					top = offset.top - that.document.scrollTop();
12541
12542				options.height = that.uiDialog.height();
12543				options.width = that.uiDialog.width();
12544				options.position = {
12545					my: "left top",
12546					at: "left" + ( left >= 0 ? "+" : "" ) + left + " " +
12547						"top" + ( top >= 0 ? "+" : "" ) + top,
12548					of: that.window
12549				};
12550				that._removeClass( $( this ), "ui-dialog-resizing" );
12551				that._unblockFrames();
12552				that._trigger( "resizeStop", event, filteredUi( ui ) );
12553			}
12554		} )
12555			.css( "position", position );
12556	},
12557
12558	_trackFocus: function() {
12559		this._on( this.widget(), {
12560			focusin: function( event ) {
12561				this._makeFocusTarget();
12562				this._focusedElement = $( event.target );
12563			}
12564		} );
12565	},
12566
12567	_makeFocusTarget: function() {
12568		this._untrackInstance();
12569		this._trackingInstances().unshift( this );
12570	},
12571
12572	_untrackInstance: function() {
12573		var instances = this._trackingInstances(),
12574			exists = $.inArray( this, instances );
12575		if ( exists !== -1 ) {
12576			instances.splice( exists, 1 );
12577		}
12578	},
12579
12580	_trackingInstances: function() {
12581		var instances = this.document.data( "ui-dialog-instances" );
12582		if ( !instances ) {
12583			instances = [];
12584			this.document.data( "ui-dialog-instances", instances );
12585		}
12586		return instances;
12587	},
12588
12589	_minHeight: function() {
12590		var options = this.options;
12591
12592		return options.height === "auto" ?
12593			options.minHeight :
12594			Math.min( options.minHeight, options.height );
12595	},
12596
12597	_position: function() {
12598
12599		// Need to show the dialog to get the actual offset in the position plugin
12600		var isVisible = this.uiDialog.is( ":visible" );
12601		if ( !isVisible ) {
12602			this.uiDialog.show();
12603		}
12604		this.uiDialog.position( this.options.position );
12605		if ( !isVisible ) {
12606			this.uiDialog.hide();
12607		}
12608	},
12609
12610	_setOptions: function( options ) {
12611		var that = this,
12612			resize = false,
12613			resizableOptions = {};
12614
12615		$.each( options, function( key, value ) {
12616			that._setOption( key, value );
12617
12618			if ( key in that.sizeRelatedOptions ) {
12619				resize = true;
12620			}
12621			if ( key in that.resizableRelatedOptions ) {
12622				resizableOptions[ key ] = value;
12623			}
12624		} );
12625
12626		if ( resize ) {
12627			this._size();
12628			this._position();
12629		}
12630		if ( this.uiDialog.is( ":data(ui-resizable)" ) ) {
12631			this.uiDialog.resizable( "option", resizableOptions );
12632		}
12633	},
12634
12635	_setOption: function( key, value ) {
12636		var isDraggable, isResizable,
12637			uiDialog = this.uiDialog;
12638
12639		if ( key === "disabled" ) {
12640			return;
12641		}
12642
12643		this._super( key, value );
12644
12645		if ( key === "appendTo" ) {
12646			this.uiDialog.appendTo( this._appendTo() );
12647		}
12648
12649		if ( key === "buttons" ) {
12650			this._createButtons();
12651		}
12652
12653		if ( key === "closeText" ) {
12654			this.uiDialogTitlebarClose.button( {
12655
12656				// Ensure that we always pass a string
12657				label: $( "<a>" ).text( "" + this.options.closeText ).html()
12658			} );
12659		}
12660
12661		if ( key === "draggable" ) {
12662			isDraggable = uiDialog.is( ":data(ui-draggable)" );
12663			if ( isDraggable && !value ) {
12664				uiDialog.draggable( "destroy" );
12665			}
12666
12667			if ( !isDraggable && value ) {
12668				this._makeDraggable();
12669			}
12670		}
12671
12672		if ( key === "position" ) {
12673			this._position();
12674		}
12675
12676		if ( key === "resizable" ) {
12677
12678			// currently resizable, becoming non-resizable
12679			isResizable = uiDialog.is( ":data(ui-resizable)" );
12680			if ( isResizable && !value ) {
12681				uiDialog.resizable( "destroy" );
12682			}
12683
12684			// Currently resizable, changing handles
12685			if ( isResizable && typeof value === "string" ) {
12686				uiDialog.resizable( "option", "handles", value );
12687			}
12688
12689			// Currently non-resizable, becoming resizable
12690			if ( !isResizable && value !== false ) {
12691				this._makeResizable();
12692			}
12693		}
12694
12695		if ( key === "title" ) {
12696			this._title( this.uiDialogTitlebar.find( ".ui-dialog-title" ) );
12697		}
12698	},
12699
12700	_size: function() {
12701
12702		// If the user has resized the dialog, the .ui-dialog and .ui-dialog-content
12703		// divs will both have width and height set, so we need to reset them
12704		var nonContentHeight, minContentHeight, maxContentHeight,
12705			options = this.options;
12706
12707		// Reset content sizing
12708		this.element.show().css( {
12709			width: "auto",
12710			minHeight: 0,
12711			maxHeight: "none",
12712			height: 0
12713		} );
12714
12715		if ( options.minWidth > options.width ) {
12716			options.width = options.minWidth;
12717		}
12718
12719		// Reset wrapper sizing
12720		// determine the height of all the non-content elements
12721		nonContentHeight = this.uiDialog.css( {
12722			height: "auto",
12723			width: options.width
12724		} )
12725			.outerHeight();
12726		minContentHeight = Math.max( 0, options.minHeight - nonContentHeight );
12727		maxContentHeight = typeof options.maxHeight === "number" ?
12728			Math.max( 0, options.maxHeight - nonContentHeight ) :
12729			"none";
12730
12731		if ( options.height === "auto" ) {
12732			this.element.css( {
12733				minHeight: minContentHeight,
12734				maxHeight: maxContentHeight,
12735				height: "auto"
12736			} );
12737		} else {
12738			this.element.height( Math.max( 0, options.height - nonContentHeight ) );
12739		}
12740
12741		if ( this.uiDialog.is( ":data(ui-resizable)" ) ) {
12742			this.uiDialog.resizable( "option", "minHeight", this._minHeight() );
12743		}
12744	},
12745
12746	_blockFrames: function() {
12747		this.iframeBlocks = this.document.find( "iframe" ).map( function() {
12748			var iframe = $( this );
12749
12750			return $( "<div>" )
12751				.css( {
12752					position: "absolute",
12753					width: iframe.outerWidth(),
12754					height: iframe.outerHeight()
12755				} )
12756				.appendTo( iframe.parent() )
12757				.offset( iframe.offset() )[ 0 ];
12758		} );
12759	},
12760
12761	_unblockFrames: function() {
12762		if ( this.iframeBlocks ) {
12763			this.iframeBlocks.remove();
12764			delete this.iframeBlocks;
12765		}
12766	},
12767
12768	_allowInteraction: function( event ) {
12769		if ( $( event.target ).closest( ".ui-dialog" ).length ) {
12770			return true;
12771		}
12772
12773		// TODO: Remove hack when datepicker implements
12774		// the .ui-front logic (#8989)
12775		return !!$( event.target ).closest( ".ui-datepicker" ).length;
12776	},
12777
12778	_createOverlay: function() {
12779		if ( !this.options.modal ) {
12780			return;
12781		}
12782
12783		// We use a delay in case the overlay is created from an
12784		// event that we're going to be cancelling (#2804)
12785		var isOpening = true;
12786		this._delay( function() {
12787			isOpening = false;
12788		} );
12789
12790		if ( !this.document.data( "ui-dialog-overlays" ) ) {
12791
12792			// Prevent use of anchors and inputs
12793			// Using _on() for an event handler shared across many instances is
12794			// safe because the dialogs stack and must be closed in reverse order
12795			this._on( this.document, {
12796				focusin: function( event ) {
12797					if ( isOpening ) {
12798						return;
12799					}
12800
12801					if ( !this._allowInteraction( event ) ) {
12802						event.preventDefault();
12803						this._trackingInstances()[ 0 ]._focusTabbable();
12804					}
12805				}
12806			} );
12807		}
12808
12809		this.overlay = $( "<div>" )
12810			.appendTo( this._appendTo() );
12811
12812		this._addClass( this.overlay, null, "ui-widget-overlay ui-front" );
12813		this._on( this.overlay, {
12814			mousedown: "_keepFocus"
12815		} );
12816		this.document.data( "ui-dialog-overlays",
12817			( this.document.data( "ui-dialog-overlays" ) || 0 ) + 1 );
12818	},
12819
12820	_destroyOverlay: function() {
12821		if ( !this.options.modal ) {
12822			return;
12823		}
12824
12825		if ( this.overlay ) {
12826			var overlays = this.document.data( "ui-dialog-overlays" ) - 1;
12827
12828			if ( !overlays ) {
12829				this._off( this.document, "focusin" );
12830				this.document.removeData( "ui-dialog-overlays" );
12831			} else {
12832				this.document.data( "ui-dialog-overlays", overlays );
12833			}
12834
12835			this.overlay.remove();
12836			this.overlay = null;
12837		}
12838	}
12839} );
12840
12841// DEPRECATED
12842// TODO: switch return back to widget declaration at top of file when this is removed
12843if ( $.uiBackCompat !== false ) {
12844
12845	// Backcompat for dialogClass option
12846	$.widget( "ui.dialog", $.ui.dialog, {
12847		options: {
12848			dialogClass: ""
12849		},
12850		_createWrapper: function() {
12851			this._super();
12852			this.uiDialog.addClass( this.options.dialogClass );
12853		},
12854		_setOption: function( key, value ) {
12855			if ( key === "dialogClass" ) {
12856				this.uiDialog
12857					.removeClass( this.options.dialogClass )
12858					.addClass( value );
12859			}
12860			this._superApply( arguments );
12861		}
12862	} );
12863}
12864
12865var widgetsDialog = $.ui.dialog;
12866
12867
12868/*!
12869 * jQuery UI Droppable 1.12.1
12870 * http://jqueryui.com
12871 *
12872 * Copyright jQuery Foundation and other contributors
12873 * Released under the MIT license.
12874 * http://jquery.org/license
12875 */
12876
12877//>>label: Droppable
12878//>>group: Interactions
12879//>>description: Enables drop targets for draggable elements.
12880//>>docs: http://api.jqueryui.com/droppable/
12881//>>demos: http://jqueryui.com/droppable/
12882
12883
12884
12885$.widget( "ui.droppable", {
12886	version: "1.12.1",
12887	widgetEventPrefix: "drop",
12888	options: {
12889		accept: "*",
12890		addClasses: true,
12891		greedy: false,
12892		scope: "default",
12893		tolerance: "intersect",
12894
12895		// Callbacks
12896		activate: null,
12897		deactivate: null,
12898		drop: null,
12899		out: null,
12900		over: null
12901	},
12902	_create: function() {
12903
12904		var proportions,
12905			o = this.options,
12906			accept = o.accept;
12907
12908		this.isover = false;
12909		this.isout = true;
12910
12911		this.accept = $.isFunction( accept ) ? accept : function( d ) {
12912			return d.is( accept );
12913		};
12914
12915		this.proportions = function( /* valueToWrite */ ) {
12916			if ( arguments.length ) {
12917
12918				// Store the droppable's proportions
12919				proportions = arguments[ 0 ];
12920			} else {
12921
12922				// Retrieve or derive the droppable's proportions
12923				return proportions ?
12924					proportions :
12925					proportions = {
12926						width: this.element[ 0 ].offsetWidth,
12927						height: this.element[ 0 ].offsetHeight
12928					};
12929			}
12930		};
12931
12932		this._addToManager( o.scope );
12933
12934		o.addClasses && this._addClass( "ui-droppable" );
12935
12936	},
12937
12938	_addToManager: function( scope ) {
12939
12940		// Add the reference and positions to the manager
12941		$.ui.ddmanager.droppables[ scope ] = $.ui.ddmanager.droppables[ scope ] || [];
12942		$.ui.ddmanager.droppables[ scope ].push( this );
12943	},
12944
12945	_splice: function( drop ) {
12946		var i = 0;
12947		for ( ; i < drop.length; i++ ) {
12948			if ( drop[ i ] === this ) {
12949				drop.splice( i, 1 );
12950			}
12951		}
12952	},
12953
12954	_destroy: function() {
12955		var drop = $.ui.ddmanager.droppables[ this.options.scope ];
12956
12957		this._splice( drop );
12958	},
12959
12960	_setOption: function( key, value ) {
12961
12962		if ( key === "accept" ) {
12963			this.accept = $.isFunction( value ) ? value : function( d ) {
12964				return d.is( value );
12965			};
12966		} else if ( key === "scope" ) {
12967			var drop = $.ui.ddmanager.droppables[ this.options.scope ];
12968
12969			this._splice( drop );
12970			this._addToManager( value );
12971		}
12972
12973		this._super( key, value );
12974	},
12975
12976	_activate: function( event ) {
12977		var draggable = $.ui.ddmanager.current;
12978
12979		this._addActiveClass();
12980		if ( draggable ) {
12981			this._trigger( "activate", event, this.ui( draggable ) );
12982		}
12983	},
12984
12985	_deactivate: function( event ) {
12986		var draggable = $.ui.ddmanager.current;
12987
12988		this._removeActiveClass();
12989		if ( draggable ) {
12990			this._trigger( "deactivate", event, this.ui( draggable ) );
12991		}
12992	},
12993
12994	_over: function( event ) {
12995
12996		var draggable = $.ui.ddmanager.current;
12997
12998		// Bail if draggable and droppable are same element
12999		if ( !draggable || ( draggable.currentItem ||
13000				draggable.element )[ 0 ] === this.element[ 0 ] ) {
13001			return;
13002		}
13003
13004		if ( this.accept.call( this.element[ 0 ], ( draggable.currentItem ||
13005				draggable.element ) ) ) {
13006			this._addHoverClass();
13007			this._trigger( "over", event, this.ui( draggable ) );
13008		}
13009
13010	},
13011
13012	_out: function( event ) {
13013
13014		var draggable = $.ui.ddmanager.current;
13015
13016		// Bail if draggable and droppable are same element
13017		if ( !draggable || ( draggable.currentItem ||
13018				draggable.element )[ 0 ] === this.element[ 0 ] ) {
13019			return;
13020		}
13021
13022		if ( this.accept.call( this.element[ 0 ], ( draggable.currentItem ||
13023				draggable.element ) ) ) {
13024			this._removeHoverClass();
13025			this._trigger( "out", event, this.ui( draggable ) );
13026		}
13027
13028	},
13029
13030	_drop: function( event, custom ) {
13031
13032		var draggable = custom || $.ui.ddmanager.current,
13033			childrenIntersection = false;
13034
13035		// Bail if draggable and droppable are same element
13036		if ( !draggable || ( draggable.currentItem ||
13037				draggable.element )[ 0 ] === this.element[ 0 ] ) {
13038			return false;
13039		}
13040
13041		this.element
13042			.find( ":data(ui-droppable)" )
13043			.not( ".ui-draggable-dragging" )
13044			.each( function() {
13045				var inst = $( this ).droppable( "instance" );
13046				if (
13047					inst.options.greedy &&
13048					!inst.options.disabled &&
13049					inst.options.scope === draggable.options.scope &&
13050					inst.accept.call(
13051						inst.element[ 0 ], ( draggable.currentItem || draggable.element )
13052					) &&
13053					intersect(
13054						draggable,
13055						$.extend( inst, { offset: inst.element.offset() } ),
13056						inst.options.tolerance, event
13057					)
13058				) {
13059					childrenIntersection = true;
13060					return false; }
13061			} );
13062		if ( childrenIntersection ) {
13063			return false;
13064		}
13065
13066		if ( this.accept.call( this.element[ 0 ],
13067				( draggable.currentItem || draggable.element ) ) ) {
13068			this._removeActiveClass();
13069			this._removeHoverClass();
13070
13071			this._trigger( "drop", event, this.ui( draggable ) );
13072			return this.element;
13073		}
13074
13075		return false;
13076
13077	},
13078
13079	ui: function( c ) {
13080		return {
13081			draggable: ( c.currentItem || c.element ),
13082			helper: c.helper,
13083			position: c.position,
13084			offset: c.positionAbs
13085		};
13086	},
13087
13088	// Extension points just to make backcompat sane and avoid duplicating logic
13089	// TODO: Remove in 1.13 along with call to it below
13090	_addHoverClass: function() {
13091		this._addClass( "ui-droppable-hover" );
13092	},
13093
13094	_removeHoverClass: function() {
13095		this._removeClass( "ui-droppable-hover" );
13096	},
13097
13098	_addActiveClass: function() {
13099		this._addClass( "ui-droppable-active" );
13100	},
13101
13102	_removeActiveClass: function() {
13103		this._removeClass( "ui-droppable-active" );
13104	}
13105} );
13106
13107var intersect = $.ui.intersect = ( function() {
13108	function isOverAxis( x, reference, size ) {
13109		return ( x >= reference ) && ( x < ( reference + size ) );
13110	}
13111
13112	return function( draggable, droppable, toleranceMode, event ) {
13113
13114		if ( !droppable.offset ) {
13115			return false;
13116		}
13117
13118		var x1 = ( draggable.positionAbs ||
13119				draggable.position.absolute ).left + draggable.margins.left,
13120			y1 = ( draggable.positionAbs ||
13121				draggable.position.absolute ).top + draggable.margins.top,
13122			x2 = x1 + draggable.helperProportions.width,
13123			y2 = y1 + draggable.helperProportions.height,
13124			l = droppable.offset.left,
13125			t = droppable.offset.top,
13126			r = l + droppable.proportions().width,
13127			b = t + droppable.proportions().height;
13128
13129		switch ( toleranceMode ) {
13130		case "fit":
13131			return ( l <= x1 && x2 <= r && t <= y1 && y2 <= b );
13132		case "intersect":
13133			return ( l < x1 + ( draggable.helperProportions.width / 2 ) && // Right Half
13134				x2 - ( draggable.helperProportions.width / 2 ) < r && // Left Half
13135				t < y1 + ( draggable.helperProportions.height / 2 ) && // Bottom Half
13136				y2 - ( draggable.helperProportions.height / 2 ) < b ); // Top Half
13137		case "pointer":
13138			return isOverAxis( event.pageY, t, droppable.proportions().height ) &&
13139				isOverAxis( event.pageX, l, droppable.proportions().width );
13140		case "touch":
13141			return (
13142				( y1 >= t && y1 <= b ) || // Top edge touching
13143				( y2 >= t && y2 <= b ) || // Bottom edge touching
13144				( y1 < t && y2 > b ) // Surrounded vertically
13145			) && (
13146				( x1 >= l && x1 <= r ) || // Left edge touching
13147				( x2 >= l && x2 <= r ) || // Right edge touching
13148				( x1 < l && x2 > r ) // Surrounded horizontally
13149			);
13150		default:
13151			return false;
13152		}
13153	};
13154} )();
13155
13156/*
13157	This manager tracks offsets of draggables and droppables
13158*/
13159$.ui.ddmanager = {
13160	current: null,
13161	droppables: { "default": [] },
13162	prepareOffsets: function( t, event ) {
13163
13164		var i, j,
13165			m = $.ui.ddmanager.droppables[ t.options.scope ] || [],
13166			type = event ? event.type : null, // workaround for #2317
13167			list = ( t.currentItem || t.element ).find( ":data(ui-droppable)" ).addBack();
13168
13169		droppablesLoop: for ( i = 0; i < m.length; i++ ) {
13170
13171			// No disabled and non-accepted
13172			if ( m[ i ].options.disabled || ( t && !m[ i ].accept.call( m[ i ].element[ 0 ],
13173					( t.currentItem || t.element ) ) ) ) {
13174				continue;
13175			}
13176
13177			// Filter out elements in the current dragged item
13178			for ( j = 0; j < list.length; j++ ) {
13179				if ( list[ j ] === m[ i ].element[ 0 ] ) {
13180					m[ i ].proportions().height = 0;
13181					continue droppablesLoop;
13182				}
13183			}
13184
13185			m[ i ].visible = m[ i ].element.css( "display" ) !== "none";
13186			if ( !m[ i ].visible ) {
13187				continue;
13188			}
13189
13190			// Activate the droppable if used directly from draggables
13191			if ( type === "mousedown" ) {
13192				m[ i ]._activate.call( m[ i ], event );
13193			}
13194
13195			m[ i ].offset = m[ i ].element.offset();
13196			m[ i ].proportions( {
13197				width: m[ i ].element[ 0 ].offsetWidth,
13198				height: m[ i ].element[ 0 ].offsetHeight
13199			} );
13200
13201		}
13202
13203	},
13204	drop: function( draggable, event ) {
13205
13206		var dropped = false;
13207
13208		// Create a copy of the droppables in case the list changes during the drop (#9116)
13209		$.each( ( $.ui.ddmanager.droppables[ draggable.options.scope ] || [] ).slice(), function() {
13210
13211			if ( !this.options ) {
13212				return;
13213			}
13214			if ( !this.options.disabled && this.visible &&
13215					intersect( draggable, this, this.options.tolerance, event ) ) {
13216				dropped = this._drop.call( this, event ) || dropped;
13217			}
13218
13219			if ( !this.options.disabled && this.visible && this.accept.call( this.element[ 0 ],
13220					( draggable.currentItem || draggable.element ) ) ) {
13221				this.isout = true;
13222				this.isover = false;
13223				this._deactivate.call( this, event );
13224			}
13225
13226		} );
13227		return dropped;
13228
13229	},
13230	dragStart: function( draggable, event ) {
13231
13232		// Listen for scrolling so that if the dragging causes scrolling the position of the
13233		// droppables can be recalculated (see #5003)
13234		draggable.element.parentsUntil( "body" ).on( "scroll.droppable", function() {
13235			if ( !draggable.options.refreshPositions ) {
13236				$.ui.ddmanager.prepareOffsets( draggable, event );
13237			}
13238		} );
13239	},
13240	drag: function( draggable, event ) {
13241
13242		// If you have a highly dynamic page, you might try this option. It renders positions
13243		// every time you move the mouse.
13244		if ( draggable.options.refreshPositions ) {
13245			$.ui.ddmanager.prepareOffsets( draggable, event );
13246		}
13247
13248		// Run through all droppables and check their positions based on specific tolerance options
13249		$.each( $.ui.ddmanager.droppables[ draggable.options.scope ] || [], function() {
13250
13251			if ( this.options.disabled || this.greedyChild || !this.visible ) {
13252				return;
13253			}
13254
13255			var parentInstance, scope, parent,
13256				intersects = intersect( draggable, this, this.options.tolerance, event ),
13257				c = !intersects && this.isover ?
13258					"isout" :
13259					( intersects && !this.isover ? "isover" : null );
13260			if ( !c ) {
13261				return;
13262			}
13263
13264			if ( this.options.greedy ) {
13265
13266				// find droppable parents with same scope
13267				scope = this.options.scope;
13268				parent = this.element.parents( ":data(ui-droppable)" ).filter( function() {
13269					return $( this ).droppable( "instance" ).options.scope === scope;
13270				} );
13271
13272				if ( parent.length ) {
13273					parentInstance = $( parent[ 0 ] ).droppable( "instance" );
13274					parentInstance.greedyChild = ( c === "isover" );
13275				}
13276			}
13277
13278			// We just moved into a greedy child
13279			if ( parentInstance && c === "isover" ) {
13280				parentInstance.isover = false;
13281				parentInstance.isout = true;
13282				parentInstance._out.call( parentInstance, event );
13283			}
13284
13285			this[ c ] = true;
13286			this[ c === "isout" ? "isover" : "isout" ] = false;
13287			this[ c === "isover" ? "_over" : "_out" ].call( this, event );
13288
13289			// We just moved out of a greedy child
13290			if ( parentInstance && c === "isout" ) {
13291				parentInstance.isout = false;
13292				parentInstance.isover = true;
13293				parentInstance._over.call( parentInstance, event );
13294			}
13295		} );
13296
13297	},
13298	dragStop: function( draggable, event ) {
13299		draggable.element.parentsUntil( "body" ).off( "scroll.droppable" );
13300
13301		// Call prepareOffsets one final time since IE does not fire return scroll events when
13302		// overflow was caused by drag (see #5003)
13303		if ( !draggable.options.refreshPositions ) {
13304			$.ui.ddmanager.prepareOffsets( draggable, event );
13305		}
13306	}
13307};
13308
13309// DEPRECATED
13310// TODO: switch return back to widget declaration at top of file when this is removed
13311if ( $.uiBackCompat !== false ) {
13312
13313	// Backcompat for activeClass and hoverClass options
13314	$.widget( "ui.droppable", $.ui.droppable, {
13315		options: {
13316			hoverClass: false,
13317			activeClass: false
13318		},
13319		_addActiveClass: function() {
13320			this._super();
13321			if ( this.options.activeClass ) {
13322				this.element.addClass( this.options.activeClass );
13323			}
13324		},
13325		_removeActiveClass: function() {
13326			this._super();
13327			if ( this.options.activeClass ) {
13328				this.element.removeClass( this.options.activeClass );
13329			}
13330		},
13331		_addHoverClass: function() {
13332			this._super();
13333			if ( this.options.hoverClass ) {
13334				this.element.addClass( this.options.hoverClass );
13335			}
13336		},
13337		_removeHoverClass: function() {
13338			this._super();
13339			if ( this.options.hoverClass ) {
13340				this.element.removeClass( this.options.hoverClass );
13341			}
13342		}
13343	} );
13344}
13345
13346var widgetsDroppable = $.ui.droppable;
13347
13348
13349/*!
13350 * jQuery UI Progressbar 1.12.1
13351 * http://jqueryui.com
vendor: 12,231 bytes, lines 13352-13810
13352 *
13353 * Copyright jQuery Foundation and other contributors
13354 * Released under the MIT license.
13355 * http://jquery.org/license
13356 */
13357
13358//>>label: Progressbar
13359//>>group: Widgets
13360// jscs:disable maximumLineLength
13361//>>description: Displays a status indicator for loading state, standard percentage, and other progress indicators.
13362// jscs:enable maximumLineLength
13363//>>docs: http://api.jqueryui.com/progressbar/
13364//>>demos: http://jqueryui.com/progressbar/
13365//>>css.structure: ../../themes/base/core.css
13366//>>css.structure: ../../themes/base/progressbar.css
13367//>>css.theme: ../../themes/base/theme.css
13368
13369
13370
13371var widgetsProgressbar = $.widget( "ui.progressbar", {
13372	version: "1.12.1",
13373	options: {
13374		classes: {
13375			"ui-progressbar": "ui-corner-all",
13376			"ui-progressbar-value": "ui-corner-left",
13377			"ui-progressbar-complete": "ui-corner-right"
13378		},
13379		max: 100,
13380		value: 0,
13381
13382		change: null,
13383		complete: null
13384	},
13385
13386	min: 0,
13387
13388	_create: function() {
13389
13390		// Constrain initial value
13391		this.oldValue = this.options.value = this._constrainedValue();
13392
13393		this.element.attr( {
13394
13395			// Only set static values; aria-valuenow and aria-valuemax are
13396			// set inside _refreshValue()
13397			role: "progressbar",
13398			"aria-valuemin": this.min
13399		} );
13400		this._addClass( "ui-progressbar", "ui-widget ui-widget-content" );
13401
13402		this.valueDiv = $( "<div>" ).appendTo( this.element );
13403		this._addClass( this.valueDiv, "ui-progressbar-value", "ui-widget-header" );
13404		this._refreshValue();
13405	},
13406
13407	_destroy: function() {
13408		this.element.removeAttr( "role aria-valuemin aria-valuemax aria-valuenow" );
13409
13410		this.valueDiv.remove();
13411	},
13412
13413	value: function( newValue ) {
13414		if ( newValue === undefined ) {
13415			return this.options.value;
13416		}
13417
13418		this.options.value = this._constrainedValue( newValue );
13419		this._refreshValue();
13420	},
13421
13422	_constrainedValue: function( newValue ) {
13423		if ( newValue === undefined ) {
13424			newValue = this.options.value;
13425		}
13426
13427		this.indeterminate = newValue === false;
13428
13429		// Sanitize value
13430		if ( typeof newValue !== "number" ) {
13431			newValue = 0;
13432		}
13433
13434		return this.indeterminate ? false :
13435			Math.min( this.options.max, Math.max( this.min, newValue ) );
13436	},
13437
13438	_setOptions: function( options ) {
13439
13440		// Ensure "value" option is set after other values (like max)
13441		var value = options.value;
13442		delete options.value;
13443
13444		this._super( options );
13445
13446		this.options.value = this._constrainedValue( value );
13447		this._refreshValue();
13448	},
13449
13450	_setOption: function( key, value ) {
13451		if ( key === "max" ) {
13452
13453			// Don't allow a max less than min
13454			value = Math.max( this.min, value );
13455		}
13456		this._super( key, value );
13457	},
13458
13459	_setOptionDisabled: function( value ) {
13460		this._super( value );
13461
13462		this.element.attr( "aria-disabled", value );
13463		this._toggleClass( null, "ui-state-disabled", !!value );
13464	},
13465
13466	_percentage: function() {
13467		return this.indeterminate ?
13468			100 :
13469			100 * ( this.options.value - this.min ) / ( this.options.max - this.min );
13470	},
13471
13472	_refreshValue: function() {
13473		var value = this.options.value,
13474			percentage = this._percentage();
13475
13476		this.valueDiv
13477			.toggle( this.indeterminate || value > this.min )
13478			.width( percentage.toFixed( 0 ) + "%" );
13479
13480		this
13481			._toggleClass( this.valueDiv, "ui-progressbar-complete", null,
13482				value === this.options.max )
13483			._toggleClass( "ui-progressbar-indeterminate", null, this.indeterminate );
13484
13485		if ( this.indeterminate ) {
13486			this.element.removeAttr( "aria-valuenow" );
13487			if ( !this.overlayDiv ) {
13488				this.overlayDiv = $( "<div>" ).appendTo( this.valueDiv );
13489				this._addClass( this.overlayDiv, "ui-progressbar-overlay" );
13490			}
13491		} else {
13492			this.element.attr( {
13493				"aria-valuemax": this.options.max,
13494				"aria-valuenow": value
13495			} );
13496			if ( this.overlayDiv ) {
13497				this.overlayDiv.remove();
13498				this.overlayDiv = null;
13499			}
13500		}
13501
13502		if ( this.oldValue !== value ) {
13503			this.oldValue = value;
13504			this._trigger( "change" );
13505		}
13506		if ( value === this.options.max ) {
13507			this._trigger( "complete" );
13508		}
13509	}
13510} );
13511
13512
13513/*!
13514 * jQuery UI Selectable 1.12.1
13515 * http://jqueryui.com
13516 *
13517 * Copyright jQuery Foundation and other contributors
13518 * Released under the MIT license.
13519 * http://jquery.org/license
13520 */
13521
13522//>>label: Selectable
13523//>>group: Interactions
13524//>>description: Allows groups of elements to be selected with the mouse.
13525//>>docs: http://api.jqueryui.com/selectable/
13526//>>demos: http://jqueryui.com/selectable/
13527//>>css.structure: ../../themes/base/selectable.css
13528
13529
13530
13531var widgetsSelectable = $.widget( "ui.selectable", $.ui.mouse, {
13532	version: "1.12.1",
13533	options: {
13534		appendTo: "body",
13535		autoRefresh: true,
13536		distance: 0,
13537		filter: "*",
13538		tolerance: "touch",
13539
13540		// Callbacks
13541		selected: null,
13542		selecting: null,
13543		start: null,
13544		stop: null,
13545		unselected: null,
13546		unselecting: null
13547	},
13548	_create: function() {
13549		var that = this;
13550
13551		this._addClass( "ui-selectable" );
13552
13553		this.dragged = false;
13554
13555		// Cache selectee children based on filter
13556		this.refresh = function() {
13557			that.elementPos = $( that.element[ 0 ] ).offset();
13558			that.selectees = $( that.options.filter, that.element[ 0 ] );
13559			that._addClass( that.selectees, "ui-selectee" );
13560			that.selectees.each( function() {
13561				var $this = $( this ),
13562					selecteeOffset = $this.offset(),
13563					pos = {
13564						left: selecteeOffset.left - that.elementPos.left,
13565						top: selecteeOffset.top - that.elementPos.top
13566					};
13567				$.data( this, "selectable-item", {
13568					element: this,
13569					$element: $this,
13570					left: pos.left,
13571					top: pos.top,
13572					right: pos.left + $this.outerWidth(),
13573					bottom: pos.top + $this.outerHeight(),
13574					startselected: false,
13575					selected: $this.hasClass( "ui-selected" ),
13576					selecting: $this.hasClass( "ui-selecting" ),
13577					unselecting: $this.hasClass( "ui-unselecting" )
13578				} );
13579			} );
13580		};
13581		this.refresh();
13582
13583		this._mouseInit();
13584
13585		this.helper = $( "<div>" );
13586		this._addClass( this.helper, "ui-selectable-helper" );
13587	},
13588
13589	_destroy: function() {
13590		this.selectees.removeData( "selectable-item" );
13591		this._mouseDestroy();
13592	},
13593
13594	_mouseStart: function( event ) {
13595		var that = this,
13596			options = this.options;
13597
13598		this.opos = [ event.pageX, event.pageY ];
13599		this.elementPos = $( this.element[ 0 ] ).offset();
13600
13601		if ( this.options.disabled ) {
13602			return;
13603		}
13604
13605		this.selectees = $( options.filter, this.element[ 0 ] );
13606
13607		this._trigger( "start", event );
13608
13609		$( options.appendTo ).append( this.helper );
13610
13611		// position helper (lasso)
13612		this.helper.css( {
13613			"left": event.pageX,
13614			"top": event.pageY,
13615			"width": 0,
13616			"height": 0
13617		} );
13618
13619		if ( options.autoRefresh ) {
13620			this.refresh();
13621		}
13622
13623		this.selectees.filter( ".ui-selected" ).each( function() {
13624			var selectee = $.data( this, "selectable-item" );
13625			selectee.startselected = true;
13626			if ( !event.metaKey && !event.ctrlKey ) {
13627				that._removeClass( selectee.$element, "ui-selected" );
13628				selectee.selected = false;
13629				that._addClass( selectee.$element, "ui-unselecting" );
13630				selectee.unselecting = true;
13631
13632				// selectable UNSELECTING callback
13633				that._trigger( "unselecting", event, {
13634					unselecting: selectee.element
13635				} );
13636			}
13637		} );
13638
13639		$( event.target ).parents().addBack().each( function() {
13640			var doSelect,
13641				selectee = $.data( this, "selectable-item" );
13642			if ( selectee ) {
13643				doSelect = ( !event.metaKey && !event.ctrlKey ) ||
13644					!selectee.$element.hasClass( "ui-selected" );
13645				that._removeClass( selectee.$element, doSelect ? "ui-unselecting" : "ui-selected" )
13646					._addClass( selectee.$element, doSelect ? "ui-selecting" : "ui-unselecting" );
13647				selectee.unselecting = !doSelect;
13648				selectee.selecting = doSelect;
13649				selectee.selected = doSelect;
13650
13651				// selectable (UN)SELECTING callback
13652				if ( doSelect ) {
13653					that._trigger( "selecting", event, {
13654						selecting: selectee.element
13655					} );
13656				} else {
13657					that._trigger( "unselecting", event, {
13658						unselecting: selectee.element
13659					} );
13660				}
13661				return false;
13662			}
13663		} );
13664
13665	},
13666
13667	_mouseDrag: function( event ) {
13668
13669		this.dragged = true;
13670
13671		if ( this.options.disabled ) {
13672			return;
13673		}
13674
13675		var tmp,
13676			that = this,
13677			options = this.options,
13678			x1 = this.opos[ 0 ],
13679			y1 = this.opos[ 1 ],
13680			x2 = event.pageX,
13681			y2 = event.pageY;
13682
13683		if ( x1 > x2 ) { tmp = x2; x2 = x1; x1 = tmp; }
13684		if ( y1 > y2 ) { tmp = y2; y2 = y1; y1 = tmp; }
13685		this.helper.css( { left: x1, top: y1, width: x2 - x1, height: y2 - y1 } );
13686
13687		this.selectees.each( function() {
13688			var selectee = $.data( this, "selectable-item" ),
13689				hit = false,
13690				offset = {};
13691
13692			//prevent helper from being selected if appendTo: selectable
13693			if ( !selectee || selectee.element === that.element[ 0 ] ) {
13694				return;
13695			}
13696
13697			offset.left   = selectee.left   + that.elementPos.left;
13698			offset.right  = selectee.right  + that.elementPos.left;
13699			offset.top    = selectee.top    + that.elementPos.top;
13700			offset.bottom = selectee.bottom + that.elementPos.top;
13701
13702			if ( options.tolerance === "touch" ) {
13703				hit = ( !( offset.left > x2 || offset.right < x1 || offset.top > y2 ||
13704                    offset.bottom < y1 ) );
13705			} else if ( options.tolerance === "fit" ) {
13706				hit = ( offset.left > x1 && offset.right < x2 && offset.top > y1 &&
13707                    offset.bottom < y2 );
13708			}
13709
13710			if ( hit ) {
13711
13712				// SELECT
13713				if ( selectee.selected ) {
13714					that._removeClass( selectee.$element, "ui-selected" );
13715					selectee.selected = false;
13716				}
13717				if ( selectee.unselecting ) {
13718					that._removeClass( selectee.$element, "ui-unselecting" );
13719					selectee.unselecting = false;
13720				}
13721				if ( !selectee.selecting ) {
13722					that._addClass( selectee.$element, "ui-selecting" );
13723					selectee.selecting = true;
13724
13725					// selectable SELECTING callback
13726					that._trigger( "selecting", event, {
13727						selecting: selectee.element
13728					} );
13729				}
13730			} else {
13731
13732				// UNSELECT
13733				if ( selectee.selecting ) {
13734					if ( ( event.metaKey || event.ctrlKey ) && selectee.startselected ) {
13735						that._removeClass( selectee.$element, "ui-selecting" );
13736						selectee.selecting = false;
13737						that._addClass( selectee.$element, "ui-selected" );
13738						selectee.selected = true;
13739					} else {
13740						that._removeClass( selectee.$element, "ui-selecting" );
13741						selectee.selecting = false;
13742						if ( selectee.startselected ) {
13743							that._addClass( selectee.$element, "ui-unselecting" );
13744							selectee.unselecting = true;
13745						}
13746
13747						// selectable UNSELECTING callback
13748						that._trigger( "unselecting", event, {
13749							unselecting: selectee.element
13750						} );
13751					}
13752				}
13753				if ( selectee.selected ) {
13754					if ( !event.metaKey && !event.ctrlKey && !selectee.startselected ) {
13755						that._removeClass( selectee.$element, "ui-selected" );
13756						selectee.selected = false;
13757
13758						that._addClass( selectee.$element, "ui-unselecting" );
13759						selectee.unselecting = true;
13760
13761						// selectable UNSELECTING callback
13762						that._trigger( "unselecting", event, {
13763							unselecting: selectee.element
13764						} );
13765					}
13766				}
13767			}
13768		} );
13769
13770		return false;
13771	},
13772
13773	_mouseStop: function( event ) {
13774		var that = this;
13775
13776		this.dragged = false;
13777
13778		$( ".ui-unselecting", this.element[ 0 ] ).each( function() {
13779			var selectee = $.data( this, "selectable-item" );
13780			that._removeClass( selectee.$element, "ui-unselecting" );
13781			selectee.unselecting = false;
13782			selectee.startselected = false;
13783			that._trigger( "unselected", event, {
13784				unselected: selectee.element
13785			} );
13786		} );
13787		$( ".ui-selecting", this.element[ 0 ] ).each( function() {
13788			var selectee = $.data( this, "selectable-item" );
13789			that._removeClass( selectee.$element, "ui-selecting" )
13790				._addClass( selectee.$element, "ui-selected" );
13791			selectee.selecting = false;
13792			selectee.selected = true;
13793			selectee.startselected = true;
13794			that._trigger( "selected", event, {
13795				selected: selectee.element
13796			} );
13797		} );
13798		this._trigger( "stop", event );
13799
13800		this.helper.remove();
13801
13802		return false;
13803	}
13804
13805} );
13806
13807
13808/*!
13809 * jQuery UI Selectmenu 1.12.1
13810 * http://jqueryui.com
vendor: 5,543 bytes, lines 13811-14017
13811 *
13812 * Copyright jQuery Foundation and other contributors
13813 * Released under the MIT license.
13814 * http://jquery.org/license
13815 */
13816
13817//>>label: Selectmenu
13818//>>group: Widgets
13819// jscs:disable maximumLineLength
13820//>>description: Duplicates and extends the functionality of a native HTML select element, allowing it to be customizable in behavior and appearance far beyond the limitations of a native select.
13821// jscs:enable maximumLineLength
13822//>>docs: http://api.jqueryui.com/selectmenu/
13823//>>demos: http://jqueryui.com/selectmenu/
13824//>>css.structure: ../../themes/base/core.css
13825//>>css.structure: ../../themes/base/selectmenu.css, ../../themes/base/button.css
13826//>>css.theme: ../../themes/base/theme.css
13827
13828
13829
13830var widgetsSelectmenu = $.widget( "ui.selectmenu", [ $.ui.formResetMixin, {
13831	version: "1.12.1",
13832	defaultElement: "<select>",
13833	options: {
13834		appendTo: null,
13835		classes: {
13836			"ui-selectmenu-button-open": "ui-corner-top",
13837			"ui-selectmenu-button-closed": "ui-corner-all"
13838		},
13839		disabled: null,
13840		icons: {
13841			button: "ui-icon-triangle-1-s"
13842		},
13843		position: {
13844			my: "left top",
13845			at: "left bottom",
13846			collision: "none"
13847		},
13848		width: false,
13849
13850		// Callbacks
13851		change: null,
13852		close: null,
13853		focus: null,
13854		open: null,
13855		select: null
13856	},
13857
13858	_create: function() {
13859		var selectmenuId = this.element.uniqueId().attr( "id" );
13860		this.ids = {
13861			element: selectmenuId,
13862			button: selectmenuId + "-button",
13863			menu: selectmenuId + "-menu"
13864		};
13865
13866		this._drawButton();
13867		this._drawMenu();
13868		this._bindFormResetHandler();
13869
13870		this._rendered = false;
13871		this.menuItems = $();
13872	},
13873
13874	_drawButton: function() {
13875		var icon,
13876			that = this,
13877			item = this._parseOption(
13878				this.element.find( "option:selected" ),
13879				this.element[ 0 ].selectedIndex
13880			);
13881
13882		// Associate existing label with the new button
13883		this.labels = this.element.labels().attr( "for", this.ids.button );
13884		this._on( this.labels, {
13885			click: function( event ) {
13886				this.button.focus();
13887				event.preventDefault();
13888			}
13889		} );
13890
13891		// Hide original select element
13892		this.element.hide();
13893
13894		// Create button
13895		this.button = $( "<span>", {
13896			tabindex: this.options.disabled ? -1 : 0,
13897			id: this.ids.button,
13898			role: "combobox",
13899			"aria-expanded": "false",
13900			"aria-autocomplete": "list",
13901			"aria-owns": this.ids.menu,
13902			"aria-haspopup": "true",
13903			title: this.element.attr( "title" )
13904		} )
13905			.insertAfter( this.element );
13906
13907		this._addClass( this.button, "ui-selectmenu-button ui-selectmenu-button-closed",
13908			"ui-button ui-widget" );
13909
13910		icon = $( "<span>" ).appendTo( this.button );
13911		this._addClass( icon, "ui-selectmenu-icon", "ui-icon " + this.options.icons.button );
13912		this.buttonItem = this._renderButtonItem( item )
13913			.appendTo( this.button );
13914
13915		if ( this.options.width !== false ) {
13916			this._resizeButton();
13917		}
13918
13919		this._on( this.button, this._buttonEvents );
13920		this.button.one( "focusin", function() {
13921
13922			// Delay rendering the menu items until the button receives focus.
13923			// The menu may have already been rendered via a programmatic open.
13924			if ( !that._rendered ) {
13925				that._refreshMenu();
13926			}
13927		} );
13928	},
13929
13930	_drawMenu: function() {
13931		var that = this;
13932
13933		// Create menu
13934		this.menu = $( "<ul>", {
13935			"aria-hidden": "true",
13936			"aria-labelledby": this.ids.button,
13937			id: this.ids.menu
13938		} );
13939
13940		// Wrap menu
13941		this.menuWrap = $( "<div>" ).append( this.menu );
13942		this._addClass( this.menuWrap, "ui-selectmenu-menu", "ui-front" );
13943		this.menuWrap.appendTo( this._appendTo() );
13944
13945		// Initialize menu widget
13946		this.menuInstance = this.menu
13947			.menu( {
13948				classes: {
13949					"ui-menu": "ui-corner-bottom"
13950				},
13951				role: "listbox",
13952				select: function( event, ui ) {
13953					event.preventDefault();
13954
13955					// Support: IE8
13956					// If the item was selected via a click, the text selection
13957					// will be destroyed in IE
13958					that._setSelection();
13959
13960					that._select( ui.item.data( "ui-selectmenu-item" ), event );
13961				},
13962				focus: function( event, ui ) {
13963					var item = ui.item.data( "ui-selectmenu-item" );
13964
13965					// Prevent inital focus from firing and check if its a newly focused item
13966					if ( that.focusIndex != null && item.index !== that.focusIndex ) {
13967						that._trigger( "focus", event, { item: item } );
13968						if ( !that.isOpen ) {
13969							that._select( item, event );
13970						}
13971					}
13972					that.focusIndex = item.index;
13973
13974					that.button.attr( "aria-activedescendant",
13975						that.menuItems.eq( item.index ).attr( "id" ) );
13976				}
13977			} )
13978			.menu( "instance" );
13979
13980		// Don't close the menu on mouseleave
13981		this.menuInstance._off( this.menu, "mouseleave" );
13982
13983		// Cancel the menu's collapseAll on document click
13984		this.menuInstance._closeOnDocumentClick = function() {
13985			return false;
13986		};
13987
13988		// Selects often contain empty items, but never contain dividers
13989		this.menuInstance._isDivider = function() {
13990			return false;
13991		};
13992	},
13993
13994	refresh: function() {
13995		this._refreshMenu();
13996		this.buttonItem.replaceWith(
13997			this.buttonItem = this._renderButtonItem(
13998
13999				// Fall back to an empty object in case there are no options
14000				this._getSelectedItem().data( "ui-selectmenu-item" ) || {}
14001			)
14002		);
14003		if ( this.options.width === null ) {
14004			this._resizeButton();
14005		}
14006	},
14007
14008	_refreshMenu: function() {
14009		var item,
14010			options = this.element.find( "option" );
14011
14012		this.menu.empty();
14013
14014		this._parseOptions( options );
14015		this._renderMenu( this.menu, this.items );
14016
14017		this.menuInstance.refresh();
vendor: 9,769 bytes, lines 14018-14425
14018		this.menuItems = this.menu.find( "li" )
14019			.not( ".ui-selectmenu-optgroup" )
14020				.find( ".ui-menu-item-wrapper" );
14021
14022		this._rendered = true;
14023
14024		if ( !options.length ) {
14025			return;
14026		}
14027
14028		item = this._getSelectedItem();
14029
14030		// Update the menu to have the correct item focused
14031		this.menuInstance.focus( null, item );
14032		this._setAria( item.data( "ui-selectmenu-item" ) );
14033
14034		// Set disabled state
14035		this._setOption( "disabled", this.element.prop( "disabled" ) );
14036	},
14037
14038	open: function( event ) {
14039		if ( this.options.disabled ) {
14040			return;
14041		}
14042
14043		// If this is the first time the menu is being opened, render the items
14044		if ( !this._rendered ) {
14045			this._refreshMenu();
14046		} else {
14047
14048			// Menu clears focus on close, reset focus to selected item
14049			this._removeClass( this.menu.find( ".ui-state-active" ), null, "ui-state-active" );
14050			this.menuInstance.focus( null, this._getSelectedItem() );
14051		}
14052
14053		// If there are no options, don't open the menu
14054		if ( !this.menuItems.length ) {
14055			return;
14056		}
14057
14058		this.isOpen = true;
14059		this._toggleAttr();
14060		this._resizeMenu();
14061		this._position();
14062
14063		this._on( this.document, this._documentClick );
14064
14065		this._trigger( "open", event );
14066	},
14067
14068	_position: function() {
14069		this.menuWrap.position( $.extend( { of: this.button }, this.options.position ) );
14070	},
14071
14072	close: function( event ) {
14073		if ( !this.isOpen ) {
14074			return;
14075		}
14076
14077		this.isOpen = false;
14078		this._toggleAttr();
14079
14080		this.range = null;
14081		this._off( this.document );
14082
14083		this._trigger( "close", event );
14084	},
14085
14086	widget: function() {
14087		return this.button;
14088	},
14089
14090	menuWidget: function() {
14091		return this.menu;
14092	},
14093
14094	_renderButtonItem: function( item ) {
14095		var buttonItem = $( "<span>" );
14096
14097		this._setText( buttonItem, item.label );
14098		this._addClass( buttonItem, "ui-selectmenu-text" );
14099
14100		return buttonItem;
14101	},
14102
14103	_renderMenu: function( ul, items ) {
14104		var that = this,
14105			currentOptgroup = "";
14106
14107		$.each( items, function( index, item ) {
14108			var li;
14109
14110			if ( item.optgroup !== currentOptgroup ) {
14111				li = $( "<li>", {
14112					text: item.optgroup
14113				} );
14114				that._addClass( li, "ui-selectmenu-optgroup", "ui-menu-divider" +
14115					( item.element.parent( "optgroup" ).prop( "disabled" ) ?
14116						" ui-state-disabled" :
14117						"" ) );
14118
14119				li.appendTo( ul );
14120
14121				currentOptgroup = item.optgroup;
14122			}
14123
14124			that._renderItemData( ul, item );
14125		} );
14126	},
14127
14128	_renderItemData: function( ul, item ) {
14129		return this._renderItem( ul, item ).data( "ui-selectmenu-item", item );
14130	},
14131
14132	_renderItem: function( ul, item ) {
14133		var li = $( "<li>" ),
14134			wrapper = $( "<div>", {
14135				title: item.element.attr( "title" )
14136			} );
14137
14138		if ( item.disabled ) {
14139			this._addClass( li, null, "ui-state-disabled" );
14140		}
14141		this._setText( wrapper, item.label );
14142
14143		return li.append( wrapper ).appendTo( ul );
14144	},
14145
14146	_setText: function( element, value ) {
14147		if ( value ) {
14148			element.text( value );
14149		} else {
14150			element.html( "&#160;" );
14151		}
14152	},
14153
14154	_move: function( direction, event ) {
14155		var item, next,
14156			filter = ".ui-menu-item";
14157
14158		if ( this.isOpen ) {
14159			item = this.menuItems.eq( this.focusIndex ).parent( "li" );
14160		} else {
14161			item = this.menuItems.eq( this.element[ 0 ].selectedIndex ).parent( "li" );
14162			filter += ":not(.ui-state-disabled)";
14163		}
14164
14165		if ( direction === "first" || direction === "last" ) {
14166			next = item[ direction === "first" ? "prevAll" : "nextAll" ]( filter ).eq( -1 );
14167		} else {
14168			next = item[ direction + "All" ]( filter ).eq( 0 );
14169		}
14170
14171		if ( next.length ) {
14172			this.menuInstance.focus( event, next );
14173		}
14174	},
14175
14176	_getSelectedItem: function() {
14177		return this.menuItems.eq( this.element[ 0 ].selectedIndex ).parent( "li" );
14178	},
14179
14180	_toggle: function( event ) {
14181		this[ this.isOpen ? "close" : "open" ]( event );
14182	},
14183
14184	_setSelection: function() {
14185		var selection;
14186
14187		if ( !this.range ) {
14188			return;
14189		}
14190
14191		if ( window.getSelection ) {
14192			selection = window.getSelection();
14193			selection.removeAllRanges();
14194			selection.addRange( this.range );
14195
14196		// Support: IE8
14197		} else {
14198			this.range.select();
14199		}
14200
14201		// Support: IE
14202		// Setting the text selection kills the button focus in IE, but
14203		// restoring the focus doesn't kill the selection.
14204		this.button.focus();
14205	},
14206
14207	_documentClick: {
14208		mousedown: function( event ) {
14209			if ( !this.isOpen ) {
14210				return;
14211			}
14212
14213			if ( !$( event.target ).closest( ".ui-selectmenu-menu, #" +
14214					$.ui.escapeSelector( this.ids.button ) ).length ) {
14215				this.close( event );
14216			}
14217		}
14218	},
14219
14220	_buttonEvents: {
14221
14222		// Prevent text selection from being reset when interacting with the selectmenu (#10144)
14223		mousedown: function() {
14224			var selection;
14225
14226			if ( window.getSelection ) {
14227				selection = window.getSelection();
14228				if ( selection.rangeCount ) {
14229					this.range = selection.getRangeAt( 0 );
14230				}
14231
14232			// Support: IE8
14233			} else {
14234				this.range = document.selection.createRange();
14235			}
14236		},
14237
14238		click: function( event ) {
14239			this._setSelection();
14240			this._toggle( event );
14241		},
14242
14243		keydown: function( event ) {
14244			var preventDefault = true;
14245			switch ( event.keyCode ) {
14246			case $.ui.keyCode.TAB:
14247			case $.ui.keyCode.ESCAPE:
14248				this.close( event );
14249				preventDefault = false;
14250				break;
14251			case $.ui.keyCode.ENTER:
14252				if ( this.isOpen ) {
14253					this._selectFocusedItem( event );
14254				}
14255				break;
14256			case $.ui.keyCode.UP:
14257				if ( event.altKey ) {
14258					this._toggle( event );
14259				} else {
14260					this._move( "prev", event );
14261				}
14262				break;
14263			case $.ui.keyCode.DOWN:
14264				if ( event.altKey ) {
14265					this._toggle( event );
14266				} else {
14267					this._move( "next", event );
14268				}
14269				break;
14270			case $.ui.keyCode.SPACE:
14271				if ( this.isOpen ) {
14272					this._selectFocusedItem( event );
14273				} else {
14274					this._toggle( event );
14275				}
14276				break;
14277			case $.ui.keyCode.LEFT:
14278				this._move( "prev", event );
14279				break;
14280			case $.ui.keyCode.RIGHT:
14281				this._move( "next", event );
14282				break;
14283			case $.ui.keyCode.HOME:
14284			case $.ui.keyCode.PAGE_UP:
14285				this._move( "first", event );
14286				break;
14287			case $.ui.keyCode.END:
14288			case $.ui.keyCode.PAGE_DOWN:
14289				this._move( "last", event );
14290				break;
14291			default:
14292				this.menu.trigger( event );
14293				preventDefault = false;
14294			}
14295
14296			if ( preventDefault ) {
14297				event.preventDefault();
14298			}
14299		}
14300	},
14301
14302	_selectFocusedItem: function( event ) {
14303		var item = this.menuItems.eq( this.focusIndex ).parent( "li" );
14304		if ( !item.hasClass( "ui-state-disabled" ) ) {
14305			this._select( item.data( "ui-selectmenu-item" ), event );
14306		}
14307	},
14308
14309	_select: function( item, event ) {
14310		var oldIndex = this.element[ 0 ].selectedIndex;
14311
14312		// Change native select element
14313		this.element[ 0 ].selectedIndex = item.index;
14314		this.buttonItem.replaceWith( this.buttonItem = this._renderButtonItem( item ) );
14315		this._setAria( item );
14316		this._trigger( "select", event, { item: item } );
14317
14318		if ( item.index !== oldIndex ) {
14319			this._trigger( "change", event, { item: item } );
14320		}
14321
14322		this.close( event );
14323	},
14324
14325	_setAria: function( item ) {
14326		var id = this.menuItems.eq( item.index ).attr( "id" );
14327
14328		this.button.attr( {
14329			"aria-labelledby": id,
14330			"aria-activedescendant": id
14331		} );
14332		this.menu.attr( "aria-activedescendant", id );
14333	},
14334
14335	_setOption: function( key, value ) {
14336		if ( key === "icons" ) {
14337			var icon = this.button.find( "span.ui-icon" );
14338			this._removeClass( icon, null, this.options.icons.button )
14339				._addClass( icon, null, value.button );
14340		}
14341
14342		this._super( key, value );
14343
14344		if ( key === "appendTo" ) {
14345			this.menuWrap.appendTo( this._appendTo() );
14346		}
14347
14348		if ( key === "width" ) {
14349			this._resizeButton();
14350		}
14351	},
14352
14353	_setOptionDisabled: function( value ) {
14354		this._super( value );
14355
14356		this.menuInstance.option( "disabled", value );
14357		this.button.attr( "aria-disabled", value );
14358		this._toggleClass( this.button, null, "ui-state-disabled", value );
14359
14360		this.element.prop( "disabled", value );
14361		if ( value ) {
14362			this.button.attr( "tabindex", -1 );
14363			this.close();
14364		} else {
14365			this.button.attr( "tabindex", 0 );
14366		}
14367	},
14368
14369	_appendTo: function() {
14370		var element = this.options.appendTo;
14371
14372		if ( element ) {
14373			element = element.jquery || element.nodeType ?
14374				$( element ) :
14375				this.document.find( element ).eq( 0 );
14376		}
14377
14378		if ( !element || !element[ 0 ] ) {
14379			element = this.element.closest( ".ui-front, dialog" );
14380		}
14381
14382		if ( !element.length ) {
14383			element = this.document[ 0 ].body;
14384		}
14385
14386		return element;
14387	},
14388
14389	_toggleAttr: function() {
14390		this.button.attr( "aria-expanded", this.isOpen );
14391
14392		// We can't use two _toggleClass() calls here, because we need to make sure
14393		// we always remove classes first and add them second, otherwise if both classes have the
14394		// same theme class, it will be removed after we add it.
14395		this._removeClass( this.button, "ui-selectmenu-button-" +
14396			( this.isOpen ? "closed" : "open" ) )
14397			._addClass( this.button, "ui-selectmenu-button-" +
14398				( this.isOpen ? "open" : "closed" ) )
14399			._toggleClass( this.menuWrap, "ui-selectmenu-open", null, this.isOpen );
14400
14401		this.menu.attr( "aria-hidden", !this.isOpen );
14402	},
14403
14404	_resizeButton: function() {
14405		var width = this.options.width;
14406
14407		// For `width: false`, just remove inline style and stop
14408		if ( width === false ) {
14409			this.button.css( "width", "" );
14410			return;
14411		}
14412
14413		// For `width: null`, match the width of the original element
14414		if ( width === null ) {
14415			width = this.element.show().outerWidth();
14416			this.element.hide();
14417		}
14418
14419		this.button.outerWidth( width );
14420	},
14421
14422	_resizeMenu: function() {
14423		this.menu.outerWidth( Math.max(
14424			this.button.outerWidth(),
14425
vendor: 5,390 bytes, lines 14426-14639
14426			// Support: IE10
14427			// IE10 wraps long text (possibly a rounding bug)
14428			// so we add 1px to avoid the wrapping
14429			this.menu.width( "" ).outerWidth() + 1
14430		) );
14431	},
14432
14433	_getCreateOptions: function() {
14434		var options = this._super();
14435
14436		options.disabled = this.element.prop( "disabled" );
14437
14438		return options;
14439	},
14440
14441	_parseOptions: function( options ) {
14442		var that = this,
14443			data = [];
14444		options.each( function( index, item ) {
14445			data.push( that._parseOption( $( item ), index ) );
14446		} );
14447		this.items = data;
14448	},
14449
14450	_parseOption: function( option, index ) {
14451		var optgroup = option.parent( "optgroup" );
14452
14453		return {
14454			element: option,
14455			index: index,
14456			value: option.val(),
14457			label: option.text(),
14458			optgroup: optgroup.attr( "label" ) || "",
14459			disabled: optgroup.prop( "disabled" ) || option.prop( "disabled" )
14460		};
14461	},
14462
14463	_destroy: function() {
14464		this._unbindFormResetHandler();
14465		this.menuWrap.remove();
14466		this.button.remove();
14467		this.element.show();
14468		this.element.removeUniqueId();
14469		this.labels.attr( "for", this.ids.element );
14470	}
14471} ] );
14472
14473
14474/*!
14475 * jQuery UI Slider 1.12.1
14476 * http://jqueryui.com
14477 *
14478 * Copyright jQuery Foundation and other contributors
14479 * Released under the MIT license.
14480 * http://jquery.org/license
14481 */
14482
14483//>>label: Slider
14484//>>group: Widgets
14485//>>description: Displays a flexible slider with ranges and accessibility via keyboard.
14486//>>docs: http://api.jqueryui.com/slider/
14487//>>demos: http://jqueryui.com/slider/
14488//>>css.structure: ../../themes/base/core.css
14489//>>css.structure: ../../themes/base/slider.css
14490//>>css.theme: ../../themes/base/theme.css
14491
14492
14493
14494var widgetsSlider = $.widget( "ui.slider", $.ui.mouse, {
14495	version: "1.12.1",
14496	widgetEventPrefix: "slide",
14497
14498	options: {
14499		animate: false,
14500		classes: {
14501			"ui-slider": "ui-corner-all",
14502			"ui-slider-handle": "ui-corner-all",
14503
14504			// Note: ui-widget-header isn't the most fittingly semantic framework class for this
14505			// element, but worked best visually with a variety of themes
14506			"ui-slider-range": "ui-corner-all ui-widget-header"
14507		},
14508		distance: 0,
14509		max: 100,
14510		min: 0,
14511		orientation: "horizontal",
14512		range: false,
14513		step: 1,
14514		value: 0,
14515		values: null,
14516
14517		// Callbacks
14518		change: null,
14519		slide: null,
14520		start: null,
14521		stop: null
14522	},
14523
14524	// Number of pages in a slider
14525	// (how many times can you page up/down to go through the whole range)
14526	numPages: 5,
14527
14528	_create: function() {
14529		this._keySliding = false;
14530		this._mouseSliding = false;
14531		this._animateOff = true;
14532		this._handleIndex = null;
14533		this._detectOrientation();
14534		this._mouseInit();
14535		this._calculateNewMax();
14536
14537		this._addClass( "ui-slider ui-slider-" + this.orientation,
14538			"ui-widget ui-widget-content" );
14539
14540		this._refresh();
14541
14542		this._animateOff = false;
14543	},
14544
14545	_refresh: function() {
14546		this._createRange();
14547		this._createHandles();
14548		this._setupEvents();
14549		this._refreshValue();
14550	},
14551
14552	_createHandles: function() {
14553		var i, handleCount,
14554			options = this.options,
14555			existingHandles = this.element.find( ".ui-slider-handle" ),
14556			handle = "<span tabindex='0'></span>",
14557			handles = [];
14558
14559		handleCount = ( options.values && options.values.length ) || 1;
14560
14561		if ( existingHandles.length > handleCount ) {
14562			existingHandles.slice( handleCount ).remove();
14563			existingHandles = existingHandles.slice( 0, handleCount );
14564		}
14565
14566		for ( i = existingHandles.length; i < handleCount; i++ ) {
14567			handles.push( handle );
14568		}
14569
14570		this.handles = existingHandles.add( $( handles.join( "" ) ).appendTo( this.element ) );
14571
14572		this._addClass( this.handles, "ui-slider-handle", "ui-state-default" );
14573
14574		this.handle = this.handles.eq( 0 );
14575
14576		this.handles.each( function( i ) {
14577			$( this )
14578				.data( "ui-slider-handle-index", i )
14579				.attr( "tabIndex", 0 );
14580		} );
14581	},
14582
14583	_createRange: function() {
14584		var options = this.options;
14585
14586		if ( options.range ) {
14587			if ( options.range === true ) {
14588				if ( !options.values ) {
14589					options.values = [ this._valueMin(), this._valueMin() ];
14590				} else if ( options.values.length && options.values.length !== 2 ) {
14591					options.values = [ options.values[ 0 ], options.values[ 0 ] ];
14592				} else if ( $.isArray( options.values ) ) {
14593					options.values = options.values.slice( 0 );
14594				}
14595			}
14596
14597			if ( !this.range || !this.range.length ) {
14598				this.range = $( "<div>" )
14599					.appendTo( this.element );
14600
14601				this._addClass( this.range, "ui-slider-range" );
14602			} else {
14603				this._removeClass( this.range, "ui-slider-range-min ui-slider-range-max" );
14604
14605				// Handle range switching from true to min/max
14606				this.range.css( {
14607					"left": "",
14608					"bottom": ""
14609				} );
14610			}
14611			if ( options.range === "min" || options.range === "max" ) {
14612				this._addClass( this.range, "ui-slider-range-" + options.range );
14613			}
14614		} else {
14615			if ( this.range ) {
14616				this.range.remove();
14617			}
14618			this.range = null;
14619		}
14620	},
14621
14622	_setupEvents: function() {
14623		this._off( this.handles );
14624		this._on( this.handles, this._handleEvents );
14625		this._hoverable( this.handles );
14626		this._focusable( this.handles );
14627	},
14628
14629	_destroy: function() {
14630		this.handles.remove();
14631		if ( this.range ) {
14632			this.range.remove();
14633		}
14634
14635		this._mouseDestroy();
14636	},
14637
14638	_mouseCapture: function( event ) {
14639		var position, normValue, distance, closestHandle, index, allowed, offset, mou
vendor: 15,762 bytes, lines 14639-15212
14639seOverHandle,
14640			that = this,
14641			o = this.options;
14642
14643		if ( o.disabled ) {
14644			return false;
14645		}
14646
14647		this.elementSize = {
14648			width: this.element.outerWidth(),
14649			height: this.element.outerHeight()
14650		};
14651		this.elementOffset = this.element.offset();
14652
14653		position = { x: event.pageX, y: event.pageY };
14654		normValue = this._normValueFromMouse( position );
14655		distance = this._valueMax() - this._valueMin() + 1;
14656		this.handles.each( function( i ) {
14657			var thisDistance = Math.abs( normValue - that.values( i ) );
14658			if ( ( distance > thisDistance ) ||
14659				( distance === thisDistance &&
14660					( i === that._lastChangedValue || that.values( i ) === o.min ) ) ) {
14661				distance = thisDistance;
14662				closestHandle = $( this );
14663				index = i;
14664			}
14665		} );
14666
14667		allowed = this._start( event, index );
14668		if ( allowed === false ) {
14669			return false;
14670		}
14671		this._mouseSliding = true;
14672
14673		this._handleIndex = index;
14674
14675		this._addClass( closestHandle, null, "ui-state-active" );
14676		closestHandle.trigger( "focus" );
14677
14678		offset = closestHandle.offset();
14679		mouseOverHandle = !$( event.target ).parents().addBack().is( ".ui-slider-handle" );
14680		this._clickOffset = mouseOverHandle ? { left: 0, top: 0 } : {
14681			left: event.pageX - offset.left - ( closestHandle.width() / 2 ),
14682			top: event.pageY - offset.top -
14683				( closestHandle.height() / 2 ) -
14684				( parseInt( closestHandle.css( "borderTopWidth" ), 10 ) || 0 ) -
14685				( parseInt( closestHandle.css( "borderBottomWidth" ), 10 ) || 0 ) +
14686				( parseInt( closestHandle.css( "marginTop" ), 10 ) || 0 )
14687		};
14688
14689		if ( !this.handles.hasClass( "ui-state-hover" ) ) {
14690			this._slide( event, index, normValue );
14691		}
14692		this._animateOff = true;
14693		return true;
14694	},
14695
14696	_mouseStart: function() {
14697		return true;
14698	},
14699
14700	_mouseDrag: function( event ) {
14701		var position = { x: event.pageX, y: event.pageY },
14702			normValue = this._normValueFromMouse( position );
14703
14704		this._slide( event, this._handleIndex, normValue );
14705
14706		return false;
14707	},
14708
14709	_mouseStop: function( event ) {
14710		this._removeClass( this.handles, null, "ui-state-active" );
14711		this._mouseSliding = false;
14712
14713		this._stop( event, this._handleIndex );
14714		this._change( event, this._handleIndex );
14715
14716		this._handleIndex = null;
14717		this._clickOffset = null;
14718		this._animateOff = false;
14719
14720		return false;
14721	},
14722
14723	_detectOrientation: function() {
14724		this.orientation = ( this.options.orientation === "vertical" ) ? "vertical" : "horizontal";
14725	},
14726
14727	_normValueFromMouse: function( position ) {
14728		var pixelTotal,
14729			pixelMouse,
14730			percentMouse,
14731			valueTotal,
14732			valueMouse;
14733
14734		if ( this.orientation === "horizontal" ) {
14735			pixelTotal = this.elementSize.width;
14736			pixelMouse = position.x - this.elementOffset.left -
14737				( this._clickOffset ? this._clickOffset.left : 0 );
14738		} else {
14739			pixelTotal = this.elementSize.height;
14740			pixelMouse = position.y - this.elementOffset.top -
14741				( this._clickOffset ? this._clickOffset.top : 0 );
14742		}
14743
14744		percentMouse = ( pixelMouse / pixelTotal );
14745		if ( percentMouse > 1 ) {
14746			percentMouse = 1;
14747		}
14748		if ( percentMouse < 0 ) {
14749			percentMouse = 0;
14750		}
14751		if ( this.orientation === "vertical" ) {
14752			percentMouse = 1 - percentMouse;
14753		}
14754
14755		valueTotal = this._valueMax() - this._valueMin();
14756		valueMouse = this._valueMin() + percentMouse * valueTotal;
14757
14758		return this._trimAlignValue( valueMouse );
14759	},
14760
14761	_uiHash: function( index, value, values ) {
14762		var uiHash = {
14763			handle: this.handles[ index ],
14764			handleIndex: index,
14765			value: value !== undefined ? value : this.value()
14766		};
14767
14768		if ( this._hasMultipleValues() ) {
14769			uiHash.value = value !== undefined ? value : this.values( index );
14770			uiHash.values = values || this.values();
14771		}
14772
14773		return uiHash;
14774	},
14775
14776	_hasMultipleValues: function() {
14777		return this.options.values && this.options.values.length;
14778	},
14779
14780	_start: function( event, index ) {
14781		return this._trigger( "start", event, this._uiHash( index ) );
14782	},
14783
14784	_slide: function( event, index, newVal ) {
14785		var allowed, otherVal,
14786			currentValue = this.value(),
14787			newValues = this.values();
14788
14789		if ( this._hasMultipleValues() ) {
14790			otherVal = this.values( index ? 0 : 1 );
14791			currentValue = this.values( index );
14792
14793			if ( this.options.values.length === 2 && this.options.range === true ) {
14794				newVal =  index === 0 ? Math.min( otherVal, newVal ) : Math.max( otherVal, newVal );
14795			}
14796
14797			newValues[ index ] = newVal;
14798		}
14799
14800		if ( newVal === currentValue ) {
14801			return;
14802		}
14803
14804		allowed = this._trigger( "slide", event, this._uiHash( index, newVal, newValues ) );
14805
14806		// A slide can be canceled by returning false from the slide callback
14807		if ( allowed === false ) {
14808			return;
14809		}
14810
14811		if ( this._hasMultipleValues() ) {
14812			this.values( index, newVal );
14813		} else {
14814			this.value( newVal );
14815		}
14816	},
14817
14818	_stop: function( event, index ) {
14819		this._trigger( "stop", event, this._uiHash( index ) );
14820	},
14821
14822	_change: function( event, index ) {
14823		if ( !this._keySliding && !this._mouseSliding ) {
14824
14825			//store the last changed value index for reference when handles overlap
14826			this._lastChangedValue = index;
14827			this._trigger( "change", event, this._uiHash( index ) );
14828		}
14829	},
14830
14831	value: function( newValue ) {
14832		if ( arguments.length ) {
14833			this.options.value = this._trimAlignValue( newValue );
14834			this._refreshValue();
14835			this._change( null, 0 );
14836			return;
14837		}
14838
14839		return this._value();
14840	},
14841
14842	values: function( index, newValue ) {
14843		var vals,
14844			newValues,
14845			i;
14846
14847		if ( arguments.length > 1 ) {
14848			this.options.values[ index ] = this._trimAlignValue( newValue );
14849			this._refreshValue();
14850			this._change( null, index );
14851			return;
14852		}
14853
14854		if ( arguments.length ) {
14855			if ( $.isArray( arguments[ 0 ] ) ) {
14856				vals = this.options.values;
14857				newValues = arguments[ 0 ];
14858				for ( i = 0; i < vals.length; i += 1 ) {
14859					vals[ i ] = this._trimAlignValue( newValues[ i ] );
14860					this._change( null, i );
14861				}
14862				this._refreshValue();
14863			} else {
14864				if ( this._hasMultipleValues() ) {
14865					return this._values( index );
14866				} else {
14867					return this.value();
14868				}
14869			}
14870		} else {
14871			return this._values();
14872		}
14873	},
14874
14875	_setOption: function( key, value ) {
14876		var i,
14877			valsLength = 0;
14878
14879		if ( key === "range" && this.options.range === true ) {
14880			if ( value === "min" ) {
14881				this.options.value = this._values( 0 );
14882				this.options.values = null;
14883			} else if ( value === "max" ) {
14884				this.options.value = this._values( this.options.values.length - 1 );
14885				this.options.values = null;
14886			}
14887		}
14888
14889		if ( $.isArray( this.options.values ) ) {
14890			valsLength = this.options.values.length;
14891		}
14892
14893		this._super( key, value );
14894
14895		switch ( key ) {
14896			case "orientation":
14897				this._detectOrientation();
14898				this._removeClass( "ui-slider-horizontal ui-slider-vertical" )
14899					._addClass( "ui-slider-" + this.orientation );
14900				this._refreshValue();
14901				if ( this.options.range ) {
14902					this._refreshRange( value );
14903				}
14904
14905				// Reset positioning from previous orientation
14906				this.handles.css( value === "horizontal" ? "bottom" : "left", "" );
14907				break;
14908			case "value":
14909				this._animateOff = true;
14910				this._refreshValue();
14911				this._change( null, 0 );
14912				this._animateOff = false;
14913				break;
14914			case "values":
14915				this._animateOff = true;
14916				this._refreshValue();
14917
14918				// Start from the last handle to prevent unreachable handles (#9046)
14919				for ( i = valsLength - 1; i >= 0; i-- ) {
14920					this._change( null, i );
14921				}
14922				this._animateOff = false;
14923				break;
14924			case "step":
14925			case "min":
14926			case "max":
14927				this._animateOff = true;
14928				this._calculateNewMax();
14929				this._refreshValue();
14930				this._animateOff = false;
14931				break;
14932			case "range":
14933				this._animateOff = true;
14934				this._refresh();
14935				this._animateOff = false;
14936				break;
14937		}
14938	},
14939
14940	_setOptionDisabled: function( value ) {
14941		this._super( value );
14942
14943		this._toggleClass( null, "ui-state-disabled", !!value );
14944	},
14945
14946	//internal value getter
14947	// _value() returns value trimmed by min and max, aligned by step
14948	_value: function() {
14949		var val = this.options.value;
14950		val = this._trimAlignValue( val );
14951
14952		return val;
14953	},
14954
14955	//internal values getter
14956	// _values() returns array of values trimmed by min and max, aligned by step
14957	// _values( index ) returns single value trimmed by min and max, aligned by step
14958	_values: function( index ) {
14959		var val,
14960			vals,
14961			i;
14962
14963		if ( arguments.length ) {
14964			val = this.options.values[ index ];
14965			val = this._trimAlignValue( val );
14966
14967			return val;
14968		} else if ( this._hasMultipleValues() ) {
14969
14970			// .slice() creates a copy of the array
14971			// this copy gets trimmed by min and max and then returned
14972			vals = this.options.values.slice();
14973			for ( i = 0; i < vals.length; i += 1 ) {
14974				vals[ i ] = this._trimAlignValue( vals[ i ] );
14975			}
14976
14977			return vals;
14978		} else {
14979			return [];
14980		}
14981	},
14982
14983	// Returns the step-aligned value that val is closest to, between (inclusive) min and max
14984	_trimAlignValue: function( val ) {
14985		if ( val <= this._valueMin() ) {
14986			return this._valueMin();
14987		}
14988		if ( val >= this._valueMax() ) {
14989			return this._valueMax();
14990		}
14991		var step = ( this.options.step > 0 ) ? this.options.step : 1,
14992			valModStep = ( val - this._valueMin() ) % step,
14993			alignValue = val - valModStep;
14994
14995		if ( Math.abs( valModStep ) * 2 >= step ) {
14996			alignValue += ( valModStep > 0 ) ? step : ( -step );
14997		}
14998
14999		// Since JavaScript has problems with large floats, round
15000		// the final value to 5 digits after the decimal point (see #4124)
15001		return parseFloat( alignValue.toFixed( 5 ) );
15002	},
15003
15004	_calculateNewMax: function() {
15005		var max = this.options.max,
15006			min = this._valueMin(),
15007			step = this.options.step,
15008			aboveMin = Math.round( ( max - min ) / step ) * step;
15009		max = aboveMin + min;
15010		if ( max > this.options.max ) {
15011
15012			//If max is not divisible by step, rounding off may increase its value
15013			max -= step;
15014		}
15015		this.max = parseFloat( max.toFixed( this._precision() ) );
15016	},
15017
15018	_precision: function() {
15019		var precision = this._precisionOf( this.options.step );
15020		if ( this.options.min !== null ) {
15021			precision = Math.max( precision, this._precisionOf( this.options.min ) );
15022		}
15023		return precision;
15024	},
15025
15026	_precisionOf: function( num ) {
15027		var str = num.toString(),
15028			decimal = str.indexOf( "." );
15029		return decimal === -1 ? 0 : str.length - decimal - 1;
15030	},
15031
15032	_valueMin: function() {
15033		return this.options.min;
15034	},
15035
15036	_valueMax: function() {
15037		return this.max;
15038	},
15039
15040	_refreshRange: function( orientation ) {
15041		if ( orientation === "vertical" ) {
15042			this.range.css( { "width": "", "left": "" } );
15043		}
15044		if ( orientation === "horizontal" ) {
15045			this.range.css( { "height": "", "bottom": "" } );
15046		}
15047	},
15048
15049	_refreshValue: function() {
15050		var lastValPercent, valPercent, value, valueMin, valueMax,
15051			oRange = this.options.range,
15052			o = this.options,
15053			that = this,
15054			animate = ( !this._animateOff ) ? o.animate : false,
15055			_set = {};
15056
15057		if ( this._hasMultipleValues() ) {
15058			this.handles.each( function( i ) {
15059				valPercent = ( that.values( i ) - that._valueMin() ) / ( that._valueMax() -
15060					that._valueMin() ) * 100;
15061				_set[ that.orientation === "horizontal" ? "left" : "bottom" ] = valPercent + "%";
15062				$( this ).stop( 1, 1 )[ animate ? "animate" : "css" ]( _set, o.animate );
15063				if ( that.options.range === true ) {
15064					if ( that.orientation === "horizontal" ) {
15065						if ( i === 0 ) {
15066							that.range.stop( 1, 1 )[ animate ? "animate" : "css" ]( {
15067								left: valPercent + "%"
15068							}, o.animate );
15069						}
15070						if ( i === 1 ) {
15071							that.range[ animate ? "animate" : "css" ]( {
15072								width: ( valPercent - lastValPercent ) + "%"
15073							}, {
15074								queue: false,
15075								duration: o.animate
15076							} );
15077						}
15078					} else {
15079						if ( i === 0 ) {
15080							that.range.stop( 1, 1 )[ animate ? "animate" : "css" ]( {
15081								bottom: ( valPercent ) + "%"
15082							}, o.animate );
15083						}
15084						if ( i === 1 ) {
15085							that.range[ animate ? "animate" : "css" ]( {
15086								height: ( valPercent - lastValPercent ) + "%"
15087							}, {
15088								queue: false,
15089								duration: o.animate
15090							} );
15091						}
15092					}
15093				}
15094				lastValPercent = valPercent;
15095			} );
15096		} else {
15097			value = this.value();
15098			valueMin = this._valueMin();
15099			valueMax = this._valueMax();
15100			valPercent = ( valueMax !== valueMin ) ?
15101					( value - valueMin ) / ( valueMax - valueMin ) * 100 :
15102					0;
15103			_set[ this.orientation === "horizontal" ? "left" : "bottom" ] = valPercent + "%";
15104			this.handle.stop( 1, 1 )[ animate ? "animate" : "css" ]( _set, o.animate );
15105
15106			if ( oRange === "min" && this.orientation === "horizontal" ) {
15107				this.range.stop( 1, 1 )[ animate ? "animate" : "css" ]( {
15108					width: valPercent + "%"
15109				}, o.animate );
15110			}
15111			if ( oRange === "max" && this.orientation === "horizontal" ) {
15112				this.range.stop( 1, 1 )[ animate ? "animate" : "css" ]( {
15113					width: ( 100 - valPercent ) + "%"
15114				}, o.animate );
15115			}
15116			if ( oRange === "min" && this.orientation === "vertical" ) {
15117				this.range.stop( 1, 1 )[ animate ? "animate" : "css" ]( {
15118					height: valPercent + "%"
15119				}, o.animate );
15120			}
15121			if ( oRange === "max" && this.orientation === "vertical" ) {
15122				this.range.stop( 1, 1 )[ animate ? "animate" : "css" ]( {
15123					height: ( 100 - valPercent ) + "%"
15124				}, o.animate );
15125			}
15126		}
15127	},
15128
15129	_handleEvents: {
15130		keydown: function( event ) {
15131			var allowed, curVal, newVal, step,
15132				index = $( event.target ).data( "ui-slider-handle-index" );
15133
15134			switch ( event.keyCode ) {
15135				case $.ui.keyCode.HOME:
15136				case $.ui.keyCode.END:
15137				case $.ui.keyCode.PAGE_UP:
15138				case $.ui.keyCode.PAGE_DOWN:
15139				case $.ui.keyCode.UP:
15140				case $.ui.keyCode.RIGHT:
15141				case $.ui.keyCode.DOWN:
15142				case $.ui.keyCode.LEFT:
15143					event.preventDefault();
15144					if ( !this._keySliding ) {
15145						this._keySliding = true;
15146						this._addClass( $( event.target ), null, "ui-state-active" );
15147						allowed = this._start( event, index );
15148						if ( allowed === false ) {
15149							return;
15150						}
15151					}
15152					break;
15153			}
15154
15155			step = this.options.step;
15156			if ( this._hasMultipleValues() ) {
15157				curVal = newVal = this.values( index );
15158			} else {
15159				curVal = newVal = this.value();
15160			}
15161
15162			switch ( event.keyCode ) {
15163				case $.ui.keyCode.HOME:
15164					newVal = this._valueMin();
15165					break;
15166				case $.ui.keyCode.END:
15167					newVal = this._valueMax();
15168					break;
15169				case $.ui.keyCode.PAGE_UP:
15170					newVal = this._trimAlignValue(
15171						curVal + ( ( this._valueMax() - this._valueMin() ) / this.numPages )
15172					);
15173					break;
15174				case $.ui.keyCode.PAGE_DOWN:
15175					newVal = this._trimAlignValue(
15176						curVal - ( ( this._valueMax() - this._valueMin() ) / this.numPages ) );
15177					break;
15178				case $.ui.keyCode.UP:
15179				case $.ui.keyCode.RIGHT:
15180					if ( curVal === this._valueMax() ) {
15181						return;
15182					}
15183					newVal = this._trimAlignValue( curVal + step );
15184					break;
15185				case $.ui.keyCode.DOWN:
15186				case $.ui.keyCode.LEFT:
15187					if ( curVal === this._valueMin() ) {
15188						return;
15189					}
15190					newVal = this._trimAlignValue( curVal - step );
15191					break;
15192			}
15193
15194			this._slide( event, index, newVal );
15195		},
15196		keyup: function( event ) {
15197			var index = $( event.target ).data( "ui-slider-handle-index" );
15198
15199			if ( this._keySliding ) {
15200				this._keySliding = false;
15201				this._stop( event, index );
15202				this._change( event, index );
15203				this._removeClass( $( event.target ), null, "ui-state-active" );
15204			}
15205		}
15206	}
15207} );
15208
15209
15210/*!
15211 * jQuery UI Sortable 1.12.1
15212 * http://jqueryui.com
vendor: 35,818 bytes, lines 15213-16400
15213 *
15214 * Copyright jQuery Foundation and other contributors
15215 * Released under the MIT license.
15216 * http://jquery.org/license
15217 */
15218
15219//>>label: Sortable
15220//>>group: Interactions
15221//>>description: Enables items in a list to be sorted using the mouse.
15222//>>docs: http://api.jqueryui.com/sortable/
15223//>>demos: http://jqueryui.com/sortable/
15224//>>css.structure: ../../themes/base/sortable.css
15225
15226
15227
15228var widgetsSortable = $.widget( "ui.sortable", $.ui.mouse, {
15229	version: "1.12.1",
15230	widgetEventPrefix: "sort",
15231	ready: false,
15232	options: {
15233		appendTo: "parent",
15234		axis: false,
15235		connectWith: false,
15236		containment: false,
15237		cursor: "auto",
15238		cursorAt: false,
15239		dropOnEmpty: true,
15240		forcePlaceholderSize: false,
15241		forceHelperSize: false,
15242		grid: false,
15243		handle: false,
15244		helper: "original",
15245		items: "> *",
15246		opacity: false,
15247		placeholder: false,
15248		revert: false,
15249		scroll: true,
15250		scrollSensitivity: 20,
15251		scrollSpeed: 20,
15252		scope: "default",
15253		tolerance: "intersect",
15254		zIndex: 1000,
15255
15256		// Callbacks
15257		activate: null,
15258		beforeStop: null,
15259		change: null,
15260		deactivate: null,
15261		out: null,
15262		over: null,
15263		receive: null,
15264		remove: null,
15265		sort: null,
15266		start: null,
15267		stop: null,
15268		update: null
15269	},
15270
15271	_isOverAxis: function( x, reference, size ) {
15272		return ( x >= reference ) && ( x < ( reference + size ) );
15273	},
15274
15275	_isFloating: function( item ) {
15276		return ( /left|right/ ).test( item.css( "float" ) ) ||
15277			( /inline|table-cell/ ).test( item.css( "display" ) );
15278	},
15279
15280	_create: function() {
15281		this.containerCache = {};
15282		this._addClass( "ui-sortable" );
15283
15284		//Get the items
15285		this.refresh();
15286
15287		//Let's determine the parent's offset
15288		this.offset = this.element.offset();
15289
15290		//Initialize mouse events for interaction
15291		this._mouseInit();
15292
15293		this._setHandleClassName();
15294
15295		//We're ready to go
15296		this.ready = true;
15297
15298	},
15299
15300	_setOption: function( key, value ) {
15301		this._super( key, value );
15302
15303		if ( key === "handle" ) {
15304			this._setHandleClassName();
15305		}
15306	},
15307
15308	_setHandleClassName: function() {
15309		var that = this;
15310		this._removeClass( this.element.find( ".ui-sortable-handle" ), "ui-sortable-handle" );
15311		$.each( this.items, function() {
15312			that._addClass(
15313				this.instance.options.handle ?
15314					this.item.find( this.instance.options.handle ) :
15315					this.item,
15316				"ui-sortable-handle"
15317			);
15318		} );
15319	},
15320
15321	_destroy: function() {
15322		this._mouseDestroy();
15323
15324		for ( var i = this.items.length - 1; i >= 0; i-- ) {
15325			this.items[ i ].item.removeData( this.widgetName + "-item" );
15326		}
15327
15328		return this;
15329	},
15330
15331	_mouseCapture: function( event, overrideHandle ) {
15332		var currentItem = null,
15333			validHandle = false,
15334			that = this;
15335
15336		if ( this.reverting ) {
15337			return false;
15338		}
15339
15340		if ( this.options.disabled || this.options.type === "static" ) {
15341			return false;
15342		}
15343
15344		//We have to refresh the items data once first
15345		this._refreshItems( event );
15346
15347		//Find out if the clicked node (or one of its parents) is a actual item in this.items
15348		$( event.target ).parents().each( function() {
15349			if ( $.data( this, that.widgetName + "-item" ) === that ) {
15350				currentItem = $( this );
15351				return false;
15352			}
15353		} );
15354		if ( $.data( event.target, that.widgetName + "-item" ) === that ) {
15355			currentItem = $( event.target );
15356		}
15357
15358		if ( !currentItem ) {
15359			return false;
15360		}
15361		if ( this.options.handle && !overrideHandle ) {
15362			$( this.options.handle, currentItem ).find( "*" ).addBack().each( function() {
15363				if ( this === event.target ) {
15364					validHandle = true;
15365				}
15366			} );
15367			if ( !validHandle ) {
15368				return false;
15369			}
15370		}
15371
15372		this.currentItem = currentItem;
15373		this._removeCurrentsFromItems();
15374		return true;
15375
15376	},
15377
15378	_mouseStart: function( event, overrideHandle, noActivation ) {
15379
15380		var i, body,
15381			o = this.options;
15382
15383		this.currentContainer = this;
15384
15385		//We only need to call refreshPositions, because the refreshItems call has been moved to
15386		// mouseCapture
15387		this.refreshPositions();
15388
15389		//Create and append the visible helper
15390		this.helper = this._createHelper( event );
15391
15392		//Cache the helper size
15393		this._cacheHelperProportions();
15394
15395		/*
15396		 * - Position generation -
15397		 * This block generates everything position related - it's the core of draggables.
15398		 */
15399
15400		//Cache the margins of the original element
15401		this._cacheMargins();
15402
15403		//Get the next scrolling parent
15404		this.scrollParent = this.helper.scrollParent();
15405
15406		//The element's absolute position on the page minus margins
15407		this.offset = this.currentItem.offset();
15408		this.offset = {
15409			top: this.offset.top - this.margins.top,
15410			left: this.offset.left - this.margins.left
15411		};
15412
15413		$.extend( this.offset, {
15414			click: { //Where the click happened, relative to the element
15415				left: event.pageX - this.offset.left,
15416				top: event.pageY - this.offset.top
15417			},
15418			parent: this._getParentOffset(),
15419
15420			// This is a relative to absolute position minus the actual position calculation -
15421			// only used for relative positioned helper
15422			relative: this._getRelativeOffset()
15423		} );
15424
15425		// Only after we got the offset, we can change the helper's position to absolute
15426		// TODO: Still need to figure out a way to make relative sorting possible
15427		this.helper.css( "position", "absolute" );
15428		this.cssPosition = this.helper.css( "position" );
15429
15430		//Generate the original position
15431		this.originalPosition = this._generatePosition( event );
15432		this.originalPageX = event.pageX;
15433		this.originalPageY = event.pageY;
15434
15435		//Adjust the mouse offset relative to the helper if "cursorAt" is supplied
15436		( o.cursorAt && this._adjustOffsetFromHelper( o.cursorAt ) );
15437
15438		//Cache the former DOM position
15439		this.domPosition = {
15440			prev: this.currentItem.prev()[ 0 ],
15441			parent: this.currentItem.parent()[ 0 ]
15442		};
15443
15444		// If the helper is not the original, hide the original so it's not playing any role during
15445		// the drag, won't cause anything bad this way
15446		if ( this.helper[ 0 ] !== this.currentItem[ 0 ] ) {
15447			this.currentItem.hide();
15448		}
15449
15450		//Create the placeholder
15451		this._createPlaceholder();
15452
15453		//Set a containment if given in the options
15454		if ( o.containment ) {
15455			this._setContainment();
15456		}
15457
15458		if ( o.cursor && o.cursor !== "auto" ) { // cursor option
15459			body = this.document.find( "body" );
15460
15461			// Support: IE
15462			this.storedCursor = body.css( "cursor" );
15463			body.css( "cursor", o.cursor );
15464
15465			this.storedStylesheet =
15466				$( "<style>*{ cursor: " + o.cursor + " !important; }</style>" ).appendTo( body );
15467		}
15468
15469		if ( o.opacity ) { // opacity option
15470			if ( this.helper.css( "opacity" ) ) {
15471				this._storedOpacity = this.helper.css( "opacity" );
15472			}
15473			this.helper.css( "opacity", o.opacity );
15474		}
15475
15476		if ( o.zIndex ) { // zIndex option
15477			if ( this.helper.css( "zIndex" ) ) {
15478				this._storedZIndex = this.helper.css( "zIndex" );
15479			}
15480			this.helper.css( "zIndex", o.zIndex );
15481		}
15482
15483		//Prepare scrolling
15484		if ( this.scrollParent[ 0 ] !== this.document[ 0 ] &&
15485				this.scrollParent[ 0 ].tagName !== "HTML" ) {
15486			this.overflowOffset = this.scrollParent.offset();
15487		}
15488
15489		//Call callbacks
15490		this._trigger( "start", event, this._uiHash() );
15491
15492		//Recache the helper size
15493		if ( !this._preserveHelperProportions ) {
15494			this._cacheHelperProportions();
15495		}
15496
15497		//Post "activate" events to possible containers
15498		if ( !noActivation ) {
15499			for ( i = this.containers.length - 1; i >= 0; i-- ) {
15500				this.containers[ i ]._trigger( "activate", event, this._uiHash( this ) );
15501			}
15502		}
15503
15504		//Prepare possible droppables
15505		if ( $.ui.ddmanager ) {
15506			$.ui.ddmanager.current = this;
15507		}
15508
15509		if ( $.ui.ddmanager && !o.dropBehaviour ) {
15510			$.ui.ddmanager.prepareOffsets( this, event );
15511		}
15512
15513		this.dragging = true;
15514
15515		this._addClass( this.helper, "ui-sortable-helper" );
15516
15517		// Execute the drag once - this causes the helper not to be visiblebefore getting its
15518		// correct position
15519		this._mouseDrag( event );
15520		return true;
15521
15522	},
15523
15524	_mouseDrag: function( event ) {
15525		var i, item, itemElement, intersection,
15526			o = this.options,
15527			scrolled = false;
15528
15529		//Compute the helpers position
15530		this.position = this._generatePosition( event );
15531		this.positionAbs = this._convertPositionTo( "absolute" );
15532
15533		if ( !this.lastPositionAbs ) {
15534			this.lastPositionAbs = this.positionAbs;
15535		}
15536
15537		//Do scrolling
15538		if ( this.options.scroll ) {
15539			if ( this.scrollParent[ 0 ] !== this.document[ 0 ] &&
15540					this.scrollParent[ 0 ].tagName !== "HTML" ) {
15541
15542				if ( ( this.overflowOffset.top + this.scrollParent[ 0 ].offsetHeight ) -
15543						event.pageY < o.scrollSensitivity ) {
15544					this.scrollParent[ 0 ].scrollTop =
15545						scrolled = this.scrollParent[ 0 ].scrollTop + o.scrollSpeed;
15546				} else if ( event.pageY - this.overflowOffset.top < o.scrollSensitivity ) {
15547					this.scrollParent[ 0 ].scrollTop =
15548						scrolled = this.scrollParent[ 0 ].scrollTop - o.scrollSpeed;
15549				}
15550
15551				if ( ( this.overflowOffset.left + this.scrollParent[ 0 ].offsetWidth ) -
15552						event.pageX < o.scrollSensitivity ) {
15553					this.scrollParent[ 0 ].scrollLeft = scrolled =
15554						this.scrollParent[ 0 ].scrollLeft + o.scrollSpeed;
15555				} else if ( event.pageX - this.overflowOffset.left < o.scrollSensitivity ) {
15556					this.scrollParent[ 0 ].scrollLeft = scrolled =
15557						this.scrollParent[ 0 ].scrollLeft - o.scrollSpeed;
15558				}
15559
15560			} else {
15561
15562				if ( event.pageY - this.document.scrollTop() < o.scrollSensitivity ) {
15563					scrolled = this.document.scrollTop( this.document.scrollTop() - o.scrollSpeed );
15564				} else if ( this.window.height() - ( event.pageY - this.document.scrollTop() ) <
15565						o.scrollSensitivity ) {
15566					scrolled = this.document.scrollTop( this.document.scrollTop() + o.scrollSpeed );
15567				}
15568
15569				if ( event.pageX - this.document.scrollLeft() < o.scrollSensitivity ) {
15570					scrolled = this.document.scrollLeft(
15571						this.document.scrollLeft() - o.scrollSpeed
15572					);
15573				} else if ( this.window.width() - ( event.pageX - this.document.scrollLeft() ) <
15574						o.scrollSensitivity ) {
15575					scrolled = this.document.scrollLeft(
15576						this.document.scrollLeft() + o.scrollSpeed
15577					);
15578				}
15579
15580			}
15581
15582			if ( scrolled !== false && $.ui.ddmanager && !o.dropBehaviour ) {
15583				$.ui.ddmanager.prepareOffsets( this, event );
15584			}
15585		}
15586
15587		//Regenerate the absolute position used for position checks
15588		this.positionAbs = this._convertPositionTo( "absolute" );
15589
15590		//Set the helper position
15591		if ( !this.options.axis || this.options.axis !== "y" ) {
15592			this.helper[ 0 ].style.left = this.position.left + "px";
15593		}
15594		if ( !this.options.axis || this.options.axis !== "x" ) {
15595			this.helper[ 0 ].style.top = this.position.top + "px";
15596		}
15597
15598		//Rearrange
15599		for ( i = this.items.length - 1; i >= 0; i-- ) {
15600
15601			//Cache variables and intersection, continue if no intersection
15602			item = this.items[ i ];
15603			itemElement = item.item[ 0 ];
15604			intersection = this._intersectsWithPointer( item );
15605			if ( !intersection ) {
15606				continue;
15607			}
15608
15609			// Only put the placeholder inside the current Container, skip all
15610			// items from other containers. This works because when moving
15611			// an item from one container to another the
15612			// currentContainer is switched before the placeholder is moved.
15613			//
15614			// Without this, moving items in "sub-sortables" can cause
15615			// the placeholder to jitter between the outer and inner container.
15616			if ( item.instance !== this.currentContainer ) {
15617				continue;
15618			}
15619
15620			// Cannot intersect with itself
15621			// no useless actions that have been done before
15622			// no action if the item moved is the parent of the item checked
15623			if ( itemElement !== this.currentItem[ 0 ] &&
15624				this.placeholder[ intersection === 1 ? "next" : "prev" ]()[ 0 ] !== itemElement &&
15625				!$.contains( this.placeholder[ 0 ], itemElement ) &&
15626				( this.options.type === "semi-dynamic" ?
15627					!$.contains( this.element[ 0 ], itemElement ) :
15628					true
15629				)
15630			) {
15631
15632				this.direction = intersection === 1 ? "down" : "up";
15633
15634				if ( this.options.tolerance === "pointer" || this._intersectsWithSides( item ) ) {
15635					this._rearrange( event, item );
15636				} else {
15637					break;
15638				}
15639
15640				this._trigger( "change", event, this._uiHash() );
15641				break;
15642			}
15643		}
15644
15645		//Post events to containers
15646		this._contactContainers( event );
15647
15648		//Interconnect with droppables
15649		if ( $.ui.ddmanager ) {
15650			$.ui.ddmanager.drag( this, event );
15651		}
15652
15653		//Call callbacks
15654		this._trigger( "sort", event, this._uiHash() );
15655
15656		this.lastPositionAbs = this.positionAbs;
15657		return false;
15658
15659	},
15660
15661	_mouseStop: function( event, noPropagation ) {
15662
15663		if ( !event ) {
15664			return;
15665		}
15666
15667		//If we are using droppables, inform the manager about the drop
15668		if ( $.ui.ddmanager && !this.options.dropBehaviour ) {
15669			$.ui.ddmanager.drop( this, event );
15670		}
15671
15672		if ( this.options.revert ) {
15673			var that = this,
15674				cur = this.placeholder.offset(),
15675				axis = this.options.axis,
15676				animation = {};
15677
15678			if ( !axis || axis === "x" ) {
15679				animation.left = cur.left - this.offset.parent.left - this.margins.left +
15680					( this.offsetParent[ 0 ] === this.document[ 0 ].body ?
15681						0 :
15682						this.offsetParent[ 0 ].scrollLeft
15683					);
15684			}
15685			if ( !axis || axis === "y" ) {
15686				animation.top = cur.top - this.offset.parent.top - this.margins.top +
15687					( this.offsetParent[ 0 ] === this.document[ 0 ].body ?
15688						0 :
15689						this.offsetParent[ 0 ].scrollTop
15690					);
15691			}
15692			this.reverting = true;
15693			$( this.helper ).animate(
15694				animation,
15695				parseInt( this.options.revert, 10 ) || 500,
15696				function() {
15697					that._clear( event );
15698				}
15699			);
15700		} else {
15701			this._clear( event, noPropagation );
15702		}
15703
15704		return false;
15705
15706	},
15707
15708	cancel: function() {
15709
15710		if ( this.dragging ) {
15711
15712			this._mouseUp( new $.Event( "mouseup", { target: null } ) );
15713
15714			if ( this.options.helper === "original" ) {
15715				this.currentItem.css( this._storedCSS );
15716				this._removeClass( this.currentItem, "ui-sortable-helper" );
15717			} else {
15718				this.currentItem.show();
15719			}
15720
15721			//Post deactivating events to containers
15722			for ( var i = this.containers.length - 1; i >= 0; i-- ) {
15723				this.containers[ i ]._trigger( "deactivate", null, this._uiHash( this ) );
15724				if ( this.containers[ i ].containerCache.over ) {
15725					this.containers[ i ]._trigger( "out", null, this._uiHash( this ) );
15726					this.containers[ i ].containerCache.over = 0;
15727				}
15728			}
15729
15730		}
15731
15732		if ( this.placeholder ) {
15733
15734			//$(this.placeholder[0]).remove(); would have been the jQuery way - unfortunately,
15735			// it unbinds ALL events from the original node!
15736			if ( this.placeholder[ 0 ].parentNode ) {
15737				this.placeholder[ 0 ].parentNode.removeChild( this.placeholder[ 0 ] );
15738			}
15739			if ( this.options.helper !== "original" && this.helper &&
15740					this.helper[ 0 ].parentNode ) {
15741				this.helper.remove();
15742			}
15743
15744			$.extend( this, {
15745				helper: null,
15746				dragging: false,
15747				reverting: false,
15748				_noFinalSort: null
15749			} );
15750
15751			if ( this.domPosition.prev ) {
15752				$( this.domPosition.prev ).after( this.currentItem );
15753			} else {
15754				$( this.domPosition.parent ).prepend( this.currentItem );
15755			}
15756		}
15757
15758		return this;
15759
15760	},
15761
15762	serialize: function( o ) {
15763
15764		var items = this._getItemsAsjQuery( o && o.connected ),
15765			str = [];
15766		o = o || {};
15767
15768		$( items ).each( function() {
15769			var res = ( $( o.item || this ).attr( o.attribute || "id" ) || "" )
15770				.match( o.expression || ( /(.+)[\-=_](.+)/ ) );
15771			if ( res ) {
15772				str.push(
15773					( o.key || res[ 1 ] + "[]" ) +
15774					"=" + ( o.key && o.expression ? res[ 1 ] : res[ 2 ] ) );
15775			}
15776		} );
15777
15778		if ( !str.length && o.key ) {
15779			str.push( o.key + "=" );
15780		}
15781
15782		return str.join( "&" );
15783
15784	},
15785
15786	toArray: function( o ) {
15787
15788		var items = this._getItemsAsjQuery( o && o.connected ),
15789			ret = [];
15790
15791		o = o || {};
15792
15793		items.each( function() {
15794			ret.push( $( o.item || this ).attr( o.attribute || "id" ) || "" );
15795		} );
15796		return ret;
15797
15798	},
15799
15800	/* Be careful with the following core functions */
15801	_intersectsWith: function( item ) {
15802
15803		var x1 = this.positionAbs.left,
15804			x2 = x1 + this.helperProportions.width,
15805			y1 = this.positionAbs.top,
15806			y2 = y1 + this.helperProportions.height,
15807			l = item.left,
15808			r = l + item.width,
15809			t = item.top,
15810			b = t + item.height,
15811			dyClick = this.offset.click.top,
15812			dxClick = this.offset.click.left,
15813			isOverElementHeight = ( this.options.axis === "x" ) || ( ( y1 + dyClick ) > t &&
15814				( y1 + dyClick ) < b ),
15815			isOverElementWidth = ( this.options.axis === "y" ) || ( ( x1 + dxClick ) > l &&
15816				( x1 + dxClick ) < r ),
15817			isOverElement = isOverElementHeight && isOverElementWidth;
15818
15819		if ( this.options.tolerance === "pointer" ||
15820			this.options.forcePointerForContainers ||
15821			( this.options.tolerance !== "pointer" &&
15822				this.helperProportions[ this.floating ? "width" : "height" ] >
15823				item[ this.floating ? "width" : "height" ] )
15824		) {
15825			return isOverElement;
15826		} else {
15827
15828			return ( l < x1 + ( this.helperProportions.width / 2 ) && // Right Half
15829				x2 - ( this.helperProportions.width / 2 ) < r && // Left Half
15830				t < y1 + ( this.helperProportions.height / 2 ) && // Bottom Half
15831				y2 - ( this.helperProportions.height / 2 ) < b ); // Top Half
15832
15833		}
15834	},
15835
15836	_intersectsWithPointer: function( item ) {
15837		var verticalDirection, horizontalDirection,
15838			isOverElementHeight = ( this.options.axis === "x" ) ||
15839				this._isOverAxis(
15840					this.positionAbs.top + this.offset.click.top, item.top, item.height ),
15841			isOverElementWidth = ( this.options.axis === "y" ) ||
15842				this._isOverAxis(
15843					this.positionAbs.left + this.offset.click.left, item.left, item.width ),
15844			isOverElement = isOverElementHeight && isOverElementWidth;
15845
15846		if ( !isOverElement ) {
15847			return false;
15848		}
15849
15850		verticalDirection = this._getDragVerticalDirection();
15851		horizontalDirection = this._getDragHorizontalDirection();
15852
15853		return this.floating ?
15854			( ( horizontalDirection === "right" || verticalDirection === "down" ) ? 2 : 1 )
15855			: ( verticalDirection && ( verticalDirection === "down" ? 2 : 1 ) );
15856
15857	},
15858
15859	_intersectsWithSides: function( item ) {
15860
15861		var isOverBottomHalf = this._isOverAxis( this.positionAbs.top +
15862				this.offset.click.top, item.top + ( item.height / 2 ), item.height ),
15863			isOverRightHalf = this._isOverAxis( this.positionAbs.left +
15864				this.offset.click.left, item.left + ( item.width / 2 ), item.width ),
15865			verticalDirection = this._getDragVerticalDirection(),
15866			horizontalDirection = this._getDragHorizontalDirection();
15867
15868		if ( this.floating && horizontalDirection ) {
15869			return ( ( horizontalDirection === "right" && isOverRightHalf ) ||
15870				( horizontalDirection === "left" && !isOverRightHalf ) );
15871		} else {
15872			return verticalDirection && ( ( verticalDirection === "down" && isOverBottomHalf ) ||
15873				( verticalDirection === "up" && !isOverBottomHalf ) );
15874		}
15875
15876	},
15877
15878	_getDragVerticalDirection: function() {
15879		var delta = this.positionAbs.top - this.lastPositionAbs.top;
15880		return delta !== 0 && ( delta > 0 ? "down" : "up" );
15881	},
15882
15883	_getDragHorizontalDirection: function() {
15884		var delta = this.positionAbs.left - this.lastPositionAbs.left;
15885		return delta !== 0 && ( delta > 0 ? "right" : "left" );
15886	},
15887
15888	refresh: function( event ) {
15889		this._refreshItems( event );
15890		this._setHandleClassName();
15891		this.refreshPositions();
15892		return this;
15893	},
15894
15895	_connectWith: function() {
15896		var options = this.options;
15897		return options.connectWith.constructor === String ?
15898			[ options.connectWith ] :
15899			options.connectWith;
15900	},
15901
15902	_getItemsAsjQuery: function( connected ) {
15903
15904		var i, j, cur, inst,
15905			items = [],
15906			queries = [],
15907			connectWith = this._connectWith();
15908
15909		if ( connectWith && connected ) {
15910			for ( i = connectWith.length - 1; i >= 0; i-- ) {
15911				cur = $( connectWith[ i ], this.document[ 0 ] );
15912				for ( j = cur.length - 1; j >= 0; j-- ) {
15913					inst = $.data( cur[ j ], this.widgetFullName );
15914					if ( inst && inst !== this && !inst.options.disabled ) {
15915						queries.push( [ $.isFunction( inst.options.items ) ?
15916							inst.options.items.call( inst.element ) :
15917							$( inst.options.items, inst.element )
15918								.not( ".ui-sortable-helper" )
15919								.not( ".ui-sortable-placeholder" ), inst ] );
15920					}
15921				}
15922			}
15923		}
15924
15925		queries.push( [ $.isFunction( this.options.items ) ?
15926			this.options.items
15927				.call( this.element, null, { options: this.options, item: this.currentItem } ) :
15928			$( this.options.items, this.element )
15929				.not( ".ui-sortable-helper" )
15930				.not( ".ui-sortable-placeholder" ), this ] );
15931
15932		function addItems() {
15933			items.push( this );
15934		}
15935		for ( i = queries.length - 1; i >= 0; i-- ) {
15936			queries[ i ][ 0 ].each( addItems );
15937		}
15938
15939		return $( items );
15940
15941	},
15942
15943	_removeCurrentsFromItems: function() {
15944
15945		var list = this.currentItem.find( ":data(" + this.widgetName + "-item)" );
15946
15947		this.items = $.grep( this.items, function( item ) {
15948			for ( var j = 0; j < list.length; j++ ) {
15949				if ( list[ j ] === item.item[ 0 ] ) {
15950					return false;
15951				}
15952			}
15953			return true;
15954		} );
15955
15956	},
15957
15958	_refreshItems: function( event ) {
15959
15960		this.items = [];
15961		this.containers = [ this ];
15962
15963		var i, j, cur, inst, targetData, _queries, item, queriesLength,
15964			items = this.items,
15965			queries = [ [ $.isFunction( this.options.items ) ?
15966				this.options.items.call( this.element[ 0 ], event, { item: this.currentItem } ) :
15967				$( this.options.items, this.element ), this ] ],
15968			connectWith = this._connectWith();
15969
15970		//Shouldn't be run the first time through due to massive slow-down
15971		if ( connectWith && this.ready ) {
15972			for ( i = connectWith.length - 1; i >= 0; i-- ) {
15973				cur = $( connectWith[ i ], this.document[ 0 ] );
15974				for ( j = cur.length - 1; j >= 0; j-- ) {
15975					inst = $.data( cur[ j ], this.widgetFullName );
15976					if ( inst && inst !== this && !inst.options.disabled ) {
15977						queries.push( [ $.isFunction( inst.options.items ) ?
15978							inst.options.items
15979								.call( inst.element[ 0 ], event, { item: this.currentItem } ) :
15980							$( inst.options.items, inst.element ), inst ] );
15981						this.containers.push( inst );
15982					}
15983				}
15984			}
15985		}
15986
15987		for ( i = queries.length - 1; i >= 0; i-- ) {
15988			targetData = queries[ i ][ 1 ];
15989			_queries = queries[ i ][ 0 ];
15990
15991			for ( j = 0, queriesLength = _queries.length; j < queriesLength; j++ ) {
15992				item = $( _queries[ j ] );
15993
15994				// Data for target checking (mouse manager)
15995				item.data( this.widgetName + "-item", targetData );
15996
15997				items.push( {
15998					item: item,
15999					instance: targetData,
16000					width: 0, height: 0,
16001					left: 0, top: 0
16002				} );
16003			}
16004		}
16005
16006	},
16007
16008	refreshPositions: function( fast ) {
16009
16010		// Determine whether items are being displayed horizontally
16011		this.floating = this.items.length ?
16012			this.options.axis === "x" || this._isFloating( this.items[ 0 ].item ) :
16013			false;
16014
16015		//This has to be redone because due to the item being moved out/into the offsetParent,
16016		// the offsetParent's position will change
16017		if ( this.offsetParent && this.helper ) {
16018			this.offset.parent = this._getParentOffset();
16019		}
16020
16021		var i, item, t, p;
16022
16023		for ( i = this.items.length - 1; i >= 0; i-- ) {
16024			item = this.items[ i ];
16025
16026			//We ignore calculating positions of all connected containers when we're not over them
16027			if ( item.instance !== this.currentContainer && this.currentContainer &&
16028					item.item[ 0 ] !== this.currentItem[ 0 ] ) {
16029				continue;
16030			}
16031
16032			t = this.options.toleranceElement ?
16033				$( this.options.toleranceElement, item.item ) :
16034				item.item;
16035
16036			if ( !fast ) {
16037				item.width = t.outerWidth();
16038				item.height = t.outerHeight();
16039			}
16040
16041			p = t.offset();
16042			item.left = p.left;
16043			item.top = p.top;
16044		}
16045
16046		if ( this.options.custom && this.options.custom.refreshContainers ) {
16047			this.options.custom.refreshContainers.call( this );
16048		} else {
16049			for ( i = this.containers.length - 1; i >= 0; i-- ) {
16050				p = this.containers[ i ].element.offset();
16051				this.containers[ i ].containerCache.left = p.left;
16052				this.containers[ i ].containerCache.top = p.top;
16053				this.containers[ i ].containerCache.width =
16054					this.containers[ i ].element.outerWidth();
16055				this.containers[ i ].containerCache.height =
16056					this.containers[ i ].element.outerHeight();
16057			}
16058		}
16059
16060		return this;
16061	},
16062
16063	_createPlaceholder: function( that ) {
16064		that = that || this;
16065		var className,
16066			o = that.options;
16067
16068		if ( !o.placeholder || o.placeholder.constructor === String ) {
16069			className = o.placeholder;
16070			o.placeholder = {
16071				element: function() {
16072
16073					var nodeName = that.currentItem[ 0 ].nodeName.toLowerCase(),
16074						element = $( "<" + nodeName + ">", that.document[ 0 ] );
16075
16076						that._addClass( element, "ui-sortable-placeholder",
16077								className || that.currentItem[ 0 ].className )
16078							._removeClass( element, "ui-sortable-helper" );
16079
16080					if ( nodeName === "tbody" ) {
16081						that._createTrPlaceholder(
16082							that.currentItem.find( "tr" ).eq( 0 ),
16083							$( "<tr>", that.document[ 0 ] ).appendTo( element )
16084						);
16085					} else if ( nodeName === "tr" ) {
16086						that._createTrPlaceholder( that.currentItem, element );
16087					} else if ( nodeName === "img" ) {
16088						element.attr( "src", that.currentItem.attr( "src" ) );
16089					}
16090
16091					if ( !className ) {
16092						element.css( "visibility", "hidden" );
16093					}
16094
16095					return element;
16096				},
16097				update: function( container, p ) {
16098
16099					// 1. If a className is set as 'placeholder option, we don't force sizes -
16100					// the class is responsible for that
16101					// 2. The option 'forcePlaceholderSize can be enabled to force it even if a
16102					// class name is specified
16103					if ( className && !o.forcePlaceholderSize ) {
16104						return;
16105					}
16106
16107					//If the element doesn't have a actual height by itself (without styles coming
16108					// from a stylesheet), it receives the inline height from the dragged item
16109					if ( !p.height() ) {
16110						p.height(
16111							that.currentItem.innerHeight() -
16112							parseInt( that.currentItem.css( "paddingTop" ) || 0, 10 ) -
16113							parseInt( that.currentItem.css( "paddingBottom" ) || 0, 10 ) );
16114					}
16115					if ( !p.width() ) {
16116						p.width(
16117							that.currentItem.innerWidth() -
16118							parseInt( that.currentItem.css( "paddingLeft" ) || 0, 10 ) -
16119							parseInt( that.currentItem.css( "paddingRight" ) || 0, 10 ) );
16120					}
16121				}
16122			};
16123		}
16124
16125		//Create the placeholder
16126		that.placeholder = $( o.placeholder.element.call( that.element, that.currentItem ) );
16127
16128		//Append it after the actual current item
16129		that.currentItem.after( that.placeholder );
16130
16131		//Update the size of the placeholder (TODO: Logic to fuzzy, see line 316/317)
16132		o.placeholder.update( that, that.placeholder );
16133
16134	},
16135
16136	_createTrPlaceholder: function( sourceTr, targetTr ) {
16137		var that = this;
16138
16139		sourceTr.children().each( function() {
16140			$( "<td>&#160;</td>", that.document[ 0 ] )
16141				.attr( "colspan", $( this ).attr( "colspan" ) || 1 )
16142				.appendTo( targetTr );
16143		} );
16144	},
16145
16146	_contactContainers: function( event ) {
16147		var i, j, dist, itemWithLeastDistance, posProperty, sizeProperty, cur, nearBottom,
16148			floating, axis,
16149			innermostContainer = null,
16150			innermostIndex = null;
16151
16152		// Get innermost container that intersects with item
16153		for ( i = this.containers.length - 1; i >= 0; i-- ) {
16154
16155			// Never consider a container that's located within the item itself
16156			if ( $.contains( this.currentItem[ 0 ], this.containers[ i ].element[ 0 ] ) ) {
16157				continue;
16158			}
16159
16160			if ( this._intersectsWith( this.containers[ i ].containerCache ) ) {
16161
16162				// If we've already found a container and it's more "inner" than this, then continue
16163				if ( innermostContainer &&
16164						$.contains(
16165							this.containers[ i ].element[ 0 ],
16166							innermostContainer.element[ 0 ] ) ) {
16167					continue;
16168				}
16169
16170				innermostContainer = this.containers[ i ];
16171				innermostIndex = i;
16172
16173			} else {
16174
16175				// container doesn't intersect. trigger "out" event if necessary
16176				if ( this.containers[ i ].containerCache.over ) {
16177					this.containers[ i ]._trigger( "out", event, this._uiHash( this ) );
16178					this.containers[ i ].containerCache.over = 0;
16179				}
16180			}
16181
16182		}
16183
16184		// If no intersecting containers found, return
16185		if ( !innermostContainer ) {
16186			return;
16187		}
16188
16189		// Move the item into the container if it's not there already
16190		if ( this.containers.length === 1 ) {
16191			if ( !this.containers[ innermostIndex ].containerCache.over ) {
16192				this.containers[ innermostIndex ]._trigger( "over", event, this._uiHash( this ) );
16193				this.containers[ innermostIndex ].containerCache.over = 1;
16194			}
16195		} else {
16196
16197			// When entering a new container, we will find the item with the least distance and
16198			// append our item near it
16199			dist = 10000;
16200			itemWithLeastDistance = null;
16201			floating = innermostContainer.floating || this._isFloating( this.currentItem );
16202			posProperty = floating ? "left" : "top";
16203			sizeProperty = floating ? "width" : "height";
16204			axis = floating ? "pageX" : "pageY";
16205
16206			for ( j = this.items.length - 1; j >= 0; j-- ) {
16207				if ( !$.contains(
16208						this.containers[ innermostIndex ].element[ 0 ], this.items[ j ].item[ 0 ] )
16209				) {
16210					continue;
16211				}
16212				if ( this.items[ j ].item[ 0 ] === this.currentItem[ 0 ] ) {
16213					continue;
16214				}
16215
16216				cur = this.items[ j ].item.offset()[ posProperty ];
16217				nearBottom = false;
16218				if ( event[ axis ] - cur > this.items[ j ][ sizeProperty ] / 2 ) {
16219					nearBottom = true;
16220				}
16221
16222				if ( Math.abs( event[ axis ] - cur ) < dist ) {
16223					dist = Math.abs( event[ axis ] - cur );
16224					itemWithLeastDistance = this.items[ j ];
16225					this.direction = nearBottom ? "up" : "down";
16226				}
16227			}
16228
16229			//Check if dropOnEmpty is enabled
16230			if ( !itemWithLeastDistance && !this.options.dropOnEmpty ) {
16231				return;
16232			}
16233
16234			if ( this.currentContainer === this.containers[ innermostIndex ] ) {
16235				if ( !this.currentContainer.containerCache.over ) {
16236					this.containers[ innermostIndex ]._trigger( "over", event, this._uiHash() );
16237					this.currentContainer.containerCache.over = 1;
16238				}
16239				return;
16240			}
16241
16242			itemWithLeastDistance ?
16243				this._rearrange( event, itemWithLeastDistance, null, true ) :
16244				this._rearrange( event, null, this.containers[ innermostIndex ].element, true );
16245			this._trigger( "change", event, this._uiHash() );
16246			this.containers[ innermostIndex ]._trigger( "change", event, this._uiHash( this ) );
16247			this.currentContainer = this.containers[ innermostIndex ];
16248
16249			//Update the placeholder
16250			this.options.placeholder.update( this.currentContainer, this.placeholder );
16251
16252			this.containers[ innermostIndex ]._trigger( "over", event, this._uiHash( this ) );
16253			this.containers[ innermostIndex ].containerCache.over = 1;
16254		}
16255
16256	},
16257
16258	_createHelper: function( event ) {
16259
16260		var o = this.options,
16261			helper = $.isFunction( o.helper ) ?
16262				$( o.helper.apply( this.element[ 0 ], [ event, this.currentItem ] ) ) :
16263				( o.helper === "clone" ? this.currentItem.clone() : this.currentItem );
16264
16265		//Add the helper to the DOM if that didn't happen already
16266		if ( !helper.parents( "body" ).length ) {
16267			$( o.appendTo !== "parent" ?
16268				o.appendTo :
16269				this.currentItem[ 0 ].parentNode )[ 0 ].appendChild( helper[ 0 ] );
16270		}
16271
16272		if ( helper[ 0 ] === this.currentItem[ 0 ] ) {
16273			this._storedCSS = {
16274				width: this.currentItem[ 0 ].style.width,
16275				height: this.currentItem[ 0 ].style.height,
16276				position: this.currentItem.css( "position" ),
16277				top: this.currentItem.css( "top" ),
16278				left: this.currentItem.css( "left" )
16279			};
16280		}
16281
16282		if ( !helper[ 0 ].style.width || o.forceHelperSize ) {
16283			helper.width( this.currentItem.width() );
16284		}
16285		if ( !helper[ 0 ].style.height || o.forceHelperSize ) {
16286			helper.height( this.currentItem.height() );
16287		}
16288
16289		return helper;
16290
16291	},
16292
16293	_adjustOffsetFromHelper: function( obj ) {
16294		if ( typeof obj === "string" ) {
16295			obj = obj.split( " " );
16296		}
16297		if ( $.isArray( obj ) ) {
16298			obj = { left: +obj[ 0 ], top: +obj[ 1 ] || 0 };
16299		}
16300		if ( "left" in obj ) {
16301			this.offset.click.left = obj.left + this.margins.left;
16302		}
16303		if ( "right" in obj ) {
16304			this.offset.click.left = this.helperProportions.width - obj.right + this.margins.left;
16305		}
16306		if ( "top" in obj ) {
16307			this.offset.click.top = obj.top + this.margins.top;
16308		}
16309		if ( "bottom" in obj ) {
16310			this.offset.click.top = this.helperProportions.height - obj.bottom + this.margins.top;
16311		}
16312	},
16313
16314	_getParentOffset: function() {
16315
16316		//Get the offsetParent and cache its position
16317		this.offsetParent = this.helper.offsetParent();
16318		var po = this.offsetParent.offset();
16319
16320		// This is a special case where we need to modify a offset calculated on start, since the
16321		// following happened:
16322		// 1. The position of the helper is absolute, so it's position is calculated based on the
16323		// next positioned parent
16324		// 2. The actual offset parent is a child of the scroll parent, and the scroll parent isn't
16325		// the document, which means that the scroll is included in the initial calculation of the
16326		// offset of the parent, and never recalculated upon drag
16327		if ( this.cssPosition === "absolute" && this.scrollParent[ 0 ] !== this.document[ 0 ] &&
16328				$.contains( this.scrollParent[ 0 ], this.offsetParent[ 0 ] ) ) {
16329			po.left += this.scrollParent.scrollLeft();
16330			po.top += this.scrollParent.scrollTop();
16331		}
16332
16333		// This needs to be actually done for all browsers, since pageX/pageY includes this
16334		// information with an ugly IE fix
16335		if ( this.offsetParent[ 0 ] === this.document[ 0 ].body ||
16336				( this.offsetParent[ 0 ].tagName &&
16337				this.offsetParent[ 0 ].tagName.toLowerCase() === "html" && $.ui.ie ) ) {
16338			po = { top: 0, left: 0 };
16339		}
16340
16341		return {
16342			top: po.top + ( parseInt( this.offsetParent.css( "borderTopWidth" ), 10 ) || 0 ),
16343			left: po.left + ( parseInt( this.offsetParent.css( "borderLeftWidth" ), 10 ) || 0 )
16344		};
16345
16346	},
16347
16348	_getRelativeOffset: function() {
16349
16350		if ( this.cssPosition === "relative" ) {
16351			var p = this.currentItem.position();
16352			return {
16353				top: p.top - ( parseInt( this.helper.css( "top" ), 10 ) || 0 ) +
16354					this.scrollParent.scrollTop(),
16355				left: p.left - ( parseInt( this.helper.css( "left" ), 10 ) || 0 ) +
16356					this.scrollParent.scrollLeft()
16357			};
16358		} else {
16359			return { top: 0, left: 0 };
16360		}
16361
16362	},
16363
16364	_cacheMargins: function() {
16365		this.margins = {
16366			left: ( parseInt( this.currentItem.css( "marginLeft" ), 10 ) || 0 ),
16367			top: ( parseInt( this.currentItem.css( "marginTop" ), 10 ) || 0 )
16368		};
16369	},
16370
16371	_cacheHelperProportions: function() {
16372		this.helperProportions = {
16373			width: this.helper.outerWidth(),
16374			height: this.helper.outerHeight()
16375		};
16376	},
16377
16378	_setContainment: function() {
16379
16380		var ce, co, over,
16381			o = this.options;
16382		if ( o.containment === "parent" ) {
16383			o.containment = this.helper[ 0 ].parentNode;
16384		}
16385		if ( o.containment === "document" || o.containment === "window" ) {
16386			this.containment = [
16387				0 - this.offset.relative.left - this.offset.parent.left,
16388				0 - this.offset.relative.top - this.offset.parent.top,
16389				o.containment === "document" ?
16390					this.document.width() :
16391					this.window.width() - this.helperProportions.width - this.margins.left,
16392				( o.containment === "document" ?
16393					( this.document.height() || document.body.parentNode.scrollHeight ) :
16394					this.window.height() || this.document[ 0 ].body.parentNode.scrollHeight
16395				) - this.helperProportions.height - this.margins.top
16396			];
16397		}
16398
16399		if ( !( /^(document|window|parent)$/ ).test( o.containment ) ) {
16400			ce = $( o.containment )[ 0 ];
vendor: 2,294 bytes, lines 16401-16461
16401			co = $( o.containment ).offset();
16402			over = ( $( ce ).css( "overflow" ) !== "hidden" );
16403
16404			this.containment = [
16405				co.left + ( parseInt( $( ce ).css( "borderLeftWidth" ), 10 ) || 0 ) +
16406					( parseInt( $( ce ).css( "paddingLeft" ), 10 ) || 0 ) - this.margins.left,
16407				co.top + ( parseInt( $( ce ).css( "borderTopWidth" ), 10 ) || 0 ) +
16408					( parseInt( $( ce ).css( "paddingTop" ), 10 ) || 0 ) - this.margins.top,
16409				co.left + ( over ? Math.max( ce.scrollWidth, ce.offsetWidth ) : ce.offsetWidth ) -
16410					( parseInt( $( ce ).css( "borderLeftWidth" ), 10 ) || 0 ) -
16411					( parseInt( $( ce ).css( "paddingRight" ), 10 ) || 0 ) -
16412					this.helperProportions.width - this.margins.left,
16413				co.top + ( over ? Math.max( ce.scrollHeight, ce.offsetHeight ) : ce.offsetHeight ) -
16414					( parseInt( $( ce ).css( "borderTopWidth" ), 10 ) || 0 ) -
16415					( parseInt( $( ce ).css( "paddingBottom" ), 10 ) || 0 ) -
16416					this.helperProportions.height - this.margins.top
16417			];
16418		}
16419
16420	},
16421
16422	_convertPositionTo: function( d, pos ) {
16423
16424		if ( !pos ) {
16425			pos = this.position;
16426		}
16427		var mod = d === "absolute" ? 1 : -1,
16428			scroll = this.cssPosition === "absolute" &&
16429				!( this.scrollParent[ 0 ] !== this.document[ 0 ] &&
16430				$.contains( this.scrollParent[ 0 ], this.offsetParent[ 0 ] ) ) ?
16431					this.offsetParent :
16432					this.scrollParent,
16433			scrollIsRootNode = ( /(html|body)/i ).test( scroll[ 0 ].tagName );
16434
16435		return {
16436			top: (
16437
16438				// The absolute mouse position
16439				pos.top	+
16440
16441				// Only for relative positioned nodes: Relative offset from element to offset parent
16442				this.offset.relative.top * mod +
16443
16444				// The offsetParent's offset without borders (offset + border)
16445				this.offset.parent.top * mod -
16446				( ( this.cssPosition === "fixed" ?
16447					-this.scrollParent.scrollTop() :
16448					( scrollIsRootNode ? 0 : scroll.scrollTop() ) ) * mod )
16449			),
16450			left: (
16451
16452				// The absolute mouse position
16453				pos.left +
16454
16455				// Only for relative positioned nodes: Relative offset from element to offset parent
16456				this.offset.relative.left * mod +
16457
16458				// The offsetParent's offset without borders (offset + border)
16459				this.offset.parent.left * mod	-
16460				( ( this.cssPosition === "fixed" ?
16461					-this.scrollParent.scrollLeft() : scrollIsRootNode ? 0 :
vendor: 9,150 bytes, lines 16462-16746
16462					scroll.scrollLeft() ) * mod )
16463			)
16464		};
16465
16466	},
16467
16468	_generatePosition: function( event ) {
16469
16470		var top, left,
16471			o = this.options,
16472			pageX = event.pageX,
16473			pageY = event.pageY,
16474			scroll = this.cssPosition === "absolute" &&
16475				!( this.scrollParent[ 0 ] !== this.document[ 0 ] &&
16476				$.contains( this.scrollParent[ 0 ], this.offsetParent[ 0 ] ) ) ?
16477					this.offsetParent :
16478					this.scrollParent,
16479				scrollIsRootNode = ( /(html|body)/i ).test( scroll[ 0 ].tagName );
16480
16481		// This is another very weird special case that only happens for relative elements:
16482		// 1. If the css position is relative
16483		// 2. and the scroll parent is the document or similar to the offset parent
16484		// we have to refresh the relative offset during the scroll so there are no jumps
16485		if ( this.cssPosition === "relative" && !( this.scrollParent[ 0 ] !== this.document[ 0 ] &&
16486				this.scrollParent[ 0 ] !== this.offsetParent[ 0 ] ) ) {
16487			this.offset.relative = this._getRelativeOffset();
16488		}
16489
16490		/*
16491		 * - Position constraining -
16492		 * Constrain the position to a mix of grid, containment.
16493		 */
16494
16495		if ( this.originalPosition ) { //If we are not dragging yet, we won't check for options
16496
16497			if ( this.containment ) {
16498				if ( event.pageX - this.offset.click.left < this.containment[ 0 ] ) {
16499					pageX = this.containment[ 0 ] + this.offset.click.left;
16500				}
16501				if ( event.pageY - this.offset.click.top < this.containment[ 1 ] ) {
16502					pageY = this.containment[ 1 ] + this.offset.click.top;
16503				}
16504				if ( event.pageX - this.offset.click.left > this.containment[ 2 ] ) {
16505					pageX = this.containment[ 2 ] + this.offset.click.left;
16506				}
16507				if ( event.pageY - this.offset.click.top > this.containment[ 3 ] ) {
16508					pageY = this.containment[ 3 ] + this.offset.click.top;
16509				}
16510			}
16511
16512			if ( o.grid ) {
16513				top = this.originalPageY + Math.round( ( pageY - this.originalPageY ) /
16514					o.grid[ 1 ] ) * o.grid[ 1 ];
16515				pageY = this.containment ?
16516					( ( top - this.offset.click.top >= this.containment[ 1 ] &&
16517						top - this.offset.click.top <= this.containment[ 3 ] ) ?
16518							top :
16519							( ( top - this.offset.click.top >= this.containment[ 1 ] ) ?
16520								top - o.grid[ 1 ] : top + o.grid[ 1 ] ) ) :
16521								top;
16522
16523				left = this.originalPageX + Math.round( ( pageX - this.originalPageX ) /
16524					o.grid[ 0 ] ) * o.grid[ 0 ];
16525				pageX = this.containment ?
16526					( ( left - this.offset.click.left >= this.containment[ 0 ] &&
16527						left - this.offset.click.left <= this.containment[ 2 ] ) ?
16528							left :
16529							( ( left - this.offset.click.left >= this.containment[ 0 ] ) ?
16530								left - o.grid[ 0 ] : left + o.grid[ 0 ] ) ) :
16531								left;
16532			}
16533
16534		}
16535
16536		return {
16537			top: (
16538
16539				// The absolute mouse position
16540				pageY -
16541
16542				// Click offset (relative to the element)
16543				this.offset.click.top -
16544
16545				// Only for relative positioned nodes: Relative offset from element to offset parent
16546				this.offset.relative.top -
16547
16548				// The offsetParent's offset without borders (offset + border)
16549				this.offset.parent.top +
16550				( ( this.cssPosition === "fixed" ?
16551					-this.scrollParent.scrollTop() :
16552					( scrollIsRootNode ? 0 : scroll.scrollTop() ) ) )
16553			),
16554			left: (
16555
16556				// The absolute mouse position
16557				pageX -
16558
16559				// Click offset (relative to the element)
16560				this.offset.click.left -
16561
16562				// Only for relative positioned nodes: Relative offset from element to offset parent
16563				this.offset.relative.left -
16564
16565				// The offsetParent's offset without borders (offset + border)
16566				this.offset.parent.left +
16567				( ( this.cssPosition === "fixed" ?
16568					-this.scrollParent.scrollLeft() :
16569					scrollIsRootNode ? 0 : scroll.scrollLeft() ) )
16570			)
16571		};
16572
16573	},
16574
16575	_rearrange: function( event, i, a, hardRefresh ) {
16576
16577		a ? a[ 0 ].appendChild( this.placeholder[ 0 ] ) :
16578			i.item[ 0 ].parentNode.insertBefore( this.placeholder[ 0 ],
16579				( this.direction === "down" ? i.item[ 0 ] : i.item[ 0 ].nextSibling ) );
16580
16581		//Various things done here to improve the performance:
16582		// 1. we create a setTimeout, that calls refreshPositions
16583		// 2. on the instance, we have a counter variable, that get's higher after every append
16584		// 3. on the local scope, we copy the counter variable, and check in the timeout,
16585		// if it's still the same
16586		// 4. this lets only the last addition to the timeout stack through
16587		this.counter = this.counter ? ++this.counter : 1;
16588		var counter = this.counter;
16589
16590		this._delay( function() {
16591			if ( counter === this.counter ) {
16592
16593				//Precompute after each DOM insertion, NOT on mousemove
16594				this.refreshPositions( !hardRefresh );
16595			}
16596		} );
16597
16598	},
16599
16600	_clear: function( event, noPropagation ) {
16601
16602		this.reverting = false;
16603
16604		// We delay all events that have to be triggered to after the point where the placeholder
16605		// has been removed and everything else normalized again
16606		var i,
16607			delayedTriggers = [];
16608
16609		// We first have to update the dom position of the actual currentItem
16610		// Note: don't do it if the current item is already removed (by a user), or it gets
16611		// reappended (see #4088)
16612		if ( !this._noFinalSort && this.currentItem.parent().length ) {
16613			this.placeholder.before( this.currentItem );
16614		}
16615		this._noFinalSort = null;
16616
16617		if ( this.helper[ 0 ] === this.currentItem[ 0 ] ) {
16618			for ( i in this._storedCSS ) {
16619				if ( this._storedCSS[ i ] === "auto" || this._storedCSS[ i ] === "static" ) {
16620					this._storedCSS[ i ] = "";
16621				}
16622			}
16623			this.currentItem.css( this._storedCSS );
16624			this._removeClass( this.currentItem, "ui-sortable-helper" );
16625		} else {
16626			this.currentItem.show();
16627		}
16628
16629		if ( this.fromOutside && !noPropagation ) {
16630			delayedTriggers.push( function( event ) {
16631				this._trigger( "receive", event, this._uiHash( this.fromOutside ) );
16632			} );
16633		}
16634		if ( ( this.fromOutside ||
16635				this.domPosition.prev !==
16636				this.currentItem.prev().not( ".ui-sortable-helper" )[ 0 ] ||
16637				this.domPosition.parent !== this.currentItem.parent()[ 0 ] ) && !noPropagation ) {
16638
16639			// Trigger update callback if the DOM position has changed
16640			delayedTriggers.push( function( event ) {
16641				this._trigger( "update", event, this._uiHash() );
16642			} );
16643		}
16644
16645		// Check if the items Container has Changed and trigger appropriate
16646		// events.
16647		if ( this !== this.currentContainer ) {
16648			if ( !noPropagation ) {
16649				delayedTriggers.push( function( event ) {
16650					this._trigger( "remove", event, this._uiHash() );
16651				} );
16652				delayedTriggers.push( ( function( c ) {
16653					return function( event ) {
16654						c._trigger( "receive", event, this._uiHash( this ) );
16655					};
16656				} ).call( this, this.currentContainer ) );
16657				delayedTriggers.push( ( function( c ) {
16658					return function( event ) {
16659						c._trigger( "update", event, this._uiHash( this ) );
16660					};
16661				} ).call( this, this.currentContainer ) );
16662			}
16663		}
16664
16665		//Post events to containers
16666		function delayEvent( type, instance, container ) {
16667			return function( event ) {
16668				container._trigger( type, event, instance._uiHash( instance ) );
16669			};
16670		}
16671		for ( i = this.containers.length - 1; i >= 0; i-- ) {
16672			if ( !noPropagation ) {
16673				delayedTriggers.push( delayEvent( "deactivate", this, this.containers[ i ] ) );
16674			}
16675			if ( this.containers[ i ].containerCache.over ) {
16676				delayedTriggers.push( delayEvent( "out", this, this.containers[ i ] ) );
16677				this.containers[ i ].containerCache.over = 0;
16678			}
16679		}
16680
16681		//Do what was originally in plugins
16682		if ( this.storedCursor ) {
16683			this.document.find( "body" ).css( "cursor", this.storedCursor );
16684			this.storedStylesheet.remove();
16685		}
16686		if ( this._storedOpacity ) {
16687			this.helper.css( "opacity", this._storedOpacity );
16688		}
16689		if ( this._storedZIndex ) {
16690			this.helper.css( "zIndex", this._storedZIndex === "auto" ? "" : this._storedZIndex );
16691		}
16692
16693		this.dragging = false;
16694
16695		if ( !noPropagation ) {
16696			this._trigger( "beforeStop", event, this._uiHash() );
16697		}
16698
16699		//$(this.placeholder[0]).remove(); would have been the jQuery way - unfortunately,
16700		// it unbinds ALL events from the original node!
16701		this.placeholder[ 0 ].parentNode.removeChild( this.placeholder[ 0 ] );
16702
16703		if ( !this.cancelHelperRemoval ) {
16704			if ( this.helper[ 0 ] !== this.currentItem[ 0 ] ) {
16705				this.helper.remove();
16706			}
16707			this.helper = null;
16708		}
16709
16710		if ( !noPropagation ) {
16711			for ( i = 0; i < delayedTriggers.length; i++ ) {
16712
16713				// Trigger all delayed events
16714				delayedTriggers[ i ].call( this, event );
16715			}
16716			this._trigger( "stop", event, this._uiHash() );
16717		}
16718
16719		this.fromOutside = false;
16720		return !this.cancelHelperRemoval;
16721
16722	},
16723
16724	_trigger: function() {
16725		if ( $.Widget.prototype._trigger.apply( this, arguments ) === false ) {
16726			this.cancel();
16727		}
16728	},
16729
16730	_uiHash: function( _inst ) {
16731		var inst = _inst || this;
16732		return {
16733			helper: inst.helper,
16734			placeholder: inst.placeholder || $( [] ),
16735			position: inst.position,
16736			originalPosition: inst.originalPosition,
16737			offset: inst.positionAbs,
16738			item: inst.currentItem,
16739			sender: _inst ? _inst.element : null
16740		};
16741	}
16742
16743} );
16744
16745
16746/*!
vendor: 4,519 bytes, lines 16747-16913
16747 * jQuery UI Spinner 1.12.1
16748 * http://jqueryui.com
16749 *
16750 * Copyright jQuery Foundation and other contributors
16751 * Released under the MIT license.
16752 * http://jquery.org/license
16753 */
16754
16755//>>label: Spinner
16756//>>group: Widgets
16757//>>description: Displays buttons to easily input numbers via the keyboard or mouse.
16758//>>docs: http://api.jqueryui.com/spinner/
16759//>>demos: http://jqueryui.com/spinner/
16760//>>css.structure: ../../themes/base/core.css
16761//>>css.structure: ../../themes/base/spinner.css
16762//>>css.theme: ../../themes/base/theme.css
16763
16764
16765
16766function spinnerModifer( fn ) {
16767	return function() {
16768		var previous = this.element.val();
16769		fn.apply( this, arguments );
16770		this._refresh();
16771		if ( previous !== this.element.val() ) {
16772			this._trigger( "change" );
16773		}
16774	};
16775}
16776
16777$.widget( "ui.spinner", {
16778	version: "1.12.1",
16779	defaultElement: "<input>",
16780	widgetEventPrefix: "spin",
16781	options: {
16782		classes: {
16783			"ui-spinner": "ui-corner-all",
16784			"ui-spinner-down": "ui-corner-br",
16785			"ui-spinner-up": "ui-corner-tr"
16786		},
16787		culture: null,
16788		icons: {
16789			down: "ui-icon-triangle-1-s",
16790			up: "ui-icon-triangle-1-n"
16791		},
16792		incremental: true,
16793		max: null,
16794		min: null,
16795		numberFormat: null,
16796		page: 10,
16797		step: 1,
16798
16799		change: null,
16800		spin: null,
16801		start: null,
16802		stop: null
16803	},
16804
16805	_create: function() {
16806
16807		// handle string values that need to be parsed
16808		this._setOption( "max", this.options.max );
16809		this._setOption( "min", this.options.min );
16810		this._setOption( "step", this.options.step );
16811
16812		// Only format if there is a value, prevents the field from being marked
16813		// as invalid in Firefox, see #9573.
16814		if ( this.value() !== "" ) {
16815
16816			// Format the value, but don't constrain.
16817			this._value( this.element.val(), true );
16818		}
16819
16820		this._draw();
16821		this._on( this._events );
16822		this._refresh();
16823
16824		// Turning off autocomplete prevents the browser from remembering the
16825		// value when navigating through history, so we re-enable autocomplete
16826		// if the page is unloaded before the widget is destroyed. #7790
16827		this._on( this.window, {
16828			beforeunload: function() {
16829				this.element.removeAttr( "autocomplete" );
16830			}
16831		} );
16832	},
16833
16834	_getCreateOptions: function() {
16835		var options = this._super();
16836		var element = this.element;
16837
16838		$.each( [ "min", "max", "step" ], function( i, option ) {
16839			var value = element.attr( option );
16840			if ( value != null && value.length ) {
16841				options[ option ] = value;
16842			}
16843		} );
16844
16845		return options;
16846	},
16847
16848	_events: {
16849		keydown: function( event ) {
16850			if ( this._start( event ) && this._keydown( event ) ) {
16851				event.preventDefault();
16852			}
16853		},
16854		keyup: "_stop",
16855		focus: function() {
16856			this.previous = this.element.val();
16857		},
16858		blur: function( event ) {
16859			if ( this.cancelBlur ) {
16860				delete this.cancelBlur;
16861				return;
16862			}
16863
16864			this._stop();
16865			this._refresh();
16866			if ( this.previous !== this.element.val() ) {
16867				this._trigger( "change", event );
16868			}
16869		},
16870		mousewheel: function( event, delta ) {
16871			if ( !delta ) {
16872				return;
16873			}
16874			if ( !this.spinning && !this._start( event ) ) {
16875				return false;
16876			}
16877
16878			this._spin( ( delta > 0 ? 1 : -1 ) * this.options.step, event );
16879			clearTimeout( this.mousewheelTimer );
16880			this.mousewheelTimer = this._delay( function() {
16881				if ( this.spinning ) {
16882					this._stop( event );
16883				}
16884			}, 100 );
16885			event.preventDefault();
16886		},
16887		"mousedown .ui-spinner-button": function( event ) {
16888			var previous;
16889
16890			// We never want the buttons to have focus; whenever the user is
16891			// interacting with the spinner, the focus should be on the input.
16892			// If the input is focused then this.previous is properly set from
16893			// when the input first received focus. If the input is not focused
16894			// then we need to set this.previous based on the value before spinning.
16895			previous = this.element[ 0 ] === $.ui.safeActiveElement( this.document[ 0 ] ) ?
16896				this.previous : this.element.val();
16897			function checkFocus() {
16898				var isActive = this.element[ 0 ] === $.ui.safeActiveElement( this.document[ 0 ] );
16899				if ( !isActive ) {
16900					this.element.trigger( "focus" );
16901					this.previous = previous;
16902
16903					// support: IE
16904					// IE sets focus asynchronously, so we need to check if focus
16905					// moved off of the input because the user clicked on the button.
16906					this._delay( function() {
16907						this.previous = previous;
16908					} );
16909				}
16910			}
16911
16912			// Ensure focus is on (or stays on) the text field
16913			event.preventDefault();
vendor: 5,986 bytes, lines 16914-17143
16914			checkFocus.call( this );
16915
16916			// Support: IE
16917			// IE doesn't prevent moving focus even with event.preventDefault()
16918			// so we set a flag to know when we should ignore the blur event
16919			// and check (again) if focus moved off of the input.
16920			this.cancelBlur = true;
16921			this._delay( function() {
16922				delete this.cancelBlur;
16923				checkFocus.call( this );
16924			} );
16925
16926			if ( this._start( event ) === false ) {
16927				return;
16928			}
16929
16930			this._repeat( null, $( event.currentTarget )
16931				.hasClass( "ui-spinner-up" ) ? 1 : -1, event );
16932		},
16933		"mouseup .ui-spinner-button": "_stop",
16934		"mouseenter .ui-spinner-button": function( event ) {
16935
16936			// button will add ui-state-active if mouse was down while mouseleave and kept down
16937			if ( !$( event.currentTarget ).hasClass( "ui-state-active" ) ) {
16938				return;
16939			}
16940
16941			if ( this._start( event ) === false ) {
16942				return false;
16943			}
16944			this._repeat( null, $( event.currentTarget )
16945				.hasClass( "ui-spinner-up" ) ? 1 : -1, event );
16946		},
16947
16948		// TODO: do we really want to consider this a stop?
16949		// shouldn't we just stop the repeater and wait until mouseup before
16950		// we trigger the stop event?
16951		"mouseleave .ui-spinner-button": "_stop"
16952	},
16953
16954	// Support mobile enhanced option and make backcompat more sane
16955	_enhance: function() {
16956		this.uiSpinner = this.element
16957			.attr( "autocomplete", "off" )
16958			.wrap( "<span>" )
16959			.parent()
16960
16961				// Add buttons
16962				.append(
16963					"<a></a><a></a>"
16964				);
16965	},
16966
16967	_draw: function() {
16968		this._enhance();
16969
16970		this._addClass( this.uiSpinner, "ui-spinner", "ui-widget ui-widget-content" );
16971		this._addClass( "ui-spinner-input" );
16972
16973		this.element.attr( "role", "spinbutton" );
16974
16975		// Button bindings
16976		this.buttons = this.uiSpinner.children( "a" )
16977			.attr( "tabIndex", -1 )
16978			.attr( "aria-hidden", true )
16979			.button( {
16980				classes: {
16981					"ui-button": ""
16982				}
16983			} );
16984
16985		// TODO: Right now button does not support classes this is already updated in button PR
16986		this._removeClass( this.buttons, "ui-corner-all" );
16987
16988		this._addClass( this.buttons.first(), "ui-spinner-button ui-spinner-up" );
16989		this._addClass( this.buttons.last(), "ui-spinner-button ui-spinner-down" );
16990		this.buttons.first().button( {
16991			"icon": this.options.icons.up,
16992			"showLabel": false
16993		} );
16994		this.buttons.last().button( {
16995			"icon": this.options.icons.down,
16996			"showLabel": false
16997		} );
16998
16999		// IE 6 doesn't understand height: 50% for the buttons
17000		// unless the wrapper has an explicit height
17001		if ( this.buttons.height() > Math.ceil( this.uiSpinner.height() * 0.5 ) &&
17002				this.uiSpinner.height() > 0 ) {
17003			this.uiSpinner.height( this.uiSpinner.height() );
17004		}
17005	},
17006
17007	_keydown: function( event ) {
17008		var options = this.options,
17009			keyCode = $.ui.keyCode;
17010
17011		switch ( event.keyCode ) {
17012		case keyCode.UP:
17013			this._repeat( null, 1, event );
17014			return true;
17015		case keyCode.DOWN:
17016			this._repeat( null, -1, event );
17017			return true;
17018		case keyCode.PAGE_UP:
17019			this._repeat( null, options.page, event );
17020			return true;
17021		case keyCode.PAGE_DOWN:
17022			this._repeat( null, -options.page, event );
17023			return true;
17024		}
17025
17026		return false;
17027	},
17028
17029	_start: function( event ) {
17030		if ( !this.spinning && this._trigger( "start", event ) === false ) {
17031			return false;
17032		}
17033
17034		if ( !this.counter ) {
17035			this.counter = 1;
17036		}
17037		this.spinning = true;
17038		return true;
17039	},
17040
17041	_repeat: function( i, steps, event ) {
17042		i = i || 500;
17043
17044		clearTimeout( this.timer );
17045		this.timer = this._delay( function() {
17046			this._repeat( 40, steps, event );
17047		}, i );
17048
17049		this._spin( steps * this.options.step, event );
17050	},
17051
17052	_spin: function( step, event ) {
17053		var value = this.value() || 0;
17054
17055		if ( !this.counter ) {
17056			this.counter = 1;
17057		}
17058
17059		value = this._adjustValue( value + step * this._increment( this.counter ) );
17060
17061		if ( !this.spinning || this._trigger( "spin", event, { value: value } ) !== false ) {
17062			this._value( value );
17063			this.counter++;
17064		}
17065	},
17066
17067	_increment: function( i ) {
17068		var incremental = this.options.incremental;
17069
17070		if ( incremental ) {
17071			return $.isFunction( incremental ) ?
17072				incremental( i ) :
17073				Math.floor( i * i * i / 50000 - i * i / 500 + 17 * i / 200 + 1 );
17074		}
17075
17076		return 1;
17077	},
17078
17079	_precision: function() {
17080		var precision = this._precisionOf( this.options.step );
17081		if ( this.options.min !== null ) {
17082			precision = Math.max( precision, this._precisionOf( this.options.min ) );
17083		}
17084		return precision;
17085	},
17086
17087	_precisionOf: function( num ) {
17088		var str = num.toString(),
17089			decimal = str.indexOf( "." );
17090		return decimal === -1 ? 0 : str.length - decimal - 1;
17091	},
17092
17093	_adjustValue: function( value ) {
17094		var base, aboveMin,
17095			options = this.options;
17096
17097		// Make sure we're at a valid step
17098		// - find out where we are relative to the base (min or 0)
17099		base = options.min !== null ? options.min : 0;
17100		aboveMin = value - base;
17101
17102		// - round to the nearest step
17103		aboveMin = Math.round( aboveMin / options.step ) * options.step;
17104
17105		// - rounding is based on 0, so adjust back to our base
17106		value = base + aboveMin;
17107
17108		// Fix precision from bad JS floating point math
17109		value = parseFloat( value.toFixed( this._precision() ) );
17110
17111		// Clamp the value
17112		if ( options.max !== null && value > options.max ) {
17113			return options.max;
17114		}
17115		if ( options.min !== null && value < options.min ) {
17116			return options.min;
17117		}
17118
17119		return value;
17120	},
17121
17122	_stop: function( event ) {
17123		if ( !this.spinning ) {
17124			return;
17125		}
17126
17127		clearTimeout( this.timer );
17128		clearTimeout( this.mousewheelTimer );
17129		this.counter = 0;
17130		this.spinning = false;
17131		this._trigger( "stop", event );
17132	},
17133
17134	_setOption: function( key, value ) {
17135		var prevValue, first, last;
17136
17137		if ( key === "culture" || key === "numberFormat" ) {
17138			prevValue = this._parse( this.element.val() );
17139			this.options[ key ] = value;
17140			this.element.val( this._format( prevValue ) );
17141			return;
17142		}
17143
vendor: 12,920 bytes, lines 17144-17640
17144		if ( key === "max" || key === "min" || key === "step" ) {
17145			if ( typeof value === "string" ) {
17146				value = this._parse( value );
17147			}
17148		}
17149		if ( key === "icons" ) {
17150			first = this.buttons.first().find( ".ui-icon" );
17151			this._removeClass( first, null, this.options.icons.up );
17152			this._addClass( first, null, value.up );
17153			last = this.buttons.last().find( ".ui-icon" );
17154			this._removeClass( last, null, this.options.icons.down );
17155			this._addClass( last, null, value.down );
17156		}
17157
17158		this._super( key, value );
17159	},
17160
17161	_setOptionDisabled: function( value ) {
17162		this._super( value );
17163
17164		this._toggleClass( this.uiSpinner, null, "ui-state-disabled", !!value );
17165		this.element.prop( "disabled", !!value );
17166		this.buttons.button( value ? "disable" : "enable" );
17167	},
17168
17169	_setOptions: spinnerModifer( function( options ) {
17170		this._super( options );
17171	} ),
17172
17173	_parse: function( val ) {
17174		if ( typeof val === "string" && val !== "" ) {
17175			val = window.Globalize && this.options.numberFormat ?
17176				Globalize.parseFloat( val, 10, this.options.culture ) : +val;
17177		}
17178		return val === "" || isNaN( val ) ? null : val;
17179	},
17180
17181	_format: function( value ) {
17182		if ( value === "" ) {
17183			return "";
17184		}
17185		return window.Globalize && this.options.numberFormat ?
17186			Globalize.format( value, this.options.numberFormat, this.options.culture ) :
17187			value;
17188	},
17189
17190	_refresh: function() {
17191		this.element.attr( {
17192			"aria-valuemin": this.options.min,
17193			"aria-valuemax": this.options.max,
17194
17195			// TODO: what should we do with values that can't be parsed?
17196			"aria-valuenow": this._parse( this.element.val() )
17197		} );
17198	},
17199
17200	isValid: function() {
17201		var value = this.value();
17202
17203		// Null is invalid
17204		if ( value === null ) {
17205			return false;
17206		}
17207
17208		// If value gets adjusted, it's invalid
17209		return value === this._adjustValue( value );
17210	},
17211
17212	// Update the value without triggering change
17213	_value: function( value, allowAny ) {
17214		var parsed;
17215		if ( value !== "" ) {
17216			parsed = this._parse( value );
17217			if ( parsed !== null ) {
17218				if ( !allowAny ) {
17219					parsed = this._adjustValue( parsed );
17220				}
17221				value = this._format( parsed );
17222			}
17223		}
17224		this.element.val( value );
17225		this._refresh();
17226	},
17227
17228	_destroy: function() {
17229		this.element
17230			.prop( "disabled", false )
17231			.removeAttr( "autocomplete role aria-valuemin aria-valuemax aria-valuenow" );
17232
17233		this.uiSpinner.replaceWith( this.element );
17234	},
17235
17236	stepUp: spinnerModifer( function( steps ) {
17237		this._stepUp( steps );
17238	} ),
17239	_stepUp: function( steps ) {
17240		if ( this._start() ) {
17241			this._spin( ( steps || 1 ) * this.options.step );
17242			this._stop();
17243		}
17244	},
17245
17246	stepDown: spinnerModifer( function( steps ) {
17247		this._stepDown( steps );
17248	} ),
17249	_stepDown: function( steps ) {
17250		if ( this._start() ) {
17251			this._spin( ( steps || 1 ) * -this.options.step );
17252			this._stop();
17253		}
17254	},
17255
17256	pageUp: spinnerModifer( function( pages ) {
17257		this._stepUp( ( pages || 1 ) * this.options.page );
17258	} ),
17259
17260	pageDown: spinnerModifer( function( pages ) {
17261		this._stepDown( ( pages || 1 ) * this.options.page );
17262	} ),
17263
17264	value: function( newVal ) {
17265		if ( !arguments.length ) {
17266			return this._parse( this.element.val() );
17267		}
17268		spinnerModifer( this._value ).call( this, newVal );
17269	},
17270
17271	widget: function() {
17272		return this.uiSpinner;
17273	}
17274} );
17275
17276// DEPRECATED
17277// TODO: switch return back to widget declaration at top of file when this is removed
17278if ( $.uiBackCompat !== false ) {
17279
17280	// Backcompat for spinner html extension points
17281	$.widget( "ui.spinner", $.ui.spinner, {
17282		_enhance: function() {
17283			this.uiSpinner = this.element
17284				.attr( "autocomplete", "off" )
17285				.wrap( this._uiSpinnerHtml() )
17286				.parent()
17287
17288					// Add buttons
17289					.append( this._buttonHtml() );
17290		},
17291		_uiSpinnerHtml: function() {
17292			return "<span>";
17293		},
17294
17295		_buttonHtml: function() {
17296			return "<a></a><a></a>";
17297		}
17298	} );
17299}
17300
17301var widgetsSpinner = $.ui.spinner;
17302
17303
17304/*!
17305 * jQuery UI Tabs 1.12.1
17306 * http://jqueryui.com
17307 *
17308 * Copyright jQuery Foundation and other contributors
17309 * Released under the MIT license.
17310 * http://jquery.org/license
17311 */
17312
17313//>>label: Tabs
17314//>>group: Widgets
17315//>>description: Transforms a set of container elements into a tab structure.
17316//>>docs: http://api.jqueryui.com/tabs/
17317//>>demos: http://jqueryui.com/tabs/
17318//>>css.structure: ../../themes/base/core.css
17319//>>css.structure: ../../themes/base/tabs.css
17320//>>css.theme: ../../themes/base/theme.css
17321
17322
17323
17324$.widget( "ui.tabs", {
17325	version: "1.12.1",
17326	delay: 300,
17327	options: {
17328		active: null,
17329		classes: {
17330			"ui-tabs": "ui-corner-all",
17331			"ui-tabs-nav": "ui-corner-all",
17332			"ui-tabs-panel": "ui-corner-bottom",
17333			"ui-tabs-tab": "ui-corner-top"
17334		},
17335		collapsible: false,
17336		event: "click",
17337		heightStyle: "content",
17338		hide: null,
17339		show: null,
17340
17341		// Callbacks
17342		activate: null,
17343		beforeActivate: null,
17344		beforeLoad: null,
17345		load: null
17346	},
17347
17348	_isLocal: ( function() {
17349		var rhash = /#.*$/;
17350
17351		return function( anchor ) {
17352			var anchorUrl, locationUrl;
17353
17354			anchorUrl = anchor.href.replace( rhash, "" );
17355			locationUrl = location.href.replace( rhash, "" );
17356
17357			// Decoding may throw an error if the URL isn't UTF-8 (#9518)
17358			try {
17359				anchorUrl = decodeURIComponent( anchorUrl );
17360			} catch ( error ) {}
17361			try {
17362				locationUrl = decodeURIComponent( locationUrl );
17363			} catch ( error ) {}
17364
17365			return anchor.hash.length > 1 && anchorUrl === locationUrl;
17366		};
17367	} )(),
17368
17369	_create: function() {
17370		var that = this,
17371			options = this.options;
17372
17373		this.running = false;
17374
17375		this._addClass( "ui-tabs", "ui-widget ui-widget-content" );
17376		this._toggleClass( "ui-tabs-collapsible", null, options.collapsible );
17377
17378		this._processTabs();
17379		options.active = this._initialActive();
17380
17381		// Take disabling tabs via class attribute from HTML
17382		// into account and update option properly.
17383		if ( $.isArray( options.disabled ) ) {
17384			options.disabled = $.unique( options.disabled.concat(
17385				$.map( this.tabs.filter( ".ui-state-disabled" ), function( li ) {
17386					return that.tabs.index( li );
17387				} )
17388			) ).sort();
17389		}
17390
17391		// Check for length avoids error when initializing empty list
17392		if ( this.options.active !== false && this.anchors.length ) {
17393			this.active = this._findActive( options.active );
17394		} else {
17395			this.active = $();
17396		}
17397
17398		this._refresh();
17399
17400		if ( this.active.length ) {
17401			this.load( options.active );
17402		}
17403	},
17404
17405	_initialActive: function() {
17406		var active = this.options.active,
17407			collapsible = this.options.collapsible,
17408			locationHash = location.hash.substring( 1 );
17409
17410		if ( active === null ) {
17411
17412			// check the fragment identifier in the URL
17413			if ( locationHash ) {
17414				this.tabs.each( function( i, tab ) {
17415					if ( $( tab ).attr( "aria-controls" ) === locationHash ) {
17416						active = i;
17417						return false;
17418					}
17419				} );
17420			}
17421
17422			// Check for a tab marked active via a class
17423			if ( active === null ) {
17424				active = this.tabs.index( this.tabs.filter( ".ui-tabs-active" ) );
17425			}
17426
17427			// No active tab, set to false
17428			if ( active === null || active === -1 ) {
17429				active = this.tabs.length ? 0 : false;
17430			}
17431		}
17432
17433		// Handle numbers: negative, out of range
17434		if ( active !== false ) {
17435			active = this.tabs.index( this.tabs.eq( active ) );
17436			if ( active === -1 ) {
17437				active = collapsible ? false : 0;
17438			}
17439		}
17440
17441		// Don't allow collapsible: false and active: false
17442		if ( !collapsible && active === false && this.anchors.length ) {
17443			active = 0;
17444		}
17445
17446		return active;
17447	},
17448
17449	_getCreateEventData: function() {
17450		return {
17451			tab: this.active,
17452			panel: !this.active.length ? $() : this._getPanelForTab( this.active )
17453		};
17454	},
17455
17456	_tabKeydown: function( event ) {
17457		var focusedTab = $( $.ui.safeActiveElement( this.document[ 0 ] ) ).closest( "li" ),
17458			selectedIndex = this.tabs.index( focusedTab ),
17459			goingForward = true;
17460
17461		if ( this._handlePageNav( event ) ) {
17462			return;
17463		}
17464
17465		switch ( event.keyCode ) {
17466		case $.ui.keyCode.RIGHT:
17467		case $.ui.keyCode.DOWN:
17468			selectedIndex++;
17469			break;
17470		case $.ui.keyCode.UP:
17471		case $.ui.keyCode.LEFT:
17472			goingForward = false;
17473			selectedIndex--;
17474			break;
17475		case $.ui.keyCode.END:
17476			selectedIndex = this.anchors.length - 1;
17477			break;
17478		case $.ui.keyCode.HOME:
17479			selectedIndex = 0;
17480			break;
17481		case $.ui.keyCode.SPACE:
17482
17483			// Activate only, no collapsing
17484			event.preventDefault();
17485			clearTimeout( this.activating );
17486			this._activate( selectedIndex );
17487			return;
17488		case $.ui.keyCode.ENTER:
17489
17490			// Toggle (cancel delayed activation, allow collapsing)
17491			event.preventDefault();
17492			clearTimeout( this.activating );
17493
17494			// Determine if we should collapse or activate
17495			this._activate( selectedIndex === this.options.active ? false : selectedIndex );
17496			return;
17497		default:
17498			return;
17499		}
17500
17501		// Focus the appropriate tab, based on which key was pressed
17502		event.preventDefault();
17503		clearTimeout( this.activating );
17504		selectedIndex = this._focusNextTab( selectedIndex, goingForward );
17505
17506		// Navigating with control/command key will prevent automatic activation
17507		if ( !event.ctrlKey && !event.metaKey ) {
17508
17509			// Update aria-selected immediately so that AT think the tab is already selected.
17510			// Otherwise AT may confuse the user by stating that they need to activate the tab,
17511			// but the tab will already be activated by the time the announcement finishes.
17512			focusedTab.attr( "aria-selected", "false" );
17513			this.tabs.eq( selectedIndex ).attr( "aria-selected", "true" );
17514
17515			this.activating = this._delay( function() {
17516				this.option( "active", selectedIndex );
17517			}, this.delay );
17518		}
17519	},
17520
17521	_panelKeydown: function( event ) {
17522		if ( this._handlePageNav( event ) ) {
17523			return;
17524		}
17525
17526		// Ctrl+up moves focus to the current tab
17527		if ( event.ctrlKey && event.keyCode === $.ui.keyCode.UP ) {
17528			event.preventDefault();
17529			this.active.trigger( "focus" );
17530		}
17531	},
17532
17533	// Alt+page up/down moves focus to the previous/next tab (and activates)
17534	_handlePageNav: function( event ) {
17535		if ( event.altKey && event.keyCode === $.ui.keyCode.PAGE_UP ) {
17536			this._activate( this._focusNextTab( this.options.active - 1, false ) );
17537			return true;
17538		}
17539		if ( event.altKey && event.keyCode === $.ui.keyCode.PAGE_DOWN ) {
17540			this._activate( this._focusNextTab( this.options.active + 1, true ) );
17541			return true;
17542		}
17543	},
17544
17545	_findNextTab: function( index, goingForward ) {
17546		var lastTabIndex = this.tabs.length - 1;
17547
17548		function constrain() {
17549			if ( index > lastTabIndex ) {
17550				index = 0;
17551			}
17552			if ( index < 0 ) {
17553				index = lastTabIndex;
17554			}
17555			return index;
17556		}
17557
17558		while ( $.inArray( constrain(), this.options.disabled ) !== -1 ) {
17559			index = goingForward ? index + 1 : index - 1;
17560		}
17561
17562		return index;
17563	},
17564
17565	_focusNextTab: function( index, goingForward ) {
17566		index = this._findNextTab( index, goingForward );
17567		this.tabs.eq( index ).trigger( "focus" );
17568		return index;
17569	},
17570
17571	_setOption: function( key, value ) {
17572		if ( key === "active" ) {
17573
17574			// _activate() will handle invalid values and update this.options
17575			this._activate( value );
17576			return;
17577		}
17578
17579		this._super( key, value );
17580
17581		if ( key === "collapsible" ) {
17582			this._toggleClass( "ui-tabs-collapsible", null, value );
17583
17584			// Setting collapsible: false while collapsed; open first panel
17585			if ( !value && this.options.active === false ) {
17586				this._activate( 0 );
17587			}
17588		}
17589
17590		if ( key === "event" ) {
17591			this._setupEvents( value );
17592		}
17593
17594		if ( key === "heightStyle" ) {
17595			this._setupHeightStyle( value );
17596		}
17597	},
17598
17599	_sanitizeSelector: function( hash ) {
17600		return hash ? hash.replace( /[!"$%&'()*+,.\/:;<=>?@\[\]\^`{|}~]/g, "\\$&" ) : "";
17601	},
17602
17603	refresh: function() {
17604		var options = this.options,
17605			lis = this.tablist.children( ":has(a[href])" );
17606
17607		// Get disabled tabs from class attribute from HTML
17608		// this will get converted to a boolean if needed in _refresh()
17609		options.disabled = $.map( lis.filter( ".ui-state-disabled" ), function( tab ) {
17610			return lis.index( tab );
17611		} );
17612
17613		this._processTabs();
17614
17615		// Was collapsed or no tabs
17616		if ( options.active === false || !this.anchors.length ) {
17617			options.active = false;
17618			this.active = $();
17619
17620		// was active, but active tab is gone
17621		} else if ( this.active.length && !$.contains( this.tablist[ 0 ], this.active[ 0 ] ) ) {
17622
17623			// all remaining tabs are disabled
17624			if ( this.tabs.length === options.disabled.length ) {
17625				options.active = false;
17626				this.active = $();
17627
17628			// activate previous tab
17629			} else {
17630				this._activate( this._findNextTab( Math.max( 0, options.active - 1 ), false ) );
17631			}
17632
17633		// was active, active tab still exists
17634		} else {
17635
17636			// make sure active index is correct
17637			options.active = this.tabs.index( this.active );
17638		}
17639
17640		this._refresh();
vendor: 18,906 bytes, lines 17641-18346
17641	},
17642
17643	_refresh: function() {
17644		this._setOptionDisabled( this.options.disabled );
17645		this._setupEvents( this.options.event );
17646		this._setupHeightStyle( this.options.heightStyle );
17647
17648		this.tabs.not( this.active ).attr( {
17649			"aria-selected": "false",
17650			"aria-expanded": "false",
17651			tabIndex: -1
17652		} );
17653		this.panels.not( this._getPanelForTab( this.active ) )
17654			.hide()
17655			.attr( {
17656				"aria-hidden": "true"
17657			} );
17658
17659		// Make sure one tab is in the tab order
17660		if ( !this.active.length ) {
17661			this.tabs.eq( 0 ).attr( "tabIndex", 0 );
17662		} else {
17663			this.active
17664				.attr( {
17665					"aria-selected": "true",
17666					"aria-expanded": "true",
17667					tabIndex: 0
17668				} );
17669			this._addClass( this.active, "ui-tabs-active", "ui-state-active" );
17670			this._getPanelForTab( this.active )
17671				.show()
17672				.attr( {
17673					"aria-hidden": "false"
17674				} );
17675		}
17676	},
17677
17678	_processTabs: function() {
17679		var that = this,
17680			prevTabs = this.tabs,
17681			prevAnchors = this.anchors,
17682			prevPanels = this.panels;
17683
17684		this.tablist = this._getList().attr( "role", "tablist" );
17685		this._addClass( this.tablist, "ui-tabs-nav",
17686			"ui-helper-reset ui-helper-clearfix ui-widget-header" );
17687
17688		// Prevent users from focusing disabled tabs via click
17689		this.tablist
17690			.on( "mousedown" + this.eventNamespace, "> li", function( event ) {
17691				if ( $( this ).is( ".ui-state-disabled" ) ) {
17692					event.preventDefault();
17693				}
17694			} )
17695
17696			// Support: IE <9
17697			// Preventing the default action in mousedown doesn't prevent IE
17698			// from focusing the element, so if the anchor gets focused, blur.
17699			// We don't have to worry about focusing the previously focused
17700			// element since clicking on a non-focusable element should focus
17701			// the body anyway.
17702			.on( "focus" + this.eventNamespace, ".ui-tabs-anchor", function() {
17703				if ( $( this ).closest( "li" ).is( ".ui-state-disabled" ) ) {
17704					this.blur();
17705				}
17706			} );
17707
17708		this.tabs = this.tablist.find( "> li:has(a[href])" )
17709			.attr( {
17710				role: "tab",
17711				tabIndex: -1
17712			} );
17713		this._addClass( this.tabs, "ui-tabs-tab", "ui-state-default" );
17714
17715		this.anchors = this.tabs.map( function() {
17716			return $( "a", this )[ 0 ];
17717		} )
17718			.attr( {
17719				role: "presentation",
17720				tabIndex: -1
17721			} );
17722		this._addClass( this.anchors, "ui-tabs-anchor" );
17723
17724		this.panels = $();
17725
17726		this.anchors.each( function( i, anchor ) {
17727			var selector, panel, panelId,
17728				anchorId = $( anchor ).uniqueId().attr( "id" ),
17729				tab = $( anchor ).closest( "li" ),
17730				originalAriaControls = tab.attr( "aria-controls" );
17731
17732			// Inline tab
17733			if ( that._isLocal( anchor ) ) {
17734				selector = anchor.hash;
17735				panelId = selector.substring( 1 );
17736				panel = that.element.find( that._sanitizeSelector( selector ) );
17737
17738			// remote tab
17739			} else {
17740
17741				// If the tab doesn't already have aria-controls,
17742				// generate an id by using a throw-away element
17743				panelId = tab.attr( "aria-controls" ) || $( {} ).uniqueId()[ 0 ].id;
17744				selector = "#" + panelId;
17745				panel = that.element.find( selector );
17746				if ( !panel.length ) {
17747					panel = that._createPanel( panelId );
17748					panel.insertAfter( that.panels[ i - 1 ] || that.tablist );
17749				}
17750				panel.attr( "aria-live", "polite" );
17751			}
17752
17753			if ( panel.length ) {
17754				that.panels = that.panels.add( panel );
17755			}
17756			if ( originalAriaControls ) {
17757				tab.data( "ui-tabs-aria-controls", originalAriaControls );
17758			}
17759			tab.attr( {
17760				"aria-controls": panelId,
17761				"aria-labelledby": anchorId
17762			} );
17763			panel.attr( "aria-labelledby", anchorId );
17764		} );
17765
17766		this.panels.attr( "role", "tabpanel" );
17767		this._addClass( this.panels, "ui-tabs-panel", "ui-widget-content" );
17768
17769		// Avoid memory leaks (#10056)
17770		if ( prevTabs ) {
17771			this._off( prevTabs.not( this.tabs ) );
17772			this._off( prevAnchors.not( this.anchors ) );
17773			this._off( prevPanels.not( this.panels ) );
17774		}
17775	},
17776
17777	// Allow overriding how to find the list for rare usage scenarios (#7715)
17778	_getList: function() {
17779		return this.tablist || this.element.find( "ol, ul" ).eq( 0 );
17780	},
17781
17782	_createPanel: function( id ) {
17783		return $( "<div>" )
17784			.attr( "id", id )
17785			.data( "ui-tabs-destroy", true );
17786	},
17787
17788	_setOptionDisabled: function( disabled ) {
17789		var currentItem, li, i;
17790
17791		if ( $.isArray( disabled ) ) {
17792			if ( !disabled.length ) {
17793				disabled = false;
17794			} else if ( disabled.length === this.anchors.length ) {
17795				disabled = true;
17796			}
17797		}
17798
17799		// Disable tabs
17800		for ( i = 0; ( li = this.tabs[ i ] ); i++ ) {
17801			currentItem = $( li );
17802			if ( disabled === true || $.inArray( i, disabled ) !== -1 ) {
17803				currentItem.attr( "aria-disabled", "true" );
17804				this._addClass( currentItem, null, "ui-state-disabled" );
17805			} else {
17806				currentItem.removeAttr( "aria-disabled" );
17807				this._removeClass( currentItem, null, "ui-state-disabled" );
17808			}
17809		}
17810
17811		this.options.disabled = disabled;
17812
17813		this._toggleClass( this.widget(), this.widgetFullName + "-disabled", null,
17814			disabled === true );
17815	},
17816
17817	_setupEvents: function( event ) {
17818		var events = {};
17819		if ( event ) {
17820			$.each( event.split( " " ), function( index, eventName ) {
17821				events[ eventName ] = "_eventHandler";
17822			} );
17823		}
17824
17825		this._off( this.anchors.add( this.tabs ).add( this.panels ) );
17826
17827		// Always prevent the default action, even when disabled
17828		this._on( true, this.anchors, {
17829			click: function( event ) {
17830				event.preventDefault();
17831			}
17832		} );
17833		this._on( this.anchors, events );
17834		this._on( this.tabs, { keydown: "_tabKeydown" } );
17835		this._on( this.panels, { keydown: "_panelKeydown" } );
17836
17837		this._focusable( this.tabs );
17838		this._hoverable( this.tabs );
17839	},
17840
17841	_setupHeightStyle: function( heightStyle ) {
17842		var maxHeight,
17843			parent = this.element.parent();
17844
17845		if ( heightStyle === "fill" ) {
17846			maxHeight = parent.height();
17847			maxHeight -= this.element.outerHeight() - this.element.height();
17848
17849			this.element.siblings( ":visible" ).each( function() {
17850				var elem = $( this ),
17851					position = elem.css( "position" );
17852
17853				if ( position === "absolute" || position === "fixed" ) {
17854					return;
17855				}
17856				maxHeight -= elem.outerHeight( true );
17857			} );
17858
17859			this.element.children().not( this.panels ).each( function() {
17860				maxHeight -= $( this ).outerHeight( true );
17861			} );
17862
17863			this.panels.each( function() {
17864				$( this ).height( Math.max( 0, maxHeight -
17865					$( this ).innerHeight() + $( this ).height() ) );
17866			} )
17867				.css( "overflow", "auto" );
17868		} else if ( heightStyle === "auto" ) {
17869			maxHeight = 0;
17870			this.panels.each( function() {
17871				maxHeight = Math.max( maxHeight, $( this ).height( "" ).height() );
17872			} ).height( maxHeight );
17873		}
17874	},
17875
17876	_eventHandler: function( event ) {
17877		var options = this.options,
17878			active = this.active,
17879			anchor = $( event.currentTarget ),
17880			tab = anchor.closest( "li" ),
17881			clickedIsActive = tab[ 0 ] === active[ 0 ],
17882			collapsing = clickedIsActive && options.collapsible,
17883			toShow = collapsing ? $() : this._getPanelForTab( tab ),
17884			toHide = !active.length ? $() : this._getPanelForTab( active ),
17885			eventData = {
17886				oldTab: active,
17887				oldPanel: toHide,
17888				newTab: collapsing ? $() : tab,
17889				newPanel: toShow
17890			};
17891
17892		event.preventDefault();
17893
17894		if ( tab.hasClass( "ui-state-disabled" ) ||
17895
17896				// tab is already loading
17897				tab.hasClass( "ui-tabs-loading" ) ||
17898
17899				// can't switch durning an animation
17900				this.running ||
17901
17902				// click on active header, but not collapsible
17903				( clickedIsActive && !options.collapsible ) ||
17904
17905				// allow canceling activation
17906				( this._trigger( "beforeActivate", event, eventData ) === false ) ) {
17907			return;
17908		}
17909
17910		options.active = collapsing ? false : this.tabs.index( tab );
17911
17912		this.active = clickedIsActive ? $() : tab;
17913		if ( this.xhr ) {
17914			this.xhr.abort();
17915		}
17916
17917		if ( !toHide.length && !toShow.length ) {
17918			$.error( "jQuery UI Tabs: Mismatching fragment identifier." );
17919		}
17920
17921		if ( toShow.length ) {
17922			this.load( this.tabs.index( tab ), event );
17923		}
17924		this._toggle( event, eventData );
17925	},
17926
17927	// Handles show/hide for selecting tabs
17928	_toggle: function( event, eventData ) {
17929		var that = this,
17930			toShow = eventData.newPanel,
17931			toHide = eventData.oldPanel;
17932
17933		this.running = true;
17934
17935		function complete() {
17936			that.running = false;
17937			that._trigger( "activate", event, eventData );
17938		}
17939
17940		function show() {
17941			that._addClass( eventData.newTab.closest( "li" ), "ui-tabs-active", "ui-state-active" );
17942
17943			if ( toShow.length && that.options.show ) {
17944				that._show( toShow, that.options.show, complete );
17945			} else {
17946				toShow.show();
17947				complete();
17948			}
17949		}
17950
17951		// Start out by hiding, then showing, then completing
17952		if ( toHide.length && this.options.hide ) {
17953			this._hide( toHide, this.options.hide, function() {
17954				that._removeClass( eventData.oldTab.closest( "li" ),
17955					"ui-tabs-active", "ui-state-active" );
17956				show();
17957			} );
17958		} else {
17959			this._removeClass( eventData.oldTab.closest( "li" ),
17960				"ui-tabs-active", "ui-state-active" );
17961			toHide.hide();
17962			show();
17963		}
17964
17965		toHide.attr( "aria-hidden", "true" );
17966		eventData.oldTab.attr( {
17967			"aria-selected": "false",
17968			"aria-expanded": "false"
17969		} );
17970
17971		// If we're switching tabs, remove the old tab from the tab order.
17972		// If we're opening from collapsed state, remove the previous tab from the tab order.
17973		// If we're collapsing, then keep the collapsing tab in the tab order.
17974		if ( toShow.length && toHide.length ) {
17975			eventData.oldTab.attr( "tabIndex", -1 );
17976		} else if ( toShow.length ) {
17977			this.tabs.filter( function() {
17978				return $( this ).attr( "tabIndex" ) === 0;
17979			} )
17980				.attr( "tabIndex", -1 );
17981		}
17982
17983		toShow.attr( "aria-hidden", "false" );
17984		eventData.newTab.attr( {
17985			"aria-selected": "true",
17986			"aria-expanded": "true",
17987			tabIndex: 0
17988		} );
17989	},
17990
17991	_activate: function( index ) {
17992		var anchor,
17993			active = this._findActive( index );
17994
17995		// Trying to activate the already active panel
17996		if ( active[ 0 ] === this.active[ 0 ] ) {
17997			return;
17998		}
17999
18000		// Trying to collapse, simulate a click on the current active header
18001		if ( !active.length ) {
18002			active = this.active;
18003		}
18004
18005		anchor = active.find( ".ui-tabs-anchor" )[ 0 ];
18006		this._eventHandler( {
18007			target: anchor,
18008			currentTarget: anchor,
18009			preventDefault: $.noop
18010		} );
18011	},
18012
18013	_findActive: function( index ) {
18014		return index === false ? $() : this.tabs.eq( index );
18015	},
18016
18017	_getIndex: function( index ) {
18018
18019		// meta-function to give users option to provide a href string instead of a numerical index.
18020		if ( typeof index === "string" ) {
18021			index = this.anchors.index( this.anchors.filter( "[href$='" +
18022				$.ui.escapeSelector( index ) + "']" ) );
18023		}
18024
18025		return index;
18026	},
18027
18028	_destroy: function() {
18029		if ( this.xhr ) {
18030			this.xhr.abort();
18031		}
18032
18033		this.tablist
18034			.removeAttr( "role" )
18035			.off( this.eventNamespace );
18036
18037		this.anchors
18038			.removeAttr( "role tabIndex" )
18039			.removeUniqueId();
18040
18041		this.tabs.add( this.panels ).each( function() {
18042			if ( $.data( this, "ui-tabs-destroy" ) ) {
18043				$( this ).remove();
18044			} else {
18045				$( this ).removeAttr( "role tabIndex " +
18046					"aria-live aria-busy aria-selected aria-labelledby aria-hidden aria-expanded" );
18047			}
18048		} );
18049
18050		this.tabs.each( function() {
18051			var li = $( this ),
18052				prev = li.data( "ui-tabs-aria-controls" );
18053			if ( prev ) {
18054				li
18055					.attr( "aria-controls", prev )
18056					.removeData( "ui-tabs-aria-controls" );
18057			} else {
18058				li.removeAttr( "aria-controls" );
18059			}
18060		} );
18061
18062		this.panels.show();
18063
18064		if ( this.options.heightStyle !== "content" ) {
18065			this.panels.css( "height", "" );
18066		}
18067	},
18068
18069	enable: function( index ) {
18070		var disabled = this.options.disabled;
18071		if ( disabled === false ) {
18072			return;
18073		}
18074
18075		if ( index === undefined ) {
18076			disabled = false;
18077		} else {
18078			index = this._getIndex( index );
18079			if ( $.isArray( disabled ) ) {
18080				disabled = $.map( disabled, function( num ) {
18081					return num !== index ? num : null;
18082				} );
18083			} else {
18084				disabled = $.map( this.tabs, function( li, num ) {
18085					return num !== index ? num : null;
18086				} );
18087			}
18088		}
18089		this._setOptionDisabled( disabled );
18090	},
18091
18092	disable: function( index ) {
18093		var disabled = this.options.disabled;
18094		if ( disabled === true ) {
18095			return;
18096		}
18097
18098		if ( index === undefined ) {
18099			disabled = true;
18100		} else {
18101			index = this._getIndex( index );
18102			if ( $.inArray( index, disabled ) !== -1 ) {
18103				return;
18104			}
18105			if ( $.isArray( disabled ) ) {
18106				disabled = $.merge( [ index ], disabled ).sort();
18107			} else {
18108				disabled = [ index ];
18109			}
18110		}
18111		this._setOptionDisabled( disabled );
18112	},
18113
18114	load: function( index, event ) {
18115		index = this._getIndex( index );
18116		var that = this,
18117			tab = this.tabs.eq( index ),
18118			anchor = tab.find( ".ui-tabs-anchor" ),
18119			panel = this._getPanelForTab( tab ),
18120			eventData = {
18121				tab: tab,
18122				panel: panel
18123			},
18124			complete = function( jqXHR, status ) {
18125				if ( status === "abort" ) {
18126					that.panels.stop( false, true );
18127				}
18128
18129				that._removeClass( tab, "ui-tabs-loading" );
18130				panel.removeAttr( "aria-busy" );
18131
18132				if ( jqXHR === that.xhr ) {
18133					delete that.xhr;
18134				}
18135			};
18136
18137		// Not remote
18138		if ( this._isLocal( anchor[ 0 ] ) ) {
18139			return;
18140		}
18141
18142		this.xhr = $.ajax( this._ajaxSettings( anchor, event, eventData ) );
18143
18144		// Support: jQuery <1.8
18145		// jQuery <1.8 returns false if the request is canceled in beforeSend,
18146		// but as of 1.8, $.ajax() always returns a jqXHR object.
18147		if ( this.xhr && this.xhr.statusText !== "canceled" ) {
18148			this._addClass( tab, "ui-tabs-loading" );
18149			panel.attr( "aria-busy", "true" );
18150
18151			this.xhr
18152				.done( function( response, status, jqXHR ) {
18153
18154					// support: jQuery <1.8
18155					// http://bugs.jquery.com/ticket/11778
18156					setTimeout( function() {
18157						panel.html( response );
18158						that._trigger( "load", event, eventData );
18159
18160						complete( jqXHR, status );
18161					}, 1 );
18162				} )
18163				.fail( function( jqXHR, status ) {
18164
18165					// support: jQuery <1.8
18166					// http://bugs.jquery.com/ticket/11778
18167					setTimeout( function() {
18168						complete( jqXHR, status );
18169					}, 1 );
18170				} );
18171		}
18172	},
18173
18174	_ajaxSettings: function( anchor, event, eventData ) {
18175		var that = this;
18176		return {
18177
18178			// Support: IE <11 only
18179			// Strip any hash that exists to prevent errors with the Ajax request
18180			url: anchor.attr( "href" ).replace( /#.*$/, "" ),
18181			beforeSend: function( jqXHR, settings ) {
18182				return that._trigger( "beforeLoad", event,
18183					$.extend( { jqXHR: jqXHR, ajaxSettings: settings }, eventData ) );
18184			}
18185		};
18186	},
18187
18188	_getPanelForTab: function( tab ) {
18189		var id = $( tab ).attr( "aria-controls" );
18190		return this.element.find( this._sanitizeSelector( "#" + id ) );
18191	}
18192} );
18193
18194// DEPRECATED
18195// TODO: Switch return back to widget declaration at top of file when this is removed
18196if ( $.uiBackCompat !== false ) {
18197
18198	// Backcompat for ui-tab class (now ui-tabs-tab)
18199	$.widget( "ui.tabs", $.ui.tabs, {
18200		_processTabs: function() {
18201			this._superApply( arguments );
18202			this._addClass( this.tabs, "ui-tab" );
18203		}
18204	} );
18205}
18206
18207var widgetsTabs = $.ui.tabs;
18208
18209
18210/*!
18211 * jQuery UI Tooltip 1.12.1
18212 * http://jqueryui.com
18213 *
18214 * Copyright jQuery Foundation and other contributors
18215 * Released under the MIT license.
18216 * http://jquery.org/license
18217 */
18218
18219//>>label: Tooltip
18220//>>group: Widgets
18221//>>description: Shows additional information for any element on hover or focus.
18222//>>docs: http://api.jqueryui.com/tooltip/
18223//>>demos: http://jqueryui.com/tooltip/
18224//>>css.structure: ../../themes/base/core.css
18225//>>css.structure: ../../themes/base/tooltip.css
18226//>>css.theme: ../../themes/base/theme.css
18227
18228
18229
18230$.widget( "ui.tooltip", {
18231	version: "1.12.1",
18232	options: {
18233		classes: {
18234			"ui-tooltip": "ui-corner-all ui-widget-shadow"
18235		},
18236		content: function() {
18237
18238			// support: IE<9, Opera in jQuery <1.7
18239			// .text() can't accept undefined, so coerce to a string
18240			var title = $( this ).attr( "title" ) || "";
18241
18242			// Escape title, since we're going from an attribute to raw HTML
18243			return $( "<a>" ).text( title ).html();
18244		},
18245		hide: true,
18246
18247		// Disabled elements have inconsistent behavior across browsers (#8661)
18248		items: "[title]:not([disabled])",
18249		position: {
18250			my: "left top+15",
18251			at: "left bottom",
18252			collision: "flipfit flip"
18253		},
18254		show: true,
18255		track: false,
18256
18257		// Callbacks
18258		close: null,
18259		open: null
18260	},
18261
18262	_addDescribedBy: function( elem, id ) {
18263		var describedby = ( elem.attr( "aria-describedby" ) || "" ).split( /\s+/ );
18264		describedby.push( id );
18265		elem
18266			.data( "ui-tooltip-id", id )
18267			.attr( "aria-describedby", $.trim( describedby.join( " " ) ) );
18268	},
18269
18270	_removeDescribedBy: function( elem ) {
18271		var id = elem.data( "ui-tooltip-id" ),
18272			describedby = ( elem.attr( "aria-describedby" ) || "" ).split( /\s+/ ),
18273			index = $.inArray( id, describedby );
18274
18275		if ( index !== -1 ) {
18276			describedby.splice( index, 1 );
18277		}
18278
18279		elem.removeData( "ui-tooltip-id" );
18280		describedby = $.trim( describedby.join( " " ) );
18281		if ( describedby ) {
18282			elem.attr( "aria-describedby", describedby );
18283		} else {
18284			elem.removeAttr( "aria-describedby" );
18285		}
18286	},
18287
18288	_create: function() {
18289		this._on( {
18290			mouseover: "open",
18291			focusin: "open"
18292		} );
18293
18294		// IDs of generated tooltips, needed for destroy
18295		this.tooltips = {};
18296
18297		// IDs of parent tooltips where we removed the title attribute
18298		this.parents = {};
18299
18300		// Append the aria-live region so tooltips announce correctly
18301		this.liveRegion = $( "<div>" )
18302			.attr( {
18303				role: "log",
18304				"aria-live": "assertive",
18305				"aria-relevant": "additions"
18306			} )
18307			.appendTo( this.document[ 0 ].body );
18308		this._addClass( this.liveRegion, null, "ui-helper-hidden-accessible" );
18309
18310		this.disabledTitles = $( [] );
18311	},
18312
18313	_setOption: function( key, value ) {
18314		var that = this;
18315
18316		this._super( key, value );
18317
18318		if ( key === "content" ) {
18319			$.each( this.tooltips, function( id, tooltipData ) {
18320				that._updateContent( tooltipData.element );
18321			} );
18322		}
18323	},
18324
18325	_setOptionDisabled: function( value ) {
18326		this[ value ? "_disable" : "_enable" ]();
18327	},
18328
18329	_disable: function() {
18330		var that = this;
18331
18332		// Close open tooltips
18333		$.each( this.tooltips, function( id, tooltipData ) {
18334			var event = $.Event( "blur" );
18335			event.target = event.currentTarget = tooltipData.element[ 0 ];
18336			that.close( event, true );
18337		} );
18338
18339		// Remove title attributes to prevent native tooltips
18340		this.disabledTitles = this.disabledTitles.add(
18341			this.element.find( this.options.items ).addBack()
18342				.filter( function() {
18343					var element = $( this );
18344					if ( element.is( "[title]" ) ) {
18345						return element
18346							.data( "ui-tooltip-title", element.attr( "title" ) )
vendor: 4,119 bytes, lines 18347-18482
18347							.removeAttr( "title" );
18348					}
18349				} )
18350		);
18351	},
18352
18353	_enable: function() {
18354
18355		// restore title attributes
18356		this.disabledTitles.each( function() {
18357			var element = $( this );
18358			if ( element.data( "ui-tooltip-title" ) ) {
18359				element.attr( "title", element.data( "ui-tooltip-title" ) );
18360			}
18361		} );
18362		this.disabledTitles = $( [] );
18363	},
18364
18365	open: function( event ) {
18366		var that = this,
18367			target = $( event ? event.target : this.element )
18368
18369				// we need closest here due to mouseover bubbling,
18370				// but always pointing at the same event target
18371				.closest( this.options.items );
18372
18373		// No element to show a tooltip for or the tooltip is already open
18374		if ( !target.length || target.data( "ui-tooltip-id" ) ) {
18375			return;
18376		}
18377
18378		if ( target.attr( "title" ) ) {
18379			target.data( "ui-tooltip-title", target.attr( "title" ) );
18380		}
18381
18382		target.data( "ui-tooltip-open", true );
18383
18384		// Kill parent tooltips, custom or native, for hover
18385		if ( event && event.type === "mouseover" ) {
18386			target.parents().each( function() {
18387				var parent = $( this ),
18388					blurEvent;
18389				if ( parent.data( "ui-tooltip-open" ) ) {
18390					blurEvent = $.Event( "blur" );
18391					blurEvent.target = blurEvent.currentTarget = this;
18392					that.close( blurEvent, true );
18393				}
18394				if ( parent.attr( "title" ) ) {
18395					parent.uniqueId();
18396					that.parents[ this.id ] = {
18397						element: this,
18398						title: parent.attr( "title" )
18399					};
18400					parent.attr( "title", "" );
18401				}
18402			} );
18403		}
18404
18405		this._registerCloseHandlers( event, target );
18406		this._updateContent( target, event );
18407	},
18408
18409	_updateContent: function( target, event ) {
18410		var content,
18411			contentOption = this.options.content,
18412			that = this,
18413			eventType = event ? event.type : null;
18414
18415		if ( typeof contentOption === "string" || contentOption.nodeType ||
18416				contentOption.jquery ) {
18417			return this._open( event, target, contentOption );
18418		}
18419
18420		content = contentOption.call( target[ 0 ], function( response ) {
18421
18422			// IE may instantly serve a cached response for ajax requests
18423			// delay this call to _open so the other call to _open runs first
18424			that._delay( function() {
18425
18426				// Ignore async response if tooltip was closed already
18427				if ( !target.data( "ui-tooltip-open" ) ) {
18428					return;
18429				}
18430
18431				// JQuery creates a special event for focusin when it doesn't
18432				// exist natively. To improve performance, the native event
18433				// object is reused and the type is changed. Therefore, we can't
18434				// rely on the type being correct after the event finished
18435				// bubbling, so we set it back to the previous value. (#8740)
18436				if ( event ) {
18437					event.type = eventType;
18438				}
18439				this._open( event, target, response );
18440			} );
18441		} );
18442		if ( content ) {
18443			this._open( event, target, content );
18444		}
18445	},
18446
18447	_open: function( event, target, content ) {
18448		var tooltipData, tooltip, delayedShow, a11yContent,
18449			positionOption = $.extend( {}, this.options.position );
18450
18451		if ( !content ) {
18452			return;
18453		}
18454
18455		// Content can be updated multiple times. If the tooltip already
18456		// exists, then just update the content and bail.
18457		tooltipData = this._find( target );
18458		if ( tooltipData ) {
18459			tooltipData.tooltip.find( ".ui-tooltip-content" ).html( content );
18460			return;
18461		}
18462
18463		// If we have a title, clear it to prevent the native tooltip
18464		// we have to check first to avoid defining a title if none exists
18465		// (we don't want to cause an element to start matching [title])
18466		//
18467		// We use removeAttr only for key events, to allow IE to export the correct
18468		// accessible attributes. For mouse events, set to empty string to avoid
18469		// native tooltip showing up (happens only when removing inside mouseover).
18470		if ( target.is( "[title]" ) ) {
18471			if ( event && event.type === "mouseover" ) {
18472				target.attr( "title", "" );
18473			} else {
18474				target.removeAttr( "title" );
18475			}
18476		}
18477
18478		tooltipData = this._tooltip( target );
18479		tooltip = tooltipData.tooltip;
18480		this._addDescribedBy( target, tooltip.attr( "id" ) );
18481		tooltip.find( ".ui-tooltip-content" ).html( content );
18482
18483		// Support: Voiceover on OS X, JAWS on IE <= 9
18484		// JAWS announces deletions even when aria-relevant="additions"
18485		// Voiceover will sometimes re-read the entire log region's contents from the beginning
18486		this.liveRegion.children().hide();
18487		a11yContent = $( "<div>" ).html( tooltip.find( ".ui-tooltip-content" ).html() );
18488		a11yContent.removeAttr( "name" ).find( "[name]" ).removeAttr( "name" );
18489		a11yContent.removeAttr( "id" ).find( "[id]" ).removeAttr( "id" );
18490		a11yContent.appendTo( this.liveRegion );
18491
18492		function position( event ) {
18493			positionOption.of = event;
18494			if ( tooltip.is( ":hidden" ) ) {
18495				return;
18496			}
18497			tooltip.position( positionOption );
18498		}
18499		if ( this.options.track && event && /^mouse/.test( event.type ) ) {
18500			this._on( this.document, {
18501				mousemove: position
18502			} );
18503
18504			// trigger once to override element-relative positioning
18505			position( event );
18506		} else {
18507			tooltip.position( $.extend( {
18508				of: target
18509			}, this.options.position ) );
18510		}
18511
18512		tooltip.hide();
18513
18514		this._show( tooltip, this.options.show );
18515
18516		// Handle tracking tooltips that are shown with a delay (#8644). As soon
18517		// as the tooltip is visible, position the tooltip using the most recent
18518		// event.
18519		// Adds the check to add the timers only when both delay and track options are set (#14682)
18520		if ( this.options.track && this.options.show && this.options.show.delay ) {
18521			delayedShow = this.delayedShow = setInterval( function() {
18522				if ( tooltip.is( ":visible" ) ) {
18523					position( positionOption.of );
18524					clearInterval( delayedShow );
18525				}
18526			}, $.fx.interval );
18527		}
18528
18529		this._trigger( "open", event, { tooltip: tooltip } );
18530	},
18531
18532	_registerCloseHandlers: function( event, target ) {
18533		var events = {
18534			keyup: function( event ) {
18535				if ( event.keyCode === $.ui.keyCode.ESCAPE ) {
18536					var fakeEvent = $.Event( event );
18537					fakeEvent.currentTarget = target[ 0 ];
18538					this.close( fakeEvent, true );
18539				}
18540			}
18541		};
18542
18543		// Only bind remove handler for delegated targets. Non-delegated
18544		// tooltips will handle this in destroy.
18545		if ( target[ 0 ] !== this.element[ 0 ] ) {
18546			events.remove = function() {
18547				this._removeTooltip( this._find( target ).tooltip );
18548			};
18549		}
18550
18551		if ( !event || event.type === "mouseover" ) {
18552			events.mouseleave = "close";
18553		}
18554		if ( !event || event.type === "focusin" ) {
18555			events.focusout = "close";
18556		}
18557		this._on( true, target, events );
18558	},
18559
18560	close: function( event ) {
18561		var tooltip,
18562			that = this,
18563			target = $( event ? event.currentTarget : this.element ),
18564			tooltipData = this._find( target );
18565
18566		// The tooltip may already be closed
18567		if ( !tooltipData ) {
18568
18569			// We set ui-tooltip-open immediately upon open (in open()), but only set the
18570			// additional data once there's actually content to show (in _open()). So even if the
18571			// tooltip doesn't have full data, we always remove ui-tooltip-open in case we're in
18572			// the period between open() and _open().
18573			target.removeData( "ui-tooltip-open" );
18574			return;
18575		}
18576
18577		tooltip = tooltipData.tooltip;
18578
18579		// Disabling closes the tooltip, so we need to track when we're closing
18580		// to avoid an infinite loop in case the tooltip becomes disabled on close
18581		if ( tooltipData.closing ) {
18582			return;
18583		}
18584
18585		// Clear the interval for delayed tracking tooltips
18586		clearInterval( this.delayedShow );
18587
18588		// Only set title if we had one before (see comment in _open())
18589		// If the title attribute has changed since open(), don't restore
18590		if ( target.data( "ui-tooltip-title" ) && !target.attr( "title" ) ) {
18591			target.attr( "title", target.data( "ui-tooltip-title" ) );
18592		}
18593
18594		this._removeDescribedBy( target );
18595
18596		tooltipData.hiding = true;
18597		tooltip.stop( true );
18598		this._hide( tooltip, this.options.hide, function() {
18599			that._removeTooltip( $( this ) );
18600		} );
18601
18602		target.removeData( "ui-tooltip-open" );
18603		this._off( target, "mouseleave focusout keyup" );
18604
18605		// Remove 'remove' binding only on delegated targets
18606		if ( target[ 0 ] !== this.element[ 0 ] ) {
18607			this._off( target, "remove" );
18608		}
18609		this._off( this.document, "mousemove" );
18610
18611		if ( event && event.type === "mouseleave" ) {
18612			$.each( this.parents, function( id, parent ) {
18613				$( parent.element ).attr( "title", parent.title );
18614				delete that.parents[ id ];
18615			} );
18616		}
18617
18618		tooltipData.closing = true;
18619		this._trigger( "close", event, { tooltip: tooltip } );
18620		if ( !tooltipData.hiding ) {
18621			tooltipData.closing = false;
18622		}
18623	},
18624
18625	_tooltip: function( element ) {
18626		var tooltip = $( "<div>" ).attr( "role", "tooltip" ),
18627			content = $( "<div>" ).appendTo( tooltip ),
18628			id = tooltip.uniqueId().attr( "id" );
18629
18630		this._addClass( content, "ui-tooltip-content" );
18631		this._addClass( tooltip, "ui-tooltip", "ui-widget ui-widget-content" );
18632
18633		tooltip.appendTo( this._appendTo( element ) );
18634
18635		return this.tooltips[ id ] = {
18636			element: element,
18637			tooltip: tooltip
18638		};
18639	},
18640
18641	_find: function( target ) {
18642		var id = target.data( "ui-tooltip-id" );
18643		return id ? this.tooltips[ id ] : null;
18644	},
18645
18646	_removeTooltip: function( tooltip ) {
18647		tooltip.remove();
18648		delete this.tooltips[ tooltip.attr( "id" ) ];
18649	},
18650
18651	_appendTo: function( target ) {
18652		var element = target.closest( ".ui-front, dialog" );
18653
18654		if ( !element.length ) {
18655			element = this.document[ 0 ].body;
18656		}
18657
18658		return element;
18659	},
18660
18661	_destroy: function() {
18662		var that = this;
18663
18664		// Close open tooltips
18665		$.each( this.tooltips, function( id, tooltipData ) {
18666
18667			// Delegate to close method to handle common cleanup
18668			var event = $.Event( "blur" ),
18669				element = tooltipData.element;
18670			event.target = event.currentTarget = element[ 0 ];
18671			that.close( event, true );
18672
18673			// Remove immediately; destroying an open tooltip doesn't use the
18674			// hide animation
18675			$( "#" + id ).remove();
18676
18677			// Restore the title
18678			if ( element.data( "ui-tooltip-title" ) ) {
18679
18680				// If the title attribute has changed since open(), don't restore
18681				if ( !element.attr( "title" ) ) {
18682					element.attr( "title", element.data( "ui-tooltip-title" ) );
18683				}
18684				element.removeData( "ui-tooltip-title" );
18685			}
18686		} );
18687		this.liveRegion.remove();
18688	}
18689} );
18690
18691// DEPRECATED
18692// TODO: Switch return back to widget declaration at top of file when this is removed
18693if ( $.uiBackCompat !== false ) {
18694
18695	// Backcompat for tooltipClass option
18696	$.widget( "ui.tooltip", $.ui.tooltip, {
18697		options: {
18698			tooltipClass: null
18699		},
18700		_tooltip: function() {
18701			var tooltipData = this._superApply( arguments );
18702			if ( this.options.tooltipClass ) {
18703				tooltipData.tooltip.addClass( this.options.tooltipClass );
18704			}
18705			return tooltipData;
18706		}
18707	} );
18708}
18709
18710var widgetsTooltip = $.ui.tooltip;
18711
18712
18713
18714
18715}));;
18716(function(a){a.isScrollToFixed=function(b){return !!a(b).data("ScrollToFixed")};a.ScrollToFixed=function(d,i){var m=this;m.$el=a(d);m.el=d;m.$el.data("ScrollToFixed",m);var c=false;var H=m.$el;var I;var F;var k;var e;var z;var E=0;var r=0;var j=-1;var f=-1;var u=null;var A;var g;function v(){H.trigger("preUnfixed.ScrollToFixed");l();H.trigger("unfixed.ScrollToFixed");f=-1;E=H.offset().top;r=H.offset().left;if(m.options.offsets){r+=(H.offset().left-H.position().left)}if(j==-1){j=r}I=H.css("position");c=true;if(m.options.bottom!=-1){H.trigger("preFixed.ScrollToFixed");x();H.trigger("fixed.ScrollToFixed")}}function o(){var J=m.options.limit;if(!J){return 0}if(typeof(J)==="function"){return J.apply(H)}return J}function q(){return I==="fixed"}function y(){return I==="absolute"}function h(){return !(q()||y())}function x(){if(!q()){var J=H[0].getBoundingClientRect();u.css({display:H.css("display"),width:J.width,height:J.height,"float":H.css("float")});cssOptions={"z-index":m.options.zIndex,position:"fixed",top:m.options.bottom==-1?t():"",bottom:m.options.bottom==-1?"":m.options.bottom,"margin-left":"0px"};if(!m.options.dontSetWidth){cssOptions.width=H.css("width")}H.css(cssOptions);H.addClass(m.options.baseClassName);if(m.options.className){H.addClass(m.options.className)}I="fixed"}}function b(){var K=o();var J=r;if(m.options.removeOffsets){J="";K=K-E}cssOptions={position:"absolute",top:K,left:J,"margin-left":"0px",bottom:""};if(!m.options.dontSetWidth){cssOptions.width=H.css("width")}H.css(cssOptions);I="absolute"}function l(){if(!h()){f=-1;u.css("display","none");H.css({"z-index":z,width:"",position:F,left:"",top:e,"margin-left":""});H.removeClass("scroll-to-fixed-fixed");
vendor: 4,160 bytes, line 18716
18716if(m.options.className){H.removeClass(m.options.className)}I=null}}function w(J){if(J!=f){H.css("left",r-J);f=J}}function t(){var J=m.options.marginTop;if(!J){return 0}if(typeof(J)==="function"){return J.apply(H)}return J}function B(){if(!a.isScrollToFixed(H)||H.is(":hidden")){return}var M=c;var L=h();if(!c){v()}else{if(h()){E=H.offset().top;r=H.offset().left}}var J=a(window).scrollLeft();var N=a(window).scrollTop();var K=o();if(m.options.minWidth&&a(window).width()<m.options.minWidth){if(!h()||!M){p();H.trigger("preUnfixed.ScrollToFixed");l();H.trigger("unfixed.ScrollToFixed")}}else{if(m.options.maxWidth&&a(window).width()>m.options.maxWidth){if(!h()||!M){p();H.trigger("preUnfixed.ScrollToFixed");l();H.trigger("unfixed.ScrollToFixed")}}else{if(m.options.bottom==-1){if(K>0&&N>=K-t()){if(!L&&(!y()||!M)){p();H.trigger("preAbsolute.ScrollToFixed");b();H.trigger("unfixed.ScrollToFixed")}}else{if(N>=E-t()){if(!q()||!M){p();H.trigger("preFixed.ScrollToFixed");x();f=-1;H.trigger("fixed.ScrollToFixed")}w(J)}else{if(!h()||!M){p();H.trigger("preUnfixed.ScrollToFixed");l();H.trigger("unfixed.ScrollToFixed")}}}}else{if(K>0){if(N+a(window).height()-H.outerHeight(true)>=K-(t()||-n())){if(q()){p();H.trigger("preUnfixed.ScrollToFixed");if(F==="absolute"){b()}else{l()}H.trigger("unfixed.ScrollToFixed")}}else{if(!q()){p();H.trigger("preFixed.ScrollToFixed");x()}w(J);H.trigger("fixed.ScrollToFixed")}}else{w(J)}}}}}function n(){if(!m.options.bottom){return 0}return m.options.bottom}function p(){var J=H.css("position");if(J=="absolute"){H.trigger("postAbsolute.ScrollToFixed")}else{if(J=="fixed"){H.trigger("postFixed.ScrollToFixed")}else{H.trigger("postUnfixed.ScrollToFixed")}}}var D=function(J){if(H.is(":visible")){c=false;B()}else{l()}};var G=function(J){(!!window.requestAnimationFrame)?requestAnimationFrame(B):B()};var C=function(){var K=document.body;if(document.createElement&&K&&K.appendChild&&K.removeChild){var M=document.createElement("div");if(!M.getBoundingClientRect){return null}M.innerHTML="x";M.style.cssText="position:fixed;top:100px;";K.appendChild(M);var N=K.style.height,O=K.scrollTop;K.style.height="3000px";K.scrollTop=500;var J=M.getBoundingClientRect().top;K.style.height=N;var L=(J===100);K.removeChild(M);K.scrollTop=O;return L}return null};var s=function(J){J=J||window.event;if(J.preventDefault){J.preventDefault()}J.returnValue=false};m.init=function(){m.options=a.extend({},a.ScrollToFixed.defaultOptions,i);z=H.css("z-index");m.$el.css("z-index",m.options.zIndex);u=a("<div />");I=H.css("position");F=H.css("position");k=H.css("float");e=H.css("top");if(h()){m.$el.after(u)}a(window).bind("resize.ScrollToFixed",D);a(window).bind("scroll.ScrollToFixed",G);if("ontouchmove" in window){a(window).bind("touchmove.ScrollToFixed",B)}if(m.options.preFixed){H.bind("preFixed.ScrollToFixed",m.options.preFixed)}if(m.options.postFixed){H.bind("postFixed.ScrollToFixed",m.options.postFixed)}if(m.options.preUnfixed){H.bind("preUnfixed.ScrollToFixed",m.options.preUnfixed)}if(m.options.postUnfixed){H.bind("postUnfixed.ScrollToFixed",m.options.postUnfixed)}if(m.options.preAbsolute){H.bind("preAbsolute.ScrollToFixed",m.options.preAbsolute)}if(m.options.postAbsolute){H.bind("postAbsolute.ScrollToFixed",m.options.postAbsolute)}if(m.options.fixed){H.bind("fixed.ScrollToFixed",m.options.fixed)}if(m.options.unfixed){H.bind("unfixed.ScrollToFixed",m.options.unfixed)}if(m.options.spacerClass){u.addClass(m.options.spacerClass)}H.bind("resize.ScrollToFixed",function(){u.height(H.height())});H.bind("scroll.ScrollToFixed",function(){H.trigger("preUnfixed.ScrollToFixed");l();H.trigger("unfixed.ScrollToFixed");B()});H.bind("detach.ScrollToFixed",function(J){s(J);H.trigger("preUnfixed.ScrollToFixed");l();H.trigger("unfixed.ScrollToFixed");a(window).unbind("resize.ScrollToFixed",D);a(window).unbind("scroll.ScrollToFixed",G);H.unbind(".ScrollToFixed");u.remove();m.$el.removeData("ScrollToFixed")});D()};m.init()};a.ScrollToFixed.defaultOptions={marginTop:0,limit:0,bottom:-1,zIndex:1000,baseClassName:"scroll-to-fixed-fixed"};a.fn.scrollToFixed=function(b){return this.each(function(){(new a.ScrollToFixed(this,b))})}})(jQuery);;
vendor: 37,045 bytes, lines 18717-18723
18717/*!
18718 * Bootstrap v3.3.7 (http://getbootstrap.com)
18719 * Copyright 2011-2016 Twitter, Inc.
18720 * Licensed under the MIT license
18721 */
18722if("undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");+function(a){"use strict";var b=a.fn.jquery.split(" ")[0].split(".");if(b[0]<2&&b[1]<9||1==b[0]&&9==b[1]&&b[2]<1||b[0]>3)throw new Error("Bootstrap's JavaScript requires jQuery version 1.9.1 or higher, but lower than version 4")}(jQuery),+function(a){"use strict";function b(){var a=document.createElement("bootstrap"),b={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var c in b)if(void 0!==a.style[c])return{end:b[c]};return!1}a.fn.emulateTransitionEnd=function(b){var c=!1,d=this;a(this).one("bsTransitionEnd",function(){c=!0});var e=function(){c||a(d).trigger(a.support.transition.end)};return setTimeout(e,b),this},a(function(){a.support.transition=b(),a.support.transition&&(a.event.special.bsTransitionEnd={bindType:a.support.transition.end,delegateType:a.support.transition.end,handle:function(b){if(a(b.target).is(this))return b.handleObj.handler.apply(this,arguments)}})})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var c=a(this),e=c.data("bs.alert");e||c.data("bs.alert",e=new d(this)),"string"==typeof b&&e[b].call(c)})}var c='[data-dismiss="alert"]',d=function(b){a(b).on("click",c,this.close)};d.VERSION="3.3.7",d.TRANSITION_DURATION=150,d.prototype.close=function(b){function c(){g.detach().trigger("closed.bs.alert").remove()}var e=a(this),f=e.attr("data-target");f||(f=e.attr("href"),f=f&&f.replace(/.*(?=#[^\s]*$)/,""));var g=a("#"===f?[]:f);b&&b.preventDefault(),g.length||(g=e.closest(".alert")),g.trigger(b=a.Event("close.bs.alert")),b.isDefaultPrevented()||(g.removeClass("in"),a.support.transition&&g.hasClass("fade")?g.one("bsTransitionEnd",c).emulateTransitionEnd(d.TRANSITION_DURATION):c())};var e=a.fn.alert;a.fn.alert=b,a.fn.alert.Constructor=d,a.fn.alert.noConflict=function(){return a.fn.alert=e,this},a(document).on("click.bs.alert.data-api",c,d.prototype.close)}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.button"),f="object"==typeof b&&b;e||d.data("bs.button",e=new c(this,f)),"toggle"==b?e.toggle():b&&e.setState(b)})}var c=function(b,d){this.$element=a(b),this.options=a.extend({},c.DEFAULTS,d),this.isLoading=!1};c.VERSION="3.3.7",c.DEFAULTS={loadingText:"loading..."},c.prototype.setState=function(b){var c="disabled",d=this.$element,e=d.is("input")?"val":"html",f=d.data();b+="Text",null==f.resetText&&d.data("resetText",d[e]()),setTimeout(a.proxy(function(){d[e](null==f[b]?this.options[b]:f[b]),"loadingText"==b?(this.isLoading=!0,d.addClass(c).attr(c,c).prop(c,!0)):this.isLoading&&(this.isLoading=!1,d.removeClass(c).removeAttr(c).prop(c,!1))},this),0)},c.prototype.toggle=function(){var a=!0,b=this.$element.closest('[data-toggle="buttons"]');if(b.length){var c=this.$element.find("input");"radio"==c.prop("type")?(c.prop("checked")&&(a=!1),b.find(".active").removeClass("active"),this.$element.addClass("active")):"checkbox"==c.prop("type")&&(c.prop("checked")!==this.$element.hasClass("active")&&(a=!1),this.$element.toggleClass("active")),c.prop("checked",this.$element.hasClass("active")),a&&c.trigger("change")}else this.$element.attr("aria-pressed",!this.$element.hasClass("active")),this.$element.toggleClass("active")};var d=a.fn.button;a.fn.button=b,a.fn.button.Constructor=c,a.fn.button.noConflict=function(){return a.fn.button=d,this},a(document).on("click.bs.button.data-api",'[data-toggle^="button"]',function(c){var d=a(c.target).closest(".btn");b.call(d,"toggle"),a(c.target).is('input[type="radio"], input[type="checkbox"]')||(c.preventDefault(),d.is("input,button")?d.trigger("focus"):d.find("input:visible,button:visible").first().trigger("focus"))}).on("focus.bs.button.data-api blur.bs.button.data-api",'[data-toggle^="button"]',function(b){a(b.target).closest(".btn").toggleClass("focus",/^focus(in)?$/.test(b.type))})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.carousel"),f=a.extend({},c.DEFAULTS,d.data(),"object"==typeof b&&b),g="string"==typeof b?b:f.slide;e||d.data("bs.carousel",e=new c(this,f)),"number"==typeof b?e.to(b):g?e[g]():f.interval&&e.pause().cycle()})}var c=function(b,c){this.$element=a(b),this.$indicators=this.$element.find(".carousel-indicators"),this.options=c,this.paused=null,this.sliding=null,this.interval=null,this.$active=null,this.$items=null,this.options.keyboard&&this.$element.on("keydown.bs.carousel",a.proxy(this.keydown,this)),"hover"==this.options.pause&&!("ontouchstart"in document.documentElement)&&this.$element.on("mouseenter.bs.carousel",a.proxy(this.pause,this)).on("mouseleave.bs.carousel",a.proxy(this.cycle,this))};c.VERSION="3.3.7",c.TRANSITION_DURATION=600,c.DEFAULTS={interval:5e3,pause:"hover",wrap:!0,keyboard:!0},c.prototype.keydown=function(a){if(!/input|textarea/i.test(a.target.tagName)){switch(a.which){case 37:this.prev();break;case 39:this.next();break;default:return}a.preventDefault()}},c.prototype.cycle=function(b){return b||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(a.proxy(this.next,this),this.options.interval)),this},c.prototype.getItemIndex=function(a){return this.$items=a.parent().children(".item"),this.$items.index(a||this.$active)},c.prototype.getItemForDirection=function(a,b){var c=this.getItemIndex(b),d="prev"==a&&0===c||"next"==a&&c==this.$items.length-1;if(d&&!this.options.wrap)return b;var e="prev"==a?-1:1,f=(c+e)%this.$items.length;return this.$items.eq(f)},c.prototype.to=function(a){var b=this,c=this.getItemIndex(this.$active=this.$element.find(".item.active"));if(!(a>this.$items.length-1||a<0))return this.sliding?this.$element.one("slid.bs.carousel",function(){b.to(a)}):c==a?this.pause().cycle():this.slide(a>c?"next":"prev",this.$items.eq(a))},c.prototype.pause=function(b){return b||(this.paused=!0),this.$element.find(".next, .prev").length&&a.support.transition&&(this.$element.trigger(a.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},c.prototype.next=function(){if(!this.sliding)return this.slide("next")},c.prototype.prev=function(){if(!this.sliding)return this.slide("prev")},c.prototype.slide=function(b,d){var e=this.$element.find(".item.active"),f=d||this.getItemForDirection(b,e),g=this.interval,h="next"==b?"left":"right",i=this;if(f.hasClass("active"))return this.sliding=!1;var j=f[0],k=a.Event("slide.bs.carousel",{relatedTarget:j,direction:h});if(this.$element.trigger(k),!k.isDefaultPrevented()){if(this.sliding=!0,g&&this.pause(),this.$indicators.length){this.$indicators.find(".active").removeClass("active");var l=a(this.$indicators.children()[this.getItemIndex(f)]);l&&l.addClass("active")}var m=a.Event("slid.bs.carousel",{relatedTarget:j,direction:h});return a.support.transition&&this.$element.hasClass("slide")?(f.addClass(b),f[0].offsetWidth,e.addClass(h),f.addClass(h),e.one("bsTransitionEnd",function(){f.removeClass([b,h].join(" ")).addClass("active"),e.removeClass(["active",h].join(" ")),i.sliding=!1,setTimeout(function(){i.$element.trigger(m)},0)}).emulateTransitionEnd(c.TRANSITION_DURATION)):(e.removeClass("active"),f.addClass("active"),this.sliding=!1,this.$element.trigger(m)),g&&this.cycle(),this}};var d=a.fn.carousel;a.fn.carousel=b,a.fn.carousel.Constructor=c,a.fn.carousel.noConflict=function(){return a.fn.carousel=d,this};var e=function(c){var d,e=a(this),f=a(e.attr("data-target")||(d=e.attr("href"))&&d.replace(/.*(?=#[^\s]+$)/,""));if(f.hasClass("carousel")){var g=a.extend({},f.data(),e.data()),h=e.attr("data-slide-to");h&&(g.interval=!1),b.call(f,g),h&&f.data("bs.carousel").to(h),c.preventDefault()}};a(document).on("click.bs.carousel.data-api","[data-slide]",e).on("click.bs.carousel.data-api","[data-slide-to]",e),a(window).on("load",function(){a('[data-ride="carousel"]').each(function(){var c=a(this);b.call(c,c.data())})})}(jQuery),+function(a){"use strict";function b(b){var c,d=b.attr("data-target")||(c=b.attr("href"))&&c.replace(/.*(?=#[^\s]+$)/,"");return a(d)}function c(b){return this.each(function(){var c=a(this),e=c.data("bs.collapse"),f=a.extend({},d.DEFAULTS,c.data(),"object"==typeof b&&b);!e&&f.toggle&&/show|hide/.test(b)&&(f.toggle=!1),e||c.data("bs.collapse",e=new d(this,f)),"string"==typeof b&&e[b]()})}var d=function(b,c){this.$element=a(b),this.options=a.extend({},d.DEFAULTS,c),this.$trigger=a('[data-toggle="collapse"][href="#'+b.id+'"],[data-toggle="collapse"][data-target="#'+b.id+'"]'),this.transitioning=null,this.options.parent?this.$parent=this.getParent():this.addAriaAndCollapsedClass(this.$element,this.$trigger),this.options.toggle&&this.toggle()};d.VERSION="3.3.7",d.TRANSITION_DURATION=350,d.DEFAULTS={toggle:!0},d.prototype.dimension=function(){var a=this.$element.hasClass("width");return a?"width":"height"},d.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var b,e=this.$parent&&this.$parent.children(".panel").children(".in, .collapsing");if(!(e&&e.length&&(b=e.data("bs.collapse"),b&&b.transitioning))){var f=a.Event("show.bs.collapse");if(this.$element.trigger(f),!f.isDefaultPrevented()){e&&e.length&&(c.call(e,"hide"),b||e.data("bs.collapse",null));var g=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[g](0).attr("aria-expanded",!0),this.$trigger.removeClass("collapsed").attr("aria-expanded",!0),this.transitioning=1;var h=function(){this.$element.removeClass("collapsing").addClass("collapse in")[g](""),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!a.support.transition)return h.call(this);var i=a.camelCase(["scroll",g].join("-"));this.$element.one("bsTransitionEnd",a.proxy(h,this)).emulateTransitionEnd(d.TRANSITION_DURATION)[g](this.$element[0][i])}}}},d.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var b=a.Event("hide.bs.collapse");if(this.$element.trigger(b),!b.isDefaultPrevented()){var c=this.dimension();this.$element[c](this.$element[c]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse in").attr("aria-expanded",!1),this.$trigger.addClass("collapsed").attr("aria-expanded",!1),this.transitioning=1;var e=function(){this.transitioning=0,this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")};return a.support.transition?void this.$element[c](0).one("bsTransitionEnd",a.proxy(e,this)).emulateTransitionEnd(d.TRANSITION_DURATION):e.call(this)}}},d.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()},d.prototype.getParent=function(){return a(this.options.parent).find('[data-toggle="collapse"][data-parent="'+this.options.parent+'"]').each(a.proxy(function(c,d){var e=a(d);this.addAriaAndCollapsedClass(b(e),e)},this)).end()},d.prototype.addAriaAndCollapsedClass=function(a,b){var c=a.hasClass("in");a.attr("aria-expanded",c),b.toggleClass("collapsed",!c).attr("aria-expanded",c)};var e=a.fn.collapse;a.fn.collapse=c,a.fn.collapse.Constructor=d,a.fn.collapse.noConflict=function(){return a.fn.collapse=e,this},a(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',function(d){var e=a(this);e.attr("data-target")||d.preventDefault();var f=b(e),g=f.data("bs.collapse"),h=g?"toggle":e.data();c.call(f,h)})}(jQuery),+function(a){"use strict";function b(b){var c=b.attr("data-target");c||(c=b.attr("href"),c=c&&/#[A-Za-z]/.test(c)&&c.replace(/.*(?=#[^\s]*$)/,""));var d=c&&a(c);return d&&d.length?d:b.parent()}function c(c){c&&3===c.which||(a(e).remove(),a(f).each(function(){var d=a(this),e=b(d),f={relatedTarget:this};e.hasClass("open")&&(c&&"click"==c.type&&/input|textarea/i.test(c.target.tagName)&&a.contains(e[0],c.target)||(e.trigger(c=a.Event("hide.bs.dropdown",f)),c.isDefaultPrevented()||(d.attr("aria-expanded","false"),e.removeClass("open").trigger(a.Event("hidden.bs.dropdown",f)))))}))}function d(b){return this.each(function(){var c=a(this),d=c.data("bs.dropdown");d||c.data("bs.dropdown",d=new g(this)),"string"==typeof b&&d[b].call(c)})}var e=".dropdown-backdrop",f='[data-toggle="dropdown"]',g=function(b){a(b).on("click.bs.dropdown",this.toggle)};g.VERSION="3.3.7",g.prototype.toggle=function(d){var e=a(this);if(!e.is(".disabled, :disabled")){var f=b(e),g=f.hasClass("open");if(c(),!g){"ontouchstart"in document.documentElement&&!f.closest(".navbar-nav").length&&a(document.createElement("div")).addClass("dropdown-backdrop").insertAfter(a(this)).on("click",c);var h={relatedTarget:this};if(f.trigger(d=a.Event("show.bs.dropdown",h)),d.isDefaultPrevented())return;e.trigger("focus").attr("aria-expanded","true"),f.toggleClass("open").trigger(a.Event("shown.bs.dropdown",h))}return!1}},g.prototype.keydown=function(c){if(/(38|40|27|32)/.test(c.which)&&!/input|textarea/i.test(c.target.tagName)){var d=a(this);if(c.preventDefault(),c.stopPropagation(),!d.is(".disabled, :disabled")){var e=b(d),g=e.hasClass("open");if(!g&&27!=c.which||g&&27==c.which)return 27==c.which&&e.find(f).trigger("focus"),d.trigger("click");var h=" li:not(.disabled):visible a",i=e.find(".dropdown-menu"+h);if(i.length){var j=i.index(c.target);38==c.which&&j>0&&j--,40==c.which&&j<i.length-1&&j++,~j||(j=0),i.eq(j).trigger("focus")}}}};var h=a.fn.dropdown;a.fn.dropdown=d,a.fn.dropdown.Constructor=g,a.fn.dropdown.noConflict=function(){return a.fn.dropdown=h,this},a(document).on("click.bs.dropdown.data-api",c).on("click.bs.dropdown.data-api",".dropdown form",function(a){a.stopPropagation()}).on("click.bs.dropdown.data-api",f,g.prototype.toggle).on("keydown.bs.dropdown.data-api",f,g.prototype.keydown).on("keydown.bs.dropdown.data-api",".dropdown-menu",g.prototype.keydown)}(jQuery),+function(a){"use strict";function b(b,d){return this.each(function(){var e=a(this),f=e.data("bs.modal"),g=a.extend({},c.DEFAULTS,e.data(),"object"==typeof b&&b);f||e.data("bs.modal",f=new c(this,g)),"string"==typeof b?f[b](d):g.show&&f.show(d)})}var c=function(b,c){this.options=c,this.$body=a(document.body),this.$element=a(b),this.$dialog=this.$element.find(".modal-dialog"),this.$backdrop=null,this.isShown=null,this.originalBodyPad=null,this.scrollbarWidth=0,this.ignoreBackdropClick=!1,this.options.remote&&this.$element.find(".modal-content").load(this.options.remote,a.proxy(function(){this.$element.trigger("loaded.bs.modal")},this))};c.VERSION="3.3.7",c.TRANSITION_DURATION=300,c.BACKDROP_TRANSITION_DURATION=150,c.DEFAULTS={backdrop:!0,keyboard:!0,show:!0},c.prototype.toggle=function(a){return this.isShown?this.hide():this.show(a)},c.prototype.show=function(b){var d=this,e=a.Event("show.bs.modal",{relatedTarget:b});this.$element.trigger(e),this.isShown||e.isDefaultPrevented()||(this.isShown=!0,this.checkScrollbar(),this.setScrollbar(),this.$body.addClass("modal-open"),this.escape(),this.resize(),this.$element.on("click.dismiss.bs.modal",'[data-dismiss="modal"]',a.proxy(this.hide,this)),this.$dialog.on("mousedown.dismiss.bs.modal",function(){d.$element.one("mouseup.dismiss.bs.modal",function(b){a(b.target).is(d.$element)&&(d.ignoreBackdropClick=!0)})}),this.backdrop(function(){var e=a.support.transition&&d.$element.hasClass("fade");d.$element.parent().length||d.$element.appendTo(d.$body),d.$element.show().scrollTop(0),d.adjustDialog(),e&&d.$element[0].offsetWidth,d.$element.addClass("in"),d.enforceFocus();var f=a.Event("shown.bs.modal",{relatedTarget:b});e?d.$dialog.one("bsTransitionEnd",function(){d.$element.trigger("focus").trigger(f)}).emulateTransitionEnd(c.TRANSITION_DURATION):d.$element.trigger("focus").trigger(f)}))},c.prototype.hide=function(b){b&&b.preventDefault(),b=a.Event("hide.bs.modal"),this.$element.trigger(b),this.isShown&&!b.isDefaultPrevented()&&(this.isShown=!1,this.escape(),this.resize(),a(document).off("focusin.bs.modal"),this.$element.removeClass("in").off("click.dismiss.bs.modal").off("mouseup.dismiss.bs.modal"),this.$dialog.off("mousedown.dismiss.bs.modal"),a.support.transition&&this.$element.hasClass("fade")?this.$element.one("bsTransitionEnd",a.proxy(this.hideModal,this)).emulateTransitionEnd(c.TRANSITION_DURATION):this.hideModal())},c.prototype.enforceFocus=function(){a(document).off("focusin.bs.modal").on("focusin.bs.modal",a.proxy(function(a){document===a.target||this.$element[0]===a.target||this.$element.has(a.target).length||this.$element.trigger("focus")},this))},c.prototype.escape=function(){this.isShown&&this.options.keyboard?this.$element.on("keydown.dismiss.bs.modal",a.proxy(function(a){27==a.which&&this.hide()},this)):this.isShown||this.$element.off("keydown.dismiss.bs.modal")},c.prototype.resize=function(){this.isShown?a(window).on("resize.bs.modal",a.proxy(this.handleUpdate,this)):a(window).off("resize.bs.modal")},c.prototype.hideModal=function(){var a=this;this.$element.hide(),this.backdrop(function(){a.$body.removeClass("modal-open"),a.resetAdjustments(),a.resetScrollbar(),a.$element.trigger("hidden.bs.modal")})},c.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null},c.prototype.backdrop=function(b){var d=this,e=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var f=a.support.transition&&e;if(this.$backdrop=a(document.createElement("div")).addClass("modal-backdrop "+e).appendTo(this.$body),this.$element.on("click.dismiss.bs.modal",a.proxy(function(a){return this.ignoreBackdropClick?void(this.ignoreBackdropClick=!1):void(a.target===a.currentTarget&&("static"==this.options.backdrop?this.$element[0].focus():this.hide()))},this)),f&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),!b)return;f?this.$backdrop.one("bsTransitionEnd",b).emulateTransitionEnd(c.BACKDROP_TRANSITION_DURATION):b()}else if(!this.isShown&&this.$backdrop){this.$backdrop.removeClass("in");var g=function(){d.removeBackdrop(),b&&b()};a.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one("bsTransitionEnd",g).emulateTransitionEnd(c.BACKDROP_TRANSITION_DURATION):g()}else b&&b()},c.prototype.handleUpdate=function(){this.adjustDialog()},c.prototype.adjustDialog=function(){var a=this.$element[0].scrollHeight>document.documentElement.clientHeight;this.$element.css({paddingLeft:!this.bodyIsOverflowing&&a?this.scrollbarWidth:"",paddingRight:this.bodyIsOverflowing&&!a?this.scrollbarWidth:""})},c.prototype.resetAdjustments=function(){this.$element.css({paddingLeft:"",paddingRight:""})},c.prototype.checkScrollbar=function(){var a=window.innerWidth;if(!a){var b=document.documentElement.getBoundingClientRect();a=b.right-Math.abs(b.left)}this.bodyIsOverflowing=document.body.clientWidth<a,this.scrollbarWidth=this.measureScrollbar()},c.prototype.setScrollbar=function(){var a=parseInt(this.$body.css("padding-right")||0,10);this.originalBodyPad=document.body.style.paddingRight||"",this.bodyIsOverflowing&&this.$body.css("padding-right",a+this.scrollbarWidth)},c.prototype.resetScrollbar=function(){this.$body.css("padding-right",this.originalBodyPad)},c.prototype.measureScrollbar=function(){var a=document.createElement("div");a.className="modal-scrollbar-measure",this.$body.append(a);var b=a.offsetWidth-a.clientWidth;return this.$body[0].removeChild(a),b};var d=a.fn.modal;a.fn.modal=b,a.fn.modal.Constructor=c,a.fn.modal.noConflict=function(){return a.fn.modal=d,this},a(document).on("click.bs.modal.data-api",'[data-toggle="modal"]',function(c){var d=a(this),e=d.attr("href"),f=a(d.attr("data-target")||e&&e.replace(/.*(?=#[^\s]+$)/,"")),g=f.data("bs.modal")?"toggle":a.extend({remote:!/#/.test(e)&&e},f.data(),d.data());d.is("a")&&c.preventDefault(),f.one("show.bs.modal",function(a){a.isDefaultPrevented()||f.one("hidden.bs.modal",function(){d.is(":visible")&&d.trigger("focus")})}),b.call(f,g,this)})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.tooltip"),f="object"==typeof b&&b;!e&&/destroy|hide/.test(b)||(e||d.data("bs.tooltip",e=new c(this,f)),"string"==typeof b&&e[b]())})}var c=function(a,b){this.type=null,this.options=null,this.enabled=null,this.timeout=null,this.hoverState=null,this.$element=null,this.inState=null,this.init("tooltip",a,b)};c.VERSION="3.3.7",c.TRANSITION_DURATION=150,c.DEFAULTS={animation:!0,placement:"top",selector:!1,template:'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0}},c.prototype.init=function(b,c,d){if(this.enabled=!0,this.type=b,this.$element=a(c),this.options=this.getOptions(d),this.$viewport=this.options.viewport&&a(a.isFunction(this.options.viewport)?this.options.viewport.call(this,this.$element):this.options.viewport.selector||this.options.viewport),this.inState={click:!1,hover:!1,focus:!1},this.$element[0]instanceof document.constructor&&!this.options.selector)throw new Error("`selector` option must be specified when initializing "+this.type+" on the window.document object!");for(var e=this.options.trigger.split(" "),f=e.length;f--;){var g=e[f];if("click"==g)this.$element.on("click."+this.type,this.options.selector,a.proxy(this.toggle,this));else if("manual"!=g){var h="hover"==g?"mouseenter":"focusin",i="hover"==g?"mouseleave":"focusout";this.$element.on(h+"."+this.type,this.options.selector,a.proxy(this.enter,this)),this.$element.on(i+"."+this.type,this.options.selector,a.proxy(this.leave,this))}}this.options.selector?this._options=a.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},c.prototype.getDefaults=function(){return c.DEFAULTS},c.prototype.getOptions=function(b){return b=a.extend({},this.getDefaults(),this.$element.data(),b),b.delay&&"number"==typeof b.delay&&(b.delay={show:b.delay,hide:b.delay}),b},c.prototype.getDelegateOptions=function(){var b={},c=this.getDefaults();return this._options&&a.each(this._options,function(a,d){c[a]!=d&&(b[a]=d)}),b},c.prototype.enter=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget).data("bs."+this.type);return c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c)),b instanceof a.Event&&(c.inState["focusin"==b.type?"focus":"hover"]=!0),c.tip().hasClass("in")||"in"==c.hoverState?void(c.hoverState="in"):(clearTimeout(c.timeout),c.hoverState="in",c.options.delay&&c.options.delay.show?void(c.timeout=setTimeout(function(){"in"==c.hoverState&&c.show()},c.options.delay.show)):c.show())},c.prototype.isInStateTrue=function(){for(var a in this.inState)if(this.inState[a])return!0;return!1},c.prototype.leave=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget).data("bs."+this.type);if(c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c)),b instanceof a.Event&&(c.inState["focusout"==b.type?"focus":"hover"]=!1),!c.isInStateTrue())return clearTimeout(c.timeout),c.hoverState="out",c.options.delay&&c.options.delay.hide?void(c.timeout=setTimeout(function(){"out"==c.hoverState&&c.hide()},c.options.delay.hide)):c.hide()},c.prototype.show=function(){var b=a.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(b);var d=a.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]);if(b.isDefaultPrevented()||!d)return;var e=this,f=this.tip(),g=this.getUID(this.type);this.setContent(),f.attr("id",g),this.$element.attr("aria-describedby",g),this.options.animation&&f.addClass("fade");var h="function"==typeof this.options.placement?this.options.placement.call(this,f[0],this.$element[0]):this.options.placement,i=/\s?auto?\s?/i,j=i.test(h);j&&(h=h.replace(i,"")||"top"),f.detach().css({top:0,left:0,display:"block"}).addClass(h).data("bs."+this.type,this),this.options.container?f.appendTo(this.options.container):f.insertAfter(this.$element),this.$element.trigger("inserted.bs."+this.type);var k=this.getPosition(),l=f[0].offsetWidth,m=f[0].offsetHeight;if(j){var n=h,o=this.getPosition(this.$viewport);h="bottom"==h&&k.bottom+m>o.bottom?"top":"top"==h&&k.top-m<o.top?"bottom":"right"==h&&k.right+l>o.width?"left":"left"==h&&k.left-l<o.left?"right":h,f.removeClass(n).addClass(h)}var p=this.getCalculatedOffset(h,k,l,m);this.applyPlacement(p,h);var q=function(){var a=e.hoverState;e.$element.trigger("shown.bs."+e.type),e.hoverState=null,"out"==a&&e.leave(e)};a.support.transition&&this.$tip.hasClass("fade")?f.one("bsTransitionEnd",q).emulateTransitionEnd(c.TRANSITION_DURATION):q()}},c.prototype.applyPlacement=function(b,c){var d=this.tip(),e=d[0].offsetWidth,f=d[0].offsetHeight,g=parseInt(d.css("margin-top"),10),h=parseInt(d.css("margin-left"),10);isNaN(g)&&(g=0),isNaN(h)&&(h=0),b.top+=g,b.left+=h,a.offset.setOffset(d[0],a.extend({using:function(a){d.css({top:Math.round(a.top),left:Math.round(a.left)})}},b),0),d.addClass("in");var i=d[0].offsetWidth,j=d[0].offsetHeight;"top"==c&&j!=f&&(b.top=b.top+f-j);var k=this.getViewportAdjustedDelta(c,b,i,j);k.left?b.left+=k.left:b.top+=k.top;var l=/top|bottom/.test(c),m=l?2*k.left-e+i:2*k.top-f+j,n=l?"offsetWidth":"offsetHeight";d.offset(b),this.replaceArrow(m,d[0][n],l)},c.prototype.replaceArrow=function(a,b,c){this.arrow().css(c?"left":"top",50*(1-a/b)+"%").css(c?"top":"left","")},c.prototype.setContent=function(){var a=this.tip(),b=this.getTitle();a.find(".tooltip-inner")[this.options.html?"html":"text"](b),a.removeClass("fade in top bottom left right")},c.prototype.hide=function(b){function d(){"in"!=e.hoverState&&f.detach(),e.$element&&e.$element.removeAttr("aria-describedby").trigger("hidden.bs."+e.type),b&&b()}var e=this,f=a(this.$tip),g=a.Event("hide.bs."+this.type);if(this.$element.trigger(g),!g.isDefaultPrevented())return f.removeClass("in"),a.support.transition&&f.hasClass("fade")?f.one("bsTransitionEnd",d).emulateTransitionEnd(c.TRANSITION_DURATION):d(),this.hoverState=null,this},c.prototype.fixTitle=function(){var a=this.$element;(a.attr("title")||"string"!=typeof a.attr("data-original-title"))&&a.attr("data-original-title",a.attr("title")||"").attr("title","")},c.prototype.hasContent=function(){return this.getTitle()},c.prototype.getPosition=function(b){b=b||this.$element;var c=b[0],d="BODY"==c.tagName,e=c.getBoundingClientRect();null==e.width&&(e=a.extend({},e,{width:e.right-e.left,height:e.bottom-e.top}));var f=window.SVGElement&&c instanceof window.SVGElement,g=d?{top:0,left:0}:f?null:b.offset(),h={scroll:d?document.documentElement.scrollTop||document.body.scrollTop:b.scrollTop()},i=d?{width:a(window).width(),height:a(window).height()}:null;return a.extend({},e,h,i,g)},c.prototype.getCalculatedOffset=function(a,b,c,d){return"bottom"==a?{top:b.top+b.height,left:b.left+b.width/2-c/2}:"top"==a?{top:b.top-d,left:b.left+b.width/2-c/2}:"left"==a?{top:b.top+b.height/2-d/2,left:b.left-c}:{top:b.top+b.height/2-d/2,left:b.left+b.width}},c.prototype.getViewportAdjustedDelta=function(a,b,c,d){var e={top:0,left:0};if(!this.$viewport)return e;var f=this.options.viewport&&this.options.viewport.padding||0,g=this.getPosition(this.$viewport);if(/right|left/.test(a)){var h=b.top-f-g.scroll,i=b.top+f-g.scroll+d;h<g.top?e.top=g.top-h:i>g.top+g.height&&(e.top=g.top+g.height-i)}else{var j=b.left-f,k=b.left+f+c;j<g.left?e.left=g.left-j:k>g.right&&(e.left=g.left+g.width-k)}return e},c.prototype.getTitle=function(){var a,b=this.$element,c=this.options;return a=b.attr("data-original-title")||("function"==typeof c.title?c.title.call(b[0]):c.title)},c.prototype.getUID=function(a){do a+=~~(1e6*Math.random());while(document.getElementById(a));return a},c.prototype.tip=function(){if(!this.$tip&&(this.$tip=a(this.options.template),1!=this.$tip.length))throw new Error(this.type+" `template` option must consist of exactly 1 top-level element!");return this.$tip},c.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},c.prototype.enable=function(){this.enabled=!0},c.prototype.disable=function(){this.enabled=!1},c.prototype.toggleEnabled=function(){this.enabled=!this.enabled},c.prototype.toggle=function(b){var c=this;b&&(c=a(b.currentTarget).data("bs."+this.type),c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c))),b?(c.inState.click=!c.inState.click,c.isInStateTrue()?c.enter(c):c.leave(c)):c.tip().hasClass("in")?c.leave(c):c.enter(c)},c.prototype.destroy=function(){var a=this;clearTimeout(this.timeout),this.hide(function(){a.$element.off("."+a.type).removeData("bs."+a.type),a.$tip&&a.$tip.detach(),a.$tip=null,a.$arrow=null,a.$viewport=null,a.$element=null})};var d=a.fn.tooltip;a.fn.tooltip=b,a.fn.tooltip.Constructor=c,a.fn.tooltip.noConflict=function(){return a.fn.tooltip=d,this}}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.popover"),f="object"==typeof b&&b;!e&&/destroy|hide/.test(b)||(e||d.data("bs.popover",e=new c(this,f)),"string"==typeof b&&e[b]())})}var c=function(a,b){this.init("popover",a,b)};if(!a.fn.tooltip)throw new Error("Popover requires tooltip.js");c.VERSION="3.3.7",c.DEFAULTS=a.extend({},a.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:'<div class="popover" role="tooltip"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'}),c.prototype=a.extend({},a.fn.tooltip.Constructor.prototype),c.prototype.constructor=c,c.prototype.getDefaults=function(){return c.DEFAULTS},c.prototype.setContent=function(){var a=this.tip(),b=this.getTitle(),c=this.getContent();a.find(".popover-title")[this.options.html?"html":"text"](b),a.find(".popover-content").children().detach().end()[this.options.html?"string"==typeof c?"html":"append":"text"](c),a.removeClass("fade top bottom left right in"),a.find(".popover-title").html()||a.find(".popover-title").hide()},c.prototype.hasContent=function(){return this.getTitle()||this.getContent()},c.prototype.getContent=function(){var a=this.$element,b=this.options;return a.attr("data-content")||("function"==typeof b.content?b.content.call(a[0]):b.content)},c.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")};var d=a.fn.popover;a.fn.popover=b,a.fn.popover.Constructor=c,a.fn.popover.noConflict=function(){return a.fn.popover=d,this}}(jQuery),+function(a){"use strict";function b(c,d){this.$body=a(document.body),this.$scrollElement=a(a(c).is(document.body)?window:c),this.options=a.extend({},b.DEFAULTS,d),this.selector=(this.options.target||"")+" .nav li > a",this.offsets=[],this.targets=[],this.activeTarget=null,this.scrollHeight=0,this.$scrollElement.on("scroll.bs.scrollspy",a.proxy(this.process,this)),this.refresh(),this.process()}function c(c){return this.each(function(){var d=a(this),e=d.data("bs.scrollspy"),f="object"==typeof c&&c;e||d.data("bs.scrollspy",e=new b(this,f)),"string"==typeof c&&e[c]()})}b.VERSION="3.3.7",b.DEFAULTS={offset:10},b.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)},b.prototype.refresh=function(){var b=this,c="offset",d=0;this.offsets=[],this.targets=[],this.scrollHeight=this.getScrollHeight(),a.isWindow(this.$scrollElement[0])||(c="position",d=this.$scrollElement.scrollTop()),this.$body.find(this.selector).map(function(){var b=a(this),e=b.data("target")||b.attr("href"),f=/^#./.test(e)&&a(e);return f&&f.length&&f.is(":visible")&&[[f[c]().top+d,e]]||null}).sort(function(a,b){return a[0]-b[0]}).each(function(){b.offsets.push(this[0]),b.targets.push(this[1])})},b.prototype.process=function(){var a,b=this.$scrollElement.scrollTop()+this.options.offset,c=this.getScrollHeight(),d=this.options.offset+c-this.$scrollElement.height(),e=this.offsets,f=this.targets,g=this.activeTarget;if(this.scrollHeight!=c&&this.refresh(),b>=d)return g!=(a=f[f.length-1])&&this.activate(a);if(g&&b<e[0])return this.activeTarget=null,this.clear();for(a=e.length;a--;)g!=f[a]&&b>=e[a]&&(void 0===e[a+1]||b<e[a+1])&&this.activate(f[a])},b.prototype.activate=function(b){
18723this.activeTarget=b,this.clear();var c=this.selector+'[data-target="'+b+'"],'+this.selector+'[href="'+b+'"]',d=a(c).parents("li").addClass("active");d.parent(".dropdown-menu").length&&(d=d.closest("li.dropdown").addClass("active")),d.trigger("activate.bs.scrollspy")},b.prototype.clear=function(){a(this.selector).parentsUntil(this.options.target,".active").removeClass("active")};var d=a.fn.scrollspy;a.fn.scrollspy=c,a.fn.scrollspy.Constructor=b,a.fn.scrollspy.noConflict=function(){return a.fn.scrollspy=d,this},a(window).on("load.bs.scrollspy.data-api",function(){a('[data-spy="scroll"]').each(function(){var b=a(this);c.call(b,b.data())})})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.tab");e||d.data("bs.tab",e=new c(this)),"string"==typeof b&&e[b]()})}var c=function(b){this.element=a(b)};c.VERSION="3.3.7",c.TRANSITION_DURATION=150,c.prototype.show=function(){var b=this.element,c=b.closest("ul:not(.dropdown-menu)"),d=b.data("target");if(d||(d=b.attr("href"),d=d&&d.replace(/.*(?=#[^\s]*$)/,"")),!b.parent("li").hasClass("active")){var e=c.find(".active:last a"),f=a.Event("hide.bs.tab",{relatedTarget:b[0]}),g=a.Event("show.bs.tab",{relatedTarget:e[0]});if(e.trigger(f),b.trigger(g),!g.isDefaultPrevented()&&!f.isDefaultPrevented()){var h=a(d);this.activate(b.closest("li"),c),this.activate(h,h.parent(),function(){e.trigger({type:"hidden.bs.tab",relatedTarget:b[0]}),b.trigger({type:"shown.bs.tab",relatedTarget:e[0]})})}}},c.prototype.activate=function(b,d,e){function f(){g.removeClass("active").find("> .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!1),b.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded",!0),h?(b[0].offsetWidth,b.addClass("in")):b.removeClass("fade"),b.parent(".dropdown-menu").length&&b.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!0),e&&e()}var g=d.find("> .active"),h=e&&a.support.transition&&(g.length&&g.hasClass("fade")||!!d.find("> .fade").length);g.length&&h?g.one("bsTransitionEnd",f).emulateTransitionEnd(c.TRANSITION_DURATION):f(),g.removeClass("in")};var d=a.fn.tab;a.fn.tab=b,a.fn.tab.Constructor=c,a.fn.tab.noConflict=function(){return a.fn.tab=d,this};var e=function(c){c.preventDefault(),b.call(a(this),"show")};a(document).on("click.bs.tab.data-api",'[data-toggle="tab"]',e).on("click.bs.tab.data-api",'[data-toggle="pill"]',e)}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.affix"),f="object"==typeof b&&b;e||d.data("bs.affix",e=new c(this,f)),"string"==typeof b&&e[b]()})}var c=function(b,d){this.options=a.extend({},c.DEFAULTS,d),this.$target=a(this.options.target).on("scroll.bs.affix.data-api",a.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",a.proxy(this.checkPositionWithEventLoop,this)),this.$element=a(b),this.affixed=null,this.unpin=null,this.pinnedOffset=null,this.checkPosition()};c.VERSION="3.3.7",c.RESET="affix affix-top affix-bottom",c.DEFAULTS={offset:0,target:window},c.prototype.getState=function(a,b,c,d){var e=this.$target.scrollTop(),f=this.$element.offset(),g=this.$target.height();if(null!=c&&"top"==this.affixed)return e<c&&"top";if("bottom"==this.affixed)return null!=c?!(e+this.unpin<=f.top)&&"bottom":!(e+g<=a-d)&&"bottom";var h=null==this.affixed,i=h?e:f.top,j=h?g:b;return null!=c&&e<=c?"top":null!=d&&i+j>=a-d&&"bottom"},c.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(c.RESET).addClass("affix");var a=this.$target.scrollTop(),b=this.$element.offset();return this.pinnedOffset=b.top-a},c.prototype.checkPositionWithEventLoop=function(){setTimeout(a.proxy(this.checkPosition,this),1)},c.prototype.checkPosition=function(){if(this.$element.is(":visible")){var b=this.$element.height(),d=this.options.offset,e=d.top,f=d.bottom,g=Math.max(a(document).height(),a(document.body).height());"object"!=typeof d&&(f=e=d),"function"==typeof e&&(e=d.top(this.$element)),"function"==typeof f&&(f=d.bottom(this.$element));var h=this.getState(g,b,e,f);if(this.affixed!=h){null!=this.unpin&&this.$element.css("top","");var i="affix"+(h?"-"+h:""),j=a.Event(i+".bs.affix");if(this.$element.trigger(j),j.isDefaultPrevented())return;this.affixed=h,this.unpin="bottom"==h?this.getPinnedOffset():null,this.$element.removeClass(c.RESET).addClass(i).trigger(i.replace("affix","affixed")+".bs.affix")}"bottom"==h&&this.$element.offset({top:g-b-f})}};var d=a.fn.affix;a.fn.affix=b,a.fn.affix.Constructor=c,a.fn.affix.noConflict=function(){return a.fn.affix=d,this},a(window).on("load",function(){a('[data-spy="affix"]').each(function(){var c=a(this),d=c.data();d.offset=d.offset||{},null!=d.offsetBottom&&(d.offset.bottom=d.offsetBottom),null!=d.offsetTop&&(d.offset.top=d.offsetTop),b.call(c,d)})})}(jQuery);
vendor: 9,883 bytes, lines 18723-18728
18723;
18724/*! picturefill - v3.0.2 - 2016-02-12
18725 * https://scottjehl.github.io/picturefill/
18726 * Copyright (c) 2016 https://github.com/scottjehl/picturefill/blob/master/Authors.txt; Licensed MIT
18727 */
18728!function(a){var b=navigator.userAgent;a.HTMLPictureElement&&/ecko/.test(b)&&b.match(/rv\:(\d+)/)&&RegExp.$1<45&&addEventListener("resize",function(){var b,c=document.createElement("source"),d=function(a){var b,d,e=a.parentNode;"PICTURE"===e.nodeName.toUpperCase()?(b=c.cloneNode(),e.insertBefore(b,e.firstElementChild),setTimeout(function(){e.removeChild(b)})):(!a._pfLastSize||a.offsetWidth>a._pfLastSize)&&(a._pfLastSize=a.offsetWidth,d=a.sizes,a.sizes+=",100vw",setTimeout(function(){a.sizes=d}))},e=function(){var a,b=document.querySelectorAll("picture > img, img[srcset][sizes]");for(a=0;a<b.length;a++)d(b[a])},f=function(){clearTimeout(b),b=setTimeout(e,99)},g=a.matchMedia&&matchMedia("(orientation: landscape)"),h=function(){f(),g&&g.addListener&&g.addListener(f)};return c.srcset="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",/^[c|i]|d$/.test(document.readyState||"")?h():document.addEventListener("DOMContentLoaded",h),f}())}(window),function(a,b,c){"use strict";function d(a){return" "===a||"	"===a||"\n"===a||"\f"===a||"\r"===a}function e(b,c){var d=new a.Image;return d.onerror=function(){A[b]=!1,ba()},d.onload=function(){A[b]=1===d.width,ba()},d.src=c,"pending"}function f(){M=!1,P=a.devicePixelRatio,N={},O={},s.DPR=P||1,Q.width=Math.max(a.innerWidth||0,z.clientWidth),Q.height=Math.max(a.innerHeight||0,z.clientHeight),Q.vw=Q.width/100,Q.vh=Q.height/100,r=[Q.height,Q.width,P].join("-"),Q.em=s.getEmValue(),Q.rem=Q.em}function g(a,b,c,d){var e,f,g,h;return"saveData"===B.algorithm?a>2.7?h=c+1:(f=b-c,e=Math.pow(a-.6,1.5),g=f*e,d&&(g+=.1*e),h=a+g):h=c>1?Math.sqrt(a*b):a,h>c}function h(a){var b,c=s.getSet(a),d=!1;"pending"!==c&&(d=r,c&&(b=s.setRes(c),s.applySetCandidate(b,a))),a[s.ns].evaled=d}function i(a,b){return a.res-b.res}function j(a,b,c){var d;return!c&&b&&(c=a[s.ns].sets,c=c&&c[c.length-1]),d=k(b,c),d&&(b=s.makeUrl(b),a[s.ns].curSrc=b,a[s.ns].curCan=d,d.res||aa(d,d.set.sizes)),d}function k(a,b){var c,d,e;if(a&&b)for(e=s.parseSet(b),a=s.makeUrl(a),c=0;c<e.length;c++)if(a===s.makeUrl(e[c].url)){d=e[c];break}return d}function l(a,b){var c,d,e,f,g=a.getElementsByTagName("source");for(c=0,d=g.length;d>c;c++)e=g[c],e[s.ns]=!0,f=e.getAttribute("srcset"),f&&b.push({srcset:f,media:e.getAttribute("media"),type:e.getAttribute("type"),sizes:e.getAttribute("sizes")})}function m(a,b){function c(b){var c,d=b.exec(a.substring(m));return d?(c=d[0],m+=c.length,c):void 0}function e(){var a,c,d,e,f,i,j,k,l,m=!1,o={};for(e=0;e<h.length;e++)f=h[e],i=f[f.length-1],j=f.substring(0,f.length-1),k=parseInt(j,10),l=parseFloat(j),X.test(j)&&"w"===i?((a||c)&&(m=!0),0===k?m=!0:a=k):Y.test(j)&&"x"===i?((a||c||d)&&(m=!0),0>l?m=!0:c=l):X.test(j)&&"h"===i?((d||c)&&(m=!0),0===k?m=!0:d=k):m=!0;m||(o.url=g,a&&(o.w=a),c&&(o.d=c),d&&(o.h=d),d||c||a||(o.d=1),1===o.d&&(b.has1x=!0),o.set=b,n.push(o))}function f(){for(c(T),i="",j="in descriptor";;){if(k=a.charAt(m),"in descriptor"===j)if(d(k))i&&(h.push(i),i="",j="after descriptor");else{if(","===k)return m+=1,i&&h.push(i),void e();if("("===k)i+=k,j="in parens";else{if(""===k)return i&&h.push(i),void e();i+=k}}else if("in parens"===j)if(")"===k)i+=k,j="in descriptor";else{if(""===k)return h.push(i),void e();i+=k}else if("after descriptor"===j)if(d(k));else{if(""===k)return void e();j="in descriptor",m-=1}m+=1}}for(var g,h,i,j,k,l=a.length,m=0,n=[];;){if(c(U),m>=l)return n;g=c(V),h=[],","===g.slice(-1)?(g=g.replace(W,""),e()):f()}}function n(a){function b(a){function b(){f&&(g.push(f),f="")}function c(){g[0]&&(h.push(g),g=[])}for(var e,f="",g=[],h=[],i=0,j=0,k=!1;;){if(e=a.charAt(j),""===e)return b(),c(),h;if(k){if("*"===e&&"/"===a[j+1]){k=!1,j+=2,b();continue}j+=1}else{if(d(e)){if(a.charAt(j-1)&&d(a.charAt(j-1))||!f){j+=1;continue}if(0===i){b(),j+=1;continue}e=" "}else if("("===e)i+=1;else if(")"===e)i-=1;else{if(","===e){b(),c(),j+=1;continue}if("/"===e&&"*"===a.charAt(j+1)){k=!0,j+=2;continue}}f+=e,j+=1}}}function c(a){return k.test(a)&&parseFloat(a)>=0?!0:l.test(a)?!0:"0"===a||"-0"===a||"+0"===a?!0:!1}var e,f,g,h,i,j,k=/^(?:[+-]?[0-9]+|[0-9]*\.[0-9]+)(?:[eE][+-]?[0-9]+)?(?:ch|cm|em|ex|in|mm|pc|pt|px|rem|vh|vmin|vmax|vw)$/i,l=/^calc\((?:[0-9a-z \.\+\-\*\/\(\)]+)\)$/i;for(f=b(a),g=f.length,e=0;g>e;e++)if(h=f[e],i=h[h.length-1],c(i)){if(j=i,h.pop(),0===h.length)return j;if(h=h.join(" "),s.matchesMedia(h))return j}return"100vw"}b.createElement("picture");var o,p,q,r,s={},t=!1,u=function(){},v=b.createElement("img"),w=v.getAttribute,x=v.setAttribute,y=v.removeAttribute,z=b.documentElement,A={},B={algorithm:""},C="data-pfsrc",D=C+"set",E=navigator.userAgent,F=/rident/.test(E)||/ecko/.test(E)&&E.match(/rv\:(\d+)/)&&RegExp.$1>35,G="currentSrc",H=/\s+\+?\d+(e\d+)?w/,I=/(\([^)]+\))?\s*(.+)/,J=a.picturefillCFG,K="position:absolute;left:0;visibility:hidden;display:block;padding:0;border:none;font-size:1em;width:1em;overflow:hidden;clip:rect(0px, 0px, 0px, 0px)",L="font-size:100%!important;",M=!0,N={},O={},P=a.devicePixelRatio,Q={px:1,"in":96},R=b.createElement("a"),S=!1,T=/^[ \t\n\r\u000c]+/,U=/^[, \t\n\r\u000c]+/,V=/^[^ \t\n\r\u000c]+/,W=/[,]+$/,X=/^\d+$/,Y=/^-?(?:[0-9]+|[0-9]*\.[0-9]+)(?:[eE][+-]?[0-9]+)?$/,Z=function(a,b,c,d){a.addEventListener?a.addEventListener(b,c,d||!1):a.attachEvent&&a.attachEvent("on"+b,c)},$=function(a){var b={};return function(c){return c in b||(b[c]=a(c)),b[c]}},_=function(){var a=/^([\d\.]+)(em|vw|px)$/,b=function(){for(var a=arguments,b=0,c=a[0];++b in a;)c=c.replace(a[b],a[++b]);return c},c=$(function(a){return"return "+b((a||"").toLowerCase(),/\band\b/g,"&&",/,/g,"||",/min-([a-z-\s]+):/g,"e.$1>=",/max-([a-z-\s]+):/g,"e.$1<=",/calc([^)]+)/g,"($1)",/(\d+[\.]*[\d]*)([a-z]+)/g,"($1 * e.$2)",/^(?!(e.[a-z]|[0-9\.&=|><\+\-\*\(\)\/])).*/gi,"")+";"});return function(b,d){var e;if(!(b in N))if(N[b]=!1,d&&(e=b.match(a)))N[b]=e[1]*Q[e[2]];else try{N[b]=new Function("e",c(b))(Q)}catch(f){}return N[b]}}(),aa=function(a,b){return a.w?(a.cWidth=s.calcListLength(b||"100vw"),a.res=a.w/a.cWidth):a.res=a.d,a},ba=function(a){if(t){var c,d,e,f=a||{};if(f.elements&&1===f.elements.nodeType&&("IMG"===f.elements.nodeName.toUpperCase()?f.elements=[f.elements]:(f.context=f.elements,f.elements=null)),c=f.elements||s.qsa(f.context||b,f.reevaluate||f.reselect?s.sel:s.selShort),e=c.length){for(s.setupRun(f),S=!0,d=0;e>d;d++)s.fillImg(c[d],f);s.teardownRun(f)}}};o=a.console&&console.warn?function(a){console.warn(a)}:u,G in v||(G="src"),A["image/jpeg"]=!0,A["image/gif"]=!0,A["image/png"]=!0,A["image/svg+xml"]=b.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#Image","1.1"),s.ns=("pf"+(new Date).getTime()).substr(0,9),s.supSrcset="srcset"in v,s.supSizes="sizes"in v,s.supPicture=!!a.HTMLPictureElement,s.supSrcset&&s.supPicture&&!s.supSizes&&!function(a){v.srcset="data:,a",a.src="data:,a",s.supSrcset=v.complete===a.complete,s.supPicture=s.supSrcset&&s.supPicture}(b.createElement("img")),s.supSrcset&&!s.supSizes?!function(){var a="data:image/gif;base64,R0lGODlhAgABAPAAAP///wAAACH5BAAAAAAALAAAAAACAAEAAAICBAoAOw==",c="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",d=b.createElement("img"),e=function(){var a=d.width;2===a&&(s.supSizes=!0),q=s.supSrcset&&!s.supSizes,t=!0,setTimeout(ba)};d.onload=e,d.onerror=e,d.setAttribute("sizes","9px"),d.srcset=c+" 1w,"+a+" 9w",d.src=c}():t=!0,s.selShort="picture>img,img[srcset]",s.sel=s.selShort,s.cfg=B,s.DPR=P||1,s.u=Q,s.types=A,s.setSize=u,s.makeUrl=$(function(a){return R.href=a,R.href}),s.qsa=function(a,b){return"querySelector"in a?a.querySelectorAll(b):[]},s.matchesMedia=function(){return a.matchMedia&&(matchMedia("(min-width: 0.1em)")||{}).matches?s.matchesMedia=function(a){return!a||matchMedia(a).matches}:s.matchesMedia=s.mMQ,s.matchesMedia.apply(this,arguments)},s.mMQ=function(a){return a?_(a):!0},s.calcLength=function(a){var b=_(a,!0)||!1;return 0>b&&(b=!1),b},s.supportsType=function(a){return a?A[a]:!0},s.parseSize=$(function(a){var b=(a||"").match(I);return{media:b&&b[1],length:b&&b[2]}}),s.parseSet=function(a){return a.cands||(a.cands=m(a.srcset,a)),a.cands},s.getEmValue=function(){var a;if(!p&&(a=b.body)){var c=b.createElement("div"),d=z.style.cssText,e=a.style.cssText;c.style.cssText=K,z.style.cssText=L,a.style.cssText=L,a.appendChild(c),p=c.offsetWidth,a.removeChild(c),p=parseFloat(p,10),z.style.cssText=d,a.style.cssText=e}return p||16},s.calcListLength=function(a){if(!(a in O)||B.uT){var b=s.calcLength(n(a));O[a]=b?b:Q.width}return O[a]},s.setRes=function(a){var b;if(a){b=s.parseSet(a);for(var c=0,d=b.length;d>c;c++)aa(b[c],a.sizes)}return b},s.setRes.res=aa,s.applySetCandidate=function(a,b){if(a.length){var c,d,e,f,h,k,l,m,n,o=b[s.ns],p=s.DPR;if(k=o.curSrc||b[G],l=o.curCan||j(b,k,a[0].set),l&&l.set===a[0].set&&(n=F&&!b.complete&&l.res-.1>p,n||(l.cached=!0,l.res>=p&&(h=l))),!h)for(a.sort(i),f=a.length,h=a[f-1],d=0;f>d;d++)if(c=a[d],c.res>=p){e=d-1,h=a[e]&&(n||k!==s.makeUrl(c.url))&&g(a[e].res,c.res,p,a[e].cached)?a[e]:c;break}h&&(m=s.makeUrl(h.url),o.curSrc=m,o.curCan=h,m!==k&&s.setSrc(b,h),s.setSize(b))}},s.setSrc=function(a,b){var c;a.src=b.url,"image/svg+xml"===b.set.type&&(c=a.style.width,a.style.width=a.offsetWidth+1+"px",a.offsetWidth+1&&(a.style.width=c))},s.getSet=function(a){var b,c,d,e=!1,f=a[s.ns].sets;for(b=0;b<f.length&&!e;b++)if(c=f[b],c.srcset&&s.matchesMedia(c.media)&&(d=s.supportsType(c.type))){"pending"===d&&(c=d),e=c;break}return e},s.parseSets=function(a,b,d){var e,f,g,h,i=b&&"PICTURE"===b.nodeName.toUpperCase(),j=a[s.ns];(j.src===c||d.src)&&(j.src=w.call(a,"src"),j.src?x.call(a,C,j.src):y.call(a,C)),(j.srcset===c||d.srcset||!s.supSrcset||a.srcset)&&(e=w.call(a,"srcset"),j.srcset=e,h=!0),j.sets=[],i&&(j.pic=!0,l(b,j.sets)),j.srcset?(f={srcset:j.srcset,sizes:w.call(a,"sizes")}
18728,j.sets.push(f),g=(q||j.src)&&H.test(j.srcset||""),g||!j.src||k(j.src,f)||f.has1x||(f.srcset+=", "+j.src,f.cands.push({url:j.src,d:1,set:f}))):j.src&&j.sets.push({srcset:j.src,sizes:null}),j.curCan=null,j.curSrc=c,j.supported=!(i||f&&!s.supSrcset||g&&!s.supSizes),h&&s.supSrcset&&!j.supported&&(e?(x.call(a,D,e),a.srcset=""):y.call(a,D)),j.supported&&!j.srcset&&(!j.src&&a.src||a.src!==s.makeUrl(j.src))&&(null===j.src?a.removeAttribute("src"):a.src=j.src),j.parsed=!0},s.fillImg=function(a,b){var c,d=b.reselect||b.reevaluate;a[s.ns]||(a[s.ns]={}),c=a[s.ns],(d||c.evaled!==r)&&((!c.parsed||b.reevaluate)&&s.parseSets(a,a.parentNode,b),c.supported?c.evaled=r:h(a))},s.setupRun=function(){(!S||M||P!==a.devicePixelRatio)&&f()},s.supPicture?(ba=u,s.fillImg=u):!function(){var c,d=a.attachEvent?/d$|^c/:/d$|^c|^i/,e=function(){var a=b.readyState||"";f=setTimeout(e,"loading"===a?200:999),b.body&&(s.fillImgs(),c=c||d.test(a),c&&clearTimeout(f))},f=setTimeout(e,b.body?9:99),g=function(a,b){var c,d,e=function(){var f=new Date-d;b>f?c=setTimeout(e,b-f):(c=null,a())};return function(){d=new Date,c||(c=setTimeout(e,b))}},h=z.clientHeight,i=function(){M=Math.max(a.innerWidth||0,z.clientWidth)!==Q.width||z.clientHeight!==h,h=z.clientHeight,M&&s.fillImgs()};Z(a,"resize",g(i,99)),Z(b,"readystatechange",e)}(),s.picturefill=ba,s.fillImgs=ba,s.teardownRun=u,ba._=s,a.picturefillCFG={pf:s,push:function(a){var b=a.shift();"function"==typeof s[b]?s[b].apply(s,a):(B[b]=a[0],S&&s.fillImgs({reselect:!0}))}};for(;J&&J.length;)a.picturefillCFG.push(J.shift());a.picturefill=ba,"object"==typeof module&&"object"==typeof module.exports?module.exports=ba:"function"==typeof define&&define.amd&&define("picturefill",function(){return ba}),s.supPicture||(A["image/webp"]=e("image/webp","data:image/webp;base64,UklGRkoAAABXRUJQVlA4WAoAAAAQAAAAAAAAAAAAQUxQSAwAAAABBxAR/Q9ERP8DAABWUDggGAAAADABAJ0BKgEAAQADADQlpAADcAD++/1QAA=="))}(window,document);;
18729/*! smooth-scroll v11.1.0 | (c) 2017 Chris Ferdinandi | GPL-3.0 License | http://github.com/cferdinandi/smooth-scroll */
18730!(function(e,t){"function"==typeof define&&define.amd?define([],t(e)):"object"==typeof exports?module.exports=t(e):e.smoothScroll=t(e)})("undefined"!=typeof global?global:this.window||this.global,(function(e){"use strict";var t,n,o,r,a,i,c,l={},s="querySelector"in document&&"addEventListener"in e,u={selector:"[data-scroll]",ignore:"[data-scroll-ignore]",selectorHeader:null,speed:500,offset:0,easing:"easeInOutCubic",easingPatterns:{},before:function(){},after:function(){}},f=function(){var e={},t=!1,n=0,o=arguments.length;"[object Boolean]"===Object.prototype.toString.call(arguments[0])&&(t=arguments[0],n++);for(;n<o;n++){var r=arguments[n];!(function(n){for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t&&"[object Object]"===Object.prototype.toString.call(n[o])?e[o]=f(!0,e[o],n[o]):e[o]=n[o])})(r)}return e},d=function(e){return Math.max(e.scrollHeight,e.offsetHeight,e.clientHeight)},h=function(e,t){for(Element.prototype.matches||(Element.prototype.matches=Element.prototype.matchesSelector||Element.prototype.mozMatchesSelector||Element.prototype.msMatchesSelector||Element.prototype.oMatchesSelector||Element.prototype.webkitMatchesSelector||function(e){for(var t=(this.document||this.ownerDocument).querySelectorAll(e),n=t.length;--n>=0&&t.item(n)!==this;);return n>-1});e&&e!==document;e=e.parentNode)if(e.matches(t))return e;return null},m=function(e){"#"===e.charAt(0)&&(e=e.substr(1));for(var t,n=String(e),o=n.length,r=-1,a="",i=n.charCodeAt(0);++r<o;){if(0===(t=n.charCodeAt(r)))throw new InvalidCharacterError("Invalid character: the input contains U+0000.");t>=1&&t<=31||127==t||0===r&&t>=48&&t<=57||1===r&&t>=48&&t<=57&&45===i?a+="\\"+t.toString(16)+" ":a+=t>=128||45===t||95===t||t>=48&&t<=57||t>=65&&t<=90||t>=97&&t<=122?n.charAt(r):"\\"+n.charAt(r)}return"#"+a},g=function(e,t){var n;return"easeInQuad"===e.easing&&(n=t*t),"easeOutQuad"===e.easing&&(n=t*(2-t)),"easeInOutQuad"===e.easing&&(n=t<.5?2*t*t:(4-2*t)*t-1),"easeInCubic"===e.easing&&(n=t*t*t),"easeOutCubic"===e.easing&&(n=--t*t*t+1),"easeInOutCubic"===e.easing&&(n=t<.5?4*t*t*t:(t-1)*(2*t-2)*(2*t-2)+1),"easeInQuart"===e.easing&&(n=t*t*t*t),"easeOutQuart"===e.easing&&(n=1- --t*t*t*t),"easeInOutQuart"===e.easing&&(n=t<.5?8*t*t*t*t:1-8*--t*t*t*t),"easeInQuint"===e.easing&&(n=t*t*t*t*t),"easeOutQuint"===e.easing&&(n=1+--t*t*t*t*t),"easeInOutQuint"===e.easing&&(n=t<.5?16*t*t*t*t*t:1+16*--t*t*t*t*t),e.easingPatterns[e.easing]&&(n=e.easingPatterns[e.easing](t)),n||t},p=function(e,t,n){var o=0;if(e.offsetParent)do{o+=e.offsetTop,e=e.offsetParent}while(e);return o=Math.max(o-t-n,0),Math.min(o,y()-b())},b=function(){return Math.max(document.documentElement.clientHeight,e.innerHe
18730ight||0)},y=function(){return Math.max(document.body.scrollHeight,document.documentElement.scrollHeight,document.body.offsetHeight,document.documentElement.offsetHeight,document.body.clientHeight,document.documentElement.clientHeight)},v=function(e){return e&&"object"==typeof JSON&&"function"==typeof JSON.parse?JSON.parse(e):{}},O=function(e){return e?d(e)+e.offsetTop:0},S=function(t,n,o){o||(t.focus(),document.activeElement.id!==t.id&&(t.setAttribute("tabindex","-1"),t.focus(),t.style.outline="none"),e.scrollTo(0,n))};l.animateScroll=function(n,o,i){var l=v(o?o.getAttribute("data-options"):null),s=f(t||u,i||{},l),d="[object Number]"===Object.prototype.toString.call(n),h=d||!n.tagName?null:n;if(d||h){var m=e.pageYOffset;s.selectorHeader&&!r&&(r=document.querySelector(s.selectorHeader)),a||(a=O(r));var b,E,I=d?n:p(h,a,parseInt("function"==typeof s.offset?s.offset():s.offset,10)),H=I-m,A=y(),j=0,C=function(t,r,a){var i=e.pageYOffset;(t==r||i==r||e.innerHeight+i>=A)&&(clearInterval(a),S(n,r,d),s.after(n,o))},M=function(){j+=16,b=j/parseInt(s.speed,10),b=b>1?1:b,E=m+H*g(s,b),e.scrollTo(0,Math.floor(E)),C(E,I,c)};0===e.pageYOffset&&e.scrollTo(0,0),s.before(n,o),(function(){clearInterval(c),c=setInterval(M,16)})()}};var E=function(t){try{m(decodeURIComponent(e.location.hash))}catch(t){m(e.location.hash)}n&&(n.id=n.getAttribute("data-scroll-id"),l.animateScroll(n,o),n=null,o=null)},I=function(r){if(0===r.button&&!r.metaKey&&!r.ctrlKey&&(o=h(r.target,t.selector))&&"a"===o.tagName.toLowerCase()&&!h(r.target,t.ignore)&&o.hostname===e.location.hostname&&o.pathname===e.location.pathname&&/#/.test(o.href)){var a;try{a=m(decodeURIComponent(o.hash))}catch(e){a=m(o.hash)}if("#"===a){r.preventDefault(),n=document.body;var i=n.id?n.id:"smooth-scroll-top";return n.setAttribute("data-scroll-id",i),n.id="",void(e.location.hash.substring(1)===i?E():e.location.hash=i)}n=document.querySelector(a),n&&(n.setAttribute("data-scroll-id",n.id),n.id="",o.hash===e.location.hash&&(r.preventDefault(),E()))}},H=function(e){i||(i=setTimeout((function(){i=null,a=O(r)}),66))};return l.destroy=function(){t&&(document.removeEventListener("click",I,!1),e.removeEventListener("resize",H,!1),t=null,n=null,o=null,r=null,a=null,i=null,c=null)},l.init=function(n){s&&(l.destroy(),t=f(u,n||{}),r=t.selectorHeader?document.querySelector(t.selectorHeader):null,a=O(r),document.addEventListener("click",I,!1),e.addEventListener("hashchange",E,!1),r&&e.addEventListener("resize",H,!1))},l}));;
18731!function(e){e.fn.shorten=function(s){"use strict";var t={showChars:100,minHideChars:10,ellipsesText:"...",moreText:"more",lessText:"less",onLess:function(){},onMore:function(){},errMsg:null,force:!1};return s&&e.extend(t,s),e(this).data("jquery.shorten")&&!t.force?!1:(e(this).data("jquery.shorten",!0),e(document).off("click",".morelink"),e(document).on({click:function(){var s=e(this);return s.hasClass("less")?(s.removeClass("less"),s.html(t.moreText),s.parent().prev().animate({height:"0%"},function(){s.parent().prev().prev().show()}).hide("fast",function(){t.onLess()})):(s.addClass("less"),s.html(t.lessText),s.parent().prev().animate({height:"100%"},function(){s.parent().prev().prev().hide()}).show("fast",function(){t.onMore()})),!1}},".morelink"),this.each(function(){var s=e(this),n=s.html(),r=s.text().length;if(r>t.showChars+t.minHideChars){var o=n.substr(0,t.showChars);if(o.indexOf("<")>=0){for(var a=!1,i="",h=0,l=[],c=null,f=0,u=0;u<=t.showChars;f++)if("<"!=n[f]||a||(a=!0,c=n.substring(f+1,n.indexOf(">",f)),"/"==c[0]?c!="/"+l[0]?t.errMsg="ERROR en HTML: the top of the stack should be the tag that closes":l.shift():"br"!=c.toLowerCase()&&l.unshift(c)),a&&">"==n[f]&&(a=!1),a)i+=n.charAt(f);else if(u++,h<=t.showChars)i+=n.charAt(f),h++;else if(l.length>0){for(j=0;j<l.length;j++)i+="</"+l[j]+">";break}o=e("<div/>").html(i+'<span class="ellip">'+t.ellipsesText+"</span>").html()}else o+=t.ellipsesText;var m='<div class="shortcontent">'+o+'</div><div class="allcontent">'+n+'</div><span><a href="javascript://nop/" class="morelink">'+t.moreText+"</a></span>";s.html(m),s.find(".allcontent").hide(),e(".shortcontent p:last",s).css("margin-bottom",0)}}))}}(jQuery);;
18732!function ($) {
18733//https://github.com/flatlogic/bootstrap-tabcollapse
18734    "use strict";
18735
18736    // TABCOLLAPSE CLASS DEFINITION
18737    // ======================
18738
18739    var TabCollapse = function (el, options) {
18740        this.options   = options;
18741        this.$tabs  = $(el);
18742
18743        this._accordionVisible = false; //content is attached to tabs at first
18744        this._initAccordion();
18745        this._checkStateOnResize();
18746
18747
18748        // checkState() has gone to setTimeout for making it possible to attach listeners to
18749        // shown-accordion.bs.tabcollapse event on page load.
18750        // See https://github.com/flatlogic/bootstrap-tabcollapse/issues/23
18751        var that = this;
18752        setTimeout(function() {
18753          that.checkState();
18754        }, 0);
18755    };
18756
vendor: 4,823 bytes, lines 18757-18880
18757    TabCollapse.DEFAULTS = {
18758        accordionClass: 'visible-xs',
18759        tabsClass: 'hidden-xs',
18760        accordionTemplate: function(heading, groupId, parentId, active) {
18761            return  '<div class="panel panel-default">' +
18762                    '   <div class="panel-heading">' +
18763                    '      <h4 class="panel-title">' +
18764                    '      </h4>' +
18765                    '   </div>' +
18766                    '   <div id="' + groupId + '" class="panel-collapse collapse ' + (active ? 'in' : '') + '">' +
18767                    '       <div class="panel-body js-tabcollapse-panel-body">' +
18768                    '       </div>' +
18769                    '   </div>' +
18770                    '</div>'
18771
18772        }
18773    };
18774
18775    TabCollapse.prototype.checkState = function(){
18776        if (this.$tabs.is(':visible') && this._accordionVisible){
18777            this.showTabs();
18778            this._accordionVisible = false;
18779        } else if (this.$accordion.is(':visible') && !this._accordionVisible){
18780            this.showAccordion();
18781            this._accordionVisible = true;
18782        }
18783    };
18784
18785    TabCollapse.prototype.showTabs = function(){
18786        var view = this;
18787        this.$tabs.trigger($.Event('show-tabs.bs.tabcollapse'));
18788
18789        var $panelHeadings = this.$accordion.find('.js-tabcollapse-panel-heading').detach();
18790
18791        $panelHeadings.each(function() {
18792            var $panelHeading = $(this),
18793            $parentLi = $panelHeading.data('bs.tabcollapse.parentLi');
18794
18795            var $oldHeading = view._panelHeadingToTabHeading($panelHeading);
18796
18797            $parentLi.removeClass('active');
18798            if ($parentLi.parent().hasClass('dropdown-menu') && !$parentLi.siblings('li').hasClass('active')) {
18799                $parentLi.parent().parent().removeClass('active');
18800            }
18801
18802            if (!$oldHeading.hasClass('collapsed')) {
18803                $parentLi.addClass('active');
18804                if ($parentLi.parent().hasClass('dropdown-menu')) {
18805                    $parentLi.parent().parent().addClass('active');
18806                }
18807            } else {
18808                $oldHeading.removeClass('collapsed');
18809            }
18810
18811            $parentLi.append($panelHeading);
18812        });
18813
18814        if (!$('li').hasClass('active')) {
18815            $('li').first().addClass('active')
18816        }
18817
18818        var $panelBodies = this.$accordion.find('.js-tabcollapse-panel-body');
18819        $panelBodies.each(function(){
18820            var $panelBody = $(this),
18821                $tabPane = $panelBody.data('bs.tabcollapse.tabpane');
18822            $tabPane.append($panelBody.contents().detach());
18823        });
18824        this.$accordion.html('');
18825
18826        if(this.options.updateLinks) {
18827            var $tabContents = this.getTabContentElement();
18828            $tabContents.find('[data-toggle-was="tab"], [data-toggle-was="pill"]').each(function() {
18829                var $el = $(this);
18830                var href = $el.attr('href').replace(/-collapse$/g, '');
18831                $el.attr({
18832                    'data-toggle': $el.attr('data-toggle-was'),
18833                    'data-toggle-was': '',
18834                    'data-parent': '',
18835                    href: href
18836                });
18837            });
18838        }
18839
18840        this.$tabs.trigger($.Event('shown-tabs.bs.tabcollapse'));
18841    };
18842
18843    TabCollapse.prototype.getTabContentElement = function(){
18844        var $tabContents = $(this.options.tabContentSelector);
18845        if($tabContents.length === 0) {
18846            $tabContents = this.$tabs.siblings('.tab-content');
18847        }
18848        return $tabContents;
18849    };
18850
18851    TabCollapse.prototype.showAccordion = function(){
18852        this.$tabs.trigger($.Event('show-accordion.bs.tabcollapse'));
18853
18854        var $headings = this.$tabs.find('li:not(.dropdown) [data-toggle="tab"], li:not(.dropdown) [data-toggle="pill"]'),
18855            view = this;
18856        $headings.each(function(){
18857            var $heading = $(this),
18858                $parentLi = $heading.parent();
18859            $heading.data('bs.tabcollapse.parentLi', $parentLi);
18860            view.$accordion.append(view._createAccordionGroup(view.$accordion.attr('id'), $heading.detach()));
18861        });
18862
18863        if(this.options.updateLinks) {
18864            var parentId = this.$accordion.attr('id');
18865            var $selector = this.$accordion.find('.js-tabcollapse-panel-body');
18866            $selector.find('[data-toggle="tab"], [data-toggle="pill"]').each(function() {
18867                var $el = $(this);
18868                var href = $el.attr('href') + '-collapse';
18869                $el.attr({
18870                    'data-toggle-was': $el.attr('data-toggle'),
18871                    'data-toggle': 'collapse',
18872                    'data-parent': '#' + parentId,
18873                    href: href
18874                });
18875            });
18876        }
18877
18878        this.$tabs.trigger($.Event('shown-accordion.bs.tabcollapse'));
18879    };
18880
18881    TabCollapse.prototype._panelHeadingToTabHeading = function($heading) {
18882        var href = $heading.attr('href').replace(/-collapse$/g, '');
18883        $heading.attr({
18884            'data-toggle': 'tab',
18885            'href': href,
18886            'data-parent': ''
18887        });
18888        return $heading;
18889    };
18890
18891    TabCollapse.prototype._tabHeadingToPanelHeading = function($heading, groupId, parentId, active) {
18892        $heading.addClass('js-tabcollapse-panel-heading ' + (active ? '' : 'collapsed'));
18893        $heading.attr({
18894            'data-toggle': 'collapse',
18895            'data-parent': '#' + parentId,
18896            'href': '#' + groupId
18897        });
18898        return $heading;
18899    };
18900
18901    TabCollapse.prototype._checkStateOnResize = function(){
18902        var view = this;
18903        $(window).resize(function(){
18904            clearTimeout(view._resizeTimeout);
18905            view._resizeTimeout = setTimeout(function(){
18906                view.checkState();
18907            }, 100);
18908        });
18909    };
18910
18911
18912    TabCollapse.prototype._initAccordion = function(){
18913        var randomString = function() {
18914            var result = "",
18915                possible = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
18916            for( var i=0; i < 5; i++ ) {
18917                result += possible.charAt(Math.floor(Math.random() * possible.length));
18918            }
18919            return result;
18920        };
18921
18922        var srcId = this.$tabs.attr('id'),
18923            accordionId = (srcId ? srcId : randomString()) + '-accordion';
18924
18925        this.$accordion = $('<div class="panel-group ' + this.options.accordionClass + '" id="' + accordionId +'"></div>');
18926        this.$tabs.after(this.$accordion);
18927        this.$tabs.addClass(this.options.tabsClass);
18928        this.getTabContentElement().addClass(this.options.tabsClass);
18929    };
18930
18931    TabCollapse.prototype._createAccordionGroup = function(parentId, $heading){
18932        var tabSelector = $heading.attr('data-target'),
18933            active = $heading.data('bs.tabcollapse.parentLi').is('.active');
18934
18935        if (!tabSelector) {
18936            tabSelector = $heading.attr('href');
18937            tabSelector = tabSelector && tabSelector.replace(/.*(?=#[^\s]*$)/, ''); //strip for ie7
18938        }
18939
18940        var $tabPane = $(tabSelector),
18941            groupId = $tabPane.attr('id') + '-collapse',
18942            $panel = $(this.options.accordionTemplate($heading, groupId, parentId, active));
18943        $panel.find('.panel-heading > .panel-title').append(this._tabHeadingToPanelHeading($heading, groupId, parentId, active));
18944        $panel.find('.panel-body').append($tabPane.contents().detach())
18945            .data('bs.tabcollapse.tabpane', $tabPane);
18946
18947        return $panel;
18948    };
18949
18950
18951
18952    // TABCOLLAPSE PLUGIN DEFINITION
18953    // =======================
18954
18955    $.fn.tabCollapse = function (option) {
18956        return this.each(function () {
18957            var $this   = $(this);
18958            var data    = $this.data('bs.tabcollapse');
18959            var options = $.extend({}, TabCollapse.DEFAULTS, $this.data(), typeof option === 'object' && option);
18960
18961            if (!data) $this.data('bs.tabcollapse', new TabCollapse(this, options));
18962        });
18963    };
18964
18965    $.fn.tabCollapse.Constructor = TabCollapse;
18966
18967
18968}(window.jQuery);
18969;
18970!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):a(jQuery)}(function(a){a.ui=a.ui||{};a.ui.version="1.12.1";!function(){function b(a,b,c){return[parseFloat(a[0])*(l.test(a[0])?b/100:1),parseFloat(a[1])*(l.test(a[1])?c/100:1)]}function c(b,c){return parseInt(a.css(b,c),10)||0}function d(b){var c=b[0];return 9===c.nodeType?{width:b.width(),height:b.height(),offset:{top:0,left:0}}:a.isWindow(c)?{width:b.width(),height:b.height(),offset:{top:b.scrollTop(),left:b.scrollLeft()}}:c.preventDefault?{width:0,height:0,offset:{top:c.pageY,left:c.pageX}}:{width:b.outerWidth(),height:b.outerHeight(),offset:b.offset()}}var e,f=Math.max,g=Math.abs,h=/left|center|right/,i=/top|center|bottom/,j=/[\+\-]\d+(\.[\d]+)?%?/,k=/^\w+/,l=/%$/,m=a.fn.pos;a.pos={scrollbarWidth:function(){if(void 0!==e)return e;var b,c,d=a("<div style='display:block;position:absolute;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>"),f=d.children()[0];return a("body").append(d),b=f.offsetWidth,d.css("overflow","scroll"),c=f.offsetWidth,b===c&&(c=d[0].clientWidth),d.remove(),e=b-c},getScrollInfo:function(b){var c=b.isWindow||b.isDocument?"":b.element.css("overflow-x"),d=b.isWindow||b.isDocument?"":b.element.css("overflow-y"),e="scroll"===c||"auto"===c&&b.width<b.element[0].scrollWidth;return{width:"scroll"===d||"auto"===d&&b.height<b.element[0].scrollHeight?a.pos.scrollbarWidth():0,height:e?a.pos.scrollbarWidth():0}},getWithinInfo:function(b){var c=a(b||window),d=a.isWindow(c[0]),e=!!c[0]&&9===c[0].nodeType;return{element:c,isWindow:d,isDocument:e,offset:d||e?{left:0,top:0}:a(b).offset(),scrollLeft:c.scrollLeft(),scrollTop:c.scrollTop(),width:c.outerWidth(),height:c.outerHeight()}}},a.fn.pos=function(e){if(!e||!e.of)return m.apply(this,arguments);e=a.extend({},e);var l,n,o,p,q,r,s=a(e.of),t=a.pos.getWithinInfo(e.within),u=a.pos.getScrollInfo(t),v=(e.collision||"flip").split(" "),w={};return r=d(s),s[0].preventDefault&&(e.at="left top"),n=r.width,o=r.height,p=r.offset,q=a.extend({},p),a.each(["my","at"],function(){var a,b,c=(e[this]||"").split(" ");1===c.length&&(c=h.test(c[0])?c.concat(["center"]):i.test(c[0])?["center"].concat(c):["center","center"]),c[0]=h.test(c[0])?c[0]:"center",c[1]=i.test(c[1])?c[1]:"center",a=j.exec(c[0]),b=j.exec(c[1]),w[this]=[a?a[0]:0,b?b[0]:0],e[this]=[k.exec(c[0])[0],k.exec(c[1])[0]]}),1===v.length&&(v[1]=v[0]),"right"===e.at[0]?q.left+=n:"center"===e.at[0]&&(q.left+=n/2),"bottom"===e.at[1]?q.top+=o:"center"===e.at[1]&&(q.top+=o/2),l=b(w.at,n,o),q.left+=l[0],q.top+=l[1],this.each(function(){var d,h,i=a(this),j=i.outerWidth(),k=i.outerHeight(),m=c(this,"marginLeft"),r=c(this,"marginTop"),x=j+m+c(this,"marginRight")+u.width,y=k+r+c(this,"marginBottom")+u.height,z=a.extend({},q),A=b(w.my,i.outerWidth(),i.outerHeight());"right"===e.my[0]?z.left-=j:"center"===e.my[0]&&(z.left-=j/2),"bottom"===e.my[1]?z.top-=k:"center"===e.my[1]&&(z.top-=k/2),z.left+=A[0],z.top+=A[1],d={marginLeft:m,marginTop:r},a.each(["left","top"],function(b,c){a.ui.pos[v[b]]&&a.ui.pos[v[b]][c](z,{targetWidth:n,targetHeight:o,elemWidth:j,elemHeight:k,collisionPosition:d,collisionWidth:x,collisionHeight:y,offset:[l[0]+A[0],l[1]+A[1]],my:e.my,at:e.at,within:t,elem:i})}),e.using&&(h=function(a){var b=p.left-z.left,c=b+n-j,d=p.top-z.to
18970p,h=d+o-k,l={target:{element:s,left:p.left,top:p.top,width:n,height:o},element:{element:i,left:z.left,top:z.top,width:j,height:k},horizontal:c<0?"left":b>0?"right":"center",vertical:h<0?"top":d>0?"bottom":"middle"};n<j&&g(b+c)<n&&(l.horizontal="center"),o<k&&g(d+h)<o&&(l.vertical="middle"),f(g(b),g(c))>f(g(d),g(h))?l.important="horizontal":l.important="vertical",e.using.call(this,a,l)}),i.offset(a.extend(z,{using:h}))})},a.ui.pos={_trigger:function(a,b,c,d){b.elem&&b.elem.trigger({type:c,position:a,positionData:b,triggered:d})},fit:{left:function(b,c){a.ui.pos._trigger(b,c,"posCollide","fitLeft");var d,e=c.within,g=e.isWindow?e.scrollLeft:e.offset.left,h=e.width,i=b.left-c.collisionPosition.marginLeft,j=g-i,k=i+c.collisionWidth-h-g;c.collisionWidth>h?j>0&&k<=0?(d=b.left+j+c.collisionWidth-h-g,b.left+=j-d):b.left=k>0&&j<=0?g:j>k?g+h-c.collisionWidth:g:j>0?b.left+=j:k>0?b.left-=k:b.left=f(b.left-i,b.left),a.ui.pos._trigger(b,c,"posCollided","fitLeft")},top:function(b,c){a.ui.pos._trigger(b,c,"posCollide","fitTop");var d,e=c.within,g=e.isWindow?e.scrollTop:e.offset.top,h=c.within.height,i=b.top-c.collisionPosition.marginTop,j=g-i,k=i+c.collisionHeight-h-g;c.collisionHeight>h?j>0&&k<=0?(d=b.top+j+c.collisionHeight-h-g,b.top+=j-d):b.top=k>0&&j<=0?g:j>k?g+h-c.collisionHeight:g:j>0?b.top+=j:k>0?b.top-=k:b.top=f(b.top-i,b.top),a.ui.pos._trigger(b,c,"posCollided","fitTop")}},flip:{left:function(b,c){a.ui.pos._trigger(b,c,"posCollide","flipLeft");var d,e,f=c.within,h=f.offset.left+f.scrollLeft,i=f.width,j=f.isWindow?f.scrollLeft:f.offset.left,k=b.left-c.collisionPosition.marginLeft,l=k-j,m=k+c.collisionWidth-i-j,n="left"===c.my[0]?-c.elemWidth:"right"===c.my[0]?c.elemWidth:0,o="left"===c.at[0]?c.targetWidth:"right"===c.at[0]?-c.targetWidth:0,p=-2*c.offset[0];l<0?((d=b.left+n+o+p+c.collisionWidth-i-h)<0||d<g(l))&&(b.left+=n+o+p):m>0&&((e=b.left-c.collisionPosition.marginLeft+n+o+p-j)>0||g(e)<m)&&(b.left+=n+o+p),a.ui.pos._trigger(b,c,"posCollided","flipLeft")},top:function(b,c){a.ui.pos._trigger(b,c,"posCollide","flipTop");var d,e,f=c.within,h=f.offset.top+f.scrollTop,i=f.height,j=f.isWindow?f.scrollTop:f.offset.top,k=b.top-c.collisionPosition.marginTop,l=k-j,m=k+c.collisionHeight-i-j,n="top"===c.my[1],o=n?-c.elemHeight:"bottom"===c.my[1]?c.elemHeight:0,p="top"===c.at[1]?c.targetHeight:"bottom"===c.at[1]?-c.targetHeight:0,q=-2*c.offset[1];l<0?((e=b.top+o+p+q+c.collisionHeight-i-h)<0||e<g(l))&&(b.top+=o+p+q):m>0&&((d=b.top-c.collisionPosition.marginTop+o+p+q-j)>0||g(d)<m)&&(b.top+=o+p+q),a.ui.pos._trigger(b,c,"posCollided","flipTop")}},flipfit:{left:function(){a.ui.pos.flip.left.apply(this,arguments),a.ui.pos.fit.left.apply(this,arguments)},top:function(){a.ui.pos.flip.top.apply(this,arguments),a.ui.pos.fit.top.apply(this,arguments)}}},function(){var b,c,d,e,f,g=document.getElementsByTagName("body")[0],h=document.createElement("div");b=document.createElement(g?"div":"body"),d={visibility:"hidden",width:0,height:0,border:0,margin:0,background:"none"},g&&a.extend(d,{position:"absolute",left:"-1000px",top:"-1000px"});for(f in d)b.style[f]=d[f];b.appendChild(h),c=g||document.documentElement,c.insertBefore(b,c.firstChild),h.style.cssText="position: absolute; left: 10.7432222px;",e=a(h).offset().left,a.support.offsetFractions=e>10&&e<11,b.innerHTML="",c.removeChild(b)}()}();a.ui.position}),function(a){"use strict";"function"==typeof define&&define.amd?define(["jquery"],a):window.jQuery&&!window.jQuery.fn.iconpicker&&a(window.jQuery)}(function(a){"use strict";var b={isEmpty:function(a){return!1===a||""===a||null===a||void 0===a},isEmptyObject:function(a){return!0===this.isEmpty(a)||0===a.length},isElement:function(b){return a(b).length>0},isString:function(a){return"string"==typeof a||a instanceof String},isArray:function(b){return a.isArray(b)},inArray:function(b,c){return-1!==a.inArray(b,c)},throwError:function(a){throw"Font Awesome Icon Picker Exception: "+a}},c=function(d,e){this._id=c._idCounter++,this.element=a(d).addClass("iconpicker-element"),this._trigger("iconpickerCreate"),this.options=a.extend({},c.defaultOptions,this.element.data(),e),this.options.templates=a.extend({},c.defaultOptions.templates,this.options.templates),this.options.originalPlacement=this.options.placement,this.container=!!b.isElement(this.options.container)&&a(this.options.container),!1===this.container&&(this.element.is(".dropdown-toggle")?this.container=a("~ .dropdown-menu:first",this.element):this.container=this.element.is("input,textarea,button,.btn")?this.element.parent():this.element),this.container.addClass("iconpicker-container"),this.isDropdownMenu()&&(this.options.templates.search=!1,this.options.templates.buttons=!1,this.options.placement="inline"),this.input=!!this.element.is("input,textarea")&&this.element.addClass("iconpicker-input"),!1===this.input&&(this.input=this.container.find(this.options.input),this.input.is("input,textarea")||(this.input=!1)),this.component=this.isDropdownMenu()?this.container.parent().find(this.options.component):this.container.find(this.options.component),0===this.component.length?this.component=!1:this.component.find("i").addClass("iconpicker-component"),this._createPopover(),this._createIconpicker(),0===this.getAcceptButton().length&&(this.options.mustAccept=!1),this.isInputGroup()?this.container.parent().append(this.popover):this.container.append(this.popover),this._bindElementEvents(),this._bindWindowEvents(),this.update(this.options.selected),this.isInline()&&this.show(),this._trigger("iconpickerCreated")};c._idCounter=0,c.defaultOptions={title:!1,selected:!1,defaultValue:!1,placement:"bottom",collision:"none",animation:!0,hideOnSelect:!1,showFooter:!1,searchInFooter:!1,mustAccept:!1,selectedCustomClass:"bg-primary",icons:[],fullClassFormatter:function(a){return"fa "+a},input:"input,.iconpicker-input",inputSearch:!1,container:!1,component:".input-group-addon,.iconpicker-component",templates:{popover:'<div class="iconpicker-popover popover"><div class="arrow"></div><div class="popover-title"></div><div class="popover-content"></div></div>
18970',footer:'<div class="popover-footer"></div>',buttons:'<button class="iconpicker-btn iconpicker-btn-cancel btn btn-default btn-sm">Cancel</button> <button class="iconpicker-btn iconpicker-btn-accept btn btn-primary btn-sm">Accept</button>',search:'<input type="search" class="form-control iconpicker-search" placeholder="Type to filter" />',iconpicker:'<div class="iconpicker"><div class="iconpicker-items"></div></div>',iconpickerItem:'<a role="button" href="#" class="iconpicker-item"><i></i></a>'}},c.batch=function(b,c){var d=Array.prototype.slice.call(arguments,2);return a(b).each(function(){var b=a(this).data("iconpicker");b&&b[c].apply(b,d)})},c.prototype={constructor:c,options:{},_id:0,_trigger:function(b,c){c=c||{},this.element.trigger(a.extend({type:b,iconpickerInstance:this},c))},_createPopover:function(){this.popover=a(this.options.templates.popover);var c=this.popover.find(".popover-title");if(this.options.title&&c.append(a('<div class="popover-title-text">'+this.options.title+"</div>")),this.hasSeparatedSearchInput()&&!this.options.searchInFooter?c.append(this.options.templates.search):this.options.title||c.remove(),this.options.showFooter&&!b.isEmpty(this.options.templates.footer)){var d=a(this.options.templates.footer);this.hasSeparatedSearchInput()&&this.options.searchInFooter&&d.append(a(this.options.templates.search)),b.isEmpty(this.options.templates.buttons)||d.append(a(this.options.templates.buttons)),this.popover.append(d)}return!0===this.options.animation&&this.popover.addClass("fade"),this.popover},_createIconpicker:function(){var b=this;this.iconpicker=a(this.options.templates.iconpicker);var c=function(c){var d=a(this);return d.is("i")&&(d=d.parent()),b._trigger("iconpickerSelect",{iconpickerItem:d,iconpickerValue:b.iconpickerValue}),!1===b.options.mustAccept?(b.update(d.data("iconpickerValue")),b._trigger("iconpickerSelected",{iconpickerItem:this,iconpickerValue:b.iconpickerValue})):b.update(d.data("iconpickerValue"),!0),b.options.hideOnSelect&&!1===b.options.mustAccept&&b.hide(),c.preventDefault(),!1};for(var d in this.options.icons)if("string"==typeof this.options.icons[d]){var e=a(this.options.templates.iconpickerItem);e.find("i").addClass(this.options.fullClassFormatter(this.options.icons[d])),e.data("iconpickerValue",this.options.icons[d]).on("click.iconpicker",c),this.iconpicker.find(".iconpicker-items").append(e.attr("title","."+this.options.icons[d]))}return this.popover.find(".popover-content").append(this.iconpicker),this.iconpicker},_isEventInsideIconpicker:function(b){var c=a(b.target);return!((!c.hasClass("iconpicker-element")||c.hasClass("iconpicker-element")&&!c.is(this.element))&&0===c.parents(".iconpicker-popover").length)},_bindElementEvents:function(){var c=this;this.getSearchInput().on("keyup.iconpicker",function(){c.filter(a(this).val().toLowerCase())}),this.getAcceptButton().on("click.iconpicker",function(){var a=c.iconpicker.find(".iconpicker-selected").get(0);c.update(c.iconpickerValue),c._trigger("iconpickerSelected",{iconpickerItem:a,iconpickerValue:c.iconpickerValue}),c.isInline()||c.hide()}),this.getCancelButton().on("click.iconpicker",function(){c.isInline()||c.hide()}),this.element.on("focus.iconpicker",function(a){c.show(),a.stopPropagation()}),this.hasComponent()&&this.component.on("click.iconpicker",function(){c.toggle()}),this.hasInput()&&this.input.on("keyup.iconpicker",function(d){b.inArray(d.keyCode,[38,40,37,39,16,17,18,9,8,91,93,20,46,186,190,46,78,188,44,86])?c._updateFormGroupStatus(!1!==c.getValid(this.value)):c.update(),!0===c.options.inputSearch&&c.filter(a(this).val().toLowerCase())})},_bindWindowEvents:function(){var b=a(window.document),c=this,d=".iconpicker.inst"+this._id;return a(window).on("resize.iconpicker"+d+" orientationchange.iconpicker"+d,function(a){c.popover.hasClass("in")&&c.updatePlacement()}),c.isInline()||b.on("mouseup"+d,function(a){return c._isEventInsideIconpicker(a)||c.isInline()||c.hide(),a.stopPropagation(),a.preventDefault(),!1}),!1},_unbindElementEvents:function(){this.popover.off(".iconpicker"),this.element.off(".iconpicker"),this.hasInput()&&this.input.off(".iconpicker"),this.hasComponent()&&this.component.off(".iconpicker"),this.hasContainer()&&this.container.off(".iconpicker")},_unbindWindowEvents:function(){a(window).off(".iconpicker.inst"+this._id),a(window.document).off(".iconpicker.inst"+this._id)}
18970,updatePlacement:function(b,c){b=b||this.options.placement,this.options.placement=b,c=c||this.options.collision,c=!0===c?"flip":c;var d={at:"right bottom",my:"right top",of:this.hasInput()&&!this.isInputGroup()?this.input:this.container,collision:!0===c?"flip":c,within:window};if(this.popover.removeClass("inline topLeftCorner topLeft top topRight topRightCorner rightTop right rightBottom bottomRight bottomRightCorner bottom bottomLeft bottomLeftCorner leftBottom left leftTop"),"object"==typeof b)return this.popover.pos(a.extend({},d,b));switch(b){case"inline":d=!1;break;case"topLeftCorner":d.my="right bottom",d.at="left top";break;case"topLeft":d.my="left bottom",d.at="left top";break;case"top":d.my="center bottom",d.at="center top";break;case"topRight":d.my="right bottom",d.at="right top";break;case"topRightCorner":d.my="left bottom",d.at="right top";break;case"rightTop":d.my="left bottom",d.at="right center";break;case"right":d.my="left center",d.at="right center";break;case"rightBottom":d.my="left top",d.at="right center";break;case"bottomRightCorner":d.my="left top",d.at="right bottom";break;case"bottomRight":d.my="right top",d.at="right bottom";break;case"bottom":d.my="center top",d.at="center bottom";break;case"bottomLeft":d.my="left top",d.at="left bottom";break;case"bottomLeftCorner":d.my="right top",d.at="left bottom";break;case"leftBottom":d.my="right top",d.at="left center";break;case"left":d.my="right center",d.at="left center";break;case"leftTop":d.my="right bottom",d.at="left center";break;default:return!1}return this.popover.css({display:"inline"===this.options.placement?"":"block"}),!1!==d?this.popover.pos(d).css("maxWidth",a(window).width()-this.container.offset().left-5):this.popover.css({top:"auto",right:"auto",bottom:"auto",left:"auto",maxWidth:"none"}),this.popover.addClass(this.options.placement),!0},_updateComponents:function(){if(this.iconpicker.find(".iconpicker-item.iconpicker-selected").removeClass("iconpicker-selected "+this.options.selectedCustomClass),this.iconpickerValue&&this.iconpicker.find("."+this.options.fullClassFormatter(this.iconpickerValue).replace(/ /g,".")).parent().addClass("iconpicker-selected "+this.options.selectedCustomClass),this.hasComponent()){var a=this.component.find("i");a.length>0?a.attr("class",this.options.fullClassFormatter(this.iconpickerValue)):this.component.html(this.getHtml())}},_updateFormGroupStatus:function(a){return!!this.hasInput()&&(!1!==a?this.input.parents(".form-group:first").removeClass("has-error"):this.input.parents(".form-group:first").addClass("has-error"),!0)},getValid:function(c){b.isString(c)||(c="");var d=""===c;return c=a.trim(c),!(!b.inArray(c,this.options.icons)&&!d)&&c},setValue:function(a){var b=this.getValid(a);return!1!==b?(this.iconpickerValue=b,this._trigger("iconpickerSetValue",{iconpickerValue:b}),this.iconpickerValue):(this._trigger("iconpickerInvalid",{iconpickerValue:a}),!1)},getHtml:function(){return'<i class="'+this.options.fullClassFormatter(this.iconpickerValue)+'"></i>'},setSourceValue:function(a){return a=this.setValue(a),!1!==a&&""!==a&&(this.hasInput()?this.input.val(this.iconpickerValue):this.element.data("iconpickerValue",this.iconpickerValue),this._trigger("iconpickerSetSourceValue",{iconpickerValue:a})),a},getSourceValue:function(a){a=a||this.options.defaultValue;var b=a;return b=this.hasInput()?this.input.val():this.element.data("iconpickerValue"),void 0!==b&&""!==b&&null!==b&&!1!==b||(b=a),b},hasInput:function(){return!1!==this.input},isInputSearch:function(){return this.hasInput()&&!0===this.options.inputSearch},isInputGroup:function(){return this.container.is(".input-group")},isDropdownMenu:function(){return this.container.is(".dropdown-menu")},hasSeparatedSearchInput:function(){return!1!==this.options.templates.search&&!this.isInputSearch()},hasComponent:function(){return!1!==this.component},hasContainer:function(){return!1!==this.container},getAcceptButton:function(){return this.popover.find(".iconpicker-btn-accept")},getCancelButton:function(){return this.popover.find(".iconpicker-btn-cancel")}
vendor: 8,859 bytes, line 18970
18970,getSearchInput:function(){return this.popover.find(".iconpicker-search")},filter:function(c){if(b.isEmpty(c))return this.iconpicker.find(".iconpicker-item").show(),a(!1);var d=[];return this.iconpicker.find(".iconpicker-item").each(function(){var b=a(this),e=b.attr("title").toLowerCase(),f=!1;try{f=new RegExp(c,"g")}catch(a){f=!1}!1!==f&&e.match(f)?(d.push(b),b.show()):b.hide()}),d},show:function(){if(this.popover.hasClass("in"))return!1;a.iconpicker.batch(a(".iconpicker-popover.in:not(.inline)").not(this.popover),"hide"),this._trigger("iconpickerShow"),this.updatePlacement(),this.popover.addClass("in"),setTimeout(a.proxy(function(){this.popover.css("display",this.isInline()?"":"block"),this._trigger("iconpickerShown")},this),this.options.animation?300:1)},hide:function(){if(!this.popover.hasClass("in"))return!1;this._trigger("iconpickerHide"),this.popover.removeClass("in"),setTimeout(a.proxy(function(){this.popover.css("display","none"),this.getSearchInput().val(""),this.filter(""),this._trigger("iconpickerHidden")},this),this.options.animation?300:1)},toggle:function(){this.popover.is(":visible")?this.hide():this.show(!0)},update:function(a,b){return a=a||this.getSourceValue(this.iconpickerValue),this._trigger("iconpickerUpdate"),!0===b?a=this.setValue(a):(a=this.setSourceValue(a),this._updateFormGroupStatus(!1!==a)),!1!==a&&this._updateComponents(),this._trigger("iconpickerUpdated"),a},destroy:function(){this._trigger("iconpickerDestroy"),this.element.removeData("iconpicker").removeData("iconpickerValue").removeClass("iconpicker-element"),this._unbindElementEvents(),this._unbindWindowEvents(),a(this.popover).remove(),this._trigger("iconpickerDestroyed")},disable:function(){return!!this.hasInput()&&(this.input.prop("disabled",!0),!0)},enable:function(){return!!this.hasInput()&&(this.input.prop("disabled",!1),!0)},isDisabled:function(){return!!this.hasInput()&&!0===this.input.prop("disabled")},isInline:function(){return"inline"===this.options.placement||this.popover.hasClass("inline")}},a.iconpicker=c,a.fn.iconpicker=function(b){return this.each(function(){var d=a(this);d.data("iconpicker")||d.data("iconpicker",new c(this,"object"==typeof b?b:{}))})},c.defaultOptions.icons=["fa-500px","fa-address-book","fa-address-book-o","fa-address-card","fa-address-card-o","fa-adjust","fa-adn","fa-align-center","fa-align-justify","fa-align-left","fa-align-right","fa-amazon","fa-ambulance","fa-american-sign-language-interpreting","fa-anchor","fa-android","fa-angellist","fa-angle-double-down","fa-angle-double-left","fa-angle-double-right","fa-angle-double-up","fa-angle-down","fa-angle-left","fa-angle-right","fa-angle-up","fa-apple","fa-archive","fa-area-chart","fa-arrow-circle-down","fa-arrow-circle-left","fa-arrow-circle-o-down","fa-arrow-circle-o-left","fa-arrow-circle-o-right","fa-arrow-circle-o-up","fa-arrow-circle-right","fa-arrow-circle-up","fa-arrow-down","fa-arrow-left","fa-arrow-right","fa-arrow-up","fa-arrows","fa-arrows-alt","fa-arrows-h","fa-arrows-v","fa-asl-interpreting","fa-assistive-listening-systems","fa-asterisk","fa-at","fa-audio-description","fa-automobile","fa-backward","fa-balance-scale","fa-ban","fa-bandcamp","fa-bank","fa-bar-chart","fa-bar-chart-o","fa-barcode","fa-bars","fa-bath","fa-bathtub","fa-battery","fa-battery-0","fa-battery-1","fa-battery-2","fa-battery-3","fa-battery-4","fa-battery-empty","fa-battery-full","fa-battery-half","fa-battery-quarter","fa-battery-three-quarters","fa-bed","fa-beer","fa-behance","fa-behance-square","fa-bell","fa-bell-o","fa-bell-slash","fa-bell-slash-o","fa-bicycle","fa-binoculars","fa-birthday-cake","fa-bitbucket","fa-bitbucket-square","fa-bitcoin","fa-black-tie","fa-blind","fa-bluetooth","fa-bluetooth-b","fa-bold","fa-bolt","fa-bomb","fa-book","fa-bookmark","fa-bookmark-o","fa-braille","fa-briefcase","fa-btc","fa-bug","fa-building","fa-building-o","fa-bullhorn","fa-bullseye","fa-bus","fa-buysellads","fa-cab","fa-calculator","fa-calendar","fa-calendar-check-o","fa-calendar-minus-o","fa-calendar-o","fa-calendar-plus-o","fa-calendar-times-o","fa-camera","fa-camera-retro","fa-car","fa-caret-down","fa-caret-left","fa-caret-right","fa-caret-square-o-down","fa-caret-square-o-left","fa-caret-square-o-right","fa-caret-square-o-up","fa-caret-up","fa-cart-arrow-down","fa-cart-plus","fa-cc","fa-cc-amex","fa-cc-diners-club","fa-cc-discover","fa-cc-jcb","fa-cc-mastercard","fa-cc-paypal","fa-cc-stripe","fa-cc-visa","fa-certificate","fa-chain","fa-chain-broken","fa-check","fa-check-circle","fa-check-circle-o","fa-check-square","fa-check-square-o","fa-chevron-circle-down","fa-chevron-circle-left","fa-chevron-circle-right","fa-chevron-circle-up","fa-chevron-down","fa-chevron-left","fa-chevron-right","fa-chevron-up","fa-child","fa-chrome","fa-circle","fa-circle-o","fa-circle-o-notch","fa-circle-thin","fa-clipboard","fa-clock-o","fa-clone","fa-close","fa-cloud","fa-cloud-download","fa-cloud-upload","fa-cny","fa-code","fa-code-fork","fa-codepen","fa-codiepie","fa-coffee","fa-cog","fa-cogs","fa-columns","fa-comment","fa-comment-o","fa-commenting","fa-commenting-o","fa-comments","fa-comments-o","fa-compass","fa-compress","fa-connectdevelop","fa-contao","fa-copy","fa-copyright","fa-creative-commons","fa-credit-card","fa-credit-card-alt","fa-crop","fa-crosshairs","fa-css3","fa-cube","fa-cubes","fa-cut","fa-cutlery","fa-dashboard","fa-dashcube","fa-database","fa-deaf","fa-deafness","fa-dedent","fa-delicious","fa-desktop","fa-deviantart","fa-diamond","fa-digg","fa-dollar","fa-dot-circle-o","fa-download","fa-dribbble","fa-drivers-license","fa-drivers-license-o","fa-dropbox","fa-drupal","fa-edge","fa-edit","fa-eercast","fa-eject","fa-ellipsis-h","fa-ellipsis-v","fa-empire","fa-envelope","fa-envelope-o","fa-envelope-open","fa-envelope-open-o","fa-envelope-square","fa-envira","fa-eraser","fa-etsy","fa-eur","fa-euro","fa-exchange","fa-exclamation","fa-exclamation-circle","fa-exclamation-triangle","fa-expand","fa-expeditedssl","fa-external-link","fa-external-link-square","fa-eye","fa-eye-slash","fa-eyedropper","fa-fa","fa-facebook","fa-facebook-f","fa-facebook-official","fa-facebook-square","fa-fast-backward","fa-fast-forward","fa-fax","fa-feed","fa-female","fa-fighter-jet","fa-file","fa-file-archive-o","fa-file-audio-o","fa-file-code-o","fa-file-excel-o","fa-file-image-o","fa-file-movie-o","fa-file-o","fa-file-pdf-o","fa-file-photo-o","fa-file-picture-o","fa-file-powerpoint-o","fa-file-sound-o","fa-file-text","fa-file-text-o","fa-file-video-o","fa-file-word-o","fa-file-zip-o","fa-files-o","fa-film","fa-filter","fa-fire","fa-fire-extinguisher","fa-firefox","fa-first-order","fa-flag","fa-flag-checkered","fa-flag-o","fa-flash","fa-flask","fa-flickr","fa-floppy-o","fa-folder","fa-folder-o","fa-folder-open","fa-folder-open-o","fa-font","fa-font-awesome","fa-fonticons","fa-fort-awesome","fa-forumbee","fa-forward","fa-foursquare","fa-free-code-camp","fa-frown-o","fa-futbol-o","fa-gamepad","fa-gavel","fa-gbp","fa-ge","fa-gear","fa-gears","fa-genderless","fa-get-pocket","fa-gg","fa-gg-circle","fa-gift","fa-git","fa-git-square","fa-github","fa-github-alt","fa-github-square","fa-gitlab","fa-gittip","fa-glass","fa-glide","fa-glide-g","fa-globe","fa-google","fa-google-plus","fa-google-plus-circle","fa-google-plus-official","fa-google-plus-square","fa-google-wallet","fa-graduation-cap","fa-gratipay","fa-grav","fa-group","fa-h-square","fa-hacker-news","fa-hand-grab-o","fa-hand-lizard-o","fa-hand-o-down","fa-hand-o-left","fa-hand-o-right","fa-hand-o-up","fa-hand-paper-o","fa-hand-peace-o","fa-hand-pointer-o","fa-hand-rock-o","fa-hand-scissors-o","fa-hand-spock-o","fa-hand-stop-o","fa-handshake-o","fa-hard-of-hearing","fa-hashtag","fa-hdd-o","fa-header","fa-headphones","fa-heart","fa-heart-o","fa-heartbeat","fa-history","fa-home","fa-hospital-o","fa-hotel","fa-hourglass","fa-hourglass-1","fa-hourglass-2","fa-hourglass-3","fa-hourglass-end","fa-hourglass-half","fa-hourglass-o","fa-hourglass-start","fa-houzz","fa-html5","fa-i-cursor","fa-id-badge","fa-id-card","fa-id-card-o","fa-ils","fa-image","fa-imdb","fa-inbox","fa-indent","fa-industry","fa-info","fa-info-circle","fa-inr","fa-instagram","fa-institution","fa-internet-explorer","fa-intersex","fa-ioxhost","fa-italic","fa-joomla","fa-jpy","fa-jsfiddle","fa-key","fa-keyboard-o","fa-krw","fa-language","fa-laptop","fa-lastfm","fa-lastfm-square","fa-leaf","fa-leanpub","fa-legal","fa-lemon-o","fa-level-down","fa-level-up","fa-life-bouy","fa-life-buoy","fa-life-ring","fa-life-saver","fa-lightbulb-o","fa-line-chart","fa-link","fa-linkedin","fa-linkedin-square","fa-linode","fa-linux","fa-list","fa-list-alt","fa-list-ol","fa-list-ul","fa-location-arrow","fa-lock","fa-long-arrow-down","fa-long-arrow-left","fa-long-arrow-right","fa-long-arrow-up","fa-low-vision","fa-magic","fa-magnet","fa-mail-forward","fa-mail-reply","fa-mail-reply-all","fa-male","fa-ma
18970p","fa-map-marker","fa-map-o","fa-map-pin","fa-map-signs","fa-mars","fa-mars-double","fa-mars-stroke","fa-mars-stroke-h","fa-mars-stroke-v","fa-maxcdn","fa-meanpath","fa-medium","fa-medkit","fa-meetup","fa-meh-o","fa-mercury","fa-microchip","fa-microphone","fa-microphone-slash","fa-minus","fa-minus-circle","fa-minus-square","fa-minus-square-o","fa-mixcloud","fa-mobile","fa-mobile-phone","fa-modx","fa-money","fa-moon-o","fa-mortar-board","fa-motorcycle","fa-mouse-pointer","fa-music","fa-navicon","fa-neuter","fa-newspaper-o","fa-object-group","fa-object-ungroup","fa-odnoklassniki","fa-odnoklassniki-square","fa-opencart","fa-openid","fa-opera","fa-optin-monster","fa-outdent","fa-pagelines","fa-paint-brush","fa-paper-plane","fa-paper-plane-o","fa-paperclip","fa-paragraph","fa-paste","fa-pause","fa-pause-circle","fa-pause-circle-o","fa-paw","fa-paypal","fa-pencil","fa-pencil-square","fa-pencil-square-o","fa-percent","fa-phone","fa-phone-square","fa-photo","fa-picture-o","fa-pie-chart","fa-pied-piper","fa-pied-piper-alt","fa-pied-piper-pp","fa-pinterest","fa-pinterest-p","fa-pinterest-square","fa-plane","fa-play","fa-play-circle","fa-play-circle-o","fa-plug","fa-plus","fa-plus-circle","fa-plus-square","fa-plus-square-o","fa-podcast","fa-power-off","fa-print","fa-product-hunt","fa-puzzle-piece","fa-qq","fa-qrcode","fa-question","fa-question-circle","fa-question-circle-o","fa-quora","fa-quote-left","fa-quote-right","fa-ra","fa-random","fa-ravelry","fa-rebel","fa-recycle","fa-reddit","fa-reddit-alien","fa-reddit-square","fa-refresh","fa-registered","fa-remove","fa-renren","fa-reorder","fa-repeat","fa-reply","fa-reply-all","fa-resistance","fa-retweet","fa-rmb","fa-road","fa-rocket","fa-rotate-left","fa-rotate-right","fa-rouble","fa-rss","fa-rss-square","fa-rub","fa-ruble","fa-rupee","fa-s15","fa-safari","fa-save","fa-scissors","fa-scribd","fa-search","fa-search-minus","fa-search-plus","fa-sellsy","fa-send","fa-se
18970nd-o","fa-server","fa-share","fa-share-alt","fa-share-alt-square","fa-share-square","fa-share-square-o","fa-shekel","fa-sheqel","fa-shield","fa-ship","fa-shirtsinbulk","fa-shopping-bag","fa-shopping-basket","fa-shopping-cart","fa-shower","fa-sign-in","fa-sign-language","fa-sign-out","fa-signal","fa-signing","fa-simplybuilt","fa-sitemap","fa-skyatlas","fa-skype","fa-slack","fa-sliders","fa-slideshare","fa-smile-o","fa-snapchat","fa-snapchat-ghost","fa-snapchat-square","fa-snowflake-o","fa-soccer-ball-o","fa-sort","fa-sort-alpha-asc","fa-sort-alpha-desc","fa-sort-amount-asc","fa-sort-amount-desc","fa-sort-asc","fa-sort-desc","fa-sort-down","fa-sort-numeric-asc","fa-sort-numeric-desc","fa-sort-up","fa-soundcloud","fa-space-shuttle","fa-spinner","fa-spoon","fa-spotify","fa-square","fa-square-o","fa-stack-exchange","fa-stack-overflow","fa-star","fa-star-half","fa-star-half-empty","fa-star-half-full","fa-star-half-o","fa-star-o","fa-steam","fa-steam-square","fa-step-backward","fa-step-forward","fa-stethoscope","fa-sticky-note","fa-sticky-note-o","fa-stop","fa-stop-circle","fa-stop-circle-o","fa-street-view","fa-strikethrough","fa-stumbleupon","fa-stumbleupon-circle","fa-subscript","fa-subway","fa-suitcase","fa-sun-o","fa-superpowers","fa-superscript","fa-support","fa-table","fa-tablet","fa-tachometer","fa-tag","fa-tags","fa-tasks","fa-taxi","fa-telegram","fa-television","fa-tencent-weibo","fa-terminal","fa-text-height","fa-text-width","fa-th","fa-th-large","fa-th-list","fa-themeisle","fa-thermometer","fa-thermometer-0","fa-thermometer-1","fa-thermometer-2","fa-thermometer-3","fa-thermometer-4","fa-thermometer-empty","fa-thermometer-full","fa-thermometer-half","fa-thermometer-quarter","fa-thermometer-three-quarters","fa-thumb-tack","fa-thumbs-down","fa-thumbs-o-down","fa-thumbs-o-up","fa-thumbs-up","fa-ticket","fa-times","fa-times-circle","fa-times-circle-o","fa-times-rectangle","fa-times-rectangle-o","fa-tint","fa-toggle-down","fa-toggle-left","fa-toggle-off","fa-toggle-on","fa-toggle-right","fa-toggle-up","fa-trademark","fa-train","fa-transgender","fa-transgender-alt","fa-trash","fa-trash-o","fa-tree","fa-trello","fa-tripadvisor","fa-trophy","fa-truck","fa-try","fa-tty","fa-tumblr","fa-tumblr-square","fa-turkish-lira","fa-tv","fa-twitch","fa-twitter","fa-twitter-square","fa-umbrella","fa-underline","fa-undo","fa-universal-access","fa-university","fa-unlink","fa-unlock","fa-unlock-alt","fa-unsorted","fa-upload","fa-usb","fa-usd","fa-user","fa-user-circle","fa-user-circle-o","fa-user-md","fa-user-o","fa-user-plus","fa-user-secret","fa-user-times","fa-users","fa-vcard","fa-vcard-o","fa-venus","fa-venus-double","fa-venus-mars","fa-viacoin","fa-viadeo","fa-viadeo-square","fa-video-camera","fa-vimeo","fa-vimeo-square","fa-vine","fa-vk","fa-volume-control-phone","fa-volume-down","fa-volume-off","fa-volume-up","fa-warning","fa-wechat","fa-weibo","fa-weixin","fa-whatsapp","fa-wheelchair","fa-wheelchair-alt","fa-wifi","fa-wikipedia-w","fa-window-close","fa-window-close-o","fa-window-maximize","fa-window-minimize","fa-window-restore","fa-windows","fa-won","fa-wordpress","fa-wpbeginner","fa-wpexplorer","fa-wpforms","fa-wrench","fa-xing","fa-xing-square","fa-y-combinator","fa-y-combinator-square","fa-yahoo","fa-yc","fa-yc-square","fa-yelp","fa-yen","fa-yoast","fa-youtube","fa-youtube-play","fa-youtube-square"]});;

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