@finqu/cool 1.3.0 → 2.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +23 -9
- package/dist/css/cool.css +13391 -7742
- package/dist/css/cool.css.map +1 -1
- package/dist/css/cool.min.css +2 -93
- package/dist/css/cool.min.css.map +1 -1
- package/dist/js/cool.bundle.js +16051 -17050
- package/dist/js/cool.bundle.js.map +1 -1
- package/dist/js/cool.bundle.min.js +11 -18
- package/dist/js/cool.bundle.min.js.map +1 -1
- package/dist/js/cool.esm.js +3469 -4468
- package/dist/js/cool.esm.js.map +1 -1
- package/dist/js/cool.esm.min.js +2 -8
- package/dist/js/cool.esm.min.js.map +1 -1
- package/dist/js/cool.js +5083 -6089
- package/dist/js/cool.js.map +1 -1
- package/dist/js/cool.min.js +2 -8
- package/dist/js/cool.min.js.map +1 -1
- package/package.json +48 -16
- package/scss/LISENCE +15 -0
- package/scss/_badge.scss +134 -0
- package/scss/_button-group.scss +80 -0
- package/scss/_buttons.scss +304 -0
- package/scss/_dark.scss +637 -0
- package/scss/_dialog.scss +351 -0
- package/scss/_dropdown.scss +165 -0
- package/scss/_forms.scss +613 -0
- package/scss/_frame.scss +948 -0
- package/scss/_grid.scss +215 -0
- package/scss/_input-group.scss +326 -0
- package/scss/_list-group.scss +127 -0
- package/scss/_media.scss +439 -0
- package/scss/_navbar.scss +122 -0
- package/scss/_notification.scss +115 -0
- package/scss/_pagination.scss +82 -0
- package/scss/_popover.scss +61 -0
- package/scss/_reboot.scss +306 -0
- package/scss/_root.scss +848 -0
- package/scss/_section.scss +735 -0
- package/scss/_select.scss +559 -0
- package/scss/_tables.scss +611 -0
- package/scss/_tabs.scss +50 -0
- package/scss/_toast.scss +277 -0
- package/scss/_tooltip.scss +130 -0
- package/scss/_typography.scss +166 -0
- package/scss/_variables.scss +1229 -0
- package/scss/cool.scss +69 -0
- package/scss/utilities/_align.scss +51 -0
- package/scss/utilities/_animation.scss +165 -0
- package/scss/utilities/_background.scss +72 -0
- package/scss/utilities/_borders.scss +205 -0
- package/scss/utilities/_collapse.scss +28 -0
- package/scss/utilities/_cursor.scss +160 -0
- package/scss/utilities/_display.scss +116 -0
- package/scss/utilities/_embed.scss +89 -0
- package/scss/utilities/_fill.scss +79 -0
- package/scss/utilities/_filters.scss +233 -0
- package/scss/utilities/_flex.scss +216 -0
- package/scss/utilities/_grid.scss +136 -0
- package/scss/utilities/_opacity.scss +131 -0
- package/scss/utilities/_overflow.scss +242 -0
- package/scss/utilities/_perfect-scrollbar.scss +147 -0
- package/scss/utilities/_pointer-events.scss +125 -0
- package/scss/utilities/_position.scss +130 -0
- package/scss/utilities/_screen-readers.scss +95 -0
- package/scss/utilities/_shadows.scss +195 -0
- package/scss/utilities/_sizing.scss +288 -0
- package/scss/utilities/_spacing.scss +168 -0
- package/scss/utilities/_stroke.scss +124 -0
- package/scss/utilities/_text.scss +420 -0
- package/scss/utilities/_transform.scss +232 -0
- package/scss/utilities/_transitions.scss +147 -0
- package/scss/utilities/_user-select.scss +93 -0
- package/scss/utilities/_visibility.scss +66 -0
- package/scss/utilities/_z-index.scss +169 -0
|
@@ -1,24 +1,17 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Cool
|
|
2
|
+
* Cool v2.0.2 (https://github.com/finqu/cool#readme)
|
|
3
3
|
* Copyright 2020-2026 Finqu Oy
|
|
4
4
|
* Licensed under ISC
|
|
5
5
|
*/
|
|
6
|
-
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).Cool=e()}(this,function(){"use strict";
|
|
6
|
+
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).Cool=e()}(this,function(){"use strict";var t="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function e(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var i={exports:{}};
|
|
7
7
|
/*!
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
*/
|
|
17
|
-
!function(t){!function(e,n){t.exports=e.document?n(e,!0):function(t){if(!t.document)throw new Error("jQuery requires a window with a document");return n(t)}}("undefined"!=typeof window?window:o,function(t,e){var n=[],i=Object.getPrototypeOf,o=n.slice,s=n.flat?function(t){return n.flat.call(t)}:function(t){return n.concat.apply([],t)},r=n.push,a=n.indexOf,l={},c=l.toString,h=l.hasOwnProperty,d=h.toString,u=d.call(Object),f={},p=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 b(t,e,n){var i,o,s=(n=n||g).createElement("script");if(s.text=t,e)for(i in v)(o=e[i]||e.getAttribute&&e.getAttribute(i))&&s.setAttribute(i,o);n.head.appendChild(s).parentNode.removeChild(s)}function y(t){return null==t?t+"":"object"==typeof t||"function"==typeof t?l[c.call(t)]||"object":typeof t}var w="3.7.1",$=/HTML$/i,x=function(t,e){return new x.fn.init(t,e)};function C(t){var e=!!t&&"length"in t&&t.length,n=y(t);return!p(t)&&!m(t)&&("array"===n||0===e||"number"==typeof e&&e>0&&e-1 in t)}function E(t,e){return t.nodeName&&t.nodeName.toLowerCase()===e.toLowerCase()}x.fn=x.prototype={jquery:w,constructor:x,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=x.merge(this.constructor(),t);return e.prevObject=this,e},each:function(t){return x.each(this,t)},map:function(t){return this.pushStack(x.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(x.grep(this,function(t,e){return(e+1)%2}))},odd:function(){return this.pushStack(x.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:r,sort:n.sort,splice:n.splice},x.extend=x.fn.extend=function(){var t,e,n,i,o,s,r=arguments[0]||{},a=1,l=arguments.length,c=!1;for("boolean"==typeof r&&(c=r,r=arguments[a]||{},a++),"object"==typeof r||p(r)||(r={}),a===l&&(r=this,a--);a<l;a++)if(null!=(t=arguments[a]))for(e in t)i=t[e],"__proto__"!==e&&r!==i&&(c&&i&&(x.isPlainObject(i)||(o=Array.isArray(i)))?(n=r[e],s=o&&!Array.isArray(n)?[]:o||x.isPlainObject(n)?n:{},o=!1,r[e]=x.extend(c,s,i)):void 0!==i&&(r[e]=i));return r},x.extend({expando:"jQuery"+(w+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=h.call(e,"constructor")&&e.constructor)&&d.call(n)===u)},isEmptyObject:function(t){var e;for(e in t)return!1;return!0},globalEval:function(t,e,n){b(t,{nonce:e&&e.nonce},n)},each:function(t,e){var n,i=0;if(C(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},text:function(t){var e,n="",i=0,o=t.nodeType;if(!o)for(;e=t[i++];)n+=x.text(e);return 1===o||11===o?t.textContent:9===o?t.documentElement.textContent:3===o||4===o?t.nodeValue:n},makeArray:function(t,e){var n=e||[];return null!=t&&(C(Object(t))?x.merge(n,"string"==typeof t?[t]:t):r.call(n,t)),n},inArray:function(t,e,n){return null==e?-1:a.call(e,t,n)},isXMLDoc:function(t){var e=t&&t.namespaceURI,n=t&&(t.ownerDocument||t).documentElement;return!$.test(e||n&&n.nodeName||"HTML")},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,s=t.length,r=!n;o<s;o++)!e(t[o],o)!==r&&i.push(t[o]);return i},map:function(t,e,n){var i,o,r=0,a=[];if(C(t))for(i=t.length;r<i;r++)null!=(o=e(t[r],r,n))&&a.push(o);else for(r in t)null!=(o=e(t[r],r,n))&&a.push(o);return s(a)},guid:1,support:f}),"function"==typeof Symbol&&(x.fn[Symbol.iterator]=n[Symbol.iterator]),x.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(t,e){l["[object "+e+"]"]=e.toLowerCase()});var T=n.pop,S=n.sort,k=n.splice,A="[\\x20\\t\\r\\n\\f]",I=new RegExp("^"+A+"+|((?:^|[^\\\\])(?:\\\\.)*)"+A+"+$","g");x.contains=function(t,e){var n=e&&e.parentNode;return t===n||!(!n||1!==n.nodeType||!(t.contains?t.contains(n):t.compareDocumentPosition&&16&t.compareDocumentPosition(n)))};var L=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g;function _(t,e){return e?"\0"===t?"�":t.slice(0,-1)+"\\"+t.charCodeAt(t.length-1).toString(16)+" ":"\\"+t}x.escapeSelector=function(t){return(t+"").replace(L,_)};var D=g,M=r;!function(){var e,i,s,r,l,c,d,u,p,m,g=M,v=x.expando,b=0,y=0,w=tt(),$=tt(),C=tt(),L=tt(),_=function(t,e){return t===e&&(l=!0),0},H="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",N="(?:\\\\[\\da-fA-F]{1,6}"+A+"?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+",O="\\["+A+"*("+N+")(?:"+A+"*([*^$|!~]?=)"+A+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+N+"))|)"+A+"*\\]",j=":("+N+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+O+")*)|.*)\\)|)",z=new RegExp(A+"+","g"),W=new RegExp("^"+A+"*,"+A+"*"),P=new RegExp("^"+A+"*([>+~]|"+A+")"+A+"*"),R=new RegExp(A+"|>"),q=new RegExp(j),F=new RegExp("^"+N+"$"),X={ID:new RegExp("^#("+N+")"),CLASS:new RegExp("^\\.("+N+")"),TAG:new RegExp("^("+N+"|[*])"),ATTR:new RegExp("^"+O),PSEUDO:new RegExp("^"+j),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+A+"*(even|odd|(([+-]|)(\\d*)n|)"+A+"*(?:([+-]|)"+A+"*(\\d+)|))"+A+"*\\)|)","i"),bool:new RegExp("^(?:"+H+")$","i"),needsContext:new RegExp("^"+A+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+A+"*((?:-\\d)?\\d*)"+A+"*\\)|)(?=[^-]|$)","i")},Y=/^(?:input|select|textarea|button)$/i,B=/^h\d$/i,U=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,Q=/[+~]/,K=new RegExp("\\\\[\\da-fA-F]{1,6}"+A+"?|\\\\([^\\r\\n\\f])","g"),V=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))},G=function(){lt()},J=ut(function(t){return!0===t.disabled&&E(t,"fieldset")},{dir:"parentNode",next:"legend"});try{g.apply(n=o.call(D.childNodes),D.childNodes),n[D.childNodes.length].nodeType}catch(t){g={apply:function(t,e){M.apply(t,o.call(e))},call:function(t){M.apply(t,o.call(arguments,1))}}}function Z(t,e,n,i){var o,s,r,a,l,h,d,m=e&&e.ownerDocument,b=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==b&&9!==b&&11!==b)return n;if(!i&&(lt(e),e=e||c,u)){if(11!==b&&(l=U.exec(t)))if(o=l[1]){if(9===b){if(!(r=e.getElementById(o)))return n;if(r.id===o)return g.call(n,r),n}else if(m&&(r=m.getElementById(o))&&Z.contains(e,r)&&r.id===o)return g.call(n,r),n}else{if(l[2])return g.apply(n,e.getElementsByTagName(t)),n;if((o=l[3])&&e.getElementsByClassName)return g.apply(n,e.getElementsByClassName(o)),n}if(!(L[t+" "]||p&&p.test(t))){if(d=t,m=e,1===b&&(R.test(t)||P.test(t))){for((m=Q.test(t)&&at(e.parentNode)||e)==e&&f.scope||((a=e.getAttribute("id"))?a=x.escapeSelector(a):e.setAttribute("id",a=v)),s=(h=ht(t)).length;s--;)h[s]=(a?"#"+a:":scope")+" "+dt(h[s]);d=h.join(",")}try{return g.apply(n,m.querySelectorAll(d)),n}catch(e){L(t,!0)}finally{a===v&&e.removeAttribute("id")}}}return bt(t.replace(I,"$1"),e,n,i)}function tt(){var t=[];return function e(n,o){return t.push(n+" ")>i.cacheLength&&delete e[t.shift()],e[n+" "]=o}}function et(t){return t[v]=!0,t}function nt(t){var e=c.createElement("fieldset");try{return!!t(e)}catch(t){return!1}finally{e.parentNode&&e.parentNode.removeChild(e),e=null}}function it(t){return function(e){return E(e,"input")&&e.type===t}}function ot(t){return function(e){return(E(e,"input")||E(e,"button"))&&e.type===t}}function st(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&&J(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function rt(t){return et(function(e){return e=+e,et(function(n,i){for(var o,s=t([],n.length,e),r=s.length;r--;)n[o=s[r]]&&(n[o]=!(i[o]=n[o]))})})}function at(t){return t&&"undefined"!=typeof t.getElementsByTagName&&t}function lt(t){var e,n=t?t.ownerDocument||t:D;return n!=c&&9===n.nodeType&&n.documentElement?(d=(c=n).documentElement,u=!x.isXMLDoc(c),m=d.matches||d.webkitMatchesSelector||d.msMatchesSelector,d.msMatchesSelector&&D!=c&&(e=c.defaultView)&&e.top!==e&&e.addEventListener("unload",G),f.getById=nt(function(t){return d.appendChild(t).id=x.expando,!c.getElementsByName||!c.getElementsByName(x.expando).length}),f.disconnectedMatch=nt(function(t){return m.call(t,"*")}),f.scope=nt(function(){return c.querySelectorAll(":scope")}),f.cssHas=nt(function(){try{return c.querySelector(":has(*,:jqfake)"),!1}catch(t){return!0}}),f.getById?(i.filter.ID=function(t){var e=t.replace(K,V);return function(t){return t.getAttribute("id")===e}},i.find.ID=function(t,e){if("undefined"!=typeof e.getElementById&&u){var n=e.getElementById(t);return n?[n]:[]}}):(i.filter.ID=function(t){var e=t.replace(K,V);return function(t){var n="undefined"!=typeof t.getAttributeNode&&t.getAttributeNode("id");return n&&n.value===e}},i.find.ID=function(t,e){if("undefined"!=typeof e.getElementById&&u){var n,i,o,s=e.getElementById(t);if(s){if((n=s.getAttributeNode("id"))&&n.value===t)return[s];for(o=e.getElementsByName(t),i=0;s=o[i++];)if((n=s.getAttributeNode("id"))&&n.value===t)return[s]}return[]}}),i.find.TAG=function(t,e){return"undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t):e.querySelectorAll(t)},i.find.CLASS=function(t,e){if("undefined"!=typeof e.getElementsByClassName&&u)return e.getElementsByClassName(t)},p=[],nt(function(t){var e;d.appendChild(t).innerHTML="<a id='"+v+"' href='' disabled='disabled'></a><select id='"+v+"-\r\\' disabled='disabled'><option selected=''></option></select>",t.querySelectorAll("[selected]").length||p.push("\\["+A+"*(?:value|"+H+")"),t.querySelectorAll("[id~="+v+"-]").length||p.push("~="),t.querySelectorAll("a#"+v+"+*").length||p.push(".#.+[+~]"),t.querySelectorAll(":checked").length||p.push(":checked"),(e=c.createElement("input")).setAttribute("type","hidden"),t.appendChild(e).setAttribute("name","D"),d.appendChild(t).disabled=!0,2!==t.querySelectorAll(":disabled").length&&p.push(":enabled",":disabled"),(e=c.createElement("input")).setAttribute("name",""),t.appendChild(e),t.querySelectorAll("[name='']").length||p.push("\\["+A+"*name"+A+"*="+A+"*(?:''|\"\")")}),f.cssHas||p.push(":has"),p=p.length&&new RegExp(p.join("|")),_=function(t,e){if(t===e)return l=!0,0;var n=!t.compareDocumentPosition-!e.compareDocumentPosition;return n||(1&(n=(t.ownerDocument||t)==(e.ownerDocument||e)?t.compareDocumentPosition(e):1)||!f.sortDetached&&e.compareDocumentPosition(t)===n?t===c||t.ownerDocument==D&&Z.contains(D,t)?-1:e===c||e.ownerDocument==D&&Z.contains(D,e)?1:r?a.call(r,t)-a.call(r,e):0:4&n?-1:1)},c):c}for(e in Z.matches=function(t,e){return Z(t,null,null,e)},Z.matchesSelector=function(t,e){if(lt(t),u&&!L[e+" "]&&(!p||!p.test(e)))try{var n=m.call(t,e);if(n||f.disconnectedMatch||t.document&&11!==t.document.nodeType)return n}catch(t){L(e,!0)}return Z(e,c,null,[t]).length>0},Z.contains=function(t,e){return(t.ownerDocument||t)!=c&<(t),x.contains(t,e)},Z.attr=function(t,e){(t.ownerDocument||t)!=c&<(t);var n=i.attrHandle[e.toLowerCase()],o=n&&h.call(i.attrHandle,e.toLowerCase())?n(t,e,!u):void 0;return void 0!==o?o:t.getAttribute(e)},Z.error=function(t){throw new Error("Syntax error, unrecognized expression: "+t)},x.uniqueSort=function(t){var e,n=[],i=0,s=0;if(l=!f.sortStable,r=!f.sortStable&&o.call(t,0),S.call(t,_),l){for(;e=t[s++];)e===t[s]&&(i=n.push(s));for(;i--;)k.call(t,n[i],1)}return r=null,t},x.fn.uniqueSort=function(){return this.pushStack(x.uniqueSort(o.apply(this)))},i=x.expr={cacheLength:50,createPseudo:et,match:X,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(t){return t[1]=t[1].replace(K,V),t[3]=(t[3]||t[4]||t[5]||"").replace(K,V),"~="===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]||Z.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]&&Z.error(t[0]),t},PSEUDO:function(t){var e,n=!t[6]&&t[2];return X.CHILD.test(t[0])?null:(t[3]?t[2]=t[4]||t[5]||"":n&&q.test(n)&&(e=ht(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(K,V).toLowerCase();return"*"===t?function(){return!0}:function(t){return E(t,e)}},CLASS:function(t){var e=w[t+" "];return e||(e=new RegExp("(^|"+A+")"+t+"("+A+"|$)"))&&w(t,function(t){return e.test("string"==typeof t.className&&t.className||"undefined"!=typeof t.getAttribute&&t.getAttribute("class")||"")})},ATTR:function(t,e,n){return function(i){var o=Z.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(z," ")+" ").indexOf(n)>-1:"|="===e&&(o===n||o.slice(0,n.length+1)===n+"-"))}},CHILD:function(t,e,n,i,o){var s="nth"!==t.slice(0,3),r="last"!==t.slice(-4),a="of-type"===e;return 1===i&&0===o?function(t){return!!t.parentNode}:function(e,n,l){var c,h,d,u,f,p=s!==r?"nextSibling":"previousSibling",m=e.parentNode,g=a&&e.nodeName.toLowerCase(),y=!l&&!a,w=!1;if(m){if(s){for(;p;){for(d=e;d=d[p];)if(a?E(d,g):1===d.nodeType)return!1;f=p="only"===t&&!f&&"nextSibling"}return!0}if(f=[r?m.firstChild:m.lastChild],r&&y){for(w=(u=(c=(h=m[v]||(m[v]={}))[t]||[])[0]===b&&c[1])&&c[2],d=u&&m.childNodes[u];d=++u&&d&&d[p]||(w=u=0)||f.pop();)if(1===d.nodeType&&++w&&d===e){h[t]=[b,u,w];break}}else if(y&&(w=u=(c=(h=e[v]||(e[v]={}))[t]||[])[0]===b&&c[1]),!1===w)for(;(d=++u&&d&&d[p]||(w=u=0)||f.pop())&&(!(a?E(d,g):1===d.nodeType)||!++w||(y&&((h=d[v]||(d[v]={}))[t]=[b,w]),d!==e)););return(w-=o)===i||w%i===0&&w/i>=0}}},PSEUDO:function(t,e){var n,o=i.pseudos[t]||i.setFilters[t.toLowerCase()]||Z.error("unsupported pseudo: "+t);return o[v]?o(e):o.length>1?(n=[t,t,"",e],i.setFilters.hasOwnProperty(t.toLowerCase())?et(function(t,n){for(var i,s=o(t,e),r=s.length;r--;)t[i=a.call(t,s[r])]=!(n[i]=s[r])}):function(t){return o(t,0,n)}):o}},pseudos:{not:et(function(t){var e=[],n=[],i=vt(t.replace(I,"$1"));return i[v]?et(function(t,e,n,o){for(var s,r=i(t,null,o,[]),a=t.length;a--;)(s=r[a])&&(t[a]=!(e[a]=s))}):function(t,o,s){return e[0]=t,i(e,null,s,n),e[0]=null,!n.pop()}}),has:et(function(t){return function(e){return Z(t,e).length>0}}),contains:et(function(t){return t=t.replace(K,V),function(e){return(e.textContent||x.text(e)).indexOf(t)>-1}}),lang:et(function(t){return F.test(t||"")||Z.error("unsupported lang: "+t),t=t.replace(K,V).toLowerCase(),function(e){var n;do{if(n=u?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===function(){try{return c.activeElement}catch(t){}}()&&c.hasFocus()&&!!(t.type||t.href||~t.tabIndex)},enabled:st(!1),disabled:st(!0),checked:function(t){return E(t,"input")&&!!t.checked||E(t,"option")&&!!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 B.test(t.nodeName)},input:function(t){return Y.test(t.nodeName)},button:function(t){return E(t,"input")&&"button"===t.type||E(t,"button")},text:function(t){var e;return E(t,"input")&&"text"===t.type&&(null==(e=t.getAttribute("type"))||"text"===e.toLowerCase())},first:rt(function(){return[0]}),last:rt(function(t,e){return[e-1]}),eq:rt(function(t,e,n){return[n<0?n+e:n]}),even:rt(function(t,e){for(var n=0;n<e;n+=2)t.push(n);return t}),odd:rt(function(t,e){for(var n=1;n<e;n+=2)t.push(n);return t}),lt:rt(function(t,e,n){var i;for(i=n<0?n+e:n>e?e:n;--i>=0;)t.push(i);return t}),gt:rt(function(t,e,n){for(var i=n<0?n+e:n;++i<e;)t.push(i);return t})}},i.pseudos.nth=i.pseudos.eq,{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})i.pseudos[e]=it(e);for(e in{submit:!0,reset:!0})i.pseudos[e]=ot(e);function ct(){}function ht(t,e){var n,o,s,r,a,l,c,h=$[t+" "];if(h)return e?0:h.slice(0);for(a=t,l=[],c=i.preFilter;a;){for(r in n&&!(o=W.exec(a))||(o&&(a=a.slice(o[0].length)||a),l.push(s=[])),n=!1,(o=P.exec(a))&&(n=o.shift(),s.push({value:n,type:o[0].replace(I," ")}),a=a.slice(n.length)),i.filter)!(o=X[r].exec(a))||c[r]&&!(o=c[r](o))||(n=o.shift(),s.push({value:n,type:r,matches:o}),a=a.slice(n.length));if(!n)break}return e?a.length:a?Z.error(t):$(t,l).slice(0)}function dt(t){for(var e=0,n=t.length,i="";e<n;e++)i+=t[e].value;return i}function ut(t,e,n){var i=e.dir,o=e.next,s=o||i,r=n&&"parentNode"===s,a=y++;return e.first?function(e,n,o){for(;e=e[i];)if(1===e.nodeType||r)return t(e,n,o);return!1}:function(e,n,l){var c,h,d=[b,a];if(l){for(;e=e[i];)if((1===e.nodeType||r)&&t(e,n,l))return!0}else for(;e=e[i];)if(1===e.nodeType||r)if(h=e[v]||(e[v]={}),o&&E(e,o))e=e[i]||e;else{if((c=h[s])&&c[0]===b&&c[1]===a)return d[2]=c[2];if(h[s]=d,d[2]=t(e,n,l))return!0}return!1}}function ft(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 pt(t,e,n,i,o){for(var s,r=[],a=0,l=t.length,c=null!=e;a<l;a++)(s=t[a])&&(n&&!n(s,i,o)||(r.push(s),c&&e.push(a)));return r}function mt(t,e,n,i,o,s){return i&&!i[v]&&(i=mt(i)),o&&!o[v]&&(o=mt(o,s)),et(function(s,r,l,c){var h,d,u,f,p=[],m=[],v=r.length,b=s||function(t,e,n){for(var i=0,o=e.length;i<o;i++)Z(t,e[i],n);return n}(e||"*",l.nodeType?[l]:l,[]),y=!t||!s&&e?b:pt(b,p,t,l,c);if(n?n(y,f=o||(s?t:v||i)?[]:r,l,c):f=y,i)for(h=pt(f,m),i(h,[],l,c),d=h.length;d--;)(u=h[d])&&(f[m[d]]=!(y[m[d]]=u));if(s){if(o||t){if(o){for(h=[],d=f.length;d--;)(u=f[d])&&h.push(y[d]=u);o(null,f=[],h,c)}for(d=f.length;d--;)(u=f[d])&&(h=o?a.call(s,u):p[d])>-1&&(s[h]=!(r[h]=u))}}else f=pt(f===r?f.splice(v,f.length):f),o?o(null,r,f,c):g.apply(r,f)})}function gt(t){for(var e,n,o,r=t.length,l=i.relative[t[0].type],c=l||i.relative[" "],h=l?1:0,d=ut(function(t){return t===e},c,!0),u=ut(function(t){return a.call(e,t)>-1},c,!0),f=[function(t,n,i){var o=!l&&(i||n!=s)||((e=n).nodeType?d(t,n,i):u(t,n,i));return e=null,o}];h<r;h++)if(n=i.relative[t[h].type])f=[ut(ft(f),n)];else{if((n=i.filter[t[h].type].apply(null,t[h].matches))[v]){for(o=++h;o<r&&!i.relative[t[o].type];o++);return mt(h>1&&ft(f),h>1&&dt(t.slice(0,h-1).concat({value:" "===t[h-2].type?"*":""})).replace(I,"$1"),n,h<o&>(t.slice(h,o)),o<r&>(t=t.slice(o)),o<r&&dt(t))}f.push(n)}return ft(f)}function vt(t,e){var n,o=[],r=[],a=C[t+" "];if(!a){for(e||(e=ht(t)),n=e.length;n--;)(a=gt(e[n]))[v]?o.push(a):r.push(a);a=C(t,function(t,e){var n=e.length>0,o=t.length>0,r=function(r,a,l,h,d){var f,p,m,v=0,y="0",w=r&&[],$=[],C=s,E=r||o&&i.find.TAG("*",d),S=b+=null==C?1:Math.random()||.1,k=E.length;for(d&&(s=a==c||a||d);y!==k&&null!=(f=E[y]);y++){if(o&&f){for(p=0,a||f.ownerDocument==c||(lt(f),l=!u);m=t[p++];)if(m(f,a||c,l)){g.call(h,f);break}d&&(b=S)}n&&((f=!m&&f)&&v--,r&&w.push(f))}if(v+=y,n&&y!==v){for(p=0;m=e[p++];)m(w,$,a,l);if(r){if(v>0)for(;y--;)w[y]||$[y]||($[y]=T.call(h));$=pt($)}g.apply(h,$),d&&!r&&$.length>0&&v+e.length>1&&x.uniqueSort(h)}return d&&(b=S,s=C),w};return n?et(r):r}(r,o)),a.selector=t}return a}function bt(t,e,n,o){var s,r,a,l,c,h="function"==typeof t&&t,d=!o&&ht(t=h.selector||t);if(n=n||[],1===d.length){if((r=d[0]=d[0].slice(0)).length>2&&"ID"===(a=r[0]).type&&9===e.nodeType&&u&&i.relative[r[1].type]){if(!(e=(i.find.ID(a.matches[0].replace(K,V),e)||[])[0]))return n;h&&(e=e.parentNode),t=t.slice(r.shift().value.length)}for(s=X.needsContext.test(t)?0:r.length;s--&&(a=r[s],!i.relative[l=a.type]);)if((c=i.find[l])&&(o=c(a.matches[0].replace(K,V),Q.test(r[0].type)&&at(e.parentNode)||e))){if(r.splice(s,1),!(t=o.length&&dt(r)))return g.apply(n,o),n;break}}return(h||vt(t,d))(o,e,!u,n,!e||Q.test(t)&&at(e.parentNode)||e),n}ct.prototype=i.filters=i.pseudos,i.setFilters=new ct,f.sortStable=v.split("").sort(_).join("")===v,lt(),f.sortDetached=nt(function(t){return 1&t.compareDocumentPosition(c.createElement("fieldset"))}),x.find=Z,x.expr[":"]=x.expr.pseudos,x.unique=x.uniqueSort,Z.compile=vt,Z.select=bt,Z.setDocument=lt,Z.tokenize=ht,Z.escape=x.escapeSelector,Z.getText=x.text,Z.isXML=x.isXMLDoc,Z.selectors=x.expr,Z.support=x.support,Z.uniqueSort=x.uniqueSort}();var H=function(t,e,n){for(var i=[],o=void 0!==n;(t=t[e])&&9!==t.nodeType;)if(1===t.nodeType){if(o&&x(t).is(n))break;i.push(t)}return i},N=function(t,e){for(var n=[];t;t=t.nextSibling)1===t.nodeType&&t!==e&&n.push(t);return n},O=x.expr.match.needsContext,j=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function z(t,e,n){return p(e)?x.grep(t,function(t,i){return!!e.call(t,i,t)!==n}):e.nodeType?x.grep(t,function(t){return t===e!==n}):"string"!=typeof e?x.grep(t,function(t){return a.call(e,t)>-1!==n}):x.filter(e,t,n)}x.filter=function(t,e,n){var i=e[0];return n&&(t=":not("+t+")"),1===e.length&&1===i.nodeType?x.find.matchesSelector(i,t)?[i]:[]:x.find.matches(t,x.grep(e,function(t){return 1===t.nodeType}))},x.fn.extend({find:function(t){var e,n,i=this.length,o=this;if("string"!=typeof t)return this.pushStack(x(t).filter(function(){for(e=0;e<i;e++)if(x.contains(o[e],this))return!0}));for(n=this.pushStack([]),e=0;e<i;e++)x.find(t,o[e],n);return i>1?x.uniqueSort(n):n},filter:function(t){return this.pushStack(z(this,t||[],!1))},not:function(t){return this.pushStack(z(this,t||[],!0))},is:function(t){return!!z(this,"string"==typeof t&&O.test(t)?x(t):t||[],!1).length}});var W,P=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(x.fn.init=function(t,e,n){var i,o;if(!t)return this;if(n=n||W,"string"==typeof t){if(!(i="<"===t[0]&&">"===t[t.length-1]&&t.length>=3?[null,t,null]:P.exec(t))||!i[1]&&e)return!e||e.jquery?(e||n).find(t):this.constructor(e).find(t);if(i[1]){if(e=e instanceof x?e[0]:e,x.merge(this,x.parseHTML(i[1],e&&e.nodeType?e.ownerDocument||e:g,!0)),j.test(i[1])&&x.isPlainObject(e))for(i in e)p(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):p(t)?void 0!==n.ready?n.ready(t):t(x):x.makeArray(t,this)}).prototype=x.fn,W=x(g);var R=/^(?:parents|prev(?:Until|All))/,q={children:!0,contents:!0,next:!0,prev:!0};function F(t,e){for(;(t=t[e])&&1!==t.nodeType;);return t}x.fn.extend({has:function(t){var e=x(t,this),n=e.length;return this.filter(function(){for(var t=0;t<n;t++)if(x.contains(this,e[t]))return!0})},closest:function(t,e){var n,i=0,o=this.length,s=[],r="string"!=typeof t&&x(t);if(!O.test(t))for(;i<o;i++)for(n=this[i];n&&n!==e;n=n.parentNode)if(n.nodeType<11&&(r?r.index(n)>-1:1===n.nodeType&&x.find.matchesSelector(n,t))){s.push(n);break}return this.pushStack(s.length>1?x.uniqueSort(s):s)},index:function(t){return t?"string"==typeof t?a.call(x(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(x.uniqueSort(x.merge(this.get(),x(t,e))))},addBack:function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}}),x.each({parent:function(t){var e=t.parentNode;return e&&11!==e.nodeType?e:null},parents:function(t){return H(t,"parentNode")},parentsUntil:function(t,e,n){return H(t,"parentNode",n)},next:function(t){return F(t,"nextSibling")},prev:function(t){return F(t,"previousSibling")},nextAll:function(t){return H(t,"nextSibling")},prevAll:function(t){return H(t,"previousSibling")},nextUntil:function(t,e,n){return H(t,"nextSibling",n)},prevUntil:function(t,e,n){return H(t,"previousSibling",n)},siblings:function(t){return N((t.parentNode||{}).firstChild,t)},children:function(t){return N(t.firstChild)},contents:function(t){return null!=t.contentDocument&&i(t.contentDocument)?t.contentDocument:(E(t,"template")&&(t=t.content||t),x.merge([],t.childNodes))}},function(t,e){x.fn[t]=function(n,i){var o=x.map(this,e,n);return"Until"!==t.slice(-5)&&(i=n),i&&"string"==typeof i&&(o=x.filter(i,o)),this.length>1&&(q[t]||x.uniqueSort(o),R.test(t)&&o.reverse()),this.pushStack(o)}});var X=/[^\x20\t\r\n\f]+/g;function Y(t){return t}function B(t){throw t}function U(t,e,n,i){var o;try{t&&p(o=t.promise)?o.call(t).done(e).fail(n):t&&p(o=t.then)?o.call(t,e,n):e.apply(void 0,[t].slice(i))}catch(t){n.apply(void 0,[t])}}x.Callbacks=function(t){t="string"==typeof t?function(t){var e={};return x.each(t.match(X)||[],function(t,n){e[n]=!0}),e}(t):x.extend({},t);var e,n,i,o,s=[],r=[],a=-1,l=function(){for(o=o||t.once,i=e=!0;r.length;a=-1)for(n=r.shift();++a<s.length;)!1===s[a].apply(n[0],n[1])&&t.stopOnFalse&&(a=s.length,n=!1);t.memory||(n=!1),e=!1,o&&(s=n?[]:"")},c={add:function(){return s&&(n&&!e&&(a=s.length-1,r.push(n)),function e(n){x.each(n,function(n,i){p(i)?t.unique&&c.has(i)||s.push(i):i&&i.length&&"string"!==y(i)&&e(i)})}(arguments),n&&!e&&l()),this},remove:function(){return x.each(arguments,function(t,e){for(var n;(n=x.inArray(e,s,n))>-1;)s.splice(n,1),n<=a&&a--}),this},has:function(t){return t?x.inArray(t,s)>-1:s.length>0},empty:function(){return s&&(s=[]),this},disable:function(){return o=r=[],s=n="",this},disabled:function(){return!s},lock:function(){return o=r=[],n||e||(s=n=""),this},locked:function(){return!!o},fireWith:function(t,n){return o||(n=[t,(n=n||[]).slice?n.slice():n],r.push(n),e||l()),this},fire:function(){return c.fireWith(this,arguments),this},fired:function(){return!!i}};return c},x.extend({Deferred:function(e){var n=[["notify","progress",x.Callbacks("memory"),x.Callbacks("memory"),2],["resolve","done",x.Callbacks("once memory"),x.Callbacks("once memory"),0,"resolved"],["reject","fail",x.Callbacks("once memory"),x.Callbacks("once memory"),1,"rejected"]],i="pending",o={state:function(){return i},always:function(){return s.done(arguments).fail(arguments),this},catch:function(t){return o.then(null,t)},pipe:function(){var t=arguments;return x.Deferred(function(e){x.each(n,function(n,i){var o=p(t[i[4]])&&t[i[4]];s[i[1]](function(){var t=o&&o.apply(this,arguments);t&&p(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 s=0;function r(e,n,i,o){return function(){var a=this,l=arguments,c=function(){var t,c;if(!(e<s)){if((t=i.apply(a,l))===n.promise())throw new TypeError("Thenable self-resolution");c=t&&("object"==typeof t||"function"==typeof t)&&t.then,p(c)?o?c.call(t,r(s,n,Y,o),r(s,n,B,o)):(s++,c.call(t,r(s,n,Y,o),r(s,n,B,o),r(s,n,Y,n.notifyWith))):(i!==Y&&(a=void 0,l=[t]),(o||n.resolveWith)(a,l))}},h=o?c:function(){try{c()}catch(t){x.Deferred.exceptionHook&&x.Deferred.exceptionHook(t,h.error),e+1>=s&&(i!==B&&(a=void 0,l=[t]),n.rejectWith(a,l))}};e?h():(x.Deferred.getErrorHook?h.error=x.Deferred.getErrorHook():x.Deferred.getStackHook&&(h.error=x.Deferred.getStackHook()),t.setTimeout(h))}}return x.Deferred(function(t){n[0][3].add(r(0,t,p(o)?o:Y,t.notifyWith)),n[1][3].add(r(0,t,p(e)?e:Y)),n[2][3].add(r(0,t,p(i)?i:B))}).promise()},promise:function(t){return null!=t?x.extend(t,o):o}},s={};return x.each(n,function(t,e){var r=e[2],a=e[5];o[e[1]]=r.add,a&&r.add(function(){i=a},n[3-t][2].disable,n[3-t][3].disable,n[0][2].lock,n[0][3].lock),r.add(e[3].fire),s[e[0]]=function(){return s[e[0]+"With"](this===s?void 0:this,arguments),this},s[e[0]+"With"]=r.fireWith}),o.promise(s),e&&e.call(s,s),s},when:function(t){var e=arguments.length,n=e,i=Array(n),s=o.call(arguments),r=x.Deferred(),a=function(t){return function(n){i[t]=this,s[t]=arguments.length>1?o.call(arguments):n,--e||r.resolveWith(i,s)}};if(e<=1&&(U(t,r.done(a(n)).resolve,r.reject,!e),"pending"===r.state()||p(s[n]&&s[n].then)))return r.then();for(;n--;)U(s[n],a(n),r.reject);return r.promise()}});var Q=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;x.Deferred.exceptionHook=function(e,n){t.console&&t.console.warn&&e&&Q.test(e.name)&&t.console.warn("jQuery.Deferred exception: "+e.message,e.stack,n)},x.readyException=function(e){t.setTimeout(function(){throw e})};var K=x.Deferred();function V(){g.removeEventListener("DOMContentLoaded",V),t.removeEventListener("load",V),x.ready()}x.fn.ready=function(t){return K.then(t).catch(function(t){x.readyException(t)}),this},x.extend({isReady:!1,readyWait:1,ready:function(t){(!0===t?--x.readyWait:x.isReady)||(x.isReady=!0,!0!==t&&--x.readyWait>0||K.resolveWith(g,[x]))}}),x.ready.then=K.then,"complete"===g.readyState||"loading"!==g.readyState&&!g.documentElement.doScroll?t.setTimeout(x.ready):(g.addEventListener("DOMContentLoaded",V),t.addEventListener("load",V));var G=function(t,e,n,i,o,s,r){var a=0,l=t.length,c=null==n;if("object"===y(n))for(a in o=!0,n)G(t,e,a,n[a],!0,s,r);else if(void 0!==i&&(o=!0,p(i)||(r=!0),c&&(r?(e.call(t,i),e=null):(c=e,e=function(t,e,n){return c.call(x(t),n)})),e))for(;a<l;a++)e(t[a],n,r?i:i.call(t[a],a,e(t[a],n)));return o?t:c?e.call(t):l?e(t[0],n):s},J=/^-ms-/,Z=/-([a-z])/g;function tt(t,e){return e.toUpperCase()}function et(t){return t.replace(J,"ms-").replace(Z,tt)}var nt=function(t){return 1===t.nodeType||9===t.nodeType||!+t.nodeType};function it(){this.expando=x.expando+it.uid++}it.uid=1,it.prototype={cache:function(t){var e=t[this.expando];return e||(e={},nt(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[et(e)]=n;else for(i in e)o[et(i)]=e[i];return o},get:function(t,e){return void 0===e?this.cache(t):t[this.expando]&&t[this.expando][et(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(et):(e=et(e))in i?[e]:e.match(X)||[]).length;for(;n--;)delete i[e[n]]}(void 0===e||x.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&&!x.isEmptyObject(e)}};var ot=new it,st=new it,rt=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,at=/[A-Z]/g;function lt(t,e,n){var i;if(void 0===n&&1===t.nodeType)if(i="data-"+e.replace(at,"-$&").toLowerCase(),"string"==typeof(n=t.getAttribute(i))){try{n=function(t){return"true"===t||"false"!==t&&("null"===t?null:t===+t+""?+t:rt.test(t)?JSON.parse(t):t)}(n)}catch(t){}st.set(t,e,n)}else n=void 0;return n}x.extend({hasData:function(t){return st.hasData(t)||ot.hasData(t)},data:function(t,e,n){return st.access(t,e,n)},removeData:function(t,e){st.remove(t,e)},_data:function(t,e,n){return ot.access(t,e,n)},_removeData:function(t,e){ot.remove(t,e)}}),x.fn.extend({data:function(t,e){var n,i,o,s=this[0],r=s&&s.attributes;if(void 0===t){if(this.length&&(o=st.get(s),1===s.nodeType&&!ot.get(s,"hasDataAttrs"))){for(n=r.length;n--;)r[n]&&0===(i=r[n].name).indexOf("data-")&&(i=et(i.slice(5)),lt(s,i,o[i]));ot.set(s,"hasDataAttrs",!0)}return o}return"object"==typeof t?this.each(function(){st.set(this,t)}):G(this,function(e){var n;if(s&&void 0===e)return void 0!==(n=st.get(s,t))||void 0!==(n=lt(s,t))?n:void 0;this.each(function(){st.set(this,t,e)})},null,e,arguments.length>1,null,!0)},removeData:function(t){return this.each(function(){st.remove(this,t)})}}),x.extend({queue:function(t,e,n){var i;if(t)return e=(e||"fx")+"queue",i=ot.get(t,e),n&&(!i||Array.isArray(n)?i=ot.access(t,e,x.makeArray(n)):i.push(n)),i||[]},dequeue:function(t,e){e=e||"fx";var n=x.queue(t,e),i=n.length,o=n.shift(),s=x._queueHooks(t,e);"inprogress"===o&&(o=n.shift(),i--),o&&("fx"===e&&n.unshift("inprogress"),delete s.stop,o.call(t,function(){x.dequeue(t,e)},s)),!i&&s&&s.empty.fire()},_queueHooks:function(t,e){var n=e+"queueHooks";return ot.get(t,n)||ot.access(t,n,{empty:x.Callbacks("once memory").add(function(){ot.remove(t,[e+"queue",n])})})}}),x.fn.extend({queue:function(t,e){var n=2;return"string"!=typeof t&&(e=t,t="fx",n--),arguments.length<n?x.queue(this[0],t):void 0===e?this:this.each(function(){var n=x.queue(this,t,e);x._queueHooks(this,t),"fx"===t&&"inprogress"!==n[0]&&x.dequeue(this,t)})},dequeue:function(t){return this.each(function(){x.dequeue(this,t)})},clearQueue:function(t){return this.queue(t||"fx",[])},promise:function(t,e){var n,i=1,o=x.Deferred(),s=this,r=this.length,a=function(){--i||o.resolveWith(s,[s])};for("string"!=typeof t&&(e=t,t=void 0),t=t||"fx";r--;)(n=ot.get(s[r],t+"queueHooks"))&&n.empty&&(i++,n.empty.add(a));return a(),o.promise(e)}});var ct=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,ht=new RegExp("^(?:([+-])=|)("+ct+")([a-z%]*)$","i"),dt=["Top","Right","Bottom","Left"],ut=g.documentElement,ft=function(t){return x.contains(t.ownerDocument,t)},pt={composed:!0};ut.getRootNode&&(ft=function(t){return x.contains(t.ownerDocument,t)||t.getRootNode(pt)===t.ownerDocument});var mt=function(t,e){return"none"===(t=e||t).style.display||""===t.style.display&&ft(t)&&"none"===x.css(t,"display")};function gt(t,e,n,i){var o,s,r=20,a=i?function(){return i.cur()}:function(){return x.css(t,e,"")},l=a(),c=n&&n[3]||(x.cssNumber[e]?"":"px"),h=t.nodeType&&(x.cssNumber[e]||"px"!==c&&+l)&&ht.exec(x.css(t,e));if(h&&h[3]!==c){for(l/=2,c=c||h[3],h=+l||1;r--;)x.style(t,e,h+c),(1-s)*(1-(s=a()/l||.5))<=0&&(r=0),h/=s;h*=2,x.style(t,e,h+c),n=n||[]}return n&&(h=+h||+l||0,o=n[1]?h+(n[1]+1)*n[2]:+n[2],i&&(i.unit=c,i.start=h,i.end=o)),o}var vt={};function bt(t){var e,n=t.ownerDocument,i=t.nodeName,o=vt[i];return o||(e=n.body.appendChild(n.createElement(i)),o=x.css(e,"display"),e.parentNode.removeChild(e),"none"===o&&(o="block"),vt[i]=o,o)}function yt(t,e){for(var n,i,o=[],s=0,r=t.length;s<r;s++)(i=t[s]).style&&(n=i.style.display,e?("none"===n&&(o[s]=ot.get(i,"display")||null,o[s]||(i.style.display="")),""===i.style.display&&mt(i)&&(o[s]=bt(i))):"none"!==n&&(o[s]="none",ot.set(i,"display",n)));for(s=0;s<r;s++)null!=o[s]&&(t[s].style.display=o[s]);return t}x.fn.extend({show:function(){return yt(this,!0)},hide:function(){return yt(this)},toggle:function(t){return"boolean"==typeof t?t?this.show():this.hide():this.each(function(){mt(this)?x(this).show():x(this).hide()})}});var wt=/^(?:checkbox|radio)$/i,$t=/<([a-z][^\/\0>\x20\t\r\n\f]*)/i,xt=/^$|^module$|\/(?:java|ecma)script/i;!function(){var t=g.createDocumentFragment().appendChild(g.createElement("div")),e=g.createElement("input");e.setAttribute("type","radio"),e.setAttribute("checked","checked"),e.setAttribute("name","t"),t.appendChild(e),f.checkClone=t.cloneNode(!0).cloneNode(!0).lastChild.checked,t.innerHTML="<textarea>x</textarea>",f.noCloneChecked=!!t.cloneNode(!0).lastChild.defaultValue,t.innerHTML="<option></option>",f.option=!!t.lastChild}();var Ct={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 Et(t,e){var n;return n="undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e||"*"):"undefined"!=typeof t.querySelectorAll?t.querySelectorAll(e||"*"):[],void 0===e||e&&E(t,e)?x.merge([t],n):n}function Tt(t,e){for(var n=0,i=t.length;n<i;n++)ot.set(t[n],"globalEval",!e||ot.get(e[n],"globalEval"))}Ct.tbody=Ct.tfoot=Ct.colgroup=Ct.caption=Ct.thead,Ct.th=Ct.td,f.option||(Ct.optgroup=Ct.option=[1,"<select multiple='multiple'>","</select>"]);var St=/<|&#?\w+;/;function kt(t,e,n,i,o){for(var s,r,a,l,c,h,d=e.createDocumentFragment(),u=[],f=0,p=t.length;f<p;f++)if((s=t[f])||0===s)if("object"===y(s))x.merge(u,s.nodeType?[s]:s);else if(St.test(s)){for(r=r||d.appendChild(e.createElement("div")),a=($t.exec(s)||["",""])[1].toLowerCase(),l=Ct[a]||Ct._default,r.innerHTML=l[1]+x.htmlPrefilter(s)+l[2],h=l[0];h--;)r=r.lastChild;x.merge(u,r.childNodes),(r=d.firstChild).textContent=""}else u.push(e.createTextNode(s));for(d.textContent="",f=0;s=u[f++];)if(i&&x.inArray(s,i)>-1)o&&o.push(s);else if(c=ft(s),r=Et(d.appendChild(s),"script"),c&&Tt(r),n)for(h=0;s=r[h++];)xt.test(s.type||"")&&n.push(s);return d}var At=/^([^.]*)(?:\.(.+)|)/;function It(){return!0}function Lt(){return!1}function _t(t,e,n,i,o,s){var r,a;if("object"==typeof e){for(a in"string"!=typeof n&&(i=i||n,n=void 0),e)_t(t,a,n,i,e[a],s);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=Lt;else if(!o)return t;return 1===s&&(r=o,o=function(t){return x().off(t),r.apply(this,arguments)},o.guid=r.guid||(r.guid=x.guid++)),t.each(function(){x.event.add(this,e,o,i,n)})}function Dt(t,e,n){n?(ot.set(t,e,!1),x.event.add(t,e,{namespace:!1,handler:function(t){var n,i=ot.get(this,e);if(1&t.isTrigger&&this[e]){if(i)(x.event.special[e]||{}).delegateType&&t.stopPropagation();else if(i=o.call(arguments),ot.set(this,e,i),this[e](),n=ot.get(this,e),ot.set(this,e,!1),i!==n)return t.stopImmediatePropagation(),t.preventDefault(),n}else i&&(ot.set(this,e,x.event.trigger(i[0],i.slice(1),this)),t.stopPropagation(),t.isImmediatePropagationStopped=It)}})):void 0===ot.get(t,e)&&x.event.add(t,e,It)}x.event={global:{},add:function(t,e,n,i,o){var s,r,a,l,c,h,d,u,f,p,m,g=ot.get(t);if(nt(t))for(n.handler&&(n=(s=n).handler,o=s.selector),o&&x.find.matchesSelector(ut,o),n.guid||(n.guid=x.guid++),(l=g.events)||(l=g.events=Object.create(null)),(r=g.handle)||(r=g.handle=function(e){return"undefined"!=typeof x&&x.event.triggered!==e.type?x.event.dispatch.apply(t,arguments):void 0}),c=(e=(e||"").match(X)||[""]).length;c--;)f=m=(a=At.exec(e[c])||[])[1],p=(a[2]||"").split(".").sort(),f&&(d=x.event.special[f]||{},f=(o?d.delegateType:d.bindType)||f,d=x.event.special[f]||{},h=x.extend({type:f,origType:m,data:i,handler:n,guid:n.guid,selector:o,needsContext:o&&x.expr.match.needsContext.test(o),namespace:p.join(".")},s),(u=l[f])||((u=l[f]=[]).delegateCount=0,d.setup&&!1!==d.setup.call(t,i,p,r)||t.addEventListener&&t.addEventListener(f,r)),d.add&&(d.add.call(t,h),h.handler.guid||(h.handler.guid=n.guid)),o?u.splice(u.delegateCount++,0,h):u.push(h),x.event.global[f]=!0)},remove:function(t,e,n,i,o){var s,r,a,l,c,h,d,u,f,p,m,g=ot.hasData(t)&&ot.get(t);if(g&&(l=g.events)){for(c=(e=(e||"").match(X)||[""]).length;c--;)if(f=m=(a=At.exec(e[c])||[])[1],p=(a[2]||"").split(".").sort(),f){for(d=x.event.special[f]||{},u=l[f=(i?d.delegateType:d.bindType)||f]||[],a=a[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),r=s=u.length;s--;)h=u[s],!o&&m!==h.origType||n&&n.guid!==h.guid||a&&!a.test(h.namespace)||i&&i!==h.selector&&("**"!==i||!h.selector)||(u.splice(s,1),h.selector&&u.delegateCount--,d.remove&&d.remove.call(t,h));r&&!u.length&&(d.teardown&&!1!==d.teardown.call(t,p,g.handle)||x.removeEvent(t,f,g.handle),delete l[f])}else for(f in l)x.event.remove(t,f+e[c],n,i,!0);x.isEmptyObject(l)&&ot.remove(t,"handle events")}},dispatch:function(t){var e,n,i,o,s,r,a=new Array(arguments.length),l=x.event.fix(t),c=(ot.get(this,"events")||Object.create(null))[l.type]||[],h=x.event.special[l.type]||{};for(a[0]=l,e=1;e<arguments.length;e++)a[e]=arguments[e];if(l.delegateTarget=this,!h.preDispatch||!1!==h.preDispatch.call(this,l)){for(r=x.event.handlers.call(this,l,c),e=0;(o=r[e++])&&!l.isPropagationStopped();)for(l.currentTarget=o.elem,n=0;(s=o.handlers[n++])&&!l.isImmediatePropagationStopped();)l.rnamespace&&!1!==s.namespace&&!l.rnamespace.test(s.namespace)||(l.handleObj=s,l.data=s.data,void 0!==(i=((x.event.special[s.origType]||{}).handle||s.handler).apply(o.elem,a))&&!1===(l.result=i)&&(l.preventDefault(),l.stopPropagation()));return h.postDispatch&&h.postDispatch.call(this,l),l.result}},handlers:function(t,e){var n,i,o,s,r,a=[],l=e.delegateCount,c=t.target;if(l&&c.nodeType&&!("click"===t.type&&t.button>=1))for(;c!==this;c=c.parentNode||this)if(1===c.nodeType&&("click"!==t.type||!0!==c.disabled)){for(s=[],r={},n=0;n<l;n++)void 0===r[o=(i=e[n]).selector+" "]&&(r[o]=i.needsContext?x(o,this).index(c)>-1:x.find(o,this,null,[c]).length),r[o]&&s.push(i);s.length&&a.push({elem:c,handlers:s})}return c=this,l<e.length&&a.push({elem:c,handlers:e.slice(l)}),a},addProp:function(t,e){Object.defineProperty(x.Event.prototype,t,{enumerable:!0,configurable:!0,get:p(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[x.expando]?t:new x.Event(t)},special:{load:{noBubble:!0},click:{setup:function(t){var e=this||t;return wt.test(e.type)&&e.click&&E(e,"input")&&Dt(e,"click",!0),!1},trigger:function(t){var e=this||t;return wt.test(e.type)&&e.click&&E(e,"input")&&Dt(e,"click"),!0},_default:function(t){var e=t.target;return wt.test(e.type)&&e.click&&E(e,"input")&&ot.get(e,"click")||E(e,"a")}},beforeunload:{postDispatch:function(t){void 0!==t.result&&t.originalEvent&&(t.originalEvent.returnValue=t.result)}}}},x.removeEvent=function(t,e,n){t.removeEventListener&&t.removeEventListener(e,n)},x.Event=function(t,e){if(!(this instanceof x.Event))return new x.Event(t,e);t&&t.type?(this.originalEvent=t,this.type=t.type,this.isDefaultPrevented=t.defaultPrevented||void 0===t.defaultPrevented&&!1===t.returnValue?It:Lt,this.target=t.target&&3===t.target.nodeType?t.target.parentNode:t.target,this.currentTarget=t.currentTarget,this.relatedTarget=t.relatedTarget):this.type=t,e&&x.extend(this,e),this.timeStamp=t&&t.timeStamp||Date.now(),this[x.expando]=!0},x.Event.prototype={constructor:x.Event,isDefaultPrevented:Lt,isPropagationStopped:Lt,isImmediatePropagationStopped:Lt,isSimulated:!1,preventDefault:function(){var t=this.originalEvent;this.isDefaultPrevented=It,t&&!this.isSimulated&&t.preventDefault()},stopPropagation:function(){var t=this.originalEvent;this.isPropagationStopped=It,t&&!this.isSimulated&&t.stopPropagation()},stopImmediatePropagation:function(){var t=this.originalEvent;this.isImmediatePropagationStopped=It,t&&!this.isSimulated&&t.stopImmediatePropagation(),this.stopPropagation()}},x.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},x.event.addProp),x.each({focus:"focusin",blur:"focusout"},function(t,e){function n(t){if(g.documentMode){var n=ot.get(this,"handle"),i=x.event.fix(t);i.type="focusin"===t.type?"focus":"blur",i.isSimulated=!0,n(t),i.target===i.currentTarget&&n(i)}else x.event.simulate(e,t.target,x.event.fix(t))}x.event.special[t]={setup:function(){var i;if(Dt(this,t,!0),!g.documentMode)return!1;(i=ot.get(this,e))||this.addEventListener(e,n),ot.set(this,e,(i||0)+1)},trigger:function(){return Dt(this,t),!0},teardown:function(){var t;if(!g.documentMode)return!1;(t=ot.get(this,e)-1)?ot.set(this,e,t):(this.removeEventListener(e,n),ot.remove(this,e))},_default:function(e){return ot.get(e.target,t)},delegateType:e},x.event.special[e]={setup:function(){var i=this.ownerDocument||this.document||this,o=g.documentMode?this:i,s=ot.get(o,e);s||(g.documentMode?this.addEventListener(e,n):i.addEventListener(t,n,!0)),ot.set(o,e,(s||0)+1)},teardown:function(){var i=this.ownerDocument||this.document||this,o=g.documentMode?this:i,s=ot.get(o,e)-1;s?ot.set(o,e,s):(g.documentMode?this.removeEventListener(e,n):i.removeEventListener(t,n,!0),ot.remove(o,e))}}}),x.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(t,e){x.event.special[t]={delegateType:e,bindType:e,handle:function(t){var n,i=t.relatedTarget,o=t.handleObj;return i&&(i===this||x.contains(this,i))||(t.type=o.origType,n=o.handler.apply(this,arguments),t.type=e),n}}}),x.fn.extend({on:function(t,e,n,i){return _t(this,t,e,n,i)},one:function(t,e,n,i){return _t(this,t,e,n,i,1)},off:function(t,e,n){var i,o;if(t&&t.preventDefault&&t.handleObj)return i=t.handleObj,x(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=Lt),this.each(function(){x.event.remove(this,t,n,e)})}});var Mt=/<script|<style|<link/i,Ht=/checked\s*(?:[^=]|=\s*.checked.)/i,Nt=/^\s*<!\[CDATA\[|\]\]>\s*$/g;function Ot(t,e){return E(t,"table")&&E(11!==e.nodeType?e:e.firstChild,"tr")&&x(t).children("tbody")[0]||t}function jt(t){return t.type=(null!==t.getAttribute("type"))+"/"+t.type,t}function zt(t){return"true/"===(t.type||"").slice(0,5)?t.type=t.type.slice(5):t.removeAttribute("type"),t}function Wt(t,e){var n,i,o,s,r,a;if(1===e.nodeType){if(ot.hasData(t)&&(a=ot.get(t).events))for(o in ot.remove(e,"handle events"),a)for(n=0,i=a[o].length;n<i;n++)x.event.add(e,o,a[o][n]);st.hasData(t)&&(s=st.access(t),r=x.extend({},s),st.set(e,r))}}function Pt(t,e){var n=e.nodeName.toLowerCase();"input"===n&&wt.test(t.type)?e.checked=t.checked:"input"!==n&&"textarea"!==n||(e.defaultValue=t.defaultValue)}function Rt(t,e,n,i){e=s(e);var o,r,a,l,c,h,d=0,u=t.length,m=u-1,g=e[0],v=p(g);if(v||u>1&&"string"==typeof g&&!f.checkClone&&Ht.test(g))return t.each(function(o){var s=t.eq(o);v&&(e[0]=g.call(this,o,s.html())),Rt(s,e,n,i)});if(u&&(r=(o=kt(e,t[0].ownerDocument,!1,t,i)).firstChild,1===o.childNodes.length&&(o=r),r||i)){for(l=(a=x.map(Et(o,"script"),jt)).length;d<u;d++)c=o,d!==m&&(c=x.clone(c,!0,!0),l&&x.merge(a,Et(c,"script"))),n.call(t[d],c,d);if(l)for(h=a[a.length-1].ownerDocument,x.map(a,zt),d=0;d<l;d++)c=a[d],xt.test(c.type||"")&&!ot.access(c,"globalEval")&&x.contains(h,c)&&(c.src&&"module"!==(c.type||"").toLowerCase()?x._evalUrl&&!c.noModule&&x._evalUrl(c.src,{nonce:c.nonce||c.getAttribute("nonce")},h):b(c.textContent.replace(Nt,""),c,h))}return t}function qt(t,e,n){for(var i,o=e?x.filter(e,t):t,s=0;null!=(i=o[s]);s++)n||1!==i.nodeType||x.cleanData(Et(i)),i.parentNode&&(n&&ft(i)&&Tt(Et(i,"script")),i.parentNode.removeChild(i));return t}x.extend({htmlPrefilter:function(t){return t},clone:function(t,e,n){var i,o,s,r,a=t.cloneNode(!0),l=ft(t);if(!(f.noCloneChecked||1!==t.nodeType&&11!==t.nodeType||x.isXMLDoc(t)))for(r=Et(a),i=0,o=(s=Et(t)).length;i<o;i++)Pt(s[i],r[i]);if(e)if(n)for(s=s||Et(t),r=r||Et(a),i=0,o=s.length;i<o;i++)Wt(s[i],r[i]);else Wt(t,a);return(r=Et(a,"script")).length>0&&Tt(r,!l&&Et(t,"script")),a},cleanData:function(t){for(var e,n,i,o=x.event.special,s=0;void 0!==(n=t[s]);s++)if(nt(n)){if(e=n[ot.expando]){if(e.events)for(i in e.events)o[i]?x.event.remove(n,i):x.removeEvent(n,i,e.handle);n[ot.expando]=void 0}n[st.expando]&&(n[st.expando]=void 0)}}}),x.fn.extend({detach:function(t){return qt(this,t,!0)},remove:function(t){return qt(this,t)},text:function(t){return G(this,function(t){return void 0===t?x.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 Rt(this,arguments,function(t){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||Ot(this,t).appendChild(t)})},prepend:function(){return Rt(this,arguments,function(t){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var e=Ot(this,t);e.insertBefore(t,e.firstChild)}})},before:function(){return Rt(this,arguments,function(t){this.parentNode&&this.parentNode.insertBefore(t,this)})},after:function(){return Rt(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&&(x.cleanData(Et(t,!1)),t.textContent="");return this},clone:function(t,e){return t=null!=t&&t,e=null==e?t:e,this.map(function(){return x.clone(this,t,e)})},html:function(t){return G(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&&!Mt.test(t)&&!Ct[($t.exec(t)||["",""])[1].toLowerCase()]){t=x.htmlPrefilter(t);try{for(;n<i;n++)1===(e=this[n]||{}).nodeType&&(x.cleanData(Et(e,!1)),e.innerHTML=t);e=0}catch(t){}}e&&this.empty().append(t)},null,t,arguments.length)},replaceWith:function(){var t=[];return Rt(this,arguments,function(e){var n=this.parentNode;x.inArray(this,t)<0&&(x.cleanData(Et(this)),n&&n.replaceChild(e,this))},t)}}),x.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(t,e){x.fn[t]=function(t){for(var n,i=[],o=x(t),s=o.length-1,a=0;a<=s;a++)n=a===s?this:this.clone(!0),x(o[a])[e](n),r.apply(i,n.get());return this.pushStack(i)}});var Ft=new RegExp("^("+ct+")(?!px)[a-z%]+$","i"),Xt=/^--/,Yt=function(e){var n=e.ownerDocument.defaultView;return n&&n.opener||(n=t),n.getComputedStyle(e)},Bt=function(t,e,n){var i,o,s={};for(o in e)s[o]=t.style[o],t.style[o]=e[o];for(o in i=n.call(t),e)t.style[o]=s[o];return i},Ut=new RegExp(dt.join("|"),"i");function Qt(t,e,n){var i,o,s,r,a=Xt.test(e),l=t.style;return(n=n||Yt(t))&&(r=n.getPropertyValue(e)||n[e],a&&r&&(r=r.replace(I,"$1")||void 0),""!==r||ft(t)||(r=x.style(t,e)),!f.pixelBoxStyles()&&Ft.test(r)&&Ut.test(e)&&(i=l.width,o=l.minWidth,s=l.maxWidth,l.minWidth=l.maxWidth=l.width=r,r=n.width,l.width=i,l.minWidth=o,l.maxWidth=s)),void 0!==r?r+"":r}function Kt(t,e){return{get:function(){if(!t())return(this.get=e).apply(this,arguments);delete this.get}}}!function(){function e(){if(h){c.style.cssText="position:absolute;left:-11111px;width:60px;margin-top:1px;padding:0;border:0",h.style.cssText="position:relative;display:block;box-sizing:border-box;overflow:scroll;margin:auto;border:1px;padding:1px;width:60%;top:1%",ut.appendChild(c).appendChild(h);var e=t.getComputedStyle(h);i="1%"!==e.top,l=12===n(e.marginLeft),h.style.right="60%",r=36===n(e.right),o=36===n(e.width),h.style.position="absolute",s=12===n(h.offsetWidth/3),ut.removeChild(c),h=null}}function n(t){return Math.round(parseFloat(t))}var i,o,s,r,a,l,c=g.createElement("div"),h=g.createElement("div");h.style&&(h.style.backgroundClip="content-box",h.cloneNode(!0).style.backgroundClip="",f.clearCloneStyle="content-box"===h.style.backgroundClip,x.extend(f,{boxSizingReliable:function(){return e(),o},pixelBoxStyles:function(){return e(),r},pixelPosition:function(){return e(),i},reliableMarginLeft:function(){return e(),l},scrollboxSize:function(){return e(),s},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="box-sizing:content-box;border:1px solid",n.style.height="1px",i.style.height="9px",i.style.display="block",ut.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,ut.removeChild(e)),a}}))}();var Vt=["Webkit","Moz","ms"],Gt=g.createElement("div").style,Jt={};function Zt(t){var e=x.cssProps[t]||Jt[t];return e||(t in Gt?t:Jt[t]=function(t){for(var e=t[0].toUpperCase()+t.slice(1),n=Vt.length;n--;)if((t=Vt[n]+e)in Gt)return t}(t)||t)}var te=/^(none|table(?!-c[ea]).+)/,ee={position:"absolute",visibility:"hidden",display:"block"},ne={letterSpacing:"0",fontWeight:"400"};function ie(t,e,n){var i=ht.exec(e);return i?Math.max(0,i[2]-(n||0))+(i[3]||"px"):e}function oe(t,e,n,i,o,s){var r="width"===e?1:0,a=0,l=0,c=0;if(n===(i?"border":"content"))return 0;for(;r<4;r+=2)"margin"===n&&(c+=x.css(t,n+dt[r],!0,o)),i?("content"===n&&(l-=x.css(t,"padding"+dt[r],!0,o)),"margin"!==n&&(l-=x.css(t,"border"+dt[r]+"Width",!0,o))):(l+=x.css(t,"padding"+dt[r],!0,o),"padding"!==n?l+=x.css(t,"border"+dt[r]+"Width",!0,o):a+=x.css(t,"border"+dt[r]+"Width",!0,o));return!i&&s>=0&&(l+=Math.max(0,Math.ceil(t["offset"+e[0].toUpperCase()+e.slice(1)]-s-l-a-.5))||0),l+c}function se(t,e,n){var i=Yt(t),o=(!f.boxSizingReliable()||n)&&"border-box"===x.css(t,"boxSizing",!1,i),s=o,r=Qt(t,e,i),a="offset"+e[0].toUpperCase()+e.slice(1);if(Ft.test(r)){if(!n)return r;r="auto"}return(!f.boxSizingReliable()&&o||!f.reliableTrDimensions()&&E(t,"tr")||"auto"===r||!parseFloat(r)&&"inline"===x.css(t,"display",!1,i))&&t.getClientRects().length&&(o="border-box"===x.css(t,"boxSizing",!1,i),(s=a in t)&&(r=t[a])),(r=parseFloat(r)||0)+oe(t,e,n||(o?"border":"content"),s,i,r)+"px"}function re(t,e,n,i,o){return new re.prototype.init(t,e,n,i,o)}x.extend({cssHooks:{opacity:{get:function(t,e){if(e){var n=Qt(t,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,aspectRatio:!0,borderImageSlice:!0,columnCount:!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,scale:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeMiterlimit:!0,strokeOpacity:!0},cssProps:{},style:function(t,e,n,i){if(t&&3!==t.nodeType&&8!==t.nodeType&&t.style){var o,s,r,a=et(e),l=Xt.test(e),c=t.style;if(l||(e=Zt(a)),r=x.cssHooks[e]||x.cssHooks[a],void 0===n)return r&&"get"in r&&void 0!==(o=r.get(t,!1,i))?o:c[e];"string"===(s=typeof n)&&(o=ht.exec(n))&&o[1]&&(n=gt(t,e,o),s="number"),null!=n&&n==n&&("number"!==s||l||(n+=o&&o[3]||(x.cssNumber[a]?"":"px")),f.clearCloneStyle||""!==n||0!==e.indexOf("background")||(c[e]="inherit"),r&&"set"in r&&void 0===(n=r.set(t,n,i))||(l?c.setProperty(e,n):c[e]=n))}},css:function(t,e,n,i){var o,s,r,a=et(e);return Xt.test(e)||(e=Zt(a)),(r=x.cssHooks[e]||x.cssHooks[a])&&"get"in r&&(o=r.get(t,!0,n)),void 0===o&&(o=Qt(t,e,i)),"normal"===o&&e in ne&&(o=ne[e]),""===n||n?(s=parseFloat(o),!0===n||isFinite(s)?s||0:o):o}}),x.each(["height","width"],function(t,e){x.cssHooks[e]={get:function(t,n,i){if(n)return!te.test(x.css(t,"display"))||t.getClientRects().length&&t.getBoundingClientRect().width?se(t,e,i):Bt(t,ee,function(){return se(t,e,i)})},set:function(t,n,i){var o,s=Yt(t),r=!f.scrollboxSize()&&"absolute"===s.position,a=(r||i)&&"border-box"===x.css(t,"boxSizing",!1,s),l=i?oe(t,e,i,a,s):0;return a&&r&&(l-=Math.ceil(t["offset"+e[0].toUpperCase()+e.slice(1)]-parseFloat(s[e])-oe(t,e,"border",!1,s)-.5)),l&&(o=ht.exec(n))&&"px"!==(o[3]||"px")&&(t.style[e]=n,n=x.css(t,e)),ie(0,n,l)}}}),x.cssHooks.marginLeft=Kt(f.reliableMarginLeft,function(t,e){if(e)return(parseFloat(Qt(t,"marginLeft"))||t.getBoundingClientRect().left-Bt(t,{marginLeft:0},function(){return t.getBoundingClientRect().left}))+"px"}),x.each({margin:"",padding:"",border:"Width"},function(t,e){x.cssHooks[t+e]={expand:function(n){for(var i=0,o={},s="string"==typeof n?n.split(" "):[n];i<4;i++)o[t+dt[i]+e]=s[i]||s[i-2]||s[0];return o}},"margin"!==t&&(x.cssHooks[t+e].set=ie)}),x.fn.extend({css:function(t,e){return G(this,function(t,e,n){var i,o,s={},r=0;if(Array.isArray(e)){for(i=Yt(t),o=e.length;r<o;r++)s[e[r]]=x.css(t,e[r],!1,i);return s}return void 0!==n?x.style(t,e,n):x.css(t,e)},t,e,arguments.length>1)}}),x.Tween=re,re.prototype={constructor:re,init:function(t,e,n,i,o,s){this.elem=t,this.prop=n,this.easing=o||x.easing._default,this.options=e,this.start=this.now=this.cur(),this.end=i,this.unit=s||(x.cssNumber[n]?"":"px")},cur:function(){var t=re.propHooks[this.prop];return t&&t.get?t.get(this):re.propHooks._default.get(this)},run:function(t){var e,n=re.propHooks[this.prop];return this.options.duration?this.pos=e=x.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):re.propHooks._default.set(this),this}},re.prototype.init.prototype=re.prototype,re.propHooks={_default:{get:function(t){var e;return 1!==t.elem.nodeType||null!=t.elem[t.prop]&&null==t.elem.style[t.prop]?t.elem[t.prop]:(e=x.css(t.elem,t.prop,""))&&"auto"!==e?e:0},set:function(t){x.fx.step[t.prop]?x.fx.step[t.prop](t):1!==t.elem.nodeType||!x.cssHooks[t.prop]&&null==t.elem.style[Zt(t.prop)]?t.elem[t.prop]=t.now:x.style(t.elem,t.prop,t.now+t.unit)}}},re.propHooks.scrollTop=re.propHooks.scrollLeft={set:function(t){t.elem.nodeType&&t.elem.parentNode&&(t.elem[t.prop]=t.now)}},x.easing={linear:function(t){return t},swing:function(t){return.5-Math.cos(t*Math.PI)/2},_default:"swing"},x.fx=re.prototype.init,x.fx.step={};var ae,le,ce,he,de=/^(?:toggle|show|hide)$/,ue=/queueHooks$/;function fe(){le&&(!1===g.hidden&&t.requestAnimationFrame?t.requestAnimationFrame(fe):t.setTimeout(fe,x.fx.interval),x.fx.tick())}function pe(){return t.setTimeout(function(){ae=void 0}),ae=Date.now()}function me(t,e){var n,i=0,o={height:t};for(e=e?1:0;i<4;i+=2-e)o["margin"+(n=dt[i])]=o["padding"+n]=t;return e&&(o.opacity=o.width=t),o}function ge(t,e,n){for(var i,o=(ve.tweeners[e]||[]).concat(ve.tweeners["*"]),s=0,r=o.length;s<r;s++)if(i=o[s].call(n,e,t))return i}function ve(t,e,n){var i,o,s=0,r=ve.prefilters.length,a=x.Deferred().always(function(){delete l.elem}),l=function(){if(o)return!1;for(var e=ae||pe(),n=Math.max(0,c.startTime+c.duration-e),i=1-(n/c.duration||0),s=0,r=c.tweens.length;s<r;s++)c.tweens[s].run(i);return a.notifyWith(t,[c,i,n]),i<1&&r?n:(r||a.notifyWith(t,[c,1,0]),a.resolveWith(t,[c]),!1)},c=a.promise({elem:t,props:x.extend({},e),opts:x.extend(!0,{specialEasing:{},easing:x.easing._default},n),originalProperties:e,originalOptions:n,startTime:ae||pe(),duration:n.duration,tweens:[],createTween:function(e,n){var i=x.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}}),h=c.props;for(!function(t,e){var n,i,o,s,r;for(n in t)if(o=e[i=et(n)],s=t[n],Array.isArray(s)&&(o=s[1],s=t[n]=s[0]),n!==i&&(t[i]=s,delete t[n]),(r=x.cssHooks[i])&&"expand"in r)for(n in s=r.expand(s),delete t[i],s)n in t||(t[n]=s[n],e[n]=o);else e[i]=o}(h,c.opts.specialEasing);s<r;s++)if(i=ve.prefilters[s].call(c,t,h,c.opts))return p(i.stop)&&(x._queueHooks(c.elem,c.opts.queue).stop=i.stop.bind(i)),i;return x.map(h,ge,c),p(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),x.fx.timer(x.extend(l,{elem:t,anim:c,queue:c.opts.queue})),c}x.Animation=x.extend(ve,{tweeners:{"*":[function(t,e){var n=this.createTween(t,e);return gt(n.elem,t,ht.exec(e),n),n}]},tweener:function(t,e){p(t)?(e=t,t=["*"]):t=t.match(X);for(var n,i=0,o=t.length;i<o;i++)n=t[i],ve.tweeners[n]=ve.tweeners[n]||[],ve.tweeners[n].unshift(e)},prefilters:[function(t,e,n){var i,o,s,r,a,l,c,h,d="width"in e||"height"in e,u=this,f={},p=t.style,m=t.nodeType&&mt(t),g=ot.get(t,"fxshow");for(i in n.queue||(null==(r=x._queueHooks(t,"fx")).unqueued&&(r.unqueued=0,a=r.empty.fire,r.empty.fire=function(){r.unqueued||a()}),r.unqueued++,u.always(function(){u.always(function(){r.unqueued--,x.queue(t,"fx").length||r.empty.fire()})})),e)if(o=e[i],de.test(o)){if(delete e[i],s=s||"toggle"===o,o===(m?"hide":"show")){if("show"!==o||!g||void 0===g[i])continue;m=!0}f[i]=g&&g[i]||x.style(t,i)}if((l=!x.isEmptyObject(e))||!x.isEmptyObject(f))for(i in d&&1===t.nodeType&&(n.overflow=[p.overflow,p.overflowX,p.overflowY],null==(c=g&&g.display)&&(c=ot.get(t,"display")),"none"===(h=x.css(t,"display"))&&(c?h=c:(yt([t],!0),c=t.style.display||c,h=x.css(t,"display"),yt([t]))),("inline"===h||"inline-block"===h&&null!=c)&&"none"===x.css(t,"float")&&(l||(u.done(function(){p.display=c}),null==c&&(h=p.display,c="none"===h?"":h)),p.display="inline-block")),n.overflow&&(p.overflow="hidden",u.always(function(){p.overflow=n.overflow[0],p.overflowX=n.overflow[1],p.overflowY=n.overflow[2]})),l=!1,f)l||(g?"hidden"in g&&(m=g.hidden):g=ot.access(t,"fxshow",{display:c}),s&&(g.hidden=!m),m&&yt([t],!0),u.done(function(){for(i in m||yt([t]),ot.remove(t,"fxshow"),f)x.style(t,i,f[i])})),l=ge(m?g[i]:0,i,u),i in g||(g[i]=l.start,m&&(l.end=l.start,l.start=0))}],prefilter:function(t,e){e?ve.prefilters.unshift(t):ve.prefilters.push(t)}}),x.speed=function(t,e,n){var i=t&&"object"==typeof t?x.extend({},t):{complete:n||!n&&e||p(t)&&t,duration:t,easing:n&&e||e&&!p(e)&&e};return x.fx.off?i.duration=0:"number"!=typeof i.duration&&(i.duration in x.fx.speeds?i.duration=x.fx.speeds[i.duration]:i.duration=x.fx.speeds._default),null!=i.queue&&!0!==i.queue||(i.queue="fx"),i.old=i.complete,i.complete=function(){p(i.old)&&i.old.call(this),i.queue&&x.dequeue(this,i.queue)},i},x.fn.extend({fadeTo:function(t,e,n,i){return this.filter(mt).css("opacity",0).show().end().animate({opacity:e},t,n,i)},animate:function(t,e,n,i){var o=x.isEmptyObject(t),s=x.speed(e,n,i),r=function(){var e=ve(this,x.extend({},t),s);(o||ot.get(this,"finish"))&&e.stop(!0)};return r.finish=r,o||!1===s.queue?this.each(r):this.queue(s.queue,r)},stop:function(t,e,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",s=x.timers,r=ot.get(this);if(o)r[o]&&r[o].stop&&i(r[o]);else for(o in r)r[o]&&r[o].stop&&ue.test(o)&&i(r[o]);for(o=s.length;o--;)s[o].elem!==this||null!=t&&s[o].queue!==t||(s[o].anim.stop(n),e=!1,s.splice(o,1));!e&&n||x.dequeue(this,t)})},finish:function(t){return!1!==t&&(t=t||"fx"),this.each(function(){var e,n=ot.get(this),i=n[t+"queue"],o=n[t+"queueHooks"],s=x.timers,r=i?i.length:0;for(n.finish=!0,x.queue(this,t,[]),o&&o.stop&&o.stop.call(this,!0),e=s.length;e--;)s[e].elem===this&&s[e].queue===t&&(s[e].anim.stop(!0),s.splice(e,1));for(e=0;e<r;e++)i[e]&&i[e].finish&&i[e].finish.call(this);delete n.finish})}}),x.each(["toggle","show","hide"],function(t,e){var n=x.fn[e];x.fn[e]=function(t,i,o){return null==t||"boolean"==typeof t?n.apply(this,arguments):this.animate(me(e,!0),t,i,o)}}),x.each({slideDown:me("show"),slideUp:me("hide"),slideToggle:me("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(t,e){x.fn[t]=function(t,n,i){return this.animate(e,t,n,i)}}),x.timers=[],x.fx.tick=function(){var t,e=0,n=x.timers;for(ae=Date.now();e<n.length;e++)(t=n[e])()||n[e]!==t||n.splice(e--,1);n.length||x.fx.stop(),ae=void 0},x.fx.timer=function(t){x.timers.push(t),x.fx.start()},x.fx.interval=13,x.fx.start=function(){le||(le=!0,fe())},x.fx.stop=function(){le=null},x.fx.speeds={slow:600,fast:200,_default:400},x.fn.delay=function(e,n){return e=x.fx&&x.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)}})},ce=g.createElement("input"),he=g.createElement("select").appendChild(g.createElement("option")),ce.type="checkbox",f.checkOn=""!==ce.value,f.optSelected=he.selected,(ce=g.createElement("input")).value="t",ce.type="radio",f.radioValue="t"===ce.value;var be,ye=x.expr.attrHandle;x.fn.extend({attr:function(t,e){return G(this,x.attr,t,e,arguments.length>1)},removeAttr:function(t){return this.each(function(){x.removeAttr(this,t)})}}),x.extend({attr:function(t,e,n){var i,o,s=t.nodeType;if(3!==s&&8!==s&&2!==s)return"undefined"==typeof t.getAttribute?x.prop(t,e,n):(1===s&&x.isXMLDoc(t)||(o=x.attrHooks[e.toLowerCase()]||(x.expr.match.bool.test(e)?be:void 0)),void 0!==n?null===n?void x.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=x.find.attr(t,e))?void 0:i)},attrHooks:{type:{set:function(t,e){if(!f.radioValue&&"radio"===e&&E(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(X);if(o&&1===t.nodeType)for(;n=o[i++];)t.removeAttribute(n)}}),be={set:function(t,e,n){return!1===e?x.removeAttr(t,n):t.setAttribute(n,n),n}},x.each(x.expr.match.bool.source.match(/\w+/g),function(t,e){var n=ye[e]||x.find.attr;ye[e]=function(t,e,i){var o,s,r=e.toLowerCase();return i||(s=ye[r],ye[r]=o,o=null!=n(t,e,i)?r:null,ye[r]=s),o}});var we=/^(?:input|select|textarea|button)$/i,$e=/^(?:a|area)$/i;function xe(t){return(t.match(X)||[]).join(" ")}function Ce(t){return t.getAttribute&&t.getAttribute("class")||""}function Ee(t){return Array.isArray(t)?t:"string"==typeof t&&t.match(X)||[]}x.fn.extend({prop:function(t,e){return G(this,x.prop,t,e,arguments.length>1)},removeProp:function(t){return this.each(function(){delete this[x.propFix[t]||t]})}}),x.extend({prop:function(t,e,n){var i,o,s=t.nodeType;if(3!==s&&8!==s&&2!==s)return 1===s&&x.isXMLDoc(t)||(e=x.propFix[e]||e,o=x.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=x.find.attr(t,"tabindex");return e?parseInt(e,10):we.test(t.nodeName)||$e.test(t.nodeName)&&t.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),f.optSelected||(x.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)}}),x.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){x.propFix[this.toLowerCase()]=this}),x.fn.extend({addClass:function(t){var e,n,i,o,s,r;return p(t)?this.each(function(e){x(this).addClass(t.call(this,e,Ce(this)))}):(e=Ee(t)).length?this.each(function(){if(i=Ce(this),n=1===this.nodeType&&" "+xe(i)+" "){for(s=0;s<e.length;s++)o=e[s],n.indexOf(" "+o+" ")<0&&(n+=o+" ");r=xe(n),i!==r&&this.setAttribute("class",r)}}):this},removeClass:function(t){var e,n,i,o,s,r;return p(t)?this.each(function(e){x(this).removeClass(t.call(this,e,Ce(this)))}):arguments.length?(e=Ee(t)).length?this.each(function(){if(i=Ce(this),n=1===this.nodeType&&" "+xe(i)+" "){for(s=0;s<e.length;s++)for(o=e[s];n.indexOf(" "+o+" ")>-1;)n=n.replace(" "+o+" "," ");r=xe(n),i!==r&&this.setAttribute("class",r)}}):this:this.attr("class","")},toggleClass:function(t,e){var n,i,o,s,r=typeof t,a="string"===r||Array.isArray(t);return p(t)?this.each(function(n){x(this).toggleClass(t.call(this,n,Ce(this),e),e)}):"boolean"==typeof e&&a?e?this.addClass(t):this.removeClass(t):(n=Ee(t),this.each(function(){if(a)for(s=x(this),o=0;o<n.length;o++)i=n[o],s.hasClass(i)?s.removeClass(i):s.addClass(i);else void 0!==t&&"boolean"!==r||((i=Ce(this))&&ot.set(this,"__className__",i),this.setAttribute&&this.setAttribute("class",i||!1===t?"":ot.get(this,"__className__")||""))}))},hasClass:function(t){var e,n,i=0;for(e=" "+t+" ";n=this[i++];)if(1===n.nodeType&&(" "+xe(Ce(n))+" ").indexOf(e)>-1)return!0;return!1}});var Te=/\r/g;x.fn.extend({val:function(t){var e,n,i,o=this[0];return arguments.length?(i=p(t),this.each(function(n){var o;1===this.nodeType&&(null==(o=i?t.call(this,n,x(this).val()):t)?o="":"number"==typeof o?o+="":Array.isArray(o)&&(o=x.map(o,function(t){return null==t?"":t+""})),(e=x.valHooks[this.type]||x.valHooks[this.nodeName.toLowerCase()])&&"set"in e&&void 0!==e.set(this,o,"value")||(this.value=o))})):o?(e=x.valHooks[o.type]||x.valHooks[o.nodeName.toLowerCase()])&&"get"in e&&void 0!==(n=e.get(o,"value"))?n:"string"==typeof(n=o.value)?n.replace(Te,""):null==n?"":n:void 0}}),x.extend({valHooks:{option:{get:function(t){var e=x.find.attr(t,"value");return null!=e?e:xe(x.text(t))}},select:{get:function(t){var e,n,i,o=t.options,s=t.selectedIndex,r="select-one"===t.type,a=r?null:[],l=r?s+1:o.length;for(i=s<0?l:r?s:0;i<l;i++)if(((n=o[i]).selected||i===s)&&!n.disabled&&(!n.parentNode.disabled||!E(n.parentNode,"optgroup"))){if(e=x(n).val(),r)return e;a.push(e)}return a},set:function(t,e){for(var n,i,o=t.options,s=x.makeArray(e),r=o.length;r--;)((i=o[r]).selected=x.inArray(x.valHooks.option.get(i),s)>-1)&&(n=!0);return n||(t.selectedIndex=-1),s}}}}),x.each(["radio","checkbox"],function(){x.valHooks[this]={set:function(t,e){if(Array.isArray(e))return t.checked=x.inArray(x(t).val(),e)>-1}},f.checkOn||(x.valHooks[this].get=function(t){return null===t.getAttribute("value")?"on":t.value})});var Se=t.location,ke={guid:Date.now()},Ae=/\?/;x.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||x.error("Invalid XML: "+(i?x.map(i.childNodes,function(t){return t.textContent}).join("\n"):e)),n};var Ie=/^(?:focusinfocus|focusoutblur)$/,Le=function(t){t.stopPropagation()};x.extend(x.event,{trigger:function(e,n,i,o){var s,r,a,l,c,d,u,f,v=[i||g],b=h.call(e,"type")?e.type:e,y=h.call(e,"namespace")?e.namespace.split("."):[];if(r=f=a=i=i||g,3!==i.nodeType&&8!==i.nodeType&&!Ie.test(b+x.event.triggered)&&(b.indexOf(".")>-1&&(y=b.split("."),b=y.shift(),y.sort()),c=b.indexOf(":")<0&&"on"+b,(e=e[x.expando]?e:new x.Event(b,"object"==typeof e&&e)).isTrigger=o?2:3,e.namespace=y.join("."),e.rnamespace=e.namespace?new RegExp("(^|\\.)"+y.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=void 0,e.target||(e.target=i),n=null==n?[e]:x.makeArray(n,[e]),u=x.event.special[b]||{},o||!u.trigger||!1!==u.trigger.apply(i,n))){if(!o&&!u.noBubble&&!m(i)){for(l=u.delegateType||b,Ie.test(l+b)||(r=r.parentNode);r;r=r.parentNode)v.push(r),a=r;a===(i.ownerDocument||g)&&v.push(a.defaultView||a.parentWindow||t)}for(s=0;(r=v[s++])&&!e.isPropagationStopped();)f=r,e.type=s>1?l:u.bindType||b,(d=(ot.get(r,"events")||Object.create(null))[e.type]&&ot.get(r,"handle"))&&d.apply(r,n),(d=c&&r[c])&&d.apply&&nt(r)&&(e.result=d.apply(r,n),!1===e.result&&e.preventDefault());return e.type=b,o||e.isDefaultPrevented()||u._default&&!1!==u._default.apply(v.pop(),n)||!nt(i)||c&&p(i[b])&&!m(i)&&((a=i[c])&&(i[c]=null),x.event.triggered=b,e.isPropagationStopped()&&f.addEventListener(b,Le),i[b](),e.isPropagationStopped()&&f.removeEventListener(b,Le),x.event.triggered=void 0,a&&(i[c]=a)),e.result}},simulate:function(t,e,n){var i=x.extend(new x.Event,n,{type:t,isSimulated:!0});x.event.trigger(i,null,e)}}),x.fn.extend({trigger:function(t,e){return this.each(function(){x.event.trigger(t,e,this)})},triggerHandler:function(t,e){var n=this[0];if(n)return x.event.trigger(t,e,n,!0)}});var _e=/\[\]$/,De=/\r?\n/g,Me=/^(?:submit|button|image|reset|file)$/i,He=/^(?:input|select|textarea|keygen)/i;function Ne(t,e,n,i){var o;if(Array.isArray(e))x.each(e,function(e,o){n||_e.test(t)?i(t,o):Ne(t+"["+("object"==typeof o&&null!=o?e:"")+"]",o,n,i)});else if(n||"object"!==y(e))i(t,e);else for(o in e)Ne(t+"["+o+"]",e[o],n,i)}x.param=function(t,e){var n,i=[],o=function(t,e){var n=p(e)?e():e;i[i.length]=encodeURIComponent(t)+"="+encodeURIComponent(null==n?"":n)};if(null==t)return"";if(Array.isArray(t)||t.jquery&&!x.isPlainObject(t))x.each(t,function(){o(this.name,this.value)});else for(n in t)Ne(n,t[n],e,o);return i.join("&")},x.fn.extend({serialize:function(){return x.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var t=x.prop(this,"elements");return t?x.makeArray(t):this}).filter(function(){var t=this.type;return this.name&&!x(this).is(":disabled")&&He.test(this.nodeName)&&!Me.test(t)&&(this.checked||!wt.test(t))}).map(function(t,e){var n=x(this).val();return null==n?null:Array.isArray(n)?x.map(n,function(t){return{name:e.name,value:t.replace(De,"\r\n")}}):{name:e.name,value:n.replace(De,"\r\n")}}).get()}});var Oe=/%20/g,je=/#.*$/,ze=/([?&])_=[^&]*/,We=/^(.*?):[ \t]*([^\r\n]*)$/gm,Pe=/^(?:GET|HEAD)$/,Re=/^\/\//,qe={},Fe={},Xe="*/".concat("*"),Ye=g.createElement("a");function Be(t){return function(e,n){"string"!=typeof e&&(n=e,e="*");var i,o=0,s=e.toLowerCase().match(X)||[];if(p(n))for(;i=s[o++];)"+"===i[0]?(i=i.slice(1)||"*",(t[i]=t[i]||[]).unshift(n)):(t[i]=t[i]||[]).push(n)}}function Ue(t,e,n,i){var o={},s=t===Fe;function r(a){var l;return o[a]=!0,x.each(t[a]||[],function(t,a){var c=a(e,n,i);return"string"!=typeof c||s||o[c]?s?!(l=c):void 0:(e.dataTypes.unshift(c),r(c),!1)}),l}return r(e.dataTypes[0])||!o["*"]&&r("*")}function Qe(t,e){var n,i,o=x.ajaxSettings.flatOptions||{};for(n in e)void 0!==e[n]&&((o[n]?t:i||(i={}))[n]=e[n]);return i&&x.extend(!0,t,i),t}Ye.href=Se.href,x.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Se.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(Se.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Xe,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":x.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(t,e){return e?Qe(Qe(t,x.ajaxSettings),e):Qe(x.ajaxSettings,t)},ajaxPrefilter:Be(qe),ajaxTransport:Be(Fe),ajax:function(e,n){"object"==typeof e&&(n=e,e=void 0),n=n||{};var i,o,s,r,a,l,c,h,d,u,f=x.ajaxSetup({},n),p=f.context||f,m=f.context&&(p.nodeType||p.jquery)?x(p):x.event,v=x.Deferred(),b=x.Callbacks("once memory"),y=f.statusCode||{},w={},$={},C="canceled",E={readyState:0,getResponseHeader:function(t){var e;if(c){if(!r)for(r={};e=We.exec(s);)r[e[1].toLowerCase()+" "]=(r[e[1].toLowerCase()+" "]||[]).concat(e[2]);e=r[t.toLowerCase()+" "]}return null==e?null:e.join(", ")},getAllResponseHeaders:function(){return c?s:null},setRequestHeader:function(t,e){return null==c&&(t=$[t.toLowerCase()]=$[t.toLowerCase()]||t,w[t]=e),this},overrideMimeType:function(t){return null==c&&(f.mimeType=t),this},statusCode:function(t){var e;if(t)if(c)E.always(t[E.status]);else for(e in t)y[e]=[y[e],t[e]];return this},abort:function(t){var e=t||C;return i&&i.abort(e),T(0,e),this}};if(v.promise(E),f.url=((e||f.url||Se.href)+"").replace(Re,Se.protocol+"//"),f.type=n.method||n.type||f.method||f.type,f.dataTypes=(f.dataType||"*").toLowerCase().match(X)||[""],null==f.crossDomain){l=g.createElement("a");try{l.href=f.url,l.href=l.href,f.crossDomain=Ye.protocol+"//"+Ye.host!=l.protocol+"//"+l.host}catch(t){f.crossDomain=!0}}if(f.data&&f.processData&&"string"!=typeof f.data&&(f.data=x.param(f.data,f.traditional)),Ue(qe,f,n,E),c)return E;for(d in(h=x.event&&f.global)&&0===x.active++&&x.event.trigger("ajaxStart"),f.type=f.type.toUpperCase(),f.hasContent=!Pe.test(f.type),o=f.url.replace(je,""),f.hasContent?f.data&&f.processData&&0===(f.contentType||"").indexOf("application/x-www-form-urlencoded")&&(f.data=f.data.replace(Oe,"+")):(u=f.url.slice(o.length),f.data&&(f.processData||"string"==typeof f.data)&&(o+=(Ae.test(o)?"&":"?")+f.data,delete f.data),!1===f.cache&&(o=o.replace(ze,"$1"),u=(Ae.test(o)?"&":"?")+"_="+ke.guid+++u),f.url=o+u),f.ifModified&&(x.lastModified[o]&&E.setRequestHeader("If-Modified-Since",x.lastModified[o]),x.etag[o]&&E.setRequestHeader("If-None-Match",x.etag[o])),(f.data&&f.hasContent&&!1!==f.contentType||n.contentType)&&E.setRequestHeader("Content-Type",f.contentType),E.setRequestHeader("Accept",f.dataTypes[0]&&f.accepts[f.dataTypes[0]]?f.accepts[f.dataTypes[0]]+("*"!==f.dataTypes[0]?", "+Xe+"; q=0.01":""):f.accepts["*"]),f.headers)E.setRequestHeader(d,f.headers[d]);if(f.beforeSend&&(!1===f.beforeSend.call(p,E,f)||c))return E.abort();if(C="abort",b.add(f.complete),E.done(f.success),E.fail(f.error),i=Ue(Fe,f,n,E)){if(E.readyState=1,h&&m.trigger("ajaxSend",[E,f]),c)return E;f.async&&f.timeout>0&&(a=t.setTimeout(function(){E.abort("timeout")},f.timeout));try{c=!1,i.send(w,T)}catch(t){if(c)throw t;T(-1,t)}}else T(-1,"No Transport");function T(e,n,r,l){var d,u,g,w,$,C=n;c||(c=!0,a&&t.clearTimeout(a),i=void 0,s=l||"",E.readyState=e>0?4:0,d=e>=200&&e<300||304===e,r&&(w=function(t,e,n){for(var i,o,s,r,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)s=l[0];else{for(o in n){if(!l[0]||t.converters[o+" "+l[0]]){s=o;break}r||(r=o)}s=s||r}if(s)return s!==l[0]&&l.unshift(s),n[s]}(f,E,r)),!d&&x.inArray("script",f.dataTypes)>-1&&x.inArray("json",f.dataTypes)<0&&(f.converters["text script"]=function(){}),w=function(t,e,n,i){var o,s,r,a,l,c={},h=t.dataTypes.slice();if(h[1])for(r in t.converters)c[r.toLowerCase()]=t.converters[r];for(s=h.shift();s;)if(t.responseFields[s]&&(n[t.responseFields[s]]=e),!l&&i&&t.dataFilter&&(e=t.dataFilter(e,t.dataType)),l=s,s=h.shift())if("*"===s)s=l;else if("*"!==l&&l!==s){if(!(r=c[l+" "+s]||c["* "+s]))for(o in c)if((a=o.split(" "))[1]===s&&(r=c[l+" "+a[0]]||c["* "+a[0]])){!0===r?r=c[o]:!0!==c[o]&&(s=a[0],h.unshift(a[1]));break}if(!0!==r)if(r&&t.throws)e=r(e);else try{e=r(e)}catch(t){return{state:"parsererror",error:r?t:"No conversion from "+l+" to "+s}}}return{state:"success",data:e}}(f,w,E,d),d?(f.ifModified&&(($=E.getResponseHeader("Last-Modified"))&&(x.lastModified[o]=$),($=E.getResponseHeader("etag"))&&(x.etag[o]=$)),204===e||"HEAD"===f.type?C="nocontent":304===e?C="notmodified":(C=w.state,u=w.data,d=!(g=w.error))):(g=C,!e&&C||(C="error",e<0&&(e=0))),E.status=e,E.statusText=(n||C)+"",d?v.resolveWith(p,[u,C,E]):v.rejectWith(p,[E,C,g]),E.statusCode(y),y=void 0,h&&m.trigger(d?"ajaxSuccess":"ajaxError",[E,f,d?u:g]),b.fireWith(p,[E,C]),h&&(m.trigger("ajaxComplete",[E,f]),--x.active||x.event.trigger("ajaxStop")))}return E},getJSON:function(t,e,n){return x.get(t,e,n,"json")},getScript:function(t,e){return x.get(t,void 0,e,"script")}}),x.each(["get","post"],function(t,e){x[e]=function(t,n,i,o){return p(n)&&(o=o||i,i=n,n=void 0),x.ajax(x.extend({url:t,type:e,dataType:o,data:n,success:i},x.isPlainObject(t)&&t))}}),x.ajaxPrefilter(function(t){var e;for(e in t.headers)"content-type"===e.toLowerCase()&&(t.contentType=t.headers[e]||"")}),x._evalUrl=function(t,e,n){return x.ajax({url:t,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}},dataFilter:function(t){x.globalEval(t,e,n)}})},x.fn.extend({wrapAll:function(t){var e;return this[0]&&(p(t)&&(t=t.call(this[0])),e=x(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 p(t)?this.each(function(e){x(this).wrapInner(t.call(this,e))}):this.each(function(){var e=x(this),n=e.contents();n.length?n.wrapAll(t):e.append(t)})},wrap:function(t){var e=p(t);return this.each(function(n){x(this).wrapAll(e?t.call(this,n):t)})},unwrap:function(t){return this.parent(t).not("body").each(function(){x(this).replaceWith(this.childNodes)}),this}}),x.expr.pseudos.hidden=function(t){return!x.expr.pseudos.visible(t)},x.expr.pseudos.visible=function(t){return!!(t.offsetWidth||t.offsetHeight||t.getClientRects().length)},x.ajaxSettings.xhr=function(){try{return new t.XMLHttpRequest}catch(t){}};var Ke={0:200,1223:204},Ve=x.ajaxSettings.xhr();f.cors=!!Ve&&"withCredentials"in Ve,f.ajax=Ve=!!Ve,x.ajaxTransport(function(e){var n,i;if(f.cors||Ve&&!e.crossDomain)return{send:function(o,s){var r,a=e.xhr();if(a.open(e.type,e.url,e.async,e.username,e.password),e.xhrFields)for(r in e.xhrFields)a[r]=e.xhrFields[r];for(r in e.mimeType&&a.overrideMimeType&&a.overrideMimeType(e.mimeType),e.crossDomain||o["X-Requested-With"]||(o["X-Requested-With"]="XMLHttpRequest"),o)a.setRequestHeader(r,o[r]);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?s(0,"error"):s(a.status,a.statusText):s(Ke[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()}}}),x.ajaxPrefilter(function(t){t.crossDomain&&(t.contents.script=!1)}),x.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 x.globalEval(t),t}}}),x.ajaxPrefilter("script",function(t){void 0===t.cache&&(t.cache=!1),t.crossDomain&&(t.type="GET")}),x.ajaxTransport("script",function(t){var e,n;if(t.crossDomain||t.scriptAttrs)return{send:function(i,o){e=x("<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 Ge,Je=[],Ze=/(=)\?(?=&|$)|\?\?/;x.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var t=Je.pop()||x.expando+"_"+ke.guid++;return this[t]=!0,t}}),x.ajaxPrefilter("json jsonp",function(e,n,i){var o,s,r,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=p(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Ze,"$1"+o):!1!==e.jsonp&&(e.url+=(Ae.test(e.url)?"&":"?")+e.jsonp+"="+o),e.converters["script json"]=function(){return r||x.error(o+" was not called"),r[0]},e.dataTypes[0]="json",s=t[o],t[o]=function(){r=arguments},i.always(function(){void 0===s?x(t).removeProp(o):t[o]=s,e[o]&&(e.jsonpCallback=n.jsonpCallback,Je.push(o)),r&&p(s)&&s(r[0]),r=s=void 0}),"script"}),f.createHTMLDocument=((Ge=g.implementation.createHTMLDocument("").body).innerHTML="<form></form><form></form>",2===Ge.childNodes.length),x.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),s=!n&&[],(o=j.exec(t))?[e.createElement(o[1])]:(o=kt([t],e,s),s&&s.length&&x(s).remove(),x.merge([],o.childNodes)));var i,o,s},x.fn.load=function(t,e,n){var i,o,s,r=this,a=t.indexOf(" ");return a>-1&&(i=xe(t.slice(a)),t=t.slice(0,a)),p(e)?(n=e,e=void 0):e&&"object"==typeof e&&(o="POST"),r.length>0&&x.ajax({url:t,type:o||"GET",dataType:"html",data:e}).done(function(t){s=arguments,r.html(i?x("<div>").append(x.parseHTML(t)).find(i):t)}).always(n&&function(t,e){r.each(function(){n.apply(this,s||[t.responseText,e,t])})}),this},x.expr.pseudos.animated=function(t){return x.grep(x.timers,function(e){return t===e.elem}).length},x.offset={setOffset:function(t,e,n){var i,o,s,r,a,l,c=x.css(t,"position"),h=x(t),d={};"static"===c&&(t.style.position="relative"),a=h.offset(),s=x.css(t,"top"),l=x.css(t,"left"),("absolute"===c||"fixed"===c)&&(s+l).indexOf("auto")>-1?(r=(i=h.position()).top,o=i.left):(r=parseFloat(s)||0,o=parseFloat(l)||0),p(e)&&(e=e.call(t,n,x.extend({},a))),null!=e.top&&(d.top=e.top-a.top+r),null!=e.left&&(d.left=e.left-a.left+o),"using"in e?e.using.call(t,d):h.css(d)}},x.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){x.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"===x.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"===x.css(t,"position");)t=t.parentNode;t&&t!==i&&1===t.nodeType&&((o=x(t).offset()).top+=x.css(t,"borderTopWidth",!0),o.left+=x.css(t,"borderLeftWidth",!0))}return{top:e.top-o.top-x.css(i,"marginTop",!0),left:e.left-o.left-x.css(i,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var t=this.offsetParent;t&&"static"===x.css(t,"position");)t=t.offsetParent;return t||ut})}}),x.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,e){var n="pageYOffset"===e;x.fn[t]=function(i){return G(this,function(t,i,o){var s;if(m(t)?s=t:9===t.nodeType&&(s=t.defaultView),void 0===o)return s?s[e]:t[i];s?s.scrollTo(n?s.pageXOffset:o,n?o:s.pageYOffset):t[i]=o},t,i,arguments.length)}}),x.each(["top","left"],function(t,e){x.cssHooks[e]=Kt(f.pixelPosition,function(t,n){if(n)return n=Qt(t,e),Ft.test(n)?x(t).position()[e]+"px":n})}),x.each({Height:"height",Width:"width"},function(t,e){x.each({padding:"inner"+t,content:e,"":"outer"+t},function(n,i){x.fn[i]=function(o,s){var r=arguments.length&&(n||"boolean"!=typeof o),a=n||(!0===o||!0===s?"margin":"border");return G(this,function(e,n,o){var s;return m(e)?0===i.indexOf("outer")?e["inner"+t]:e.document.documentElement["client"+t]:9===e.nodeType?(s=e.documentElement,Math.max(e.body["scroll"+t],s["scroll"+t],e.body["offset"+t],s["offset"+t],s["client"+t])):void 0===o?x.css(e,n,a):x.style(e,n,o,a)},e,r?o:void 0,r)}})}),x.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(t,e){x.fn[e]=function(t){return this.on(e,t)}}),x.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.on("mouseenter",t).on("mouseleave",e||t)}}),x.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){x.fn[e]=function(t,n){return arguments.length>0?this.on(e,null,t,n):this.trigger(e)}});var tn=/^[\s\uFEFF\xA0]+|([^\s\uFEFF\xA0])[\s\uFEFF\xA0]+$/g;x.proxy=function(t,e){var n,i,s;if("string"==typeof e&&(n=t[e],e=t,t=n),p(t))return i=o.call(arguments,2),s=function(){return t.apply(e||this,i.concat(o.call(arguments)))},s.guid=t.guid=t.guid||x.guid++,s},x.holdReady=function(t){t?x.readyWait++:x.ready(!0)},x.isArray=Array.isArray,x.parseJSON=JSON.parse,x.nodeName=E,x.isFunction=p,x.isWindow=m,x.camelCase=et,x.type=y,x.now=Date.now,x.isNumeric=function(t){var e=x.type(t);return("number"===e||"string"===e)&&!isNaN(t-parseFloat(t))},x.trim=function(t){return null==t?"":(t+"").replace(tn,"$1")};var en=t.jQuery,nn=t.$;return x.noConflict=function(e){return t.$===x&&(t.$=nn),e&&t.jQuery===x&&(t.jQuery=en),x},"undefined"==typeof e&&(t.jQuery=t.$=x),x})}({exports:{}});var s=function(){function t(){}t.initializeElement=function(t,e){void 0===e&&(e={});var n="string"==typeof t?document.querySelector(t):t;if(!n)return!1;var i=$(n);if(!i.data("plugin_"+this.NAME)){var o=new this(n,e);return i.data("plugin_"+this.NAME,o),this.instances.push(o),o}return!1},t.initializeElements=function(t,e){var n=this;return void 0===e&&(e={}),document.querySelectorAll(t).forEach(function(t){n.initializeElement(t,e)}),this.instances};var e=t.prototype;return e.onInit=function(){var t=this.opts.onInit;"function"==typeof t&&t.call(this)},e.onUpdate=function(){var t=this.opts.onUpdate;"function"==typeof t&&t.call(this)},e.onDestroy=function(){var t=this.opts.onDestroy;"function"==typeof t&&t.call(this)},e.onShow=function(){var t=this.opts.onShow;"function"==typeof t&&t.call(this)},e.onClose=function(){var t=this.opts.onClose;"function"==typeof t&&t.call(this)},e.onReset=function(){var t=this.opts.onReset;"function"==typeof t&&t.call(this)},t}();s.instances=[];var r=function(t){function e(n){var i;return(i=t.call(this)||this).opts={},window.Cool&&window.Cool.settings&&window.Cool.settings.section?$.extend(!0,i.opts,e.DEFAULTS,window.Cool.settings.section,n):$.extend(!0,i.opts,e.DEFAULTS,n),i._eventHandlers=[],i._updateTimeout=null,i._rafId=null,i.init(),i}n(e,t);var i=e.prototype;return i.init=function(){this.opts.observeSections&&this.initializeSectionObserver(),this.opts.initFormControls&&this.initializeFormControls(),this.opts.initTableHandlers&&this.initializeTableHandlers(),this.opts.initButtonGroups&&this.initializeButtonGroups(),this.opts.initTabs&&this.initializeTabs(),this.onInit()},i.destroy=function(){this.destroySectionObserver(),this.unbindEvents(),this._updateTimeout&&clearTimeout(this._updateTimeout),this._rafId&&cancelAnimationFrame(this._rafId),this.onDestroy()},i._addEventListener=function(t,e,n,i){t.addEventListener(e,n,i),this._eventHandlers.push({element:t,event:e,handler:n,options:i})},i.initializeSectionObserver=function(){var t=this;this._isUpdating=!1,this.sectionObserver=new MutationObserver(function(e){t._isUpdating||(e.every(function(t){if("attributes"===t.type&&"class"===t.attributeName){var e=t.target,n=t.oldValue?t.oldValue.split(" "):[],i=Array.from(e.classList),o=i.filter(function(t){return!n.includes(t)}),s=n.filter(function(t){return!i.includes(t)});return[].concat(o,s).every(function(t){return"is-last-visible"===t||"is-last-visible-row"===t||"is-last-visible-cell"===t})}return!1})||(t._updateTimeout&&clearTimeout(t._updateTimeout),t._updateTimeout=setTimeout(function(){t._rafId&&cancelAnimationFrame(t._rafId),t._rafId=requestAnimationFrame(function(){t.updateLastVisibleElements()})},50)))}),this.sectionObserver.observe(document.body,{attributes:!0,childList:!0,subtree:!0,attributeFilter:["class","style","hidden"],attributeOldValue:!0,subtreeFilter:function(t){return t.classList&&(t.classList.contains("section")||t.classList.contains("select")||"TABLE"===t.nodeName||"TR"===t.nodeName||"TD"===t.nodeName||"TH"===t.nodeName)}}),this.updateLastVisibleElements()},i.updateLastVisibleElements=function(){var t=this;this._isUpdating=!0;var e={sections:[],tables:[],rows:[]};document.querySelectorAll(".section").forEach(function(n){var i=t.getVisibleChildren(n);i.length&&e.sections.push({section:n,lastVisible:i[i.length-1]})}),document.querySelectorAll("table").forEach(function(n){var i=n.querySelector("tbody")||n,o=t.getVisibleElements(i.querySelectorAll("tr"));o.length&&e.tables.push({tbody:i,lastVisibleRow:o[o.length-1]})}),document.querySelectorAll("table tr").forEach(function(n){var i=t.getVisibleElements(n.querySelectorAll("td, th"));i.length&&e.rows.push({row:n,lastVisibleCell:i[i.length-1]})}),requestAnimationFrame(function(){document.querySelectorAll(".is-last-visible, .is-last-visible-row, .is-last-visible-cell").forEach(function(t){t.classList.remove("is-last-visible","is-last-visible-row","is-last-visible-cell")}),e.sections.forEach(function(t){t.lastVisible.classList.add("is-last-visible")}),e.tables.forEach(function(t){t.lastVisibleRow.classList.add("is-last-visible-row")}),e.rows.forEach(function(t){t.lastVisibleCell.classList.add("is-last-visible-cell")}),setTimeout(function(){t._isUpdating=!1},0)})},i.getVisibleChildren=function(t){var e=this;return Array.from(t.children).filter(function(t){return e.isElementVisible(t)})},i.getVisibleElements=function(t){var e=this;return Array.from(t).filter(function(t){return e.isElementVisible(t)})},i.isElementVisible=function(t){return t._computedStyle&&!t._styleInvalidated||(t._computedStyle=window.getComputedStyle(t),t._styleInvalidated=!1),!t.classList.contains("d-none")&&!t.classList.contains("d-md-none")&&null!==t.offsetParent&&t.offsetHeight>0&&"none"!==t._computedStyle.display},i.destroySectionObserver=function(){this.sectionObserver&&(this.sectionObserver.disconnect(),this.sectionObserver=null),this._updateTimeout&&(clearTimeout(this._updateTimeout),this._updateTimeout=null),this._rafId&&(cancelAnimationFrame(this._rafId),this._rafId=null)},i.initializeFormControls=function(){this._addEventListener(document,"focusin",function(t){var e=t.target.closest(".form-control");if(e&&!e.disabled&&!e.readOnly){var n=e.closest(".input-group");null==n||n.classList.add("input-group-focus")}}),this._addEventListener(document,"focusout",function(t){var e=t.target.closest(".form-control");if(e&&!e.disabled&&!e.readOnly){var n=e.closest(".input-group");null==n||n.classList.remove("input-group-focus")}});var t=function(t){var e=t.querySelector("input, select"),n=!(null==e||!e.value);t.classList.toggle("label-on-top",n)};this._addEventListener(document,"input",function(e){var n=e.target.closest(".form-label-group");n&&t(n)}),this._addEventListener(document,"change",function(e){var n=e.target.closest(".form-label-group");n&&t(n),e.target.matches("select")&&e.target.blur()}),document.querySelectorAll(".form-label-group").forEach(t)},i.initializeTableHandlers=function(){document.querySelectorAll(".table").forEach(function(t){t.querySelector("[data-table-link], [data-table-btn]")&&!t.classList.contains("table-hover")&&t.classList.add("table-hover")}),this._addEventListener(document,"click",function(t){if(t.target.closest("[data-table-link] .table-link-exclude, [data-table-link] input, [data-table-link] button, [data-table-link] a, [data-table-link] label, [data-table-link] .td-col-select"))t.stopPropagation();else{var e=t.target.closest("[data-table-link]");if(e){var n=e.closest("table, .table"),i=e.dataset.tableLink;if(null!=n&&n.classList.contains("bulk-actions-active"))return;t.ctrlKey||t.metaKey?window.open(i,"_blank"):window.location.href=i}if(t.target.closest("[data-table-btn] .table-btn-exclude, [data-table-btn] input, [data-table-btn] button, [data-table-btn] a, [data-table-btn] label, [data-table-btn] .td-col-select"))t.stopPropagation();else{var o=t.target.closest("[data-table-btn]");if(o){var s=o.closest("tr, .tr"),r=o.querySelector("button");if(!r||null!=s&&s.classList.contains("bulk-actions-active"))return;r.click()}}}})},i.initializeButtonGroups=function(){this._addEventListener(document,"click",function(t){var e=t.target.closest(".btn-group-toggle .btn");if(e&&!t.target.matches("input")){var n=e.querySelector("input");n&&(n.click(),n.dispatchEvent(new Event("change",{bubbles:!0})))}t.target.matches(".btn-group-toggle .btn > input")&&t.stopPropagation()}),this._addEventListener(document,"change",function(t){if(t.target.matches('.btn-group-toggle .btn > input[type="radio"]')){var e=t.target.parentElement.closest(".btn-group-toggle");e&&e.querySelectorAll(".btn").forEach(function(t){var e;t.classList.toggle("active",null==(e=t.querySelector("input"))?void 0:e.checked)})}else if(t.target.matches('.btn-group-toggle .btn > input[type="checkbox"]')){t.target.parentElement.classList.toggle("active",t.target.checked)}})},i.initializeTabs=function(){this._addEventListener(document,"click",function(t){var e=t.target.closest(".tabs .tab-item");e&&(t.stopPropagation(),e.closest(".tabs").querySelectorAll(".tab-item").forEach(function(t){return t.classList.remove("active")}),e.classList.add("active"))})},i.unbindEvents=function(){this._eventHandlers.forEach(function(t){var e=t.element,n=t.event,i=t.handler,o=t.options;e.removeEventListener(n,i,o)}),this._eventHandlers=[]},i.refresh=function(){document.querySelectorAll(".form-label-group").forEach(function(t){var e=t.querySelector("input, select"),n=null==e?void 0:e.value;t.classList.toggle("label-on-top",!!n)})},e}(s);
|
|
18
|
-
/*!
|
|
19
|
-
* perfect-scrollbar v1.5.6
|
|
20
|
-
* Copyright 2024 Hyunje Jun, MDBootstrap and Contributors
|
|
21
|
-
* Licensed under MIT
|
|
22
|
-
*/
|
|
23
|
-
function a(t){return getComputedStyle(t)}function l(t,e){for(var n in e){var i=e[n];"number"==typeof i&&(i+="px"),t.style[n]=i}return t}function c(t){var e=document.createElement("div");return e.className=t,e}r.DEFAULTS={observeSections:!0,initFormControls:!0,initTableHandlers:!0,initButtonGroups:!0,initTabs:!0,onInit:null,onDestroy:null};var h="undefined"!=typeof Element&&(Element.prototype.matches||Element.prototype.webkitMatchesSelector||Element.prototype.mozMatchesSelector||Element.prototype.msMatchesSelector);function d(t,e){if(!h)throw new Error("No element matching method supported");return h.call(t,e)}function u(t){t.remove?t.remove():t.parentNode&&t.parentNode.removeChild(t)}function f(t,e){return Array.prototype.filter.call(t.children,function(t){return d(t,e)})}var p="ps",m="ps__rtl",g={thumb:function(t){return"ps__thumb-"+t},rail:function(t){return"ps__rail-"+t},consuming:"ps__child--consume"},v={focus:"ps--focus",clicking:"ps--clicking",active:function(t){return"ps--active-"+t},scrolling:function(t){return"ps--scrolling-"+t}},b={x:null,y:null};function y(t,e){var n=t.element.classList,i=v.scrolling(e);n.contains(i)?clearTimeout(b[e]):n.add(i)}function w(t,e){b[e]=setTimeout(function(){return t.isAlive&&t.element.classList.remove(v.scrolling(e))},t.settings.scrollingThreshold)}var x=function(t){this.element=t,this.handlers={}},C={isEmpty:{configurable:!0}};x.prototype.bind=function(t,e){"undefined"==typeof this.handlers[t]&&(this.handlers[t]=[]),this.handlers[t].push(e),this.element.addEventListener(t,e,!1)},x.prototype.unbind=function(t,e){var n=this;this.handlers[t]=this.handlers[t].filter(function(i){return!(!e||i===e)||(n.element.removeEventListener(t,i,!1),!1)})},x.prototype.unbindAll=function(){for(var t in this.handlers)this.unbind(t)},C.isEmpty.get=function(){var t=this;return Object.keys(this.handlers).every(function(e){return 0===t.handlers[e].length})},Object.defineProperties(x.prototype,C);var E=function(){this.eventElements=[]};function T(t){if("function"==typeof window.CustomEvent)return new CustomEvent(t);var e=document.createEvent("CustomEvent");return e.initCustomEvent(t,!1,!1,void 0),e}function S(t,e,n,i,o){var s;if(void 0===i&&(i=!0),void 0===o&&(o=!1),"top"===e)s=["contentHeight","containerHeight","scrollTop","y","up","down"];else{if("left"!==e)throw new Error("A proper axis should be provided");s=["contentWidth","containerWidth","scrollLeft","x","left","right"]}!function(t,e,n,i,o){var s=n[0],r=n[1],a=n[2],l=n[3],c=n[4],h=n[5];void 0===i&&(i=!0);void 0===o&&(o=!1);var d=t.element;t.reach[l]=null,d[a]<1&&(t.reach[l]="start");d[a]>t[s]-t[r]-1&&(t.reach[l]="end");e&&(d.dispatchEvent(T("ps-scroll-"+l)),e<0?d.dispatchEvent(T("ps-scroll-"+c)):e>0&&d.dispatchEvent(T("ps-scroll-"+h)),i&&function(t,e){y(t,e),w(t,e)}(t,l));t.reach[l]&&(e||o)&&d.dispatchEvent(T("ps-"+l+"-reach-"+t.reach[l]))}(t,n,s,i,o)}function k(t){return parseInt(t,10)||0}E.prototype.eventElement=function(t){var e=this.eventElements.filter(function(e){return e.element===t})[0];return e||(e=new x(t),this.eventElements.push(e)),e},E.prototype.bind=function(t,e,n){this.eventElement(t).bind(e,n)},E.prototype.unbind=function(t,e,n){var i=this.eventElement(t);i.unbind(e,n),i.isEmpty&&this.eventElements.splice(this.eventElements.indexOf(i),1)},E.prototype.unbindAll=function(){this.eventElements.forEach(function(t){return t.unbindAll()}),this.eventElements=[]},E.prototype.once=function(t,e,n){var i=this.eventElement(t),o=function(t){i.unbind(e,o),n(t)};i.bind(e,o)};var A={isWebKit:"undefined"!=typeof document&&"WebkitAppearance"in document.documentElement.style,supportsTouch:"undefined"!=typeof window&&("ontouchstart"in window||"maxTouchPoints"in window.navigator&&window.navigator.maxTouchPoints>0||window.DocumentTouch&&document instanceof window.DocumentTouch),supportsIePointer:"undefined"!=typeof navigator&&navigator.msMaxTouchPoints,isChrome:"undefined"!=typeof navigator&&/Chrome/i.test(navigator&&navigator.userAgent)};function I(t){var e=t.element,n=Math.floor(e.scrollTop),i=e.getBoundingClientRect();t.containerWidth=Math.floor(i.width),t.containerHeight=Math.floor(i.height),t.contentWidth=e.scrollWidth,t.contentHeight=e.scrollHeight,e.contains(t.scrollbarXRail)||(f(e,g.rail("x")).forEach(function(t){return u(t)}),e.appendChild(t.scrollbarXRail)),e.contains(t.scrollbarYRail)||(f(e,g.rail("y")).forEach(function(t){return u(t)}),e.appendChild(t.scrollbarYRail)),!t.settings.suppressScrollX&&t.containerWidth+t.settings.scrollXMarginOffset<t.contentWidth?(t.scrollbarXActive=!0,t.railXWidth=t.containerWidth-t.railXMarginWidth,t.railXRatio=t.containerWidth/t.railXWidth,t.scrollbarXWidth=L(t,k(t.railXWidth*t.containerWidth/t.contentWidth)),t.scrollbarXLeft=k((t.negativeScrollAdjustment+e.scrollLeft)*(t.railXWidth-t.scrollbarXWidth)/(t.contentWidth-t.containerWidth))):t.scrollbarXActive=!1,!t.settings.suppressScrollY&&t.containerHeight+t.settings.scrollYMarginOffset<t.contentHeight?(t.scrollbarYActive=!0,t.railYHeight=t.containerHeight-t.railYMarginHeight,t.railYRatio=t.containerHeight/t.railYHeight,t.scrollbarYHeight=L(t,k(t.railYHeight*t.containerHeight/t.contentHeight)),t.scrollbarYTop=k(n*(t.railYHeight-t.scrollbarYHeight)/(t.contentHeight-t.containerHeight))):t.scrollbarYActive=!1,t.scrollbarXLeft>=t.railXWidth-t.scrollbarXWidth&&(t.scrollbarXLeft=t.railXWidth-t.scrollbarXWidth),t.scrollbarYTop>=t.railYHeight-t.scrollbarYHeight&&(t.scrollbarYTop=t.railYHeight-t.scrollbarYHeight),function(t,e){var n={width:e.railXWidth},i=Math.floor(t.scrollTop);e.isRtl?n.left=e.negativeScrollAdjustment+t.scrollLeft+e.containerWidth-e.contentWidth:n.left=t.scrollLeft;e.isScrollbarXUsingBottom?n.bottom=e.scrollbarXBottom-i:n.top=e.scrollbarXTop+i;l(e.scrollbarXRail,n);var o={top:i,height:e.railYHeight};e.isScrollbarYUsingRight?e.isRtl?o.right=e.contentWidth-(e.negativeScrollAdjustment+t.scrollLeft)-e.scrollbarYRight-e.scrollbarYOuterWidth-9:o.right=e.scrollbarYRight-t.scrollLeft:e.isRtl?o.left=e.negativeScrollAdjustment+t.scrollLeft+2*e.containerWidth-e.contentWidth-e.scrollbarYLeft-e.scrollbarYOuterWidth:o.left=e.scrollbarYLeft+t.scrollLeft;l(e.scrollbarYRail,o),l(e.scrollbarX,{left:e.scrollbarXLeft,width:e.scrollbarXWidth-e.railBorderXWidth}),l(e.scrollbarY,{top:e.scrollbarYTop,height:e.scrollbarYHeight-e.railBorderYWidth})}(e,t),t.scrollbarXActive?e.classList.add(v.active("x")):(e.classList.remove(v.active("x")),t.scrollbarXWidth=0,t.scrollbarXLeft=0,e.scrollLeft=!0===t.isRtl?t.contentWidth:0),t.scrollbarYActive?e.classList.add(v.active("y")):(e.classList.remove(v.active("y")),t.scrollbarYHeight=0,t.scrollbarYTop=0,e.scrollTop=0)}function L(t,e){return t.settings.minScrollbarLength&&(e=Math.max(e,t.settings.minScrollbarLength)),t.settings.maxScrollbarLength&&(e=Math.min(e,t.settings.maxScrollbarLength)),e}var _=null;function D(t,e){var n=e[0],i=e[1],o=e[2],s=e[3],r=e[4],a=e[5],l=e[6],c=e[7],h=e[8],d=t.element,u=null,f=null,p=null;function m(e){e.touches&&e.touches[0]&&(e[o]=e.touches[0]["page"+c.toUpperCase()]),_===r&&(d[l]=u+p*(e[o]-f),y(t,c),I(t),e.stopPropagation(),e.preventDefault())}function g(){w(t,c),t[h].classList.remove(v.clicking),document.removeEventListener("mousemove",m),document.removeEventListener("mouseup",g),document.removeEventListener("touchmove",m),document.removeEventListener("touchend",g),_=null}function b(e){null===_&&(_=r,u=d[l],e.touches&&(e[o]=e.touches[0]["page"+c.toUpperCase()]),f=e[o],p=(t[i]-t[n])/(t[s]-t[a]),e.touches?(document.addEventListener("touchmove",m,{passive:!1}),document.addEventListener("touchend",g)):(document.addEventListener("mousemove",m),document.addEventListener("mouseup",g)),t[h].classList.add(v.clicking)),e.stopPropagation(),e.cancelable&&e.preventDefault()}t[r].addEventListener("mousedown",b),t[r].addEventListener("touchstart",b)}var M={"click-rail":function(t){t.event.bind(t.scrollbarY,"mousedown",function(t){return t.stopPropagation()}),t.event.bind(t.scrollbarYRail,"mousedown",function(e){var n=e.pageY-window.pageYOffset-t.scrollbarYRail.getBoundingClientRect().top>t.scrollbarYTop?1:-1;t.element.scrollTop+=n*t.containerHeight,I(t),e.stopPropagation()}),t.event.bind(t.scrollbarX,"mousedown",function(t){return t.stopPropagation()}),t.event.bind(t.scrollbarXRail,"mousedown",function(e){var n=e.pageX-window.pageXOffset-t.scrollbarXRail.getBoundingClientRect().left>t.scrollbarXLeft?1:-1;t.element.scrollLeft+=n*t.containerWidth,I(t),e.stopPropagation()})},"drag-thumb":function(t){D(t,["containerHeight","contentHeight","pageY","railYHeight","scrollbarY","scrollbarYHeight","scrollTop","y","scrollbarYRail"]),D(t,["containerWidth","contentWidth","pageX","railXWidth","scrollbarX","scrollbarXWidth","scrollLeft","x","scrollbarXRail"])},keyboard:function(t){var e=t.element;t.event.bind(t.ownerDocument,"keydown",function(n){if(!(n.isDefaultPrevented&&n.isDefaultPrevented()||n.defaultPrevented)&&(d(e,":hover")||d(t.scrollbarX,":focus")||d(t.scrollbarY,":focus"))){var i,o=document.activeElement?document.activeElement:t.ownerDocument.activeElement;if(o){if("IFRAME"===o.tagName)o=o.contentDocument.activeElement;else for(;o.shadowRoot;)o=o.shadowRoot.activeElement;if(d(i=o,"input,[contenteditable]")||d(i,"select,[contenteditable]")||d(i,"textarea,[contenteditable]")||d(i,"button,[contenteditable]"))return}var s=0,r=0;switch(n.which){case 37:s=n.metaKey?-t.contentWidth:n.altKey?-t.containerWidth:-30;break;case 38:r=n.metaKey?t.contentHeight:n.altKey?t.containerHeight:30;break;case 39:s=n.metaKey?t.contentWidth:n.altKey?t.containerWidth:30;break;case 40:r=n.metaKey?-t.contentHeight:n.altKey?-t.containerHeight:-30;break;case 32:r=n.shiftKey?t.containerHeight:-t.containerHeight;break;case 33:r=t.containerHeight;break;case 34:r=-t.containerHeight;break;case 36:r=t.contentHeight;break;case 35:r=-t.contentHeight;break;default:return}t.settings.suppressScrollX&&0!==s||t.settings.suppressScrollY&&0!==r||(e.scrollTop-=r,e.scrollLeft+=s,I(t),function(n,i){var o=Math.floor(e.scrollTop);if(0===n){if(!t.scrollbarYActive)return!1;if(0===o&&i>0||o>=t.contentHeight-t.containerHeight&&i<0)return!t.settings.wheelPropagation}var s=e.scrollLeft;if(0===i){if(!t.scrollbarXActive)return!1;if(0===s&&n<0||s>=t.contentWidth-t.containerWidth&&n>0)return!t.settings.wheelPropagation}return!0}(s,r)&&n.preventDefault())}})},wheel:function(t){var e=t.element;function n(n){var i=function(t){var e=t.deltaX,n=-1*t.deltaY;return"undefined"!=typeof e&&"undefined"!=typeof n||(e=-1*t.wheelDeltaX/6,n=t.wheelDeltaY/6),t.deltaMode&&1===t.deltaMode&&(e*=10,n*=10),e!=e&&n!=n&&(e=0,n=t.wheelDelta),t.shiftKey?[-n,-e]:[e,n]}(n),o=i[0],s=i[1];if(!function(t,n,i){if(!A.isWebKit&&e.querySelector("select:focus"))return!0;if(!e.contains(t))return!1;for(var o=t;o&&o!==e;){if(o.classList.contains(g.consuming))return!0;var s=a(o);if(i&&s.overflowY.match(/(scroll|auto)/)){var r=o.scrollHeight-o.clientHeight;if(r>0&&(o.scrollTop>0&&i<0||o.scrollTop<r&&i>0))return!0}if(n&&s.overflowX.match(/(scroll|auto)/)){var l=o.scrollWidth-o.clientWidth;if(l>0&&(o.scrollLeft>0&&n<0||o.scrollLeft<l&&n>0))return!0}o=o.parentNode}return!1}(n.target,o,s)){var r=!1;t.settings.useBothWheelAxes?t.scrollbarYActive&&!t.scrollbarXActive?(s?e.scrollTop-=s*t.settings.wheelSpeed:e.scrollTop+=o*t.settings.wheelSpeed,r=!0):t.scrollbarXActive&&!t.scrollbarYActive&&(o?e.scrollLeft+=o*t.settings.wheelSpeed:e.scrollLeft-=s*t.settings.wheelSpeed,r=!0):(e.scrollTop-=s*t.settings.wheelSpeed,e.scrollLeft+=o*t.settings.wheelSpeed),I(t),r=r||function(n,i){var o=Math.floor(e.scrollTop),s=0===e.scrollTop,r=o+e.offsetHeight===e.scrollHeight,a=0===e.scrollLeft,l=e.scrollLeft+e.offsetWidth===e.scrollWidth;return!(Math.abs(i)>Math.abs(n)?s||r:a||l)||!t.settings.wheelPropagation}(o,s),r&&!n.ctrlKey&&(n.stopPropagation(),n.preventDefault())}}"undefined"!=typeof window.onwheel?t.event.bind(e,"wheel",n):"undefined"!=typeof window.onmousewheel&&t.event.bind(e,"mousewheel",n)},touch:function(t){if(A.supportsTouch||A.supportsIePointer){var e=t.element,n={startOffset:{},startTime:0,speed:{},easingLoop:null};A.supportsTouch?(t.event.bind(e,"touchstart",r),t.event.bind(e,"touchmove",l),t.event.bind(e,"touchend",c)):A.supportsIePointer&&(window.PointerEvent?(t.event.bind(e,"pointerdown",r),t.event.bind(e,"pointermove",l),t.event.bind(e,"pointerup",c)):window.MSPointerEvent&&(t.event.bind(e,"MSPointerDown",r),t.event.bind(e,"MSPointerMove",l),t.event.bind(e,"MSPointerUp",c)))}function i(n,i){e.scrollTop-=i,e.scrollLeft-=n,I(t)}function o(t){return t.targetTouches?t.targetTouches[0]:t}function s(e){return e.target!==t.scrollbarX&&e.target!==t.scrollbarY&&((!e.pointerType||"pen"!==e.pointerType||0!==e.buttons)&&(!(!e.targetTouches||1!==e.targetTouches.length)||!(!e.pointerType||"mouse"===e.pointerType||e.pointerType===e.MSPOINTER_TYPE_MOUSE)))}function r(t){if(s(t)){var e=o(t);n.startOffset.pageX=e.pageX,n.startOffset.pageY=e.pageY,n.startTime=(new Date).getTime(),null!==n.easingLoop&&clearInterval(n.easingLoop)}}function l(r){if(s(r)){var l=o(r),c={pageX:l.pageX,pageY:l.pageY},h=c.pageX-n.startOffset.pageX,d=c.pageY-n.startOffset.pageY;if(function(t,n,i){if(!e.contains(t))return!1;for(var o=t;o&&o!==e;){if(o.classList.contains(g.consuming))return!0;var s=a(o);if(i&&s.overflowY.match(/(scroll|auto)/)){var r=o.scrollHeight-o.clientHeight;if(r>0&&(o.scrollTop>0&&i<0||o.scrollTop<r&&i>0))return!0}if(n&&s.overflowX.match(/(scroll|auto)/)){var l=o.scrollWidth-o.clientWidth;if(l>0&&(o.scrollLeft>0&&n<0||o.scrollLeft<l&&n>0))return!0}o=o.parentNode}return!1}(r.target,h,d))return;i(h,d),n.startOffset=c;var u=(new Date).getTime(),f=u-n.startTime;f>0&&(n.speed.x=h/f,n.speed.y=d/f,n.startTime=u),function(n,i){var o=Math.floor(e.scrollTop),s=e.scrollLeft,r=Math.abs(n),a=Math.abs(i);if(a>r){if(i<0&&o===t.contentHeight-t.containerHeight||i>0&&0===o)return 0===window.scrollY&&i>0&&A.isChrome}else if(r>a&&(n<0&&s===t.contentWidth-t.containerWidth||n>0&&0===s))return!0;return!0}(h,d)&&r.cancelable&&r.preventDefault()}}function c(){t.settings.swipeEasing&&(clearInterval(n.easingLoop),n.easingLoop=setInterval(function(){t.isInitialized?clearInterval(n.easingLoop):n.speed.x||n.speed.y?Math.abs(n.speed.x)<.01&&Math.abs(n.speed.y)<.01?clearInterval(n.easingLoop):(i(30*n.speed.x,30*n.speed.y),n.speed.x*=.8,n.speed.y*=.8):clearInterval(n.easingLoop)},10))}}},H=function(t,e){var n=this;if(void 0===e&&(e={}),"string"==typeof t&&(t=document.querySelector(t)),!t||!t.nodeName)throw new Error("no element is specified to initialize PerfectScrollbar");for(var i in this.element=t,t.classList.add(p),this.settings={handlers:["click-rail","drag-thumb","keyboard","wheel","touch"],maxScrollbarLength:null,minScrollbarLength:null,scrollingThreshold:1e3,scrollXMarginOffset:0,scrollYMarginOffset:0,suppressScrollX:!1,suppressScrollY:!1,swipeEasing:!0,useBothWheelAxes:!1,wheelPropagation:!0,wheelSpeed:1},e)this.settings[i]=e[i];this.containerWidth=null,this.containerHeight=null,this.contentWidth=null,this.contentHeight=null;var o,s,r=function(){return t.classList.add(v.focus)},h=function(){return t.classList.remove(v.focus)};this.isRtl="rtl"===a(t).direction,!0===this.isRtl&&t.classList.add(m),this.isNegativeScroll=(s=t.scrollLeft,t.scrollLeft=-1,o=t.scrollLeft<0,t.scrollLeft=s,o),this.negativeScrollAdjustment=this.isNegativeScroll?t.scrollWidth-t.clientWidth:0,this.event=new E,this.ownerDocument=t.ownerDocument||document,this.scrollbarXRail=c(g.rail("x")),t.appendChild(this.scrollbarXRail),this.scrollbarX=c(g.thumb("x")),this.scrollbarXRail.appendChild(this.scrollbarX),this.scrollbarX.setAttribute("tabindex",0),this.event.bind(this.scrollbarX,"focus",r),this.event.bind(this.scrollbarX,"blur",h),this.scrollbarXActive=null,this.scrollbarXWidth=null,this.scrollbarXLeft=null;var d=a(this.scrollbarXRail);this.scrollbarXBottom=parseInt(d.bottom,10),isNaN(this.scrollbarXBottom)?(this.isScrollbarXUsingBottom=!1,this.scrollbarXTop=k(d.top)):this.isScrollbarXUsingBottom=!0,this.railBorderXWidth=k(d.borderLeftWidth)+k(d.borderRightWidth),l(this.scrollbarXRail,{display:"block"}),this.railXMarginWidth=k(d.marginLeft)+k(d.marginRight),l(this.scrollbarXRail,{display:""}),this.railXWidth=null,this.railXRatio=null,this.scrollbarYRail=c(g.rail("y")),t.appendChild(this.scrollbarYRail),this.scrollbarY=c(g.thumb("y")),this.scrollbarYRail.appendChild(this.scrollbarY),this.scrollbarY.setAttribute("tabindex",0),this.event.bind(this.scrollbarY,"focus",r),this.event.bind(this.scrollbarY,"blur",h),this.scrollbarYActive=null,this.scrollbarYHeight=null,this.scrollbarYTop=null;var u=a(this.scrollbarYRail);this.scrollbarYRight=parseInt(u.right,10),isNaN(this.scrollbarYRight)?(this.isScrollbarYUsingRight=!1,this.scrollbarYLeft=k(u.left)):this.isScrollbarYUsingRight=!0,this.scrollbarYOuterWidth=this.isRtl?function(t){var e=a(t);return k(e.width)+k(e.paddingLeft)+k(e.paddingRight)+k(e.borderLeftWidth)+k(e.borderRightWidth)}(this.scrollbarY):null,this.railBorderYWidth=k(u.borderTopWidth)+k(u.borderBottomWidth),l(this.scrollbarYRail,{display:"block"}),this.railYMarginHeight=k(u.marginTop)+k(u.marginBottom),l(this.scrollbarYRail,{display:""}),this.railYHeight=null,this.railYRatio=null,this.reach={x:t.scrollLeft<=0?"start":t.scrollLeft>=this.contentWidth-this.containerWidth?"end":null,y:t.scrollTop<=0?"start":t.scrollTop>=this.contentHeight-this.containerHeight?"end":null},this.isAlive=!0,this.settings.handlers.forEach(function(t){return M[t](n)}),this.lastScrollTop=Math.floor(t.scrollTop),this.lastScrollLeft=t.scrollLeft,this.event.bind(this.element,"scroll",function(t){return n.onScroll(t)}),I(this)};H.prototype.update=function(){this.isAlive&&(this.negativeScrollAdjustment=this.isNegativeScroll?this.element.scrollWidth-this.element.clientWidth:0,l(this.scrollbarXRail,{display:"block"}),l(this.scrollbarYRail,{display:"block"}),this.railXMarginWidth=k(a(this.scrollbarXRail).marginLeft)+k(a(this.scrollbarXRail).marginRight),this.railYMarginHeight=k(a(this.scrollbarYRail).marginTop)+k(a(this.scrollbarYRail).marginBottom),l(this.scrollbarXRail,{display:"none"}),l(this.scrollbarYRail,{display:"none"}),I(this),S(this,"top",0,!1,!0),S(this,"left",0,!1,!0),l(this.scrollbarXRail,{display:""}),l(this.scrollbarYRail,{display:""}))},H.prototype.onScroll=function(t){this.isAlive&&(I(this),S(this,"top",this.element.scrollTop-this.lastScrollTop),S(this,"left",this.element.scrollLeft-this.lastScrollLeft),this.lastScrollTop=Math.floor(this.element.scrollTop),this.lastScrollLeft=this.element.scrollLeft)},H.prototype.destroy=function(){this.isAlive&&(this.event.unbindAll(),u(this.scrollbarX),u(this.scrollbarY),u(this.scrollbarXRail),u(this.scrollbarYRail),this.removePsClasses(),this.element=null,this.scrollbarX=null,this.scrollbarY=null,this.scrollbarXRail=null,this.scrollbarYRail=null,this.isAlive=!1)},H.prototype.removePsClasses=function(){this.element.className=this.element.className.split(" ").filter(function(t){return!t.match(/^ps([-_].+|)$/)}).join(" ")},"undefined"==typeof window||window.PerfectScrollbar||(window.PerfectScrollbar=H);var N=function(t){function e(n,i){var o;return(o=t.call(this)||this).opts={},window.Cool&&window.Cool.settings&&window.Cool.settings.sidebar?$.extend(!0,o.opts,e.DEFAULTS,window.Cool.settings.sidebar,i):$.extend(!0,o.opts,e.DEFAULTS,i),o.el=n,o.init(),o}n(e,t);var i=e.prototype;return i.init=function(){this.buildCache(),this.bindEvents(),this.initializeScrollbars(),this.initializeTabs(),this.onInit()},i.destroy=function(){this.unbindEvents(),this.destroyScrollbars(),this.onDestroy()},i.buildCache=function(){this.$el=$(this.el),this.el=this.$el[0],this.$content=this.$el.find(".sidebar-content"),this.content=this.$content[0],this.$toggler=$(".sidebar-left-toggler"),this.toggler=this.$toggler[0],this.isFloating=this.$el.hasClass("sidebar-floating"),this.isOpen=document.body.classList.contains("sidebar-left-open"),this.$tabs=this.$el.find(".sidebar-tab"),this.$tabSelectors=$('[name="sidebar-tab-select"]')},i.bindEvents=function(){var t,e=this;(this._toggleHandler=function(t){var n=t.target.closest(".sidebar-left-toggler");n&&e.handleToggle(t,n)},this._mousedownHandler=function(t){if(t.target.matches(".sidebar-content .ps__thumb-y")){var n=t.target.closest(".sidebar-content");null==n||n.classList.add("ps-mousedown-scroll"),e.mousedownScrollbar=!0}},this._mouseupHandler=function(){e.mousedownScrollbar&&(document.querySelectorAll(".sidebar-content.ps-mousedown-scroll").forEach(function(t){return t.classList.remove("ps-mousedown-scroll")}),e.mousedownScrollbar=!1)},this._tabSelectHandler=function(t){t.target.matches('[name="sidebar-tab-select"]')&&e.switchTab(t.target.value)},this._collapseClickHandler=function(t){var n=t.target.closest('[data-toggle="collapse"]');if(n){var i=n.dataset.breakpoint;if(i&&window.matchMedia("(min-width: "+i+"px)").matches){var o,s,r=(null==(o=n.nextElementSibling)?void 0:o.querySelector("li a"))||(null==(s=n.parentElement.nextElementSibling)?void 0:s.querySelector("li a"));r&&(t.metaKey||t.ctrlKey?window.open(r.href,"_blank").focus():window.location.href=r.href)}else setTimeout(function(){var t;return null==(t=e.scrollbar)?void 0:t.update()},300)}},window.ResizeObserver)?(this.resizeObserver=new ResizeObserver(function(t){e.rafId&&cancelAnimationFrame(e.rafId),e.rafId=requestAnimationFrame(function(){window.innerWidth>e.opts.breakpoint&&e.removeBackdrop()})}),this.resizeObserver.observe(document.body)):(this._resizeHandler=function(){clearTimeout(t);var n=performance.now();!e.lastResizeTime||n-e.lastResizeTime>100?(window.innerWidth>e.opts.breakpoint&&e.removeBackdrop(),e.lastResizeTime=n):t=setTimeout(function(){window.innerWidth>e.opts.breakpoint&&e.removeBackdrop()},16)},window.addEventListener("resize",this._resizeHandler,{passive:!0}));document.addEventListener("click",this._toggleHandler),document.addEventListener("click",this._tabSelectHandler),document.addEventListener("mousedown",this._mousedownHandler),document.addEventListener("mouseup",this._mouseupHandler),this.content&&this.content.addEventListener("click",this._collapseClickHandler)},i.unbindEvents=function(){document.removeEventListener("click",this._toggleHandler),document.removeEventListener("click",this._tabSelectHandler),document.removeEventListener("mousedown",this._mousedownHandler),document.removeEventListener("mouseup",this._mouseupHandler),this.resizeObserver&&(this.resizeObserver.disconnect(),this.resizeObserver=null),this.rafId&&(cancelAnimationFrame(this.rafId),this.rafId=null),this._resizeHandler&&(window.removeEventListener("resize",this._resizeHandler),this._resizeHandler=null),this.content&&this.content.removeEventListener("click",this._collapseClickHandler)},i.initializeScrollbars=function(){this.content&&(this.scrollbar=new H(this.content,{wheelSpeed:this.opts.wheelSpeed,wheelPropagation:this.opts.wheelPropagation,minScrollbarLength:this.opts.minScrollbarLength,suppressScrollX:this.opts.suppressScrollX}))},i.initializeTabs=function(){var t=this;this.tabScrollbars=new Map,this.$tabs.each(function(e,n){var i=n.querySelector(".tab-content");if(i){var o=new H(i,{wheelSpeed:t.opts.wheelSpeed,wheelPropagation:t.opts.wheelPropagation,minScrollbarLength:t.opts.minScrollbarLength,suppressScrollX:t.opts.suppressScrollX});t.tabScrollbars.set(n,o)}})},i.destroyScrollbars=function(){this.scrollbar&&(this.scrollbar.destroy(),this.scrollbar=null),this.tabScrollbars.forEach(function(t){return t.destroy()}),this.tabScrollbars.clear()},i.toggleWithTransition=function(t){var e=document.documentElement;e.classList.add("sidebar-transitioning"),"open"===t?(document.body.classList.add("sidebar-left-open"),this.isFloating&&window.innerWidth<=this.opts.breakpoint&&this.createBackdrop()):(document.body.classList.remove("sidebar-left-open"),this.removeBackdrop()),setTimeout(function(){e.classList.remove("sidebar-transitioning")},330)},i.createBackdrop=function(){var t=this;if(!document.querySelector(".sidebar-backdrop")){var e=document.createElement("div");e.className="sidebar-backdrop",e.addEventListener("click",function(){t.toggleWithTransition("close"),t.toggler&&(t.toggler.classList.remove("open"),null!==t.toggler.ariaExpanded&&(t.toggler.ariaExpanded="false"))});var n=document.querySelector(".site-main");n&&(n.appendChild(e),requestAnimationFrame(function(){e.classList.add("show")}))}},i.removeBackdrop=function(){var t=document.querySelector(".sidebar-backdrop");t&&(t.classList.remove("show"),t.addEventListener("transitionend",function(){t.remove()},{once:!0}),setTimeout(function(){null==t||t.remove()},330))},i.handleToggle=function(t,e){if(t.stopPropagation(),e){null!==e.ariaExpanded&&(e.ariaExpanded="true"!==e.ariaExpanded),e.classList.toggle("open");var n=document.body.classList.contains("sidebar-left-open");this.toggleWithTransition(n?"close":"open"),n?this.onClose():this.onShow()}},i.switchTab=function(t){var e=document.getElementById("sidebar-tab-"+t);if(e){var n=this.$tabs.toArray();n.forEach(function(t){if(t.classList.toggle("active",t===e),t!==e){var i=t.querySelector(".tab-content");if(i)if(t===n[0])i.style.transform="translate3d(100%, 0px, 0px)";else if(t===n[n.length-1])i.style.transform="translate3d(-100%, 0px, 0px)";else{var o=n.indexOf(t)<n.indexOf(e);i.style.transform="translate3d("+(o?"-100%":"100%")+", 0px, 0px)"}}});var i=e.querySelector(".tab-content");i&&(i.style.transform="none"),this.$tabSelectors.each(function(){$(this).toggleClass("active",this.value===t)})}},i.toggle=function(){var t=document.body.classList.contains("sidebar-left-open");this.toggleWithTransition(t?"close":"open")},i.open=function(){document.body.classList.contains("sidebar-left-open")||this.toggleWithTransition("open")},i.close=function(){document.body.classList.contains("sidebar-left-open")&&this.toggleWithTransition("close")},e}(s);N.DEFAULTS={floating:!0,breakpoint:1046,wheelSpeed:2,wheelPropagation:!0,minScrollbarLength:20,suppressScrollX:!0,onInit:null,onDestroy:null,onShow:null,onClose:null};var O=function(){function t(){var t=this;this.handleWindowResize=function(){t.rafId&&cancelAnimationFrame(t.rafId),t.rafId=requestAnimationFrame(function(){t.windowCallbacks.forEach(function(t){t({target:window,contentRect:{width:window.innerWidth,height:window.innerHeight}})})})},this.callbacks=new WeakMap,this.observer=null,this.rafId=null,this.windowCallbacks=new Set,this.isWindowListening=!1}var e=t.prototype;return e.observe=function(t,e){var n=this;this.observer||(this.observer=new ResizeObserver(function(t){n.rafId&&cancelAnimationFrame(n.rafId),n.rafId=requestAnimationFrame(function(){t.forEach(function(t){var e=n.callbacks.get(t.target);e&&e(t)})})})),this.callbacks.set(t,e),this.observer.observe(t),this.windowCallbacks.add(e),this.isWindowListening||this.startWindowListening()},e.unobserve=function(t){if(this.observer){this.observer.unobserve(t);var e=this.callbacks.get(t);e&&this.windowCallbacks.delete(e),this.callbacks.delete(t),0===this.windowCallbacks.size&&this.stopWindowListening()}},e.startWindowListening=function(){this.isWindowListening=!0,window.addEventListener("resize",this.handleWindowResize,{passive:!0})},e.stopWindowListening=function(){this.isWindowListening=!1,window.removeEventListener("resize",this.handleWindowResize)},e.disconnect=function(){this.observer&&(this.observer.disconnect(),this.callbacks=new WeakMap),this.rafId&&(cancelAnimationFrame(this.rafId),this.rafId=null),this.windowCallbacks.clear(),this.stopWindowListening()},t}(),j=function(){function t(){var t=this;this.handleScroll=function(){t.rafId&&cancelAnimationFrame(t.rafId),t.rafId=requestAnimationFrame(function(){t.callbacks.forEach(function(t){return t()})})},this.callbacks=new Map,this.rafId=null,this.isListening=!1}var e=t.prototype;return e.add=function(t,e){this.callbacks.set(t,e),this.isListening||this.startListening()},e.remove=function(t){this.callbacks.delete(t),0===this.callbacks.size&&this.stopListening()},e.startListening=function(){this.isListening=!0;var t=document.querySelector(".site-main .content");t?(this.scrollElement=t,this.scrollElement.addEventListener("scroll",this.handleScroll,{passive:!0})):(this.scrollElement=window,window.addEventListener("scroll",this.handleScroll,{passive:!0}))},e.stopListening=function(){this.isListening=!1,this.scrollElement&&(this.scrollElement.removeEventListener("scroll",this.handleScroll),this.scrollElement=null),this.rafId&&(cancelAnimationFrame(this.rafId),this.rafId=null)},t}(),z=new O,W=new j,P=function(t,e,n){var i;return function(){var n=this,o=arguments;clearTimeout(i),i=setTimeout(function(){i=null,t.apply(n,o)},e)}},R=function(){var t=!1;return("ontouchstart"in window||window.DocumentTouch&&document instanceof DocumentTouch)&&(t=!0),t},q=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){var e=16*Math.random()|0;return("x"===t?e:3&e|8).toString(16)})},F=function(t,e){var n=t&&t.jquery?t[0]:t;return n?new Promise(function(t){var i,o=["animation",e];(i=n.classList).add.apply(i,o),n.addEventListener("animationend",function e(i){var s;i.stopPropagation(),(s=n.classList).remove.apply(s,o),n.removeEventListener("animationend",e),t()},{once:!0})}):Promise.resolve()},X=function(t){return{"&":"&","<":"<",">":">",'"':""","'":"'","`":"`","=":"="}[t]},Y=function(t){if("string"!=typeof t){if(null===t)return"";if(!t)return String(t);t=String(t)}return/[&<>"'`=]/.test(t)?t.replace(/[&<>"'`=]/g,X):t},B=function(t){function e(e,n){var i;return(i=t.call(this)||this).opts={},window.Cool.settings.popover?$.extend(!0,i.opts,$.fn[i.constructor.NAME].defaults,window.Cool.settings.popover,n):$.extend(!0,i.opts,$.fn[i.constructor.NAME].defaults,n),i.el=e,i.init(),i}n(e,t),e._jQueryInterface=function(t){return this.each(function(){var n=$(this),i=n.data("plugin_"+e.NAME);i||(i=new e(this,"object"==typeof t&&t),n.data("plugin_"+e.NAME,i)),"string"==typeof t&&i[t]()})},e._jQueryInit=function(){if($.fn){var t=$.fn[e.NAME];$.fn[e.NAME]=e._jQueryInterface,$.fn[e.NAME].Constructor=e,$.fn[e.NAME].defaults=e.DEFAULTS||{},$.fn[e.NAME].noConflict=function(){return $.fn[e.NAME]=t,e._jQueryInterface}}};var i=e.prototype;return i.init=function(){this.buildCache(),this.bindEvents(),this.onInit()},i.destroy=function(){this.unbindEvents(),this.$popover&&(this.$popover.remove(),this.$popover=null),this.$el.removeData("plugin_"+this.constructor.NAME),this.onDestroy()},i.update=function(){this.buildCache(),this.$popover&&this.setPosition(),this.onUpdate()},i.buildCache=function(){this.$el=$(this.el),this.$container=this.$el.data("container")?$(this.$el.data("container")):$(this.opts.container),this.containerAutoDetect=this.$el.data("containerAutoDetect")?this.$el.data("containerAutoDetect"):this.opts.containerAutoDetect,this.id="popover-"+q(),this.trigger=this.$el.data("trigger")?this.$el.data("trigger"):this.opts.trigger,this.placement=this.$el.data("placement")?this.$el.data("placement"):this.opts.placement,this.align=this.$el.data("align")?this.$el.data("align"):this.opts.align,this.title=this.$el.data("title")?this.$el.data("title"):this.opts.title,this.content=this.$el.data("content")?this.$el.data("content"):this.opts.content,this.offset=this.$el.data("offset")?this.$el.data("offset"):this.opts.offset,this.collisionDetection=!1!==this.$el.data("collisionDetection")?this.$el.data("collisionDetection"):this.opts.collisionDetection,this.containerAutoDetect&&(this.$container=this.$el.offsetParent())},i.bindEvents=function(){var t=this;"click"===this.trigger?this.$el.on("click."+this.constructor.NAME,function(){t.$popover?t.close():t.show()}):"hover"===this.trigger?(this.$el.on("mouseenter."+this.constructor.NAME,function(){clearTimeout(t.hoverTimeout),t.show()}),this.$el.on("mouseleave."+this.constructor.NAME,function(){t.hoverTimeout=setTimeout(function(){t.popupHasFocus||t.close()},100)})):"focus"===this.trigger&&(this.$el.on("focusin."+this.constructor.NAME,function(){t.show()}),this.$el.on("focusout."+this.constructor.NAME,function(){t.close()})),window.ResizeObserver&&(this._resizeCallback=function(){t.$popover&&t.$popover.hasClass("show")&&requestAnimationFrame(function(){t.setPosition()})},z.observe(this.el,this._resizeCallback))},i.unbindEvents=function(){this.$el.off("."+this.constructor.NAME),this._resizeCallback&&(z.unobserve(this.el),this._resizeCallback=null)},i.buildPopover=function(){var t,e=this;t="function"==typeof this.content?this.content():this.content,this.$popover=$('\n <div class="popover" role="tooltip" id="'+this.id+'">\n <h3 class="popover-header">'+this.title+'</h3>\n <div class="popover-body">'+t+"</div>\n </div>\n "),this.$container.append(this.$popover),this.$container.find("#"+this.id).on("mouseenter",function(){e.popupHasFocus=!0,"hover"===e.trigger&&e.hoverTimeout&&clearTimeout(e.hoverTimeout)}),this.$container.find("#"+this.id).on("mouseleave",function(){e.popupHasFocus=!1,"hover"===e.trigger&&(e.hoverTimeout=setTimeout(function(){e.close()},100))})},i.setPosition=function(t){var e=this;"undefined"!=typeof t&&null!==t||(t=this.placement);var n,i,o=window.innerWidth,s=window.innerHeight,r=this.$popover.outerWidth(!0),a=this.$popover.outerHeight(!0),l=this.$el.outerWidth(!0),c=this.$el.outerHeight(!0),h=this.$container.offset()||{left:0,top:0},d=this.$el.offset();n=d.left-h.left,i=d.top-h.top;var u,f,p=0,m=0;if(this.offset){var g=this.offset.split(",");p=parseInt(g[0],10)||0,m=parseInt(g[1],10)||0}var v=getComputedStyle(this.$popover[0]),b=parseInt(v.getPropertyValue("--cool-popover-spacer"))||8,y=function(t,o){void 0===o&&(o=e.align);var s=0,h=0;switch(t){case"top":s="end"===o?n+l-r:"center"===o?n+(l-r)/2:n,h=i-a-b;break;case"bottom":s="end"===o?n+l-r:"center"===o?n+(l-r)/2:n,h=i+c+b;break;case"left":s=n-r-b,h="end"===o?i+c-a:"center"===o?i+(c-a)/2:i;break;case"right":s=n+l+b,h="end"===o?i+c-a:"center"===o?i+(c-a)/2:i}return{x:s+p,y:h+m}},w=t,$=this.align,x=y(t);if(this.collisionDetection){var C=function(t){var e={top:!1,bottom:!1,left:!1,right:!1},n=h.left+t.x,i=h.top+t.y,l=n+r,c=i+a;return e.top=i<5,e.bottom=c>s-5,e.left=n<5,e.right=l>o-5,e},E=C(x);"bottom"===t&&E.bottom&&!E.top?(w="top",x=y("top",$)):"top"===t&&E.top&&!E.bottom?(w="bottom",x=y("bottom",$)):"right"===t&&E.right&&!E.left?(w="left",x=y("left",$)):"left"===t&&E.left&&!E.right&&(w="right",x=y("right",$));var T=C(x);"top"!==w&&"bottom"!==w||("end"===$&&T.left&&!T.right?x=y(w,$="start"):"start"===$&&T.right&&!T.left&&(x=y(w,$="end")));var S=C(x);S.left?x.x+=5-(h.left+x.x):S.right&&(x.x-=h.left+x.x+r-(o-5)),S.top?x.y+=5-(h.top+x.y):S.bottom&&(x.y-=h.top+x.y+a-(s-5))}u=x.x,f=x.y,this.$popover.css({transform:"translate3d("+Math.round(u)+"px, "+Math.round(f)+"px, 0px)","will-change":"transform"}),this.$popover.attr("x-placement",w+"-"+$)},i.show=function(){this.$popover||(this.buildPopover(),this.setPosition(),this.$popover.addClass("show"),this.$el.attr("data-popover",this.id),this.onShow())},i.close=function(){this.$popover&&(this.$popover.remove(),this.$el.removeAttr("data-popover"),this.$popover=null,this.onClose())},e}(s);B.NAME="coolPopover",B.DEFAULTS={container:"body",containerAutoDetect:!1,trigger:"focus",placement:"bottom",align:"center",offset:null,collisionDetection:!0,title:"",content:"",onInit:null,onUpdate:null,onDestroy:null,onShow:null,onClose:null},B._jQueryInit(),"undefined"==typeof window||window.PerfectScrollbar||(window.PerfectScrollbar=H);var U=function(t){function e(e,n){var i;return(i=t.call(this)||this).opts={},window.Cool.settings.select?$.extend(!0,i.opts,$.fn[i.constructor.NAME].defaults,window.Cool.settings.select,n):$.extend(!0,i.opts,$.fn[i.constructor.NAME].defaults,n),i.el=e,i.useChips=!1,i.cachedTitle="",i.lastSearchQuery="",i._resizeCallback=null,i._scrollCallback=null,i.init(),i}n(e,t),e._jQueryInterface=function(t){return this.each(function(){var n=$(this),i=n.data("plugin_"+e.NAME);i||(i=new e(this,"object"==typeof t&&t),n.data("plugin_"+e.NAME,i)),"string"==typeof t&&i[t]()})},e._jQueryInit=function(){if($.fn){var t=$.fn[e.NAME];$.fn[e.NAME]=e._jQueryInterface,$.fn[e.NAME].Constructor=e,$.fn[e.NAME].defaults=e.DEFAULTS||{},$.fn[e.NAME].noConflict=function(){return $.fn[e.NAME]=t,e._jQueryInterface}}};var i=e.prototype;return i.init=function(){this.buildCache(),this.buildScroll(),this.bindEvents(),this.onInit()},i.destroy=function(){this.unbindEvents(),this.$el.removeData("plugin_"+this.constructor.NAME),this.onDestroy()},i.update=function(){var t=this;this.buildCache(),this.bindEvents();var e=Promise.resolve();return this.searchApi&&this.searchApi.length&&(e=this._performInitialSearch()),e.then(function(){t.onUpdate()})},i.reset=function(){this.data={},this.data[this.name]=[],this.items=[],this.$select.find(".select-item").remove(),this.$selectItems=[],this.$selectIconContainer.html(this.selectIconDefault),this.$selectHeader.removeClass("select-placeholder"),"function"==typeof this.dynamicTitle?this.$selectTitle.text(this.dynamicTitle.call(this)):(0==this.data[this.name].length&&this.dynamicTitle&&this.dynamicTitleDefault&&0!==this.dynamicTitleDefault&&0==this.$selectTitle.text().trim()&&(this.$selectItems.length>0||this.searchApi)&&this.$selectTitle.text(this.dynamicTitleDefault),0==this.$selectItems.length&&!this.searchApi&&this.dynamicTitle&&this.dynamicTitleEmptyDefault&&0!==this.dynamicTitleEmptyDefault&&(this.$selectHeader.addClass("select-placeholder"),this.$selectIconContainer.addClass("d-none"),this.$selectTitle.text(this.dynamicTitleEmptyDefault))),this.showSearch&&(this.searchData=[],this.$searchInput.val(""),this.searchString="",this.search.call(this))},i.buildCache=function(){var t=this;if(this.$el=$(this.el),this.$container=this.$el.parent(),this.$selectHeader=this.$el.find(".select-header"),this.$selectTitle=this.$el.find(".select-title"),this.cachedTitle=this.$selectTitle.text(),this.$selectIconContainer=this.$selectHeader.find(".select-icon"),this.$searchIconContainer=this.$el.find(".select-search-icon"),this.selectIconDefault=this.$selectHeader.find(".select-icon")?this.$selectHeader.find(".select-icon").html():'<i class="'+(this.opts.faPro?"fal":"fas")+'fa-angle-down icon"></i>',this.name=this.$el.data("name")?this.$el.data("name"):this.opts.name,this.scroll=null,this.scrollContentHeight=this.$el.data("scrollContentHeight")?this.$el.data("scrollContentHeight"):this.opts.scrollContentHeight,this.useNativeScroll=this.$el.data("useNativeScroll")?this.$el.data("useNativeScroll"):this.opts.useNativeScroll,this.contentWidth=this.$el.data("contentWidth")?this.$el.data("contentWidth"):this.opts.contentWidth,this.items=this.$el.data("items")?this.$el.data("items"):this.opts.items,this.data={},this.data[this.name]=[],this.searchData=[],this.searchApi=this.$el.data("searchApi")?this.$el.data("searchApi"):this.opts.searchApi,this.searchRequest=null,this.type=this.$el.data("type")?this.$el.data("type"):this.opts.type,this.contentOpen=!1,this.searchPlaceholder=this.$el.data("search-placeholder")?this.$el.data("search-placeholder"):this.opts.searchPlaceholder,this.btnCloseText=this.$el.data("btn-close-text")?this.$el.data("btn-close-text"):this.opts.btnCloseText,this.labelTemplate=this.opts.labelTemplate,this.confirmCheck=this.opts.confirmCheck,this.confirmUncheck=this.opts.confirmUncheck,this.preventUncheck=this.opts.preventUncheck,this.dynamicTitle=this.$el.data("dynamicTitle")?this.$el.data("dynamicTitle"):this.opts.dynamicTitle,this.dynamicTitleDefault=this.$el.data("dynamicTitleDefault")?this.$el.data("dynamicTitleDefault"):this.opts.dynamicTitleDefault,this.dynamicTitleEmptyDefault=this.$el.data("dynamicTitleEmptyDefault")?this.$el.data("dynamicTitleEmptyDefault"):this.opts.dynamicTitleEmptyDefault,this.allowNoneOnRadioSelect=this.$el.data("allowNoneOnRadioSelect")?this.$el.data("allowNoneOnRadioSelect"):this.opts.allowNoneOnRadioSelect,this.showValidStateIcon=this.$el.data("showValidStateIcon")?this.$el.data("showValidStateIcon"):this.opts.showValidStateIcon,this.itemsToExclude=this.$el.data("itemsToExclude")?this.$el.data("itemsToExclude").replace(/\s/g,"").split(","):this.opts.itemsToExclude,this.primaryKeyword=this.$el.data("primaryKeyword")?this.$el.data("primaryKeyword"):this.opts.primaryKeyword,this.useChips=this.$el.data("useChips")?this.$el.data("useChips"):this.opts.useChips,this.useChips&&(this.showValidStateIcon=!1),this.preventClose=!1,this.itemsToExclude.length>0&&(this.itemsToExclude=this.itemsToExclude.map(String)),this.opts.setData&&(this.data=this.opts.setData),this.$el.data("setData")&&""!=this.$el.data("setData")&&(this.data=this.$el.data("setData")),!Array.isArray(this.data[this.name])&&""!==this.data[this.name]&&this.data[this.name].length>0){var e=this.data[this.name].toString().trim().split(",");this.data[this.name]=e}if(this.data[this.name].length>0&&!this.useChips&&(this.data[this.name]=this.data[this.name].map(String)),this.data[this.name].length>0&&this.itemsToExclude.length>0&&(this.data[this.name]=this.data[this.name].filter(function(e){return e[t.primaryKeyword]?-1===t.itemsToExclude.indexOf(e[t.primaryKeyword].toString()):-1===t.itemsToExclude.indexOf(e.toString())})),this.data&&this.useChips&&this._renderChips(),this.items.length>0&&this.itemsToExclude.length>0&&(this.items=this.items.filter(function(e){return e[t.primaryKeyword]?-1===t.itemsToExclude.indexOf(e[t.primaryKeyword].toString()):-1===t.itemsToExclude.indexOf(e.toString())})),this.$el.find(".select-search").length?this.showSearch=!0:this.showSearch=this.$el.data("showSearch")?this.$el.data("showSearch"):this.opts.showSearch,this.$el.find(".select-footer").length?this.showFooter=!0:this.showFooter=this.$el.data("showFooter")?this.$el.data("showFooter"):this.opts.showFooter,this.$select=this.$el.find(".select-content"),this.$select.length){var n=this.$select.find(".select-item");n.length>0&&this.itemsToExclude.length>0&&$.each(n,function(e,n){var i=$(n).find(":input").val();t.itemsToExclude.indexOf(i)>-1&&$(n).remove()})}else{var i=this._renderItemList(this.items);this.$select=$('\n <div class="select-content">\n\n '+this._renderSearch()+'\n\n <div class="select-scrollable-content"></div>\n\n '+this._renderFooter()+"\n\n </div>\n "),this.$el.append(this.$select),this.$select.find(".select-scrollable-content").append(i)}if(this.data[this.name].length>0){var o=this.useChips?this.data[this.name].map(function(e){return e[t.primaryKeyword].toString()}):this.data[this.name].map(String);if(this.$select.find(":input").each(function(e,n){var i=$(n);o.includes(i.val())&&(i.prop("checked",!0),"radio"===t.type&&i.addClass("checked"))}),this.useChips)this._renderChips();else if("radio"===this.type&&"function"!=typeof this.dynamicTitle){var s=this.$select.find(":input:checked");s.length&&this.$selectTitle.text(s.parent().find("[data-label]").text())}}this.$scrollableContent=!!this.$select.find(".select-scrollable-content")&&this.$select.find(".select-scrollable-content"),this.$selectItems=this.$select.find(".select-item"),this.$selectHeader.removeClass("select-placeholder"),this.searchApi&&this.searchApi.length&&this._performInitialSearch(),"function"==typeof this.dynamicTitle?this.$selectTitle.text(this.dynamicTitle.call(this)):(0==this.data[this.name].length&&this.dynamicTitle&&this.dynamicTitleDefault&&0!==this.dynamicTitleDefault&&0==this.$selectTitle.text().trim()&&(this.$selectItems.length>0||this.searchApi)&&this.$selectTitle.text(this.dynamicTitleDefault),0==this.$selectItems.length&&!this.searchApi&&this.dynamicTitle&&this.dynamicTitleEmptyDefault&&0!==this.dynamicTitleEmptyDefault&&(this.$selectHeader.addClass("select-placeholder"),this.$selectIconContainer.addClass("d-none"),this.$selectTitle.text(this.dynamicTitleEmptyDefault))),this.showSearch&&(this.$searchContainer=this.$select.find(".select-search"),this.$searchInput=this.$select.find('[name="select-search"]'),this.$clearSearchButton=this.$select.find("[data-clear-search]"),this.$searchInput[0].tabIndex=-1),this.showFooter&&(this.$footerContainer=this.$select.find(".select-footer"),this.$closeButton=this.$select.find("[data-select-close]"),this.$closeButton.length&&(this.$closeButton[0].tabIndex=-1)),this.buildSearchData()},i._updateScrollbarVisibility=function(){if(this.scroll&&this.$scrollableContent[0]){var t=this.$scrollableContent[0];t.scrollHeight>t.clientHeight?(this.scroll.settings.suppressScrollY=!1,this.$scrollableContent.addClass("ps-show-rail-y")):(this.scroll.settings.suppressScrollY=!0,this.$scrollableContent.removeClass("ps-show-rail-y")),this.scroll.update()}},i._performInitialSearch=function(){var t=this;return this.isSearchApiEnabled()?(this._showSpinner(),new Promise(function(e,n){$.ajax({method:"GET",url:t.searchApi,timeout:1e4,success:function(n){var i=n.filter(function(e){return-1===t.itemsToExclude.indexOf(e[t.primaryKeyword].toString())&&0!=e[t.primaryKeyword]});t.useChips&&t.data[t.name].length>0&&(t.data[t.name].forEach(function(e){var n=i.find(function(n){return n[t.primaryKeyword].toString()===e[t.primaryKeyword].toString()});n&&(e.label=n.label||n.name||n.value)}),t.$selectTitle.empty(),t.data[t.name].forEach(function(e){var n=$('\n <span class="chip" data-value="'+e[t.primaryKeyword]+'">\n <span class="chip-title">'+Y(e.label)+"</span>\n </span>\n ");n.on("click",function(n){n.stopPropagation(),t.$select.find('input[value="'+e[t.primaryKeyword]+'"]').prop("checked",!1).trigger("change")}),t.$selectTitle.append(n)}));var o=t._renderItemList(i);t.$scrollableContent.html(o),t.data[t.name].length>0&&t.data[t.name].forEach(function(e){var n=t.useChips?e[t.primaryKeyword].toString():e.toString(),i=t.$scrollableContent.find('input[value="'+n+'"]');i.length&&(i.prop("checked",!0),"radio"===t.type&&i.addClass("checked"))}),t._updateScrollbarVisibility(),t._hideSpinner(),t.useChips&&t.data[t.name].length>0&&t._renderChips(),t.contentOpen&&t._recalculateContentHeight(),e()},error:function(n,i,o){t._hideSpinner(),console.error("Search API error:",i,o),t.$scrollableContent.html('<div class="p-3 text-danger">Error loading items</div>'),e()}})})):Promise.resolve()},i.buildScroll=function(){var t=this;if(this.$scrollableContent.length>0){var e=this.scrollContentHeight;this.showSearch&&(e-=this.$searchContainer.outerHeight(!0)||0),this.showFooter&&(e-=this.$footerContainer.outerHeight(!0)||0);var n=(parseInt(this.$scrollableContent.css("marginTop"),10)||0)+(parseInt(this.$scrollableContent.css("marginBottom"),10)||0),i=this.$scrollableContent[0].scrollHeight,o=Math.min(i,e+n);this.$scrollableContent.css({"max-height":o+"px"}),R()?this.$scrollableContent.css({"overflow-y":"auto"}):(!1===this.useNativeScroll&&(this.$scrollableContent.addClass("ps-dark"),this.scroll=new H(this.$scrollableContent[0],{wheelSpeed:1,wheelPropagation:!1,minScrollbarLength:20,scrollYMarginOffset:-1,suppressScrollY:!0,suppressScrollX:!0}),setTimeout(function(){t._updateScrollbarVisibility()},0)),this.$scrollableContent.find('[tabindex="0"]').attr("tabindex",-1))}},i.buildSearchData=function(){var t=this;this.searchData=[];var e=this.$select.find("[data-label]");$.each(e,function(e,n){t.searchData.push({id:e,val:$(n).text().trim()})})},i.bindEvents=function(){var t=this,e=this;this.$selectHeader.on("click."+this.constructor.NAME,function(){t.contentOpen?t.close():(t.$selectItems.length>0||t.searchApi)&&t.show()}),this.$el.on("change."+this.constructor.NAME,'input[type="checkbox"]',function(){var t=this,n=$(this).val(),i=600;if(e.preventClose=!0,"function"==typeof e.confirmCheck&&t.checked)t.checked=!1,e.confirmCheck(function(o){if("confirmed"==o){var s;if(e.useChips){if(!e.data[e.name].find(function(t){return t[e.primaryKeyword]===n}))e.data[e.name].push(((s={})[e.primaryKeyword]=n,s.label=$(t).parent().find("[data-label]").text(),s))}else-1===e.data[e.name].indexOf(n)&&e.data[e.name].push(n);t.checked=!0,e.onSelect(t)}setTimeout(function(){e.preventClose=!1},i)},t);else if(t.checked){var o;if(e.useChips){if(!e.data[e.name].find(function(t){return t[e.primaryKeyword]===n}))e.data[e.name].push(((o={})[e.primaryKeyword]=n,o.label=$(t).parent().find("[data-label]").text(),o))}else-1===e.data[e.name].indexOf(n)&&e.data[e.name].push(n);e.onSelect(t),setTimeout(function(){e.preventClose=!1},i)}else"function"!=typeof e.confirmUncheck||t.checked?t.checked||e.preventUncheck?!t.checked&&e.preventUncheck&&(t.checked=!0,setTimeout(function(){e.preventClose=!1},i)):(e.useChips?e.data[e.name]=e.data[e.name].filter(function(t){return t[e.primaryKeyword]!=n}):e.data[e.name]=e.data[e.name].filter(function(t){return t!=n}),e.onSelect(t),setTimeout(function(){e.preventClose=!1},i)):(t.checked=!0,e.confirmUncheck(function(o){"confirmed"==o&&(e.useChips?e.data[e.name]=e.data[e.name].filter(function(t){return t[e.primaryKeyword]!=n}):e.data[e.name]=e.data[e.name].filter(function(t){return t!=n}),t.checked=!1,e.onSelect(t)),setTimeout(function(){e.preventClose=!1},i)},t))}),this.$el.on("change."+this.constructor.NAME,'input[type="radio"]',function(){var t=$(this).val();if(this.checked){var n;if(e.useChips)e.data[e.name]=[(n={},n[e.primaryKeyword]=t,n.label=$(this).parent().find("[data-label]").text(),n)];else e.data[e.name]=[t];e.data[e.name]=[t],e.$select.find('input[type="radio"]').not($(this)).prop("checked",!1),e.$select.find('input[type="radio"]').not($(this)).removeClass("checked")}else e.data[e.name]=[]}),this.$el.on("click."+this.constructor.NAME,'input[type="radio"]',function(){$(this).hasClass("checked")&&e.allowNoneOnRadioSelect?(e.data[e.name]=[],$(this).prop("checked",!1),$(this).removeClass("checked"),e.dynamicTitle&&"function"!=typeof e.dynamicTitle&&e.$selectTitle.text(e.dynamicTitleDefault)):($(this).addClass("checked"),e.dynamicTitle&&"function"!=typeof e.dynamicTitle&&e.$selectTitle.text(Y($(this).parent().find("[data-label]").text()))),"function"==typeof e.dynamicTitle&&e.$selectTitle.text(e.dynamicTitle.call(this)),e.onSelect(this)}),this.scroll&&(this.$scrollableContent.find(".ps__thumb-y").mousedown(function(){e.$scrollableContent.addClass("ps-mousedown-scroll")}),$(document).mouseup(function(){e.$scrollableContent.hasClass("ps-mousedown-scroll")&&e.$scrollableContent.removeClass("ps-mousedown-scroll")})),this.showSearch&&(this.$searchInput.on("keydown."+this.constructor.NAME,P(function(){e.searchString=$(this).val().trim(),e.search.call(e)},250)),this.$searchInput.on("focusin."+this.constructor.NAME,function(){e.$searchContainer.addClass("focused")}),this.$searchInput.on("focusout."+this.constructor.NAME,function(){e.$searchContainer.removeClass("focused")}),this.$searchContainer.on("click."+this.constructor.NAME,"[data-clear-search]",function(){e.searchString.length&&(e.$searchInput.val(""),e.searchString="",e.search.call(e))})),this.showFooter&&this.$closeButton.on("click."+this.constructor.NAME,function(){t.close()}),$(document).on("touchstart click",function(t){e.$el.is(t.target)||e.$el.has(t.target).length||!e.contentOpen||e.preventClose||e.close.call(e)}),"fixed"===this.opts.position&&(this._scrollCallback=function(){t.$el&&t.$el.hasClass("show")&&requestAnimationFrame(function(){t.$el.find(".select-content").css({top:t.$container.offset().top-$(window).scrollTop(),left:t.$container.offset().left-$(window).scrollLeft(),width:t.contentWidth?"var(--cool-select-content-width, "+t.contentWidth+"px)":t.$container.outerWidth()})})},window.ResizeObserver&&(this._resizeCallback=function(e){t.$el&&t.$el.hasClass("show")&&requestAnimationFrame(function(){t.$el.find(".select-content").css({top:t.$container.offset().top-$(window).scrollTop(),left:t.$container.offset().left-$(window).scrollLeft(),width:t.contentWidth?"var(--cool-select-content-width, "+t.contentWidth+"px)":t.$container.outerWidth()})})},z.observe(document.body,this._resizeCallback)))},i.unbindEvents=function(){this.$el.off("."+this.constructor.NAME),$(document).off("touchstart click."+this.constructor.NAME),"fixed"===this.opts.position&&(this._scrollCallback&&(W.remove("select-"+this.name),this._scrollCallback=null),this._resizeCallback&&(z.unobserve(document.body),this._resizeCallback=null))},i.getData=function(t){return t?this.data[t]:this.data},i.setData=function(){var t=this,e=this,n=this.opts.faPro?"fal":"fas";if(this.showValidStateIcon?this.$selectIconContainer.html('<i class="'+n+' fa-check text-success icon"></i>'):this.$selectIconContainer.html(this.selectIconDefault),this.useChips&&this.$selectTitle.empty(),this.searchApi.length){var i=this.searchApi,o=this.data[this.name].length,s=0;this.data[e.name].forEach(function(t){i+=encodeURIComponent("#"+t),++s!==o&&(i+="+")}),$.ajax({method:"GET",url:i}).done(function(n){var i=n.map(function(t){return t.id.toString()});e.data[e.name]=e.data[e.name].filter(function(t){return e.useObjects?i.indexOf(t[e.primaryKeyword].toString())>-1:i.indexOf(t.toString())>-1}),0==e.data[e.name].length&&e.$selectIconContainer.html(e.selectIconDefault);var o=n.filter(function(t){return e.useObjects?e.data[e.name].findIndex(function(n){return n[e.primaryKeyword]==t.id})>-1&&-1===e.itemsToExclude.indexOf(t.id)&&0!=t.id:e.data[e.name].indexOf(t.id)>-1&&-1===e.itemsToExclude.indexOf(t.id)&&0!=t.id}),s=e._renderItemList(o);e.$scrollableContent.append(s);var r=e.$scrollableContent.find(":input");if(e._updateScrollbarVisibility(),e.$scrollableContent.find(':input[type="checkbox"]').length?e.type="checkbox":e.$scrollableContent.find(':input[type="radio"]').length&&(e.type="radio"),"checkbox"==e.type)e.data[e.name].forEach(function(t){var n=e.useObjects?t[e.primaryKeyword].toString():t.toString(),i=r.filter(function(){return this.value==n});i.prop("checked",!0),e.useChips&&e._renderChips(),e.onSelect(i[0])});else if("radio"==e.type){var a=t,l=t.data[t.name][0],c=r.filter(function(){return this.value==l});c.prop("checked",!0),c.addClass("checked"),a.useChips?a._renderChips():a.dynamicTitle&&"function"!=typeof a.dynamicTitle&&a.$selectTitle.text(c.parent().find("[data-label]").text()),a.onSelect(c[0])}"function"==typeof e.dynamicTitle&&e.$selectTitle.text(e.dynamicTitle.call(t))})}else{var r=this.$scrollableContent.find(":input"),a=r.length>0?r.map(function(){return this.value.toString()}).get():[];if(this.data[this.name]=this.data[this.name].filter(function(t){return a.indexOf(t.toString())>-1}),0==this.data[this.name].length&&this.$selectIconContainer.html(this.selectIconDefault),this.$scrollableContent.find(':input[type="checkbox"]').length?this.type="checkbox":this.$scrollableContent.find(':input[type="radio"]').length&&(this.type="radio"),"checkbox"==this.type)this.data[this.name].forEach(function(t){var n=r.filter(function(){return this.value==t});n.prop("checked",!0),e.useChips&&e._renderChips(),e.onSelect(n[0])});else if("radio"==this.type){var l=r.filter(function(){return this.value==this.data[this.name][0]});l.prop("checked",!0),l.addClass("checked"),this.useChips?this._renderChips():this.dynamicTitle&&"function"!=typeof this.dynamicTitle&&this.$selectTitle.text(l.parent().find("[data-label]").text()),this.onSelect(l[0])}"function"==typeof this.dynamicTitle&&this.$selectTitle.text(this.dynamicTitle.call(this))}},i._renderChips=function(){var t=this;this.$selectTitle.empty(),0!==this.data[this.name].length?(this.data[this.name].forEach(function(e){var n=t.useChips?e[t.primaryKeyword]:e,i=t.$select?t.$select.find('input[value="'+n+'"]'):[],o=i.length?i.parent().find("[data-label]").text():e.label||e.name||e.value||n,s=$('\n <span class="chip" data-value="'+n+'">\n <span class="chip-title">'+Y(o)+"</span>\n </span>\n ");s.on("click",function(i){i.stopPropagation();var o=t.$select.find('input[value="'+n+'"]');o.length?o.prop("checked",!1).trigger("change"):(t.useChips?t.data[t.name]=t.data[t.name].filter(function(e){return e[t.primaryKeyword].toString()!==n.toString()}):t.data[t.name]=t.data[t.name].filter(function(t){return t.toString()!==n.toString()}),t.searchApi.length&&(t.items=t.items.filter(function(e){return e[t.primaryKeyword].toString()!==n.toString()})),t._renderChips(),"function"==typeof t.opts.onSelect&&t.opts.onSelect.call(t,e,t,!1))}),t.$selectTitle.append(s)}),this.contentOpen&&setTimeout(function(){t._updateScrollbarVisibility()},0)):this.dynamicTitle&&this.dynamicTitleDefault?this.$selectTitle.text(this.dynamicTitleDefault):this.$selectTitle.text(this.cachedTitle)},i.search=function(){var t=this,e=this,n=this.opts.faPro?"fal":"fas";if(this.searchString.length)if(this.isSearchApiEnabled()){if(this.searchString===this.lastSearchQuery)return;this.lastSearchQuery=this.searchString,this._showSpinner(),null!==this.searchRequest&&this.searchRequest.abort(),clearTimeout(this._searchDebounceTimer),this._searchDebounceTimer=setTimeout(function(){t.searchRequest=$.ajax({method:"GET",url:t.searchApi+t.searchString}).done(function(t){e.searchRequest=null,e.$scrollableContent.find("input:not(:checked)").parents(".select-item").not(".static-item").remove();var i=t.filter(function(t){return e.useObjects?-1===e.data[e.name].findIndex(function(n){return n[e.primaryKeyword]==t.id})&&-1===e.itemsToExclude.indexOf(t.id)&&0!=t.id:-1===e.data[e.name].indexOf(t.id)&&-1===e.itemsToExclude.indexOf(t.id)&&0!=t.id}),o=e._renderItemList(i);e.$scrollableContent.append(o),e.$searchIconContainer.html('<i class="'+n+' fa-times icon"></i>'),e.$searchIconContainer.attr("data-clear-search","true"),e._updateScrollbarVisibility(),e.contentOpen&&e._recalculateContentHeight()})},300)}else{var i=this.searchString.toLowerCase(),o=this.searchData.filter(function(t){return t.val.toLowerCase().indexOf(i)>-1});this.$selectItems.removeClass("d-none"),this.$selectItems.removeClass("visible"),o.forEach(function(t){$(e.$selectItems[t.id]).addClass("visible")}),this.$selectItems.not(".visible").addClass("d-none"),this.$searchIconContainer.html('<i class="'+n+' fa-times icon"></i>'),this.$searchIconContainer.attr("data-clear-search","true")}else this.lastSearchQuery="",this.isSearchApiEnabled()?(this.$scrollableContent.find("input:not(:checked)").parents(".select-item").not(".static-item").remove(),this._hideSpinner(),this.$searchIconContainer.attr("data-clear-search",""),this._performInitialSearch()):(this.$selectItems.removeClass("d-none"),this.$selectItems.removeClass("visible"),this.$searchIconContainer.html('<i class="'+n+' fa-search icon"></i>'),this.$searchIconContainer.attr("data-clear-search",""));this.scroll&&this.scroll.update(),this.onUpdate()},i._recalculateContentHeight=function(){var t=this,e=this.$el.find(".select-content"),n=this.$selectHeader.outerHeight(!0),i=this.scrollContentHeight,o=$(window).height(),s=$(window).scrollTop(),r=i,a=0,l=0;if(this.$searchContainer&&this.$searchContainer.length&&(a=this.$searchContainer.outerHeight(!0)||0),this.$footerContainer&&this.$footerContainer.length&&(l=this.$footerContainer.outerHeight(!0)||0),this.$scrollableContent&&this.$scrollableContent.length){var c=this.$scrollableContent[0].scrollHeight,h=this.$scrollableContent[0].clientHeight;r=Math.min(Math.max(c,h)+a+l,i)}var d=this.$el.hasClass("select-dropup"),u=0,f=r,p=parseInt(e.css("margin-bottom")||0,10),m=parseInt(e.css("margin-top")||0,10);if("fixed"===this.opts.position){var g=this.$container.offset().top-$(window).scrollTop(),v=o-g-n-50,b=g-50;d?u=g-(f=Math.min(r,b))-p:(f=Math.min(r,v),u=g+n+m)}else{var y=this.$container.offset(),w=o-(y.top-s)-n-50,x=y.top-s-50;d?u=-(f=Math.min(r,x))-p:(f=Math.min(r,w),u=n+m)}var C=f-a-l;e.css({height:f+"px"}),this.$scrollableContent&&this.$scrollableContent.length&&this.$scrollableContent.css({"max-height":C+"px"}),this.opts.position,e.css({top:u}),this.scroll&&setTimeout(function(){t._updateScrollbarVisibility()},0)},i.show=function(){var t=this;if(!this.$el.hasClass("show")){var e=0,n=0;"fixed"===this.opts.position&&(e=this.$container.offset().top-$(window).scrollTop(),n=this.$container.offset().left-$(window).scrollLeft());var i=$(".select.show"),o=1,s=this.opts.faPro?"fal":"fas";i.length&&(o=parseInt(i.first().css("z-index"),10)+2),this.$el.addClass("show"),i.length||(o=parseInt(this.$el.css("z-index"),10)+1);var r=this.$el.find(".select-content"),a=this.$selectHeader.outerHeight(!0),l=this.scrollContentHeight,c=$(window).height(),h=$(window).scrollTop(),d=l,u=0,f=0;if(this.$searchContainer&&this.$searchContainer.length&&(u=this.$searchContainer.outerHeight(!0)||0),this.$footerContainer&&this.$footerContainer.length&&(f=this.$footerContainer.outerHeight(!0)||0),this.$scrollableContent&&this.$scrollableContent.length){var p=this.$scrollableContent[0].scrollHeight,m=this.$scrollableContent[0].clientHeight;d=Math.min(Math.max(p,m)+u+f,l)}var g=!1,v=0,b=d,y=parseInt(r.css("margin-bottom")||0,10),w=parseInt(r.css("margin-top")||0,10);if("fixed"===this.opts.position){var x=c-e-a-50,C=e-50;(g=x<d&&C>x)?v=e-(b=Math.min(d,C))-y:(b=Math.min(d,x),v=e+a+w)}else{var E=this.$container.offset(),T=c-(E.top-h)-a-50,S=E.top-h-50;(g=T<d&&S>T)?v=-(b=Math.min(d,S))-y:(b=Math.min(d,T),v=a+w)}var k=b-u-f;r.css({height:b+"px"}),this.$scrollableContent&&this.$scrollableContent.length&&this.$scrollableContent.css({"max-height":k+"px"}),this.$el.toggleClass("select-dropup",g),this.$el.toggleClass("select-dropdown",!g);var A=r.outerWidth();r.css({"z-index":o,position:"fixed"===this.opts.position?"fixed":"absolute"}),"fixed"===this.opts.position?r.css({top:v,left:n,width:this.contentWidth?"var(--cool-select-content-width, "+this.contentWidth+"px)":this.$container.outerWidth()}):r.css({top:v,width:this.contentWidth?"var(--cool-select-content-width, "+this.contentWidth+"px)":A>this.$container.outerWidth()?"var(--cool-select-content-width, auto)":this.$container.outerWidth()}),r.css({"min-width":this.$container.outerWidth()}),this.$scrollableContent.length&&this.$scrollableContent[0].offsetHeight<this.$scrollableContent[0].scrollHeight&&(this.$scrollableContent[0].scrollTop=1,this.$scrollableContent[0].scrollTop=0),g?this.$selectIconContainer.html('<i class="'+s+' fa-angle-down icon"></i>'):this.$selectIconContainer.html('<i class="'+s+' fa-angle-up icon"></i>'),setTimeout(function(){t.$el[0].scrollIntoView({behavior:"smooth",block:"nearest",inline:"nearest"}),t.scroll&&t._updateScrollbarVisibility()},300),this.contentOpen=!0,"fixed"===this.opts.position&&this._scrollCallback&&W.add("select-"+this.name,this._scrollCallback),this.onShow()}},i.close=function(){if(!this.preventClose){var t=this,e=this.opts.faPro?"fal":"fas";this.$el.removeClass("show"),this.$el.removeClass("select-dropup select-dropdown"),setTimeout(function(){t.$el.removeAttr("style")},300),this.data[this.name].length>0&&this.showValidStateIcon?this.$selectIconContainer.html('<i class="'+e+' fa-check text-success icon"></i>'):this.$selectIconContainer.html(this.selectIconDefault),this.contentOpen=!1,"fixed"===this.opts.position&&this._scrollCallback&&W.remove("select-"+this.name),this.onClose()}},i.onSelect=function(t){var e,n=this,i=$(t).parents(".select-item").data(),o=$(t).val();this.searchApi.length&&!$.isEmptyObject(i)&&($(t).length&&t.checked?(this.items.push(i),this.useChips?this.data[this.name].find(function(t){return t[n.primaryKeyword].toString()===o.toString()})||this.data[this.name].push(((e={})[this.primaryKeyword]=o,e.label=$(t).parent().find("[data-label]").text(),e)):-1===this.data[this.name].indexOf(o)&&this.data[this.name].push(o)):(this.items=$.grep(this.items,function(t){return t[n.primaryKeyword].toString()!==o.toString()}),this.useChips?this.data[this.name]=this.data[this.name].filter(function(t){return t[n.primaryKeyword].toString()!==o.toString()}):this.data[this.name]=this.data[this.name].filter(function(t){return t.toString()!==o.toString()})));this.useChips&&this._renderChips(),"function"==typeof this.opts.onSelect&&this.opts.onSelect.call(t,i,this,t.checked)},i.getItem=function(t,e){var n=$.grep(this.items,function(n){return n[t]==e})[0];return n||null},i.getSelectedItems=function(t){var e=this,n=[],i=[],o=this.data[this.name];return $.isArray(o)?n=o:n.push(o),n=this.useChips?n.map(function(t){return t[e.primaryKeyword].toString()}):n.map(String),this.items.length>0?(i=$.grep(this.items,function(t){return n.indexOf(t.id.toString())>-1}),t&&(i=i.map(function(e){return e[t]}).filter(function(t){return null!=t}))):i=n,i},i.getSelectedItem=function(t){return this.getSelectedItems(t)[0]},i._renderItemList=function(t){var e=this;if(!t||!t.length)return[];var n=this.data[this.name].map(function(t){return e.useChips?t[e.primaryKeyword].toString():t.toString()});document.createDocumentFragment();for(var i=[],o=0;o<t.length;++o){var s=t[o],r="";"function"==typeof this.labelTemplate?r=this.labelTemplate(s):s.name?r=s.name:s.label?r=s.label:s.value&&(r=s.value);var a=this.useChips?s[this.primaryKeyword]:s.id,l=n.indexOf(a.toString())>-1,c=$(this._getItemTemplate(s,o,r,l)).data(s);i.push(c)}return i},i._getItemTemplate=function(t,e,n,i){return'\n <div class="select-item">\n <div class="select-item-'+this.type+'">\n <div class="form-check">\n <input type="'+this.type+'"\n id="select-'+this.name+"-"+t.id+'"\n value="'+t.id+'"\n tabindex="-1"\n '+(i?"checked":"")+'>\n <label for="select-'+this.name+"-"+t.id+'">\n <span class="form-check-icon">\n <svg viewBox="0 0 18 18">\n <polyline points="1.5 6 4.5 9 10.5 1"></polyline>\n </svg>\n </span>\n <span class="form-check-label"'+("function"!=typeof this.labelTemplate?" data-label":"")+">\n "+("function"!=typeof this.labelTemplate?Y(n):n)+"\n </span>\n </label>\n </div>\n </div>\n </div>"},i._renderSearch=function(){if(this.showSearch){var t=this.opts.faPro?"fal":"fas";return'\n\n <div class="select-search">\n\n <div class="select-search-input">\n\n <input type="text" name="select-search" value="" placeholder="'+this.searchPlaceholder+'" tabindex="-1">\n\n </div>\n\n <div class="select-search-icon">\n\n <i class="'+t+' fa-search icon"></i>\n\n </div>\n\n </div>\n\n '}return""},i._renderFooter=function(){return this.showFooter?'\n\n <div class="select-footer">\n\n <button class="btn btn-block btn-light btn-sm" type="button" tabindex="-1" data-select-close >\n '+this.btnCloseText+"\n </button>\n\n </div>\n\n ":""},i.isSearchApiEnabled=function(){return this.searchApi&&this.searchApi.length},i._showSpinner=function(){var t=this.opts.faPro?"fal":"fas";this.$searchIconContainer.html('<i class="'+t+' fa-spinner-third fa-spin icon"></i>')},i._hideSpinner=function(){var t=this.opts.faPro?"fal":"fas";this.$searchIconContainer.html('<i class="'+t+' fa-search icon"></i>')},i.selectItem=function(t){var e=this,n=this.$select.find(':input[value="'+t+'"]');if(n.length){if("radio"===this.type)if(this.$select.find('input[type="radio"]').prop("checked",!1).removeClass("checked"),this.useChips){var i,o=n.parent().find("[data-label]").text();this.data[this.name]=[(i={},i[this.primaryKeyword]=t,i.label=o,i)]}else this.data[this.name]=[t];else if(this.useChips){if(!this.data[this.name].find(function(n){return n[e.primaryKeyword].toString()===t.toString()})){var s,r=n.parent().find("[data-label]").text();this.data[this.name].push(((s={})[this.primaryKeyword]=t,s.label=r,s))}}else-1===this.data[this.name].indexOf(t)&&this.data[this.name].push(t);return n.prop("checked",!0).addClass("checked").trigger("change"),!0}return!1},i.clear=function(){var t=this,e=this.$select.find(":input:checked");this.$select.find(":input").prop("checked",!1).removeClass("checked"),this.data[this.name]=[],this.useChips?this._renderChips():this.dynamicTitle&&"function"!=typeof this.dynamicTitle&&this.$selectTitle.text(this.dynamicTitleDefault||this.cachedTitle),this.showValidStateIcon&&this.$selectIconContainer.html(this.selectIconDefault),e.each(function(e,n){var i=$(n).parents(".select-item").data();"function"==typeof t.opts.onSelect&&t.opts.onSelect.call(n,i,t,!1)})},e}(s);U.NAME="coolSelect",U.DEFAULTS={name:"",type:"checkbox",labelTemplate:null,confirmCheck:null,confirmUncheck:null,setData:null,scrollContentHeight:300,useNativeScroll:!1,contentWidth:null,faPro:!1,items:[],showSearch:!1,showFooter:!1,searchApi:!1,onInit:null,onUpdate:null,onDestroy:null,onShow:null,onClose:null,onReset:null,onSearch:null,onSelect:null,buildScroll:null,searchPlaceholder:null,btnCloseText:null,dynamicTitle:!1,dynamicTitleDefault:"",dynamicTitleEmptyDefault:"",allowNoneOnRadioSelect:!0,preventUncheck:!1,showValidStateIcon:!0,itemsToExclude:[],primaryKeyword:"id",position:"absolute",scrollEl:".content",useChips:!1},U._jQueryInit(),"undefined"==typeof window||window.PerfectScrollbar||(window.PerfectScrollbar=H);var Q=function(t){function e(e,n){var i;return(i=t.call(this)||this).opts={},window.Cool.settings.dropdown?$.extend(!0,i.opts,$.fn[i.constructor.NAME].defaults,window.Cool.settings.dropdown,n):$.extend(!0,i.opts,$.fn[i.constructor.NAME].defaults,n),i.el=e,i._resizeCallback=null,i._scrollCallback=null,i.init(),i}n(e,t),e._jQueryInterface=function(t){return this.each(function(){var n=$(this),i=n.data("plugin_"+e.NAME);i||(i=new e(this,"object"==typeof t&&t),n.data("plugin_"+e.NAME,i)),"string"==typeof t&&i[t]()})},e._jQueryInit=function(){if($.fn){var t=$.fn[e.NAME];$.fn[e.NAME]=e._jQueryInterface,$.fn[e.NAME].Constructor=e,$.fn[e.NAME].defaults=e.DEFAULTS||{},$.fn[e.NAME].noConflict=function(){return $.fn[e.NAME]=t,e._jQueryInterface}}};var i=e.prototype;return i.setupResizeHandling=function(){var t,e=this;window.ResizeObserver?(this._resizeCallback=function(t){e.contentOpen&&(e.rafId&&cancelAnimationFrame(e.rafId),e.rafId=requestAnimationFrame(function(){e.setPosition(),e.onUpdate()}))},z.observe(this.$el[0],this._resizeCallback),z.observe(document.body,this._resizeCallback),this.$container.length&&z.observe(this.$container[0],this._resizeCallback)):(this.resizeHandler=function(){if(e.contentOpen){clearTimeout(t);var n=performance.now();!e.lastResizeTime||n-e.lastResizeTime>100?(e.setPosition(),e.onUpdate(),e.lastResizeTime=n):t=setTimeout(function(){e.setPosition(),e.onUpdate()},16)}},window.addEventListener("resize",this.resizeHandler,{passive:!0}))},i.setupScrollHandling=function(){var t=this;if("fixed"===this.position){this._scrollCallback=function(){t.contentOpen&&t.$dropdown.hasClass("show")&&(t.rafId&&cancelAnimationFrame(t.rafId),t.rafId=requestAnimationFrame(function(){t.setPosition(),t.onUpdate()}))},W.add("dropdown-"+this.id,this._scrollCallback);var e=this.$el.parent();for(this.scrollableParents=[];e.length&&e[0]!==document.body;){var n=e.css("overflow-y");if("scroll"===n||"auto"===n){var i=function(){return t._scrollCallback()};e[0].addEventListener("scroll",i,{passive:!0}),this.scrollableParents.push({element:e[0],handler:i})}e=e.parent()}}},i.setupVisibilityDetection=function(){var t=this;window.IntersectionObserver&&(this.intersectionObserver=new IntersectionObserver(function(e){e.forEach(function(e){!e.isIntersecting&&t.contentOpen&&(t.rafId&&cancelAnimationFrame(t.rafId),t.rafId=requestAnimationFrame(function(){t.setPosition()}))})},{threshold:.1,rootMargin:"50px"}),this.intersectionObserver.observe(this.$el[0]))},i.init=function(){var t=this;this.buildCache().then(function(){t.buildScroll(),t.setupVisibilityDetection(),t.bindEvents(),t.onInit()}).catch(function(){console.error("Failed to build Dropdown")})},i.destroy=function(){this.unbindEvents(),this.scroll&&"function"==typeof this.scroll.destroy&&(this.scroll.destroy(),this.scroll=null),this.$dropdown&&this.$dropdown.remove(),this.$el.removeData("plugin_"+this.constructor.NAME),this.onDestroy()},i.update=function(){var t=this,e=this.$scrollableContent&&this.$scrollableContent.hasClass("ps-dark");this.scroll&&"function"==typeof this.scroll.destroy&&(this.scroll.destroy(),this.scroll=null),this.unbindEvents(),this.buildCache().then(function(){e&&t.$scrollableContent&&t.$scrollableContent.addClass("ps-dark"),t.buildScroll(),t.setupVisibilityDetection(),t.bindEvents(),t.onUpdate()}).catch(function(){console.error("Failed to build Dropdown")})},i.buildCache=function(){var t=this;return new Promise(function(e,n){t.$el=$(t.el),t.$el.addClass("dropdown-trigger"),t.$container=t.$el.parent(".dropdown").length?t.$el.parent(".dropdown"):t.$el.parentsUntil(".dropdown").parent(),t.$container.length||(t.$container=t.$el.parent()),t.id="dropdown-"+q(),t.animation=t.$el.data("animation")?t.$el.data("animation"):t.opts.animation,t.animationIn=t.$el.data("animationIn")?t.$el.data("animationIn"):t.opts.animationIn,t.animationOut=t.$el.data("animationOut")?t.$el.data("animationOut"):t.opts.animationOut,t.animationSpeed=t.$el.data("animationSpeed")?t.$el.data("animationSpeed"):t.opts.animationSpeed,t.position=t.$el.data("position")?t.$el.data("position"):t.opts.position,t.placement=t.$el.data("placement")?t.$el.data("placement"):t.opts.placement,t.offset=t.$el.data("offset")?t.$el.data("offset"):t.opts.offset,t.minWidth=t.$el.data("minWidth")?t.$el.data("minWidth"):t.opts.minWidth,t.scroll=t.$el.data("scroll")?t.$el.data("scroll"):t.opts.scroll,t.scrollContentHeight=t.$el.data("scrollContentHeight")?t.$el.data("scrollContentHeight"):t.opts.scrollContentHeight,t.positionObserver=t.$el.attr("data-position-observer")?JSON.parse(t.$el.attr("data-position-observer")):t.opts.positionObserver,t.closeOnItemClick=t.$el.data("closeOnItemClick")?t.$el.data("closeOnItemClick"):t.opts.closeOnItemClick,t.preventClose=!!t.$el.data("preventClose")&&t.$el.data("preventClose"),t.content=t.$el.data("content")?t.$el.data("content"):t.opts.content,t.contentOpen=!1,t.$container.hasClass("dropup")?t.placement="top":t.$container.hasClass("dropright")?t.placement="right":t.$container.hasClass("dropbottom")?t.placement="bottom":t.$container.hasClass("dropleft")&&(t.placement="left");var i=t.$container.find(".dropdown-menu").first();if("fixed"===t.position&&i.length){t.$dropdown=i.clone(!0,!0),t.$dropdown.attr("id",t.id),t.$dropdown.removeClass("show"),t.align=i.hasClass("dropdown-menu-right")?"end":"start",$("body").append(t.$dropdown),i.remove(),t.$dropdown.find(".dropdown").each(function(e,n){var i=$(n),o=i.find('[data-toggle="dropdown"]').first(),s=i.find(".dropdown-menu").first();o.length&&s.length&&!o.data("plugin_"+t.constructor.NAME)&&o[t.constructor.NAME]({position:"absolute",closeOnItemClick:!1,positionObserver:!0,onShow:function(){var t=parseInt(this.$dropdown.css("z-index")||9999,10);s.css("z-index",t+1)}.bind(t)})});var o=t.$dropdown[0];return t.$dropdownItems=t.$dropdown.find("a, button, .dropdown-item").filter(function(){return $(this).closest(".dropdown-menu")[0]===o}),t.$scrollableContent=t.$dropdown.find(".dropdown-scrollable-content"),t.$dropdown.css({"min-width":t.minWidth?t.minWidth+"px":""}),e()}if("function"!=typeof t.content){if(t.$dropdown=!!t.$container.find(".dropdown-menu").length&&t.$container.find(".dropdown-menu").first(),!t.$dropdown.length)return n();t.$dropdown.hasClass("dropdown-menu-right")?t.align="end":t.align="start",t.$scrollableContent=!!t.$dropdown.find(".dropdown-scrollable-content").length&&t.$dropdown.find(".dropdown-scrollable-content").first();var s=t.$dropdown[0];return t.$dropdownItems=t.$dropdown.find("a, button, .dropdown-item").filter(function(){return $(this).closest(".dropdown-menu")[0]===s}),t.minWidth&&t.$dropdown.css("min-width",t.minWidth+"px"),e()}var r="end"===t.opts.align?" dropdown-menu-right":"";t.$dropdown=$('\n <div class="dropdown-menu'+r+'" id="'+t.id+'">\n '+t.content()+"\n </div>\n ");var a={fixed:function(){return $("body").append(t.$dropdown)},absolute:function(){return t.$el.after(t.$dropdown)}};$.when(a[t.position]()).then(function(){t.$scrollableContent=!!t.$dropdown.find(".dropdown-scrollable-content")&&t.$dropdown.find(".dropdown-scrollable-content").first(),t.$dropdown.hasClass("dropdown-menu-right")?t.align="end":t.align="start";var n=t.$dropdown[0];return t.$dropdownItems=t.$dropdown.find("a, button, .dropdown-item").filter(function(){return $(this).closest(".dropdown-menu")[0]===n}),t.minWidth&&t.$dropdown.css("min-width",t.minWidth+"px"),e()})})},i.buildScroll=function(){this.opts.scroll&&this.$scrollableContent.length&&(this.$scrollableContent.css({"max-height":this.scrollContentHeight+"px"}),R()?this.$scrollableContent.css({"overflow-y":"auto"}):this.scroll=new H(this.$scrollableContent[0],{wheelSpeed:1,wheelPropagation:!1,minScrollbarLength:20,suppressScrollX:!0,scrollYMarginOffset:2}))},i.bindEvents=function(){var t=this,e=this;this.$el.on("click."+this.constructor.NAME,function(){t.contentOpen?t.close():t.show()}),"fixed"===this.position?this.$dropdown.on("click."+this.constructor.NAME,"a, button, .dropdown-item",function(t){var n=$(this);n.closest(".dropdown-menu")[0]===e.$dropdown[0]&&(n.hasClass("dropdown-trigger")||n.data("toggle")||(e.closeOnItemClick&&e.close(),e.onItemClick(this,t)))}):this.$dropdownItems.on("click."+this.constructor.NAME,function(t){var n=$(this);n.hasClass("dropdown-trigger")||n.data("toggle")||(e.closeOnItemClick&&e.close(),e.onItemClick(this,t))}),this._documentClickHandler=function(e){if(t.contentOpen){var n=t.$el.is(e.target)||t.$el.has(e.target).length>0||t.$dropdown.is(e.target)||t.$dropdown.has(e.target).length>0,i=t.$dropdown.find(e.target).closest('[data-toggle="dropdown"]').length>0;n||i||t.close()}},document.addEventListener("click",this._documentClickHandler,{passive:!0}),document.addEventListener("touchstart",this._documentClickHandler,{passive:!0}),this.setupResizeHandling(),this.setupScrollHandling()},i.unbindEvents=function(){this.$el.off("."+this.constructor.NAME),this.$dropdown&&this.$dropdown.off("."+this.constructor.NAME),this.$dropdownItems&&"fixed"!==this.position&&this.$dropdownItems.off("."+this.constructor.NAME),this._resizeCallback&&(z.unobserve(this.$el[0]),z.unobserve(document.body),this.$container.length&&z.unobserve(this.$container[0]),this._resizeCallback=null),this.rafId&&(cancelAnimationFrame(this.rafId),this.rafId=null),this._scrollCallback&&(W.remove("dropdown-"+this.id),this._scrollCallback=null),this.scrollableParents&&(this.scrollableParents.forEach(function(t){var e=t.element,n=t.handler;e.removeEventListener("scroll",n)}),this.scrollableParents=[]),this.resizeHandler&&(window.removeEventListener("resize",this.resizeHandler),this.resizeHandler=null),this.intersectionObserver&&(this.intersectionObserver.disconnect(),this.intersectionObserver=null),this._documentClickHandler&&(document.removeEventListener("click",this._documentClickHandler),document.removeEventListener("touchstart",this._documentClickHandler),this._documentClickHandler=null)},i.setPosition=function(t){var e=this;"undefined"!=typeof t&&null!==t||(t=this.placement);var n,i,o=this.$el[0].getBoundingClientRect(),s=window.innerWidth,r=window.innerHeight,a=this.$dropdown.outerWidth(!0),l=this.$dropdown.outerHeight(!0),c=this.$el.outerWidth(!0),h=this.$el.outerHeight(!0);if("fixed"===this.position){var d=this.$el.offset();n=d.left,i=d.top}else{var u=this.$dropdown.offsetParent().offset()||{left:0,top:0},f=this.$el.offset();n=f.left-u.left,i=f.top-u.top}var p,m,g=0,v=0;if(this.offset){var b=this.offset.split(",");g=parseInt(b[0],10)||0,v=parseInt(b[1],10)||0}var y=parseInt(getComputedStyle(document.documentElement).getPropertyValue("--cool-dropdown-spacer"))||2,w=function(t,o){void 0===o&&(o=e.align);var s=0,r=0;switch(t){case"top":s="end"===o?n+c-a:n,r=i-l-y;break;case"bottom":s="end"===o?n+c-a:n,r=i+h+y;break;case"left":s=n-a-y,r=i;break;case"right":s=n+c+y,r=i}return{x:s+g,y:r+v}},$=t,x=this.align,C=w(t);if(this.positionObserver){var E=function(t,c,h){void 0===h&&(h=e.align);var d={top:!1,bottom:!1,left:!1,right:!1};if("fixed"===e.position)d.top=t.y<5,d.bottom=t.y+l>r-5,d.left=t.x<5,d.right=t.x+a>s-5;else{var u="fixed"===e.position?t.x:o.left+(t.x-n),f="fixed"===e.position?t.y:o.top+(t.y-i),p=u+a,m=f+l;d.top=f<5,d.bottom=m>r-5,d.left=u<5,d.right=p>s-5}return d},T=E(C,0,this.align);"bottom"===t&&T.bottom&&!T.top?($="top",C=w("top",x)):"top"===t&&T.top&&!T.bottom?($="bottom",C=w("bottom",x)):"right"===t&&T.right&&!T.left?($="left",C=w("left",x)):"left"===t&&T.left&&!T.right&&($="right",C=w("right",x));var S=E(C,0,x);if("top"!==$&&"bottom"!==$||("end"===x&&S.left&&!S.right?C=w($,x="start"):"start"===x&&S.right&&!S.left&&(C=w($,x="end"))),this.$container.removeClass("dropup dropbottom dropleft dropright"),"top"===$?this.$container.addClass("dropup"):"left"===$?this.$container.addClass("dropleft"):"right"===$?this.$container.addClass("dropright"):this.$container.addClass("dropbottom"),this.$dropdown.attr("x-placement",$+"-"+x),"fixed"===this.position)C.x=Math.max(5,Math.min(C.x,s-a-5)),C.y=Math.max(5,Math.min(C.y,r-l-5));else{var k=o.left+(C.x-n),A=o.top+(C.y-i);k<5?C.x+=5-k:k+a>s-5&&(C.x-=k+a-s+5),A<5?C.y+=5-A:A+l>r-5&&(C.y-=A+l-r+5)}}if(p=C.x,m=C.y,"fixed"===this.position)this.$dropdown.css({position:"fixed",top:Math.round(m)+"px",left:Math.round(p)+"px",right:"auto",bottom:"auto",transform:"none","will-change":"auto","z-index":9999});else{var I=this.$el.closest(".dropdown, .dropup, .dropleft, .dropright");if(I.length){var L=I.offset(),_=this.$el.offset(),D=_.left-L.left,M=_.top-L.top;switch($){case"bottom":M+=h+y,"end"===x&&(D=D+c-a);break;case"top":M-=l+y,"end"===x&&(D=D+c-a);break;case"left":D-=a+y;break;case"right":D+=c+y}D+=g,M+=v,this.$dropdown.css({position:"absolute",top:Math.round(M)+"px",left:Math.round(D)+"px",right:"auto",bottom:"auto",transform:"none","will-change":"auto"})}}},i.show=function(){var t=this;if(this.$dropdown&&!this.$dropdown.hasClass("show")){if(this.setPosition(),this.animation?(this.$dropdown.attr("x-placement",this.placement+"-"+this.align),this.$dropdown.addClass(this.animationSpeed),F(this.$dropdown,this.animationIn),this.$dropdown.addClass("show"),this.$dropdown.attr("id",this.id),this.$el.attr("data-dropdown",this.id)):(this.$dropdown.attr("x-placement",this.placement+"-"+this.align),this.$dropdown.addClass("show"),this.$dropdown.attr("id",this.id),this.$el.attr("data-dropdown",this.id)),this.opts.scroll&&this.scroll&&this.$scrollableContent.length)if(this.$scrollableContent[0].offsetHeight,this.animation){var e=this.$dropdown.css("animation-duration"),n=e?1e3*parseFloat(e):300;setTimeout(function(){t.scroll&&"function"==typeof t.scroll.update&&t.scroll.update()},n)}else requestAnimationFrame(function(){t.scroll&&"function"==typeof t.scroll.update&&t.scroll.update()});this.contentOpen=!0,this.onShow()}},i.close=function(){var t=this;this.$dropdown&&!this.preventClose&&(this.animation&&!this.$dropdown.hasClass("animation")?F(this.$dropdown,this.animationOut).then(function(){t.$dropdown.removeClass("show"),t.$el.removeAttr("data-dropdown")}):(this.$dropdown.removeClass("show"),this.$el.removeAttr("data-dropdown")),this.contentOpen=!1,this.onClose())},i.onItemClick=function(t,e){var n=this.opts.onItemClick;"function"==typeof n&&n.call(t,e,this)},e}(s);Q.NAME="coolDropdown",Q.DEFAULTS={animation:!0,animationIn:"zoomIn",animationOut:"zoomOut",animationSpeed:"fastest",offset:null,minWidth:null,closeOnItemClick:!0,positionObserver:!0,content:!1,scroll:!0,scrollContentHeight:100,onInit:null,onUpdate:null,onDestroy:null,onShow:null,onClose:null,onItemClick:null,position:"absolute",placement:"bottom",align:"start"},Q._jQueryInit();var K=function(t){function e(e,n){var i;return(i=t.call(this)||this).opts={},window.Cool.settings.tooltip?$.extend(!0,i.opts,$.fn[i.constructor.NAME].defaults,window.Cool.settings.tooltip,n):$.extend(!0,i.opts,$.fn[i.constructor.NAME].defaults,n),i.el=e,i.init(),i}n(e,t),e._jQueryInterface=function(t){return this.each(function(){var n=$(this),i=n.data("plugin_"+e.NAME);i||(i=new e(this,"object"==typeof t&&t),n.data("plugin_"+e.NAME,i)),"string"==typeof t&&i[t]()})},e._jQueryInit=function(){if($.fn){var t=$.fn[e.NAME];$.fn[e.NAME]=e._jQueryInterface,$.fn[e.NAME].Constructor=e,$.fn[e.NAME].defaults=e.DEFAULTS||{},$.fn[e.NAME].noConflict=function(){return $.fn[e.NAME]=t,e._jQueryInterface}}};var i=e.prototype;return i.init=function(){this.buildCache(),this.bindEvents(),this.onInit()},i.destroy=function(){this.unbindEvents(),this.$tooltip&&(this.$tooltip.remove(),this.$tooltip=null),this.$el.removeData("plugin_"+this.constructor.NAME),this.onDestroy()},i.update=function(){this.buildCache(),this.$tooltip&&this.setPosition(),this.onUpdate()},i.buildCache=function(){this.$el=$(this.el),this.$container=this.$el.data("container")?$(this.$el.data("container")):$(this.opts.container),this.id="tooltip-"+q(),this.animation=this.$el.data("animation")?this.$el.data("animation"):this.opts.animation,this.animationIn=this.$el.data("animationIn")?this.$el.data("animationIn"):this.opts.animationIn,this.animationOut=this.$el.data("animationOut")?this.$el.data("animationOut"):this.opts.animationOut,this.animationSpeed=this.$el.data("animationSpeed")?this.$el.data("animationSpeed"):this.opts.animationSpeed,this.placement=this.$el.data("placement")?this.$el.data("placement"):this.opts.placement,this.placementChanged=!1,this.content=this.$el.data("content")?this.$el.data("content"):this.opts.content,this.trigger=this.$el.data("trigger")?this.$el.data("trigger"):this.opts.trigger},i.bindEvents=function(){var t=this;"auto"===this.trigger&&(this.$el.on("mouseenter."+this.constructor.NAME,function(){t.show()}),this.$el.on("mouseleave."+this.constructor.NAME,function(){t.close()}),this.$el.on("blur."+this.constructor.NAME,function(){t.close()}),this.$el.on("click."+this.constructor.NAME,function(){t.close()})),window.ResizeObserver&&(this._resizeCallback=function(){t.$tooltip&&t.$tooltip.hasClass("show")&&requestAnimationFrame(function(){t.setPosition()})},z.observe(this.el,this._resizeCallback))},i.unbindEvents=function(){this.$el.off("."+this.constructor.NAME),this._resizeCallback&&(z.unobserve(this.el),this._resizeCallback=null)},i.buildTooltip=function(){this.$tooltip=$('\n <div class="tooltip" role="tooltip" id="'+this.id+'">\n <div class="arrow"></div>\n <div class="tooltip-inner">'+this.content+"</div>\n </div>\n "),this.$container.append(this.$tooltip),this.$arrow=this.$tooltip.find(".arrow")},i.setPosition=function(t){"undefined"!=typeof t&&null!==t||(t=this.placement),this.$tooltip.addClass("tooltip-"+t);var e,n,i,o=this.$container.innerWidth(),s=this.$container.innerHeight(),r=this.$tooltip.outerWidth(!0),a=this.$tooltip.outerHeight(!0),l=this.$el.outerWidth(),c=this.$el.outerHeight(),h=this.$el.offset().left,d=this.$el.offset().top,u=this.$arrow.outerWidth(!0),f=this.$arrow.outerHeight(!0);"top"===t?(n=Math.round(h-(r-l)/2),i=Math.round(d-a),e=Math.round(r/2-u/2),this.$arrow.css({left:e+"px"})):"right"===t?(n=Math.round(h+l),i=Math.round(d-(a-c)/2),e=Math.round(a/2-f/2),this.$arrow.css({top:e+"px"})):"bottom"===t?(n=Math.round(h-(r-l)/2),i=Math.round(d+c),e=Math.round(r/2-u/2),this.$arrow.css({left:e+"px"})):"left"===t&&(n=Math.round(h-r),i=Math.round(d-(a-c)/2),e=Math.round(a/2-f/2),this.$arrow.css({top:e+"px"})),this.$tooltip.css({position:"absolute",top:"0px",left:"0px",transform:"translate3d("+n+"px, "+i+"px, 0px)","will-change":"transform"});var p=0,m={left:this.$tooltip.position().left,top:this.$tooltip.position().top,right:o-(this.$tooltip.position().left+r),bottom:s-(this.$tooltip.position().top+a)},g={left:!1,top:!1,right:!1,bottom:!1};if(m.right<0&&(g.right=!0,p++),m.left<0&&(g.left=!0,p++),m.bottom<0&&(g.bottom=!0,p++),m.top<0&&(g.top=!0,p++),p>0&&(!this.placementChanged&&g.left&&m.right>r?(this.placementChanged=!0,this.$tooltip.removeClass("tooltip-"+t),this.$arrow.removeAttr("style"),this.setPosition("right")):!this.placementChanged&&g.top&&m.top>a?(this.placementChanged=!0,this.$tooltip.removeClass("tooltip-"+t),this.$arrow.removeAttr("style"),this.setPosition("bottom")):!this.placementChanged&&g.right&&m.left>r?(this.placementChanged=!0,this.$tooltip.removeClass("tooltip-"+t),this.$arrow.removeAttr("style"),this.setPosition("left")):!this.placementChanged&&g.bottom&&m.top>a?(this.placementChanged=!0,this.$tooltip.removeClass("tooltip-"+t),this.$arrow.removeAttr("style"),this.setPosition("top")):this.placementChanged||"top"===t&&"bottom"===t||!g.left&&!g.right?this.fixTooltipPosition=!0:m.top>m.bottom?(this.placementChanged=!0,this.$tooltip.removeClass("tooltip-"+t),this.$arrow.removeAttr("style"),this.setPosition("top")):(this.placementChanged=!0,this.$tooltip.removeClass("tooltip-"+t),this.$arrow.removeAttr("style"),this.setPosition("bottom")),this.fixTooltipPosition)){if(g.left){var v=Math.abs(m.left);h>=n+v&&["top","bottom"].indexOf(t)<0?(r-=v,n+=v):(n+=v,e-=v)}if(g.top){var b=Math.abs(m.top);i+=b,e-=b}if(g.right){var y=Math.abs(m.right);h<=n-y&&["top","bottom"].indexOf(t)<0?r-=y:(n-=y,e+=y)}if(g.bottom){var w=Math.abs(m.bottom);i-=w,e+=w}"top"===t?this.$arrow.css({left:e+"px"}):"right"===t?this.$arrow.css({top:e+"px"}):"bottom"===t?this.$arrow.css({left:e+"px"}):"left"===t&&this.$arrow.css({top:e+"px"}),this.$tooltip.css({width:r,transform:"translate3d("+n+"px, "+i+"px, 0px)"}),this.fixTooltipPosition=!1}},i.show=function(){this.$tooltip||(this.buildTooltip(),this.setPosition(),this.animation?(this.$tooltip.addClass(this.animationSpeed),F(this.$tooltip,this.animationIn),this.$tooltip.addClass("show"),this.$tooltip.attr("id",this.id),this.$el.attr("data-tooltip",this.id)):(this.$tooltip.addClass("show"),this.$tooltip.attr("id",this.id),this.$el.attr("data-tooltip",this.id)),this.onShow())},i.close=function(){var t=this;this.$tooltip&&(this.animation&&!this.$tooltip.hasClass("animation")?F(this.$tooltip,this.animationOut).then(function(){t.$tooltip.remove(),t.$el.removeAttr("data-tooltip"),t.$tooltip=null,t.placementChanged=!1,t.onClose()}):(this.$tooltip.remove(),this.$el.removeAttr("data-tooltip"),this.$tooltip=null,this.placementChanged=!1,this.onClose()))},e}(s);K.NAME="coolTooltip",K.DEFAULTS={container:"body",animation:!1,animationIn:"fadeIn",animationOut:"fadeOut",animationSpeed:"fastest",placement:"bottom",content:"",trigger:"auto",onInit:null,onUpdate:null,onDestroy:null,onShow:null,onClose:null},K._jQueryInit();var V=function(t){function e(e,n){var i;return(i=t.call(this)||this).opts={},window.Cool.settings.collapse?$.extend(!0,i.opts,$.fn[i.constructor.NAME].defaults,window.Cool.settings.collapse,n):$.extend(!0,i.opts,$.fn[i.constructor.NAME].defaults,n),i.el=e,i.init(),i}n(e,t),e._jQueryInterface=function(t){return this.each(function(){var n=$(this),i=n.data("plugin_"+e.NAME);i||(i=new e(this,"object"==typeof t&&t),n.data("plugin_"+e.NAME,i)),"string"==typeof t&&i[t]()})},e._jQueryInit=function(){if($.fn){var t=$.fn[e.NAME];$.fn[e.NAME]=e._jQueryInterface,$.fn[e.NAME].Constructor=e,$.fn[e.NAME].defaults=e.DEFAULTS||{},$.fn[e.NAME].noConflict=function(){return $.fn[e.NAME]=t,e._jQueryInterface}}};var i=e.prototype;return i.init=function(){this.buildCache(),this.bindEvents(),this.onInit()},i.destroy=function(){this.unbindEvents(),this.$el.removeData("plugin_"+this.constructor.NAME),this.onDestroy()},i.update=function(){this.buildCache(),this.onUpdate()},i.buildCache=function(){this.$el=$(this.el),this.el=this.$el[0];var t=this.$el.data("target")||this.opts.target;if(this.$target=t?$(t):this.$el.parent().find(".collapse"),this.target=this.$target[0],this.breakpoint=this.$el.data("breakpoint"),this.expanded="true"===this.$el.attr("aria-expanded"),this.target){this.$container=this.$target.closest(".section-collapse"),this.container=this.$container[0];var e=this.$el.data("target")?'[data-collapse-indicator="'+this.$el.data("target")+'"]':null;this.$indicator=e?$(e):this.$el.parent().find("[data-collapse-indicator]"),this.indicator=this.$indicator[0]}},i.bindEvents=function(){var t=this;this._clickHandler=function(e){t.breakpoint&&window.matchMedia("(min-width: "+t.breakpoint+"px)").matches||(e.preventDefault(),t.toggle())},this.el.addEventListener("click",this._clickHandler)},i.unbindEvents=function(){this._clickHandler&&this.el.removeEventListener("click",this._clickHandler),this.$el.off("."+this.constructor.NAME)},i.toggle=function(){this.expanded?this.close():this.show()},i.show=function(){this.expanded||(this.target.classList.add("show"),this.container&&this.container.classList.add("show"),this.indicator&&this.indicator.classList.add("show"),this.el.setAttribute("aria-expanded","true"),this.expanded=!0,this.onShow())},i.close=function(){this.expanded&&(this.target.classList.remove("show"),this.container&&this.container.classList.remove("show"),this.indicator&&this.indicator.classList.remove("show"),this.el.setAttribute("aria-expanded","false"),this.expanded=!1,this.onClose())},e}(s);V.NAME="coolCollapse",V.DEFAULTS={target:null,onInit:null,onUpdate:null,onDestroy:null,onShow:null,onClose:null},V._jQueryInit();var G,J=function(t){function e(e,n){var i;return(i=t.call(this)||this).opts={},window.Cool.settings.sectionTabs?$.extend(!0,i.opts,$.fn[i.constructor.NAME].defaults,window.Cool.settings.sectionTabs,n):$.extend(!0,i.opts,$.fn[i.constructor.NAME].defaults,n),i.el=e,i._tabsCache=new WeakMap,i._resizeObserver=null,i._isProcessing=!1,i._rafId=null,i.init(),i}n(e,t),e._jQueryInterface=function(t){return this.each(function(){var n=$(this),i=n.data("plugin_"+e.NAME);i||(i=new e(this,"object"==typeof t&&t),n.data("plugin_"+e.NAME,i)),"string"==typeof t&&i[t]()})},e._jQueryInit=function(){if($.fn){var t=$.fn[e.NAME];$.fn[e.NAME]=e._jQueryInterface,$.fn[e.NAME].Constructor=e,$.fn[e.NAME].defaults=e.DEFAULTS||{},$.fn[e.NAME].noConflict=function(){return $.fn[e.NAME]=t,e._jQueryInterface}}};var i=e.prototype;return i.init=function(){var t=this;this.buildCache(),this.bindEvents(),this._rafId=requestAnimationFrame(function(){t.dropdownContainer&&t.dropdownContainer.classList.add("js-ready"),t.el.classList.add("js-initialized"),t.checkForChanges(),t.onInit()})},i.destroy=function(){this.unbindEvents(),this._rafId&&cancelAnimationFrame(this._rafId),this._resizeObserver&&(this._resizeObserver.disconnect(),this._resizeObserver=null),this.$el.removeData("plugin_"+this.constructor.NAME),this.onDestroy()},i.update=function(){this.buildCache(),this.onUpdate()},i.buildCache=function(){this.$el=$(this.el),this.el=this.$el[0];var t=this.el.closest(".section-tabs");this.$dropdownContainer=t?$(t).find(".dropdown-container"):this.$el.find(".dropdown-container"),this.$dropdownList=t?$(t).find(".dropdown-list"):this.$el.find(".dropdown-list"),this.dropdownContainer=this.$dropdownContainer.length?this.$dropdownContainer[0]:null,this.dropdownList=this.$dropdownList.length?this.$dropdownList[0]:null},i.bindEvents=function(){var t=this,e=this.el.closest(".section-tabs"),n=(e?e.closest(".section-header"):null)||e||this.el;window.ResizeObserver?(this._resizeObserver=new ResizeObserver(function(e){t._isProcessing||(t._isProcessing=!0,t._rafId&&cancelAnimationFrame(t._rafId),t._rafId=requestAnimationFrame(function(){t.checkForChanges(),t._isProcessing=!1}))}),this._resizeObserver.observe(n)):(this._resizeHandler=P(function(){t.checkForChanges()},50),window.addEventListener("resize",this._resizeHandler,{passive:!0}))},i.unbindEvents=function(){this.$el.off("."+this.constructor.NAME),this._resizeObserver&&this._resizeObserver.disconnect(),this._resizeHandler&&window.removeEventListener("resize",this._resizeHandler)},i.moveToList=function(t){var e=t.getAttribute("data-uuid"),n=this.el.querySelector(':scope > .tab-item[data-related-dropdown-item="'+e+'"]');n&&(n.removeAttribute("data-related-dropdown-item"),t.remove())},i.moveToDropdown=function(t){if(!t.hasAttribute("data-related-dropdown-item")&&this.dropdownList){var e=crypto.randomUUID(),n=t.cloneNode(!0),i=n.querySelector(".tab-item-action");i&&i.classList.add("dropdown-item"),n.setAttribute("data-uuid",e),this.dropdownList.appendChild(n),t.setAttribute("data-related-dropdown-item",e)}},i.getTabDimensions=function(t){if(this._tabsCache.has(t))return this._tabsCache.get(t);var e=t.classList.contains("invisible");e&&t.classList.remove("invisible");var n=this.el.closest(".section-tabs")||this.el,i=n.style.overflow;n.style.overflow="visible",n.offsetHeight;var o=t.offsetWidth,s=o+(parseInt(getComputedStyle(t).marginLeft,10)||0)+(parseInt(getComputedStyle(t).marginRight,10)||0);n.style.overflow=i,e&&t.classList.add("invisible");var r={width:o,totalWidth:s};return this._tabsCache.set(t,r),r},i.availableSpace=function(){var t,e,n,i=this.el.closest(".section-tabs"),o=i?i.closest(".section-header"):null;if(o){var s=getComputedStyle(o);if("column"===s.flexDirection){var r=i||this.el,a=getComputedStyle(r);t=r.offsetWidth,e=parseInt(a.paddingLeft,10)||0,n=parseInt(a.paddingRight,10)||0}else{t=o.offsetWidth,e=parseInt(s.paddingLeft,10)||0,n=parseInt(s.paddingRight,10)||0;var l=o.querySelector(".section-search");if(l)t-=l.offsetWidth,t-=parseInt(s.gap,10)||0}}else{var c=i||this.el,h=getComputedStyle(c);t=c.offsetWidth,e=parseInt(h.paddingLeft,10)||0,n=parseInt(h.paddingRight,10)||0}return t-e-n-(this.dropdownContainer?this.dropdownContainer.classList.contains("visible")?this.dropdownContainer.offsetWidth:40:0)},i.checkForChanges=function(){var t=this;if(this.dropdownList){this._tabsCache=new WeakMap;var e=Array.from(this.el.querySelectorAll(":scope > .tab-item")),n=Array.from(this.dropdownList.children),i=this.availableSpace(),o=parseInt(getComputedStyle(this.el).gap,10)||0;if(window.innerWidth<768&&i<200)return e.forEach(function(t){t.classList.remove("invisible"),t.removeAttribute("data-related-dropdown-item")}),void(this.dropdownContainer&&this.dropdownContainer.classList.remove("visible"));for(var s=0,r=[],a=[],l=0;l<e.length;l++){var c=e[l],h=s+this.getTabDimensions(c).totalWidth+(l>0?o:0);if(h<=i){s=h,r.push(c);var d=c.getAttribute("data-related-dropdown-item");if(d){var u=this.dropdownList.querySelector('[data-uuid="'+d+'"]');u&&this.moveToList(u)}}else a.push(c)}if(a.forEach(function(e,n){e.hasAttribute("data-related-dropdown-item")||t.moveToDropdown(e)}),n.length>0&&0===a.length)for(var f=i-s,p=n.length-1;p>=0;p--){var m=n[p],g=m.getAttribute("data-uuid"),v=this.el.querySelector('[data-related-dropdown-item="'+g+'"]');if(v){var b=this.getTabDimensions(v).totalWidth+(s>0?o:0);if(!(b<=f))break;this.moveToList(m),r.push(v),s+=b}}e.forEach(function(t){r.includes(t)?t.classList.remove("invisible"):t.classList.add("invisible")});var y=this.dropdownList&&this.dropdownList.children.length>0;this.dropdownContainer&&this.dropdownContainer.classList.toggle("visible",y)}},e}(s);J.NAME="coolSectionTabs",J.DEFAULTS={onInit:null,onUpdate:null,onDestroy:null},J._jQueryInit();var Z,tt=function(t){function e(e,n){var i;return(i=t.call(this)||this).settings={},window.Cool.settings.toast?$.extend(!0,i.settings,$.fn[i.constructor.NAME].defaults,window.Cool.settings.toast,n):$.extend(!0,i.settings,$.fn[i.constructor.NAME].defaults,n),i.container=e,i.$container=$(i.container),i.toasts=[],i.queue=[],i.processingQueue=!1,i.onInitialize=i.settings.onInitialize,i.onDestroy=i.settings.onDestroy,i.lastToastContent=null,i.$container.data("plugin_"+i.constructor.NAME,i),i}n(e,t),e._jQueryInterface=function(t){var n=$(this),i=n.data("plugin_"+e.NAME);i||(i=new e(this,"object"==typeof t&&t),n.data("plugin_"+e.NAME,i)),"string"==typeof t&&i[t]()},e._jQueryInit=function(){if($.fn){var t=$.fn[e.NAME];$.fn[e.NAME]=e._jQueryInterface,$.fn[e.NAME].Constructor=e,$.fn[e.NAME].defaults=e.DEFAULTS||{},$.fn[e.NAME].noConflict=function(){return $.fn[e.NAME]=t,e._jQueryInterface}}};var i=e.prototype;return i.isSimilarToast=function(t){return!!this.lastToastContent&&this.lastToastContent===t.content},i.addQueue=function(t){if(this.isSimilarToast(t)&&(this.queue=this.queue.filter(function(e){return e.content!==t.content})),this.queue.push(t),this.lastToastContent=t.content,!this.processingQueue)return this.processQueue()},i.processQueue=function(){if(this.processingQueue&&this.queue.shift(),this.queue.length)return this.processingQueue=!0,this.show(this.queue[0]);this.processingQueue=!1},i.init=function(t){var e={};$.extend(!0,e,this.settings,t);var n=this.buildToast(e);return this.addQueue(n),this.onInit(n),n},i.destroy=function(){this.$container.removeData("plugin_"+this.constructor.NAME),this.onDestroy()},i.buildToast=function(t){var e={uuid:"toast-"+q(),placement:t.placement,placementX:t.placementX,placementY:t.placementY,offset:t.offset,animation:t.animation,animationIn:t.animationIn,animationOut:t.animationOut,animationSpeed:t.animationSpeed,dismiss:t.dismiss,size:t.size,header:t.header,theme:t.theme,title:t.title,content:t.content,template:t.template,maxBodyHeight:t.maxBodyHeight,onInit:t.onInit,onShow:t.onShow,onClose:t.onClose};return"function"==typeof e.content?e.$el=$(e.template()):e.$el=$(this._renderTemplate(e)),e.$inner=e.$el.find(".toast-inner"),e.$closeBtn=e.$el.find("[data-toast-close]"),this.toasts.push(e),e},i.bindEvents=function(t){var e,n=this,i=this;(t.$el.on("click","[data-toast-close]",function(){t.$el&&i.close(t)}),window.ResizeObserver)?(t.resizeObserver=new ResizeObserver(function(e){t.$el&&(t.rafId&&cancelAnimationFrame(t.rafId),t.rafId=requestAnimationFrame(function(){t.$el&&n.setPosition(t)}))}),t.resizeObserver.observe(document.body)):(t.resizeHandler=function(){if(t.$el){clearTimeout(e);var i=performance.now();!t.lastResizeTime||i-t.lastResizeTime>100?(n.setPosition(t),t.lastResizeTime=i):e=setTimeout(function(){t.$el&&n.setPosition(t)},16)}},window.addEventListener("resize",t.resizeHandler,{passive:!0}))},i.setPosition=function(t,e,n,i){if("undefined"!=typeof n&&null!==n||(n=t.placementY),"undefined"!=typeof i&&null!==i||(i=t.placementX),i&&n||(e=t.placement),t.offset){var o=t.offset.split(",");parseInt(o[0],10),parseInt(o[1],10)}var s,r,a=t.$el.outerWidth(!0),l=t.$el.outerHeight(!0);e?"top-left"===e?(s=0,r=0,t.offset?(s+=offsetX,r+=offsetY):(s+=30,r+=30)):"top-center"===e?(s=this.$container.width()/2-a/2,r=0,t.offset?(s+=offsetX,r+=offsetY):r+=30):"top-right"===e?(s=this.$container.width()-a,r=0,t.offset?(s+=-offsetX,r+=offsetY):(s+=-30,r+=30)):"center-left"===e?(s=0,r=this.$container.height()/2-l/2,t.offset?(s+=offsetX,r+=offsetY):s+=30):"center-center"===e?(s=this.$container.width()/2-a/2,r=this.$container.height()/2-l/2,t.offset&&(s+=offsetX,r+=offsetY)):"center-right"===e?(s=this.$container.width()-a,r=this.$container.height()/2-l/2,t.offset?(s+=-offsetX,r+=offsetY):s+=-30):"bottom-left"===e?(s=0,r=this.$container.height()-l,t.offset?(s+=offsetX,r+=-offsetY):(s+=30,r+=-30)):"bottom-center"===e?(s=this.$container.width()/2-a/2,r=this.$container.height()-l,t.offset?(s+=offsetX,r+=-offsetY):r+=-30):"bottom-right"===e&&(s=this.$container.width()-a,r=this.$container.height()-l,t.offset?(s+=-offsetX,r+=-offsetY):(s+=-30,r+=-30)):(s=i,r=n),t.$el.css({position:"absolute",top:"0px",left:"0px",transform:"translate3d("+s+"px, "+r+"px, 0px)","will-change":"transform"})},i.show=function(t){var e=this;this.$container.append(t.$el),this.bindEvents(t),this.setPosition(t),t.animation?(t.$el.addClass("show"),t.$inner.addClass(t.animationSpeed),F(t.$inner,t.animationIn)):t.$el.addClass("show"),t.dismiss&&setTimeout(function(){e.close(t)},1e3*t.dismiss),this.onShow(t)},i.close=function(t){var e=this;t.resizeObserver&&(t.resizeObserver.disconnect(),t.resizeObserver=null),t.rafId&&(cancelAnimationFrame(t.rafId),t.rafId=null),t.resizeHandler&&(window.removeEventListener("resize",t.resizeHandler),t.resizeHandler=null),t.animation&&!t.$inner.hasClass("animation")?(t.$el.removeClass("show"),F(t.$inner,t.animationOut).then(function(){t.$el.remove(),e.lastToastContent=null,e.toasts=$.grep(e.toasts,function(e){return e.uuid!=t.uuid}),e.processQueue(),e.onClose(t)})):(t.$el.remove(),this.lastToastContent=null,this.toasts=$.grep(this.toasts,function(e){return e.uuid!=t.uuid}),this.processQueue(),this.onClose(t))},i.onInitialize=function(){var t=this.onInitialize;"function"==typeof t&&t.call(this.container)},i.onDestroy=function(){var t=this.onDestroy;"function"==typeof t&&t.call(this.container)},i.onInit=function(t){var e=t.onInit;"function"==typeof e&&e.call(t)},i.onShow=function(t){var e=t.onShow;"function"==typeof e&&e.call(t)},i.onClose=function(t){var e=t.onClose;"function"==typeof e&&e.call(t)},i._renderTemplate=function(t){var e,n="",i="",o="";return n="function"==typeof t.content?t.content():t.content,t.header?i='\n <div class="toast-header">\n\n <span>'+t.title+'</span>\n\n <button type="button" data-toast-close>\n <svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="icon"><path d="M18 6 6 18"/><path d="m6 6 12 12"/></svg>\n </button>\n\n </div>\n ':o='\n <button type="button" data-toast-close>\n <svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="icon"><path d="M18 6 6 18"/><path d="m6 6 12 12"/></svg>\n </button>\n ',e='\n <div class="toast-body">\n\n <span>'+n+"</span>\n "+o+"\n\n </div>\n ",'\n <div class="toast toast-'+t.size+" toast-"+t.theme+'" role="alert" id="'+t.uuid+'">\n\n <div class="toast-inner">\n\n '+i+"\n "+e+"\n\n </div>\n\n </div>\n "},e}(s);tt.NAME="coolToast",tt.DEFAULTS=((G={title:"",content:"",template:"",theme:"dark",placement:"bottom-center",placementX:null,placementY:null,animation:!0,animationIn:"slideInUp",animationOut:"slideOutDown",animationSpeed:"faster",offset:null,size:null,dismiss:3,header:!1,onInitialize:null,onDestroy:null,onInit:null}).onDestroy=null,G.onShow=null,G.onClose=null,G),tt._jQueryInit();var et=function(t){function i(e,n){var i;return(i=t.call(this)||this).settings={},window.Cool.settings.dialog?$.extend(!0,i.settings,$.fn[i.constructor.NAME].defaults,window.Cool.settings.dialog,n):$.extend(!0,i.settings,$.fn[i.constructor.NAME].defaults,n),i.container=e,i.$container=$(i.container),i.dialogs=[],i.onInitialize=i.settings.onInitialize,i.onDestroy=i.settings.onDestroy,i.$container.data("plugin_"+i.constructor.NAME,i),i}n(i,t),i._jQueryInterface=function(t){var e=$(this),n=e.data("plugin_"+i.NAME);n||(n=new i(this,"object"==typeof t&&t),e.data("plugin_"+i.NAME,n)),"string"==typeof t&&n[t]()},i._jQueryInit=function(){if($.fn){var t=$.fn[i.NAME];$.fn[i.NAME]=i._jQueryInterface,$.fn[i.NAME].Constructor=i,$.fn[i.NAME].defaults=i.DEFAULTS||{},$.fn[i.NAME].noConflict=function(){return $.fn[i.NAME]=t,i._jQueryInterface}}};var o=i.prototype;return o.init=function(t){var e=this,n={};$.extend(!0,n,this.settings,t),t&&t.actions&&(n.actions=t.actions||{}),t&&t.callbacks&&(n.callbacks=t.callbacks||{}),n.callbacks&&"object"==typeof n.callbacks&&Object.keys(n.callbacks).forEach(function(t){n.actions.hasOwnProperty(t)?"object"!=typeof n.actions[t]||n.actions[t].hasOwnProperty("content")||e.settings.actions&&e.settings.actions[t]&&"object"==typeof e.settings.actions[t]&&e.settings.actions[t].hasOwnProperty("content")&&(n.actions[t].content=e.settings.actions[t].content):e.settings.actions&&e.settings.actions[t]?n.actions[t]=$.extend(!0,{},e.settings.actions[t]):n.actions[t]={}});var i=this.buildDialog(n);return this.show(i),this.bindEvents(i),this.onInit(i),i},o.destroy=function(){this.$container.removeData("plugin_"+this.constructor.NAME),this.onDestroy()},o.buildDialog=function(t){var e=this,n={uuid:"dialog-"+q(),title:t.title,template:t.template,body:t.body,footer:t.footer,header:t.header,size:t.size,classes:t.classes,centered:t.centered,backdrop:t.backdrop,preventScroll:t.preventScroll,closeBtn:t.closeBtn,animation:t.animation,animationIn:t.animationIn,animationOut:t.animationOut,animationSpeed:t.animationSpeed,callbacks:t.callbacks,maxBodyHeight:t.maxBodyHeight,overflowVisible:t.overflowVisible,actions:t.actions,actionInProgress:!1,actionThreshold:300,onInit:t.onInit,onShow:t.onShow,onClose:t.onClose};return null==n.maxBodyHeight&&"full"!==n.size&&(n.maxBodyHeight=window.innerHeight-200),"function"==typeof n.template?n.$el=$(n.template()):n.$el=$(this._renderTemplate(n)),n.show=function(){e.show(n)},n.close=function(){e.close(n)},this.dialogs.push(n),n},o.bindEvents=function(t){var n=this;if(t.$el.on("click","[data-dialog-action], [data-dialog-confirm], [data-dialog-close], [data-dialog-remove]",function(i){if(i.preventDefault(),t.actionInProgress)i.stopPropagation();else{t.actionInProgress=!0;var o=["confirm","close","remove"],s=$(this).data("dialogAction");if(!s)for(var r,a=e(o);!(r=a()).done;){var l=r.value;if($(this).is("[data-dialog-"+l+"]")){s=l;break}}var c=t.actions[s]||{};t.$el.trigger("dialog."+s);var h="function"==typeof c.callback?c.callback:"function"==typeof t.callbacks[s]?t.callbacks[s]:null,d=function(e){void 0===e&&(e=!1),e?t.actionInProgress=!1:setTimeout(function(){t.actionInProgress=!1},t.actionThreshold)};if("function"==typeof h)try{var u=h.call(n,function(){o.includes(s)&&n.close(t),d()},t);u&&"function"==typeof u.then?u.then(function(t){!1===t&&d()}).catch(function(t){console.error("Dialog action error:",t),d()}):d()}catch(t){console.error("Dialog action error:",t),d()}else o.includes(s)?(n.close(t),d()):d()}}),null!==t.maxBodyHeight&&"full"!==t.size){var i=function(){return t.maxBodyHeight=window.innerHeight-200,t.maxBodyHeight};if(window.ResizeObserver)t.resizeObserver=new ResizeObserver(function(e){t.rafId&&cancelAnimationFrame(t.rafId),t.rafId=requestAnimationFrame(function(){var e=i();t.$el.find(".dialog-body").css("--cool-dialog-body-height",e+"px")})}),t.resizeObserver.observe(document.body);else{var o,s=window.orientation;t.resizeHandler=function(){clearTimeout(o);var e=performance.now(),n=window.orientation!==s;if(n&&(s=window.orientation),!t.lastResizeTime||e-t.lastResizeTime>100||n){var r=i();t.$el.find(".dialog-body").css("--cool-dialog-body-height",r+"px"),t.lastResizeTime=e}else o=setTimeout(function(){var e=i();t.$el.find(".dialog-body").css("--cool-dialog-body-height",e+"px")},16)},window.addEventListener("resize",t.resizeHandler,{passive:!0}),window.addEventListener("orientationchange",t.resizeHandler,{passive:!0})}}},o.show=function(t){var e=this;if(this.$container.hasClass("has-dialogs")||this.$container.addClass("has-dialogs"),t.preventScroll&&!this.$container.hasClass("dialog-prevent-scroll")&&this.$container.addClass("dialog-prevent-scroll"),this.dialogs.length>1){var n=$(this.dialogs).eq(-2)[0].$el,i=parseInt(n.css("z-index"),10)+1;t.$el.css("z-index",i),n.css({transition:"opacity 0.3s",opacity:0,visibility:"visible"})}if(t.backdrop&&$(".dialog-backdrop").length<1){this.$container.append('<div class="dialog-backdrop"></div>');var o=setInterval(function(){0==e.dialogs.length&&$(".dialog-backdrop").length&&($(".dialog-backdrop").remove(),clearInterval(o))},100)}if(this.$container.append(t.$el),t.animation){var s=t.$el.find(".dialog-content");F(s,t.animationIn)}this.onShow(t)},o.close=function(t){var e=this,n=null;t.resizeObserver&&(t.resizeObserver.disconnect(),t.resizeObserver=null),t.rafId&&(cancelAnimationFrame(t.rafId),t.rafId=null),t.resizeHandler&&(window.removeEventListener("resize",t.resizeHandler),window.removeEventListener("orientationchange",t.resizeHandler),t.resizeHandler=null),this.dialogs.length>1&&(n=$(this.dialogs).eq(-2)[0].$el),0===$('.dialog[data-dialog-backdrop="true"]').length&&$(".dialog-backdrop").length&&$(".dialog-backdrop").remove(),t.animation?F(t.$el.find(".dialog-content"),t.animationOut).then(function(){t.$el.remove(),e.dialogs=$.grep(e.dialogs,function(e){return e.uuid!=t.uuid}),0==e.dialogs.length?(e.$container.removeClass("has-dialogs"),e.$container.hasClass("dialog-prevent-scroll")&&e.$container.removeClass("dialog-prevent-scroll")):n&&n.css("opacity",1)}):(t.$el.remove(),this.dialogs=$.grep(this.dialogs,function(e){return e.uuid!=t.uuid}),0==this.dialogs.length?(this.$container.removeClass("has-dialogs"),this.$container.hasClass("dialog-prevent-scroll")&&this.$container.removeClass("dialog-prevent-scroll")):n&&n.css("opacity",1)),this.onClose(t)},o.onInitialize=function(){var t=this.onInitialize;"function"==typeof t&&t.call(this.container)},o.onDestroy=function(){var t=this.onDestroy;"function"==typeof t&&t.call(this.container)},o.onInit=function(t){var e=t.onInit;"function"==typeof e&&e.call(t)},o.onShow=function(t){var e=t.onShow;"function"==typeof e&&e.call(t)},o.onClose=function(t){var e=t.onClose;"function"==typeof e&&e.call(t)},o._renderFooter=function(t){if("function"==typeof t.footer)return t.footer();if(""!==t.footer&&!1!==t.footer&&!0!==t.footer)return t.footer;if(!0===t.footer){if(!t.actions||"object"!=typeof t.actions)return"";var e=Object.entries(t.actions).filter(function(t){t[0];var e=t[1];return!1!==e&&("undefined"==typeof e.visible||!!e.visible)}).map(function(t,e){return{key:t[0],action:t[1],idx:e}});e.sort(function(t,n){if(2===e.length&&e.some(function(t){return"close"===t.key})&&e.some(function(t){return"remove"===t.key})){if("close"===t.key)return-1;if("close"===n.key)return 1;if("remove"===t.key)return 1;if("remove"===n.key)return-1}return"remove"===t.key?-1:"remove"===n.key||"confirm"===t.key?1:"confirm"===n.key?-1:t.idx-n.idx});var n=e.map(function(t){var e=t.key,n=t.action,i=n.style?n.style:n.primary?"btn-primary":"btn-secondary";"remove"===e&&(i="btn-remove"),"confirm"!==e||"undefined"!==n.primary&&!1===n.primary||(i="btn-primary");var o=n.content||e.charAt(0).toUpperCase()+e.slice(1);return'\n <button type="button" class="btn '+i+(n.classes?" "+n.classes:"")+'"'+(n.attrs?" "+n.attrs:"")+' data-dialog-action="'+e+'"'+(["confirm","close","remove"].includes(e)?" data-dialog-"+e:"")+">\n "+o+"\n </button>\n "});return'\n <div class="dialog-footer">\n '+(n.length>2?"\n "+n[0]+'\n <div class="spacer"></div>\n '+n[1]+"\n "+n.slice(2).join("\n")+"\n ":n.join("\n"))+"\n </div>\n "}return""},o._renderHeader=function(t){var e,n,i,o='\n <button type="button" data-dialog-action="close" class="dialog-header-close">\n <svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="icon"><path d="M18 6 6 18"/><path d="m6 6 12 12"/></svg>\n </button>\n ';return"function"==typeof t.header?t.header():""!==t.header&&!1!==t.header&&!0!==t.header?t.header:!0===t.header?'\n <div class="dialog-header">\n <span class="dialog-title">\n '+(e=t.title,n=document.createTextNode(e),(i=document.createElement("p")).appendChild(n),i.innerHTML+"\n </span>\n ")+o+"\n </div>\n ":'<div class="dialog-header">'+o+"</div>"},o._renderTemplate=function(t){var e=t.classes?" "+t.classes:"",n=t.centered?" dialog-centered":"",i=t.size?" dialog-"+t.size:"",o=t.overflowVisible?" dialog-overflow-visible":"",s=' data-dialog-uuid="'+t.uuid+'"',r=t.backdrop?' data-dialog-backdrop="true"':' data-dialog-backdrop="false"',a=t.maxBodyHeight?' style="--cool-dialog-body-height: '+t.maxBodyHeight+'px"':"",l="function"==typeof t.body?t.body():t.body,c=this._renderFooter(t);return'\n <div class="dialog'+e+n+i+o+'"'+s+r+'>\n\n <div class="dialog-container">\n\n <div class="dialog-content">\n\n '+this._renderHeader(t)+'\n\n <div class="dialog-body"'+a+">\n\n "+l+"\n\n </div>\n\n "+c+"\n\n </div>\n\n </div>\n\n </div>\n "},i}(s);et.NAME="coolDialog",et.DEFAULTS=((Z={title:"",template:"",body:"",footer:!0,header:!0,size:"",classes:"",centered:!0,backdrop:!0,preventScroll:!0,closeBtn:!0,animation:!0,animationIn:"zoomIn",animationOut:"fadeOut",animationSpeed:"fastest",maxBodyHeight:null,overflowVisible:!1,onInitialize:null,onDestroy:null,onInit:null}).onDestroy=null,Z.onShow=null,Z.onClose=null,Z.callbacks={},Z.actions={},Z),et._jQueryInit(),window.Cool=window.Cool||{},window.Cool.settings=window.Cool.settings||{};var nt=function(){function t(){}return t.refresh=function(){this._sectionInstance&&this._sectionInstance.refresh&&this._sectionInstance.refresh(),B.initializeElements('[data-toggle="popover"]',window.Cool.settings.popover),U.initializeElements('[data-toggle="select"]',window.Cool.settings.select),Q.initializeElements('[data-toggle="dropdown"]',window.Cool.settings.dropdown),K.initializeElements('[data-toggle="tooltip"]',window.Cool.settings.tooltip),V.initializeElements('[data-toggle="collapse"]',window.Cool.settings.collapse),J.initializeElements('[data-toggle="section-tabs"]',window.Cool.settings.sectionTabs)},t.initialize=function(t){void 0===t&&(t={}),window.Cool.settings=t,this._sectionInstance||(this._sectionInstance=new r(t.section)),B.initializeElements('[data-toggle="popover"]',t.popover),U.initializeElements('[data-toggle="select"]',t.select),Q.initializeElements('[data-toggle="dropdown"]',t.dropdown),K.initializeElements('[data-toggle="tooltip"]',t.tooltip),V.initializeElements('[data-toggle="collapse"]',t.collapse),J.initializeElements('[data-toggle="section-tabs"]',t.sectionTabs);var e=document.querySelector(".sidebar-left");e&&(this._sidebarInstance=new N(e,t.sidebar)),new tt(document.body,t.toast),new et(document.body,t.dialog)},t.initComponent=function(t){if(t){var e=Array.isArray(t)?t:[t],n=[],i=[];e.forEach(function(t){var e="string"==typeof t?document.querySelector(t):t;if(e){var n=e.querySelectorAll("[data-toggle]");(e.hasAttribute("data-toggle")?[e].concat(Array.from(n)):Array.from(n)).forEach(function(t){i.push(t)})}});var o=[],s=[];i.forEach(function(t){var e=t.getBoundingClientRect();e.top<window.innerHeight&&e.bottom>0?o.push(t):s.push(t)});var r=[].concat(o,s),a=0,l=function(){r.slice(a,a+10).forEach(function(t){var e=null;switch(t.getAttribute("data-toggle")){case"popover":e=B.initializeElement(t,window.Cool.settings.popover);break;case"select":e=U.initializeElement(t,window.Cool.settings.select);break;case"dropdown":e=Q.initializeElement(t,window.Cool.settings.dropdown);break;case"tooltip":e=K.initializeElement(t,window.Cool.settings.tooltip);break;case"collapse":e=V.initializeElement(t,window.Cool.settings.collapse);break;case"section-tabs":e=J.initializeElement(t,window.Cool.settings.sectionTabs)}e&&n.push(e)}),(a+=10)<r.length&&("requestIdleCallback"in window?requestIdleCallback(l,{timeout:50}):setTimeout(l,0))};return o.length>0?l():"requestIdleCallback"in window?requestIdleCallback(l,{timeout:100}):l(),n}},t.destroy=function(){this._sidebarInstance&&(this._sidebarInstance.destroy(),this._sidebarInstance=null),this._sectionInstance&&(this._sectionInstance.destroy(),this._sectionInstance=null)},t.observeResize=function(t,e){if(t&&"function"==typeof e)return z.observe(t,e);console.warn("Cool.observeResize requires an element and a callback function")},t.unobserveResize=function(t){t?z.unobserve(t):console.warn("Cool.unobserveResize requires an element")},t.addScrollListener=function(t,e){t&&"function"==typeof e?W.add(t,e):console.warn("Cool.addScrollListener requires an id and a callback function")},t.removeScrollListener=function(t){t?W.remove(t):console.warn("Cool.removeScrollListener requires an id")},t.getSidebar=function(){return this._sidebarInstance},t.getSection=function(){return this._sectionInstance},t}();nt._sidebarInstance=null,nt._sectionInstance=null,window.Cool.initialize=nt.initialize.bind(nt),window.Cool.initComponent=nt.initComponent.bind(nt),window.Cool.refresh=nt.refresh.bind(nt),window.Cool.destroy=nt.destroy.bind(nt),window.Cool.observeResize=nt.observeResize.bind(nt),window.Cool.unobserveResize=nt.unobserveResize.bind(nt),window.Cool.addScrollListener=nt.addScrollListener.bind(nt),window.Cool.removeScrollListener=nt.removeScrollListener.bind(nt),window.Cool.getSidebar=nt.getSidebar.bind(nt),window.Cool.getSection=nt.getSection.bind(nt);return{Common:nt,Sidebar:N,Popover:B,Select:U,Dropdown:Q,Tooltip:K,SectionTabs:J,Collapse:V,Toast:tt,Dialog:et}});
|
|
8
|
+
* jQuery JavaScript Library v3.7.1
|
|
9
|
+
* https://jquery.com/
|
|
10
|
+
*
|
|
11
|
+
* Copyright OpenJS Foundation and other contributors
|
|
12
|
+
* Released under the MIT license
|
|
13
|
+
* https://jquery.org/license
|
|
14
|
+
*
|
|
15
|
+
* Date: 2023-08-28T13:37Z
|
|
16
|
+
*/!function(e){!function(t,i){e.exports=t.document?i(t,!0):function(t){if(!t.document)throw new Error("jQuery requires a window with a document");return i(t)}}("undefined"!=typeof window?window:t,function(t,e){var i=[],n=Object.getPrototypeOf,s=i.slice,o=i.flat?function(t){return i.flat.call(t)}:function(t){return i.concat.apply([],t)},r=i.push,l=i.indexOf,a={},c=a.toString,h=a.hasOwnProperty,d=h.toString,u=d.call(Object),p={},f=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,y={type:!0,src:!0,nonce:!0,noModule:!0};function v(t,e,i){var n,s,o=(i=i||g).createElement("script");if(o.text=t,e)for(n in y)(s=e[n]||e.getAttribute&&e.getAttribute(n))&&o.setAttribute(n,s);i.head.appendChild(o).parentNode.removeChild(o)}function b(t){return null==t?t+"":"object"==typeof t||"function"==typeof t?a[c.call(t)]||"object":typeof t}var E="3.7.1",w=/HTML$/i,C=function(t,e){return new C.fn.init(t,e)};function x(t){var e=!!t&&"length"in t&&t.length,i=b(t);return!f(t)&&!m(t)&&("array"===i||0===e||"number"==typeof e&&e>0&&e-1 in t)}function S(t,e){return t.nodeName&&t.nodeName.toLowerCase()===e.toLowerCase()}C.fn=C.prototype={jquery:E,constructor:C,length:0,toArray:function(){return s.call(this)},get:function(t){return null==t?s.call(this):t<0?this[t+this.length]:this[t]},pushStack:function(t){var e=C.merge(this.constructor(),t);return e.prevObject=this,e},each:function(t){return C.each(this,t)},map:function(t){return this.pushStack(C.map(this,function(e,i){return t.call(e,i,e)}))},slice:function(){return this.pushStack(s.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},even:function(){return this.pushStack(C.grep(this,function(t,e){return(e+1)%2}))},odd:function(){return this.pushStack(C.grep(this,function(t,e){return e%2}))},eq:function(t){var e=this.length,i=+t+(t<0?e:0);return this.pushStack(i>=0&&i<e?[this[i]]:[])},end:function(){return this.prevObject||this.constructor()},push:r,sort:i.sort,splice:i.splice},C.extend=C.fn.extend=function(){var t,e,i,n,s,o,r=arguments[0]||{},l=1,a=arguments.length,c=!1;for("boolean"==typeof r&&(c=r,r=arguments[l]||{},l++),"object"==typeof r||f(r)||(r={}),l===a&&(r=this,l--);l<a;l++)if(null!=(t=arguments[l]))for(e in t)n=t[e],"__proto__"!==e&&r!==n&&(c&&n&&(C.isPlainObject(n)||(s=Array.isArray(n)))?(i=r[e],o=s&&!Array.isArray(i)?[]:s||C.isPlainObject(i)?i:{},s=!1,r[e]=C.extend(c,o,n)):void 0!==n&&(r[e]=n));return r},C.extend({expando:"jQuery"+(E+Math.random()).replace(/\D/g,""),isReady:!0,error:function(t){throw new Error(t)},noop:function(){},isPlainObject:function(t){var e,i;return!(!t||"[object Object]"!==c.call(t))&&(!(e=n(t))||"function"==typeof(i=h.call(e,"constructor")&&e.constructor)&&d.call(i)===u)},isEmptyObject:function(t){var e;for(e in t)return!1;return!0},globalEval:function(t,e,i){v(t,{nonce:e&&e.nonce},i)},each:function(t,e){var i,n=0;if(x(t))for(i=t.length;n<i&&!1!==e.call(t[n],n,t[n]);n++);else for(n in t)if(!1===e.call(t[n],n,t[n]))break;return t},text:function(t){var e,i="",n=0,s=t.nodeType;if(!s)for(;e=t[n++];)i+=C.text(e);return 1===s||11===s?t.textContent:9===s?t.documentElement.textContent:3===s||4===s?t.nodeValue:i},makeArray:function(t,e){var i=e||[];return null!=t&&(x(Object(t))?C.merge(i,"string"==typeof t?[t]:t):r.call(i,t)),i},inArray:function(t,e,i){return null==e?-1:l.call(e,t,i)},isXMLDoc:function(t){var e=t&&t.namespaceURI,i=t&&(t.ownerDocument||t).documentElement;return!w.test(e||i&&i.nodeName||"HTML")},merge:function(t,e){for(var i=+e.length,n=0,s=t.length;n<i;n++)t[s++]=e[n];return t.length=s,t},grep:function(t,e,i){for(var n=[],s=0,o=t.length,r=!i;s<o;s++)!e(t[s],s)!==r&&n.push(t[s]);return n},map:function(t,e,i){var n,s,r=0,l=[];if(x(t))for(n=t.length;r<n;r++)null!=(s=e(t[r],r,i))&&l.push(s);else for(r in t)null!=(s=e(t[r],r,i))&&l.push(s);return o(l)},guid:1,support:p}),"function"==typeof Symbol&&(C.fn[Symbol.iterator]=i[Symbol.iterator]),C.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(t,e){a["[object "+e+"]"]=e.toLowerCase()});var T=i.pop,k=i.sort,_=i.splice,L="[\\x20\\t\\r\\n\\f]",A=new RegExp("^"+L+"+|((?:^|[^\\\\])(?:\\\\.)*)"+L+"+$","g");C.contains=function(t,e){var i=e&&e.parentNode;return t===i||!(!i||1!==i.nodeType||!(t.contains?t.contains(i):t.compareDocumentPosition&&16&t.compareDocumentPosition(i)))};var I=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g;function H(t,e){return e?"\0"===t?"�":t.slice(0,-1)+"\\"+t.charCodeAt(t.length-1).toString(16)+" ":"\\"+t}C.escapeSelector=function(t){return(t+"").replace(I,H)};var D=g,$=r;!function(){var e,n,o,r,a,c,d,u,f,m,g=$,y=C.expando,v=0,b=0,E=tt(),w=tt(),x=tt(),I=tt(),H=function(t,e){return t===e&&(a=!0),0},q="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",M="(?:\\\\[\\da-fA-F]{1,6}"+L+"?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+",j="\\["+L+"*("+M+")(?:"+L+"*([*^$|!~]?=)"+L+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+M+"))|)"+L+"*\\]",O=":("+M+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+j+")*)|.*)\\)|)",N=new RegExp(L+"+","g"),z=new RegExp("^"+L+"*,"+L+"*"),P=new RegExp("^"+L+"*([>+~]|"+L+")"+L+"*"),F=new RegExp(L+"|>"),R=new RegExp(O),W=new RegExp("^"+M+"$"),B={ID:new RegExp("^#("+M+")"),CLASS:new RegExp("^\\.("+M+")"),TAG:new RegExp("^("+M+"|[*])"),ATTR:new RegExp("^"+j),PSEUDO:new RegExp("^"+O),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+L+"*(even|odd|(([+-]|)(\\d*)n|)"+L+"*(?:([+-]|)"+L+"*(\\d+)|))"+L+"*\\)|)","i"),bool:new RegExp("^(?:"+q+")$","i"),needsContext:new RegExp("^"+L+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+L+"*((?:-\\d)?\\d*)"+L+"*\\)|)(?=[^-]|$)","i")},U=/^(?:input|select|textarea|button)$/i,Q=/^h\d$/i,V=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,K=/[+~]/,X=new RegExp("\\\\[\\da-fA-F]{1,6}"+L+"?|\\\\([^\\r\\n\\f])","g"),Y=function(t,e){var i="0x"+t.slice(1)-65536;return e||(i<0?String.fromCharCode(i+65536):String.fromCharCode(i>>10|55296,1023&i|56320))},G=function(){at()},J=ut(function(t){return!0===t.disabled&&S(t,"fieldset")},{dir:"parentNode",next:"legend"});try{g.apply(i=s.call(D.childNodes),D.childNodes),i[D.childNodes.length].nodeType}catch(t){g={apply:function(t,e){$.apply(t,s.call(e))},call:function(t){$.apply(t,s.call(arguments,1))}}}function Z(t,e,i,n){var s,o,r,l,a,h,d,m=e&&e.ownerDocument,v=e?e.nodeType:9;if(i=i||[],"string"!=typeof t||!t||1!==v&&9!==v&&11!==v)return i;if(!n&&(at(e),e=e||c,u)){if(11!==v&&(a=V.exec(t)))if(s=a[1]){if(9===v){if(!(r=e.getElementById(s)))return i;if(r.id===s)return g.call(i,r),i}else if(m&&(r=m.getElementById(s))&&Z.contains(e,r)&&r.id===s)return g.call(i,r),i}else{if(a[2])return g.apply(i,e.getElementsByTagName(t)),i;if((s=a[3])&&e.getElementsByClassName)return g.apply(i,e.getElementsByClassName(s)),i}if(!(I[t+" "]||f&&f.test(t))){if(d=t,m=e,1===v&&(F.test(t)||P.test(t))){for((m=K.test(t)&<(e.parentNode)||e)==e&&p.scope||((l=e.getAttribute("id"))?l=C.escapeSelector(l):e.setAttribute("id",l=y)),o=(h=ht(t)).length;o--;)h[o]=(l?"#"+l:":scope")+" "+dt(h[o]);d=h.join(",")}try{return g.apply(i,m.querySelectorAll(d)),i}catch(e){I(t,!0)}finally{l===y&&e.removeAttribute("id")}}}return vt(t.replace(A,"$1"),e,i,n)}function tt(){var t=[];return function e(i,s){return t.push(i+" ")>n.cacheLength&&delete e[t.shift()],e[i+" "]=s}}function et(t){return t[y]=!0,t}function it(t){var e=c.createElement("fieldset");try{return!!t(e)}catch(t){return!1}finally{e.parentNode&&e.parentNode.removeChild(e),e=null}}function nt(t){return function(e){return S(e,"input")&&e.type===t}}function st(t){return function(e){return(S(e,"input")||S(e,"button"))&&e.type===t}}function ot(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&&J(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function rt(t){return et(function(e){return e=+e,et(function(i,n){for(var s,o=t([],i.length,e),r=o.length;r--;)i[s=o[r]]&&(i[s]=!(n[s]=i[s]))})})}function lt(t){return t&&"undefined"!=typeof t.getElementsByTagName&&t}function at(t){var e,i=t?t.ownerDocument||t:D;return i!=c&&9===i.nodeType&&i.documentElement?(d=(c=i).documentElement,u=!C.isXMLDoc(c),m=d.matches||d.webkitMatchesSelector||d.msMatchesSelector,d.msMatchesSelector&&D!=c&&(e=c.defaultView)&&e.top!==e&&e.addEventListener("unload",G),p.getById=it(function(t){return d.appendChild(t).id=C.expando,!c.getElementsByName||!c.getElementsByName(C.expando).length}),p.disconnectedMatch=it(function(t){return m.call(t,"*")}),p.scope=it(function(){return c.querySelectorAll(":scope")}),p.cssHas=it(function(){try{return c.querySelector(":has(*,:jqfake)"),!1}catch(t){return!0}}),p.getById?(n.filter.ID=function(t){var e=t.replace(X,Y);return function(t){return t.getAttribute("id")===e}},n.find.ID=function(t,e){if("undefined"!=typeof e.getElementById&&u){var i=e.getElementById(t);return i?[i]:[]}}):(n.filter.ID=function(t){var e=t.replace(X,Y);return function(t){var i="undefined"!=typeof t.getAttributeNode&&t.getAttributeNode("id");return i&&i.value===e}},n.find.ID=function(t,e){if("undefined"!=typeof e.getElementById&&u){var i,n,s,o=e.getElementById(t);if(o){if((i=o.getAttributeNode("id"))&&i.value===t)return[o];for(s=e.getElementsByName(t),n=0;o=s[n++];)if((i=o.getAttributeNode("id"))&&i.value===t)return[o]}return[]}}),n.find.TAG=function(t,e){return"undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t):e.querySelectorAll(t)},n.find.CLASS=function(t,e){if("undefined"!=typeof e.getElementsByClassName&&u)return e.getElementsByClassName(t)},f=[],it(function(t){var e;d.appendChild(t).innerHTML="<a id='"+y+"' href='' disabled='disabled'></a><select id='"+y+"-\r\\' disabled='disabled'><option selected=''></option></select>",t.querySelectorAll("[selected]").length||f.push("\\["+L+"*(?:value|"+q+")"),t.querySelectorAll("[id~="+y+"-]").length||f.push("~="),t.querySelectorAll("a#"+y+"+*").length||f.push(".#.+[+~]"),t.querySelectorAll(":checked").length||f.push(":checked"),(e=c.createElement("input")).setAttribute("type","hidden"),t.appendChild(e).setAttribute("name","D"),d.appendChild(t).disabled=!0,2!==t.querySelectorAll(":disabled").length&&f.push(":enabled",":disabled"),(e=c.createElement("input")).setAttribute("name",""),t.appendChild(e),t.querySelectorAll("[name='']").length||f.push("\\["+L+"*name"+L+"*="+L+"*(?:''|\"\")")}),p.cssHas||f.push(":has"),f=f.length&&new RegExp(f.join("|")),H=function(t,e){if(t===e)return a=!0,0;var i=!t.compareDocumentPosition-!e.compareDocumentPosition;return i||(1&(i=(t.ownerDocument||t)==(e.ownerDocument||e)?t.compareDocumentPosition(e):1)||!p.sortDetached&&e.compareDocumentPosition(t)===i?t===c||t.ownerDocument==D&&Z.contains(D,t)?-1:e===c||e.ownerDocument==D&&Z.contains(D,e)?1:r?l.call(r,t)-l.call(r,e):0:4&i?-1:1)},c):c}for(e in Z.matches=function(t,e){return Z(t,null,null,e)},Z.matchesSelector=function(t,e){if(at(t),u&&!I[e+" "]&&(!f||!f.test(e)))try{var i=m.call(t,e);if(i||p.disconnectedMatch||t.document&&11!==t.document.nodeType)return i}catch(t){I(e,!0)}return Z(e,c,null,[t]).length>0},Z.contains=function(t,e){return(t.ownerDocument||t)!=c&&at(t),C.contains(t,e)},Z.attr=function(t,e){(t.ownerDocument||t)!=c&&at(t);var i=n.attrHandle[e.toLowerCase()],s=i&&h.call(n.attrHandle,e.toLowerCase())?i(t,e,!u):void 0;return void 0!==s?s:t.getAttribute(e)},Z.error=function(t){throw new Error("Syntax error, unrecognized expression: "+t)},C.uniqueSort=function(t){var e,i=[],n=0,o=0;if(a=!p.sortStable,r=!p.sortStable&&s.call(t,0),k.call(t,H),a){for(;e=t[o++];)e===t[o]&&(n=i.push(o));for(;n--;)_.call(t,i[n],1)}return r=null,t},C.fn.uniqueSort=function(){return this.pushStack(C.uniqueSort(s.apply(this)))},n=C.expr={cacheLength:50,createPseudo:et,match:B,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(X,Y),t[3]=(t[3]||t[4]||t[5]||"").replace(X,Y),"~="===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]||Z.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]&&Z.error(t[0]),t},PSEUDO:function(t){var e,i=!t[6]&&t[2];return B.CHILD.test(t[0])?null:(t[3]?t[2]=t[4]||t[5]||"":i&&R.test(i)&&(e=ht(i,!0))&&(e=i.indexOf(")",i.length-e)-i.length)&&(t[0]=t[0].slice(0,e),t[2]=i.slice(0,e)),t.slice(0,3))}},filter:{TAG:function(t){var e=t.replace(X,Y).toLowerCase();return"*"===t?function(){return!0}:function(t){return S(t,e)}},CLASS:function(t){var e=E[t+" "];return e||(e=new RegExp("(^|"+L+")"+t+"("+L+"|$)"))&&E(t,function(t){return e.test("string"==typeof t.className&&t.className||"undefined"!=typeof t.getAttribute&&t.getAttribute("class")||"")})},ATTR:function(t,e,i){return function(n){var s=Z.attr(n,t);return null==s?"!="===e:!e||(s+="","="===e?s===i:"!="===e?s!==i:"^="===e?i&&0===s.indexOf(i):"*="===e?i&&s.indexOf(i)>-1:"$="===e?i&&s.slice(-i.length)===i:"~="===e?(" "+s.replace(N," ")+" ").indexOf(i)>-1:"|="===e&&(s===i||s.slice(0,i.length+1)===i+"-"))}},CHILD:function(t,e,i,n,s){var o="nth"!==t.slice(0,3),r="last"!==t.slice(-4),l="of-type"===e;return 1===n&&0===s?function(t){return!!t.parentNode}:function(e,i,a){var c,h,d,u,p,f=o!==r?"nextSibling":"previousSibling",m=e.parentNode,g=l&&e.nodeName.toLowerCase(),b=!a&&!l,E=!1;if(m){if(o){for(;f;){for(d=e;d=d[f];)if(l?S(d,g):1===d.nodeType)return!1;p=f="only"===t&&!p&&"nextSibling"}return!0}if(p=[r?m.firstChild:m.lastChild],r&&b){for(E=(u=(c=(h=m[y]||(m[y]={}))[t]||[])[0]===v&&c[1])&&c[2],d=u&&m.childNodes[u];d=++u&&d&&d[f]||(E=u=0)||p.pop();)if(1===d.nodeType&&++E&&d===e){h[t]=[v,u,E];break}}else if(b&&(E=u=(c=(h=e[y]||(e[y]={}))[t]||[])[0]===v&&c[1]),!1===E)for(;(d=++u&&d&&d[f]||(E=u=0)||p.pop())&&(!(l?S(d,g):1===d.nodeType)||!++E||(b&&((h=d[y]||(d[y]={}))[t]=[v,E]),d!==e)););return(E-=s)===n||E%n===0&&E/n>=0}}},PSEUDO:function(t,e){var i,s=n.pseudos[t]||n.setFilters[t.toLowerCase()]||Z.error("unsupported pseudo: "+t);return s[y]?s(e):s.length>1?(i=[t,t,"",e],n.setFilters.hasOwnProperty(t.toLowerCase())?et(function(t,i){for(var n,o=s(t,e),r=o.length;r--;)t[n=l.call(t,o[r])]=!(i[n]=o[r])}):function(t){return s(t,0,i)}):s}},pseudos:{not:et(function(t){var e=[],i=[],n=yt(t.replace(A,"$1"));return n[y]?et(function(t,e,i,s){for(var o,r=n(t,null,s,[]),l=t.length;l--;)(o=r[l])&&(t[l]=!(e[l]=o))}):function(t,s,o){return e[0]=t,n(e,null,o,i),e[0]=null,!i.pop()}}),has:et(function(t){return function(e){return Z(t,e).length>0}}),contains:et(function(t){return t=t.replace(X,Y),function(e){return(e.textContent||C.text(e)).indexOf(t)>-1}}),lang:et(function(t){return W.test(t||"")||Z.error("unsupported lang: "+t),t=t.replace(X,Y).toLowerCase(),function(e){var i;do{if(i=u?e.lang:e.getAttribute("xml:lang")||e.getAttribute("lang"))return(i=i.toLowerCase())===t||0===i.indexOf(t+"-")}while((e=e.parentNode)&&1===e.nodeType);return!1}}),target:function(e){var i=t.location&&t.location.hash;return i&&i.slice(1)===e.id},root:function(t){return t===d},focus:function(t){return t===function(){try{return c.activeElement}catch(t){}}()&&c.hasFocus()&&!!(t.type||t.href||~t.tabIndex)},enabled:ot(!1),disabled:ot(!0),checked:function(t){return S(t,"input")&&!!t.checked||S(t,"option")&&!!t.selected},selected:function(t){return t.parentNode&&t.parentNode.selectedIndex,!0===t.selected},empty:function(t){for(t=t.firstChild;t;t=t.nextSibling)if(t.nodeType<6)return!1;return!0},parent:function(t){return!n.pseudos.empty(t)},header:function(t){return Q.test(t.nodeName)},input:function(t){return U.test(t.nodeName)},button:function(t){return S(t,"input")&&"button"===t.type||S(t,"button")},text:function(t){var e;return S(t,"input")&&"text"===t.type&&(null==(e=t.getAttribute("type"))||"text"===e.toLowerCase())},first:rt(function(){return[0]}),last:rt(function(t,e){return[e-1]}),eq:rt(function(t,e,i){return[i<0?i+e:i]}),even:rt(function(t,e){for(var i=0;i<e;i+=2)t.push(i);return t}),odd:rt(function(t,e){for(var i=1;i<e;i+=2)t.push(i);return t}),lt:rt(function(t,e,i){var n;for(n=i<0?i+e:i>e?e:i;--n>=0;)t.push(n);return t}),gt:rt(function(t,e,i){for(var n=i<0?i+e:i;++n<e;)t.push(n);return t})}},n.pseudos.nth=n.pseudos.eq,{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})n.pseudos[e]=nt(e);for(e in{submit:!0,reset:!0})n.pseudos[e]=st(e);function ct(){}function ht(t,e){var i,s,o,r,l,a,c,h=w[t+" "];if(h)return e?0:h.slice(0);for(l=t,a=[],c=n.preFilter;l;){for(r in i&&!(s=z.exec(l))||(s&&(l=l.slice(s[0].length)||l),a.push(o=[])),i=!1,(s=P.exec(l))&&(i=s.shift(),o.push({value:i,type:s[0].replace(A," ")}),l=l.slice(i.length)),n.filter)!(s=B[r].exec(l))||c[r]&&!(s=c[r](s))||(i=s.shift(),o.push({value:i,type:r,matches:s}),l=l.slice(i.length));if(!i)break}return e?l.length:l?Z.error(t):w(t,a).slice(0)}function dt(t){for(var e=0,i=t.length,n="";e<i;e++)n+=t[e].value;return n}function ut(t,e,i){var n=e.dir,s=e.next,o=s||n,r=i&&"parentNode"===o,l=b++;return e.first?function(e,i,s){for(;e=e[n];)if(1===e.nodeType||r)return t(e,i,s);return!1}:function(e,i,a){var c,h,d=[v,l];if(a){for(;e=e[n];)if((1===e.nodeType||r)&&t(e,i,a))return!0}else for(;e=e[n];)if(1===e.nodeType||r)if(h=e[y]||(e[y]={}),s&&S(e,s))e=e[n]||e;else{if((c=h[o])&&c[0]===v&&c[1]===l)return d[2]=c[2];if(h[o]=d,d[2]=t(e,i,a))return!0}return!1}}function pt(t){return t.length>1?function(e,i,n){for(var s=t.length;s--;)if(!t[s](e,i,n))return!1;return!0}:t[0]}function ft(t,e,i,n,s){for(var o,r=[],l=0,a=t.length,c=null!=e;l<a;l++)(o=t[l])&&(i&&!i(o,n,s)||(r.push(o),c&&e.push(l)));return r}function mt(t,e,i,n,s,o){return n&&!n[y]&&(n=mt(n)),s&&!s[y]&&(s=mt(s,o)),et(function(o,r,a,c){var h,d,u,p,f=[],m=[],y=r.length,v=o||function(t,e,i){for(var n=0,s=e.length;n<s;n++)Z(t,e[n],i);return i}(e||"*",a.nodeType?[a]:a,[]),b=!t||!o&&e?v:ft(v,f,t,a,c);if(i?i(b,p=s||(o?t:y||n)?[]:r,a,c):p=b,n)for(h=ft(p,m),n(h,[],a,c),d=h.length;d--;)(u=h[d])&&(p[m[d]]=!(b[m[d]]=u));if(o){if(s||t){if(s){for(h=[],d=p.length;d--;)(u=p[d])&&h.push(b[d]=u);s(null,p=[],h,c)}for(d=p.length;d--;)(u=p[d])&&(h=s?l.call(o,u):f[d])>-1&&(o[h]=!(r[h]=u))}}else p=ft(p===r?p.splice(y,p.length):p),s?s(null,r,p,c):g.apply(r,p)})}function gt(t){for(var e,i,s,r=t.length,a=n.relative[t[0].type],c=a||n.relative[" "],h=a?1:0,d=ut(function(t){return t===e},c,!0),u=ut(function(t){return l.call(e,t)>-1},c,!0),p=[function(t,i,n){var s=!a&&(n||i!=o)||((e=i).nodeType?d(t,i,n):u(t,i,n));return e=null,s}];h<r;h++)if(i=n.relative[t[h].type])p=[ut(pt(p),i)];else{if((i=n.filter[t[h].type].apply(null,t[h].matches))[y]){for(s=++h;s<r&&!n.relative[t[s].type];s++);return mt(h>1&&pt(p),h>1&&dt(t.slice(0,h-1).concat({value:" "===t[h-2].type?"*":""})).replace(A,"$1"),i,h<s&>(t.slice(h,s)),s<r&>(t=t.slice(s)),s<r&&dt(t))}p.push(i)}return pt(p)}function yt(t,e){var i,s=[],r=[],l=x[t+" "];if(!l){for(e||(e=ht(t)),i=e.length;i--;)(l=gt(e[i]))[y]?s.push(l):r.push(l);l=x(t,function(t,e){var i=e.length>0,s=t.length>0,r=function(r,l,a,h,d){var p,f,m,y=0,b="0",E=r&&[],w=[],x=o,S=r||s&&n.find.TAG("*",d),k=v+=null==x?1:Math.random()||.1,_=S.length;for(d&&(o=l==c||l||d);b!==_&&null!=(p=S[b]);b++){if(s&&p){for(f=0,l||p.ownerDocument==c||(at(p),a=!u);m=t[f++];)if(m(p,l||c,a)){g.call(h,p);break}d&&(v=k)}i&&((p=!m&&p)&&y--,r&&E.push(p))}if(y+=b,i&&b!==y){for(f=0;m=e[f++];)m(E,w,l,a);if(r){if(y>0)for(;b--;)E[b]||w[b]||(w[b]=T.call(h));w=ft(w)}g.apply(h,w),d&&!r&&w.length>0&&y+e.length>1&&C.uniqueSort(h)}return d&&(v=k,o=x),E};return i?et(r):r}(r,s)),l.selector=t}return l}function vt(t,e,i,s){var o,r,l,a,c,h="function"==typeof t&&t,d=!s&&ht(t=h.selector||t);if(i=i||[],1===d.length){if((r=d[0]=d[0].slice(0)).length>2&&"ID"===(l=r[0]).type&&9===e.nodeType&&u&&n.relative[r[1].type]){if(!(e=(n.find.ID(l.matches[0].replace(X,Y),e)||[])[0]))return i;h&&(e=e.parentNode),t=t.slice(r.shift().value.length)}for(o=B.needsContext.test(t)?0:r.length;o--&&(l=r[o],!n.relative[a=l.type]);)if((c=n.find[a])&&(s=c(l.matches[0].replace(X,Y),K.test(r[0].type)&<(e.parentNode)||e))){if(r.splice(o,1),!(t=s.length&&dt(r)))return g.apply(i,s),i;break}}return(h||yt(t,d))(s,e,!u,i,!e||K.test(t)&<(e.parentNode)||e),i}ct.prototype=n.filters=n.pseudos,n.setFilters=new ct,p.sortStable=y.split("").sort(H).join("")===y,at(),p.sortDetached=it(function(t){return 1&t.compareDocumentPosition(c.createElement("fieldset"))}),C.find=Z,C.expr[":"]=C.expr.pseudos,C.unique=C.uniqueSort,Z.compile=yt,Z.select=vt,Z.setDocument=at,Z.tokenize=ht,Z.escape=C.escapeSelector,Z.getText=C.text,Z.isXML=C.isXMLDoc,Z.selectors=C.expr,Z.support=C.support,Z.uniqueSort=C.uniqueSort}();var q=function(t,e,i){for(var n=[],s=void 0!==i;(t=t[e])&&9!==t.nodeType;)if(1===t.nodeType){if(s&&C(t).is(i))break;n.push(t)}return n},M=function(t,e){for(var i=[];t;t=t.nextSibling)1===t.nodeType&&t!==e&&i.push(t);return i},j=C.expr.match.needsContext,O=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function N(t,e,i){return f(e)?C.grep(t,function(t,n){return!!e.call(t,n,t)!==i}):e.nodeType?C.grep(t,function(t){return t===e!==i}):"string"!=typeof e?C.grep(t,function(t){return l.call(e,t)>-1!==i}):C.filter(e,t,i)}C.filter=function(t,e,i){var n=e[0];return i&&(t=":not("+t+")"),1===e.length&&1===n.nodeType?C.find.matchesSelector(n,t)?[n]:[]:C.find.matches(t,C.grep(e,function(t){return 1===t.nodeType}))},C.fn.extend({find:function(t){var e,i,n=this.length,s=this;if("string"!=typeof t)return this.pushStack(C(t).filter(function(){for(e=0;e<n;e++)if(C.contains(s[e],this))return!0}));for(i=this.pushStack([]),e=0;e<n;e++)C.find(t,s[e],i);return n>1?C.uniqueSort(i):i},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&&j.test(t)?C(t):t||[],!1).length}});var z,P=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(C.fn.init=function(t,e,i){var n,s;if(!t)return this;if(i=i||z,"string"==typeof t){if(!(n="<"===t[0]&&">"===t[t.length-1]&&t.length>=3?[null,t,null]:P.exec(t))||!n[1]&&e)return!e||e.jquery?(e||i).find(t):this.constructor(e).find(t);if(n[1]){if(e=e instanceof C?e[0]:e,C.merge(this,C.parseHTML(n[1],e&&e.nodeType?e.ownerDocument||e:g,!0)),O.test(n[1])&&C.isPlainObject(e))for(n in e)f(this[n])?this[n](e[n]):this.attr(n,e[n]);return this}return(s=g.getElementById(n[2]))&&(this[0]=s,this.length=1),this}return t.nodeType?(this[0]=t,this.length=1,this):f(t)?void 0!==i.ready?i.ready(t):t(C):C.makeArray(t,this)}).prototype=C.fn,z=C(g);var F=/^(?:parents|prev(?:Until|All))/,R={children:!0,contents:!0,next:!0,prev:!0};function W(t,e){for(;(t=t[e])&&1!==t.nodeType;);return t}C.fn.extend({has:function(t){var e=C(t,this),i=e.length;return this.filter(function(){for(var t=0;t<i;t++)if(C.contains(this,e[t]))return!0})},closest:function(t,e){var i,n=0,s=this.length,o=[],r="string"!=typeof t&&C(t);if(!j.test(t))for(;n<s;n++)for(i=this[n];i&&i!==e;i=i.parentNode)if(i.nodeType<11&&(r?r.index(i)>-1:1===i.nodeType&&C.find.matchesSelector(i,t))){o.push(i);break}return this.pushStack(o.length>1?C.uniqueSort(o):o)},index:function(t){return t?"string"==typeof t?l.call(C(t),this[0]):l.call(this,t.jquery?t[0]:t):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(t,e){return this.pushStack(C.uniqueSort(C.merge(this.get(),C(t,e))))},addBack:function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}}),C.each({parent:function(t){var e=t.parentNode;return e&&11!==e.nodeType?e:null},parents:function(t){return q(t,"parentNode")},parentsUntil:function(t,e,i){return q(t,"parentNode",i)},next:function(t){return W(t,"nextSibling")},prev:function(t){return W(t,"previousSibling")},nextAll:function(t){return q(t,"nextSibling")},prevAll:function(t){return q(t,"previousSibling")},nextUntil:function(t,e,i){return q(t,"nextSibling",i)},prevUntil:function(t,e,i){return q(t,"previousSibling",i)},siblings:function(t){return M((t.parentNode||{}).firstChild,t)},children:function(t){return M(t.firstChild)},contents:function(t){return null!=t.contentDocument&&n(t.contentDocument)?t.contentDocument:(S(t,"template")&&(t=t.content||t),C.merge([],t.childNodes))}},function(t,e){C.fn[t]=function(i,n){var s=C.map(this,e,i);return"Until"!==t.slice(-5)&&(n=i),n&&"string"==typeof n&&(s=C.filter(n,s)),this.length>1&&(R[t]||C.uniqueSort(s),F.test(t)&&s.reverse()),this.pushStack(s)}});var B=/[^\x20\t\r\n\f]+/g;function U(t){return t}function Q(t){throw t}function V(t,e,i,n){var s;try{t&&f(s=t.promise)?s.call(t).done(e).fail(i):t&&f(s=t.then)?s.call(t,e,i):e.apply(void 0,[t].slice(n))}catch(t){i.apply(void 0,[t])}}C.Callbacks=function(t){t="string"==typeof t?function(t){var e={};return C.each(t.match(B)||[],function(t,i){e[i]=!0}),e}(t):C.extend({},t);var e,i,n,s,o=[],r=[],l=-1,a=function(){for(s=s||t.once,n=e=!0;r.length;l=-1)for(i=r.shift();++l<o.length;)!1===o[l].apply(i[0],i[1])&&t.stopOnFalse&&(l=o.length,i=!1);t.memory||(i=!1),e=!1,s&&(o=i?[]:"")},c={add:function(){return o&&(i&&!e&&(l=o.length-1,r.push(i)),function e(i){C.each(i,function(i,n){f(n)?t.unique&&c.has(n)||o.push(n):n&&n.length&&"string"!==b(n)&&e(n)})}(arguments),i&&!e&&a()),this},remove:function(){return C.each(arguments,function(t,e){for(var i;(i=C.inArray(e,o,i))>-1;)o.splice(i,1),i<=l&&l--}),this},has:function(t){return t?C.inArray(t,o)>-1:o.length>0},empty:function(){return o&&(o=[]),this},disable:function(){return s=r=[],o=i="",this},disabled:function(){return!o},lock:function(){return s=r=[],i||e||(o=i=""),this},locked:function(){return!!s},fireWith:function(t,i){return s||(i=[t,(i=i||[]).slice?i.slice():i],r.push(i),e||a()),this},fire:function(){return c.fireWith(this,arguments),this},fired:function(){return!!n}};return c},C.extend({Deferred:function(e){var i=[["notify","progress",C.Callbacks("memory"),C.Callbacks("memory"),2],["resolve","done",C.Callbacks("once memory"),C.Callbacks("once memory"),0,"resolved"],["reject","fail",C.Callbacks("once memory"),C.Callbacks("once memory"),1,"rejected"]],n="pending",s={state:function(){return n},always:function(){return o.done(arguments).fail(arguments),this},catch:function(t){return s.then(null,t)},pipe:function(){var t=arguments;return C.Deferred(function(e){C.each(i,function(i,n){var s=f(t[n[4]])&&t[n[4]];o[n[1]](function(){var t=s&&s.apply(this,arguments);t&&f(t.promise)?t.promise().progress(e.notify).done(e.resolve).fail(e.reject):e[n[0]+"With"](this,s?[t]:arguments)})}),t=null}).promise()},then:function(e,n,s){var o=0;function r(e,i,n,s){return function(){var l=this,a=arguments,c=function(){var t,c;if(!(e<o)){if((t=n.apply(l,a))===i.promise())throw new TypeError("Thenable self-resolution");c=t&&("object"==typeof t||"function"==typeof t)&&t.then,f(c)?s?c.call(t,r(o,i,U,s),r(o,i,Q,s)):(o++,c.call(t,r(o,i,U,s),r(o,i,Q,s),r(o,i,U,i.notifyWith))):(n!==U&&(l=void 0,a=[t]),(s||i.resolveWith)(l,a))}},h=s?c:function(){try{c()}catch(t){C.Deferred.exceptionHook&&C.Deferred.exceptionHook(t,h.error),e+1>=o&&(n!==Q&&(l=void 0,a=[t]),i.rejectWith(l,a))}};e?h():(C.Deferred.getErrorHook?h.error=C.Deferred.getErrorHook():C.Deferred.getStackHook&&(h.error=C.Deferred.getStackHook()),t.setTimeout(h))}}return C.Deferred(function(t){i[0][3].add(r(0,t,f(s)?s:U,t.notifyWith)),i[1][3].add(r(0,t,f(e)?e:U)),i[2][3].add(r(0,t,f(n)?n:Q))}).promise()},promise:function(t){return null!=t?C.extend(t,s):s}},o={};return C.each(i,function(t,e){var r=e[2],l=e[5];s[e[1]]=r.add,l&&r.add(function(){n=l},i[3-t][2].disable,i[3-t][3].disable,i[0][2].lock,i[0][3].lock),r.add(e[3].fire),o[e[0]]=function(){return o[e[0]+"With"](this===o?void 0:this,arguments),this},o[e[0]+"With"]=r.fireWith}),s.promise(o),e&&e.call(o,o),o},when:function(t){var e=arguments.length,i=e,n=Array(i),o=s.call(arguments),r=C.Deferred(),l=function(t){return function(i){n[t]=this,o[t]=arguments.length>1?s.call(arguments):i,--e||r.resolveWith(n,o)}};if(e<=1&&(V(t,r.done(l(i)).resolve,r.reject,!e),"pending"===r.state()||f(o[i]&&o[i].then)))return r.then();for(;i--;)V(o[i],l(i),r.reject);return r.promise()}});var K=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;C.Deferred.exceptionHook=function(e,i){t.console&&t.console.warn&&e&&K.test(e.name)&&t.console.warn("jQuery.Deferred exception: "+e.message,e.stack,i)},C.readyException=function(e){t.setTimeout(function(){throw e})};var X=C.Deferred();function Y(){g.removeEventListener("DOMContentLoaded",Y),t.removeEventListener("load",Y),C.ready()}C.fn.ready=function(t){return X.then(t).catch(function(t){C.readyException(t)}),this},C.extend({isReady:!1,readyWait:1,ready:function(t){(!0===t?--C.readyWait:C.isReady)||(C.isReady=!0,!0!==t&&--C.readyWait>0||X.resolveWith(g,[C]))}}),C.ready.then=X.then,"complete"===g.readyState||"loading"!==g.readyState&&!g.documentElement.doScroll?t.setTimeout(C.ready):(g.addEventListener("DOMContentLoaded",Y),t.addEventListener("load",Y));var G=function(t,e,i,n,s,o,r){var l=0,a=t.length,c=null==i;if("object"===b(i))for(l in s=!0,i)G(t,e,l,i[l],!0,o,r);else if(void 0!==n&&(s=!0,f(n)||(r=!0),c&&(r?(e.call(t,n),e=null):(c=e,e=function(t,e,i){return c.call(C(t),i)})),e))for(;l<a;l++)e(t[l],i,r?n:n.call(t[l],l,e(t[l],i)));return s?t:c?e.call(t):a?e(t[0],i):o},J=/^-ms-/,Z=/-([a-z])/g;function tt(t,e){return e.toUpperCase()}function et(t){return t.replace(J,"ms-").replace(Z,tt)}var it=function(t){return 1===t.nodeType||9===t.nodeType||!+t.nodeType};function nt(){this.expando=C.expando+nt.uid++}nt.uid=1,nt.prototype={cache:function(t){var e=t[this.expando];return e||(e={},it(t)&&(t.nodeType?t[this.expando]=e:Object.defineProperty(t,this.expando,{value:e,configurable:!0}))),e},set:function(t,e,i){var n,s=this.cache(t);if("string"==typeof e)s[et(e)]=i;else for(n in e)s[et(n)]=e[n];return s},get:function(t,e){return void 0===e?this.cache(t):t[this.expando]&&t[this.expando][et(e)]},access:function(t,e,i){return void 0===e||e&&"string"==typeof e&&void 0===i?this.get(t,e):(this.set(t,e,i),void 0!==i?i:e)},remove:function(t,e){var i,n=t[this.expando];if(void 0!==n){if(void 0!==e){i=(e=Array.isArray(e)?e.map(et):(e=et(e))in n?[e]:e.match(B)||[]).length;for(;i--;)delete n[e[i]]}(void 0===e||C.isEmptyObject(n))&&(t.nodeType?t[this.expando]=void 0:delete t[this.expando])}},hasData:function(t){var e=t[this.expando];return void 0!==e&&!C.isEmptyObject(e)}};var st=new nt,ot=new nt,rt=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,lt=/[A-Z]/g;function at(t,e,i){var n;if(void 0===i&&1===t.nodeType)if(n="data-"+e.replace(lt,"-$&").toLowerCase(),"string"==typeof(i=t.getAttribute(n))){try{i=function(t){return"true"===t||"false"!==t&&("null"===t?null:t===+t+""?+t:rt.test(t)?JSON.parse(t):t)}(i)}catch(t){}ot.set(t,e,i)}else i=void 0;return i}C.extend({hasData:function(t){return ot.hasData(t)||st.hasData(t)},data:function(t,e,i){return ot.access(t,e,i)},removeData:function(t,e){ot.remove(t,e)},_data:function(t,e,i){return st.access(t,e,i)},_removeData:function(t,e){st.remove(t,e)}}),C.fn.extend({data:function(t,e){var i,n,s,o=this[0],r=o&&o.attributes;if(void 0===t){if(this.length&&(s=ot.get(o),1===o.nodeType&&!st.get(o,"hasDataAttrs"))){for(i=r.length;i--;)r[i]&&0===(n=r[i].name).indexOf("data-")&&(n=et(n.slice(5)),at(o,n,s[n]));st.set(o,"hasDataAttrs",!0)}return s}return"object"==typeof t?this.each(function(){ot.set(this,t)}):G(this,function(e){var i;if(o&&void 0===e)return void 0!==(i=ot.get(o,t))||void 0!==(i=at(o,t))?i:void 0;this.each(function(){ot.set(this,t,e)})},null,e,arguments.length>1,null,!0)},removeData:function(t){return this.each(function(){ot.remove(this,t)})}}),C.extend({queue:function(t,e,i){var n;if(t)return e=(e||"fx")+"queue",n=st.get(t,e),i&&(!n||Array.isArray(i)?n=st.access(t,e,C.makeArray(i)):n.push(i)),n||[]},dequeue:function(t,e){e=e||"fx";var i=C.queue(t,e),n=i.length,s=i.shift(),o=C._queueHooks(t,e);"inprogress"===s&&(s=i.shift(),n--),s&&("fx"===e&&i.unshift("inprogress"),delete o.stop,s.call(t,function(){C.dequeue(t,e)},o)),!n&&o&&o.empty.fire()},_queueHooks:function(t,e){var i=e+"queueHooks";return st.get(t,i)||st.access(t,i,{empty:C.Callbacks("once memory").add(function(){st.remove(t,[e+"queue",i])})})}}),C.fn.extend({queue:function(t,e){var i=2;return"string"!=typeof t&&(e=t,t="fx",i--),arguments.length<i?C.queue(this[0],t):void 0===e?this:this.each(function(){var i=C.queue(this,t,e);C._queueHooks(this,t),"fx"===t&&"inprogress"!==i[0]&&C.dequeue(this,t)})},dequeue:function(t){return this.each(function(){C.dequeue(this,t)})},clearQueue:function(t){return this.queue(t||"fx",[])},promise:function(t,e){var i,n=1,s=C.Deferred(),o=this,r=this.length,l=function(){--n||s.resolveWith(o,[o])};for("string"!=typeof t&&(e=t,t=void 0),t=t||"fx";r--;)(i=st.get(o[r],t+"queueHooks"))&&i.empty&&(n++,i.empty.add(l));return l(),s.promise(e)}});var ct=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,ht=new RegExp("^(?:([+-])=|)("+ct+")([a-z%]*)$","i"),dt=["Top","Right","Bottom","Left"],ut=g.documentElement,pt=function(t){return C.contains(t.ownerDocument,t)},ft={composed:!0};ut.getRootNode&&(pt=function(t){return C.contains(t.ownerDocument,t)||t.getRootNode(ft)===t.ownerDocument});var mt=function(t,e){return"none"===(t=e||t).style.display||""===t.style.display&&pt(t)&&"none"===C.css(t,"display")};function gt(t,e,i,n){var s,o,r=20,l=n?function(){return n.cur()}:function(){return C.css(t,e,"")},a=l(),c=i&&i[3]||(C.cssNumber[e]?"":"px"),h=t.nodeType&&(C.cssNumber[e]||"px"!==c&&+a)&&ht.exec(C.css(t,e));if(h&&h[3]!==c){for(a/=2,c=c||h[3],h=+a||1;r--;)C.style(t,e,h+c),(1-o)*(1-(o=l()/a||.5))<=0&&(r=0),h/=o;h*=2,C.style(t,e,h+c),i=i||[]}return i&&(h=+h||+a||0,s=i[1]?h+(i[1]+1)*i[2]:+i[2],n&&(n.unit=c,n.start=h,n.end=s)),s}var yt={};function vt(t){var e,i=t.ownerDocument,n=t.nodeName,s=yt[n];return s||(e=i.body.appendChild(i.createElement(n)),s=C.css(e,"display"),e.parentNode.removeChild(e),"none"===s&&(s="block"),yt[n]=s,s)}function bt(t,e){for(var i,n,s=[],o=0,r=t.length;o<r;o++)(n=t[o]).style&&(i=n.style.display,e?("none"===i&&(s[o]=st.get(n,"display")||null,s[o]||(n.style.display="")),""===n.style.display&&mt(n)&&(s[o]=vt(n))):"none"!==i&&(s[o]="none",st.set(n,"display",i)));for(o=0;o<r;o++)null!=s[o]&&(t[o].style.display=s[o]);return t}C.fn.extend({show:function(){return bt(this,!0)},hide:function(){return bt(this)},toggle:function(t){return"boolean"==typeof t?t?this.show():this.hide():this.each(function(){mt(this)?C(this).show():C(this).hide()})}});var Et,wt,Ct=/^(?:checkbox|radio)$/i,xt=/<([a-z][^\/\0>\x20\t\r\n\f]*)/i,St=/^$|^module$|\/(?:java|ecma)script/i;Et=g.createDocumentFragment().appendChild(g.createElement("div")),(wt=g.createElement("input")).setAttribute("type","radio"),wt.setAttribute("checked","checked"),wt.setAttribute("name","t"),Et.appendChild(wt),p.checkClone=Et.cloneNode(!0).cloneNode(!0).lastChild.checked,Et.innerHTML="<textarea>x</textarea>",p.noCloneChecked=!!Et.cloneNode(!0).lastChild.defaultValue,Et.innerHTML="<option></option>",p.option=!!Et.lastChild;var Tt={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 kt(t,e){var i;return i="undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e||"*"):"undefined"!=typeof t.querySelectorAll?t.querySelectorAll(e||"*"):[],void 0===e||e&&S(t,e)?C.merge([t],i):i}function _t(t,e){for(var i=0,n=t.length;i<n;i++)st.set(t[i],"globalEval",!e||st.get(e[i],"globalEval"))}Tt.tbody=Tt.tfoot=Tt.colgroup=Tt.caption=Tt.thead,Tt.th=Tt.td,p.option||(Tt.optgroup=Tt.option=[1,"<select multiple='multiple'>","</select>"]);var Lt=/<|&#?\w+;/;function At(t,e,i,n,s){for(var o,r,l,a,c,h,d=e.createDocumentFragment(),u=[],p=0,f=t.length;p<f;p++)if((o=t[p])||0===o)if("object"===b(o))C.merge(u,o.nodeType?[o]:o);else if(Lt.test(o)){for(r=r||d.appendChild(e.createElement("div")),l=(xt.exec(o)||["",""])[1].toLowerCase(),a=Tt[l]||Tt._default,r.innerHTML=a[1]+C.htmlPrefilter(o)+a[2],h=a[0];h--;)r=r.lastChild;C.merge(u,r.childNodes),(r=d.firstChild).textContent=""}else u.push(e.createTextNode(o));for(d.textContent="",p=0;o=u[p++];)if(n&&C.inArray(o,n)>-1)s&&s.push(o);else if(c=pt(o),r=kt(d.appendChild(o),"script"),c&&_t(r),i)for(h=0;o=r[h++];)St.test(o.type||"")&&i.push(o);return d}var It=/^([^.]*)(?:\.(.+)|)/;function Ht(){return!0}function Dt(){return!1}function $t(t,e,i,n,s,o){var r,l;if("object"==typeof e){for(l in"string"!=typeof i&&(n=n||i,i=void 0),e)$t(t,l,i,n,e[l],o);return t}if(null==n&&null==s?(s=i,n=i=void 0):null==s&&("string"==typeof i?(s=n,n=void 0):(s=n,n=i,i=void 0)),!1===s)s=Dt;else if(!s)return t;return 1===o&&(r=s,s=function(t){return C().off(t),r.apply(this,arguments)},s.guid=r.guid||(r.guid=C.guid++)),t.each(function(){C.event.add(this,e,s,n,i)})}function qt(t,e,i){i?(st.set(t,e,!1),C.event.add(t,e,{namespace:!1,handler:function(t){var i,n=st.get(this,e);if(1&t.isTrigger&&this[e]){if(n)(C.event.special[e]||{}).delegateType&&t.stopPropagation();else if(n=s.call(arguments),st.set(this,e,n),this[e](),i=st.get(this,e),st.set(this,e,!1),n!==i)return t.stopImmediatePropagation(),t.preventDefault(),i}else n&&(st.set(this,e,C.event.trigger(n[0],n.slice(1),this)),t.stopPropagation(),t.isImmediatePropagationStopped=Ht)}})):void 0===st.get(t,e)&&C.event.add(t,e,Ht)}C.event={global:{},add:function(t,e,i,n,s){var o,r,l,a,c,h,d,u,p,f,m,g=st.get(t);if(it(t))for(i.handler&&(i=(o=i).handler,s=o.selector),s&&C.find.matchesSelector(ut,s),i.guid||(i.guid=C.guid++),(a=g.events)||(a=g.events=Object.create(null)),(r=g.handle)||(r=g.handle=function(e){return"undefined"!=typeof C&&C.event.triggered!==e.type?C.event.dispatch.apply(t,arguments):void 0}),c=(e=(e||"").match(B)||[""]).length;c--;)p=m=(l=It.exec(e[c])||[])[1],f=(l[2]||"").split(".").sort(),p&&(d=C.event.special[p]||{},p=(s?d.delegateType:d.bindType)||p,d=C.event.special[p]||{},h=C.extend({type:p,origType:m,data:n,handler:i,guid:i.guid,selector:s,needsContext:s&&C.expr.match.needsContext.test(s),namespace:f.join(".")},o),(u=a[p])||((u=a[p]=[]).delegateCount=0,d.setup&&!1!==d.setup.call(t,n,f,r)||t.addEventListener&&t.addEventListener(p,r)),d.add&&(d.add.call(t,h),h.handler.guid||(h.handler.guid=i.guid)),s?u.splice(u.delegateCount++,0,h):u.push(h),C.event.global[p]=!0)},remove:function(t,e,i,n,s){var o,r,l,a,c,h,d,u,p,f,m,g=st.hasData(t)&&st.get(t);if(g&&(a=g.events)){for(c=(e=(e||"").match(B)||[""]).length;c--;)if(p=m=(l=It.exec(e[c])||[])[1],f=(l[2]||"").split(".").sort(),p){for(d=C.event.special[p]||{},u=a[p=(n?d.delegateType:d.bindType)||p]||[],l=l[2]&&new RegExp("(^|\\.)"+f.join("\\.(?:.*\\.|)")+"(\\.|$)"),r=o=u.length;o--;)h=u[o],!s&&m!==h.origType||i&&i.guid!==h.guid||l&&!l.test(h.namespace)||n&&n!==h.selector&&("**"!==n||!h.selector)||(u.splice(o,1),h.selector&&u.delegateCount--,d.remove&&d.remove.call(t,h));r&&!u.length&&(d.teardown&&!1!==d.teardown.call(t,f,g.handle)||C.removeEvent(t,p,g.handle),delete a[p])}else for(p in a)C.event.remove(t,p+e[c],i,n,!0);C.isEmptyObject(a)&&st.remove(t,"handle events")}},dispatch:function(t){var e,i,n,s,o,r,l=new Array(arguments.length),a=C.event.fix(t),c=(st.get(this,"events")||Object.create(null))[a.type]||[],h=C.event.special[a.type]||{};for(l[0]=a,e=1;e<arguments.length;e++)l[e]=arguments[e];if(a.delegateTarget=this,!h.preDispatch||!1!==h.preDispatch.call(this,a)){for(r=C.event.handlers.call(this,a,c),e=0;(s=r[e++])&&!a.isPropagationStopped();)for(a.currentTarget=s.elem,i=0;(o=s.handlers[i++])&&!a.isImmediatePropagationStopped();)a.rnamespace&&!1!==o.namespace&&!a.rnamespace.test(o.namespace)||(a.handleObj=o,a.data=o.data,void 0!==(n=((C.event.special[o.origType]||{}).handle||o.handler).apply(s.elem,l))&&!1===(a.result=n)&&(a.preventDefault(),a.stopPropagation()));return h.postDispatch&&h.postDispatch.call(this,a),a.result}},handlers:function(t,e){var i,n,s,o,r,l=[],a=e.delegateCount,c=t.target;if(a&&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(o=[],r={},i=0;i<a;i++)void 0===r[s=(n=e[i]).selector+" "]&&(r[s]=n.needsContext?C(s,this).index(c)>-1:C.find(s,this,null,[c]).length),r[s]&&o.push(n);o.length&&l.push({elem:c,handlers:o})}return c=this,a<e.length&&l.push({elem:c,handlers:e.slice(a)}),l},addProp:function(t,e){Object.defineProperty(C.Event.prototype,t,{enumerable:!0,configurable:!0,get:f(e)?function(){if(this.originalEvent)return e(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[t]},set:function(e){Object.defineProperty(this,t,{enumerable:!0,configurable:!0,writable:!0,value:e})}})},fix:function(t){return t[C.expando]?t:new C.Event(t)},special:{load:{noBubble:!0},click:{setup:function(t){var e=this||t;return Ct.test(e.type)&&e.click&&S(e,"input")&&qt(e,"click",!0),!1},trigger:function(t){var e=this||t;return Ct.test(e.type)&&e.click&&S(e,"input")&&qt(e,"click"),!0},_default:function(t){var e=t.target;return Ct.test(e.type)&&e.click&&S(e,"input")&&st.get(e,"click")||S(e,"a")}},beforeunload:{postDispatch:function(t){void 0!==t.result&&t.originalEvent&&(t.originalEvent.returnValue=t.result)}}}},C.removeEvent=function(t,e,i){t.removeEventListener&&t.removeEventListener(e,i)},C.Event=function(t,e){if(!(this instanceof C.Event))return new C.Event(t,e);t&&t.type?(this.originalEvent=t,this.type=t.type,this.isDefaultPrevented=t.defaultPrevented||void 0===t.defaultPrevented&&!1===t.returnValue?Ht:Dt,this.target=t.target&&3===t.target.nodeType?t.target.parentNode:t.target,this.currentTarget=t.currentTarget,this.relatedTarget=t.relatedTarget):this.type=t,e&&C.extend(this,e),this.timeStamp=t&&t.timeStamp||Date.now(),this[C.expando]=!0},C.Event.prototype={constructor:C.Event,isDefaultPrevented:Dt,isPropagationStopped:Dt,isImmediatePropagationStopped:Dt,isSimulated:!1,preventDefault:function(){var t=this.originalEvent;this.isDefaultPrevented=Ht,t&&!this.isSimulated&&t.preventDefault()},stopPropagation:function(){var t=this.originalEvent;this.isPropagationStopped=Ht,t&&!this.isSimulated&&t.stopPropagation()},stopImmediatePropagation:function(){var t=this.originalEvent;this.isImmediatePropagationStopped=Ht,t&&!this.isSimulated&&t.stopImmediatePropagation(),this.stopPropagation()}},C.each({altKey:!0,bubbles:!0,cancelable:!0,changedTouches:!0,ctrlKey:!0,detail:!0,eventPhase:!0,metaKey:!0,pageX:!0,pageY:!0,shiftKey:!0,view:!0,char:!0,code:!0,charCode:!0,key:!0,keyCode:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pointerId:!0,pointerType:!0,screenX:!0,screenY:!0,targetTouches:!0,toElement:!0,touches:!0,which:!0},C.event.addProp),C.each({focus:"focusin",blur:"focusout"},function(t,e){function i(t){if(g.documentMode){var i=st.get(this,"handle"),n=C.event.fix(t);n.type="focusin"===t.type?"focus":"blur",n.isSimulated=!0,i(t),n.target===n.currentTarget&&i(n)}else C.event.simulate(e,t.target,C.event.fix(t))}C.event.special[t]={setup:function(){var n;if(qt(this,t,!0),!g.documentMode)return!1;(n=st.get(this,e))||this.addEventListener(e,i),st.set(this,e,(n||0)+1)},trigger:function(){return qt(this,t),!0},teardown:function(){var t;if(!g.documentMode)return!1;(t=st.get(this,e)-1)?st.set(this,e,t):(this.removeEventListener(e,i),st.remove(this,e))},_default:function(e){return st.get(e.target,t)},delegateType:e},C.event.special[e]={setup:function(){var n=this.ownerDocument||this.document||this,s=g.documentMode?this:n,o=st.get(s,e);o||(g.documentMode?this.addEventListener(e,i):n.addEventListener(t,i,!0)),st.set(s,e,(o||0)+1)},teardown:function(){var n=this.ownerDocument||this.document||this,s=g.documentMode?this:n,o=st.get(s,e)-1;o?st.set(s,e,o):(g.documentMode?this.removeEventListener(e,i):n.removeEventListener(t,i,!0),st.remove(s,e))}}}),C.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(t,e){C.event.special[t]={delegateType:e,bindType:e,handle:function(t){var i,n=t.relatedTarget,s=t.handleObj;return n&&(n===this||C.contains(this,n))||(t.type=s.origType,i=s.handler.apply(this,arguments),t.type=e),i}}}),C.fn.extend({on:function(t,e,i,n){return $t(this,t,e,i,n)},one:function(t,e,i,n){return $t(this,t,e,i,n,1)},off:function(t,e,i){var n,s;if(t&&t.preventDefault&&t.handleObj)return n=t.handleObj,C(t.delegateTarget).off(n.namespace?n.origType+"."+n.namespace:n.origType,n.selector,n.handler),this;if("object"==typeof t){for(s in t)this.off(s,e,t[s]);return this}return!1!==e&&"function"!=typeof e||(i=e,e=void 0),!1===i&&(i=Dt),this.each(function(){C.event.remove(this,t,i,e)})}});var Mt=/<script|<style|<link/i,jt=/checked\s*(?:[^=]|=\s*.checked.)/i,Ot=/^\s*<!\[CDATA\[|\]\]>\s*$/g;function Nt(t,e){return S(t,"table")&&S(11!==e.nodeType?e:e.firstChild,"tr")&&C(t).children("tbody")[0]||t}function zt(t){return t.type=(null!==t.getAttribute("type"))+"/"+t.type,t}function Pt(t){return"true/"===(t.type||"").slice(0,5)?t.type=t.type.slice(5):t.removeAttribute("type"),t}function Ft(t,e){var i,n,s,o,r,l;if(1===e.nodeType){if(st.hasData(t)&&(l=st.get(t).events))for(s in st.remove(e,"handle events"),l)for(i=0,n=l[s].length;i<n;i++)C.event.add(e,s,l[s][i]);ot.hasData(t)&&(o=ot.access(t),r=C.extend({},o),ot.set(e,r))}}function Rt(t,e){var i=e.nodeName.toLowerCase();"input"===i&&Ct.test(t.type)?e.checked=t.checked:"input"!==i&&"textarea"!==i||(e.defaultValue=t.defaultValue)}function Wt(t,e,i,n){e=o(e);var s,r,l,a,c,h,d=0,u=t.length,m=u-1,g=e[0],y=f(g);if(y||u>1&&"string"==typeof g&&!p.checkClone&&jt.test(g))return t.each(function(s){var o=t.eq(s);y&&(e[0]=g.call(this,s,o.html())),Wt(o,e,i,n)});if(u&&(r=(s=At(e,t[0].ownerDocument,!1,t,n)).firstChild,1===s.childNodes.length&&(s=r),r||n)){for(a=(l=C.map(kt(s,"script"),zt)).length;d<u;d++)c=s,d!==m&&(c=C.clone(c,!0,!0),a&&C.merge(l,kt(c,"script"))),i.call(t[d],c,d);if(a)for(h=l[l.length-1].ownerDocument,C.map(l,Pt),d=0;d<a;d++)c=l[d],St.test(c.type||"")&&!st.access(c,"globalEval")&&C.contains(h,c)&&(c.src&&"module"!==(c.type||"").toLowerCase()?C._evalUrl&&!c.noModule&&C._evalUrl(c.src,{nonce:c.nonce||c.getAttribute("nonce")},h):v(c.textContent.replace(Ot,""),c,h))}return t}function Bt(t,e,i){for(var n,s=e?C.filter(e,t):t,o=0;null!=(n=s[o]);o++)i||1!==n.nodeType||C.cleanData(kt(n)),n.parentNode&&(i&&pt(n)&&_t(kt(n,"script")),n.parentNode.removeChild(n));return t}C.extend({htmlPrefilter:function(t){return t},clone:function(t,e,i){var n,s,o,r,l=t.cloneNode(!0),a=pt(t);if(!(p.noCloneChecked||1!==t.nodeType&&11!==t.nodeType||C.isXMLDoc(t)))for(r=kt(l),n=0,s=(o=kt(t)).length;n<s;n++)Rt(o[n],r[n]);if(e)if(i)for(o=o||kt(t),r=r||kt(l),n=0,s=o.length;n<s;n++)Ft(o[n],r[n]);else Ft(t,l);return(r=kt(l,"script")).length>0&&_t(r,!a&&kt(t,"script")),l},cleanData:function(t){for(var e,i,n,s=C.event.special,o=0;void 0!==(i=t[o]);o++)if(it(i)){if(e=i[st.expando]){if(e.events)for(n in e.events)s[n]?C.event.remove(i,n):C.removeEvent(i,n,e.handle);i[st.expando]=void 0}i[ot.expando]&&(i[ot.expando]=void 0)}}}),C.fn.extend({detach:function(t){return Bt(this,t,!0)},remove:function(t){return Bt(this,t)},text:function(t){return G(this,function(t){return void 0===t?C.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=t)})},null,t,arguments.length)},append:function(){return Wt(this,arguments,function(t){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||Nt(this,t).appendChild(t)})},prepend:function(){return Wt(this,arguments,function(t){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var e=Nt(this,t);e.insertBefore(t,e.firstChild)}})},before:function(){return Wt(this,arguments,function(t){this.parentNode&&this.parentNode.insertBefore(t,this)})},after:function(){return Wt(this,arguments,function(t){this.parentNode&&this.parentNode.insertBefore(t,this.nextSibling)})},empty:function(){for(var t,e=0;null!=(t=this[e]);e++)1===t.nodeType&&(C.cleanData(kt(t,!1)),t.textContent="");return this},clone:function(t,e){return t=null!=t&&t,e=null==e?t:e,this.map(function(){return C.clone(this,t,e)})},html:function(t){return G(this,function(t){var e=this[0]||{},i=0,n=this.length;if(void 0===t&&1===e.nodeType)return e.innerHTML;if("string"==typeof t&&!Mt.test(t)&&!Tt[(xt.exec(t)||["",""])[1].toLowerCase()]){t=C.htmlPrefilter(t);try{for(;i<n;i++)1===(e=this[i]||{}).nodeType&&(C.cleanData(kt(e,!1)),e.innerHTML=t);e=0}catch(t){}}e&&this.empty().append(t)},null,t,arguments.length)},replaceWith:function(){var t=[];return Wt(this,arguments,function(e){var i=this.parentNode;C.inArray(this,t)<0&&(C.cleanData(kt(this)),i&&i.replaceChild(e,this))},t)}}),C.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(t,e){C.fn[t]=function(t){for(var i,n=[],s=C(t),o=s.length-1,l=0;l<=o;l++)i=l===o?this:this.clone(!0),C(s[l])[e](i),r.apply(n,i.get());return this.pushStack(n)}});var Ut=new RegExp("^("+ct+")(?!px)[a-z%]+$","i"),Qt=/^--/,Vt=function(e){var i=e.ownerDocument.defaultView;return i&&i.opener||(i=t),i.getComputedStyle(e)},Kt=function(t,e,i){var n,s,o={};for(s in e)o[s]=t.style[s],t.style[s]=e[s];for(s in n=i.call(t),e)t.style[s]=o[s];return n},Xt=new RegExp(dt.join("|"),"i");function Yt(t,e,i){var n,s,o,r,l=Qt.test(e),a=t.style;return(i=i||Vt(t))&&(r=i.getPropertyValue(e)||i[e],l&&r&&(r=r.replace(A,"$1")||void 0),""!==r||pt(t)||(r=C.style(t,e)),!p.pixelBoxStyles()&&Ut.test(r)&&Xt.test(e)&&(n=a.width,s=a.minWidth,o=a.maxWidth,a.minWidth=a.maxWidth=a.width=r,r=i.width,a.width=n,a.minWidth=s,a.maxWidth=o)),void 0!==r?r+"":r}function Gt(t,e){return{get:function(){if(!t())return(this.get=e).apply(this,arguments);delete this.get}}}!function(){function e(){if(h){c.style.cssText="position:absolute;left:-11111px;width:60px;margin-top:1px;padding:0;border:0",h.style.cssText="position:relative;display:block;box-sizing:border-box;overflow:scroll;margin:auto;border:1px;padding:1px;width:60%;top:1%",ut.appendChild(c).appendChild(h);var e=t.getComputedStyle(h);n="1%"!==e.top,a=12===i(e.marginLeft),h.style.right="60%",r=36===i(e.right),s=36===i(e.width),h.style.position="absolute",o=12===i(h.offsetWidth/3),ut.removeChild(c),h=null}}function i(t){return Math.round(parseFloat(t))}var n,s,o,r,l,a,c=g.createElement("div"),h=g.createElement("div");h.style&&(h.style.backgroundClip="content-box",h.cloneNode(!0).style.backgroundClip="",p.clearCloneStyle="content-box"===h.style.backgroundClip,C.extend(p,{boxSizingReliable:function(){return e(),s},pixelBoxStyles:function(){return e(),r},pixelPosition:function(){return e(),n},reliableMarginLeft:function(){return e(),a},scrollboxSize:function(){return e(),o},reliableTrDimensions:function(){var e,i,n,s;return null==l&&(e=g.createElement("table"),i=g.createElement("tr"),n=g.createElement("div"),e.style.cssText="position:absolute;left:-11111px;border-collapse:separate",i.style.cssText="box-sizing:content-box;border:1px solid",i.style.height="1px",n.style.height="9px",n.style.display="block",ut.appendChild(e).appendChild(i).appendChild(n),s=t.getComputedStyle(i),l=parseInt(s.height,10)+parseInt(s.borderTopWidth,10)+parseInt(s.borderBottomWidth,10)===i.offsetHeight,ut.removeChild(e)),l}}))}();var Jt=["Webkit","Moz","ms"],Zt=g.createElement("div").style,te={};function ee(t){var e=C.cssProps[t]||te[t];return e||(t in Zt?t:te[t]=function(t){for(var e=t[0].toUpperCase()+t.slice(1),i=Jt.length;i--;)if((t=Jt[i]+e)in Zt)return t}(t)||t)}var ie=/^(none|table(?!-c[ea]).+)/,ne={position:"absolute",visibility:"hidden",display:"block"},se={letterSpacing:"0",fontWeight:"400"};function oe(t,e,i){var n=ht.exec(e);return n?Math.max(0,n[2]-(i||0))+(n[3]||"px"):e}function re(t,e,i,n,s,o){var r="width"===e?1:0,l=0,a=0,c=0;if(i===(n?"border":"content"))return 0;for(;r<4;r+=2)"margin"===i&&(c+=C.css(t,i+dt[r],!0,s)),n?("content"===i&&(a-=C.css(t,"padding"+dt[r],!0,s)),"margin"!==i&&(a-=C.css(t,"border"+dt[r]+"Width",!0,s))):(a+=C.css(t,"padding"+dt[r],!0,s),"padding"!==i?a+=C.css(t,"border"+dt[r]+"Width",!0,s):l+=C.css(t,"border"+dt[r]+"Width",!0,s));return!n&&o>=0&&(a+=Math.max(0,Math.ceil(t["offset"+e[0].toUpperCase()+e.slice(1)]-o-a-l-.5))||0),a+c}function le(t,e,i){var n=Vt(t),s=(!p.boxSizingReliable()||i)&&"border-box"===C.css(t,"boxSizing",!1,n),o=s,r=Yt(t,e,n),l="offset"+e[0].toUpperCase()+e.slice(1);if(Ut.test(r)){if(!i)return r;r="auto"}return(!p.boxSizingReliable()&&s||!p.reliableTrDimensions()&&S(t,"tr")||"auto"===r||!parseFloat(r)&&"inline"===C.css(t,"display",!1,n))&&t.getClientRects().length&&(s="border-box"===C.css(t,"boxSizing",!1,n),(o=l in t)&&(r=t[l])),(r=parseFloat(r)||0)+re(t,e,i||(s?"border":"content"),o,n,r)+"px"}function ae(t,e,i,n,s){return new ae.prototype.init(t,e,i,n,s)}C.extend({cssHooks:{opacity:{get:function(t,e){if(e){var i=Yt(t,"opacity");return""===i?"1":i}}}},cssNumber:{animationIterationCount:!0,aspectRatio:!0,borderImageSlice:!0,columnCount:!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,scale:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeMiterlimit:!0,strokeOpacity:!0},cssProps:{},style:function(t,e,i,n){if(t&&3!==t.nodeType&&8!==t.nodeType&&t.style){var s,o,r,l=et(e),a=Qt.test(e),c=t.style;if(a||(e=ee(l)),r=C.cssHooks[e]||C.cssHooks[l],void 0===i)return r&&"get"in r&&void 0!==(s=r.get(t,!1,n))?s:c[e];"string"===(o=typeof i)&&(s=ht.exec(i))&&s[1]&&(i=gt(t,e,s),o="number"),null!=i&&i==i&&("number"!==o||a||(i+=s&&s[3]||(C.cssNumber[l]?"":"px")),p.clearCloneStyle||""!==i||0!==e.indexOf("background")||(c[e]="inherit"),r&&"set"in r&&void 0===(i=r.set(t,i,n))||(a?c.setProperty(e,i):c[e]=i))}},css:function(t,e,i,n){var s,o,r,l=et(e);return Qt.test(e)||(e=ee(l)),(r=C.cssHooks[e]||C.cssHooks[l])&&"get"in r&&(s=r.get(t,!0,i)),void 0===s&&(s=Yt(t,e,n)),"normal"===s&&e in se&&(s=se[e]),""===i||i?(o=parseFloat(s),!0===i||isFinite(o)?o||0:s):s}}),C.each(["height","width"],function(t,e){C.cssHooks[e]={get:function(t,i,n){if(i)return!ie.test(C.css(t,"display"))||t.getClientRects().length&&t.getBoundingClientRect().width?le(t,e,n):Kt(t,ne,function(){return le(t,e,n)})},set:function(t,i,n){var s,o=Vt(t),r=!p.scrollboxSize()&&"absolute"===o.position,l=(r||n)&&"border-box"===C.css(t,"boxSizing",!1,o),a=n?re(t,e,n,l,o):0;return l&&r&&(a-=Math.ceil(t["offset"+e[0].toUpperCase()+e.slice(1)]-parseFloat(o[e])-re(t,e,"border",!1,o)-.5)),a&&(s=ht.exec(i))&&"px"!==(s[3]||"px")&&(t.style[e]=i,i=C.css(t,e)),oe(0,i,a)}}}),C.cssHooks.marginLeft=Gt(p.reliableMarginLeft,function(t,e){if(e)return(parseFloat(Yt(t,"marginLeft"))||t.getBoundingClientRect().left-Kt(t,{marginLeft:0},function(){return t.getBoundingClientRect().left}))+"px"}),C.each({margin:"",padding:"",border:"Width"},function(t,e){C.cssHooks[t+e]={expand:function(i){for(var n=0,s={},o="string"==typeof i?i.split(" "):[i];n<4;n++)s[t+dt[n]+e]=o[n]||o[n-2]||o[0];return s}},"margin"!==t&&(C.cssHooks[t+e].set=oe)}),C.fn.extend({css:function(t,e){return G(this,function(t,e,i){var n,s,o={},r=0;if(Array.isArray(e)){for(n=Vt(t),s=e.length;r<s;r++)o[e[r]]=C.css(t,e[r],!1,n);return o}return void 0!==i?C.style(t,e,i):C.css(t,e)},t,e,arguments.length>1)}}),C.Tween=ae,ae.prototype={constructor:ae,init:function(t,e,i,n,s,o){this.elem=t,this.prop=i,this.easing=s||C.easing._default,this.options=e,this.start=this.now=this.cur(),this.end=n,this.unit=o||(C.cssNumber[i]?"":"px")},cur:function(){var t=ae.propHooks[this.prop];return t&&t.get?t.get(this):ae.propHooks._default.get(this)},run:function(t){var e,i=ae.propHooks[this.prop];return this.options.duration?this.pos=e=C.easing[this.easing](t,this.options.duration*t,0,1,this.options.duration):this.pos=e=t,this.now=(this.end-this.start)*e+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),i&&i.set?i.set(this):ae.propHooks._default.set(this),this}},ae.prototype.init.prototype=ae.prototype,ae.propHooks={_default:{get:function(t){var e;return 1!==t.elem.nodeType||null!=t.elem[t.prop]&&null==t.elem.style[t.prop]?t.elem[t.prop]:(e=C.css(t.elem,t.prop,""))&&"auto"!==e?e:0},set:function(t){C.fx.step[t.prop]?C.fx.step[t.prop](t):1!==t.elem.nodeType||!C.cssHooks[t.prop]&&null==t.elem.style[ee(t.prop)]?t.elem[t.prop]=t.now:C.style(t.elem,t.prop,t.now+t.unit)}}},ae.propHooks.scrollTop=ae.propHooks.scrollLeft={set:function(t){t.elem.nodeType&&t.elem.parentNode&&(t.elem[t.prop]=t.now)}},C.easing={linear:function(t){return t},swing:function(t){return.5-Math.cos(t*Math.PI)/2},_default:"swing"},C.fx=ae.prototype.init,C.fx.step={};var ce,he,de=/^(?:toggle|show|hide)$/,ue=/queueHooks$/;function pe(){he&&(!1===g.hidden&&t.requestAnimationFrame?t.requestAnimationFrame(pe):t.setTimeout(pe,C.fx.interval),C.fx.tick())}function fe(){return t.setTimeout(function(){ce=void 0}),ce=Date.now()}function me(t,e){var i,n=0,s={height:t};for(e=e?1:0;n<4;n+=2-e)s["margin"+(i=dt[n])]=s["padding"+i]=t;return e&&(s.opacity=s.width=t),s}function ge(t,e,i){for(var n,s=(ye.tweeners[e]||[]).concat(ye.tweeners["*"]),o=0,r=s.length;o<r;o++)if(n=s[o].call(i,e,t))return n}function ye(t,e,i){var n,s,o=0,r=ye.prefilters.length,l=C.Deferred().always(function(){delete a.elem}),a=function(){if(s)return!1;for(var e=ce||fe(),i=Math.max(0,c.startTime+c.duration-e),n=1-(i/c.duration||0),o=0,r=c.tweens.length;o<r;o++)c.tweens[o].run(n);return l.notifyWith(t,[c,n,i]),n<1&&r?i:(r||l.notifyWith(t,[c,1,0]),l.resolveWith(t,[c]),!1)},c=l.promise({elem:t,props:C.extend({},e),opts:C.extend(!0,{specialEasing:{},easing:C.easing._default},i),originalProperties:e,originalOptions:i,startTime:ce||fe(),duration:i.duration,tweens:[],createTween:function(e,i){var n=C.Tween(t,c.opts,e,i,c.opts.specialEasing[e]||c.opts.easing);return c.tweens.push(n),n},stop:function(e){var i=0,n=e?c.tweens.length:0;if(s)return this;for(s=!0;i<n;i++)c.tweens[i].run(1);return e?(l.notifyWith(t,[c,1,0]),l.resolveWith(t,[c,e])):l.rejectWith(t,[c,e]),this}}),h=c.props;for(!function(t,e){var i,n,s,o,r;for(i in t)if(s=e[n=et(i)],o=t[i],Array.isArray(o)&&(s=o[1],o=t[i]=o[0]),i!==n&&(t[n]=o,delete t[i]),(r=C.cssHooks[n])&&"expand"in r)for(i in o=r.expand(o),delete t[n],o)i in t||(t[i]=o[i],e[i]=s);else e[n]=s}(h,c.opts.specialEasing);o<r;o++)if(n=ye.prefilters[o].call(c,t,h,c.opts))return f(n.stop)&&(C._queueHooks(c.elem,c.opts.queue).stop=n.stop.bind(n)),n;return C.map(h,ge,c),f(c.opts.start)&&c.opts.start.call(t,c),c.progress(c.opts.progress).done(c.opts.done,c.opts.complete).fail(c.opts.fail).always(c.opts.always),C.fx.timer(C.extend(a,{elem:t,anim:c,queue:c.opts.queue})),c}C.Animation=C.extend(ye,{tweeners:{"*":[function(t,e){var i=this.createTween(t,e);return gt(i.elem,t,ht.exec(e),i),i}]},tweener:function(t,e){f(t)?(e=t,t=["*"]):t=t.match(B);for(var i,n=0,s=t.length;n<s;n++)i=t[n],ye.tweeners[i]=ye.tweeners[i]||[],ye.tweeners[i].unshift(e)},prefilters:[function(t,e,i){var n,s,o,r,l,a,c,h,d="width"in e||"height"in e,u=this,p={},f=t.style,m=t.nodeType&&mt(t),g=st.get(t,"fxshow");for(n in i.queue||(null==(r=C._queueHooks(t,"fx")).unqueued&&(r.unqueued=0,l=r.empty.fire,r.empty.fire=function(){r.unqueued||l()}),r.unqueued++,u.always(function(){u.always(function(){r.unqueued--,C.queue(t,"fx").length||r.empty.fire()})})),e)if(s=e[n],de.test(s)){if(delete e[n],o=o||"toggle"===s,s===(m?"hide":"show")){if("show"!==s||!g||void 0===g[n])continue;m=!0}p[n]=g&&g[n]||C.style(t,n)}if((a=!C.isEmptyObject(e))||!C.isEmptyObject(p))for(n in d&&1===t.nodeType&&(i.overflow=[f.overflow,f.overflowX,f.overflowY],null==(c=g&&g.display)&&(c=st.get(t,"display")),"none"===(h=C.css(t,"display"))&&(c?h=c:(bt([t],!0),c=t.style.display||c,h=C.css(t,"display"),bt([t]))),("inline"===h||"inline-block"===h&&null!=c)&&"none"===C.css(t,"float")&&(a||(u.done(function(){f.display=c}),null==c&&(h=f.display,c="none"===h?"":h)),f.display="inline-block")),i.overflow&&(f.overflow="hidden",u.always(function(){f.overflow=i.overflow[0],f.overflowX=i.overflow[1],f.overflowY=i.overflow[2]})),a=!1,p)a||(g?"hidden"in g&&(m=g.hidden):g=st.access(t,"fxshow",{display:c}),o&&(g.hidden=!m),m&&bt([t],!0),u.done(function(){for(n in m||bt([t]),st.remove(t,"fxshow"),p)C.style(t,n,p[n])})),a=ge(m?g[n]:0,n,u),n in g||(g[n]=a.start,m&&(a.end=a.start,a.start=0))}],prefilter:function(t,e){e?ye.prefilters.unshift(t):ye.prefilters.push(t)}}),C.speed=function(t,e,i){var n=t&&"object"==typeof t?C.extend({},t):{complete:i||!i&&e||f(t)&&t,duration:t,easing:i&&e||e&&!f(e)&&e};return C.fx.off?n.duration=0:"number"!=typeof n.duration&&(n.duration in C.fx.speeds?n.duration=C.fx.speeds[n.duration]:n.duration=C.fx.speeds._default),null!=n.queue&&!0!==n.queue||(n.queue="fx"),n.old=n.complete,n.complete=function(){f(n.old)&&n.old.call(this),n.queue&&C.dequeue(this,n.queue)},n},C.fn.extend({fadeTo:function(t,e,i,n){return this.filter(mt).css("opacity",0).show().end().animate({opacity:e},t,i,n)},animate:function(t,e,i,n){var s=C.isEmptyObject(t),o=C.speed(e,i,n),r=function(){var e=ye(this,C.extend({},t),o);(s||st.get(this,"finish"))&&e.stop(!0)};return r.finish=r,s||!1===o.queue?this.each(r):this.queue(o.queue,r)},stop:function(t,e,i){var n=function(t){var e=t.stop;delete t.stop,e(i)};return"string"!=typeof t&&(i=e,e=t,t=void 0),e&&this.queue(t||"fx",[]),this.each(function(){var e=!0,s=null!=t&&t+"queueHooks",o=C.timers,r=st.get(this);if(s)r[s]&&r[s].stop&&n(r[s]);else for(s in r)r[s]&&r[s].stop&&ue.test(s)&&n(r[s]);for(s=o.length;s--;)o[s].elem!==this||null!=t&&o[s].queue!==t||(o[s].anim.stop(i),e=!1,o.splice(s,1));!e&&i||C.dequeue(this,t)})},finish:function(t){return!1!==t&&(t=t||"fx"),this.each(function(){var e,i=st.get(this),n=i[t+"queue"],s=i[t+"queueHooks"],o=C.timers,r=n?n.length:0;for(i.finish=!0,C.queue(this,t,[]),s&&s.stop&&s.stop.call(this,!0),e=o.length;e--;)o[e].elem===this&&o[e].queue===t&&(o[e].anim.stop(!0),o.splice(e,1));for(e=0;e<r;e++)n[e]&&n[e].finish&&n[e].finish.call(this);delete i.finish})}}),C.each(["toggle","show","hide"],function(t,e){var i=C.fn[e];C.fn[e]=function(t,n,s){return null==t||"boolean"==typeof t?i.apply(this,arguments):this.animate(me(e,!0),t,n,s)}}),C.each({slideDown:me("show"),slideUp:me("hide"),slideToggle:me("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(t,e){C.fn[t]=function(t,i,n){return this.animate(e,t,i,n)}}),C.timers=[],C.fx.tick=function(){var t,e=0,i=C.timers;for(ce=Date.now();e<i.length;e++)(t=i[e])()||i[e]!==t||i.splice(e--,1);i.length||C.fx.stop(),ce=void 0},C.fx.timer=function(t){C.timers.push(t),C.fx.start()},C.fx.interval=13,C.fx.start=function(){he||(he=!0,pe())},C.fx.stop=function(){he=null},C.fx.speeds={slow:600,fast:200,_default:400},C.fn.delay=function(e,i){return e=C.fx&&C.fx.speeds[e]||e,i=i||"fx",this.queue(i,function(i,n){var s=t.setTimeout(i,e);n.stop=function(){t.clearTimeout(s)}})},function(){var t=g.createElement("input"),e=g.createElement("select").appendChild(g.createElement("option"));t.type="checkbox",p.checkOn=""!==t.value,p.optSelected=e.selected,(t=g.createElement("input")).value="t",t.type="radio",p.radioValue="t"===t.value}();var ve,be=C.expr.attrHandle;C.fn.extend({attr:function(t,e){return G(this,C.attr,t,e,arguments.length>1)},removeAttr:function(t){return this.each(function(){C.removeAttr(this,t)})}}),C.extend({attr:function(t,e,i){var n,s,o=t.nodeType;if(3!==o&&8!==o&&2!==o)return"undefined"==typeof t.getAttribute?C.prop(t,e,i):(1===o&&C.isXMLDoc(t)||(s=C.attrHooks[e.toLowerCase()]||(C.expr.match.bool.test(e)?ve:void 0)),void 0!==i?null===i?void C.removeAttr(t,e):s&&"set"in s&&void 0!==(n=s.set(t,i,e))?n:(t.setAttribute(e,i+""),i):s&&"get"in s&&null!==(n=s.get(t,e))?n:null==(n=C.find.attr(t,e))?void 0:n)},attrHooks:{type:{set:function(t,e){if(!p.radioValue&&"radio"===e&&S(t,"input")){var i=t.value;return t.setAttribute("type",e),i&&(t.value=i),e}}}},removeAttr:function(t,e){var i,n=0,s=e&&e.match(B);if(s&&1===t.nodeType)for(;i=s[n++];)t.removeAttribute(i)}}),ve={set:function(t,e,i){return!1===e?C.removeAttr(t,i):t.setAttribute(i,i),i}},C.each(C.expr.match.bool.source.match(/\w+/g),function(t,e){var i=be[e]||C.find.attr;be[e]=function(t,e,n){var s,o,r=e.toLowerCase();return n||(o=be[r],be[r]=s,s=null!=i(t,e,n)?r:null,be[r]=o),s}});var Ee=/^(?:input|select|textarea|button)$/i,we=/^(?:a|area)$/i;function Ce(t){return(t.match(B)||[]).join(" ")}function xe(t){return t.getAttribute&&t.getAttribute("class")||""}function Se(t){return Array.isArray(t)?t:"string"==typeof t&&t.match(B)||[]}C.fn.extend({prop:function(t,e){return G(this,C.prop,t,e,arguments.length>1)},removeProp:function(t){return this.each(function(){delete this[C.propFix[t]||t]})}}),C.extend({prop:function(t,e,i){var n,s,o=t.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&C.isXMLDoc(t)||(e=C.propFix[e]||e,s=C.propHooks[e]),void 0!==i?s&&"set"in s&&void 0!==(n=s.set(t,i,e))?n:t[e]=i:s&&"get"in s&&null!==(n=s.get(t,e))?n:t[e]},propHooks:{tabIndex:{get:function(t){var e=C.find.attr(t,"tabindex");return e?parseInt(e,10):Ee.test(t.nodeName)||we.test(t.nodeName)&&t.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),p.optSelected||(C.propHooks.selected={get:function(t){var e=t.parentNode;return e&&e.parentNode&&e.parentNode.selectedIndex,null},set:function(t){var e=t.parentNode;e&&(e.selectedIndex,e.parentNode&&e.parentNode.selectedIndex)}}),C.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){C.propFix[this.toLowerCase()]=this}),C.fn.extend({addClass:function(t){var e,i,n,s,o,r;return f(t)?this.each(function(e){C(this).addClass(t.call(this,e,xe(this)))}):(e=Se(t)).length?this.each(function(){if(n=xe(this),i=1===this.nodeType&&" "+Ce(n)+" "){for(o=0;o<e.length;o++)s=e[o],i.indexOf(" "+s+" ")<0&&(i+=s+" ");r=Ce(i),n!==r&&this.setAttribute("class",r)}}):this},removeClass:function(t){var e,i,n,s,o,r;return f(t)?this.each(function(e){C(this).removeClass(t.call(this,e,xe(this)))}):arguments.length?(e=Se(t)).length?this.each(function(){if(n=xe(this),i=1===this.nodeType&&" "+Ce(n)+" "){for(o=0;o<e.length;o++)for(s=e[o];i.indexOf(" "+s+" ")>-1;)i=i.replace(" "+s+" "," ");r=Ce(i),n!==r&&this.setAttribute("class",r)}}):this:this.attr("class","")},toggleClass:function(t,e){var i,n,s,o,r=typeof t,l="string"===r||Array.isArray(t);return f(t)?this.each(function(i){C(this).toggleClass(t.call(this,i,xe(this),e),e)}):"boolean"==typeof e&&l?e?this.addClass(t):this.removeClass(t):(i=Se(t),this.each(function(){if(l)for(o=C(this),s=0;s<i.length;s++)n=i[s],o.hasClass(n)?o.removeClass(n):o.addClass(n);else void 0!==t&&"boolean"!==r||((n=xe(this))&&st.set(this,"__className__",n),this.setAttribute&&this.setAttribute("class",n||!1===t?"":st.get(this,"__className__")||""))}))},hasClass:function(t){var e,i,n=0;for(e=" "+t+" ";i=this[n++];)if(1===i.nodeType&&(" "+Ce(xe(i))+" ").indexOf(e)>-1)return!0;return!1}});var Te=/\r/g;C.fn.extend({val:function(t){var e,i,n,s=this[0];return arguments.length?(n=f(t),this.each(function(i){var s;1===this.nodeType&&(null==(s=n?t.call(this,i,C(this).val()):t)?s="":"number"==typeof s?s+="":Array.isArray(s)&&(s=C.map(s,function(t){return null==t?"":t+""})),(e=C.valHooks[this.type]||C.valHooks[this.nodeName.toLowerCase()])&&"set"in e&&void 0!==e.set(this,s,"value")||(this.value=s))})):s?(e=C.valHooks[s.type]||C.valHooks[s.nodeName.toLowerCase()])&&"get"in e&&void 0!==(i=e.get(s,"value"))?i:"string"==typeof(i=s.value)?i.replace(Te,""):null==i?"":i:void 0}}),C.extend({valHooks:{option:{get:function(t){var e=C.find.attr(t,"value");return null!=e?e:Ce(C.text(t))}},select:{get:function(t){var e,i,n,s=t.options,o=t.selectedIndex,r="select-one"===t.type,l=r?null:[],a=r?o+1:s.length;for(n=o<0?a:r?o:0;n<a;n++)if(((i=s[n]).selected||n===o)&&!i.disabled&&(!i.parentNode.disabled||!S(i.parentNode,"optgroup"))){if(e=C(i).val(),r)return e;l.push(e)}return l},set:function(t,e){for(var i,n,s=t.options,o=C.makeArray(e),r=s.length;r--;)((n=s[r]).selected=C.inArray(C.valHooks.option.get(n),o)>-1)&&(i=!0);return i||(t.selectedIndex=-1),o}}}}),C.each(["radio","checkbox"],function(){C.valHooks[this]={set:function(t,e){if(Array.isArray(e))return t.checked=C.inArray(C(t).val(),e)>-1}},p.checkOn||(C.valHooks[this].get=function(t){return null===t.getAttribute("value")?"on":t.value})});var ke=t.location,_e={guid:Date.now()},Le=/\?/;C.parseXML=function(e){var i,n;if(!e||"string"!=typeof e)return null;try{i=(new t.DOMParser).parseFromString(e,"text/xml")}catch(t){}return n=i&&i.getElementsByTagName("parsererror")[0],i&&!n||C.error("Invalid XML: "+(n?C.map(n.childNodes,function(t){return t.textContent}).join("\n"):e)),i};var Ae=/^(?:focusinfocus|focusoutblur)$/,Ie=function(t){t.stopPropagation()};C.extend(C.event,{trigger:function(e,i,n,s){var o,r,l,a,c,d,u,p,y=[n||g],v=h.call(e,"type")?e.type:e,b=h.call(e,"namespace")?e.namespace.split("."):[];if(r=p=l=n=n||g,3!==n.nodeType&&8!==n.nodeType&&!Ae.test(v+C.event.triggered)&&(v.indexOf(".")>-1&&(b=v.split("."),v=b.shift(),b.sort()),c=v.indexOf(":")<0&&"on"+v,(e=e[C.expando]?e:new C.Event(v,"object"==typeof e&&e)).isTrigger=s?2:3,e.namespace=b.join("."),e.rnamespace=e.namespace?new RegExp("(^|\\.)"+b.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=void 0,e.target||(e.target=n),i=null==i?[e]:C.makeArray(i,[e]),u=C.event.special[v]||{},s||!u.trigger||!1!==u.trigger.apply(n,i))){if(!s&&!u.noBubble&&!m(n)){for(a=u.delegateType||v,Ae.test(a+v)||(r=r.parentNode);r;r=r.parentNode)y.push(r),l=r;l===(n.ownerDocument||g)&&y.push(l.defaultView||l.parentWindow||t)}for(o=0;(r=y[o++])&&!e.isPropagationStopped();)p=r,e.type=o>1?a:u.bindType||v,(d=(st.get(r,"events")||Object.create(null))[e.type]&&st.get(r,"handle"))&&d.apply(r,i),(d=c&&r[c])&&d.apply&&it(r)&&(e.result=d.apply(r,i),!1===e.result&&e.preventDefault());return e.type=v,s||e.isDefaultPrevented()||u._default&&!1!==u._default.apply(y.pop(),i)||!it(n)||c&&f(n[v])&&!m(n)&&((l=n[c])&&(n[c]=null),C.event.triggered=v,e.isPropagationStopped()&&p.addEventListener(v,Ie),n[v](),e.isPropagationStopped()&&p.removeEventListener(v,Ie),C.event.triggered=void 0,l&&(n[c]=l)),e.result}},simulate:function(t,e,i){var n=C.extend(new C.Event,i,{type:t,isSimulated:!0});C.event.trigger(n,null,e)}}),C.fn.extend({trigger:function(t,e){return this.each(function(){C.event.trigger(t,e,this)})},triggerHandler:function(t,e){var i=this[0];if(i)return C.event.trigger(t,e,i,!0)}});var He=/\[\]$/,De=/\r?\n/g,$e=/^(?:submit|button|image|reset|file)$/i,qe=/^(?:input|select|textarea|keygen)/i;function Me(t,e,i,n){var s;if(Array.isArray(e))C.each(e,function(e,s){i||He.test(t)?n(t,s):Me(t+"["+("object"==typeof s&&null!=s?e:"")+"]",s,i,n)});else if(i||"object"!==b(e))n(t,e);else for(s in e)Me(t+"["+s+"]",e[s],i,n)}C.param=function(t,e){var i,n=[],s=function(t,e){var i=f(e)?e():e;n[n.length]=encodeURIComponent(t)+"="+encodeURIComponent(null==i?"":i)};if(null==t)return"";if(Array.isArray(t)||t.jquery&&!C.isPlainObject(t))C.each(t,function(){s(this.name,this.value)});else for(i in t)Me(i,t[i],e,s);return n.join("&")},C.fn.extend({serialize:function(){return C.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var t=C.prop(this,"elements");return t?C.makeArray(t):this}).filter(function(){var t=this.type;return this.name&&!C(this).is(":disabled")&&qe.test(this.nodeName)&&!$e.test(t)&&(this.checked||!Ct.test(t))}).map(function(t,e){var i=C(this).val();return null==i?null:Array.isArray(i)?C.map(i,function(t){return{name:e.name,value:t.replace(De,"\r\n")}}):{name:e.name,value:i.replace(De,"\r\n")}}).get()}});var je=/%20/g,Oe=/#.*$/,Ne=/([?&])_=[^&]*/,ze=/^(.*?):[ \t]*([^\r\n]*)$/gm,Pe=/^(?:GET|HEAD)$/,Fe=/^\/\//,Re={},We={},Be="*/".concat("*"),Ue=g.createElement("a");function Qe(t){return function(e,i){"string"!=typeof e&&(i=e,e="*");var n,s=0,o=e.toLowerCase().match(B)||[];if(f(i))for(;n=o[s++];)"+"===n[0]?(n=n.slice(1)||"*",(t[n]=t[n]||[]).unshift(i)):(t[n]=t[n]||[]).push(i)}}function Ve(t,e,i,n){var s={},o=t===We;function r(l){var a;return s[l]=!0,C.each(t[l]||[],function(t,l){var c=l(e,i,n);return"string"!=typeof c||o||s[c]?o?!(a=c):void 0:(e.dataTypes.unshift(c),r(c),!1)}),a}return r(e.dataTypes[0])||!s["*"]&&r("*")}function Ke(t,e){var i,n,s=C.ajaxSettings.flatOptions||{};for(i in e)void 0!==e[i]&&((s[i]?t:n||(n={}))[i]=e[i]);return n&&C.extend(!0,t,n),t}Ue.href=ke.href,C.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:ke.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(ke.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Be,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":C.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(t,e){return e?Ke(Ke(t,C.ajaxSettings),e):Ke(C.ajaxSettings,t)},ajaxPrefilter:Qe(Re),ajaxTransport:Qe(We),ajax:function(e,i){"object"==typeof e&&(i=e,e=void 0),i=i||{};var n,s,o,r,l,a,c,h,d,u,p=C.ajaxSetup({},i),f=p.context||p,m=p.context&&(f.nodeType||f.jquery)?C(f):C.event,y=C.Deferred(),v=C.Callbacks("once memory"),b=p.statusCode||{},E={},w={},x="canceled",S={readyState:0,getResponseHeader:function(t){var e;if(c){if(!r)for(r={};e=ze.exec(o);)r[e[1].toLowerCase()+" "]=(r[e[1].toLowerCase()+" "]||[]).concat(e[2]);e=r[t.toLowerCase()+" "]}return null==e?null:e.join(", ")},getAllResponseHeaders:function(){return c?o:null},setRequestHeader:function(t,e){return null==c&&(t=w[t.toLowerCase()]=w[t.toLowerCase()]||t,E[t]=e),this},overrideMimeType:function(t){return null==c&&(p.mimeType=t),this},statusCode:function(t){var e;if(t)if(c)S.always(t[S.status]);else for(e in t)b[e]=[b[e],t[e]];return this},abort:function(t){var e=t||x;return n&&n.abort(e),T(0,e),this}};if(y.promise(S),p.url=((e||p.url||ke.href)+"").replace(Fe,ke.protocol+"//"),p.type=i.method||i.type||p.method||p.type,p.dataTypes=(p.dataType||"*").toLowerCase().match(B)||[""],null==p.crossDomain){a=g.createElement("a");try{a.href=p.url,a.href=a.href,p.crossDomain=Ue.protocol+"//"+Ue.host!=a.protocol+"//"+a.host}catch(t){p.crossDomain=!0}}if(p.data&&p.processData&&"string"!=typeof p.data&&(p.data=C.param(p.data,p.traditional)),Ve(Re,p,i,S),c)return S;for(d in(h=C.event&&p.global)&&0===C.active++&&C.event.trigger("ajaxStart"),p.type=p.type.toUpperCase(),p.hasContent=!Pe.test(p.type),s=p.url.replace(Oe,""),p.hasContent?p.data&&p.processData&&0===(p.contentType||"").indexOf("application/x-www-form-urlencoded")&&(p.data=p.data.replace(je,"+")):(u=p.url.slice(s.length),p.data&&(p.processData||"string"==typeof p.data)&&(s+=(Le.test(s)?"&":"?")+p.data,delete p.data),!1===p.cache&&(s=s.replace(Ne,"$1"),u=(Le.test(s)?"&":"?")+"_="+_e.guid+++u),p.url=s+u),p.ifModified&&(C.lastModified[s]&&S.setRequestHeader("If-Modified-Since",C.lastModified[s]),C.etag[s]&&S.setRequestHeader("If-None-Match",C.etag[s])),(p.data&&p.hasContent&&!1!==p.contentType||i.contentType)&&S.setRequestHeader("Content-Type",p.contentType),S.setRequestHeader("Accept",p.dataTypes[0]&&p.accepts[p.dataTypes[0]]?p.accepts[p.dataTypes[0]]+("*"!==p.dataTypes[0]?", "+Be+"; q=0.01":""):p.accepts["*"]),p.headers)S.setRequestHeader(d,p.headers[d]);if(p.beforeSend&&(!1===p.beforeSend.call(f,S,p)||c))return S.abort();if(x="abort",v.add(p.complete),S.done(p.success),S.fail(p.error),n=Ve(We,p,i,S)){if(S.readyState=1,h&&m.trigger("ajaxSend",[S,p]),c)return S;p.async&&p.timeout>0&&(l=t.setTimeout(function(){S.abort("timeout")},p.timeout));try{c=!1,n.send(E,T)}catch(t){if(c)throw t;T(-1,t)}}else T(-1,"No Transport");function T(e,i,r,a){var d,u,g,E,w,x=i;c||(c=!0,l&&t.clearTimeout(l),n=void 0,o=a||"",S.readyState=e>0?4:0,d=e>=200&&e<300||304===e,r&&(E=function(t,e,i){for(var n,s,o,r,l=t.contents,a=t.dataTypes;"*"===a[0];)a.shift(),void 0===n&&(n=t.mimeType||e.getResponseHeader("Content-Type"));if(n)for(s in l)if(l[s]&&l[s].test(n)){a.unshift(s);break}if(a[0]in i)o=a[0];else{for(s in i){if(!a[0]||t.converters[s+" "+a[0]]){o=s;break}r||(r=s)}o=o||r}if(o)return o!==a[0]&&a.unshift(o),i[o]}(p,S,r)),!d&&C.inArray("script",p.dataTypes)>-1&&C.inArray("json",p.dataTypes)<0&&(p.converters["text script"]=function(){}),E=function(t,e,i,n){var s,o,r,l,a,c={},h=t.dataTypes.slice();if(h[1])for(r in t.converters)c[r.toLowerCase()]=t.converters[r];for(o=h.shift();o;)if(t.responseFields[o]&&(i[t.responseFields[o]]=e),!a&&n&&t.dataFilter&&(e=t.dataFilter(e,t.dataType)),a=o,o=h.shift())if("*"===o)o=a;else if("*"!==a&&a!==o){if(!(r=c[a+" "+o]||c["* "+o]))for(s in c)if((l=s.split(" "))[1]===o&&(r=c[a+" "+l[0]]||c["* "+l[0]])){!0===r?r=c[s]:!0!==c[s]&&(o=l[0],h.unshift(l[1]));break}if(!0!==r)if(r&&t.throws)e=r(e);else try{e=r(e)}catch(t){return{state:"parsererror",error:r?t:"No conversion from "+a+" to "+o}}}return{state:"success",data:e}}(p,E,S,d),d?(p.ifModified&&((w=S.getResponseHeader("Last-Modified"))&&(C.lastModified[s]=w),(w=S.getResponseHeader("etag"))&&(C.etag[s]=w)),204===e||"HEAD"===p.type?x="nocontent":304===e?x="notmodified":(x=E.state,u=E.data,d=!(g=E.error))):(g=x,!e&&x||(x="error",e<0&&(e=0))),S.status=e,S.statusText=(i||x)+"",d?y.resolveWith(f,[u,x,S]):y.rejectWith(f,[S,x,g]),S.statusCode(b),b=void 0,h&&m.trigger(d?"ajaxSuccess":"ajaxError",[S,p,d?u:g]),v.fireWith(f,[S,x]),h&&(m.trigger("ajaxComplete",[S,p]),--C.active||C.event.trigger("ajaxStop")))}return S},getJSON:function(t,e,i){return C.get(t,e,i,"json")},getScript:function(t,e){return C.get(t,void 0,e,"script")}}),C.each(["get","post"],function(t,e){C[e]=function(t,i,n,s){return f(i)&&(s=s||n,n=i,i=void 0),C.ajax(C.extend({url:t,type:e,dataType:s,data:i,success:n},C.isPlainObject(t)&&t))}}),C.ajaxPrefilter(function(t){var e;for(e in t.headers)"content-type"===e.toLowerCase()&&(t.contentType=t.headers[e]||"")}),C._evalUrl=function(t,e,i){return C.ajax({url:t,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}},dataFilter:function(t){C.globalEval(t,e,i)}})},C.fn.extend({wrapAll:function(t){var e;return this[0]&&(f(t)&&(t=t.call(this[0])),e=C(t,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&e.insertBefore(this[0]),e.map(function(){for(var t=this;t.firstElementChild;)t=t.firstElementChild;return t}).append(this)),this},wrapInner:function(t){return f(t)?this.each(function(e){C(this).wrapInner(t.call(this,e))}):this.each(function(){var e=C(this),i=e.contents();i.length?i.wrapAll(t):e.append(t)})},wrap:function(t){var e=f(t);return this.each(function(i){C(this).wrapAll(e?t.call(this,i):t)})},unwrap:function(t){return this.parent(t).not("body").each(function(){C(this).replaceWith(this.childNodes)}),this}}),C.expr.pseudos.hidden=function(t){return!C.expr.pseudos.visible(t)},C.expr.pseudos.visible=function(t){return!!(t.offsetWidth||t.offsetHeight||t.getClientRects().length)},C.ajaxSettings.xhr=function(){try{return new t.XMLHttpRequest}catch(t){}};var Xe={0:200,1223:204},Ye=C.ajaxSettings.xhr();p.cors=!!Ye&&"withCredentials"in Ye,p.ajax=Ye=!!Ye,C.ajaxTransport(function(e){var i,n;if(p.cors||Ye&&!e.crossDomain)return{send:function(s,o){var r,l=e.xhr();if(l.open(e.type,e.url,e.async,e.username,e.password),e.xhrFields)for(r in e.xhrFields)l[r]=e.xhrFields[r];for(r in e.mimeType&&l.overrideMimeType&&l.overrideMimeType(e.mimeType),e.crossDomain||s["X-Requested-With"]||(s["X-Requested-With"]="XMLHttpRequest"),s)l.setRequestHeader(r,s[r]);i=function(t){return function(){i&&(i=n=l.onload=l.onerror=l.onabort=l.ontimeout=l.onreadystatechange=null,"abort"===t?l.abort():"error"===t?"number"!=typeof l.status?o(0,"error"):o(l.status,l.statusText):o(Xe[l.status]||l.status,l.statusText,"text"!==(l.responseType||"text")||"string"!=typeof l.responseText?{binary:l.response}:{text:l.responseText},l.getAllResponseHeaders()))}},l.onload=i(),n=l.onerror=l.ontimeout=i("error"),void 0!==l.onabort?l.onabort=n:l.onreadystatechange=function(){4===l.readyState&&t.setTimeout(function(){i&&n()})},i=i("abort");try{l.send(e.hasContent&&e.data||null)}catch(t){if(i)throw t}},abort:function(){i&&i()}}}),C.ajaxPrefilter(function(t){t.crossDomain&&(t.contents.script=!1)}),C.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(t){return C.globalEval(t),t}}}),C.ajaxPrefilter("script",function(t){void 0===t.cache&&(t.cache=!1),t.crossDomain&&(t.type="GET")}),C.ajaxTransport("script",function(t){var e,i;if(t.crossDomain||t.scriptAttrs)return{send:function(n,s){e=C("<script>").attr(t.scriptAttrs||{}).prop({charset:t.scriptCharset,src:t.url}).on("load error",i=function(t){e.remove(),i=null,t&&s("error"===t.type?404:200,t.type)}),g.head.appendChild(e[0])},abort:function(){i&&i()}}});var Ge,Je=[],Ze=/(=)\?(?=&|$)|\?\?/;C.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var t=Je.pop()||C.expando+"_"+_e.guid++;return this[t]=!0,t}}),C.ajaxPrefilter("json jsonp",function(e,i,n){var s,o,r,l=!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(l||"jsonp"===e.dataTypes[0])return s=e.jsonpCallback=f(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,l?e[l]=e[l].replace(Ze,"$1"+s):!1!==e.jsonp&&(e.url+=(Le.test(e.url)?"&":"?")+e.jsonp+"="+s),e.converters["script json"]=function(){return r||C.error(s+" was not called"),r[0]},e.dataTypes[0]="json",o=t[s],t[s]=function(){r=arguments},n.always(function(){void 0===o?C(t).removeProp(s):t[s]=o,e[s]&&(e.jsonpCallback=i.jsonpCallback,Je.push(s)),r&&f(o)&&o(r[0]),r=o=void 0}),"script"}),p.createHTMLDocument=((Ge=g.implementation.createHTMLDocument("").body).innerHTML="<form></form><form></form>",2===Ge.childNodes.length),C.parseHTML=function(t,e,i){return"string"!=typeof t?[]:("boolean"==typeof e&&(i=e,e=!1),e||(p.createHTMLDocument?((n=(e=g.implementation.createHTMLDocument("")).createElement("base")).href=g.location.href,e.head.appendChild(n)):e=g),o=!i&&[],(s=O.exec(t))?[e.createElement(s[1])]:(s=At([t],e,o),o&&o.length&&C(o).remove(),C.merge([],s.childNodes)));var n,s,o},C.fn.load=function(t,e,i){var n,s,o,r=this,l=t.indexOf(" ");return l>-1&&(n=Ce(t.slice(l)),t=t.slice(0,l)),f(e)?(i=e,e=void 0):e&&"object"==typeof e&&(s="POST"),r.length>0&&C.ajax({url:t,type:s||"GET",dataType:"html",data:e}).done(function(t){o=arguments,r.html(n?C("<div>").append(C.parseHTML(t)).find(n):t)}).always(i&&function(t,e){r.each(function(){i.apply(this,o||[t.responseText,e,t])})}),this},C.expr.pseudos.animated=function(t){return C.grep(C.timers,function(e){return t===e.elem}).length},C.offset={setOffset:function(t,e,i){var n,s,o,r,l,a,c=C.css(t,"position"),h=C(t),d={};"static"===c&&(t.style.position="relative"),l=h.offset(),o=C.css(t,"top"),a=C.css(t,"left"),("absolute"===c||"fixed"===c)&&(o+a).indexOf("auto")>-1?(r=(n=h.position()).top,s=n.left):(r=parseFloat(o)||0,s=parseFloat(a)||0),f(e)&&(e=e.call(t,i,C.extend({},l))),null!=e.top&&(d.top=e.top-l.top+r),null!=e.left&&(d.left=e.left-l.left+s),"using"in e?e.using.call(t,d):h.css(d)}},C.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){C.offset.setOffset(this,t,e)});var e,i,n=this[0];return n?n.getClientRects().length?(e=n.getBoundingClientRect(),i=n.ownerDocument.defaultView,{top:e.top+i.pageYOffset,left:e.left+i.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var t,e,i,n=this[0],s={top:0,left:0};if("fixed"===C.css(n,"position"))e=n.getBoundingClientRect();else{for(e=this.offset(),i=n.ownerDocument,t=n.offsetParent||i.documentElement;t&&(t===i.body||t===i.documentElement)&&"static"===C.css(t,"position");)t=t.parentNode;t&&t!==n&&1===t.nodeType&&((s=C(t).offset()).top+=C.css(t,"borderTopWidth",!0),s.left+=C.css(t,"borderLeftWidth",!0))}return{top:e.top-s.top-C.css(n,"marginTop",!0),left:e.left-s.left-C.css(n,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var t=this.offsetParent;t&&"static"===C.css(t,"position");)t=t.offsetParent;return t||ut})}}),C.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,e){var i="pageYOffset"===e;C.fn[t]=function(n){return G(this,function(t,n,s){var o;if(m(t)?o=t:9===t.nodeType&&(o=t.defaultView),void 0===s)return o?o[e]:t[n];o?o.scrollTo(i?o.pageXOffset:s,i?s:o.pageYOffset):t[n]=s},t,n,arguments.length)}}),C.each(["top","left"],function(t,e){C.cssHooks[e]=Gt(p.pixelPosition,function(t,i){if(i)return i=Yt(t,e),Ut.test(i)?C(t).position()[e]+"px":i})}),C.each({Height:"height",Width:"width"},function(t,e){C.each({padding:"inner"+t,content:e,"":"outer"+t},function(i,n){C.fn[n]=function(s,o){var r=arguments.length&&(i||"boolean"!=typeof s),l=i||(!0===s||!0===o?"margin":"border");return G(this,function(e,i,s){var o;return m(e)?0===n.indexOf("outer")?e["inner"+t]:e.document.documentElement["client"+t]:9===e.nodeType?(o=e.documentElement,Math.max(e.body["scroll"+t],o["scroll"+t],e.body["offset"+t],o["offset"+t],o["client"+t])):void 0===s?C.css(e,i,l):C.style(e,i,s,l)},e,r?s:void 0,r)}})}),C.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(t,e){C.fn[e]=function(t){return this.on(e,t)}}),C.fn.extend({bind:function(t,e,i){return this.on(t,null,e,i)},unbind:function(t,e){return this.off(t,null,e)},delegate:function(t,e,i,n){return this.on(e,t,i,n)},undelegate:function(t,e,i){return 1===arguments.length?this.off(t,"**"):this.off(e,t||"**",i)},hover:function(t,e){return this.on("mouseenter",t).on("mouseleave",e||t)}}),C.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(t,e){C.fn[e]=function(t,i){return arguments.length>0?this.on(e,null,t,i):this.trigger(e)}});var ti=/^[\s\uFEFF\xA0]+|([^\s\uFEFF\xA0])[\s\uFEFF\xA0]+$/g;C.proxy=function(t,e){var i,n,o;if("string"==typeof e&&(i=t[e],e=t,t=i),f(t))return n=s.call(arguments,2),o=function(){return t.apply(e||this,n.concat(s.call(arguments)))},o.guid=t.guid=t.guid||C.guid++,o},C.holdReady=function(t){t?C.readyWait++:C.ready(!0)},C.isArray=Array.isArray,C.parseJSON=JSON.parse,C.nodeName=S,C.isFunction=f,C.isWindow=m,C.camelCase=et,C.type=b,C.now=Date.now,C.isNumeric=function(t){var e=C.type(t);return("number"===e||"string"===e)&&!isNaN(t-parseFloat(t))},C.trim=function(t){return null==t?"":(t+"").replace(ti,"$1")};var ei=t.jQuery,ii=t.$;return C.noConflict=function(e){return t.$===C&&(t.$=ii),e&&t.jQuery===C&&(t.jQuery=ei),C},"undefined"==typeof e&&(t.jQuery=t.$=C),C})}(i);const n=e(i.exports),s=new WeakMap;class o{static instances=[];static initializeElement(t,e={}){const i="string"==typeof t?document.querySelector(t):t;if(!i)return!1;const n=`plugin_${this.NAME}`;let o=s.has(i)&&s.get(i)[n];if(!o&&"undefined"!=typeof $&&$.fn&&(o=$(i).data(n)),!o){const t=new this(i,e);return s.has(i)||s.set(i,{}),s.get(i)[n]=t,"undefined"!=typeof $&&$.fn&&$(i).data(n,t),this.instances.push(t),t}return!1}static initializeElements(t,e={}){return document.querySelectorAll(t).forEach(t=>{this.initializeElement(t,e)}),this.instances}static getInstance(t){const e=`plugin_${this.NAME}`,i=s.get(t);if(i&&i[e])return i[e];if("undefined"!=typeof $&&$.fn&&$(t).data(e)){const i=$(t).data(e);return s.has(t)||s.set(t,{}),s.get(t)[e]=i,i}return null}static removeInstance(t){const e=`plugin_${this.NAME}`,i=s.get(t);i&&(delete i[e],0===Object.keys(i).length&&s.delete(t)),"undefined"!=typeof $&&$.fn&&$(t).removeData(e)}onInit(){let t=this.opts.onInit;"function"==typeof t&&t.call(this)}onUpdate(){let t=this.opts.onUpdate;"function"==typeof t&&t.call(this)}onDestroy(){let t=this.opts.onDestroy;"function"==typeof t&&t.call(this)}onShow(){let t=this.opts.onShow;"function"==typeof t&&t.call(this)}onClose(){let t=this.opts.onClose;"function"==typeof t&&t.call(this)}onReset(){let t=this.opts.onReset;"function"==typeof t&&t.call(this)}}const r=new class{constructor(){this.callbacks=new WeakMap,this.observer=null,this.rafId=null,this.windowCallbacks=new Set,this.isWindowListening=!1}observe(t,e){this.observer||(this.observer=new ResizeObserver(t=>{this.rafId&&cancelAnimationFrame(this.rafId),this.rafId=requestAnimationFrame(()=>{t.forEach(t=>{const e=this.callbacks.get(t.target);e&&e(t)})})})),this.callbacks.set(t,e),this.observer.observe(t),this.windowCallbacks.add(e),this.isWindowListening||this.startWindowListening()}unobserve(t){if(this.observer){this.observer.unobserve(t);const e=this.callbacks.get(t);e&&this.windowCallbacks.delete(e),this.callbacks.delete(t),0===this.windowCallbacks.size&&this.stopWindowListening()}}startWindowListening(){this.isWindowListening=!0,window.addEventListener("resize",this.handleWindowResize,{passive:!0})}stopWindowListening(){this.isWindowListening=!1,window.removeEventListener("resize",this.handleWindowResize)}handleWindowResize=()=>{this.rafId&&cancelAnimationFrame(this.rafId),this.rafId=requestAnimationFrame(()=>{this.windowCallbacks.forEach(t=>{t({target:window,contentRect:{width:window.innerWidth,height:window.innerHeight}})})})};disconnect(){this.observer&&(this.observer.disconnect(),this.callbacks=new WeakMap),this.rafId&&(cancelAnimationFrame(this.rafId),this.rafId=null),this.windowCallbacks.clear(),this.stopWindowListening()}},l=new class{constructor(){this.callbacks=new Map,this.rafId=null,this.isListening=!1}add(t,e){this.callbacks.set(t,e),this.isListening||this.startListening()}remove(t){this.callbacks.delete(t),0===this.callbacks.size&&this.stopListening()}startListening(){this.isListening=!0;const t=document.querySelector(".site-main .content");t?(this.scrollElement=t,this.scrollElement.addEventListener("scroll",this.handleScroll,{passive:!0})):(this.scrollElement=window,window.addEventListener("scroll",this.handleScroll,{passive:!0}))}stopListening(){this.isListening=!1,this.scrollElement&&(this.scrollElement.removeEventListener("scroll",this.handleScroll),this.scrollElement=null),this.rafId&&(cancelAnimationFrame(this.rafId),this.rafId=null)}handleScroll=()=>{this.rafId&&cancelAnimationFrame(this.rafId),this.rafId=requestAnimationFrame(()=>{this.callbacks.forEach(t=>t())})}},a=function(t,e,i){let n;return function(){let i=this,s=arguments;clearTimeout(n),n=setTimeout(function(){n=null,t.apply(i,s)},e)}},c=function(){let t=!1;return("ontouchstart"in window||navigator.maxTouchPoints>0)&&(t=!0),t},h=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){let e=16*Math.random()|0;return("x"===t?e:3&e|8).toString(16)})},d=function(t,e){const i=t&&t.jquery?t[0]:t;return i?new Promise(t=>{const n=["animation",e];i.classList.add(...n),i.addEventListener("animationend",function e(s){s.stopPropagation(),i.classList.remove(...n),i.removeEventListener("animationend",e),t()},{once:!0})}):Promise.resolve()},u=t=>({"&":"&","<":"<",">":">",'"':""","'":"'","`":"`","=":"="}[t]),p=t=>{if("string"!=typeof t){if(null===t)return"";if(!t)return String(t);t=String(t)}return/[&<>"'`=]/.test(t)?t.replace(/[&<>"'`=]/g,u):t};function f(t,...e){for(const i of e)if(i&&"object"==typeof i)for(const e of Object.keys(i)){const n=i[e],s=t[e];n&&"object"==typeof n&&!Array.isArray(n)&&s&&"object"==typeof s&&!Array.isArray(s)?t[e]=f({},s,n):t[e]=n}return t}class m extends o{static NAME="coolSection";static DEFAULTS={observeSections:!0,initFormControls:!0,initTableHandlers:!0,initButtonGroups:!0,initTabs:!0,onInit:null,onDestroy:null};constructor(t){super(),this.opts=f({},m.DEFAULTS,window.Cool?.settings?.section||{},t||{}),this._eventHandlers=[],this._updateTimeout=null,this._rafId=null,this.init()}init(){this.opts.observeSections&&this.initializeSectionObserver(),this.opts.initFormControls&&this.initializeFormControls(),this.opts.initTableHandlers&&this.initializeTableHandlers(),this.opts.initButtonGroups&&this.initializeButtonGroups(),this.opts.initTabs&&this.initializeTabs(),this.onInit()}destroy(){this.destroySectionObserver(),this.unbindEvents(),this._updateTimeout&&clearTimeout(this._updateTimeout),this._rafId&&cancelAnimationFrame(this._rafId),this.onDestroy()}_addEventListener(t,e,i,n){t.addEventListener(e,i,n),this._eventHandlers.push({element:t,event:e,handler:i,options:n})}initializeSectionObserver(){this._isUpdating=!1,this.sectionObserver=new MutationObserver(t=>{if(this._isUpdating)return;t.every(t=>{if("attributes"===t.type&&"class"===t.attributeName){const e=t.target,i=t.oldValue?t.oldValue.split(" "):[],n=Array.from(e.classList);return[...n.filter(t=>!i.includes(t)),...i.filter(t=>!n.includes(t))].every(t=>"is-last-visible"===t||"is-last-visible-row"===t||"is-last-visible-cell"===t)}return!1})||(this._updateTimeout&&clearTimeout(this._updateTimeout),this._updateTimeout=setTimeout(()=>{this._rafId&&cancelAnimationFrame(this._rafId),this._rafId=requestAnimationFrame(()=>{this.updateLastVisibleElements()})},50))}),this.sectionObserver.observe(document.body,{attributes:!0,childList:!0,subtree:!0,attributeFilter:["class","style","hidden"],attributeOldValue:!0,subtreeFilter:t=>t.classList&&(t.classList.contains("section")||t.classList.contains("select")||"TABLE"===t.nodeName||"TR"===t.nodeName||"TD"===t.nodeName||"TH"===t.nodeName)}),this.updateLastVisibleElements()}updateLastVisibleElements(){this._isUpdating=!0;const t={sections:[],tables:[],rows:[]};document.querySelectorAll(".section").forEach(e=>{const i=this.getVisibleChildren(e);i.length&&t.sections.push({section:e,lastVisible:i[i.length-1]})}),document.querySelectorAll("table").forEach(e=>{const i=e.querySelector("tbody")||e,n=this.getVisibleElements(i.querySelectorAll("tr"));n.length&&t.tables.push({tbody:i,lastVisibleRow:n[n.length-1]})}),document.querySelectorAll("table tr").forEach(e=>{const i=this.getVisibleElements(e.querySelectorAll("td, th"));i.length&&t.rows.push({row:e,lastVisibleCell:i[i.length-1]})}),requestAnimationFrame(()=>{document.querySelectorAll(".is-last-visible, .is-last-visible-row, .is-last-visible-cell").forEach(t=>{t.classList.remove("is-last-visible","is-last-visible-row","is-last-visible-cell")}),t.sections.forEach(({lastVisible:t})=>{t.classList.add("is-last-visible")}),t.tables.forEach(({lastVisibleRow:t})=>{t.classList.add("is-last-visible-row")}),t.rows.forEach(({lastVisibleCell:t})=>{t.classList.add("is-last-visible-cell")}),setTimeout(()=>{this._isUpdating=!1},0)})}getVisibleChildren(t){return Array.from(t.children).filter(t=>this.isElementVisible(t))}getVisibleElements(t){return Array.from(t).filter(t=>this.isElementVisible(t))}isElementVisible(t){return t._computedStyle&&!t._styleInvalidated||(t._computedStyle=window.getComputedStyle(t),t._styleInvalidated=!1),!t.classList.contains("d-none")&&!t.classList.contains("d-md-none")&&null!==t.offsetParent&&t.offsetHeight>0&&"none"!==t._computedStyle.display}destroySectionObserver(){this.sectionObserver&&(this.sectionObserver.disconnect(),this.sectionObserver=null),this._updateTimeout&&(clearTimeout(this._updateTimeout),this._updateTimeout=null),this._rafId&&(cancelAnimationFrame(this._rafId),this._rafId=null)}initializeFormControls(){this._addEventListener(document,"focusin",t=>{const e=t.target.closest(".form-control");if(e&&!e.disabled&&!e.readOnly){const t=e.closest(".input-group");t?.classList.add("input-group-focus")}}),this._addEventListener(document,"focusout",t=>{const e=t.target.closest(".form-control");if(e&&!e.disabled&&!e.readOnly){const t=e.closest(".input-group");t?.classList.remove("input-group-focus")}});const t=t=>{const e=t.querySelector("input, select"),i=!!e?.value;t.classList.toggle("label-on-top",i)};this._addEventListener(document,"input",e=>{const i=e.target.closest(".form-label-group");i&&t(i)}),this._addEventListener(document,"change",e=>{const i=e.target.closest(".form-label-group");i&&t(i),e.target.matches("select")&&e.target.blur()}),document.querySelectorAll(".form-label-group").forEach(t)}initializeTableHandlers(){document.querySelectorAll(".table").forEach(t=>{t.querySelector("[data-table-link], [data-table-btn]")&&!t.classList.contains("table-hover")&&t.classList.add("table-hover")}),this._addEventListener(document,"click",t=>{if(t.target.closest("[data-table-link] .table-link-exclude, [data-table-link] input, [data-table-link] button, [data-table-link] a, [data-table-link] label, [data-table-link] .td-col-select"))return void t.stopPropagation();const e=t.target.closest("[data-table-link]");if(e){const i=e.closest("table, .table"),n=e.dataset.tableLink;if(i?.classList.contains("bulk-actions-active"))return;t.ctrlKey||t.metaKey?window.open(n,"_blank"):window.location.href=n}if(t.target.closest("[data-table-btn] .table-btn-exclude, [data-table-btn] input, [data-table-btn] button, [data-table-btn] a, [data-table-btn] label, [data-table-btn] .td-col-select"))return void t.stopPropagation();const i=t.target.closest("[data-table-btn]");if(i){const t=i.closest("tr, .tr"),e=i.querySelector("button");if(!e||t?.classList.contains("bulk-actions-active"))return;e.click()}})}initializeButtonGroups(){this._addEventListener(document,"click",t=>{const e=t.target.closest(".btn-group-toggle .btn");if(e&&!t.target.matches("input")){const t=e.querySelector("input");t&&(t.click(),t.dispatchEvent(new Event("change",{bubbles:!0})))}t.target.matches(".btn-group-toggle .btn > input")&&t.stopPropagation()}),this._addEventListener(document,"change",t=>{if(t.target.matches('.btn-group-toggle .btn > input[type="radio"]')){const e=t.target.parentElement.closest(".btn-group-toggle");e&&e.querySelectorAll(".btn").forEach(t=>{t.classList.toggle("active",t.querySelector("input")?.checked)})}else if(t.target.matches('.btn-group-toggle .btn > input[type="checkbox"]')){t.target.parentElement.classList.toggle("active",t.target.checked)}})}initializeTabs(){this._addEventListener(document,"click",t=>{const e=t.target.closest(".tabs .tab-item");if(e){t.stopPropagation();e.closest(".tabs").querySelectorAll(".tab-item").forEach(t=>t.classList.remove("active")),e.classList.add("active")}})}unbindEvents(){this._eventHandlers.forEach(({element:t,event:e,handler:i,options:n})=>{t.removeEventListener(e,i,n)}),this._eventHandlers=[]}refresh(){document.querySelectorAll(".form-label-group").forEach(t=>{const e=t.querySelector("input, select"),i=e?.value;t.classList.toggle("label-on-top",!!i)})}}let g=null;try{g=require("perfect-scrollbar"),g&&g.default&&(g=g.default)}catch(t){}"undefined"!=typeof window&&g&&!window.PerfectScrollbar&&(window.PerfectScrollbar=g);class y extends o{static NAME="coolSidebar";static DEFAULTS={floating:!0,breakpoint:1046,wheelSpeed:2,wheelPropagation:!0,minScrollbarLength:20,suppressScrollX:!0,onInit:null,onDestroy:null,onShow:null,onClose:null};static _jQueryInterface(t){const e=$(this);let i=e.data(`plugin_${y.NAME}`);i||(i=new y(this,"object"==typeof t&&t),e.data(`plugin_${y.NAME}`,i)),"string"==typeof t&&i[t]()}static _jQueryInit(){if("undefined"==typeof $||!$.fn)return;const t=$.fn[y.NAME];$.fn[y.NAME]=y._jQueryInterface,$.fn[y.NAME].Constructor=y,$.fn[y.NAME].defaults=y.DEFAULTS||{},$.fn[y.NAME].noConflict=()=>($.fn[y.NAME]=t,y._jQueryInterface)}constructor(t,e){super(),this.opts=f({},y.DEFAULTS,window.Cool?.settings?.sidebar||{},e||{}),this.el=t,t&&t.jquery&&(this.el=t[0]),this.init()}init(){this.buildCache(),this.bindEvents(),this.initializeScrollbars(),this.initializeTabs(),this.onInit()}destroy(){this.unbindEvents(),this.destroyScrollbars(),this.onDestroy()}buildCache(){this.content=this.el.querySelector(".sidebar-content"),this.toggler=document.querySelector(".sidebar-left-toggler"),this.isFloating=this.el.classList.contains("sidebar-floating"),this.isOpen=document.body.classList.contains("sidebar-left-open"),this.tabs=Array.from(this.el.querySelectorAll(".sidebar-tab")),this.tabSelectors=Array.from(document.querySelectorAll('[name="sidebar-tab-select"]'))}bindEvents(){if(this._toggleHandler=t=>{const e=t.target.closest(".sidebar-left-toggler");e&&this.handleToggle(t,e)},this._mousedownHandler=t=>{if(t.target.matches(".sidebar-content .ps__thumb-y")){const e=t.target.closest(".sidebar-content");e?.classList.add("ps-mousedown-scroll"),this.mousedownScrollbar=!0}},this._mouseupHandler=()=>{this.mousedownScrollbar&&(document.querySelectorAll(".sidebar-content.ps-mousedown-scroll").forEach(t=>t.classList.remove("ps-mousedown-scroll")),this.mousedownScrollbar=!1)},this._tabSelectHandler=t=>{t.target.matches('[name="sidebar-tab-select"]')&&this.switchTab(t.target.value)},this._collapseClickHandler=t=>{const e=t.target.closest('[data-toggle="collapse"]');if(!e)return;const i=e.dataset.breakpoint;if(i&&window.matchMedia(`(min-width: ${i}px)`).matches){let i=e.nextElementSibling?.querySelector("li a")||e.parentElement.nextElementSibling?.querySelector("li a");i&&(t.metaKey||t.ctrlKey?window.open(i.href,"_blank").focus():window.location.href=i.href)}else setTimeout(()=>this.scrollbar?.update(),300)},window.ResizeObserver)this.resizeObserver=new ResizeObserver(t=>{this.rafId&&cancelAnimationFrame(this.rafId),this.rafId=requestAnimationFrame(()=>{window.innerWidth>this.opts.breakpoint&&this.removeBackdrop()})}),this.resizeObserver.observe(document.body);else{let t;this._resizeHandler=()=>{clearTimeout(t);const e=performance.now();!this.lastResizeTime||e-this.lastResizeTime>100?(window.innerWidth>this.opts.breakpoint&&this.removeBackdrop(),this.lastResizeTime=e):t=setTimeout(()=>{window.innerWidth>this.opts.breakpoint&&this.removeBackdrop()},16)},window.addEventListener("resize",this._resizeHandler,{passive:!0})}document.addEventListener("click",this._toggleHandler),document.addEventListener("click",this._tabSelectHandler),document.addEventListener("mousedown",this._mousedownHandler),document.addEventListener("mouseup",this._mouseupHandler),this.content&&this.content.addEventListener("click",this._collapseClickHandler)}unbindEvents(){document.removeEventListener("click",this._toggleHandler),document.removeEventListener("click",this._tabSelectHandler),document.removeEventListener("mousedown",this._mousedownHandler),document.removeEventListener("mouseup",this._mouseupHandler),this.resizeObserver&&(this.resizeObserver.disconnect(),this.resizeObserver=null),this.rafId&&(cancelAnimationFrame(this.rafId),this.rafId=null),this._resizeHandler&&(window.removeEventListener("resize",this._resizeHandler),this._resizeHandler=null),this.content&&this.content.removeEventListener("click",this._collapseClickHandler)}initializeScrollbars(){this.content&&(g?this.scrollbar=new g(this.content,{wheelSpeed:this.opts.wheelSpeed,wheelPropagation:this.opts.wheelPropagation,minScrollbarLength:this.opts.minScrollbarLength,suppressScrollX:this.opts.suppressScrollX}):this.content.style.overflowY="auto")}initializeTabs(){this.tabScrollbars=new Map,this.tabs.forEach(t=>{const e=t.querySelector(".tab-content");if(e)if(g){const i=new g(e,{wheelSpeed:this.opts.wheelSpeed,wheelPropagation:this.opts.wheelPropagation,minScrollbarLength:this.opts.minScrollbarLength,suppressScrollX:this.opts.suppressScrollX});this.tabScrollbars.set(t,i)}else e.style.overflowY="auto"})}destroyScrollbars(){this.scrollbar&&(this.scrollbar.destroy(),this.scrollbar=null),this.tabScrollbars.forEach(t=>t.destroy()),this.tabScrollbars.clear()}toggleWithTransition(t){const e=document.documentElement;e.classList.add("sidebar-transitioning"),"open"===t?(document.body.classList.add("sidebar-left-open"),this.isFloating&&window.innerWidth<=this.opts.breakpoint&&this.createBackdrop()):(document.body.classList.remove("sidebar-left-open"),this.removeBackdrop()),setTimeout(()=>{e.classList.remove("sidebar-transitioning")},330)}createBackdrop(){if(document.querySelector(".sidebar-backdrop"))return;const t=document.createElement("div");t.className="sidebar-backdrop",t.addEventListener("click",()=>{this.toggleWithTransition("close"),this.toggler&&(this.toggler.classList.remove("open"),null!==this.toggler.ariaExpanded&&(this.toggler.ariaExpanded="false"))});const e=document.querySelector(".site-main");e&&(e.appendChild(t),requestAnimationFrame(()=>{t.classList.add("show")}))}removeBackdrop(){const t=document.querySelector(".sidebar-backdrop");t&&(t.classList.remove("show"),t.addEventListener("transitionend",()=>{t.remove()},{once:!0}),setTimeout(()=>{t?.remove()},330))}handleToggle(t,e){if(t.stopPropagation(),!e)return;null!==e.ariaExpanded&&(e.ariaExpanded="true"!==e.ariaExpanded),e.classList.toggle("open");const i=document.body.classList.contains("sidebar-left-open");this.toggleWithTransition(i?"close":"open"),i?this.onClose():this.onShow()}switchTab(t){const e=document.getElementById(`sidebar-tab-${t}`);if(!e)return;const i=this.tabs;i.forEach(t=>{if(t.classList.toggle("active",t===e),t!==e){const n=t.querySelector(".tab-content");if(n)if(t===i[0])n.style.transform="translate3d(100%, 0px, 0px)";else if(t===i[i.length-1])n.style.transform="translate3d(-100%, 0px, 0px)";else{const s=i.indexOf(t)<i.indexOf(e);n.style.transform=`translate3d(${s?"-100%":"100%"}, 0px, 0px)`}}});const n=e.querySelector(".tab-content");n&&(n.style.transform="none"),this.tabSelectors.forEach(e=>{e.classList.toggle("active",e.value===t)})}toggle(){const t=document.body.classList.contains("sidebar-left-open");this.toggleWithTransition(t?"close":"open")}open(){document.body.classList.contains("sidebar-left-open")||this.toggleWithTransition("open")}close(){document.body.classList.contains("sidebar-left-open")&&this.toggleWithTransition("close")}}y._jQueryInit();class v extends o{static NAME="coolPopover";static DEFAULTS={container:"body",containerAutoDetect:!1,trigger:"focus",placement:"bottom",align:"center",offset:null,collisionDetection:!0,title:"",content:"",onInit:null,onUpdate:null,onDestroy:null,onShow:null,onClose:null};static _jQueryInterface(t){return this.each(function(){const e=$(this);let i=e.data(`plugin_${v.NAME}`);i||(i=new v(this,"object"==typeof t&&t),e.data(`plugin_${v.NAME}`,i)),"string"==typeof t&&i[t]()})}static _jQueryInit(){if("undefined"==typeof $||!$.fn)return;const t=$.fn[v.NAME];$.fn[v.NAME]=v._jQueryInterface,$.fn[v.NAME].Constructor=v,$.fn[v.NAME].defaults=v.DEFAULTS||{},$.fn[v.NAME].noConflict=()=>($.fn[v.NAME]=t,v._jQueryInterface)}constructor(t,e){super(),this.opts=f({},v.DEFAULTS,window.Cool?.settings?.popover||{},e||{}),this.el=t,this.init()}init(){this.buildCache(),this.bindEvents(),this.onInit()}destroy(){this.unbindEvents(),this.popoverEl&&(this.popoverEl.remove(),this.popoverEl=null),this.constructor.removeInstance(this.el),this.onDestroy()}update(){this.buildCache(),this.popoverEl&&this.setPosition(),this.onUpdate()}buildCache(){this.containerEl=this.el.dataset.container?document.querySelector(this.el.dataset.container):document.querySelector(this.opts.container),this.containerAutoDetect=void 0!==this.el.dataset.containerAutoDetect?this.el.dataset.containerAutoDetect:void 0!==this.el.dataset.containerautodetect?this.el.dataset.containerautodetect:this.opts.containerAutoDetect,this.id="popover-"+h(),this.trigger=this.el.dataset.trigger||this.opts.trigger,this.placement=this.el.dataset.placement||this.opts.placement,this.align=this.el.dataset.align||this.opts.align,this.title=this.el.dataset.title||this.opts.title,this.content=this.el.dataset.content||this.opts.content,this.offset=this.el.dataset.offset||this.opts.offset,this.collisionDetection="false"!==(this.el.dataset.collisionDetection||this.el.dataset.collisiondetection)&&(this.el.dataset.collisionDetection||this.el.dataset.collisiondetection||this.opts.collisionDetection),this.containerAutoDetect&&(this.containerEl=this.el.offsetParent||document.body)}bindEvents(){"click"===this.trigger?(this._clickHandler=()=>{this.popoverEl?this.close():this.show()},this.el.addEventListener("click",this._clickHandler)):"hover"===this.trigger?(this._mouseenterHandler=()=>{clearTimeout(this.hoverTimeout),this.show()},this._mouseleaveHandler=()=>{this.hoverTimeout=setTimeout(()=>{this.popupHasFocus||this.close()},100)},this.el.addEventListener("mouseenter",this._mouseenterHandler),this.el.addEventListener("mouseleave",this._mouseleaveHandler)):"focus"===this.trigger&&(this._focusinHandler=()=>this.show(),this._focusoutHandler=()=>this.close(),this.el.addEventListener("focusin",this._focusinHandler),this.el.addEventListener("focusout",this._focusoutHandler)),window.ResizeObserver&&(this._resizeCallback=()=>{this.popoverEl&&this.popoverEl.classList.contains("show")&&requestAnimationFrame(()=>{this.setPosition()})},r.observe(this.el,this._resizeCallback))}unbindEvents(){this._clickHandler&&this.el.removeEventListener("click",this._clickHandler),this._mouseenterHandler&&this.el.removeEventListener("mouseenter",this._mouseenterHandler),this._mouseleaveHandler&&this.el.removeEventListener("mouseleave",this._mouseleaveHandler),this._focusinHandler&&this.el.removeEventListener("focusin",this._focusinHandler),this._focusoutHandler&&this.el.removeEventListener("focusout",this._focusoutHandler),this._resizeCallback&&(r.unobserve(this.el),this._resizeCallback=null)}buildPopover(){let t;t="function"==typeof this.content?this.content():this.content,this.popoverEl=document.createElement("div"),this.popoverEl.className="popover",this.popoverEl.setAttribute("role","tooltip"),this.popoverEl.id=this.id,this.popoverEl.innerHTML=`\n <h3 class="popover-header">${this.title}</h3>\n <div class="popover-body">${t}</div>\n `,this.containerEl.appendChild(this.popoverEl),this.popoverEl.addEventListener("mouseenter",()=>{this.popupHasFocus=!0,"hover"===this.trigger&&this.hoverTimeout&&clearTimeout(this.hoverTimeout)}),this.popoverEl.addEventListener("mouseleave",()=>{this.popupHasFocus=!1,"hover"===this.trigger&&(this.hoverTimeout=setTimeout(()=>{this.close()},100))})}setPosition(t){"undefined"!=typeof t&&null!==t||(t=this.placement);const e=window.innerWidth,i=window.innerHeight,n=this.popoverEl.offsetWidth,s=this.popoverEl.offsetHeight,o=this.el.offsetWidth,r=this.el.offsetHeight;let l,a;const c=this.containerEl.getBoundingClientRect(),h=c.left+window.scrollX,d=c.top+window.scrollY,u=this.el.getBoundingClientRect(),p=u.left+window.scrollX,f=u.top+window.scrollY;l=p-h,a=f-d;let m=0,g=0,y=0,v=0;if(this.offset){const t=this.offset.split(",");y=parseInt(t[0],10)||0,v=parseInt(t[1],10)||0}const b=getComputedStyle(this.popoverEl),E=parseInt(b.getPropertyValue("--cool-popover-spacer"))||8,w=(t,e=this.align)=>{let i=0,c=0;switch(t){case"top":i="end"===e?l+o-n:"center"===e?l+(o-n)/2:l,c=a-s-E;break;case"bottom":i="end"===e?l+o-n:"center"===e?l+(o-n)/2:l,c=a+r+E;break;case"left":i=l-n-E,c="end"===e?a+r-s:"center"===e?a+(r-s)/2:a;break;case"right":i=l+o+E,c="end"===e?a+r-s:"center"===e?a+(r-s)/2:a}return{x:i+y,y:c+v}};let C=t,x=this.align,S=w(t);if(this.collisionDetection){const o=5,r=t=>{const r={top:!1,bottom:!1,left:!1,right:!1},l=h+t.x,a=d+t.y,c=l+n,u=a+s;return r.top=a<o,r.bottom=u>i-o,r.left=l<o,r.right=c>e-o,r},l=r(S);"bottom"===t&&l.bottom&&!l.top?(C="top",S=w("top",x)):"top"===t&&l.top&&!l.bottom?(C="bottom",S=w("bottom",x)):"right"===t&&l.right&&!l.left?(C="left",S=w("left",x)):"left"===t&&l.left&&!l.right&&(C="right",S=w("right",x));const a=r(S);"top"!==C&&"bottom"!==C||("end"===x&&a.left&&!a.right?(x="start",S=w(C,x)):"start"===x&&a.right&&!a.left&&(x="end",S=w(C,x)));const c=r(S);c.left?S.x+=o-(h+S.x):c.right&&(S.x-=h+S.x+n-(e-o)),c.top?S.y+=o-(d+S.y):c.bottom&&(S.y-=d+S.y+s-(i-o))}m=S.x,g=S.y,Object.assign(this.popoverEl.style,{transform:`translate3d(${Math.round(m)}px, ${Math.round(g)}px, 0px)`,willChange:"transform"}),this.popoverEl.setAttribute("x-placement",C+"-"+x)}show(){this.popoverEl||(this.buildPopover(),this.setPosition(),this.popoverEl.classList.add("show"),this.el.setAttribute("data-popover",this.id),this.onShow())}close(){this.popoverEl&&(this.popoverEl.remove(),this.el.removeAttribute("data-popover"),this.popoverEl=null,this.onClose())}}v._jQueryInit();let b=null;try{b=require("perfect-scrollbar"),b&&b.default&&(b=b.default)}catch(t){}"undefined"!=typeof window&&b&&!window.PerfectScrollbar&&(window.PerfectScrollbar=b);const E=new WeakMap;function w(t){if(!t)return 0;const e=getComputedStyle(t);return t.offsetHeight+parseInt(e.marginTop,10)+parseInt(e.marginBottom,10)}class C extends o{static NAME="coolSelect";static DEFAULTS={name:"",type:"checkbox",labelTemplate:null,confirmCheck:null,confirmUncheck:null,setData:null,scrollContentHeight:300,useNativeScroll:!1,contentWidth:null,faPro:!1,items:[],showSearch:!1,showFooter:!1,searchApi:!1,onInit:null,onUpdate:null,onDestroy:null,onShow:null,onClose:null,onReset:null,onSearch:null,onSelect:null,buildScroll:null,searchPlaceholder:null,btnCloseText:null,dynamicTitle:!1,dynamicTitleDefault:"",dynamicTitleEmptyDefault:"",allowNoneOnRadioSelect:!0,preventUncheck:!1,showValidStateIcon:!0,itemsToExclude:[],primaryKeyword:"id",position:"absolute",scrollEl:".content",useChips:!1};static _jQueryInterface(t){return this.each(function(){const e=$(this);let i=e.data(`plugin_${C.NAME}`);i||(i=new C(this,"object"==typeof t&&t),e.data(`plugin_${C.NAME}`,i)),"string"==typeof t&&i[t]()})}static _jQueryInit(){if("undefined"==typeof $||!$.fn)return;const t=$.fn[C.NAME];$.fn[C.NAME]=C._jQueryInterface,$.fn[C.NAME].Constructor=C,$.fn[C.NAME].defaults=C.DEFAULTS||{},$.fn[C.NAME].noConflict=()=>($.fn[C.NAME]=t,C._jQueryInterface)}constructor(t,e){super(),this.opts=f({},C.DEFAULTS,window.Cool?.settings?.select||{},e||{}),this.el=t,this.useChips=!1,this.cachedTitle="",this.lastSearchQuery="",this._resizeCallback=null,this._scrollCallback=null,this.init()}init(){this.buildCache(),this.buildScroll(),this.bindEvents(),this.onInit()}destroy(){this.unbindEvents(),this.constructor.removeInstance(this.el),this.onDestroy()}update(){this.buildCache(),this.bindEvents();let t=Promise.resolve();return this.searchApi&&this.searchApi.length&&(t=this._performInitialSearch()),t.then(()=>{this.onUpdate()})}reset(){this.data={},this.data[this.name]=[],this.items=[],this.selectEl.querySelectorAll(".select-item").forEach(t=>t.remove()),this.selectItems=[],this.selectIconContainerEl&&(this.selectIconContainerEl.innerHTML=this.selectIconDefault),this.selectHeaderEl.classList.remove("select-placeholder"),"function"==typeof this.dynamicTitle?this.selectTitleEl.textContent=this.dynamicTitle.call(this):(0==this.data[this.name].length&&this.dynamicTitle&&this.dynamicTitleDefault&&0!==this.dynamicTitleDefault&&0==this.selectTitleEl.textContent.trim()&&(this.selectItems.length>0||this.searchApi)&&(this.selectTitleEl.textContent=this.dynamicTitleDefault),0==this.selectItems.length&&!this.searchApi&&this.dynamicTitle&&this.dynamicTitleEmptyDefault&&0!==this.dynamicTitleEmptyDefault&&(this.selectHeaderEl.classList.add("select-placeholder"),this.selectIconContainerEl&&this.selectIconContainerEl.classList.add("d-none"),this.selectTitleEl.textContent=this.dynamicTitleEmptyDefault)),this.showSearch&&(this.searchData=[],this.searchInputEl.value="",this.searchString="",this.search.call(this))}buildCache(){if(this.containerEl=this.el.parentElement,this.selectHeaderEl=this.el.querySelector(".select-header"),this.selectTitleEl=this.el.querySelector(".select-title"),this.cachedTitle=this.selectTitleEl?this.selectTitleEl.textContent:"",this.selectIconContainerEl=this.selectHeaderEl?this.selectHeaderEl.querySelector(".select-icon"):null,this.searchIconContainerEl=this.el.querySelector(".select-search-icon"),this.selectIconDefault=this.selectIconContainerEl?this.selectIconContainerEl.innerHTML:'<i class="'+(this.opts.faPro?"fal":"fas")+'fa-angle-down icon"></i>',this.name=this.el.dataset.name||this.opts.name,this.scroll=null,this.scrollContentHeight=this.el.dataset.scrollContentHeight||this.el.dataset.scrollcontentheight||this.opts.scrollContentHeight,this.useNativeScroll=this.el.dataset.useNativeScroll||this.el.dataset.usenativescroll||this.opts.useNativeScroll,this.contentWidth=this.el.dataset.contentWidth||this.el.dataset.contentwidth||this.opts.contentWidth,this.items=this.el.dataset.items?JSON.parse(this.el.dataset.items):this.opts.items,this.data={},this.data[this.name]=[],this.searchData=[],this.searchApi=this.el.dataset.searchApi||this.el.dataset.searchapi||this.opts.searchApi,this.searchRequest=null,this.type=this.el.dataset.type||this.opts.type,this.contentOpen=this.el.classList.contains("show"),this.searchPlaceholder=this.el.dataset.searchPlaceholder||this.opts.searchPlaceholder,this.btnCloseText=this.el.dataset.btnCloseText||this.opts.btnCloseText,this.labelTemplate=this.opts.labelTemplate,this.confirmCheck=this.opts.confirmCheck,this.confirmUncheck=this.opts.confirmUncheck,this.preventUncheck=this.el.dataset.preventUncheck||this.el.dataset.preventuncheck||this.opts.preventUncheck,this.dynamicTitle=this.el.dataset.dynamicTitle||this.el.dataset.dynamictitle||this.opts.dynamicTitle,this.dynamicTitleDefault=this.el.dataset.dynamicTitleDefault||this.el.dataset.dynamictitledefault||this.opts.dynamicTitleDefault,this.dynamicTitleEmptyDefault=this.el.dataset.dynamicTitleEmptyDefault||this.el.dataset.dynamictitleemptydefault||this.opts.dynamicTitleEmptyDefault,this.allowNoneOnRadioSelect=this.el.dataset.allowNoneOnRadioSelect||this.el.dataset.allowneonradioselect||this.opts.allowNoneOnRadioSelect,this.showValidStateIcon=this.el.dataset.showValidStateIcon||this.el.dataset.showvalidstateicon||this.opts.showValidStateIcon,this.itemsToExclude=this.el.dataset.itemsToExclude||this.el.dataset.itemstoexclude?(this.el.dataset.itemsToExclude||this.el.dataset.itemstoexclude).replace(/\s/g,"").split(","):this.opts.itemsToExclude,this.primaryKeyword=this.el.dataset.primaryKeyword||this.el.dataset.primarykeyword||this.opts.primaryKeyword,this.useChips=this.el.dataset.useChips||this.el.dataset.usechips||this.opts.useChips,this.position=this.el.dataset.position||this.opts.position,this.useChips&&(this.showValidStateIcon=!1),this.preventClose=!1,this.itemsToExclude.length>0&&(this.itemsToExclude=this.itemsToExclude.map(String)),this.opts.setData&&(this.data=this.opts.setData),(this.el.dataset.setData||this.el.dataset.setdata)&&""!=(this.el.dataset.setData||this.el.dataset.setdata))try{this.data=JSON.parse(this.el.dataset.setData||this.el.dataset.setdata)}catch(t){this.data=this.el.dataset.setData||this.el.dataset.setdata}if(!Array.isArray(this.data[this.name])&&""!==this.data[this.name]&&this.data[this.name].length>0){const t=this.data[this.name].toString().trim().split(",");this.data[this.name]=t}if(this.data[this.name].length>0&&!this.useChips&&(this.data[this.name]=this.data[this.name].map(String)),this.data[this.name].length>0&&this.itemsToExclude.length>0&&(this.data[this.name]=this.data[this.name].filter(t=>t[this.primaryKeyword]?-1===this.itemsToExclude.indexOf(t[this.primaryKeyword].toString()):-1===this.itemsToExclude.indexOf(t.toString()))),this.data&&this.useChips&&this._renderChips(),this.items.length>0&&this.itemsToExclude.length>0&&(this.items=this.items.filter(t=>t[this.primaryKeyword]?-1===this.itemsToExclude.indexOf(t[this.primaryKeyword].toString()):-1===this.itemsToExclude.indexOf(t.toString()))),this.el.querySelector(".select-search")?this.showSearch=!0:this.showSearch=this.el.dataset.showSearch||this.el.dataset.showsearch||this.opts.showSearch,this.el.querySelector(".select-footer")?this.showFooter=!0:this.showFooter=this.el.dataset.showFooter||this.el.dataset.showfooter||this.opts.showFooter,this.selectEl=this.el.querySelector(".select-content"),this.selectEl){const t=this.selectEl.querySelectorAll(".select-item");t.length>0&&this.itemsToExclude.length>0&&t.forEach(t=>{const e=t.querySelector("input");e&&this.itemsToExclude.indexOf(e.value)>-1&&t.remove()})}else{let t=this._renderItemList(this.items);const e=document.createElement("div");e.innerHTML=`\n <div class="select-content">\n ${this._renderSearch()}\n <div class="select-scrollable-content"></div>\n ${this._renderFooter()}\n </div>\n `,this.selectEl=e.firstElementChild,this.el.appendChild(this.selectEl);const i=this.selectEl.querySelector(".select-scrollable-content");t.forEach(t=>i.appendChild(t))}if(this.data[this.name].length>0){const t=this.useChips?this.data[this.name].map(t=>t[this.primaryKeyword].toString()):this.data[this.name].map(String);if(this.selectEl.querySelectorAll("input").forEach(e=>{t.includes(e.value)&&(e.checked=!0,"radio"===this.type&&e.classList.add("checked"))}),this.useChips)this._renderChips();else if("radio"===this.type&&"function"!=typeof this.dynamicTitle){const t=this.selectEl.querySelector("input:checked");if(t){const e=t.parentElement.querySelector("[data-label]");e&&(this.selectTitleEl.textContent=e.textContent)}}}this.scrollableContentEl=this.selectEl.querySelector(".select-scrollable-content")||null,this.selectItems=Array.from(this.selectEl.querySelectorAll(".select-item")),this.selectHeaderEl.classList.remove("select-placeholder"),this.searchApi&&this.searchApi.length&&this._performInitialSearch(),"function"==typeof this.dynamicTitle?this.selectTitleEl.textContent=this.dynamicTitle.call(this):(0==this.data[this.name].length&&this.dynamicTitle&&this.dynamicTitleDefault&&0!==this.dynamicTitleDefault&&0==this.selectTitleEl.textContent.trim()&&(this.selectItems.length>0||this.searchApi)&&(this.selectTitleEl.textContent=this.dynamicTitleDefault),0==this.selectItems.length&&!this.searchApi&&this.dynamicTitle&&this.dynamicTitleEmptyDefault&&0!==this.dynamicTitleEmptyDefault&&(this.selectHeaderEl.classList.add("select-placeholder"),this.selectIconContainerEl&&this.selectIconContainerEl.classList.add("d-none"),this.selectTitleEl.textContent=this.dynamicTitleEmptyDefault)),this.showSearch&&(this.searchContainerEl=this.selectEl.querySelector(".select-search"),this.searchInputEl=this.selectEl.querySelector('[name="select-search"]'),this.clearSearchButtonEl=this.selectEl.querySelector("[data-clear-search]"),this.searchInputEl&&(this.searchInputEl.tabIndex=-1)),this.showFooter&&(this.footerContainerEl=this.selectEl.querySelector(".select-footer"),this.closeButtonEl=this.selectEl.querySelector("[data-select-close]"),this.closeButtonEl&&(this.closeButtonEl.tabIndex=-1)),this.buildSearchData()}_updateScrollbarVisibility(){if(this.scroll&&this.scrollableContentEl){const t=this.scrollableContentEl;t.scrollHeight>t.clientHeight?(this.scroll.settings.suppressScrollY=!1,this.scrollableContentEl.classList.add("ps-show-rail-y")):(this.scroll.settings.suppressScrollY=!0,this.scrollableContentEl.classList.remove("ps-show-rail-y")),this.scroll.update()}}_performInitialSearch(){return this.isSearchApiEnabled()?(this._showSpinner(),fetch(this.searchApi).then(t=>t.json()).then(t=>{let e=t.filter(t=>-1===this.itemsToExclude.indexOf(t[this.primaryKeyword].toString())&&0!=t[this.primaryKeyword]);this.useChips&&this.data[this.name].length>0&&(this.data[this.name].forEach(t=>{const i=e.find(e=>e[this.primaryKeyword].toString()===t[this.primaryKeyword].toString());i&&(t.label=i.label||i.name||i.value)}),this.selectTitleEl.innerHTML="",this.data[this.name].forEach(t=>{const e=document.createElement("span");e.className="chip",e.dataset.value=t[this.primaryKeyword],e.innerHTML=`<span class="chip-title">${p(t.label)}</span>`,e.addEventListener("click",e=>{e.stopPropagation();const i=this.selectEl.querySelector(`input[value="${t[this.primaryKeyword]}"]`);i&&(i.checked=!1,i.dispatchEvent(new Event("change",{bubbles:!0})))}),this.selectTitleEl.appendChild(e)}));let i=this._renderItemList(e);this.scrollableContentEl.innerHTML="",i.forEach(t=>this.scrollableContentEl.appendChild(t)),this.data[this.name].length>0&&this.data[this.name].forEach(t=>{const e=this.useChips?t[this.primaryKeyword].toString():t.toString(),i=this.scrollableContentEl.querySelector(`input[value="${e}"]`);i&&(i.checked=!0,"radio"===this.type&&i.classList.add("checked"))}),this._updateScrollbarVisibility(),this._hideSpinner(),this.useChips&&this.data[this.name].length>0&&this._renderChips(),this.contentOpen&&this._recalculateContentHeight()}).catch(t=>{this._hideSpinner(),this.scrollableContentEl.innerHTML='<div class="p-3 text-danger">Error loading items</div>'})):Promise.resolve()}buildScroll(){if(this.scrollableContentEl){let t=this.scrollContentHeight;this.showSearch&&this.searchContainerEl&&(t-=w(this.searchContainerEl)||0),this.showFooter&&this.footerContainerEl&&(t-=w(this.footerContainerEl)||0);const e=(parseInt(getComputedStyle(this.scrollableContentEl).marginTop,10)||0)+(parseInt(getComputedStyle(this.scrollableContentEl).marginBottom,10)||0),i=this.scrollableContentEl.scrollHeight,n=Math.min(i,t+e);this.scrollableContentEl.style.maxHeight=n+"px",c()?this.scrollableContentEl.style.overflowY="auto":(!1===this.useNativeScroll&&b?(this.scrollableContentEl.classList.add("ps-dark"),this.scroll=new b(this.scrollableContentEl,{wheelSpeed:1,wheelPropagation:!1,minScrollbarLength:20,scrollYMarginOffset:-1,suppressScrollY:!0,suppressScrollX:!0}),setTimeout(()=>{this._updateScrollbarVisibility()},0)):this.scrollableContentEl.style.overflowY="auto",this.scrollableContentEl.querySelectorAll('[tabindex="0"]').forEach(t=>{t.tabIndex=-1}))}}buildSearchData(){this.searchData=[];this.selectEl.querySelectorAll("[data-label]").forEach((t,e)=>{this.searchData.push({id:e,val:t.textContent.trim()})})}bindEvents(){if(this._headerClickHandler=()=>{this.contentOpen?this.close():(this.selectItems.length>0||this.searchApi)&&this.show()},this.selectHeaderEl.addEventListener("click",this._headerClickHandler),this._checkboxChangeHandler=t=>{if(!t.target.matches('input[type="checkbox"]'))return;const e=t.target,i=e.value,n=600;if(this.preventClose=!0,"function"==typeof this.confirmCheck&&e.checked)e.checked=!1,this.confirmCheck(t=>{if("confirmed"==t){if(this.useChips){if(!this.data[this.name].find(t=>t[this.primaryKeyword]===i)){const t=e.parentElement.querySelector("[data-label]");this.data[this.name].push({[this.primaryKeyword]:i,label:t?t.textContent:i})}}else-1===this.data[this.name].indexOf(i)&&this.data[this.name].push(i);e.checked=!0,this.onSelect(e)}setTimeout(()=>{this.preventClose=!1},n)},e);else if(e.checked){if(this.useChips){if(!this.data[this.name].find(t=>t[this.primaryKeyword]===i)){const t=e.parentElement.querySelector("[data-label]");this.data[this.name].push({[this.primaryKeyword]:i,label:t?t.textContent:i})}}else-1===this.data[this.name].indexOf(i)&&this.data[this.name].push(i);this.onSelect(e),setTimeout(()=>{this.preventClose=!1},n)}else"function"!=typeof this.confirmUncheck||e.checked?e.checked||this.preventUncheck?!e.checked&&this.preventUncheck&&(e.checked=!0,setTimeout(()=>{this.preventClose=!1},n)):(this.useChips?this.data[this.name]=this.data[this.name].filter(t=>t[this.primaryKeyword]!=i):this.data[this.name]=this.data[this.name].filter(t=>t!=i),this.onSelect(e),setTimeout(()=>{this.preventClose=!1},n)):(e.checked=!0,this.confirmUncheck(t=>{"confirmed"==t&&(this.useChips?this.data[this.name]=this.data[this.name].filter(t=>t[this.primaryKeyword]!=i):this.data[this.name]=this.data[this.name].filter(t=>t!=i),e.checked=!1,this.onSelect(e)),setTimeout(()=>{this.preventClose=!1},n)},e))},this.el.addEventListener("change",this._checkboxChangeHandler),this._radioChangeHandler=t=>{if(!t.target.matches('input[type="radio"]'))return;const e=t.target,i=e.value;if(e.checked){if(this.useChips){const t=e.parentElement.querySelector("[data-label]");this.data[this.name]=[{[this.primaryKeyword]:i,label:t?t.textContent:i}]}else this.data[this.name]=[i];this.data[this.name]=[i],this.selectEl.querySelectorAll('input[type="radio"]').forEach(t=>{t!==e&&(t.checked=!1,t.classList.remove("checked"))})}else this.data[this.name]=[]},this.el.addEventListener("change",this._radioChangeHandler),this._radioClickHandler=t=>{if(!t.target.matches('input[type="radio"]'))return;const e=t.target;if(e.classList.contains("checked")&&this.allowNoneOnRadioSelect&&!this.preventUncheck)this.data[this.name]=[],e.checked=!1,e.classList.remove("checked"),this.dynamicTitle&&"function"!=typeof this.dynamicTitle&&(this.selectTitleEl.textContent=this.dynamicTitleDefault);else if(e.classList.add("checked"),this.dynamicTitle&&"function"!=typeof this.dynamicTitle){const t=e.parentElement.querySelector("[data-label]");this.selectTitleEl.textContent=p(t?t.textContent:"")}"function"==typeof this.dynamicTitle&&(this.selectTitleEl.textContent=this.dynamicTitle.call(e)),this.onSelect(e)},this.el.addEventListener("click",this._radioClickHandler),this.scroll){const t=this.scrollableContentEl?this.scrollableContentEl.querySelector(".ps__thumb-y"):null;t&&(this._thumbMousedownHandler=()=>{this.scrollableContentEl.classList.add("ps-mousedown-scroll")},t.addEventListener("mousedown",this._thumbMousedownHandler)),this._documentMouseupHandler=()=>{this.scrollableContentEl&&this.scrollableContentEl.classList.contains("ps-mousedown-scroll")&&this.scrollableContentEl.classList.remove("ps-mousedown-scroll")},document.addEventListener("mouseup",this._documentMouseupHandler)}this.showSearch&&(this._searchKeydownHandler=a(()=>{this.searchString=this.searchInputEl.value.trim(),this.search.call(this)},250),this.searchInputEl.addEventListener("keydown",this._searchKeydownHandler),this._searchFocusinHandler=()=>{this.searchContainerEl.classList.add("focused")},this.searchInputEl.addEventListener("focusin",this._searchFocusinHandler),this._searchFocusoutHandler=()=>{this.searchContainerEl.classList.remove("focused")},this.searchInputEl.addEventListener("focusout",this._searchFocusoutHandler),this._clearSearchHandler=t=>{t.target.closest("[data-clear-search]")&&this.searchString.length&&(this.searchInputEl.value="",this.searchString="",this.search.call(this))},this.searchContainerEl.addEventListener("click",this._clearSearchHandler)),this.showFooter&&this.closeButtonEl&&(this._footerCloseHandler=()=>{this.close()},this.closeButtonEl.addEventListener("click",this._footerCloseHandler)),this._documentClickHandler=t=>{this.el.contains(t.target)||!this.contentOpen||this.preventClose||this.close.call(this)},document.addEventListener("touchstart",this._documentClickHandler),document.addEventListener("click",this._documentClickHandler),"fixed"===this.position&&(this._scrollCallback=()=>{this.el&&this.el.classList.contains("show")&&requestAnimationFrame(()=>{const t=this.el.querySelector(".select-content"),e=this.containerEl.getBoundingClientRect();t&&Object.assign(t.style,{top:e.top+"px",left:e.left+"px",width:this.contentWidth?`var(--cool-select-content-width, ${this.contentWidth}px)`:this.containerEl.offsetWidth+"px"})})},window.ResizeObserver&&(this._resizeCallback=()=>{this.el&&this.el.classList.contains("show")&&requestAnimationFrame(()=>{const t=this.el.querySelector(".select-content"),e=this.containerEl.getBoundingClientRect();t&&Object.assign(t.style,{top:e.top+"px",left:e.left+"px",width:this.contentWidth?`var(--cool-select-content-width, ${this.contentWidth}px)`:this.containerEl.offsetWidth+"px"})})},r.observe(document.body,this._resizeCallback)))}unbindEvents(){if(this._headerClickHandler&&(this.selectHeaderEl.removeEventListener("click",this._headerClickHandler),this._headerClickHandler=null),this._checkboxChangeHandler&&(this.el.removeEventListener("change",this._checkboxChangeHandler),this._checkboxChangeHandler=null),this._radioChangeHandler&&(this.el.removeEventListener("change",this._radioChangeHandler),this._radioChangeHandler=null),this._radioClickHandler&&(this.el.removeEventListener("click",this._radioClickHandler),this._radioClickHandler=null),this._thumbMousedownHandler){const t=this.scrollableContentEl?this.scrollableContentEl.querySelector(".ps__thumb-y"):null;t&&t.removeEventListener("mousedown",this._thumbMousedownHandler),this._thumbMousedownHandler=null}this._documentMouseupHandler&&(document.removeEventListener("mouseup",this._documentMouseupHandler),this._documentMouseupHandler=null),this._searchKeydownHandler&&(this.searchInputEl.removeEventListener("keydown",this._searchKeydownHandler),this._searchKeydownHandler=null),this._searchFocusinHandler&&(this.searchInputEl.removeEventListener("focusin",this._searchFocusinHandler),this._searchFocusinHandler=null),this._searchFocusoutHandler&&(this.searchInputEl.removeEventListener("focusout",this._searchFocusoutHandler),this._searchFocusoutHandler=null),this._clearSearchHandler&&this.searchContainerEl&&(this.searchContainerEl.removeEventListener("click",this._clearSearchHandler),this._clearSearchHandler=null),this._footerCloseHandler&&this.closeButtonEl&&(this.closeButtonEl.removeEventListener("click",this._footerCloseHandler),this._footerCloseHandler=null),this._documentClickHandler&&(document.removeEventListener("touchstart",this._documentClickHandler),document.removeEventListener("click",this._documentClickHandler),this._documentClickHandler=null),"fixed"===this.position&&(this._scrollCallback&&(l.remove(`select-${this.name}`),this._scrollCallback=null),this._resizeCallback&&(r.unobserve(document.body),this._resizeCallback=null))}getData(t){return t?this.data[t]:this.data}setData(){let t=this.opts.faPro?"fal":"fas";if(this.showValidStateIcon?this.selectIconContainerEl&&(this.selectIconContainerEl.innerHTML=`<i class="${t} fa-check text-success icon"></i>`):this.selectIconContainerEl&&(this.selectIconContainerEl.innerHTML=this.selectIconDefault),this.useChips&&(this.selectTitleEl.innerHTML=""),this.searchApi.length){let t=this.searchApi,e=this.data[this.name].length,i=0;this.data[this.name].forEach(n=>{t+=encodeURIComponent("#"+n),i++,i!==e&&(t+="+")}),fetch(t).then(t=>t.json()).then(t=>{let e=t.map(t=>t.id.toString());this.data[this.name]=this.data[this.name].filter(t=>this.useObjects?e.indexOf(t[this.primaryKeyword].toString())>-1:e.indexOf(t.toString())>-1),0==this.data[this.name].length&&this.selectIconContainerEl&&(this.selectIconContainerEl.innerHTML=this.selectIconDefault);const i=t.filter(t=>this.useObjects?this.data[this.name].findIndex(e=>e[this.primaryKeyword]==t.id)>-1&&-1===this.itemsToExclude.indexOf(t.id)&&0!=t.id:this.data[this.name].indexOf(t.id)>-1&&-1===this.itemsToExclude.indexOf(t.id)&&0!=t.id);this._renderItemList(i).forEach(t=>this.scrollableContentEl.appendChild(t));let n=Array.from(this.scrollableContentEl.querySelectorAll("input"));if(this._updateScrollbarVisibility(),this.scrollableContentEl.querySelector('input[type="checkbox"]')?this.type="checkbox":this.scrollableContentEl.querySelector('input[type="radio"]')&&(this.type="radio"),"checkbox"==this.type)this.data[this.name].forEach(t=>{let e=this.useObjects?t[this.primaryKeyword].toString():t.toString(),i=n.find(t=>t.value==e);i&&(i.checked=!0,this.useChips&&this._renderChips(),this.onSelect(i))});else if("radio"==this.type){const t=this.data[this.name][0];let e=n.find(e=>e.value==t);if(e){if(e.checked=!0,e.classList.add("checked"),this.useChips)this._renderChips();else if(this.dynamicTitle&&"function"!=typeof this.dynamicTitle){const t=e.parentElement.querySelector("[data-label]");t&&(this.selectTitleEl.textContent=t.textContent)}this.onSelect(e)}}"function"==typeof this.dynamicTitle&&(this.selectTitleEl.textContent=this.dynamicTitle.call(this))})}else{let t=Array.from(this.scrollableContentEl.querySelectorAll("input")),e=t.map(t=>t.value.toString());if(this.data[this.name]=this.data[this.name].filter(t=>e.indexOf(t.toString())>-1),0==this.data[this.name].length&&this.selectIconContainerEl&&(this.selectIconContainerEl.innerHTML=this.selectIconDefault),this.scrollableContentEl.querySelector('input[type="checkbox"]')?this.type="checkbox":this.scrollableContentEl.querySelector('input[type="radio"]')&&(this.type="radio"),"checkbox"==this.type)this.data[this.name].forEach(e=>{let i=t.find(t=>t.value==e);i&&(i.checked=!0,this.useChips&&this._renderChips(),this.onSelect(i))});else if("radio"==this.type){let e=t.find(t=>t.value==this.data[this.name][0]);if(e){if(e.checked=!0,e.classList.add("checked"),this.useChips)this._renderChips();else if(this.dynamicTitle&&"function"!=typeof this.dynamicTitle){const t=e.parentElement.querySelector("[data-label]");t&&(this.selectTitleEl.textContent=t.textContent)}this.onSelect(e)}}"function"==typeof this.dynamicTitle&&(this.selectTitleEl.textContent=this.dynamicTitle.call(this))}}_renderChips(){this.selectTitleEl.innerHTML="",0!==this.data[this.name].length?(this.data[this.name].forEach(t=>{const e=this.useChips?t[this.primaryKeyword]:t,i=this.selectEl?this.selectEl.querySelector(`input[value="${e}"]`):null,n=i?i.parentElement.querySelector("[data-label]"):null,s=n?n.textContent:t.label||t.name||t.value||e,o=document.createElement("span");o.className="chip",o.dataset.value=e,o.innerHTML=`<span class="chip-title">${p(s)}</span>`,o.addEventListener("click",i=>{i.stopPropagation();const n=this.selectEl.querySelector(`input[value="${e}"]`);n?(n.checked=!1,n.dispatchEvent(new Event("change",{bubbles:!0}))):(this.useChips?this.data[this.name]=this.data[this.name].filter(t=>t[this.primaryKeyword].toString()!==e.toString()):this.data[this.name]=this.data[this.name].filter(t=>t.toString()!==e.toString()),this.searchApi.length&&(this.items=this.items.filter(t=>t[this.primaryKeyword].toString()!==e.toString())),this._renderChips(),"function"==typeof this.opts.onSelect&&this.opts.onSelect.call(this,t,this,!1))}),this.selectTitleEl.appendChild(o)}),this.contentOpen&&setTimeout(()=>{this._updateScrollbarVisibility()},0)):this.dynamicTitle&&this.dynamicTitleDefault?this.selectTitleEl.textContent=this.dynamicTitleDefault:this.selectTitleEl.textContent=this.cachedTitle}search(){let t=this.opts.faPro?"fal":"fas";if(this.searchString.length)if(this.isSearchApiEnabled()){if(this.searchString===this.lastSearchQuery)return;this.lastSearchQuery=this.searchString,this._showSpinner(),this._searchAbortController&&this._searchAbortController.abort(),clearTimeout(this._searchDebounceTimer),this._searchDebounceTimer=setTimeout(()=>{this._searchAbortController=new AbortController,fetch(this.searchApi+this.searchString,{signal:this._searchAbortController.signal}).then(t=>t.json()).then(e=>{this._searchAbortController=null,this.scrollableContentEl.querySelectorAll("input:not(:checked)").forEach(t=>{const e=t.closest(".select-item");e&&!e.classList.contains("static-item")&&e.remove()});const i=e.filter(t=>this.useObjects?-1===this.data[this.name].findIndex(e=>e[this.primaryKeyword]==t.id)&&-1===this.itemsToExclude.indexOf(t.id)&&0!=t.id:-1===this.data[this.name].indexOf(t.id)&&-1===this.itemsToExclude.indexOf(t.id)&&0!=t.id);this._renderItemList(i).forEach(t=>this.scrollableContentEl.appendChild(t)),this.searchIconContainerEl.innerHTML=`<i class="${t} fa-times icon"></i>`,this.searchIconContainerEl.setAttribute("data-clear-search","true"),this._updateScrollbarVisibility(),this.contentOpen&&this._recalculateContentHeight()}).catch(t=>{"AbortError"!==t.name&&this._hideSpinner()})},300)}else{const e=this.searchString.toLowerCase();let i=this.searchData.filter(t=>t.val.toLowerCase().indexOf(e)>-1);this.selectItems.forEach(t=>{t.classList.remove("d-none"),t.classList.remove("visible")}),i.forEach(t=>{this.selectItems[t.id]&&this.selectItems[t.id].classList.add("visible")}),this.selectItems.filter(t=>!t.classList.contains("visible")).forEach(t=>t.classList.add("d-none")),this.searchIconContainerEl.innerHTML=`<i class="${t} fa-times icon"></i>`,this.searchIconContainerEl.setAttribute("data-clear-search","true")}else this.lastSearchQuery="",this.isSearchApiEnabled()?(this.scrollableContentEl.querySelectorAll("input:not(:checked)").forEach(t=>{const e=t.closest(".select-item");e&&!e.classList.contains("static-item")&&e.remove()}),this._hideSpinner(),this.searchIconContainerEl.setAttribute("data-clear-search",""),this._performInitialSearch()):(this.selectItems.forEach(t=>{t.classList.remove("d-none"),t.classList.remove("visible")}),this.searchIconContainerEl.innerHTML=`<i class="${t} fa-search icon"></i>`,this.searchIconContainerEl.setAttribute("data-clear-search",""));this.scroll&&this.scroll.update(),this.onUpdate()}_recalculateContentHeight(){const t=this.el.querySelector(".select-content"),e=w(this.selectHeaderEl),i=this.scrollContentHeight,n=window.innerHeight,s=window.scrollY;let o=i,r=0,l=0;if(this.searchContainerEl&&(r=w(this.searchContainerEl)||0),this.footerContainerEl&&(l=w(this.footerContainerEl)||0),this.scrollableContentEl){const t=this.scrollableContentEl.scrollHeight,e=this.scrollableContentEl.clientHeight;o=Math.min(Math.max(t,e)+r+l,i)}let a=this.el.classList.contains("select-dropup"),c=0,h=o;const d=parseInt(getComputedStyle(t).marginBottom||0,10),u=parseInt(getComputedStyle(t).marginTop||0,10);if("fixed"===this.position){const t=this.containerEl.getBoundingClientRect().top,i=n-t-e-50,s=t-50;a?(h=Math.min(o,s),c=t-h-d):(h=Math.min(o,i),c=t+e+u)}else{const t=this.containerEl.getBoundingClientRect().top+s,i=n-(t-s)-e-50,r=t-s-50;a?(h=Math.min(o,r),c=-h-d):(h=Math.min(o,i),c=e+u)}const p=h-r-l;t.style.height=h+"px",this.scrollableContentEl&&(this.scrollableContentEl.style.maxHeight=p+"px"),t.style.top=c+"px",this.scroll&&setTimeout(()=>{this._updateScrollbarVisibility()},0)}show(){if(this.el.classList.contains("show"))return;let t=0,e=0;if("fixed"===this.position){const i=this.containerEl.getBoundingClientRect();t=i.top,e=i.left}const i=document.querySelectorAll(".select.show");let n=1,s=this.opts.faPro?"fal":"fas";i.length&&(n=parseInt(getComputedStyle(i[0]).zIndex,10)+2),this.el.classList.add("show"),i.length||(n=parseInt(getComputedStyle(this.el).zIndex,10)+1);const o=this.el.querySelector(".select-content"),r=w(this.selectHeaderEl),a=this.scrollContentHeight,c=window.innerHeight,h=window.scrollY;let d=a,u=0,p=0;if(this.searchContainerEl&&(u=w(this.searchContainerEl)||0),this.footerContainerEl&&(p=w(this.footerContainerEl)||0),this.scrollableContentEl){const t=this.scrollableContentEl.scrollHeight,e=this.scrollableContentEl.clientHeight;d=Math.min(Math.max(t,e)+u+p,a)}let f=!1,m=0,g=d;const y=parseInt(getComputedStyle(o).marginBottom||0,10),v=parseInt(getComputedStyle(o).marginTop||0,10);if("fixed"===this.position){const e=c-t-r-50,i=t-50;f=e<d&&i>e,f?(g=Math.min(d,i),m=t-g-y):(g=Math.min(d,e),m=t+r+v)}else{const t=this.containerEl.getBoundingClientRect().top+h,e=c-(t-h)-r-50,i=t-h-50;f=e<d&&i>e,f?(g=Math.min(d,i),m=-g-y):(g=Math.min(d,e),m=r+v)}const b=g-u-p;o.style.height=g+"px",this.scrollableContentEl&&(this.scrollableContentEl.style.maxHeight=b+"px"),this.el.classList.toggle("select-dropup",f),this.el.classList.toggle("select-dropdown",!f);const E=o.offsetWidth;Object.assign(o.style,{zIndex:n,position:"fixed"===this.position?"fixed":"absolute"});const C=this.containerEl.offsetWidth;"fixed"===this.position?Object.assign(o.style,{top:m+"px",left:e+"px",width:this.contentWidth?`var(--cool-select-content-width, ${this.contentWidth}px)`:C+"px"}):Object.assign(o.style,{top:m+"px",width:this.contentWidth?`var(--cool-select-content-width, ${this.contentWidth}px)`:E>C?"var(--cool-select-content-width, auto)":C+"px"}),o.style.minWidth=C+"px",this.scrollableContentEl&&this.scrollableContentEl.offsetHeight<this.scrollableContentEl.scrollHeight&&(this.scrollableContentEl.scrollTop=1,this.scrollableContentEl.scrollTop=0),f?this.selectIconContainerEl&&(this.selectIconContainerEl.innerHTML=`<i class="${s} fa-angle-down icon"></i>`):this.selectIconContainerEl&&(this.selectIconContainerEl.innerHTML=`<i class="${s} fa-angle-up icon"></i>`),setTimeout(()=>{this.el.scrollIntoView({behavior:"smooth",block:"nearest",inline:"nearest"}),this.scroll&&this._updateScrollbarVisibility()},300),this.contentOpen=!0,"fixed"===this.position&&this._scrollCallback&&l.add(`select-${this.name}`,this._scrollCallback),this.onShow()}close(){if(!this.preventClose){let t=this.opts.faPro?"fal":"fas";this.el.classList.remove("show"),this.el.classList.remove("select-dropup","select-dropdown"),setTimeout(()=>{this.el.removeAttribute("style")},300),this.data[this.name].length>0&&this.showValidStateIcon?this.selectIconContainerEl&&(this.selectIconContainerEl.innerHTML=`<i class="${t} fa-check text-success icon"></i>`):this.selectIconContainerEl&&(this.selectIconContainerEl.innerHTML=this.selectIconDefault),this.contentOpen=!1,"fixed"===this.position&&this._scrollCallback&&l.remove(`select-${this.name}`),this.onClose()}}onSelect(t){const e=t.closest(".select-item"),i=e&&E.get(e)||{},n=t.value;if(this.searchApi.length&&Object.keys(i).length>0)if(t.checked)if(this.items.push(i),this.useChips){if(!this.data[this.name].find(t=>t[this.primaryKeyword].toString()===n.toString())){const e=t.parentElement.querySelector("[data-label]");this.data[this.name].push({[this.primaryKeyword]:n,label:e?e.textContent:n})}}else-1===this.data[this.name].indexOf(n)&&this.data[this.name].push(n);else this.items=this.items.filter(t=>t[this.primaryKeyword].toString()!==n.toString()),this.useChips?this.data[this.name]=this.data[this.name].filter(t=>t[this.primaryKeyword].toString()!==n.toString()):this.data[this.name]=this.data[this.name].filter(t=>t.toString()!==n.toString());this.useChips&&this._renderChips(),"function"==typeof this.opts.onSelect&&this.opts.onSelect.call(t,i,this,t.checked)}getItem(t,e){let i=this.items.filter(i=>i[t]==e)[0];return i||null}getSelectedItems(t){let e=[],i=[],n=this.data[this.name];return Array.isArray(n)?e=n:e.push(n),e=this.useChips?e.map(t=>t[this.primaryKeyword].toString()):e.map(String),this.items.length>0?(i=this.items.filter(t=>e.indexOf(t.id.toString())>-1),t&&(i=i.map(e=>e[t]).filter(t=>null!=t))):i=e,i}getSelectedItem(t){return this.getSelectedItems(t)[0]}_renderItemList(t){if(!t||!t.length)return[];const e=this.data[this.name].map(t=>this.useChips?t[this.primaryKeyword].toString():t.toString()),i=[];for(let n=0;n<t.length;++n){const s=t[n];let o="";"function"==typeof this.labelTemplate?o=this.labelTemplate(s):s.name?o=s.name:s.label?o=s.label:s.value&&(o=s.value);const r=this.useChips?s[this.primaryKeyword]:s.id,l=e.indexOf(r.toString())>-1,a=document.createElement("div");a.innerHTML=this._getItemTemplate(s,n,o,l).trim();const c=a.firstElementChild;E.set(c,s),i.push(c)}return i}_getItemTemplate(t,e,i,n){return`\n <div class="select-item">\n <div class="select-item-${this.type}">\n <div class="form-check">\n <input type="${this.type}"\n id="select-${this.name}-${t.id}"\n value="${t.id}"\n tabindex="-1"\n ${n?"checked":""}>\n <label for="select-${this.name}-${t.id}">\n <span class="form-check-icon">\n <svg viewBox="0 0 18 18">\n <polyline points="1.5 6 4.5 9 10.5 1"></polyline>\n </svg>\n </span>\n <span class="form-check-label"${"function"!=typeof this.labelTemplate?" data-label":""}>\n ${"function"!=typeof this.labelTemplate?p(i):i}\n </span>\n </label>\n </div>\n </div>\n </div>`}_renderSearch(){if(this.showSearch){const t=this.opts.faPro?"fal":"fas";return`\n\n <div class="select-search">\n\n <div class="select-search-input">\n\n <input type="text" name="select-search" value="" placeholder="${this.searchPlaceholder}" tabindex="-1">\n\n </div>\n\n <div class="select-search-icon">\n\n <i class="${t} fa-search icon"></i>\n\n </div>\n\n </div>\n\n `}return""}_renderFooter(){return this.showFooter?`\n\n <div class="select-footer">\n\n <button class="btn btn-block btn-light btn-sm" type="button" tabindex="-1" data-select-close >\n ${this.btnCloseText}\n </button>\n\n </div>\n\n `:""}isSearchApiEnabled(){return this.searchApi&&this.searchApi.length}_showSpinner(){let t=this.opts.faPro?"fal":"fas";this.searchIconContainerEl.innerHTML=`<i class="${t} fa-spinner-third fa-spin icon"></i>`}_hideSpinner(){let t=this.opts.faPro?"fal":"fas";this.searchIconContainerEl.innerHTML=`<i class="${t} fa-search icon"></i>`}selectItem(t){const e=this.selectEl.querySelector(`input[value="${t}"]`);if(e){if("radio"===this.type)if(this.selectEl.querySelectorAll('input[type="radio"]').forEach(t=>{t.checked=!1,t.classList.remove("checked")}),this.useChips){const i=e.parentElement.querySelector("[data-label]");this.data[this.name]=[{[this.primaryKeyword]:t,label:i?i.textContent:t}]}else this.data[this.name]=[t];else if(this.useChips){if(!this.data[this.name].find(e=>e[this.primaryKeyword].toString()===t.toString())){const i=e.parentElement.querySelector("[data-label]");this.data[this.name].push({[this.primaryKeyword]:t,label:i?i.textContent:t})}}else-1===this.data[this.name].indexOf(t)&&this.data[this.name].push(t);return e.checked=!0,e.classList.add("checked"),e.dispatchEvent(new Event("change",{bubbles:!0})),!0}return!1}clear(){const t=Array.from(this.selectEl.querySelectorAll("input:checked"));this.selectEl.querySelectorAll("input").forEach(t=>{t.checked=!1,t.classList.remove("checked")}),this.data[this.name]=[],this.useChips?this._renderChips():this.dynamicTitle&&"function"!=typeof this.dynamicTitle&&(this.selectTitleEl.textContent=this.dynamicTitleDefault||this.cachedTitle),this.showValidStateIcon&&this.selectIconContainerEl&&(this.selectIconContainerEl.innerHTML=this.selectIconDefault),t.forEach(t=>{const e=t.closest(".select-item"),i=e&&E.get(e)||{};"function"==typeof this.opts.onSelect&&this.opts.onSelect.call(t,i,this,!1)})}}C._jQueryInit();let x=null;try{x=require("perfect-scrollbar"),x&&x.default&&(x=x.default)}catch(t){}"undefined"!=typeof window&&x&&!window.PerfectScrollbar&&(window.PerfectScrollbar=x);class S extends o{static NAME="coolDropdown";static DEFAULTS={animation:!0,animationIn:"zoomIn",animationOut:"zoomOut",animationSpeed:"fastest",offset:null,minWidth:null,closeOnItemClick:!0,positionObserver:!0,content:!1,scroll:!0,scrollContentHeight:100,onInit:null,onUpdate:null,onDestroy:null,onShow:null,onClose:null,onItemClick:null,position:"absolute",placement:"bottom",align:"start"};static _jQueryInterface(t){return this.each(function(){const e=$(this);let i=e.data(`plugin_${S.NAME}`);i||(i=new S(this,"object"==typeof t&&t),e.data(`plugin_${S.NAME}`,i)),"string"==typeof t&&i[t]()})}static _jQueryInit(){if("undefined"==typeof $||!$.fn)return;const t=$.fn[S.NAME];$.fn[S.NAME]=S._jQueryInterface,$.fn[S.NAME].Constructor=S,$.fn[S.NAME].defaults=S.DEFAULTS||{},$.fn[S.NAME].noConflict=()=>($.fn[S.NAME]=t,S._jQueryInterface)}constructor(t,e){super(),this.opts=f({},S.DEFAULTS,window.Cool?.settings?.dropdown||{},e||{}),this.el=t,this._resizeCallback=null,this._scrollCallback=null,this.init()}setupResizeHandling(){if(window.ResizeObserver)this._resizeCallback=()=>{this.contentOpen&&(this.rafId&&cancelAnimationFrame(this.rafId),this.rafId=requestAnimationFrame(()=>{this.setPosition(),this.onUpdate()}))},r.observe(this.el,this._resizeCallback),r.observe(document.body,this._resizeCallback),this.containerEl&&r.observe(this.containerEl,this._resizeCallback);else{let t;this.resizeHandler=()=>{if(!this.contentOpen)return;clearTimeout(t);const e=performance.now();!this.lastResizeTime||e-this.lastResizeTime>100?(this.setPosition(),this.onUpdate(),this.lastResizeTime=e):t=setTimeout(()=>{this.setPosition(),this.onUpdate()},16)},window.addEventListener("resize",this.resizeHandler,{passive:!0})}}setupScrollHandling(){if("fixed"===this.position){this._scrollCallback=()=>{this.contentOpen&&this.dropdownEl.classList.contains("show")&&(this.rafId&&cancelAnimationFrame(this.rafId),this.rafId=requestAnimationFrame(()=>{this.setPosition(),this.onUpdate()}))},l.add(`dropdown-${this.id}`,this._scrollCallback);let t=this.el.parentElement;for(this.scrollableParents=[];t&&t!==document.body;){const e=getComputedStyle(t).overflowY;if("scroll"===e||"auto"===e){const e=()=>this._scrollCallback();t.addEventListener("scroll",e,{passive:!0}),this.scrollableParents.push({element:t,handler:e})}t=t.parentElement}}}setupVisibilityDetection(){window.IntersectionObserver&&(this.intersectionObserver=new IntersectionObserver(t=>{t.forEach(t=>{!t.isIntersecting&&this.contentOpen&&(this.rafId&&cancelAnimationFrame(this.rafId),this.rafId=requestAnimationFrame(()=>{this.setPosition()}))})},{threshold:.1,rootMargin:"50px"}),this.intersectionObserver.observe(this.el))}init(){this.buildCache().then(()=>{this.buildScroll(),this.setupVisibilityDetection(),this.bindEvents(),this.onInit()}).catch(()=>{})}destroy(){this.unbindEvents(),this.scroll&&"function"==typeof this.scroll.destroy&&(this.scroll.destroy(),this.scroll=null),this.dropdownEl&&this.dropdownEl.remove(),this.constructor.removeInstance(this.el),this.onDestroy()}update(){const t=this.scrollableContentEl&&this.scrollableContentEl.classList.contains("ps-dark");this.scroll&&"function"==typeof this.scroll.destroy&&(this.scroll.destroy(),this.scroll=null),this.unbindEvents(),this.buildCache().then(()=>{t&&this.scrollableContentEl&&this.scrollableContentEl.classList.add("ps-dark"),this.buildScroll(),this.setupVisibilityDetection(),this.bindEvents(),this.onUpdate()}).catch(()=>{})}buildCache(){return new Promise((t,e)=>{this.el.classList.add("dropdown-trigger"),this.containerEl=this.el.closest(".dropdown")||this.el.parentElement,this.id="dropdown-"+h(),this.animation=this.el.dataset.animation||this.opts.animation,this.animationIn=this.el.dataset.animationIn||this.el.dataset.animationin||this.opts.animationIn,this.animationOut=this.el.dataset.animationOut||this.el.dataset.animationout||this.opts.animationOut,this.animationSpeed=this.el.dataset.animationSpeed||this.el.dataset.animationspeed||this.opts.animationSpeed,this.position=this.el.dataset.position||this.opts.position,this.placement=this.el.dataset.placement||this.opts.placement,this.align=this.el.dataset.align||this.opts.align,this.offset=this.el.dataset.offset||this.opts.offset,this.minWidth=this.el.dataset.minWidth||this.el.dataset.minwidth||this.opts.minWidth,this.scroll=this.el.dataset.scroll||this.opts.scroll,this.scrollContentHeight=this.el.dataset.scrollContentHeight||this.opts.scrollContentHeight,this.positionObserver=this.el.hasAttribute("data-position-observer")?JSON.parse(this.el.getAttribute("data-position-observer")):this.opts.positionObserver,this.closeOnItemClick=this.el.dataset.closeOnItemClick||this.el.dataset.closeonitemclick||this.opts.closeOnItemClick,this.preventClose=this.el.dataset.preventClose||this.el.dataset.preventclose||!1,this.content=this.el.dataset.content||this.opts.content,this.contentOpen=!1,this.containerEl.classList.contains("dropup")?this.placement="top":this.containerEl.classList.contains("dropright")?this.placement="right":this.containerEl.classList.contains("dropbottom")?this.placement="bottom":this.containerEl.classList.contains("dropleft")&&(this.placement="left");const i=this.containerEl.querySelector(".dropdown-menu");if("fixed"===this.position&&i){this.dropdownEl=i.cloneNode(!0),this.dropdownEl.id=this.id,this.dropdownEl.classList.remove("show"),this.align=i.classList.contains("dropdown-menu-right")?"end":this.align,document.body.appendChild(this.dropdownEl),i.remove();return this.dropdownEl.querySelectorAll(".dropdown").forEach(t=>{const e=t.querySelector('[data-toggle="dropdown"]'),i=t.querySelector(".dropdown-menu");e&&i&&!S.getInstance(e)&&new S(e,{position:"absolute",closeOnItemClick:!1,positionObserver:!0,onShow:()=>{const t=parseInt(getComputedStyle(this.dropdownEl).zIndex||9999,10);i.style.zIndex=t+1}})}),this.dropdownItems=Array.from(this.dropdownEl.querySelectorAll("a, button, .dropdown-item")).filter(t=>t.closest(".dropdown-menu")===this.dropdownEl),this.scrollableContentEl=this.dropdownEl.querySelector(".dropdown-scrollable-content"),this.minWidth&&(this.dropdownEl.style.minWidth=this.minWidth+"px"),t()}if("function"==typeof this.content){let e="end"===this.opts.align?" dropdown-menu-right":"";const i=document.createElement("div");return i.innerHTML=`<div class="dropdown-menu${e}" id="${this.id}">${this.content()}</div>`,this.dropdownEl=i.firstElementChild,"fixed"===this.position?document.body.appendChild(this.dropdownEl):this.el.insertAdjacentElement("afterend",this.dropdownEl),this.scrollableContentEl=this.dropdownEl.querySelector(".dropdown-scrollable-content")||null,this.align=this.dropdownEl.classList.contains("dropdown-menu-right")?"end":this.align,this.dropdownItems=Array.from(this.dropdownEl.querySelectorAll("a, button, .dropdown-item")).filter(t=>t.closest(".dropdown-menu")===this.dropdownEl),this.minWidth&&(this.dropdownEl.style.minWidth=this.minWidth+"px"),t()}return this.dropdownEl=this.containerEl.querySelector(".dropdown-menu")||null,this.dropdownEl?(this.align=this.dropdownEl.classList.contains("dropdown-menu-right")?"end":this.align,this.scrollableContentEl=this.dropdownEl.querySelector(".dropdown-scrollable-content")||null,this.dropdownItems=Array.from(this.dropdownEl.querySelectorAll("a, button, .dropdown-item")).filter(t=>t.closest(".dropdown-menu")===this.dropdownEl),this.minWidth&&(this.dropdownEl.style.minWidth=this.minWidth+"px"),t()):e()})}buildScroll(){this.opts.scroll&&this.scrollableContentEl&&(this.scrollableContentEl.style.maxHeight=this.scrollContentHeight+"px",c()?this.scrollableContentEl.style.overflowY="auto":x?this.scroll=new x(this.scrollableContentEl,{wheelSpeed:1,wheelPropagation:!1,minScrollbarLength:20,suppressScrollX:!0,scrollYMarginOffset:2}):this.scrollableContentEl.style.overflowY="auto")}bindEvents(){this._triggerClickHandler=()=>{this.contentOpen?this.close():this.show()},this.el.addEventListener("click",this._triggerClickHandler),"fixed"===this.position?(this._dropdownItemHandler=t=>{const e=t.target.closest("a, button, .dropdown-item");e&&e.closest(".dropdown-menu")===this.dropdownEl&&(e.classList.contains("dropdown-trigger")||e.dataset.toggle||(this.closeOnItemClick&&this.close(),this.onItemClick(e,t)))},this.dropdownEl.addEventListener("click",this._dropdownItemHandler)):(this._itemHandlers=[],this.dropdownItems.forEach(t=>{const e=e=>{t.classList.contains("dropdown-trigger")||t.dataset.toggle||(this.closeOnItemClick&&this.close(),this.onItemClick(t,e))};t.addEventListener("click",e),this._itemHandlers.push({el:t,handler:e})})),this._documentClickHandler=t=>{if(!this.contentOpen)return;const e=this.el===t.target||this.el.contains(t.target)||this.dropdownEl===t.target||this.dropdownEl.contains(t.target),i=this.dropdownEl.contains(t.target)&&t.target.closest('[data-toggle="dropdown"]');e||i||this.close()},document.addEventListener("click",this._documentClickHandler,{passive:!0}),document.addEventListener("touchstart",this._documentClickHandler,{passive:!0}),this.setupResizeHandling(),this.setupScrollHandling()}unbindEvents(){this._triggerClickHandler&&(this.el.removeEventListener("click",this._triggerClickHandler),this._triggerClickHandler=null),this._dropdownItemHandler&&this.dropdownEl&&(this.dropdownEl.removeEventListener("click",this._dropdownItemHandler),this._dropdownItemHandler=null),this._itemHandlers&&(this._itemHandlers.forEach(({el:t,handler:e})=>{t.removeEventListener("click",e)}),this._itemHandlers=null),this._resizeCallback&&(r.unobserve(this.el),r.unobserve(document.body),this.containerEl&&r.unobserve(this.containerEl),this._resizeCallback=null),this.rafId&&(cancelAnimationFrame(this.rafId),this.rafId=null),this._scrollCallback&&(l.remove(`dropdown-${this.id}`),this._scrollCallback=null),this.scrollableParents&&(this.scrollableParents.forEach(({element:t,handler:e})=>{t.removeEventListener("scroll",e)}),this.scrollableParents=[]),this.resizeHandler&&(window.removeEventListener("resize",this.resizeHandler),this.resizeHandler=null),this.intersectionObserver&&(this.intersectionObserver.disconnect(),this.intersectionObserver=null),this._documentClickHandler&&(document.removeEventListener("click",this._documentClickHandler),document.removeEventListener("touchstart",this._documentClickHandler),this._documentClickHandler=null)}setPosition(t){"undefined"!=typeof t&&null!==t||(t=this.placement);const e=this.el.getBoundingClientRect(),i=window.innerWidth,n=window.innerHeight,s=!this.dropdownEl.classList.contains("show")&&0===this.dropdownEl.offsetWidth;s&&(this.dropdownEl.style.display="block",this.dropdownEl.style.visibility="hidden");let o,r,l=this.dropdownEl.offsetWidth,a=this.dropdownEl.offsetHeight,c=this.el.offsetWidth,h=this.el.offsetHeight;if("fixed"===this.position)o=e.left+window.scrollX,r=e.top+window.scrollY;else{const t=this.dropdownEl.offsetParent||document.body,i=t.getBoundingClientRect();o=e.left-i.left+t.scrollLeft,r=e.top-i.top+t.scrollTop}let d=0,u=0,p=0,f=0;if(this.offset){const t=this.offset.split(",");p=parseInt(t[0],10)||0,f=parseInt(t[1],10)||0}const m=parseInt(getComputedStyle(document.documentElement).getPropertyValue("--cool-dropdown-spacer"))||2,g=(t,e=this.align)=>{let i=0,n=0;switch(t){case"top":i="end"===e?o+c-l:o,n=r-a-m;break;case"bottom":i="end"===e?o+c-l:o,n=r+h+m;break;case"left":i=o-l-m,n=r;break;case"right":i=o+c+m,n=r}return{x:i+p,y:n+f}};let y=t,v=this.align,b=g(t);if(this.positionObserver){const s=5,c=t=>{const c={top:!1,bottom:!1,left:!1,right:!1};if("fixed"===this.position)c.top=t.y<s,c.bottom=t.y+a>n-s,c.left=t.x<s,c.right=t.x+l>i-s;else{const h=e.left+(t.x-o),d=e.top+(t.y-r),u=h+l,p=d+a;c.top=d<s,c.bottom=p>n-s,c.left=h<s,c.right=u>i-s}return c},h=c(b);"bottom"===t&&h.bottom&&!h.top?(y="top",b=g("top",v)):"top"===t&&h.top&&!h.bottom?(y="bottom",b=g("bottom",v)):"right"===t&&h.right&&!h.left?(y="left",b=g("left",v)):"left"===t&&h.left&&!h.right&&(y="right",b=g("right",v));const d=c(b);if("top"!==y&&"bottom"!==y||("end"===v&&d.left&&!d.right?(v="start",b=g(y,v)):"start"===v&&d.right&&!d.left&&(v="end",b=g(y,v))),this.containerEl.classList.remove("dropup","dropbottom","dropleft","dropright"),"top"===y?this.containerEl.classList.add("dropup"):"left"===y?this.containerEl.classList.add("dropleft"):"right"===y?this.containerEl.classList.add("dropright"):this.containerEl.classList.add("dropbottom"),this.dropdownEl.setAttribute("x-placement",y+"-"+v),"fixed"===this.position)b.x=Math.max(s,Math.min(b.x,i-l-s)),b.y=Math.max(s,Math.min(b.y,n-a-s));else{const t=e.left+(b.x-o),c=e.top+(b.y-r);t<s?b.x+=s-t:t+l>i-s&&(b.x-=t+l-i+s),c<s?b.y+=s-c:c+a>n-s&&(b.y-=c+a-n+s)}}if(d=b.x,u=b.y,s&&(this.dropdownEl.style.display="",this.dropdownEl.style.visibility=""),"fixed"===this.position)Object.assign(this.dropdownEl.style,{position:"fixed",top:Math.round(u)+"px",left:Math.round(d)+"px",right:"auto",bottom:"auto",transform:"none",willChange:"auto",zIndex:"9999"});else{const t=this.el.closest(".dropdown, .dropup, .dropleft, .dropright");if(t){const i=t.getBoundingClientRect();let n=e.left-i.left,s=e.top-i.top;switch(y){case"bottom":s+=h+m,"end"===v&&(n=n+c-l);break;case"top":s-=a+m,"end"===v&&(n=n+c-l);break;case"left":n-=l+m;break;case"right":n+=c+m}n+=p,s+=f,Object.assign(this.dropdownEl.style,{position:"absolute",top:Math.round(s)+"px",left:Math.round(n)+"px",right:"auto",bottom:"auto",transform:"none",willChange:"auto"})}}}show(){if(this.dropdownEl&&!this.dropdownEl.classList.contains("show")){if(this.setPosition(),this.animation?(this.dropdownEl.setAttribute("x-placement",this.placement+"-"+this.align),this.dropdownEl.classList.add(this.animationSpeed),d(this.dropdownEl,this.animationIn),this.dropdownEl.classList.add("show"),this.dropdownEl.id=this.id,this.el.setAttribute("data-dropdown",this.id)):(this.dropdownEl.setAttribute("x-placement",this.placement+"-"+this.align),this.dropdownEl.classList.add("show"),this.dropdownEl.id=this.id,this.el.setAttribute("data-dropdown",this.id)),this.opts.scroll&&this.scroll&&this.scrollableContentEl)if(this.scrollableContentEl.offsetHeight,this.animation){const t=getComputedStyle(this.dropdownEl).animationDuration,e=t?1e3*parseFloat(t):300;setTimeout(()=>{this.scroll&&"function"==typeof this.scroll.update&&this.scroll.update()},e)}else requestAnimationFrame(()=>{this.scroll&&"function"==typeof this.scroll.update&&this.scroll.update()});this.contentOpen=!0,this.onShow()}}close(){this.dropdownEl&&!this.preventClose&&(this.animation&&!this.dropdownEl.classList.contains("animation")?d(this.dropdownEl,this.animationOut).then(()=>{this.dropdownEl.classList.remove("show"),this.el.removeAttribute("data-dropdown")}):(this.dropdownEl.classList.remove("show"),this.el.removeAttribute("data-dropdown")),this.contentOpen=!1,this.onClose())}onItemClick(t,e){let i=this.opts.onItemClick;"function"==typeof i&&i.call(t,e,this)}}S._jQueryInit();class T extends o{static NAME="coolTooltip";static DEFAULTS={container:"body",animation:!1,animationIn:"fadeIn",animationOut:"fadeOut",animationSpeed:"fastest",placement:"bottom",content:"",trigger:"auto",onInit:null,onUpdate:null,onDestroy:null,onShow:null,onClose:null};static _jQueryInterface(t){return this.each(function(){const e=$(this);let i=e.data(`plugin_${T.NAME}`);i||(i=new T(this,"object"==typeof t&&t),e.data(`plugin_${T.NAME}`,i)),"string"==typeof t&&i[t]()})}static _jQueryInit(){if("undefined"==typeof $||!$.fn)return;const t=$.fn[T.NAME];$.fn[T.NAME]=T._jQueryInterface,$.fn[T.NAME].Constructor=T,$.fn[T.NAME].defaults=T.DEFAULTS||{},$.fn[T.NAME].noConflict=()=>($.fn[T.NAME]=t,T._jQueryInterface)}constructor(t,e){super(),this.opts=f({},T.DEFAULTS,window.Cool?.settings?.tooltip||{},e||{}),this.el=t,this.init()}init(){this.buildCache(),this.bindEvents(),this.onInit()}destroy(){this.unbindEvents(),this.tooltipEl&&(this.tooltipEl.remove(),this.tooltipEl=null),this.constructor.removeInstance(this.el),this.onDestroy()}update(){this.buildCache(),this.tooltipEl&&this.setPosition(),this.onUpdate()}buildCache(){this.containerEl=this.el.dataset.container?document.querySelector(this.el.dataset.container):document.querySelector(this.opts.container),this.id="tooltip-"+h(),this.animation=void 0!==this.el.dataset.animation?this.el.dataset.animation:this.opts.animation,this.animationIn=this.el.dataset.animationIn||this.el.dataset.animationin||this.opts.animationIn,this.animationOut=this.el.dataset.animationOut||this.el.dataset.animationout||this.opts.animationOut,this.animationSpeed=this.el.dataset.animationSpeed||this.el.dataset.animationspeed||this.opts.animationSpeed,this.placement=this.el.dataset.placement||this.opts.placement,this.placementChanged=!1,this.content=this.el.dataset.content||this.opts.content,this.trigger=this.el.dataset.trigger||this.opts.trigger}bindEvents(){"auto"===this.trigger&&(this._mouseenterHandler=()=>this.show(),this._mouseleaveHandler=()=>this.close(),this._blurHandler=()=>this.close(),this._clickHandler=()=>this.close(),this.el.addEventListener("mouseenter",this._mouseenterHandler),this.el.addEventListener("mouseleave",this._mouseleaveHandler),this.el.addEventListener("blur",this._blurHandler),this.el.addEventListener("click",this._clickHandler)),window.ResizeObserver&&(this._resizeCallback=()=>{this.tooltipEl&&this.tooltipEl.classList.contains("show")&&requestAnimationFrame(()=>{this.setPosition()})},r.observe(this.el,this._resizeCallback))}unbindEvents(){this._mouseenterHandler&&(this.el.removeEventListener("mouseenter",this._mouseenterHandler),this.el.removeEventListener("mouseleave",this._mouseleaveHandler),this.el.removeEventListener("blur",this._blurHandler),this.el.removeEventListener("click",this._clickHandler)),this._resizeCallback&&(r.unobserve(this.el),this._resizeCallback=null)}buildTooltip(){this.tooltipEl=document.createElement("div"),this.tooltipEl.className="tooltip",this.tooltipEl.setAttribute("role","tooltip"),this.tooltipEl.id=this.id,this.tooltipEl.innerHTML=`\n <div class="arrow"></div>\n <div class="tooltip-inner">${this.content}</div>\n `,this.containerEl.appendChild(this.tooltipEl),this.arrowEl=this.tooltipEl.querySelector(".arrow")}setPosition(t){"undefined"!=typeof t&&null!==t||(t=this.placement),this.tooltipEl.classList.add("tooltip-"+t);const e=this.containerEl.clientWidth,i=this.containerEl.clientHeight,n=this.tooltipEl.offsetWidth,s=this.tooltipEl.offsetHeight,o=this.el.getBoundingClientRect(),r=this.el.offsetWidth,l=this.el.offsetHeight,a=o.left+window.scrollX,c=o.top+window.scrollY,h=this.arrowEl.offsetWidth,d=this.arrowEl.offsetHeight;let u,p,f;"top"===t?(p=Math.round(a-(n-r)/2),f=Math.round(c-s),u=Math.round(n/2-h/2),this.arrowEl.style.left=u+"px"):"right"===t?(p=Math.round(a+r),f=Math.round(c-(s-l)/2),u=Math.round(s/2-d/2),this.arrowEl.style.top=u+"px"):"bottom"===t?(p=Math.round(a-(n-r)/2),f=Math.round(c+l),u=Math.round(n/2-h/2),this.arrowEl.style.left=u+"px"):"left"===t&&(p=Math.round(a-n),f=Math.round(c-(s-l)/2),u=Math.round(s/2-d/2),this.arrowEl.style.top=u+"px"),Object.assign(this.tooltipEl.style,{position:"absolute",top:"0px",left:"0px",transform:`translate3d(${p}px, ${f}px, 0px)`,willChange:"transform"});let m=0;const g={left:this.tooltipEl.offsetLeft,top:this.tooltipEl.offsetTop,right:e-(this.tooltipEl.offsetLeft+n),bottom:i-(this.tooltipEl.offsetTop+s)};let y={left:!1,top:!1,right:!1,bottom:!1};if(g.right<0&&(y.right=!0,m++),g.left<0&&(y.left=!0,m++),g.bottom<0&&(y.bottom=!0,m++),g.top<0&&(y.top=!0,m++),m>0&&(!this.placementChanged&&y.left&&g.right>n?(this.placementChanged=!0,this.tooltipEl.classList.remove("tooltip-"+t),this.arrowEl.removeAttribute("style"),this.setPosition("right")):!this.placementChanged&&y.top&&g.top>s?(this.placementChanged=!0,this.tooltipEl.classList.remove("tooltip-"+t),this.arrowEl.removeAttribute("style"),this.setPosition("bottom")):!this.placementChanged&&y.right&&g.left>n?(this.placementChanged=!0,this.tooltipEl.classList.remove("tooltip-"+t),this.arrowEl.removeAttribute("style"),this.setPosition("left")):!this.placementChanged&&y.bottom&&g.top>s?(this.placementChanged=!0,this.tooltipEl.classList.remove("tooltip-"+t),this.arrowEl.removeAttribute("style"),this.setPosition("top")):this.placementChanged||"top"===t&&"bottom"===t||!y.left&&!y.right?this.fixTooltipPosition=!0:g.top>g.bottom?(this.placementChanged=!0,this.tooltipEl.classList.remove("tooltip-"+t),this.arrowEl.removeAttribute("style"),this.setPosition("top")):(this.placementChanged=!0,this.tooltipEl.classList.remove("tooltip-"+t),this.arrowEl.removeAttribute("style"),this.setPosition("bottom")),this.fixTooltipPosition)){if(y.left){let e=Math.abs(g.left);a>=p+e&&["top","bottom"].indexOf(t)<0?p+=e:(p+=e,u-=e)}if(y.top){let t=Math.abs(g.top);f+=t,u-=t}if(y.right){let e=Math.abs(g.right);a<=p-e&&["top","bottom"].indexOf(t)<0||(p-=e,u+=e)}if(y.bottom){let t=Math.abs(g.bottom);f-=t,u+=t}"top"===t||"bottom"===t?this.arrowEl.style.left=u+"px":this.arrowEl.style.top=u+"px",Object.assign(this.tooltipEl.style,{width:n+"px",transform:`translate3d(${p}px, ${f}px, 0px)`}),this.fixTooltipPosition=!1}}show(){this.tooltipEl||(this.buildTooltip(),this.setPosition(),this.animation?(this.tooltipEl.classList.add(this.animationSpeed),d(this.tooltipEl,this.animationIn),this.tooltipEl.classList.add("show"),this.tooltipEl.id=this.id,this.el.setAttribute("data-tooltip",this.id)):(this.tooltipEl.classList.add("show"),this.tooltipEl.id=this.id,this.el.setAttribute("data-tooltip",this.id)),this.onShow())}close(){this.tooltipEl&&(this.animation&&!this.tooltipEl.classList.contains("animation")?d(this.tooltipEl,this.animationOut).then(()=>{this.tooltipEl&&(this.tooltipEl.remove(),this.el.removeAttribute("data-tooltip"),this.tooltipEl=null,this.placementChanged=!1),this.onClose()}):(this.tooltipEl.remove(),this.el.removeAttribute("data-tooltip"),this.tooltipEl=null,this.placementChanged=!1,this.onClose()))}}T._jQueryInit();class k extends o{static NAME="coolCollapse";static DEFAULTS={target:null,onInit:null,onUpdate:null,onDestroy:null,onShow:null,onClose:null};static _jQueryInterface(t){return this.each(function(){const e=$(this);let i=e.data(`plugin_${k.NAME}`);i||(i=new k(this,"object"==typeof t&&t),e.data(`plugin_${k.NAME}`,i)),"string"==typeof t&&i[t]()})}static _jQueryInit(){if("undefined"==typeof $||!$.fn)return;const t=$.fn[k.NAME];$.fn[k.NAME]=k._jQueryInterface,$.fn[k.NAME].Constructor=k,$.fn[k.NAME].defaults=k.DEFAULTS||{},$.fn[k.NAME].noConflict=()=>($.fn[k.NAME]=t,k._jQueryInterface)}constructor(t,e){super(),this.opts=f({},k.DEFAULTS,window.Cool?.settings?.collapse||{},e||{}),this.el=t,this.init()}init(){this.buildCache(),this.bindEvents(),this.onInit()}destroy(){this.unbindEvents(),this.constructor.removeInstance(this.el),this.onDestroy()}update(){this.buildCache(),this.onUpdate()}buildCache(){const t=this.el.dataset.target||this.opts.target;if(this.target=t?document.querySelector(t):this.el.parentElement?.querySelector(".collapse"),this.breakpoint=this.el.dataset.breakpoint,this.expanded="true"===this.el.getAttribute("aria-expanded"),this.target){this.container=this.target.closest(".section-collapse");const t=this.el.dataset.target?`[data-collapse-indicator="${this.el.dataset.target}"]`:null;this.indicator=t?document.querySelector(t):this.el.parentElement?.querySelector("[data-collapse-indicator]")}}bindEvents(){this._clickHandler=t=>{this.breakpoint&&window.matchMedia(`(min-width: ${this.breakpoint}px)`).matches||(t.preventDefault(),this.toggle())},this.el.addEventListener("click",this._clickHandler)}unbindEvents(){this._clickHandler&&this.el.removeEventListener("click",this._clickHandler)}toggle(){this.expanded?this.close():this.show()}show(){this.expanded||(this.target.classList.add("show"),this.container&&this.container.classList.add("show"),this.indicator&&this.indicator.classList.add("show"),this.el.setAttribute("aria-expanded","true"),this.expanded=!0,this.onShow())}close(){this.expanded&&(this.target.classList.remove("show"),this.container&&this.container.classList.remove("show"),this.indicator&&this.indicator.classList.remove("show"),this.el.setAttribute("aria-expanded","false"),this.expanded=!1,this.onClose())}}k._jQueryInit();class _ extends o{static NAME="coolSectionTabs";static DEFAULTS={onInit:null,onUpdate:null,onDestroy:null};static _jQueryInterface(t){return this.each(function(){const e=$(this);let i=e.data(`plugin_${_.NAME}`);i||(i=new _(this,"object"==typeof t&&t),e.data(`plugin_${_.NAME}`,i)),"string"==typeof t&&i[t]()})}static _jQueryInit(){if("undefined"==typeof $||!$.fn)return;const t=$.fn[_.NAME];$.fn[_.NAME]=_._jQueryInterface,$.fn[_.NAME].Constructor=_,$.fn[_.NAME].defaults=_.DEFAULTS||{},$.fn[_.NAME].noConflict=()=>($.fn[_.NAME]=t,_._jQueryInterface)}constructor(t,e){super(),this.opts=f({},_.DEFAULTS,window.Cool?.settings?.sectionTabs||{},e||{}),this.el=t,this._tabsCache=new WeakMap,this._resizeObserver=null,this._isProcessing=!1,this._rafId=null,this.init()}init(){this.buildCache(),this.bindEvents(),this._rafId=requestAnimationFrame(()=>{this.dropdownContainer&&this.dropdownContainer.classList.add("js-ready"),this.el.classList.add("js-initialized"),this.checkForChanges(),this.onInit()})}destroy(){this.unbindEvents(),this._rafId&&cancelAnimationFrame(this._rafId),this._resizeObserver&&(this._resizeObserver.disconnect(),this._resizeObserver=null),this.constructor.removeInstance(this.el),this.onDestroy()}update(){this.buildCache(),this.onUpdate()}buildCache(){const t=this.el.closest(".section-tabs");this.dropdownContainer=t?t.querySelector(".dropdown-container"):this.el.querySelector(".dropdown-container"),this.dropdownList=t?t.querySelector(".dropdown-list"):this.el.querySelector(".dropdown-list")}bindEvents(){const t=this.el.closest(".section-tabs"),e=(t?t.closest(".section-header"):null)||t||this.el;window.ResizeObserver?(this._resizeObserver=new ResizeObserver(t=>{this._isProcessing||(this._isProcessing=!0,this._rafId&&cancelAnimationFrame(this._rafId),this._rafId=requestAnimationFrame(()=>{this.checkForChanges(),this._isProcessing=!1}))}),this._resizeObserver.observe(e)):(this._resizeHandler=a(()=>{this.checkForChanges()},50),window.addEventListener("resize",this._resizeHandler,{passive:!0}))}unbindEvents(){this._resizeObserver&&this._resizeObserver.disconnect(),this._resizeHandler&&window.removeEventListener("resize",this._resizeHandler)}moveToList(t){const e=t.getAttribute("data-uuid"),i=this.el.querySelector(`:scope > .tab-item[data-related-dropdown-item="${e}"]`);i&&(i.removeAttribute("data-related-dropdown-item"),t.remove())}moveToDropdown(t){if(t.hasAttribute("data-related-dropdown-item"))return;if(!this.dropdownList)return;const e=crypto.randomUUID(),i=t.cloneNode(!0),n=i.querySelector(".tab-item-action");n&&n.classList.add("dropdown-item"),i.setAttribute("data-uuid",e),this.dropdownList.appendChild(i),t.setAttribute("data-related-dropdown-item",e)}getTabDimensions(t){if(this._tabsCache.has(t)){return this._tabsCache.get(t)}const e=t.classList.contains("invisible");e&&t.classList.remove("invisible");const i=this.el.closest(".section-tabs")||this.el,n=i.style.overflow;i.style.overflow="visible",i.offsetHeight;const s=t.offsetWidth,o=s+(parseInt(getComputedStyle(t).marginLeft,10)||0)+(parseInt(getComputedStyle(t).marginRight,10)||0);i.style.overflow=n,e&&t.classList.add("invisible");const r={width:s,totalWidth:o};return this._tabsCache.set(t,r),r}availableSpace(){const t=this.el.closest(".section-tabs"),e=t?t.closest(".section-header"):null;let i,n,s;if(e){const o=getComputedStyle(e);if("column"===o.flexDirection){const e=t||this.el,o=getComputedStyle(e);i=e.offsetWidth,n=parseInt(o.paddingLeft,10)||0,s=parseInt(o.paddingRight,10)||0}else{i=e.offsetWidth,n=parseInt(o.paddingLeft,10)||0,s=parseInt(o.paddingRight,10)||0;const t=e.querySelector(".section-search");if(t){i-=t.offsetWidth;i-=parseInt(o.gap,10)||0}}}else{const e=t||this.el,o=getComputedStyle(e);i=e.offsetWidth,n=parseInt(o.paddingLeft,10)||0,s=parseInt(o.paddingRight,10)||0}return i-n-s-(this.dropdownContainer?this.dropdownContainer.classList.contains("visible")?this.dropdownContainer.offsetWidth:40:0)}checkForChanges(){if(!this.dropdownList)return;this._tabsCache=new WeakMap;const t=Array.from(this.el.querySelectorAll(":scope > .tab-item")),e=Array.from(this.dropdownList.children),i=this.availableSpace(),n=parseInt(getComputedStyle(this.el).gap,10)||0;if(window.innerWidth<768&&i<200)return t.forEach(t=>{t.classList.remove("invisible"),t.removeAttribute("data-related-dropdown-item")}),void(this.dropdownContainer&&this.dropdownContainer.classList.remove("visible"));let s=0,o=[],r=[];for(let e=0;e<t.length;e++){const l=t[e],{totalWidth:a}=this.getTabDimensions(l),c=s+a+(e>0?n:0);if(c<=i){s=c,o.push(l);const t=l.getAttribute("data-related-dropdown-item");if(t){const e=this.dropdownList.querySelector(`[data-uuid="${t}"]`);e&&this.moveToList(e)}}else r.push(l)}if(r.forEach((t,e)=>{t.hasAttribute("data-related-dropdown-item")||this.moveToDropdown(t)}),e.length>0&&0===r.length){const t=i-s;for(let i=e.length-1;i>=0;i--){const r=e[i],l=r.getAttribute("data-uuid"),a=this.el.querySelector(`[data-related-dropdown-item="${l}"]`);if(a){const{totalWidth:e}=this.getTabDimensions(a),i=e+(s>0?n:0);if(!(i<=t))break;this.moveToList(r),o.push(a),s+=i}}}t.forEach(t=>{o.includes(t)?t.classList.remove("invisible"):t.classList.add("invisible")});const l=this.dropdownList&&this.dropdownList.children.length>0;this.dropdownContainer&&this.dropdownContainer.classList.toggle("visible",l)}}_._jQueryInit();class L extends o{static NAME="coolToast";static DEFAULTS={title:"",content:"",icon:"",action:null,template:"",placement:"top-right",animation:!0,animationIn:null,animationOut:null,animationSpeed:"faster",offsetX:null,offsetY:null,dismiss:3,header:!1,maxVisible:3,onInitialize:null,onDestroy:null,onInit:null,onShow:null,onClose:null,onClick:null};static _jQueryInterface(t){const e=$(this);let i=e.data(`plugin_${L.NAME}`);i||(i=new L(this,"object"==typeof t&&t),e.data(`plugin_${L.NAME}`,i)),"string"==typeof t&&i[t]()}static _jQueryInit(){if("undefined"==typeof $||!$.fn)return;const t=$.fn[L.NAME];$.fn[L.NAME]=L._jQueryInterface,$.fn[L.NAME].Constructor=L,$.fn[L.NAME].defaults=L.DEFAULTS||{},$.fn[L.NAME].noConflict=()=>($.fn[L.NAME]=t,L._jQueryInterface)}constructor(t,e){super(),this.settings=f({},L.DEFAULTS,window.Cool?.settings?.toast||{},e||{}),this.container="string"==typeof t?document.querySelector(t):t,t&&t.jquery&&(this.container=t[0]),this.containers=new Map,this.onInitialize=this.settings.onInitialize,this.onDestroy=this.settings.onDestroy}_getContainer(t,e,i,n){if(this.containers.has(t))return this.containers.get(t);const s=document.createElement("div");s.className="toast-container",s.setAttribute("data-placement",t),null!=e&&s.style.setProperty("--_toast-offset-x","number"==typeof e?`${e}px`:e),null!=i&&s.style.setProperty("--_toast-offset-y","number"==typeof i?`${i}px`:i),null!=n&&s.style.setProperty("--_toast-max-visible",String(n)),this.container.appendChild(s),s.addEventListener("mouseenter",()=>{this._pauseTimers(o)}),s.addEventListener("mouseleave",()=>{this._resumeTimers(o)});const o={el:s,toasts:[],queue:[]};return this.containers.set(t,o),o}_cleanupContainer(t){const e=this.containers.get(t);e&&0===e.toasts.length&&0===e.queue.length&&(e.el.remove(),this.containers.delete(t))}_updateStack(t){const e=t.toasts,i=parseInt(t.el.style.getPropertyValue("--_toast-max-visible")||this.settings.maxVisible,10);for(let t=0;t<e.length;t++){const n=e[t],s=e.length-1-t;n.el.style.setProperty("--_toast-index",String(s));const o=n.el.offsetHeight;n.el.style.setProperty("--_toast-collapse-height",`${o}px`),s>=i?n.el.setAttribute("data-toast-hidden","true"):n.el.removeAttribute("data-toast-hidden")}}_pauseTimers(t){const e=Date.now();for(const i of t.toasts)i._dismissTimer&&(clearTimeout(i._dismissTimer),i._dismissTimer=null,i._dismissRemaining=Math.max(0,(i._dismissEnd||e)-e))}_resumeTimers(t){for(const e of t.toasts)null!=e._dismissRemaining&&e._dismissRemaining>0&&this._startDismissTimer(e,e._dismissRemaining),e._dismissRemaining=null}_startDismissTimer(t,e){t._dismissEnd=Date.now()+e,t._dismissTimer=setTimeout(()=>{t._dismissTimer=null,t._dismissRemaining=null,this.close(t)},e)}init(t){const e=f({},this.settings,t||{}),i=this._buildToast(e),n=this._getContainer(i.placement,e.offsetX,e.offsetY,e.maxVisible);return n.toasts.push(i),i._containerEntry=n,this._showToast(i,n),this.onInit(i),i}destroy(){for(const[,t]of this.containers){const e=[...t.toasts];for(const i of e)this._removeToast(i,t,!1);t.queue.length=0}for(const[,t]of this.containers)t.el.remove();this.containers.clear(),this.onDestroy()}_buildToast(t){let e=t.animationIn,i=t.animationOut;if(!e||!i){const n=t.placement.startsWith("top-");e||(e=n?"slideInDown":"slideInUp"),i||(i=n?"slideOutUp":"slideOutDown")}const n={uuid:"toast-"+h(),placement:t.placement,animation:t.animation,animationIn:e,animationOut:i,animationSpeed:t.animationSpeed,dismiss:t.dismiss,title:t.title,content:t.content,icon:t.icon,action:t.action,template:t.template,maxBodyHeight:t.maxBodyHeight,onInit:t.onInit,onShow:t.onShow,onClose:t.onClose,onClick:t.onClick,_dismissTimer:null,_dismissEnd:null,_dismissRemaining:null,_containerEntry:null};let s;s="function"==typeof n.template?n.template(n):this._renderTemplate(n);const o=document.createElement("div");return o.innerHTML=s.trim(),n.el=o.firstElementChild,n.innerEl=n.el.querySelector(".toast-inner"),n.closeBtn=n.el.querySelector("[data-toast-close]"),n}_showToast(t,e){e.el.appendChild(t.el),t._closeHandler=e=>{if(e.target.closest("[data-toast-close]"))return e.preventDefault(),e.stopPropagation(),void this.close(t);if("function"==typeof t.onClick&&t.onClick.call(t,e),t.action){const e="object"==typeof t.action?t.action.uri:t.action;e&&(window.location.href=e)}this.close(t)},t.el.addEventListener("click",t._closeHandler),this._updateStack(e),t.el.offsetHeight,t.el.classList.add("show"),requestAnimationFrame(()=>{t.animation&&(t.innerEl.classList.add(t.animationSpeed),d(t.innerEl,t.animationIn))}),t.dismiss&&this._startDismissTimer(t,1e3*t.dismiss),this.onShow(t)}close(t){const e=t._containerEntry;e&&(t._dismissTimer&&(clearTimeout(t._dismissTimer),t._dismissTimer=null),t.animation&&t.innerEl&&!t.innerEl.classList.contains("animation")?d(t.innerEl,t.animationOut).then(()=>{this._removeToast(t,e,!0)}):this._removeToast(t,e,!0))}_removeToast(t,e,i){if(t.el&&t.el.parentNode&&t.el.remove(),t._closeHandler&&(t.el.removeEventListener("click",t._closeHandler),t._closeHandler=null),e.toasts=e.toasts.filter(e=>e.uuid!==t.uuid),this._updateStack(e),i&&e.queue.length>0){const t=parseInt(e.el.style.getPropertyValue("--_toast-max-visible")||this.settings.maxVisible,10);if(e.toasts.length<t){const t=e.queue.shift();e.toasts.push(t),t._containerEntry=e,this._showToast(t,e)}}this._cleanupContainer(t.placement),this.onClose(t)}onInitialize(){const t=this.onInitialize;"function"==typeof t&&t.call(this.container)}onDestroy(){const t=this.onDestroy;"function"==typeof t&&t.call(this.container)}onInit(t){const e=t.onInit;"function"==typeof e&&e.call(t)}onShow(t){const e=t.onShow;"function"==typeof e&&e.call(t)}onClose(t){const e=t.onClose;"function"==typeof e&&e.call(t)}_renderTemplate(t){let e="",i="",n="",s="",o="";e="function"==typeof t.content?t.content():t.content,t.icon&&(o="string"==typeof t.icon&&t.icon.trimStart().startsWith("<")?`<div class="toast-icon">${t.icon}</div>`:`<div class="toast-icon"><img src="${t.icon}" alt=""></div>`),o||t.title?i=`\n <div class="toast-header">\n ${o}\n\n <span class="mr-auto">${t.title}</span>\n\n <button type="button" data-toast-close>\n <svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="icon"><path d="M18 6 6 18"/><path d="m6 6 12 12"/></svg>\n </button>\n\n </div>\n `:s='\n <button type="button" data-toast-close>\n <svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="icon"><path d="M18 6 6 18"/><path d="m6 6 12 12"/></svg>\n </button>\n ',n=`\n <div class="toast-body"><div>${e}</div>${s}</div>\n `;const r=t.action?' role="button" style="cursor: pointer;"':"";return`\n <div class="toast${t.action?" toast-actionable":""}" role="alert" id="${t.uuid}"${r}>\n\n <div class="toast-inner">\n\n ${i}\n ${n}\n\n </div>\n\n </div>\n `}}L._jQueryInit();class A extends o{static NAME="coolDialog";static DEFAULTS={title:"",template:"",body:"",footer:!0,header:!0,size:"",classes:"",centered:!0,backdrop:!0,preventScroll:!0,closeBtn:!0,animation:!0,animationIn:"zoomIn",animationOut:"fadeOut",animationSpeed:"fastest",maxBodyHeight:null,overflowVisible:!1,onInitialize:null,onDestroy:null,onInit:null,onShow:null,onClose:null,callbacks:{},actions:{}};static _jQueryInterface(t){const e=$(this);let i=e.data(`plugin_${A.NAME}`);i||(i=new A(this,"object"==typeof t&&t),e.data(`plugin_${A.NAME}`,i)),"string"==typeof t&&i[t]()}static _jQueryInit(){if("undefined"==typeof $||!$.fn)return;const t=$.fn[A.NAME];$.fn[A.NAME]=A._jQueryInterface,$.fn[A.NAME].Constructor=A,$.fn[A.NAME].defaults=A.DEFAULTS||{},$.fn[A.NAME].noConflict=()=>($.fn[A.NAME]=t,A._jQueryInterface)}constructor(t,e){super(),this.settings=f({},A.DEFAULTS,window.Cool?.settings?.dialog||{},e||{}),this.container="string"==typeof t?document.querySelector(t):t,t&&t.jquery&&(this.container=t[0]),this.dialogs=[],this.onInitialize=this.settings.onInitialize,this.onDestroy=this.settings.onDestroy}init(t){let e=f({},this.settings,t||{});t&&t.actions&&(e.actions=t.actions||{}),t&&t.callbacks&&(e.callbacks=t.callbacks||{}),e.callbacks&&"object"==typeof e.callbacks&&Object.keys(e.callbacks).forEach(t=>{Object.prototype.hasOwnProperty.call(e.actions,t)?"object"!=typeof e.actions[t]||Object.prototype.hasOwnProperty.call(e.actions[t],"content")||this.settings.actions&&this.settings.actions[t]&&"object"==typeof this.settings.actions[t]&&Object.prototype.hasOwnProperty.call(this.settings.actions[t],"content")&&(e.actions[t].content=this.settings.actions[t].content):this.settings.actions&&this.settings.actions[t]?e.actions[t]=f({},this.settings.actions[t]):e.actions[t]={}});const i=this.buildDialog(e);return this.show(i),this.bindEvents(i),this.onInit(i),i}destroy(){this.onDestroy()}buildDialog(t){const e=this,i={uuid:"dialog-"+h(),title:t.title,template:t.template,body:t.body,footer:t.footer,header:t.header,size:t.size,classes:t.classes,centered:t.centered,backdrop:t.backdrop,preventScroll:t.preventScroll,closeBtn:t.closeBtn,animation:t.animation,animationIn:t.animationIn,animationOut:t.animationOut,animationSpeed:t.animationSpeed,callbacks:t.callbacks,maxBodyHeight:t.maxBodyHeight,overflowVisible:t.overflowVisible,actions:t.actions,actionInProgress:!1,actionThreshold:300,onInit:t.onInit,onShow:t.onShow,onClose:t.onClose};let n;null==i.maxBodyHeight&&"full"!==i.size&&(i.maxBodyHeight=window.innerHeight-200),n="function"==typeof i.template?i.template():this._renderTemplate(i);const s=document.createElement("div");return s.innerHTML=n.trim(),i.el=s.firstElementChild,"undefined"!=typeof $&&$.fn&&(i.$el=$(i.el)),i.show=function(){e.show(i)},i.close=function(){e.close(i)},this.dialogs.push(i),i}bindEvents(t){const e=this;if(t._actionHandler=i=>{const n=i.target.closest("[data-dialog-action], [data-dialog-confirm], [data-dialog-close], [data-dialog-remove]");if(!n)return;if(i.preventDefault(),t.actionInProgress)return void i.stopPropagation();t.actionInProgress=!0;const s=["confirm","close","remove"];let o=n.dataset.dialogAction;if(!o)for(const t of s)if(n.hasAttribute(`data-dialog-${t}`)){o=t;break}const r=t.actions[o]||{};t.el.dispatchEvent(new CustomEvent(`dialog.${o}`,{bubbles:!0}));const l="function"==typeof r.callback?r.callback:"function"==typeof t.callbacks[o]?t.callbacks[o]:null,a=(e=!1)=>{e?t.actionInProgress=!1:setTimeout(()=>{t.actionInProgress=!1},t.actionThreshold)};if("function"==typeof l)try{const i=l.call(e,function(){s.includes(o)&&e.close(t),a()},t);i&&"function"==typeof i.then?i.then(t=>{!1===t&&a()}).catch(()=>{a()}):a()}catch(t){a()}else s.includes(o)?(e.close(t),a()):a()},t.el.addEventListener("click",t._actionHandler),null!==t.maxBodyHeight&&"full"!==t.size){const e=()=>(t.maxBodyHeight=window.innerHeight-200,t.maxBodyHeight);if(window.ResizeObserver)t.resizeObserver=new ResizeObserver(()=>{t.rafId&&cancelAnimationFrame(t.rafId),t.rafId=requestAnimationFrame(()=>{const i=e(),n=t.el.querySelector(".dialog-body");n&&n.style.setProperty("--cool-dialog-body-height",i+"px")})}),t.resizeObserver.observe(document.body);else{let i,n=window.orientation;t.resizeHandler=()=>{clearTimeout(i);const s=performance.now(),o=window.orientation!==n;if(o&&(n=window.orientation),!t.lastResizeTime||s-t.lastResizeTime>100||o){const i=e(),n=t.el.querySelector(".dialog-body");n&&n.style.setProperty("--cool-dialog-body-height",i+"px"),t.lastResizeTime=s}else i=setTimeout(()=>{const i=e(),n=t.el.querySelector(".dialog-body");n&&n.style.setProperty("--cool-dialog-body-height",i+"px")},16)},window.addEventListener("resize",t.resizeHandler,{passive:!0}),window.addEventListener("orientationchange",t.resizeHandler,{passive:!0})}}}show(t){if(this.container.classList.contains("has-dialogs")||this.container.classList.add("has-dialogs"),t.preventScroll&&!this.container.classList.contains("dialog-prevent-scroll")&&this.container.classList.add("dialog-prevent-scroll"),this.dialogs.length>1){let e=this.dialogs[this.dialogs.length-2].el,i=parseInt(getComputedStyle(e).zIndex,10)||0;i+=1,t.el.style.zIndex=i,Object.assign(e.style,{transition:"opacity 0.3s",opacity:"0",visibility:"visible"})}if(t.backdrop&&!this.container.querySelector(".dialog-backdrop")){const t=document.createElement("div");t.className="dialog-backdrop",this.container.appendChild(t);let e=setInterval(()=>{const t=this.container.querySelector(".dialog-backdrop");0==this.dialogs.length&&t&&(t.remove(),clearInterval(e))},100)}if(this.container.appendChild(t.el),t.animation){const e=t.el.querySelector(".dialog-content");d(e,t.animationIn)}this.onShow(t)}close(t){let e=null;t.resizeObserver&&(t.resizeObserver.disconnect(),t.resizeObserver=null),t.rafId&&(cancelAnimationFrame(t.rafId),t.rafId=null),t.resizeHandler&&(window.removeEventListener("resize",t.resizeHandler),window.removeEventListener("orientationchange",t.resizeHandler),t.resizeHandler=null),t._actionHandler&&(t.el.removeEventListener("click",t._actionHandler),t._actionHandler=null),this.dialogs.length>1&&(e=this.dialogs[this.dialogs.length-2].el);const i=this.container.querySelectorAll('.dialog[data-dialog-backdrop="true"]'),n=this.container.querySelector(".dialog-backdrop");0===i.length&&n&&n.remove();const s=()=>{t.el.remove(),this.dialogs=this.dialogs.filter(e=>e.uuid!==t.uuid),0==this.dialogs.length?(this.container.classList.remove("has-dialogs"),this.container.classList.remove("dialog-prevent-scroll")):e&&(e.style.opacity="1")};if(t.animation){const e=t.el.querySelector(".dialog-content");d(e,t.animationOut).then(()=>{s()})}else s();this.onClose(t)}onInitialize(){let t=this.onInitialize;"function"==typeof t&&t.call(this.container)}onDestroy(){let t=this.onDestroy;"function"==typeof t&&t.call(this.container)}onInit(t){let e=t.onInit;"function"==typeof e&&e.call(t)}onShow(t){let e=t.onShow;"function"==typeof e&&e.call(t)}onClose(t){let e=t.onClose;"function"==typeof e&&e.call(t)}_renderFooter(t){if("function"==typeof t.footer)return t.footer();if(""!==t.footer&&!1!==t.footer&&!0!==t.footer)return t.footer;if(!0===t.footer){if(!t.actions||"object"!=typeof t.actions)return"";const e=Object.entries(t.actions).filter(([,t])=>!1!==t&&("undefined"==typeof t.visible||!!t.visible)).map(([t,e],i)=>({key:t,action:e,idx:i}));e.sort((t,i)=>{if(2===e.length&&e.some(t=>"close"===t.key)&&e.some(t=>"remove"===t.key)){if("close"===t.key)return-1;if("close"===i.key)return 1;if("remove"===t.key)return 1;if("remove"===i.key)return-1}return"remove"===t.key?-1:"remove"===i.key||"confirm"===t.key?1:"confirm"===i.key?-1:t.idx-i.idx});const i=e.map(({key:t,action:e})=>{let i=e.style?e.style:e.primary?"btn-primary":"btn-secondary";"remove"===t&&(i="btn-remove"),"confirm"!==t||"undefined"!==e.primary&&!1===e.primary||(i="btn-primary");let n=e.content||t.charAt(0).toUpperCase()+t.slice(1);return`\n <button type="button" class="btn ${i}${e.classes?" "+e.classes:""}"${e.attrs?" "+e.attrs:""} data-dialog-action="${t}"${["confirm","close","remove"].includes(t)?` data-dialog-${t}`:""}>\n ${n}\n </button>\n `});let n="";return n=i.length>2?`\n ${i[0]}\n <div class="spacer"></div>\n ${i[1]}\n ${i.slice(2).join("\n")}\n `:i.join("\n"),`\n <div class="dialog-footer">\n ${n}\n </div>\n `}return""}_renderHeader(t){let e="";const i='\n <button type="button" data-dialog-action="close" class="dialog-header-close">\n <svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="icon"><path d="M18 6 6 18"/><path d="m6 6 12 12"/></svg>\n </button>\n ';return e="function"==typeof t.header?t.header():""!==t.header&&!1!==t.header&&!0!==t.header?t.header:!0===t.header?`\n <div class="dialog-header">\n <span class="dialog-title">\n ${function(t){const e=document.createTextNode(t),i=document.createElement("p");return i.appendChild(e),i.innerHTML}(t.title)}\n </span>\n ${i}\n </div>\n `:`<div class="dialog-header">${i}</div>`,e}_renderTemplate(t){const e=t.classes?" "+t.classes:"",i=t.centered?" dialog-centered":"",n=t.size?" dialog-"+t.size:"",s=t.overflowVisible?" dialog-overflow-visible":"",o=' data-dialog-uuid="'+t.uuid+'"',r=t.backdrop?' data-dialog-backdrop="true"':' data-dialog-backdrop="false"',l=t.maxBodyHeight?' style="--cool-dialog-body-height: '+t.maxBodyHeight+'px"':"",a="function"==typeof t.body?t.body():t.body,c=this._renderFooter(t);return`\n <div class="dialog${e}${i}${n}${s}"${o}${r}>\n\n <div class="dialog-container">\n\n <div class="dialog-content">\n\n ${this._renderHeader(t)}\n\n <div class="dialog-body"${l}>\n\n ${a}\n\n </div>\n\n ${c}\n\n </div>\n\n </div>\n\n </div>\n `}}A._jQueryInit();class I extends o{static NAME="coolThemeSwitcher";static DEFAULTS={theme:"auto",storageKey:"cool-theme",target:null,onInit:null,onUpdate:null,onDestroy:null};static _jQueryInterface(t){return this.each(function(){const e=$(this);let i=e.data(`plugin_${I.NAME}`);i||(i=new I(this,"object"==typeof t&&t),e.data(`plugin_${I.NAME}`,i)),"string"==typeof t&&i[t]()})}static _jQueryInit(){if("undefined"==typeof $||!$.fn)return;const t=$.fn[I.NAME];$.fn[I.NAME]=I._jQueryInterface,$.fn[I.NAME].Constructor=I,$.fn[I.NAME].defaults=I.DEFAULTS||{},$.fn[I.NAME].noConflict=()=>($.fn[I.NAME]=t,I._jQueryInterface)}constructor(t,e){super(),this.opts=f({},I.DEFAULTS,window.Cool?.settings?.themeSwitcher||{},e||{}),this.el=t,this.init()}init(){this.buildCache(),this.bindEvents();const t=this._getStoredTheme();if(t)this._applyTheme(t);else{const t=this.el.dataset.theme;t&&["light","dark","auto"].includes(t)?this._applyTheme(t):this._applyTheme(this.opts.theme)}this.onInit()}destroy(){this.unbindEvents(),this.constructor.removeInstance(this.el),this.onDestroy()}update(){this.buildCache(),this.onUpdate()}buildCache(){this.target=this.opts.target?"string"==typeof this.opts.target?document.querySelector(this.opts.target):this.opts.target:document.documentElement,this._mediaQuery=window.matchMedia("(prefers-color-scheme: dark)")}bindEvents(){this._clickHandler=t=>{t.preventDefault();const e=this.el.dataset.theme;e&&["light","dark","auto"].includes(e)?this.setTheme(e):this.toggle()},this._mediaChangeHandler=()=>{"auto"===this._currentTheme&&this._dispatchEvent()},this.el.addEventListener("click",this._clickHandler),this._mediaQuery.addEventListener("change",this._mediaChangeHandler)}unbindEvents(){this._clickHandler&&this.el.removeEventListener("click",this._clickHandler),this._mediaChangeHandler&&this._mediaQuery&&this._mediaQuery.removeEventListener("change",this._mediaChangeHandler)}setTheme(t){["light","dark","auto"].includes(t)&&this._applyTheme(t)}getTheme(){return this._currentTheme||"auto"}getResolvedTheme(){return"dark"===this._currentTheme?"dark":"light"===this._currentTheme?"light":this._mediaQuery.matches?"dark":"light"}toggle(){const t=this.getTheme(),e=["light","dark","auto"],i=(e.indexOf(t)+1)%e.length;this.setTheme(e[i])}_applyTheme(t){this._currentTheme=t,this.target.classList.remove("dark","light"),"dark"===t?this.target.classList.add("dark"):"light"===t&&this.target.classList.add("light"),this.el.setAttribute("data-active-theme",t),this._storeTheme(t),this._dispatchEvent()}_dispatchEvent(){const t=new CustomEvent("cool.theme.change",{bubbles:!0,detail:{theme:this.getTheme(),resolvedTheme:this.getResolvedTheme()}});this.target.dispatchEvent(t)}_getStoredTheme(){try{return localStorage.getItem(this.opts.storageKey)}catch{return null}}_storeTheme(t){try{localStorage.setItem(this.opts.storageKey,t)}catch{}}}I._jQueryInit(),window.Cool=window.Cool||{},window.Cool.settings=window.Cool.settings||{};class H{static _sidebarInstance=null;static _sectionInstance=null;static _toastInstance=null;static refresh(){this._sectionInstance&&this._sectionInstance.refresh&&this._sectionInstance.refresh(),v.initializeElements('[data-toggle="popover"]',window.Cool.settings.popover),C.initializeElements('[data-toggle="select"]',window.Cool.settings.select),S.initializeElements('[data-toggle="dropdown"]',window.Cool.settings.dropdown),T.initializeElements('[data-toggle="tooltip"]',window.Cool.settings.tooltip),k.initializeElements('[data-toggle="collapse"]',window.Cool.settings.collapse),_.initializeElements('[data-toggle="section-tabs"]',window.Cool.settings.sectionTabs),I.initializeElements('[data-toggle="theme-switcher"]',window.Cool.settings.themeSwitcher)}static initialize(t={}){window.Cool.settings=t,this._sectionInstance||(this._sectionInstance=new m(t.section)),v.initializeElements('[data-toggle="popover"]',t.popover),C.initializeElements('[data-toggle="select"]',t.select),S.initializeElements('[data-toggle="dropdown"]',t.dropdown),T.initializeElements('[data-toggle="tooltip"]',t.tooltip),k.initializeElements('[data-toggle="collapse"]',t.collapse),_.initializeElements('[data-toggle="section-tabs"]',t.sectionTabs),I.initializeElements('[data-toggle="theme-switcher"]',t.themeSwitcher);const e=document.querySelector(".sidebar-left");e&&(this._sidebarInstance=y.initializeElement(e,t.sidebar)||y.getInstance(e)),this._toastInstance=L.initializeElement(document.body,t.toast)||L.getInstance(document.body),window.Cool.toast=this._toastInstance,A.initializeElement(document.body,t.dialog)}static initComponent(t){if(!t)return;const e=Array.isArray(t)?t:[t],i=[],n=[];e.forEach(t=>{const e="string"==typeof t?document.querySelector(t):t;if(!e)return;const i=e.querySelectorAll("[data-toggle]");(e.hasAttribute("data-toggle")?[e,...Array.from(i)]:Array.from(i)).forEach(t=>{n.push(t)})});const s=[],o=[];n.forEach(t=>{const e=t.getBoundingClientRect();e.top<window.innerHeight&&e.bottom>0?s.push(t):o.push(t)});const r=[...s,...o];let l=0;const a=()=>{r.slice(l,l+10).forEach(t=>{let e=null;switch(t.getAttribute("data-toggle")){case"popover":e=v.initializeElement(t,window.Cool.settings.popover);break;case"select":e=C.initializeElement(t,window.Cool.settings.select);break;case"dropdown":e=S.initializeElement(t,window.Cool.settings.dropdown);break;case"tooltip":e=T.initializeElement(t,window.Cool.settings.tooltip);break;case"collapse":e=k.initializeElement(t,window.Cool.settings.collapse);break;case"section-tabs":e=_.initializeElement(t,window.Cool.settings.sectionTabs);break;case"theme-switcher":e=I.initializeElement(t,window.Cool.settings.themeSwitcher)}e&&i.push(e)}),l+=10,l<r.length&&("requestIdleCallback"in window?requestIdleCallback(a,{timeout:50}):setTimeout(a,0))};return s.length>0?a():"requestIdleCallback"in window?requestIdleCallback(a,{timeout:100}):a(),i}static destroy(){this._sidebarInstance&&(this._sidebarInstance.destroy(),this._sidebarInstance=null),this._sectionInstance&&(this._sectionInstance.destroy(),this._sectionInstance=null)}static observeResize(t,e){if(t&&"function"==typeof e)return r.observe(t,e)}static unobserveResize(t){t&&r.unobserve(t)}static addScrollListener(t,e){t&&"function"==typeof e&&l.add(t,e)}static removeScrollListener(t){t&&l.remove(t)}static getSidebar(){return this._sidebarInstance}static getSection(){return this._sectionInstance}static getToast(){return this._toastInstance}static initjQuery(){v._jQueryInit(),C._jQueryInit(),S._jQueryInit(),T._jQueryInit(),k._jQueryInit(),_._jQueryInit(),L._jQueryInit(),A._jQueryInit(),y._jQueryInit(),I._jQueryInit()}}window.Cool.initialize=H.initialize.bind(H),window.Cool.initComponent=H.initComponent.bind(H),window.Cool.refresh=H.refresh.bind(H),window.Cool.destroy=H.destroy.bind(H),window.Cool.observeResize=H.observeResize.bind(H),window.Cool.unobserveResize=H.unobserveResize.bind(H),window.Cool.addScrollListener=H.addScrollListener.bind(H),window.Cool.removeScrollListener=H.removeScrollListener.bind(H),window.Cool.getSidebar=H.getSidebar.bind(H),window.Cool.getSection=H.getSection.bind(H),window.Cool.getToast=H.getToast.bind(H),window.Cool.initjQuery=H.initjQuery.bind(H),"undefined"!=typeof window&&(window.jQuery=window.$=n);return{Common:H,Sidebar:y,Popover:v,Select:C,Dropdown:S,Tooltip:T,SectionTabs:_,Collapse:k,Toast:L,Dialog:A,ThemeSwitcher:I}});
|
|
24
17
|
//# sourceMappingURL=cool.bundle.min.js.map
|