/*! * jQuery JavaScript Library v1.12.4 * http://jquery.com/ * * Includes Sizzle.js * http://sizzlejs.com/ * * Copyright jQuery Foundation and other contributors * Released under the MIT license * http://jquery.org/license * * Date: 2016-05-20T17:17Z */ function mockDelay(t,e){function n(){s=Date.now()}function i(){r=Date.now(),o.apply(this,arguments)}function o(){var n=this,i=arguments;r-s>e?t.apply(n,i):setTimeout(function(){t.apply(n,i)},e)}var s,r;return{start:n,end:i}}function ValidationError(){function t(){for(var t=0;t'),i.submit()}function editActionAndSubmit(t,e,n){var i=$(t).parents("form");i.prop({action:e,method:n||"get"}),i.submit()}function pmt(t,e,n){if(0===t)return n/e;var i=Math.pow(1+t,e);return Math.ceil(n*t*i/(i-1))}function pv(t,e,n){var i=Math.pow(1+t,e);return Math.ceil(n*(i-1)/(t*i))}function currency2number(t,e){return e!==undefined&&null!==e||(e=2),from_currency(t,e)}function from_currency(t,e){if("number"==typeof t)return t;e!==undefined&&null!==e||(e=2);var n=parseFloat("string"==typeof t&&t.replace(/[,$]/g,"")||"0")||0;return"number"==typeof e&&e>=0?round_number(n,e):n}function number2currency(t,e){if("number"==typeof t)return to_currency(round_number(t,e));if(e!==undefined&&null!==e||(e=2),"string"==typeof t){var n=parseFloat(t);if(!isNaN(n))return to_currency(round_number(n,e))}return""}function to_currency(t){return"$"+t.toString().replace(/\B(?=(\d{3})+(?!\d))/g,",")}function from_phone(t){return t.replace(/[\(\)\s\-]/g,"")}function to_phone_no(t){return"("+t.substr(0,3)+") "+t.substr(3,3)+"-"+t.substr(6)}function from_ssn(t){var e=t.replace(/[^0-9]/g,"");return e.length>9&&(e=e.substr(0,9)),e}function to_ssn(t){for(var e=[t.substr(0,3),t.substr(3,2),t.substr(5)],n=e.length-1;n>-1;n--)0===e[n].length&&e.pop();return e.join("-")}function to_phone(t){return t.substr(0,3)+"-"+t.substr(3,3)+"-"+t.substr(6)}function round_number(t,e){e===undefined&&(e=0);var n=Math.pow(10,e);return t=parseFloat((t*n).toFixed(12)),+(Math.round(t)/n).toFixed(e)}function cleanArr(t){for(var e=[],n=0;n0&&e.push(i)}return e}var QRCode;if(function(t,e){"object"==typeof module&&"object"==typeof module.exports?module.exports=t.document?e(t,!0):function(t){if(!t.document)throw new Error("jQuery requires a window with a document");return e(t)}:e(t)}("undefined"!=typeof window?window:this,function(t,e){function n(t){var e=!!t&&"length"in t&&t.length,n=pt.type(t);return"function"!==n&&!pt.isWindow(t)&&("array"===n||0===e||"number"==typeof e&&e>0&&e-1 in t)}function i(t,e,n){if(pt.isFunction(e))return pt.grep(t,function(t,i){return!!e.call(t,i,t)!==n});if(e.nodeType)return pt.grep(t,function(t){return t===e!==n});if("string"==typeof e){if(Ct.test(e))return pt.filter(e,t,n);e=pt.filter(e,t)}return pt.grep(t,function(t){return pt.inArray(t,e)>-1!==n})}function o(t,e){do{t=t[e]}while(t&&1!==t.nodeType);return t}function s(t){var e={};return pt.each(t.match(At)||[],function(t,n){e[n]=!0}),e}function r(){it.addEventListener?(it.removeEventListener("DOMContentLoaded",a),t.removeEventListener("load",a)):(it.detachEvent("onreadystatechange",a),t.detachEvent("onload",a))}function a(){(it.addEventListener||"load"===t.event.type||"complete"===it.readyState)&&(r(),pt.ready())}function l(t,e,n){if(n===undefined&&1===t.nodeType){var i="data-"+e.replace(It,"-$1").toLowerCase();if("string"==typeof(n=t.getAttribute(i))){try{n="true"===n||"false"!==n&&("null"===n?null:+n+""===n?+n:Ot.test(n)?pt.parseJSON(n):n)}catch(o){}pt.data(t,e,n)}else n=undefined}return n}function c(t){var e;for(e in t)if(("data"!==e||!pt.isEmptyObject(t[e]))&&"toJSON"!==e)return!1;return!0}function u(t,e,n,i){if(Mt(t)){var o,s,r=pt.expando,a=t.nodeType,l=a?pt.cache:t,c=a?t[r]:t[r]&&r;if(c&&l[c]&&(i||l[c].data)||n!==undefined||"string"!=typeof e)return c||(c=a?t[r]=nt.pop()||pt.guid++:r),l[c]||(l[c]=a?{}:{toJSON:pt.noop}),"object"!=typeof e&&"function"!=typeof e||(i?l[c]=pt.extend(l[c],e):l[c].data=pt.extend(l[c].data,e)),s=l[c],i||(s.data||(s.data={}),s=s.data),n!==undefined&&(s[pt.camelCase(e)]=n),"string"==typeof e?null==(o=s[e])&&(o=s[pt.camelCase(e)]):o=s,o}}function d(t,e,n){if(Mt(t)){var i,o,s=t.nodeType,r=s?pt.cache:t,a=s?t[pt.expando]:pt.expando;if(r[a]){if(e&&(i=n?r[a]:r[a].data)){o=(e=pt.isArray(e)?e.concat(pt.map(e,pt.camelCase)):e in i?[e]:(e=pt.camelCase(e))in i?[e]:e.split(" ")).length;for(;o--;)delete i[e[o]];if(n?!c(i):!pt.isEmptyObject(i))return}(n||(delete r[a].data,c(r[a])))&&(s?pt.cleanData([t],!0):dt.deleteExpando||r!=r.window?delete r[a]:r[a]=undefined)}}}function h(t,e,n,i){var o,s=1,r=20,a=i?function(){return i.cur()}:function(){return pt.css(t,e,"")},l=a(),c=n&&n[3]||(pt.cssNumber[e]?"":"px"),u=(pt.cssNumber[e]||"px"!==c&&+l)&&Ht.exec(pt.css(t,e));if(u&&u[3]!==c){c=c||u[3],n=n||[],u=+l||1;do{u/=s=s||".5",pt.style(t,e,u+c)}while(s!==(s=a()/l)&&1!==s&&--r)}return n&&(u=+u||+l||0,o=n[1]?u+(n[1]+1)*n[2]:+n[2],i&&(i.unit=c,i.start=u,i.end=o)),o}function p(t){var e=Yt.split("|"),n=t.createDocumentFragment();if(n.createElement)for(;e.length;)n.createElement(e.pop());return n}function f(t,e){var n,i,o=0,s="undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e||"*"):"undefined"!=typeof t.querySelectorAll?t.querySelectorAll(e||"*"):undefined;if(!s)for(s=[],n=t.childNodes||t;null!=(i=n[o]);o++)!e||pt.nodeName(i,e)?s.push(i):pt.merge(s,f(i,e));return e===undefined||e&&pt.nodeName(t,e)?pt.merge([t],s):s}function m(t,e){for(var n,i=0;null!=(n=t[i]);i++)pt._data(n,"globalEval",!e||pt._data(e[i],"globalEval"))}function g(t){qt.test(t.type)&&(t.defaultChecked=t.checked)}function v(t,e,n,i,o){for(var s,r,a,l,c,u,d,h=t.length,v=p(e),y=[],b=0;b"!==d[1]||Gt.test(r)?0:l:l.firstChild)&&r.childNodes.length;s--;)pt.nodeName(u=r.childNodes[s],"tbody")&&!u.childNodes.length&&r.removeChild(u);for(pt.merge(y,l.childNodes),l.textContent="";l.firstChild;)l.removeChild(l.firstChild);l=v.lastChild}else y.push(e.createTextNode(r));for(l&&v.removeChild(l),dt.appendChecked||pt.grep(f(y,"input"),g),b=0;r=y[b++];)if(i&&pt.inArray(r,i)>-1)o&&o.push(r);else if(a=pt.contains(r.ownerDocument,r),l=f(v.appendChild(r),"script"),a&&m(l),n)for(s=0;r=l[s++];)Wt.test(r.type||"")&&n.push(r);return l=null,v}function y(){return!0}function b(){return!1}function w(){try{return it.activeElement}catch(t){}}function _(t,e,n,i,o,s){var r,a;if("object"==typeof e){for(a in"string"!=typeof n&&(i=i||n,n=undefined),e)_(t,a,n,i,e[a],s);return t}if(null==i&&null==o?(o=n,i=n=undefined):null==o&&("string"==typeof n?(o=i,i=undefined):(o=i,i=n,n=undefined)),!1===o)o=b;else if(!o)return t;return 1===s&&(r=o,(o=function(t){return pt().off(t),r.apply(this,arguments)}).guid=r.guid||(r.guid=pt.guid++)),t.each(function(){pt.event.add(this,e,o,i,n)})}function x(t,e){return pt.nodeName(t,"table")&&pt.nodeName(11!==e.nodeType?e:e.firstChild,"tr")?t.getElementsByTagName("tbody")[0]||t.appendChild(t.ownerDocument.createElement("tbody")):t}function C(t){return t.type=(null!==pt.find.attr(t,"type"))+"/"+t.type,t}function k(t){var e=ae.exec(t.type);return e?t.type=e[1]:t.removeAttribute("type"),t}function T(t,e){if(1===e.nodeType&&pt.hasData(t)){var n,i,o,s=pt._data(t),r=pt._data(e,s),a=s.events;if(a)for(n in delete r.handle,r.events={},a)for(i=0,o=a[n].length;i1&&"string"==typeof p&&!dt.checkClone&&re.test(p))return t.each(function(o){var s=t.eq(o);m&&(e[0]=p.call(this,o,s.html())),D(s,e,n,i)});if(d&&(o=(c=v(e,t[0].ownerDocument,!1,t,i)).firstChild,1===c.childNodes.length&&(c=o),o||i)){for(r=(a=pt.map(f(c,"script"),C)).length;u")).appendTo(e.documentElement))[0].contentWindow||ue[0].contentDocument).document).write(),e.close(),n=$(t,e),ue.detach()),de[t]=n),n}function N(t,e){return{get:function(){if(!t())return(this.get=e).apply(this,arguments);delete this.get}}}function M(t){if(t in Se)return t;for(var e=t.charAt(0).toUpperCase()+t.slice(1),n=Te.length;n--;)if((t=Te[n]+e)in Se)return t}function O(t,e){for(var n,i,o,s=[],r=0,a=t.length;r=0&&n=0},isEmptyObject:function(t){var e;for(e in t)return!1;return!0},isPlainObject:function(t){var e;if(!t||"object"!==pt.type(t)||t.nodeType||pt.isWindow(t))return!1;try{if(t.constructor&&!ut.call(t,"constructor")&&!ut.call(t.constructor.prototype,"isPrototypeOf"))return!1}catch(n){return!1}if(!dt.ownFirst)for(e in t)return ut.call(t,e);for(e in t);return e===undefined||ut.call(t,e)},type:function(t){return null==t?t+"":"object"==typeof t||"function"==typeof t?lt[ct.call(t)]||"object":typeof t},globalEval:function(e){e&&pt.trim(e)&&(t.execScript||function(e){t.eval.call(t,e)})(e)},camelCase:function(t){return t.replace(mt,"ms-").replace(gt,vt)},nodeName:function(t,e){return t.nodeName&&t.nodeName.toLowerCase()===e.toLowerCase()},each:function(t,e){var i,o=0;if(n(t))for(i=t.length;ox.cacheLength&&delete t[e.shift()],t[n+" "]=i}var e=[];return t}function i(t){return t[H]=!0,t}function o(t){var e=M.createElement("div");try{return!!t(e)}catch(n){return!1}finally{e.parentNode&&e.parentNode.removeChild(e),e=null}}function s(t,e){for(var n=t.split("|"),i=n.length;i--;)x.attrHandle[n[i]]=e}function r(t,e){var n=e&&t,i=n&&1===t.nodeType&&1===e.nodeType&&(~e.sourceIndex||Y)-(~t.sourceIndex||Y);if(i)return i;if(n)for(;n=n.nextSibling;)if(n===e)return-1;return t?1:-1}function a(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function l(t){return function(e){var n=e.nodeName.toLowerCase();return("input"===n||"button"===n)&&e.type===t}}function c(t){return i(function(e){return e=+e,i(function(n,i){for(var o,s=t([],n.length,e),r=s.length;r--;)n[o=s[r]]&&(n[o]=!(i[o]=n[o]))})})}function u(t){return t&&"undefined"!=typeof t.getElementsByTagName&&t}function d(){}function h(t){for(var e=0,n=t.length,i="";e1?function(e,n,i){for(var o=t.length;o--;)if(!t[o](e,n,i))return!1;return!0}:t[0]}function m(t,n,i){for(var o=0,s=n.length;o-1&&(i[c]=!(r[c]=d))}}else b=g(b===r?b.splice(f,b.length):b),s?s(null,r,b,l):J.apply(r,b)})}function y(t){for(var e,n,i,o=t.length,s=x.relative[t[0].type],r=s||x.relative[" "],a=s?1:0,l=p(function(t){return t===e},r,!0),c=p(function(t){return tt(e,t)>-1},r,!0),u=[function(t,n,i){var o=!s&&(i||n!==E)||((e=n).nodeType?l(t,n,i):c(t,n,i));return e=null,o}];a1&&f(u),a>1&&h(t.slice(0,a-1).concat({value:" "===t[a-2].type?"*":""})).replace(at,"$1"),n,a0,s=t.length>0,r=function(i,r,a,l,c){var u,d,h,p=0,f="0",m=i&&[],v=[],y=E,b=i||s&&x.find.TAG("*",c),w=U+=null==y?1:Math.random()||.1,_=b.length;for(c&&(E=r===M||r||c);f!==_&&null!=(u=b[f]);f++){if(s&&u){for(d=0,r||u.ownerDocument===M||(N(u),a=!I);h=t[d++];)if(h(u,r||M,a)){l.push(u);break}c&&(U=w)}o&&((u=!h&&u)&&p--,i&&m.push(u))}if(p+=f,o&&f!==p){for(d=0;h=n[d++];)h(m,v,r,a);if(i){if(p>0)for(;f--;)m[f]||v[f]||(v[f]=G.call(l));v=g(v)}J.apply(l,v),c&&!i&&v.length>0&&p+n.length>1&&e.uniqueSort(l)}return c&&(U=w,E=y),m};return o?i(r):r}var w,_,x,C,k,T,S,D,E,$,A,N,M,O,I,L,j,P,F,H="sizzle"+1*new Date,R=t.document,U=0,z=0,q=n(),B=n(),W=n(),V=function(t,e){return t===e&&(A=!0),0},Y=1<<31,X={}.hasOwnProperty,Q=[],G=Q.pop,K=Q.push,J=Q.push,Z=Q.slice,tt=function(t,e){for(var n=0,i=t.length;n+~]|"+nt+")"+nt+"*"),ut=new RegExp("="+nt+"*([^\\]'\"]*?)"+nt+"*\\]","g"),dt=new RegExp(st),ht=new RegExp("^"+it+"$"),pt={ID:new RegExp("^#("+it+")"),CLASS:new RegExp("^\\.("+it+")"),TAG:new RegExp("^("+it+"|[*])"),ATTR:new RegExp("^"+ot),PSEUDO:new RegExp("^"+st),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+nt+"*(even|odd|(([+-]|)(\\d*)n|)"+nt+"*(?:([+-]|)"+nt+"*(\\d+)|))"+nt+"*\\)|)","i"),bool:new RegExp("^(?:"+et+")$","i"),needsContext:new RegExp("^"+nt+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+nt+"*((?:-\\d)?\\d*)"+nt+"*\\)|)(?=[^-]|$)","i")},ft=/^(?:input|select|textarea|button)$/i,mt=/^h\d$/i,gt=/^[^{]+\{\s*\[native \w/,vt=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,yt=/[+~]/,bt=/'|\\/g,wt=new RegExp("\\\\([\\da-f]{1,6}"+nt+"?|("+nt+")|.)","ig"),_t=function(t,e,n){var i="0x"+e-65536;return i!=i||n?e:i<0?String.fromCharCode(i+65536):String.fromCharCode(i>>10|55296,1023&i|56320)},xt=function(){N()};try{J.apply(Q=Z.call(R.childNodes),R.childNodes),Q[R.childNodes.length].nodeType}catch(Ct){J={apply:Q.length?function(t,e){K.apply(t,Z.call(e))}:function(t,e){for(var n=t.length,i=0;t[n++]=e[i++];);t.length=n-1}}}for(w in _=e.support={},k=e.isXML=function(t){var e=t&&(t.ownerDocument||t).documentElement;return!!e&&"HTML"!==e.nodeName},N=e.setDocument=function(t){var e,n,i=t?t.ownerDocument||t:R;return i!==M&&9===i.nodeType&&i.documentElement?(O=(M=i).documentElement,I=!k(M),(n=M.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",xt,!1):n.attachEvent&&n.attachEvent("onunload",xt)),_.attributes=o(function(t){return t.className="i",!t.getAttribute("className")}),_.getElementsByTagName=o(function(t){return t.appendChild(M.createComment("")),!t.getElementsByTagName("*").length}),_.getElementsByClassName=gt.test(M.getElementsByClassName),_.getById=o(function(t){return O.appendChild(t).id=H,!M.getElementsByName||!M.getElementsByName(H).length}),_.getById?(x.find.ID=function(t,e){if("undefined"!=typeof e.getElementById&&I){var n=e.getElementById(t);return n?[n]:[]}},x.filter.ID=function(t){var e=t.replace(wt,_t);return function(t){return t.getAttribute("id")===e}}):(delete x.find.ID,x.filter.ID=function(t){var e=t.replace(wt,_t);return function(t){var n="undefined"!=typeof t.getAttributeNode&&t.getAttributeNode("id");return n&&n.value===e}}),x.find.TAG=_.getElementsByTagName?function(t,e){return"undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t):_.qsa?e.querySelectorAll(t):void 0}:function(t,e){var n,i=[],o=0,s=e.getElementsByTagName(t);if("*"===t){for(;n=s[o++];)1===n.nodeType&&i.push(n);return i}return s},x.find.CLASS=_.getElementsByClassName&&function(t,e){if("undefined"!=typeof e.getElementsByClassName&&I)return e.getElementsByClassName(t)},j=[],L=[],(_.qsa=gt.test(M.querySelectorAll))&&(o(function(t){O.appendChild(t).innerHTML="",t.querySelectorAll("[msallowcapture^='']").length&&L.push("[*^$]="+nt+"*(?:''|\"\")"),t.querySelectorAll("[selected]").length||L.push("\\["+nt+"*(?:value|"+et+")"),t.querySelectorAll("[id~="+H+"-]").length||L.push("~="),t.querySelectorAll(":checked").length||L.push(":checked"),t.querySelectorAll("a#"+H+"+*").length||L.push(".#.+[+~]")}),o(function(t){var e=M.createElement("input");e.setAttribute("type","hidden"),t.appendChild(e).setAttribute("name","D"),t.querySelectorAll("[name=d]").length&&L.push("name"+nt+"*[*^$|!~]?="),t.querySelectorAll(":enabled").length||L.push(":enabled",":disabled"),t.querySelectorAll("*,:x"),L.push(",.*:")})),(_.matchesSelector=gt.test(P=O.matches||O.webkitMatchesSelector||O.mozMatchesSelector||O.oMatchesSelector||O.msMatchesSelector))&&o(function(t){_.disconnectedMatch=P.call(t,"div"),P.call(t,"[s!='']:x"),j.push("!=",st)}),L=L.length&&new RegExp(L.join("|")),j=j.length&&new RegExp(j.join("|")),e=gt.test(O.compareDocumentPosition),F=e||gt.test(O.contains)?function(t,e){var n=9===t.nodeType?t.documentElement:t,i=e&&e.parentNode;return t===i||!(!i||1!==i.nodeType||!(n.contains?n.contains(i):t.compareDocumentPosition&&16&t.compareDocumentPosition(i)))}:function(t,e){if(e)for(;e=e.parentNode;)if(e===t)return!0;return!1},V=e?function(t,e){if(t===e)return A=!0,0;var n=!t.compareDocumentPosition-!e.compareDocumentPosition;return n||(1&(n=(t.ownerDocument||t)===(e.ownerDocument||e)?t.compareDocumentPosition(e):1)||!_.sortDetached&&e.compareDocumentPosition(t)===n?t===M||t.ownerDocument===R&&F(R,t)?-1:e===M||e.ownerDocument===R&&F(R,e)?1:$?tt($,t)-tt($,e):0:4&n?-1:1)}:function(t,e){if(t===e)return A=!0,0;var n,i=0,o=t.parentNode,s=e.parentNode,a=[t],l=[e];if(!o||!s)return t===M?-1:e===M?1:o?-1:s?1:$?tt($,t)-tt($,e):0;if(o===s)return r(t,e);for(n=t;n=n.parentNode;)a.unshift(n);for(n=e;n=n.parentNode;)l.unshift(n);for(;a[i]===l[i];)i++;return i?r(a[i],l[i]):a[i]===R?-1:l[i]===R?1:0},M):M},e.matches=function(t,n){return e(t,null,null,n)},e.matchesSelector=function(t,n){if((t.ownerDocument||t)!==M&&N(t),n=n.replace(ut,"='$1']"),_.matchesSelector&&I&&!W[n+" "]&&(!j||!j.test(n))&&(!L||!L.test(n)))try{var i=P.call(t,n);if(i||_.disconnectedMatch||t.document&&11!==t.document.nodeType)return i}catch(Ct){}return e(n,M,null,[t]).length>0},e.contains=function(t,e){return(t.ownerDocument||t)!==M&&N(t),F(t,e)},e.attr=function(t,e){(t.ownerDocument||t)!==M&&N(t);var n=x.attrHandle[e.toLowerCase()],i=n&&X.call(x.attrHandle,e.toLowerCase())?n(t,e,!I):undefined;return i!==undefined?i:_.attributes||!I?t.getAttribute(e):(i=t.getAttributeNode(e))&&i.specified?i.value:null},e.error=function(t){throw new Error("Syntax error, unrecognized expression: "+t)},e.uniqueSort=function(t){var e,n=[],i=0,o=0;if(A=!_.detectDuplicates,$=!_.sortStable&&t.slice(0),t.sort(V),A){for(;e=t[o++];)e===t[o]&&(i=n.push(o));for(;i--;)t.splice(n[i],1)}return $=null,t},C=e.getText=function(t){var e,n="",i=0,o=t.nodeType;if(o){if(1===o||9===o||11===o){if("string"==typeof t.textContent)return t.textContent;for(t=t.firstChild;t;t=t.nextSibling)n+=C(t)}else if(3===o||4===o)return t.nodeValue}else for(;e=t[i++];)n+=C(e);return n},(x=e.selectors={cacheLength:50,createPseudo:i,match:pt,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(t){return t[1]=t[1].replace(wt,_t),t[3]=(t[3]||t[4]||t[5]||"").replace(wt,_t),"~="===t[2]&&(t[3]=" "+t[3]+" "),t.slice(0,4)},CHILD:function(t){return t[1]=t[1].toLowerCase(),"nth"===t[1].slice(0,3)?(t[3]||e.error(t[0]),t[4]=+(t[4]?t[5]+(t[6]||1):2*("even"===t[3]||"odd"===t[3])),t[5]=+(t[7]+t[8]||"odd"===t[3])):t[3]&&e.error(t[0]),t},PSEUDO:function(t){var e,n=!t[6]&&t[2];return pt.CHILD.test(t[0])?null:(t[3]?t[2]=t[4]||t[5]||"":n&&dt.test(n)&&(e=T(n,!0))&&(e=n.indexOf(")",n.length-e)-n.length)&&(t[0]=t[0].slice(0,e),t[2]=n.slice(0,e)),t.slice(0,3))}},filter:{TAG:function(t){var e=t.replace(wt,_t).toLowerCase();return"*"===t?function(){return!0}:function(t){return t.nodeName&&t.nodeName.toLowerCase()===e}},CLASS:function(t){var e=q[t+" "];return e||(e=new RegExp("(^|"+nt+")"+t+"("+nt+"|$)"))&&q(t,function(t){return e.test("string"==typeof t.className&&t.className||"undefined"!=typeof t.getAttribute&&t.getAttribute("class")||"")})},ATTR:function(t,n,i){return function(o){var s=e.attr(o,t);return null==s?"!="===n:!n||(s+="","="===n?s===i:"!="===n?s!==i:"^="===n?i&&0===s.indexOf(i):"*="===n?i&&s.indexOf(i)>-1:"$="===n?i&&s.slice(-i.length)===i:"~="===n?(" "+s.replace(rt," ")+" ").indexOf(i)>-1:"|="===n&&(s===i||s.slice(0,i.length+1)===i+"-"))}},CHILD:function(t,e,n,i,o){var s="nth"!==t.slice(0,3),r="last"!==t.slice(-4),a="of-type"===e;return 1===i&&0===o?function(t){return!!t.parentNode}:function(e,n,l){var c,u,d,h,p,f,m=s!==r?"nextSibling":"previousSibling",g=e.parentNode,v=a&&e.nodeName.toLowerCase(),y=!l&&!a,b=!1;if(g){if(s){for(;m;){for(h=e;h=h[m];)if(a?h.nodeName.toLowerCase()===v:1===h.nodeType)return!1;f=m="only"===t&&!f&&"nextSibling"}return!0}if(f=[r?g.firstChild:g.lastChild],r&&y){for(b=(p=(c=(u=(d=(h=g)[H]||(h[H]={}))[h.uniqueID]||(d[h.uniqueID]={}))[t]||[])[0]===U&&c[1])&&c[2],h=p&&g.childNodes[p];h=++p&&h&&h[m]||(b=p=0)||f.pop();)if(1===h.nodeType&&++b&&h===e){u[t]=[U,p,b];break}}else if(y&&(b=p=(c=(u=(d=(h=e)[H]||(h[H]={}))[h.uniqueID]||(d[h.uniqueID]={}))[t]||[])[0]===U&&c[1]),!1===b)for(;(h=++p&&h&&h[m]||(b=p=0)||f.pop())&&((a?h.nodeName.toLowerCase()!==v:1!==h.nodeType)||!++b||(y&&((u=(d=h[H]||(h[H]={}))[h.uniqueID]||(d[h.uniqueID]={}))[t]=[U,b]),h!==e)););return(b-=o)===i||b%i==0&&b/i>=0}}},PSEUDO:function(t,n){var o,s=x.pseudos[t]||x.setFilters[t.toLowerCase()]||e.error("unsupported pseudo: "+t);return s[H]?s(n):s.length>1?(o=[t,t,"",n],x.setFilters.hasOwnProperty(t.toLowerCase())?i(function(t,e){for(var i,o=s(t,n),r=o.length;r--;)t[i=tt(t,o[r])]=!(e[i]=o[r])}):function(t){return s(t,0,o)}):s}},pseudos:{not:i(function(t){var e=[],n=[],o=S(t.replace(at,"$1"));return o[H]?i(function(t,e,n,i){for(var s,r=o(t,null,i,[]),a=t.length;a--;)(s=r[a])&&(t[a]=!(e[a]=s))}):function(t,i,s){return e[0]=t,o(e,null,s,n),e[0]=null,!n.pop()}}),has:i(function(t){return function(n){return e(t,n).length>0}}),contains:i(function(t){return t=t.replace(wt,_t),function(e){return(e.textContent||e.innerText||C(e)).indexOf(t)>-1}}),lang:i(function(t){return ht.test(t||"")||e.error("unsupported lang: "+t),t=t.replace(wt,_t).toLowerCase(),function(e){var n;do{if(n=I?e.lang:e.getAttribute("xml:lang")||e.getAttribute("lang"))return(n=n.toLowerCase())===t||0===n.indexOf(t+"-")}while((e=e.parentNode)&&1===e.nodeType);return!1}}),target:function(e){var n=t.location&&t.location.hash;return n&&n.slice(1)===e.id},root:function(t){return t===O},focus:function(t){return t===M.activeElement&&(!M.hasFocus||M.hasFocus())&&!!(t.type||t.href||~t.tabIndex)},enabled:function(t){return!1===t.disabled},disabled:function(t){return!0===t.disabled},checked:function(t){var e=t.nodeName.toLowerCase();return"input"===e&&!!t.checked||"option"===e&&!!t.selected},selected:function(t){return t.parentNode&&t.parentNode.selectedIndex,!0===t.selected},empty:function(t){for(t=t.firstChild;t;t=t.nextSibling)if(t.nodeType<6)return!1;return!0},parent:function(t){return!x.pseudos.empty(t)},header:function(t){return mt.test(t.nodeName)},input:function(t){return ft.test(t.nodeName)},button:function(t){var e=t.nodeName.toLowerCase();return"input"===e&&"button"===t.type||"button"===e},text:function(t){var e;return"input"===t.nodeName.toLowerCase()&&"text"===t.type&&(null==(e=t.getAttribute("type"))||"text"===e.toLowerCase())},first:c(function(){return[0]}),last:c(function(t,e){return[e-1]}),eq:c(function(t,e,n){return[n<0?n+e:n]}),even:c(function(t,e){for(var n=0;n=0;)t.push(i);return t}),gt:c(function(t,e,n){for(var i=n<0?n+e:n;++i2&&"ID"===(r=s[0]).type&&_.getById&&9===e.nodeType&&I&&x.relative[s[1].type]){if(!(e=(x.find.ID(r.matches[0].replace(wt,_t),e)||[])[0]))return n;c&&(e=e.parentNode),t=t.slice(s.shift().value.length)}for(o=pt.needsContext.test(t)?0:s.length;o--&&(r=s[o],!x.relative[a=r.type]);)if((l=x.find[a])&&(i=l(r.matches[0].replace(wt,_t),yt.test(s[0].type)&&u(e.parentNode)||e))){if(s.splice(o,1),!(t=i.length&&h(s)))return J.apply(n,i),n;break}}return(c||S(t,d))(i,e,!I,n,!e||yt.test(t)&&u(e.parentNode)||e),n},_.sortStable=H.split("").sort(V).join("")===H,_.detectDuplicates=!!A,N(),_.sortDetached=o(function(t){return 1&t.compareDocumentPosition(M.createElement("div"))}),o(function(t){return t.innerHTML="","#"===t.firstChild.getAttribute("href")})||s("type|href|height|width",function(t,e,n){if(!n)return t.getAttribute(e,"type"===e.toLowerCase()?1:2)}),_.attributes&&o(function(t){return t.innerHTML="",t.firstChild.setAttribute("value",""),""===t.firstChild.getAttribute("value")})||s("value",function(t,e,n){if(!n&&"input"===t.nodeName.toLowerCase())return t.defaultValue}),o(function(t){return null==t.getAttribute("disabled")})||s(et,function(t,e,n){var i;if(!n)return!0===t[e]?e.toLowerCase():(i=t.getAttributeNode(e))&&i.specified?i.value:null}),e}(t);pt.find=yt,pt.expr=yt.selectors,pt.expr[":"]=pt.expr.pseudos,pt.uniqueSort=pt.unique=yt.uniqueSort,pt.text=yt.getText,pt.isXMLDoc=yt.isXML,pt.contains=yt.contains;var bt=function(t,e,n){for(var i=[],o=n!==undefined;(t=t[e])&&9!==t.nodeType;)if(1===t.nodeType){if(o&&pt(t).is(n))break;i.push(t)}return i},wt=function(t,e){for(var n=[];t;t=t.nextSibling)1===t.nodeType&&t!==e&&n.push(t);return n},_t=pt.expr.match.needsContext,xt=/^<([\w-]+)\s*\/?>(?:<\/\1>|)$/,Ct=/^.[^:#\[\.,]*$/;pt.filter=function(t,e,n){var i=e[0];return n&&(t=":not("+t+")"),1===e.length&&1===i.nodeType?pt.find.matchesSelector(i,t)?[i]:[]:pt.find.matches(t,pt.grep(e,function(t){return 1===t.nodeType}))},pt.fn.extend({find:function(t){var e,n=[],i=this,o=i.length;if("string"!=typeof t)return this.pushStack(pt(t).filter(function(){for(e=0;e1?pt.unique(n):n)).selector=this.selector?this.selector+" "+t:t,n},filter:function(t){return this.pushStack(i(this,t||[],!1))},not:function(t){return this.pushStack(i(this,t||[],!0))},is:function(t){return!!i(this,"string"==typeof t&&_t.test(t)?pt(t):t||[],!1).length}});var kt,Tt=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/;(pt.fn.init=function(t,e,n){var i,o;if(!t)return this;if(n=n||kt,"string"==typeof t){if(!(i="<"===t.charAt(0)&&">"===t.charAt(t.length-1)&&t.length>=3?[null,t,null]:Tt.exec(t))||!i[1]&&e)return!e||e.jquery?(e||n).find(t):this.constructor(e).find(t);if(i[1]){if(e=e instanceof pt?e[0]:e,pt.merge(this,pt.parseHTML(i[1],e&&e.nodeType?e.ownerDocument||e:it,!0)),xt.test(i[1])&&pt.isPlainObject(e))for(i in e)pt.isFunction(this[i])?this[i](e[i]):this.attr(i,e[i]);return this}if((o=it.getElementById(i[2]))&&o.parentNode){if(o.id!==i[2])return kt.find(t);this.length=1,this[0]=o}return this.context=it,this.selector=t,this}return t.nodeType?(this.context=this[0]=t,this.length=1,this):pt.isFunction(t)?"undefined"!=typeof n.ready?n.ready(t):t(pt):(t.selector!==undefined&&(this.selector=t.selector,this.context=t.context),pt.makeArray(t,this))}).prototype=pt.fn,kt=pt(it);var St=/^(?:parents|prev(?:Until|All))/,Dt={children:!0,contents:!0,next:!0,prev:!0};pt.fn.extend({has:function(t){var e,n=pt(t,this),i=n.length;return this.filter(function(){for(e=0;e-1:1===n.nodeType&&pt.find.matchesSelector(n,t))){s.push(n);break}return this.pushStack(s.length>1?pt.uniqueSort(s):s)},index:function(t){return t?"string"==typeof t?pt.inArray(this[0],pt(t)):pt.inArray(t.jquery?t[0]:t,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(t,e){return this.pushStack(pt.uniqueSort(pt.merge(this.get(),pt(t,e))))},addBack:function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}}),pt.each({parent:function(t){var e=t.parentNode;return e&&11!==e.nodeType?e:null},parents:function(t){return bt(t,"parentNode")},parentsUntil:function(t,e,n){return bt(t,"parentNode",n)},next:function(t){return o(t,"nextSibling")},prev:function(t){return o(t,"previousSibling")},nextAll:function(t){return bt(t,"nextSibling")},prevAll:function(t){return bt(t,"previousSibling")},nextUntil:function(t,e,n){return bt(t,"nextSibling",n)},prevUntil:function(t,e,n){return bt(t,"previousSibling",n)},siblings:function(t){return wt((t.parentNode||{}).firstChild,t)},children:function(t){return wt(t.firstChild)},contents:function(t){return pt.nodeName(t,"iframe")?t.contentDocument||t.contentWindow.document:pt.merge([],t.childNodes)}},function(t,e){pt.fn[t]=function(n,i){var o=pt.map(this,e,n);return"Until"!==t.slice(-5)&&(i=n),i&&"string"==typeof i&&(o=pt.filter(i,o)),this.length>1&&(Dt[t]||(o=pt.uniqueSort(o)),St.test(t)&&(o=o.reverse())),this.pushStack(o)}});var Et,$t,At=/\S+/g;for($t in pt.Callbacks=function(t){t="string"==typeof t?s(t):pt.extend({},t);var e,n,i,o,r=[],a=[],l=-1,c=function(){for(o=t.once,i=e=!0;a.length;l=-1)for(n=a.shift();++l-1;)r.splice(n,1),n<=l&&l--}),this},has:function(t){return t?pt.inArray(t,r)>-1:r.length>0},empty:function(){return r&&(r=[]),this},disable:function(){return o=a=[],r=n="",this},disabled:function(){return!r},lock:function(){return o=!0,n||u.disable(),this},locked:function(){return!!o},fireWith:function(t,n){return o||(n=[t,(n=n||[]).slice?n.slice():n],a.push(n),e||c()),this},fire:function(){return u.fireWith(this,arguments),this},fired:function(){return!!i}};return u},pt.extend({Deferred:function(t){var e=[["resolve","done",pt.Callbacks("once memory"),"resolved"],["reject","fail",pt.Callbacks("once memory"),"rejected"],["notify","progress",pt.Callbacks("memory")]],n="pending",i={state:function(){return n},always:function(){return o.done(arguments).fail(arguments),this},then:function(){var t=arguments;return pt.Deferred(function(n){pt.each(e,function(e,s){var r=pt.isFunction(t[e])&&t[e];o[s[1]](function(){var t=r&&r.apply(this,arguments);t&&pt.isFunction(t.promise)?t.promise().progress(n.notify).done(n.resolve).fail(n.reject):n[s[0]+"With"](this===i?n.promise():this,r?[t]:arguments)})}),t=null}).promise()},promise:function(t){return null!=t?pt.extend(t,i):i}},o={};return i.pipe=i.then,pt.each(e,function(t,s){var r=s[2],a=s[3];i[s[1]]=r.add,a&&r.add(function(){n=a},e[1^t][2].disable,e[2][2].lock),o[s[0]]=function(){return o[s[0]+"With"](this===o?i:this,arguments),this},o[s[0]+"With"]=r.fireWith}),i.promise(o),t&&t.call(o,o),o},when:function(t){var e,n,i,o=0,s=ot.call(arguments),r=s.length,a=1!==r||t&&pt.isFunction(t.promise)?r:0,l=1===a?t:pt.Deferred(),c=function(t,n,i){return function(o){n[t]=this,i[t]=arguments.length>1?ot.call(arguments):o,i===e?l.notifyWith(n,i):--a||l.resolveWith(n,i)}};if(r>1)for(e=new Array(r),n=new Array(r),i=new Array(r);o0||(Et.resolveWith(it,[pt]),pt.fn.triggerHandler&&(pt(it).triggerHandler("ready"),pt(it).off("ready"))))}}),pt.ready.promise=function(e){if(!Et)if(Et=pt.Deferred(),"complete"===it.readyState||"loading"!==it.readyState&&!it.documentElement.doScroll)t.setTimeout(pt.ready);else if(it.addEventListener)it.addEventListener("DOMContentLoaded",a),t.addEventListener("load",a);else{it.attachEvent("onreadystatechange",a),t.attachEvent("onload",a);var n=!1;try{n=null==t.frameElement&&it.documentElement}catch(i){}n&&n.doScroll&&function e(){if(!pt.isReady){try{n.doScroll("left")}catch(i){return t.setTimeout(e,50)}r(),pt.ready()}}()}return Et.promise(e)},pt.ready.promise(),pt(dt))break;dt.ownFirst="0"===$t,dt.inlineBlockNeedsLayout=!1,pt(function(){var t,e,n,i;(n=it.getElementsByTagName("body")[0])&&n.style&&(e=it.createElement("div"),(i=it.createElement("div")).style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",n.appendChild(i).appendChild(e),"undefined"!=typeof e.style.zoom&&(e.style.cssText="display:inline;margin:0;border:0;padding:1px;width:1px;zoom:1",dt.inlineBlockNeedsLayout=t=3===e.offsetWidth,t&&(n.style.zoom=1)),n.removeChild(i))}),function(){var t=it.createElement("div");dt.deleteExpando=!0;try{delete t.test}catch(e){dt.deleteExpando=!1}t=null}();var Nt,Mt=function(t){var e=pt.noData[(t.nodeName+" ").toLowerCase()],n=+t.nodeType||1;return(1===n||9===n)&&(!e||!0!==e&&t.getAttribute("classid")===e)},Ot=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,It=/([A-Z])/g;pt.extend({cache:{},noData:{"applet ":!0,"embed ":!0,"object ":"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(t){return!!(t=t.nodeType?pt.cache[t[pt.expando]]:t[pt.expando])&&!c(t)},data:function(t,e,n){return u(t,e,n)},removeData:function(t,e){return d(t,e)},_data:function(t,e,n){return u(t,e,n,!0)},_removeData:function(t,e){return d(t,e,!0)}}),pt.fn.extend({data:function(t,e){var n,i,o,s=this[0],r=s&&s.attributes;if(t===undefined){if(this.length&&(o=pt.data(s),1===s.nodeType&&!pt._data(s,"parsedAttrs"))){for(n=r.length;n--;)r[n]&&0===(i=r[n].name).indexOf("data-")&&l(s,i=pt.camelCase(i.slice(5)),o[i]);pt._data(s,"parsedAttrs",!0)}return o}return"object"==typeof t?this.each(function(){pt.data(this,t)}):arguments.length>1?this.each(function(){pt.data(this,t,e)}):s?l(s,t,pt.data(s,t)):undefined},removeData:function(t){return this.each(function(){pt.removeData(this,t)})}}),pt.extend({queue:function(t,e,n){var i;if(t)return e=(e||"fx")+"queue",i=pt._data(t,e),n&&(!i||pt.isArray(n)?i=pt._data(t,e,pt.makeArray(n)):i.push(n)),i||[]},dequeue:function(t,e){e=e||"fx";var n=pt.queue(t,e),i=n.length,o=n.shift(),s=pt._queueHooks(t,e),r=function(){pt.dequeue(t,e)};"inprogress"===o&&(o=n.shift(),i--),o&&("fx"===e&&n.unshift("inprogress"),delete s.stop,o.call(t,r,s)),!i&&s&&s.empty.fire()},_queueHooks:function(t,e){var n=e+"queueHooks";return pt._data(t,n)||pt._data(t,n,{empty:pt.Callbacks("once memory").add(function(){pt._removeData(t,e+"queue"),pt._removeData(t,n)})})}}),pt.fn.extend({queue:function(t,e){var n=2;return"string"!=typeof t&&(e=t,t="fx",n--),arguments.length
a",dt.leadingWhitespace=3===Lt.firstChild.nodeType,dt.tbody=!Lt.getElementsByTagName("tbody").length,dt.htmlSerialize=!!Lt.getElementsByTagName("link").length,dt.html5Clone="<:nav>"!==it.createElement("nav").cloneNode(!0).outerHTML,Pt.type="checkbox",Pt.checked=!0,jt.appendChild(Pt),dt.appendChecked=Pt.checked,Lt.innerHTML="",dt.noCloneChecked=!!Lt.cloneNode(!0).lastChild.defaultValue,jt.appendChild(Lt),(Pt=it.createElement("input")).setAttribute("type","radio"),Pt.setAttribute("checked","checked"),Pt.setAttribute("name","t"),Lt.appendChild(Pt),dt.checkClone=Lt.cloneNode(!0).cloneNode(!0).lastChild.checked,dt.noCloneEvent=!!Lt.addEventListener,Lt[pt.expando]=1,dt.attributes=!Lt.getAttribute(pt.expando);var Xt={option:[1,""],legend:[1,"
","
"],area:[1,"",""],param:[1,"",""],thead:[1,"","
"],tr:[2,"","
"],col:[2,"","
"],td:[3,"","
"],_default:dt.htmlSerialize?[0,"",""]:[1,"X
","
"]};Xt.optgroup=Xt.option,Xt.tbody=Xt.tfoot=Xt.colgroup=Xt.caption=Xt.thead,Xt.th=Xt.td;var Qt=/<|&#?\w+;/,Gt=/-1&&(p=(f=p.split(".")).shift(),f.sort()),r=p.indexOf(":")<0&&"on"+p,(e=e[pt.expando]?e:new pt.Event(p,"object"==typeof e&&e)).isTrigger=o?2:3,e.namespace=f.join("."),e.rnamespace=e.namespace?new RegExp("(^|\\.)"+f.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=undefined,e.target||(e.target=i),n=null==n?[e]:pt.makeArray(n,[e]),c=pt.event.special[p]||{},o||!c.trigger||!1!==c.trigger.apply(i,n))){if(!o&&!c.noBubble&&!pt.isWindow(i)){for(l=c.delegateType||p,te.test(l+p)||(a=a.parentNode);a;a=a.parentNode)h.push(a),u=a;u===(i.ownerDocument||it)&&h.push(u.defaultView||u.parentWindow||t)}for(d=0;(a=h[d++])&&!e.isPropagationStopped();)e.type=d>1?l:c.bindType||p,(s=(pt._data(a,"events")||{})[e.type]&&pt._data(a,"handle"))&&s.apply(a,n),(s=r&&a[r])&&s.apply&&Mt(a)&&(e.result=s.apply(a,n),!1===e.result&&e.preventDefault());if(e.type=p,!o&&!e.isDefaultPrevented()&&(!c._default||!1===c._default.apply(h.pop(),n))&&Mt(i)&&r&&i[p]&&!pt.isWindow(i)){(u=i[r])&&(i[r]=null),pt.event.triggered=p;try{i[p]()}catch(m){}pt.event.triggered=undefined,u&&(i[r]=u)}return e.result}},dispatch:function(t){t=pt.event.fix(t);var e,n,i,o,s,r=[],a=ot.call(arguments),l=(pt._data(this,"events")||{})[t.type]||[],c=pt.event.special[t.type]||{};if(a[0]=t,t.delegateTarget=this,!c.preDispatch||!1!==c.preDispatch.call(this,t)){for(r=pt.event.handlers.call(this,t,l),e=0;(o=r[e++])&&!t.isPropagationStopped();)for(t.currentTarget=o.elem,n=0;(s=o.handlers[n++])&&!t.isImmediatePropagationStopped();)t.rnamespace&&!t.rnamespace.test(s.namespace)||(t.handleObj=s,t.data=s.data,(i=((pt.event.special[s.origType]||{}).handle||s.handler).apply(o.elem,a))!==undefined&&!1===(t.result=i)&&(t.preventDefault(),t.stopPropagation()));return c.postDispatch&&c.postDispatch.call(this,t),t.result}},handlers:function(t,e){var n,i,o,s,r=[],a=e.delegateCount,l=t.target;if(a&&l.nodeType&&("click"!==t.type||isNaN(t.button)||t.button<1))for(;l!=this;l=l.parentNode||this)if(1===l.nodeType&&(!0!==l.disabled||"click"!==t.type)){for(i=[],n=0;n-1:pt.find(o,this,null,[l]).length),i[o]&&i.push(s);i.length&&r.push({elem:l,handlers:i})}return a]","i"),oe=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:-]+)[^>]*)\/>/gi,se=/\s*$/g,ce=p(it).appendChild(it.createElement("div"));pt.extend({htmlPrefilter:function(t){return t.replace(oe,"<$1>")},clone:function(t,e,n){var i,o,s,r,a,l=pt.contains(t.ownerDocument,t);if(dt.html5Clone||pt.isXMLDoc(t)||!ie.test("<"+t.nodeName+">")?s=t.cloneNode(!0):(ce.innerHTML=t.outerHTML,ce.removeChild(s=ce.firstChild)),!(dt.noCloneEvent&&dt.noCloneChecked||1!==t.nodeType&&11!==t.nodeType||pt.isXMLDoc(t)))for(i=f(s),a=f(t),r=0;null!=(o=a[r]);++r)i[r]&&S(o,i[r]);if(e)if(n)for(a=a||f(t),i=i||f(s),r=0;null!=(o=a[r]);r++)T(o,i[r]);else T(t,s);return(i=f(s,"script")).length>0&&m(i,!l&&f(t,"script")),i=a=o=null,s},cleanData:function(t,e){for(var n,i,o,s,r=0,a=pt.expando,l=pt.cache,c=dt.attributes,u=pt.event.special;null!=(n=t[r]);r++)if((e||Mt(n))&&(s=(o=n[a])&&l[o])){if(s.events)for(i in s.events)u[i]?pt.event.remove(n,i):pt.removeEvent(n,i,s.handle);l[o]&&(delete l[o],c||"undefined"==typeof n.removeAttribute?n[a]=undefined:n.removeAttribute(a),nt.push(o))}}}),pt.fn.extend({domManip:D,detach:function(t){return E(this,t,!0)},remove:function(t){return E(this,t)},text:function(t){return zt(this,function(t){return t===undefined?pt.text(this):this.empty().append((this[0]&&this[0].ownerDocument||it).createTextNode(t))},null,t,arguments.length)},append:function(){return D(this,arguments,function(t){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||x(this,t).appendChild(t)})},prepend:function(){return D(this,arguments,function(t){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var e=x(this,t);e.insertBefore(t,e.firstChild)}})},before:function(){return D(this,arguments,function(t){this.parentNode&&this.parentNode.insertBefore(t,this)})},after:function(){return D(this,arguments,function(t){this.parentNode&&this.parentNode.insertBefore(t,this.nextSibling)})},empty:function(){for(var t,e=0;null!=(t=this[e]);e++){for(1===t.nodeType&&pt.cleanData(f(t,!1));t.firstChild;)t.removeChild(t.firstChild);t.options&&pt.nodeName(t,"select")&&(t.options.length=0)}return this},clone:function(t,e){return t=null!=t&&t,e=null==e?t:e,this.map(function(){return pt.clone(this,t,e)})},html:function(t){return zt(this,function(t){var e=this[0]||{},n=0,i=this.length;if(t===undefined)return 1===e.nodeType?e.innerHTML.replace(ne,""):undefined;if("string"==typeof t&&!se.test(t)&&(dt.htmlSerialize||!ie.test(t))&&(dt.leadingWhitespace||!Vt.test(t))&&!Xt[(Bt.exec(t)||["",""])[1].toLowerCase()]){t=pt.htmlPrefilter(t);try{for(;nt",c.childNodes[0].style.borderCollapse="separate",(e=c.getElementsByTagName("td"))[0].style.cssText="margin:0;border:0;padding:0;display:none",(s=0===e[0].offsetHeight)&&(e[0].style.display="",e[1].style.display="none",s=0===e[0].offsetHeight)),d.removeChild(l)}var n,i,o,s,r,a,l=it.createElement("div"),c=it.createElement("div");c.style&&(c.style.cssText="float:left;opacity:.5",dt.opacity="0.5"===c.style.opacity,dt.cssFloat=!!c.style.cssFloat,c.style.backgroundClip="content-box",c.cloneNode(!0).style.backgroundClip="",dt.clearCloneStyle="content-box"===c.style.backgroundClip,(l=it.createElement("div")).style.cssText="border:0;width:8px;height:0;top:0;left:-9999px;padding:0;margin-top:1px;position:absolute",c.innerHTML="",l.appendChild(c),dt.boxSizing=""===c.style.boxSizing||""===c.style.MozBoxSizing||""===c.style.WebkitBoxSizing,pt.extend(dt,{reliableHiddenOffsets:function(){return null==n&&e(),s},boxSizingReliable:function(){return null==n&&e(),o},pixelMarginRight:function(){return null==n&&e(),i},pixelPosition:function(){return null==n&&e(),n},reliableMarginRight:function(){return null==n&&e(),r},reliableMarginLeft:function(){return null==n&&e(),a}}))}();var ge,ve,ye=/^(top|right|bottom|left)$/;t.getComputedStyle?(ge=function(e){var n=e.ownerDocument.defaultView;return n&&n.opener||(n=t),n.getComputedStyle(e)},ve=function(t,e,n){var i,o,s,r,a=t.style;return""!==(r=(n=n||ge(t))?n.getPropertyValue(e)||n[e]:undefined)&&r!==undefined||pt.contains(t.ownerDocument,t)||(r=pt.style(t,e)),n&&!dt.pixelMarginRight()&&pe.test(r)&&he.test(e)&&(i=a.width,o=a.minWidth,s=a.maxWidth,a.minWidth=a.maxWidth=a.width=r,r=n.width,a.width=i,a.minWidth=o,a.maxWidth=s),r===undefined?r:r+""}):me.currentStyle&&(ge=function(t){return t.currentStyle},ve=function(t,e,n){var i,o,s,r,a=t.style;return null==(r=(n=n||ge(t))?n[e]:undefined)&&a&&a[e]&&(r=a[e]),pe.test(r)&&!ye.test(e)&&(i=a.left,(s=(o=t.runtimeStyle)&&o.left)&&(o.left=t.currentStyle.left),a.left="fontSize"===e?"1em":r,r=a.pixelLeft+"px",a.left=i,s&&(o.left=s)),r===undefined?r:r+""||"auto"});var be=/alpha\([^)]*\)/i,we=/opacity\s*=\s*([^)]*)/i,_e=/^(none|table(?!-c[ea]).+)/,xe=new RegExp("^("+Ft+")(.*)$","i"),Ce={position:"absolute",visibility:"hidden",display:"block"},ke={letterSpacing:"0",fontWeight:"400"},Te=["Webkit","O","Moz","ms"],Se=it.createElement("div").style;pt.extend({cssHooks:{opacity:{get:function(t,e){if(e){var n=ve(t,"opacity");return""===n?"1":n}}}},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:dt.cssFloat?"cssFloat":"styleFloat"},style:function(t,e,n,i){if(t&&3!==t.nodeType&&8!==t.nodeType&&t.style){var o,s,r,a=pt.camelCase(e),l=t.style;if(e=pt.cssProps[a]||(pt.cssProps[a]=M(a)||a),r=pt.cssHooks[e]||pt.cssHooks[a],n===undefined)return r&&"get"in r&&(o=r.get(t,!1,i))!==undefined?o:l[e];if("string"===(s=typeof n)&&(o=Ht.exec(n))&&o[1]&&(n=h(t,e,o),s="number"),null!=n&&n==n&&("number"===s&&(n+=o&&o[3]||(pt.cssNumber[a]?"":"px")),dt.clearCloneStyle||""!==n||0!==e.indexOf("background")||(l[e]="inherit"),!(r&&"set"in r&&(n=r.set(t,n,i))===undefined)))try{l[e]=n}catch(c){}}},css:function(t,e,n,i){var o,s,r,a=pt.camelCase(e);return e=pt.cssProps[a]||(pt.cssProps[a]=M(a)||a),(r=pt.cssHooks[e]||pt.cssHooks[a])&&"get"in r&&(s=r.get(t,!0,n)),s===undefined&&(s=ve(t,e,i)),"normal"===s&&e in ke&&(s=ke[e]),""===n||n?(o=parseFloat(s),!0===n||isFinite(o)?o||0:s):s}}),pt.each(["height","width"],function(t,e){pt.cssHooks[e]={get:function(t,n,i){if(n)return _e.test(pt.css(t,"display"))&&0===t.offsetWidth?fe(t,Ce,function(){return j(t,e,i)}):j(t,e,i)},set:function(t,n,i){var o=i&&ge(t);return I(t,n,i?L(t,e,i,dt.boxSizing&&"border-box"===pt.css(t,"boxSizing",!1,o),o):0)}}}),dt.opacity||(pt.cssHooks.opacity={get:function(t,e){return we.test((e&&t.currentStyle?t.currentStyle.filter:t.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":e?"1":""},set:function(t,e){var n=t.style,i=t.currentStyle,o=pt.isNumeric(e)?"alpha(opacity="+100*e+")":"",s=i&&i.filter||n.filter||"";n.zoom=1,(e>=1||""===e)&&""===pt.trim(s.replace(be,""))&&n.removeAttribute&&(n.removeAttribute("filter"),""===e||i&&!i.filter)||(n.filter=be.test(s)?s.replace(be,o):s+" "+o)}}),pt.cssHooks.marginRight=N(dt.reliableMarginRight,function(t,e){if(e)return fe(t,{display:"inline-block"},ve,[t,"marginRight"])}),pt.cssHooks.marginLeft=N(dt.reliableMarginLeft,function(t,e){if(e)return(parseFloat(ve(t,"marginLeft"))||(pt.contains(t.ownerDocument,t)?t.getBoundingClientRect().left-fe(t,{marginLeft:0},function(){return t.getBoundingClientRect().left}):0))+"px"}),pt.each({margin:"",padding:"",border:"Width"},function(t,e){pt.cssHooks[t+e]={expand:function(n){for(var i=0,o={},s="string"==typeof n?n.split(" "):[n];i<4;i++)o[t+Rt[i]+e]=s[i]||s[i-2]||s[0];return o}},he.test(t)||(pt.cssHooks[t+e].set=I)}),pt.fn.extend({css:function(t,e){return zt(this,function(t,e,n){var i,o,s={},r=0;if(pt.isArray(e)){for(i=ge(t),o=e.length;r1)},show:function(){return O(this,!0)},hide:function(){return O(this)},toggle:function(t){return"boolean"==typeof t?t?this.show():this.hide():this.each(function(){Ut(this)?pt(this).show():pt(this).hide()})}}),pt.Tween=P,P.prototype={constructor:P,init:function(t,e,n,i,o,s){this.elem=t,this.prop=n,this.easing=o||pt.easing._default,this.options=e,this.start=this.now=this.cur(),this.end=i,this.unit=s||(pt.cssNumber[n]?"":"px")},cur:function(){var t=P.propHooks[this.prop];return t&&t.get?t.get(this):P.propHooks._default.get(this)},run:function(t){var e,n=P.propHooks[this.prop];return this.options.duration?this.pos=e=pt.easing[this.easing](t,this.options.duration*t,0,1,this.options.duration):this.pos=e=t,this.now=(this.end-this.start)*e+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):P.propHooks._default.set(this),this}},P.prototype.init.prototype=P.prototype,P.propHooks={_default:{get:function(t){var e;return 1!==t.elem.nodeType||null!=t.elem[t.prop]&&null==t.elem.style[t.prop]?t.elem[t.prop]:(e=pt.css(t.elem,t.prop,""))&&"auto"!==e?e:0},set:function(t){pt.fx.step[t.prop]?pt.fx.step[t.prop](t):1!==t.elem.nodeType||null==t.elem.style[pt.cssProps[t.prop]]&&!pt.cssHooks[t.prop]?t.elem[t.prop]=t.now:pt.style(t.elem,t.prop,t.now+t.unit)}}},P.propHooks.scrollTop=P.propHooks.scrollLeft={set:function(t){t.elem.nodeType&&t.elem.parentNode&&(t.elem[t.prop]=t.now)}},pt.easing={linear:function(t){return t},swing:function(t){return.5-Math.cos(t*Math.PI)/2},_default:"swing"},pt.fx=P.prototype.init,pt.fx.step={};var De,Ee,$e=/^(?:toggle|show|hide)$/,Ae=/queueHooks$/;pt.Animation=pt.extend(q,{tweeners:{"*":[function(t,e){var n=this.createTween(t,e);return h(n.elem,t,Ht.exec(e),n),n}]},tweener:function(t,e){pt.isFunction(t)?(e=t,t=["*"]):t=t.match(At);for(var n,i=0,o=t.length;i
a",t=n.getElementsByTagName("a")[0],e.setAttribute("type","checkbox"),n.appendChild(e),(t=n.getElementsByTagName("a")[0]).style.cssText="top:1px",dt.getSetAttribute="t"!==n.className,dt.style=/top/.test(t.getAttribute("style")),dt.hrefNormalized="/a"===t.getAttribute("href"),dt.checkOn=!!e.value,dt.optSelected=o.selected,dt.enctype=!!it.createElement("form").enctype,i.disabled=!0,dt.optDisabled=!o.disabled,(e=it.createElement("input")).setAttribute("value",""),dt.input=""===e.getAttribute("value"),e.value="t",e.setAttribute("type","radio"),dt.radioValue="t"===e.value}();var Ne=/\r/g,Me=/[\x20\t\r\n\f]+/g;pt.fn.extend({val:function(t){var e,n,i,o=this[0];return arguments.length?(i=pt.isFunction(t),this.each(function(n){var o;1===this.nodeType&&(null==(o=i?t.call(this,n,pt(this).val()):t)?o="":"number"==typeof o?o+="":pt.isArray(o)&&(o=pt.map(o,function(t){return null==t?"":t+""})),(e=pt.valHooks[this.type]||pt.valHooks[this.nodeName.toLowerCase()])&&"set"in e&&e.set(this,o,"value")!==undefined||(this.value=o))})):o?(e=pt.valHooks[o.type]||pt.valHooks[o.nodeName.toLowerCase()])&&"get"in e&&(n=e.get(o,"value"))!==undefined?n:"string"==typeof(n=o.value)?n.replace(Ne,""):null==n?"":n:void 0}}),pt.extend({valHooks:{option:{get:function(t){var e=pt.find.attr(t,"value");return null!=e?e:pt.trim(pt.text(t)).replace(Me," ")}},select:{get:function(t){for(var e,n,i=t.options,o=t.selectedIndex,s="select-one"===t.type||o<0,r=s?null:[],a=s?o+1:i.length,l=o<0?a:s?o:0;l-1)try{i.selected=n=!0}catch(a){i.scrollHeight}else i.selected=!1;return n||(t.selectedIndex=-1),o}}}}),pt.each(["radio","checkbox"],function(){pt.valHooks[this]={set:function(t,e){if(pt.isArray(e))return t.checked=pt.inArray(pt(t).val(),e)>-1}},dt.checkOn||(pt.valHooks[this].get=function(t){return null===t.getAttribute("value")?"on":t.value})});var Oe,Ie,Le=pt.expr.attrHandle,je=/^(?:checked|selected)$/i,Pe=dt.getSetAttribute,Fe=dt.input;pt.fn.extend({attr:function(t,e){return zt(this,pt.attr,t,e,arguments.length>1)},removeAttr:function(t){return this.each(function(){pt.removeAttr(this,t)})}}),pt.extend({attr:function(t,e,n){var i,o,s=t.nodeType;if(3!==s&&8!==s&&2!==s)return"undefined"==typeof t.getAttribute?pt.prop(t,e,n):(1===s&&pt.isXMLDoc(t)||(e=e.toLowerCase(),o=pt.attrHooks[e]||(pt.expr.match.bool.test(e)?Ie:Oe)),n!==undefined?null===n?void pt.removeAttr(t,e):o&&"set"in o&&(i=o.set(t,n,e))!==undefined?i:(t.setAttribute(e,n+""),n):o&&"get"in o&&null!==(i=o.get(t,e))?i:null==(i=pt.find.attr(t,e))?undefined:i)},attrHooks:{type:{set:function(t,e){if(!dt.radioValue&&"radio"===e&&pt.nodeName(t,"input")){var n=t.value;return t.setAttribute("type",e),n&&(t.value=n),e}}}},removeAttr:function(t,e){var n,i,o=0,s=e&&e.match(At);if(s&&1===t.nodeType)for(;n=s[o++];)i=pt.propFix[n]||n,pt.expr.match.bool.test(n)?Fe&&Pe||!je.test(n)?t[i]=!1:t[pt.camelCase("default-"+n)]=t[i]=!1:pt.attr(t,n,""),t.removeAttribute(Pe?n:i)}}),Ie={set:function(t,e,n){return!1===e?pt.removeAttr(t,n):Fe&&Pe||!je.test(n)?t.setAttribute(!Pe&&pt.propFix[n]||n,n):t[pt.camelCase("default-"+n)]=t[n]=!0,n}},pt.each(pt.expr.match.bool.source.match(/\w+/g),function(t,e){var n=Le[e]||pt.find.attr;Fe&&Pe||!je.test(e)?Le[e]=function(t,e,i){var o,s;return i||(s=Le[e],Le[e]=o,o=null!=n(t,e,i)?e.toLowerCase():null,Le[e]=s),o}:Le[e]=function(t,e,n){if(!n)return t[pt.camelCase("default-"+e)]?e.toLowerCase():null}}),Fe&&Pe||(pt.attrHooks.value={set:function(t,e,n){if(!pt.nodeName(t,"input"))return Oe&&Oe.set(t,e,n);t.defaultValue=e}}),Pe||(Oe={set:function(t,e,n){var i=t.getAttributeNode(n);if(i||t.setAttributeNode(i=t.ownerDocument.createAttribute(n)),i.value=e+="","value"===n||e===t.getAttribute(n))return e}},Le.id=Le.name=Le.coords=function(t,e,n){var i;if(!n)return(i=t.getAttributeNode(e))&&""!==i.value?i.value:null},pt.valHooks.button={get:function(t,e){var n=t.getAttributeNode(e);if(n&&n.specified)return n.value},set:Oe.set},pt.attrHooks.contenteditable={set:function(t,e,n){Oe.set(t,""!==e&&e,n)}},pt.each(["width","height"],function(t,e){pt.attrHooks[e]={set:function(t,n){if(""===n)return t.setAttribute(e,"auto"),n}}})),dt.style||(pt.attrHooks.style={get:function(t){return t.style.cssText||undefined},set:function(t,e){return t.style.cssText=e+""}});var He=/^(?:input|select|textarea|button|object)$/i,Re=/^(?:a|area)$/i;pt.fn.extend({prop:function(t,e){return zt(this,pt.prop,t,e,arguments.length>1)},removeProp:function(t){return t=pt.propFix[t]||t,this.each(function(){try{this[t]=undefined,delete this[t]}catch(e){}})}}),pt.extend({prop:function(t,e,n){var i,o,s=t.nodeType;if(3!==s&&8!==s&&2!==s)return 1===s&&pt.isXMLDoc(t)||(e=pt.propFix[e]||e,o=pt.propHooks[e]),n!==undefined?o&&"set"in o&&(i=o.set(t,n,e))!==undefined?i:t[e]=n:o&&"get"in o&&null!==(i=o.get(t,e))?i:t[e]},propHooks:{tabIndex:{get:function(t){var e=pt.find.attr(t,"tabindex");return e?parseInt(e,10):He.test(t.nodeName)||Re.test(t.nodeName)&&t.href?0:-1}}},propFix:{"for":"htmlFor","class":"className"}}),dt.hrefNormalized||pt.each(["href","src"],function(t,e){pt.propHooks[e]={get:function(t){return t.getAttribute(e,4)}}}),dt.optSelected||(pt.propHooks.selected={get:function(t){var e=t.parentNode;return e&&(e.selectedIndex,e.parentNode&&e.parentNode.selectedIndex),null},set:function(t){var e=t.parentNode;e&&(e.selectedIndex,e.parentNode&&e.parentNode.selectedIndex)}}),pt.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){pt.propFix[this.toLowerCase()]=this}),dt.enctype||(pt.propFix.enctype="encoding");var Ue=/[\t\r\n\f]/g;pt.fn.extend({addClass:function(t){var e,n,i,o,s,r,a,l=0;if(pt.isFunction(t))return this.each(function(e){pt(this).addClass(t.call(this,e,B(this)))});if("string"==typeof t&&t)for(e=t.match(At)||[];n=this[l++];)if(o=B(n),i=1===n.nodeType&&(" "+o+" ").replace(Ue," ")){for(r=0;s=e[r++];)i.indexOf(" "+s+" ")<0&&(i+=s+" ");o!==(a=pt.trim(i))&&pt.attr(n,"class",a)}return this},removeClass:function(t){var e,n,i,o,s,r,a,l=0;if(pt.isFunction(t))return this.each(function(e){pt(this).removeClass(t.call(this,e,B(this)))});if(!arguments.length)return this.attr("class","");if("string"==typeof t&&t)for(e=t.match(At)||[];n=this[l++];)if(o=B(n),i=1===n.nodeType&&(" "+o+" ").replace(Ue," ")){for(r=0;s=e[r++];)for(;i.indexOf(" "+s+" ")>-1;)i=i.replace(" "+s+" "," ");o!==(a=pt.trim(i))&&pt.attr(n,"class",a)}return this},toggleClass:function(t,e){var n=typeof t;return"boolean"==typeof e&&"string"===n?e?this.addClass(t):this.removeClass(t):pt.isFunction(t)?this.each(function(n){pt(this).toggleClass(t.call(this,n,B(this),e),e)}):this.each(function(){var e,i,o,s;if("string"===n)for(i=0,o=pt(this),s=t.match(At)||[];e=s[i++];)o.hasClass(e)?o.removeClass(e):o.addClass(e);else t!==undefined&&"boolean"!==n||((e=B(this))&&pt._data(this,"__className__",e),pt.attr(this,"class",e||!1===t?"":pt._data(this,"__className__")||""))})},hasClass:function(t){var e,n,i=0;for(e=" "+t+" ";n=this[i++];)if(1===n.nodeType&&(" "+B(n)+" ").replace(Ue," ").indexOf(e)>-1)return!0;return!1}}),pt.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(t,e){pt.fn[e]=function(t,n){return arguments.length>0?this.on(e,null,t,n):this.trigger(e)}}),pt.fn.extend({hover:function(t,e){return this.mouseenter(t).mouseleave(e||t)}});var ze=t.location,qe=pt.now(),Be=/\?/,We=/(,)|(\[|{)|(}|])|"(?:[^"\\\r\n]|\\["\\\/bfnrt]|\\u[\da-fA-F]{4})*"\s*:?|true|false|null|-?(?!0\d)\d+(?:\.\d+|)(?:[eE][+-]?\d+|)/g;pt.parseJSON=function(e){if(t.JSON&&t.JSON.parse)return t.JSON.parse(e+"");var n,i=null,o=pt.trim(e+"");return o&&!pt.trim(o.replace(We,function(t,e,o,s){return n&&e&&(i=0),0===i?t:(n=o||e,i+=!s-!o,"")}))?Function("return "+o)():pt.error("Invalid JSON: "+e)},pt.parseXML=function(e){var n;if(!e||"string"!=typeof e)return null;try{t.DOMParser?n=(new t.DOMParser).parseFromString(e,"text/xml"):((n=new t.ActiveXObject("Microsoft.XMLDOM")).async="false",n.loadXML(e))}catch(i){n=undefined} return n&&n.documentElement&&!n.getElementsByTagName("parsererror").length||pt.error("Invalid XML: "+e),n};var Ve=/#.*$/,Ye=/([?&])_=[^&]*/,Xe=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Qe=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Ge=/^(?:GET|HEAD)$/,Ke=/^\/\//,Je=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,Ze={},tn={},en="*/".concat("*"),nn=ze.href,on=Je.exec(nn.toLowerCase())||[];pt.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:nn,type:"GET",isLocal:Qe.test(on[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":en,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":pt.parseJSON,"text xml":pt.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(t,e){return e?Y(Y(t,pt.ajaxSettings),e):Y(pt.ajaxSettings,t)},ajaxPrefilter:W(Ze),ajaxTransport:W(tn),ajax:function(e,n){function i(e,n,i,o){var s,d,y,b,_,C=n;2!==w&&(w=2,l&&t.clearTimeout(l),u=undefined,a=o||"",x.readyState=e>0?4:0,s=e>=200&&e<300||304===e,i&&(b=X(h,x,i)),b=Q(h,b,x,s),s?(h.ifModified&&((_=x.getResponseHeader("Last-Modified"))&&(pt.lastModified[r]=_),(_=x.getResponseHeader("etag"))&&(pt.etag[r]=_)),204===e||"HEAD"===h.type?C="nocontent":304===e?C="notmodified":(C=b.state,d=b.data,s=!(y=b.error))):(y=C,!e&&C||(C="error",e<0&&(e=0))),x.status=e,x.statusText=(n||C)+"",s?m.resolveWith(p,[d,C,x]):m.rejectWith(p,[x,C,y]),x.statusCode(v),v=undefined,c&&f.trigger(s?"ajaxSuccess":"ajaxError",[x,h,s?d:y]),g.fireWith(p,[x,C]),c&&(f.trigger("ajaxComplete",[x,h]),--pt.active||pt.event.trigger("ajaxStop")))}"object"==typeof e&&(n=e,e=undefined),n=n||{};var o,s,r,a,l,c,u,d,h=pt.ajaxSetup({},n),p=h.context||h,f=h.context&&(p.nodeType||p.jquery)?pt(p):pt.event,m=pt.Deferred(),g=pt.Callbacks("once memory"),v=h.statusCode||{},y={},b={},w=0,_="canceled",x={readyState:0,getResponseHeader:function(t){var e;if(2===w){if(!d)for(d={};e=Xe.exec(a);)d[e[1].toLowerCase()]=e[2];e=d[t.toLowerCase()]}return null==e?null:e},getAllResponseHeaders:function(){return 2===w?a:null},setRequestHeader:function(t,e){var n=t.toLowerCase();return w||(t=b[n]=b[n]||t,y[t]=e),this},overrideMimeType:function(t){return w||(h.mimeType=t),this},statusCode:function(t){var e;if(t)if(w<2)for(e in t)v[e]=[v[e],t[e]];else x.always(t[x.status]);return this},abort:function(t){var e=t||_;return u&&u.abort(e),i(0,e),this}};if(m.promise(x).complete=g.add,x.success=x.done,x.error=x.fail,h.url=((e||h.url||nn)+"").replace(Ve,"").replace(Ke,on[1]+"//"),h.type=n.method||n.type||h.method||h.type,h.dataTypes=pt.trim(h.dataType||"*").toLowerCase().match(At)||[""],null==h.crossDomain&&(o=Je.exec(h.url.toLowerCase()),h.crossDomain=!(!o||o[1]===on[1]&&o[2]===on[2]&&(o[3]||("http:"===o[1]?"80":"443"))===(on[3]||("http:"===on[1]?"80":"443")))),h.data&&h.processData&&"string"!=typeof h.data&&(h.data=pt.param(h.data,h.traditional)),V(Ze,h,n,x),2===w)return x;for(s in(c=pt.event&&h.global)&&0==pt.active++&&pt.event.trigger("ajaxStart"),h.type=h.type.toUpperCase(),h.hasContent=!Ge.test(h.type),r=h.url,h.hasContent||(h.data&&(r=h.url+=(Be.test(r)?"&":"?")+h.data,delete h.data),!1===h.cache&&(h.url=Ye.test(r)?r.replace(Ye,"$1_="+qe++):r+(Be.test(r)?"&":"?")+"_="+qe++)),h.ifModified&&(pt.lastModified[r]&&x.setRequestHeader("If-Modified-Since",pt.lastModified[r]),pt.etag[r]&&x.setRequestHeader("If-None-Match",pt.etag[r])),(h.data&&h.hasContent&&!1!==h.contentType||n.contentType)&&x.setRequestHeader("Content-Type",h.contentType),x.setRequestHeader("Accept",h.dataTypes[0]&&h.accepts[h.dataTypes[0]]?h.accepts[h.dataTypes[0]]+("*"!==h.dataTypes[0]?", "+en+"; q=0.01":""):h.accepts["*"]),h.headers)x.setRequestHeader(s,h.headers[s]);if(h.beforeSend&&(!1===h.beforeSend.call(p,x,h)||2===w))return x.abort();for(s in _="abort",{success:1,error:1,complete:1})x[s](h[s]);if(u=V(tn,h,n,x)){if(x.readyState=1,c&&f.trigger("ajaxSend",[x,h]),2===w)return x;h.async&&h.timeout>0&&(l=t.setTimeout(function(){x.abort("timeout")},h.timeout));try{w=1,u.send(y,i)}catch(C){if(!(w<2))throw C;i(-1,C)}}else i(-1,"No Transport");return x},getJSON:function(t,e,n){return pt.get(t,e,n,"json")},getScript:function(t,e){return pt.get(t,undefined,e,"script")}}),pt.each(["get","post"],function(t,e){pt[e]=function(t,n,i,o){return pt.isFunction(n)&&(o=o||i,i=n,n=undefined),pt.ajax(pt.extend({url:t,type:e,dataType:o,data:n,success:i},pt.isPlainObject(t)&&t))}}),pt._evalUrl=function(t){return pt.ajax({url:t,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,throws:!0})},pt.fn.extend({wrapAll:function(t){if(pt.isFunction(t))return this.each(function(e){pt(this).wrapAll(t.call(this,e))});if(this[0]){var e=pt(t,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&e.insertBefore(this[0]),e.map(function(){for(var t=this;t.firstChild&&1===t.firstChild.nodeType;)t=t.firstChild;return t}).append(this)}return this},wrapInner:function(t){return pt.isFunction(t)?this.each(function(e){pt(this).wrapInner(t.call(this,e))}):this.each(function(){var e=pt(this),n=e.contents();n.length?n.wrapAll(t):e.append(t)})},wrap:function(t){var e=pt.isFunction(t);return this.each(function(n){pt(this).wrapAll(e?t.call(this,n):t)})},unwrap:function(){return this.parent().each(function(){pt.nodeName(this,"body")||pt(this).replaceWith(this.childNodes)}).end()}}),pt.expr.filters.hidden=function(t){return dt.reliableHiddenOffsets()?t.offsetWidth<=0&&t.offsetHeight<=0&&!t.getClientRects().length:K(t)},pt.expr.filters.visible=function(t){return!pt.expr.filters.hidden(t)};var sn=/%20/g,rn=/\[\]$/,an=/\r?\n/g,ln=/^(?:submit|button|image|reset|file)$/i,cn=/^(?:input|select|textarea|keygen)/i;pt.param=function(t,e){var n,i=[],o=function(t,e){e=pt.isFunction(e)?e():null==e?"":e,i[i.length]=encodeURIComponent(t)+"="+encodeURIComponent(e)};if(e===undefined&&(e=pt.ajaxSettings&&pt.ajaxSettings.traditional),pt.isArray(t)||t.jquery&&!pt.isPlainObject(t))pt.each(t,function(){o(this.name,this.value)});else for(n in t)J(n,t[n],e,o);return i.join("&").replace(sn,"+")},pt.fn.extend({serialize:function(){return pt.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var t=pt.prop(this,"elements");return t?pt.makeArray(t):this}).filter(function(){var t=this.type;return this.name&&!pt(this).is(":disabled")&&cn.test(this.nodeName)&&!ln.test(t)&&(this.checked||!qt.test(t))}).map(function(t,e){var n=pt(this).val();return null==n?null:pt.isArray(n)?pt.map(n,function(t){return{name:e.name,value:t.replace(an,"\r\n")}}):{name:e.name,value:n.replace(an,"\r\n")}}).get()}}),pt.ajaxSettings.xhr=t.ActiveXObject!==undefined?function(){return this.isLocal?tt():it.documentMode>8?Z():/^(get|post|head|put|delete|options)$/i.test(this.type)&&Z()||tt()}:Z;var un=0,dn={},hn=pt.ajaxSettings.xhr();t.attachEvent&&t.attachEvent("onunload",function(){for(var t in dn)dn[t](undefined,!0)}),dt.cors=!!hn&&"withCredentials"in hn,(hn=dt.ajax=!!hn)&&pt.ajaxTransport(function(e){var n;if(!e.crossDomain||dt.cors)return{send:function(i,o){var s,r=e.xhr(),a=++un;if(r.open(e.type,e.url,e.async,e.username,e.password),e.xhrFields)for(s in e.xhrFields)r[s]=e.xhrFields[s];for(s in e.mimeType&&r.overrideMimeType&&r.overrideMimeType(e.mimeType),e.crossDomain||i["X-Requested-With"]||(i["X-Requested-With"]="XMLHttpRequest"),i)i[s]!==undefined&&r.setRequestHeader(s,i[s]+"");r.send(e.hasContent&&e.data||null),n=function(t,i){var s,l,c;if(n&&(i||4===r.readyState))if(delete dn[a],n=undefined,r.onreadystatechange=pt.noop,i)4!==r.readyState&&r.abort();else{c={},s=r.status,"string"==typeof r.responseText&&(c.text=r.responseText);try{l=r.statusText}catch(u){l=""}s||!e.isLocal||e.crossDomain?1223===s&&(s=204):s=c.text?200:404}c&&o(s,l,c,r.getAllResponseHeaders())},e.async?4===r.readyState?t.setTimeout(n):r.onreadystatechange=dn[a]=n:n()},abort:function(){n&&n(undefined,!0)}}}),pt.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(t){return pt.globalEval(t),t}}}),pt.ajaxPrefilter("script",function(t){t.cache===undefined&&(t.cache=!1),t.crossDomain&&(t.type="GET",t.global=!1)}),pt.ajaxTransport("script",function(t){if(t.crossDomain){var e,n=it.head||pt("head")[0]||it.documentElement;return{send:function(i,o){(e=it.createElement("script")).async=!0,t.scriptCharset&&(e.charset=t.scriptCharset),e.src=t.url,e.onload=e.onreadystatechange=function(t,n){(n||!e.readyState||/loaded|complete/.test(e.readyState))&&(e.onload=e.onreadystatechange=null,e.parentNode&&e.parentNode.removeChild(e),e=null,n||o(200,"success"))},n.insertBefore(e,n.firstChild)},abort:function(){e&&e.onload(undefined,!0)}}}});var pn=[],fn=/(=)\?(?=&|$)|\?\?/;pt.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var t=pn.pop()||pt.expando+"_"+qe++;return this[t]=!0,t}}),pt.ajaxPrefilter("json jsonp",function(e,n,i){var o,s,r,a=!1!==e.jsonp&&(fn.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&fn.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return o=e.jsonpCallback=pt.isFunction(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(fn,"$1"+o):!1!==e.jsonp&&(e.url+=(Be.test(e.url)?"&":"?")+e.jsonp+"="+o),e.converters["script json"]=function(){return r||pt.error(o+" was not called"),r[0]},e.dataTypes[0]="json",s=t[o],t[o]=function(){r=arguments},i.always(function(){s===undefined?pt(t).removeProp(o):t[o]=s,e[o]&&(e.jsonpCallback=n.jsonpCallback,pn.push(o)),r&&pt.isFunction(s)&&s(r[0]),r=s=undefined}),"script"}),pt.parseHTML=function(t,e,n){if(!t||"string"!=typeof t)return null;"boolean"==typeof e&&(n=e,e=!1),e=e||it;var i=xt.exec(t),o=!n&&[];return i?[e.createElement(i[1])]:(i=v([t],e,o),o&&o.length&&pt(o).remove(),pt.merge([],i.childNodes))};var mn=pt.fn.load;pt.fn.load=function(t,e,n){if("string"!=typeof t&&mn)return mn.apply(this,arguments);var i,o,s,r=this,a=t.indexOf(" ");return a>-1&&(i=pt.trim(t.slice(a,t.length)),t=t.slice(0,a)),pt.isFunction(e)?(n=e,e=undefined):e&&"object"==typeof e&&(o="POST"),r.length>0&&pt.ajax({url:t,type:o||"GET",dataType:"html",data:e}).done(function(t){s=arguments,r.html(i?pt("
").append(pt.parseHTML(t)).find(i):t)}).always(n&&function(t,e){r.each(function(){n.apply(this,s||[t.responseText,e,t])})}),this},pt.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(t,e){pt.fn[e]=function(t){return this.on(e,t)}}),pt.expr.filters.animated=function(t){return pt.grep(pt.timers,function(e){return t===e.elem}).length},pt.offset={setOffset:function(t,e,n){var i,o,s,r,a,l,c=pt.css(t,"position"),u=pt(t),d={};"static"===c&&(t.style.position="relative"),a=u.offset(),s=pt.css(t,"top"),l=pt.css(t,"left"),("absolute"===c||"fixed"===c)&&pt.inArray("auto",[s,l])>-1?(r=(i=u.position()).top,o=i.left):(r=parseFloat(s)||0,o=parseFloat(l)||0),pt.isFunction(e)&&(e=e.call(t,n,pt.extend({},a))),null!=e.top&&(d.top=e.top-a.top+r),null!=e.left&&(d.left=e.left-a.left+o),"using"in e?e.using.call(t,d):u.css(d)}},pt.fn.extend({offset:function(t){if(arguments.length)return t===undefined?this:this.each(function(e){pt.offset.setOffset(this,t,e)});var e,n,i={top:0,left:0},o=this[0],s=o&&o.ownerDocument;return s?(e=s.documentElement,pt.contains(e,o)?("undefined"!=typeof o.getBoundingClientRect&&(i=o.getBoundingClientRect()),n=et(s),{top:i.top+(n.pageYOffset||e.scrollTop)-(e.clientTop||0),left:i.left+(n.pageXOffset||e.scrollLeft)-(e.clientLeft||0)}):i):void 0},position:function(){if(this[0]){var t,e,n={top:0,left:0},i=this[0];return"fixed"===pt.css(i,"position")?e=i.getBoundingClientRect():(t=this.offsetParent(),e=this.offset(),pt.nodeName(t[0],"html")||(n=t.offset()),n.top+=pt.css(t[0],"borderTopWidth",!0),n.left+=pt.css(t[0],"borderLeftWidth",!0)),{top:e.top-n.top-pt.css(i,"marginTop",!0),left:e.left-n.left-pt.css(i,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var t=this.offsetParent;t&&!pt.nodeName(t,"html")&&"static"===pt.css(t,"position");)t=t.offsetParent;return t||me})}}),pt.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,e){var n=/Y/.test(e);pt.fn[t]=function(i){return zt(this,function(t,i,o){var s=et(t);if(o===undefined)return s?e in s?s[e]:s.document.documentElement[i]:t[i];s?s.scrollTo(n?pt(s).scrollLeft():o,n?o:pt(s).scrollTop()):t[i]=o},t,i,arguments.length,null)}}),pt.each(["top","left"],function(t,e){pt.cssHooks[e]=N(dt.pixelPosition,function(t,n){if(n)return n=ve(t,e),pe.test(n)?pt(t).position()[e]+"px":n})}),pt.each({Height:"height",Width:"width"},function(t,e){pt.each({padding:"inner"+t,content:e,"":"outer"+t},function(n,i){pt.fn[i]=function(i,o){var s=arguments.length&&(n||"boolean"!=typeof i),r=n||(!0===i||!0===o?"margin":"border");return zt(this,function(e,n,i){var o;return pt.isWindow(e)?e.document.documentElement["client"+t]:9===e.nodeType?(o=e.documentElement,Math.max(e.body["scroll"+t],o["scroll"+t],e.body["offset"+t],o["offset"+t],o["client"+t])):i===undefined?pt.css(e,n,r):pt.style(e,n,i,r)},e,s?i:undefined,s,null)}})}),pt.fn.extend({bind:function(t,e,n){return this.on(t,null,e,n)},unbind:function(t,e){return this.off(t,null,e)},delegate:function(t,e,n,i){return this.on(e,t,n,i)},undelegate:function(t,e,n){return 1===arguments.length?this.off(t,"**"):this.off(e,t||"**",n)}}),pt.fn.size=function(){return this.length},pt.fn.andSelf=pt.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],function(){return pt});var gn=t.jQuery,vn=t.$;return pt.noConflict=function(e){return t.$===pt&&(t.$=vn),e&&t.jQuery===pt&&(t.jQuery=gn),pt},e||(t.jQuery=t.$=pt),pt}),function(){var t,e=function(t,e){return function(){return t.apply(e,arguments)}};t=function(){function t(n,i){this.form_field=n,this.options=null!=i?i:{},this.label_click_handler=e(this.label_click_handler,this),t.browser_is_supported()&&(this.is_multiple=this.form_field.multiple,this.set_default_text(),this.set_default_values(),this.setup(),this.set_up_html(),this.register_observers(),this.on_ready())}return t.prototype.set_default_values=function(){var t;return this.click_test_action=(t=this,function(e){return t.test_active_click(e)}),this.activate_action=function(t){return function(e){return t.activate_field(e)}}(this),this.active_field=!1,this.mouse_on_container=!1,this.results_showing=!1,this.result_highlighted=null,this.is_rtl=this.options.rtl||/\bchosen-rtl\b/.test(this.form_field.className),this.allow_single_deselect=null!=this.options.allow_single_deselect&&null!=this.form_field.options[0]&&""===this.form_field.options[0].text&&this.options.allow_single_deselect,this.disable_search_threshold=this.options.disable_search_threshold||0,this.disable_search=this.options.disable_search||!1,this.enable_split_word_search=null==this.options.enable_split_word_search||this.options.enable_split_word_search,this.group_search=null==this.options.group_search||this.options.group_search,this.search_contains=this.options.search_contains||!1,this.single_backstroke_delete=null==this.options.single_backstroke_delete||this.options.single_backstroke_delete,this.max_selected_options=this.options.max_selected_options||Infinity,this.inherit_select_classes=this.options.inherit_select_classes||!1,this.display_selected_options=null==this.options.display_selected_options||this.options.display_selected_options,this.display_disabled_options=null==this.options.display_disabled_options||this.options.display_disabled_options,this.include_group_label_in_selected=this.options.include_group_label_in_selected||!1,this.max_shown_results=this.options.max_shown_results||Number.POSITIVE_INFINITY,this.case_sensitive_search=this.options.case_sensitive_search||!1,this.hide_results_on_select=null==this.options.hide_results_on_select||this.options.hide_results_on_select},t.prototype.set_default_text=function(){return this.form_field.getAttribute("data-placeholder")?this.default_text=this.form_field.getAttribute("data-placeholder"):this.is_multiple?this.default_text=this.options.placeholder_text_multiple||this.options.placeholder_text||t.default_multiple_text:this.default_text=this.options.placeholder_text_single||this.options.placeholder_text||t.default_single_text,this.default_text=this.escape_html(this.default_text),this.results_none_found=this.form_field.getAttribute("data-no_results_text")||this.options.no_results_text||t.default_no_result_text},t.prototype.choice_label=function(t){return this.include_group_label_in_selected&&null!=t.group_label?""+this.escape_html(t.group_label)+""+t.html:t.html},t.prototype.mouse_enter=function(){return this.mouse_on_container=!0},t.prototype.mouse_leave=function(){return this.mouse_on_container=!1},t.prototype.input_focus=function(){if(this.is_multiple){if(!this.active_field)return setTimeout((t=this,function(){return t.container_mousedown()}),50)}else if(!this.active_field)return this.activate_field();var t},t.prototype.input_blur=function(){if(!this.mouse_on_container)return this.active_field=!1,setTimeout((t=this,function(){return t.blur_test()}),100);var t},t.prototype.label_click_handler=function(t){return this.is_multiple?this.container_mousedown(t):this.activate_field()},t.prototype.results_option_build=function(t){var e,n,i,o,s,r,a;for(e="",a=0,o=0,s=(r=this.results_data).length;o=this.max_shown_results));o++);return e},t.prototype.result_add_option=function(t){var e,n;return t.search_match&&this.include_option_in_results(t)?(e=[],t.disabled||t.selected&&this.is_multiple||e.push("active-result"),!t.disabled||t.selected&&this.is_multiple||e.push("disabled-result"),t.selected&&e.push("result-selected"),null!=t.group_array_index&&e.push("group-option"),""!==t.classes&&e.push(t.classes),(n=document.createElement("li")).className=e.join(" "),t.style&&(n.style.cssText=t.style),n.setAttribute("data-option-array-index",t.array_index),n.innerHTML=t.highlighted_html||t.html,t.title&&(n.title=t.title),this.outerHTML(n)):""},t.prototype.result_add_group=function(t){var e,n;return(t.search_match||t.group_match)&&t.active_options>0?((e=[]).push("group-result"),t.classes&&e.push(t.classes),(n=document.createElement("li")).className=e.join(" "),n.innerHTML=t.highlighted_html||this.escape_html(t.label),t.title&&(n.title=t.title),this.outerHTML(n)):""},t.prototype.results_update_field=function(){if(this.set_default_text(),this.is_multiple||this.results_reset_cleanup(),this.result_clear_highlight(),this.results_build(),this.results_showing)return this.winnow_results()},t.prototype.reset_single_select_options=function(){var t,e,n,i,o;for(o=[],t=0,e=(n=this.results_data).length;t"+this.escape_html(n)+""+this.escape_html(f)),null!=d&&(d.group_match=!0)):null!=s.group_array_index&&this.results_data[s.group_array_index].search_match&&(s.search_match=!0)));return this.result_clear_highlight(),u<1&&a.length?(this.update_results_content(""),this.no_results(a)):(this.update_results_content(this.results_option_build()),(null!=t?t.skip_highlight:void 0)?void 0:this.winnow_results_set_highlight())},t.prototype.get_search_regex=function(t){var e,n;return n=this.search_contains?t:"(^|\\s|\\b)"+t+"[^\\s]*",this.enable_split_word_search||this.search_contains||(n="^"+n),e=this.case_sensitive_search?"":"i",new RegExp(n,e)},t.prototype.search_string_match=function(t,e){var n;return n=e.exec(t),!this.search_contains&&(null!=n?n[1]:void 0)&&(n.index+=1),n},t.prototype.choices_count=function(){var t,e,n;if(null!=this.selected_option_count)return this.selected_option_count;for(this.selected_option_count=0,t=0,e=(n=this.form_field.options).length;t0?this.keydown_backstroke():this.pending_backstroke||(this.result_clear_highlight(),this.results_search());break;case 13:t.preventDefault(),this.results_showing&&this.result_select(t);break;case 27:this.results_showing&&this.results_hide();break;case 9:case 16:case 17:case 18:case 38:case 40:case 91:break;default:this.results_search()}},t.prototype.clipboard_event_checker=function(){var t;if(!this.is_disabled)return setTimeout((t=this,function(){return t.results_search()}),50)},t.prototype.container_width=function(){return null!=this.options.width?this.options.width:this.form_field.offsetWidth+"px"},t.prototype.include_option_in_results=function(t){return!(this.is_multiple&&!this.display_selected_options&&t.selected)&&(!(!this.display_disabled_options&&t.disabled)&&!t.empty)},t.prototype.search_results_touchstart=function(t){return this.touch_started=!0,this.search_results_mouseover(t)},t.prototype.search_results_touchmove=function(t){return this.touch_started=!1,this.search_results_mouseout(t)},t.prototype.search_results_touchend=function(t){if(this.touch_started)return this.search_results_mouseup(t)},t.prototype.outerHTML=function(t){var e;return t.outerHTML?t.outerHTML:((e=document.createElement("div")).appendChild(t),e.innerHTML)},t.prototype.get_single_html=function(){return'\n '+this.default_text+'\n
\n
\n
\n \n
    \n
    '},t.prototype.get_multi_html=function(){return'
      \n
    • \n \n
    • \n
    \n
    \n
      \n
      '},t.prototype.get_no_results_html=function(t){return'
    • \n '+this.results_none_found+" "+this.escape_html(t)+"\n
    • "},t.browser_is_supported=function(){return"Microsoft Internet Explorer"===window.navigator.appName?document.documentMode>=8:!(/iP(od|hone)/i.test(window.navigator.userAgent)||/IEMobile/i.test(window.navigator.userAgent)||/Windows Phone/i.test(window.navigator.userAgent)||/BlackBerry/i.test(window.navigator.userAgent)||/BB10/i.test(window.navigator.userAgent)||/Android.*Mobile/i.test(window.navigator.userAgent))},t.default_multiple_text="Select Some Options",t.default_single_text="Select an Option",t.default_no_result_text="No results match",t}(),window.AbstractChosen=t}.call(this),function(){var t;(t=function(){function t(){this.options_index=0,this.parsed=[]}return t.prototype.add_node=function(t){return"OPTGROUP"===t.nodeName.toUpperCase()?this.add_group(t):this.add_option(t)},t.prototype.add_group=function(t){var e,n,i,o,s,r;for(e=this.parsed.length,this.parsed.push({array_index:e,group:!0,label:t.label,title:t.title?t.title:void 0,children:0,disabled:t.disabled,classes:t.className}),r=[],n=0,i=(s=t.childNodes).length;n",n),this.container.width(this.container_width()),this.is_multiple?this.container.html(this.get_multi_html()):this.container.html(this.get_single_html()),this.form_field_jq.hide().after(this.container),this.dropdown=this.container.find("div.chosen-drop").first(),this.search_field=this.container.find("input").first(),this.search_results=this.container.find("ul.chosen-results").first(),this.search_field_scale(),this.search_no_results=this.container.find("li.no-results").first(),this.is_multiple?(this.search_choices=this.container.find("ul.chosen-choices").first(),this.search_container=this.container.find("li.search-field").first()):(this.search_container=this.container.find("div.chosen-search").first(),this.selected_item=this.container.find(".chosen-single").first()),this.results_build(),this.set_tab_index(),this.set_label_behavior()},i.prototype.on_ready=function(){return this.form_field_jq.trigger("chosen:ready",{chosen:this})},i.prototype.register_observers=function(){var t;return this.container.on("touchstart.chosen",(t=this,function(e){t.container_mousedown(e)})),this.container.on("touchend.chosen",function(t){return function(e){t.container_mouseup(e)}}(this)),this.container.on("mousedown.chosen",function(t){return function(e){t.container_mousedown(e)}}(this)),this.container.on("mouseup.chosen",function(t){return function(e){t.container_mouseup(e)}}(this)),this.container.on("mouseenter.chosen",function(t){return function(e){t.mouse_enter(e)}}(this)),this.container.on("mouseleave.chosen",function(t){return function(e){t.mouse_leave(e)}}(this)),this.search_results.on("mouseup.chosen",function(t){return function(e){t.search_results_mouseup(e)}}(this)),this.search_results.on("mouseover.chosen",function(t){return function(e){t.search_results_mouseover(e)}}(this)),this.search_results.on("mouseout.chosen",function(t){return function(e){t.search_results_mouseout(e)}}(this)),this.search_results.on("mousewheel.chosen DOMMouseScroll.chosen",function(t){return function(e){t.search_results_mousewheel(e)}}(this)),this.search_results.on("touchstart.chosen",function(t){return function(e){t.search_results_touchstart(e)}}(this)),this.search_results.on("touchmove.chosen",function(t){return function(e){t.search_results_touchmove(e)}}(this)),this.search_results.on("touchend.chosen",function(t){return function(e){t.search_results_touchend(e)}}(this)),this.form_field_jq.on("chosen:updated.chosen",function(t){return function(e){t.results_update_field(e)}}(this)),this.form_field_jq.on("chosen:activate.chosen",function(t){return function(e){t.activate_field(e)}}(this)),this.form_field_jq.on("chosen:open.chosen",function(t){return function(e){t.container_mousedown(e)}}(this)),this.form_field_jq.on("chosen:close.chosen",function(t){return function(e){t.close_field(e)}}(this)),this.search_field.on("blur.chosen",function(t){return function(e){t.input_blur(e)}}(this)),this.search_field.on("keyup.chosen",function(t){return function(e){t.keyup_checker(e)}}(this)),this.search_field.on("keydown.chosen",function(t){return function(e){t.keydown_checker(e)}}(this)),this.search_field.on("focus.chosen",function(t){return function(e){t.input_focus(e)}}(this)),this.search_field.on("cut.chosen",function(t){return function(e){t.clipboard_event_checker(e)}}(this)),this.search_field.on("paste.chosen",function(t){return function(e){t.clipboard_event_checker(e)}}(this)),this.is_multiple?this.search_choices.on("click.chosen",function(t){return function(e){t.choices_click(e)}}(this)):this.container.on("click.chosen",function(t){t.preventDefault()})},i.prototype.destroy=function(){return t(this.container[0].ownerDocument).off("click.chosen",this.click_test_action),this.form_field_label.length>0&&this.form_field_label.off("click.chosen"),this.search_field[0].tabIndex&&(this.form_field_jq[0].tabIndex=this.search_field[0].tabIndex),this.container.remove(),this.form_field_jq.removeData("chosen"),this.form_field_jq.show()},i.prototype.search_field_disabled=function(){return this.is_disabled=this.form_field.disabled||this.form_field_jq.parents("fieldset").is(":disabled"),this.container.toggleClass("chosen-disabled",this.is_disabled),this.search_field[0].disabled=this.is_disabled,this.is_multiple||this.selected_item.off("focus.chosen",this.activate_field),this.is_disabled?this.close_field():this.is_multiple?void 0:this.selected_item.on("focus.chosen",this.activate_field)},i.prototype.container_mousedown=function(e){var n;if(!this.is_disabled)return!e||"mousedown"!==(n=e.type)&&"touchstart"!==n||this.results_showing||e.preventDefault(),null!=e&&t(e.target).hasClass("search-choice-close")?void 0:(this.active_field?this.is_multiple||!e||t(e.target)[0]!==this.selected_item[0]&&!t(e.target).parents("a.chosen-single").length||(e.preventDefault(),this.results_toggle()):(this.is_multiple&&this.search_field.val(""),t(this.container[0].ownerDocument).on("click.chosen",this.click_test_action),this.results_show()),this.activate_field())},i.prototype.container_mouseup=function(t){if("ABBR"===t.target.nodeName&&!this.is_disabled)return this.results_reset(t)},i.prototype.search_results_mousewheel=function(t){var e;if(t.originalEvent&&(e=t.originalEvent.deltaY||-t.originalEvent.wheelDelta||t.originalEvent.detail),null!=e)return t.preventDefault(),"DOMMouseScroll"===t.type&&(e*=40),this.search_results.scrollTop(e+this.search_results.scrollTop())},i.prototype.blur_test=function(){if(!this.active_field&&this.container.hasClass("chosen-container-active"))return this.close_field()},i.prototype.close_field=function(){ return t(this.container[0].ownerDocument).off("click.chosen",this.click_test_action),this.active_field=!1,this.results_hide(),this.container.removeClass("chosen-container-active"),this.clear_backstroke(),this.show_search_field_default(),this.search_field_scale(),this.search_field.blur()},i.prototype.activate_field=function(){if(!this.is_disabled)return this.container.addClass("chosen-container-active"),this.active_field=!0,this.search_field.val(this.search_field.val()),this.search_field.focus()},i.prototype.test_active_click=function(e){var n;return(n=t(e.target).closest(".chosen-container")).length&&this.container[0]===n[0]?this.active_field=!0:this.close_field()},i.prototype.results_build=function(){return this.parsing=!0,this.selected_option_count=null,this.results_data=SelectParser.select_to_array(this.form_field),this.is_multiple?this.search_choices.find("li.search-choice").remove():(this.single_set_selected_text(),this.disable_search||this.form_field.options.length<=this.disable_search_threshold?(this.search_field[0].readOnly=!0,this.container.addClass("chosen-container-single-nosearch")):(this.search_field[0].readOnly=!1,this.container.removeClass("chosen-container-single-nosearch"))),this.update_results_content(this.results_option_build({first:!0})),this.search_field_disabled(),this.show_search_field_default(),this.search_field_scale(),this.parsing=!1},i.prototype.result_do_highlight=function(t){var e,n,i,o,s;if(t.length){if(this.result_clear_highlight(),this.result_highlight=t,this.result_highlight.addClass("highlighted"),o=(i=parseInt(this.search_results.css("maxHeight"),10))+(s=this.search_results.scrollTop()),(e=(n=this.result_highlight.position().top+this.search_results.scrollTop())+this.result_highlight.outerHeight())>=o)return this.search_results.scrollTop(e-i>0?e-i:0);if(n0)return this.form_field_label.on("click.chosen",this.label_click_handler)},i.prototype.show_search_field_default=function(){return this.is_multiple&&this.choices_count()<1&&!this.active_field?(this.search_field.val(this.default_text),this.search_field.addClass("default")):(this.search_field.val(""),this.search_field.removeClass("default"))},i.prototype.search_results_mouseup=function(e){var n;if((n=t(e.target).hasClass("active-result")?t(e.target):t(e.target).parents(".active-result").first()).length)return this.result_highlight=n,this.result_select(e),this.search_field.focus()},i.prototype.search_results_mouseover=function(e){var n;if(n=t(e.target).hasClass("active-result")?t(e.target):t(e.target).parents(".active-result").first())return this.result_do_highlight(n)},i.prototype.search_results_mouseout=function(e){if(t(e.target).hasClass("active-result")||t(e.target).parents(".active-result").first())return this.result_clear_highlight()},i.prototype.choice_build=function(e){var n,i,o;return n=t("
    • ",{"class":"search-choice"}).html(""+this.choice_label(e)+""),e.disabled?n.addClass("search-choice-disabled"):((i=t("",{"class":"search-choice-close","data-option-array-index":e.array_index})).on("click.chosen",(o=this,function(t){return o.choice_destroy_link_click(t)})),n.append(i)),this.search_container.before(n)},i.prototype.choice_destroy_link_click=function(e){if(e.preventDefault(),e.stopPropagation(),!this.is_disabled)return this.choice_destroy(t(e.target))},i.prototype.choice_destroy=function(t){if(this.result_deselect(t[0].getAttribute("data-option-array-index")))return this.active_field?this.search_field.focus():this.show_search_field_default(),this.is_multiple&&this.choices_count()>0&&this.get_search_field_value().length<1&&this.results_hide(),t.parents("li").first().remove(),this.search_field_scale()},i.prototype.results_reset=function(){if(this.reset_single_select_options(),this.form_field.options[0].selected=!0,this.single_set_selected_text(),this.show_search_field_default(),this.results_reset_cleanup(),this.trigger_form_field_change(),this.active_field)return this.results_hide()},i.prototype.results_reset_cleanup=function(){return this.current_selectedIndex=this.form_field.selectedIndex,this.selected_item.find("abbr").remove()},i.prototype.result_select=function(t){var e,n;if(this.result_highlight)return e=this.result_highlight,this.result_clear_highlight(),this.is_multiple&&this.max_selected_options<=this.choices_count()?(this.form_field_jq.trigger("chosen:maxselected",{chosen:this}),!1):(this.is_multiple?e.removeClass("active-result"):this.reset_single_select_options(),e.addClass("result-selected"),(n=this.results_data[e[0].getAttribute("data-option-array-index")]).selected=!0,this.form_field.options[n.options_index].selected=!0,this.selected_option_count=null,this.is_multiple?this.choice_build(n):this.single_set_selected_text(this.choice_label(n)),this.is_multiple&&(!this.hide_results_on_select||t.metaKey||t.ctrlKey)?t.metaKey||t.ctrlKey?this.winnow_results({skip_highlight:!0}):(this.search_field.val(""),this.winnow_results()):(this.results_hide(),this.show_search_field_default()),(this.is_multiple||this.form_field.selectedIndex!==this.current_selectedIndex)&&this.trigger_form_field_change({selected:this.form_field.options[n.options_index].value}),this.current_selectedIndex=this.form_field.selectedIndex,t.preventDefault(),this.search_field_scale())},i.prototype.single_set_selected_text=function(t){return null==t&&(t=this.default_text),t===this.default_text?this.selected_item.addClass("chosen-default"):(this.single_deselect_control_build(),this.selected_item.removeClass("chosen-default")),this.selected_item.find("span").html(t)},i.prototype.result_deselect=function(t){var e;return e=this.results_data[t],!this.form_field.options[e.options_index].disabled&&(e.selected=!1,this.form_field.options[e.options_index].selected=!1,this.selected_option_count=null,this.result_clear_highlight(),this.results_showing&&this.winnow_results(),this.trigger_form_field_change({deselected:this.form_field.options[e.options_index].value}),this.search_field_scale(),!0)},i.prototype.single_deselect_control_build=function(){if(this.allow_single_deselect)return this.selected_item.find("abbr").length||this.selected_item.find("span").first().after(''),this.selected_item.addClass("chosen-single-with-deselect")},i.prototype.get_search_field_value=function(){return this.search_field.val()},i.prototype.get_search_text=function(){return t.trim(this.get_search_field_value())},i.prototype.escape_html=function(e){return t("
      ").text(e).html()},i.prototype.winnow_results_set_highlight=function(){var t,e;if(null!=(t=(e=this.is_multiple?[]:this.search_results.find(".result-selected.active-result")).length?e.first():this.search_results.find(".active-result").first()))return this.result_do_highlight(t)},i.prototype.no_results=function(t){var e;return e=this.get_no_results_html(t),this.search_results.append(e),this.form_field_jq.trigger("chosen:no_results",{chosen:this})},i.prototype.no_results_clear=function(){return this.search_results.find(".no-results").remove()},i.prototype.keydown_arrow=function(){var t;return this.results_showing&&this.result_highlight?(t=this.result_highlight.nextAll("li.active-result").first())?this.result_do_highlight(t):void 0:this.results_show()},i.prototype.keyup_arrow=function(){var t;return this.results_showing||this.is_multiple?this.result_highlight?(t=this.result_highlight.prevAll("li.active-result")).length?this.result_do_highlight(t.first()):(this.choices_count()>0&&this.results_hide(),this.result_clear_highlight()):void 0:this.results_show()},i.prototype.keydown_backstroke=function(){var t;return this.pending_backstroke?(this.choice_destroy(this.pending_backstroke.find("a").first()),this.clear_backstroke()):(t=this.search_container.siblings("li.search-choice").last()).length&&!t.hasClass("search-choice-disabled")?(this.pending_backstroke=t,this.single_backstroke_delete?this.keydown_backstroke():this.pending_backstroke.addClass("search-choice-focus")):void 0},i.prototype.clear_backstroke=function(){return this.pending_backstroke&&this.pending_backstroke.removeClass("search-choice-focus"),this.pending_backstroke=null},i.prototype.search_field_scale=function(){var e,n,i,o,s,r,a;if(this.is_multiple){for(s={position:"absolute",left:"-1000px",top:"-1000px",display:"none",whiteSpace:"pre"},n=0,i=(r=["fontSize","fontStyle","fontWeight","fontFamily","lineHeight","textTransform","letterSpacing"]).length;n").css(s)).text(this.get_search_field_value()),t("body").append(e),a=e.width()+25,e.remove(),this.container.is(":visible")&&(a=Math.min(this.container.outerWidth()-10,a)),this.search_field.width(a)}},i.prototype.trigger_form_field_change=function(t){return this.form_field_jq.trigger("input",t),this.form_field_jq.trigger("change",t)},i}(AbstractChosen)}.call(this),function(t){"use strict";function e(e){return this.each(function(){var i=t(this),o=i.data("bs.affix"),s="object"==typeof e&&e;o||i.data("bs.affix",o=new n(this,s)),"string"==typeof e&&o[e]()})}var n=function(e,i){this.options=t.extend({},n.DEFAULTS,i);var o=this.options.target===n.DEFAULTS.target?t(this.options.target):t(document).find(this.options.target);this.$target=o.on("scroll.bs.affix.data-api",t.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",t.proxy(this.checkPositionWithEventLoop,this)),this.$element=t(e),this.affixed=null,this.unpin=null,this.pinnedOffset=null,this.checkPosition()};n.VERSION="3.4.1",n.RESET="affix affix-top affix-bottom",n.DEFAULTS={offset:0,target:window},n.prototype.getState=function(t,e,n,i){var o=this.$target.scrollTop(),s=this.$element.offset(),r=this.$target.height();if(null!=n&&"top"==this.affixed)return o=t-i&&"bottom"},n.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(n.RESET).addClass("affix");var t=this.$target.scrollTop(),e=this.$element.offset();return this.pinnedOffset=e.top-t},n.prototype.checkPositionWithEventLoop=function(){setTimeout(t.proxy(this.checkPosition,this),1)},n.prototype.checkPosition=function(){if(this.$element.is(":visible")){var e=this.$element.height(),i=this.options.offset,o=i.top,s=i.bottom,r=Math.max(t(document).height(),t(document.body).height());"object"!=typeof i&&(s=o=i),"function"==typeof o&&(o=i.top(this.$element)),"function"==typeof s&&(s=i.bottom(this.$element));var a=this.getState(r,e,o,s);if(this.affixed!=a){null!=this.unpin&&this.$element.css("top","");var l="affix"+(a?"-"+a:""),c=t.Event(l+".bs.affix");if(this.$element.trigger(c),c.isDefaultPrevented())return;this.affixed=a,this.unpin="bottom"==a?this.getPinnedOffset():null,this.$element.removeClass(n.RESET).addClass(l).trigger(l.replace("affix","affixed")+".bs.affix")}"bottom"==a&&this.$element.offset({top:r-e-s})}};var i=t.fn.affix;t.fn.affix=e,t.fn.affix.Constructor=n,t.fn.affix.noConflict=function(){return t.fn.affix=i,this},t(window).on("load",function(){t('[data-spy="affix"]').each(function(){var n=t(this),i=n.data();i.offset=i.offset||{},null!=i.offsetBottom&&(i.offset.bottom=i.offsetBottom),null!=i.offsetTop&&(i.offset.top=i.offsetTop),e.call(n,i)})})}(jQuery),function(t){"use strict";function e(e){return this.each(function(){var n=t(this),o=n.data("bs.alert");o||n.data("bs.alert",o=new i(this)),"string"==typeof e&&o[e].call(n)})}var n='[data-dismiss="alert"]',i=function(e){t(e).on("click",n,this.close)};i.VERSION="3.4.1",i.TRANSITION_DURATION=150,i.prototype.close=function(e){function n(){r.detach().trigger("closed.bs.alert").remove()}var o=t(this),s=o.attr("data-target");s||(s=(s=o.attr("href"))&&s.replace(/.*(?=#[^\s]*$)/,"")),s="#"===s?[]:s;var r=t(document).find(s);e&&e.preventDefault(),r.length||(r=o.closest(".alert")),r.trigger(e=t.Event("close.bs.alert")),e.isDefaultPrevented()||(r.removeClass("in"),t.support.transition&&r.hasClass("fade")?r.one("bsTransitionEnd",n).emulateTransitionEnd(i.TRANSITION_DURATION):n())};var o=t.fn.alert;t.fn.alert=e,t.fn.alert.Constructor=i,t.fn.alert.noConflict=function(){return t.fn.alert=o,this},t(document).on("click.bs.alert.data-api",n,i.prototype.close)}(jQuery),function(t){"use strict";function e(e){return this.each(function(){var i=t(this),o=i.data("bs.button"),s="object"==typeof e&&e;o||i.data("bs.button",o=new n(this,s)),"toggle"==e?o.toggle():e&&o.setState(e)})}var n=function(e,i){this.$element=t(e),this.options=t.extend({},n.DEFAULTS,i),this.isLoading=!1};n.VERSION="3.4.1",n.DEFAULTS={loadingText:"loading..."},n.prototype.setState=function(e){var n="disabled",i=this.$element,o=i.is("input")?"val":"html",s=i.data();e+="Text",null==s.resetText&&i.data("resetText",i[o]()),setTimeout(t.proxy(function(){i[o](null==s[e]?this.options[e]:s[e]),"loadingText"==e?(this.isLoading=!0,i.addClass(n).attr(n,n).prop(n,!0)):this.isLoading&&(this.isLoading=!1,i.removeClass(n).removeAttr(n).prop(n,!1))},this),0)},n.prototype.toggle=function(){var t=!0,e=this.$element.closest('[data-toggle="buttons"]');if(e.length){var n=this.$element.find("input");"radio"==n.prop("type")?(n.prop("checked")&&(t=!1),e.find(".active").removeClass("active"),this.$element.addClass("active")):"checkbox"==n.prop("type")&&(n.prop("checked")!==this.$element.hasClass("active")&&(t=!1),this.$element.toggleClass("active")),n.prop("checked",this.$element.hasClass("active")),t&&n.trigger("change")}else this.$element.attr("aria-pressed",!this.$element.hasClass("active")),this.$element.toggleClass("active")};var i=t.fn.button;t.fn.button=e,t.fn.button.Constructor=n,t.fn.button.noConflict=function(){return t.fn.button=i,this},t(document).on("click.bs.button.data-api",'[data-toggle^="button"]',function(n){var i=t(n.target).closest(".btn");e.call(i,"toggle"),t(n.target).is('input[type="radio"], input[type="checkbox"]')||(n.preventDefault(),i.is("input,button")?i.trigger("focus"):i.find("input:visible,button:visible").first().trigger("focus"))}).on("focus.bs.button.data-api blur.bs.button.data-api",'[data-toggle^="button"]',function(e){t(e.target).closest(".btn").toggleClass("focus",/^focus(in)?$/.test(e.type))})}(jQuery),function(t){"use strict";function e(e){return this.each(function(){var i=t(this),o=i.data("bs.carousel"),s=t.extend({},n.DEFAULTS,i.data(),"object"==typeof e&&e),r="string"==typeof e?e:s.slide;o||i.data("bs.carousel",o=new n(this,s)),"number"==typeof e?o.to(e):r?o[r]():s.interval&&o.pause().cycle()})}var n=function(e,n){this.$element=t(e),this.$indicators=this.$element.find(".carousel-indicators"),this.options=n,this.paused=null,this.sliding=null,this.interval=null,this.$active=null,this.$items=null,this.options.keyboard&&this.$element.on("keydown.bs.carousel",t.proxy(this.keydown,this)),"hover"==this.options.pause&&!("ontouchstart"in document.documentElement)&&this.$element.on("mouseenter.bs.carousel",t.proxy(this.pause,this)).on("mouseleave.bs.carousel",t.proxy(this.cycle,this))};n.VERSION="3.4.1",n.TRANSITION_DURATION=600,n.DEFAULTS={interval:5e3,pause:"hover",wrap:!0,keyboard:!0},n.prototype.keydown=function(t){if(!/input|textarea/i.test(t.target.tagName)){switch(t.which){case 37:this.prev();break;case 39:this.next();break;default:return}t.preventDefault()}},n.prototype.cycle=function(e){return e||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(t.proxy(this.next,this),this.options.interval)),this},n.prototype.getItemIndex=function(t){return this.$items=t.parent().children(".item"),this.$items.index(t||this.$active)},n.prototype.getItemForDirection=function(t,e){var n=this.getItemIndex(e);if(("prev"==t&&0===n||"next"==t&&n==this.$items.length-1)&&!this.options.wrap)return e;var i=(n+("prev"==t?-1:1))%this.$items.length;return this.$items.eq(i)},n.prototype.to=function(t){var e=this,n=this.getItemIndex(this.$active=this.$element.find(".item.active"));if(!(t>this.$items.length-1||t<0))return this.sliding?this.$element.one("slid.bs.carousel",function(){e.to(t)}):n==t?this.pause().cycle():this.slide(t>n?"next":"prev",this.$items.eq(t))},n.prototype.pause=function(e){return e||(this.paused=!0),this.$element.find(".next, .prev").length&&t.support.transition&&(this.$element.trigger(t.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},n.prototype.next=function(){if(!this.sliding)return this.slide("next")},n.prototype.prev=function(){if(!this.sliding)return this.slide("prev")},n.prototype.slide=function(e,i){var o=this.$element.find(".item.active"),s=i||this.getItemForDirection(e,o),r=this.interval,a="next"==e?"left":"right",l=this;if(s.hasClass("active"))return this.sliding=!1;var c=s[0],u=t.Event("slide.bs.carousel",{relatedTarget:c,direction:a});if(this.$element.trigger(u),!u.isDefaultPrevented()){if(this.sliding=!0,r&&this.pause(),this.$indicators.length){this.$indicators.find(".active").removeClass("active");var d=t(this.$indicators.children()[this.getItemIndex(s)]);d&&d.addClass("active")}var h=t.Event("slid.bs.carousel",{relatedTarget:c,direction:a});return t.support.transition&&this.$element.hasClass("slide")?(s.addClass(e),"object"==typeof s&&s.length&&s[0].offsetWidth,o.addClass(a),s.addClass(a),o.one("bsTransitionEnd",function(){s.removeClass([e,a].join(" ")).addClass("active"),o.removeClass(["active",a].join(" ")),l.sliding=!1,setTimeout(function(){l.$element.trigger(h)},0)}).emulateTransitionEnd(n.TRANSITION_DURATION)):(o.removeClass("active"),s.addClass("active"),this.sliding=!1,this.$element.trigger(h)),r&&this.cycle(),this}};var i=t.fn.carousel;t.fn.carousel=e,t.fn.carousel.Constructor=n,t.fn.carousel.noConflict=function(){return t.fn.carousel=i,this};var o=function(n){var i=t(this),o=i.attr("href");o&&(o=o.replace(/.*(?=#[^\s]+$)/,""));var s=i.attr("data-target")||o,r=t(document).find(s);if(r.hasClass("carousel")){var a=t.extend({},r.data(),i.data()),l=i.attr("data-slide-to");l&&(a.interval=!1),e.call(r,a),l&&r.data("bs.carousel").to(l),n.preventDefault()}};t(document).on("click.bs.carousel.data-api","[data-slide]",o).on("click.bs.carousel.data-api","[data-slide-to]",o),t(window).on("load",function(){t('[data-ride="carousel"]').each(function(){var n=t(this);e.call(n,n.data())})})}(jQuery),function(t){"use strict";function e(e){var n,i=e.attr("data-target")||(n=e.attr("href"))&&n.replace(/.*(?=#[^\s]+$)/,"");return t(document).find(i)}function n(e){return this.each(function(){var n=t(this),o=n.data("bs.collapse"),s=t.extend({},i.DEFAULTS,n.data(),"object"==typeof e&&e);!o&&s.toggle&&/show|hide/.test(e)&&(s.toggle=!1),o||n.data("bs.collapse",o=new i(this,s)),"string"==typeof e&&o[e]()})}var i=function(e,n){this.$element=t(e),this.options=t.extend({},i.DEFAULTS,n),this.$trigger=t('[data-toggle="collapse"][href="#'+e.id+'"],[data-toggle="collapse"][data-target="#'+e.id+'"]'),this.transitioning=null,this.options.parent?this.$parent=this.getParent():this.addAriaAndCollapsedClass(this.$element,this.$trigger),this.options.toggle&&this.toggle()};i.VERSION="3.4.1",i.TRANSITION_DURATION=350,i.DEFAULTS={toggle:!0},i.prototype.dimension=function(){return this.$element.hasClass("width")?"width":"height"},i.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var e,o=this.$parent&&this.$parent.children(".panel").children(".in, .collapsing");if(!(o&&o.length&&(e=o.data("bs.collapse"))&&e.transitioning)){var s=t.Event("show.bs.collapse");if(this.$element.trigger(s),!s.isDefaultPrevented()){o&&o.length&&(n.call(o,"hide"),e||o.data("bs.collapse",null));var r=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[r](0).attr("aria-expanded",!0),this.$trigger.removeClass("collapsed").attr("aria-expanded",!0),this.transitioning=1;var a=function(){this.$element.removeClass("collapsing").addClass("collapse in")[r](""),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!t.support.transition)return a.call(this);var l=t.camelCase(["scroll",r].join("-"));this.$element.one("bsTransitionEnd",t.proxy(a,this)).emulateTransitionEnd(i.TRANSITION_DURATION)[r](this.$element[0][l])}}}},i.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var e=t.Event("hide.bs.collapse");if(this.$element.trigger(e),!e.isDefaultPrevented()){var n=this.dimension();this.$element[n](this.$element[n]())[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 o=function(){this.transitioning=0,this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")};if(!t.support.transition)return o.call(this);this.$element[n](0).one("bsTransitionEnd",t.proxy(o,this)).emulateTransitionEnd(i.TRANSITION_DURATION)}}},i.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()},i.prototype.getParent=function(){return t(document).find(this.options.parent).find('[data-toggle="collapse"][data-parent="'+this.options.parent+'"]').each(t.proxy(function(n,i){var o=t(i);this.addAriaAndCollapsedClass(e(o),o)},this)).end()},i.prototype.addAriaAndCollapsedClass=function(t,e){var n=t.hasClass("in");t.attr("aria-expanded",n),e.toggleClass("collapsed",!n).attr("aria-expanded",n)};var o=t.fn.collapse;t.fn.collapse=n,t.fn.collapse.Constructor=i,t.fn.collapse.noConflict=function(){return t.fn.collapse=o,this},t(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',function(i){var o=t(this);o.attr("data-target")||i.preventDefault();var s=e(o),r=s.data("bs.collapse")?"toggle":o.data();n.call(s,r)})}(jQuery),function(t){"use strict";function e(e){var n=e.attr("data-target");n||(n=(n=e.attr("href"))&&/#[A-Za-z]/.test(n)&&n.replace(/.*(?=#[^\s]*$)/,""));var i="#"!==n?t(document).find(n):null;return i&&i.length?i:e.parent()}function n(n){n&&3===n.which||(t(o).remove(),t(s).each(function(){var i=t(this),o=e(i),s={relatedTarget:this};o.hasClass("open")&&(n&&"click"==n.type&&/input|textarea/i.test(n.target.tagName)&&t.contains(o[0],n.target)||(o.trigger(n=t.Event("hide.bs.dropdown",s)),n.isDefaultPrevented()||(i.attr("aria-expanded","false"),o.removeClass("open").trigger(t.Event("hidden.bs.dropdown",s)))))}))}function i(e){return this.each(function(){var n=t(this),i=n.data("bs.dropdown");i||n.data("bs.dropdown",i=new r(this)),"string"==typeof e&&i[e].call(n)})}var o=".dropdown-backdrop",s='[data-toggle="dropdown"]',r=function(e){t(e).on("click.bs.dropdown",this.toggle)};r.VERSION="3.4.1",r.prototype.toggle=function(i){var o=t(this);if(!o.is(".disabled, :disabled")){var s=e(o),r=s.hasClass("open");if(n(),!r){"ontouchstart"in document.documentElement&&!s.closest(".navbar-nav").length&&t(document.createElement("div")).addClass("dropdown-backdrop").insertAfter(t(this)).on("click",n);var a={relatedTarget:this};if(s.trigger(i=t.Event("show.bs.dropdown",a)),i.isDefaultPrevented())return;o.trigger("focus").attr("aria-expanded","true"),s.toggleClass("open").trigger(t.Event("shown.bs.dropdown",a))}return!1}},r.prototype.keydown=function(n){if(/(38|40|27|32)/.test(n.which)&&!/input|textarea/i.test(n.target.tagName)){var i=t(this);if(n.preventDefault(),n.stopPropagation(),!i.is(".disabled, :disabled")){var o=e(i),r=o.hasClass("open");if(!r&&27!=n.which||r&&27==n.which)return 27==n.which&&o.find(s).trigger("focus"),i.trigger("click");var a=" li:not(.disabled):visible a",l=o.find(".dropdown-menu"+a);if(l.length){var c=l.index(n.target);38==n.which&&c>0&&c--,40==n.which&&cdocument.documentElement.clientHeight;this.$element.css({paddingLeft:!this.bodyIsOverflowing&&t?this.scrollbarWidth:"",paddingRight:this.bodyIsOverflowing&&!t?this.scrollbarWidth:""})},n.prototype.resetAdjustments=function(){this.$element.css({paddingLeft:"",paddingRight:""})},n.prototype.checkScrollbar=function(){var t=window.innerWidth;if(!t){var e=document.documentElement.getBoundingClientRect();t=e.right-Math.abs(e.left)}this.bodyIsOverflowing=document.body.clientWidth a",this.offsets=[],this.targets=[],this.activeTarget=null,this.scrollHeight=0,this.$scrollElement.on("scroll.bs.scrollspy",t.proxy(this.process,this)),this.refresh(),this.process()}function n(n){return this.each(function(){var i=t(this),o=i.data("bs.scrollspy"),s="object"==typeof n&&n;o||i.data("bs.scrollspy",o=new e(this,s)),"string"==typeof n&&o[n]()})}e.VERSION="3.4.1",e.DEFAULTS={offset:10},e.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)},e.prototype.refresh=function(){var e=this,n="offset",i=0;this.offsets=[],this.targets=[],this.scrollHeight=this.getScrollHeight(), t.isWindow(this.$scrollElement[0])||(n="position",i=this.$scrollElement.scrollTop()),this.$body.find(this.selector).map(function(){var e=t(this),o=e.data("target")||e.attr("href"),s=/^#./.test(o)&&t(o);return s&&s.length&&s.is(":visible")&&[[s[n]().top+i,o]]||null}).sort(function(t,e){return t[0]-e[0]}).each(function(){e.offsets.push(this[0]),e.targets.push(this[1])})},e.prototype.process=function(){var t,e=this.$scrollElement.scrollTop()+this.options.offset,n=this.getScrollHeight(),i=this.options.offset+n-this.$scrollElement.height(),o=this.offsets,s=this.targets,r=this.activeTarget;if(this.scrollHeight!=n&&this.refresh(),e>=i)return r!=(t=s[s.length-1])&&this.activate(t);if(r&&e=o[t]&&(o[t+1]===undefined||e .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!1),e.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded",!0),a?(e[0].offsetWidth,e.addClass("in")):e.removeClass("fade"),e.parent(".dropdown-menu").length&&e.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!0),o&&o()}var r=i.find("> .active"),a=o&&t.support.transition&&(r.length&&r.hasClass("fade")||!!i.find("> .fade").length);r.length&&a?r.one("bsTransitionEnd",s).emulateTransitionEnd(n.TRANSITION_DURATION):s(),r.removeClass("in")};var i=t.fn.tab;t.fn.tab=e,t.fn.tab.Constructor=n,t.fn.tab.noConflict=function(){return t.fn.tab=i,this};var o=function(n){n.preventDefault(),e.call(t(this),"show")};t(document).on("click.bs.tab.data-api",'[data-toggle="tab"]',o).on("click.bs.tab.data-api",'[data-toggle="pill"]',o)}(jQuery),function(t){"use strict";function e(){var t=document.createElement("bootstrap"),e={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var n in e)if(t.style[n]!==undefined)return{end:e[n]};return!1}t.fn.emulateTransitionEnd=function(e){var n=!1,i=this;return t(this).one("bsTransitionEnd",function(){n=!0}),setTimeout(function(){n||t(i).trigger(t.support.transition.end)},e),this},t(function(){t.support.transition=e(),t.support.transition&&(t.event.special.bsTransitionEnd={bindType:t.support.transition.end,delegateType:t.support.transition.end,handle:function(e){if(t(e.target).is(this))return e.handleObj.handler.apply(this,arguments)}})})}(jQuery),function(t){"use strict";function e(e,n){var i=e.nodeName.toLowerCase();if(-1!==t.inArray(i,n))return-1===t.inArray(i,s)||Boolean(e.nodeValue.match(a)||e.nodeValue.match(l));for(var o=t(n).filter(function(t,e){return e instanceof RegExp}),r=0,c=o.length;r
      ',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0},sanitize:!0,sanitizeFn:null,whiteList:r},c.prototype.init=function(e,n,i){if(this.enabled=!0,this.type=e,this.$element=t(n),this.options=this.getOptions(i),this.$viewport=this.options.viewport&&t(document).find(t.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 o=this.options.trigger.split(" "),s=o.length;s--;){var r=o[s];if("click"==r)this.$element.on("click."+this.type,this.options.selector,t.proxy(this.toggle,this));else if("manual"!=r){var a="hover"==r?"mouseenter":"focusin",l="hover"==r?"mouseleave":"focusout";this.$element.on(a+"."+this.type,this.options.selector,t.proxy(this.enter,this)),this.$element.on(l+"."+this.type,this.options.selector,t.proxy(this.leave,this))}}this.options.selector?this._options=t.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},c.prototype.getDefaults=function(){return c.DEFAULTS},c.prototype.getOptions=function(e){var i=this.$element.data();for(var s in i)i.hasOwnProperty(s)&&-1!==t.inArray(s,o)&&delete i[s];return(e=t.extend({},this.getDefaults(),i,e)).delay&&"number"==typeof e.delay&&(e.delay={show:e.delay,hide:e.delay}),e.sanitize&&(e.template=n(e.template,e.whiteList,e.sanitizeFn)),e},c.prototype.getDelegateOptions=function(){var e={},n=this.getDefaults();return this._options&&t.each(this._options,function(t,i){n[t]!=i&&(e[t]=i)}),e},c.prototype.enter=function(e){var n=e instanceof this.constructor?e:t(e.currentTarget).data("bs."+this.type);if(n||(n=new this.constructor(e.currentTarget,this.getDelegateOptions()),t(e.currentTarget).data("bs."+this.type,n)),e instanceof t.Event&&(n.inState["focusin"==e.type?"focus":"hover"]=!0),n.tip().hasClass("in")||"in"==n.hoverState)n.hoverState="in";else{if(clearTimeout(n.timeout),n.hoverState="in",!n.options.delay||!n.options.delay.show)return n.show();n.timeout=setTimeout(function(){"in"==n.hoverState&&n.show()},n.options.delay.show)}},c.prototype.isInStateTrue=function(){for(var t in this.inState)if(this.inState[t])return!0;return!1},c.prototype.leave=function(e){var n=e instanceof this.constructor?e:t(e.currentTarget).data("bs."+this.type);if(n||(n=new this.constructor(e.currentTarget,this.getDelegateOptions()),t(e.currentTarget).data("bs."+this.type,n)),e instanceof t.Event&&(n.inState["focusout"==e.type?"focus":"hover"]=!1),!n.isInStateTrue()){if(clearTimeout(n.timeout),n.hoverState="out",!n.options.delay||!n.options.delay.hide)return n.hide();n.timeout=setTimeout(function(){"out"==n.hoverState&&n.hide()},n.options.delay.hide)}},c.prototype.show=function(){var e=t.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(e);var n=t.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]);if(e.isDefaultPrevented()||!n)return;var i=this,o=this.tip(),s=this.getUID(this.type);this.setContent(),o.attr("id",s),this.$element.attr("aria-describedby",s),this.options.animation&&o.addClass("fade");var r="function"==typeof this.options.placement?this.options.placement.call(this,o[0],this.$element[0]):this.options.placement,a=/\s?auto?\s?/i,l=a.test(r);l&&(r=r.replace(a,"")||"top"),o.detach().css({top:0,left:0,display:"block"}).addClass(r).data("bs."+this.type,this),this.options.container?o.appendTo(t(document).find(this.options.container)):o.insertAfter(this.$element),this.$element.trigger("inserted.bs."+this.type);var u=this.getPosition(),d=o[0].offsetWidth,h=o[0].offsetHeight;if(l){var p=r,f=this.getPosition(this.$viewport);r="bottom"==r&&u.bottom+h>f.bottom?"top":"top"==r&&u.top-hf.width?"left":"left"==r&&u.left-dr.top+r.height&&(o.top=r.top+r.height-l)}else{var c=e.left-s,u=e.left+s+n;cr.right&&(o.left=r.left+r.width-u)}return o},c.prototype.getTitle=function(){var t=this.$element,e=this.options;return t.attr("data-original-title")||("function"==typeof e.title?e.title.call(t[0]):e.title)},c.prototype.getUID=function(t){do{t+=~~(1e6*Math.random())}while(document.getElementById(t));return t},c.prototype.tip=function(){if(!this.$tip&&(this.$tip=t(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(e){var n=this;e&&((n=t(e.currentTarget).data("bs."+this.type))||(n=new this.constructor(e.currentTarget,this.getDelegateOptions()),t(e.currentTarget).data("bs."+this.type,n))),e?(n.inState.click=!n.inState.click,n.isInStateTrue()?n.enter(n):n.leave(n)):n.tip().hasClass("in")?n.leave(n):n.enter(n)},c.prototype.destroy=function(){var t=this;clearTimeout(this.timeout),this.hide(function(){t.$element.off("."+t.type).removeData("bs."+t.type),t.$tip&&t.$tip.detach(),t.$tip=null,t.$arrow=null,t.$viewport=null,t.$element=null})},c.prototype.sanitizeHtml=function(t){return n(t,this.options.whiteList,this.options.sanitizeFn)};var u=t.fn.tooltip;t.fn.tooltip=i,t.fn.tooltip.Constructor=c,t.fn.tooltip.noConflict=function(){return t.fn.tooltip=u,this}}(jQuery),function(t){"use strict";function e(e){return this.each(function(){var i=t(this),o=i.data("bs.popover"),s="object"==typeof e&&e;!o&&/destroy|hide/.test(e)||(o||i.data("bs.popover",o=new n(this,s)),"string"==typeof e&&o[e]())})}var n=function(t,e){this.init("popover",t,e)};if(!t.fn.tooltip)throw new Error("Popover requires tooltip.js");n.VERSION="3.4.1",n.DEFAULTS=t.extend({},t.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:''}),n.prototype=t.extend({},t.fn.tooltip.Constructor.prototype),n.prototype.constructor=n,n.prototype.getDefaults=function(){return n.DEFAULTS},n.prototype.setContent=function(){var t=this.tip(),e=this.getTitle(),n=this.getContent();if(this.options.html){var i=typeof n;this.options.sanitize&&(e=this.sanitizeHtml(e),"string"===i&&(n=this.sanitizeHtml(n))),t.find(".popover-title").html(e),t.find(".popover-content").children().detach().end()["string"===i?"html":"append"](n)}else t.find(".popover-title").text(e),t.find(".popover-content").children().detach().end().text(n);t.removeClass("fade top bottom left right in"),t.find(".popover-title").html()||t.find(".popover-title").hide()},n.prototype.hasContent=function(){return this.getTitle()||this.getContent()},n.prototype.getContent=function(){var t=this.$element,e=this.options;return t.attr("data-content")||("function"==typeof e.content?e.content.call(t[0]):e.content)},n.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")};var i=t.fn.popover;t.fn.popover=e,t.fn.popover.Constructor=n,t.fn.popover.noConflict=function(){return t.fn.popover=i,this}}(jQuery), /*! * Datepicker for Bootstrap v1.6.4 (https://github.com/eternicode/bootstrap-datepicker) * * Copyright 2012 Stefan Petre * Improvements by Andrew Rowls * Licensed under the Apache License v2.0 (http://www.apache.org/licenses/LICENSE-2.0) */ function(t){"function"==typeof define&&define.amd?define(["jquery"],t):"object"==typeof exports?t(require("jquery")):t(jQuery)}(function(t,e){function n(){return new Date(Date.UTC.apply(Date,arguments))}function i(){var t=new Date;return n(t.getFullYear(),t.getMonth(),t.getDate())}function o(t,e){return t.getUTCFullYear()===e.getUTCFullYear()&&t.getUTCMonth()===e.getUTCMonth()&&t.getUTCDate()===e.getUTCDate()}function s(t){return function(){return this[t].apply(this,arguments)}}function r(t){return t&&!isNaN(t.getTime())}function a(e,n){function i(t,e){return e.toLowerCase()}var o=t(e).data(),s={},r=new RegExp("^"+n.toLowerCase()+"([A-Z])");for(var a in n=new RegExp("^"+n.toLowerCase()),o)n.test(a)&&(s[a.replace(r,i)]=o[a]);return s}function l(e){var n={};if(v[e]||(e=e.split("-")[0],v[e])){var i=v[e];return t.each(g,function(t,e){e in i&&(n[e]=i[e])}),n}}var c,u=(c={get:function(t){return this.slice(t)[0]},contains:function(t){for(var e=t&&t.valueOf(),n=0,i=this.length;n]/g)||[]).length<=0||t(n).length>0)}catch(i){return!1}},_process_options:function(e){this._o=t.extend({},this._o,e);var o=this.o=t.extend({},this._o),s=o.language;v[s]||(s=s.split("-")[0],v[s]||(s=m.language)),o.language=s,o.startView=this._resolveViewName(o.startView,0),o.minViewMode=this._resolveViewName(o.minViewMode,0),o.maxViewMode=this._resolveViewName(o.maxViewMode,4),o.startView=Math.min(o.startView,o.maxViewMode),o.startView=Math.max(o.startView,o.minViewMode),!0!==o.multidate&&(o.multidate=Number(o.multidate)||!1,!1!==o.multidate&&(o.multidate=Math.max(0,o.multidate))),o.multidateSeparator=String(o.multidateSeparator),o.weekStart%=7,o.weekEnd=(o.weekStart+6)%7;var r=y.parseFormat(o.format);o.startDate!==-Infinity&&(o.startDate?o.startDate instanceof Date?o.startDate=this._local_to_utc(this._zero_time(o.startDate)):o.startDate=y.parseDate(o.startDate,r,o.language,o.assumeNearbyYear):o.startDate=-Infinity),o.endDate!==Infinity&&(o.endDate?o.endDate instanceof Date?o.endDate=this._local_to_utc(this._zero_time(o.endDate)):o.endDate=y.parseDate(o.endDate,r,o.language,o.assumeNearbyYear):o.endDate=Infinity),o.daysOfWeekDisabled=o.daysOfWeekDisabled||[],t.isArray(o.daysOfWeekDisabled)||(o.daysOfWeekDisabled=o.daysOfWeekDisabled.split(/[,\s]*/)),o.daysOfWeekDisabled=t.map(o.daysOfWeekDisabled,function(t){return parseInt(t,10)}),o.daysOfWeekHighlighted=o.daysOfWeekHighlighted||[],t.isArray(o.daysOfWeekHighlighted)||(o.daysOfWeekHighlighted=o.daysOfWeekHighlighted.split(/[,\s]*/)),o.daysOfWeekHighlighted=t.map(o.daysOfWeekHighlighted,function(t){return parseInt(t,10)}),o.datesDisabled=o.datesDisabled||[],t.isArray(o.datesDisabled)||(o.datesDisabled=[o.datesDisabled]),o.datesDisabled=t.map(o.datesDisabled,function(t){return y.parseDate(t,r,o.language,o.assumeNearbyYear)});var a=String(o.orientation).toLowerCase().split(/\s+/g),l=o.orientation.toLowerCase();if(a=t.grep(a,function(t){return/^auto|left|right|top|bottom$/.test(t)}),o.orientation={x:"auto",y:"auto"},l&&"auto"!==l)if(1===a.length)switch(a[0]){case"top":case"bottom":o.orientation.y=a[0];break;case"left":case"right":o.orientation.x=a[0]}else l=t.grep(a,function(t){return/^left|right$/.test(t)}),o.orientation.x=l[0]||"auto",l=t.grep(a,function(t){return/^top|bottom$/.test(t)}),o.orientation.y=l[0]||"auto";else;if(o.defaultViewDate){var c=o.defaultViewDate.year||(new Date).getFullYear(),u=o.defaultViewDate.month||0,d=o.defaultViewDate.day||1;o.defaultViewDate=n(c,u,d)}else o.defaultViewDate=i()},_events:[],_secondaryEvents:[],_applyEvents:function(t){for(var n,i,o,s=0;ss?(this.picker.addClass("datepicker-orient-right"),p+=h-e):this.picker.addClass("datepicker-orient-left");var m=this.o.orientation.y;if("auto"===m&&(m=-r+f-n<0?"bottom":"top"),this.picker.addClass("datepicker-orient-"+m),"top"===m?f-=n+parseInt(this.picker.css("padding-top")):f+=d,this.o.rtl){var g=s-(p+h);this.picker.css({top:f,right:g,zIndex:c})}else this.picker.css({top:f,left:p,zIndex:c});return this},_allow_update:!0,update:function(){if(!this._allow_update)return this;var e=this.dates.copy(),n=[],i=!1;return arguments.length?(t.each(arguments,t.proxy(function(t,e){e instanceof Date&&(e=this._local_to_utc(e)),n.push(e)},this)),i=!0):(n=(n=this.isInput?this.element.val():this.element.data("date")||this.inputField.val())&&this.o.multidate?n.split(this.o.multidateSeparator):[n],delete this.element.data().date),n=t.map(n,t.proxy(function(t){return y.parseDate(t,this.o.format,this.o.language,this.o.assumeNearbyYear)},this)),n=t.grep(n,t.proxy(function(t){return!this.dateWithinRange(t)||!t},this),!0),this.dates.replace(n),this.dates.length?this.viewDate=new Date(this.dates.get(-1)):this.viewDatethis.o.endDate?this.viewDate=new Date(this.o.endDate):this.viewDate=this.o.defaultViewDate,i?this.setValue():n.length&&String(e)!==String(this.dates)&&this._trigger("changeDate"),!this.dates.length&&e.length&&this._trigger("clearDate"),this.fill(),this.element.change(),this},fillDow:function(){var e=this.o.weekStart,n="";for(this.o.calendarWeeks&&(this.picker.find(".datepicker-days .datepicker-switch").attr("colspan",function(t,e){return parseInt(e)+1}),n+=' ');e";n+="",this.picker.find(".datepicker-days thead").append(n)},fillMonths:function(){for(var t=this._utc_to_local(this.viewDate),e="",n=0;n<12;){e+=''+v[this.o.language].monthsShort[n++]+""}this.picker.find(".datepicker-months td").html(e)},setRange:function(e){e&&e.length?this.range=t.map(e,function(t){return t.valueOf()}):delete this.range,this.fill()},getClassNames:function(e){var n=[],i=this.viewDate.getUTCFullYear(),o=this.viewDate.getUTCMonth(),s=new Date;return e.getUTCFullYear()i||e.getUTCFullYear()===i&&e.getUTCMonth()>o)&&n.push("new"),this.focusDate&&e.valueOf()===this.focusDate.valueOf()&&n.push("focused"),this.o.todayHighlight&&e.getUTCFullYear()===s.getFullYear()&&e.getUTCMonth()===s.getMonth()&&e.getUTCDate()===s.getDate()&&n.push("today"),-1!==this.dates.contains(e)&&n.push("active"),this.dateWithinRange(e)||n.push("disabled"),this.dateIsDisabled(e)&&n.push("disabled","disabled-date"),-1!==t.inArray(e.getUTCDay(),this.o.daysOfWeekHighlighted)&&n.push("highlighted"),this.range&&(e>this.range[0]&&em)&&y.push("disabled"),g===this.viewDate.getFullYear()&&y.push("focused"),c!==t.noop&&((w=c(new Date(g,0,1)))===e?w={}:"boolean"==typeof w?w={enabled:w}:"string"==typeof w&&(w={classes:w}),!1===w.enabled&&y.push("disabled"),w.classes&&(y=y.concat(w.classes.split(/\s+/))),w.tooltip&&(b=w.tooltip)),u+='"+g+"",g+=s;d.find("td").html(u)},fill:function(){var i,o,s=new Date(this.viewDate),r=s.getUTCFullYear(),a=s.getUTCMonth(),l=this.o.startDate!==-Infinity?this.o.startDate.getUTCFullYear():-Infinity,c=this.o.startDate!==-Infinity?this.o.startDate.getUTCMonth():-Infinity,u=this.o.endDate!==Infinity?this.o.endDate.getUTCFullYear():Infinity,d=this.o.endDate!==Infinity?this.o.endDate.getUTCMonth():Infinity,h=v[this.o.language].today||v.en.today||"",p=v[this.o.language].clear||v.en.clear||"",f=v[this.o.language].titleFormat||v.en.titleFormat;if(!isNaN(r)&&!isNaN(a)){this.picker.find(".datepicker-days .datepicker-switch").text(y.formatDate(s,f,this.o.language)),this.picker.find("tfoot .today").text(h).toggle(!1!==this.o.todayBtn),this.picker.find("tfoot .clear").text(p).toggle(!1!==this.o.clearBtn),this.picker.find("thead .datepicker-title").text(this.o.title).toggle(""!==this.o.title),this.updateNavArrows(),this.fillMonths();var m=n(r,a-1,28),g=y.getDaysInMonth(m.getUTCFullYear(),m.getUTCMonth());m.setUTCDate(g),m.setUTCDate(g-(m.getUTCDay()-this.o.weekStart+7)%7);var b=new Date(m);m.getUTCFullYear()<100&&b.setUTCFullYear(m.getUTCFullYear()),b.setUTCDate(b.getUTCDate()+42),b=b.valueOf();for(var w,_=[];m.valueOf()"),this.o.calendarWeeks)){var x=new Date(+m+(this.o.weekStart-m.getUTCDay()-7)%7*864e5),C=new Date(Number(x)+(11-x.getUTCDay())%7*864e5),k=new Date(Number(k=n(C.getUTCFullYear(),0,1))+(11-k.getUTCDay())%7*864e5),T=(C-k)/864e5/7+1;_.push(''+T+"")}(w=this.getClassNames(m)).push("day"),this.o.beforeShowDay!==t.noop&&((o=this.o.beforeShowDay(this._utc_to_local(m)))===e?o={}:"boolean"==typeof o?o={enabled:o}:"string"==typeof o&&(o={classes:o}),!1===o.enabled&&w.push("disabled"),o.classes&&(w=w.concat(o.classes.split(/\s+/))),o.tooltip&&(i=o.tooltip)),w=t.isFunction(t.uniqueSort)?t.uniqueSort(w):t.unique(w),_.push('"+m.getUTCDate()+""),i=null,m.getUTCDay()===this.o.weekEnd&&_.push(""),m.setUTCDate(m.getUTCDate()+1)}this.picker.find(".datepicker-days tbody").empty().append(_.join(""));var S=v[this.o.language].monthsTitle||v.en.monthsTitle||"Months",D=this.picker.find(".datepicker-months").find(".datepicker-switch").text(this.o.maxViewMode<2?S:r).end().find("span").removeClass("active");if(t.each(this.dates,function(t,e){e.getUTCFullYear()===r&&D.eq(e.getUTCMonth()).addClass("active")}),(ru)&&D.addClass("disabled"),r===l&&D.slice(0,c).addClass("disabled"),r===u&&D.slice(d+1).addClass("disabled"),this.o.beforeShowMonth!==t.noop){var E=this;t.each(D,function(n,i){var o=new Date(r,n,1),s=E.o.beforeShowMonth(o);s===e?s={}:"boolean"==typeof s?s={enabled:s}:"string"==typeof s&&(s={classes:s}),!1!==s.enabled||t(i).hasClass("disabled")||t(i).addClass("disabled"),s.classes&&t(i).addClass(s.classes),s.tooltip&&t(i).prop("title",s.tooltip)})}this._fill_yearsView(".datepicker-years","year",10,1,r,l,u,this.o.beforeShowYear),this._fill_yearsView(".datepicker-decades","decade",100,10,r,l,u,this.o.beforeShowDecade),this._fill_yearsView(".datepicker-centuries","century",1e3,100,r,l,u,this.o.beforeShowCentury)}},updateNavArrows:function(){if(this._allow_update){var t=new Date(this.viewDate),e=t.getUTCFullYear(),n=t.getUTCMonth();switch(this.viewMode){case 0:this.o.startDate!==-Infinity&&e<=this.o.startDate.getUTCFullYear()&&n<=this.o.startDate.getUTCMonth()?this.picker.find(".prev").css({visibility:"hidden"}):this.picker.find(".prev").css({visibility:"visible"}),this.o.endDate!==Infinity&&e>=this.o.endDate.getUTCFullYear()&&n>=this.o.endDate.getUTCMonth()?this.picker.find(".next").css({visibility:"hidden"}):this.picker.find(".next").css({visibility:"visible"});break;case 1:case 2:case 3:case 4:this.o.startDate!==-Infinity&&e<=this.o.startDate.getUTCFullYear()||this.o.maxViewMode<2?this.picker.find(".prev").css({visibility:"hidden"}):this.picker.find(".prev").css({visibility:"visible"}),this.o.endDate!==Infinity&&e>=this.o.endDate.getUTCFullYear()||this.o.maxViewMode<2?this.picker.find(".next").css({visibility:"hidden"}):this.picker.find(".next").css({visibility:"visible"})}}},click:function(e){var o,s,r,a,l,c,u;e.preventDefault(),e.stopPropagation(),(o=t(e.target)).hasClass("datepicker-switch")&&this.showMode(1);var d=o.closest(".prev, .next");d.length>0&&(s=y.modes[this.viewMode].navStep*(d.hasClass("prev")?-1:1),0===this.viewMode?(this.viewDate=this.moveMonth(this.viewDate,s),this._trigger("changeMonth",this.viewDate)):(this.viewDate=this.moveYear(this.viewDate,s),1===this.viewMode&&this._trigger("changeYear",this.viewDate)),this.fill()),o.hasClass("today")&&!o.hasClass("day")&&(this.showMode(-2),this._setDate(i(),"linked"===this.o.todayBtn?null:"view")),o.hasClass("clear")&&this.clearDates(),o.hasClass("disabled")||(o.hasClass("day")&&(r=parseInt(o.text(),10)||1,a=this.viewDate.getUTCFullYear(),l=this.viewDate.getUTCMonth(),o.hasClass("old")&&(0===l?(l=11,a-=1,c=!0,u=!0):(l-=1,c=!0)),o.hasClass("new")&&(11===l?(l=0,a+=1,c=!0,u=!0):(l+=1,c=!0)),this._setDate(n(a,l,r)),u&&this._trigger("changeYear",this.viewDate),c&&this._trigger("changeMonth",this.viewDate)),o.hasClass("month")&&(this.viewDate.setUTCDate(1),r=1,l=o.parent().find("span").index(o),a=this.viewDate.getUTCFullYear(),this.viewDate.setUTCMonth(l),this._trigger("changeMonth",this.viewDate),1===this.o.minViewMode?(this._setDate(n(a,l,r)),this.showMode()):this.showMode(-1),this.fill()),(o.hasClass("year")||o.hasClass("decade")||o.hasClass("century"))&&(this.viewDate.setUTCDate(1),r=1,l=0,a=parseInt(o.text(),10)||0,this.viewDate.setUTCFullYear(a),o.hasClass("year")&&(this._trigger("changeYear",this.viewDate),2===this.o.minViewMode&&this._setDate(n(a,l,r))),o.hasClass("decade")&&(this._trigger("changeDecade",this.viewDate),3===this.o.minViewMode&&this._setDate(n(a,l,r))),o.hasClass("century")&&(this._trigger("changeCentury",this.viewDate),4===this.o.minViewMode&&this._setDate(n(a,l,r))),this.showMode(-1),this.fill())),this.picker.is(":visible")&&this._focused_from&&t(this._focused_from).focus(),delete this._focused_from},_toggle_multidate:function(t){var e=this.dates.contains(t);if(t||this.dates.clear(),-1!==e?(!0===this.o.multidate||this.o.multidate>1||this.o.toggleActive)&&this.dates.remove(e):!1===this.o.multidate?(this.dates.clear(),this.dates.push(t)):this.dates.push(t),"number"==typeof this.o.multidate)for(;this.dates.length>this.o.multidate;)this.dates.remove(0)},_setDate:function(t,e){e&&"date"!==e||this._toggle_multidate(t&&new Date(t)),e&&"view"!==e||(this.viewDate=t&&new Date(t)),this.fill(),this.setValue(),e&&"view"===e||this._trigger("changeDate"),this.inputField&&this.inputField.change(),!this.o.autoclose||e&&"date"!==e||this.hide()},moveDay:function(t,e){var n=new Date(t);return n.setUTCDate(t.getUTCDate()+e),n},moveWeek:function(t,e){return this.moveDay(t,7*e)},moveMonth:function(t,e){if(!r(t))return this.o.defaultViewDate;if(!e)return t;var n,i,o=new Date(t.valueOf()),s=o.getUTCDate(),a=o.getUTCMonth(),l=Math.abs(e);if(e=e>0?1:-1,1===l)i=-1===e?function(){return o.getUTCMonth()===a}:function(){return o.getUTCMonth()!==n},n=a+e,o.setUTCMonth(n),(n<0||n>11)&&(n=(n+12)%12);else{for(var c=0;c0},dateWithinRange:function(t){return t>=this.o.startDate&&t<=this.o.endDate},keydown:function(t){if(this.picker.is(":visible")){var e,n,i=!1,o=this.focusDate||this.viewDate;switch(t.keyCode){case 27:this.focusDate?(this.focusDate=null,this.viewDate=this.dates.get(-1)||this.viewDate,this.fill()):this.hide(),t.preventDefault(),t.stopPropagation();break;case 37:case 38:case 39:case 40:if(!this.o.keyboardNavigation||7===this.o.daysOfWeekDisabled.length)break;e=37===t.keyCode||38===t.keyCode?-1:1,0===this.viewMode?t.ctrlKey?(n=this.moveAvailableDate(o,e,"moveYear"))&&this._trigger("changeYear",this.viewDate):t.shiftKey?(n=this.moveAvailableDate(o,e,"moveMonth"))&&this._trigger("changeMonth",this.viewDate):37===t.keyCode||39===t.keyCode?n=this.moveAvailableDate(o,e,"moveDay"):this.weekOfDateIsDisabled(o)||(n=this.moveAvailableDate(o,e,"moveWeek")):1===this.viewMode?(38!==t.keyCode&&40!==t.keyCode||(e*=4),n=this.moveAvailableDate(o,e,"moveMonth")):2===this.viewMode&&(38!==t.keyCode&&40!==t.keyCode||(e*=4),n=this.moveAvailableDate(o,e,"moveYear")),n&&(this.focusDate=this.viewDate=n,this.setValue(),this.fill(),t.preventDefault());break;case 13:if(!this.o.forceParse)break;o=this.focusDate||this.dates.get(-1)||this.viewDate,this.o.keyboardNavigation&&(this._toggle_multidate(o),i=!0),this.focusDate=null,this.viewDate=this.dates.get(-1)||this.viewDate,this.setValue(),this.fill(),this.picker.is(":visible")&&(t.preventDefault(),t.stopPropagation(),this.o.autoclose&&this.hide());break;case 9:this.focusDate=null,this.viewDate=this.dates.get(-1)||this.viewDate,this.fill(),this.hide()}i&&(this.dates.length?this._trigger("changeDate"):this._trigger("clearDate"),this.inputField&&this.inputField.change())}else 40!==t.keyCode&&27!==t.keyCode||(this.show(),t.stopPropagation())},showMode:function(t){t&&(this.viewMode=Math.max(this.o.minViewMode,Math.min(this.o.maxViewMode,this.viewMode+t))),this.picker.children("div").hide().filter(".datepicker-"+y.modes[this.viewMode].clsName).show(),this.updateNavArrows()}};var h=function(e,n){t(e).data("datepicker",this),this.element=t(e),this.inputs=t.map(n.inputs,function(t){return t.jquery?t[0]:t}),delete n.inputs,f.call(t(this.inputs),n).on("changeDate",t.proxy(this.dateUpdated,this)),this.pickers=t.map(this.inputs,function(e){return t(e).data("datepicker")}),this.updateDates()};h.prototype={updateDates:function(){this.dates=t.map(this.pickers,function(t){return t.getUTCDate()}),this.updateRanges()},updateRanges:function(){var e=t.map(this.dates,function(t){return t.valueOf()});t.each(this.pickers,function(t,n){n.setRange(e)})},dateUpdated:function(e){if(!this.updating){this.updating=!0;var n=t(e.target).data("datepicker");if(void 0!==n){var i=n.getUTCDate(),o=t.inArray(e.target,this.inputs),s=o-1,r=o+1,a=this.inputs.length;if(-1!==o){if(t.each(this.pickers,function(t,e){e.getUTCDate()||e.setUTCDate(i)}),i=0&&ithis.dates[r])for(;rthis.dates[r];)this.pickers[r++].setUTCDate(i);this.updateDates(),delete this.updating}}}},remove:function(){t.map(this.pickers,function(t){t.remove()}),delete this.element.data().datepicker}};var p=t.fn.datepicker,f=function(n){var i,o=Array.apply(null,arguments);if(o.shift(),this.each(function(){var e=t(this),s=e.data("datepicker"),r="object"==typeof n&&n;if(!s){var c=a(this,"date"),u=l(t.extend({},m,c,r).language),p=t.extend({},m,u,c,r);e.hasClass("input-daterange")||p.inputs?(t.extend(p,{inputs:p.inputs||e.find("input").toArray()}),s=new h(this,p)):s=new d(this,p),e.data("datepicker",s)}"string"==typeof n&&"function"==typeof s[n]&&(i=s[n].apply(s,o))}),i===e||i instanceof d||i instanceof h)return this;if(this.length>1)throw new Error("Using only allowed for the collection of a single element ("+n+" function)");return i};t.fn.datepicker=f;var m=t.fn.datepicker.defaults={assumeNearbyYear:!1,autoclose:!1,beforeShowDay:t.noop,beforeShowMonth:t.noop,beforeShowYear:t.noop,beforeShowDecade:t.noop,beforeShowCentury:t.noop,calendarWeeks:!1,clearBtn:!1,toggleActive:!1,daysOfWeekDisabled:[],daysOfWeekHighlighted:[],datesDisabled:[],endDate:Infinity,forceParse:!0,format:"mm/dd/yyyy",keyboardNavigation:!0,language:"en",minViewMode:0,maxViewMode:4,multidate:!1,multidateSeparator:",",orientation:"auto",rtl:!1,startDate:-Infinity,startView:0,todayBtn:!1,todayHighlight:!1,weekStart:0,disableTouchKeyboard:!1,enableOnReadonly:!0,showOnFocus:!0,zIndexOffset:10,container:"body",immediateUpdates:!1,title:"",templates:{leftArrow:"«",rightArrow:"»"}},g=t.fn.datepicker.locale_opts=["format","rtl","weekStart"];t.fn.datepicker.Constructor=d;var v=t.fn.datepicker.dates={en:{days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],daysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],daysMin:["Su","Mo","Tu","We","Th","Fr","Sa"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],monthsShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],today:"Today",clear:"Clear",titleFormat:"MM yyyy"}},y={modes:[{clsName:"days",navFnc:"Month",navStep:1},{clsName:"months",navFnc:"FullYear",navStep:1},{clsName:"years",navFnc:"FullYear",navStep:10},{clsName:"decades",navFnc:"FullDecade",navStep:100},{clsName:"centuries",navFnc:"FullCentury",navStep:1e3}],isLeapYear:function(t){return t%4==0&&t%100!=0||t%400==0},getDaysInMonth:function(t,e){return[31,y.isLeapYear(t)?29:28,31,30,31,30,31,31,30,31,30,31][e]},validParts:/dd?|DD?|mm?|MM?|yy(?:yy)?/g,nonpunctuation:/[^ -\/:-@\u5e74\u6708\u65e5\[-`{-~\t\n\r]+/g,parseFormat:function(t){if("function"==typeof t.toValue&&"function"==typeof t.toDisplay)return t;var e=t.replace(this.validParts,"\0").split("\0"),n=t.match(this.validParts);if(!e||!e.length||!n||0===n.length)throw new Error("Invalid date format.");return{separators:e,parts:n}},parseDate:function(o,s,r,a){function l(t,e){return!0===e&&(e=10),t<100&&(t+=2e3)>(new Date).getFullYear()+e&&(t-=100),t}function c(){var t=this.slice(0,g[p].length),e=g[p].slice(0,t.length);return t.toLowerCase()===e.toLowerCase()}if(!o)return e;if(o instanceof Date)return o;if("string"==typeof s&&(s=y.parseFormat(s)),s.toValue)return s.toValue(o,s,r);var u,h,p,f,m=/([\-+]\d+)([dmwy])/,g=o.match(/([\-+]\d+)([dmwy])/g),b={d:"moveDay",m:"moveMonth",w:"moveWeek",y:"moveYear"},w={yesterday:"-1d",today:"+0d",tomorrow:"+1d"};if(/^[\-+]\d+[dmwy]([\s,]+[\-+]\d+[dmwy])*$/.test(o)){for(o=new Date,p=0;p«»',contTemplate:'', footTemplate:''};y.template='
      '+y.headTemplate+""+y.footTemplate+'
      '+y.headTemplate+y.contTemplate+y.footTemplate+'
      '+y.headTemplate+y.contTemplate+y.footTemplate+'
      '+y.headTemplate+y.contTemplate+y.footTemplate+'
      '+y.headTemplate+y.contTemplate+y.footTemplate+"
      ",t.fn.datepicker.DPGlobal=y,t.fn.datepicker.noConflict=function(){return t.fn.datepicker=p,this},t.fn.datepicker.version="1.6.4",t(document).on("focus.datepicker.data-api click.datepicker.data-api",'[data-provide="datepicker"]',function(e){var n=t(this);n.data("datepicker")||(e.preventDefault(),f.call(n,"show"))}),t(function(){f.call(t('[data-provide="datepicker-inline"]'))})}),function(t,e){"use strict";var n;t.rails!==e&&t.error("jquery-ujs has already been loaded!");var i=t(document);t.rails=n={linkClickSelector:"a[data-confirm], a[data-method], a[data-remote]:not([disabled]), a[data-disable-with], a[data-disable]",buttonClickSelector:"button[data-remote]:not([form]):not(form button), button[data-confirm]:not([form]):not(form button)",inputChangeSelector:"select[data-remote], input[data-remote], textarea[data-remote]",formSubmitSelector:"form",formInputClickSelector:"form input[type=submit], form input[type=image], form button[type=submit], form button:not([type]), input[type=submit][form], input[type=image][form], button[type=submit][form], button[form]:not([type])",disableSelector:"input[data-disable-with]:enabled, button[data-disable-with]:enabled, textarea[data-disable-with]:enabled, input[data-disable]:enabled, button[data-disable]:enabled, textarea[data-disable]:enabled",enableSelector:"input[data-disable-with]:disabled, button[data-disable-with]:disabled, textarea[data-disable-with]:disabled, input[data-disable]:disabled, button[data-disable]:disabled, textarea[data-disable]:disabled",requiredInputSelector:"input[name][required]:not([disabled]), textarea[name][required]:not([disabled])",fileInputSelector:"input[name][type=file]:not([disabled])",linkDisableSelector:"a[data-disable-with], a[data-disable]",buttonDisableSelector:"button[data-remote][data-disable-with], button[data-remote][data-disable]",csrfToken:function(){return t("meta[name=csrf-token]").attr("content")},csrfParam:function(){return t("meta[name=csrf-param]").attr("content")},CSRFProtection:function(t){var e=n.csrfToken();e&&t.setRequestHeader("X-CSRF-Token",e)},refreshCSRFTokens:function(){t('form input[name="'+n.csrfParam()+'"]').val(n.csrfToken())},fire:function(e,n,i){var o=t.Event(n);return e.trigger(o,i),!1!==o.result},confirm:function(t){return confirm(t)},ajax:function(e){return t.ajax(e)},href:function(t){return t[0].href},isRemote:function(t){return t.data("remote")!==e&&!1!==t.data("remote")},handleRemote:function(i){var o,s,r,a,l,c;if(n.fire(i,"ajax:before")){if(a=i.data("with-credentials")||null,l=i.data("type")||t.ajaxSettings&&t.ajaxSettings.dataType,i.is("form")){o=i.data("ujs:submit-button-formmethod")||i.attr("method"),s=i.data("ujs:submit-button-formaction")||i.attr("action"),r=t(i[0]).serializeArray();var u=i.data("ujs:submit-button");u&&(r.push(u),i.data("ujs:submit-button",null)),i.data("ujs:submit-button-formmethod",null),i.data("ujs:submit-button-formaction",null)}else i.is(n.inputChangeSelector)?(o=i.data("method"),s=i.data("url"),r=i.serialize(),i.data("params")&&(r=r+"&"+i.data("params"))):i.is(n.buttonClickSelector)?(o=i.data("method")||"get",s=i.data("url"),r=i.serialize(),i.data("params")&&(r=r+"&"+i.data("params"))):(o=i.data("method"),s=n.href(i),r=i.data("params")||null);return c={type:o||"GET",data:r,dataType:l,beforeSend:function(t,o){if(o.dataType===e&&t.setRequestHeader("accept","*/*;q=0.5, "+o.accepts.script),!n.fire(i,"ajax:beforeSend",[t,o]))return!1;i.trigger("ajax:send",t)},success:function(t,e,n){i.trigger("ajax:success",[t,e,n])},complete:function(t,e){i.trigger("ajax:complete",[t,e])},error:function(t,e,n){i.trigger("ajax:error",[t,e,n])},crossDomain:n.isCrossDomain(s)},a&&(c.xhrFields={withCredentials:a}),s&&(c.url=s),n.ajax(c)}return!1},isCrossDomain:function(t){var e=document.createElement("a");e.href=location.href;var n=document.createElement("a");try{return n.href=t,n.href=n.href,!((!n.protocol||":"===n.protocol)&&!n.host||e.protocol+"//"+e.host==n.protocol+"//"+n.host)}catch(i){return!0}},handleMethod:function(i){var o=n.href(i),s=i.data("method"),r=i.attr("target"),a=n.csrfToken(),l=n.csrfParam(),c=t('
      '),u='';l===e||a===e||n.isCrossDomain(o)||(u+=''),r&&c.attr("target",r),c.hide().append(u).appendTo("body"),c.submit()},formElements:function(e,n){return e.is("form")?t(e[0].elements).filter(n):e.find(n)},disableFormElements:function(e){n.formElements(e,n.disableSelector).each(function(){n.disableFormElement(t(this))})},disableFormElement:function(t){var n,i;n=t.is("button")?"html":"val",(i=t.data("disable-with"))!==e&&(t.data("ujs:enable-with",t[n]()),t[n](i)),t.prop("disabled",!0),t.data("ujs:disabled",!0)},enableFormElements:function(e){n.formElements(e,n.enableSelector).each(function(){n.enableFormElement(t(this))})},enableFormElement:function(t){var n=t.is("button")?"html":"val";t.data("ujs:enable-with")!==e&&(t[n](t.data("ujs:enable-with")),t.removeData("ujs:enable-with")),t.prop("disabled",!1),t.removeData("ujs:disabled")},allowAction:function(t){var e,i=t.data("confirm"),o=!1;if(!i)return!0;if(n.fire(t,"confirm")){try{o=n.confirm(i)}catch(s){(console.error||console.log).call(console,s.stack||s)}e=n.fire(t,"confirm:complete",[o])}return o&&e},blankInputs:function(e,n,i){var o,s,r,a=t(),l=n||"input,textarea",c=e.find(l),u={};return c.each(function(){(o=t(this)).is("input[type=radio]")?(r=o.attr("name"),u[r]||(0===e.find('input[type=radio]:checked[name="'+r+'"]').length&&(s=e.find('input[type=radio][name="'+r+'"]'),a=a.add(s)),u[r]=r)):(o.is("input[type=checkbox],input[type=radio]")?o.is(":checked"):!!o.val())===i&&(a=a.add(o))}),!!a.length&&a},nonBlankInputs:function(t,e){return n.blankInputs(t,e,!0)},stopEverything:function(e){return t(e.target).trigger("ujs:everythingStopped"),e.stopImmediatePropagation(),!1},disableElement:function(t){var i=t.data("disable-with");i!==e&&(t.data("ujs:enable-with",t.html()),t.html(i)),t.bind("click.railsDisable",function(t){return n.stopEverything(t)}),t.data("ujs:disabled",!0)},enableElement:function(t){t.data("ujs:enable-with")!==e&&(t.html(t.data("ujs:enable-with")),t.removeData("ujs:enable-with")),t.unbind("click.railsDisable"),t.removeData("ujs:disabled")}},n.fire(i,"rails:attachBindings")&&(t.ajaxPrefilter(function(t,e,i){t.crossDomain||n.CSRFProtection(i)}),t(window).on("pageshow.rails",function(){t(t.rails.enableSelector).each(function(){var e=t(this);e.data("ujs:disabled")&&t.rails.enableFormElement(e)}),t(t.rails.linkDisableSelector).each(function(){var e=t(this);e.data("ujs:disabled")&&t.rails.enableElement(e)})}),i.on("ajax:complete",n.linkDisableSelector,function(){n.enableElement(t(this))}),i.on("ajax:complete",n.buttonDisableSelector,function(){n.enableFormElement(t(this))}),i.on("click.rails",n.linkClickSelector,function(e){var i=t(this),o=i.data("method"),s=i.data("params"),r=e.metaKey||e.ctrlKey;if(!n.allowAction(i))return n.stopEverything(e);if(!r&&i.is(n.linkDisableSelector)&&n.disableElement(i),n.isRemote(i)){if(r&&(!o||"GET"===o)&&!s)return!0;var a=n.handleRemote(i);return!1===a?n.enableElement(i):a.fail(function(){n.enableElement(i)}),!1}return o?(n.handleMethod(i),!1):void 0}),i.on("click.rails",n.buttonClickSelector,function(e){var i=t(this);if(!n.allowAction(i)||!n.isRemote(i))return n.stopEverything(e);i.is(n.buttonDisableSelector)&&n.disableFormElement(i);var o=n.handleRemote(i);return!1===o?n.enableFormElement(i):o.fail(function(){n.enableFormElement(i)}),!1}),i.on("change.rails",n.inputChangeSelector,function(e){var i=t(this);return n.allowAction(i)&&n.isRemote(i)?(n.handleRemote(i),!1):n.stopEverything(e)}),i.on("submit.rails",n.formSubmitSelector,function(i){var o,s,r=t(this),a=n.isRemote(r);if(!n.allowAction(r))return n.stopEverything(i);if(r.attr("novalidate")===e)if(r.data("ujs:formnovalidate-button")===e){if((o=n.blankInputs(r,n.requiredInputSelector,!1))&&n.fire(r,"ajax:aborted:required",[o]))return n.stopEverything(i)}else r.data("ujs:formnovalidate-button",e);if(a){if(s=n.nonBlankInputs(r,n.fileInputSelector)){setTimeout(function(){n.disableFormElements(r)},13);var l=n.fire(r,"ajax:aborted:file",[s]);return l||setTimeout(function(){n.enableFormElements(r)},13),l}return n.handleRemote(r),!1}setTimeout(function(){n.disableFormElements(r)},13)}),i.on("click.rails",n.formInputClickSelector,function(e){var i=t(this);if(!n.allowAction(i))return n.stopEverything(e);var o=i.attr("name"),s=o?{name:o,value:i.val()}:null,r=i.closest("form");0===r.length&&(r=t("#"+i.attr("form"))),r.data("ujs:submit-button",s),r.data("ujs:formnovalidate-button",i.attr("formnovalidate")),r.data("ujs:submit-button-formaction",i.attr("formaction")),r.data("ujs:submit-button-formmethod",i.attr("formmethod"))}),i.on("ajax:send.rails",n.formSubmitSelector,function(e){this===e.target&&n.disableFormElements(t(this))}),i.on("ajax:complete.rails",n.formSubmitSelector,function(e){this===e.target&&n.enableFormElements(t(this))}),t(function(){n.refreshCSRFTokens()}))}(jQuery), /** * AJAX Upload ( http://valums.com/ajax-upload/ ) * Copyright (c) Andrew Valums * Licensed under the MIT license */ function(){function t(t,e,n){if(t.addEventListener)t.addEventListener(e,n,!1);else{if(!t.attachEvent)throw new Error("not supported or DOM not loaded");t.attachEvent("on"+e,function(){n.call(t)})}}function e(t){var e,n,i=u(t);return e=i.left,n=i.top,{left:e,right:e+t.offsetWidth,top:n,bottom:n+t.offsetHeight}}function n(t,e){for(var n in e)e.hasOwnProperty(n)&&(t.style[n]=e[n])}function i(t,i){var o=e(t);n(i,{position:"absolute",left:o.left+"px",top:o.top+"px",width:t.offsetWidth+"px",height:t.offsetHeight+"px"})}function o(t){return t.replace(/.*(\/|\\)/,"")}function s(t){return-1!==t.indexOf(".")?t.replace(/.*[.]/,""):""}function r(t,e){return new RegExp("\\b"+e+"\\b").test(t.className)}function a(t,e){r(t,e)||(t.className+=" "+e)}function l(t,e){var n=new RegExp("\\b"+e+"\\b");t.className=t.className.replace(n,"")}function c(t){t.parentNode.removeChild(t)}if(document.documentElement.getBoundingClientRect)var u=function(t){var e=t.getBoundingClientRect(),n=t.ownerDocument,i=n.body,o=n.documentElement,s=o.clientTop||i.clientTop||0,r=o.clientLeft||i.clientLeft||0,a=1;if(i.getBoundingClientRect){var l=i.getBoundingClientRect();a=(l.right-l.left)/i.clientWidth}return a>1&&(s=0,r=0),{top:e.top/a+(window.pageYOffset||o&&o.scrollTop/a||i.scrollTop/a)-s,left:e.left/a+(window.pageXOffset||o&&o.scrollLeft/a||i.scrollLeft/a)-r}};else u=function(t){var e=0,n=0;do{e+=t.offsetTop||0,n+=t.offsetLeft||0,t=t.offsetParent}while(t);return{left:n,top:e}};var d,h,p=(d=document.createElement("div"),function(t){d.innerHTML=t;var e=d.firstChild;return d.removeChild(e)}),f=(h=0,function(){return"ValumsAjaxUpload"+h++});window.AjaxUpload=function(e,n){for(var i in this._settings={action:"upload.php",name:"file_data",multiple:!1,data:{},autoSubmit:!0,responseType:"json",hoverClass:"hover",focusClass:"focus",disabledClass:"disabled",maxSize:5242880,onSizeExceeded:function(){},onChange:function(){},onSubmit:function(){},onComplete:function(){}},n)n.hasOwnProperty(i)&&(this._settings[i]=n[i]);if(e.jquery?e=e[0]:"string"==typeof e&&(/^#.*/.test(e)&&(e=e.slice(1)),e=document.getElementById(e)),!e||1!==e.nodeType)throw new Error("Please make sure that you're passing a valid element");"A"==e.nodeName.toUpperCase()&&t(e,"click",function(t){t&&t.preventDefault?t.preventDefault():window.event&&(window.event.returnValue=!1)}),this._button=e,this._input=null,this._disabled=!1,this.enable(),this._rerouteClicks()},AjaxUpload.prototype={setData:function(t){this._settings.data=t},disable:function(){a(this._button,this._settings.disabledClass),this._disabled=!0;var t=this._button.nodeName.toUpperCase();"INPUT"!=t&&"BUTTON"!=t||this._button.setAttribute("disabled","disabled"),this._input&&this._input.parentNode&&(this._input.parentNode.style.visibility="hidden")},enable:function(){l(this._button,this._settings.disabledClass),this._button.removeAttribute("disabled"),this._disabled=!1},_createInput:function(){var e=this,i=document.createElement("input");i.setAttribute("type","file"),i.setAttribute("name",this._settings.name),this._settings.multiple&&i.setAttribute("multiple","multiple"),n(i,{position:"absolute",right:0,margin:0,padding:0,fontSize:"480px",fontFamily:"sans-serif",cursor:"pointer"});var r=document.createElement("div");if(n(r,{display:"block",position:"absolute",overflow:"hidden",margin:0,padding:0,opacity:0,direction:"ltr",zIndex:2147483583}),"0"!==r.style.opacity){if("undefined"==typeof r.filters)throw new Error("Opacity not supported by the browser");r.style.filter="alpha(opacity=0)"}t(i,"change",function(){if(i&&""!==i.value){var t=o(i.value);!1!==e._settings.onChange.call(e,t,s(t))?e._settings.autoSubmit&&e.submit():e._clearInput()}}),t(i,"mouseover",function(){a(e._button,e._settings.hoverClass)}),t(i,"mouseout",function(){l(e._button,e._settings.hoverClass),l(e._button,e._settings.focusClass),i.parentNode&&(i.parentNode.style.visibility="hidden")}),t(i,"focus",function(){a(e._button,e._settings.focusClass)}),t(i,"blur",function(){l(e._button,e._settings.focusClass)}),r.appendChild(i),document.body.appendChild(r),this._input=i},_clearInput:function(){this._input&&(c(this._input.parentNode),this._input=null,this._createInput(),l(this._button,this._settings.hoverClass),l(this._button,this._settings.focusClass))},_rerouteClicks:function(){var e=this;t(e._button,"mouseover",function(){if(!e._disabled){e._input||e._createInput();var t=e._input.parentNode;i(e._button,t),t.style.visibility="visible"}})},_createIframe:function(){var t=f(),e=p('