!function(){function t(t){return t&&t.__esModule?t.default:t}var e={};
/*!
 * jQuery JavaScript Library v3.6.0
 * https://jquery.com/
 *
 * Includes Sizzle.js
 * https://sizzlejs.com/
 *
 * Copyright OpenJS Foundation and other contributors
 * Released under the MIT license
 * https://jquery.org/license
 *
 * Date: 2021-03-02T17:08Z
 */!function(t,n){"use strict";"object"==typeof e?e=t.document?n(t,!0):function(t){if(!t.document)throw new Error("jQuery requires a window with a document");return n(t)}:n(t)}("undefined"!=typeof window?window:e,(function(t,e){"use strict";var n=[],i=Object.getPrototypeOf,o=n.slice,r=n.flat?function(t){return n.flat.call(t)}:function(t){return n.concat.apply([],t)},s=n.push,a=n.indexOf,l={},c=l.toString,u=l.hasOwnProperty,h=u.toString,p=h.call(Object),f={},d=function(t){return"function"==typeof t&&"number"!=typeof t.nodeType&&"function"!=typeof t.item},m=function(t){return null!=t&&t===t.window},g=t.document,v={type:!0,src:!0,nonce:!0,noModule:!0};function y(t,e,n){var i,o,r=(n=n||g).createElement("script");if(r.text=t,e)for(i in v)(o=e[i]||e.getAttribute&&e.getAttribute(i))&&r.setAttribute(i,o);n.head.appendChild(r).parentNode.removeChild(r)}function b(t){return null==t?t+"":"object"==typeof t||"function"==typeof t?l[c.call(t)]||"object":typeof t}var x="3.6.0",w=function(t,e){return new w.fn.init(t,e)};function _(t){var e=!!t&&"length"in t&&t.length,n=b(t);return!d(t)&&!m(t)&&("array"===n||0===e||"number"==typeof e&&e>0&&e-1 in t)}w.fn=w.prototype={jquery:x,constructor:w,length:0,toArray:function(){return o.call(this)},get:function(t){return null==t?o.call(this):t<0?this[t+this.length]:this[t]},pushStack:function(t){var e=w.merge(this.constructor(),t);return e.prevObject=this,e},each:function(t){return w.each(this,t)},map:function(t){return this.pushStack(w.map(this,(function(e,n){return t.call(e,n,e)})))},slice:function(){return this.pushStack(o.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},even:function(){return this.pushStack(w.grep(this,(function(t,e){return(e+1)%2})))},odd:function(){return this.pushStack(w.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:s,sort:n.sort,splice:n.splice},w.extend=w.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||d(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&&(w.isPlainObject(i)||(o=Array.isArray(i)))?(n=s[e],r=o&&!Array.isArray(n)?[]:o||w.isPlainObject(n)?n:{},o=!1,s[e]=w.extend(c,r,i)):void 0!==i&&(s[e]=i));return s},w.extend({expando:"jQuery"+(x+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]"!==c.call(t))&&(!(e=i(t))||"function"==typeof(n=u.call(e,"constructor")&&e.constructor)&&h.call(n)===p)},isEmptyObject:function(t){var e;for(e in t)return!1;return!0},globalEval:function(t,e,n){y(t,{nonce:e&&e.nonce},n)},each:function(t,e){var n,i=0;if(_(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&&(_(Object(t))?w.merge(n,"string"==typeof t?[t]:t):s.call(n,t)),n},inArray:function(t,e,n){return null==e?-1:a.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,s=0,a=[];if(_(t))for(i=t.length;s<i;s++)null!=(o=e(t[s],s,n))&&a.push(o);else for(s in t)null!=(o=e(t[s],s,n))&&a.push(o);return r(a)},guid:1,support:f}),"function"==typeof Symbol&&(w.fn[Symbol.iterator]=n[Symbol.iterator]),w.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),(function(t,e){l["[object "+e+"]"]=e.toLowerCase()}));var T=
/*!
 * Sizzle CSS Selector Engine v2.3.6
 * https://sizzlejs.com/
 *
 * Copyright JS Foundation and other contributors
 * Released under the MIT license
 * https://js.foundation/
 *
 * Date: 2021-02-16
 */
function(t){var e,n,i,o,r,s,a,l,c,u,h,p,f,d,m,g,v,y,b,x="sizzle"+1*new Date,w=t.document,_=0,T=0,C=lt(),P=lt(),k=lt(),S=lt(),E=function(t,e){return t===e&&(h=!0),0},N={}.hasOwnProperty,A=[],D=A.pop,I=A.push,j=A.push,H=A.slice,O=function(t,e){for(var n=0,i=t.length;n<i;n++)if(t[n]===e)return n;return-1},L="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",q="[\\x20\\t\\r\\n\\f]",M="(?:\\\\[\\da-fA-F]{1,6}[\\x20\\t\\r\\n\\f]?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+",$="\\[[\\x20\\t\\r\\n\\f]*("+M+")(?:"+q+"*([*^$|!~]?=)"+q+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+M+"))|)"+q+"*\\]",R=":("+M+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+$+")*)|.*)\\)|)",W=new RegExp(q+"+","g"),F=new RegExp("^[\\x20\\t\\r\\n\\f]+|((?:^|[^\\\\])(?:\\\\.)*)[\\x20\\t\\r\\n\\f]+$","g"),B=new RegExp("^[\\x20\\t\\r\\n\\f]*,[\\x20\\t\\r\\n\\f]*"),z=new RegExp("^[\\x20\\t\\r\\n\\f]*([>+~]|[\\x20\\t\\r\\n\\f])[\\x20\\t\\r\\n\\f]*"),X=new RegExp(q+"|>"),U=new RegExp(R),Y=new RegExp("^"+M+"$"),V={ID:new RegExp("^#("+M+")"),CLASS:new RegExp("^\\.("+M+")"),TAG:new RegExp("^("+M+"|[*])"),ATTR:new RegExp("^"+$),PSEUDO:new RegExp("^"+R),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\([\\x20\\t\\r\\n\\f]*(even|odd|(([+-]|)(\\d*)n|)[\\x20\\t\\r\\n\\f]*(?:([+-]|)[\\x20\\t\\r\\n\\f]*(\\d+)|))[\\x20\\t\\r\\n\\f]*\\)|)","i"),bool:new RegExp("^(?:"+L+")$","i"),needsContext:new RegExp("^[\\x20\\t\\r\\n\\f]*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\([\\x20\\t\\r\\n\\f]*((?:-\\d)?\\d*)[\\x20\\t\\r\\n\\f]*\\)|)(?=[^-]|$)","i")},Q=/HTML$/i,G=/^(?:input|select|textarea|button)$/i,J=/^h\d$/i,K=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,tt=/[+~]/,et=new RegExp("\\\\[\\da-fA-F]{1,6}[\\x20\\t\\r\\n\\f]?|\\\\([^\\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?"�":t.slice(0,-1)+"\\"+t.charCodeAt(t.length-1).toString(16)+" ":"\\"+t},rt=function(){p()},st=xt((function(t){return!0===t.disabled&&"fieldset"===t.nodeName.toLowerCase()}),{dir:"parentNode",next:"legend"});try{j.apply(A=H.call(w.childNodes),w.childNodes),A[w.childNodes.length].nodeType}catch(t){j={apply:A.length?function(t,e){I.apply(t,H.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,h,d,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&&(p(e),e=e||f,m)){if(11!==w&&(h=Z.exec(t)))if(r=h[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(h[2])return j.apply(i,e.getElementsByTagName(t)),i;if((r=h[3])&&n.getElementsByClassName&&e.getElementsByClassName)return j.apply(i,e.getElementsByClassName(r)),i}if(n.qsa&&!S[t+" "]&&(!g||!g.test(t))&&(1!==w||"object"!==e.nodeName.toLowerCase())){if(v=t,y=e,1===w&&(X.test(t)||z.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=(d=s(t)).length;a--;)d[a]=(u?"#"+u:":scope")+" "+bt(d[a]);v=d.join(",")}try{return j.apply(i,y.querySelectorAll(v)),i}catch(e){S(t,!0)}finally{u===x&&e.removeAttribute("id")}}}return l(t.replace(F,"$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=f.createElement("fieldset");try{return!!t(e)}catch(t){return!1}finally{e.parentNode&&e.parentNode.removeChild(e),e=null}}function ht(t,e){for(var n=t.split("|"),o=n.length;o--;)i.attrHandle[n[o]]=e}function pt(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 ft(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function dt(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!Q.test(e||n&&n.nodeName||"HTML")},p=at.setDocument=function(t){var e,o,s=t?t.ownerDocument||t:w;return s!=f&&9===s.nodeType&&s.documentElement?(d=(f=s).documentElement,m=!r(f),w!=f&&(o=f.defaultView)&&o.top!==o&&(o.addEventListener?o.addEventListener("unload",rt,!1):o.attachEvent&&o.attachEvent("onunload",rt)),n.scope=ut((function(t){return d.appendChild(t).appendChild(f.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(f.createComment("")),!t.getElementsByTagName("*").length})),n.getElementsByClassName=K.test(f.getElementsByClassName),n.getById=ut((function(t){return d.appendChild(t).id=x,!f.getElementsByName||!f.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=K.test(f.querySelectorAll))&&(ut((function(t){var e;d.appendChild(t).innerHTML="<a id='"+x+"'></a><select id='"+x+"-\r\\' msallowcapture=''><option selected=''></option></select>",t.querySelectorAll("[msallowcapture^='']").length&&g.push("[*^$]=[\\x20\\t\\r\\n\\f]*(?:''|\"\")"),t.querySelectorAll("[selected]").length||g.push("\\[[\\x20\\t\\r\\n\\f]*(?:value|"+L+")"),t.querySelectorAll("[id~="+x+"-]").length||g.push("~="),(e=f.createElement("input")).setAttribute("name",""),t.appendChild(e),t.querySelectorAll("[name='']").length||g.push("\\[[\\x20\\t\\r\\n\\f]*name[\\x20\\t\\r\\n\\f]*=[\\x20\\t\\r\\n\\f]*(?:''|\"\")"),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=f.createElement("input");e.setAttribute("type","hidden"),t.appendChild(e).setAttribute("name","D"),t.querySelectorAll("[name=d]").length&&g.push("name[\\x20\\t\\r\\n\\f]*[*^$|!~]?="),2!==t.querySelectorAll(":enabled").length&&g.push(":enabled",":disabled"),d.appendChild(t).disabled=!0,2!==t.querySelectorAll(":disabled").length&&g.push(":enabled",":disabled"),t.querySelectorAll("*,:x"),g.push(",.*:")}))),(n.matchesSelector=K.test(y=d.matches||d.webkitMatchesSelector||d.mozMatchesSelector||d.oMatchesSelector||d.msMatchesSelector))&&ut((function(t){n.disconnectedMatch=y.call(t,"*"),y.call(t,"[s!='']:x"),v.push("!=",R)})),g=g.length&&new RegExp(g.join("|")),v=v.length&&new RegExp(v.join("|")),e=K.test(d.compareDocumentPosition),b=e||K.test(d.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 h=!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==f||t.ownerDocument==w&&b(w,t)?-1:e==f||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 h=!0,0;var n,i=0,o=t.parentNode,r=e.parentNode,s=[t],a=[e];if(!o||!r)return t==f?-1:e==f?1:o?-1:r?1:u?O(u,t)-O(u,e):0;if(o===r)return pt(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?pt(s[i],a[i]):s[i]==w?-1:a[i]==w?1:0},f):f},at.matches=function(t,e){return at(t,null,null,e)},at.matchesSelector=function(t,e){if(p(t),n.matchesSelector&&m&&!S[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){S(e,!0)}return at(e,f,null,[t]).length>0},at.contains=function(t,e){return(t.ownerDocument||t)!=f&&p(t),b(t,e)},at.attr=function(t,e){(t.ownerDocument||t)!=f&&p(t);var o=i.attrHandle[e.toLowerCase()],r=o&&N.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(h=!n.detectDuplicates,u=!n.sortStable&&t.slice(0),t.sort(E),h){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:V,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 V.CHILD.test(t[0])?null:(t[3]?t[2]=t[4]||t[5]||"":n&&U.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("(^|[\\x20\\t\\r\\n\\f])"+t+"("+q+"|$)"),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(W," ")+" ").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,h,p,f,d,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(p=e;p=p[m];)if(a?p.nodeName.toLowerCase()===v:1===p.nodeType)return!1;d=m="only"===t&&!d&&"nextSibling"}return!0}if(d=[s?g.firstChild:g.lastChild],s&&y){for(b=(f=(c=(u=(h=(p=g)[x]||(p[x]={}))[p.uniqueID]||(h[p.uniqueID]={}))[t]||[])[0]===_&&c[1])&&c[2],p=f&&g.childNodes[f];p=++f&&p&&p[m]||(b=f=0)||d.pop();)if(1===p.nodeType&&++b&&p===e){u[t]=[_,f,b];break}}else if(y&&(b=f=(c=(u=(h=(p=e)[x]||(p[x]={}))[p.uniqueID]||(h[p.uniqueID]={}))[t]||[])[0]===_&&c[1]),!1===b)for(;(p=++f&&p&&p[m]||(b=f=0)||d.pop())&&((a?p.nodeName.toLowerCase()!==v:1!==p.nodeType)||!++b||(y&&((u=(h=p[x]||(p[x]={}))[p.uniqueID]||(h[p.uniqueID]={}))[t]=[_,b]),p!==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(F,"$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 Y.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===d},focus:function(t){return t===f.activeElement&&(!f.hasFocus||f.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 J.test(t.nodeName)},input:function(t){return G.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}))}}).pseudos.nth=i.pseudos.eq,{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})i.pseudos[e]=ft(e);for(e in{submit:!0,reset:!0})i.pseudos[e]=dt(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=T++;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,h,p=[_,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=(h=e[x]||(e[x]={}))[e.uniqueID]||(h[e.uniqueID]={}),o&&o===e.nodeName.toLowerCase())e=e[i]||e;else{if((c=u[r])&&c[0]===_&&c[1]===a)return p[2]=c[2];if(u[r]=p,p[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 _t(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 Tt(t,e,n,i,o,r){return i&&!i[x]&&(i=Tt(i)),o&&!o[x]&&(o=Tt(o,r)),ct((function(r,s,a,l){var c,u,h,p=[],f=[],d=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:_t(m,p,t,a,l),v=n?o||(r?t:d||i)?[]:s:g;if(n&&n(g,v,a,l),i)for(c=_t(v,f),i(c,[],a,l),u=c.length;u--;)(h=c[u])&&(v[f[u]]=!(g[f[u]]=h));if(r){if(o||t){if(o){for(c=[],u=v.length;u--;)(h=v[u])&&c.push(g[u]=h);o(null,v=[],c,l)}for(u=v.length;u--;)(h=v[u])&&(c=o?O(r,h):p[u])>-1&&(r[c]=!(s[c]=h))}}else v=_t(v===s?v.splice(d,v.length):v),o?o(null,s,v,l):j.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),h=xt((function(t){return O(e,t)>-1}),a,!0),p=[function(t,n,i){var o=!s&&(i||n!==c)||((e=n).nodeType?u(t,n,i):h(t,n,i));return e=null,o}];l<r;l++)if(n=i.relative[t[l].type])p=[xt(wt(p),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 Tt(l>1&&wt(p),l>1&&bt(t.slice(0,l-1).concat({value:" "===t[l-2].type?"*":""})).replace(F,"$1"),n,l<o&&Ct(t.slice(l,o)),o<r&&Ct(t=t.slice(o)),o<r&&bt(t))}p.push(n)}return wt(p)}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=P[t+" "];if(u)return e?0:u.slice(0);for(a=t,l=[],c=i.preFilter;a;){for(s in n&&!(o=B.exec(a))||(o&&(a=a.slice(o[0].length)||a),l.push(r=[])),n=!1,(o=z.exec(a))&&(n=o.shift(),r.push({value:n,type:o[0].replace(F," ")}),a=a.slice(n.length)),i.filter)!(o=V[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):P(t,l).slice(0)},a=at.compile=function(t,e){var n,o=[],r=[],a=k[t+" "];if(!a){for(e||(e=s(t)),n=e.length;n--;)(a=Ct(e[n]))[x]?o.push(a):r.push(a);a=k(t,function(t,e){var n=e.length>0,o=t.length>0,r=function(r,s,a,l,u){var h,d,g,v=0,y="0",b=r&&[],x=[],w=c,T=r||o&&i.find.TAG("*",u),C=_+=null==w?1:Math.random()||.1,P=T.length;for(u&&(c=s==f||s||u);y!==P&&null!=(h=T[y]);y++){if(o&&h){for(d=0,s||h.ownerDocument==f||(p(h),a=!m);g=t[d++];)if(g(h,s||f,a)){l.push(h);break}u&&(_=C)}n&&((h=!g&&h)&&v--,r&&b.push(h))}if(v+=y,n&&y!==v){for(d=0;g=e[d++];)g(b,x,s,a);if(r){if(v>0)for(;y--;)b[y]||x[y]||(x[y]=D.call(l));x=_t(x)}j.apply(l,x),u&&!r&&x.length>0&&v+e.length>1&&at.uniqueSort(l)}return u&&(_=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,h,p="function"==typeof t&&t,f=!o&&s(t=p.selector||t);if(n=n||[],1===f.length){if((l=f[0]=f[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;p&&(e=e.parentNode),t=t.slice(l.shift().value.length)}for(r=V.needsContext.test(t)?0:l.length;r--&&(c=l[r],!i.relative[u=c.type]);)if((h=i.find[u])&&(o=h(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 j.apply(n,o),n;break}}return(p||a(t,f))(o,e,!m,n,!e||tt.test(t)&&vt(e.parentNode)||e),n},n.sortStable=x.split("").sort(E).join("")===x,n.detectDuplicates=!!h,p(),n.sortDetached=ut((function(t){return 1&t.compareDocumentPosition(f.createElement("fieldset"))})),ut((function(t){return t.innerHTML="<a href='#'></a>","#"===t.firstChild.getAttribute("href")}))||ht("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")}))||ht("value",(function(t,e,n){if(!n&&"input"===t.nodeName.toLowerCase())return t.defaultValue})),ut((function(t){return null==t.getAttribute("disabled")}))||ht(L,(function(t,e,n){var i;if(!n)return!0===t[e]?e.toLowerCase():(i=t.getAttributeNode(e))&&i.specified?i.value:null})),at}(t);w.find=T,w.expr=T.selectors,w.expr[":"]=w.expr.pseudos,w.uniqueSort=w.unique=T.uniqueSort,w.text=T.getText,w.isXMLDoc=T.isXML,w.contains=T.contains,w.escapeSelector=T.escape;var C=function(t,e,n){for(var i=[],o=void 0!==n;(t=t[e])&&9!==t.nodeType;)if(1===t.nodeType){if(o&&w(t).is(n))break;i.push(t)}return i},P=function(t,e){for(var n=[];t;t=t.nextSibling)1===t.nodeType&&t!==e&&n.push(t);return n},k=w.expr.match.needsContext;function S(t,e){return t.nodeName&&t.nodeName.toLowerCase()===e.toLowerCase()}var E=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function N(t,e,n){return d(e)?w.grep(t,(function(t,i){return!!e.call(t,i,t)!==n})):e.nodeType?w.grep(t,(function(t){return t===e!==n})):"string"!=typeof e?w.grep(t,(function(t){return a.call(e,t)>-1!==n})):w.filter(e,t,n)}w.filter=function(t,e,n){var i=e[0];return n&&(t=":not("+t+")"),1===e.length&&1===i.nodeType?w.find.matchesSelector(i,t)?[i]:[]:w.find.matches(t,w.grep(e,(function(t){return 1===t.nodeType})))},w.fn.extend({find:function(t){var e,n,i=this.length,o=this;if("string"!=typeof t)return this.pushStack(w(t).filter((function(){for(e=0;e<i;e++)if(w.contains(o[e],this))return!0})));for(n=this.pushStack([]),e=0;e<i;e++)w.find(t,o[e],n);return i>1?w.uniqueSort(n):n},filter:function(t){return this.pushStack(N(this,t||[],!1))},not:function(t){return this.pushStack(N(this,t||[],!0))},is:function(t){return!!N(this,"string"==typeof t&&k.test(t)?w(t):t||[],!1).length}});var A,D=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(w.fn.init=function(t,e,n){var i,o;if(!t)return this;if(n=n||A,"string"==typeof t){if(!(i="<"===t[0]&&">"===t[t.length-1]&&t.length>=3?[null,t,null]:D.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 w?e[0]:e,w.merge(this,w.parseHTML(i[1],e&&e.nodeType?e.ownerDocument||e:g,!0)),E.test(i[1])&&w.isPlainObject(e))for(i in e)d(this[i])?this[i](e[i]):this.attr(i,e[i]);return this}return(o=g.getElementById(i[2]))&&(this[0]=o,this.length=1),this}return t.nodeType?(this[0]=t,this.length=1,this):d(t)?void 0!==n.ready?n.ready(t):t(w):w.makeArray(t,this)}).prototype=w.fn,A=w(g);var I=/^(?:parents|prev(?:Until|All))/,j={children:!0,contents:!0,next:!0,prev:!0};function H(t,e){for(;(t=t[e])&&1!==t.nodeType;);return t}w.fn.extend({has:function(t){var e=w(t,this),n=e.length;return this.filter((function(){for(var t=0;t<n;t++)if(w.contains(this,e[t]))return!0}))},closest:function(t,e){var n,i=0,o=this.length,r=[],s="string"!=typeof t&&w(t);if(!k.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&&w.find.matchesSelector(n,t))){r.push(n);break}return this.pushStack(r.length>1?w.uniqueSort(r):r)},index:function(t){return t?"string"==typeof t?a.call(w(t),this[0]):a.call(this,t.jquery?t[0]:t):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(t,e){return this.pushStack(w.uniqueSort(w.merge(this.get(),w(t,e))))},addBack:function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}}),w.each({parent:function(t){var e=t.parentNode;return e&&11!==e.nodeType?e:null},parents:function(t){return C(t,"parentNode")},parentsUntil:function(t,e,n){return C(t,"parentNode",n)},next:function(t){return H(t,"nextSibling")},prev:function(t){return H(t,"previousSibling")},nextAll:function(t){return C(t,"nextSibling")},prevAll:function(t){return C(t,"previousSibling")},nextUntil:function(t,e,n){return C(t,"nextSibling",n)},prevUntil:function(t,e,n){return C(t,"previousSibling",n)},siblings:function(t){return P((t.parentNode||{}).firstChild,t)},children:function(t){return P(t.firstChild)},contents:function(t){return null!=t.contentDocument&&i(t.contentDocument)?t.contentDocument:(S(t,"template")&&(t=t.content||t),w.merge([],t.childNodes))}},(function(t,e){w.fn[t]=function(n,i){var o=w.map(this,e,n);return"Until"!==t.slice(-5)&&(i=n),i&&"string"==typeof i&&(o=w.filter(i,o)),this.length>1&&(j[t]||w.uniqueSort(o),I.test(t)&&o.reverse()),this.pushStack(o)}}));var O=/[^\x20\t\r\n\f]+/g;function L(t){return t}function q(t){throw t}function M(t,e,n,i){var o;try{t&&d(o=t.promise)?o.call(t).done(e).fail(n):t&&d(o=t.then)?o.call(t,e,n):e.apply(void 0,[t].slice(i))}catch(t){n.apply(void 0,[t])}}w.Callbacks=function(t){t="string"==typeof t?function(t){var e={};return w.each(t.match(O)||[],(function(t,n){e[n]=!0})),e}(t):w.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){w.each(n,(function(n,i){d(i)?t.unique&&c.has(i)||r.push(i):i&&i.length&&"string"!==b(i)&&e(i)}))}(arguments),n&&!e&&l()),this},remove:function(){return w.each(arguments,(function(t,e){for(var n;(n=w.inArray(e,r,n))>-1;)r.splice(n,1),n<=a&&a--})),this},has:function(t){return t?w.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},w.extend({Deferred:function(e){var n=[["notify","progress",w.Callbacks("memory"),w.Callbacks("memory"),2],["resolve","done",w.Callbacks("once memory"),w.Callbacks("once memory"),0,"resolved"],["reject","fail",w.Callbacks("once memory"),w.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 w.Deferred((function(e){w.each(n,(function(n,i){var o=d(t[i[4]])&&t[i[4]];r[i[1]]((function(){var t=o&&o.apply(this,arguments);t&&d(t.promise)?t.promise().progress(e.notify).done(e.resolve).fail(e.reject):e[i[0]+"With"](this,o?[t]:arguments)}))})),t=null})).promise()},then:function(e,i,o){var r=0;function s(e,n,i,o){return function(){var a=this,l=arguments,c=function(){var t,c;if(!(e<r)){if((t=i.apply(a,l))===n.promise())throw new TypeError("Thenable self-resolution");c=t&&("object"==typeof t||"function"==typeof t)&&t.then,d(c)?o?c.call(t,s(r,n,L,o),s(r,n,q,o)):(r++,c.call(t,s(r,n,L,o),s(r,n,q,o),s(r,n,L,n.notifyWith))):(i!==L&&(a=void 0,l=[t]),(o||n.resolveWith)(a,l))}},u=o?c:function(){try{c()}catch(t){w.Deferred.exceptionHook&&w.Deferred.exceptionHook(t,u.stackTrace),e+1>=r&&(i!==q&&(a=void 0,l=[t]),n.rejectWith(a,l))}};e?u():(w.Deferred.getStackHook&&(u.stackTrace=w.Deferred.getStackHook()),t.setTimeout(u))}}return w.Deferred((function(t){n[0][3].add(s(0,t,d(o)?o:L,t.notifyWith)),n[1][3].add(s(0,t,d(e)?e:L)),n[2][3].add(s(0,t,d(i)?i:q))})).promise()},promise:function(t){return null!=t?w.extend(t,o):o}},r={};return w.each(n,(function(t,e){var s=e[2],a=e[5];o[e[1]]=s.add,a&&s.add((function(){i=a}),n[3-t][2].disable,n[3-t][3].disable,n[0][2].lock,n[0][3].lock),s.add(e[3].fire),r[e[0]]=function(){return r[e[0]+"With"](this===r?void 0:this,arguments),this},r[e[0]+"With"]=s.fireWith})),o.promise(r),e&&e.call(r,r),r},when:function(t){var e=arguments.length,n=e,i=Array(n),r=o.call(arguments),s=w.Deferred(),a=function(t){return function(n){i[t]=this,r[t]=arguments.length>1?o.call(arguments):n,--e||s.resolveWith(i,r)}};if(e<=1&&(M(t,s.done(a(n)).resolve,s.reject,!e),"pending"===s.state()||d(r[n]&&r[n].then)))return s.then();for(;n--;)M(r[n],a(n),s.reject);return s.promise()}});var $=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;w.Deferred.exceptionHook=function(e,n){t.console&&t.console.warn&&e&&$.test(e.name)&&t.console.warn("jQuery.Deferred exception: "+e.message,e.stack,n)},w.readyException=function(e){t.setTimeout((function(){throw e}))};var R=w.Deferred();function W(){g.removeEventListener("DOMContentLoaded",W),t.removeEventListener("load",W),w.ready()}w.fn.ready=function(t){return R.then(t).catch((function(t){w.readyException(t)})),this},w.extend({isReady:!1,readyWait:1,ready:function(t){(!0===t?--w.readyWait:w.isReady)||(w.isReady=!0,!0!==t&&--w.readyWait>0||R.resolveWith(g,[w]))}}),w.ready.then=R.then,"complete"===g.readyState||"loading"!==g.readyState&&!g.documentElement.doScroll?t.setTimeout(w.ready):(g.addEventListener("DOMContentLoaded",W),t.addEventListener("load",W));var F=function(t,e,n,i,o,r,s){var a=0,l=t.length,c=null==n;if("object"===b(n))for(a in o=!0,n)F(t,e,a,n[a],!0,r,s);else if(void 0!==i&&(o=!0,d(i)||(s=!0),c&&(s?(e.call(t,i),e=null):(c=e,e=function(t,e,n){return c.call(w(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},B=/^-ms-/,z=/-([a-z])/g;function X(t,e){return e.toUpperCase()}function U(t){return t.replace(B,"ms-").replace(z,X)}var Y=function(t){return 1===t.nodeType||9===t.nodeType||!+t.nodeType};function V(){this.expando=w.expando+V.uid++}V.uid=1,V.prototype={cache:function(t){var e=t[this.expando];return e||(e={},Y(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[U(e)]=n;else for(i in e)o[U(i)]=e[i];return o},get:function(t,e){return void 0===e?this.cache(t):t[this.expando]&&t[this.expando][U(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(U):(e=U(e))in i?[e]:e.match(O)||[]).length;for(;n--;)delete i[e[n]]}(void 0===e||w.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&&!w.isEmptyObject(e)}};var Q=new V,G=new V,J=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,K=/[A-Z]/g;function Z(t,e,n){var i;if(void 0===n&&1===t.nodeType)if(i="data-"+e.replace(K,"-$&").toLowerCase(),"string"==typeof(n=t.getAttribute(i))){try{n=function(t){return"true"===t||"false"!==t&&("null"===t?null:t===+t+""?+t:J.test(t)?JSON.parse(t):t)}(n)}catch(t){}G.set(t,e,n)}else n=void 0;return n}w.extend({hasData:function(t){return G.hasData(t)||Q.hasData(t)},data:function(t,e,n){return G.access(t,e,n)},removeData:function(t,e){G.remove(t,e)},_data:function(t,e,n){return Q.access(t,e,n)},_removeData:function(t,e){Q.remove(t,e)}}),w.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=G.get(r),1===r.nodeType&&!Q.get(r,"hasDataAttrs"))){for(n=s.length;n--;)s[n]&&0===(i=s[n].name).indexOf("data-")&&(i=U(i.slice(5)),Z(r,i,o[i]));Q.set(r,"hasDataAttrs",!0)}return o}return"object"==typeof t?this.each((function(){G.set(this,t)})):F(this,(function(e){var n;if(r&&void 0===e)return void 0!==(n=G.get(r,t))||void 0!==(n=Z(r,t))?n:void 0;this.each((function(){G.set(this,t,e)}))}),null,e,arguments.length>1,null,!0)},removeData:function(t){return this.each((function(){G.remove(this,t)}))}}),w.extend({queue:function(t,e,n){var i;if(t)return e=(e||"fx")+"queue",i=Q.get(t,e),n&&(!i||Array.isArray(n)?i=Q.access(t,e,w.makeArray(n)):i.push(n)),i||[]},dequeue:function(t,e){e=e||"fx";var n=w.queue(t,e),i=n.length,o=n.shift(),r=w._queueHooks(t,e);"inprogress"===o&&(o=n.shift(),i--),o&&("fx"===e&&n.unshift("inprogress"),delete r.stop,o.call(t,(function(){w.dequeue(t,e)}),r)),!i&&r&&r.empty.fire()},_queueHooks:function(t,e){var n=e+"queueHooks";return Q.get(t,n)||Q.access(t,n,{empty:w.Callbacks("once memory").add((function(){Q.remove(t,[e+"queue",n])}))})}}),w.fn.extend({queue:function(t,e){var n=2;return"string"!=typeof t&&(e=t,t="fx",n--),arguments.length<n?w.queue(this[0],t):void 0===e?this:this.each((function(){var n=w.queue(this,t,e);w._queueHooks(this,t),"fx"===t&&"inprogress"!==n[0]&&w.dequeue(this,t)}))},dequeue:function(t){return this.each((function(){w.dequeue(this,t)}))},clearQueue:function(t){return this.queue(t||"fx",[])},promise:function(t,e){var n,i=1,o=w.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=Q.get(r[s],t+"queueHooks"))&&n.empty&&(i++,n.empty.add(a));return a(),o.promise(e)}});var tt=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,et=new RegExp("^(?:([+-])=|)("+tt+")([a-z%]*)$","i"),nt=["Top","Right","Bottom","Left"],it=g.documentElement,ot=function(t){return w.contains(t.ownerDocument,t)},rt={composed:!0};it.getRootNode&&(ot=function(t){return w.contains(t.ownerDocument,t)||t.getRootNode(rt)===t.ownerDocument});var st=function(t,e){return"none"===(t=e||t).style.display||""===t.style.display&&ot(t)&&"none"===w.css(t,"display")};function at(t,e,n,i){var o,r,s=20,a=i?function(){return i.cur()}:function(){return w.css(t,e,"")},l=a(),c=n&&n[3]||(w.cssNumber[e]?"":"px"),u=t.nodeType&&(w.cssNumber[e]||"px"!==c&&+l)&&et.exec(w.css(t,e));if(u&&u[3]!==c){for(l/=2,c=c||u[3],u=+l||1;s--;)w.style(t,e,u+c),(1-r)*(1-(r=a()/l||.5))<=0&&(s=0),u/=r;u*=2,w.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 lt={};function ct(t){var e,n=t.ownerDocument,i=t.nodeName,o=lt[i];return o||(e=n.body.appendChild(n.createElement(i)),o=w.css(e,"display"),e.parentNode.removeChild(e),"none"===o&&(o="block"),lt[i]=o,o)}function ut(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]=Q.get(i,"display")||null,o[r]||(i.style.display="")),""===i.style.display&&st(i)&&(o[r]=ct(i))):"none"!==n&&(o[r]="none",Q.set(i,"display",n)));for(r=0;r<s;r++)null!=o[r]&&(t[r].style.display=o[r]);return t}w.fn.extend({show:function(){return ut(this,!0)},hide:function(){return ut(this)},toggle:function(t){return"boolean"==typeof t?t?this.show():this.hide():this.each((function(){st(this)?w(this).show():w(this).hide()}))}});var ht,pt,ft=/^(?:checkbox|radio)$/i,dt=/<([a-z][^\/\0>\x20\t\r\n\f]*)/i,mt=/^$|^module$|\/(?:java|ecma)script/i;ht=g.createDocumentFragment().appendChild(g.createElement("div")),(pt=g.createElement("input")).setAttribute("type","radio"),pt.setAttribute("checked","checked"),pt.setAttribute("name","t"),ht.appendChild(pt),f.checkClone=ht.cloneNode(!0).cloneNode(!0).lastChild.checked,ht.innerHTML="<textarea>x</textarea>",f.noCloneChecked=!!ht.cloneNode(!0).lastChild.defaultValue,ht.innerHTML="<option></option>",f.option=!!ht.lastChild;var gt={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 vt(t,e){var n;return n=void 0!==t.getElementsByTagName?t.getElementsByTagName(e||"*"):void 0!==t.querySelectorAll?t.querySelectorAll(e||"*"):[],void 0===e||e&&S(t,e)?w.merge([t],n):n}function yt(t,e){for(var n=0,i=t.length;n<i;n++)Q.set(t[n],"globalEval",!e||Q.get(e[n],"globalEval"))}gt.tbody=gt.tfoot=gt.colgroup=gt.caption=gt.thead,gt.th=gt.td,f.option||(gt.optgroup=gt.option=[1,"<select multiple='multiple'>","</select>"]);var bt=/<|&#?\w+;/;function xt(t,e,n,i,o){for(var r,s,a,l,c,u,h=e.createDocumentFragment(),p=[],f=0,d=t.length;f<d;f++)if((r=t[f])||0===r)if("object"===b(r))w.merge(p,r.nodeType?[r]:r);else if(bt.test(r)){for(s=s||h.appendChild(e.createElement("div")),a=(dt.exec(r)||["",""])[1].toLowerCase(),l=gt[a]||gt._default,s.innerHTML=l[1]+w.htmlPrefilter(r)+l[2],u=l[0];u--;)s=s.lastChild;w.merge(p,s.childNodes),(s=h.firstChild).textContent=""}else p.push(e.createTextNode(r));for(h.textContent="",f=0;r=p[f++];)if(i&&w.inArray(r,i)>-1)o&&o.push(r);else if(c=ot(r),s=vt(h.appendChild(r),"script"),c&&yt(s),n)for(u=0;r=s[u++];)mt.test(r.type||"")&&n.push(r);return h}var wt=/^([^.]*)(?:\.(.+)|)/;function _t(){return!0}function Tt(){return!1}function Ct(t,e){return t===function(){try{return g.activeElement}catch(t){}}()==("focus"===e)}function Pt(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)Pt(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=Tt;else if(!o)return t;return 1===r&&(s=o,o=function(t){return w().off(t),s.apply(this,arguments)},o.guid=s.guid||(s.guid=w.guid++)),t.each((function(){w.event.add(this,e,o,i,n)}))}function kt(t,e,n){n?(Q.set(t,e,!1),w.event.add(t,e,{namespace:!1,handler:function(t){var i,r,s=Q.get(this,e);if(1&t.isTrigger&&this[e]){if(s.length)(w.event.special[e]||{}).delegateType&&t.stopPropagation();else if(s=o.call(arguments),Q.set(this,e,s),i=n(this,e),this[e](),s!==(r=Q.get(this,e))||i?Q.set(this,e,!1):r={},s!==r)return t.stopImmediatePropagation(),t.preventDefault(),r&&r.value}else s.length&&(Q.set(this,e,{value:w.event.trigger(w.extend(s[0],w.Event.prototype),s.slice(1),this)}),t.stopImmediatePropagation())}})):void 0===Q.get(t,e)&&w.event.add(t,e,_t)}w.event={global:{},add:function(t,e,n,i,o){var r,s,a,l,c,u,h,p,f,d,m,g=Q.get(t);if(Y(t))for(n.handler&&(n=(r=n).handler,o=r.selector),o&&w.find.matchesSelector(it,o),n.guid||(n.guid=w.guid++),(l=g.events)||(l=g.events=Object.create(null)),(s=g.handle)||(s=g.handle=function(e){return void 0!==w&&w.event.triggered!==e.type?w.event.dispatch.apply(t,arguments):void 0}),c=(e=(e||"").match(O)||[""]).length;c--;)f=m=(a=wt.exec(e[c])||[])[1],d=(a[2]||"").split(".").sort(),f&&(h=w.event.special[f]||{},f=(o?h.delegateType:h.bindType)||f,h=w.event.special[f]||{},u=w.extend({type:f,origType:m,data:i,handler:n,guid:n.guid,selector:o,needsContext:o&&w.expr.match.needsContext.test(o),namespace:d.join(".")},r),(p=l[f])||((p=l[f]=[]).delegateCount=0,h.setup&&!1!==h.setup.call(t,i,d,s)||t.addEventListener&&t.addEventListener(f,s)),h.add&&(h.add.call(t,u),u.handler.guid||(u.handler.guid=n.guid)),o?p.splice(p.delegateCount++,0,u):p.push(u),w.event.global[f]=!0)},remove:function(t,e,n,i,o){var r,s,a,l,c,u,h,p,f,d,m,g=Q.hasData(t)&&Q.get(t);if(g&&(l=g.events)){for(c=(e=(e||"").match(O)||[""]).length;c--;)if(f=m=(a=wt.exec(e[c])||[])[1],d=(a[2]||"").split(".").sort(),f){for(h=w.event.special[f]||{},p=l[f=(i?h.delegateType:h.bindType)||f]||[],a=a[2]&&new RegExp("(^|\\.)"+d.join("\\.(?:.*\\.|)")+"(\\.|$)"),s=r=p.length;r--;)u=p[r],!o&&m!==u.origType||n&&n.guid!==u.guid||a&&!a.test(u.namespace)||i&&i!==u.selector&&("**"!==i||!u.selector)||(p.splice(r,1),u.selector&&p.delegateCount--,h.remove&&h.remove.call(t,u));s&&!p.length&&(h.teardown&&!1!==h.teardown.call(t,d,g.handle)||w.removeEvent(t,f,g.handle),delete l[f])}else for(f in l)w.event.remove(t,f+e[c],n,i,!0);w.isEmptyObject(l)&&Q.remove(t,"handle events")}},dispatch:function(t){var e,n,i,o,r,s,a=new Array(arguments.length),l=w.event.fix(t),c=(Q.get(this,"events")||Object.create(null))[l.type]||[],u=w.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=w.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=((w.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?w(o,this).index(c)>-1:w.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(w.Event.prototype,t,{enumerable:!0,configurable:!0,get:d(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[w.expando]?t:new w.Event(t)},special:{load:{noBubble:!0},click:{setup:function(t){var e=this||t;return ft.test(e.type)&&e.click&&S(e,"input")&&kt(e,"click",_t),!1},trigger:function(t){var e=this||t;return ft.test(e.type)&&e.click&&S(e,"input")&&kt(e,"click"),!0},_default:function(t){var e=t.target;return ft.test(e.type)&&e.click&&S(e,"input")&&Q.get(e,"click")||S(e,"a")}},beforeunload:{postDispatch:function(t){void 0!==t.result&&t.originalEvent&&(t.originalEvent.returnValue=t.result)}}}},w.removeEvent=function(t,e,n){t.removeEventListener&&t.removeEventListener(e,n)},w.Event=function(t,e){if(!(this instanceof w.Event))return new w.Event(t,e);t&&t.type?(this.originalEvent=t,this.type=t.type,this.isDefaultPrevented=t.defaultPrevented||void 0===t.defaultPrevented&&!1===t.returnValue?_t:Tt,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&&w.extend(this,e),this.timeStamp=t&&t.timeStamp||Date.now(),this[w.expando]=!0},w.Event.prototype={constructor:w.Event,isDefaultPrevented:Tt,isPropagationStopped:Tt,isImmediatePropagationStopped:Tt,isSimulated:!1,preventDefault:function(){var t=this.originalEvent;this.isDefaultPrevented=_t,t&&!this.isSimulated&&t.preventDefault()},stopPropagation:function(){var t=this.originalEvent;this.isPropagationStopped=_t,t&&!this.isSimulated&&t.stopPropagation()},stopImmediatePropagation:function(){var t=this.originalEvent;this.isImmediatePropagationStopped=_t,t&&!this.isSimulated&&t.stopImmediatePropagation(),this.stopPropagation()}},w.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},w.event.addProp),w.each({focus:"focusin",blur:"focusout"},(function(t,e){w.event.special[t]={setup:function(){return kt(this,t,Ct),!1},trigger:function(){return kt(this,t),!0},_default:function(){return!0},delegateType:e}})),w.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},(function(t,e){w.event.special[t]={delegateType:e,bindType:e,handle:function(t){var n,i=this,o=t.relatedTarget,r=t.handleObj;return o&&(o===i||w.contains(i,o))||(t.type=r.origType,n=r.handler.apply(this,arguments),t.type=e),n}}})),w.fn.extend({on:function(t,e,n,i){return Pt(this,t,e,n,i)},one:function(t,e,n,i){return Pt(this,t,e,n,i,1)},off:function(t,e,n){var i,o;if(t&&t.preventDefault&&t.handleObj)return i=t.handleObj,w(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=Tt),this.each((function(){w.event.remove(this,t,n,e)}))}});var St=/<script|<style|<link/i,Et=/checked\s*(?:[^=]|=\s*.checked.)/i,Nt=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;function At(t,e){return S(t,"table")&&S(11!==e.nodeType?e:e.firstChild,"tr")&&w(t).children("tbody")[0]||t}function Dt(t){return t.type=(null!==t.getAttribute("type"))+"/"+t.type,t}function It(t){return"true/"===(t.type||"").slice(0,5)?t.type=t.type.slice(5):t.removeAttribute("type"),t}function jt(t,e){var n,i,o,r,s,a;if(1===e.nodeType){if(Q.hasData(t)&&(a=Q.get(t).events))for(o in Q.remove(e,"handle events"),a)for(n=0,i=a[o].length;n<i;n++)w.event.add(e,o,a[o][n]);G.hasData(t)&&(r=G.access(t),s=w.extend({},r),G.set(e,s))}}function Ht(t,e,n,i){e=r(e);var o,s,a,l,c,u,h=0,p=t.length,m=p-1,g=e[0],v=d(g);if(v||p>1&&"string"==typeof g&&!f.checkClone&&Et.test(g))return t.each((function(o){var r=t.eq(o);v&&(e[0]=g.call(this,o,r.html())),Ht(r,e,n,i)}));if(p&&(s=(o=xt(e,t[0].ownerDocument,!1,t,i)).firstChild,1===o.childNodes.length&&(o=s),s||i)){for(l=(a=w.map(vt(o,"script"),Dt)).length;h<p;h++)c=o,h!==m&&(c=w.clone(c,!0,!0),l&&w.merge(a,vt(c,"script"))),n.call(t[h],c,h);if(l)for(u=a[a.length-1].ownerDocument,w.map(a,It),h=0;h<l;h++)c=a[h],mt.test(c.type||"")&&!Q.access(c,"globalEval")&&w.contains(u,c)&&(c.src&&"module"!==(c.type||"").toLowerCase()?w._evalUrl&&!c.noModule&&w._evalUrl(c.src,{nonce:c.nonce||c.getAttribute("nonce")},u):y(c.textContent.replace(Nt,""),c,u))}return t}function Ot(t,e,n){for(var i,o=e?w.filter(e,t):t,r=0;null!=(i=o[r]);r++)n||1!==i.nodeType||w.cleanData(vt(i)),i.parentNode&&(n&&ot(i)&&yt(vt(i,"script")),i.parentNode.removeChild(i));return t}w.extend({htmlPrefilter:function(t){return t},clone:function(t,e,n){var i,o,r,s,a,l,c,u=t.cloneNode(!0),h=ot(t);if(!(f.noCloneChecked||1!==t.nodeType&&11!==t.nodeType||w.isXMLDoc(t)))for(s=vt(u),i=0,o=(r=vt(t)).length;i<o;i++)a=r[i],l=s[i],c=void 0,"input"===(c=l.nodeName.toLowerCase())&&ft.test(a.type)?l.checked=a.checked:"input"!==c&&"textarea"!==c||(l.defaultValue=a.defaultValue);if(e)if(n)for(r=r||vt(t),s=s||vt(u),i=0,o=r.length;i<o;i++)jt(r[i],s[i]);else jt(t,u);return(s=vt(u,"script")).length>0&&yt(s,!h&&vt(t,"script")),u},cleanData:function(t){for(var e,n,i,o=w.event.special,r=0;void 0!==(n=t[r]);r++)if(Y(n)){if(e=n[Q.expando]){if(e.events)for(i in e.events)o[i]?w.event.remove(n,i):w.removeEvent(n,i,e.handle);n[Q.expando]=void 0}n[G.expando]&&(n[G.expando]=void 0)}}}),w.fn.extend({detach:function(t){return Ot(this,t,!0)},remove:function(t){return Ot(this,t)},text:function(t){return F(this,(function(t){return void 0===t?w.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 Ht(this,arguments,(function(t){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||At(this,t).appendChild(t)}))},prepend:function(){return Ht(this,arguments,(function(t){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var e=At(this,t);e.insertBefore(t,e.firstChild)}}))},before:function(){return Ht(this,arguments,(function(t){this.parentNode&&this.parentNode.insertBefore(t,this)}))},after:function(){return Ht(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&&(w.cleanData(vt(t,!1)),t.textContent="");return this},clone:function(t,e){return t=null!=t&&t,e=null==e?t:e,this.map((function(){return w.clone(this,t,e)}))},html:function(t){return F(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&&!St.test(t)&&!gt[(dt.exec(t)||["",""])[1].toLowerCase()]){t=w.htmlPrefilter(t);try{for(;n<i;n++)1===(e=this[n]||{}).nodeType&&(w.cleanData(vt(e,!1)),e.innerHTML=t);e=0}catch(t){}}e&&this.empty().append(t)}),null,t,arguments.length)},replaceWith:function(){var t=[];return Ht(this,arguments,(function(e){var n=this.parentNode;w.inArray(this,t)<0&&(w.cleanData(vt(this)),n&&n.replaceChild(e,this))}),t)}}),w.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},(function(t,e){w.fn[t]=function(t){for(var n,i=[],o=w(t),r=o.length-1,a=0;a<=r;a++)n=a===r?this:this.clone(!0),w(o[a])[e](n),s.apply(i,n.get());return this.pushStack(i)}}));var Lt=new RegExp("^("+tt+")(?!px)[a-z%]+$","i"),qt=function(e){var n=e.ownerDocument.defaultView;return n&&n.opener||(n=t),n.getComputedStyle(e)},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},$t=new RegExp(nt.join("|"),"i");function Rt(t,e,n){var i,o,r,s,a=t.style;return(n=n||qt(t))&&(""!==(s=n.getPropertyValue(e)||n[e])||ot(t)||(s=w.style(t,e)),!f.pixelBoxStyles()&&Lt.test(s)&&$t.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 Wt(t,e){return{get:function(){if(!t())return(this.get=e).apply(this,arguments);delete this.get}}}!function(){function e(){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%",it.appendChild(c).appendChild(u);var e=t.getComputedStyle(u);i="1%"!==e.top,l=12===n(e.marginLeft),u.style.right="60%",s=36===n(e.right),o=36===n(e.width),u.style.position="absolute",r=12===n(u.offsetWidth/3),it.removeChild(c),u=null}}function n(t){return Math.round(parseFloat(t))}var i,o,r,s,a,l,c=g.createElement("div"),u=g.createElement("div");u.style&&(u.style.backgroundClip="content-box",u.cloneNode(!0).style.backgroundClip="",f.clearCloneStyle="content-box"===u.style.backgroundClip,w.extend(f,{boxSizingReliable:function(){return e(),o},pixelBoxStyles:function(){return e(),s},pixelPosition:function(){return e(),i},reliableMarginLeft:function(){return e(),l},scrollboxSize:function(){return e(),r},reliableTrDimensions:function(){var e,n,i,o;return null==a&&(e=g.createElement("table"),n=g.createElement("tr"),i=g.createElement("div"),e.style.cssText="position:absolute;left:-11111px;border-collapse:separate",n.style.cssText="border:1px solid",n.style.height="1px",i.style.height="9px",i.style.display="block",it.appendChild(e).appendChild(n).appendChild(i),o=t.getComputedStyle(n),a=parseInt(o.height,10)+parseInt(o.borderTopWidth,10)+parseInt(o.borderBottomWidth,10)===n.offsetHeight,it.removeChild(e)),a}}))}();var Ft=["Webkit","Moz","ms"],Bt=g.createElement("div").style,zt={};function Xt(t){var e=w.cssProps[t]||zt[t];return e||(t in Bt?t:zt[t]=function(t){for(var e=t[0].toUpperCase()+t.slice(1),n=Ft.length;n--;)if((t=Ft[n]+e)in Bt)return t}(t)||t)}var Ut=/^(none|table(?!-c[ea]).+)/,Yt=/^--/,Vt={position:"absolute",visibility:"hidden",display:"block"},Qt={letterSpacing:"0",fontWeight:"400"};function Gt(t,e,n){var i=et.exec(e);return i?Math.max(0,i[2]-(n||0))+(i[3]||"px"):e}function Jt(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+=w.css(t,n+nt[s],!0,o)),i?("content"===n&&(l-=w.css(t,"padding"+nt[s],!0,o)),"margin"!==n&&(l-=w.css(t,"border"+nt[s]+"Width",!0,o))):(l+=w.css(t,"padding"+nt[s],!0,o),"padding"!==n?l+=w.css(t,"border"+nt[s]+"Width",!0,o):a+=w.css(t,"border"+nt[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 Kt(t,e,n){var i=qt(t),o=(!f.boxSizingReliable()||n)&&"border-box"===w.css(t,"boxSizing",!1,i),r=o,s=Rt(t,e,i),a="offset"+e[0].toUpperCase()+e.slice(1);if(Lt.test(s)){if(!n)return s;s="auto"}return(!f.boxSizingReliable()&&o||!f.reliableTrDimensions()&&S(t,"tr")||"auto"===s||!parseFloat(s)&&"inline"===w.css(t,"display",!1,i))&&t.getClientRects().length&&(o="border-box"===w.css(t,"boxSizing",!1,i),(r=a in t)&&(s=t[a])),(s=parseFloat(s)||0)+Jt(t,e,n||(o?"border":"content"),r,i,s)+"px"}function Zt(t,e,n,i,o){return new Zt.prototype.init(t,e,n,i,o)}w.extend({cssHooks:{opacity:{get:function(t,e){if(e){var n=Rt(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=U(e),l=Yt.test(e),c=t.style;if(l||(e=Xt(a)),s=w.cssHooks[e]||w.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=et.exec(n))&&o[1]&&(n=at(t,e,o),r="number"),null!=n&&n==n&&("number"!==r||l||(n+=o&&o[3]||(w.cssNumber[a]?"":"px")),f.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=U(e);return Yt.test(e)||(e=Xt(a)),(s=w.cssHooks[e]||w.cssHooks[a])&&"get"in s&&(o=s.get(t,!0,n)),void 0===o&&(o=Rt(t,e,i)),"normal"===o&&e in Qt&&(o=Qt[e]),""===n||n?(r=parseFloat(o),!0===n||isFinite(r)?r||0:o):o}}),w.each(["height","width"],(function(t,e){w.cssHooks[e]={get:function(t,n,i){if(n)return!Ut.test(w.css(t,"display"))||t.getClientRects().length&&t.getBoundingClientRect().width?Kt(t,e,i):Mt(t,Vt,(function(){return Kt(t,e,i)}))},set:function(t,n,i){var o,r=qt(t),s=!f.scrollboxSize()&&"absolute"===r.position,a=(s||i)&&"border-box"===w.css(t,"boxSizing",!1,r),l=i?Jt(t,e,i,a,r):0;return a&&s&&(l-=Math.ceil(t["offset"+e[0].toUpperCase()+e.slice(1)]-parseFloat(r[e])-Jt(t,e,"border",!1,r)-.5)),l&&(o=et.exec(n))&&"px"!==(o[3]||"px")&&(t.style[e]=n,n=w.css(t,e)),Gt(0,n,l)}}})),w.cssHooks.marginLeft=Wt(f.reliableMarginLeft,(function(t,e){if(e)return(parseFloat(Rt(t,"marginLeft"))||t.getBoundingClientRect().left-Mt(t,{marginLeft:0},(function(){return t.getBoundingClientRect().left})))+"px"})),w.each({margin:"",padding:"",border:"Width"},(function(t,e){w.cssHooks[t+e]={expand:function(n){for(var i=0,o={},r="string"==typeof n?n.split(" "):[n];i<4;i++)o[t+nt[i]+e]=r[i]||r[i-2]||r[0];return o}},"margin"!==t&&(w.cssHooks[t+e].set=Gt)})),w.fn.extend({css:function(t,e){return F(this,(function(t,e,n){var i,o,r={},s=0;if(Array.isArray(e)){for(i=qt(t),o=e.length;s<o;s++)r[e[s]]=w.css(t,e[s],!1,i);return r}return void 0!==n?w.style(t,e,n):w.css(t,e)}),t,e,arguments.length>1)}}),w.Tween=Zt,Zt.prototype={constructor:Zt,init:function(t,e,n,i,o,r){this.elem=t,this.prop=n,this.easing=o||w.easing._default,this.options=e,this.start=this.now=this.cur(),this.end=i,this.unit=r||(w.cssNumber[n]?"":"px")},cur:function(){var t=Zt.propHooks[this.prop];return t&&t.get?t.get(this):Zt.propHooks._default.get(this)},run:function(t){var e,n=Zt.propHooks[this.prop];return this.options.duration?this.pos=e=w.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):Zt.propHooks._default.set(this),this}},Zt.prototype.init.prototype=Zt.prototype,Zt.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=w.css(t.elem,t.prop,""))&&"auto"!==e?e:0},set:function(t){w.fx.step[t.prop]?w.fx.step[t.prop](t):1!==t.elem.nodeType||!w.cssHooks[t.prop]&&null==t.elem.style[Xt(t.prop)]?t.elem[t.prop]=t.now:w.style(t.elem,t.prop,t.now+t.unit)}}},Zt.propHooks.scrollTop=Zt.propHooks.scrollLeft={set:function(t){t.elem.nodeType&&t.elem.parentNode&&(t.elem[t.prop]=t.now)}},w.easing={linear:function(t){return t},swing:function(t){return.5-Math.cos(t*Math.PI)/2},_default:"swing"},w.fx=Zt.prototype.init,w.fx.step={};var te,ee,ne=/^(?:toggle|show|hide)$/,ie=/queueHooks$/;function oe(){ee&&(!1===g.hidden&&t.requestAnimationFrame?t.requestAnimationFrame(oe):t.setTimeout(oe,w.fx.interval),w.fx.tick())}function re(){return t.setTimeout((function(){te=void 0})),te=Date.now()}function se(t,e){var n,i=0,o={height:t};for(e=e?1:0;i<4;i+=2-e)o["margin"+(n=nt[i])]=o["padding"+n]=t;return e&&(o.opacity=o.width=t),o}function ae(t,e,n){for(var i,o=(le.tweeners[e]||[]).concat(le.tweeners["*"]),r=0,s=o.length;r<s;r++)if(i=o[r].call(n,e,t))return i}function le(t,e,n){var i,o,r=0,s=le.prefilters.length,a=w.Deferred().always((function(){delete l.elem})),l=function(){if(o)return!1;for(var e=te||re(),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:w.extend({},e),opts:w.extend(!0,{specialEasing:{},easing:w.easing._default},n),originalProperties:e,originalOptions:n,startTime:te||re(),duration:n.duration,tweens:[],createTween:function(e,n){var i=w.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=U(n)],r=t[n],Array.isArray(r)&&(o=r[1],r=t[n]=r[0]),n!==i&&(t[i]=r,delete t[n]),(s=w.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=le.prefilters[r].call(c,t,u,c.opts))return d(i.stop)&&(w._queueHooks(c.elem,c.opts.queue).stop=i.stop.bind(i)),i;return w.map(u,ae,c),d(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),w.fx.timer(w.extend(l,{elem:t,anim:c,queue:c.opts.queue})),c}w.Animation=w.extend(le,{tweeners:{"*":[function(t,e){var n=this.createTween(t,e);return at(n.elem,t,et.exec(e),n),n}]},tweener:function(t,e){d(t)?(e=t,t=["*"]):t=t.match(O);for(var n,i=0,o=t.length;i<o;i++)n=t[i],le.tweeners[n]=le.tweeners[n]||[],le.tweeners[n].unshift(e)},prefilters:[function(t,e,n){var i,o,r,s,a,l,c,u,h="width"in e||"height"in e,p=this,f={},d=t.style,m=t.nodeType&&st(t),g=Q.get(t,"fxshow");for(i in n.queue||(null==(s=w._queueHooks(t,"fx")).unqueued&&(s.unqueued=0,a=s.empty.fire,s.empty.fire=function(){s.unqueued||a()}),s.unqueued++,p.always((function(){p.always((function(){s.unqueued--,w.queue(t,"fx").length||s.empty.fire()}))}))),e)if(o=e[i],ne.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}f[i]=g&&g[i]||w.style(t,i)}if((l=!w.isEmptyObject(e))||!w.isEmptyObject(f))for(i in h&&1===t.nodeType&&(n.overflow=[d.overflow,d.overflowX,d.overflowY],null==(c=g&&g.display)&&(c=Q.get(t,"display")),"none"===(u=w.css(t,"display"))&&(c?u=c:(ut([t],!0),c=t.style.display||c,u=w.css(t,"display"),ut([t]))),("inline"===u||"inline-block"===u&&null!=c)&&"none"===w.css(t,"float")&&(l||(p.done((function(){d.display=c})),null==c&&(u=d.display,c="none"===u?"":u)),d.display="inline-block")),n.overflow&&(d.overflow="hidden",p.always((function(){d.overflow=n.overflow[0],d.overflowX=n.overflow[1],d.overflowY=n.overflow[2]}))),l=!1,f)l||(g?"hidden"in g&&(m=g.hidden):g=Q.access(t,"fxshow",{display:c}),r&&(g.hidden=!m),m&&ut([t],!0),p.done((function(){for(i in m||ut([t]),Q.remove(t,"fxshow"),f)w.style(t,i,f[i])}))),l=ae(m?g[i]:0,i,p),i in g||(g[i]=l.start,m&&(l.end=l.start,l.start=0))}],prefilter:function(t,e){e?le.prefilters.unshift(t):le.prefilters.push(t)}}),w.speed=function(t,e,n){var i=t&&"object"==typeof t?w.extend({},t):{complete:n||!n&&e||d(t)&&t,duration:t,easing:n&&e||e&&!d(e)&&e};return w.fx.off?i.duration=0:"number"!=typeof i.duration&&(i.duration in w.fx.speeds?i.duration=w.fx.speeds[i.duration]:i.duration=w.fx.speeds._default),null!=i.queue&&!0!==i.queue||(i.queue="fx"),i.old=i.complete,i.complete=function(){d(i.old)&&i.old.call(this),i.queue&&w.dequeue(this,i.queue)},i},w.fn.extend({fadeTo:function(t,e,n,i){return this.filter(st).css("opacity",0).show().end().animate({opacity:e},t,n,i)},animate:function(t,e,n,i){var o=w.isEmptyObject(t),r=w.speed(e,n,i),s=function(){var e=le(this,w.extend({},t),r);(o||Q.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=w.timers,s=Q.get(this);if(o)s[o]&&s[o].stop&&i(s[o]);else for(o in s)s[o]&&s[o].stop&&ie.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||w.dequeue(this,t)}))},finish:function(t){return!1!==t&&(t=t||"fx"),this.each((function(){var e,n=Q.get(this),i=n[t+"queue"],o=n[t+"queueHooks"],r=w.timers,s=i?i.length:0;for(n.finish=!0,w.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}))}}),w.each(["toggle","show","hide"],(function(t,e){var n=w.fn[e];w.fn[e]=function(t,i,o){return null==t||"boolean"==typeof t?n.apply(this,arguments):this.animate(se(e,!0),t,i,o)}})),w.each({slideDown:se("show"),slideUp:se("hide"),slideToggle:se("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},(function(t,e){w.fn[t]=function(t,n,i){return this.animate(e,t,n,i)}})),w.timers=[],w.fx.tick=function(){var t,e=0,n=w.timers;for(te=Date.now();e<n.length;e++)(t=n[e])()||n[e]!==t||n.splice(e--,1);n.length||w.fx.stop(),te=void 0},w.fx.timer=function(t){w.timers.push(t),w.fx.start()},w.fx.interval=13,w.fx.start=function(){ee||(ee=!0,oe())},w.fx.stop=function(){ee=null},w.fx.speeds={slow:600,fast:200,_default:400},w.fn.delay=function(e,n){return e=w.fx&&w.fx.speeds[e]||e,n=n||"fx",this.queue(n,(function(n,i){var o=t.setTimeout(n,e);i.stop=function(){t.clearTimeout(o)}}))},function(){var t=g.createElement("input"),e=g.createElement("select").appendChild(g.createElement("option"));t.type="checkbox",f.checkOn=""!==t.value,f.optSelected=e.selected,(t=g.createElement("input")).value="t",t.type="radio",f.radioValue="t"===t.value}();var ce,ue=w.expr.attrHandle;w.fn.extend({attr:function(t,e){return F(this,w.attr,t,e,arguments.length>1)},removeAttr:function(t){return this.each((function(){w.removeAttr(this,t)}))}}),w.extend({attr:function(t,e,n){var i,o,r=t.nodeType;if(3!==r&&8!==r&&2!==r)return void 0===t.getAttribute?w.prop(t,e,n):(1===r&&w.isXMLDoc(t)||(o=w.attrHooks[e.toLowerCase()]||(w.expr.match.bool.test(e)?ce:void 0)),void 0!==n?null===n?void w.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=w.find.attr(t,e))?void 0:i)},attrHooks:{type:{set:function(t,e){if(!f.radioValue&&"radio"===e&&S(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(O);if(o&&1===t.nodeType)for(;n=o[i++];)t.removeAttribute(n)}}),ce={set:function(t,e,n){return!1===e?w.removeAttr(t,n):t.setAttribute(n,n),n}},w.each(w.expr.match.bool.source.match(/\w+/g),(function(t,e){var n=ue[e]||w.find.attr;ue[e]=function(t,e,i){var o,r,s=e.toLowerCase();return i||(r=ue[s],ue[s]=o,o=null!=n(t,e,i)?s:null,ue[s]=r),o}}));var he=/^(?:input|select|textarea|button)$/i,pe=/^(?:a|area)$/i;function fe(t){return(t.match(O)||[]).join(" ")}function de(t){return t.getAttribute&&t.getAttribute("class")||""}function me(t){return Array.isArray(t)?t:"string"==typeof t&&t.match(O)||[]}w.fn.extend({prop:function(t,e){return F(this,w.prop,t,e,arguments.length>1)},removeProp:function(t){return this.each((function(){delete this[w.propFix[t]||t]}))}}),w.extend({prop:function(t,e,n){var i,o,r=t.nodeType;if(3!==r&&8!==r&&2!==r)return 1===r&&w.isXMLDoc(t)||(e=w.propFix[e]||e,o=w.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=w.find.attr(t,"tabindex");return e?parseInt(e,10):he.test(t.nodeName)||pe.test(t.nodeName)&&t.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),f.optSelected||(w.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)}}),w.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],(function(){w.propFix[this.toLowerCase()]=this})),w.fn.extend({addClass:function(t){var e,n,i,o,r,s,a,l=0;if(d(t))return this.each((function(e){w(this).addClass(t.call(this,e,de(this)))}));if((e=me(t)).length)for(;n=this[l++];)if(o=de(n),i=1===n.nodeType&&" "+fe(o)+" "){for(s=0;r=e[s++];)i.indexOf(" "+r+" ")<0&&(i+=r+" ");o!==(a=fe(i))&&n.setAttribute("class",a)}return this},removeClass:function(t){var e,n,i,o,r,s,a,l=0;if(d(t))return this.each((function(e){w(this).removeClass(t.call(this,e,de(this)))}));if(!arguments.length)return this.attr("class","");if((e=me(t)).length)for(;n=this[l++];)if(o=de(n),i=1===n.nodeType&&" "+fe(o)+" "){for(s=0;r=e[s++];)for(;i.indexOf(" "+r+" ")>-1;)i=i.replace(" "+r+" "," ");o!==(a=fe(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):d(t)?this.each((function(n){w(this).toggleClass(t.call(this,n,de(this),e),e)})):this.each((function(){var e,o,r,s;if(i)for(o=0,r=w(this),s=me(t);e=s[o++];)r.hasClass(e)?r.removeClass(e):r.addClass(e);else void 0!==t&&"boolean"!==n||((e=de(this))&&Q.set(this,"__className__",e),this.setAttribute&&this.setAttribute("class",e||!1===t?"":Q.get(this,"__className__")||""))}))},hasClass:function(t){var e,n,i=0;for(e=" "+t+" ";n=this[i++];)if(1===n.nodeType&&(" "+fe(de(n))+" ").indexOf(e)>-1)return!0;return!1}});var ge=/\r/g;w.fn.extend({val:function(t){var e,n,i,o=this[0];return arguments.length?(i=d(t),this.each((function(n){var o;1===this.nodeType&&(null==(o=i?t.call(this,n,w(this).val()):t)?o="":"number"==typeof o?o+="":Array.isArray(o)&&(o=w.map(o,(function(t){return null==t?"":t+""}))),(e=w.valHooks[this.type]||w.valHooks[this.nodeName.toLowerCase()])&&"set"in e&&void 0!==e.set(this,o,"value")||(this.value=o))}))):o?(e=w.valHooks[o.type]||w.valHooks[o.nodeName.toLowerCase()])&&"get"in e&&void 0!==(n=e.get(o,"value"))?n:"string"==typeof(n=o.value)?n.replace(ge,""):null==n?"":n:void 0}}),w.extend({valHooks:{option:{get:function(t){var e=w.find.attr(t,"value");return null!=e?e:fe(w.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||!S(n.parentNode,"optgroup"))){if(e=w(n).val(),s)return e;a.push(e)}return a},set:function(t,e){for(var n,i,o=t.options,r=w.makeArray(e),s=o.length;s--;)((i=o[s]).selected=w.inArray(w.valHooks.option.get(i),r)>-1)&&(n=!0);return n||(t.selectedIndex=-1),r}}}}),w.each(["radio","checkbox"],(function(){w.valHooks[this]={set:function(t,e){if(Array.isArray(e))return t.checked=w.inArray(w(t).val(),e)>-1}},f.checkOn||(w.valHooks[this].get=function(t){return null===t.getAttribute("value")?"on":t.value})})),f.focusin="onfocusin"in t;var ve=/^(?:focusinfocus|focusoutblur)$/,ye=function(t){t.stopPropagation()};w.extend(w.event,{trigger:function(e,n,i,o){var r,s,a,l,c,h,p,f,v=[i||g],y=u.call(e,"type")?e.type:e,b=u.call(e,"namespace")?e.namespace.split("."):[];if(s=f=a=i=i||g,3!==i.nodeType&&8!==i.nodeType&&!ve.test(y+w.event.triggered)&&(y.indexOf(".")>-1&&(b=y.split("."),y=b.shift(),b.sort()),c=y.indexOf(":")<0&&"on"+y,(e=e[w.expando]?e:new w.Event(y,"object"==typeof e&&e)).isTrigger=o?2:3,e.namespace=b.join("."),e.rnamespace=e.namespace?new RegExp("(^|\\.)"+b.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=void 0,e.target||(e.target=i),n=null==n?[e]:w.makeArray(n,[e]),p=w.event.special[y]||{},o||!p.trigger||!1!==p.trigger.apply(i,n))){if(!o&&!p.noBubble&&!m(i)){for(l=p.delegateType||y,ve.test(l+y)||(s=s.parentNode);s;s=s.parentNode)v.push(s),a=s;a===(i.ownerDocument||g)&&v.push(a.defaultView||a.parentWindow||t)}for(r=0;(s=v[r++])&&!e.isPropagationStopped();)f=s,e.type=r>1?l:p.bindType||y,(h=(Q.get(s,"events")||Object.create(null))[e.type]&&Q.get(s,"handle"))&&h.apply(s,n),(h=c&&s[c])&&h.apply&&Y(s)&&(e.result=h.apply(s,n),!1===e.result&&e.preventDefault());return e.type=y,o||e.isDefaultPrevented()||p._default&&!1!==p._default.apply(v.pop(),n)||!Y(i)||c&&d(i[y])&&!m(i)&&((a=i[c])&&(i[c]=null),w.event.triggered=y,e.isPropagationStopped()&&f.addEventListener(y,ye),i[y](),e.isPropagationStopped()&&f.removeEventListener(y,ye),w.event.triggered=void 0,a&&(i[c]=a)),e.result}},simulate:function(t,e,n){var i=w.extend(new w.Event,n,{type:t,isSimulated:!0});w.event.trigger(i,null,e)}}),w.fn.extend({trigger:function(t,e){return this.each((function(){w.event.trigger(t,e,this)}))},triggerHandler:function(t,e){var n=this[0];if(n)return w.event.trigger(t,e,n,!0)}}),f.focusin||w.each({focus:"focusin",blur:"focusout"},(function(t,e){var n=function(t){w.event.simulate(e,t.target,w.event.fix(t))};w.event.special[e]={setup:function(){var i=this.ownerDocument||this.document||this,o=Q.access(i,e);o||i.addEventListener(t,n,!0),Q.access(i,e,(o||0)+1)},teardown:function(){var i=this.ownerDocument||this.document||this,o=Q.access(i,e)-1;o?Q.access(i,e,o):(i.removeEventListener(t,n,!0),Q.remove(i,e))}}}));var be=t.location,xe={guid:Date.now()},we=/\?/;w.parseXML=function(e){var n,i;if(!e||"string"!=typeof e)return null;try{n=(new t.DOMParser).parseFromString(e,"text/xml")}catch(t){}return i=n&&n.getElementsByTagName("parsererror")[0],n&&!i||w.error("Invalid XML: "+(i?w.map(i.childNodes,(function(t){return t.textContent})).join("\n"):e)),n};var _e=/\[\]$/,Te=/\r?\n/g,Ce=/^(?:submit|button|image|reset|file)$/i,Pe=/^(?:input|select|textarea|keygen)/i;function ke(t,e,n,i){var o;if(Array.isArray(e))w.each(e,(function(e,o){n||_e.test(t)?i(t,o):ke(t+"["+("object"==typeof o&&null!=o?e:"")+"]",o,n,i)}));else if(n||"object"!==b(e))i(t,e);else for(o in e)ke(t+"["+o+"]",e[o],n,i)}w.param=function(t,e){var n,i=[],o=function(t,e){var n=d(e)?e():e;i[i.length]=encodeURIComponent(t)+"="+encodeURIComponent(null==n?"":n)};if(null==t)return"";if(Array.isArray(t)||t.jquery&&!w.isPlainObject(t))w.each(t,(function(){o(this.name,this.value)}));else for(n in t)ke(n,t[n],e,o);return i.join("&")},w.fn.extend({serialize:function(){return w.param(this.serializeArray())},serializeArray:function(){return this.map((function(){var t=w.prop(this,"elements");return t?w.makeArray(t):this})).filter((function(){var t=this.type;return this.name&&!w(this).is(":disabled")&&Pe.test(this.nodeName)&&!Ce.test(t)&&(this.checked||!ft.test(t))})).map((function(t,e){var n=w(this).val();return null==n?null:Array.isArray(n)?w.map(n,(function(t){return{name:e.name,value:t.replace(Te,"\r\n")}})):{name:e.name,value:n.replace(Te,"\r\n")}})).get()}});var Se=/%20/g,Ee=/#.*$/,Ne=/([?&])_=[^&]*/,Ae=/^(.*?):[ \t]*([^\r\n]*)$/gm,De=/^(?:GET|HEAD)$/,Ie=/^\/\//,je={},He={},Oe="*/".concat("*"),Le=g.createElement("a");function qe(t){return function(e,n){"string"!=typeof e&&(n=e,e="*");var i,o=0,r=e.toLowerCase().match(O)||[];if(d(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===He;function s(a){var l;return o[a]=!0,w.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 $e(t,e){var n,i,o=w.ajaxSettings.flatOptions||{};for(n in e)void 0!==e[n]&&((o[n]?t:i||(i={}))[n]=e[n]);return i&&w.extend(!0,t,i),t}Le.href=be.href,w.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:be.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(be.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Oe,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":w.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(t,e){return e?$e($e(t,w.ajaxSettings),e):$e(w.ajaxSettings,t)},ajaxPrefilter:qe(je),ajaxTransport:qe(He),ajax:function(e,n){"object"==typeof e&&(n=e,e=void 0),n=n||{};var i,o,r,s,a,l,c,u,h,p,f=w.ajaxSetup({},n),d=f.context||f,m=f.context&&(d.nodeType||d.jquery)?w(d):w.event,v=w.Deferred(),y=w.Callbacks("once memory"),b=f.statusCode||{},x={},_={},T="canceled",C={readyState:0,getResponseHeader:function(t){var e;if(c){if(!s)for(s={};e=Ae.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=_[t.toLowerCase()]=_[t.toLowerCase()]||t,x[t]=e),this},overrideMimeType:function(t){return null==c&&(f.mimeType=t),this},statusCode:function(t){var e;if(t)if(c)C.always(t[C.status]);else for(e in t)b[e]=[b[e],t[e]];return this},abort:function(t){var e=t||T;return i&&i.abort(e),P(0,e),this}};if(v.promise(C),f.url=((e||f.url||be.href)+"").replace(Ie,be.protocol+"//"),f.type=n.method||n.type||f.method||f.type,f.dataTypes=(f.dataType||"*").toLowerCase().match(O)||[""],null==f.crossDomain){l=g.createElement("a");try{l.href=f.url,l.href=l.href,f.crossDomain=Le.protocol+"//"+Le.host!=l.protocol+"//"+l.host}catch(t){f.crossDomain=!0}}if(f.data&&f.processData&&"string"!=typeof f.data&&(f.data=w.param(f.data,f.traditional)),Me(je,f,n,C),c)return C;for(h in(u=w.event&&f.global)&&0==w.active++&&w.event.trigger("ajaxStart"),f.type=f.type.toUpperCase(),f.hasContent=!De.test(f.type),o=f.url.replace(Ee,""),f.hasContent?f.data&&f.processData&&0===(f.contentType||"").indexOf("application/x-www-form-urlencoded")&&(f.data=f.data.replace(Se,"+")):(p=f.url.slice(o.length),f.data&&(f.processData||"string"==typeof f.data)&&(o+=(we.test(o)?"&":"?")+f.data,delete f.data),!1===f.cache&&(o=o.replace(Ne,"$1"),p=(we.test(o)?"&":"?")+"_="+xe.guid+++p),f.url=o+p),f.ifModified&&(w.lastModified[o]&&C.setRequestHeader("If-Modified-Since",w.lastModified[o]),w.etag[o]&&C.setRequestHeader("If-None-Match",w.etag[o])),(f.data&&f.hasContent&&!1!==f.contentType||n.contentType)&&C.setRequestHeader("Content-Type",f.contentType),C.setRequestHeader("Accept",f.dataTypes[0]&&f.accepts[f.dataTypes[0]]?f.accepts[f.dataTypes[0]]+("*"!==f.dataTypes[0]?", "+Oe+"; q=0.01":""):f.accepts["*"]),f.headers)C.setRequestHeader(h,f.headers[h]);if(f.beforeSend&&(!1===f.beforeSend.call(d,C,f)||c))return C.abort();if(T="abort",y.add(f.complete),C.done(f.success),C.fail(f.error),i=Me(He,f,n,C)){if(C.readyState=1,u&&m.trigger("ajaxSend",[C,f]),c)return C;f.async&&f.timeout>0&&(a=t.setTimeout((function(){C.abort("timeout")}),f.timeout));try{c=!1,i.send(x,P)}catch(t){if(c)throw t;P(-1,t)}}else P(-1,"No Transport");function P(e,n,s,l){var h,p,g,x,_,T=n;c||(c=!0,a&&t.clearTimeout(a),i=void 0,r=l||"",C.readyState=e>0?4:0,h=e>=200&&e<300||304===e,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]}(f,C,s)),!h&&w.inArray("script",f.dataTypes)>-1&&w.inArray("json",f.dataTypes)<0&&(f.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}}(f,x,C,h),h?(f.ifModified&&((_=C.getResponseHeader("Last-Modified"))&&(w.lastModified[o]=_),(_=C.getResponseHeader("etag"))&&(w.etag[o]=_)),204===e||"HEAD"===f.type?T="nocontent":304===e?T="notmodified":(T=x.state,p=x.data,h=!(g=x.error))):(g=T,!e&&T||(T="error",e<0&&(e=0))),C.status=e,C.statusText=(n||T)+"",h?v.resolveWith(d,[p,T,C]):v.rejectWith(d,[C,T,g]),C.statusCode(b),b=void 0,u&&m.trigger(h?"ajaxSuccess":"ajaxError",[C,f,h?p:g]),y.fireWith(d,[C,T]),u&&(m.trigger("ajaxComplete",[C,f]),--w.active||w.event.trigger("ajaxStop")))}return C},getJSON:function(t,e,n){return w.get(t,e,n,"json")},getScript:function(t,e){return w.get(t,void 0,e,"script")}}),w.each(["get","post"],(function(t,e){w[e]=function(t,n,i,o){return d(n)&&(o=o||i,i=n,n=void 0),w.ajax(w.extend({url:t,type:e,dataType:o,data:n,success:i},w.isPlainObject(t)&&t))}})),w.ajaxPrefilter((function(t){var e;for(e in t.headers)"content-type"===e.toLowerCase()&&(t.contentType=t.headers[e]||"")})),w._evalUrl=function(t,e,n){return w.ajax({url:t,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}},dataFilter:function(t){w.globalEval(t,e,n)}})},w.fn.extend({wrapAll:function(t){var e;return this[0]&&(d(t)&&(t=t.call(this[0])),e=w(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 d(t)?this.each((function(e){w(this).wrapInner(t.call(this,e))})):this.each((function(){var e=w(this),n=e.contents();n.length?n.wrapAll(t):e.append(t)}))},wrap:function(t){var e=d(t);return this.each((function(n){w(this).wrapAll(e?t.call(this,n):t)}))},unwrap:function(t){return this.parent(t).not("body").each((function(){w(this).replaceWith(this.childNodes)})),this}}),w.expr.pseudos.hidden=function(t){return!w.expr.pseudos.visible(t)},w.expr.pseudos.visible=function(t){return!!(t.offsetWidth||t.offsetHeight||t.getClientRects().length)},w.ajaxSettings.xhr=function(){try{return new t.XMLHttpRequest}catch(t){}};var Re={0:200,1223:204},We=w.ajaxSettings.xhr();f.cors=!!We&&"withCredentials"in We,f.ajax=We=!!We,w.ajaxTransport((function(e){var n,i;if(f.cors||We&&!e.crossDomain)return{send:function(o,r){var s,a=e.xhr();if(a.open(e.type,e.url,e.async,e.username,e.password),e.xhrFields)for(s in e.xhrFields)a[s]=e.xhrFields[s];for(s in e.mimeType&&a.overrideMimeType&&a.overrideMimeType(e.mimeType),e.crossDomain||o["X-Requested-With"]||(o["X-Requested-With"]="XMLHttpRequest"),o)a.setRequestHeader(s,o[s]);n=function(t){return function(){n&&(n=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(Re[a.status]||a.status,a.statusText,"text"!==(a.responseType||"text")||"string"!=typeof a.responseText?{binary:a.response}:{text:a.responseText},a.getAllResponseHeaders()))}},a.onload=n(),i=a.onerror=a.ontimeout=n("error"),void 0!==a.onabort?a.onabort=i:a.onreadystatechange=function(){4===a.readyState&&t.setTimeout((function(){n&&i()}))},n=n("abort");try{a.send(e.hasContent&&e.data||null)}catch(t){if(n)throw t}},abort:function(){n&&n()}}})),w.ajaxPrefilter((function(t){t.crossDomain&&(t.contents.script=!1)})),w.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 w.globalEval(t),t}}}),w.ajaxPrefilter("script",(function(t){void 0===t.cache&&(t.cache=!1),t.crossDomain&&(t.type="GET")})),w.ajaxTransport("script",(function(t){var e,n;if(t.crossDomain||t.scriptAttrs)return{send:function(i,o){e=w("<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)}),g.head.appendChild(e[0])},abort:function(){n&&n()}}}));var Fe,Be=[],ze=/(=)\?(?=&|$)|\?\?/;w.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var t=Be.pop()||w.expando+"_"+xe.guid++;return this[t]=!0,t}}),w.ajaxPrefilter("json jsonp",(function(e,n,i){var o,r,s,a=!1!==e.jsonp&&(ze.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&ze.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return o=e.jsonpCallback=d(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(ze,"$1"+o):!1!==e.jsonp&&(e.url+=(we.test(e.url)?"&":"?")+e.jsonp+"="+o),e.converters["script json"]=function(){return s||w.error(o+" was not called"),s[0]},e.dataTypes[0]="json",r=t[o],t[o]=function(){s=arguments},i.always((function(){void 0===r?w(t).removeProp(o):t[o]=r,e[o]&&(e.jsonpCallback=n.jsonpCallback,Be.push(o)),s&&d(r)&&r(s[0]),s=r=void 0})),"script"})),f.createHTMLDocument=((Fe=g.implementation.createHTMLDocument("").body).innerHTML="<form></form><form></form>",2===Fe.childNodes.length),w.parseHTML=function(t,e,n){return"string"!=typeof t?[]:("boolean"==typeof e&&(n=e,e=!1),e||(f.createHTMLDocument?((i=(e=g.implementation.createHTMLDocument("")).createElement("base")).href=g.location.href,e.head.appendChild(i)):e=g),r=!n&&[],(o=E.exec(t))?[e.createElement(o[1])]:(o=xt([t],e,r),r&&r.length&&w(r).remove(),w.merge([],o.childNodes)));var i,o,r},w.fn.load=function(t,e,n){var i,o,r,s=this,a=t.indexOf(" ");return a>-1&&(i=fe(t.slice(a)),t=t.slice(0,a)),d(e)?(n=e,e=void 0):e&&"object"==typeof e&&(o="POST"),s.length>0&&w.ajax({url:t,type:o||"GET",dataType:"html",data:e}).done((function(t){r=arguments,s.html(i?w("<div>").append(w.parseHTML(t)).find(i):t)})).always(n&&function(t,e){s.each((function(){n.apply(this,r||[t.responseText,e,t])}))}),this},w.expr.pseudos.animated=function(t){return w.grep(w.timers,(function(e){return t===e.elem})).length},w.offset={setOffset:function(t,e,n){var i,o,r,s,a,l,c=w.css(t,"position"),u=w(t),h={};"static"===c&&(t.style.position="relative"),a=u.offset(),r=w.css(t,"top"),l=w.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),d(e)&&(e=e.call(t,n,w.extend({},a))),null!=e.top&&(h.top=e.top-a.top+s),null!=e.left&&(h.left=e.left-a.left+o),"using"in e?e.using.call(t,h):u.css(h)}},w.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each((function(e){w.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"===w.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"===w.css(t,"position");)t=t.parentNode;t&&t!==i&&1===t.nodeType&&((o=w(t).offset()).top+=w.css(t,"borderTopWidth",!0),o.left+=w.css(t,"borderLeftWidth",!0))}return{top:e.top-o.top-w.css(i,"marginTop",!0),left:e.left-o.left-w.css(i,"marginLeft",!0)}}},offsetParent:function(){return this.map((function(){for(var t=this.offsetParent;t&&"static"===w.css(t,"position");)t=t.offsetParent;return t||it}))}}),w.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},(function(t,e){var n="pageYOffset"===e;w.fn[t]=function(i){return F(this,(function(t,i,o){var r;if(m(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)}})),w.each(["top","left"],(function(t,e){w.cssHooks[e]=Wt(f.pixelPosition,(function(t,n){if(n)return n=Rt(t,e),Lt.test(n)?w(t).position()[e]+"px":n}))})),w.each({Height:"height",Width:"width"},(function(t,e){w.each({padding:"inner"+t,content:e,"":"outer"+t},(function(n,i){w.fn[i]=function(o,r){var s=arguments.length&&(n||"boolean"!=typeof o),a=n||(!0===o||!0===r?"margin":"border");return F(this,(function(e,n,o){var r;return m(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?w.css(e,n,a):w.style(e,n,o,a)}),e,s?o:void 0,s)}}))})),w.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],(function(t,e){w.fn[e]=function(t){return this.on(e,t)}})),w.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)}}),w.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){w.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;w.proxy=function(t,e){var n,i,r;if("string"==typeof e&&(n=t[e],e=t,t=n),d(t))return i=o.call(arguments,2),r=function(){return t.apply(e||this,i.concat(o.call(arguments)))},r.guid=t.guid=t.guid||w.guid++,r},w.holdReady=function(t){t?w.readyWait++:w.ready(!0)},w.isArray=Array.isArray,w.parseJSON=JSON.parse,w.nodeName=S,w.isFunction=d,w.isWindow=m,w.camelCase=U,w.type=b,w.now=Date.now,w.isNumeric=function(t){var e=w.type(t);return("number"===e||"string"===e)&&!isNaN(t-parseFloat(t))},w.trim=function(t){return null==t?"":(t+"").replace(Xe,"")},"function"==typeof define&&define.amd&&define("jquery",[],(function(){return w}));var Ue=t.jQuery,Ye=t.$;return w.noConflict=function(e){return t.$===w&&(t.$=Ye),e&&t.jQuery===w&&(t.jQuery=Ue),w},void 0===e&&(t.jQuery=t.$=w),w}));window.$=window.jQuery=t(e);t(e).Deferred.exceptionHook=function(t){throw t};function n(t,e=""){let n=e,i=document.cookie.split("; ");for(const o of i){let i=o.split("=");if(i[0]==t)try{n=decodeURIComponent(i[1])}catch(n){return console.error(`Error parsing cookie value for "${t}": ${n}`),e}}return n}function i(){let i=n("password");""==i&&(i=function(t=8){const e="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!#$%&'*+-.^_`|~";let n="";for(let i=0;i<t;i++)n+=e[Math.floor(Math.random()*e.length)];return n}(),o("password",i)),t(e)("input[name=postname]").val(n("name")),t(e)("input[name=postemail]").val(n("email")),t(e)("input[name=postpassword]").val(i),t(e)("input[name=delete-password]").val(i)}function o(t,e,n,i){void 0!==i&&""!==i||(i=webroot);let o="";if(void 0!==n&&""!==n){o=";expires=";let t=new Date;t.setTime(t.getTime()+864e5*n),o+=t.toUTCString()}document.cookie=`${t}=${e}${o};path=${i};sameSite=strict`}function r(t,e=""){if(null==localStorage)return n(t,e);let i=localStorage.getItem(t);return null===i?e:i}function s(t,e=!1){let n=r(t,e);return 1==n||"true"==n}function a(t,e=0){return Number.parseFloat(r(t,e))}function l(t,e){let n=e;try{n=JSON.parse(r(t,e))}catch(t){n=e}return n}function c(t,e){null==localStorage?o(t,e):localStorage.setItem(t,e)}!function(t){"use strict";"function"==typeof define&&define.amd?define(["jquery"],t):t(jQuery)}((function(t){"use strict";return t.ui=t.ui||{},t.ui.version="1.13.2"})),function(t){"use strict";"function"==typeof define&&define.amd?define(["jquery","./version"],t):t(jQuery)}((function(t){"use strict";return t.ui.plugin={add:function(e,n,i){var o,r=t.ui[e].prototype;for(o in i)r.plugins[o]=r.plugins[o]||[],r.plugins[o].push([n,i[o]])},call:function(t,e,n,i){var o,r=t.plugins[e];if(r&&(i||t.element[0].parentNode&&11!==t.element[0].parentNode.nodeType))for(o=0;o<r.length;o++)t.options[r[o][0]]&&r[o][1].apply(t.element,n)}}})),function(t){"use strict";"function"==typeof define&&define.amd?define(["jquery","./version"],t):t(jQuery)}((function(t){"use strict";return t.ui.safeActiveElement=function(t){var e;try{e=t.activeElement}catch(n){e=t.body}return e||(e=t.body),e.nodeName||(e=t.body),e}})),
/*!
 * jQuery UI Widget 1.13.2
 * http://jqueryui.com
 *
 * Copyright jQuery Foundation and other contributors
 * Released under the MIT license.
 * http://jquery.org/license
 */
function(t){"use strict";"function"==typeof define&&define.amd?define(["jquery","./version"],t):t(jQuery)}((function(t){"use strict";var e,n=0,i=Array.prototype.hasOwnProperty,o=Array.prototype.slice;return t.cleanData=(e=t.cleanData,function(n){var i,o,r;for(r=0;null!=(o=n[r]);r++)(i=t._data(o,"events"))&&i.remove&&t(o).triggerHandler("remove");e(n)}),t.widget=function(e,n,i){var o,r,s,a={},l=e.split(".")[0],c=l+"-"+(e=e.split(".")[1]);return i||(i=n,n=t.Widget),Array.isArray(i)&&(i=t.extend.apply(null,[{}].concat(i))),t.expr.pseudos[c.toLowerCase()]=function(e){return!!t.data(e,c)},t[l]=t[l]||{},o=t[l][e],r=t[l][e]=function(t,e){if(!this||!this._createWidget)return new r(t,e);arguments.length&&this._createWidget(t,e)},t.extend(r,o,{version:i.version,_proto:t.extend({},i),_childConstructors:[]}),(s=new n).options=t.widget.extend({},s.options),t.each(i,(function(t,e){a[t]="function"==typeof e?function(){function i(){return n.prototype[t].apply(this,arguments)}function o(e){return n.prototype[t].apply(this,e)}return function(){var t,n=this._super,r=this._superApply;return this._super=i,this._superApply=o,t=e.apply(this,arguments),this._super=n,this._superApply=r,t}}():e})),r.prototype=t.widget.extend(s,{widgetEventPrefix:o&&s.widgetEventPrefix||e},a,{constructor:r,namespace:l,widgetName:e,widgetFullName:c}),o?(t.each(o._childConstructors,(function(e,n){var i=n.prototype;t.widget(i.namespace+"."+i.widgetName,r,n._proto)})),delete o._childConstructors):n._childConstructors.push(r),t.widget.bridge(e,r),r},t.widget.extend=function(e){for(var n,r,s=o.call(arguments,1),a=0,l=s.length;a<l;a++)for(n in s[a])r=s[a][n],i.call(s[a],n)&&void 0!==r&&(t.isPlainObject(r)?e[n]=t.isPlainObject(e[n])?t.widget.extend({},e[n],r):t.widget.extend({},r):e[n]=r);return e},t.widget.bridge=function(e,n){var i=n.prototype.widgetFullName||e;t.fn[e]=function(r){var s="string"==typeof r,a=o.call(arguments,1),l=this;return s?this.length||"instance"!==r?this.each((function(){var n,o=t.data(this,i);return"instance"===r?(l=o,!1):o?"function"!=typeof o[r]||"_"===r.charAt(0)?t.error("no such method '"+r+"' for "+e+" widget instance"):(n=o[r].apply(o,a))!==o&&void 0!==n?(l=n&&n.jquery?l.pushStack(n.get()):n,!1):void 0:t.error("cannot call methods on "+e+" prior to initialization; attempted to call method '"+r+"'")})):l=void 0:(a.length&&(r=t.widget.extend.apply(null,[r].concat(a))),this.each((function(){var e=t.data(this,i);e?(e.option(r||{}),e._init&&e._init()):t.data(this,i,new n(r,this))}))),l}},t.Widget=function(){},t.Widget._childConstructors=[],t.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{classes:{},disabled:!1,create:null},_createWidget:function(e,i){i=t(i||this.defaultElement||this)[0],this.element=t(i),this.uuid=n++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=t(),this.hoverable=t(),this.focusable=t(),this.classesElementLookup={},i!==this&&(t.data(i,this.widgetFullName,this),this._on(!0,this.element,{remove:function(t){t.target===i&&this.destroy()}}),this.document=t(i.style?i.ownerDocument:i.document||i),this.window=t(this.document[0].defaultView||this.document[0].parentWindow)),this.options=t.widget.extend({},this.options,this._getCreateOptions(),e),this._create(),this.options.disabled&&this._setOptionDisabled(this.options.disabled),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:function(){return{}},_getCreateEventData:t.noop,_create:t.noop,_init:t.noop,destroy:function(){var e=this;this._destroy(),t.each(this.classesElementLookup,(function(t,n){e._removeClass(n,t)})),this.element.off(this.eventNamespace).removeData(this.widgetFullName),this.widget().off(this.eventNamespace).removeAttr("aria-disabled"),this.bindings.off(this.eventNamespace)},_destroy:t.noop,widget:function(){return this.element},option:function(e,n){var i,o,r,s=e;if(0===arguments.length)return t.widget.extend({},this.options);if("string"==typeof e)if(s={},i=e.split("."),e=i.shift(),i.length){for(o=s[e]=t.widget.extend({},this.options[e]),r=0;r<i.length-1;r++)o[i[r]]=o[i[r]]||{},o=o[i[r]];if(e=i.pop(),1===arguments.length)return void 0===o[e]?null:o[e];o[e]=n}else{if(1===arguments.length)return void 0===this.options[e]?null:this.options[e];s[e]=n}return this._setOptions(s),this},_setOptions:function(t){var e;for(e in t)this._setOption(e,t[e]);return this},_setOption:function(t,e){return"classes"===t&&this._setOptionClasses(e),this.options[t]=e,"disabled"===t&&this._setOptionDisabled(e),this},_setOptionClasses:function(e){var n,i,o;for(n in e)o=this.classesElementLookup[n],e[n]!==this.options.classes[n]&&o&&o.length&&(i=t(o.get()),this._removeClass(o,n),i.addClass(this._classes({element:i,keys:n,classes:e,add:!0})))},_setOptionDisabled:function(t){this._toggleClass(this.widget(),this.widgetFullName+"-disabled",null,!!t),t&&(this._removeClass(this.hoverable,null,"ui-state-hover"),this._removeClass(this.focusable,null,"ui-state-focus"))},enable:function(){return this._setOptions({disabled:!1})},disable:function(){return this._setOptions({disabled:!0})},_classes:function(e){var n=[],i=this;function o(){var n=[];e.element.each((function(e,o){t.map(i.classesElementLookup,(function(t){return t})).some((function(t){return t.is(o)}))||n.push(o)})),i._on(t(n),{remove:"_untrackClassesElement"})}function r(r,s){var a,l;for(l=0;l<r.length;l++)a=i.classesElementLookup[r[l]]||t(),e.add?(o(),a=t(t.uniqueSort(a.get().concat(e.element.get())))):a=t(a.not(e.element).get()),i.classesElementLookup[r[l]]=a,n.push(r[l]),s&&e.classes[r[l]]&&n.push(e.classes[r[l]])}return(e=t.extend({element:this.element,classes:this.options.classes||{}},e)).keys&&r(e.keys.match(/\S+/g)||[],!0),e.extra&&r(e.extra.match(/\S+/g)||[]),n.join(" ")},_untrackClassesElement:function(e){var n=this;t.each(n.classesElementLookup,(function(i,o){-1!==t.inArray(e.target,o)&&(n.classesElementLookup[i]=t(o.not(e.target).get()))})),this._off(t(e.target))},_removeClass:function(t,e,n){return this._toggleClass(t,e,n,!1)},_addClass:function(t,e,n){return this._toggleClass(t,e,n,!0)},_toggleClass:function(t,e,n,i){i="boolean"==typeof i?i:n;var o="string"==typeof t||null===t,r={extra:o?e:n,keys:o?t:e,element:o?this.element:t,add:i};return r.element.toggleClass(this._classes(r),i),this},_on:function(e,n,i){var o,r=this;"boolean"!=typeof e&&(i=n,n=e,e=!1),i?(n=o=t(n),this.bindings=this.bindings.add(n)):(i=n,n=this.element,o=this.widget()),t.each(i,(function(i,s){function a(){if(e||!0!==r.options.disabled&&!t(this).hasClass("ui-state-disabled"))return("string"==typeof s?r[s]:s).apply(r,arguments)}"string"!=typeof s&&(a.guid=s.guid=s.guid||a.guid||t.guid++);var l=i.match(/^([\w:-]*)\s*(.*)$/),c=l[1]+r.eventNamespace,u=l[2];u?o.on(c,u,a):n.on(c,a)}))},_off:function(e,n){n=(n||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,e.off(n),this.bindings=t(this.bindings.not(e).get()),this.focusable=t(this.focusable.not(e).get()),this.hoverable=t(this.hoverable.not(e).get())},_delay:function(t,e){var n=this;return setTimeout((function(){return("string"==typeof t?n[t]:t).apply(n,arguments)}),e||0)},_hoverable:function(e){this.hoverable=this.hoverable.add(e),this._on(e,{mouseenter:function(e){this._addClass(t(e.currentTarget),null,"ui-state-hover")},mouseleave:function(e){this._removeClass(t(e.currentTarget),null,"ui-state-hover")}})},_focusable:function(e){this.focusable=this.focusable.add(e),this._on(e,{focusin:function(e){this._addClass(t(e.currentTarget),null,"ui-state-focus")},focusout:function(e){this._removeClass(t(e.currentTarget),null,"ui-state-focus")}})},_trigger:function(e,n,i){var o,r,s=this.options[e];if(i=i||{},(n=t.Event(n)).type=(e===this.widgetEventPrefix?e:this.widgetEventPrefix+e).toLowerCase(),n.target=this.element[0],r=n.originalEvent)for(o in r)o in n||(n[o]=r[o]);return this.element.trigger(n,i),!("function"==typeof s&&!1===s.apply(this.element[0],[n].concat(i))||n.isDefaultPrevented())}},t.each({show:"fadeIn",hide:"fadeOut"},(function(e,n){t.Widget.prototype["_"+e]=function(i,o,r){var s;"string"==typeof o&&(o={effect:o});var a=o?!0===o||"number"==typeof o?n:o.effect||n:e;"number"==typeof(o=o||{})?o={duration:o}:!0===o&&(o={}),s=!t.isEmptyObject(o),o.complete=r,o.delay&&i.delay(o.delay),s&&t.effects&&t.effects.effect[a]?i[e](o):a!==e&&i[a]?i[a](o.duration,o.easing,r):i.queue((function(n){t(this)[e](),r&&r.call(i[0]),n()}))}})),t.widget})),
/*!
 * jQuery UI Scroll Parent 1.13.2
 * http://jqueryui.com
 *
 * Copyright jQuery Foundation and other contributors
 * Released under the MIT license.
 * http://jquery.org/license
 */
function(t){"use strict";"function"==typeof define&&define.amd?define(["jquery","./version"],t):t(jQuery)}((function(t){"use strict";return t.fn.scrollParent=function(e){var n=this.css("position"),i="absolute"===n,o=e?/(auto|scroll|hidden)/:/(auto|scroll)/,r=this.parents().filter((function(){var e=t(this);return(!i||"static"!==e.css("position"))&&o.test(e.css("overflow")+e.css("overflow-y")+e.css("overflow-x"))})).eq(0);return"fixed"!==n&&r.length?r:t(this[0].ownerDocument||document)}})),
/*!
 * jQuery UI Mouse 1.13.2
 * http://jqueryui.com
 *
 * Copyright jQuery Foundation and other contributors
 * Released under the MIT license.
 * http://jquery.org/license
 */
function(t){"use strict";"function"==typeof define&&define.amd?define(["jquery","../ie","../version","../widget"],t):t(jQuery)}((function(t){"use strict";var e=!1;return t(document).on("mouseup",(function(){e=!1})),t.widget("ui.mouse",{version:"1.13.2",options:{cancel:"input, textarea, button, select, option",distance:1,delay:0},_mouseInit:function(){var e=this;this.element.on("mousedown."+this.widgetName,(function(t){return e._mouseDown(t)})).on("click."+this.widgetName,(function(n){if(!0===t.data(n.target,e.widgetName+".preventClickEvent"))return t.removeData(n.target,e.widgetName+".preventClickEvent"),n.stopImmediatePropagation(),!1})),this.started=!1},_mouseDestroy:function(){this.element.off("."+this.widgetName),this._mouseMoveDelegate&&this.document.off("mousemove."+this.widgetName,this._mouseMoveDelegate).off("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(n){if(!e){this._mouseMoved=!1,this._mouseStarted&&this._mouseUp(n),this._mouseDownEvent=n;var i=this,o=1===n.which,r=!("string"!=typeof this.options.cancel||!n.target.nodeName)&&t(n.target).closest(this.options.cancel).length;return!(o&&!r&&this._mouseCapture(n))||(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout((function(){i.mouseDelayMet=!0}),this.options.delay)),this._mouseDistanceMet(n)&&this._mouseDelayMet(n)&&(this._mouseStarted=!1!==this._mouseStart(n),!this._mouseStarted)?(n.preventDefault(),!0):(!0===t.data(n.target,this.widgetName+".preventClickEvent")&&t.removeData(n.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(t){return i._mouseMove(t)},this._mouseUpDelegate=function(t){return i._mouseUp(t)},this.document.on("mousemove."+this.widgetName,this._mouseMoveDelegate).on("mouseup."+this.widgetName,this._mouseUpDelegate),n.preventDefault(),e=!0,!0))}},_mouseMove:function(e){if(this._mouseMoved){if(t.ui.ie&&(!document.documentMode||document.documentMode<9)&&!e.button)return this._mouseUp(e);if(!e.which)if(e.originalEvent.altKey||e.originalEvent.ctrlKey||e.originalEvent.metaKey||e.originalEvent.shiftKey)this.ignoreMissingWhich=!0;else if(!this.ignoreMissingWhich)return this._mouseUp(e)}return(e.which||e.button)&&(this._mouseMoved=!0),this._mouseStarted?(this._mouseDrag(e),e.preventDefault()):(this._mouseDistanceMet(e)&&this._mouseDelayMet(e)&&(this._mouseStarted=!1!==this._mouseStart(this._mouseDownEvent,e),this._mouseStarted?this._mouseDrag(e):this._mouseUp(e)),!this._mouseStarted)},_mouseUp:function(n){this.document.off("mousemove."+this.widgetName,this._mouseMoveDelegate).off("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,n.target===this._mouseDownEvent.target&&t.data(n.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(n)),this._mouseDelayTimer&&(clearTimeout(this._mouseDelayTimer),delete this._mouseDelayTimer),this.ignoreMissingWhich=!1,e=!1,n.preventDefault()},_mouseDistanceMet:function(t){return Math.max(Math.abs(this._mouseDownEvent.pageX-t.pageX),Math.abs(this._mouseDownEvent.pageY-t.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}})})),function(t){"use strict";"function"==typeof define&&define.amd?define(["jquery","./version"],t):t(jQuery)}((function(t){"use strict";return t.ui.safeBlur=function(e){e&&"body"!==e.nodeName.toLowerCase()&&t(e).trigger("blur")}})),
/*!
 * jQuery UI Draggable 1.13.2
 * http://jqueryui.com
 *
 * Copyright jQuery Foundation and other contributors
 * Released under the MIT license.
 * http://jquery.org/license
 */
function(t){"use strict";"function"==typeof define&&define.amd?define(["jquery","./mouse","../data","../plugin","../safe-active-element","../safe-blur","../scroll-parent","../version","../widget"],t):t(jQuery)}((function(t){"use strict";return t.widget("ui.draggable",t.ui.mouse,{version:"1.13.2",widgetEventPrefix:"drag",options:{addClasses:!0,appendTo:"parent",axis:!1,connectToSortable:!1,containment:!1,cursor:"auto",cursorAt:!1,grid:!1,handle:!1,helper:"original",iframeFix:!1,opacity:!1,refreshPositions:!1,revert:!1,revertDuration:500,scope:"default",scroll:!0,scrollSensitivity:20,scrollSpeed:20,snap:!1,snapMode:"both",snapTolerance:20,stack:!1,zIndex:!1,drag:null,start:null,stop:null},_create:function(){"original"===this.options.helper&&this._setPositionRelative(),this.options.addClasses&&this._addClass("ui-draggable"),this._setHandleClassName(),this._mouseInit()},_setOption:function(t,e){this._super(t,e),"handle"===t&&(this._removeHandleClassName(),this._setHandleClassName())},_destroy:function(){(this.helper||this.element).is(".ui-draggable-dragging")?this.destroyOnClear=!0:(this._removeHandleClassName(),this._mouseDestroy())},_mouseCapture:function(e){var n=this.options;return!(this.helper||n.disabled||t(e.target).closest(".ui-resizable-handle").length>0)&&(this.handle=this._getHandle(e),!!this.handle&&(this._blurActiveElement(e),this._blockFrames(!0===n.iframeFix?"iframe":n.iframeFix),!0))},_blockFrames:function(e){this.iframeBlocks=this.document.find(e).map((function(){var e=t(this);return t("<div>").css("position","absolute").appendTo(e.parent()).outerWidth(e.outerWidth()).outerHeight(e.outerHeight()).offset(e.offset())[0]}))},_unblockFrames:function(){this.iframeBlocks&&(this.iframeBlocks.remove(),delete this.iframeBlocks)},_blurActiveElement:function(e){var n=t.ui.safeActiveElement(this.document[0]);t(e.target).closest(n).length||t.ui.safeBlur(n)},_mouseStart:function(e){var n=this.options;return this.helper=this._createHelper(e),this._addClass(this.helper,"ui-draggable-dragging"),this._cacheHelperProportions(),t.ui.ddmanager&&(t.ui.ddmanager.current=this),this._cacheMargins(),this.cssPosition=this.helper.css("position"),this.scrollParent=this.helper.scrollParent(!0),this.offsetParent=this.helper.offsetParent(),this.hasFixedAncestor=this.helper.parents().filter((function(){return"fixed"===t(this).css("position")})).length>0,this.positionAbs=this.element.offset(),this._refreshOffsets(e),this.originalPosition=this.position=this._generatePosition(e,!1),this.originalPageX=e.pageX,this.originalPageY=e.pageY,n.cursorAt&&this._adjustOffsetFromHelper(n.cursorAt),this._setContainment(),!1===this._trigger("start",e)?(this._clear(),!1):(this._cacheHelperProportions(),t.ui.ddmanager&&!n.dropBehaviour&&t.ui.ddmanager.prepareOffsets(this,e),this._mouseDrag(e,!0),t.ui.ddmanager&&t.ui.ddmanager.dragStart(this,e),!0)},_refreshOffsets:function(t){this.offset={top:this.positionAbs.top-this.margins.top,left:this.positionAbs.left-this.margins.left,scroll:!1,parent:this._getParentOffset(),relative:this._getRelativeOffset()},this.offset.click={left:t.pageX-this.offset.left,top:t.pageY-this.offset.top}},_mouseDrag:function(e,n){if(this.hasFixedAncestor&&(this.offset.parent=this._getParentOffset()),this.position=this._generatePosition(e,!0),this.positionAbs=this._convertPositionTo("absolute"),!n){var i=this._uiHash();if(!1===this._trigger("drag",e,i))return this._mouseUp(new t.Event("mouseup",e)),!1;this.position=i.position}return this.helper[0].style.left=this.position.left+"px",this.helper[0].style.top=this.position.top+"px",t.ui.ddmanager&&t.ui.ddmanager.drag(this,e),!1},_mouseStop:function(e){var n=this,i=!1;return t.ui.ddmanager&&!this.options.dropBehaviour&&(i=t.ui.ddmanager.drop(this,e)),this.dropped&&(i=this.dropped,this.dropped=!1),"invalid"===this.options.revert&&!i||"valid"===this.options.revert&&i||!0===this.options.revert||"function"==typeof this.options.revert&&this.options.revert.call(this.element,i)?t(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),(function(){!1!==n._trigger("stop",e)&&n._clear()})):!1!==this._trigger("stop",e)&&this._clear(),!1},_mouseUp:function(e){return this._unblockFrames(),t.ui.ddmanager&&t.ui.ddmanager.dragStop(this,e),this.handleElement.is(e.target)&&this.element.trigger("focus"),t.ui.mouse.prototype._mouseUp.call(this,e)},cancel:function(){return this.helper.is(".ui-draggable-dragging")?this._mouseUp(new t.Event("mouseup",{target:this.element[0]})):this._clear(),this},_getHandle:function(e){return!this.options.handle||!!t(e.target).closest(this.element.find(this.options.handle)).length},_setHandleClassName:function(){this.handleElement=this.options.handle?this.element.find(this.options.handle):this.element,this._addClass(this.handleElement,"ui-draggable-handle")},_removeHandleClassName:function(){this._removeClass(this.handleElement,"ui-draggable-handle")},_createHelper:function(e){var n=this.options,i="function"==typeof n.helper,o=i?t(n.helper.apply(this.element[0],[e])):"clone"===n.helper?this.element.clone().removeAttr("id"):this.element;return o.parents("body").length||o.appendTo("parent"===n.appendTo?this.element[0].parentNode:n.appendTo),i&&o[0]===this.element[0]&&this._setPositionRelative(),o[0]===this.element[0]||/(fixed|absolute)/.test(o.css("position"))||o.css("position","absolute"),o},_setPositionRelative:function(){/^(?:r|a|f)/.test(this.element.css("position"))||(this.element[0].style.position="relative")},_adjustOffsetFromHelper:function(t){"string"==typeof t&&(t=t.split(" ")),Array.isArray(t)&&(t={left:+t[0],top:+t[1]||0}),"left"in t&&(this.offset.click.left=t.left+this.margins.left),"right"in t&&(this.offset.click.left=this.helperProportions.width-t.right+this.margins.left),"top"in t&&(this.offset.click.top=t.top+this.margins.top),"bottom"in t&&(this.offset.click.top=this.helperProportions.height-t.bottom+this.margins.top)},_isRootNode:function(t){return/(html|body)/i.test(t.tagName)||t===this.document[0]},_getParentOffset:function(){var e=this.offsetParent.offset(),n=this.document[0];return"absolute"===this.cssPosition&&this.scrollParent[0]!==n&&t.contains(this.scrollParent[0],this.offsetParent[0])&&(e.left+=this.scrollParent.scrollLeft(),e.top+=this.scrollParent.scrollTop()),this._isRootNode(this.offsetParent[0])&&(e={top:0,left:0}),{top:e.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:e.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"!==this.cssPosition)return{top:0,left:0};var t=this.element.position(),e=this._isRootNode(this.scrollParent[0]);return{top:t.top-(parseInt(this.helper.css("top"),10)||0)+(e?0:this.scrollParent.scrollTop()),left:t.left-(parseInt(this.helper.css("left"),10)||0)+(e?0:this.scrollParent.scrollLeft())}},_cacheMargins:function(){this.margins={left:parseInt(this.element.css("marginLeft"),10)||0,top:parseInt(this.element.css("marginTop"),10)||0,right:parseInt(this.element.css("marginRight"),10)||0,bottom:parseInt(this.element.css("marginBottom"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var e,n,i,o=this.options,r=this.document[0];this.relativeContainer=null,o.containment?"window"!==o.containment?"document"!==o.containment?o.containment.constructor!==Array?("parent"===o.containment&&(o.containment=this.helper[0].parentNode),(i=(n=t(o.containment))[0])&&(e=/(scroll|auto)/.test(n.css("overflow")),this.containment=[(parseInt(n.css("borderLeftWidth"),10)||0)+(parseInt(n.css("paddingLeft"),10)||0),(parseInt(n.css("borderTopWidth"),10)||0)+(parseInt(n.css("paddingTop"),10)||0),(e?Math.max(i.scrollWidth,i.offsetWidth):i.offsetWidth)-(parseInt(n.css("borderRightWidth"),10)||0)-(parseInt(n.css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(e?Math.max(i.scrollHeight,i.offsetHeight):i.offsetHeight)-(parseInt(n.css("borderBottomWidth"),10)||0)-(parseInt(n.css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom],this.relativeContainer=n)):this.containment=o.containment:this.containment=[0,0,t(r).width()-this.helperProportions.width-this.margins.left,(t(r).height()||r.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]:this.containment=[t(window).scrollLeft()-this.offset.relative.left-this.offset.parent.left,t(window).scrollTop()-this.offset.relative.top-this.offset.parent.top,t(window).scrollLeft()+t(window).width()-this.helperProportions.width-this.margins.left,t(window).scrollTop()+(t(window).height()||r.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]:this.containment=null},_convertPositionTo:function(t,e){e||(e=this.position);var n="absolute"===t?1:-1,i=this._isRootNode(this.scrollParent[0]);return{top:e.top+this.offset.relative.top*n+this.offset.parent.top*n-("fixed"===this.cssPosition?-this.offset.scroll.top:i?0:this.offset.scroll.top)*n,left:e.left+this.offset.relative.left*n+this.offset.parent.left*n-("fixed"===this.cssPosition?-this.offset.scroll.left:i?0:this.offset.scroll.left)*n}},_generatePosition:function(t,e){var n,i,o,r,s=this.options,a=this._isRootNode(this.scrollParent[0]),l=t.pageX,c=t.pageY;return a&&this.offset.scroll||(this.offset.scroll={top:this.scrollParent.scrollTop(),left:this.scrollParent.scrollLeft()}),e&&(this.containment&&(this.relativeContainer?(i=this.relativeContainer.offset(),n=[this.containment[0]+i.left,this.containment[1]+i.top,this.containment[2]+i.left,this.containment[3]+i.top]):n=this.containment,t.pageX-this.offset.click.left<n[0]&&(l=n[0]+this.offset.click.left),t.pageY-this.offset.click.top<n[1]&&(c=n[1]+this.offset.click.top),t.pageX-this.offset.click.left>n[2]&&(l=n[2]+this.offset.click.left),t.pageY-this.offset.click.top>n[3]&&(c=n[3]+this.offset.click.top)),s.grid&&(o=s.grid[1]?this.originalPageY+Math.round((c-this.originalPageY)/s.grid[1])*s.grid[1]:this.originalPageY,c=n?o-this.offset.click.top>=n[1]||o-this.offset.click.top>n[3]?o:o-this.offset.click.top>=n[1]?o-s.grid[1]:o+s.grid[1]:o,r=s.grid[0]?this.originalPageX+Math.round((l-this.originalPageX)/s.grid[0])*s.grid[0]:this.originalPageX,l=n?r-this.offset.click.left>=n[0]||r-this.offset.click.left>n[2]?r:r-this.offset.click.left>=n[0]?r-s.grid[0]:r+s.grid[0]:r),"y"===s.axis&&(l=this.originalPageX),"x"===s.axis&&(c=this.originalPageY)),{top:c-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.offset.scroll.top:a?0:this.offset.scroll.top),left:l-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.offset.scroll.left:a?0:this.offset.scroll.left)}},_clear:function(){this._removeClass(this.helper,"ui-draggable-dragging"),this.helper[0]===this.element[0]||this.cancelHelperRemoval||this.helper.remove(),this.helper=null,this.cancelHelperRemoval=!1,this.destroyOnClear&&this.destroy()},_trigger:function(e,n,i){return i=i||this._uiHash(),t.ui.plugin.call(this,e,[n,i,this],!0),/^(drag|start|stop)/.test(e)&&(this.positionAbs=this._convertPositionTo("absolute"),i.offset=this.positionAbs),t.Widget.prototype._trigger.call(this,e,n,i)},plugins:{},_uiHash:function(){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}}),t.ui.plugin.add("draggable","connectToSortable",{start:function(e,n,i){var o=t.extend({},n,{item:i.element});i.sortables=[],t(i.options.connectToSortable).each((function(){var n=t(this).sortable("instance");n&&!n.options.disabled&&(i.sortables.push(n),n.refreshPositions(),n._trigger("activate",e,o))}))},stop:function(e,n,i){var o=t.extend({},n,{item:i.element});i.cancelHelperRemoval=!1,t.each(i.sortables,(function(){var t=this;t.isOver?(t.isOver=0,i.cancelHelperRemoval=!0,t.cancelHelperRemoval=!1,t._storedCSS={position:t.placeholder.css("position"),top:t.placeholder.css("top"),left:t.placeholder.css("left")},t._mouseStop(e),t.options.helper=t.options._helper):(t.cancelHelperRemoval=!0,t._trigger("deactivate",e,o))}))},drag:function(e,n,i){t.each(i.sortables,(function(){var o=!1,r=this;r.positionAbs=i.positionAbs,r.helperProportions=i.helperProportions,r.offset.click=i.offset.click,r._intersectsWith(r.containerCache)&&(o=!0,t.each(i.sortables,(function(){return this.positionAbs=i.positionAbs,this.helperProportions=i.helperProportions,this.offset.click=i.offset.click,this!==r&&this._intersectsWith(this.containerCache)&&t.contains(r.element[0],this.element[0])&&(o=!1),o}))),o?(r.isOver||(r.isOver=1,i._parent=n.helper.parent(),r.currentItem=n.helper.appendTo(r.element).data("ui-sortable-item",!0),r.options._helper=r.options.helper,r.options.helper=function(){return n.helper[0]},e.target=r.currentItem[0],r._mouseCapture(e,!0),r._mouseStart(e,!0,!0),r.offset.click.top=i.offset.click.top,r.offset.click.left=i.offset.click.left,r.offset.parent.left-=i.offset.parent.left-r.offset.parent.left,r.offset.parent.top-=i.offset.parent.top-r.offset.parent.top,i._trigger("toSortable",e),i.dropped=r.element,t.each(i.sortables,(function(){this.refreshPositions()})),i.currentItem=i.element,r.fromOutside=i),r.currentItem&&(r._mouseDrag(e),n.position=r.position)):r.isOver&&(r.isOver=0,r.cancelHelperRemoval=!0,r.options._revert=r.options.revert,r.options.revert=!1,r._trigger("out",e,r._uiHash(r)),r._mouseStop(e,!0),r.options.revert=r.options._revert,r.options.helper=r.options._helper,r.placeholder&&r.placeholder.remove(),n.helper.appendTo(i._parent),i._refreshOffsets(e),n.position=i._generatePosition(e,!0),i._trigger("fromSortable",e),i.dropped=!1,t.each(i.sortables,(function(){this.refreshPositions()})))}))}}),t.ui.plugin.add("draggable","cursor",{start:function(e,n,i){var o=t("body"),r=i.options;o.css("cursor")&&(r._cursor=o.css("cursor")),o.css("cursor",r.cursor)},stop:function(e,n,i){var o=i.options;o._cursor&&t("body").css("cursor",o._cursor)}}),t.ui.plugin.add("draggable","opacity",{start:function(e,n,i){var o=t(n.helper),r=i.options;o.css("opacity")&&(r._opacity=o.css("opacity")),o.css("opacity",r.opacity)},stop:function(e,n,i){var o=i.options;o._opacity&&t(n.helper).css("opacity",o._opacity)}}),t.ui.plugin.add("draggable","scroll",{start:function(t,e,n){n.scrollParentNotHidden||(n.scrollParentNotHidden=n.helper.scrollParent(!1)),n.scrollParentNotHidden[0]!==n.document[0]&&"HTML"!==n.scrollParentNotHidden[0].tagName&&(n.overflowOffset=n.scrollParentNotHidden.offset())},drag:function(e,n,i){var o=i.options,r=!1,s=i.scrollParentNotHidden[0],a=i.document[0];s!==a&&"HTML"!==s.tagName?(o.axis&&"x"===o.axis||(i.overflowOffset.top+s.offsetHeight-e.pageY<o.scrollSensitivity?s.scrollTop=r=s.scrollTop+o.scrollSpeed:e.pageY-i.overflowOffset.top<o.scrollSensitivity&&(s.scrollTop=r=s.scrollTop-o.scrollSpeed)),o.axis&&"y"===o.axis||(i.overflowOffset.left+s.offsetWidth-e.pageX<o.scrollSensitivity?s.scrollLeft=r=s.scrollLeft+o.scrollSpeed:e.pageX-i.overflowOffset.left<o.scrollSensitivity&&(s.scrollLeft=r=s.scrollLeft-o.scrollSpeed))):(o.axis&&"x"===o.axis||(e.pageY-t(a).scrollTop()<o.scrollSensitivity?r=t(a).scrollTop(t(a).scrollTop()-o.scrollSpeed):t(window).height()-(e.pageY-t(a).scrollTop())<o.scrollSensitivity&&(r=t(a).scrollTop(t(a).scrollTop()+o.scrollSpeed))),o.axis&&"y"===o.axis||(e.pageX-t(a).scrollLeft()<o.scrollSensitivity?r=t(a).scrollLeft(t(a).scrollLeft()-o.scrollSpeed):t(window).width()-(e.pageX-t(a).scrollLeft())<o.scrollSensitivity&&(r=t(a).scrollLeft(t(a).scrollLeft()+o.scrollSpeed)))),!1!==r&&t.ui.ddmanager&&!o.dropBehaviour&&t.ui.ddmanager.prepareOffsets(i,e)}}),t.ui.plugin.add("draggable","snap",{start:function(e,n,i){var o=i.options;i.snapElements=[],t(o.snap.constructor!==String?o.snap.items||":data(ui-draggable)":o.snap).each((function(){var e=t(this),n=e.offset();this!==i.element[0]&&i.snapElements.push({item:this,width:e.outerWidth(),height:e.outerHeight(),top:n.top,left:n.left})}))},drag:function(e,n,i){var o,r,s,a,l,c,u,h,p,f,d=i.options,m=d.snapTolerance,g=n.offset.left,v=g+i.helperProportions.width,y=n.offset.top,b=y+i.helperProportions.height;for(p=i.snapElements.length-1;p>=0;p--)c=(l=i.snapElements[p].left-i.margins.left)+i.snapElements[p].width,h=(u=i.snapElements[p].top-i.margins.top)+i.snapElements[p].height,v<l-m||g>c+m||b<u-m||y>h+m||!t.contains(i.snapElements[p].item.ownerDocument,i.snapElements[p].item)?(i.snapElements[p].snapping&&i.options.snap.release&&i.options.snap.release.call(i.element,e,t.extend(i._uiHash(),{snapItem:i.snapElements[p].item})),i.snapElements[p].snapping=!1):("inner"!==d.snapMode&&(o=Math.abs(u-b)<=m,r=Math.abs(h-y)<=m,s=Math.abs(l-v)<=m,a=Math.abs(c-g)<=m,o&&(n.position.top=i._convertPositionTo("relative",{top:u-i.helperProportions.height,left:0}).top),r&&(n.position.top=i._convertPositionTo("relative",{top:h,left:0}).top),s&&(n.position.left=i._convertPositionTo("relative",{top:0,left:l-i.helperProportions.width}).left),a&&(n.position.left=i._convertPositionTo("relative",{top:0,left:c}).left)),f=o||r||s||a,"outer"!==d.snapMode&&(o=Math.abs(u-y)<=m,r=Math.abs(h-b)<=m,s=Math.abs(l-g)<=m,a=Math.abs(c-v)<=m,o&&(n.position.top=i._convertPositionTo("relative",{top:u,left:0}).top),r&&(n.position.top=i._convertPositionTo("relative",{top:h-i.helperProportions.height,left:0}).top),s&&(n.position.left=i._convertPositionTo("relative",{top:0,left:l}).left),a&&(n.position.left=i._convertPositionTo("relative",{top:0,left:c-i.helperProportions.width}).left)),!i.snapElements[p].snapping&&(o||r||s||a||f)&&i.options.snap.snap&&i.options.snap.snap.call(i.element,e,t.extend(i._uiHash(),{snapItem:i.snapElements[p].item})),i.snapElements[p].snapping=o||r||s||a||f)}}),t.ui.plugin.add("draggable","stack",{start:function(e,n,i){var o,r=i.options,s=t.makeArray(t(r.stack)).sort((function(e,n){return(parseInt(t(e).css("zIndex"),10)||0)-(parseInt(t(n).css("zIndex"),10)||0)}));s.length&&(o=parseInt(t(s[0]).css("zIndex"),10)||0,t(s).each((function(e){t(this).css("zIndex",o+e)})),this.css("zIndex",o+s.length))}}),t.ui.plugin.add("draggable","zIndex",{start:function(e,n,i){var o=t(n.helper),r=i.options;o.css("zIndex")&&(r._zIndex=o.css("zIndex")),o.css("zIndex",r.zIndex)},stop:function(e,n,i){var o=i.options;o._zIndex&&t(n.helper).css("zIndex",o._zIndex)}}),t.ui.draggable}));let u=null,h=32;class p{constructor(n,i=(()=>{})){this.title=n,this.buttonAction=i,this.button=t(e)("<a/>").prop({href:"javascript:;",class:"dropdown-button",id:n.toLowerCase()}).text(n+"▼"),u.append(this.button),this.button.on("click",(t=>(t.preventDefault(),this.buttonAction(),!1)))}}function f(){u=t(e)("div#topbar"),s("pintopbar",!0)?u.css({position:"fixed"}):u.css({position:"absolute",top:"0px"}),h=u.outerHeight()+4}const d=()=>{};function m(...n){t(e)(".lightbox, .lightbox-bg").remove();for(const i of n)t(e)(i).remove()}function g(n={},i={},o=[]){void 0===n.class&&(n.class="lightbox");let r={display:"inline-block",top:"50%",left:"50%",transform:"translate(-50%, -50%)","max-width":"80%","max-height":"80%",right:"auto",bottom:"auto"};for(const t in r)void 0===i[t]&&(i[t]=r[t]);let s=t(e)("<div/>").prop(n).css(i).prependTo(document.body).append(o);return t(e)("<div />").prop({class:"lightbox-bg"}).on("click",(function(){m(this)})).prependTo(document.body),s}function v(n="",i=!1,o=d,r=""){let s=t(e)("<button/>").prop({id:"okbutton"}).text("OK"),a=t(e)("<button/>").prop({id:"cancelbutton"}).text("Cancel"),l="string"==typeof n?n:"",c=t(e)("<input/>").prop({id:"promptinput",type:i?"password":"text"}).val(l),u=g({},{},[t(e)("<form/>").prop({action:"javascript:;",autocomplete:"off"}).append(t(e)("<b/>").text(r),c,"<br/><br/>",s,a)]);return c.trigger("focus"),s.on("click",(function(){0!=o(u,c.val())&&m(this,u)})),a.on("click",(function(){m(this,u)})),u}function y(n="",i=location.hostname,o=d){let r=t(e)("<button/>").prop({id:"okbutton"}).text("OK"),s=g({},{},[t(e)("<b/>").prop({id:"alertTitle"}).text(i),"<hr/>",t(e)("<span/>").prop({id:"alertText"}).text(n),"<br/>",r]);return r.trigger("focus"),r.on("click",(function(){o(s),m(this,s)})),s}const b=/\/res\/(\d+)(p(\d)+)?.html$/,x=/^\d+/;function w(){let n=t(e)("form#main-form input[type=hidden][name=board]").val();return"string"==typeof n?n:""}function _(){let n=b.exec(window.location.pathname),i={board:w(),boardID:-1,op:-1,page:0};return null===n||(n.length>1&&(i.op=n[1]),n.length>3&&(i.page=n[3]),""!=n.board&&(i.boardID=t(e)("form#postform input[name=boardid]").val()-1)),i}function T(){let t={board:w(),thread:0},e=location.pathname.split("/");if(4!=e.length)return t;let n=x.exec(e[3]);return n.length>0&&(t.thread=n[0]),t}function C(t){let e=/([^.]+)\.([^.]+)$/.exec(t);if(null===e)return t;let n=e[1]+"t",i=e[2];return"gif"!=i&&"webm"!=i||(i="jpg"),n+"."+i}let P=!1,k=-1;function S(){if(!P)return void clearInterval(k);let t=l("watched",{}),e=Object.keys(t);for(const n of e)if(t[n]instanceof Array)for(const e of t[n]);else console.log(`Invalid data for board ${n}:`),delete t[n]}function E(t,e){let n=l("watched",{})[e];if(null==n)return!1;for(const e of n)if(e.id==t)return!0;return!1}function N(t,e){let n=l("watched",{});n[e]instanceof Array||(n[e]=[]);for(const i of n[e])if(i==t)return;n[e].push({id:t}),c("watched",JSON.stringify(n))}function A(t,e){let n=l("watched",{});if(n[e]instanceof Array)for(const i in n[e])if(n[e][i].id==t)return console.log(`unwatching thread /${e}/${t}`),n[e].splice(i,1),void c("watched",JSON.stringify(n))}function D(){let t=l("watched",{});k>-1&&clearInterval(k);let e=w();P=null!==t&&t[e]instanceof Array,P&&(S(),k=setInterval(S,1e3*a("watcherseconds",10)))}const I=()=>{};function j(n){let i=t(e)(`div#op${n}.op-post,div#reply${n}.reply`);return 0!==i.length&&i.find(".post-text").is(":visible")}function H(n,i,o=I){let s=t(e)(`div#op${n}.op-post, div#reply${n}.reply`);if(0===s.length)return!1;let a=s.find(".file-info,.post-text,.upload,.file-deleted-box,br"),l=s.find("a.backlink-click"),u=r("hiddenposts","").split(",");if(i){a.show(0,o),s.find("select.post-actions option").each(((t,e)=>{e.text=e.text.replace("Show","Hide")})),l.text(n);let t=[];for(const e of u)e!=n&&-1==t.indexOf(e)&&t.push(e);c("hiddenposts",t.join(","))}else a.hide(0,o),s.find("select.post-actions option").each(((t,e)=>{e.text=e.text.replace("Hide","Show")})),l.text(`${n} (hidden)`),-1==u.indexOf(n)&&u.push(n),c("hiddenposts",u.join(","));return!0}function O(n,i){let o=t(e)(`div#op${n}.op-post`).parent(".thread");return 0!==o.length&&H(n,i,(()=>{let t=o.find(".reply-container,b,br");i?t.show():t.hide()}))}t(e)((()=>{let t=r("hiddenposts","").split(",");"number"==typeof t&&(t=[t]);for(let e=0;e<t.length;e++){let n=t[e];O(n,!1),H(n,!1)}})),
/*!
 * jQuery UI :data 1.13.2
 * http://jqueryui.com
 *
 * Copyright jQuery Foundation and other contributors
 * Released under the MIT license.
 * http://jquery.org/license
 */
function(t){"use strict";"function"==typeof define&&define.amd?define(["jquery","./version"],t):t(jQuery)}((function(t){"use strict";return t.extend(t.expr.pseudos,{data:t.expr.createPseudo?t.expr.createPseudo((function(e){return function(n){return!!t.data(n,e)}})):function(e,n,i){return!!t.data(e,i[3])}})})),
/*!
 * jQuery UI Sortable 1.13.2
 * http://jqueryui.com
 *
 * Copyright jQuery Foundation and other contributors
 * Released under the MIT license.
 * http://jquery.org/license
 */
function(t){"use strict";"function"==typeof define&&define.amd?define(["jquery","./mouse","../data","../ie","../scroll-parent","../version","../widget"],t):t(jQuery)}((function(t){"use strict";return t.widget("ui.sortable",t.ui.mouse,{version:"1.13.2",widgetEventPrefix:"sort",ready:!1,options:{appendTo:"parent",axis:!1,connectWith:!1,containment:!1,cursor:"auto",cursorAt:!1,dropOnEmpty:!0,forcePlaceholderSize:!1,forceHelperSize:!1,grid:!1,handle:!1,helper:"original",items:"> *",opacity:!1,placeholder:!1,revert:!1,scroll:!0,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1e3,activate:null,beforeStop:null,change:null,deactivate:null,out:null,over:null,receive:null,remove:null,sort:null,start:null,stop:null,update:null},_isOverAxis:function(t,e,n){return t>=e&&t<e+n},_isFloating:function(t){return/left|right/.test(t.css("float"))||/inline|table-cell/.test(t.css("display"))},_create:function(){this.containerCache={},this._addClass("ui-sortable"),this.refresh(),this.offset=this.element.offset(),this._mouseInit(),this._setHandleClassName(),this.ready=!0},_setOption:function(t,e){this._super(t,e),"handle"===t&&this._setHandleClassName()},_setHandleClassName:function(){var e=this;this._removeClass(this.element.find(".ui-sortable-handle"),"ui-sortable-handle"),t.each(this.items,(function(){e._addClass(this.instance.options.handle?this.item.find(this.instance.options.handle):this.item,"ui-sortable-handle")}))},_destroy:function(){this._mouseDestroy();for(var t=this.items.length-1;t>=0;t--)this.items[t].item.removeData(this.widgetName+"-item");return this},_mouseCapture:function(e,n){var i=null,o=!1,r=this;return!this.reverting&&(!this.options.disabled&&"static"!==this.options.type&&(this._refreshItems(e),t(e.target).parents().each((function(){if(t.data(this,r.widgetName+"-item")===r)return i=t(this),!1})),t.data(e.target,r.widgetName+"-item")===r&&(i=t(e.target)),!!i&&(!(this.options.handle&&!n&&(t(this.options.handle,i).find("*").addBack().each((function(){this===e.target&&(o=!0)})),!o))&&(this.currentItem=i,this._removeCurrentsFromItems(),!0))))},_mouseStart:function(e,n,i){var o,r,s=this.options;if(this.currentContainer=this,this.refreshPositions(),this.appendTo=t("parent"!==s.appendTo?s.appendTo:this.currentItem.parent()),this.helper=this._createHelper(e),this._cacheHelperProportions(),this._cacheMargins(),this.offset=this.currentItem.offset(),this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left},t.extend(this.offset,{click:{left:e.pageX-this.offset.left,top:e.pageY-this.offset.top},relative:this._getRelativeOffset()}),this.helper.css("position","absolute"),this.cssPosition=this.helper.css("position"),s.cursorAt&&this._adjustOffsetFromHelper(s.cursorAt),this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]},this.helper[0]!==this.currentItem[0]&&this.currentItem.hide(),this._createPlaceholder(),this.scrollParent=this.placeholder.scrollParent(),t.extend(this.offset,{parent:this._getParentOffset()}),s.containment&&this._setContainment(),s.cursor&&"auto"!==s.cursor&&(r=this.document.find("body"),this.storedCursor=r.css("cursor"),r.css("cursor",s.cursor),this.storedStylesheet=t("<style>*{ cursor: "+s.cursor+" !important; }</style>").appendTo(r)),s.zIndex&&(this.helper.css("zIndex")&&(this._storedZIndex=this.helper.css("zIndex")),this.helper.css("zIndex",s.zIndex)),s.opacity&&(this.helper.css("opacity")&&(this._storedOpacity=this.helper.css("opacity")),this.helper.css("opacity",s.opacity)),this.scrollParent[0]!==this.document[0]&&"HTML"!==this.scrollParent[0].tagName&&(this.overflowOffset=this.scrollParent.offset()),this._trigger("start",e,this._uiHash()),this._preserveHelperProportions||this._cacheHelperProportions(),!i)for(o=this.containers.length-1;o>=0;o--)this.containers[o]._trigger("activate",e,this._uiHash(this));return t.ui.ddmanager&&(t.ui.ddmanager.current=this),t.ui.ddmanager&&!s.dropBehaviour&&t.ui.ddmanager.prepareOffsets(this,e),this.dragging=!0,this._addClass(this.helper,"ui-sortable-helper"),this.helper.parent().is(this.appendTo)||(this.helper.detach().appendTo(this.appendTo),this.offset.parent=this._getParentOffset()),this.position=this.originalPosition=this._generatePosition(e),this.originalPageX=e.pageX,this.originalPageY=e.pageY,this.lastPositionAbs=this.positionAbs=this._convertPositionTo("absolute"),this._mouseDrag(e),!0},_scroll:function(t){var e=this.options,n=!1;return this.scrollParent[0]!==this.document[0]&&"HTML"!==this.scrollParent[0].tagName?(this.overflowOffset.top+this.scrollParent[0].offsetHeight-t.pageY<e.scrollSensitivity?this.scrollParent[0].scrollTop=n=this.scrollParent[0].scrollTop+e.scrollSpeed:t.pageY-this.overflowOffset.top<e.scrollSensitivity&&(this.scrollParent[0].scrollTop=n=this.scrollParent[0].scrollTop-e.scrollSpeed),this.overflowOffset.left+this.scrollParent[0].offsetWidth-t.pageX<e.scrollSensitivity?this.scrollParent[0].scrollLeft=n=this.scrollParent[0].scrollLeft+e.scrollSpeed:t.pageX-this.overflowOffset.left<e.scrollSensitivity&&(this.scrollParent[0].scrollLeft=n=this.scrollParent[0].scrollLeft-e.scrollSpeed)):(t.pageY-this.document.scrollTop()<e.scrollSensitivity?n=this.document.scrollTop(this.document.scrollTop()-e.scrollSpeed):this.window.height()-(t.pageY-this.document.scrollTop())<e.scrollSensitivity&&(n=this.document.scrollTop(this.document.scrollTop()+e.scrollSpeed)),t.pageX-this.document.scrollLeft()<e.scrollSensitivity?n=this.document.scrollLeft(this.document.scrollLeft()-e.scrollSpeed):this.window.width()-(t.pageX-this.document.scrollLeft())<e.scrollSensitivity&&(n=this.document.scrollLeft(this.document.scrollLeft()+e.scrollSpeed))),n},_mouseDrag:function(e){var n,i,o,r,s=this.options;for(this.position=this._generatePosition(e),this.positionAbs=this._convertPositionTo("absolute"),this.options.axis&&"y"===this.options.axis||(this.helper[0].style.left=this.position.left+"px"),this.options.axis&&"x"===this.options.axis||(this.helper[0].style.top=this.position.top+"px"),s.scroll&&!1!==this._scroll(e)&&(this._refreshItemPositions(!0),t.ui.ddmanager&&!s.dropBehaviour&&t.ui.ddmanager.prepareOffsets(this,e)),this.dragDirection={vertical:this._getDragVerticalDirection(),horizontal:this._getDragHorizontalDirection()},n=this.items.length-1;n>=0;n--)if(o=(i=this.items[n]).item[0],(r=this._intersectsWithPointer(i))&&i.instance===this.currentContainer&&!(o===this.currentItem[0]||this.placeholder[1===r?"next":"prev"]()[0]===o||t.contains(this.placeholder[0],o)||"semi-dynamic"===this.options.type&&t.contains(this.element[0],o))){if(this.direction=1===r?"down":"up","pointer"!==this.options.tolerance&&!this._intersectsWithSides(i))break;this._rearrange(e,i),this._trigger("change",e,this._uiHash());break}return this._contactContainers(e),t.ui.ddmanager&&t.ui.ddmanager.drag(this,e),this._trigger("sort",e,this._uiHash()),this.lastPositionAbs=this.positionAbs,!1},_mouseStop:function(e,n){if(e){if(t.ui.ddmanager&&!this.options.dropBehaviour&&t.ui.ddmanager.drop(this,e),this.options.revert){var i=this,o=this.placeholder.offset(),r=this.options.axis,s={};r&&"x"!==r||(s.left=o.left-this.offset.parent.left-this.margins.left+(this.offsetParent[0]===this.document[0].body?0:this.offsetParent[0].scrollLeft)),r&&"y"!==r||(s.top=o.top-this.offset.parent.top-this.margins.top+(this.offsetParent[0]===this.document[0].body?0:this.offsetParent[0].scrollTop)),this.reverting=!0,t(this.helper).animate(s,parseInt(this.options.revert,10)||500,(function(){i._clear(e)}))}else this._clear(e,n);return!1}},cancel:function(){if(this.dragging){this._mouseUp(new t.Event("mouseup",{target:null})),"original"===this.options.helper?(this.currentItem.css(this._storedCSS),this._removeClass(this.currentItem,"ui-sortable-helper")):this.currentItem.show();for(var e=this.containers.length-1;e>=0;e--)this.containers[e]._trigger("deactivate",null,this._uiHash(this)),this.containers[e].containerCache.over&&(this.containers[e]._trigger("out",null,this._uiHash(this)),this.containers[e].containerCache.over=0)}return this.placeholder&&(this.placeholder[0].parentNode&&this.placeholder[0].parentNode.removeChild(this.placeholder[0]),"original"!==this.options.helper&&this.helper&&this.helper[0].parentNode&&this.helper.remove(),t.extend(this,{helper:null,dragging:!1,reverting:!1,_noFinalSort:null}),this.domPosition.prev?t(this.domPosition.prev).after(this.currentItem):t(this.domPosition.parent).prepend(this.currentItem)),this},serialize:function(e){var n=this._getItemsAsjQuery(e&&e.connected),i=[];return e=e||{},t(n).each((function(){var n=(t(e.item||this).attr(e.attribute||"id")||"").match(e.expression||/(.+)[\-=_](.+)/);n&&i.push((e.key||n[1]+"[]")+"="+(e.key&&e.expression?n[1]:n[2]))})),!i.length&&e.key&&i.push(e.key+"="),i.join("&")},toArray:function(e){var n=this._getItemsAsjQuery(e&&e.connected),i=[];return e=e||{},n.each((function(){i.push(t(e.item||this).attr(e.attribute||"id")||"")})),i},_intersectsWith:function(t){var e=this.positionAbs.left,n=e+this.helperProportions.width,i=this.positionAbs.top,o=i+this.helperProportions.height,r=t.left,s=r+t.width,a=t.top,l=a+t.height,c=this.offset.click.top,u=this.offset.click.left,h="x"===this.options.axis||i+c>a&&i+c<l,p="y"===this.options.axis||e+u>r&&e+u<s,f=h&&p;return"pointer"===this.options.tolerance||this.options.forcePointerForContainers||"pointer"!==this.options.tolerance&&this.helperProportions[this.floating?"width":"height"]>t[this.floating?"width":"height"]?f:r<e+this.helperProportions.width/2&&n-this.helperProportions.width/2<s&&a<i+this.helperProportions.height/2&&o-this.helperProportions.height/2<l},_intersectsWithPointer:function(t){var e,n,i="x"===this.options.axis||this._isOverAxis(this.positionAbs.top+this.offset.click.top,t.top,t.height),o="y"===this.options.axis||this._isOverAxis(this.positionAbs.left+this.offset.click.left,t.left,t.width);return!(!i||!o)&&(e=this.dragDirection.vertical,n=this.dragDirection.horizontal,this.floating?"right"===n||"down"===e?2:1:e&&("down"===e?2:1))},_intersectsWithSides:function(t){var e=this._isOverAxis(this.positionAbs.top+this.offset.click.top,t.top+t.height/2,t.height),n=this._isOverAxis(this.positionAbs.left+this.offset.click.left,t.left+t.width/2,t.width),i=this.dragDirection.vertical,o=this.dragDirection.horizontal;return this.floating&&o?"right"===o&&n||"left"===o&&!n:i&&("down"===i&&e||"up"===i&&!e)},_getDragVerticalDirection:function(){var t=this.positionAbs.top-this.lastPositionAbs.top;return 0!==t&&(t>0?"down":"up")},_getDragHorizontalDirection:function(){var t=this.positionAbs.left-this.lastPositionAbs.left;return 0!==t&&(t>0?"right":"left")},refresh:function(t){return this._refreshItems(t),this._setHandleClassName(),this.refreshPositions(),this},_connectWith:function(){var t=this.options;return t.connectWith.constructor===String?[t.connectWith]:t.connectWith},_getItemsAsjQuery:function(e){var n,i,o,r,s=[],a=[],l=this._connectWith();if(l&&e)for(n=l.length-1;n>=0;n--)for(i=(o=t(l[n],this.document[0])).length-1;i>=0;i--)(r=t.data(o[i],this.widgetFullName))&&r!==this&&!r.options.disabled&&a.push(["function"==typeof r.options.items?r.options.items.call(r.element):t(r.options.items,r.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),r]);function c(){s.push(this)}for(a.push(["function"==typeof this.options.items?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):t(this.options.items,this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),this]),n=a.length-1;n>=0;n--)a[n][0].each(c);return t(s)},_removeCurrentsFromItems:function(){var e=this.currentItem.find(":data("+this.widgetName+"-item)");this.items=t.grep(this.items,(function(t){for(var n=0;n<e.length;n++)if(e[n]===t.item[0])return!1;return!0}))},_refreshItems:function(e){this.items=[],this.containers=[this];var n,i,o,r,s,a,l,c,u=this.items,h=[["function"==typeof this.options.items?this.options.items.call(this.element[0],e,{item:this.currentItem}):t(this.options.items,this.element),this]],p=this._connectWith();if(p&&this.ready)for(n=p.length-1;n>=0;n--)for(i=(o=t(p[n],this.document[0])).length-1;i>=0;i--)(r=t.data(o[i],this.widgetFullName))&&r!==this&&!r.options.disabled&&(h.push(["function"==typeof r.options.items?r.options.items.call(r.element[0],e,{item:this.currentItem}):t(r.options.items,r.element),r]),this.containers.push(r));for(n=h.length-1;n>=0;n--)for(s=h[n][1],i=0,c=(a=h[n][0]).length;i<c;i++)(l=t(a[i])).data(this.widgetName+"-item",s),u.push({item:l,instance:s,width:0,height:0,left:0,top:0})},_refreshItemPositions:function(e){var n,i,o,r;for(n=this.items.length-1;n>=0;n--)i=this.items[n],this.currentContainer&&i.instance!==this.currentContainer&&i.item[0]!==this.currentItem[0]||(o=this.options.toleranceElement?t(this.options.toleranceElement,i.item):i.item,e||(i.width=o.outerWidth(),i.height=o.outerHeight()),r=o.offset(),i.left=r.left,i.top=r.top)},refreshPositions:function(t){var e,n;if(this.floating=!!this.items.length&&("x"===this.options.axis||this._isFloating(this.items[0].item)),this.offsetParent&&this.helper&&(this.offset.parent=this._getParentOffset()),this._refreshItemPositions(t),this.options.custom&&this.options.custom.refreshContainers)this.options.custom.refreshContainers.call(this);else for(e=this.containers.length-1;e>=0;e--)n=this.containers[e].element.offset(),this.containers[e].containerCache.left=n.left,this.containers[e].containerCache.top=n.top,this.containers[e].containerCache.width=this.containers[e].element.outerWidth(),this.containers[e].containerCache.height=this.containers[e].element.outerHeight();return this},_createPlaceholder:function(e){var n,i,o=(e=e||this).options;o.placeholder&&o.placeholder.constructor!==String||(n=o.placeholder,i=e.currentItem[0].nodeName.toLowerCase(),o.placeholder={element:function(){var o=t("<"+i+">",e.document[0]);return e._addClass(o,"ui-sortable-placeholder",n||e.currentItem[0].className)._removeClass(o,"ui-sortable-helper"),"tbody"===i?e._createTrPlaceholder(e.currentItem.find("tr").eq(0),t("<tr>",e.document[0]).appendTo(o)):"tr"===i?e._createTrPlaceholder(e.currentItem,o):"img"===i&&o.attr("src",e.currentItem.attr("src")),n||o.css("visibility","hidden"),o},update:function(t,r){n&&!o.forcePlaceholderSize||(r.height()&&(!o.forcePlaceholderSize||"tbody"!==i&&"tr"!==i)||r.height(e.currentItem.innerHeight()-parseInt(e.currentItem.css("paddingTop")||0,10)-parseInt(e.currentItem.css("paddingBottom")||0,10)),r.width()||r.width(e.currentItem.innerWidth()-parseInt(e.currentItem.css("paddingLeft")||0,10)-parseInt(e.currentItem.css("paddingRight")||0,10)))}}),e.placeholder=t(o.placeholder.element.call(e.element,e.currentItem)),e.currentItem.after(e.placeholder),o.placeholder.update(e,e.placeholder)},_createTrPlaceholder:function(e,n){var i=this;e.children().each((function(){t("<td>&#160;</td>",i.document[0]).attr("colspan",t(this).attr("colspan")||1).appendTo(n)}))},_contactContainers:function(e){var n,i,o,r,s,a,l,c,u,h,p=null,f=null;for(n=this.containers.length-1;n>=0;n--)if(!t.contains(this.currentItem[0],this.containers[n].element[0]))if(this._intersectsWith(this.containers[n].containerCache)){if(p&&t.contains(this.containers[n].element[0],p.element[0]))continue;p=this.containers[n],f=n}else this.containers[n].containerCache.over&&(this.containers[n]._trigger("out",e,this._uiHash(this)),this.containers[n].containerCache.over=0);if(p)if(1===this.containers.length)this.containers[f].containerCache.over||(this.containers[f]._trigger("over",e,this._uiHash(this)),this.containers[f].containerCache.over=1);else{for(o=1e4,r=null,s=(u=p.floating||this._isFloating(this.currentItem))?"left":"top",a=u?"width":"height",h=u?"pageX":"pageY",i=this.items.length-1;i>=0;i--)t.contains(this.containers[f].element[0],this.items[i].item[0])&&this.items[i].item[0]!==this.currentItem[0]&&(l=this.items[i].item.offset()[s],c=!1,e[h]-l>this.items[i][a]/2&&(c=!0),Math.abs(e[h]-l)<o&&(o=Math.abs(e[h]-l),r=this.items[i],this.direction=c?"up":"down"));if(!r&&!this.options.dropOnEmpty)return;if(this.currentContainer===this.containers[f])return void(this.currentContainer.containerCache.over||(this.containers[f]._trigger("over",e,this._uiHash()),this.currentContainer.containerCache.over=1));r?this._rearrange(e,r,null,!0):this._rearrange(e,null,this.containers[f].element,!0),this._trigger("change",e,this._uiHash()),this.containers[f]._trigger("change",e,this._uiHash(this)),this.currentContainer=this.containers[f],this.options.placeholder.update(this.currentContainer,this.placeholder),this.scrollParent=this.placeholder.scrollParent(),this.scrollParent[0]!==this.document[0]&&"HTML"!==this.scrollParent[0].tagName&&(this.overflowOffset=this.scrollParent.offset()),this.containers[f]._trigger("over",e,this._uiHash(this)),this.containers[f].containerCache.over=1}},_createHelper:function(e){var n=this.options,i="function"==typeof n.helper?t(n.helper.apply(this.element[0],[e,this.currentItem])):"clone"===n.helper?this.currentItem.clone():this.currentItem;return i.parents("body").length||this.appendTo[0].appendChild(i[0]),i[0]===this.currentItem[0]&&(this._storedCSS={width:this.currentItem[0].style.width,height:this.currentItem[0].style.height,position:this.currentItem.css("position"),top:this.currentItem.css("top"),left:this.currentItem.css("left")}),i[0].style.width&&!n.forceHelperSize||i.width(this.currentItem.width()),i[0].style.height&&!n.forceHelperSize||i.height(this.currentItem.height()),i},_adjustOffsetFromHelper:function(t){"string"==typeof t&&(t=t.split(" ")),Array.isArray(t)&&(t={left:+t[0],top:+t[1]||0}),"left"in t&&(this.offset.click.left=t.left+this.margins.left),"right"in t&&(this.offset.click.left=this.helperProportions.width-t.right+this.margins.left),"top"in t&&(this.offset.click.top=t.top+this.margins.top),"bottom"in t&&(this.offset.click.top=this.helperProportions.height-t.bottom+this.margins.top)},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var e=this.offsetParent.offset();return"absolute"===this.cssPosition&&this.scrollParent[0]!==this.document[0]&&t.contains(this.scrollParent[0],this.offsetParent[0])&&(e.left+=this.scrollParent.scrollLeft(),e.top+=this.scrollParent.scrollTop()),(this.offsetParent[0]===this.document[0].body||this.offsetParent[0].tagName&&"html"===this.offsetParent[0].tagName.toLowerCase()&&t.ui.ie)&&(e={top:0,left:0}),{top:e.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:e.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"===this.cssPosition){var t=this.currentItem.position();return{top:t.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:t.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.currentItem.css("marginLeft"),10)||0,top:parseInt(this.currentItem.css("marginTop"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var e,n,i,o=this.options;"parent"===o.containment&&(o.containment=this.helper[0].parentNode),"document"!==o.containment&&"window"!==o.containment||(this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,"document"===o.containment?this.document.width():this.window.width()-this.helperProportions.width-this.margins.left,("document"===o.containment?this.document.height()||document.body.parentNode.scrollHeight:this.window.height()||this.document[0].body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]),/^(document|window|parent)$/.test(o.containment)||(e=t(o.containment)[0],n=t(o.containment).offset(),i="hidden"!==t(e).css("overflow"),this.containment=[n.left+(parseInt(t(e).css("borderLeftWidth"),10)||0)+(parseInt(t(e).css("paddingLeft"),10)||0)-this.margins.left,n.top+(parseInt(t(e).css("borderTopWidth"),10)||0)+(parseInt(t(e).css("paddingTop"),10)||0)-this.margins.top,n.left+(i?Math.max(e.scrollWidth,e.offsetWidth):e.offsetWidth)-(parseInt(t(e).css("borderLeftWidth"),10)||0)-(parseInt(t(e).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,n.top+(i?Math.max(e.scrollHeight,e.offsetHeight):e.offsetHeight)-(parseInt(t(e).css("borderTopWidth"),10)||0)-(parseInt(t(e).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top])},_convertPositionTo:function(e,n){n||(n=this.position);var i="absolute"===e?1:-1,o="absolute"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&t.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,r=/(html|body)/i.test(o[0].tagName);return{top:n.top+this.offset.relative.top*i+this.offset.parent.top*i-("fixed"===this.cssPosition?-this.scrollParent.scrollTop():r?0:o.scrollTop())*i,left:n.left+this.offset.relative.left*i+this.offset.parent.left*i-("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():r?0:o.scrollLeft())*i}},_generatePosition:function(e){var n,i,o=this.options,r=e.pageX,s=e.pageY,a="absolute"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&t.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,l=/(html|body)/i.test(a[0].tagName);return"relative"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&this.scrollParent[0]!==this.offsetParent[0]||(this.offset.relative=this._getRelativeOffset()),this.originalPosition&&(this.containment&&(e.pageX-this.offset.click.left<this.containment[0]&&(r=this.containment[0]+this.offset.click.left),e.pageY-this.offset.click.top<this.containment[1]&&(s=this.containment[1]+this.offset.click.top),e.pageX-this.offset.click.left>this.containment[2]&&(r=this.containment[2]+this.offset.click.left),e.pageY-this.offset.click.top>this.containment[3]&&(s=this.containment[3]+this.offset.click.top)),o.grid&&(n=this.originalPageY+Math.round((s-this.originalPageY)/o.grid[1])*o.grid[1],s=this.containment?n-this.offset.click.top>=this.containment[1]&&n-this.offset.click.top<=this.containment[3]?n:n-this.offset.click.top>=this.containment[1]?n-o.grid[1]:n+o.grid[1]:n,i=this.originalPageX+Math.round((r-this.originalPageX)/o.grid[0])*o.grid[0],r=this.containment?i-this.offset.click.left>=this.containment[0]&&i-this.offset.click.left<=this.containment[2]?i:i-this.offset.click.left>=this.containment[0]?i-o.grid[0]:i+o.grid[0]:i)),{top:s-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.scrollParent.scrollTop():l?0:a.scrollTop()),left:r-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():l?0:a.scrollLeft())}},_rearrange:function(t,e,n,i){n?n[0].appendChild(this.placeholder[0]):e.item[0].parentNode.insertBefore(this.placeholder[0],"down"===this.direction?e.item[0]:e.item[0].nextSibling),this.counter=this.counter?++this.counter:1;var o=this.counter;this._delay((function(){o===this.counter&&this.refreshPositions(!i)}))},_clear:function(t,e){this.reverting=!1;var n,i=[];if(!this._noFinalSort&&this.currentItem.parent().length&&this.placeholder.before(this.currentItem),this._noFinalSort=null,this.helper[0]===this.currentItem[0]){for(n in this._storedCSS)"auto"!==this._storedCSS[n]&&"static"!==this._storedCSS[n]||(this._storedCSS[n]="");this.currentItem.css(this._storedCSS),this._removeClass(this.currentItem,"ui-sortable-helper")}else this.currentItem.show();function o(t,e,n){return function(i){n._trigger(t,i,e._uiHash(e))}}for(this.fromOutside&&!e&&i.push((function(t){this._trigger("receive",t,this._uiHash(this.fromOutside))})),!this.fromOutside&&this.domPosition.prev===this.currentItem.prev().not(".ui-sortable-helper")[0]&&this.domPosition.parent===this.currentItem.parent()[0]||e||i.push((function(t){this._trigger("update",t,this._uiHash())})),this!==this.currentContainer&&(e||(i.push((function(t){this._trigger("remove",t,this._uiHash())})),i.push(function(t){return function(e){t._trigger("receive",e,this._uiHash(this))}}.call(this,this.currentContainer)),i.push(function(t){return function(e){t._trigger("update",e,this._uiHash(this))}}.call(this,this.currentContainer)))),n=this.containers.length-1;n>=0;n--)e||i.push(o("deactivate",this,this.containers[n])),this.containers[n].containerCache.over&&(i.push(o("out",this,this.containers[n])),this.containers[n].containerCache.over=0);if(this.storedCursor&&(this.document.find("body").css("cursor",this.storedCursor),this.storedStylesheet.remove()),this._storedOpacity&&this.helper.css("opacity",this._storedOpacity),this._storedZIndex&&this.helper.css("zIndex","auto"===this._storedZIndex?"":this._storedZIndex),this.dragging=!1,e||this._trigger("beforeStop",t,this._uiHash()),this.placeholder[0].parentNode.removeChild(this.placeholder[0]),this.cancelHelperRemoval||(this.helper[0]!==this.currentItem[0]&&this.helper.remove(),this.helper=null),!e){for(n=0;n<i.length;n++)i[n].call(this,t);this._trigger("stop",t,this._uiHash())}return this.fromOutside=!1,!this.cancelHelperRemoval},_trigger:function(){!1===t.Widget.prototype._trigger.apply(this,arguments)&&this.cancel()},_uiHash:function(e){var n=e||this;return{helper:n.helper,placeholder:n.placeholder||t([]),position:n.position,originalPosition:n.originalPosition,offset:n.positionAbs,item:n.currentItem,sender:e?e.element:null}}})}));let L=null,q=!1,M=[];function $(){let n=L.find("tr.sectionrow"),i=!1;n.each(((n,o)=>{let r=t(e)(o),s=/^section(\d+)$/.exec(o.id)[1],a=r.find(":nth-child(1)").html(),l=r.find(":nth-child(2)").html(),c=r.find(":nth-child(3)").html(),u="yes"==r.find(":nth-child(4)").html().toLowerCase()?"on":"off";t(e).ajax({method:"POST",url:webroot+"manage?action=boardsections",data:{updatesection:s,sectionname:a,sectionabbr:l,sectionpos:c,sectionhidden:u,save_section:"Save section"},success:function(){y("Section order changes saved successfully!","Success"),q=!1,t(e)("div#save-changes").remove()},error:function(t,e,n){i||(y(`Received an error when saving changes (only the first one will be shown): ${n}`,"Error"),i=!0)}}).fail(((t,e,n)=>{i||(y(`Received an error when saving changes (only the first one will be shown): ${n}`,"Error"),i=!0)}))}))}function R(){L.find("tbody").sortable("cancel"),L.find("tr.sectionrow").each(((n,i)=>{t(e)(i).find(":nth-child(3)").text(M[n])})),q=!1,t(e)("div#save-changes").remove()}t(e)((()=>{0==window.location.search.indexOf("?action=boardsections")&&(L=t(e)("table#sections"),L.prev().append(" (drag to rearrange)"),L.find("tbody").sortable({items:"tr.sectionrow",stop:()=>{L.find("tr.sectionrow").each(((n,i)=>{let o=t(e)(i).find(":nth-child(3)");M.push(o.text()),o.text(n+1)})),q||(t(e)("<div/>").prop({id:"save-changes"}).append(t(e)("<button/>").text("Apply order changes").on("click",$),t(e)("<button/>").text("Cancel").on("click",R)).insertAfter(L),q=!0)}}))}));const W={ID:0,Username:"",Rank:0},F=/^Reports( \(\d+\))?/;let B=[],z=W,X=!1,U=null,Y=null;async function V(){return t(e).ajax({method:"GET",url:`${webroot}manage`,data:{action:"actions"},async:!0,cache:!1,success:t=>{if("string"==typeof t)try{B=JSON.parse(t)}catch(t){B=[]}else"object"==typeof t&&(B=t)},error:t=>{console.error("Error getting actions list:",t)}}).then(Q).then((n=>(n.Rank>0&&(t(e)("select.post-actions").each(((n,i)=>{var o;o="Posts from this IP",[...i.children].filter((t=>t.text===o)).length>0||t(e)(i).append("<option>Posts from this IP</option>")})),t(e)(document).on("postDropdownAdded",(function(t,e){e.dropdown&&e.dropdown.append("<option>Posts from this IP</option>")}))),n)))}async function Q(){return X?z:(X=!0,t(e).ajax({method:"GET",url:`${webroot}manage`,data:{action:"staffinfo"},async:!0,cache:!0,dataType:"json"}).catch((()=>W)).then((t=>t.error?W:(z=t,t))))}async function G(n){return t(e).ajax({method:"GET",url:`${webroot}manage`,data:{action:"postinfo",postid:n},async:!0,cache:!0,dataType:"json"})}function J(n,i=!1){return i?t(e)("<div/>").append(t(e)("<b/>").text(n)):t(e)("<div/>").append(t(e)("<a/>").prop({href:`${webroot}manage?action=${n.id}`}).text(n.title))}function K(t){for(const e of B)if(e.id==t)return e}function Z(t,e){return"Logout"!=t.title&&"Dashboard"!=t.title&&t.jsonOutput<2&&t.perms==e}function tt(n=z){let i=n.Rank;if(0===i)return;U=t(e)("<div/>").prop({id:"staffmenu",class:"dropdown-menu"}),U.append(J(K("logout")),J(K("dashboard")));let o=B.filter((t=>Z(t,1)));U.append(J("Janitorial",!0));for(const t of o)U.append(J(t));if(i>=2){let n=B.filter((t=>Z(t,2)));n.length>0&&U.append(J("Moderation",!0));for(const t of n)U.append(J(t));t(e).ajax({method:"GET",url:`${webroot}manage`,data:{action:"reports",json:"1"},async:!0,cache:!1,dataType:"json"}).catch((t=>t)).then(et)}if(3==i){let t=B.filter((t=>Z(t,3)));t.length>0&&U.append(J("Administration",!0));for(const e of t)U.append(J(e))}!function(){if(null!==Y||0===z.Rank)return;Y=new p("Staff",(()=>{t(e)(document).find(U).length>0?U.remove():u.after(U)}))}()}function et(n){U.find("a").each(((i,o)=>{if(0!=o.text.search(F))return;let r=t(e)("<span/>").text(` (${n.length})`).appendTo(o);n.length>0&&r.css({"font-weight":"bold",color:"red"})}))}const nt=/^((reply)|(op))(\d+)/;function it(i,o,r){v(n("password"),!0,((n,s)=>{let a={board:o,boardid:t(e)("input[name=boardid]").val(),delete_btn:"Delete",password:s,json:"1"};a[`check${i}`]="on",r&&(a.fileonly="on"),t(e).post(webroot+"util",a).fail((t=>{y(`Delete failed: ${t.error}`,"Error")})).done((n=>{null==n.error||""==n?location.href.indexOf(`/${o}/res/${i}.html`)>-1?y("Thread deleted","Success"):r?function(n){let i=t(e)(`div#op${n}.op-post, div#reply${n}.reply`);0!==i.length&&(i.find(".file-info,.upload-container").remove(),t(e)("<div/>").prop({class:"file-deleted-box",style:"text-align: center;"}).text("File removed").insertBefore(i.find("div.post-text")),y("File deleted","Success"))}(i):function(n){let i=t(e)(`div#op${n}.op-post`);i.length>0?(i.parent().next().remove(),i.parent().remove()):t(e)(`div#replycontainer${n}`).remove()}(i):0===n.boardid&&0===n.postid?y(`Error deleting post #${i}: Post doesn't exist`,"Error"):""!==n&&(y(`Error deleting post #${i}`,"Error"),console.log(n))}),"json")}),"Password")}function ot(i,o){let r=nt.exec(o);if(!r)return;let s=r[4],a=w();switch(i){case"Watch thread":N(s,a);break;case"Unwatch thread":A(s,a);break;case"Show thread":O(s,!0);break;case"Hide thread":O(s,!1);break;case"Show post":H(s,!0);break;case"Hide post":H(s,!1);break;case"Edit post":l=s,v(n("password"),!0,(()=>{t(e)("input[type=checkbox]").prop("checked",!1),t(e)(`input#check${l}`).prop("checked",!0),t(e)("input[name=edit_btn]").trigger("click")}),"Edit post");break;case"Report post":!function(n,i){v("",!1,((o,r)=>{if(""==r||null===r)return;let s={board:i,report_btn:"Report",reason:r,json:"1"};s[`check${n}`]="on",t(e).post(webroot+"util",s).fail((t=>{let e=t.error;void 0===e&&(e=t.statusText),y(`Report failed: ${e}`,"Error")})).done((t=>{void 0!==t.error&&null!==t.error?y(`Report failed: ${t.error.Message}`,"Error"):y("Report sent","Success")}),"json")}),"Report post")}(s,a);break;case"Delete file":it(s,a,!0);break;case"Delete thread":case"Delete post":it(s,a);break;case"Posts from this IP":G(s).then((t=>{window.open(`${webroot}manage?action=ipsearch&limit=100&ip=${t.ip}`)})).catch((t=>{y(`Failed getting post IP: ${t.statusText}`,"Error")}))}var l}function rt(n){if(n.find("select.post-actions").length>0)return n;let i=n.find("label.post-info"),o=n.prop("class").split(" ").indexOf("op-post")>-1,r=i.siblings("div.file-info").length>0,s=i.parent().attr("id"),a=o?"thread":"post",l=t(e)("<select />",{class:"post-actions",id:s}).append("<option disabled selected>Actions</option>"),c=nt.exec(s)[4];o&&(E(c,w())?l.append("<option>Unwatch thread</option>"):l.append("<option>Watch thread</option>"));let u=j(c)?"Hide":"Show";return l.append(`<option>${u} ${a}</option>`,"<option>Edit post</option>","<option>Report post</option>",`<option>Delete ${a}</option>`).insertAfter(i).on("change",(t=>{ot(l.val(),s),l.val("Actions")})),r&&l.append("<option>Delete file</option>"),n.trigger("postDropdownAdded",{post:n,dropdown:l}),n}function st(t){let e=new Date(t);return e.toDateString()+", "+e.toLocaleTimeString()}function at(n,i,o="inlinepostprev"){let r=t(e)("<div/>").prop({id:`reply${n.no}`,class:o});r.append(t(e)("<a/>").prop({id:n.no.toString(),class:"anchor"}),t(e)("<input/>").prop({type:"checkbox",id:`check${n.no}`,name:`check${n.no}`}),t(e)("<label/>").prop({class:"post-info",for:`check${n.no}`}).append(st(n.time))," ",t(e)("<a/>").prop({href:webroot+i+"/res/"+(n.resto>0?n.resto:n.no)+".html#"+n.no}).text("No.")," ",t(e)("<a/>").prop({class:"backlink-click",href:`javascript:quote(${n.no})`}).text(n.no),"<br/>");let s=r.find("label.post-info"),a=""==n.name&&""==n.trip?"Anonymous":n.name,l=t(e)("<span/>").prop({class:"postername"});if(""==n.email?l.text(a):l.append(t(e)("<a/>").prop({href:"mailto:"+n.email}).text(n.name)),s.prepend(l),""!=n.trip?s.prepend(l,t(e)("<span/>").prop({class:"tripcode"}).text("!"+n.trip)," "):s.prepend(l," "),""!=n.sub&&s.prepend(t(e)("<span/>").prop({class:"subject"}).text(n.sub)," "),""!=n.filename&&"deleted"!=n.filename){let o=C(n.tim);r.append(t(e)("<div/>").prop({class:"file-info"}).append("File: ",t(e)("<a/>").prop({href:webroot+i+"/src/"+n.tim,target:"_blank"}).text(n.tim),` - (${c=n.fsize,c<1e3?`${c} B`:c<=1e5?`${(c/1024).toFixed(1)} KB`:c<=1e8?`${(c/1024/1024).toFixed(2)} MB`:`${(c/1024/1024/1024).toFixed(2)} GB`} , ${n.w}x${n.h}, `,t(e)("<a/>").prop({class:"file-orig",href:webroot+i+"/src/"+n.tim,download:n.filename}).text(n.filename),")"),t(e)("<a/>").prop({class:"upload-container",href:webroot+i+"/src/"+n.tim}).append(t(e)("<img/>").prop({class:"upload",src:webroot+i+"/thumb/"+o,alt:webroot+i+"/src/"+n.tim,width:n.tn_w,height:n.tn_h})))}var c;return r.append(t(e)("<div/>").prop({class:"post-text"}).html(n.com)),r}let lt=!1,ct=!1,ut=null,ht=0;const pt=/\.(mp4)|(webm)$/,ft=/\/([^\s/]+)\/res\/(\d+)\.html(#(\d+))?/;let dt={posts:[]};function mt(){let n=T();var i,o;if(0!==n.thread)return(i=n.thread,o=n.board,t(e).ajax({url:`${webroot}${o}/res/${i}.json`,cache:!1,dataType:"json",error:function(t,e,n){return{}}}).catch((t=>({})))).then((t=>{t.posts instanceof Array&&0!==t.posts.length&&(dt=t)}))}function gt(){let n=T();if(0===n.thread)return;for(const i of dt.posts){let o="";if(0===i.resto?o+=`div#${i.no}.thread`:o+=`a#${i.no}.anchor`,t(e)(o).length>0)continue;let r=at(i,n.board,"reply");t(e)("<div/>").prop({id:`replycontainer${i.no}`,class:"reply-container"}).append(r).appendTo(`div#${i.resto}.thread`),rt(r),_t(r),wt(r)}}function vt(){return mt().then(gt)}function yt(t,e,n=!0){let i=e.clone();return n&&(i=rt(e.clone())),i.prop({class:"inlinepostprev"}).find("div.inlinepostprev").remove().find("a.postref").on("click",xt),n&&i.insertAfter(t.target),wt(i),i}function bt(t){null!==ut&&ut.css({position:"absolute"}).offset({top:t.pageY+8,left:t.pageX+8})}function xt(n){n.preventDefault(),null!==ut&&ut.remove();let i=t(e)(n.target).next();if("inlinepostprev"==i.prop("class")&&"click"==n.type)return void i.remove();let o=n.target.href,r=ft.exec(o);if(null===r)return;let s=r[4]?r[4]:r[2],a=t(e)(`div#op${s}, div#reply${s}`).first();if(a.length>0){let i=yt(n,a,"click"==n.type);"mouseenter"==n.type&&(ut=i.insertAfter(n.target),t(e)(document.body).on("mousemove",bt))}else"click"==n.type&&t(e).get(o,(i=>{a=t(e)(i).find(`div#op${s}, div#reply${s}`).first(),a.length<1||yt(n,a,!0)})).catch(((t,e,n)=>{y(n,"Error")}))}function wt(n=null){if(""==_().board&&null===n)return;lt=s("enablepostclick",!0),ct=s("enableposthover",!1);let i=null;i=null===n?t(e)("a.postref"):n.find("a.postref"),lt?i.on("click",xt):i.off("click",xt),ct?i.on("mouseenter",xt).on("mouseleave",(()=>{null!==ut&&ut.remove(),ut=null,t(e)(document.body).off("mousemove",bt)})):i.off("mouseenter").off("mouseleave").off("mousemove")}function _t(n=null){(null===n?t(e)("a.upload-container"):n.find("a")).on("click",(function(n){n.preventDefault();let i=t(e)(this),o=i.find("img.upload"),r=o.attr("src"),s=o.attr("alt");o.removeAttr("width").removeAttr("height");var a=i.prevAll(".file-info:first");if(pt.test(r+s)){o.hide();var l=t(e)("<video />").prop({src:s,autoplay:!0,controls:!0,class:"upload",loop:!0}).insertAfter(a);a.append(t(e)("<a />").prop("href","javascript:;").on("click",(function(){l.remove(),o.show(),this.remove(),o.prop({src:r,alt:s})})).css({"padding-left":"8px"}).html("[Close]<br />"))}else o.attr({src:s,alt:r});return!1}))}function Tt(){clearInterval(ht),ht=setInterval(vt,1e3*a("watcherseconds",10))}function Ct(t,e,n){for(const i of t.boards)if(i.board==e)return i.cooldowns[n]}async function Pt(n){return Ct(await t(e).getJSON(`${webroot}boards.json`),n,"threads")}async function kt(n){return Ct(await t(e).getJSON(`${webroot}boards.json`),n,"replies")}window.quote=function(t){s("useqr",!0)&&$t();let e="postmsg",n=document.getElementById("qrpostmsg");null===n&&(n=document.getElementById(e));let i=window.getSelection?window.getSelection().toString():"",o=i.split("\n");if(""!==i)for(let t=0;t<o.length;t++)o[t]=">"+o[t];let r=void 0!==n.selectionStart?n.selectionStart:n.value.length,a=o.join("\n");""!=a&&(a+="\n"),n.value=n.value.slice(0,r)+`>>${t}\n`+a+n.value.slice(r),"postmsg"==n.id&&window.scroll(0,n.offsetTop-48),n.focus()},t(e)((()=>{_().op>=1&&Tt()}));let St=()=>{};function Et(t,e=St){0!=t.length&&(t[0].onchange=function(){let t=new Image;t.src=URL.createObjectURL(this.files[0]),t.onload=e})}function Nt(){let t=document.getElementById("imagefile");return null===t||void 0===t.files||t.files.length<1?"":t.files[0].name}let At=null,Dt=0,It=0;function jt(){T().thread<1?Ht("New Thread"):Ht("Reply")}function Ht(t){At.find("input[type=submit]").attr("value",t)}function Ot(t=!0){let e=At.find("input[type=submit]");t?e.removeAttr("disabled"):e.attr("disabled","disabled")}function Lt(){let n=At.find("div#upload-container");n.empty();let i=Nt();n.append(t(e)(this).prop({title:i}).css({"max-width":"100%","max-height":"inherit"}).on("click",(n=>{n.shiftKey&&function(){t(e)("#imagefile").val("");let n=At.find("div#upload-container");n.empty(),n.css("display","none")}()}))),n.css("display","")}function qt(i){if(null!==At)return;if(void 0===i&&(i=_()),!s("useqr",!0))return Rt();if(!(t(e)("form input[name=boardid]").length>0))return;const o=n("name"),r=n("email");let a=t(e)("<div/>").prop("id","qrbuttons").append('<input type="file" id="imagefile" name="imagefile" accept="image/jpeg,image/png,image/gif,video/webm,video/mp4"/><input type="submit" value="Post" style="float:right;min-width:50px"/>'),p=t(e)("<form/>").prop({id:"qrpostform",name:"qrpostform",action:webroot+"post",method:"POST",enctype:"multipart/form-data"}).append(t(e)("<input/>").prop({type:"hidden",name:"threadid",value:i.op}),t(e)("<input/>").prop({type:"hidden",name:"json",value:1}),t(e)("<input/>").prop({type:"hidden",name:"boardid",value:1}),t(e)("<div/>").append(t(e)("<input/>").prop({id:"qrpostname",type:"text",name:"postname",value:o,placeholder:"Name"})),t(e)("<div/>").append(t(e)("<input/>").prop({id:"qrpostemail",type:"text",name:"postemail",value:r,placeholder:"Email"})),t(e)("<div/>").append(t(e)("<input/>").prop({id:"qrpostsubject",type:"text",name:"postsubject",placeholder:"Subject"})),t(e)("<div/>").append(t(e)("<textarea/>").prop({id:"qrpostmsg",name:"postmsg",placeholder:"Message"})),a),f=32;s("pintopbar",!0)&&(f=u.outerHeight()+16);let d=l("qrpos",{top:f,left:16});d.top>-1||(d.top=f),d.left>-1||(d.left=16),At=t(e)("<div />").prop({id:"qr-box"}).css({top:d.top,left:d.left,position:"fixed"}).append(t(e)('<div id="qr-title"><span id="qr-message"></span><span id="qr-buttons"><a href="javascript:toBottom();">&#9660;</a><a href="javascript:toTop();">&#9650;</a><a href="javascript:closeQR();">X</a></span></div>'),p,t(e)("<div/>").prop({id:"upload-container"}).css({display:"none"})).draggable({handle:"div#qr-title",scroll:!1,containment:"window",drag:(t,e)=>{e.position.top=Math.max(e.position.top,h),c("qrpos",JSON.stringify(e.position))}}),$t(),Et(a.find("input#imagefile"),Lt),jt(),T().thread<1||t(e)("form#qrpostform").on("submit",(function(n){let i=t(e)(this);n.preventDefault();let o=new FormData(this);return t(e).ajax({type:"POST",url:i.attr("action"),enctype:"multipart/form-data",data:o,processData:!1,contentType:!1,success:()=>{Mt(),function(t="",e=5){let n=e,i=0;const o=()=>{0==n?(Ot(!0),jt(),clearInterval(i)):(Ot(!1),Ht(`${t}${n--}`))};i=setInterval(o,1e3),o()}("",T().thread>0?It:Dt),vt().then(Mt).then((()=>{s("persistentqr",!1)||Rt()}))}}),!1}))}function Mt(){At&&(At.find("input[name=postsubject]").val(""),At.find("textarea[name=postmsg]").val(""),At.find("input[type=file]").val(""),At.find("div#upload-container").empty())}function $t(){At&&At.insertAfter("div#content")}function Rt(){At&&At.remove()}function Wt(n){let i=n.target,o="TEXTAREA"==i.nodeName&&"postmsg"==i.name;null!=i.form||n.ctrlKey?o&&n.ctrlKey&&function(n){let i="";switch(n.keyCode){case 10:case 13:t(e)(n.target).parents("form#postform,form#qrpostform").trigger("submit");break;case 66:i="b";break;case 73:i="i";break;case 82:i="s";break;case 83:i="?";break;case 85:i="u"}if(""==i)return;n.preventDefault();let o=n.target,r=o.value,s=o.selectionStart,a=o.selectionEnd,l=a+2+i.length;o.value=r.slice(0,s)+`[${i}]`+r.slice(s,a)+`[/${i}]`+r.slice(a),o.setSelectionRange(l,l),t(e)(o).text(o.value)}(n):$t()}window.openQR=$t,window.closeQR=Rt,t(e)((()=>{let t=w();""!=t&&(Pt(t).then((t=>Dt=t)),kt(t).then((t=>It=t)))}));let Ft=null;const Bt=new Map;class zt{getElementValue(){return null===this.element?"":this.element.val()}setElementValue(t){null!==this.element&&this.element.val(t)}getStorageValue(){return r(this.key,this.defaultVal)}setStorageValue(t){c(this.key,t)}createElement(n="<input/>",i={}){return t(e)(n).prop(i).prop({id:this.key,name:this.key})}constructor(t,e,n="",i=(()=>{})){this.key=t,this.title=e,this.defaultVal=n,this.onSave=i,this.element=null}}class Xt extends zt{constructor(n,i,o=[],r="",s=(()=>{})){super(n,i,r,s),this.element=this.createElement("<select/>");for(const n of o)t(e)("<option/>").val(n.val).text(n.text).appendTo(this.element);this.element.val(this.getStorageValue())}}class Ut extends zt{getElementValue(){return this.element.prop("checked")}setElementValue(t){this.element.prop({checked:t})}getStorageValue(){let t=super.getStorageValue();return 1==t||"true"==t}constructor(t,e,n=!1,i=(()=>{})){super(t,e,n,i),this.element=this.createElement("<input/>",{type:"checkbox",checked:this.getStorageValue()})}}class Yt extends zt{getStorageValue(){let t=Number.parseFloat(super.getStorageValue());return isNaN(t)&&(t=this.defaultVal),t}constructor(t,e,n=0,i={min:null,max:null},o=(()=>{})){super(t,e,n,o);let r={type:"number"};"number"!=typeof i.min||isNaN(i.min)||(r.min=i.min),"number"!=typeof i.max||isNaN(i.max)||(r.max=i.max),this.element=this.createElement("<input />",r).val(this.getStorageValue())}}function Vt(){var n,i;n="Settings",i='<div id="settings-container" style="overflow:auto"><table width="100%"><colgroup><col span="1" width="50%"><col span="1" width="50%"></colgroup></table></div><div class="lightbox-footer"><hr /><button id="save-settings-button">Save Settings</button></div>',t(e)(document.body).prepend(`<div class="lightbox-bg"></div><div class="lightbox"><div class="lightbox-title">${n}<a href="javascript:;" class="lightbox-x">X</a><hr /></div>${i}</div>`),t(e)("a.lightbox-x, .lightbox-bg").on("click",m),t(e)("button#save-settings-button").on("click",(()=>{Bt.forEach(((t,e)=>{c(e,t.getElementValue()),t.onSave()}))}));let o=t(e)("#settings-container table");Bt.forEach((n=>{let i=t(e)("<tr/>").appendTo(o);t(e)("<td/>").append(t(e)("<b/>").text(n.title)).appendTo(i),t(e)("<td/>").append(n.element).appendTo(i)}))}function Qt(){let t=[];for(const e of styles)t.push({text:e.Name,val:e.Filename});Bt.set("style",new Xt("style","Style",t,defaultStyle,(function(){document.getElementById("theme").setAttribute("href",`${webroot}css/${this.getElementValue()}`)}))),Bt.set("pintopbar",new Ut("pintopbar","Pin top bar",!0,f)),Bt.set("enableposthover",new Ut("enableposthover","Preview post on hover",!1,wt)),Bt.set("enablepostclick",new Ut("enablepostclick","Preview post on click",!0,wt)),Bt.set("useqr",new Ut("useqr","Use Quick Reply box",!0,(()=>{s("useqr",!0)?qt():Rt()}))),Bt.set("watcherseconds",new Yt("watcherseconds","Check watched threads every # seconds",10,{min:2},D)),Bt.set("persistentqr",new Ut("persistentqr","Persistent Quick Reply",!1)),null===Ft&&(Ft=new p("Settings",Vt))}window.toTop=function(){window.scrollTo(0,0)},window.toBottom=function(){window.scrollTo(0,document.body.scrollHeight)},t(e)((()=>{let n=_(),o=r("style",defaultStyle),a=document.getElementById("theme");a&&a.setAttribute("href",`${webroot}css/${o}`),i(),f(),Qt(),V().then(tt).catch((()=>{})),D();let l=t(e)("input#postpassword").val();t(e)("input#delete-password").val(l),""!=n.board&&(_t(),s("useqr",!0)&&qt(n),wt()),t(e)("div.post, div.reply").each(((n,i)=>{rt(t(e)(i))})),t(e)(document).on("keydown",Wt)}))}();
//# sourceMappingURL=gochan.js.map
