pat/web/dist/js/app.js
2023-10-18 18:39:10 +00:00

3 lines
No EOL
231 KiB
JavaScript
Raw Blame History

/*! For license information please see app.js.LICENSE.txt */
!function(t){var e={};function n(i){if(e[i])return e[i].exports;var o=e[i]={i:i,l:!1,exports:{}};return t[i].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=t,n.c=e,n.d=function(t,e,i){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:i})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(i,o,function(e){return t[e]}.bind(null,o));return i},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="../",n(n.s=5)}([function(t,e,n){var i;!function(e,n){"use strict";"object"==typeof t.exports?t.exports=e.document?n(e,!0):function(t){if(!t.document)throw new Error("jQuery requires a window with a document");return n(t)}:n(e)}("undefined"!=typeof window?window:this,(function(n,o){"use strict";var r=[],s=Object.getPrototypeOf,a=r.slice,l=r.flat?function(t){return r.flat.call(t)}:function(t){return r.concat.apply([],t)},c=r.push,u=r.indexOf,p={},d=p.toString,h=p.hasOwnProperty,f=h.toString,m=f.call(Object),g={},v=function(t){return"function"==typeof t&&"number"!=typeof t.nodeType&&"function"!=typeof t.item},y=function(t){return null!=t&&t===t.window},b=n.document,x={type:!0,src:!0,nonce:!0,noModule:!0};function w(t,e,n){var i,o,r=(n=n||b).createElement("script");if(r.text=t,e)for(i in x)(o=e[i]||e.getAttribute&&e.getAttribute(i))&&r.setAttribute(i,o);n.head.appendChild(r).parentNode.removeChild(r)}function k(t){return null==t?t+"":"object"==typeof t||"function"==typeof t?p[d.call(t)]||"object":typeof t}var $="3.6.0",C=function(t,e){return new C.fn.init(t,e)};function T(t){var e=!!t&&"length"in t&&t.length,n=k(t);return!v(t)&&!y(t)&&("array"===n||0===e||"number"==typeof e&&e>0&&e-1 in t)}C.fn=C.prototype={jquery:$,constructor:C,length:0,toArray:function(){return a.call(this)},get:function(t){return null==t?a.call(this):t<0?this[t+this.length]:this[t]},pushStack:function(t){var e=C.merge(this.constructor(),t);return e.prevObject=this,e},each:function(t){return C.each(this,t)},map:function(t){return this.pushStack(C.map(this,(function(e,n){return t.call(e,n,e)})))},slice:function(){return this.pushStack(a.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},even:function(){return this.pushStack(C.grep(this,(function(t,e){return(e+1)%2})))},odd:function(){return this.pushStack(C.grep(this,(function(t,e){return e%2})))},eq:function(t){var e=this.length,n=+t+(t<0?e:0);return this.pushStack(n>=0&&n<e?[this[n]]:[])},end:function(){return this.prevObject||this.constructor()},push:c,sort:r.sort,splice:r.splice},C.extend=C.fn.extend=function(){var t,e,n,i,o,r,s=arguments[0]||{},a=1,l=arguments.length,c=!1;for("boolean"==typeof s&&(c=s,s=arguments[a]||{},a++),"object"==typeof s||v(s)||(s={}),a===l&&(s=this,a--);a<l;a++)if(null!=(t=arguments[a]))for(e in t)i=t[e],"__proto__"!==e&&s!==i&&(c&&i&&(C.isPlainObject(i)||(o=Array.isArray(i)))?(n=s[e],r=o&&!Array.isArray(n)?[]:o||C.isPlainObject(n)?n:{},o=!1,s[e]=C.extend(c,r,i)):void 0!==i&&(s[e]=i));return s},C.extend({expando:"jQuery"+($+Math.random()).replace(/\D/g,""),isReady:!0,error:function(t){throw new Error(t)},noop:function(){},isPlainObject:function(t){var e,n;return!(!t||"[object Object]"!==d.call(t))&&(!(e=s(t))||"function"==typeof(n=h.call(e,"constructor")&&e.constructor)&&f.call(n)===m)},isEmptyObject:function(t){var e;for(e in t)return!1;return!0},globalEval:function(t,e,n){w(t,{nonce:e&&e.nonce},n)},each:function(t,e){var n,i=0;if(T(t))for(n=t.length;i<n&&!1!==e.call(t[i],i,t[i]);i++);else for(i in t)if(!1===e.call(t[i],i,t[i]))break;return t},makeArray:function(t,e){var n=e||[];return null!=t&&(T(Object(t))?C.merge(n,"string"==typeof t?[t]:t):c.call(n,t)),n},inArray:function(t,e,n){return null==e?-1:u.call(e,t,n)},merge:function(t,e){for(var n=+e.length,i=0,o=t.length;i<n;i++)t[o++]=e[i];return t.length=o,t},grep:function(t,e,n){for(var i=[],o=0,r=t.length,s=!n;o<r;o++)!e(t[o],o)!==s&&i.push(t[o]);return i},map:function(t,e,n){var i,o,r=0,s=[];if(T(t))for(i=t.length;r<i;r++)null!=(o=e(t[r],r,n))&&s.push(o);else for(r in t)null!=(o=e(t[r],r,n))&&s.push(o);return l(s)},guid:1,support:g}),"function"==typeof Symbol&&(C.fn[Symbol.iterator]=r[Symbol.iterator]),C.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),(function(t,e){p["[object "+e+"]"]=e.toLowerCase()}));var S=function(t){var e,n,i,o,r,s,a,l,c,u,p,d,h,f,m,g,v,y,b,x="sizzle"+1*new Date,w=t.document,k=0,$=0,C=lt(),T=lt(),S=lt(),_=lt(),E=function(t,e){return t===e&&(p=!0),0},A={}.hasOwnProperty,D=[],I=D.pop,j=D.push,N=D.push,P=D.slice,O=function(t,e){for(var n=0,i=t.length;n<i;n++)if(t[n]===e)return n;return-1},q="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",L="[\\x20\\t\\r\\n\\f]",z="(?:\\\\[\\da-fA-F]{1,6}"+L+"?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+",R="\\["+L+"*("+z+")(?:"+L+"*([*^$|!~]?=)"+L+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+z+"))|)"+L+"*\\]",F=":("+z+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+R+")*)|.*)\\)|)",H=new RegExp(L+"+","g"),M=new RegExp("^"+L+"+|((?:^|[^\\\\])(?:\\\\.)*)"+L+"+$","g"),U=new RegExp("^"+L+"*,"+L+"*"),W=new RegExp("^"+L+"*([>+~]|"+L+")"+L+"*"),B=new RegExp(L+"|>"),Q=new RegExp(F),V=new RegExp("^"+z+"$"),G={ID:new RegExp("^#("+z+")"),CLASS:new RegExp("^\\.("+z+")"),TAG:new RegExp("^("+z+"|[*])"),ATTR:new RegExp("^"+R),PSEUDO:new RegExp("^"+F),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+L+"*(even|odd|(([+-]|)(\\d*)n|)"+L+"*(?:([+-]|)"+L+"*(\\d+)|))"+L+"*\\)|)","i"),bool:new RegExp("^(?:"+q+")$","i"),needsContext:new RegExp("^"+L+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+L+"*((?:-\\d)?\\d*)"+L+"*\\)|)(?=[^-]|$)","i")},X=/HTML$/i,J=/^(?:input|select|textarea|button)$/i,K=/^h\d$/i,Y=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,tt=/[+~]/,et=new RegExp("\\\\[\\da-fA-F]{1,6}"+L+"?|\\\\([^\\r\\n\\f])","g"),nt=function(t,e){var n="0x"+t.slice(1)-65536;return e||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},it=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ot=function(t,e){return e?"\0"===t?"<22>":t.slice(0,-1)+"\\"+t.charCodeAt(t.length-1).toString(16)+" ":"\\"+t},rt=function(){d()},st=xt((function(t){return!0===t.disabled&&"fieldset"===t.nodeName.toLowerCase()}),{dir:"parentNode",next:"legend"});try{N.apply(D=P.call(w.childNodes),w.childNodes),D[w.childNodes.length].nodeType}catch(t){N={apply:D.length?function(t,e){j.apply(t,P.call(e))}:function(t,e){for(var n=t.length,i=0;t[n++]=e[i++];);t.length=n-1}}}function at(t,e,i,o){var r,a,c,u,p,f,v,y=e&&e.ownerDocument,w=e?e.nodeType:9;if(i=i||[],"string"!=typeof t||!t||1!==w&&9!==w&&11!==w)return i;if(!o&&(d(e),e=e||h,m)){if(11!==w&&(p=Z.exec(t)))if(r=p[1]){if(9===w){if(!(c=e.getElementById(r)))return i;if(c.id===r)return i.push(c),i}else if(y&&(c=y.getElementById(r))&&b(e,c)&&c.id===r)return i.push(c),i}else{if(p[2])return N.apply(i,e.getElementsByTagName(t)),i;if((r=p[3])&&n.getElementsByClassName&&e.getElementsByClassName)return N.apply(i,e.getElementsByClassName(r)),i}if(n.qsa&&!_[t+" "]&&(!g||!g.test(t))&&(1!==w||"object"!==e.nodeName.toLowerCase())){if(v=t,y=e,1===w&&(B.test(t)||W.test(t))){for((y=tt.test(t)&&vt(e.parentNode)||e)===e&&n.scope||((u=e.getAttribute("id"))?u=u.replace(it,ot):e.setAttribute("id",u=x)),a=(f=s(t)).length;a--;)f[a]=(u?"#"+u:":scope")+" "+bt(f[a]);v=f.join(",")}try{return N.apply(i,y.querySelectorAll(v)),i}catch(e){_(t,!0)}finally{u===x&&e.removeAttribute("id")}}}return l(t.replace(M,"$1"),e,i,o)}function lt(){var t=[];return function e(n,o){return t.push(n+" ")>i.cacheLength&&delete e[t.shift()],e[n+" "]=o}}function ct(t){return t[x]=!0,t}function ut(t){var e=h.createElement("fieldset");try{return!!t(e)}catch(t){return!1}finally{e.parentNode&&e.parentNode.removeChild(e),e=null}}function pt(t,e){for(var n=t.split("|"),o=n.length;o--;)i.attrHandle[n[o]]=e}function dt(t,e){var n=e&&t,i=n&&1===t.nodeType&&1===e.nodeType&&t.sourceIndex-e.sourceIndex;if(i)return i;if(n)for(;n=n.nextSibling;)if(n===e)return-1;return t?1:-1}function ht(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function ft(t){return function(e){var n=e.nodeName.toLowerCase();return("input"===n||"button"===n)&&e.type===t}}function mt(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&st(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function gt(t){return ct((function(e){return e=+e,ct((function(n,i){for(var o,r=t([],n.length,e),s=r.length;s--;)n[o=r[s]]&&(n[o]=!(i[o]=n[o]))}))}))}function vt(t){return t&&void 0!==t.getElementsByTagName&&t}for(e in n=at.support={},r=at.isXML=function(t){var e=t&&t.namespaceURI,n=t&&(t.ownerDocument||t).documentElement;return!X.test(e||n&&n.nodeName||"HTML")},d=at.setDocument=function(t){var e,o,s=t?t.ownerDocument||t:w;return s!=h&&9===s.nodeType&&s.documentElement?(f=(h=s).documentElement,m=!r(h),w!=h&&(o=h.defaultView)&&o.top!==o&&(o.addEventListener?o.addEventListener("unload",rt,!1):o.attachEvent&&o.attachEvent("onunload",rt)),n.scope=ut((function(t){return f.appendChild(t).appendChild(h.createElement("div")),void 0!==t.querySelectorAll&&!t.querySelectorAll(":scope fieldset div").length})),n.attributes=ut((function(t){return t.className="i",!t.getAttribute("className")})),n.getElementsByTagName=ut((function(t){return t.appendChild(h.createComment("")),!t.getElementsByTagName("*").length})),n.getElementsByClassName=Y.test(h.getElementsByClassName),n.getById=ut((function(t){return f.appendChild(t).id=x,!h.getElementsByName||!h.getElementsByName(x).length})),n.getById?(i.filter.ID=function(t){var e=t.replace(et,nt);return function(t){return t.getAttribute("id")===e}},i.find.ID=function(t,e){if(void 0!==e.getElementById&&m){var n=e.getElementById(t);return n?[n]:[]}}):(i.filter.ID=function(t){var e=t.replace(et,nt);return function(t){var n=void 0!==t.getAttributeNode&&t.getAttributeNode("id");return n&&n.value===e}},i.find.ID=function(t,e){if(void 0!==e.getElementById&&m){var n,i,o,r=e.getElementById(t);if(r){if((n=r.getAttributeNode("id"))&&n.value===t)return[r];for(o=e.getElementsByName(t),i=0;r=o[i++];)if((n=r.getAttributeNode("id"))&&n.value===t)return[r]}return[]}}),i.find.TAG=n.getElementsByTagName?function(t,e){return void 0!==e.getElementsByTagName?e.getElementsByTagName(t):n.qsa?e.querySelectorAll(t):void 0}:function(t,e){var n,i=[],o=0,r=e.getElementsByTagName(t);if("*"===t){for(;n=r[o++];)1===n.nodeType&&i.push(n);return i}return r},i.find.CLASS=n.getElementsByClassName&&function(t,e){if(void 0!==e.getElementsByClassName&&m)return e.getElementsByClassName(t)},v=[],g=[],(n.qsa=Y.test(h.querySelectorAll))&&(ut((function(t){var e;f.appendChild(t).innerHTML="<a id='"+x+"'></a><select id='"+x+"-\r\\' msallowcapture=''><option selected=''></option></select>",t.querySelectorAll("[msallowcapture^='']").length&&g.push("[*^$]="+L+"*(?:''|\"\")"),t.querySelectorAll("[selected]").length||g.push("\\["+L+"*(?:value|"+q+")"),t.querySelectorAll("[id~="+x+"-]").length||g.push("~="),(e=h.createElement("input")).setAttribute("name",""),t.appendChild(e),t.querySelectorAll("[name='']").length||g.push("\\["+L+"*name"+L+"*="+L+"*(?:''|\"\")"),t.querySelectorAll(":checked").length||g.push(":checked"),t.querySelectorAll("a#"+x+"+*").length||g.push(".#.+[+~]"),t.querySelectorAll("\\\f"),g.push("[\\r\\n\\f]")})),ut((function(t){t.innerHTML="<a href='' disabled='disabled'></a><select disabled='disabled'><option/></select>";var e=h.createElement("input");e.setAttribute("type","hidden"),t.appendChild(e).setAttribute("name","D"),t.querySelectorAll("[name=d]").length&&g.push("name"+L+"*[*^$|!~]?="),2!==t.querySelectorAll(":enabled").length&&g.push(":enabled",":disabled"),f.appendChild(t).disabled=!0,2!==t.querySelectorAll(":disabled").length&&g.push(":enabled",":disabled"),t.querySelectorAll("*,:x"),g.push(",.*:")}))),(n.matchesSelector=Y.test(y=f.matches||f.webkitMatchesSelector||f.mozMatchesSelector||f.oMatchesSelector||f.msMatchesSelector))&&ut((function(t){n.disconnectedMatch=y.call(t,"*"),y.call(t,"[s!='']:x"),v.push("!=",F)})),g=g.length&&new RegExp(g.join("|")),v=v.length&&new RegExp(v.join("|")),e=Y.test(f.compareDocumentPosition),b=e||Y.test(f.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},E=e?function(t,e){if(t===e)return p=!0,0;var i=!t.compareDocumentPosition-!e.compareDocumentPosition;return i||(1&(i=(t.ownerDocument||t)==(e.ownerDocument||e)?t.compareDocumentPosition(e):1)||!n.sortDetached&&e.compareDocumentPosition(t)===i?t==h||t.ownerDocument==w&&b(w,t)?-1:e==h||e.ownerDocument==w&&b(w,e)?1:u?O(u,t)-O(u,e):0:4&i?-1:1)}:function(t,e){if(t===e)return p=!0,0;var n,i=0,o=t.parentNode,r=e.parentNode,s=[t],a=[e];if(!o||!r)return t==h?-1:e==h?1:o?-1:r?1:u?O(u,t)-O(u,e):0;if(o===r)return dt(t,e);for(n=t;n=n.parentNode;)s.unshift(n);for(n=e;n=n.parentNode;)a.unshift(n);for(;s[i]===a[i];)i++;return i?dt(s[i],a[i]):s[i]==w?-1:a[i]==w?1:0},h):h},at.matches=function(t,e){return at(t,null,null,e)},at.matchesSelector=function(t,e){if(d(t),n.matchesSelector&&m&&!_[e+" "]&&(!v||!v.test(e))&&(!g||!g.test(e)))try{var i=y.call(t,e);if(i||n.disconnectedMatch||t.document&&11!==t.document.nodeType)return i}catch(t){_(e,!0)}return at(e,h,null,[t]).length>0},at.contains=function(t,e){return(t.ownerDocument||t)!=h&&d(t),b(t,e)},at.attr=function(t,e){(t.ownerDocument||t)!=h&&d(t);var o=i.attrHandle[e.toLowerCase()],r=o&&A.call(i.attrHandle,e.toLowerCase())?o(t,e,!m):void 0;return void 0!==r?r:n.attributes||!m?t.getAttribute(e):(r=t.getAttributeNode(e))&&r.specified?r.value:null},at.escape=function(t){return(t+"").replace(it,ot)},at.error=function(t){throw new Error("Syntax error, unrecognized expression: "+t)},at.uniqueSort=function(t){var e,i=[],o=0,r=0;if(p=!n.detectDuplicates,u=!n.sortStable&&t.slice(0),t.sort(E),p){for(;e=t[r++];)e===t[r]&&(o=i.push(r));for(;o--;)t.splice(i[o],1)}return u=null,t},o=at.getText=function(t){var e,n="",i=0,r=t.nodeType;if(r){if(1===r||9===r||11===r){if("string"==typeof t.textContent)return t.textContent;for(t=t.firstChild;t;t=t.nextSibling)n+=o(t)}else if(3===r||4===r)return t.nodeValue}else for(;e=t[i++];)n+=o(e);return n},i=at.selectors={cacheLength:50,createPseudo:ct,match:G,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(t){return t[1]=t[1].replace(et,nt),t[3]=(t[3]||t[4]||t[5]||"").replace(et,nt),"~="===t[2]&&(t[3]=" "+t[3]+" "),t.slice(0,4)},CHILD:function(t){return t[1]=t[1].toLowerCase(),"nth"===t[1].slice(0,3)?(t[3]||at.error(t[0]),t[4]=+(t[4]?t[5]+(t[6]||1):2*("even"===t[3]||"odd"===t[3])),t[5]=+(t[7]+t[8]||"odd"===t[3])):t[3]&&at.error(t[0]),t},PSEUDO:function(t){var e,n=!t[6]&&t[2];return G.CHILD.test(t[0])?null:(t[3]?t[2]=t[4]||t[5]||"":n&&Q.test(n)&&(e=s(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(et,nt).toLowerCase();return"*"===t?function(){return!0}:function(t){return t.nodeName&&t.nodeName.toLowerCase()===e}},CLASS:function(t){var e=C[t+" "];return e||(e=new RegExp("(^|"+L+")"+t+"("+L+"|$)"))&&C(t,(function(t){return e.test("string"==typeof t.className&&t.className||void 0!==t.getAttribute&&t.getAttribute("class")||"")}))},ATTR:function(t,e,n){return function(i){var o=at.attr(i,t);return null==o?"!="===e:!e||(o+="","="===e?o===n:"!="===e?o!==n:"^="===e?n&&0===o.indexOf(n):"*="===e?n&&o.indexOf(n)>-1:"$="===e?n&&o.slice(-n.length)===n:"~="===e?(" "+o.replace(H," ")+" ").indexOf(n)>-1:"|="===e&&(o===n||o.slice(0,n.length+1)===n+"-"))}},CHILD:function(t,e,n,i,o){var r="nth"!==t.slice(0,3),s="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,p,d,h,f,m=r!==s?"nextSibling":"previousSibling",g=e.parentNode,v=a&&e.nodeName.toLowerCase(),y=!l&&!a,b=!1;if(g){if(r){for(;m;){for(d=e;d=d[m];)if(a?d.nodeName.toLowerCase()===v:1===d.nodeType)return!1;f=m="only"===t&&!f&&"nextSibling"}return!0}if(f=[s?g.firstChild:g.lastChild],s&&y){for(b=(h=(c=(u=(p=(d=g)[x]||(d[x]={}))[d.uniqueID]||(p[d.uniqueID]={}))[t]||[])[0]===k&&c[1])&&c[2],d=h&&g.childNodes[h];d=++h&&d&&d[m]||(b=h=0)||f.pop();)if(1===d.nodeType&&++b&&d===e){u[t]=[k,h,b];break}}else if(y&&(b=h=(c=(u=(p=(d=e)[x]||(d[x]={}))[d.uniqueID]||(p[d.uniqueID]={}))[t]||[])[0]===k&&c[1]),!1===b)for(;(d=++h&&d&&d[m]||(b=h=0)||f.pop())&&((a?d.nodeName.toLowerCase()!==v:1!==d.nodeType)||!++b||(y&&((u=(p=d[x]||(d[x]={}))[d.uniqueID]||(p[d.uniqueID]={}))[t]=[k,b]),d!==e)););return(b-=o)===i||b%i==0&&b/i>=0}}},PSEUDO:function(t,e){var n,o=i.pseudos[t]||i.setFilters[t.toLowerCase()]||at.error("unsupported pseudo: "+t);return o[x]?o(e):o.length>1?(n=[t,t,"",e],i.setFilters.hasOwnProperty(t.toLowerCase())?ct((function(t,n){for(var i,r=o(t,e),s=r.length;s--;)t[i=O(t,r[s])]=!(n[i]=r[s])})):function(t){return o(t,0,n)}):o}},pseudos:{not:ct((function(t){var e=[],n=[],i=a(t.replace(M,"$1"));return i[x]?ct((function(t,e,n,o){for(var r,s=i(t,null,o,[]),a=t.length;a--;)(r=s[a])&&(t[a]=!(e[a]=r))})):function(t,o,r){return e[0]=t,i(e,null,r,n),e[0]=null,!n.pop()}})),has:ct((function(t){return function(e){return at(t,e).length>0}})),contains:ct((function(t){return t=t.replace(et,nt),function(e){return(e.textContent||o(e)).indexOf(t)>-1}})),lang:ct((function(t){return V.test(t||"")||at.error("unsupported lang: "+t),t=t.replace(et,nt).toLowerCase(),function(e){var n;do{if(n=m?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===f},focus:function(t){return t===h.activeElement&&(!h.hasFocus||h.hasFocus())&&!!(t.type||t.href||~t.tabIndex)},enabled:mt(!1),disabled:mt(!0),checked:function(t){var e=t.nodeName.toLowerCase();return"input"===e&&!!t.checked||"option"===e&&!!t.selected},selected:function(t){return t.parentNode&&t.parentNode.selectedIndex,!0===t.selected},empty:function(t){for(t=t.firstChild;t;t=t.nextSibling)if(t.nodeType<6)return!1;return!0},parent:function(t){return!i.pseudos.empty(t)},header:function(t){return K.test(t.nodeName)},input:function(t){return J.test(t.nodeName)},button:function(t){var e=t.nodeName.toLowerCase();return"input"===e&&"button"===t.type||"button"===e},text:function(t){var e;return"input"===t.nodeName.toLowerCase()&&"text"===t.type&&(null==(e=t.getAttribute("type"))||"text"===e.toLowerCase())},first:gt((function(){return[0]})),last:gt((function(t,e){return[e-1]})),eq:gt((function(t,e,n){return[n<0?n+e:n]})),even:gt((function(t,e){for(var n=0;n<e;n+=2)t.push(n);return t})),odd:gt((function(t,e){for(var n=1;n<e;n+=2)t.push(n);return t})),lt:gt((function(t,e,n){for(var i=n<0?n+e:n>e?e:n;--i>=0;)t.push(i);return t})),gt:gt((function(t,e,n){for(var i=n<0?n+e:n;++i<e;)t.push(i);return t}))}},i.pseudos.nth=i.pseudos.eq,{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})i.pseudos[e]=ht(e);for(e in{submit:!0,reset:!0})i.pseudos[e]=ft(e);function yt(){}function bt(t){for(var e=0,n=t.length,i="";e<n;e++)i+=t[e].value;return i}function xt(t,e,n){var i=e.dir,o=e.next,r=o||i,s=n&&"parentNode"===r,a=$++;return e.first?function(e,n,o){for(;e=e[i];)if(1===e.nodeType||s)return t(e,n,o);return!1}:function(e,n,l){var c,u,p,d=[k,a];if(l){for(;e=e[i];)if((1===e.nodeType||s)&&t(e,n,l))return!0}else for(;e=e[i];)if(1===e.nodeType||s)if(u=(p=e[x]||(e[x]={}))[e.uniqueID]||(p[e.uniqueID]={}),o&&o===e.nodeName.toLowerCase())e=e[i]||e;else{if((c=u[r])&&c[0]===k&&c[1]===a)return d[2]=c[2];if(u[r]=d,d[2]=t(e,n,l))return!0}return!1}}function wt(t){return t.length>1?function(e,n,i){for(var o=t.length;o--;)if(!t[o](e,n,i))return!1;return!0}:t[0]}function kt(t,e,n,i,o){for(var r,s=[],a=0,l=t.length,c=null!=e;a<l;a++)(r=t[a])&&(n&&!n(r,i,o)||(s.push(r),c&&e.push(a)));return s}function $t(t,e,n,i,o,r){return i&&!i[x]&&(i=$t(i)),o&&!o[x]&&(o=$t(o,r)),ct((function(r,s,a,l){var c,u,p,d=[],h=[],f=s.length,m=r||function(t,e,n){for(var i=0,o=e.length;i<o;i++)at(t,e[i],n);return n}(e||"*",a.nodeType?[a]:a,[]),g=!t||!r&&e?m:kt(m,d,t,a,l),v=n?o||(r?t:f||i)?[]:s:g;if(n&&n(g,v,a,l),i)for(c=kt(v,h),i(c,[],a,l),u=c.length;u--;)(p=c[u])&&(v[h[u]]=!(g[h[u]]=p));if(r){if(o||t){if(o){for(c=[],u=v.length;u--;)(p=v[u])&&c.push(g[u]=p);o(null,v=[],c,l)}for(u=v.length;u--;)(p=v[u])&&(c=o?O(r,p):d[u])>-1&&(r[c]=!(s[c]=p))}}else v=kt(v===s?v.splice(f,v.length):v),o?o(null,s,v,l):N.apply(s,v)}))}function Ct(t){for(var e,n,o,r=t.length,s=i.relative[t[0].type],a=s||i.relative[" "],l=s?1:0,u=xt((function(t){return t===e}),a,!0),p=xt((function(t){return O(e,t)>-1}),a,!0),d=[function(t,n,i){var o=!s&&(i||n!==c)||((e=n).nodeType?u(t,n,i):p(t,n,i));return e=null,o}];l<r;l++)if(n=i.relative[t[l].type])d=[xt(wt(d),n)];else{if((n=i.filter[t[l].type].apply(null,t[l].matches))[x]){for(o=++l;o<r&&!i.relative[t[o].type];o++);return $t(l>1&&wt(d),l>1&&bt(t.slice(0,l-1).concat({value:" "===t[l-2].type?"*":""})).replace(M,"$1"),n,l<o&&Ct(t.slice(l,o)),o<r&&Ct(t=t.slice(o)),o<r&&bt(t))}d.push(n)}return wt(d)}return yt.prototype=i.filters=i.pseudos,i.setFilters=new yt,s=at.tokenize=function(t,e){var n,o,r,s,a,l,c,u=T[t+" "];if(u)return e?0:u.slice(0);for(a=t,l=[],c=i.preFilter;a;){for(s in n&&!(o=U.exec(a))||(o&&(a=a.slice(o[0].length)||a),l.push(r=[])),n=!1,(o=W.exec(a))&&(n=o.shift(),r.push({value:n,type:o[0].replace(M," ")}),a=a.slice(n.length)),i.filter)!(o=G[s].exec(a))||c[s]&&!(o=c[s](o))||(n=o.shift(),r.push({value:n,type:s,matches:o}),a=a.slice(n.length));if(!n)break}return e?a.length:a?at.error(t):T(t,l).slice(0)},a=at.compile=function(t,e){var n,o=[],r=[],a=S[t+" "];if(!a){for(e||(e=s(t)),n=e.length;n--;)(a=Ct(e[n]))[x]?o.push(a):r.push(a);a=S(t,function(t,e){var n=e.length>0,o=t.length>0,r=function(r,s,a,l,u){var p,f,g,v=0,y="0",b=r&&[],x=[],w=c,$=r||o&&i.find.TAG("*",u),C=k+=null==w?1:Math.random()||.1,T=$.length;for(u&&(c=s==h||s||u);y!==T&&null!=(p=$[y]);y++){if(o&&p){for(f=0,s||p.ownerDocument==h||(d(p),a=!m);g=t[f++];)if(g(p,s||h,a)){l.push(p);break}u&&(k=C)}n&&((p=!g&&p)&&v--,r&&b.push(p))}if(v+=y,n&&y!==v){for(f=0;g=e[f++];)g(b,x,s,a);if(r){if(v>0)for(;y--;)b[y]||x[y]||(x[y]=I.call(l));x=kt(x)}N.apply(l,x),u&&!r&&x.length>0&&v+e.length>1&&at.uniqueSort(l)}return u&&(k=C,c=w),b};return n?ct(r):r}(r,o)),a.selector=t}return a},l=at.select=function(t,e,n,o){var r,l,c,u,p,d="function"==typeof t&&t,h=!o&&s(t=d.selector||t);if(n=n||[],1===h.length){if((l=h[0]=h[0].slice(0)).length>2&&"ID"===(c=l[0]).type&&9===e.nodeType&&m&&i.relative[l[1].type]){if(!(e=(i.find.ID(c.matches[0].replace(et,nt),e)||[])[0]))return n;d&&(e=e.parentNode),t=t.slice(l.shift().value.length)}for(r=G.needsContext.test(t)?0:l.length;r--&&(c=l[r],!i.relative[u=c.type]);)if((p=i.find[u])&&(o=p(c.matches[0].replace(et,nt),tt.test(l[0].type)&&vt(e.parentNode)||e))){if(l.splice(r,1),!(t=o.length&&bt(l)))return N.apply(n,o),n;break}}return(d||a(t,h))(o,e,!m,n,!e||tt.test(t)&&vt(e.parentNode)||e),n},n.sortStable=x.split("").sort(E).join("")===x,n.detectDuplicates=!!p,d(),n.sortDetached=ut((function(t){return 1&t.compareDocumentPosition(h.createElement("fieldset"))})),ut((function(t){return t.innerHTML="<a href='#'></a>","#"===t.firstChild.getAttribute("href")}))||pt("type|href|height|width",(function(t,e,n){if(!n)return t.getAttribute(e,"type"===e.toLowerCase()?1:2)})),n.attributes&&ut((function(t){return t.innerHTML="<input/>",t.firstChild.setAttribute("value",""),""===t.firstChild.getAttribute("value")}))||pt("value",(function(t,e,n){if(!n&&"input"===t.nodeName.toLowerCase())return t.defaultValue})),ut((function(t){return null==t.getAttribute("disabled")}))||pt(q,(function(t,e,n){var i;if(!n)return!0===t[e]?e.toLowerCase():(i=t.getAttributeNode(e))&&i.specified?i.value:null})),at}(n);C.find=S,C.expr=S.selectors,C.expr[":"]=C.expr.pseudos,C.uniqueSort=C.unique=S.uniqueSort,C.text=S.getText,C.isXMLDoc=S.isXML,C.contains=S.contains,C.escapeSelector=S.escape;var _=function(t,e,n){for(var i=[],o=void 0!==n;(t=t[e])&&9!==t.nodeType;)if(1===t.nodeType){if(o&&C(t).is(n))break;i.push(t)}return i},E=function(t,e){for(var n=[];t;t=t.nextSibling)1===t.nodeType&&t!==e&&n.push(t);return n},A=C.expr.match.needsContext;function D(t,e){return t.nodeName&&t.nodeName.toLowerCase()===e.toLowerCase()}var I=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function j(t,e,n){return v(e)?C.grep(t,(function(t,i){return!!e.call(t,i,t)!==n})):e.nodeType?C.grep(t,(function(t){return t===e!==n})):"string"!=typeof e?C.grep(t,(function(t){return u.call(e,t)>-1!==n})):C.filter(e,t,n)}C.filter=function(t,e,n){var i=e[0];return n&&(t=":not("+t+")"),1===e.length&&1===i.nodeType?C.find.matchesSelector(i,t)?[i]:[]:C.find.matches(t,C.grep(e,(function(t){return 1===t.nodeType})))},C.fn.extend({find:function(t){var e,n,i=this.length,o=this;if("string"!=typeof t)return this.pushStack(C(t).filter((function(){for(e=0;e<i;e++)if(C.contains(o[e],this))return!0})));for(n=this.pushStack([]),e=0;e<i;e++)C.find(t,o[e],n);return i>1?C.uniqueSort(n):n},filter:function(t){return this.pushStack(j(this,t||[],!1))},not:function(t){return this.pushStack(j(this,t||[],!0))},is:function(t){return!!j(this,"string"==typeof t&&A.test(t)?C(t):t||[],!1).length}});var N,P=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(C.fn.init=function(t,e,n){var i,o;if(!t)return this;if(n=n||N,"string"==typeof t){if(!(i="<"===t[0]&&">"===t[t.length-1]&&t.length>=3?[null,t,null]:P.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 C?e[0]:e,C.merge(this,C.parseHTML(i[1],e&&e.nodeType?e.ownerDocument||e:b,!0)),I.test(i[1])&&C.isPlainObject(e))for(i in e)v(this[i])?this[i](e[i]):this.attr(i,e[i]);return this}return(o=b.getElementById(i[2]))&&(this[0]=o,this.length=1),this}return t.nodeType?(this[0]=t,this.length=1,this):v(t)?void 0!==n.ready?n.ready(t):t(C):C.makeArray(t,this)}).prototype=C.fn,N=C(b);var O=/^(?:parents|prev(?:Until|All))/,q={children:!0,contents:!0,next:!0,prev:!0};function L(t,e){for(;(t=t[e])&&1!==t.nodeType;);return t}C.fn.extend({has:function(t){var e=C(t,this),n=e.length;return this.filter((function(){for(var t=0;t<n;t++)if(C.contains(this,e[t]))return!0}))},closest:function(t,e){var n,i=0,o=this.length,r=[],s="string"!=typeof t&&C(t);if(!A.test(t))for(;i<o;i++)for(n=this[i];n&&n!==e;n=n.parentNode)if(n.nodeType<11&&(s?s.index(n)>-1:1===n.nodeType&&C.find.matchesSelector(n,t))){r.push(n);break}return this.pushStack(r.length>1?C.uniqueSort(r):r)},index:function(t){return t?"string"==typeof t?u.call(C(t),this[0]):u.call(this,t.jquery?t[0]:t):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(t,e){return this.pushStack(C.uniqueSort(C.merge(this.get(),C(t,e))))},addBack:function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}}),C.each({parent:function(t){var e=t.parentNode;return e&&11!==e.nodeType?e:null},parents:function(t){return _(t,"parentNode")},parentsUntil:function(t,e,n){return _(t,"parentNode",n)},next:function(t){return L(t,"nextSibling")},prev:function(t){return L(t,"previousSibling")},nextAll:function(t){return _(t,"nextSibling")},prevAll:function(t){return _(t,"previousSibling")},nextUntil:function(t,e,n){return _(t,"nextSibling",n)},prevUntil:function(t,e,n){return _(t,"previousSibling",n)},siblings:function(t){return E((t.parentNode||{}).firstChild,t)},children:function(t){return E(t.firstChild)},contents:function(t){return null!=t.contentDocument&&s(t.contentDocument)?t.contentDocument:(D(t,"template")&&(t=t.content||t),C.merge([],t.childNodes))}},(function(t,e){C.fn[t]=function(n,i){var o=C.map(this,e,n);return"Until"!==t.slice(-5)&&(i=n),i&&"string"==typeof i&&(o=C.filter(i,o)),this.length>1&&(q[t]||C.uniqueSort(o),O.test(t)&&o.reverse()),this.pushStack(o)}}));var z=/[^\x20\t\r\n\f]+/g;function R(t){return t}function F(t){throw t}function H(t,e,n,i){var o;try{t&&v(o=t.promise)?o.call(t).done(e).fail(n):t&&v(o=t.then)?o.call(t,e,n):e.apply(void 0,[t].slice(i))}catch(t){n.apply(void 0,[t])}}C.Callbacks=function(t){t="string"==typeof t?function(t){var e={};return C.each(t.match(z)||[],(function(t,n){e[n]=!0})),e}(t):C.extend({},t);var e,n,i,o,r=[],s=[],a=-1,l=function(){for(o=o||t.once,i=e=!0;s.length;a=-1)for(n=s.shift();++a<r.length;)!1===r[a].apply(n[0],n[1])&&t.stopOnFalse&&(a=r.length,n=!1);t.memory||(n=!1),e=!1,o&&(r=n?[]:"")},c={add:function(){return r&&(n&&!e&&(a=r.length-1,s.push(n)),function e(n){C.each(n,(function(n,i){v(i)?t.unique&&c.has(i)||r.push(i):i&&i.length&&"string"!==k(i)&&e(i)}))}(arguments),n&&!e&&l()),this},remove:function(){return C.each(arguments,(function(t,e){for(var n;(n=C.inArray(e,r,n))>-1;)r.splice(n,1),n<=a&&a--})),this},has:function(t){return t?C.inArray(t,r)>-1:r.length>0},empty:function(){return r&&(r=[]),this},disable:function(){return o=s=[],r=n="",this},disabled:function(){return!r},lock:function(){return o=s=[],n||e||(r=n=""),this},locked:function(){return!!o},fireWith:function(t,n){return o||(n=[t,(n=n||[]).slice?n.slice():n],s.push(n),e||l()),this},fire:function(){return c.fireWith(this,arguments),this},fired:function(){return!!i}};return c},C.extend({Deferred:function(t){var e=[["notify","progress",C.Callbacks("memory"),C.Callbacks("memory"),2],["resolve","done",C.Callbacks("once memory"),C.Callbacks("once memory"),0,"resolved"],["reject","fail",C.Callbacks("once memory"),C.Callbacks("once memory"),1,"rejected"]],i="pending",o={state:function(){return i},always:function(){return r.done(arguments).fail(arguments),this},catch:function(t){return o.then(null,t)},pipe:function(){var t=arguments;return C.Deferred((function(n){C.each(e,(function(e,i){var o=v(t[i[4]])&&t[i[4]];r[i[1]]((function(){var t=o&&o.apply(this,arguments);t&&v(t.promise)?t.promise().progress(n.notify).done(n.resolve).fail(n.reject):n[i[0]+"With"](this,o?[t]:arguments)}))})),t=null})).promise()},then:function(t,i,o){var r=0;function s(t,e,i,o){return function(){var a=this,l=arguments,c=function(){var n,c;if(!(t<r)){if((n=i.apply(a,l))===e.promise())throw new TypeError("Thenable self-resolution");c=n&&("object"==typeof n||"function"==typeof n)&&n.then,v(c)?o?c.call(n,s(r,e,R,o),s(r,e,F,o)):(r++,c.call(n,s(r,e,R,o),s(r,e,F,o),s(r,e,R,e.notifyWith))):(i!==R&&(a=void 0,l=[n]),(o||e.resolveWith)(a,l))}},u=o?c:function(){try{c()}catch(n){C.Deferred.exceptionHook&&C.Deferred.exceptionHook(n,u.stackTrace),t+1>=r&&(i!==F&&(a=void 0,l=[n]),e.rejectWith(a,l))}};t?u():(C.Deferred.getStackHook&&(u.stackTrace=C.Deferred.getStackHook()),n.setTimeout(u))}}return C.Deferred((function(n){e[0][3].add(s(0,n,v(o)?o:R,n.notifyWith)),e[1][3].add(s(0,n,v(t)?t:R)),e[2][3].add(s(0,n,v(i)?i:F))})).promise()},promise:function(t){return null!=t?C.extend(t,o):o}},r={};return C.each(e,(function(t,n){var s=n[2],a=n[5];o[n[1]]=s.add,a&&s.add((function(){i=a}),e[3-t][2].disable,e[3-t][3].disable,e[0][2].lock,e[0][3].lock),s.add(n[3].fire),r[n[0]]=function(){return r[n[0]+"With"](this===r?void 0:this,arguments),this},r[n[0]+"With"]=s.fireWith})),o.promise(r),t&&t.call(r,r),r},when:function(t){var e=arguments.length,n=e,i=Array(n),o=a.call(arguments),r=C.Deferred(),s=function(t){return function(n){i[t]=this,o[t]=arguments.length>1?a.call(arguments):n,--e||r.resolveWith(i,o)}};if(e<=1&&(H(t,r.done(s(n)).resolve,r.reject,!e),"pending"===r.state()||v(o[n]&&o[n].then)))return r.then();for(;n--;)H(o[n],s(n),r.reject);return r.promise()}});var M=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;C.Deferred.exceptionHook=function(t,e){n.console&&n.console.warn&&t&&M.test(t.name)&&n.console.warn("jQuery.Deferred exception: "+t.message,t.stack,e)},C.readyException=function(t){n.setTimeout((function(){throw t}))};var U=C.Deferred();function W(){b.removeEventListener("DOMContentLoaded",W),n.removeEventListener("load",W),C.ready()}C.fn.ready=function(t){return U.then(t).catch((function(t){C.readyException(t)})),this},C.extend({isReady:!1,readyWait:1,ready:function(t){(!0===t?--C.readyWait:C.isReady)||(C.isReady=!0,!0!==t&&--C.readyWait>0||U.resolveWith(b,[C]))}}),C.ready.then=U.then,"complete"===b.readyState||"loading"!==b.readyState&&!b.documentElement.doScroll?n.setTimeout(C.ready):(b.addEventListener("DOMContentLoaded",W),n.addEventListener("load",W));var B=function(t,e,n,i,o,r,s){var a=0,l=t.length,c=null==n;if("object"===k(n))for(a in o=!0,n)B(t,e,a,n[a],!0,r,s);else if(void 0!==i&&(o=!0,v(i)||(s=!0),c&&(s?(e.call(t,i),e=null):(c=e,e=function(t,e,n){return c.call(C(t),n)})),e))for(;a<l;a++)e(t[a],n,s?i:i.call(t[a],a,e(t[a],n)));return o?t:c?e.call(t):l?e(t[0],n):r},Q=/^-ms-/,V=/-([a-z])/g;function G(t,e){return e.toUpperCase()}function X(t){return t.replace(Q,"ms-").replace(V,G)}var J=function(t){return 1===t.nodeType||9===t.nodeType||!+t.nodeType};function K(){this.expando=C.expando+K.uid++}K.uid=1,K.prototype={cache:function(t){var e=t[this.expando];return e||(e={},J(t)&&(t.nodeType?t[this.expando]=e:Object.defineProperty(t,this.expando,{value:e,configurable:!0}))),e},set:function(t,e,n){var i,o=this.cache(t);if("string"==typeof e)o[X(e)]=n;else for(i in e)o[X(i)]=e[i];return o},get:function(t,e){return void 0===e?this.cache(t):t[this.expando]&&t[this.expando][X(e)]},access:function(t,e,n){return void 0===e||e&&"string"==typeof e&&void 0===n?this.get(t,e):(this.set(t,e,n),void 0!==n?n:e)},remove:function(t,e){var n,i=t[this.expando];if(void 0!==i){if(void 0!==e){n=(e=Array.isArray(e)?e.map(X):(e=X(e))in i?[e]:e.match(z)||[]).length;for(;n--;)delete i[e[n]]}(void 0===e||C.isEmptyObject(i))&&(t.nodeType?t[this.expando]=void 0:delete t[this.expando])}},hasData:function(t){var e=t[this.expando];return void 0!==e&&!C.isEmptyObject(e)}};var Y=new K,Z=new K,tt=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,et=/[A-Z]/g;function nt(t,e,n){var i;if(void 0===n&&1===t.nodeType)if(i="data-"+e.replace(et,"-$&").toLowerCase(),"string"==typeof(n=t.getAttribute(i))){try{n=function(t){return"true"===t||"false"!==t&&("null"===t?null:t===+t+""?+t:tt.test(t)?JSON.parse(t):t)}(n)}catch(t){}Z.set(t,e,n)}else n=void 0;return n}C.extend({hasData:function(t){return Z.hasData(t)||Y.hasData(t)},data:function(t,e,n){return Z.access(t,e,n)},removeData:function(t,e){Z.remove(t,e)},_data:function(t,e,n){return Y.access(t,e,n)},_removeData:function(t,e){Y.remove(t,e)}}),C.fn.extend({data:function(t,e){var n,i,o,r=this[0],s=r&&r.attributes;if(void 0===t){if(this.length&&(o=Z.get(r),1===r.nodeType&&!Y.get(r,"hasDataAttrs"))){for(n=s.length;n--;)s[n]&&0===(i=s[n].name).indexOf("data-")&&(i=X(i.slice(5)),nt(r,i,o[i]));Y.set(r,"hasDataAttrs",!0)}return o}return"object"==typeof t?this.each((function(){Z.set(this,t)})):B(this,(function(e){var n;if(r&&void 0===e)return void 0!==(n=Z.get(r,t))||void 0!==(n=nt(r,t))?n:void 0;this.each((function(){Z.set(this,t,e)}))}),null,e,arguments.length>1,null,!0)},removeData:function(t){return this.each((function(){Z.remove(this,t)}))}}),C.extend({queue:function(t,e,n){var i;if(t)return e=(e||"fx")+"queue",i=Y.get(t,e),n&&(!i||Array.isArray(n)?i=Y.access(t,e,C.makeArray(n)):i.push(n)),i||[]},dequeue:function(t,e){e=e||"fx";var n=C.queue(t,e),i=n.length,o=n.shift(),r=C._queueHooks(t,e);"inprogress"===o&&(o=n.shift(),i--),o&&("fx"===e&&n.unshift("inprogress"),delete r.stop,o.call(t,(function(){C.dequeue(t,e)}),r)),!i&&r&&r.empty.fire()},_queueHooks:function(t,e){var n=e+"queueHooks";return Y.get(t,n)||Y.access(t,n,{empty:C.Callbacks("once memory").add((function(){Y.remove(t,[e+"queue",n])}))})}}),C.fn.extend({queue:function(t,e){var n=2;return"string"!=typeof t&&(e=t,t="fx",n--),arguments.length<n?C.queue(this[0],t):void 0===e?this:this.each((function(){var n=C.queue(this,t,e);C._queueHooks(this,t),"fx"===t&&"inprogress"!==n[0]&&C.dequeue(this,t)}))},dequeue:function(t){return this.each((function(){C.dequeue(this,t)}))},clearQueue:function(t){return this.queue(t||"fx",[])},promise:function(t,e){var n,i=1,o=C.Deferred(),r=this,s=this.length,a=function(){--i||o.resolveWith(r,[r])};for("string"!=typeof t&&(e=t,t=void 0),t=t||"fx";s--;)(n=Y.get(r[s],t+"queueHooks"))&&n.empty&&(i++,n.empty.add(a));return a(),o.promise(e)}});var it=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,ot=new RegExp("^(?:([+-])=|)("+it+")([a-z%]*)$","i"),rt=["Top","Right","Bottom","Left"],st=b.documentElement,at=function(t){return C.contains(t.ownerDocument,t)},lt={composed:!0};st.getRootNode&&(at=function(t){return C.contains(t.ownerDocument,t)||t.getRootNode(lt)===t.ownerDocument});var ct=function(t,e){return"none"===(t=e||t).style.display||""===t.style.display&&at(t)&&"none"===C.css(t,"display")};function ut(t,e,n,i){var o,r,s=20,a=i?function(){return i.cur()}:function(){return C.css(t,e,"")},l=a(),c=n&&n[3]||(C.cssNumber[e]?"":"px"),u=t.nodeType&&(C.cssNumber[e]||"px"!==c&&+l)&&ot.exec(C.css(t,e));if(u&&u[3]!==c){for(l/=2,c=c||u[3],u=+l||1;s--;)C.style(t,e,u+c),(1-r)*(1-(r=a()/l||.5))<=0&&(s=0),u/=r;u*=2,C.style(t,e,u+c),n=n||[]}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}var pt={};function dt(t){var e,n=t.ownerDocument,i=t.nodeName,o=pt[i];return o||(e=n.body.appendChild(n.createElement(i)),o=C.css(e,"display"),e.parentNode.removeChild(e),"none"===o&&(o="block"),pt[i]=o,o)}function ht(t,e){for(var n,i,o=[],r=0,s=t.length;r<s;r++)(i=t[r]).style&&(n=i.style.display,e?("none"===n&&(o[r]=Y.get(i,"display")||null,o[r]||(i.style.display="")),""===i.style.display&&ct(i)&&(o[r]=dt(i))):"none"!==n&&(o[r]="none",Y.set(i,"display",n)));for(r=0;r<s;r++)null!=o[r]&&(t[r].style.display=o[r]);return t}C.fn.extend({show:function(){return ht(this,!0)},hide:function(){return ht(this)},toggle:function(t){return"boolean"==typeof t?t?this.show():this.hide():this.each((function(){ct(this)?C(this).show():C(this).hide()}))}});var ft,mt,gt=/^(?:checkbox|radio)$/i,vt=/<([a-z][^\/\0>\x20\t\r\n\f]*)/i,yt=/^$|^module$|\/(?:java|ecma)script/i;ft=b.createDocumentFragment().appendChild(b.createElement("div")),(mt=b.createElement("input")).setAttribute("type","radio"),mt.setAttribute("checked","checked"),mt.setAttribute("name","t"),ft.appendChild(mt),g.checkClone=ft.cloneNode(!0).cloneNode(!0).lastChild.checked,ft.innerHTML="<textarea>x</textarea>",g.noCloneChecked=!!ft.cloneNode(!0).lastChild.defaultValue,ft.innerHTML="<option></option>",g.option=!!ft.lastChild;var bt={thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};function xt(t,e){var n;return n=void 0!==t.getElementsByTagName?t.getElementsByTagName(e||"*"):void 0!==t.querySelectorAll?t.querySelectorAll(e||"*"):[],void 0===e||e&&D(t,e)?C.merge([t],n):n}function wt(t,e){for(var n=0,i=t.length;n<i;n++)Y.set(t[n],"globalEval",!e||Y.get(e[n],"globalEval"))}bt.tbody=bt.tfoot=bt.colgroup=bt.caption=bt.thead,bt.th=bt.td,g.option||(bt.optgroup=bt.option=[1,"<select multiple='multiple'>","</select>"]);var kt=/<|&#?\w+;/;function $t(t,e,n,i,o){for(var r,s,a,l,c,u,p=e.createDocumentFragment(),d=[],h=0,f=t.length;h<f;h++)if((r=t[h])||0===r)if("object"===k(r))C.merge(d,r.nodeType?[r]:r);else if(kt.test(r)){for(s=s||p.appendChild(e.createElement("div")),a=(vt.exec(r)||["",""])[1].toLowerCase(),l=bt[a]||bt._default,s.innerHTML=l[1]+C.htmlPrefilter(r)+l[2],u=l[0];u--;)s=s.lastChild;C.merge(d,s.childNodes),(s=p.firstChild).textContent=""}else d.push(e.createTextNode(r));for(p.textContent="",h=0;r=d[h++];)if(i&&C.inArray(r,i)>-1)o&&o.push(r);else if(c=at(r),s=xt(p.appendChild(r),"script"),c&&wt(s),n)for(u=0;r=s[u++];)yt.test(r.type||"")&&n.push(r);return p}var Ct=/^([^.]*)(?:\.(.+)|)/;function Tt(){return!0}function St(){return!1}function _t(t,e){return t===function(){try{return b.activeElement}catch(t){}}()==("focus"===e)}function Et(t,e,n,i,o,r){var s,a;if("object"==typeof e){for(a in"string"!=typeof n&&(i=i||n,n=void 0),e)Et(t,a,n,i,e[a],r);return t}if(null==i&&null==o?(o=n,i=n=void 0):null==o&&("string"==typeof n?(o=i,i=void 0):(o=i,i=n,n=void 0)),!1===o)o=St;else if(!o)return t;return 1===r&&(s=o,o=function(t){return C().off(t),s.apply(this,arguments)},o.guid=s.guid||(s.guid=C.guid++)),t.each((function(){C.event.add(this,e,o,i,n)}))}function At(t,e,n){n?(Y.set(t,e,!1),C.event.add(t,e,{namespace:!1,handler:function(t){var i,o,r=Y.get(this,e);if(1&t.isTrigger&&this[e]){if(r.length)(C.event.special[e]||{}).delegateType&&t.stopPropagation();else if(r=a.call(arguments),Y.set(this,e,r),i=n(this,e),this[e](),r!==(o=Y.get(this,e))||i?Y.set(this,e,!1):o={},r!==o)return t.stopImmediatePropagation(),t.preventDefault(),o&&o.value}else r.length&&(Y.set(this,e,{value:C.event.trigger(C.extend(r[0],C.Event.prototype),r.slice(1),this)}),t.stopImmediatePropagation())}})):void 0===Y.get(t,e)&&C.event.add(t,e,Tt)}C.event={global:{},add:function(t,e,n,i,o){var r,s,a,l,c,u,p,d,h,f,m,g=Y.get(t);if(J(t))for(n.handler&&(n=(r=n).handler,o=r.selector),o&&C.find.matchesSelector(st,o),n.guid||(n.guid=C.guid++),(l=g.events)||(l=g.events=Object.create(null)),(s=g.handle)||(s=g.handle=function(e){return void 0!==C&&C.event.triggered!==e.type?C.event.dispatch.apply(t,arguments):void 0}),c=(e=(e||"").match(z)||[""]).length;c--;)h=m=(a=Ct.exec(e[c])||[])[1],f=(a[2]||"").split(".").sort(),h&&(p=C.event.special[h]||{},h=(o?p.delegateType:p.bindType)||h,p=C.event.special[h]||{},u=C.extend({type:h,origType:m,data:i,handler:n,guid:n.guid,selector:o,needsContext:o&&C.expr.match.needsContext.test(o),namespace:f.join(".")},r),(d=l[h])||((d=l[h]=[]).delegateCount=0,p.setup&&!1!==p.setup.call(t,i,f,s)||t.addEventListener&&t.addEventListener(h,s)),p.add&&(p.add.call(t,u),u.handler.guid||(u.handler.guid=n.guid)),o?d.splice(d.delegateCount++,0,u):d.push(u),C.event.global[h]=!0)},remove:function(t,e,n,i,o){var r,s,a,l,c,u,p,d,h,f,m,g=Y.hasData(t)&&Y.get(t);if(g&&(l=g.events)){for(c=(e=(e||"").match(z)||[""]).length;c--;)if(h=m=(a=Ct.exec(e[c])||[])[1],f=(a[2]||"").split(".").sort(),h){for(p=C.event.special[h]||{},d=l[h=(i?p.delegateType:p.bindType)||h]||[],a=a[2]&&new RegExp("(^|\\.)"+f.join("\\.(?:.*\\.|)")+"(\\.|$)"),s=r=d.length;r--;)u=d[r],!o&&m!==u.origType||n&&n.guid!==u.guid||a&&!a.test(u.namespace)||i&&i!==u.selector&&("**"!==i||!u.selector)||(d.splice(r,1),u.selector&&d.delegateCount--,p.remove&&p.remove.call(t,u));s&&!d.length&&(p.teardown&&!1!==p.teardown.call(t,f,g.handle)||C.removeEvent(t,h,g.handle),delete l[h])}else for(h in l)C.event.remove(t,h+e[c],n,i,!0);C.isEmptyObject(l)&&Y.remove(t,"handle events")}},dispatch:function(t){var e,n,i,o,r,s,a=new Array(arguments.length),l=C.event.fix(t),c=(Y.get(this,"events")||Object.create(null))[l.type]||[],u=C.event.special[l.type]||{};for(a[0]=l,e=1;e<arguments.length;e++)a[e]=arguments[e];if(l.delegateTarget=this,!u.preDispatch||!1!==u.preDispatch.call(this,l)){for(s=C.event.handlers.call(this,l,c),e=0;(o=s[e++])&&!l.isPropagationStopped();)for(l.currentTarget=o.elem,n=0;(r=o.handlers[n++])&&!l.isImmediatePropagationStopped();)l.rnamespace&&!1!==r.namespace&&!l.rnamespace.test(r.namespace)||(l.handleObj=r,l.data=r.data,void 0!==(i=((C.event.special[r.origType]||{}).handle||r.handler).apply(o.elem,a))&&!1===(l.result=i)&&(l.preventDefault(),l.stopPropagation()));return u.postDispatch&&u.postDispatch.call(this,l),l.result}},handlers:function(t,e){var n,i,o,r,s,a=[],l=e.delegateCount,c=t.target;if(l&&c.nodeType&&!("click"===t.type&&t.button>=1))for(;c!==this;c=c.parentNode||this)if(1===c.nodeType&&("click"!==t.type||!0!==c.disabled)){for(r=[],s={},n=0;n<l;n++)void 0===s[o=(i=e[n]).selector+" "]&&(s[o]=i.needsContext?C(o,this).index(c)>-1:C.find(o,this,null,[c]).length),s[o]&&r.push(i);r.length&&a.push({elem:c,handlers:r})}return c=this,l<e.length&&a.push({elem:c,handlers:e.slice(l)}),a},addProp:function(t,e){Object.defineProperty(C.Event.prototype,t,{enumerable:!0,configurable:!0,get:v(e)?function(){if(this.originalEvent)return e(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[t]},set:function(e){Object.defineProperty(this,t,{enumerable:!0,configurable:!0,writable:!0,value:e})}})},fix:function(t){return t[C.expando]?t:new C.Event(t)},special:{load:{noBubble:!0},click:{setup:function(t){var e=this||t;return gt.test(e.type)&&e.click&&D(e,"input")&&At(e,"click",Tt),!1},trigger:function(t){var e=this||t;return gt.test(e.type)&&e.click&&D(e,"input")&&At(e,"click"),!0},_default:function(t){var e=t.target;return gt.test(e.type)&&e.click&&D(e,"input")&&Y.get(e,"click")||D(e,"a")}},beforeunload:{postDispatch:function(t){void 0!==t.result&&t.originalEvent&&(t.originalEvent.returnValue=t.result)}}}},C.removeEvent=function(t,e,n){t.removeEventListener&&t.removeEventListener(e,n)},C.Event=function(t,e){if(!(this instanceof C.Event))return new C.Event(t,e);t&&t.type?(this.originalEvent=t,this.type=t.type,this.isDefaultPrevented=t.defaultPrevented||void 0===t.defaultPrevented&&!1===t.returnValue?Tt:St,this.target=t.target&&3===t.target.nodeType?t.target.parentNode:t.target,this.currentTarget=t.currentTarget,this.relatedTarget=t.relatedTarget):this.type=t,e&&C.extend(this,e),this.timeStamp=t&&t.timeStamp||Date.now(),this[C.expando]=!0},C.Event.prototype={constructor:C.Event,isDefaultPrevented:St,isPropagationStopped:St,isImmediatePropagationStopped:St,isSimulated:!1,preventDefault:function(){var t=this.originalEvent;this.isDefaultPrevented=Tt,t&&!this.isSimulated&&t.preventDefault()},stopPropagation:function(){var t=this.originalEvent;this.isPropagationStopped=Tt,t&&!this.isSimulated&&t.stopPropagation()},stopImmediatePropagation:function(){var t=this.originalEvent;this.isImmediatePropagationStopped=Tt,t&&!this.isSimulated&&t.stopImmediatePropagation(),this.stopPropagation()}},C.each({altKey:!0,bubbles:!0,cancelable:!0,changedTouches:!0,ctrlKey:!0,detail:!0,eventPhase:!0,metaKey:!0,pageX:!0,pageY:!0,shiftKey:!0,view:!0,char:!0,code:!0,charCode:!0,key:!0,keyCode:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pointerId:!0,pointerType:!0,screenX:!0,screenY:!0,targetTouches:!0,toElement:!0,touches:!0,which:!0},C.event.addProp),C.each({focus:"focusin",blur:"focusout"},(function(t,e){C.event.special[t]={setup:function(){return At(this,t,_t),!1},trigger:function(){return At(this,t),!0},_default:function(){return!0},delegateType:e}})),C.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},(function(t,e){C.event.special[t]={delegateType:e,bindType:e,handle:function(t){var n,i=t.relatedTarget,o=t.handleObj;return i&&(i===this||C.contains(this,i))||(t.type=o.origType,n=o.handler.apply(this,arguments),t.type=e),n}}})),C.fn.extend({on:function(t,e,n,i){return Et(this,t,e,n,i)},one:function(t,e,n,i){return Et(this,t,e,n,i,1)},off:function(t,e,n){var i,o;if(t&&t.preventDefault&&t.handleObj)return i=t.handleObj,C(t.delegateTarget).off(i.namespace?i.origType+"."+i.namespace:i.origType,i.selector,i.handler),this;if("object"==typeof t){for(o in t)this.off(o,e,t[o]);return this}return!1!==e&&"function"!=typeof e||(n=e,e=void 0),!1===n&&(n=St),this.each((function(){C.event.remove(this,t,n,e)}))}});var Dt=/<script|<style|<link/i,It=/checked\s*(?:[^=]|=\s*.checked.)/i,jt=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;function Nt(t,e){return D(t,"table")&&D(11!==e.nodeType?e:e.firstChild,"tr")&&C(t).children("tbody")[0]||t}function Pt(t){return t.type=(null!==t.getAttribute("type"))+"/"+t.type,t}function Ot(t){return"true/"===(t.type||"").slice(0,5)?t.type=t.type.slice(5):t.removeAttribute("type"),t}function qt(t,e){var n,i,o,r,s,a;if(1===e.nodeType){if(Y.hasData(t)&&(a=Y.get(t).events))for(o in Y.remove(e,"handle events"),a)for(n=0,i=a[o].length;n<i;n++)C.event.add(e,o,a[o][n]);Z.hasData(t)&&(r=Z.access(t),s=C.extend({},r),Z.set(e,s))}}function Lt(t,e){var n=e.nodeName.toLowerCase();"input"===n&&gt.test(t.type)?e.checked=t.checked:"input"!==n&&"textarea"!==n||(e.defaultValue=t.defaultValue)}function zt(t,e,n,i){e=l(e);var o,r,s,a,c,u,p=0,d=t.length,h=d-1,f=e[0],m=v(f);if(m||d>1&&"string"==typeof f&&!g.checkClone&&It.test(f))return t.each((function(o){var r=t.eq(o);m&&(e[0]=f.call(this,o,r.html())),zt(r,e,n,i)}));if(d&&(r=(o=$t(e,t[0].ownerDocument,!1,t,i)).firstChild,1===o.childNodes.length&&(o=r),r||i)){for(a=(s=C.map(xt(o,"script"),Pt)).length;p<d;p++)c=o,p!==h&&(c=C.clone(c,!0,!0),a&&C.merge(s,xt(c,"script"))),n.call(t[p],c,p);if(a)for(u=s[s.length-1].ownerDocument,C.map(s,Ot),p=0;p<a;p++)c=s[p],yt.test(c.type||"")&&!Y.access(c,"globalEval")&&C.contains(u,c)&&(c.src&&"module"!==(c.type||"").toLowerCase()?C._evalUrl&&!c.noModule&&C._evalUrl(c.src,{nonce:c.nonce||c.getAttribute("nonce")},u):w(c.textContent.replace(jt,""),c,u))}return t}function Rt(t,e,n){for(var i,o=e?C.filter(e,t):t,r=0;null!=(i=o[r]);r++)n||1!==i.nodeType||C.cleanData(xt(i)),i.parentNode&&(n&&at(i)&&wt(xt(i,"script")),i.parentNode.removeChild(i));return t}C.extend({htmlPrefilter:function(t){return t},clone:function(t,e,n){var i,o,r,s,a=t.cloneNode(!0),l=at(t);if(!(g.noCloneChecked||1!==t.nodeType&&11!==t.nodeType||C.isXMLDoc(t)))for(s=xt(a),i=0,o=(r=xt(t)).length;i<o;i++)Lt(r[i],s[i]);if(e)if(n)for(r=r||xt(t),s=s||xt(a),i=0,o=r.length;i<o;i++)qt(r[i],s[i]);else qt(t,a);return(s=xt(a,"script")).length>0&&wt(s,!l&&xt(t,"script")),a},cleanData:function(t){for(var e,n,i,o=C.event.special,r=0;void 0!==(n=t[r]);r++)if(J(n)){if(e=n[Y.expando]){if(e.events)for(i in e.events)o[i]?C.event.remove(n,i):C.removeEvent(n,i,e.handle);n[Y.expando]=void 0}n[Z.expando]&&(n[Z.expando]=void 0)}}}),C.fn.extend({detach:function(t){return Rt(this,t,!0)},remove:function(t){return Rt(this,t)},text:function(t){return B(this,(function(t){return void 0===t?C.text(this):this.empty().each((function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=t)}))}),null,t,arguments.length)},append:function(){return zt(this,arguments,(function(t){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||Nt(this,t).appendChild(t)}))},prepend:function(){return zt(this,arguments,(function(t){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var e=Nt(this,t);e.insertBefore(t,e.firstChild)}}))},before:function(){return zt(this,arguments,(function(t){this.parentNode&&this.parentNode.insertBefore(t,this)}))},after:function(){return zt(this,arguments,(function(t){this.parentNode&&this.parentNode.insertBefore(t,this.nextSibling)}))},empty:function(){for(var t,e=0;null!=(t=this[e]);e++)1===t.nodeType&&(C.cleanData(xt(t,!1)),t.textContent="");return this},clone:function(t,e){return t=null!=t&&t,e=null==e?t:e,this.map((function(){return C.clone(this,t,e)}))},html:function(t){return B(this,(function(t){var e=this[0]||{},n=0,i=this.length;if(void 0===t&&1===e.nodeType)return e.innerHTML;if("string"==typeof t&&!Dt.test(t)&&!bt[(vt.exec(t)||["",""])[1].toLowerCase()]){t=C.htmlPrefilter(t);try{for(;n<i;n++)1===(e=this[n]||{}).nodeType&&(C.cleanData(xt(e,!1)),e.innerHTML=t);e=0}catch(t){}}e&&this.empty().append(t)}),null,t,arguments.length)},replaceWith:function(){var t=[];return zt(this,arguments,(function(e){var n=this.parentNode;C.inArray(this,t)<0&&(C.cleanData(xt(this)),n&&n.replaceChild(e,this))}),t)}}),C.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},(function(t,e){C.fn[t]=function(t){for(var n,i=[],o=C(t),r=o.length-1,s=0;s<=r;s++)n=s===r?this:this.clone(!0),C(o[s])[e](n),c.apply(i,n.get());return this.pushStack(i)}}));var Ft=new RegExp("^("+it+")(?!px)[a-z%]+$","i"),Ht=function(t){var e=t.ownerDocument.defaultView;return e&&e.opener||(e=n),e.getComputedStyle(t)},Mt=function(t,e,n){var i,o,r={};for(o in e)r[o]=t.style[o],t.style[o]=e[o];for(o in i=n.call(t),e)t.style[o]=r[o];return i},Ut=new RegExp(rt.join("|"),"i");function Wt(t,e,n){var i,o,r,s,a=t.style;return(n=n||Ht(t))&&(""!==(s=n.getPropertyValue(e)||n[e])||at(t)||(s=C.style(t,e)),!g.pixelBoxStyles()&&Ft.test(s)&&Ut.test(e)&&(i=a.width,o=a.minWidth,r=a.maxWidth,a.minWidth=a.maxWidth=a.width=s,s=n.width,a.width=i,a.minWidth=o,a.maxWidth=r)),void 0!==s?s+"":s}function Bt(t,e){return{get:function(){if(!t())return(this.get=e).apply(this,arguments);delete this.get}}}!function(){function t(){if(u){c.style.cssText="position:absolute;left:-11111px;width:60px;margin-top:1px;padding:0;border:0",u.style.cssText="position:relative;display:block;box-sizing:border-box;overflow:scroll;margin:auto;border:1px;padding:1px;width:60%;top:1%",st.appendChild(c).appendChild(u);var t=n.getComputedStyle(u);i="1%"!==t.top,l=12===e(t.marginLeft),u.style.right="60%",s=36===e(t.right),o=36===e(t.width),u.style.position="absolute",r=12===e(u.offsetWidth/3),st.removeChild(c),u=null}}function e(t){return Math.round(parseFloat(t))}var i,o,r,s,a,l,c=b.createElement("div"),u=b.createElement("div");u.style&&(u.style.backgroundClip="content-box",u.cloneNode(!0).style.backgroundClip="",g.clearCloneStyle="content-box"===u.style.backgroundClip,C.extend(g,{boxSizingReliable:function(){return t(),o},pixelBoxStyles:function(){return t(),s},pixelPosition:function(){return t(),i},reliableMarginLeft:function(){return t(),l},scrollboxSize:function(){return t(),r},reliableTrDimensions:function(){var t,e,i,o;return null==a&&(t=b.createElement("table"),e=b.createElement("tr"),i=b.createElement("div"),t.style.cssText="position:absolute;left:-11111px;border-collapse:separate",e.style.cssText="border:1px solid",e.style.height="1px",i.style.height="9px",i.style.display="block",st.appendChild(t).appendChild(e).appendChild(i),o=n.getComputedStyle(e),a=parseInt(o.height,10)+parseInt(o.borderTopWidth,10)+parseInt(o.borderBottomWidth,10)===e.offsetHeight,st.removeChild(t)),a}}))}();var Qt=["Webkit","Moz","ms"],Vt=b.createElement("div").style,Gt={};function Xt(t){var e=C.cssProps[t]||Gt[t];return e||(t in Vt?t:Gt[t]=function(t){for(var e=t[0].toUpperCase()+t.slice(1),n=Qt.length;n--;)if((t=Qt[n]+e)in Vt)return t}(t)||t)}var Jt=/^(none|table(?!-c[ea]).+)/,Kt=/^--/,Yt={position:"absolute",visibility:"hidden",display:"block"},Zt={letterSpacing:"0",fontWeight:"400"};function te(t,e,n){var i=ot.exec(e);return i?Math.max(0,i[2]-(n||0))+(i[3]||"px"):e}function ee(t,e,n,i,o,r){var s="width"===e?1:0,a=0,l=0;if(n===(i?"border":"content"))return 0;for(;s<4;s+=2)"margin"===n&&(l+=C.css(t,n+rt[s],!0,o)),i?("content"===n&&(l-=C.css(t,"padding"+rt[s],!0,o)),"margin"!==n&&(l-=C.css(t,"border"+rt[s]+"Width",!0,o))):(l+=C.css(t,"padding"+rt[s],!0,o),"padding"!==n?l+=C.css(t,"border"+rt[s]+"Width",!0,o):a+=C.css(t,"border"+rt[s]+"Width",!0,o));return!i&&r>=0&&(l+=Math.max(0,Math.ceil(t["offset"+e[0].toUpperCase()+e.slice(1)]-r-l-a-.5))||0),l}function ne(t,e,n){var i=Ht(t),o=(!g.boxSizingReliable()||n)&&"border-box"===C.css(t,"boxSizing",!1,i),r=o,s=Wt(t,e,i),a="offset"+e[0].toUpperCase()+e.slice(1);if(Ft.test(s)){if(!n)return s;s="auto"}return(!g.boxSizingReliable()&&o||!g.reliableTrDimensions()&&D(t,"tr")||"auto"===s||!parseFloat(s)&&"inline"===C.css(t,"display",!1,i))&&t.getClientRects().length&&(o="border-box"===C.css(t,"boxSizing",!1,i),(r=a in t)&&(s=t[a])),(s=parseFloat(s)||0)+ee(t,e,n||(o?"border":"content"),r,i,s)+"px"}function ie(t,e,n,i,o){return new ie.prototype.init(t,e,n,i,o)}C.extend({cssHooks:{opacity:{get:function(t,e){if(e){var n=Wt(t,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{},style:function(t,e,n,i){if(t&&3!==t.nodeType&&8!==t.nodeType&&t.style){var o,r,s,a=X(e),l=Kt.test(e),c=t.style;if(l||(e=Xt(a)),s=C.cssHooks[e]||C.cssHooks[a],void 0===n)return s&&"get"in s&&void 0!==(o=s.get(t,!1,i))?o:c[e];"string"===(r=typeof n)&&(o=ot.exec(n))&&o[1]&&(n=ut(t,e,o),r="number"),null!=n&&n==n&&("number"!==r||l||(n+=o&&o[3]||(C.cssNumber[a]?"":"px")),g.clearCloneStyle||""!==n||0!==e.indexOf("background")||(c[e]="inherit"),s&&"set"in s&&void 0===(n=s.set(t,n,i))||(l?c.setProperty(e,n):c[e]=n))}},css:function(t,e,n,i){var o,r,s,a=X(e);return Kt.test(e)||(e=Xt(a)),(s=C.cssHooks[e]||C.cssHooks[a])&&"get"in s&&(o=s.get(t,!0,n)),void 0===o&&(o=Wt(t,e,i)),"normal"===o&&e in Zt&&(o=Zt[e]),""===n||n?(r=parseFloat(o),!0===n||isFinite(r)?r||0:o):o}}),C.each(["height","width"],(function(t,e){C.cssHooks[e]={get:function(t,n,i){if(n)return!Jt.test(C.css(t,"display"))||t.getClientRects().length&&t.getBoundingClientRect().width?ne(t,e,i):Mt(t,Yt,(function(){return ne(t,e,i)}))},set:function(t,n,i){var o,r=Ht(t),s=!g.scrollboxSize()&&"absolute"===r.position,a=(s||i)&&"border-box"===C.css(t,"boxSizing",!1,r),l=i?ee(t,e,i,a,r):0;return a&&s&&(l-=Math.ceil(t["offset"+e[0].toUpperCase()+e.slice(1)]-parseFloat(r[e])-ee(t,e,"border",!1,r)-.5)),l&&(o=ot.exec(n))&&"px"!==(o[3]||"px")&&(t.style[e]=n,n=C.css(t,e)),te(0,n,l)}}})),C.cssHooks.marginLeft=Bt(g.reliableMarginLeft,(function(t,e){if(e)return(parseFloat(Wt(t,"marginLeft"))||t.getBoundingClientRect().left-Mt(t,{marginLeft:0},(function(){return t.getBoundingClientRect().left})))+"px"})),C.each({margin:"",padding:"",border:"Width"},(function(t,e){C.cssHooks[t+e]={expand:function(n){for(var i=0,o={},r="string"==typeof n?n.split(" "):[n];i<4;i++)o[t+rt[i]+e]=r[i]||r[i-2]||r[0];return o}},"margin"!==t&&(C.cssHooks[t+e].set=te)})),C.fn.extend({css:function(t,e){return B(this,(function(t,e,n){var i,o,r={},s=0;if(Array.isArray(e)){for(i=Ht(t),o=e.length;s<o;s++)r[e[s]]=C.css(t,e[s],!1,i);return r}return void 0!==n?C.style(t,e,n):C.css(t,e)}),t,e,arguments.length>1)}}),C.Tween=ie,ie.prototype={constructor:ie,init:function(t,e,n,i,o,r){this.elem=t,this.prop=n,this.easing=o||C.easing._default,this.options=e,this.start=this.now=this.cur(),this.end=i,this.unit=r||(C.cssNumber[n]?"":"px")},cur:function(){var t=ie.propHooks[this.prop];return t&&t.get?t.get(this):ie.propHooks._default.get(this)},run:function(t){var e,n=ie.propHooks[this.prop];return this.options.duration?this.pos=e=C.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):ie.propHooks._default.set(this),this}},ie.prototype.init.prototype=ie.prototype,ie.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=C.css(t.elem,t.prop,""))&&"auto"!==e?e:0},set:function(t){C.fx.step[t.prop]?C.fx.step[t.prop](t):1!==t.elem.nodeType||!C.cssHooks[t.prop]&&null==t.elem.style[Xt(t.prop)]?t.elem[t.prop]=t.now:C.style(t.elem,t.prop,t.now+t.unit)}}},ie.propHooks.scrollTop=ie.propHooks.scrollLeft={set:function(t){t.elem.nodeType&&t.elem.parentNode&&(t.elem[t.prop]=t.now)}},C.easing={linear:function(t){return t},swing:function(t){return.5-Math.cos(t*Math.PI)/2},_default:"swing"},C.fx=ie.prototype.init,C.fx.step={};var oe,re,se=/^(?:toggle|show|hide)$/,ae=/queueHooks$/;function le(){re&&(!1===b.hidden&&n.requestAnimationFrame?n.requestAnimationFrame(le):n.setTimeout(le,C.fx.interval),C.fx.tick())}function ce(){return n.setTimeout((function(){oe=void 0})),oe=Date.now()}function ue(t,e){var n,i=0,o={height:t};for(e=e?1:0;i<4;i+=2-e)o["margin"+(n=rt[i])]=o["padding"+n]=t;return e&&(o.opacity=o.width=t),o}function pe(t,e,n){for(var i,o=(de.tweeners[e]||[]).concat(de.tweeners["*"]),r=0,s=o.length;r<s;r++)if(i=o[r].call(n,e,t))return i}function de(t,e,n){var i,o,r=0,s=de.prefilters.length,a=C.Deferred().always((function(){delete l.elem})),l=function(){if(o)return!1;for(var e=oe||ce(),n=Math.max(0,c.startTime+c.duration-e),i=1-(n/c.duration||0),r=0,s=c.tweens.length;r<s;r++)c.tweens[r].run(i);return a.notifyWith(t,[c,i,n]),i<1&&s?n:(s||a.notifyWith(t,[c,1,0]),a.resolveWith(t,[c]),!1)},c=a.promise({elem:t,props:C.extend({},e),opts:C.extend(!0,{specialEasing:{},easing:C.easing._default},n),originalProperties:e,originalOptions:n,startTime:oe||ce(),duration:n.duration,tweens:[],createTween:function(e,n){var i=C.Tween(t,c.opts,e,n,c.opts.specialEasing[e]||c.opts.easing);return c.tweens.push(i),i},stop:function(e){var n=0,i=e?c.tweens.length:0;if(o)return this;for(o=!0;n<i;n++)c.tweens[n].run(1);return e?(a.notifyWith(t,[c,1,0]),a.resolveWith(t,[c,e])):a.rejectWith(t,[c,e]),this}}),u=c.props;for(!function(t,e){var n,i,o,r,s;for(n in t)if(o=e[i=X(n)],r=t[n],Array.isArray(r)&&(o=r[1],r=t[n]=r[0]),n!==i&&(t[i]=r,delete t[n]),(s=C.cssHooks[i])&&"expand"in s)for(n in r=s.expand(r),delete t[i],r)n in t||(t[n]=r[n],e[n]=o);else e[i]=o}(u,c.opts.specialEasing);r<s;r++)if(i=de.prefilters[r].call(c,t,u,c.opts))return v(i.stop)&&(C._queueHooks(c.elem,c.opts.queue).stop=i.stop.bind(i)),i;return C.map(u,pe,c),v(c.opts.start)&&c.opts.start.call(t,c),c.progress(c.opts.progress).done(c.opts.done,c.opts.complete).fail(c.opts.fail).always(c.opts.always),C.fx.timer(C.extend(l,{elem:t,anim:c,queue:c.opts.queue})),c}C.Animation=C.extend(de,{tweeners:{"*":[function(t,e){var n=this.createTween(t,e);return ut(n.elem,t,ot.exec(e),n),n}]},tweener:function(t,e){v(t)?(e=t,t=["*"]):t=t.match(z);for(var n,i=0,o=t.length;i<o;i++)n=t[i],de.tweeners[n]=de.tweeners[n]||[],de.tweeners[n].unshift(e)},prefilters:[function(t,e,n){var i,o,r,s,a,l,c,u,p="width"in e||"height"in e,d=this,h={},f=t.style,m=t.nodeType&&ct(t),g=Y.get(t,"fxshow");for(i in n.queue||(null==(s=C._queueHooks(t,"fx")).unqueued&&(s.unqueued=0,a=s.empty.fire,s.empty.fire=function(){s.unqueued||a()}),s.unqueued++,d.always((function(){d.always((function(){s.unqueued--,C.queue(t,"fx").length||s.empty.fire()}))}))),e)if(o=e[i],se.test(o)){if(delete e[i],r=r||"toggle"===o,o===(m?"hide":"show")){if("show"!==o||!g||void 0===g[i])continue;m=!0}h[i]=g&&g[i]||C.style(t,i)}if((l=!C.isEmptyObject(e))||!C.isEmptyObject(h))for(i in p&&1===t.nodeType&&(n.overflow=[f.overflow,f.overflowX,f.overflowY],null==(c=g&&g.display)&&(c=Y.get(t,"display")),"none"===(u=C.css(t,"display"))&&(c?u=c:(ht([t],!0),c=t.style.display||c,u=C.css(t,"display"),ht([t]))),("inline"===u||"inline-block"===u&&null!=c)&&"none"===C.css(t,"float")&&(l||(d.done((function(){f.display=c})),null==c&&(u=f.display,c="none"===u?"":u)),f.display="inline-block")),n.overflow&&(f.overflow="hidden",d.always((function(){f.overflow=n.overflow[0],f.overflowX=n.overflow[1],f.overflowY=n.overflow[2]}))),l=!1,h)l||(g?"hidden"in g&&(m=g.hidden):g=Y.access(t,"fxshow",{display:c}),r&&(g.hidden=!m),m&&ht([t],!0),d.done((function(){for(i in m||ht([t]),Y.remove(t,"fxshow"),h)C.style(t,i,h[i])}))),l=pe(m?g[i]:0,i,d),i in g||(g[i]=l.start,m&&(l.end=l.start,l.start=0))}],prefilter:function(t,e){e?de.prefilters.unshift(t):de.prefilters.push(t)}}),C.speed=function(t,e,n){var i=t&&"object"==typeof t?C.extend({},t):{complete:n||!n&&e||v(t)&&t,duration:t,easing:n&&e||e&&!v(e)&&e};return C.fx.off?i.duration=0:"number"!=typeof i.duration&&(i.duration in C.fx.speeds?i.duration=C.fx.speeds[i.duration]:i.duration=C.fx.speeds._default),null!=i.queue&&!0!==i.queue||(i.queue="fx"),i.old=i.complete,i.complete=function(){v(i.old)&&i.old.call(this),i.queue&&C.dequeue(this,i.queue)},i},C.fn.extend({fadeTo:function(t,e,n,i){return this.filter(ct).css("opacity",0).show().end().animate({opacity:e},t,n,i)},animate:function(t,e,n,i){var o=C.isEmptyObject(t),r=C.speed(e,n,i),s=function(){var e=de(this,C.extend({},t),r);(o||Y.get(this,"finish"))&&e.stop(!0)};return s.finish=s,o||!1===r.queue?this.each(s):this.queue(r.queue,s)},stop:function(t,e,n){var i=function(t){var e=t.stop;delete t.stop,e(n)};return"string"!=typeof t&&(n=e,e=t,t=void 0),e&&this.queue(t||"fx",[]),this.each((function(){var e=!0,o=null!=t&&t+"queueHooks",r=C.timers,s=Y.get(this);if(o)s[o]&&s[o].stop&&i(s[o]);else for(o in s)s[o]&&s[o].stop&&ae.test(o)&&i(s[o]);for(o=r.length;o--;)r[o].elem!==this||null!=t&&r[o].queue!==t||(r[o].anim.stop(n),e=!1,r.splice(o,1));!e&&n||C.dequeue(this,t)}))},finish:function(t){return!1!==t&&(t=t||"fx"),this.each((function(){var e,n=Y.get(this),i=n[t+"queue"],o=n[t+"queueHooks"],r=C.timers,s=i?i.length:0;for(n.finish=!0,C.queue(this,t,[]),o&&o.stop&&o.stop.call(this,!0),e=r.length;e--;)r[e].elem===this&&r[e].queue===t&&(r[e].anim.stop(!0),r.splice(e,1));for(e=0;e<s;e++)i[e]&&i[e].finish&&i[e].finish.call(this);delete n.finish}))}}),C.each(["toggle","show","hide"],(function(t,e){var n=C.fn[e];C.fn[e]=function(t,i,o){return null==t||"boolean"==typeof t?n.apply(this,arguments):this.animate(ue(e,!0),t,i,o)}})),C.each({slideDown:ue("show"),slideUp:ue("hide"),slideToggle:ue("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},(function(t,e){C.fn[t]=function(t,n,i){return this.animate(e,t,n,i)}})),C.timers=[],C.fx.tick=function(){var t,e=0,n=C.timers;for(oe=Date.now();e<n.length;e++)(t=n[e])()||n[e]!==t||n.splice(e--,1);n.length||C.fx.stop(),oe=void 0},C.fx.timer=function(t){C.timers.push(t),C.fx.start()},C.fx.interval=13,C.fx.start=function(){re||(re=!0,le())},C.fx.stop=function(){re=null},C.fx.speeds={slow:600,fast:200,_default:400},C.fn.delay=function(t,e){return t=C.fx&&C.fx.speeds[t]||t,e=e||"fx",this.queue(e,(function(e,i){var o=n.setTimeout(e,t);i.stop=function(){n.clearTimeout(o)}}))},function(){var t=b.createElement("input"),e=b.createElement("select").appendChild(b.createElement("option"));t.type="checkbox",g.checkOn=""!==t.value,g.optSelected=e.selected,(t=b.createElement("input")).value="t",t.type="radio",g.radioValue="t"===t.value}();var he,fe=C.expr.attrHandle;C.fn.extend({attr:function(t,e){return B(this,C.attr,t,e,arguments.length>1)},removeAttr:function(t){return this.each((function(){C.removeAttr(this,t)}))}}),C.extend({attr:function(t,e,n){var i,o,r=t.nodeType;if(3!==r&&8!==r&&2!==r)return void 0===t.getAttribute?C.prop(t,e,n):(1===r&&C.isXMLDoc(t)||(o=C.attrHooks[e.toLowerCase()]||(C.expr.match.bool.test(e)?he:void 0)),void 0!==n?null===n?void C.removeAttr(t,e):o&&"set"in o&&void 0!==(i=o.set(t,n,e))?i:(t.setAttribute(e,n+""),n):o&&"get"in o&&null!==(i=o.get(t,e))?i:null==(i=C.find.attr(t,e))?void 0:i)},attrHooks:{type:{set:function(t,e){if(!g.radioValue&&"radio"===e&&D(t,"input")){var n=t.value;return t.setAttribute("type",e),n&&(t.value=n),e}}}},removeAttr:function(t,e){var n,i=0,o=e&&e.match(z);if(o&&1===t.nodeType)for(;n=o[i++];)t.removeAttribute(n)}}),he={set:function(t,e,n){return!1===e?C.removeAttr(t,n):t.setAttribute(n,n),n}},C.each(C.expr.match.bool.source.match(/\w+/g),(function(t,e){var n=fe[e]||C.find.attr;fe[e]=function(t,e,i){var o,r,s=e.toLowerCase();return i||(r=fe[s],fe[s]=o,o=null!=n(t,e,i)?s:null,fe[s]=r),o}}));var me=/^(?:input|select|textarea|button)$/i,ge=/^(?:a|area)$/i;function ve(t){return(t.match(z)||[]).join(" ")}function ye(t){return t.getAttribute&&t.getAttribute("class")||""}function be(t){return Array.isArray(t)?t:"string"==typeof t&&t.match(z)||[]}C.fn.extend({prop:function(t,e){return B(this,C.prop,t,e,arguments.length>1)},removeProp:function(t){return this.each((function(){delete this[C.propFix[t]||t]}))}}),C.extend({prop:function(t,e,n){var i,o,r=t.nodeType;if(3!==r&&8!==r&&2!==r)return 1===r&&C.isXMLDoc(t)||(e=C.propFix[e]||e,o=C.propHooks[e]),void 0!==n?o&&"set"in o&&void 0!==(i=o.set(t,n,e))?i:t[e]=n:o&&"get"in o&&null!==(i=o.get(t,e))?i:t[e]},propHooks:{tabIndex:{get:function(t){var e=C.find.attr(t,"tabindex");return e?parseInt(e,10):me.test(t.nodeName)||ge.test(t.nodeName)&&t.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),g.optSelected||(C.propHooks.selected={get:function(t){var e=t.parentNode;return e&&e.parentNode&&e.parentNode.selectedIndex,null},set:function(t){var e=t.parentNode;e&&(e.selectedIndex,e.parentNode&&e.parentNode.selectedIndex)}}),C.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],(function(){C.propFix[this.toLowerCase()]=this})),C.fn.extend({addClass:function(t){var e,n,i,o,r,s,a,l=0;if(v(t))return this.each((function(e){C(this).addClass(t.call(this,e,ye(this)))}));if((e=be(t)).length)for(;n=this[l++];)if(o=ye(n),i=1===n.nodeType&&" "+ve(o)+" "){for(s=0;r=e[s++];)i.indexOf(" "+r+" ")<0&&(i+=r+" ");o!==(a=ve(i))&&n.setAttribute("class",a)}return this},removeClass:function(t){var e,n,i,o,r,s,a,l=0;if(v(t))return this.each((function(e){C(this).removeClass(t.call(this,e,ye(this)))}));if(!arguments.length)return this.attr("class","");if((e=be(t)).length)for(;n=this[l++];)if(o=ye(n),i=1===n.nodeType&&" "+ve(o)+" "){for(s=0;r=e[s++];)for(;i.indexOf(" "+r+" ")>-1;)i=i.replace(" "+r+" "," ");o!==(a=ve(i))&&n.setAttribute("class",a)}return this},toggleClass:function(t,e){var n=typeof t,i="string"===n||Array.isArray(t);return"boolean"==typeof e&&i?e?this.addClass(t):this.removeClass(t):v(t)?this.each((function(n){C(this).toggleClass(t.call(this,n,ye(this),e),e)})):this.each((function(){var e,o,r,s;if(i)for(o=0,r=C(this),s=be(t);e=s[o++];)r.hasClass(e)?r.removeClass(e):r.addClass(e);else void 0!==t&&"boolean"!==n||((e=ye(this))&&Y.set(this,"__className__",e),this.setAttribute&&this.setAttribute("class",e||!1===t?"":Y.get(this,"__className__")||""))}))},hasClass:function(t){var e,n,i=0;for(e=" "+t+" ";n=this[i++];)if(1===n.nodeType&&(" "+ve(ye(n))+" ").indexOf(e)>-1)return!0;return!1}});var xe=/\r/g;C.fn.extend({val:function(t){var e,n,i,o=this[0];return arguments.length?(i=v(t),this.each((function(n){var o;1===this.nodeType&&(null==(o=i?t.call(this,n,C(this).val()):t)?o="":"number"==typeof o?o+="":Array.isArray(o)&&(o=C.map(o,(function(t){return null==t?"":t+""}))),(e=C.valHooks[this.type]||C.valHooks[this.nodeName.toLowerCase()])&&"set"in e&&void 0!==e.set(this,o,"value")||(this.value=o))}))):o?(e=C.valHooks[o.type]||C.valHooks[o.nodeName.toLowerCase()])&&"get"in e&&void 0!==(n=e.get(o,"value"))?n:"string"==typeof(n=o.value)?n.replace(xe,""):null==n?"":n:void 0}}),C.extend({valHooks:{option:{get:function(t){var e=C.find.attr(t,"value");return null!=e?e:ve(C.text(t))}},select:{get:function(t){var e,n,i,o=t.options,r=t.selectedIndex,s="select-one"===t.type,a=s?null:[],l=s?r+1:o.length;for(i=r<0?l:s?r:0;i<l;i++)if(((n=o[i]).selected||i===r)&&!n.disabled&&(!n.parentNode.disabled||!D(n.parentNode,"optgroup"))){if(e=C(n).val(),s)return e;a.push(e)}return a},set:function(t,e){for(var n,i,o=t.options,r=C.makeArray(e),s=o.length;s--;)((i=o[s]).selected=C.inArray(C.valHooks.option.get(i),r)>-1)&&(n=!0);return n||(t.selectedIndex=-1),r}}}}),C.each(["radio","checkbox"],(function(){C.valHooks[this]={set:function(t,e){if(Array.isArray(e))return t.checked=C.inArray(C(t).val(),e)>-1}},g.checkOn||(C.valHooks[this].get=function(t){return null===t.getAttribute("value")?"on":t.value})})),g.focusin="onfocusin"in n;var we=/^(?:focusinfocus|focusoutblur)$/,ke=function(t){t.stopPropagation()};C.extend(C.event,{trigger:function(t,e,i,o){var r,s,a,l,c,u,p,d,f=[i||b],m=h.call(t,"type")?t.type:t,g=h.call(t,"namespace")?t.namespace.split("."):[];if(s=d=a=i=i||b,3!==i.nodeType&&8!==i.nodeType&&!we.test(m+C.event.triggered)&&(m.indexOf(".")>-1&&(g=m.split("."),m=g.shift(),g.sort()),c=m.indexOf(":")<0&&"on"+m,(t=t[C.expando]?t:new C.Event(m,"object"==typeof t&&t)).isTrigger=o?2:3,t.namespace=g.join("."),t.rnamespace=t.namespace?new RegExp("(^|\\.)"+g.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=void 0,t.target||(t.target=i),e=null==e?[t]:C.makeArray(e,[t]),p=C.event.special[m]||{},o||!p.trigger||!1!==p.trigger.apply(i,e))){if(!o&&!p.noBubble&&!y(i)){for(l=p.delegateType||m,we.test(l+m)||(s=s.parentNode);s;s=s.parentNode)f.push(s),a=s;a===(i.ownerDocument||b)&&f.push(a.defaultView||a.parentWindow||n)}for(r=0;(s=f[r++])&&!t.isPropagationStopped();)d=s,t.type=r>1?l:p.bindType||m,(u=(Y.get(s,"events")||Object.create(null))[t.type]&&Y.get(s,"handle"))&&u.apply(s,e),(u=c&&s[c])&&u.apply&&J(s)&&(t.result=u.apply(s,e),!1===t.result&&t.preventDefault());return t.type=m,o||t.isDefaultPrevented()||p._default&&!1!==p._default.apply(f.pop(),e)||!J(i)||c&&v(i[m])&&!y(i)&&((a=i[c])&&(i[c]=null),C.event.triggered=m,t.isPropagationStopped()&&d.addEventListener(m,ke),i[m](),t.isPropagationStopped()&&d.removeEventListener(m,ke),C.event.triggered=void 0,a&&(i[c]=a)),t.result}},simulate:function(t,e,n){var i=C.extend(new C.Event,n,{type:t,isSimulated:!0});C.event.trigger(i,null,e)}}),C.fn.extend({trigger:function(t,e){return this.each((function(){C.event.trigger(t,e,this)}))},triggerHandler:function(t,e){var n=this[0];if(n)return C.event.trigger(t,e,n,!0)}}),g.focusin||C.each({focus:"focusin",blur:"focusout"},(function(t,e){var n=function(t){C.event.simulate(e,t.target,C.event.fix(t))};C.event.special[e]={setup:function(){var i=this.ownerDocument||this.document||this,o=Y.access(i,e);o||i.addEventListener(t,n,!0),Y.access(i,e,(o||0)+1)},teardown:function(){var i=this.ownerDocument||this.document||this,o=Y.access(i,e)-1;o?Y.access(i,e,o):(i.removeEventListener(t,n,!0),Y.remove(i,e))}}}));var $e=n.location,Ce={guid:Date.now()},Te=/\?/;C.parseXML=function(t){var e,i;if(!t||"string"!=typeof t)return null;try{e=(new n.DOMParser).parseFromString(t,"text/xml")}catch(t){}return i=e&&e.getElementsByTagName("parsererror")[0],e&&!i||C.error("Invalid XML: "+(i?C.map(i.childNodes,(function(t){return t.textContent})).join("\n"):t)),e};var Se=/\[\]$/,_e=/\r?\n/g,Ee=/^(?:submit|button|image|reset|file)$/i,Ae=/^(?:input|select|textarea|keygen)/i;function De(t,e,n,i){var o;if(Array.isArray(e))C.each(e,(function(e,o){n||Se.test(t)?i(t,o):De(t+"["+("object"==typeof o&&null!=o?e:"")+"]",o,n,i)}));else if(n||"object"!==k(e))i(t,e);else for(o in e)De(t+"["+o+"]",e[o],n,i)}C.param=function(t,e){var n,i=[],o=function(t,e){var n=v(e)?e():e;i[i.length]=encodeURIComponent(t)+"="+encodeURIComponent(null==n?"":n)};if(null==t)return"";if(Array.isArray(t)||t.jquery&&!C.isPlainObject(t))C.each(t,(function(){o(this.name,this.value)}));else for(n in t)De(n,t[n],e,o);return i.join("&")},C.fn.extend({serialize:function(){return C.param(this.serializeArray())},serializeArray:function(){return this.map((function(){var t=C.prop(this,"elements");return t?C.makeArray(t):this})).filter((function(){var t=this.type;return this.name&&!C(this).is(":disabled")&&Ae.test(this.nodeName)&&!Ee.test(t)&&(this.checked||!gt.test(t))})).map((function(t,e){var n=C(this).val();return null==n?null:Array.isArray(n)?C.map(n,(function(t){return{name:e.name,value:t.replace(_e,"\r\n")}})):{name:e.name,value:n.replace(_e,"\r\n")}})).get()}});var Ie=/%20/g,je=/#.*$/,Ne=/([?&])_=[^&]*/,Pe=/^(.*?):[ \t]*([^\r\n]*)$/gm,Oe=/^(?:GET|HEAD)$/,qe=/^\/\//,Le={},ze={},Re="*/".concat("*"),Fe=b.createElement("a");function He(t){return function(e,n){"string"!=typeof e&&(n=e,e="*");var i,o=0,r=e.toLowerCase().match(z)||[];if(v(n))for(;i=r[o++];)"+"===i[0]?(i=i.slice(1)||"*",(t[i]=t[i]||[]).unshift(n)):(t[i]=t[i]||[]).push(n)}}function Me(t,e,n,i){var o={},r=t===ze;function s(a){var l;return o[a]=!0,C.each(t[a]||[],(function(t,a){var c=a(e,n,i);return"string"!=typeof c||r||o[c]?r?!(l=c):void 0:(e.dataTypes.unshift(c),s(c),!1)})),l}return s(e.dataTypes[0])||!o["*"]&&s("*")}function Ue(t,e){var n,i,o=C.ajaxSettings.flatOptions||{};for(n in e)void 0!==e[n]&&((o[n]?t:i||(i={}))[n]=e[n]);return i&&C.extend(!0,t,i),t}Fe.href=$e.href,C.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:$e.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test($e.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Re,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":C.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(t,e){return e?Ue(Ue(t,C.ajaxSettings),e):Ue(C.ajaxSettings,t)},ajaxPrefilter:He(Le),ajaxTransport:He(ze),ajax:function(t,e){"object"==typeof t&&(e=t,t=void 0),e=e||{};var i,o,r,s,a,l,c,u,p,d,h=C.ajaxSetup({},e),f=h.context||h,m=h.context&&(f.nodeType||f.jquery)?C(f):C.event,g=C.Deferred(),v=C.Callbacks("once memory"),y=h.statusCode||{},x={},w={},k="canceled",$={readyState:0,getResponseHeader:function(t){var e;if(c){if(!s)for(s={};e=Pe.exec(r);)s[e[1].toLowerCase()+" "]=(s[e[1].toLowerCase()+" "]||[]).concat(e[2]);e=s[t.toLowerCase()+" "]}return null==e?null:e.join(", ")},getAllResponseHeaders:function(){return c?r:null},setRequestHeader:function(t,e){return null==c&&(t=w[t.toLowerCase()]=w[t.toLowerCase()]||t,x[t]=e),this},overrideMimeType:function(t){return null==c&&(h.mimeType=t),this},statusCode:function(t){var e;if(t)if(c)$.always(t[$.status]);else for(e in t)y[e]=[y[e],t[e]];return this},abort:function(t){var e=t||k;return i&&i.abort(e),T(0,e),this}};if(g.promise($),h.url=((t||h.url||$e.href)+"").replace(qe,$e.protocol+"//"),h.type=e.method||e.type||h.method||h.type,h.dataTypes=(h.dataType||"*").toLowerCase().match(z)||[""],null==h.crossDomain){l=b.createElement("a");try{l.href=h.url,l.href=l.href,h.crossDomain=Fe.protocol+"//"+Fe.host!=l.protocol+"//"+l.host}catch(t){h.crossDomain=!0}}if(h.data&&h.processData&&"string"!=typeof h.data&&(h.data=C.param(h.data,h.traditional)),Me(Le,h,e,$),c)return $;for(p in(u=C.event&&h.global)&&0==C.active++&&C.event.trigger("ajaxStart"),h.type=h.type.toUpperCase(),h.hasContent=!Oe.test(h.type),o=h.url.replace(je,""),h.hasContent?h.data&&h.processData&&0===(h.contentType||"").indexOf("application/x-www-form-urlencoded")&&(h.data=h.data.replace(Ie,"+")):(d=h.url.slice(o.length),h.data&&(h.processData||"string"==typeof h.data)&&(o+=(Te.test(o)?"&":"?")+h.data,delete h.data),!1===h.cache&&(o=o.replace(Ne,"$1"),d=(Te.test(o)?"&":"?")+"_="+Ce.guid+++d),h.url=o+d),h.ifModified&&(C.lastModified[o]&&$.setRequestHeader("If-Modified-Since",C.lastModified[o]),C.etag[o]&&$.setRequestHeader("If-None-Match",C.etag[o])),(h.data&&h.hasContent&&!1!==h.contentType||e.contentType)&&$.setRequestHeader("Content-Type",h.contentType),$.setRequestHeader("Accept",h.dataTypes[0]&&h.accepts[h.dataTypes[0]]?h.accepts[h.dataTypes[0]]+("*"!==h.dataTypes[0]?", "+Re+"; q=0.01":""):h.accepts["*"]),h.headers)$.setRequestHeader(p,h.headers[p]);if(h.beforeSend&&(!1===h.beforeSend.call(f,$,h)||c))return $.abort();if(k="abort",v.add(h.complete),$.done(h.success),$.fail(h.error),i=Me(ze,h,e,$)){if($.readyState=1,u&&m.trigger("ajaxSend",[$,h]),c)return $;h.async&&h.timeout>0&&(a=n.setTimeout((function(){$.abort("timeout")}),h.timeout));try{c=!1,i.send(x,T)}catch(t){if(c)throw t;T(-1,t)}}else T(-1,"No Transport");function T(t,e,s,l){var p,d,b,x,w,k=e;c||(c=!0,a&&n.clearTimeout(a),i=void 0,r=l||"",$.readyState=t>0?4:0,p=t>=200&&t<300||304===t,s&&(x=function(t,e,n){for(var i,o,r,s,a=t.contents,l=t.dataTypes;"*"===l[0];)l.shift(),void 0===i&&(i=t.mimeType||e.getResponseHeader("Content-Type"));if(i)for(o in a)if(a[o]&&a[o].test(i)){l.unshift(o);break}if(l[0]in n)r=l[0];else{for(o in n){if(!l[0]||t.converters[o+" "+l[0]]){r=o;break}s||(s=o)}r=r||s}if(r)return r!==l[0]&&l.unshift(r),n[r]}(h,$,s)),!p&&C.inArray("script",h.dataTypes)>-1&&C.inArray("json",h.dataTypes)<0&&(h.converters["text script"]=function(){}),x=function(t,e,n,i){var o,r,s,a,l,c={},u=t.dataTypes.slice();if(u[1])for(s in t.converters)c[s.toLowerCase()]=t.converters[s];for(r=u.shift();r;)if(t.responseFields[r]&&(n[t.responseFields[r]]=e),!l&&i&&t.dataFilter&&(e=t.dataFilter(e,t.dataType)),l=r,r=u.shift())if("*"===r)r=l;else if("*"!==l&&l!==r){if(!(s=c[l+" "+r]||c["* "+r]))for(o in c)if((a=o.split(" "))[1]===r&&(s=c[l+" "+a[0]]||c["* "+a[0]])){!0===s?s=c[o]:!0!==c[o]&&(r=a[0],u.unshift(a[1]));break}if(!0!==s)if(s&&t.throws)e=s(e);else try{e=s(e)}catch(t){return{state:"parsererror",error:s?t:"No conversion from "+l+" to "+r}}}return{state:"success",data:e}}(h,x,$,p),p?(h.ifModified&&((w=$.getResponseHeader("Last-Modified"))&&(C.lastModified[o]=w),(w=$.getResponseHeader("etag"))&&(C.etag[o]=w)),204===t||"HEAD"===h.type?k="nocontent":304===t?k="notmodified":(k=x.state,d=x.data,p=!(b=x.error))):(b=k,!t&&k||(k="error",t<0&&(t=0))),$.status=t,$.statusText=(e||k)+"",p?g.resolveWith(f,[d,k,$]):g.rejectWith(f,[$,k,b]),$.statusCode(y),y=void 0,u&&m.trigger(p?"ajaxSuccess":"ajaxError",[$,h,p?d:b]),v.fireWith(f,[$,k]),u&&(m.trigger("ajaxComplete",[$,h]),--C.active||C.event.trigger("ajaxStop")))}return $},getJSON:function(t,e,n){return C.get(t,e,n,"json")},getScript:function(t,e){return C.get(t,void 0,e,"script")}}),C.each(["get","post"],(function(t,e){C[e]=function(t,n,i,o){return v(n)&&(o=o||i,i=n,n=void 0),C.ajax(C.extend({url:t,type:e,dataType:o,data:n,success:i},C.isPlainObject(t)&&t))}})),C.ajaxPrefilter((function(t){var e;for(e in t.headers)"content-type"===e.toLowerCase()&&(t.contentType=t.headers[e]||"")})),C._evalUrl=function(t,e,n){return C.ajax({url:t,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}},dataFilter:function(t){C.globalEval(t,e,n)}})},C.fn.extend({wrapAll:function(t){var e;return this[0]&&(v(t)&&(t=t.call(this[0])),e=C(t,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&e.insertBefore(this[0]),e.map((function(){for(var t=this;t.firstElementChild;)t=t.firstElementChild;return t})).append(this)),this},wrapInner:function(t){return v(t)?this.each((function(e){C(this).wrapInner(t.call(this,e))})):this.each((function(){var e=C(this),n=e.contents();n.length?n.wrapAll(t):e.append(t)}))},wrap:function(t){var e=v(t);return this.each((function(n){C(this).wrapAll(e?t.call(this,n):t)}))},unwrap:function(t){return this.parent(t).not("body").each((function(){C(this).replaceWith(this.childNodes)})),this}}),C.expr.pseudos.hidden=function(t){return!C.expr.pseudos.visible(t)},C.expr.pseudos.visible=function(t){return!!(t.offsetWidth||t.offsetHeight||t.getClientRects().length)},C.ajaxSettings.xhr=function(){try{return new n.XMLHttpRequest}catch(t){}};var We={0:200,1223:204},Be=C.ajaxSettings.xhr();g.cors=!!Be&&"withCredentials"in Be,g.ajax=Be=!!Be,C.ajaxTransport((function(t){var e,i;if(g.cors||Be&&!t.crossDomain)return{send:function(o,r){var s,a=t.xhr();if(a.open(t.type,t.url,t.async,t.username,t.password),t.xhrFields)for(s in t.xhrFields)a[s]=t.xhrFields[s];for(s in t.mimeType&&a.overrideMimeType&&a.overrideMimeType(t.mimeType),t.crossDomain||o["X-Requested-With"]||(o["X-Requested-With"]="XMLHttpRequest"),o)a.setRequestHeader(s,o[s]);e=function(t){return function(){e&&(e=i=a.onload=a.onerror=a.onabort=a.ontimeout=a.onreadystatechange=null,"abort"===t?a.abort():"error"===t?"number"!=typeof a.status?r(0,"error"):r(a.status,a.statusText):r(We[a.status]||a.status,a.statusText,"text"!==(a.responseType||"text")||"string"!=typeof a.responseText?{binary:a.response}:{text:a.responseText},a.getAllResponseHeaders()))}},a.onload=e(),i=a.onerror=a.ontimeout=e("error"),void 0!==a.onabort?a.onabort=i:a.onreadystatechange=function(){4===a.readyState&&n.setTimeout((function(){e&&i()}))},e=e("abort");try{a.send(t.hasContent&&t.data||null)}catch(t){if(e)throw t}},abort:function(){e&&e()}}})),C.ajaxPrefilter((function(t){t.crossDomain&&(t.contents.script=!1)})),C.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 C.globalEval(t),t}}}),C.ajaxPrefilter("script",(function(t){void 0===t.cache&&(t.cache=!1),t.crossDomain&&(t.type="GET")})),C.ajaxTransport("script",(function(t){var e,n;if(t.crossDomain||t.scriptAttrs)return{send:function(i,o){e=C("<script>").attr(t.scriptAttrs||{}).prop({charset:t.scriptCharset,src:t.url}).on("load error",n=function(t){e.remove(),n=null,t&&o("error"===t.type?404:200,t.type)}),b.head.appendChild(e[0])},abort:function(){n&&n()}}}));var Qe,Ve=[],Ge=/(=)\?(?=&|$)|\?\?/;C.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var t=Ve.pop()||C.expando+"_"+Ce.guid++;return this[t]=!0,t}}),C.ajaxPrefilter("json jsonp",(function(t,e,i){var o,r,s,a=!1!==t.jsonp&&(Ge.test(t.url)?"url":"string"==typeof t.data&&0===(t.contentType||"").indexOf("application/x-www-form-urlencoded")&&Ge.test(t.data)&&"data");if(a||"jsonp"===t.dataTypes[0])return o=t.jsonpCallback=v(t.jsonpCallback)?t.jsonpCallback():t.jsonpCallback,a?t[a]=t[a].replace(Ge,"$1"+o):!1!==t.jsonp&&(t.url+=(Te.test(t.url)?"&":"?")+t.jsonp+"="+o),t.converters["script json"]=function(){return s||C.error(o+" was not called"),s[0]},t.dataTypes[0]="json",r=n[o],n[o]=function(){s=arguments},i.always((function(){void 0===r?C(n).removeProp(o):n[o]=r,t[o]&&(t.jsonpCallback=e.jsonpCallback,Ve.push(o)),s&&v(r)&&r(s[0]),s=r=void 0})),"script"})),g.createHTMLDocument=((Qe=b.implementation.createHTMLDocument("").body).innerHTML="<form></form><form></form>",2===Qe.childNodes.length),C.parseHTML=function(t,e,n){return"string"!=typeof t?[]:("boolean"==typeof e&&(n=e,e=!1),e||(g.createHTMLDocument?((i=(e=b.implementation.createHTMLDocument("")).createElement("base")).href=b.location.href,e.head.appendChild(i)):e=b),r=!n&&[],(o=I.exec(t))?[e.createElement(o[1])]:(o=$t([t],e,r),r&&r.length&&C(r).remove(),C.merge([],o.childNodes)));var i,o,r},C.fn.load=function(t,e,n){var i,o,r,s=this,a=t.indexOf(" ");return a>-1&&(i=ve(t.slice(a)),t=t.slice(0,a)),v(e)?(n=e,e=void 0):e&&"object"==typeof e&&(o="POST"),s.length>0&&C.ajax({url:t,type:o||"GET",dataType:"html",data:e}).done((function(t){r=arguments,s.html(i?C("<div>").append(C.parseHTML(t)).find(i):t)})).always(n&&function(t,e){s.each((function(){n.apply(this,r||[t.responseText,e,t])}))}),this},C.expr.pseudos.animated=function(t){return C.grep(C.timers,(function(e){return t===e.elem})).length},C.offset={setOffset:function(t,e,n){var i,o,r,s,a,l,c=C.css(t,"position"),u=C(t),p={};"static"===c&&(t.style.position="relative"),a=u.offset(),r=C.css(t,"top"),l=C.css(t,"left"),("absolute"===c||"fixed"===c)&&(r+l).indexOf("auto")>-1?(s=(i=u.position()).top,o=i.left):(s=parseFloat(r)||0,o=parseFloat(l)||0),v(e)&&(e=e.call(t,n,C.extend({},a))),null!=e.top&&(p.top=e.top-a.top+s),null!=e.left&&(p.left=e.left-a.left+o),"using"in e?e.using.call(t,p):u.css(p)}},C.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each((function(e){C.offset.setOffset(this,t,e)}));var e,n,i=this[0];return i?i.getClientRects().length?(e=i.getBoundingClientRect(),n=i.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var t,e,n,i=this[0],o={top:0,left:0};if("fixed"===C.css(i,"position"))e=i.getBoundingClientRect();else{for(e=this.offset(),n=i.ownerDocument,t=i.offsetParent||n.documentElement;t&&(t===n.body||t===n.documentElement)&&"static"===C.css(t,"position");)t=t.parentNode;t&&t!==i&&1===t.nodeType&&((o=C(t).offset()).top+=C.css(t,"borderTopWidth",!0),o.left+=C.css(t,"borderLeftWidth",!0))}return{top:e.top-o.top-C.css(i,"marginTop",!0),left:e.left-o.left-C.css(i,"marginLeft",!0)}}},offsetParent:function(){return this.map((function(){for(var t=this.offsetParent;t&&"static"===C.css(t,"position");)t=t.offsetParent;return t||st}))}}),C.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},(function(t,e){var n="pageYOffset"===e;C.fn[t]=function(i){return B(this,(function(t,i,o){var r;if(y(t)?r=t:9===t.nodeType&&(r=t.defaultView),void 0===o)return r?r[e]:t[i];r?r.scrollTo(n?r.pageXOffset:o,n?o:r.pageYOffset):t[i]=o}),t,i,arguments.length)}})),C.each(["top","left"],(function(t,e){C.cssHooks[e]=Bt(g.pixelPosition,(function(t,n){if(n)return n=Wt(t,e),Ft.test(n)?C(t).position()[e]+"px":n}))})),C.each({Height:"height",Width:"width"},(function(t,e){C.each({padding:"inner"+t,content:e,"":"outer"+t},(function(n,i){C.fn[i]=function(o,r){var s=arguments.length&&(n||"boolean"!=typeof o),a=n||(!0===o||!0===r?"margin":"border");return B(this,(function(e,n,o){var r;return y(e)?0===i.indexOf("outer")?e["inner"+t]:e.document.documentElement["client"+t]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+t],r["scroll"+t],e.body["offset"+t],r["offset"+t],r["client"+t])):void 0===o?C.css(e,n,a):C.style(e,n,o,a)}),e,s?o:void 0,s)}}))})),C.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],(function(t,e){C.fn[e]=function(t){return this.on(e,t)}})),C.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)},hover:function(t,e){return this.mouseenter(t).mouseleave(e||t)}}),C.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),(function(t,e){C.fn[e]=function(t,n){return arguments.length>0?this.on(e,null,t,n):this.trigger(e)}}));var Xe=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;C.proxy=function(t,e){var n,i,o;if("string"==typeof e&&(n=t[e],e=t,t=n),v(t))return i=a.call(arguments,2),o=function(){return t.apply(e||this,i.concat(a.call(arguments)))},o.guid=t.guid=t.guid||C.guid++,o},C.holdReady=function(t){t?C.readyWait++:C.ready(!0)},C.isArray=Array.isArray,C.parseJSON=JSON.parse,C.nodeName=D,C.isFunction=v,C.isWindow=y,C.camelCase=X,C.type=k,C.now=Date.now,C.isNumeric=function(t){var e=C.type(t);return("number"===e||"string"===e)&&!isNaN(t-parseFloat(t))},C.trim=function(t){return null==t?"":(t+"").replace(Xe,"")},void 0===(i=function(){return C}.apply(e,[]))||(t.exports=i);var Je=n.jQuery,Ke=n.$;return C.noConflict=function(t){return n.$===C&&(n.$=Ke),t&&n.jQuery===C&&(n.jQuery=Je),C},void 0===o&&(n.jQuery=n.$=C),C}))},function(t,e,n){(function(t,i){var o;!function(r){e&&e.nodeType,t&&t.nodeType;var s="object"==typeof i&&i;s.global!==s&&s.window!==s&&s.self;var a,l=2147483647,c=36,u=1,p=26,d=38,h=700,f=72,m=128,g="-",v=/^xn--/,y=/[^\x20-\x7E]/,b=/[\x2E\u3002\uFF0E\uFF61]/g,x={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},w=c-u,k=Math.floor,$=String.fromCharCode;function C(t){throw new RangeError(x[t])}function T(t,e){for(var n=t.length,i=[];n--;)i[n]=e(t[n]);return i}function S(t,e){var n=t.split("@"),i="";return n.length>1&&(i=n[0]+"@",t=n[1]),i+T((t=t.replace(b,".")).split("."),e).join(".")}function _(t){for(var e,n,i=[],o=0,r=t.length;o<r;)(e=t.charCodeAt(o++))>=55296&&e<=56319&&o<r?56320==(64512&(n=t.charCodeAt(o++)))?i.push(((1023&e)<<10)+(1023&n)+65536):(i.push(e),o--):i.push(e);return i}function E(t){return T(t,(function(t){var e="";return t>65535&&(e+=$((t-=65536)>>>10&1023|55296),t=56320|1023&t),e+=$(t)})).join("")}function A(t,e){return t+22+75*(t<26)-((0!=e)<<5)}function D(t,e,n){var i=0;for(t=n?k(t/h):t>>1,t+=k(t/e);t>w*p>>1;i+=c)t=k(t/w);return k(i+(w+1)*t/(t+d))}function I(t){var e,n,i,o,r,s,a,d,h,v,y,b=[],x=t.length,w=0,$=m,T=f;for((n=t.lastIndexOf(g))<0&&(n=0),i=0;i<n;++i)t.charCodeAt(i)>=128&&C("not-basic"),b.push(t.charCodeAt(i));for(o=n>0?n+1:0;o<x;){for(r=w,s=1,a=c;o>=x&&C("invalid-input"),((d=(y=t.charCodeAt(o++))-48<10?y-22:y-65<26?y-65:y-97<26?y-97:c)>=c||d>k((l-w)/s))&&C("overflow"),w+=d*s,!(d<(h=a<=T?u:a>=T+p?p:a-T));a+=c)s>k(l/(v=c-h))&&C("overflow"),s*=v;T=D(w-r,e=b.length+1,0==r),k(w/e)>l-$&&C("overflow"),$+=k(w/e),w%=e,b.splice(w++,0,$)}return E(b)}function j(t){var e,n,i,o,r,s,a,d,h,v,y,b,x,w,T,S=[];for(b=(t=_(t)).length,e=m,n=0,r=f,s=0;s<b;++s)(y=t[s])<128&&S.push($(y));for(i=o=S.length,o&&S.push(g);i<b;){for(a=l,s=0;s<b;++s)(y=t[s])>=e&&y<a&&(a=y);for(a-e>k((l-n)/(x=i+1))&&C("overflow"),n+=(a-e)*x,e=a,s=0;s<b;++s)if((y=t[s])<e&&++n>l&&C("overflow"),y==e){for(d=n,h=c;!(d<(v=h<=r?u:h>=r+p?p:h-r));h+=c)T=d-v,w=c-v,S.push($(A(v+T%w,0))),d=k(T/w);S.push($(A(d,0))),r=D(n,x,i==o),n=0,++i}++n,++e}return S.join("")}a={version:"1.3.2",ucs2:{decode:_,encode:E},decode:I,encode:j,toASCII:function(t){return S(t,(function(t){return y.test(t)?"xn--"+j(t):t}))},toUnicode:function(t){return S(t,(function(t){return v.test(t)?I(t.slice(4).toLowerCase()):t}))}},void 0===(o=function(){return a}.call(e,n,e,t))||(t.exports=o)}()}).call(this,n(10)(t),n(11))},function(t,e,n){var i,o;!function(r,s){"use strict";t.exports?t.exports=s():void 0===(o="function"==typeof(i=s)?i.call(e,n,e,t):i)||(t.exports=o)}(0,(function(t){"use strict";var e=t&&t.IPv6;return{best:function(t){var e,n,i=t.toLowerCase().split(":"),o=i.length,r=8;for(""===i[0]&&""===i[1]&&""===i[2]?(i.shift(),i.shift()):""===i[0]&&""===i[1]?i.shift():""===i[o-1]&&""===i[o-2]&&i.pop(),-1!==i[(o=i.length)-1].indexOf(".")&&(r=7),e=0;e<o&&""!==i[e];e++);if(e<r)for(i.splice(e,1,"0000");i.length<r;)i.splice(e,0,"0000");for(var s=0;s<r;s++){n=i[s].split("");for(var a=0;a<3&&("0"===n[0]&&n.length>1);a++)n.splice(0,1);i[s]=n.join("")}var l=-1,c=0,u=0,p=-1,d=!1;for(s=0;s<r;s++)d?"0"===i[s]?u+=1:(d=!1,u>c&&(l=p,c=u)):"0"===i[s]&&(d=!0,p=s,u=1);u>c&&(l=p,c=u),c>1&&i.splice(l,c,""),o=i.length;var h="";for(""===i[0]&&(h=":"),s=0;s<o&&(h+=i[s],s!==o-1);s++)h+=":";return""===i[o-1]&&(h+=":"),h},noConflict:function(){return t.IPv6===this&&(t.IPv6=e),this}}}))},function(t,e,n){var i,o;!function(r,s){"use strict";t.exports?t.exports=s():void 0===(o="function"==typeof(i=s)?i.call(e,n,e,t):i)||(t.exports=o)}(0,(function(t){"use strict";var e=t&&t.SecondLevelDomains,n={list:{ac:" com gov mil net org ",ae:" ac co gov mil name net org pro sch ",af:" com edu gov net org ",al:" com edu gov mil net org ",ao:" co ed gv it og pb ",ar:" com edu gob gov int mil net org tur ",at:" ac co gv or ",au:" asn com csiro edu gov id net org ",ba:" co com edu gov mil net org rs unbi unmo unsa untz unze ",bb:" biz co com edu gov info net org store tv ",bh:" biz cc com edu gov info net org ",bn:" com edu gov net org ",bo:" com edu gob gov int mil net org tv ",br:" adm adv agr am arq art ato b bio blog bmd cim cng cnt com coop ecn edu eng esp etc eti far flog fm fnd fot fst g12 ggf gov imb ind inf jor jus lel mat med mil mus net nom not ntr odo org ppg pro psc psi qsl rec slg srv tmp trd tur tv vet vlog wiki zlg ",bs:" com edu gov net org ",bz:" du et om ov rg ",ca:" ab bc mb nb nf nl ns nt nu on pe qc sk yk ",ck:" biz co edu gen gov info net org ",cn:" ac ah bj com cq edu fj gd gov gs gx gz ha hb he hi hl hn jl js jx ln mil net nm nx org qh sc sd sh sn sx tj tw xj xz yn zj ",co:" com edu gov mil net nom org ",cr:" ac c co ed fi go or sa ",cy:" ac biz com ekloges gov ltd name net org parliament press pro tm ",do:" art com edu gob gov mil net org sld web ",dz:" art asso com edu gov net org pol ",ec:" com edu fin gov info med mil net org pro ",eg:" com edu eun gov mil name net org sci ",er:" com edu gov ind mil net org rochest w ",es:" com edu gob nom org ",et:" biz com edu gov info name net org ",fj:" ac biz com info mil name net org pro ",fk:" ac co gov net nom org ",fr:" asso com f gouv nom prd presse tm ",gg:" co net org ",gh:" com edu gov mil org ",gn:" ac com gov net org ",gr:" com edu gov mil net org ",gt:" com edu gob ind mil net org ",gu:" com edu gov net org ",hk:" com edu gov idv net org ",hu:" 2000 agrar bolt casino city co erotica erotika film forum games hotel info ingatlan jogasz konyvelo lakas media news org priv reklam sex shop sport suli szex tm tozsde utazas video ",id:" ac co go mil net or sch web ",il:" ac co gov idf k12 muni net org ",in:" ac co edu ernet firm gen gov i ind mil net nic org res ",iq:" com edu gov i mil net org ",ir:" ac co dnssec gov i id net org sch ",it:" edu gov ",je:" co net org ",jo:" com edu gov mil name net org sch ",jp:" ac ad co ed go gr lg ne or ",ke:" ac co go info me mobi ne or sc ",kh:" com edu gov mil net org per ",ki:" biz com de edu gov info mob net org tel ",km:" asso com coop edu gouv k medecin mil nom notaires pharmaciens presse tm veterinaire ",kn:" edu gov net org ",kr:" ac busan chungbuk chungnam co daegu daejeon es gangwon go gwangju gyeongbuk gyeonggi gyeongnam hs incheon jeju jeonbuk jeonnam k kg mil ms ne or pe re sc seoul ulsan ",kw:" com edu gov net org ",ky:" com edu gov net org ",kz:" com edu gov mil net org ",lb:" com edu gov net org ",lk:" assn com edu gov grp hotel int ltd net ngo org sch soc web ",lr:" com edu gov net org ",lv:" asn com conf edu gov id mil net org ",ly:" com edu gov id med net org plc sch ",ma:" ac co gov m net org press ",mc:" asso tm ",me:" ac co edu gov its net org priv ",mg:" com edu gov mil nom org prd tm ",mk:" com edu gov inf name net org pro ",ml:" com edu gov net org presse ",mn:" edu gov org ",mo:" com edu gov net org ",mt:" com edu gov net org ",mv:" aero biz com coop edu gov info int mil museum name net org pro ",mw:" ac co com coop edu gov int museum net org ",mx:" com edu gob net org ",my:" com edu gov mil name net org sch ",nf:" arts com firm info net other per rec store web ",ng:" biz com edu gov mil mobi name net org sch ",ni:" ac co com edu gob mil net nom org ",np:" com edu gov mil net org ",nr:" biz com edu gov info net org ",om:" ac biz co com edu gov med mil museum net org pro sch ",pe:" com edu gob mil net nom org sld ",ph:" com edu gov i mil net ngo org ",pk:" biz com edu fam gob gok gon gop gos gov net org web ",pl:" art bialystok biz com edu gda gdansk gorzow gov info katowice krakow lodz lublin mil net ngo olsztyn org poznan pwr radom slupsk szczecin torun warszawa waw wroc wroclaw zgora ",pr:" ac biz com edu est gov info isla name net org pro prof ",ps:" com edu gov net org plo sec ",pw:" belau co ed go ne or ",ro:" arts com firm info nom nt org rec store tm www ",rs:" ac co edu gov in org ",sb:" com edu gov net org ",sc:" com edu gov net org ",sh:" co com edu gov net nom org ",sl:" com edu gov net org ",st:" co com consulado edu embaixada gov mil net org principe saotome store ",sv:" com edu gob org red ",sz:" ac co org ",tr:" av bbs bel biz com dr edu gen gov info k12 name net org pol tel tsk tv web ",tt:" aero biz cat co com coop edu gov info int jobs mil mobi museum name net org pro tel travel ",tw:" club com ebiz edu game gov idv mil net org ",mu:" ac co com gov net or org ",mz:" ac co edu gov org ",na:" co com ",nz:" ac co cri geek gen govt health iwi maori mil net org parliament school ",pa:" abo ac com edu gob ing med net nom org sld ",pt:" com edu gov int net nome org publ ",py:" com edu gov mil net org ",qa:" com edu gov mil net org ",re:" asso com nom ",ru:" ac adygeya altai amur arkhangelsk astrakhan bashkiria belgorod bir bryansk buryatia cbg chel chelyabinsk chita chukotka chuvashia com dagestan e-burg edu gov grozny int irkutsk ivanovo izhevsk jar joshkar-ola kalmykia kaluga kamchatka karelia kazan kchr kemerovo khabarovsk khakassia khv kirov koenig komi kostroma kranoyarsk kuban kurgan kursk lipetsk magadan mari mari-el marine mil mordovia mosreg msk murmansk nalchik net nnov nov novosibirsk nsk omsk orenburg org oryol penza perm pp pskov ptz rnd ryazan sakhalin samara saratov simbirsk smolensk spb stavropol stv surgut tambov tatarstan tom tomsk tsaritsyn tsk tula tuva tver tyumen udm udmurtia ulan-ude vladikavkaz vladimir vladivostok volgograd vologda voronezh vrn vyatka yakutia yamal yekaterinburg yuzhno-sakhalinsk ",rw:" ac co com edu gouv gov int mil net ",sa:" com edu gov med net org pub sch ",sd:" com edu gov info med net org tv ",se:" a ac b bd c d e f g h i k l m n o org p parti pp press r s t tm u w x y z ",sg:" com edu gov idn net org per ",sn:" art com edu gouv org perso univ ",sy:" com edu gov mil net news org ",th:" ac co go in mi net or ",tj:" ac biz co com edu go gov info int mil name net nic org test web ",tn:" agrinet com defense edunet ens fin gov ind info intl mincom nat net org perso rnrt rns rnu tourism ",tz:" ac co go ne or ",ua:" biz cherkassy chernigov chernovtsy ck cn co com crimea cv dn dnepropetrovsk donetsk dp edu gov if in ivano-frankivsk kh kharkov kherson khmelnitskiy kiev kirovograd km kr ks kv lg lugansk lutsk lviv me mk net nikolaev od odessa org pl poltava pp rovno rv sebastopol sumy te ternopil uzhgorod vinnica vn zaporizhzhe zhitomir zp zt ",ug:" ac co go ne or org sc ",uk:" ac bl british-library co cym gov govt icnet jet lea ltd me mil mod national-library-scotland nel net nhs nic nls org orgn parliament plc police sch scot soc ",us:" dni fed isa kids nsn ",uy:" com edu gub mil net org ",ve:" co com edu gob info mil net org web ",vi:" co com k12 net org ",vn:" ac biz com edu gov health info int name net org pro ",ye:" co com gov ltd me net org plc ",yu:" ac co edu gov org ",za:" ac agric alt bourse city co cybernet db edu gov grondar iaccess imt inca landesign law mil net ngo nis nom olivetti org pix school tm web ",zm:" ac co com edu gov net org sch ",com:"ar br cn de eu gb gr hu jpn kr no qc ru sa se uk us uy za ",net:"gb jp se uk ",org:"ae",de:"com "},has:function(t){var e=t.lastIndexOf(".");if(e<=0||e>=t.length-1)return!1;var i=t.lastIndexOf(".",e-1);if(i<=0||i>=e-1)return!1;var o=n.list[t.slice(e+1)];return!!o&&o.indexOf(" "+t.slice(i+1,e)+" ")>=0},is:function(t){var e=t.lastIndexOf(".");if(e<=0||e>=t.length-1)return!1;if(t.lastIndexOf(".",e-1)>=0)return!1;var i=n.list[t.slice(e+1)];return!!i&&i.indexOf(" "+t.slice(0,e)+" ")>=0},get:function(t){var e=t.lastIndexOf(".");if(e<=0||e>=t.length-1)return null;var i=t.lastIndexOf(".",e-1);if(i<=0||i>=e-1)return null;var o=n.list[t.slice(e+1)];return o?o.indexOf(" "+t.slice(i+1,e)+" ")<0?null:t.slice(i+1):null},noConflict:function(){return t.SecondLevelDomains===this&&(t.SecondLevelDomains=e),this}};return n}))},function(t,e,n){var i,o,r;!function(s,a){"use strict";t.exports?t.exports=a(n(1),n(2),n(3)):(o=[n(1),n(2),n(3)],void 0===(r="function"==typeof(i=a)?i.apply(e,o):i)||(t.exports=r))}(0,(function(t,e,n,i){"use strict";var o=i&&i.URI;function r(t,e){var n=arguments.length>=1;if(!(this instanceof r))return n?arguments.length>=2?new r(t,e):new r(t):new r;if(void 0===t){if(n)throw new TypeError("undefined is not a valid argument for URI");t="undefined"!=typeof location?location.href+"":""}if(null===t&&n)throw new TypeError("null is not a valid argument for URI");return this.href(t),void 0!==e?this.absoluteTo(e):this}r.version="1.19.10";var s=r.prototype,a=Object.prototype.hasOwnProperty;function l(t){return t.replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")}function c(t){return void 0===t?"Undefined":String(Object.prototype.toString.call(t)).slice(8,-1)}function u(t){return"Array"===c(t)}function p(t,e){var n,i,o={};if("RegExp"===c(e))o=null;else if(u(e))for(n=0,i=e.length;n<i;n++)o[e[n]]=!0;else o[e]=!0;for(n=0,i=t.length;n<i;n++){(o&&void 0!==o[t[n]]||!o&&e.test(t[n]))&&(t.splice(n,1),i--,n--)}return t}function d(t,e){var n,i;if(u(e)){for(n=0,i=e.length;n<i;n++)if(!d(t,e[n]))return!1;return!0}var o=c(e);for(n=0,i=t.length;n<i;n++)if("RegExp"===o){if("string"==typeof t[n]&&t[n].match(e))return!0}else if(t[n]===e)return!0;return!1}function h(t,e){if(!u(t)||!u(e))return!1;if(t.length!==e.length)return!1;t.sort(),e.sort();for(var n=0,i=t.length;n<i;n++)if(t[n]!==e[n])return!1;return!0}function f(t){return t.replace(/^\/+|\/+$/g,"")}function m(t){return escape(t)}function g(t){return encodeURIComponent(t).replace(/[!'()*]/g,m).replace(/\*/g,"%2A")}r._parts=function(){return{protocol:null,username:null,password:null,hostname:null,urn:null,port:null,path:null,query:null,fragment:null,preventInvalidHostname:r.preventInvalidHostname,duplicateQueryParameters:r.duplicateQueryParameters,escapeQuerySpace:r.escapeQuerySpace}},r.preventInvalidHostname=!1,r.duplicateQueryParameters=!1,r.escapeQuerySpace=!0,r.protocol_expression=/^[a-z][a-z0-9.+-]*$/i,r.idn_expression=/[^a-z0-9\._-]/i,r.punycode_expression=/(xn--)/i,r.ip4_expression=/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/,r.ip6_expression=/^\s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$/,r.find_uri_expression=/\b((?:[a-z][\w-]+:(?:\/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?«»“”‘’]))/gi,r.findUri={start:/\b(?:([a-z][a-z0-9.+-]*:\/\/)|www\.)/gi,end:/[\s\r\n]|$/,trim:/[`!()\[\]{};:'".,<>?«»“”„‘’]+$/,parens:/(\([^\)]*\)|\[[^\]]*\]|\{[^}]*\}|<[^>]*>)/g},r.leading_whitespace_expression=/^[\x00-\x20\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/,r.defaultPorts={http:"80",https:"443",ftp:"21",gopher:"70",ws:"80",wss:"443"},r.hostProtocols=["http","https"],r.invalid_hostname_characters=/[^a-zA-Z0-9\.\-:_]/,r.domAttributes={a:"href",blockquote:"cite",link:"href",base:"href",script:"src",form:"action",img:"src",area:"href",iframe:"src",embed:"src",source:"src",track:"src",input:"src",audio:"src",video:"src"},r.getDomAttribute=function(t){if(t&&t.nodeName){var e=t.nodeName.toLowerCase();if("input"!==e||"image"===t.type)return r.domAttributes[e]}},r.encode=g,r.decode=decodeURIComponent,r.iso8859=function(){r.encode=escape,r.decode=unescape},r.unicode=function(){r.encode=g,r.decode=decodeURIComponent},r.characters={pathname:{encode:{expression:/%(24|26|2B|2C|3B|3D|3A|40)/gi,map:{"%24":"$","%26":"&","%2B":"+","%2C":",","%3B":";","%3D":"=","%3A":":","%40":"@"}},decode:{expression:/[\/\?#]/g,map:{"/":"%2F","?":"%3F","#":"%23"}}},reserved:{encode:{expression:/%(21|23|24|26|27|28|29|2A|2B|2C|2F|3A|3B|3D|3F|40|5B|5D)/gi,map:{"%3A":":","%2F":"/","%3F":"?","%23":"#","%5B":"[","%5D":"]","%40":"@","%21":"!","%24":"$","%26":"&","%27":"'","%28":"(","%29":")","%2A":"*","%2B":"+","%2C":",","%3B":";","%3D":"="}}},urnpath:{encode:{expression:/%(21|24|27|28|29|2A|2B|2C|3B|3D|40)/gi,map:{"%21":"!","%24":"$","%27":"'","%28":"(","%29":")","%2A":"*","%2B":"+","%2C":",","%3B":";","%3D":"=","%40":"@"}},decode:{expression:/[\/\?#:]/g,map:{"/":"%2F","?":"%3F","#":"%23",":":"%3A"}}}},r.encodeQuery=function(t,e){var n=r.encode(t+"");return void 0===e&&(e=r.escapeQuerySpace),e?n.replace(/%20/g,"+"):n},r.decodeQuery=function(t,e){t+="",void 0===e&&(e=r.escapeQuerySpace);try{return r.decode(e?t.replace(/\+/g,"%20"):t)}catch(e){return t}};var v,y={encode:"encode",decode:"decode"},b=function(t,e){return function(n){try{return r[e](n+"").replace(r.characters[t][e].expression,(function(n){return r.characters[t][e].map[n]}))}catch(t){return n}}};for(v in y)r[v+"PathSegment"]=b("pathname",y[v]),r[v+"UrnPathSegment"]=b("urnpath",y[v]);var x=function(t,e,n){return function(i){var o;o=n?function(t){return r[e](r[n](t))}:r[e];for(var s=(i+"").split(t),a=0,l=s.length;a<l;a++)s[a]=o(s[a]);return s.join(t)}};function w(t){return function(e,n){return void 0===e?this._parts[t]||"":(this._parts[t]=e||null,this.build(!n),this)}}function k(t,e){return function(n,i){return void 0===n?this._parts[t]||"":(null!==n&&(n+="").charAt(0)===e&&(n=n.substring(1)),this._parts[t]=n,this.build(!i),this)}}r.decodePath=x("/","decodePathSegment"),r.decodeUrnPath=x(":","decodeUrnPathSegment"),r.recodePath=x("/","encodePathSegment","decode"),r.recodeUrnPath=x(":","encodeUrnPathSegment","decode"),r.encodeReserved=b("reserved","encode"),r.parse=function(t,e){var n;return e||(e={preventInvalidHostname:r.preventInvalidHostname}),(n=(t=t.replace(r.leading_whitespace_expression,"")).indexOf("#"))>-1&&(e.fragment=t.substring(n+1)||null,t=t.substring(0,n)),(n=t.indexOf("?"))>-1&&(e.query=t.substring(n+1)||null,t=t.substring(0,n)),"//"===(t=t.replace(/^(https?|ftp|wss?)?:+[/\\]*/i,"$1://")).substring(0,2)?(e.protocol=null,t=t.substring(2),t=r.parseAuthority(t,e)):(n=t.indexOf(":"))>-1&&(e.protocol=t.substring(0,n)||null,e.protocol&&!e.protocol.match(r.protocol_expression)?e.protocol=void 0:"//"===t.substring(n+1,n+3).replace(/\\/g,"/")?(t=t.substring(n+3),t=r.parseAuthority(t,e)):(t=t.substring(n+1),e.urn=!0)),e.path=t,e},r.parseHost=function(t,e){t||(t="");var n,i,o=(t=t.replace(/\\/g,"/")).indexOf("/");if(-1===o&&(o=t.length),"["===t.charAt(0))n=t.indexOf("]"),e.hostname=t.substring(1,n)||null,e.port=t.substring(n+2,o)||null,"/"===e.port&&(e.port=null);else{var s=t.indexOf(":"),a=t.indexOf("/"),l=t.indexOf(":",s+1);-1!==l&&(-1===a||l<a)?(e.hostname=t.substring(0,o)||null,e.port=null):(i=t.substring(0,o).split(":"),e.hostname=i[0]||null,e.port=i[1]||null)}return e.hostname&&"/"!==t.substring(o).charAt(0)&&(o++,t="/"+t),e.preventInvalidHostname&&r.ensureValidHostname(e.hostname,e.protocol),e.port&&r.ensureValidPort(e.port),t.substring(o)||"/"},r.parseAuthority=function(t,e){return t=r.parseUserinfo(t,e),r.parseHost(t,e)},r.parseUserinfo=function(t,e){var n=t;-1!==t.indexOf("\\")&&(t=t.replace(/\\/g,"/"));var i,o=t.indexOf("/"),s=t.lastIndexOf("@",o>-1?o:t.length-1);return s>-1&&(-1===o||s<o)?(i=t.substring(0,s).split(":"),e.username=i[0]?r.decode(i[0]):null,i.shift(),e.password=i[0]?r.decode(i.join(":")):null,t=n.substring(s+1)):(e.username=null,e.password=null),t},r.parseQuery=function(t,e){if(!t)return{};if(!(t=t.replace(/&+/g,"&").replace(/^\?*&*|&+$/g,"")))return{};for(var n,i,o,s={},l=t.split("&"),c=l.length,u=0;u<c;u++)n=l[u].split("="),i=r.decodeQuery(n.shift(),e),o=n.length?r.decodeQuery(n.join("="),e):null,"__proto__"!==i&&(a.call(s,i)?("string"!=typeof s[i]&&null!==s[i]||(s[i]=[s[i]]),s[i].push(o)):s[i]=o);return s},r.build=function(t){var e="",n=!1;return t.protocol&&(e+=t.protocol+":"),t.urn||!e&&!t.hostname||(e+="//",n=!0),e+=r.buildAuthority(t)||"","string"==typeof t.path&&("/"!==t.path.charAt(0)&&n&&(e+="/"),e+=t.path),"string"==typeof t.query&&t.query&&(e+="?"+t.query),"string"==typeof t.fragment&&t.fragment&&(e+="#"+t.fragment),e},r.buildHost=function(t){var e="";return t.hostname?(r.ip6_expression.test(t.hostname)?e+="["+t.hostname+"]":e+=t.hostname,t.port&&(e+=":"+t.port),e):""},r.buildAuthority=function(t){return r.buildUserinfo(t)+r.buildHost(t)},r.buildUserinfo=function(t){var e="";return t.username&&(e+=r.encode(t.username)),t.password&&(e+=":"+r.encode(t.password)),e&&(e+="@"),e},r.buildQuery=function(t,e,n){var i,o,s,l,c="";for(o in t)if("__proto__"!==o&&a.call(t,o))if(u(t[o]))for(i={},s=0,l=t[o].length;s<l;s++)void 0!==t[o][s]&&void 0===i[t[o][s]+""]&&(c+="&"+r.buildQueryParameter(o,t[o][s],n),!0!==e&&(i[t[o][s]+""]=!0));else void 0!==t[o]&&(c+="&"+r.buildQueryParameter(o,t[o],n));return c.substring(1)},r.buildQueryParameter=function(t,e,n){return r.encodeQuery(t,n)+(null!==e?"="+r.encodeQuery(e,n):"")},r.addQuery=function(t,e,n){if("object"==typeof e)for(var i in e)a.call(e,i)&&r.addQuery(t,i,e[i]);else{if("string"!=typeof e)throw new TypeError("URI.addQuery() accepts an object, string as the name parameter");if(void 0===t[e])return void(t[e]=n);"string"==typeof t[e]&&(t[e]=[t[e]]),u(n)||(n=[n]),t[e]=(t[e]||[]).concat(n)}},r.setQuery=function(t,e,n){if("object"==typeof e)for(var i in e)a.call(e,i)&&r.setQuery(t,i,e[i]);else{if("string"!=typeof e)throw new TypeError("URI.setQuery() accepts an object, string as the name parameter");t[e]=void 0===n?null:n}},r.removeQuery=function(t,e,n){var i,o,s;if(u(e))for(i=0,o=e.length;i<o;i++)t[e[i]]=void 0;else if("RegExp"===c(e))for(s in t)e.test(s)&&(t[s]=void 0);else if("object"==typeof e)for(s in e)a.call(e,s)&&r.removeQuery(t,s,e[s]);else{if("string"!=typeof e)throw new TypeError("URI.removeQuery() accepts an object, string, RegExp as the first parameter");void 0!==n?"RegExp"===c(n)?!u(t[e])&&n.test(t[e])?t[e]=void 0:t[e]=p(t[e],n):t[e]!==String(n)||u(n)&&1!==n.length?u(t[e])&&(t[e]=p(t[e],n)):t[e]=void 0:t[e]=void 0}},r.hasQuery=function(t,e,n,i){switch(c(e)){case"String":break;case"RegExp":for(var o in t)if(a.call(t,o)&&e.test(o)&&(void 0===n||r.hasQuery(t,o,n)))return!0;return!1;case"Object":for(var s in e)if(a.call(e,s)&&!r.hasQuery(t,s,e[s]))return!1;return!0;default:throw new TypeError("URI.hasQuery() accepts a string, regular expression or object as the name parameter")}switch(c(n)){case"Undefined":return e in t;case"Boolean":return n===Boolean(u(t[e])?t[e].length:t[e]);case"Function":return!!n(t[e],e,t);case"Array":return!!u(t[e])&&(i?d:h)(t[e],n);case"RegExp":return u(t[e])?!!i&&d(t[e],n):Boolean(t[e]&&t[e].match(n));case"Number":n=String(n);case"String":return u(t[e])?!!i&&d(t[e],n):t[e]===n;default:throw new TypeError("URI.hasQuery() accepts undefined, boolean, string, number, RegExp, Function as the value parameter")}},r.joinPaths=function(){for(var t=[],e=[],n=0,i=0;i<arguments.length;i++){var o=new r(arguments[i]);t.push(o);for(var s=o.segment(),a=0;a<s.length;a++)"string"==typeof s[a]&&e.push(s[a]),s[a]&&n++}if(!e.length||!n)return new r("");var l=new r("").segment(e);return""!==t[0].path()&&"/"!==t[0].path().slice(0,1)||l.path("/"+l.path()),l.normalize()},r.commonPath=function(t,e){var n,i=Math.min(t.length,e.length);for(n=0;n<i;n++)if(t.charAt(n)!==e.charAt(n)){n--;break}return n<1?t.charAt(0)===e.charAt(0)&&"/"===t.charAt(0)?"/":"":("/"===t.charAt(n)&&"/"===e.charAt(n)||(n=t.substring(0,n).lastIndexOf("/")),t.substring(0,n+1))},r.withinString=function(t,e,n){n||(n={});var i=n.start||r.findUri.start,o=n.end||r.findUri.end,s=n.trim||r.findUri.trim,a=n.parens||r.findUri.parens,l=/[a-z0-9-]=["']?$/i;for(i.lastIndex=0;;){var c=i.exec(t);if(!c)break;var u=c.index;if(n.ignoreHtml){var p=t.slice(Math.max(u-3,0),u);if(p&&l.test(p))continue}for(var d=u+t.slice(u).search(o),h=t.slice(u,d),f=-1;;){var m=a.exec(h);if(!m)break;var g=m.index+m[0].length;f=Math.max(f,g)}if(!((h=f>-1?h.slice(0,f)+h.slice(f).replace(s,""):h.replace(s,"")).length<=c[0].length||n.ignore&&n.ignore.test(h))){var v=e(h,u,d=u+h.length,t);void 0!==v?(v=String(v),t=t.slice(0,u)+v+t.slice(d),i.lastIndex=u+v.length):i.lastIndex=d}}return i.lastIndex=0,t},r.ensureValidHostname=function(e,n){var i=!!e,o=!1;if(!!n&&(o=d(r.hostProtocols,n)),o&&!i)throw new TypeError("Hostname cannot be empty, if protocol is "+n);if(e&&e.match(r.invalid_hostname_characters)){if(!t)throw new TypeError('Hostname "'+e+'" contains characters other than [A-Z0-9.-:_] and Punycode.js is not available');if(t.toASCII(e).match(r.invalid_hostname_characters))throw new TypeError('Hostname "'+e+'" contains characters other than [A-Z0-9.-:_]')}},r.ensureValidPort=function(t){if(t){var e=Number(t);if(!(/^[0-9]+$/.test(e)&&e>0&&e<65536))throw new TypeError('Port "'+t+'" is not a valid port')}},r.noConflict=function(t){if(t){var e={URI:this.noConflict()};return i.URITemplate&&"function"==typeof i.URITemplate.noConflict&&(e.URITemplate=i.URITemplate.noConflict()),i.IPv6&&"function"==typeof i.IPv6.noConflict&&(e.IPv6=i.IPv6.noConflict()),i.SecondLevelDomains&&"function"==typeof i.SecondLevelDomains.noConflict&&(e.SecondLevelDomains=i.SecondLevelDomains.noConflict()),e}return i.URI===this&&(i.URI=o),this},s.build=function(t){return!0===t?this._deferred_build=!0:(void 0===t||this._deferred_build)&&(this._string=r.build(this._parts),this._deferred_build=!1),this},s.clone=function(){return new r(this)},s.valueOf=s.toString=function(){return this.build(!1)._string},s.protocol=w("protocol"),s.username=w("username"),s.password=w("password"),s.hostname=w("hostname"),s.port=w("port"),s.query=k("query","?"),s.fragment=k("fragment","#"),s.search=function(t,e){var n=this.query(t,e);return"string"==typeof n&&n.length?"?"+n:n},s.hash=function(t,e){var n=this.fragment(t,e);return"string"==typeof n&&n.length?"#"+n:n},s.pathname=function(t,e){if(void 0===t||!0===t){var n=this._parts.path||(this._parts.hostname?"/":"");return t?(this._parts.urn?r.decodeUrnPath:r.decodePath)(n):n}return this._parts.urn?this._parts.path=t?r.recodeUrnPath(t):"":this._parts.path=t?r.recodePath(t):"/",this.build(!e),this},s.path=s.pathname,s.href=function(t,e){var n;if(void 0===t)return this.toString();this._string="",this._parts=r._parts();var i=t instanceof r,o="object"==typeof t&&(t.hostname||t.path||t.pathname);t.nodeName&&(t=t[r.getDomAttribute(t)]||"",o=!1);if(!i&&o&&void 0!==t.pathname&&(t=t.toString()),"string"==typeof t||t instanceof String)this._parts=r.parse(String(t),this._parts);else{if(!i&&!o)throw new TypeError("invalid input");var s=i?t._parts:t;for(n in s)"query"!==n&&a.call(this._parts,n)&&(this._parts[n]=s[n]);s.query&&this.query(s.query,!1)}return this.build(!e),this},s.is=function(t){var e=!1,i=!1,o=!1,s=!1,a=!1,l=!1,c=!1,u=!this._parts.urn;switch(this._parts.hostname&&(u=!1,i=r.ip4_expression.test(this._parts.hostname),o=r.ip6_expression.test(this._parts.hostname),a=(s=!(e=i||o))&&n&&n.has(this._parts.hostname),l=s&&r.idn_expression.test(this._parts.hostname),c=s&&r.punycode_expression.test(this._parts.hostname)),t.toLowerCase()){case"relative":return u;case"absolute":return!u;case"domain":case"name":return s;case"sld":return a;case"ip":return e;case"ip4":case"ipv4":case"inet4":return i;case"ip6":case"ipv6":case"inet6":return o;case"idn":return l;case"url":return!this._parts.urn;case"urn":return!!this._parts.urn;case"punycode":return c}return null};var $=s.protocol,C=s.port,T=s.hostname;s.protocol=function(t,e){if(t&&!(t=t.replace(/:(\/\/)?$/,"")).match(r.protocol_expression))throw new TypeError('Protocol "'+t+"\" contains characters other than [A-Z0-9.+-] or doesn't start with [A-Z]");return $.call(this,t,e)},s.scheme=s.protocol,s.port=function(t,e){return this._parts.urn?void 0===t?"":this:(void 0!==t&&(0===t&&(t=null),t&&(":"===(t+="").charAt(0)&&(t=t.substring(1)),r.ensureValidPort(t))),C.call(this,t,e))},s.hostname=function(t,e){if(this._parts.urn)return void 0===t?"":this;if(void 0!==t){var n={preventInvalidHostname:this._parts.preventInvalidHostname};if("/"!==r.parseHost(t,n))throw new TypeError('Hostname "'+t+'" contains characters other than [A-Z0-9.-]');t=n.hostname,this._parts.preventInvalidHostname&&r.ensureValidHostname(t,this._parts.protocol)}return T.call(this,t,e)},s.origin=function(t,e){if(this._parts.urn)return void 0===t?"":this;if(void 0===t){var n=this.protocol();return this.authority()?(n?n+"://":"")+this.authority():""}var i=r(t);return this.protocol(i.protocol()).authority(i.authority()).build(!e),this},s.host=function(t,e){if(this._parts.urn)return void 0===t?"":this;if(void 0===t)return this._parts.hostname?r.buildHost(this._parts):"";if("/"!==r.parseHost(t,this._parts))throw new TypeError('Hostname "'+t+'" contains characters other than [A-Z0-9.-]');return this.build(!e),this},s.authority=function(t,e){if(this._parts.urn)return void 0===t?"":this;if(void 0===t)return this._parts.hostname?r.buildAuthority(this._parts):"";if("/"!==r.parseAuthority(t,this._parts))throw new TypeError('Hostname "'+t+'" contains characters other than [A-Z0-9.-]');return this.build(!e),this},s.userinfo=function(t,e){if(this._parts.urn)return void 0===t?"":this;if(void 0===t){var n=r.buildUserinfo(this._parts);return n?n.substring(0,n.length-1):n}return"@"!==t[t.length-1]&&(t+="@"),r.parseUserinfo(t,this._parts),this.build(!e),this},s.resource=function(t,e){var n;return void 0===t?this.path()+this.search()+this.hash():(n=r.parse(t),this._parts.path=n.path,this._parts.query=n.query,this._parts.fragment=n.fragment,this.build(!e),this)},s.subdomain=function(t,e){if(this._parts.urn)return void 0===t?"":this;if(void 0===t){if(!this._parts.hostname||this.is("IP"))return"";var n=this._parts.hostname.length-this.domain().length-1;return this._parts.hostname.substring(0,n)||""}var i=this._parts.hostname.length-this.domain().length,o=this._parts.hostname.substring(0,i),s=new RegExp("^"+l(o));if(t&&"."!==t.charAt(t.length-1)&&(t+="."),-1!==t.indexOf(":"))throw new TypeError("Domains cannot contain colons");return t&&r.ensureValidHostname(t,this._parts.protocol),this._parts.hostname=this._parts.hostname.replace(s,t),this.build(!e),this},s.domain=function(t,e){if(this._parts.urn)return void 0===t?"":this;if("boolean"==typeof t&&(e=t,t=void 0),void 0===t){if(!this._parts.hostname||this.is("IP"))return"";var n=this._parts.hostname.match(/\./g);if(n&&n.length<2)return this._parts.hostname;var i=this._parts.hostname.length-this.tld(e).length-1;return i=this._parts.hostname.lastIndexOf(".",i-1)+1,this._parts.hostname.substring(i)||""}if(!t)throw new TypeError("cannot set domain empty");if(-1!==t.indexOf(":"))throw new TypeError("Domains cannot contain colons");if(r.ensureValidHostname(t,this._parts.protocol),!this._parts.hostname||this.is("IP"))this._parts.hostname=t;else{var o=new RegExp(l(this.domain())+"$");this._parts.hostname=this._parts.hostname.replace(o,t)}return this.build(!e),this},s.tld=function(t,e){if(this._parts.urn)return void 0===t?"":this;if("boolean"==typeof t&&(e=t,t=void 0),void 0===t){if(!this._parts.hostname||this.is("IP"))return"";var i=this._parts.hostname.lastIndexOf("."),o=this._parts.hostname.substring(i+1);return!0!==e&&n&&n.list[o.toLowerCase()]&&n.get(this._parts.hostname)||o}var r;if(!t)throw new TypeError("cannot set TLD empty");if(t.match(/[^a-zA-Z0-9-]/)){if(!n||!n.is(t))throw new TypeError('TLD "'+t+'" contains characters other than [A-Z0-9]');r=new RegExp(l(this.tld())+"$"),this._parts.hostname=this._parts.hostname.replace(r,t)}else{if(!this._parts.hostname||this.is("IP"))throw new ReferenceError("cannot set TLD on non-domain host");r=new RegExp(l(this.tld())+"$"),this._parts.hostname=this._parts.hostname.replace(r,t)}return this.build(!e),this},s.directory=function(t,e){if(this._parts.urn)return void 0===t?"":this;if(void 0===t||!0===t){if(!this._parts.path&&!this._parts.hostname)return"";if("/"===this._parts.path)return"/";var n=this._parts.path.length-this.filename().length-1,i=this._parts.path.substring(0,n)||(this._parts.hostname?"/":"");return t?r.decodePath(i):i}var o=this._parts.path.length-this.filename().length,s=this._parts.path.substring(0,o),a=new RegExp("^"+l(s));return this.is("relative")||(t||(t="/"),"/"!==t.charAt(0)&&(t="/"+t)),t&&"/"!==t.charAt(t.length-1)&&(t+="/"),t=r.recodePath(t),this._parts.path=this._parts.path.replace(a,t),this.build(!e),this},s.filename=function(t,e){if(this._parts.urn)return void 0===t?"":this;if("string"!=typeof t){if(!this._parts.path||"/"===this._parts.path)return"";var n=this._parts.path.lastIndexOf("/"),i=this._parts.path.substring(n+1);return t?r.decodePathSegment(i):i}var o=!1;"/"===t.charAt(0)&&(t=t.substring(1)),t.match(/\.?\//)&&(o=!0);var s=new RegExp(l(this.filename())+"$");return t=r.recodePath(t),this._parts.path=this._parts.path.replace(s,t),o?this.normalizePath(e):this.build(!e),this},s.suffix=function(t,e){if(this._parts.urn)return void 0===t?"":this;if(void 0===t||!0===t){if(!this._parts.path||"/"===this._parts.path)return"";var n,i,o=this.filename(),s=o.lastIndexOf(".");return-1===s?"":(n=o.substring(s+1),i=/^[a-z0-9%]+$/i.test(n)?n:"",t?r.decodePathSegment(i):i)}"."===t.charAt(0)&&(t=t.substring(1));var a,c=this.suffix();if(c)a=t?new RegExp(l(c)+"$"):new RegExp(l("."+c)+"$");else{if(!t)return this;this._parts.path+="."+r.recodePath(t)}return a&&(t=r.recodePath(t),this._parts.path=this._parts.path.replace(a,t)),this.build(!e),this},s.segment=function(t,e,n){var i=this._parts.urn?":":"/",o=this.path(),r="/"===o.substring(0,1),s=o.split(i);if(void 0!==t&&"number"!=typeof t&&(n=e,e=t,t=void 0),void 0!==t&&"number"!=typeof t)throw new Error('Bad segment "'+t+'", must be 0-based integer');if(r&&s.shift(),t<0&&(t=Math.max(s.length+t,0)),void 0===e)return void 0===t?s:s[t];if(null===t||void 0===s[t])if(u(e)){s=[];for(var a=0,l=e.length;a<l;a++)(e[a].length||s.length&&s[s.length-1].length)&&(s.length&&!s[s.length-1].length&&s.pop(),s.push(f(e[a])))}else(e||"string"==typeof e)&&(e=f(e),""===s[s.length-1]?s[s.length-1]=e:s.push(e));else e?s[t]=f(e):s.splice(t,1);return r&&s.unshift(""),this.path(s.join(i),n)},s.segmentCoded=function(t,e,n){var i,o,s;if("number"!=typeof t&&(n=e,e=t,t=void 0),void 0===e){if(u(i=this.segment(t,e,n)))for(o=0,s=i.length;o<s;o++)i[o]=r.decode(i[o]);else i=void 0!==i?r.decode(i):void 0;return i}if(u(e))for(o=0,s=e.length;o<s;o++)e[o]=r.encode(e[o]);else e="string"==typeof e||e instanceof String?r.encode(e):e;return this.segment(t,e,n)};var S=s.query;return s.query=function(t,e){if(!0===t)return r.parseQuery(this._parts.query,this._parts.escapeQuerySpace);if("function"==typeof t){var n=r.parseQuery(this._parts.query,this._parts.escapeQuerySpace),i=t.call(this,n);return this._parts.query=r.buildQuery(i||n,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),this.build(!e),this}return void 0!==t&&"string"!=typeof t?(this._parts.query=r.buildQuery(t,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),this.build(!e),this):S.call(this,t,e)},s.setQuery=function(t,e,n){var i=r.parseQuery(this._parts.query,this._parts.escapeQuerySpace);if("string"==typeof t||t instanceof String)i[t]=void 0!==e?e:null;else{if("object"!=typeof t)throw new TypeError("URI.addQuery() accepts an object, string as the name parameter");for(var o in t)a.call(t,o)&&(i[o]=t[o])}return this._parts.query=r.buildQuery(i,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),"string"!=typeof t&&(n=e),this.build(!n),this},s.addQuery=function(t,e,n){var i=r.parseQuery(this._parts.query,this._parts.escapeQuerySpace);return r.addQuery(i,t,void 0===e?null:e),this._parts.query=r.buildQuery(i,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),"string"!=typeof t&&(n=e),this.build(!n),this},s.removeQuery=function(t,e,n){var i=r.parseQuery(this._parts.query,this._parts.escapeQuerySpace);return r.removeQuery(i,t,e),this._parts.query=r.buildQuery(i,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),"string"!=typeof t&&(n=e),this.build(!n),this},s.hasQuery=function(t,e,n){var i=r.parseQuery(this._parts.query,this._parts.escapeQuerySpace);return r.hasQuery(i,t,e,n)},s.setSearch=s.setQuery,s.addSearch=s.addQuery,s.removeSearch=s.removeQuery,s.hasSearch=s.hasQuery,s.normalize=function(){return this._parts.urn?this.normalizeProtocol(!1).normalizePath(!1).normalizeQuery(!1).normalizeFragment(!1).build():this.normalizeProtocol(!1).normalizeHostname(!1).normalizePort(!1).normalizePath(!1).normalizeQuery(!1).normalizeFragment(!1).build()},s.normalizeProtocol=function(t){return"string"==typeof this._parts.protocol&&(this._parts.protocol=this._parts.protocol.toLowerCase(),this.build(!t)),this},s.normalizeHostname=function(n){return this._parts.hostname&&(this.is("IDN")&&t?this._parts.hostname=t.toASCII(this._parts.hostname):this.is("IPv6")&&e&&(this._parts.hostname=e.best(this._parts.hostname)),this._parts.hostname=this._parts.hostname.toLowerCase(),this.build(!n)),this},s.normalizePort=function(t){return"string"==typeof this._parts.protocol&&this._parts.port===r.defaultPorts[this._parts.protocol]&&(this._parts.port=null,this.build(!t)),this},s.normalizePath=function(t){var e,n=this._parts.path;if(!n)return this;if(this._parts.urn)return this._parts.path=r.recodeUrnPath(this._parts.path),this.build(!t),this;if("/"===this._parts.path)return this;var i,o,s="";for("/"!==(n=r.recodePath(n)).charAt(0)&&(e=!0,n="/"+n),"/.."!==n.slice(-3)&&"/."!==n.slice(-2)||(n+="/"),n=n.replace(/(\/(\.\/)+)|(\/\.$)/g,"/").replace(/\/{2,}/g,"/"),e&&(s=n.substring(1).match(/^(\.\.\/)+/)||"")&&(s=s[0]);-1!==(i=n.search(/\/\.\.(\/|$)/));)0!==i?(-1===(o=n.substring(0,i).lastIndexOf("/"))&&(o=i),n=n.substring(0,o)+n.substring(i+3)):n=n.substring(3);return e&&this.is("relative")&&(n=s+n.substring(1)),this._parts.path=n,this.build(!t),this},s.normalizePathname=s.normalizePath,s.normalizeQuery=function(t){return"string"==typeof this._parts.query&&(this._parts.query.length?this.query(r.parseQuery(this._parts.query,this._parts.escapeQuerySpace)):this._parts.query=null,this.build(!t)),this},s.normalizeFragment=function(t){return this._parts.fragment||(this._parts.fragment=null,this.build(!t)),this},s.normalizeSearch=s.normalizeQuery,s.normalizeHash=s.normalizeFragment,s.iso8859=function(){var t=r.encode,e=r.decode;r.encode=escape,r.decode=decodeURIComponent;try{this.normalize()}finally{r.encode=t,r.decode=e}return this},s.unicode=function(){var t=r.encode,e=r.decode;r.encode=g,r.decode=unescape;try{this.normalize()}finally{r.encode=t,r.decode=e}return this},s.readable=function(){var e=this.clone();e.username("").password("").normalize();var n="";if(e._parts.protocol&&(n+=e._parts.protocol+"://"),e._parts.hostname&&(e.is("punycode")&&t?(n+=t.toUnicode(e._parts.hostname),e._parts.port&&(n+=":"+e._parts.port)):n+=e.host()),e._parts.hostname&&e._parts.path&&"/"!==e._parts.path.charAt(0)&&(n+="/"),n+=e.path(!0),e._parts.query){for(var i="",o=0,s=e._parts.query.split("&"),a=s.length;o<a;o++){var l=(s[o]||"").split("=");i+="&"+r.decodeQuery(l[0],this._parts.escapeQuerySpace).replace(/&/g,"%26"),void 0!==l[1]&&(i+="="+r.decodeQuery(l[1],this._parts.escapeQuerySpace).replace(/&/g,"%26"))}n+="?"+i.substring(1)}return n+=r.decodeQuery(e.hash(),!0)},s.absoluteTo=function(t){var e,n,i,o=this.clone(),s=["protocol","username","password","hostname","port"];if(this._parts.urn)throw new Error("URNs do not have any generally defined hierarchical components");if(t instanceof r||(t=new r(t)),o._parts.protocol)return o;if(o._parts.protocol=t._parts.protocol,this._parts.hostname)return o;for(n=0;i=s[n];n++)o._parts[i]=t._parts[i];return o._parts.path?(".."===o._parts.path.substring(-2)&&(o._parts.path+="/"),"/"!==o.path().charAt(0)&&(e=(e=t.directory())||(0===t.path().indexOf("/")?"/":""),o._parts.path=(e?e+"/":"")+o._parts.path,o.normalizePath())):(o._parts.path=t._parts.path,o._parts.query||(o._parts.query=t._parts.query)),o.build(),o},s.relativeTo=function(t){var e,n,i,o,s,a=this.clone().normalize();if(a._parts.urn)throw new Error("URNs do not have any generally defined hierarchical components");if(t=new r(t).normalize(),e=a._parts,n=t._parts,o=a.path(),s=t.path(),"/"!==o.charAt(0))throw new Error("URI is already relative");if("/"!==s.charAt(0))throw new Error("Cannot calculate a URI relative to another relative URI");if(e.protocol===n.protocol&&(e.protocol=null),e.username!==n.username||e.password!==n.password)return a.build();if(null!==e.protocol||null!==e.username||null!==e.password)return a.build();if(e.hostname!==n.hostname||e.port!==n.port)return a.build();if(e.hostname=null,e.port=null,o===s)return e.path="",a.build();if(!(i=r.commonPath(o,s)))return a.build();var l=n.path.substring(i.length).replace(/[^\/]*$/,"").replace(/.*?\//g,"../");return e.path=l+e.path.substring(i.length)||"./",a.build()},s.equals=function(t){var e,n,i,o,s,l=this.clone(),c=new r(t),p={};if(l.normalize(),c.normalize(),l.toString()===c.toString())return!0;if(i=l.query(),o=c.query(),l.query(""),c.query(""),l.toString()!==c.toString())return!1;if(i.length!==o.length)return!1;for(s in e=r.parseQuery(i,this._parts.escapeQuerySpace),n=r.parseQuery(o,this._parts.escapeQuerySpace),e)if(a.call(e,s)){if(u(e[s])){if(!h(e[s],n[s]))return!1}else if(e[s]!==n[s])return!1;p[s]=!0}for(s in n)if(a.call(n,s)&&!p[s])return!1;return!0},s.preventInvalidHostname=function(t){return this._parts.preventInvalidHostname=!!t,this},s.duplicateQueryParameters=function(t){return this._parts.duplicateQueryParameters=!!t,this},s.escapeQuerySpace=function(t){return this._parts.escapeQuerySpace=!!t,this},r}))},function(t,e,n){n(6),t.exports=n(12)},function(t,e,n){"use strict";n.r(e),function(t){n(0),n(7),n(8),n(9);var e=n(4),i=n.n(e);let o,r,s="",a=0,l="";const c=new Array;let u;const p=t("#pos_status");t(document).ready((function(){s=("https:"==location.protocol?"wss://":"ws://")+location.host+"/ws",t((function(){u=t("#status_popover_content"),F(t("#websocket_error"),!0),F(t("#notifications_error"),!0),t("#gui_status_light").popover({placement:"bottom",content:u,html:!0}),t("#gui_status_light").popover("show"),t("#gui_status_light").popover("hide"),u.show(),t("#gui_status_light").unbind(),t(".navbar-brand").click((function(e){t("#gui_status_light").popover("toggle")})),t("#connect_btn").click(O),t("#connectForm input").keypress((function(t){if(13==t.which)return O(),!1})),t("#connectForm input").keyup((function(t){_()})),t("#pos_btn").click(I),function(){t("#compose_btn").click((function(e){t("#composer").modal("toggle")}));const e={delimiter:[",",";"," "],inputType:"email",createTokensOnBlur:!0};t("#msg_to").tokenfield(e),t("#msg_cc").tokenfield(e),t("#composer").on("change",".btn-file :file",j),t("#composer").on("hidden.bs.modal",g),t("#composer_error").hide(),t("#compose_cancel").click((function(t){P(!0)})),t("#composer_form").submit((function(e){const n=t("#composer_form"),i=(new Date).toJSON();t("#msg_form_date").remove(),n.append('<input id="msg_form_date" type="hidden" name="date" value="'+i+'">'),0==t("#msg_body").val().length&&t("#msg_body").val("<No message body>"),0==t("#msg_subject").val().length&&t("#msg_subject").val("<No subject>"),t.ajax({url:"/api/mailbox/out",method:"POST",data:new FormData(n[0]),processData:!1,contentType:!1,success:function(e){t("#composer").modal("hide"),P(!0),N(e)},error:function(e){t("#composer_error").html(e.responseText),t("#composer_error").show()}}),e.preventDefault()}))}(),t("#inbox_tab").click((function(t){Q("in")})),t("#outbox_tab").click((function(t){Q("out")})),t("#sent_tab").click((function(t){Q("sent")})),t("#archive_tab").click((function(t){Q("archive")})),t(".navbar li").click((function(e){t(".navbar li.active").removeClass("active");const n=t(this);n.hasClass("active")||n.addClass("active"),e.preventDefault()})),t(".nav :not(.dropdown) a").on("click",(function(){"none"!=t(".navbar-toggle").css("display")&&t(".navbar-toggle").trigger("click")})),t("#posModal").on("shown.bs.modal",(function(e){t.ajax({url:"/api/current_gps_position",dataType:"json",beforeSend:function(){p.html("Checking if GPS device is available")},success:function(e){p.html("GPS position received"),p.html("<strong>Waiting for position form GPS device...</strong>"),function(e){const n=new Date(e.Time);p.html("Last position update "+Y(n)+"..."),t("#pos_lat").val(e.Lat),t("#pos_long").val(e.Lon),t("#pos_ts").val(n.getTime())}(e)},error:function(t,e,n){if(p.html("GPS device not available!"),navigator.geolocation){p.html("<strong>Waiting for position (geolocation)...</strong>");const t={enableHighAccuracy:!0,maximumAge:0};a=navigator.geolocation.watchPosition(D,A,t)}else p.html("Geolocation is not supported by this browser.")}})})),t("#posModal").on("hidden.bs.modal",(function(t){navigator.geolocation&&navigator.geolocation.clearWatch(a)})),t("#updateFormsButton").click(x),function(){t("#freqInput").on("focusin focusout",(e=>{window.setTimeout((()=>{t("#connect_btn").prop("disabled","focusin"==e.type)}),300)})),t("#freqInput").change((()=>{_(),T()})),t("#bandwidthInput").change(S),t("#radioOnlyInput").change(_),t("#addrInput").change(_),t("#targetInput").change(_),t("#updateRmslistButton").click((e=>{t(e.target).prop("disabled",!0),k(!0)})),t("#modeSearchSelect").change(k),t("#bandSearchSelect").change(k),t("#transportSelect").change((function(e){switch(t("#bandwidthInput").val("").change(),E(),_(),T(),t(e.target).val()){case"ardop":case"pactor":case"varafm":case"varahf":t("#modeSearchSelect").val(t(e.target).val());break;case"ax25":case"ax25+linux":case"ax25+agwpe":case"ax25+serial-tnc":t("#modeSearchSelect").val("packet");break;default:return}t("#modeSearchSelect").selectpicker("refresh"),k()}));let e=localStorage.getItem("pat_connect_url");null!=e&&$(e);E(),t.getJSON("/api/connect_aliases",(function(e){o=e;const n=t("#aliasSelect");Object.keys(e).forEach((function(t){n.append("<option>"+t+"</option>")})),n.change((function(){t("#aliasSelect option:selected").each((function(){t(this).text(),$(o[t(this).text()]),n.val(""),n.selectpicker("refresh")}))})),n.selectpicker("refresh")})),k()}(),H(),Q("in"),function(){if(!function(){if(!window.Notification||!Notification.requestPermission)return!1;if("granted"===Notification.permission)return!0;try{new Notification("")}catch(t){if("TypeError"==t.name)return!1}return!0}())return void u.find("#notifications_error").find(".panel-body").html("Not supported by this browser.");Notification.requestPermission((function(t){"granted"===t?F(u.find("#notifications_error"),!1):z()&&R(u.find("#notifications_error"))}))}(),y()}))}));let d,h,f=!1;function m(){!function(t,e,n){const i=new Date;i.setTime(i.getTime()+24*n*60*60*1e3);const o="expires="+i.toUTCString();document.cookie=t+"="+e+";"+o+";path=/"}("forminstance",Math.floor(1e9*Math.random()),1),v()}function g(){var t;window.clearTimeout(d),t="forminstance",document.cookie=t+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;"}function v(){t.get("api/form",{},(function(e){console.log(e),t("#composer").hasClass("hidden")||e.target_form&&e.target_form.name?(console.log("done polling"),!t("#composer").hasClass("hidden")&&e.target_form&&e.target_form.name&&function(e){e.target_form&&(t("#msg_body").val(e.msg_body),e.msg_to&&t("#msg_to").tokenfield("setTokens",e.msg_to.split(/[ ;,]/).filter(Boolean)),e.msg_cc&&t("#msg_cc").tokenfield("setTokens",e.msg_cc.split(/[ ;,]/).filter(Boolean)),e.msg_subject&&t("#msg_subject").val(e.msg_subject))}(e)):d=window.setTimeout(v,1e3)}),"json")}function y(){t.getJSON("/api/formcatalog").done((function(t){b(t)})).fail((function(t){b(null)}))}function b(e){r=e,e&&e.path&&(e.folders&&e.folders.length>0||e.forms&&e.forms.length>0)?(t("#formsVersion").html('<span>(ver <a href="http://www.winlink.org/content/all_standard_templates_folders_one_zip_self_extracting_winlink_express_ver_12142016">'+e.version+"</a>)</span>"),t("#updateFormsVersion").html(e.version),t("#formsRootFolderName").text(e.path),t("#formFolderRoot").html(""),w("formFolderRoot",e)):(t("#formsRootFolderName").text("missing form templates"),t("#formFolderRoot").append("\n\t\t\t<h6>Form templates not downloaded</h6>\n\t\t\tUse Action → Update Form Templates to download now\n\t\t\t"))}function x(){t("#updateFormsResponse").text(""),t("#updateFormsError").text(""),t.ajax({method:"POST",url:"/api/formsUpdate",success:e=>{t("#updateFormsError").text("");let n=JSON.parse(e);switch(n.action){case"none":t("#updateFormsResponse").text("You already have the latest forms version");break;case"update":t("#updateFormsResponse").text("Updated forms to "+n.newestVersion),y()}},error:e=>{t("#updateFormsResponse").text(""),t("#updateFormsError").text(e.responseText)}})}function w(e,n){if(n.folders&&n.folders.length>0&&n.form_count>0){const i=`${e}Acc`;t(`#${e}`).append(`\n\t\t\t<div class="accordion" id="${i}">\n\t\t\t</div>\n\t\t\t`),n.folders.forEach((function(n){if(n.form_count>0){const o=e+n.name.replace(/\s/g,"_").replace(/&/g,"and"),r=o+"Body",s=`\n\t\t\t\t<div class="card">\n\t\t\t\t\t<div class="card-header d-flex">\n\t\t\t\t\t\t<button class="btn btn-secondary flex-fill" type="button" data-toggle="collapse" data-target="#${o}">\n\t\t\t\t\t\t\t${n.name}\n\t\t\t\t\t\t</button>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div id="${o}" class="collapse" data-parent="#${i}">\n\t\t\t\t\t\t<div class="card-body" id="${r}">\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t`;if(t(`#${i}`).append(s),w(`${r}`,n),n.forms&&n.forms.length>0){const e=`${r}Forms`;t(`#${r}`).append(`<div id="${e}" class="list-group"></div>`),n.forms.forEach((n=>{const i=t(`<div class="list-group-item list-group-item-action list-group-item-light">${n.name}</div>`),o=encodeURIComponent(n.initial_uri);i.on("click",(()=>{return e=`/api/forms?formPath=${o}`,t("#selectForm").modal("hide"),m(),void window.open(e);var e})),t(`#${e}`).append(i)}))}}}))}}function k(e){let n=t("#rmslist tbody"),i={mode:t("#modeSearchSelect").val(),band:t("#bandSearchSelect").val(),"force-download":!0===e};t.ajax({method:"GET",url:"/api/rmslist",dataType:"json",data:i,success:function(e){n.empty(),e.forEach((e=>{let i=t("<tr>").append(t('<td class="text-left">').text(e.callsign)).append(t('<td class="text-left">').text(e.distance.toFixed(0)+" km")).append(t('<td class="text-left">').text(e.modes)).append(t('<td class="text-right">').text(e.dial.desc));i.click((t=>{n.find(".active").removeClass("active"),i.addClass("active"),$(e.url)})),n.append(i)}))}})}function $(e){e=i()(e.toString()),t("#transportSelect").val(e.protocol()),t("#transportSelect").selectpicker("refresh"),t("#targetInput").val(e.path().substr(1));const n=e.search(!0);e.hasQuery("freq")?t("#freqInput").val(n.freq):t("#freqInput").val(""),e.hasQuery("bw")?(t("#bandwidthInput").val(n.bw).change(),t("#bandwidthInput").attr("x-value",n.bw)):(t("#bandwidthInput").val("").change(),t("#bandwidthInput").removeAttr("x-value")),e.hasQuery("radio_only")?t("#radioOnlyInput")[0].checked=n.radio_only:t("#radioOnlyInput")[0].checked=!1;let o="";e.username()&&(o+=e.username()),e.password()&&(o+=":"+e.password()),""!=o&&(o+="@"),t("#addrInput").val(o+e.host()),E(),_(),T()}function C(){let e=t("#transportSelect").val()+"://"+t("#addrInput").val()+"/"+t("#targetInput").val(),n="";return t("#freqInput").val()&&t("#freqInput").parent().hasClass("has-success")&&(n+="&freq="+t("#freqInput").val()),t("#bandwidthInput").val()&&(n+="&bw="+t("#bandwidthInput").val()),t("#radioOnlyInput").is(":checked")&&(n+="&radio_only=true"),n&&(e+=n.replace("&","?")),e}function T(){t("#qsyWarning").empty().attr("hidden",!0);const e=t("#freqInput");e.css("text-decoration","none currentcolor solid");const n=e.parent();["has-error","has-success","has-warning"].forEach((t=>{n.removeClass(t)})),n.tooltip("destroy");const i={transport:t("#transportSelect").val(),freq:new Number(e.val())};0!=i.freq&&(console.log("QSY: "+JSON.stringify(i)),t.ajax({method:"POST",url:"/api/qsy",data:JSON.stringify(i),contentType:"application/json",success:()=>{n.addClass("has-success")},error:i=>{e.css("text-decoration","line-through"),503==i.status?n.attr("data-toggle","tooltip").attr("title","Rigcontrol is not configured for the selected transport. Set radio frequency manually.").tooltip("fixTitle"):([n,t("#qsyWarning")].forEach((t=>{t.attr("data-toggle","tooltip").attr("title","Could not set radio frequency. See log output for more details and/or set the frequency manually.").tooltip("fixTitle")})),n.addClass("has-error"),t("#qsyWarning").html('<span class="glyphicon glyphicon-warning-sign"></span> QSY failure').attr("hidden",!1))},complete:()=>{_()}}))}function S(){const e=t(this);console.log("connect bandwidth change "+e.val()),e.attr("x-value",e.val()),""===e.val()&&e.removeAttr("x-value"),_()}function _(){t("#connectURLPreview").empty().append(C())}function E(){const e=t("#transportSelect").val();if(function(e){const n=t("#bandwidthInput"),i=t("#bandwidthInputDiv");var o=n.attr("x-value");n.empty(),n.prop("disabled",!0),t.ajax({method:"GET",url:`/api/bandwidths?mode=${e}`,dataType:"json",success:function(e){0!==e.bandwidths.length&&(void 0===o&&(o=e.default),e.bandwidths.forEach((e=>{const i=t(`<option value="${e}">${e}</option>`);i.prop("selected",e===o),n.append(i)})),n.val(o).change())},complete:function(t){n.attr("x-for-transport",e),i.toggle(n.find("option").length>0),n.prop("disabled",!1),n.selectpicker("refresh")}})}(e),"telnet"===e)t("#freqInputDiv").hide(),t("#freqInput").val(""),t("#addrInputDiv").show();else t("#addrInputDiv").hide(),t("#addrInput").val(""),t("#freqInputDiv").show();e.startsWith("ax25")?(t("#radioOnlyInput")[0].checked=!1,t("#radioOnlyInputDiv").hide()):t("#radioOnlyInputDiv").show()}function A(t){(t.message.search("insecure origin")>0||z())&&R(u.find("#geolocation_error")),F(u.find("#geolocation_error"),!0),p.html("Geolocation unavailable.")}function D(e){const n=new Date(e.timestamp);p.html("Last position update "+Y(n)+"..."),t("#pos_lat").val(e.coords.latitude),t("#pos_long").val(e.coords.longitude),t("#pos_ts").val(e.timestamp)}function I(){const e={lat:parseFloat(t("#pos_lat").val()),lon:parseFloat(t("#pos_long").val()),comment:t("#pos_comment").val(),date:new Date(parseInt(t("#pos_ts").val()))};t.ajax("/api/posreport",{data:JSON.stringify(e),contentType:"application/json",type:"POST",success:function(e){t("#posModal").modal("toggle"),N(e)},error:function(t,e,n){N(n+": "+t.responseText)}})}function j(){const e=t(this).get(0).files;let n=t("#composer_attachments");for(let t=0;t<e.length;t++){let i=e.item(t);if(c[c.length]=i,K(i.name)){const t=new FileReader;t.onload=function(t){n.append('<div class="col-xs-6 col-md-3"><a class="thumbnail" href="#" class="btn btn-default navbar-btn"><span class="glyphicon glyphicon-paperclip"></span> <img src="'+t.target.result+'" alt="'+i.name+'"></a></div>')},t.readAsDataURL(i)}else n.append('<div class="col-xs-6 col-md-3"><a href="#" class="btn btn-default navbar-btn"><span class="glyphicon glyphicon-paperclip"></span> '+i.name+"<br>("+i.size+" bytes)</a></div>")}}function N(e){const n=t("#navbar_status");n.empty(),n.append('<span class="navbar-text status-text">'+e+"</p>"),n.show(),window.setTimeout((function(){n.fadeOut(500)}),5e3)}function P(e){if(e){t("#composer_error").val("").hide(),t("#msg_body").val(""),t("#msg_subject").val(""),t("#msg_to").tokenfield("setTokens",[]),t("#msg_cc").tokenfield("setTokens",[]),t("#composer_form")[0].reset(),t("#composer_attachments").empty();let e=t("#msg_attachments_input");e.replaceWith(e=e.clone(!0))}t("#composer").modal("hide")}function O(e){const n=C();localStorage.setItem("pat_connect_url",n),t("#connectModal").modal("hide"),t.getJSON("/api/connect?url="+encodeURIComponent(n),(function(t){0==t.NumReceived&&window.setTimeout((function(){N("No new messages.")}),1e3)})).fail((function(){N("Connect failed. See console for detailed information.")}))}function q(e,n){void 0===n&&(n=()=>{}),t.post("/api/disconnect?dirty="+e,{},(function(t){n()}),"json")}function L(){let e="success";u.find(".panel-info").not(".hidden").not(".ignore-status").each((function(t){e="info"})),u.find(".panel-warning").not(".hidden").not(".ignore-status").each((function(t){e="warning"})),u.find(".panel-danger").not(".hidden").not(".ignore-status").each((function(t){e="danger"})),t("#gui_status_light").removeClass((function(t,e){return(e.match(/(^|\s)btn-\S+/g)||[]).join(" ")})).addClass("btn-"+e),"success"==e?u.find("#no_error").show():u.find("#no_error").hide()}function z(){return hasOwnProperty.call(window,"isSecureContext")?!window.isSecureContext:"https:"!=window.location.protocol&&("file:"!=window.location.protocol&&("localhost"!==location.hostname&&!location.hostname.startsWith("127.0")))}function R(t){t.removeClass("panel-info").addClass("panel-warning"),t.find(".panel-body").append('<p>Ensure the <a href="https://github.com/la5nta/pat/wiki/The-web-GUI#powerful-features">secure origin criteria for Powerful Features</a> are met.</p>'),L()}function F(t,e){e?t.removeClass("hidden"):t.addClass("hidden"),L()}function H(){if("WebSocket"in window)h=new WebSocket(s),h.onopen=function(e){console.log("Websocket opened"),F(u.find("#websocket_error"),!1),F(u.find("#webserver_info"),!0),t("#console").empty()},h.onmessage=function(e){const n=JSON.parse(e.data);n.MyCall&&(l=n.MyCall),n.Notification&&function(t){const e={body:t.body,icon:"/res/images/pat_logo.png"};new Notification(t.title,e)}(n.Notification),n.LogLine&&function(e){const n=t("#console");n.append('<span class="terminal">'+e+"</span>"),n.scrollTop(n.prop("scrollHeight"))}(n.LogLine+"\n"),n.UpdateMailbox&&Q(B),n.Status&&function(e){const n=t("#status_text");n.empty().off("click").attr("data-toggle","tooltip").attr("data-placement","bottom").tooltip();const i=function(){n.tooltip("hide"),q(!1,(()=>{n.empty().append("Disconnecting... "),n.off("click").click((()=>{n.off("click"),q(!0),n.tooltip("hide")})),n.attr("title","Click to force disconnect").tooltip("fixTitle").tooltip("show")}))};e.dialing?(n.append("Dialing... "),n.click(i),n.attr("title","Click to abort").tooltip("fixTitle").tooltip("show")):e.connected?(n.append("Connected "+e.remote_addr),n.click(i),n.attr("title","Click to disconnect").tooltip("fixTitle").tooltip("hide")):(e.active_listeners.length>0?n.append("<i>Listening "+e.active_listeners+"</i>"):n.append("<i>Ready</i>"),n.attr("title","Click to connect").tooltip("fixTitle").tooltip("hide"),n.click((()=>{t("#connectModal").modal("toggle")})));const o=e.http_clients.length;u.find("#webserver_info").find(".panel-body").html(o+(1==o?" client ":" clients ")+"connected.")}(n.Status),n.Progress&&function(e){if(f=!e.done,e.receiving||e.sending){const n=Math.ceil(100*e.bytes_transferred/e.bytes_total);let i=(e.receiving?"Receiving":"Sending")+" "+e.mid+" ("+e.bytes_total+" bytes)";e.subject&&(i+=" - "+J(e.subject)),t("#navbar_progress .progress-text").text(i),t("#navbar_progress .progress-bar").css("width",n+"%").text(n+"%")}t("#navbar_progress").is(":visible")&&e.done?window.setTimeout((function(){f||t("#navbar_progress").fadeOut(500)}),3e3):!e.receiving&&!e.sending||e.done||t("#navbar_progress").show()}(n.Progress),n.Prompt&&function(e){if(console.log(e),"password"!=e.kind)return void console.log("Ignoring unsupported prompt of kind: "+e.kind);t("#promptID").val(e.id),t("#promptResponseValue").val(""),t("#promptMessage").text(e.message),t("#promptOkButton").click(M),t("#promptModal").modal("show")}(n.Prompt),n.PromptAbort&&t("#promptModal").modal("hide"),n.Ping&&h.send(JSON.stringify({Pong:!0}))},h.onclose=function(e){console.log("Websocket closed"),F(u.find("#websocket_error"),!0),F(u.find("#webserver_info"),!1),t("#status_text").empty(),window.setTimeout((function(){H()}),1e3)};else{N("Websocket not supported by your browser, please upgrade your browser.")}}function M(){const e=t("#promptID").val(),n=t("#promptResponseValue").val();t("#promptModal").modal("hide"),h.send(JSON.stringify({prompt_response:{id:e,value:n}}))}const U=(t,e)=>t.children[e].innerText||t.children[e].textContent,W=(t,e)=>(n,i)=>{return o=U(e?n:i,t),r=U(e?i:n,t),""===o||""===r||isNaN(o)||isNaN(r)?o.toString().localeCompare(r):o-r;var o,r};let B;function Q(e){B=e;const n="in"==e||"archive"==e,i=t("#folder table");i.empty(),i.append("<thead><tr><th></th><th>Subject</th><th>"+(n?"From":"To")+"</th>"+(n?"":"<th>P2P</th>")+"<th>Date</th><th>Message ID</th></tr></thead><tbody></tbody>");const o=t("#folder table tbody");t.getJSON("/api/mailbox/"+e,(function(e){for(let i=0;i<e.length;i++){const r=e[i];let s='<tr id="'+r.MID+'" class="active'+(r.Unread?" strong":"")+'"><td>';r.Files.length>0&&(s+='<span class="glyphicon glyphicon-paperclip"></span>'),s+="</td><td>"+J(r.Subject)+"</td><td>",n||r.To?n?s+=r.From.Addr:1==r.To.length?s+=r.To[0].Addr:r.To.length>1&&(s+=r.To[0].Addr+"..."):s+="",s+="</td>",s+=n?"":"<td>"+(r.P2POnly?'<span class="glyphicon glyphicon-ok"></span>':"")+"</td>",s+="<td>"+r.Date+"</td><td>"+r.MID+"</td></tr>";const a=t(s);o.append(a),a.click((function(e){V(t(this))}))}})),document.querySelectorAll("th").forEach((t=>t.addEventListener("click",(()=>{const e=t.closest("table"),n=e.querySelector("tbody");Array.from(n.querySelectorAll("tr")).sort(W(Array.from(t.parentNode.children).indexOf(t),this.asc=!this.asc)).forEach((t=>n.appendChild(t)));const i=e.querySelector("th.sorted");null!=i&&i.classList.remove("sorted"),t.classList.add("sorted")}))))}function V(e){const n=e.attr("ID"),i=Z(B,n);t.getJSON(i,(function(o){e.attr("class","info");const r=t("#message_view");r.find("#subject").text(o.Subject),r.find("#headers").empty(),r.find("#headers").append("Date: "+o.Date+"<br>"),r.find("#headers").append("From: "+o.From.Addr+"<br>"),r.find("#headers").append("To: ");for(let t=0;o.To&&t<o.To.length;t++)r.find("#headers").append("<el>"+o.To[t].Addr+"</el>"+(o.To.length-1>t?", ":""));if(o.P2POnly&&r.find("#headers").append(" (<strong>P2P only</strong>)"),o.Cc){r.find("#headers").append("<br>Cc: ");for(let t=0;t<o.Cc.length;t++)r.find("#headers").append("<el>"+o.Cc[t].Addr+"</el>"+(o.Cc.length-1>t?", ":""))}r.find("#body").html(o.BodyHTML);const s=r.find("#attachments");s.empty(),o.Files?s.show():s.hide();for(let t=0;o.Files&&t<o.Files.length;t++){const e=o.Files[t],n=G(e.Name);let r="false";n&&(r="true");const a=i+"/"+e.Name+"?rendertohtml="+r;K(e.Name)?s.append('<div class="col-xs-6 col-md-3"><a class="thumbnail" target="_blank" href="'+i+"/"+e.Name+'" class="btn btn-default navbar-btn"><span class="glyphicon glyphicon-paperclip"></span> '+(e.Size/1024).toFixed(2)+'kB<img src="'+i+"/"+e.Name+'" alt="'+e.Name+'"></a></div>'):n?s.append('<div class="col-xs-6 col-md-3"><a target="_blank" href="'+a+'" class="btn btn-default navbar-btn"><span class="glyphicon glyphicon-edit"></span> '+n+"</a></div>"):s.append('<div class="col-xs-6 col-md-3"><a target="_blank" href="'+i+"/"+e.Name+'" class="btn btn-default navbar-btn"><span class="glyphicon glyphicon-paperclip"></span> '+e.Name+"<br>("+e.Size+" bytes)</a></div>")}t("#reply_btn").off("click"),t("#reply_btn").click((function(e){t("#message_view").modal("hide"),t("#msg_to").tokenfield("setTokens",[o.From.Addr]),t("#msg_cc").tokenfield("setTokens",function(t){let e=t.To;null!=t.Cc&&t.Cc.length>0&&(e=e.concat(t.Cc));const n={};n[l]=!0,n[t.From.Addr]=!0;const i=[];for(let t=0;t<e.length;t++)n[e[t].Addr]||(n[e[t].Addr]=!0,i.push(e[t].Addr));return i}(o)),0!=o.Subject.lastIndexOf("Re:",0)?t("#msg_subject").val("Re: "+o.Subject):t("#msg_subject").val(o.Subject),t("#msg_body").val("\n\n"+X(o)),t("#composer").modal("show"),t("#msg_body").focus(),t("#msg_body")[0].setSelectionRange(0,0),function(e,n){for(let i=0;n.Files&&i<n.Files.length;i++){const o=n.Files[i];if(!G(o.Name))continue;const r=e+"/"+o.Name;return void t.get(r+"?rendertohtml=false&composereply=false",{},(function(t){let e=(new DOMParser).parseFromString(t,"text/xml");if(e){let t=e.evaluate("/RMS_Express_Form/form_parameters/reply_template",e,null,XPathResult.STRING_TYPE,null);t&&t.stringValue&&(window.setTimeout(m,500),open(r+"?rendertohtml=true&composereply=true"))}}),"text")}}(i,o)})),t("#forward_btn").off("click"),t("#forward_btn").click((function(e){t("#message_view").modal("hide"),t("#msg_to").tokenfield("setTokens",""),t("#msg_subject").val("Fw: "+o.Subject),t("#msg_body").val(X(o)),t("#msg_body")[0].setSelectionRange(0,0),t("#composer").modal("show"),t("#msg_to-tokenfield").focus()})),t("#delete_btn").off("click"),t("#delete_btn").click((function(e){!function(e,n){t("#confirm_delete").on("click",".btn-ok",(function(i){t("#message_view").modal("hide");const o=t(i.delegateTarget);t.ajax(Z(e,n),{type:"DELETE",success:function(t){o.modal("hide"),N("Message deleted")},error:function(t,e,n){o.modal("hide"),N(n+": "+t.responseText)}})})),t("#confirm_delete").modal("show")}(B,n)})),t("#archive_btn").off("click"),t("#archive_btn").click((function(e){!function(e,n){t.ajax("/api/mailbox/archive",{headers:{"X-Pat-SourcePath":Z(e,n)},contentType:"application/json",type:"POST",success:function(e){t("#message_view").modal("hide"),N("Message archived")},error:function(t,e,n){N(n+": "+t.responseText)}})}(B,n)})),"archive"==B?t("#archive_btn").parent().hide():t("#archive_btn").parent().show(),r.show(),t("#message_view").modal("show");let a=B;o.Read||window.setTimeout((function(){!function(e,n){const i={read:!0};t.ajax(Z(e,n)+"/read",{data:JSON.stringify(i),contentType:"application/json",type:"POST",success:function(t){},error:function(t,e,n){N(n+": "+t.responseText)}})}(a,o.MID)}),2e3),e.attr("class","active")}))}function G(t){let e=t.match(/^RMS_Express_Form_([\w \.]+)-\d+\.xml$/i);return e?e[1]:(e=t.match(/^RMS_Express_Form_([\w \.]+)\.xml$/i),e?e[1]:null)}function X(t){let e="--- "+t.Date+" "+t.From.Addr+" wrote: ---\n";const n=t.Body.split("\n");for(let t=0;t<n.length;t++)e+=">"+n[t]+"\n";return e}function J(e){return t("<div></div>").text(e).html()}function K(t){return t.toLowerCase().match(/\.(jpg|jpeg|png|gif)$/)}function Y(t){const e=864e5,n=2592e6,i=31536e6,o=new Date-t;return o<e?(t.getHours()<10?"0":"")+t.getHours()+":"+(t.getMinutes()<10?"0":"")+t.getMinutes():o<n?"approximately "+Math.round(o/e)+" days ago":o<i?"approximately "+Math.round(o/n)+" months ago":"approximately "+Math.round(o/i)+" years ago"}function Z(t,e){return"/api/mailbox/"+encodeURIComponent(t)+"/"+encodeURIComponent(e)}}.call(this,n(0))},function(t,e,n){(function(t){if(void 0===t)throw new Error("Bootstrap's JavaScript requires jQuery");!function(t){"use strict";t.fn.emulateTransitionEnd=function(e){var n=!1,i=this;t(this).one("bsTransitionEnd",(function(){n=!0}));return setTimeout((function(){n||t(i).trigger(t.support.transition.end)}),e),this},t((function(){t.support.transition=function(){var t=document.createElement("bootstrap"),e={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var n in e)if(void 0!==t.style[n])return{end:e[n]};return!1}(),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)}})}))}(t),function(t){"use strict";var e='[data-dismiss="alert"]',n=function(n){t(n).on("click",e,this.close)};n.VERSION="3.2.0",n.prototype.close=function(e){var n=t(this),i=n.attr("data-target");i||(i=(i=n.attr("href"))&&i.replace(/.*(?=#[^\s]*$)/,""));var o=t(i);function r(){o.detach().trigger("closed.bs.alert").remove()}e&&e.preventDefault(),o.length||(o=n.hasClass("alert")?n:n.parent()),o.trigger(e=t.Event("close.bs.alert")),e.isDefaultPrevented()||(o.removeClass("in"),t.support.transition&&o.hasClass("fade")?o.one("bsTransitionEnd",r).emulateTransitionEnd(150):r())};var i=t.fn.alert;t.fn.alert=function(e){return this.each((function(){var i=t(this),o=i.data("bs.alert");o||i.data("bs.alert",o=new n(this)),"string"==typeof e&&o[e].call(i)}))},t.fn.alert.Constructor=n,t.fn.alert.noConflict=function(){return t.fn.alert=i,this},t(document).on("click.bs.alert.data-api",e,n.prototype.close)}(t),function(t){"use strict";var e=function(n,i){this.$element=t(n),this.options=t.extend({},e.DEFAULTS,i),this.isLoading=!1};function n(n){return this.each((function(){var i=t(this),o=i.data("bs.button"),r="object"==typeof n&&n;o||i.data("bs.button",o=new e(this,r)),"toggle"==n?o.toggle():n&&o.setState(n)}))}e.VERSION="3.2.0",e.DEFAULTS={loadingText:"loading..."},e.prototype.setState=function(e){var n="disabled",i=this.$element,o=i.is("input")?"val":"html",r=i.data();e+="Text",null==r.resetText&&i.data("resetText",i[o]()),i[o](null==r[e]?this.options[e]:r[e]),setTimeout(t.proxy((function(){"loadingText"==e?(this.isLoading=!0,i.addClass(n).attr(n,n)):this.isLoading&&(this.isLoading=!1,i.removeClass(n).removeAttr(n))}),this),0)},e.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")&&this.$element.hasClass("active")?t=!1:e.find(".active").removeClass("active")),t&&n.prop("checked",!this.$element.hasClass("active")).trigger("change")}t&&this.$element.toggleClass("active")};var i=t.fn.button;t.fn.button=n,t.fn.button.Constructor=e,t.fn.button.noConflict=function(){return t.fn.button=i,this},t(document).on("click.bs.button.data-api",'[data-toggle^="button"]',(function(e){var i=t(e.target);i.hasClass("btn")||(i=i.closest(".btn")),n.call(i,"toggle"),e.preventDefault()}))}(t),function(t){"use strict";var e=function(e,n){this.$element=t(e).on("keydown.bs.carousel",t.proxy(this.keydown,this)),this.$indicators=this.$element.find(".carousel-indicators"),this.options=n,this.paused=this.sliding=this.interval=this.$active=this.$items=null,"hover"==this.options.pause&&this.$element.on("mouseenter.bs.carousel",t.proxy(this.pause,this)).on("mouseleave.bs.carousel",t.proxy(this.cycle,this))};function n(n){return this.each((function(){var i=t(this),o=i.data("bs.carousel"),r=t.extend({},e.DEFAULTS,i.data(),"object"==typeof n&&n),s="string"==typeof n?n:r.slide;o||i.data("bs.carousel",o=new e(this,r)),"number"==typeof n?o.to(n):s?o[s]():r.interval&&o.pause().cycle()}))}e.VERSION="3.2.0",e.DEFAULTS={interval:5e3,pause:"hover",wrap:!0},e.prototype.keydown=function(t){switch(t.which){case 37:this.prev();break;case 39:this.next();break;default:return}t.preventDefault()},e.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},e.prototype.getItemIndex=function(t){return this.$items=t.parent().children(".item"),this.$items.index(t||this.$active)},e.prototype.to=function(e){var n=this,i=this.getItemIndex(this.$active=this.$element.find(".item.active"));if(!(e>this.$items.length-1||e<0))return this.sliding?this.$element.one("slid.bs.carousel",(function(){n.to(e)})):i==e?this.pause().cycle():this.slide(e>i?"next":"prev",t(this.$items[e]))},e.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},e.prototype.next=function(){if(!this.sliding)return this.slide("next")},e.prototype.prev=function(){if(!this.sliding)return this.slide("prev")},e.prototype.slide=function(e,n){var i=this.$element.find(".item.active"),o=n||i[e](),r=this.interval,s="next"==e?"left":"right",a="next"==e?"first":"last",l=this;if(!o.length){if(!this.options.wrap)return;o=this.$element.find(".item")[a]()}if(o.hasClass("active"))return this.sliding=!1;var c=o[0],u=t.Event("slide.bs.carousel",{relatedTarget:c,direction:s});if(this.$element.trigger(u),!u.isDefaultPrevented()){if(this.sliding=!0,r&&this.pause(),this.$indicators.length){this.$indicators.find(".active").removeClass("active");var p=t(this.$indicators.children()[this.getItemIndex(o)]);p&&p.addClass("active")}var d=t.Event("slid.bs.carousel",{relatedTarget:c,direction:s});return t.support.transition&&this.$element.hasClass("slide")?(o.addClass(e),o[0].offsetWidth,i.addClass(s),o.addClass(s),i.one("bsTransitionEnd",(function(){o.removeClass([e,s].join(" ")).addClass("active"),i.removeClass(["active",s].join(" ")),l.sliding=!1,setTimeout((function(){l.$element.trigger(d)}),0)})).emulateTransitionEnd(1e3*i.css("transition-duration").slice(0,-1))):(i.removeClass("active"),o.addClass("active"),this.sliding=!1,this.$element.trigger(d)),r&&this.cycle(),this}};var i=t.fn.carousel;t.fn.carousel=n,t.fn.carousel.Constructor=e,t.fn.carousel.noConflict=function(){return t.fn.carousel=i,this},t(document).on("click.bs.carousel.data-api","[data-slide], [data-slide-to]",(function(e){var i,o=t(this),r=t(o.attr("data-target")||(i=o.attr("href"))&&i.replace(/.*(?=#[^\s]+$)/,""));if(r.hasClass("carousel")){var s=t.extend({},r.data(),o.data()),a=o.attr("data-slide-to");a&&(s.interval=!1),n.call(r,s),a&&r.data("bs.carousel").to(a),e.preventDefault()}})),t(window).on("load",(function(){t('[data-ride="carousel"]').each((function(){var e=t(this);n.call(e,e.data())}))}))}(t),function(t){"use strict";var e=function(n,i){this.$element=t(n),this.options=t.extend({},e.DEFAULTS,i),this.transitioning=null,this.options.parent&&(this.$parent=t(this.options.parent)),this.options.toggle&&this.toggle()};function n(n){return this.each((function(){var i=t(this),o=i.data("bs.collapse"),r=t.extend({},e.DEFAULTS,i.data(),"object"==typeof n&&n);!o&&r.toggle&&"show"==n&&(n=!n),o||i.data("bs.collapse",o=new e(this,r)),"string"==typeof n&&o[n]()}))}e.VERSION="3.2.0",e.DEFAULTS={toggle:!0},e.prototype.dimension=function(){return this.$element.hasClass("width")?"width":"height"},e.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var e=t.Event("show.bs.collapse");if(this.$element.trigger(e),!e.isDefaultPrevented()){var i=this.$parent&&this.$parent.find("> .panel > .in");if(i&&i.length){var o=i.data("bs.collapse");if(o&&o.transitioning)return;n.call(i,"hide"),o||i.data("bs.collapse",null)}var r=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[r](0),this.transitioning=1;var s=function(){this.$element.removeClass("collapsing").addClass("collapse in")[r](""),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!t.support.transition)return s.call(this);var a=t.camelCase(["scroll",r].join("-"));this.$element.one("bsTransitionEnd",t.proxy(s,this)).emulateTransitionEnd(350)[r](this.$element[0][a])}}},e.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").removeClass("in"),this.transitioning=1;var i=function(){this.transitioning=0,this.$element.trigger("hidden.bs.collapse").removeClass("collapsing").addClass("collapse")};if(!t.support.transition)return i.call(this);this.$element[n](0).one("bsTransitionEnd",t.proxy(i,this)).emulateTransitionEnd(350)}}},e.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()};var i=t.fn.collapse;t.fn.collapse=n,t.fn.collapse.Constructor=e,t.fn.collapse.noConflict=function(){return t.fn.collapse=i,this},t(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',(function(e){var i,o=t(this),r=o.attr("data-target")||e.preventDefault()||(i=o.attr("href"))&&i.replace(/.*(?=#[^\s]+$)/,""),s=t(r),a=s.data("bs.collapse"),l=a?"toggle":o.data(),c=o.attr("data-parent"),u=c&&t(c);a&&a.transitioning||(u&&u.find('[data-toggle="collapse"][data-parent="'+c+'"]').not(o).addClass("collapsed"),o[s.hasClass("in")?"addClass":"removeClass"]("collapsed")),n.call(s,l)}))}(t),function(t){"use strict";var e='[data-toggle="dropdown"]',n=function(e){t(e).on("click.bs.dropdown",this.toggle)};function i(n){n&&3===n.which||(t(".dropdown-backdrop").remove(),t(e).each((function(){var e=o(t(this)),i={relatedTarget:this};e.hasClass("open")&&(e.trigger(n=t.Event("hide.bs.dropdown",i)),n.isDefaultPrevented()||e.removeClass("open").trigger("hidden.bs.dropdown",i))})))}function o(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(n);return i&&i.length?i:e.parent()}n.VERSION="3.2.0",n.prototype.toggle=function(e){var n=t(this);if(!n.is(".disabled, :disabled")){var r=o(n),s=r.hasClass("open");if(i(),!s){"ontouchstart"in document.documentElement&&!r.closest(".navbar-nav").length&&t('<div class="dropdown-backdrop"/>').insertAfter(t(this)).on("click",i);var a={relatedTarget:this};if(r.trigger(e=t.Event("show.bs.dropdown",a)),e.isDefaultPrevented())return;n.trigger("focus"),r.toggleClass("open").trigger("shown.bs.dropdown",a)}return!1}},n.prototype.keydown=function(n){if(/(38|40|27)/.test(n.keyCode)){var i=t(this);if(n.preventDefault(),n.stopPropagation(),!i.is(".disabled, :disabled")){var r=o(i),s=r.hasClass("open");if(!s||s&&27==n.keyCode)return 27==n.which&&r.find(e).trigger("focus"),i.trigger("click");var a=" li:not(.divider):visible a",l=r.find('[role="menu"]'+a+', [role="listbox"]'+a);if(l.length){var c=l.index(l.filter(":focus"));38==n.keyCode&&c>0&&c--,40==n.keyCode&&c<l.length-1&&c++,~c||(c=0),l.eq(c).trigger("focus")}}}};var r=t.fn.dropdown;t.fn.dropdown=function(e){return this.each((function(){var i=t(this),o=i.data("bs.dropdown");o||i.data("bs.dropdown",o=new n(this)),"string"==typeof e&&o[e].call(i)}))},t.fn.dropdown.Constructor=n,t.fn.dropdown.noConflict=function(){return t.fn.dropdown=r,this},t(document).on("click.bs.dropdown.data-api",i).on("click.bs.dropdown.data-api",".dropdown form",(function(t){t.stopPropagation()})).on("click.bs.dropdown.data-api",e,n.prototype.toggle).on("keydown.bs.dropdown.data-api",e+', [role="menu"], [role="listbox"]',n.prototype.keydown)}(t),function(t){"use strict";var e=function(e,n){this.options=n,this.$body=t(document.body),this.$element=t(e),this.$backdrop=this.isShown=null,this.scrollbarWidth=0,this.options.remote&&this.$element.find(".modal-content").load(this.options.remote,t.proxy((function(){this.$element.trigger("loaded.bs.modal")}),this))};function n(n,i){return this.each((function(){var o=t(this),r=o.data("bs.modal"),s=t.extend({},e.DEFAULTS,o.data(),"object"==typeof n&&n);r||o.data("bs.modal",r=new e(this,s)),"string"==typeof n?r[n](i):s.show&&r.show(i)}))}e.VERSION="3.2.0",e.DEFAULTS={backdrop:!0,keyboard:!0,show:!0},e.prototype.toggle=function(t){return this.isShown?this.hide():this.show(t)},e.prototype.show=function(e){var n=this,i=t.Event("show.bs.modal",{relatedTarget:e});this.$element.trigger(i),this.isShown||i.isDefaultPrevented()||(this.isShown=!0,this.checkScrollbar(),this.$body.addClass("modal-open"),this.setScrollbar(),this.escape(),this.$element.on("click.dismiss.bs.modal",'[data-dismiss="modal"]',t.proxy(this.hide,this)),this.backdrop((function(){var i=t.support.transition&&n.$element.hasClass("fade");n.$element.parent().length||n.$element.appendTo(n.$body),n.$element.show().scrollTop(0),i&&n.$element[0].offsetWidth,n.$element.addClass("in").attr("aria-hidden",!1),n.enforceFocus();var o=t.Event("shown.bs.modal",{relatedTarget:e});i?n.$element.find(".modal-dialog").one("bsTransitionEnd",(function(){n.$element.trigger("focus").trigger(o)})).emulateTransitionEnd(300):n.$element.trigger("focus").trigger(o)})))},e.prototype.hide=function(e){e&&e.preventDefault(),e=t.Event("hide.bs.modal"),this.$element.trigger(e),this.isShown&&!e.isDefaultPrevented()&&(this.isShown=!1,this.$body.removeClass("modal-open"),this.resetScrollbar(),this.escape(),t(document).off("focusin.bs.modal"),this.$element.removeClass("in").attr("aria-hidden",!0).off("click.dismiss.bs.modal"),t.support.transition&&this.$element.hasClass("fade")?this.$element.one("bsTransitionEnd",t.proxy(this.hideModal,this)).emulateTransitionEnd(300):this.hideModal())},e.prototype.enforceFocus=function(){t(document).off("focusin.bs.modal").on("focusin.bs.modal",t.proxy((function(t){this.$element[0]===t.target||this.$element.has(t.target).length||this.$element.trigger("focus")}),this))},e.prototype.escape=function(){this.isShown&&this.options.keyboard?this.$element.on("keyup.dismiss.bs.modal",t.proxy((function(t){27==t.which&&this.hide()}),this)):this.isShown||this.$element.off("keyup.dismiss.bs.modal")},e.prototype.hideModal=function(){var t=this;this.$element.hide(),this.backdrop((function(){t.$element.trigger("hidden.bs.modal")}))},e.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null},e.prototype.backdrop=function(e){var n=this,i=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var o=t.support.transition&&i;if(this.$backdrop=t('<div class="modal-backdrop '+i+'" />').appendTo(this.$body),this.$element.on("click.dismiss.bs.modal",t.proxy((function(t){t.target===t.currentTarget&&("static"==this.options.backdrop?this.$element[0].focus.call(this.$element[0]):this.hide.call(this))}),this)),o&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),!e)return;o?this.$backdrop.one("bsTransitionEnd",e).emulateTransitionEnd(150):e()}else if(!this.isShown&&this.$backdrop){this.$backdrop.removeClass("in");var r=function(){n.removeBackdrop(),e&&e()};t.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one("bsTransitionEnd",r).emulateTransitionEnd(150):r()}else e&&e()},e.prototype.checkScrollbar=function(){document.body.clientWidth>=window.innerWidth||(this.scrollbarWidth=this.scrollbarWidth||this.measureScrollbar())},e.prototype.setScrollbar=function(){var t=parseInt(this.$body.css("padding-right")||0,10);this.scrollbarWidth&&this.$body.css("padding-right",t+this.scrollbarWidth)},e.prototype.resetScrollbar=function(){this.$body.css("padding-right","")},e.prototype.measureScrollbar=function(){var t=document.createElement("div");t.className="modal-scrollbar-measure",this.$body.append(t);var e=t.offsetWidth-t.clientWidth;return this.$body[0].removeChild(t),e};var i=t.fn.modal;t.fn.modal=n,t.fn.modal.Constructor=e,t.fn.modal.noConflict=function(){return t.fn.modal=i,this},t(document).on("click.bs.modal.data-api",'[data-toggle="modal"]',(function(e){var i=t(this),o=i.attr("href"),r=t(i.attr("data-target")||o&&o.replace(/.*(?=#[^\s]+$)/,"")),s=r.data("bs.modal")?"toggle":t.extend({remote:!/#/.test(o)&&o},r.data(),i.data());i.is("a")&&e.preventDefault(),r.one("show.bs.modal",(function(t){t.isDefaultPrevented()||r.one("hidden.bs.modal",(function(){i.is(":visible")&&i.trigger("focus")}))})),n.call(r,s,this)}))}(t),function(t){"use strict";var e=function(t,e){this.type=this.options=this.enabled=this.timeout=this.hoverState=this.$element=null,this.init("tooltip",t,e)};e.VERSION="3.2.0",e.DEFAULTS={animation:!0,placement:"top",selector:!1,template:'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0}},e.prototype.init=function(e,n,i){this.enabled=!0,this.type=e,this.$element=t(n),this.options=this.getOptions(i),this.$viewport=this.options.viewport&&t(this.options.viewport.selector||this.options.viewport);for(var o=this.options.trigger.split(" "),r=o.length;r--;){var s=o[r];if("click"==s)this.$element.on("click."+this.type,this.options.selector,t.proxy(this.toggle,this));else if("manual"!=s){var a="hover"==s?"mouseenter":"focusin",l="hover"==s?"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()},e.prototype.getDefaults=function(){return e.DEFAULTS},e.prototype.getOptions=function(e){return(e=t.extend({},this.getDefaults(),this.$element.data(),e)).delay&&"number"==typeof e.delay&&(e.delay={show:e.delay,hide:e.delay}),e},e.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},e.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)),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)},e.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)),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)},e.prototype.show=function(){var e=t.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(e);var n=t.contains(document.documentElement,this.$element[0]);if(e.isDefaultPrevented()||!n)return;var i=this,o=this.tip(),r=this.getUID(this.type);this.setContent(),o.attr("id",r),this.$element.attr("aria-describedby",r),this.options.animation&&o.addClass("fade");var s="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(s);l&&(s=s.replace(a,"")||"top"),o.detach().css({top:0,left:0,display:"block"}).addClass(s).data("bs."+this.type,this),this.options.container?o.appendTo(this.options.container):o.insertAfter(this.$element);var c=this.getPosition(),u=o[0].offsetWidth,p=o[0].offsetHeight;if(l){var d=s,h=this.$element.parent(),f=this.getPosition(h);s="bottom"==s&&c.top+c.height+p-f.scroll>f.height?"top":"top"==s&&c.top-f.scroll-p<0?"bottom":"right"==s&&c.right+u>f.width?"left":"left"==s&&c.left-u<f.left?"right":s,o.removeClass(d).addClass(s)}var m=this.getCalculatedOffset(s,c,u,p);this.applyPlacement(m,s);var g=function(){i.$element.trigger("shown.bs."+i.type),i.hoverState=null};t.support.transition&&this.$tip.hasClass("fade")?o.one("bsTransitionEnd",g).emulateTransitionEnd(150):g()}},e.prototype.applyPlacement=function(e,n){var i=this.tip(),o=i[0].offsetWidth,r=i[0].offsetHeight,s=parseInt(i.css("margin-top"),10),a=parseInt(i.css("margin-left"),10);isNaN(s)&&(s=0),isNaN(a)&&(a=0),e.top=e.top+s,e.left=e.left+a,t.offset.setOffset(i[0],t.extend({using:function(t){i.css({top:Math.round(t.top),left:Math.round(t.left)})}},e),0),i.addClass("in");var l=i[0].offsetWidth,c=i[0].offsetHeight;"top"==n&&c!=r&&(e.top=e.top+r-c);var u=this.getViewportAdjustedDelta(n,e,l,c);u.left?e.left+=u.left:e.top+=u.top;var p=u.left?2*u.left-o+l:2*u.top-r+c,d=u.left?"left":"top",h=u.left?"offsetWidth":"offsetHeight";i.offset(e),this.replaceArrow(p,i[0][h],d)},e.prototype.replaceArrow=function(t,e,n){this.arrow().css(n,t?50*(1-t/e)+"%":"")},e.prototype.setContent=function(){var t=this.tip(),e=this.getTitle();t.find(".tooltip-inner")[this.options.html?"html":"text"](e),t.removeClass("fade in top bottom left right")},e.prototype.hide=function(){var e=this,n=this.tip(),i=t.Event("hide.bs."+this.type);function o(){"in"!=e.hoverState&&n.detach(),e.$element.trigger("hidden.bs."+e.type)}if(this.$element.removeAttr("aria-describedby"),this.$element.trigger(i),!i.isDefaultPrevented())return n.removeClass("in"),t.support.transition&&this.$tip.hasClass("fade")?n.one("bsTransitionEnd",o).emulateTransitionEnd(150):o(),this.hoverState=null,this},e.prototype.fixTitle=function(){var t=this.$element;(t.attr("title")||"string"!=typeof t.attr("data-original-title"))&&t.attr("data-original-title",t.attr("title")||"").attr("title","")},e.prototype.hasContent=function(){return this.getTitle()},e.prototype.getPosition=function(e){var n=(e=e||this.$element)[0],i="BODY"==n.tagName;return t.extend({},"function"==typeof n.getBoundingClientRect?n.getBoundingClientRect():null,{scroll:i?document.documentElement.scrollTop||document.body.scrollTop:e.scrollTop(),width:i?t(window).width():e.outerWidth(),height:i?t(window).height():e.outerHeight()},i?{top:0,left:0}:e.offset())},e.prototype.getCalculatedOffset=function(t,e,n,i){return"bottom"==t?{top:e.top+e.height,left:e.left+e.width/2-n/2}:"top"==t?{top:e.top-i,left:e.left+e.width/2-n/2}:"left"==t?{top:e.top+e.height/2-i/2,left:e.left-n}:{top:e.top+e.height/2-i/2,left:e.left+e.width}},e.prototype.getViewportAdjustedDelta=function(t,e,n,i){var o={top:0,left:0};if(!this.$viewport)return o;var r=this.options.viewport&&this.options.viewport.padding||0,s=this.getPosition(this.$viewport);if(/right|left/.test(t)){var a=e.top-r-s.scroll,l=e.top+r-s.scroll+i;a<s.top?o.top=s.top-a:l>s.top+s.height&&(o.top=s.top+s.height-l)}else{var c=e.left-r,u=e.left+r+n;c<s.left?o.left=s.left-c:u>s.width&&(o.left=s.left+s.width-u)}return o},e.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)},e.prototype.getUID=function(t){do{t+=~~(1e6*Math.random())}while(document.getElementById(t));return t},e.prototype.tip=function(){return this.$tip=this.$tip||t(this.options.template)},e.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},e.prototype.validate=function(){this.$element[0].parentNode||(this.hide(),this.$element=null,this.options=null)},e.prototype.enable=function(){this.enabled=!0},e.prototype.disable=function(){this.enabled=!1},e.prototype.toggleEnabled=function(){this.enabled=!this.enabled},e.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))),n.tip().hasClass("in")?n.leave(n):n.enter(n)},e.prototype.destroy=function(){clearTimeout(this.timeout),this.hide().$element.off("."+this.type).removeData("bs."+this.type)};var n=t.fn.tooltip;t.fn.tooltip=function(n){return this.each((function(){var i=t(this),o=i.data("bs.tooltip"),r="object"==typeof n&&n;(o||"destroy"!=n)&&(o||i.data("bs.tooltip",o=new e(this,r)),"string"==typeof n&&o[n]())}))},t.fn.tooltip.Constructor=e,t.fn.tooltip.noConflict=function(){return t.fn.tooltip=n,this}}(t),function(t){"use strict";var e=function(t,e){this.init("popover",t,e)};if(!t.fn.tooltip)throw new Error("Popover requires tooltip.js");e.VERSION="3.2.0",e.DEFAULTS=t.extend({},t.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:'<div class="popover" role="tooltip"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'}),(e.prototype=t.extend({},t.fn.tooltip.Constructor.prototype)).constructor=e,e.prototype.getDefaults=function(){return e.DEFAULTS},e.prototype.setContent=function(){var t=this.tip(),e=this.getTitle(),n=this.getContent();t.find(".popover-title")[this.options.html?"html":"text"](e),t.find(".popover-content").empty()[this.options.html?"string"==typeof n?"html":"append":"text"](n),t.removeClass("fade top bottom left right in"),t.find(".popover-title").html()||t.find(".popover-title").hide()},e.prototype.hasContent=function(){return this.getTitle()||this.getContent()},e.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)},e.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")},e.prototype.tip=function(){return this.$tip||(this.$tip=t(this.options.template)),this.$tip};var n=t.fn.popover;t.fn.popover=function(n){return this.each((function(){var i=t(this),o=i.data("bs.popover"),r="object"==typeof n&&n;(o||"destroy"!=n)&&(o||i.data("bs.popover",o=new e(this,r)),"string"==typeof n&&o[n]())}))},t.fn.popover.Constructor=e,t.fn.popover.noConflict=function(){return t.fn.popover=n,this}}(t),function(t){"use strict";function e(n,i){var o=t.proxy(this.process,this);this.$body=t("body"),this.$scrollElement=t(n).is("body")?t(window):t(n),this.options=t.extend({},e.DEFAULTS,i),this.selector=(this.options.target||"")+" .nav li > a",this.offsets=[],this.targets=[],this.activeTarget=null,this.scrollHeight=0,this.$scrollElement.on("scroll.bs.scrollspy",o),this.refresh(),this.process()}function n(n){return this.each((function(){var i=t(this),o=i.data("bs.scrollspy"),r="object"==typeof n&&n;o||i.data("bs.scrollspy",o=new e(this,r)),"string"==typeof n&&o[n]()}))}e.VERSION="3.2.0",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="offset",n=0;t.isWindow(this.$scrollElement[0])||(e="position",n=this.$scrollElement.scrollTop()),this.offsets=[],this.targets=[],this.scrollHeight=this.getScrollHeight();var i=this;this.$body.find(this.selector).map((function(){var i=t(this),o=i.data("target")||i.attr("href"),r=/^#./.test(o)&&t(o);return r&&r.length&&r.is(":visible")&&[[r[e]().top+n,o]]||null})).sort((function(t,e){return t[0]-e[0]})).each((function(){i.offsets.push(this[0]),i.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,r=this.targets,s=this.activeTarget;if(this.scrollHeight!=n&&this.refresh(),e>=i)return s!=(t=r[r.length-1])&&this.activate(t);if(s&&e<=o[0])return s!=(t=r[0])&&this.activate(t);for(t=o.length;t--;)s!=r[t]&&e>=o[t]&&(!o[t+1]||e<=o[t+1])&&this.activate(r[t])},e.prototype.activate=function(e){this.activeTarget=e,t(this.selector).parentsUntil(this.options.target,".active").removeClass("active");var n=this.selector+'[data-target="'+e+'"],'+this.selector+'[href="'+e+'"]',i=t(n).parents("li").addClass("active");i.parent(".dropdown-menu").length&&(i=i.closest("li.dropdown").addClass("active")),i.trigger("activate.bs.scrollspy")};var i=t.fn.scrollspy;t.fn.scrollspy=n,t.fn.scrollspy.Constructor=e,t.fn.scrollspy.noConflict=function(){return t.fn.scrollspy=i,this},t(window).on("load.bs.scrollspy.data-api",(function(){t('[data-spy="scroll"]').each((function(){var e=t(this);n.call(e,e.data())}))}))}(t),function(t){"use strict";var e=function(e){this.element=t(e)};function n(n){return this.each((function(){var i=t(this),o=i.data("bs.tab");o||i.data("bs.tab",o=new e(this)),"string"==typeof n&&o[n]()}))}e.VERSION="3.2.0",e.prototype.show=function(){var e=this.element,n=e.closest("ul:not(.dropdown-menu)"),i=e.data("target");if(i||(i=(i=e.attr("href"))&&i.replace(/.*(?=#[^\s]*$)/,"")),!e.parent("li").hasClass("active")){var o=n.find(".active:last a")[0],r=t.Event("show.bs.tab",{relatedTarget:o});if(e.trigger(r),!r.isDefaultPrevented()){var s=t(i);this.activate(e.closest("li"),n),this.activate(s,s.parent(),(function(){e.trigger({type:"shown.bs.tab",relatedTarget:o})}))}}},e.prototype.activate=function(e,n,i){var o=n.find("> .active"),r=i&&t.support.transition&&o.hasClass("fade");function s(){o.removeClass("active").find("> .dropdown-menu > .active").removeClass("active"),e.addClass("active"),r?(e[0].offsetWidth,e.addClass("in")):e.removeClass("fade"),e.parent(".dropdown-menu")&&e.closest("li.dropdown").addClass("active"),i&&i()}r?o.one("bsTransitionEnd",s).emulateTransitionEnd(150):s(),o.removeClass("in")};var i=t.fn.tab;t.fn.tab=n,t.fn.tab.Constructor=e,t.fn.tab.noConflict=function(){return t.fn.tab=i,this},t(document).on("click.bs.tab.data-api",'[data-toggle="tab"], [data-toggle="pill"]',(function(e){e.preventDefault(),n.call(t(this),"show")}))}(t),function(t){"use strict";var e=function(n,i){this.options=t.extend({},e.DEFAULTS,i),this.$target=t(this.options.target).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(n),this.affixed=this.unpin=this.pinnedOffset=null,this.checkPosition()};function n(n){return this.each((function(){var i=t(this),o=i.data("bs.affix"),r="object"==typeof n&&n;o||i.data("bs.affix",o=new e(this,r)),"string"==typeof n&&o[n]()}))}e.VERSION="3.2.0",e.RESET="affix affix-top affix-bottom",e.DEFAULTS={offset:0,target:window},e.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(e.RESET).addClass("affix");var t=this.$target.scrollTop(),n=this.$element.offset();return this.pinnedOffset=n.top-t},e.prototype.checkPositionWithEventLoop=function(){setTimeout(t.proxy(this.checkPosition,this),1)},e.prototype.checkPosition=function(){if(this.$element.is(":visible")){var n=t(document).height(),i=this.$target.scrollTop(),o=this.$element.offset(),r=this.options.offset,s=r.top,a=r.bottom;"object"!=typeof r&&(a=s=r),"function"==typeof s&&(s=r.top(this.$element)),"function"==typeof a&&(a=r.bottom(this.$element));var l=!(null!=this.unpin&&i+this.unpin<=o.top)&&(null!=a&&o.top+this.$element.height()>=n-a?"bottom":null!=s&&i<=s&&"top");if(this.affixed!==l){null!=this.unpin&&this.$element.css("top","");var c="affix"+(l?"-"+l:""),u=t.Event(c+".bs.affix");this.$element.trigger(u),u.isDefaultPrevented()||(this.affixed=l,this.unpin="bottom"==l?this.getPinnedOffset():null,this.$element.removeClass(e.RESET).addClass(c).trigger(t.Event(c.replace("affix","affixed"))),"bottom"==l&&this.$element.offset({top:n-this.$element.height()-a}))}}};var i=t.fn.affix;t.fn.affix=n,t.fn.affix.Constructor=e,t.fn.affix.noConflict=function(){return t.fn.affix=i,this},t(window).on("load",(function(){t('[data-spy="affix"]').each((function(){var e=t(this),i=e.data();i.offset=i.offset||{},i.offsetBottom&&(i.offset.bottom=i.offsetBottom),i.offsetTop&&(i.offset.top=i.offsetTop),n.call(e,i)}))}))}(t)}).call(this,n(0))},function(t,e,n){var i,o;i=[n(0)],o=function(t){!function(t){"use strict";var e,n,i,o;function r(e){var n=[{re:/[\xC0-\xC6]/g,ch:"A"},{re:/[\xE0-\xE6]/g,ch:"a"},{re:/[\xC8-\xCB]/g,ch:"E"},{re:/[\xE8-\xEB]/g,ch:"e"},{re:/[\xCC-\xCF]/g,ch:"I"},{re:/[\xEC-\xEF]/g,ch:"i"},{re:/[\xD2-\xD6]/g,ch:"O"},{re:/[\xF2-\xF6]/g,ch:"o"},{re:/[\xD9-\xDC]/g,ch:"U"},{re:/[\xF9-\xFC]/g,ch:"u"},{re:/[\xC7-\xE7]/g,ch:"c"},{re:/[\xD1]/g,ch:"N"},{re:/[\xF1]/g,ch:"n"}];return t.each(n,(function(){e=e.replace(this.re,this.ch)})),e}function s(t){var e={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"},n="(?:"+Object.keys(e).join("|")+")",i=new RegExp(n),o=new RegExp(n,"g"),r=null==t?"":""+t;return i.test(r)?r.replace(o,(function(t){return e[t]})):r}String.prototype.includes||(e={}.toString,n=function(){try{var t={},e=Object.defineProperty,n=e(t,t,t)&&e}catch(t){}return n}(),i="".indexOf,o=function(t){if(null==this)throw new TypeError;var n=String(this);if(t&&"[object RegExp]"==e.call(t))throw new TypeError;var o=n.length,r=String(t),s=r.length,a=arguments.length>1?arguments[1]:void 0,l=a?Number(a):0;return l!=l&&(l=0),!(s+Math.min(Math.max(l,0),o)>o)&&-1!=i.call(n,r,l)},n?n(String.prototype,"includes",{value:o,configurable:!0,writable:!0}):String.prototype.includes=o),String.prototype.startsWith||function(){var t=function(){try{var t={},e=Object.defineProperty,n=e(t,t,t)&&e}catch(t){}return n}(),e={}.toString,n=function(t){if(null==this)throw new TypeError;var n=String(this);if(t&&"[object RegExp]"==e.call(t))throw new TypeError;var i=n.length,o=String(t),r=o.length,s=arguments.length>1?arguments[1]:void 0,a=s?Number(s):0;a!=a&&(a=0);var l=Math.min(Math.max(a,0),i);if(r+l>i)return!1;for(var c=-1;++c<r;)if(n.charCodeAt(l+c)!=o.charCodeAt(c))return!1;return!0};t?t(String.prototype,"startsWith",{value:n,configurable:!0,writable:!0}):String.prototype.startsWith=n}(),Object.keys||(Object.keys=function(t,e,n){for(e in n=[],t)n.hasOwnProperty.call(t,e)&&n.push(e);return n}),t.fn.triggerNative=function(t){var e,n=this[0];n.dispatchEvent?("function"==typeof Event?e=new Event(t,{bubbles:!0}):(e=document.createEvent("Event")).initEvent(t,!0,!1),n.dispatchEvent(e)):(n.fireEvent&&((e=document.createEventObject()).eventType=t,n.fireEvent("on"+t,e)),this.trigger(t))},t.expr[":"].icontains=function(e,n,i){var o=t(e);return(o.data("tokens")||o.text()).toUpperCase().includes(i[3].toUpperCase())},t.expr[":"].ibegins=function(e,n,i){var o=t(e);return(o.data("tokens")||o.text()).toUpperCase().startsWith(i[3].toUpperCase())},t.expr[":"].aicontains=function(e,n,i){var o=t(e);return(o.data("tokens")||o.data("normalizedText")||o.text()).toUpperCase().includes(i[3].toUpperCase())},t.expr[":"].aibegins=function(e,n,i){var o=t(e);return(o.data("tokens")||o.data("normalizedText")||o.text()).toUpperCase().startsWith(i[3].toUpperCase())};var a=function(e,n,i){i&&(i.stopPropagation(),i.preventDefault()),this.$element=t(e),this.$newElement=null,this.$button=null,this.$menu=null,this.$lis=null,this.options=n,null===this.options.title&&(this.options.title=this.$element.attr("title")),this.val=a.prototype.val,this.render=a.prototype.render,this.refresh=a.prototype.refresh,this.setStyle=a.prototype.setStyle,this.selectAll=a.prototype.selectAll,this.deselectAll=a.prototype.deselectAll,this.destroy=a.prototype.remove,this.remove=a.prototype.remove,this.show=a.prototype.show,this.hide=a.prototype.hide,this.init()};function l(e,n){var i,o=arguments,r=e,s=n;[].shift.apply(o);var l=this.each((function(){var e=t(this);if(e.is("select")){var n=e.data("selectpicker"),l="object"==typeof r&&r;if(n){if(l)for(var c in l)l.hasOwnProperty(c)&&(n.options[c]=l[c])}else{var u=t.extend({},a.DEFAULTS,t.fn.selectpicker.defaults||{},e.data(),l);u.template=t.extend({},a.DEFAULTS.template,t.fn.selectpicker.defaults?t.fn.selectpicker.defaults.template:{},e.data().template,l.template),e.data("selectpicker",n=new a(this,u,s))}"string"==typeof r&&(i=n[r]instanceof Function?n[r].apply(n,o):n.options[r])}}));return void 0!==i?i:l}a.VERSION="1.7.5",a.DEFAULTS={noneSelectedText:"Nothing selected",noneResultsText:"No results matched {0}",countSelectedText:function(t,e){return 1==t?"{0} item selected":"{0} items selected"},maxOptionsText:function(t,e){return[1==t?"Limit reached ({n} item max)":"Limit reached ({n} items max)",1==e?"Group limit reached ({n} item max)":"Group limit reached ({n} items max)"]},selectAllText:"Select All",deselectAllText:"Deselect All",doneButton:!1,doneButtonText:"Close",multipleSeparator:", ",styleBase:"btn",style:"btn-default",size:"auto",title:null,selectedTextFormat:"values",width:!1,container:!1,hideDisabled:!1,showSubtext:!1,showIcon:!0,showContent:!0,dropupAuto:!0,header:!1,liveSearch:!1,liveSearchPlaceholder:null,liveSearchNormalize:!1,liveSearchStyle:"contains",actionsBox:!1,iconBase:"glyphicon",tickIcon:"glyphicon-ok",template:{caret:'<span class="caret"></span>'},maxOptions:!1,mobile:!1,selectOnTab:!1,dropdownAlignRight:!1},a.prototype={constructor:a,init:function(){var e=this,n=this.$element.attr("id");this.$element.addClass("bs-select-hidden"),this.liObj={},this.multiple=this.$element.prop("multiple"),this.autofocus=this.$element.prop("autofocus"),this.$newElement=this.createView(),this.$element.after(this.$newElement),this.$button=this.$newElement.children("button"),this.$menu=this.$newElement.children(".dropdown-menu"),this.$menuInner=this.$menu.children(".inner"),this.$searchbox=this.$menu.find("input"),this.options.dropdownAlignRight&&this.$menu.addClass("dropdown-menu-right"),void 0!==n&&(this.$button.attr("data-id",n),t('label[for="'+n+'"]').click((function(t){t.preventDefault(),e.$button.focus()}))),this.checkDisabled(),this.clickListener(),this.options.liveSearch&&this.liveSearchListener(),this.render(),this.setStyle(),this.setWidth(),this.options.container&&this.selectPosition(),this.$menu.data("this",this),this.$newElement.data("this",this),this.options.mobile&&this.mobile(),this.$newElement.on({"hide.bs.dropdown":function(t){e.$element.trigger("hide.bs.select",t)},"hidden.bs.dropdown":function(t){e.$element.trigger("hidden.bs.select",t)},"show.bs.dropdown":function(t){e.$element.trigger("show.bs.select",t)},"shown.bs.dropdown":function(t){e.$element.trigger("shown.bs.select",t)}}),setTimeout((function(){e.$element.trigger("loaded.bs.select")}))},createDropdown:function(){var e=this.multiple?" show-tick":"",n=this.$element.parent().hasClass("input-group")?" input-group-btn":"",i=this.autofocus?" autofocus":"",o=this.options.header?'<div class="popover-title"><button type="button" class="close" aria-hidden="true">&times;</button>'+this.options.header+"</div>":"",r=this.options.liveSearch?'<div class="bs-searchbox"><input type="text" class="form-control" autocomplete="off"'+(null===this.options.liveSearchPlaceholder?"":' placeholder="'+s(this.options.liveSearchPlaceholder)+'"')+"></div>":"",a=this.multiple&&this.options.actionsBox?'<div class="bs-actionsbox"><div class="btn-group btn-group-sm btn-block"><button type="button" class="actions-btn bs-select-all btn btn-default">'+this.options.selectAllText+'</button><button type="button" class="actions-btn bs-deselect-all btn btn-default">'+this.options.deselectAllText+"</button></div></div>":"",l=this.multiple&&this.options.doneButton?'<div class="bs-donebutton"><div class="btn-group btn-block"><button type="button" class="btn btn-sm btn-default">'+this.options.doneButtonText+"</button></div></div>":"",c='<div class="btn-group bootstrap-select'+e+n+'"><button type="button" class="'+this.options.styleBase+' dropdown-toggle" data-toggle="dropdown"'+i+'><span class="filter-option pull-left"></span>&nbsp;<span class="bs-caret">'+this.options.template.caret+'</span></button><div class="dropdown-menu open">'+o+r+a+'<ul class="dropdown-menu inner" role="menu"></ul>'+l+"</div></div>";return t(c)},createView:function(){var t=this.createDropdown(),e=this.createLi();return t.find("ul")[0].innerHTML=e,t},reloadLi:function(){this.destroyLi();var t=this.createLi();this.$menuInner[0].innerHTML=t},destroyLi:function(){this.$menu.find("li").remove()},createLi:function(){var e=this,n=[],i=0,o=document.createElement("option"),a=-1,l=function(t,e,n,i){return"<li"+(void 0!==n&""!==n?' class="'+n+'"':"")+(void 0!==e&null!==e?' data-original-index="'+e+'"':"")+(void 0!==i&null!==i?'data-optgroup="'+i+'"':"")+">"+t+"</li>"},c=function(t,n,i,o){return'<a tabindex="0"'+(void 0!==n?' class="'+n+'"':"")+(void 0!==i?' style="'+i+'"':"")+(e.options.liveSearchNormalize?' data-normalized-text="'+r(s(t))+'"':"")+(void 0!==o||null!==o?' data-tokens="'+o+'"':"")+">"+t+'<span class="'+e.options.iconBase+" "+e.options.tickIcon+' check-mark"></span></a>'};if(this.options.title&&!this.multiple&&(a--,!this.$element.find(".bs-title-option").length)){var u=this.$element[0];o.className="bs-title-option",o.appendChild(document.createTextNode(this.options.title)),o.value="",u.insertBefore(o,u.firstChild),void 0===t(u.options[u.selectedIndex]).attr("selected")&&(o.selected=!0)}return this.$element.find("option").each((function(o){var r=t(this);if(a++,!r.hasClass("bs-title-option")){var s=this.className||"",u=this.style.cssText,p=r.data("content")?r.data("content"):r.html(),d=r.data("tokens")?r.data("tokens"):null,h=void 0!==r.data("subtext")?'<small class="text-muted">'+r.data("subtext")+"</small>":"",f=void 0!==r.data("icon")?'<span class="'+e.options.iconBase+" "+r.data("icon")+'"></span> ':"",m=this.disabled||"OPTGROUP"===this.parentNode.tagName&&this.parentNode.disabled;if(""!==f&&m&&(f="<span>"+f+"</span>"),e.options.hideDisabled&&m)a--;else{if(r.data("content")||(p=f+'<span class="text">'+p+h+"</span>"),"OPTGROUP"===this.parentNode.tagName&&!0!==r.data("divider")){var g=" "+this.parentNode.className||!1;if(0===r.index()){i+=1;var v=this.parentNode.label,y=void 0!==r.parent().data("subtext")?'<small class="text-muted">'+r.parent().data("subtext")+"</small>":"";v=(r.parent().data("icon")?'<span class="'+e.options.iconBase+" "+r.parent().data("icon")+'"></span> ':"")+'<span class="text">'+v+y+"</span>",0!==o&&n.length>0&&(a++,n.push(l("",null,"divider",i+"div"))),a++,n.push(l(v,null,"dropdown-header"+g,i))}n.push(l(c(p,"opt "+s+g,u,d),o,"",i))}else!0===r.data("divider")?n.push(l("",o,"divider")):!0===r.data("hidden")?n.push(l(c(p,s,u,d),o,"hidden is-hidden")):(this.previousElementSibling&&"OPTGROUP"===this.previousElementSibling.tagName&&(a++,n.push(l("",null,"divider",i+"div"))),n.push(l(c(p,s,u,d),o)));e.liObj[o]=a}}})),this.multiple||0!==this.$element.find("option:selected").length||this.options.title||this.$element.find("option").eq(0).prop("selected",!0).attr("selected","selected"),n.join("")},findLis:function(){return null==this.$lis&&(this.$lis=this.$menu.find("li")),this.$lis},render:function(e){var n,i=this;!1!==e&&this.$element.find("option").each((function(t){var e=i.findLis().eq(i.liObj[t]);i.setDisabled(t,this.disabled||"OPTGROUP"===this.parentNode.tagName&&this.parentNode.disabled,e),i.setSelected(t,this.selected,e)})),this.tabIndex();var o=this.$element.find("option").map((function(){if(this.selected){if(i.options.hideDisabled&&(this.disabled||"OPTGROUP"===this.parentNode.tagName&&this.parentNode.disabled))return;var e,n=t(this),o=n.data("icon")&&i.options.showIcon?'<i class="'+i.options.iconBase+" "+n.data("icon")+'"></i> ':"";return e=i.options.showSubtext&&n.data("subtext")&&!i.multiple?' <small class="text-muted">'+n.data("subtext")+"</small>":"",void 0!==n.attr("title")?n.attr("title"):n.data("content")&&i.options.showContent?n.data("content"):o+n.html()+e}})).toArray(),r=this.multiple?o.join(this.options.multipleSeparator):o[0];if(this.multiple&&this.options.selectedTextFormat.indexOf("count")>-1){var s=this.options.selectedTextFormat.split(">");if(s.length>1&&o.length>s[1]||1==s.length&&o.length>=2){n=this.options.hideDisabled?", [disabled]":"";var a=this.$element.find("option").not('[data-divider="true"], [data-hidden="true"]'+n).length;r=("function"==typeof this.options.countSelectedText?this.options.countSelectedText(o.length,a):this.options.countSelectedText).replace("{0}",o.length.toString()).replace("{1}",a.toString())}}null==this.options.title&&(this.options.title=this.$element.attr("title")),"static"==this.options.selectedTextFormat&&(r=this.options.title),r||(r=void 0!==this.options.title?this.options.title:this.options.noneSelectedText),this.$button.attr("title",t.trim(r.replace(/<[^>]*>?/g,""))),this.$button.children(".filter-option").html(r),this.$element.trigger("rendered.bs.select")},setStyle:function(t,e){this.$element.attr("class")&&this.$newElement.addClass(this.$element.attr("class").replace(/selectpicker|mobile-device|bs-select-hidden|validate\[.*\]/gi,""));var n=t||this.options.style;"add"==e?this.$button.addClass(n):"remove"==e?this.$button.removeClass(n):(this.$button.removeClass(this.options.style),this.$button.addClass(n))},liHeight:function(e){if(e||!1!==this.options.size&&!this.sizeInfo){var n=document.createElement("div"),i=document.createElement("div"),o=document.createElement("ul"),r=document.createElement("li"),s=document.createElement("li"),a=document.createElement("a"),l=document.createElement("span"),c=this.options.header?this.$menu.find(".popover-title")[0].cloneNode(!0):null,u=this.options.liveSearch?document.createElement("div"):null,p=this.options.actionsBox&&this.multiple?this.$menu.find(".bs-actionsbox")[0].cloneNode(!0):null,d=this.options.doneButton&&this.multiple?this.$menu.find(".bs-donebutton")[0].cloneNode(!0):null;if(l.className="text",n.className=this.$menu[0].parentNode.className+" open",i.className="dropdown-menu open",o.className="dropdown-menu inner",r.className="divider",l.appendChild(document.createTextNode("Inner text")),a.appendChild(l),s.appendChild(a),o.appendChild(s),o.appendChild(r),c&&i.appendChild(c),u){var h=document.createElement("span");u.className="bs-searchbox",h.className="form-control",u.appendChild(h),i.appendChild(u)}p&&i.appendChild(p),i.appendChild(o),d&&i.appendChild(d),n.appendChild(i),document.body.appendChild(n);var f=a.offsetHeight,m=c?c.offsetHeight:0,g=u?u.offsetHeight:0,v=p?p.offsetHeight:0,y=d?d.offsetHeight:0,b=t(r).outerHeight(!0),x="function"==typeof getComputedStyle&&getComputedStyle(i),w=x?null:t(i),k=parseInt(x?x.paddingTop:w.css("paddingTop"))+parseInt(x?x.paddingBottom:w.css("paddingBottom"))+parseInt(x?x.borderTopWidth:w.css("borderTopWidth"))+parseInt(x?x.borderBottomWidth:w.css("borderBottomWidth")),$=k+parseInt(x?x.marginTop:w.css("marginTop"))+parseInt(x?x.marginBottom:w.css("marginBottom"))+2;document.body.removeChild(n),this.sizeInfo={liHeight:f,headerHeight:m,searchHeight:g,actionsHeight:v,doneButtonHeight:y,dividerHeight:b,menuPadding:k,menuExtras:$}}},setSize:function(){if(this.findLis(),this.liHeight(),this.options.header&&this.$menu.css("padding-top",0),!1!==this.options.size){var e,n,i,o,r=this,s=this.$menu,a=this.$menuInner,l=t(window),c=this.$newElement[0].offsetHeight,u=this.sizeInfo.liHeight,p=this.sizeInfo.headerHeight,d=this.sizeInfo.searchHeight,h=this.sizeInfo.actionsHeight,f=this.sizeInfo.doneButtonHeight,m=this.sizeInfo.dividerHeight,g=this.sizeInfo.menuPadding,v=this.sizeInfo.menuExtras,y=this.options.hideDisabled?".disabled":"",b=function(){i=r.$newElement.offset().top-l.scrollTop(),o=l.height()-i-c};if(b(),"auto"===this.options.size){var x=function(){var l,c=function(e,n){return function(i){return n?i.classList?i.classList.contains(e):t(i).hasClass(e):!(i.classList?i.classList.contains(e):t(i).hasClass(e))}},m=r.$menuInner[0].getElementsByTagName("li"),y=Array.prototype.filter?Array.prototype.filter.call(m,c("hidden",!1)):r.$lis.not(".hidden"),x=Array.prototype.filter?Array.prototype.filter.call(y,c("dropdown-header",!0)):y.filter(".dropdown-header");b(),e=o-v,r.options.container?(s.data("height")||s.data("height",s.height()),n=s.data("height")):n=s.height(),r.options.dropupAuto&&r.$newElement.toggleClass("dropup",i>o&&e-v<n),r.$newElement.hasClass("dropup")&&(e=i-v),l=y.length+x.length>3?3*u+v-2:0,s.css({"max-height":e+"px",overflow:"hidden","min-height":l+p+d+h+f+"px"}),a.css({"max-height":e-p-d-h-f-g+"px","overflow-y":"auto","min-height":Math.max(l-g,0)+"px"})};x(),this.$searchbox.off("input.getSize propertychange.getSize").on("input.getSize propertychange.getSize",x),l.off("resize.getSize scroll.getSize").on("resize.getSize scroll.getSize",x)}else if(this.options.size&&"auto"!=this.options.size&&this.$lis.not(y).length>this.options.size){var w=this.$lis.not(".divider").not(y).children().slice(0,this.options.size).last().parent().index(),k=this.$lis.slice(0,w+1).filter(".divider").length;e=u*this.options.size+k*m+g,r.options.container?(s.data("height")||s.data("height",s.height()),n=s.data("height")):n=s.height(),r.options.dropupAuto&&this.$newElement.toggleClass("dropup",i>o&&e-v<n),s.css({"max-height":e+p+d+h+f+"px",overflow:"hidden","min-height":""}),a.css({"max-height":e-g+"px","overflow-y":"auto","min-height":""})}}},setWidth:function(){if("auto"===this.options.width){this.$menu.css("min-width","0");var t=this.$menu.parent().clone().appendTo("body"),e=this.options.container?this.$newElement.clone().appendTo("body"):t,n=t.children(".dropdown-menu").outerWidth(),i=e.css("width","auto").children("button").outerWidth();t.remove(),e.remove(),this.$newElement.css("width",Math.max(n,i)+"px")}else"fit"===this.options.width?(this.$menu.css("min-width",""),this.$newElement.css("width","").addClass("fit-width")):this.options.width?(this.$menu.css("min-width",""),this.$newElement.css("width",this.options.width)):(this.$menu.css("min-width",""),this.$newElement.css("width",""));this.$newElement.hasClass("fit-width")&&"fit"!==this.options.width&&this.$newElement.removeClass("fit-width")},selectPosition:function(){var e,n,i=this,o=t('<div class="bs-container" />'),r=function(t){o.addClass(t.attr("class").replace(/form-control|fit-width/gi,"")).toggleClass("dropup",t.hasClass("dropup")),e=t.offset(),n=t.hasClass("dropup")?0:t[0].offsetHeight,o.css({top:e.top+n,left:e.left,width:t[0].offsetWidth})};this.$newElement.on("click",(function(){i.isDisabled()||(r(t(this)),o.appendTo(i.options.container),o.toggleClass("open",!t(this).hasClass("open")),o.append(i.$menu))})),t(window).on("resize scroll",(function(){r(i.$newElement)})),this.$element.on("hide.bs.select",(function(){i.$menu.data("height",i.$menu.height()),o.detach()}))},setSelected:function(t,e,n){n||(n=this.findLis().eq(this.liObj[t])),n.toggleClass("selected",e)},setDisabled:function(t,e,n){n||(n=this.findLis().eq(this.liObj[t])),e?n.addClass("disabled").children("a").attr("href","#").attr("tabindex",-1):n.removeClass("disabled").children("a").removeAttr("href").attr("tabindex",0)},isDisabled:function(){return this.$element[0].disabled},checkDisabled:function(){var t=this;this.isDisabled()?(this.$newElement.addClass("disabled"),this.$button.addClass("disabled").attr("tabindex",-1)):(this.$button.hasClass("disabled")&&(this.$newElement.removeClass("disabled"),this.$button.removeClass("disabled")),-1!=this.$button.attr("tabindex")||this.$element.data("tabindex")||this.$button.removeAttr("tabindex")),this.$button.click((function(){return!t.isDisabled()}))},tabIndex:function(){this.$element.is("[tabindex]")&&(this.$element.data("tabindex",this.$element.attr("tabindex")),this.$button.attr("tabindex",this.$element.data("tabindex")))},clickListener:function(){var e=this,n=t(document);this.$newElement.on("touchstart.dropdown",".dropdown-menu",(function(t){t.stopPropagation()})),n.data("spaceSelect",!1),this.$button.on("keyup",(function(t){/(32)/.test(t.keyCode.toString(10))&&n.data("spaceSelect")&&(t.preventDefault(),n.data("spaceSelect",!1))})),this.$newElement.on("click",(function(){e.setSize(),e.$element.on("shown.bs.select",(function(){if(e.options.liveSearch||e.multiple){if(!e.multiple){var t=e.liObj[e.$element[0].selectedIndex];if("number"!=typeof t||!1===e.options.size)return;var n=e.$lis.eq(t)[0].offsetTop-e.$menuInner[0].offsetTop;n=n-e.$menuInner[0].offsetHeight/2+e.sizeInfo.liHeight/2,e.$menuInner[0].scrollTop=n}}else e.$menuInner.find(".selected a").focus()}))})),this.$menuInner.on("click","li a",(function(n){var i=t(this),o=i.parent().data("originalIndex"),r=e.$element.val(),s=e.$element.prop("selectedIndex");if(e.multiple&&n.stopPropagation(),n.preventDefault(),!e.isDisabled()&&!i.parent().hasClass("disabled")){var a=e.$element.find("option"),l=a.eq(o),c=l.prop("selected"),u=l.parent("optgroup"),p=e.options.maxOptions,d=u.data("maxOptions")||!1;if(e.multiple){if(l.prop("selected",!c),e.setSelected(o,!c),i.blur(),!1!==p||!1!==d){var h=p<a.filter(":selected").length,f=d<u.find("option:selected").length;if(p&&h||d&&f)if(p&&1==p)a.prop("selected",!1),l.prop("selected",!0),e.$menuInner.find(".selected").removeClass("selected"),e.setSelected(o,!0);else if(d&&1==d){u.find("option:selected").prop("selected",!1),l.prop("selected",!0);var m=i.parent().data("optgroup");e.$menuInner.find('[data-optgroup="'+m+'"]').removeClass("selected"),e.setSelected(o,!0)}else{var g="function"==typeof e.options.maxOptionsText?e.options.maxOptionsText(p,d):e.options.maxOptionsText,v=g[0].replace("{n}",p),y=g[1].replace("{n}",d),b=t('<div class="notify"></div>');g[2]&&(v=v.replace("{var}",g[2][p>1?0:1]),y=y.replace("{var}",g[2][d>1?0:1])),l.prop("selected",!1),e.$menu.append(b),p&&h&&(b.append(t("<div>"+v+"</div>")),e.$element.trigger("maxReached.bs.select")),d&&f&&(b.append(t("<div>"+y+"</div>")),e.$element.trigger("maxReachedGrp.bs.select")),setTimeout((function(){e.setSelected(o,!1)}),10),b.delay(750).fadeOut(300,(function(){t(this).remove()}))}}}else a.prop("selected",!1),l.prop("selected",!0),e.$menuInner.find(".selected").removeClass("selected"),e.setSelected(o,!0);e.multiple?e.options.liveSearch&&e.$searchbox.focus():e.$button.focus(),(r!=e.$element.val()&&e.multiple||s!=e.$element.prop("selectedIndex")&&!e.multiple)&&(e.$element.triggerNative("change"),e.$element.trigger("changed.bs.select",[o,l.prop("selected"),c]))}})),this.$menu.on("click","li.disabled a, .popover-title, .popover-title :not(.close)",(function(n){n.currentTarget==this&&(n.preventDefault(),n.stopPropagation(),e.options.liveSearch&&!t(n.target).hasClass("close")?e.$searchbox.focus():e.$button.focus())})),this.$menuInner.on("click",".divider, .dropdown-header",(function(t){t.preventDefault(),t.stopPropagation(),e.options.liveSearch?e.$searchbox.focus():e.$button.focus()})),this.$menu.on("click",".popover-title .close",(function(){e.$button.click()})),this.$searchbox.on("click",(function(t){t.stopPropagation()})),this.$menu.on("click",".actions-btn",(function(n){e.options.liveSearch?e.$searchbox.focus():e.$button.focus(),n.preventDefault(),n.stopPropagation(),t(this).hasClass("bs-select-all")?e.selectAll():e.deselectAll(),e.$element.triggerNative("change")})),this.$element.change((function(){e.render(!1)}))},liveSearchListener:function(){var e=this,n=t('<li class="no-results"></li>');this.$newElement.on("click.dropdown.data-api touchstart.dropdown.data-api",(function(){e.$menuInner.find(".active").removeClass("active"),e.$searchbox.val()&&(e.$searchbox.val(""),e.$lis.not(".is-hidden").removeClass("hidden"),n.parent().length&&n.remove()),e.multiple||e.$menuInner.find(".selected").addClass("active"),setTimeout((function(){e.$searchbox.focus()}),10)})),this.$searchbox.on("click.dropdown.data-api focus.dropdown.data-api touchend.dropdown.data-api",(function(t){t.stopPropagation()})),this.$searchbox.on("input propertychange",(function(){if(e.$searchbox.val()){var i=e.$lis.not(".is-hidden").removeClass("hidden").children("a");(i=e.options.liveSearchNormalize?i.not(":a"+e._searchStyle()+'("'+r(e.$searchbox.val())+'")'):i.not(":"+e._searchStyle()+'("'+e.$searchbox.val()+'")')).parent().addClass("hidden"),e.$lis.filter(".dropdown-header").each((function(){var n=t(this),i=n.data("optgroup");0===e.$lis.filter("[data-optgroup="+i+"]").not(n).not(".hidden").length&&(n.addClass("hidden"),e.$lis.filter("[data-optgroup="+i+"div]").addClass("hidden"))}));var o=e.$lis.not(".hidden");o.each((function(e){var n=t(this);n.hasClass("divider")&&(n.index()===o.first().index()||n.index()===o.last().index()||o.eq(e+1).hasClass("divider"))&&n.addClass("hidden")})),e.$lis.not(".hidden, .no-results").length?n.parent().length&&n.remove():(n.parent().length&&n.remove(),n.html(e.options.noneResultsText.replace("{0}",'"'+s(e.$searchbox.val())+'"')).show(),e.$menuInner.append(n))}else e.$lis.not(".is-hidden").removeClass("hidden"),n.parent().length&&n.remove();e.$lis.filter(".active").removeClass("active"),e.$searchbox.val()&&e.$lis.not(".hidden, .divider, .dropdown-header").eq(0).addClass("active").children("a").focus(),t(this).focus()}))},_searchStyle:function(){return{begins:"ibegins",startsWith:"ibegins"}[this.options.liveSearchStyle]||"icontains"},val:function(t){return void 0!==t?(this.$element.val(t),this.render(),this.$element):this.$element.val()},changeAll:function(e){void 0===e&&(e=!0),this.findLis();for(var n=this.$element.find("option"),i=this.$lis.not(".divider, .dropdown-header, .disabled, .hidden").toggleClass("selected",e),o=i.length,r=[],s=0;s<o;s++){var a=i[s].getAttribute("data-original-index");r[r.length]=n.eq(a)[0]}t(r).prop("selected",e),this.render(!1)},selectAll:function(){return this.changeAll(!0)},deselectAll:function(){return this.changeAll(!1)},keydown:function(e){var n,i,o,s,a,l,c,u,p,d=t(this),h=d.is("input")?d.parent().parent():d.parent(),f=h.data("this"),m=":not(.disabled, .hidden, .dropdown-header, .divider)",g={32:" ",48:"0",49:"1",50:"2",51:"3",52:"4",53:"5",54:"6",55:"7",56:"8",57:"9",59:";",65:"a",66:"b",67:"c",68:"d",69:"e",70:"f",71:"g",72:"h",73:"i",74:"j",75:"k",76:"l",77:"m",78:"n",79:"o",80:"p",81:"q",82:"r",83:"s",84:"t",85:"u",86:"v",87:"w",88:"x",89:"y",90:"z",96:"0",97:"1",98:"2",99:"3",100:"4",101:"5",102:"6",103:"7",104:"8",105:"9"};if(f.options.liveSearch&&(h=d.parent().parent()),f.options.container&&(h=f.$menu),n=t("[role=menu] li",h),!(p=f.$menu.parent().hasClass("open"))&&(e.keyCode>=48&&e.keyCode<=57||e.keyCode>=96&&e.keyCode<=105||e.keyCode>=65&&e.keyCode<=90)&&(f.options.container?f.$newElement.trigger("click"):(f.setSize(),f.$menu.parent().addClass("open"),p=!0),f.$searchbox.focus()),f.options.liveSearch&&(/(^9$|27)/.test(e.keyCode.toString(10))&&p&&0===f.$menu.find(".active").length&&(e.preventDefault(),f.$menu.parent().removeClass("open"),f.options.container&&f.$newElement.removeClass("open"),f.$button.focus()),n=t("[role=menu] li"+m,h),d.val()||/(38|40)/.test(e.keyCode.toString(10))||0===n.filter(".active").length&&(n=f.$menuInner.find("li"),n=f.options.liveSearchNormalize?n.filter(":a"+f._searchStyle()+"("+r(g[e.keyCode])+")"):n.filter(":"+f._searchStyle()+"("+g[e.keyCode]+")"))),n.length){if(/(38|40)/.test(e.keyCode.toString(10)))i=n.index(n.find("a").filter(":focus").parent()),s=n.filter(m).first().index(),a=n.filter(m).last().index(),o=n.eq(i).nextAll(m).eq(0).index(),l=n.eq(i).prevAll(m).eq(0).index(),c=n.eq(o).prevAll(m).eq(0).index(),f.options.liveSearch&&(n.each((function(e){t(this).hasClass("disabled")||t(this).data("index",e)})),i=n.index(n.filter(".active")),s=n.first().data("index"),a=n.last().data("index"),o=n.eq(i).nextAll().eq(0).data("index"),l=n.eq(i).prevAll().eq(0).data("index"),c=n.eq(o).prevAll().eq(0).data("index")),u=d.data("prevIndex"),38==e.keyCode?(f.options.liveSearch&&i--,i!=c&&i>l&&(i=l),i<s&&(i=s),i==u&&(i=a)):40==e.keyCode&&(f.options.liveSearch&&i++,-1==i&&(i=0),i!=c&&i<o&&(i=o),i>a&&(i=a),i==u&&(i=s)),d.data("prevIndex",i),f.options.liveSearch?(e.preventDefault(),d.hasClass("dropdown-toggle")||(n.removeClass("active").eq(i).addClass("active").children("a").focus(),d.focus())):n.eq(i).children("a").focus();else if(!d.is("input")){var v,y=[];n.each((function(){t(this).hasClass("disabled")||t.trim(t(this).children("a").text().toLowerCase()).substring(0,1)==g[e.keyCode]&&y.push(t(this).index())})),v=t(document).data("keycount"),v++,t(document).data("keycount",v),t.trim(t(":focus").text().toLowerCase()).substring(0,1)!=g[e.keyCode]?(v=1,t(document).data("keycount",v)):v>=y.length&&(t(document).data("keycount",0),v>y.length&&(v=1)),n.eq(y[v-1]).children("a").focus()}if((/(13|32)/.test(e.keyCode.toString(10))||/(^9$)/.test(e.keyCode.toString(10))&&f.options.selectOnTab)&&p){if(/(32)/.test(e.keyCode.toString(10))||e.preventDefault(),f.options.liveSearch)/(32)/.test(e.keyCode.toString(10))||(f.$menuInner.find(".active a").click(),d.focus());else{var b=t(":focus");b.click(),b.focus(),e.preventDefault(),t(document).data("spaceSelect",!0)}t(document).data("keycount",0)}(/(^9$|27)/.test(e.keyCode.toString(10))&&p&&(f.multiple||f.options.liveSearch)||/(27)/.test(e.keyCode.toString(10))&&!p)&&(f.$menu.parent().removeClass("open"),f.options.container&&f.$newElement.removeClass("open"),f.$button.focus())}},mobile:function(){this.$element.addClass("mobile-device").appendTo(this.$newElement),this.options.container&&this.$menu.hide()},refresh:function(){this.$lis=null,this.liObj={},this.reloadLi(),this.render(),this.checkDisabled(),this.liHeight(!0),this.setStyle(),this.setWidth(),this.$lis&&this.$searchbox.trigger("propertychange"),this.$element.trigger("refreshed.bs.select")},hide:function(){this.$newElement.hide()},show:function(){this.$newElement.show()},remove:function(){this.$newElement.remove(),this.$element.remove()}};var c=t.fn.selectpicker;t.fn.selectpicker=l,t.fn.selectpicker.Constructor=a,t.fn.selectpicker.noConflict=function(){return t.fn.selectpicker=c,this},t(document).data("keycount",0).on("keydown",'.bootstrap-select [data-toggle=dropdown], .bootstrap-select [role="menu"], .bs-searchbox input',a.prototype.keydown).on("focusin.modal",'.bootstrap-select [data-toggle=dropdown], .bootstrap-select [role="menu"], .bs-searchbox input',(function(t){t.stopPropagation()})),t(window).on("load.bs.select.data-api",(function(){t(".selectpicker").each((function(){var e=t(this);l.call(e,e.data())}))}))}(t)}.apply(e,i),void 0===o||(t.exports=o)},function(t,e,n){var i,o,r;o=[n(0)],i=function(t,e){"use strict";var n=function(n,i){var o=this;this.$element=t(n),this.textDirection=this.$element.css("direction"),this.options=t.extend(!0,{},t.fn.tokenfield.defaults,{tokens:this.$element.val()},this.$element.data(),i),this._delimiters="string"==typeof this.options.delimiter?[this.options.delimiter]:this.options.delimiter,this._triggerKeys=t.map(this._delimiters,(function(t){return t.charCodeAt(0)})),this._firstDelimiter=this._delimiters[0];var r=t.inArray(" ",this._delimiters),s=t.inArray("-",this._delimiters);r>=0&&(this._delimiters[r]="\\s"),s>=0&&(delete this._delimiters[s],this._delimiters.unshift("-"));var a=["\\","$","[","{","^",".","|","?","*","+","(",")"];t.each(this._delimiters,(function(e,n){t.inArray(n,a)>=0&&(o._delimiters[e]="\\"+n)}));var l,c=e&&"function"==typeof e.getMatchedCSSRules?e.getMatchedCSSRules(n):null,u=n.style.width,p=this.$element.width();c&&t.each(c,(function(t,e){e.style.width&&(l=e.style.width)}));var d="rtl"===t("body").css("direction")?"right":"left",h={position:this.$element.css("position")};h[d]=this.$element.css(d),this.$element.data("original-styles",h).data("original-tabindex",this.$element.prop("tabindex")).css("position","absolute").css(d,"-10000px").prop("tabindex",-1),this.$wrapper=t('<div class="tokenfield form-control" />'),this.$element.hasClass("input-lg")&&this.$wrapper.addClass("input-lg"),this.$element.hasClass("input-sm")&&this.$wrapper.addClass("input-sm"),"rtl"===this.textDirection&&this.$wrapper.addClass("rtl");var f=this.$element.prop("id")||(new Date).getTime()+""+Math.floor(100*(1+Math.random()));this.$input=t('<input type="text" class="token-input" autocomplete="off" />').appendTo(this.$wrapper).prop("placeholder",this.$element.prop("placeholder")).prop("id",f+"-tokenfield").prop("tabindex",this.$element.data("original-tabindex"));var m=t('label[for="'+this.$element.prop("id")+'"]');if(m.length&&m.prop("for",this.$input.prop("id")),this.$copyHelper=t('<input type="text" />').css("position","absolute").css(d,"-10000px").prop("tabindex",-1).prependTo(this.$wrapper),u?this.$wrapper.css("width",u):l?this.$wrapper.css("width",l):this.$element.parents(".form-inline").length&&this.$wrapper.width(p),(this.$element.prop("disabled")||this.$element.parents("fieldset[disabled]").length)&&this.disable(),this.$element.prop("readonly")&&this.readonly(),this.$mirror=t('<span style="position:absolute; top:-999px; left:0; white-space:pre;"/>'),this.$input.css("min-width",this.options.minWidth+"px"),t.each(["fontFamily","fontSize","fontWeight","fontStyle","letterSpacing","textTransform","wordSpacing","textIndent"],(function(t,e){o.$mirror[0].style[e]=o.$input.css(e)})),this.$mirror.appendTo("body"),this.$wrapper.insertBefore(this.$element),this.$element.prependTo(this.$wrapper),this.update(),this.setTokens(this.options.tokens,!1,!1),this.listen(),!t.isEmptyObject(this.options.autocomplete)){var g="rtl"===this.textDirection?"right":"left",v=t.extend({minLength:this.options.showAutocompleteOnFocus?0:null,position:{my:g+" top",at:g+" bottom",of:this.$wrapper}},this.options.autocomplete);this.$input.autocomplete(v)}if(!t.isEmptyObject(this.options.typeahead)){var y=this.options.typeahead,b={minLength:this.options.showAutocompleteOnFocus?0:null},x=t.isArray(y)?y:[y,y];x[0]=t.extend({},b,x[0]),this.$input.typeahead.apply(this.$input,x),this.typeahead=!0}this.$element.trigger("tokenfield:initialize")};n.prototype={constructor:n,createToken:function(e,n){var i=this;if("string"==typeof e&&(e={value:e,label:e}),void 0===n&&(n=!0),e.value=t.trim(e.value),e.label=e.label&&e.label.length?t.trim(e.label):e.value,e.value.length&&e.label.length&&!(e.label.length<=this.options.minLength)&&!(this.options.limit&&this.getTokens().length>=this.options.limit)){var o=t.Event("tokenfield:createtoken",{attrs:e});if(this.$element.trigger(o),o.attrs&&!o.isDefaultPrevented()){var r=t('<div class="token" />').attr("data-value",e.value).append('<span class="token-label" />').append('<a href="#" class="close" tabindex="-1">&times;</a>');this.$input.hasClass("tt-input")?this.$input.parent().before(r):this.$input.before(r),this.$input.css("width",this.options.minWidth+"px");var s=r.find(".token-label"),a=r.find(".close");return this.maxTokenWidth||(this.maxTokenWidth=this.$wrapper.width()-a.outerWidth()-parseInt(a.css("margin-left"),10)-parseInt(a.css("margin-right"),10)-parseInt(r.css("border-left-width"),10)-parseInt(r.css("border-right-width"),10)-parseInt(r.css("padding-left"),10)-parseInt(r.css("padding-right"),10),parseInt(s.css("border-left-width"),10),parseInt(s.css("border-right-width"),10),parseInt(s.css("padding-left"),10),parseInt(s.css("padding-right"),10),parseInt(s.css("margin-left"),10),parseInt(s.css("margin-right"),10)),s.text(e.label).css("max-width",this.maxTokenWidth),r.on("mousedown",(function(t){if(i._disabled||i._readonly)return!1;i.preventDeactivation=!0})).on("click",(function(t){return!i._disabled&&!i._readonly&&(i.preventDeactivation=!1,t.ctrlKey||t.metaKey?(t.preventDefault(),i.toggle(r)):void i.activate(r,t.shiftKey,t.shiftKey))})).on("dblclick",(function(t){if(i._disabled||i._readonly||!i.options.allowEditing)return!1;i.edit(r)})),a.on("click",t.proxy(this.remove,this)),this.$element.trigger(t.Event("tokenfield:createdtoken",{attrs:e,relatedTarget:r.get(0)})),n&&this.$element.val(this.getTokensList()).trigger(t.Event("change",{initiator:"tokenfield"})),this.update(),this.$element.get(0)}}},setTokens:function(e,n,i){if(e){n||this.$wrapper.find(".token").remove(),void 0===i&&(i=!0),"string"==typeof e&&(e=this._delimiters.length?e.split(new RegExp("["+this._delimiters.join("")+"]")):[e]);var o=this;return t.each(e,(function(t,e){o.createToken(e,i)})),this.$element.get(0)}},getTokenData:function(e){var n=e.map((function(){var e=t(this);return{value:e.attr("data-value"),label:e.find(".token-label").text()}})).get();return 1==n.length&&(n=n[0]),n},getTokens:function(e){var n=this,i=[],o=e?".active":"";return this.$wrapper.find(".token"+o).each((function(){i.push(n.getTokenData(t(this)))})),i},getTokensList:function(e,n,i){var o=(e=e||this._firstDelimiter)+((n=null!=n?n:this.options.beautify)&&" "!==e?" ":"");return t.map(this.getTokens(i),(function(t){return t.value})).join(o)},getInput:function(){return this.$input.val()},listen:function(){var n=this;this.$element.on("change",t.proxy(this.change,this)),this.$wrapper.on("mousedown",t.proxy(this.focusInput,this)),this.$input.on("focus",t.proxy(this.focus,this)).on("blur",t.proxy(this.blur,this)).on("paste",t.proxy(this.paste,this)).on("keydown",t.proxy(this.keydown,this)).on("keypress",t.proxy(this.keypress,this)).on("keyup",t.proxy(this.keyup,this)),this.$copyHelper.on("focus",t.proxy(this.focus,this)).on("blur",t.proxy(this.blur,this)).on("keydown",t.proxy(this.keydown,this)).on("keyup",t.proxy(this.keyup,this)),this.$input.on("keypress",t.proxy(this.update,this)).on("keyup",t.proxy(this.update,this)),this.$input.on("autocompletecreate",(function(){var e=t(this).data("ui-autocomplete").menu.element,i=n.$wrapper.outerWidth()-parseInt(e.css("border-left-width"),10)-parseInt(e.css("border-right-width"),10);e.css("min-width",i+"px")})).on("autocompleteselect",(function(t,e){return n.createToken(e.item)&&(n.$input.val(""),n.$input.data("edit")&&n.unedit(!0)),!1})).on("typeahead:selected typeahead:autocompleted",(function(t,e,i){n.createToken(e)&&(n.$input.typeahead("val",""),n.$input.data("edit")&&n.unedit(!0))})),t(e).on("resize",t.proxy(this.update,this))},keydown:function(e){if(this.focused){var n=this;switch(e.keyCode){case 8:if(!this.$input.is(document.activeElement))break;this.lastInputValue=this.$input.val();break;case 37:i("rtl"===this.textDirection?"next":"prev");break;case 38:o("prev");break;case 39:i("rtl"===this.textDirection?"prev":"next");break;case 40:o("next");break;case 65:if(this.$input.val().length>0||!e.ctrlKey&&!e.metaKey)break;this.activateAll(),e.preventDefault();break;case 9:case 13:if(this.$input.data("ui-autocomplete")&&this.$input.data("ui-autocomplete").menu.element.find("li:has(a.ui-state-focus)").length)break;if(this.$input.hasClass("tt-input")&&this.$wrapper.find(".tt-cursor").length)break;if(this.$input.hasClass("tt-input")&&this.$wrapper.find(".tt-hint").val().length)break;if(this.$input.is(document.activeElement)&&this.$input.val().length||this.$input.data("edit"))return this.createTokensFromInput(e,this.$input.data("edit"));if(13===e.keyCode){if(!this.$copyHelper.is(document.activeElement)||1!==this.$wrapper.find(".token.active").length)break;if(!n.options.allowEditing)break;this.edit(this.$wrapper.find(".token.active"))}}this.lastKeyDown=e.keyCode}function i(t){if(n.$input.is(document.activeElement)){if(n.$input.val().length>0)return;t+="All";var i=n.$input.hasClass("tt-input")?n.$input.parent()[t](".token:first"):n.$input[t](".token:first");if(!i.length)return;n.preventInputFocus=!0,n.preventDeactivation=!0,n.activate(i),e.preventDefault()}else n[t](e.shiftKey),e.preventDefault()}function o(i){if(e.shiftKey){if(n.$input.is(document.activeElement)){if(n.$input.val().length>0)return;var o=n.$input.hasClass("tt-input")?n.$input.parent()[i+"All"](".token:first"):n.$input[i+"All"](".token:first");if(!o.length)return;n.activate(o)}var r="prev"===i?"next":"prev",s="prev"===i?"first":"last";n.firstActiveToken[r+"All"](".token").each((function(){n.deactivate(t(this))})),n.activate(n.$wrapper.find(".token:"+s),!0,!0),e.preventDefault()}}},keypress:function(e){if(this.lastKeyPressCode=e.keyCode,this.lastKeyPressCharCode=e.charCode,-1!==t.inArray(e.charCode,this._triggerKeys)&&this.$input.is(document.activeElement))return this.$input.val()&&this.createTokensFromInput(e),!1},keyup:function(t){if(this.preventInputFocus=!1,this.focused){switch(t.keyCode){case 8:if(this.$input.is(document.activeElement)){if(this.$input.val().length||this.lastInputValue.length&&8===this.lastKeyDown)break;this.preventDeactivation=!0;var e=this.$input.hasClass("tt-input")?this.$input.parent().prevAll(".token:first"):this.$input.prevAll(".token:first");if(!e.length)break;this.activate(e)}else this.remove(t);break;case 46:this.remove(t,"next")}this.lastKeyUp=t.keyCode}},focus:function(t){this.focused=!0,this.$wrapper.addClass("focus"),this.$input.is(document.activeElement)&&(this.$wrapper.find(".active").removeClass("active"),this.$firstActiveToken=null,this.options.showAutocompleteOnFocus&&this.search())},blur:function(t){this.focused=!1,this.$wrapper.removeClass("focus"),this.preventDeactivation||this.$element.is(document.activeElement)||(this.$wrapper.find(".active").removeClass("active"),this.$firstActiveToken=null),!this.preventCreateTokens&&(this.$input.data("edit")&&!this.$input.is(document.activeElement)||this.options.createTokensOnBlur)&&this.createTokensFromInput(t),this.preventDeactivation=!1,this.preventCreateTokens=!1},paste:function(t){var e=this;setTimeout((function(){e.createTokensFromInput(t)}),1)},change:function(t){"tokenfield"!==t.initiator&&this.setTokens(this.$element.val())},createTokensFromInput:function(t,e){if(!(this.$input.val().length<this.options.minLength)){var n=this.getTokensList();return this.setTokens(this.$input.val(),!0),n==this.getTokensList()&&this.$input.val().length||(this.$input.hasClass("tt-input")?this.$input.typeahead("val",""):this.$input.val(""),this.$input.data("edit")&&this.unedit(e)),!1}},next:function(t){if(t){var e=this.$wrapper.find(".active:first");if(e&&this.$firstActiveToken&&e.index()<this.$firstActiveToken.index())return this.deactivate(e)}var n=this.$wrapper.find(".active:last").nextAll(".token:first");n.length?this.activate(n,t):this.$input.focus()},prev:function(t){if(t){var e=this.$wrapper.find(".active:last");if(e&&this.$firstActiveToken&&e.index()>this.$firstActiveToken.index())return this.deactivate(e)}var n=this.$wrapper.find(".active:first").prevAll(".token:first");n.length||(n=this.$wrapper.find(".token:first")),n.length||t?this.activate(n,t):this.$input.focus()},activate:function(e,n,i,o){if(e){if(void 0===o&&(o=!0),i&&(n=!0),this.$copyHelper.focus(),n||(this.$wrapper.find(".active").removeClass("active"),o?this.$firstActiveToken=e:delete this.$firstActiveToken),i&&this.$firstActiveToken){var r=this.$firstActiveToken.index()-2,s=e.index()-2,a=this;this.$wrapper.find(".token").slice(Math.min(r,s)+1,Math.max(r,s)).each((function(){a.activate(t(this),!0)}))}e.addClass("active"),this.$copyHelper.val(this.getTokensList(null,null,!0)).select()}},activateAll:function(){var e=this;this.$wrapper.find(".token").each((function(n){e.activate(t(this),0!==n,!1,!1)}))},deactivate:function(t){t&&(t.removeClass("active"),this.$copyHelper.val(this.getTokensList(null,null,!0)).select())},toggle:function(t){t&&(t.toggleClass("active"),this.$copyHelper.val(this.getTokensList(null,null,!0)).select())},edit:function(e){if(e){var n={value:e.data("value"),label:e.find(".token-label").text()},i={attrs:n,relatedTarget:e.get(0)},o=t.Event("tokenfield:edittoken",i);if(this.$element.trigger(o),!o.isDefaultPrevented()){e.find(".token-label").text(n.value);var r=e.outerWidth(),s=this.$input.hasClass("tt-input")?this.$input.parent():this.$input;e.replaceWith(s),this.preventCreateTokens=!0,this.$input.val(n.value).select().data("edit",!0).width(r),this.update(),this.$element.trigger(t.Event("tokenfield:editedtoken",i))}}},unedit:function(t){if((this.$input.hasClass("tt-input")?this.$input.parent():this.$input).appendTo(this.$wrapper),this.$input.data("edit",!1),this.$mirror.text(""),this.update(),t){var e=this;setTimeout((function(){e.$input.focus()}),1)}},remove:function(e,n){if(!(this.$input.is(document.activeElement)||this._disabled||this._readonly)){var i="click"===e.type?t(e.target).closest(".token"):this.$wrapper.find(".token.active");if("click"!==e.type&&(n||(n="prev"),this[n](),"prev"===n))var o=0===i.first().prevAll(".token:first").length;var r={attrs:this.getTokenData(i),relatedTarget:i.get(0)},s=t.Event("tokenfield:removetoken",r);if(this.$element.trigger(s),!s.isDefaultPrevented()){var a=t.Event("tokenfield:removedtoken",r),l=t.Event("change",{initiator:"tokenfield"});i.remove(),this.$element.val(this.getTokensList()).trigger(a).trigger(l),this.$wrapper.find(".token").length&&"click"!==e.type&&!o||this.$input.focus(),this.$input.css("width",this.options.minWidth+"px"),this.update(),e.preventDefault(),e.stopPropagation()}}},update:function(t){var e=this.$input.val(),n=parseInt(this.$input.css("padding-left"),10)+parseInt(this.$input.css("padding-right"),10);if(this.$input.data("edit")){if(e||(e=this.$input.prop("placeholder")),e===this.$mirror.text())return;this.$mirror.text(e);var i=this.$mirror.width()+10;if(i>this.$wrapper.width())return this.$input.width(this.$wrapper.width());this.$input.width(i)}else{if(this.$input.css("width",this.options.minWidth+"px"),"rtl"===this.textDirection)return this.$input.width(this.$input.offset().left+this.$input.outerWidth()-this.$wrapper.offset().left-parseInt(this.$wrapper.css("padding-left"),10)-n-1);this.$input.width(this.$wrapper.offset().left+this.$wrapper.width()+parseInt(this.$wrapper.css("padding-left"),10)-this.$input.offset().left-n)}},focusInput:function(e){if(!(t(e.target).closest(".token").length||t(e.target).closest(".token-input").length||t(e.target).closest(".tt-dropdown-menu").length)){var n=this;setTimeout((function(){n.$input.focus()}),0)}},search:function(){this.$input.data("ui-autocomplete")&&this.$input.autocomplete("search")},disable:function(){this.setProperty("disabled",!0)},enable:function(){this.setProperty("disabled",!1)},readonly:function(){this.setProperty("readonly",!0)},writeable:function(){this.setProperty("readonly",!1)},setProperty:function(t,e){this["_"+t]=e,this.$input.prop(t,e),this.$element.prop(t,e),this.$wrapper[e?"addClass":"removeClass"](t)},destroy:function(){this.$element.val(this.getTokensList()),this.$element.css(this.$element.data("original-styles")),this.$element.prop("tabindex",this.$element.data("original-tabindex"));var e=t('label[for="'+this.$input.prop("id")+'"]');return e.length&&e.prop("for",this.$element.prop("id")),this.$element.insertBefore(this.$wrapper),this.$element.removeData("original-styles").removeData("original-tabindex").removeData("bs.tokenfield"),this.$wrapper.remove(),this.$element}};var i=t.fn.tokenfield;return t.fn.tokenfield=function(e,i){var o,r=[];Array.prototype.push.apply(r,arguments);var s=this.each((function(){var s=t(this),a=s.data("bs.tokenfield"),l="object"==typeof e&&e;"string"==typeof e&&a&&a[e]?(r.shift(),o=a[e].apply(a,r)):a||"string"==typeof e||i||s.data("bs.tokenfield",a=new n(this,l))}));return void 0!==o?o:s},t.fn.tokenfield.defaults={minWidth:60,minLength:0,allowEditing:!0,limit:0,autocomplete:{},typeahead:{},showAutocompleteOnFocus:!1,createTokensOnBlur:!1,delimiter:",",beautify:!0},t.fn.tokenfield.Constructor=n,t.fn.tokenfield.noConflict=function(){return t.fn.tokenfield=i,this},n},void 0===(r="function"==typeof i?i.apply(e,o):i)||(t.exports=r)},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},function(t,e){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(t){"object"==typeof window&&(n=window)}t.exports=n},function(t,e,n){}]);
//# sourceMappingURL=app.js.map