vendor: 89,947 bytes, lines 1-2
1/*! jQuery v3.6.3 | (c) OpenJS Foundation and other contributors | jquery.org/license */ 2!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(C,e){"use strict";var t=[],r=Object.getPrototypeOf,s=t.slice,g=t.flat?function(e){return t.flat.call(e)}:function(e){return t.concat.apply([],e)},u=t.push,i=t.indexOf,n={},o=n.toString,y=n.hasOwnProperty,a=y.toString,l=a.call(Object),v={},m=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType&&"function"!=typeof e.item},x=function(e){return null!=e&&e===e.window},S=C.document,c={type:!0,src:!0,nonce:!0,noModule:!0};function b(e,t,n){var r,i,o=(n=n||S).createElement("script");if(o.text=e,t)for(r in c)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function w(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?n[o.call(e)]||"object":typeof e}var f="3.6.3",E=function(e,t){return new E.fn.init(e,t)};function p(e){var t=!!e&&"length"in e&&e.length,n=w(e);return!m(e)&&!x(e)&&("array"===n||0===t||"number"==typeof t&&0<t&&t-1 in e)}E.fn=E.prototype={jquery:f,constructor:E,length:0,toArray:function(){return s.call(this)},get:function(e){return null==e?s.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){var t=E.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return E.each(this,e)},map:function(n){return this.pushStack(E.map(this,function(e,t){return n.call(e,t,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(E.grep(this,function(e,t){return(t+1)%2}))},odd:function(){return this.pushStack(E.grep(this,function(e,t){return t%2}))},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(0<=n&&n<t?[this[n]]:[])},end:function(){return this.prevObject||this.constructor()},push:u,sort:t.sort,splice:t.splice},E.extend=E.fn.extend=function(){var e,t,n,r,i,o,a=arguments[0]||{},s=1,u=arguments.length,l=!1;for("boolean"==typeof a&&(l=a,a=arguments[s]||{},s++),"object"==typeof a||m(a)||(a={}),s===u&&(a=this,s--);s<u;s++)if(null!=(e=arguments[s]))for(t in e)r=e[t],"__proto__"!==t&&a!==r&&(l&&r&&(E.isPlainObject(r)||(i=Array.isArray(r)))?(n=a[t],o=i&&!Array.isArray(n)?[]:i||E.isPlainObject(n)?n:{},i=!1,a[t]=E.extend(l,o,r)):void 0!==r&&(a[t]=r));return a},E.extend({expando:"jQuery"+(f+Math.random()).replace(/\D/g,""),isReady:!0,error:function(e){throw new Error(e)},noop:function(){},isPlainObject:function(e){var t,n;return!(!e||"[object Object]"!==o.call(e))&&(!(t=r(e))||"function"==typeof(n=y.call(t,"constructor")&&t.constructor)&&a.call(n)===l)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},globalEval:function(e,t,n){b(e,{nonce:t&&t.nonce},n)},each:function(e,t){var n,r=0;if(p(e)){for(n=e.length;r<n;r++)if(!1===t.call(e[r],r,e[r]))break}else for(r in e)if(!1===t.call(e[r],r,e[r]))break;return e},makeArray:function(e,t){var n=t||[];return null!=e&&(p(Object(e))?E.merge(n,"string"==typeof e?[e]:e):u.call(n,e)),n},inArray:function(e,t,n){return null==t?-1:i.call(t,e,n)},merge:function(e,t){for(var n=+t.length,r=0,i=e.length;r<n;r++)e[i++]=t[r];return e.length=i,e},grep:function(e,t,n){for(var r=[],i=0,o=e.length,a=!n;i<o;i++)!t(e[i],i)!==a&&r.push(e[i]);return r},map:function(e,t,n){var r,i,o=0,a=[];if(p(e))for(r=e.length;o<r;o++)null!=(i=t(e[o],o,n))&&a.push(i);else for(o in e)null!=(i=t(e[o],o,n))&&a.push(i);return g(a)},guid:1,support:v}),"function"==typeof Symbol&&(E.fn[Symbol.iterator]=t[Symbol.iterator]),E.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(e,t){n["[object "+t+"]"]=t.toLowerCase()});var d=function(n){var e,d,b,o,i,h,f,g,w,u,l,T,C,a,S,y,s,c,v,E="sizzle"+1*new Date,p=n.document,k=0,r=0,m=ue(),x=ue(),A=ue(),N=ue(),j=function(e,t){return e===t&&(l=!0),0},D={}.hasOwnProperty,t=[],q=t.pop,L=t.push,H=t.push,O=t.slice,P=function(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1},R="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",M="[\\x20\\t\\r\\n\\f]",I="(?:\\\\[\\da-fA-F]{1,6}"+M+"?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+",W="\\["+M+"*("+I+")(?:"+M+"*([*^$|!~]?=)"+M+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+I+"))|)"+M+"*\\]",F=":("+I+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+W+")*)|.*)\\)|)",$=new RegExp(M+"+","g"),B=new RegExp("^"+M+"+|((?:^|[^\\\\])(?:\\\\.)*)"+M+"+$","g"),_=new RegExp("^"+M+"*,"+M+"*"),z=new RegExp("^"+M+"*([>+~]|"+M+")"+M+"*"),U=new RegExp(M+"|>"),X=new RegExp(F),V=new RegExp("^"+I+"$"),G={ID:new RegExp("^#("+I+")"),CLASS:new RegExp("^\\.("+I+")"),TAG:new RegExp("^("+I+"|[*])"),ATTR:new RegExp("^"+W),PSEUDO:new RegExp("^"+F),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+R+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Y=/HTML$/i,Q=/^(?:input|select|textarea|button)$/i,J=/^h\d$/i,K=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\[\\da-fA-F]{1,6}"+M+"?|\\\\([^\\r\\n\\f])","g"),ne=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},re=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ie=function(e,t){return t?"\0"===e?"\ufffd":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},oe=function(){T()},ae=be(function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()},{dir:"parentNode",next:"legend"});try{H.apply(t=O.call(p.childNodes),p.childNodes),t[p.childNodes.length].nodeType}catch(e){H={apply:t.length?function(e,t){L.apply(e,O.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function se(t,e,n,r){var i,o,a,s,u,l,c,f=e&&e.ownerDocument,p=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==p&&9!==p&&11!==p)return n;if(!r&&(T(e),e=e||C,S)){if(11!==p&&(u=Z.exec(t)))if(i=u[1]){if(9===p){if(!(a=e.getElementById(i)))return n;if(a.id===i)return n.push(a),n}else if(f&&(a=f.getElementById(i))&&v(e,a)&&a.id===i)return n.push(a),n}else{if(u[2])return H.apply(n,e.getElementsByTagName(t)),n;if((i=u[3])&&d.getElementsByClassName&&e.getElementsByClassName)return H.apply(n,e.getElementsByClassName(i)),n}if(d.qsa&&!N[t+" "]&&(!y||!y.test(t))&&(1!==p||"object"!==e.nodeName.toLowerCase())){if(c=t,f=e,1===p&&(U.test(t)||z.test(t))){(f=ee.test(t)&&ve(e.parentNode)||e)===e&&d.scope||((s=e.getAttribute("id"))?s=s.replace(re,ie):e.setAttribute("id",s=E)),o=(l=h(t)).length;while(o--)l[o]=(s?"#"+s:":scope")+" "+xe(l[o]);c=l.join(",")}try{if(d.cssSupportsSelector&&!CSS.supports("selector(:is("+c+"))"))throw new Error;return H.apply(n,f.querySelectorAll(c)),n}catch(e){N(t,!0)}finally{s===E&&e.removeAttribute("id")}}}return g(t.replace(B,"$1"),e,n,r)}function ue(){var r=[];return function e(t,n){return r.push(t+" ")>b.cacheLength&&delete e[r.shift()],e[t+" "]=n}}function le(e){return e[E]=!0,e}function ce(e){var t=C.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function fe(e,t){var n=e.split("|"),r=n.length;while(r--)b.attrHandle[n[r]]=t}function pe(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function de(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function he(n){return function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&e.type===n}}function ge(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&&ae(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function ye(a){return le(function(o){return o=+o,le(function(e,t){var n,r=a([],e.length,o),i=r.length;while(i--)e[n=r[i]]&&(e[n]=!(t[n]=e[n]))})})}function ve(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}for(e in d=se.support={},i=se.isXML=function(e){var t=e&&e.namespaceURI,n=e&&(e.ownerDocument||e).documentElement;return!Y.test(t||n&&n.nodeName||"HTML")},T=se.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:p;return r!=C&&9===r.nodeType&&r.documentElement&&(a=(C=r).documentElement,S=!i(C),p!=C&&(n=C.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",oe,!1):n.attachEvent&&n.attachEvent("onunload",oe)),d.scope=ce(function(e){return a.appendChild(e).appendChild(C.createElement("div")),"undefined"!=typeof e.querySelectorAll&&!e.querySelectorAll(":scope fieldset div").length}),d.cssSupportsSelector=ce(function(){return CSS.supports("selector(*)")&&C.querySelectorAll(":is(:jqfake)")&&!CSS.supports("selector(:is(*,:jqfake))")}),d.attributes=ce(function(e){return e.className="i",!e.getAttribute("className")}),d.getElementsByTagName=ce(function(e){return e.appendChild(C.createComment("")),!e.getElementsByTagName("*").length}),d.getElementsByClassName=K.test(C.getElementsByClassName),d.getById=ce(function(e){return a.appendChild(e).id=E,!C.getElementsByName||!C.getElementsByName(E).length}),d.getById?(b.filter.ID=function(e){var t=e.replace(te,ne);return function(e){return e.getAttribute("id")===t}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&S){var n=t.getElementById(e);return n?[n]:[]}}):(b.filter.ID=function(e){var n=e.replace(te,ne);return function(e){var t="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return t&&t.value===n}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&S){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];i=t.getElementsByName(e),r=0;while(o=i[r++])if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),b.find.TAG=d.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):d.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},b.find.CLASS=d.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&S)return t.getElementsByClassName(e)},s=[],y=[],(d.qsa=K.test(C.querySelectorAll))&&(ce(function(e){var t;a.appendChild(e).innerHTML="<a id='"+E+"'></a><select id='"+E+"-\r\\' msallowcapture=''><option selected=''></option></select>",e.querySelectorAll("[msallowcapture^='']").length&&y.push("[*^$]="+M+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||y.push("\\["+M+"*(?:value|"+R+")"),e.querySelectorAll("[id~="+E+"-]").length||y.push("~="),(t=C.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||y.push("\\["+M+"*name"+M+"*="+M+"*(?:''|\"\")"),e.querySelectorAll(":checked").length||y.push(":checked"),e.querySelectorAll("a#"+E+"+*").length||y.push(".#.+[+~]"),e.querySelectorAll("\\\f"),y.push("[\\r\\n\\f]")}),ce(function(e){e.innerHTML="<a href='' disabled='disabled'></a><select disabled='disabled'><option/></select>";var t=C.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&y.push("name"+M+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&y.push(":enabled",":disabled"),a.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&y.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),y.push(",.*:")})),(d.matchesSelector=K.test(c=a.matches||a.webkitMatchesSelector||a.mozMatchesSelector||a.oMatchesSelector||a.msMatchesSelector))&&ce(function(e){d.disconnectedMatch=c.call(e,"*"),c.call(e,"[s!='']:x"),s.push("!=",F)}),d.cssSupportsSelector||y.push(":has"),y=y.length&&new RegExp(y.join("|")),s=s.length&&new RegExp(s.join("|")),t=K.test(a.compareDocumentPosition),v=t||K.test(a.contains)?function(e,t){var n=9===e.nodeType&&e.documentElement||e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},j=t?function(e,t){if(e===t)return l=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!d.sortDetached&&t.compareDocumentPosition(e)===n?e==C||e.ownerDocument==p&&v(p,e)?-1:t==C||t.ownerDocument==p&&v(p,t)?1:u?P(u,e)-P(u,t):0:4&n?-1:1)}:function(e,t){if(e===t)return l=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!i||!o)return e==C?-1:t==C?1:i?-1:o?1:u?P(u,e)-P(u,t):0;if(i===o)return pe(e,t);n=e;while(n=n.parentNode)a.unshift(n);n=t;while(n=n.parentNode)s.unshift(n);while(a[r]===s[r])r++;return r?pe(a[r],s[r]):a[r]==p?-1:s[r]==p?1:0}),C},se.matches=function(e,t){return se(e,null,null,t)},se.matchesSelector=function(e,t){if(T(e),d.matchesSelector&&S&&!N[t+" "]&&(!s||!s.test(t))&&(!y||!y.test(t)))try{var n=c.call(e,t);if(n||d.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){N(t,!0)}return 0<se(t,C,null,[e]).length},se.contains=function(e,t){return(e.ownerDocument||e)!=C&&T(e),v(e,t)},se.attr=function(e,t){(e.ownerDocument||e)!=C&&T(e);var n=b.attrHandle[t.toLowerCase()],r=n&&D.call(b.attrHandle,t.toLowerCase())?n(e,t,!S):void 0;return void 0!==r?r:d.attributes||!S?e.getAttribute(t):(r=e.getAttributeNode(t))&&r.specified?r.value:null},se.escape=function(e){return(e+"").replace(re,ie)},se.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},se.uniqueSort=function(e){var t,n=[],r=0,i=0;if(l=!d.detectDuplicates,u=!d.sortStable&&e.slice(0),e.sort(j),l){while(t=e[i++])t===e[i]&&(r=n.push(i));while(r--)e.splice(n[r],1)}return u=null,e},o=se.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=o(e)}else if(3===i||4===i)return e.nodeValue}else while(t=e[r++])n+=o(t);return n},(b=se.selectors={cacheLength:50,createPseudo:le,match:G,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(te,ne),e[3]=(e[3]||e[4]||e[5]||"").replace(te,ne),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||se.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&se.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return G.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&X.test(n)&&(t=h(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(te,ne).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=m[e+" "];return t||(t=new RegExp("(^|"+M+")"+e+"("+M+"|$)"))&&m(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(n,r,i){return function(e){var t=se.attr(e,n);return null==t?"!="===r:!r||(t+="","="===r?t===i:"!="===r?t!==i:"^="===r?i&&0===t.indexOf(i):"*="===r?i&&-1<t.indexOf(i):"$="===r?i&&t.slice(-i.length)===i:"~="===r?-1<(" "+t.replace($," ")+" ").indexOf(i):"|="===r&&(t===i||t.slice(0,i.length+1)===i+"-"))}},CHILD:function(h,e,t,g,y){var v="nth"!==h.slice(0,3),m="last"!==h.slice(-4),x="of-type"===e;return 1===g&&0===y?function(e){return!!e.parentNode}:function(e,t,n){var r,i,o,a,s,u,l=v!==m?"nextSibling":"previousSibling",c=e.parentNode,f=x&&e.nodeName.toLowerCase(),p=!n&&!x,d=!1;if(c){if(v){while(l){a=e;while(a=a[l])if(x?a.nodeName.toLowerCase()===f:1===a.nodeType)return!1;u=l="only"===h&&!u&&"nextSibling"}return!0}if(u=[m?c.firstChild:c.lastChild],m&&p){d=(s=(r=(i=(o=(a=c)[E]||(a[E]={}))[a.uniqueID]||(o[a.uniqueID]={}))[h]||[])[0]===k&&r[1])&&r[2],a=s&&c.childNodes[s];while(a=++s&&a&&a[l]||(d=s=0)||u.pop())if(1===a.nodeType&&++d&&a===e){i[h]=[k,s,d];break}}else if(p&&(d=s=(r=(i=(o=(a=e)[E]||(a[E]={}))[a.uniqueID]||(o[a.uniqueID]={}))[h]||[])[0]===k&&r[1]),!1===d)while(a=++s&&a&&a[l]||(d=s=0)||u.pop())if((x?a.nodeName.toLowerCase()===f:1===a.nodeType)&&++d&&(p&&((i=(o=a[E]||(a[E]={}))[a.uniqueID]||(o[a.uniqueID]={}))[h]=[k,d]),a===e))break;return(d-=y)===g||d%g==0&&0<=d/g}}},PSEUDO:function(e,o){var t,a=b.pseudos[e]||b.setFilters[e.toLowerCase()]||se.error("unsupported pseudo: "+e);return a[E]?a(o):1<a.length?(t=[e,e,"",o],b.setFilters.hasOwnProperty(e.toLowerCase())?le(function(e,t){var n,r=a(e,o),i=r.length;while(i--)e[n=P(e,r[i])]=!(t[n]=r[i])}):function(e){return a(e,0,t)}):a}},pseudos:{not:le(function(e){var r=[],i=[],s=f(e.replace(B,"$1"));return s[E]?le(function(e,t,n,r){var i,o=s(e,null,r,[]),a=e.length;while(a--)(i=o[a])&&(e[a]=!(t[a]=i))}):function(e,t,n){return r[0]=e,s(r,null,n,i),r[0]=null,!i.pop()}}),has:le(function(t){return function(e){return 0<se(t,e).length}}),contains:le(function(t){return t=t.replace(te,ne),function(e){return-1<(e.textContent||o(e)).indexOf(t)}}),lang:le(function(n){return V.test(n||"")||se.error("unsupported lang: "+n),n=n.replace(te,ne).toLowerCase(),function(e){var t;do{if(t=S?e.lang:e.getAttribute("xml:lang")||e.getAttribute("lang"))return(t=t.toLowerCase())===n||0===t.indexOf(n+"-")}while((e=e.parentNode)&&1===e.nodeType);return!1}}),target:function(e){var t=n.location&&n.location.hash;return t&&t.slice(1)===e.id},root:function(e){return e===a},focus:function(e){return e===C.activeElement&&(!C.hasFocus||C.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:ge(!1),disabled:ge(!0),checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!b.pseudos.empty(e)},header:function(e){return J.test(e.nodeName)},input:function(e){return Q.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:ye(function(){return[0]}),last:ye(function(e,t){return[t-1]}),eq:ye(function(e,t,n){return[n<0?n+t:n]}),even:ye(function(e,t){for(var n=0;n<t;n+=2)e.push(n);return e}),odd:ye(function(e,t){for(var n=1;n<t;n+=2)e.push(n);return e}),lt:ye(function(e,t,n){for(var r=n<0?n+t:t<n?t:n;0<=--r;)e.push(r);return e}),gt:ye(function(e,t,n){for(var r=n<0?n+t:n;++r<t;)e.push(r);return e})}}).pseudos.nth=b.pseudos.eq,{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})b.pseudos[e]=de(e);for(e in{submit:!0,reset:!0})b.pseudos[e]=he(e);function me(){}function xe(e){for(var t=0,n=e.length,r="";t<n;t++)r+=e[t].value;return r}function be(s,e,t){var u=e.dir,l=e.next,c=l||u,f=t&&"parentNode"===c,p=r++;return e.first?function(e,t,n){while(e=e[u])if(1===e.nodeType||f)return s(e,t,n);return!1}:function(e,t,n){var r,i,o,a=[k,p];if(n){while(e=e[u])if((1===e.nodeType||f)&&s(e,t,n))return!0}else while(e=e[u])if(1===e.nodeType||f)if(i=(o=e[E]||(e[E]={}))[e.uniqueID]||(o[e.uniqueID]={}),l&&l===e.nodeName.toLowerCase())e=e[u]||e;else{if((r=i[c])&&r[0]===k&&r[1]===p)return a[2]=r[2];if((i[c]=a)[2]=s(e,t,n))return!0}return!1}}function we(i){return 1<i.length?function(e,t,n){var r=i.length;while(r--)if(!i[r](e,t,n))return!1;return!0}:i[0]}function Te(e,t,n,r,i){for(var o,a=[],s=0,u=e.length,l=null!=t;s<u;s++)(o=e[s])&&(n&&!n(o,r,i)||(a.push(o),l&&t.push(s)));return a}function Ce(d,h,g,y,v,e){return y&&!y[E]&&(y=Ce(y)),v&&!v[E]&&(v=Ce(v,e)),le(function(e,t,n,r){var i,o,a,s=[],u=[],l=t.length,c=e||function(e,t,n){for(var r=0,i=t.length;r<i;r++)se(e,t[r],n);return n}(h||"*",n.nodeType?[n]:n,[]),f=!d||!e&&h?c:Te(c,s,d,n,r),p=g?v||(e?d:l||y)?[]:t:f;if(g&&g(f,p,n,r),y){i=Te(p,u),y(i,[],n,r),o=i.length;while(o--)(a=i[o])&&(p[u[o]]=!(f[u[o]]=a))}if(e){if(v||d){if(v){i=[],o=p.length;while(o--)(a=p[o])&&i.push(f[o]=a);v(null,p=[],i,r)}o=p.length;while(o--)(a=p[o])&&-1<(i=v?P(e,a):s[o])&&(e[i]=!(t[i]=a))}}else p=Te(p===t?p.splice(l,p.length):p),v?v(null,t,p,r):H.apply(t,p)})}function Se(e){for(var i,t,n,r=e.length,o=b.relative[e[0].type],a=o||b.relative[" "],s=o?1:0,u=be(function(e){return e===i},a,!0),l=be(function(e){return-1<P(i,e)},a,!0),c=[function(e,t,n){var r=!o&&(n||t!==w)||((i=t).nodeType?u(e,t,n):l(e,t,n));return i=null,r}];s<r;s++)if(t=b.relative[e[s].type])c=[be(we(c),t)];else{if((t=b.filter[e[s].type].apply(null,e[s].matches))[E]){for(n=++s;n<r;n++)if(b.relative[e[n].type])break;return Ce(1<s&&we(c),1<s&&xe(e.slice(0,s-1).concat({value:" "===e[s-2].type?"*":""})).replace(B,"$1"),t,s<n&&Se(e.slice(s,n)),n<r&&Se(e=e.slice(n)),n<r&&xe(e))}c.push(t)}return we(c)}return me.prototype=b.filters=b.pseudos,b.setFilters=new me,h=se.tokenize=function(e,t){var n,r,i,o,a,s,u,l=x[e+" "];if(l)return t?0:l.slice(0);a=e,s=[],u=b.preFilter;while(a){for(o in n&&!(r=_.exec(a))||(r&&(a=a.slice(r[0].length)||a),s.push(i=[])),n=!1,(r=z.exec(a))&&(n=r.shift(),i.push({value:n,type:r[0].replace(B," ")}),a=a.slice(n.length)),b.filter)!(r=G[o].exec(a))||u[o]&&!(r=u[o](r))||(n=r.shift(),i.push({value:n,type:o,matches:r}),a=a.slice(n.length));if(!n)break}return t?a.length:a?se.error(e):x(e,s).slice(0)},f=se.compile=function(e,t){var n,y,v,m,x,r,i=[],o=[],a=A[e+" "];if(!a){t||(t=h(e)),n=t.length;while(n--)(a=Se(t[n]))[E]?i.push(a):o.push(a);(a=A(e,(y=o,m=0<(v=i).length,x=0<y.length,r=function(e,t,n,r,i){var o,a,s,u=0,l="0",c=e&&[],f=[],p=w,d=e||x&&b.find.TAG("*",i),h=k+=null==p?1:Math.random()||.1,g=d.length;for(i&&(w=t==C||t||i);l!==g&&null!=(o=d[l]);l++){if(x&&o){a=0,t||o.ownerDocument==C||(T(o),n=!S);while(s=y[a++])if(s(o,t||C,n)){r.push(o);break}i&&(k=h)}m&&((o=!s&&o)&&u--,e&&c.push(o))}if(u+=l,m&&l!==u){a=0;while(s=v[a++])s(c,f,t,n);if(e){if(0<u)while(l--)c[l]||f[l]||(f[l]=q.call(r));f=Te(f)}H.apply(r,f),i&&!e&&0<f.length&&1<u+v.length&&se.uniqueSort(r)}return i&&(k=h,w=p),c},m?le(r):r))).selector=e}return a},g=se.select=function(e,t,n,r){var i,o,a,s,u,l="function"==typeof e&&e,c=!r&&h(e=l.selector||e);if(n=n||[],1===c.length){if(2<(o=c[0]=c[0].slice(0)).length&&"ID"===(a=o[0]).type&&9===t.nodeType&&S&&b.relative[o[1].type]){if(!(t=(b.find.ID(a.matches[0].replace(te,ne),t)||[])[0]))return n;l&&(t=t.parentNode),e=e.slice(o.shift().value.length)}i=G.needsContext.test(e)?0:o.length;while(i--){if(a=o[i],b.relative[s=a.type])break;if((u=b.find[s])&&(r=u(a.matches[0].replace(te,ne),ee.test(o[0].type)&&ve(t.parentNode)||t))){if(o.splice(i,1),!(e=r.length&&xe(o)))return H.apply(n,r),n;break}}}return(l||f(e,c))(r,t,!S,n,!t||ee.test(e)&&ve(t.parentNode)||t),n},d.sortStable=E.split("").sort(j).join("")===E,d.detectDuplicates=!!l,T(),d.sortDetached=ce(function(e){return 1&e.compareDocumentPosition(C.createElement("fieldset"))}),ce(function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")})||fe("type|href|height|width",function(e,t,n){if(!n)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),d.attributes&&ce(function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||fe("value",function(e,t,n){if(!n&&"input"===e.nodeName.toLowerCase())return e.defaultValue}),ce(function(e){return null==e.getAttribute("disabled")})||fe(R,function(e,t,n){var r;if(!n)return!0===e[t]?t.toLowerCase():(r=e.getAttributeNode(t))&&r.specified?r.value:null}),se}(C);E.find=d,E.expr=d.selectors,E.expr[":"]=E.expr.pseudos,E.uniqueSort=E.unique=d.uniqueSort,E.text=d.getText,E.isXMLDoc=d.isXML,E.contains=d.contains,E.escapeSelector=d.escape;var h=function(e,t,n){var r=[],i=void 0!==n;while((e=e[t])&&9!==e.nodeType)if(1===e.nodeType){if(i&&E(e).is(n))break;r.push(e)}return r},T=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},k=E.expr.match.needsContext;function A(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}var N=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function j(e,n,r){return m(n)?E.grep(e,function(e,t){return!!n.call(e,t,e)!==r}):n.nodeType?E.grep(e,function(e){return e===n!==r}):"string"!=typeof n?E.grep(e,function(e){return-1<i.call(n,e)!==r}):E.filter(n,e,r)}E.filter=function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?E.find.matchesSelector(r,e)?[r]:[]:E.find.matches(e,E.grep(t,function(e){return 1===e.nodeType}))},E.fn.extend({find:function(e){var t,n,r=this.length,i=this;if("string"!=typeof e)return this.pushStack(E(e).filter(function(){for(t=0;t<r;t++)if(E.contains(i[t],this))return!0}));for(n=this.pushStack([]),t=0;t<r;t++)E.find(e,i[t],n);return 1<r?E.uniqueSort(n):n},filter:function(e){return this.pushStack(j(this,e||[],!1))},not:function(e){return this.pushStack(j(this,e||[],!0))},is:function(e){return!!j(this,"string"==typeof e&&k.test(e)?E(e):e||[],!1).length}});var D,q=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(E.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||D,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:q.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof E?t[0]:t,E.merge(this,E.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:S,!0)),N.test(r[1])&&E.isPlainObject(t))for(r in t)m(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=S.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):m(e)?void 0!==n.ready?n.ready(e):e(E):E.makeArray(e,this)}).prototype=E.fn,D=E(S);var L=/^(?:parents|prev(?:Until|All))/,H={children:!0,contents:!0,next:!0,prev:!0};function O(e,t){while((e=e[t])&&1!==e.nodeType);return e}E.fn.extend({has:function(e){var t=E(e,this),n=t.length;return this.filter(function(){for(var e=0;e<n;e++)if(E.contains(this,t[e]))return!0})},closest:function(e,t){var n,r=0,i=this.length,o=[],a="string"!=typeof e&&E(e);if(!k.test(e))for(;r<i;r++)for(n=this[r];n&&n!==t;n=n.parentNode)if(n.nodeType<11&&(a?-1<a.index(n):1===n.nodeType&&E.find.matchesSelector(n,e))){o.push(n);break}return this.pushStack(1<o.length?E.uniqueSort(o):o)},index:function(e){return e?"string"==typeof e?i.call(E(e),this[0]):i.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(E.uniqueSort(E.merge(this.get(),E(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),E.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return h(e,"parentNode")},parentsUntil:function(e,t,n){return h(e,"parentNode",n)},next:function(e){return O(e,"nextSibling")},prev:function(e){return O(e,"previousSibling")},nextAll:function(e){return h(e,"nextSibling")},prevAll:function(e){return h(e,"previousSibling")},nextUntil:function(e,t,n){return h(e,"nextSibling",n)},prevUntil:function(e,t,n){return h(e,"previousSibling",n)},siblings:function(e){return T((e.parentNode||{}).firstChild,e)},children:function(e){return T(e.firstChild)},contents:function(e){return null!=e.contentDocument&&r(e.contentDocument)?e.contentDocument:(A(e,"template")&&(e=e.content||e),E.merge([],e.childNodes))}},function(r,i){E.fn[r]=function(e,t){var n=E.map(this,i,e);return"Until"!==r.slice(-5)&&(t=e),t&&"string"==typeof t&&(n=E.filter(t,n)),1<this.length&&(H[r]||E.uniqueSort(n),L.test(r)&&n.reverse()),this.pushStack(n)}});var P=/[^\x20\t\r\n\f]+/g;function R(e){return e}function M(e){throw e}function I(e,t,n,r){var i;try{e&&m(i=e.promise)?i.call(e).done(t).fail(n):e&&m(i=e.then)?i.call(e,t,n):t.apply(void 0,[e].slice(r))}catch(e){n.apply(void 0,[e])}}E.Callbacks=function(r){var e,n;r="string"==typeof r?(e=r,n={},E.each(e.match(P)||[],function(e,t){n[t]=!0}),n):E.extend({},r);var i,t,o,a,s=[],u=[],l=-1,c=function(){for(a=a||r.once,o=i=!0;u.length;l=-1){t=u.shift();while(++l<s.length)!1===s[l].apply(t[0],t[1])&&r.stopOnFalse&&(l=s.length,t=!1)}r.memory||(t=!1),i=!1,a&&(s=t?[]:"")},f={add:function(){return s&&(t&&!i&&(l=s.length-1,u.push(t)),function n(e){E.each(e,function(e,t){m(t)?r.unique&&f.has(t)||s.push(t):t&&t.length&&"string"!==w(t)&&n(t)})}(arguments),t&&!i&&c()),this},remove:function(){return E.each(arguments,function(e,t){var n;while(-1<(n=E.inArray(t,s,n)))s.splice(n,1),n<=l&&l--}),this},has:function(e){return e?-1<E.inArray(e,s):0<s.length},empty:function(){return s&&(s=[]),this},disable:function(){return a=u=[],s=t="",this},disabled:function(){return!s},lock:function(){return a=u=[],t||i||(s=t=""),this},locked:function(){return!!a},fireWith:function(e,t){return a||(t=[e,(t=t||[]).slice?t.slice():t],u.push(t),i||c()),this},fire:function(){return f.fireWith(this,arguments),this},fired:function(){return!!o}};return f},E.extend({Deferred:function(e){var o=[["notify","progress",E.Callbacks("memory"),E.Callbacks("memory"),2],["resolve","done",E.Callbacks("once memory"),E.Callbacks("once memory"),0,"resolved"],["reject","fail",E.Callbacks("once memory"),E.Callbacks("once memory"),1,"rejected"]],i="pending",a={state:function(){return i},always:function(){return s.done(arguments).fail(arguments),this},"catch":function(e){return a.then(null,e)},pipe:function(){var i=arguments;return E.Deferred(function(r){E.each(o,function(e,t){var n=m(i[t[4]])&&i[t[4]];s[t[1]](function(){var e=n&&n.apply(this,arguments);e&&m(e.promise)?e.promise().progress(r.notify).done(r.resolve).fail(r.reject):r[t[0]+"With"](this,n?[e]:arguments)})}),i=null}).promise()},then:function(t,n,r){var u=0;function l(i,o,a,s){return function(){var n=this,r=arguments,e=function(){var e,t;if(!(i<u)){if((e=a.apply(n,r))===o.promise())throw new TypeError("Thenable self-resolution");t=e&&("object"==typeof e||"function"==typeof e)&&e.then,m(t)?s?t.call(e,l(u,o,R,s),l(u,o,M,s)):(u++,t.call(e,l(u,o,R,s),l(u,o,M,s),l(u,o,R,o.notifyWith))):(a!==R&&(n=void 0,r=[e]),(s||o.resolveWith)(n,r))}},t=s?e:function(){try{e()}catch(e){E.Deferred.exceptionHook&&E.Deferred.exceptionHook(e,t.stackTrace),u<=i+1&&(a!==M&&(n=void 0,r=[e]),o.rejectWith(n,r))}};i?t():(E.Deferred.getStackHook&&(t.stackTrace=E.Deferred.getStackHook()),C.setTimeout(t))}}return E.Deferred(function(e){o[0][3].add(l(0,e,m(r)?r:R,e.notifyWith)),o[1][3].add(l(0,e,m(t)?t:R)),o[2][3].add(l(0,e,m(n)?n:M))}).promise()},promise:function(e){return null!=e?E.extend(e,a):a}},s={};return E.each(o,function(e,t){var n=t[2],r=t[5];a[t[1]]=n.add,r&&n.add(function(){i=r},o[3-e][2].disable,o[3-e][3].disable,o[0][2].lock,o[0][3].lock),n.add(t[3].fire),s[t[0]]=function(){return s[t[0]+"With"](this===s?void 0:this,arguments),this},s[t[0]+"With"]=n.fireWith}),a.promise(s),e&&e.call(s,s),s},when:function(e){var n=arguments.length,t=n,r=Array(t),i=s.call(arguments),o=E.Deferred(),a=function(t){return function(e){r[t]=this,i[t]=1<arguments.length?s.call(arguments):e,--n||o.resolveWith(r,i)}};if(n<=1&&(I(e,o.done(a(t)).resolve,o.reject,!n),"pending"===o.state()||m(i[t]&&i[t].then)))return o.then();while(t--)I(i[t],a(t),o.reject);return o.promise()}});var W=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;E.Deferred.exceptionHook=function(e,t){C.console&&C.console.warn&&e&&W.test(e.name)&&C.console.warn("jQuery.Deferred exception: "+e.message,e.stack,t)},E.readyException=function(e){C.setTimeout(function(){throw e})};var F=E.Deferred();function $(){S.removeEventListener("DOMContentLoaded",$),C.removeEventListener("load",$),E.ready()}E.fn.ready=function(e){return F.then(e)["catch"](function(e){E.readyException(e)}),this},E.extend({isReady:!1,readyWait:1,ready:function(e){(!0===e?--E.readyWait:E.isReady)||(E.isReady=!0)!==e&&0<--E.readyWait||F.resolveWith(S,[E])}}),E.ready.then=F.then,"complete"===S.readyState||"loading"!==S.readyState&&!S.documentElement.doScroll?C.setTimeout(E.ready):(S.addEventListener("DOMContentLoaded",$),C.addEventListener("load",$));var B=function(e,t,n,r,i,o,a){var s=0,u=e.length,l=null==n;if("object"===w(n))for(s in i=!0,n)B(e,t,s,n[s],!0,o,a);else if(void 0!==r&&(i=!0,m(r)||(a=!0),l&&(a?(t.call(e,r),t=null):(l=t,t=function(e,t,n){return l.call(E(e),n)})),t))for(;s<u;s++)t(e[s],n,a?r:r.call(e[s],s,t(e[s],n)));return i?e:l?t.call(e):u?t(e[0],n):o},_=/^-ms-/,z=/-([a-z])/g;function U(e,t){return t.toUpperCase()}function X(e){return e.replace(_,"ms-").replace(z,U)}var V=function(e){return 1===e.nodeType||9===e.nodeType||!+e.nodeType};function G(){this.expando=E.expando+G.uid++}G.uid=1,G.prototype={cache:function(e){var t=e[this.expando];return t||(t={},V(e)&&(e.nodeType?e[this.expando]=t:Object.defineProperty(e,this.expando,{value:t,configurable:!0}))),t},set:function(e,t,n){var r,i=this.cache(e);if("string"==typeof t)i[X(t)]=n;else for(r in t)i[X(r)]=t[r];return i},get:function(e,t){return void 0===t?this.cache(e):e[this.expando]&&e[this.expando][X(t)]},access:function(e,t,n){return void 0===t||t&&"string"==typeof t&&void 0===n?this.get(e,t):(this.set(e,t,n),void 0!==n?n:t)},remove:function(e,t){var n,r=e[this.expando];if(void 0!==r){if(void 0!==t){n=(t=Array.isArray(t)?t.map(X):(t=X(t))in r?[t]:t.match(P)||[]).length;while(n--)delete r[t[n]]}(void 0===t||E.isEmptyObject(r))&&(e.nodeType?e[this.expando]=void 0:delete e[this.expando])}},hasData:function(e){var t=e[this.expando];return void 0!==t&&!E.isEmptyObject(t)}};var Y=new G,Q=new G,J=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,K=/[A-Z]/g;function Z(e,t,n){var r,i;if(void 0===n&&1===e.nodeType)if(r="data-"+t.replace(K,"-$&").toLowerCase(),"string"==typeof(n=e.getAttribute(r))){try{n="true"===(i=n)||"false"!==i&&("null"===i?null:i===+i+""?+i:J.test(i)?JSON.parse(i):i)}catch(e){}Q.set(e,t,n)}else n=void 0;return n}E.extend({hasData:function(e){return Q.hasData(e)||Y.hasData(e)},data:function(e,t,n){return Q.access(e,t,n)},removeData:function(e,t){Q.remove(e,t)},_data:function(e,t,n){return Y.access(e,t,n)},_removeData:function(e,t){Y.remove(e,t)}}),E.fn.extend({data:function(n,e){var t,r,i,o=this[0],a=o&&o.attributes;if(void 0===n){if(this.length&&(i=Q.get(o),1===o.nodeType&&!Y.get(o,"hasDataAttrs"))){t=a.length;while(t--)a[t]&&0===(r=a[t].name).indexOf("data-")&&(r=X(r.slice(5)),Z(o,r,i[r]));Y.set(o,"hasDataAttrs",!0)}return i}return"object"==typeof n?this.each(function(){Q.set(this,n)}):B(this,function(e){var t;if(o&&void 0===e)return void 0!==(t=Q.get(o,n))?t:void 0!==(t=Z(o,n))?t:void 0;this.each(function(){Q.set(this,n,e)})},null,e,1<arguments.length,null,!0)},removeData:function(e){return this.each(function(){Q.remove(this,e)})}}),E.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=Y.get(e,t),n&&(!r||Array.isArray(n)?r=Y.access(e,t,E.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=E.queue(e,t),r=n.length,i=n.shift(),o=E._queueHooks(e,t);"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,function(){E.dequeue(e,t)},o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return Y.get(e,n)||Y.access(e,n,{empty:E.Callbacks("once memory").add(function(){Y.remove(e,[t+"queue",n])})})}}),E.fn.extend({queue:function(t,n){var e=2;return"string"!=typeof t&&(n=t,t="fx",e--),arguments.length<e?E.queue(this[0],t):void 0===n?this:this.each(function(){var e=E.queue(this,t,n);E._queueHooks(this,t),"fx"===t&&"inprogress"!==e[0]&&E.dequeue(this,t)})},dequeue:function(e){return this.each(function(){E.dequeue(this,e)})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){var n,r=1,i=E.Deferred(),o=this,a=this.length,s=function(){--r||i.resolveWith(o,[o])};"string"!=typeof e&&(t=e,e=void 0),e=e||"fx";while(a--)(n=Y.get(o[a],e+"queueHooks"))&&n.empty&&(r++,n.empty.add(s));return s(),i.promise(t)}});var ee=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,te=new RegExp("^(?:([+-])=|)("+ee+")([a-z%]*)$","i"),ne=["Top","Right","Bottom","Left"],re=S.documentElement,ie=function(e){return E.contains(e.ownerDocument,e)},oe={composed:!0};re.getRootNode&&(ie=function(e){return E.contains(e.ownerDocument,e)||e.getRootNode(oe)===e.ownerDocument});var ae=function(e,t){return"none"===(e=t||e).style.display||""===e.style.display&&ie(e)&&"none"===E.css(e,"display")};function se(e,t,n,r){var i,o,a=20,s=r?function(){return r.cur()}:function(){return E.css(e,t,"")},u=s(),l=n&&n[3]||(E.cssNumber[t]?"":"px"),c=e.nodeType&&(E.cssNumber[t]||"px"!==l&&+u)&&te.exec(E.css(e,t));if(c&&c[3]!==l){u/=2,l=l||c[3],c=+u||1;while(a--)E.style(e,t,c+l),(1-o)*(1-(o=s()/u||.5))<=0&&(a=0),c/=o;c*=2,E.style(e,t,c+l),n=n||[]}return n&&(c=+c||+u||0,i=n[1]?c+(n[1]+1)*n[2]:+n[2],r&&(r.unit=l,r.start=c,r.end=i)),i}var ue={};function le(e,t){for(var n,r,i,o,a,s,u,l=[],c=0,f=e.length;c<f;c++)(r=e[c]).style&&(n=r.style.display,t?("none"===n&&(l[c]=Y.get(r,"display")||null,l[c]||(r.style.display="")),""===r.style.display&&ae(r)&&(l[c]=(u=a=o=void 0,a=(i=r).ownerDocument,s=i.nodeName,(u=ue[s])||(o=a.body.appendChild(a.createElement(s)),u=E.css(o,"display"),o.parentNode.removeChild(o),"none"===u&&(u="block"),ue[s]=u)))):"none"!==n&&(l[c]="none",Y.set(r,"display",n)));for(c=0;c<f;c++)null!=l[c]&&(e[c].style.display=l[c]);return e}E.fn.extend({show:function(){return le(this,!0)},hide:function(){return le(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){ae(this)?E(this).show():E(this).hide()})}});var ce,fe,pe=/^(?:checkbox|radio)$/i,de=/<([a-z][^\/\0>\x20\t\r\n\f]*)/i,he=/^$|^module$|\/(?:java|ecma)script/i;ce=S.createDocumentFragment().appendChild(S.createElement("div")),(fe=S.createElement("input")).setAttribute("type","radio"),fe.setAttribute("checked","checked"),fe.setAttribute("name","t"),ce.appendChild(fe),v.checkClone=ce.cloneNode(!0).cloneNode(!0).lastChild.checked,ce.innerHTML="<textarea>x</textarea>",v.noCloneChecked=!!ce.cloneNode(!0).lastChild.defaultValue,ce.innerHTML="<option></option>",v.option=!!ce.lastChild;var ge={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 ye(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&A(e,t)?E.merge([e],n):n}function ve(e,t){for(var n=0,r=e.length;n<r;n++)Y.set(e[n],"globalEval",!t||Y.get(t[n],"globalEval"))}ge.tbody=ge.tfoot=ge.colgroup=ge.caption=ge.thead,ge.th=ge.td,v.option||(ge.optgroup=ge.option=[1,"<select multiple='multiple'>","</select>"]);var me=/<|&#?\w+;/;function xe(e,t,n,r,i){for(var o,a,s,u,l,c,f=t.createDocumentFragment(),p=[],d=0,h=e.length;d<h;d++)if((o=e[d])||0===o)if("object"===w(o))E.merge(p,o.nodeType?[o]:o);else if(me.test(o)){a=a||f.appendChild(t.createElement("div")),s=(de.exec(o)||["",""])[1].toLowerCase(),u=ge[s]||ge._default,a.innerHTML=u[1]+E.htmlPrefilter(o)+u[2],c=u[0];while(c--)a=a.lastChild;E.merge(p,a.childNodes),(a=f.firstChild).textContent=""}else p.push(t.createTextNode(o));f.textContent="",d=0;while(o=p[d++])if(r&&-1<E.inArray(o,r))i&&i.push(o);else if(l=ie(o),a=ye(f.appendChild(o),"script"),l&&ve(a),n){c=0;while(o=a[c++])he.test(o.type||"")&&n.push(o)}return f}var be=/^([^.]*)(?:\.(.+)|)/;function we(){return!0}function Te(){return!1}function Ce(e,t){return e===function(){try{return S.activeElement}catch(e){}}()==("focus"===t)}function Se(e,t,n,r,i,o){var a,s;if("object"==typeof t){for(s in"string"!=typeof n&&(r=r||n,n=void 0),t)Se(e,s,n,r,t[s],o);return e}if(null==r&&null==i?(i=n,r=n=void 0):null==i&&("string"==typeof n?(i=r,r=void 0):(i=r,r=n,n=void 0)),!1===i)i=Te;else if(!i)return e;return 1===o&&(a=i,(i=function(e){return E().off(e),a.apply(this,arguments)}).guid=a.guid||(a.guid=E.guid++)),e.each(function(){E.event.add(this,t,i,r,n)})}function Ee(e,i,o){o?(Y.set(e,i,!1),E.event.add(e,i,{namespace:!1,handler:function(e){var t,n,r=Y.get(this,i);if(1&e.isTrigger&&this[i]){if(r.length)(E.event.special[i]||{}).delegateType&&e.stopPropagation();else if(r=s.call(arguments),Y.set(this,i,r),t=o(this,i),this[i](),r!==(n=Y.get(this,i))||t?Y.set(this,i,!1):n={},r!==n)return e.stopImmediatePropagation(),e.preventDefault(),n&&n.value}else r.length&&(Y.set(this,i,{value:E.event.trigger(E.extend(r[0],E.Event.prototype),r.slice(1),this)}),e.stopImmediatePropagation())}})):void 0===Y.get(e,i)&&E.event.add(e,i,we)}E.event={global:{},add:function(t,e,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,y=Y.get(t);if(V(t)){n.handler&&(n=(o=n).handler,i=o.selector),i&&E.find.matchesSelector(re,i),n.guid||(n.guid=E.guid++),(u=y.events)||(u=y.events=Object.create(null)),(a=y.handle)||(a=y.handle=function(e){return"undefined"!=typeof E&&E.event.triggered!==e.type?E.event.dispatch.apply(t,arguments):void 0}),l=(e=(e||"").match(P)||[""]).length;while(l--)d=g=(s=be.exec(e[l])||[])[1],h=(s[2]||"").split(".").sort(),d&&(f=E.event.special[d]||{},d=(i?f.delegateType:f.bindType)||d,f=E.event.special[d]||{},c=E.extend({type:d,origType:g,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&E.expr.match.needsContext.test(i),namespace:h.join(".")},o),(p=u[d])||((p=u[d]=[]).delegateCount=0,f.setup&&!1!==f.setup.call(t,r,h,a)||t.addEventListener&&t.addEventListener(d,a)),f.add&&(f.add.call(t,c),c.handler.guid||(c.handler.guid=n.guid)),i?p.splice(p.delegateCount++,0,c):p.push(c),E.event.global[d]=!0)}},remove:function(e,t,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,y=Y.hasData(e)&&Y.get(e);if(y&&(u=y.events)){l=(t=(t||"").match(P)||[""]).length;while(l--)if(d=g=(s=be.exec(t[l])||[])[1],h=(s[2]||"").split(".").sort(),d){f=E.event.special[d]||{},p=u[d=(r?f.delegateType:f.bindType)||d]||[],s=s[2]&&new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=o=p.length;while(o--)c=p[o],!i&&g!==c.origType||n&&n.guid!==c.guid||s&&!s.test(c.namespace)||r&&r!==c.selector&&("**"!==r||!c.selector)||(p.splice(o,1),c.selector&&p.delegateCount--,f.remove&&f.remove.call(e,c));a&&!p.length&&(f.teardown&&!1!==f.teardown.call(e,h,y.handle)||E.removeEvent(e,d,y.handle),delete u[d])}else for(d in u)E.event.remove(e,d+t[l],n,r,!0);E.isEmptyObject(u)&&Y.remove(e,"handle events")}},dispatch:function(e){var t,n,r,i,o,a,s=new Array(arguments.length),u=E.event.fix(e),l=(Y.get(this,"events")||Object.create(null))[u.type]||[],c=E.event.special[u.type]||{};for(s[0]=u,t=1;t<arguments.length;t++)s[t]=arguments[t];if(u.delegateTarget=this,!c.preDispatch||!1!==c.preDispatch.call(this,u)){a=E.event.handlers.call(this,u,l),t=0;while((i=a[t++])&&!u.isPropagationStopped()){u.currentTarget=i.elem,n=0;while((o=i.handlers[n++])&&!u.isImmediatePropagationStopped())u.rnamespace&&!1!==o.namespace&&!u.rnamespace.test(o.namespace)||(u.handleObj=o,u.data=o.data,void 0!==(r=((E.event.special[o.origType]||{}).handle||o.handler).apply(i.elem,s))&&!1===(u.result=r)&&(u.preventDefault(),u.stopPropagation()))}return c.postDispatch&&c.postDispatch.call(this,u),u.result}},handlers:function(e,t){var n,r,i,o,a,s=[],u=t.delegateCount,l=e.target;if(u&&l.nodeType&&!("click"===e.type&&1<=e.button))for(;l!==this;l=l.parentNode||this)if(1===l.nodeType&&("click"!==e.type||!0!==l.disabled)){for(o=[],a={},n=0;n<u;n++)void 0===a[i=(r=t[n]).selector+" "]&&(a[i]=r.needsContext?-1<E(i,this).index(l):E.find(i,this,null,[l]).length),a[i]&&o.push(r);o.length&&s.push({elem:l,handlers:o})}return l=this,u<t.length&&s.push({elem:l,handlers:t.slice(u)}),s},addProp:function(t,e){Object.defineProperty(E.Event.prototype,t,{enumerable:!0,configurable:!0,get:m(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(e){return e[E.expando]?e:new E.Event(e)},special:{load:{noBubble:!0},click:{setup:function(e){var t=this||e;return pe.test(t.type)&&t.click&&A(t,"input")&&Ee(t,"click",we),!1},trigger:function(e){var t=this||e;return pe.test(t.type)&&t.click&&A(t,"input")&&Ee(t,"click"),!0},_default:function(e){var t=e.target;return pe.test(t.type)&&t.click&&A(t,"input")&&Y.get(t,"click")||A(t,"a")}},beforeunload:{postDispatch:function(e){void 0!==e.result&&e.originalEvent&&(e.originalEvent.returnValue=e.result)}}}},E.removeEvent=function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n)},E.Event=function(e,t){if(!(this instanceof E.Event))return new E.Event(e,t);e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||void 0===e.defaultPrevented&&!1===e.returnValue?we:Te,this.target=e.target&&3===e.target.nodeType?e.target.parentNode:e.target,this.currentTarget=e.currentTarget,this.relatedTarget=e.relatedTarget):this.type=e,t&&E.extend(this,t),this.timeStamp=e&&e.timeStamp||Date.now(),this[E.expando]=!0},E.Event.prototype={constructor:E.Event,isDefaultPrevented:Te,isPropagationStopped:Te,isImmediatePropagationStopped:Te,isSimulated:!1,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=we,e&&!this.isSimulated&&e.preventDefault()},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=we,e&&!this.isSimulated&&e.stopPropagation()},stopImmediatePropagation:function(){var e=this.originalEvent;this.isImmediatePropagationStopped=we,e&&!this.isSimulated&&e.stopImmediatePropagation(),this.stopPropagation()}},E.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},E.event.addProp),E.each({focus:"focusin",blur:"focusout"},function(t,e){E.event.special[t]={setup:function(){return Ee(this,t,Ce),!1},trigger:function(){return Ee(this,t),!0},_default:function(e){return Y.get(e.target,t)},delegateType:e}}),E.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(e,i){E.event.special[e]={delegateType:i,bindType:i,handle:function(e){var t,n=e.relatedTarget,r=e.handleObj;return n&&(n===this||E.contains(this,n))||(e.type=r.origType,t=r.handler.apply(this,arguments),e.type=i),t}}}),E.fn.extend({on:function(e,t,n,r){return Se(this,e,t,n,r)},one:function(e,t,n,r){return Se(this,e,t,n,r,1)},off:function(e,t,n){var r,i;if(e&&e.preventDefault&&e.handleObj)return r=e.handleObj,E(e.delegateTarget).off(r.namespace?r.origType+"."+r.namespace:r.origType,r.selector,r.handler),this;if("object"==typeof e){for(i in e)this.off(i,t,e[i]);return this}return!1!==t&&"function"!=typeof t||(n=t,t=void 0),!1===n&&(n=Te),this.each(function(){E.event.remove(this,e,n,t)})}});var ke=/<script|<style|<link/i,Ae=/checked\s*(?:[^=]|=\s*.checked.)/i,Ne=/^\s*<!\[CDATA\[|\]\]>\s*$/g;function je(e,t){return A(e,"table")&&A(11!==t.nodeType?t:t.firstChild,"tr")&&E(e).children("tbody")[0]||e}function De(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function qe(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Le(e,t){var n,r,i,o,a,s;if(1===t.nodeType){if(Y.hasData(e)&&(s=Y.get(e).events))for(i in Y.remove(t,"handle events"),s)for(n=0,r=s[i].length;n<r;n++)E.event.add(t,i,s[i][n]);Q.hasData(e)&&(o=Q.access(e),a=E.extend({},o),Q.set(t,a))}}function He(n,r,i,o){r=g(r);var e,t,a,s,u,l,c=0,f=n.length,p=f-1,d=r[0],h=m(d);if(h||1<f&&"string"==typeof d&&!v.checkClone&&Ae.test(d))return n.each(function(e){var t=n.eq(e);h&&(r[0]=d.call(this,e,t.html())),He(t,r,i,o)});if(f&&(t=(e=xe(r,n[0].ownerDocument,!1,n,o)).firstChild,1===e.childNodes.length&&(e=t),t||o)){for(s=(a=E.map(ye(e,"script"),De)).length;c<f;c++)u=e,c!==p&&(u=E.clone(u,!0,!0),s&&E.merge(a,ye(u,"script"))),i.call(n[c],u,c);if(s)for(l=a[a.length-1].ownerDocument,E.map(a,qe),c=0;c<s;c++)u=a[c],he.test(u.type||"")&&!Y.access(u,"globalEval")&&E.contains(l,u)&&(u.src&&"module"!==(u.type||"").toLowerCase()?E._evalUrl&&!u.noModule&&E._evalUrl(u.src,{nonce:u.nonce||u.getAttribute("nonce")},l):b(u.textContent.replace(Ne,""),u,l))}return n}function Oe(e,t,n){for(var r,i=t?E.filter(t,e):e,o=0;null!=(r=i[o]);o++)n||1!==r.nodeType||E.cleanData(ye(r)),r.parentNode&&(n&&ie(r)&&ve(ye(r,"script")),r.parentNode.removeChild(r));return e}E.extend({htmlPrefilter:function(e){return e},clone:function(e,t,n){var r,i,o,a,s,u,l,c=e.cloneNode(!0),f=ie(e);if(!(v.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||E.isXMLDoc(e)))for(a=ye(c),r=0,i=(o=ye(e)).length;r<i;r++)s=o[r],u=a[r],void 0,"input"===(l=u.nodeName.toLowerCase())&&pe.test(s.type)?u.checked=s.checked:"input"!==l&&"textarea"!==l||(u.defaultValue=s.defaultValue);if(t)if(n)for(o=o||ye(e),a=a||ye(c),r=0,i=o.length;r<i;r++)Le(o[r],a[r]);else Le(e,c);return 0<(a=ye(c,"script")).length&&ve(a,!f&&ye(e,"script")),c},cleanData:function(e){for(var t,n,r,i=E.event.special,o=0;void 0!==(n=e[o]);o++)if(V(n)){if(t=n[Y.expando]){if(t.events)for(r in t.events)i[r]?E.event.remove(n,r):E.removeEvent(n,r,t.handle);n[Y.expando]=void 0}n[Q.expando]&&(n[Q.expando]=void 0)}}}),E.fn.extend({detach:function(e){return Oe(this,e,!0)},remove:function(e){return Oe(this,e)},text:function(e){return B(this,function(e){return void 0===e?E.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=e)})},null,e,arguments.length)},append:function(){return He(this,arguments,function(e){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||je(this,e).appendChild(e)})},prepend:function(){return He(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=je(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return He(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return He(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(E.cleanData(ye(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map(function(){return E.clone(this,e,t)})},html:function(e){return B(this,function(e){var t=this[0]||{},n=0,r=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!ke.test(e)&&!ge[(de.exec(e)||["",""])[1].toLowerCase()]){e=E.htmlPrefilter(e);try{for(;n<r;n++)1===(t=this[n]||{}).nodeType&&(E.cleanData(ye(t,!1)),t.innerHTML=e);t=0}catch(e){}}t&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var n=[];return He(this,arguments,function(e){var t=this.parentNode;E.inArray(this,n)<0&&(E.cleanData(ye(this)),t&&t.replaceChild(e,this))},n)}}),E.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,a){E.fn[e]=function(e){for(var t,n=[],r=E(e),i=r.length-1,o=0;o<=i;o++)t=o===i?this:this.clone(!0),E(r[o])[a](t),u.apply(n,t.get());return this.pushStack(n)}});var Pe=new RegExp("^("+ee+")(?!px)[a-z%]+$","i"),Re=/^--/,Me=function(e){var t=e.ownerDocument.defaultView;return t&&t.opener||(t=C),t.getComputedStyle(e)},Ie=function(e,t,n){var r,i,o={};for(i in t)o[i]=e.style[i],e.style[i]=t[i];for(i in r=n.call(e),t)e.style[i]=o[i];return r},We=new RegExp(ne.join("|"),"i"),Fe="[\\x20\\t\\r\\n\\f]",$e=new RegExp("^"+Fe+"+|((?:^|[^\\\\])(?:\\\\.)*)"+Fe+"+$","g");function Be(e,t,n){var r,i,o,a,s=Re.test(t),u=e.style;return(n=n||Me(e))&&(a=n.getPropertyValue(t)||n[t],s&&a&&(a=a.replace($e,"$1")||void 0),""!==a||ie(e)||(a=E.style(e,t)),!v.pixelBoxStyles()&&Pe.test(a)&&We.test(t)&&(r=u.width,i=u.minWidth,o=u.maxWidth,u.minWidth=u.maxWidth=u.width=a,a=n.width,u.width=r,u.minWidth=i,u.maxWidth=o)),void 0!==a?a+"":a}function _e(e,t){return{get:function(){if(!e())return(this.get=t).apply(this,arguments);delete this.get}}}!function(){function e(){if(l){u.style.cssText="position:absolute;left:-11111px;width:60px;margin-top:1px;padding:0;border:0",l.style.cssText="position:relative;display:block;box-sizing:border-box;overflow:scroll;margin:auto;border:1px;padding:1px;width:60%;top:1%",re.appendChild(u).appendChild(l);var e=C.getComputedStyle(l);n="1%"!==e.top,s=12===t(e.marginLeft),l.style.right="60%",o=36===t(e.right),r=36===t(e.width),l.style.position="absolute",i=12===t(l.offsetWidth/3),re.removeChild(u),l=null}}function t(e){return Math.round(parseFloat(e))}var n,r,i,o,a,s,u=S.createElement("div"),l=S.createElement("div");l.style&&(l.style.backgroundClip="content-box",l.cloneNode(!0).style.backgroundClip="",v.clearCloneStyle="content-box"===l.style.backgroundClip,E.extend(v,{boxSizingReliable:function(){return e(),r},pixelBoxStyles:function(){return e(),o},pixelPosition:function(){return e(),n},reliableMarginLeft:function(){return e(),s},scrollboxSize:function(){return e(),i},reliableTrDimensions:function(){var e,t,n,r;return null==a&&(e=S.createElement("table"),t=S.createElement("tr"),n=S.createElement("div"),e.style.cssText="position:absolute;left:-11111px;border-collapse:separate",t.style.cssText="border:1px solid",t.style.height="1px",n.style.height="9px",n.style.display="block",re.appendChild(e).appendChild(t).appendChild(n),r=C.getComputedStyle(t),a=parseInt(r.height,10)+parseInt(r.borderTopWidth,10)+parseInt(r.borderBottomWidth,10)===t.offsetHeight,re.removeChild(e)),a}}))}();var ze=["Webkit","Moz","ms"],Ue=S.createElement("div").style,Xe={};function Ve(e){var t=E.cssProps[e]||Xe[e];return t||(e in Ue?e:Xe[e]=function(e){var t=e[0].toUpperCase()+e.slice(1),n=ze.length;while(n--)if((e=ze[n]+t)in Ue)return e}(e)||e)}var Ge=/^(none|table(?!-c[ea]).+)/,Ye={position:"absolute",visibility:"hidden",display:"block"},Qe={letterSpacing:"0",fontWeight:"400"};function Je(e,t,n){var r=te.exec(t);return r?Math.max(0,r[2]-(n||0))+(r[3]||"px"):t}function Ke(e,t,n,r,i,o){var a="width"===t?1:0,s=0,u=0;if(n===(r?"border":"content"))return 0;for(;a<4;a+=2)"margin"===n&&(u+=E.css(e,n+ne[a],!0,i)),r?("content"===n&&(u-=E.css(e,"padding"+ne[a],!0,i)),"margin"!==n&&(u-=E.css(e,"border"+ne[a]+"Width",!0,i))):(u+=E.css(e,"padding"+ne[a],!0,i),"padding"!==n?u+=E.css(e,"border"+ne[a]+"Width",!0,i):s+=E.css(e,"border"+ne[a]+"Width",!0,i));return!r&&0<=o&&(u+=Math.max(0,Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-o-u-s-.5))||0),u}function Ze(e,t,n){var r=Me(e),i=(!v.boxSizingReliable()||n)&&"border-box"===E.css(e,"boxSizing",!1,r),o=i,a=Be(e,t,r),s="offset"+t[0].toUpperCase()+t.slice(1);if(Pe.test(a)){if(!n)return a;a="auto"}return(!v.boxSizingReliable()&&i||!v.reliableTrDimensions()&&A(e,"tr")||"auto"===a||!parseFloat(a)&&"inline"===E.css(e,"display",!1,r))&&e.getClientRects().length&&(i="border-box"===E.css(e,"boxSizing",!1,r),(o=s in e)&&(a=e[s])),(a=parseFloat(a)||0)+Ke(e,t,n||(i?"border":"content"),o,r,a)+"px"}function et(e,t,n,r,i){return new et.prototype.init(e,t,n,r,i)}E.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Be(e,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{},style:function(e,t,n,r){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var i,o,a,s=X(t),u=Re.test(t),l=e.style;if(u||(t=Ve(s)),a=E.cssHooks[t]||E.cssHooks[s],void 0===n)return a&&"get"in a&&void 0!==(i=a.get(e,!1,r))?i:l[t];"string"===(o=typeof n)&&(i=te.exec(n))&&i[1]&&(n=se(e,t,i),o="number"),null!=n&&n==n&&("number"!==o||u||(n+=i&&i[3]||(E.cssNumber[s]?"":"px")),v.clearCloneStyle||""!==n||0!==t.indexOf("background")||(l[t]="inherit"),a&&"set"in a&&void 0===(n=a.set(e,n,r))||(u?l.setProperty(t,n):l[t]=n))}},css:function(e,t,n,r){var i,o,a,s=X(t);return Re.test(t)||(t=Ve(s)),(a=E.cssHooks[t]||E.cssHooks[s])&&"get"in a&&(i=a.get(e,!0,n)),void 0===i&&(i=Be(e,t,r)),"normal"===i&&t in Qe&&(i=Qe[t]),""===n||n?(o=parseFloat(i),!0===n||isFinite(o)?o||0:i):i}}),E.each(["height","width"],function(e,u){E.cssHooks[u]={get:function(e,t,n){if(t)return!Ge.test(E.css(e,"display"))||e.getClientRects().length&&e.getBoundingClientRect().width?Ze(e,u,n):Ie(e,Ye,function(){return Ze(e,u,n)})},set:function(e,t,n){var r,i=Me(e),o=!v.scrollboxSize()&&"absolute"===i.position,a=(o||n)&&"border-box"===E.css(e,"boxSizing",!1,i),s=n?Ke(e,u,n,a,i):0;return a&&o&&(s-=Math.ceil(e["offset"+u[0].toUpperCase()+u.slice(1)]-parseFloat(i[u])-Ke(e,u,"border",!1,i)-.5)),s&&(r=te.exec(t))&&"px"!==(r[3]||"px")&&(e.style[u]=t,t=E.css(e,u)),Je(0,t,s)}}}),E.cssHooks.marginLeft=_e(v.reliableMarginLeft,function(e,t){if(t)return(parseFloat(Be(e,"marginLeft"))||e.getBoundingClientRect().left-Ie(e,{marginLeft:0},function(){return e.getBoundingClientRect().left}))+"px"}),E.each({margin:"",padding:"",border:"Width"},function(i,o){E.cssHooks[i+o]={expand:function(e){for(var t=0,n={},r="string"==typeof e?e.split(" "):[e];t<4;t++)n[i+ne[t]+o]=r[t]||r[t-2]||r[0];return n}},"margin"!==i&&(E.cssHooks[i+o].set=Je)}),E.fn.extend({css:function(e,t){return B(this,function(e,t,n){var r,i,o={},a=0;if(Array.isArray(t)){for(r=Me(e),i=t.length;a<i;a++)o[t[a]]=E.css(e,t[a],!1,r);return o}return void 0!==n?E.style(e,t,n):E.css(e,t)},e,t,1<arguments.length)}}),((E.Tween=et).prototype={constructor:et,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||E.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(E.cssNumber[n]?"":"px")},cur:function(){var e=et.propHooks[this.prop];return e&&e.get?e.get(this):et.propHooks._default.get(this)},run:function(e){var t,n=et.propHooks[this.prop];return this.options.duration?this.pos=t=E.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):et.propHooks._default.set(this),this}}).init.prototype=et.prototype,(et.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=E.css(e.elem,e.prop,""))&&"auto"!==t?t:0},set:function(e){E.fx.step[e.prop]?E.fx.step[e.prop](e):1!==e.elem.nodeType||!E.cssHooks[e.prop]&&null==e.elem.style[Ve(e.prop)]?e.elem[e.prop]=e.now:E.style(e.elem,e.prop,e.now+e.unit)}}}).scrollTop=et.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},E.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},E.fx=et.prototype.init,E.fx.step={};var tt,nt,rt,it,ot=/^(?:toggle|show|hide)$/,at=/queueHooks$/;function st(){nt&&(!1===S.hidden&&C.requestAnimationFrame?C.requestAnimationFrame(st):C.setTimeout(st,E.fx.interval),E.fx.tick())}function ut(){return C.setTimeout(function(){tt=void 0}),tt=Date.now()}function lt(e,t){var n,r=0,i={height:e};for(t=t?1:0;r<4;r+=2-t)i["margin"+(n=ne[r])]=i["padding"+n]=e;return t&&(i.opacity=i.width=e),i}function ct(e,t,n){for(var r,i=(ft.tweeners[t]||[]).concat(ft.tweeners["*"]),o=0,a=i.length;o<a;o++)if(r=i[o].call(n,t,e))return r}function ft(o,e,t){var n,a,r=0,i=ft.prefilters.length,s=E.Deferred().always(function(){delete u.elem}),u=function(){if(a)return!1;for(var e=tt||ut(),t=Math.max(0,l.startTime+l.duration-e),n=1-(t/l.duration||0),r=0,i=l.tweens.length;r<i;r++)l.tweens[r].run(n);return s.notifyWith(o,[l,n,t]),n<1&&i?t:(i||s.notifyWith(o,[l,1,0]),s.resolveWith(o,[l]),!1)},l=s.promise({elem:o,props:E.extend({},e),opts:E.extend(!0,{specialEasing:{},easing:E.easing._default},t),originalProperties:e,originalOptions:t,startTime:tt||ut(),duration:t.duration,tweens:[],createTween:function(e,t){var n=E.Tween(o,l.opts,e,t,l.opts.specialEasing[e]||l.opts.easing);return l.tweens.push(n),n},stop:function(e){var t=0,n=e?l.tweens.length:0;if(a)return this;for(a=!0;t<n;t++)l.tweens[t].run(1);return e?(s.notifyWith(o,[l,1,0]),s.resolveWith(o,[l,e])):s.rejectWith(o,[l,e]),this}}),c=l.props;for(!function(e,t){var n,r,i,o,a;for(n in e)if(i=t[r=X(n)],o=e[n],Array.isArray(o)&&(i=o[1],o=e[n]=o[0]),n!==r&&(e[r]=o,delete e[n]),(a=E.cssHooks[r])&&"expand"in a)for(n in o=a.expand(o),delete e[r],o)n in e||(e[n]=o[n],t[n]=i);else t[r]=i}(c,l.opts.specialEasing);r<i;r++)if(n=ft.prefilters[r].call(l,o,c,l.opts))return m(n.stop)&&(E._queueHooks(l.elem,l.opts.queue).stop=n.stop.bind(n)),n;return E.map(c,ct,l),m(l.opts.start)&&l.opts.start.call(o,l),l.progress(l.opts.progress).done(l.opts.done,l.opts.complete).fail(l.opts.fail).always(l.opts.always),E.fx.timer(E.extend(u,{elem:o,anim:l,queue:l.opts.queue})),l}E.Animation=E.extend(ft,{tweeners:{"*":[function(e,t){var n=this.createTween(e,t);return se(n.elem,e,te.exec(t),n),n}]},tweener:function(e,t){m(e)?(t=e,e=["*"]):e=e.match(P);for(var n,r=0,i=e.length;r<i;r++)n=e[r],ft.tweeners[n]=ft.tweeners[n]||[],ft.tweeners[n].unshift(t)},prefilters:[function(e,t,n){var r,i,o,a,s,u,l,c,f="width"in t||"height"in t,p=this,d={},h=e.style,g=e.nodeType&&ae(e),y=Y.get(e,"fxshow");for(r in n.queue||(null==(a=E._queueHooks(e,"fx")).unqueued&&(a.unqueued=0,s=a.empty.fire,a.empty.fire=function(){a.unqueued||s()}),a.unqueued++,p.always(function(){p.always(function(){a.unqueued--,E.queue(e,"fx").length||a.empty.fire()})})),t)if(i=t[r],ot.test(i)){if(delete t[r],o=o||"toggle"===i,i===(g?"hide":"show")){if("show"!==i||!y||void 0===y[r])continue;g=!0}d[r]=y&&y[r]||E.style(e,r)}if((u=!E.isEmptyObject(t))||!E.isEmptyObject(d))for(r in f&&1===e.nodeType&&(n.overflow=[h.overflow,h.overflowX,h.overflowY],null==(l=y&&y.display)&&(l=Y.get(e,"display")),"none"===(c=E.css(e,"display"))&&(l?c=l:(le([e],!0),l=e.style.display||l,c=E.css(e,"display"),le([e]))),("inline"===c||"inline-block"===c&&null!=l)&&"none"===E.css(e,"float")&&(u||(p.done(function(){h.display=l}),null==l&&(c=h.display,l="none"===c?"":c)),h.display="inline-block")),n.overflow&&(h.overflow="hidden",p.always(function(){h.overflow=n.overflow[0],h.overflowX=n.overflow[1],h.overflowY=n.overflow[2]})),u=!1,d)u||(y?"hidden"in y&&(g=y.hidden):y=Y.access(e,"fxshow",{display:l}),o&&(y.hidden=!g),g&&le([e],!0),p.done(function(){for(r in g||le([e]),Y.remove(e,"fxshow"),d)E.style(e,r,d[r])})),u=ct(g?y[r]:0,r,p),r in y||(y[r]=u.start,g&&(u.end=u.start,u.start=0))}],prefilter:function(e,t){t?ft.prefilters.unshift(e):ft.prefilters.push(e)}}),E.speed=function(e,t,n){var r=e&&"object"==typeof e?E.extend({},e):{complete:n||!n&&t||m(e)&&e,duration:e,easing:n&&t||t&&!m(t)&&t};return E.fx.off?r.duration=0:"number"!=typeof r.duration&&(r.duration in E.fx.speeds?r.duration=E.fx.speeds[r.duration]:r.duration=E.fx.speeds._default),null!=r.queue&&!0!==r.queue||(r.queue="fx"),r.old=r.complete,r.complete=function(){m(r.old)&&r.old.call(this),r.queue&&E.dequeue(this,r.queue)},r},E.fn.extend({fadeTo:function(e,t,n,r){return this.filter(ae).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(t,e,n,r){var i=E.isEmptyObject(t),o=E.speed(e,n,r),a=function(){var e=ft(this,E.extend({},t),o);(i||Y.get(this,"finish"))&&e.stop(!0)};return a.finish=a,i||!1===o.queue?this.each(a):this.queue(o.queue,a)},stop:function(i,e,o){var a=function(e){var t=e.stop;delete e.stop,t(o)};return"string"!=typeof i&&(o=e,e=i,i=void 0),e&&this.queue(i||"fx",[]),this.each(function(){var e=!0,t=null!=i&&i+"queueHooks",n=E.timers,r=Y.get(this);if(t)r[t]&&r[t].stop&&a(r[t]);else for(t in r)r[t]&&r[t].stop&&at.test(t)&&a(r[t]);for(t=n.length;t--;)n[t].elem!==this||null!=i&&n[t].queue!==i||(n[t].anim.stop(o),e=!1,n.splice(t,1));!e&&o||E.dequeue(this,i)})},finish:function(a){return!1!==a&&(a=a||"fx"),this.each(function(){var e,t=Y.get(this),n=t[a+"queue"],r=t[a+"queueHooks"],i=E.timers,o=n?n.length:0;for(t.finish=!0,E.queue(this,a,[]),r&&r.stop&&r.stop.call(this,!0),e=i.length;e--;)i[e].elem===this&&i[e].queue===a&&(i[e].anim.stop(!0),i.splice(e,1));for(e=0;e<o;e++)n[e]&&n[e].finish&&n[e].finish.call(this);delete t.finish})}}),E.each(["toggle","show","hide"],function(e,r){var i=E.fn[r];E.fn[r]=function(e,t,n){return null==e||"boolean"==typeof e?i.apply(this,arguments):this.animate(lt(r,!0),e,t,n)}}),E.each({slideDown:lt("show"),slideUp:lt("hide"),slideToggle:lt("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,r){E.fn[e]=function(e,t,n){return this.animate(r,e,t,n)}}),E.timers=[],E.fx.tick=function(){var e,t=0,n=E.timers;for(tt=Date.now();t<n.length;t++)(e=n[t])()||n[t]!==e||n.splice(t--,1);n.length||E.fx.stop(),tt=void 0},E.fx.timer=function(e){E.timers.push(e),E.fx.start()},E.fx.interval=13,E.fx.start=function(){nt||(nt=!0,st())},E.fx.stop=function(){nt=null},E.fx.speeds={slow:600,fast:200,_default:400},E.fn.delay=function(r,e){return r=E.fx&&E.fx.speeds[r]||r,e=e||"fx",this.queue(e,function(e,t){var n=C.setTimeout(e,r);t.stop=function(){C.clearTimeout(n)}})},rt=S.createElement("input"),it=S.createElement("select").appendChild(S.createElement("option")),rt.type="checkbox",v.checkOn=""!==rt.value,v.optSelected=it.selected,(rt=S.createElement("input")).value="t",rt.type="radio",v.radioValue="t"===rt.value;var pt,dt=E.expr.attrHandle;E.fn.extend({attr:function(e,t){return B(this,E.attr,e,t,1<arguments.length)},removeAttr:function(e){return this.each(function(){E.removeAttr(this,e)})}}),E.extend({attr:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return"undefined"==typeof e.getAttribute?E.prop(e,t,n):(1===o&&E.isXMLDoc(e)||(i=E.attrHooks[t.toLowerCase()]||(E.expr.match.bool.test(t)?pt:void 0)),void 0!==n?null===n?void E.removeAttr(e,t):i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:(e.setAttribute(t,n+""),n):i&&"get"in i&&null!==(r=i.get(e,t))?r:null==(r=E.find.attr(e,t))?void 0:r)},attrHooks:{type:{set:function(e,t){if(!v.radioValue&&"radio"===t&&A(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,r=0,i=t&&t.match(P);if(i&&1===e.nodeType)while(n=i[r++])e.removeAttribute(n)}}),pt={set:function(e,t,n){return!1===t?E.removeAttr(e,n):e.setAttribute(n,n),n}},E.each(E.expr.match.bool.source.match(/\w+/g),function(e,t){var a=dt[t]||E.find.attr;dt[t]=function(e,t,n){var r,i,o=t.toLowerCase();return n||(i=dt[o],dt[o]=r,r=null!=a(e,t,n)?o:null,dt[o]=i),r}});var ht=/^(?:input|select|textarea|button)$/i,gt=/^(?:a|area)$/i;function yt(e){return(e.match(P)||[]).join(" ")}function vt(e){return e.getAttribute&&e.getAttribute("class")||""}function mt(e){return Array.isArray(e)?e:"string"==typeof e&&e.match(P)||[]}E.fn.extend({prop:function(e,t){return B(this,E.prop,e,t,1<arguments.length)},removeProp:function(e){return this.each(function(){delete this[E.propFix[e]||e]})}}),E.extend({prop:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&E.isXMLDoc(e)||(t=E.propFix[t]||t,i=E.propHooks[t]),void 0!==n?i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:e[t]=n:i&&"get"in i&&null!==(r=i.get(e,t))?r:e[t]},propHooks:{tabIndex:{get:function(e){var t=E.find.attr(e,"tabindex");return t?parseInt(t,10):ht.test(e.nodeName)||gt.test(e.nodeName)&&e.href?0:-1}}},propFix:{"for":"htmlFor","class":"className"}}),v.optSelected||(E.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),E.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){E.propFix[this.toLowerCase()]=this}),E.fn.extend({addClass:function(t){var e,n,r,i,o,a;return m(t)?this.each(function(e){E(this).addClass(t.call(this,e,vt(this)))}):(e=mt(t)).length?this.each(function(){if(r=vt(this),n=1===this.nodeType&&" "+yt(r)+" "){for(o=0;o<e.length;o++)i=e[o],n.indexOf(" "+i+" ")<0&&(n+=i+" ");a=yt(n),r!==a&&this.setAttribute("class",a)}}):this},removeClass:function(t){var e,n,r,i,o,a;return m(t)?this.each(function(e){E(this).removeClass(t.call(this,e,vt(this)))}):arguments.length?(e=mt(t)).length?this.each(function(){if(r=vt(this),n=1===this.nodeType&&" "+yt(r)+" "){for(o=0;o<e.length;o++){i=e[o];while(-1<n.indexOf(" "+i+" "))n=n.replace(" "+i+" "," ")}a=yt(n),r!==a&&this.setAttribute("class",a)}}):this:this.attr("class","")},toggleClass:function(t,n){var e,r,i,o,a=typeof t,s="string"===a||Array.isArray(t);return m(t)?this.each(function(e){E(this).toggleClass(t.call(this,e,vt(this),n),n)}):"boolean"==typeof n&&s?n?this.addClass(t):this.removeClass(t):(e=mt(t),this.each(function(){if(s)for(o=E(this),i=0;i<e.length;i++)r=e[i],o.hasClass(r)?o.removeClass(r):o.addClass(r);else void 0!==t&&"boolean"!==a||((r=vt(this))&&Y.set(this,"__className__",r),this.setAttribute&&this.setAttribute("class",r||!1===t?"":Y.get(this,"__className__")||""))}))},hasClass:function(e){var t,n,r=0;t=" "+e+" ";while(n=this[r++])if(1===n.nodeType&&-1<(" "+yt(vt(n))+" ").indexOf(t))return!0;return!1}});var xt=/\r/g;E.fn.extend({val:function(n){var r,e,i,t=this[0];return arguments.length?(i=m(n),this.each(function(e){var t;1===this.nodeType&&(null==(t=i?n.call(this,e,E(this).val()):n)?t="":"number"==typeof t?t+="":Array.isArray(t)&&(t=E.map(t,function(e){return null==e?"":e+""})),(r=E.valHooks[this.type]||E.valHooks[this.nodeName.toLowerCase()])&&"set"in r&&void 0!==r.set(this,t,"value")||(this.value=t))})):t?(r=E.valHooks[t.type]||E.valHooks[t.nodeName.toLowerCase()])&&"get"in r&&void 0!==(e=r.get(t,"value"))?e:"string"==typeof(e=t.value)?e.replace(xt,""):null==e?"":e:void 0}}),E.extend({valHooks:{option:{get:function(e){var t=E.find.attr(e,"value");return null!=t?t:yt(E.text(e))}},select:{get:function(e){var t,n,r,i=e.options,o=e.selectedIndex,a="select-one"===e.type,s=a?null:[],u=a?o+1:i.length;for(r=o<0?u:a?o:0;r<u;r++)if(((n=i[r]).selected||r===o)&&!n.disabled&&(!n.parentNode.disabled||!A(n.parentNode,"optgroup"))){if(t=E(n).val(),a)return t;s.push(t)}return s},set:function(e,t){var n,r,i=e.options,o=E.makeArray(t),a=i.length;while(a--)((r=i[a]).selected=-1<E.inArray(E.valHooks.option.get(r),o))&&(n=!0);return n||(e.selectedIndex=-1),o}}}}),E.each(["radio","checkbox"],function(){E.valHooks[this]={set:function(e,t){if(Array.isArray(t))return e.checked=-1<E.inArray(E(e).val(),t)}},v.checkOn||(E.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})}),v.focusin="onfocusin"in C;var bt=/^(?:focusinfocus|focusoutblur)$/,wt=function(e){e.stopPropagation()};E.extend(E.event,{trigger:function(e,t,n,r){var i,o,a,s,u,l,c,f,p=[n||S],d=y.call(e,"type")?e.type:e,h=y.call(e,"namespace")?e.namespace.split("."):[];if(o=f=a=n=n||S,3!==n.nodeType&&8!==n.nodeType&&!bt.test(d+E.event.triggered)&&(-1<d.indexOf(".")&&(d=(h=d.split(".")).shift(),h.sort()),u=d.indexOf(":")<0&&"on"+d,(e=e[E.expando]?e:new E.Event(d,"object"==typeof e&&e)).isTrigger=r?2:3,e.namespace=h.join("."),e.rnamespace=e.namespace?new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=void 0,e.target||(e.target=n),t=null==t?[e]:E.makeArray(t,[e]),c=E.event.special[d]||{},r||!c.trigger||!1!==c.trigger.apply(n,t))){if(!r&&!c.noBubble&&!x(n)){for(s=c.delegateType||d,bt.test(s+d)||(o=o.parentNode);o;o=o.parentNode)p.push(o),a=o;a===(n.ownerDocument||S)&&p.push(a.defaultView||a.parentWindow||C)}i=0;while((o=p[i++])&&!e.isPropagationStopped())f=o,e.type=1<i?s:c.bindType||d,(l=(Y.get(o,"events")||Object.create(null))[e.type]&&Y.get(o,"handle"))&&l.apply(o,t),(l=u&&o[u])&&l.apply&&V(o)&&(e.result=l.apply(o,t),!1===e.result&&e.preventDefault());return e.type=d,r||e.isDefaultPrevented()||c._default&&!1!==c._default.apply(p.pop(),t)||!V(n)||u&&m(n[d])&&!x(n)&&((a=n[u])&&(n[u]=null),E.event.triggered=d,e.isPropagationStopped()&&f.addEventListener(d,wt),n[d](),e.isPropagationStopped()&&f.removeEventListener(d,wt),E.event.triggered=void 0,a&&(n[u]=a)),e.result}},simulate:function(e,t,n){var r=E.extend(new E.Event,n,{type:e,isSimulated:!0});E.event.trigger(r,null,t)}}),E.fn.extend({trigger:function(e,t){return this.each(function(){E.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];if(n)return E.event.trigger(e,t,n,!0)}}),v.focusin||E.each({focus:"focusin",blur:"focusout"},function(n,r){var i=function(e){E.event.simulate(r,e.target,E.event.fix(e))};E.event.special[r]={setup:function(){var e=this.ownerDocument||this.document||this,t=Y.access(e,r);t||e.addEventListener(n,i,!0),Y.access(e,r,(t||0)+1)},teardown:function(){var e=this.ownerDocument||this.document||this,t=Y.access(e,r)-1;t?Y.access(e,r,t):(e.removeEventListener(n,i,!0),Y.remove(e,r))}}});var Tt=C.location,Ct={guid:Date.now()},St=/\?/;E.parseXML=function(e){var t,n;if(!e||"string"!=typeof e)return null;try{t=(new C.DOMParser).parseFromString(e,"text/xml")}catch(e){}return n=t&&t.getElementsByTagName("parsererror")[0],t&&!n||E.error("Invalid XML: "+(n?E.map(n.childNodes,function(e){return e.textContent}).join("\n"):e)),t};var Et=/\[\]$/,kt=/\r?\n/g,At=/^(?:submit|button|image|reset|file)$/i,Nt=/^(?:input|select|textarea|keygen)/i;function jt(n,e,r,i){var t;if(Array.isArray(e))E.each(e,function(e,t){r||Et.test(n)?i(n,t):jt(n+"["+("object"==typeof t&&null!=t?e:"")+"]",t,r,i)});else if(r||"object"!==w(e))i(n,e);else for(t in e)jt(n+"["+t+"]",e[t],r,i)}E.param=function(e,t){var n,r=[],i=function(e,t){var n=m(t)?t():t;r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(null==n?"":n)};if(null==e)return"";if(Array.isArray(e)||e.jquery&&!E.isPlainObject(e))E.each(e,function(){i(this.name,this.value)});else for(n in e)jt(n,e[n],t,i);return r.join("&")},E.fn.extend({serialize:function(){return E.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=E.prop(this,"elements");return e?E.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!E(this).is(":disabled")&&Nt.test(this.nodeName)&&!At.test(e)&&(this.checked||!pe.test(e))}).map(function(e,t){var n=E(this).val();return null==n?null:Array.isArray(n)?E.map(n,function(e){return{name:t.name,value:e.replace(kt,"\r\n")}}):{name:t.name,value:n.replace(kt,"\r\n")}}).get()}});var Dt=/%20/g,qt=/#.*$/,Lt=/([?&])_=[^&]*/,Ht=/^(.*?):[ \t]*([^\r\n]*)$/gm,Ot=/^(?:GET|HEAD)$/,Pt=/^\/\//,Rt={},Mt={},It="*/".concat("*"),Wt=S.createElement("a");function Ft(o){return function(e,t){"string"!=typeof e&&(t=e,e="*");var n,r=0,i=e.toLowerCase().match(P)||[];if(m(t))while(n=i[r++])"+"===n[0]?(n=n.slice(1)||"*",(o[n]=o[n]||[]).unshift(t)):(o[n]=o[n]||[]).push(t)}}function $t(t,i,o,a){var s={},u=t===Mt;function l(e){var r;return s[e]=!0,E.each(t[e]||[],function(e,t){var n=t(i,o,a);return"string"!=typeof n||u||s[n]?u?!(r=n):void 0:(i.dataTypes.unshift(n),l(n),!1)}),r}return l(i.dataTypes[0])||!s["*"]&&l("*")}function Bt(e,t){var n,r,i=E.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((i[n]?e:r||(r={}))[n]=t[n]);return r&&E.extend(!0,e,r),e}Wt.href=Tt.href,E.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Tt.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(Tt.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":It,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":E.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?Bt(Bt(e,E.ajaxSettings),t):Bt(E.ajaxSettings,e)},ajaxPrefilter:Ft(Rt),ajaxTransport:Ft(Mt),ajax:function(e,t){"object"==typeof e&&(t=e,e=void 0),t=t||{};var c,f,p,n,d,r,h,g,i,o,y=E.ajaxSetup({},t),v=y.context||y,m=y.context&&(v.nodeType||v.jquery)?E(v):E.event,x=E.Deferred(),b=E.Callbacks("once memory"),w=y.statusCode||{},a={},s={},u="canceled",T={readyState:0,getResponseHeader:function(e){var t;if(h){if(!n){n={};while(t=Ht.exec(p))n[t[1].toLowerCase()+" "]=(n[t[1].toLowerCase()+" "]||[]).concat(t[2])}t=n[e.toLowerCase()+" "]}return null==t?null:t.join(", ")},getAllResponseHeaders:function(){return h?p:null},setRequestHeader:function(e,t){return null==h&&(e=s[e.toLowerCase()]=s[e.toLowerCase()]||e,a[e]=t),this},overrideMimeType:function(e){return null==h&&(y.mimeType=e),this},statusCode:function(e){var t;if(e)if(h)T.always(e[T.status]);else for(t in e)w[t]=[w[t],e[t]];return this},abort:function(e){var t=e||u;return c&&c.abort(t),l(0,t),this}};if(x.promise(T),y.url=((e||y.url||Tt.href)+"").replace(Pt,Tt.protocol+"//"),y.type=t.method||t.type||y.method||y.type,y.dataTypes=(y.dataType||"*").toLowerCase().match(P)||[""],null==y.crossDomain){r=S.createElement("a");try{r.href=y.url,r.href=r.href,y.crossDomain=Wt.protocol+"//"+Wt.host!=r.protocol+"//"+r.host}catch(e){y.crossDomain=!0}}if(y.data&&y.processData&&"string"!=typeof y.data&&(y.data=E.param(y.data,y.traditional)),$t(Rt,y,t,T),h)return T;for(i in(g=E.event&&y.global)&&0==E.active++&&E.event.trigger("ajaxStart"),y.type=y.type.toUpperCase(),y.hasContent=!Ot.test(y.type),f=y.url.replace(qt,""),y.hasContent?y.data&&y.processData&&0===(y.contentType||"").indexOf("application/x-www-form-urlencoded")&&(y.data=y.data.replace(Dt,"+")):(o=y.url.slice(f.length),y.data&&(y.processData||"string"==typeof y.data)&&(f+=(St.test(f)?"&":"?")+y.data,delete y.data),!1===y.cache&&(f=f.replace(Lt,"$1"),o=(St.test(f)?"&":"?")+"_="+Ct.guid+++o),y.url=f+o),y.ifModified&&(E.lastModified[f]&&T.setRequestHeader("If-Modified-Since",E.lastModified[f]),E.etag[f]&&T.setRequestHeader("If-None-Match",E.etag[f])),(y.data&&y.hasContent&&!1!==y.contentType||t.contentType)&&T.setRequestHeader("Content-Type",y.contentType),T.setRequestHeader("Accept",y.dataTypes[0]&&y.accepts[y.dataTypes[0]]?y.accepts[y.dataTypes[0]]+("*"!==y.dataTypes[0]?", "+It+"; q=0.01":""):y.accepts["*"]),y.headers)T.setRequestHeader(i,y.headers[i]);if(y.beforeSend&&(!1===y.beforeSend.call(v,T,y)||h))return T.abort();if(u="abort",b.add(y.complete),T.done(y.success),T.fail(y.error),c=$t(Mt,y,t,T)){if(T.readyState=1,g&&m.trigger("ajaxSend",[T,y]),h)return T;y.async&&0<y.timeout&&(d=C.setTimeout(function(){T.abort("timeout")},y.timeout));try{h=!1,c.send(a,l)}catch(e){if(h)throw e;l(-1,e)}}else l(-1,"No Transport");function l(e,t,n,r){var i,o,a,s,u,l=t;h||(h=!0,d&&C.clearTimeout(d),c=void 0,p=r||"",T.readyState=0<e?4:0,i=200<=e&&e<300||304===e,n&&(s=function(e,t,n){var r,i,o,a,s=e.contents,u=e.dataTypes;while("*"===u[0])u.shift(),void 0===r&&(r=e.mimeType||t.getResponseHeader("Content-Type"));if(r)for(i in s)if(s[i]&&s[i].test(r)){u.unshift(i);break}if(u[0]in n)o=u[0];else{for(i in n){if(!u[0]||e.converters[i+" "+u[0]]){o=i;break}a||(a=i)}o=o||a}if(o)return o!==u[0]&&u.unshift(o),n[o]}(y,T,n)),!i&&-1<E.inArray("script",y.dataTypes)&&E.inArray("json",y.dataTypes)<0&&(y.converters["text script"]=function(){}),s=function(e,t,n,r){var i,o,a,s,u,l={},c=e.dataTypes.slice();if(c[1])for(a in e.converters)l[a.toLowerCase()]=e.converters[a];o=c.shift();while(o)if(e.responseFields[o]&&(n[e.responseFields[o]]=t),!u&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),u=o,o=c.shift())if("*"===o)o=u;else if("*"!==u&&u!==o){if(!(a=l[u+" "+o]||l["* "+o]))for(i in l)if((s=i.split(" "))[1]===o&&(a=l[u+" "+s[0]]||l["* "+s[0]])){!0===a?a=l[i]:!0!==l[i]&&(o=s[0],c.unshift(s[1]));break}if(!0!==a)if(a&&e["throws"])t=a(t);else try{t=a(t)}catch(e){return{state:"parsererror",error:a?e:"No conversion from "+u+" to "+o}}}return{state:"success",data:t}}(y,s,T,i),i?(y.ifModified&&((u=T.getResponseHeader("Last-Modified"))&&(E.lastModified[f]=u),(u=T.getResponseHeader("etag"))&&(E.etag[f]=u)),204===e||"HEAD"===y.type?l="nocontent":304===e?l="notmodified":(l=s.state,o=s.data,i=!(a=s.error))):(a=l,!e&&l||(l="error",e<0&&(e=0))),T.status=e,T.statusText=(t||l)+"",i?x.resolveWith(v,[o,l,T]):x.rejectWith(v,[T,l,a]),T.statusCode(w),w=void 0,g&&m.trigger(i?"ajaxSuccess":"ajaxError",[T,y,i?o:a]),b.fireWith(v,[T,l]),g&&(m.trigger("ajaxComplete",[T,y]),--E.active||E.event.trigger("ajaxStop")))}return T},getJSON:function(e,t,n){return E.get(e,t,n,"json")},getScript:function(e,t){return E.get(e,void 0,t,"script")}}),E.each(["get","post"],function(e,i){E[i]=function(e,t,n,r){return m(t)&&(r=r||n,n=t,t=void 0),E.ajax(E.extend({url:e,type:i,dataType:r,data:t,success:n},E.isPlainObject(e)&&e))}}),E.ajaxPrefilter(function(e){var t;for(t in e.headers)"content-type"===t.toLowerCase()&&(e.contentType=e.headers[t]||"")}),E._evalUrl=function(e,t,n){return E.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}},dataFilter:function(e){E.globalEval(e,t,n)}})},E.fn.extend({wrapAll:function(e){var t;return this[0]&&(m(e)&&(e=e.call(this[0])),t=E(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){var e=this;while(e.firstElementChild)e=e.firstElementChild;return e}).append(this)),this},wrapInner:function(n){return m(n)?this.each(function(e){E(this).wrapInner(n.call(this,e))}):this.each(function(){var e=E(this),t=e.contents();t.length?t.wrapAll(n):e.append(n)})},wrap:function(t){var n=m(t);return this.each(function(e){E(this).wrapAll(n?t.call(this,e):t)})},unwrap:function(e){return this.parent(e).not("body").each(function(){E(this).replaceWith(this.childNodes)}),this}}),E.expr.pseudos.hidden=function(e){return!E.expr.pseudos.visible(e)},E.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},E.ajaxSettings.xhr=function(){try{return new C.XMLHttpRequest}catch(e){}};var _t={0:200,1223:204},zt=E.ajaxSettings.xhr();v.cors=!!zt&&"withCredentials"in zt,v.ajax=zt=!!zt,E.ajaxTransport(function(i){var o,a;if(v.cors||zt&&!i.crossDomain)return{send:function(e,t){var n,r=i.xhr();if(r.open(i.type,i.url,i.async,i.username,i.password),i.xhrFields)for(n in i.xhrFields)r[n]=i.xhrFields[n];for(n in i.mimeType&&r.overrideMimeType&&r.overrideMimeType(i.mimeType),i.crossDomain||e["X-Requested-With"]||(e["X-Requested-With"]="XMLHttpRequest"),e)r.setRequestHeader(n,e[n]);o=function(e){return function(){o&&(o=a=r.onload=r.onerror=r.onabort=r.ontimeout=r.onreadystatechange=null,"abort"===e?r.abort():"error"===e?"number"!=typeof r.status?t(0,"error"):t(r.status,r.statusText):t(_t[r.status]||r.status,r.statusText,"text"!==(r.responseType||"text")||"string"!=typeof r.responseText?{binary:r.response}:{text:r.responseText},r.getAllResponseHeaders()))}},r.onload=o(),a=r.onerror=r.ontimeout=o("error"),void 0!==r.onabort?r.onabort=a:r.onreadystatechange=function(){4===r.readyState&&C.setTimeout(function(){o&&a()})},o=o("abort");try{r.send(i.hasContent&&i.data||null)}catch(e){if(o)throw e}},abort:function(){o&&o()}}}),E.ajaxPrefilter(function(e){e.crossDomain&&(e.contents.script=!1)}),E.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return E.globalEval(e),e}}}),E.ajaxPrefilter("script",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")}),E.ajaxTransport("script",function(n){var r,i;if(n.crossDomain||n.scriptAttrs)return{send:function(e,t){r=E("<script>").attr(n.scriptAttrs||{}).prop({charset:n.scriptCharset,src:n.url}).on("load error",i=function(e){r.remove(),i=null,e&&t("error"===e.type?404:200,e.type)}),S.head.appendChild(r[0])},abort:function(){i&&i()}}});var Ut,Xt=[],Vt=/(=)\?(?=&|$)|\?\?/;E.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Xt.pop()||E.expando+"_"+Ct.guid++;return this[e]=!0,e}}),E.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,o,a=!1!==e.jsonp&&(Vt.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Vt.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=m(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Vt,"$1"+r):!1!==e.jsonp&&(e.url+=(St.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return o||E.error(r+" was not called"),o[0]},e.dataTypes[0]="json",i=C[r],C[r]=function(){o=arguments},n.always(function(){void 0===i?E(C).removeProp(r):C[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,Xt.push(r)),o&&m(i)&&i(o[0]),o=i=void 0}),"script"}),v.createHTMLDocument=((Ut=S.implementation.createHTMLDocument("").body).innerHTML="<form></form><form></form>",2===Ut.childNodes.length),E.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(v.createHTMLDocument?((r=(t=S.implementation.createHTMLDocument("")).createElement("base")).href=S.location.href,t.head.appendChild(r)):t=S),o=!n&&[],(i=N.exec(e))?[t.createElement(i[1])]:(i=xe([e],t,o),o&&o.length&&E(o).remove(),E.merge([],i.childNodes)));var r,i,o},E.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return-1<s&&(r=yt(e.slice(s)),e=e.slice(0,s)),m(t)?(n=t,t=void 0):t&&"object"==typeof t&&(i="POST"),0<a.length&&E.ajax({url:e,type:i||"GET",dataType:"html",data:t}).done(function(e){o=arguments,a.html(r?E("<div>").append(E.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},E.expr.pseudos.animated=function(t){return E.grep(E.timers,function(e){return t===e.elem}).length},E.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=E.css(e,"position"),c=E(e),f={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=E.css(e,"top"),u=E.css(e,"left"),("absolute"===l||"fixed"===l)&&-1<(o+u).indexOf("auto")?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),m(t)&&(t=t.call(e,n,E.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):c.css(f)}},E.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){E.offset.setOffset(this,t,e)});var e,n,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===E.css(r,"position"))t=r.getBoundingClientRect();else{t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;while(e&&(e===n.body||e===n.documentElement)&&"static"===E.css(e,"position"))e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=E(e).offset()).top+=E.css(e,"borderTopWidth",!0),i.left+=E.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-E.css(r,"marginTop",!0),left:t.left-i.left-E.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent;while(e&&"static"===E.css(e,"position"))e=e.offsetParent;return e||re})}}),E.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,i){var o="pageYOffset"===i;E.fn[t]=function(e){return B(this,function(e,t,n){var r;if(x(e)?r=e:9===e.nodeType&&(r=e.defaultView),void 0===n)return r?r[i]:e[t];r?r.scrollTo(o?r.pageXOffset:n,o?n:r.pageYOffset):e[t]=n},t,e,arguments.length)}}),E.each(["top","left"],function(e,n){E.cssHooks[n]=_e(v.pixelPosition,function(e,t){if(t)return t=Be(e,n),Pe.test(t)?E(e).position()[n]+"px":t})}),E.each({Height:"height",Width:"width"},function(a,s){E.each({padding:"inner"+a,content:s,"":"outer"+a},function(r,o){E.fn[o]=function(e,t){var n=arguments.length&&(r||"boolean"!=typeof e),i=r||(!0===e||!0===t?"margin":"border");return B(this,function(e,t,n){var r;return x(e)?0===o.indexOf("outer")?e["inner"+a]:e.document.documentElement["client"+a]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+a],r["scroll"+a],e.body["offset"+a],r["offset"+a],r["client"+a])):void 0===n?E.css(e,t,i):E.style(e,t,n,i)},s,n?e:void 0,n)}})}),E.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){E.fn[t]=function(e){return this.on(t,e)}}),E.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),E.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(e,n){E.fn[n]=function(e,t){return 0<arguments.length?this.on(n,null,e,t):this.trigger(n)}});var Gt=/^[\s\uFEFF\xA0]+|([^\s\uFEFF\xA0])[\s\uFEFF\xA0]+$/g;E.proxy=function(e,t){var n,r,i;if("string"==typeof t&&(n=e[t],t=e,e=n),m(e))return r=s.call(arguments,2),(i=function(){return e.apply(t||this,r.concat(s.call(arguments)))}).guid=e.guid=e.guid||E.guid++,i},E.holdReady=function(e){e?E.readyWait++:E.ready(!0)},E.isArray=Array.isArray,E.parseJSON=JSON.parse,E.nodeName=A,E.isFunction=m,E.isWindow=x,E.camelCase=X,E.type=w,E.now=Date.now,E.isNumeric=function(e){var t=E.type(e);return("number"===t||"string"===t)&&!isNaN(e-parseFloat(e))},E.trim=function(e){return null==e?"":(e+"").replace(Gt,"$1")},"function"==typeof define&&define.amd&&define("jquery",[],function(){return E});var Yt=C.jQuery,Qt=C.$;return E.noConflict=function(e){return C.$===E&&(C.$=Qt),e&&C.jQuery===E&&(C.jQuery=Yt),E},"undefined"==typeof e&&(C.jQuery=C.$=E),E});
3; 4/** 5* DO NOT EDIT THIS FILE. 6* See the following change record for more information, 7* https://www.drupal.org/node/2815083 8* @preserve 9**/ 10if (!Element.prototype.matches) { 11 Element.prototype.matches = Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector; 12}; 13/** 14* DO NOT EDIT THIS FILE. 15* See the following change record for more information, 16* https://www.drupal.org/node/2815083 17* @preserve 18**/ 19if (typeof Object.assign !== 'function') { 20 Object.defineProperty(Object, 'assign', { 21 value: function assign(target, varArgs) { 22 'use strict'; 23 24 if (target === null || target === undefined) { 25 throw new TypeError('Cannot convert undefined or null to object'); 26 } 27 var to = Object(target); 28 for (var index = 1; index < arguments.length; index++) { 29 var nextSource = arguments[index]; 30 if (nextSource !== null && nextSource !== undefined) { 31 for (var nextKey in nextSource) { 32 if (Object.prototype.hasOwnProperty.call(nextSource, nextKey)) { 33 to[nextKey] = nextSource[nextKey]; 34 } 35 } 36 } 37 } 38 return to; 39 }, 40 writable: true, 41 configurable: true 42 }); 43}; 44/*! @drupal/once - v1.0.1 - 2021-06-12 */ 45var once=function(){"use strict";var n=/[\11\12\14\15\40]+/,e="data-once",t=document;function r(n,t,r){return n[t+"Attribute"](e,r)}function o(e){if("string"!=typeof e)throw new TypeError("once ID must be a string");if(""===e||n.test(e))throw new RangeError("once ID must not be empty or contain spaces");return'[data-once~="'+e+'"]'}function u(n){if(!(n instanceof Element))throw new TypeError("The element must be an instance of Element");return!0}function i(n,e){void 0===e&&(e=t);var r=n;if(null===n)r=[];else{if(!n)throw new TypeError("Selector must not be empty");"string"!=typeof n||e!==t&&!u(e)?n instanceof Element&&(r=[n]):r=e.querySelectorAll(n)}return Array.prototype.slice.call(r)}function c(n,e,t){return e.filter((function(e){var r=u(e)&&e.matches(n);return r&&t&&t(e),r}))}function f(e,t){var o=t.add,u=t.remove,i=[];r(e,"has")&&r(e,"get").trim().split(n).forEach((function(n){i.indexOf(n)<0&&n!==u&&i.push(n)})),o&&i.push(o);var c=i.join(" ");r(e,""===c?"remove":"set",c)}function a(n,e,t){return c(":not("+o(n)+")",i(e,t),(function(e){return f(e,{add:n})}))}return a.remove=function(n,e,t){return c(o(n),i(e,t),(function(e){return f(e,{remove:n})}))},a.filter=function(n,e,t){return c(o(n),i(e,t))},a.find=function(n,e){return i(n?o(n):"[data-once]",e)},a}(); 46 47; 48/*! 49 * jQuery Once v2.2.3 - http://github.com/robloach/jquery-once 50 * @license MIT, GPL-2.0 51 * http://opensource.org/licenses/MIT 52 * http://opensource.org/licenses/GPL-2.0 53 */ 54(function(e){"use strict";if(typeof exports==="object"&&typeof exports.nodeName!=="string"){e(require("jquery"))}else if(typeof define==="function"&&define.amd){define(["jquery"],e)}else{e(jQuery)}})(function(t){"use strict";var r=function(e){e=e||"once";if(typeof e!=="string"){throw new TypeError("The jQuery Once id parameter must be a string")}return e};t.fn.once=function(e){var n="jquery-once-"+r(e);return this.filter(function(){return t(this).data(n)!==true}).data(n,true)};t.fn.removeOnce=function(e){return this.findOnce(e).removeData("jquery-once-"+r(e))};t.fn.findOnce=function(e){var n="jquery-once-"+r(e);return this.filter(function(){return t(this).data(n)===true})}}); 55 56window.drupalTranslations = {"strings":{"":{"1 min\u0003@count min":"@count min\u0003@count min","1 sec\u0003@count sec":"@count sec\u0003@count sec","Save":"Enregistrer","An AJAX HTTP error occurred.":"Une erreur HTTP AJAX s\u0027est produite.","HTTP Result Code: !status":"Code de statut HTTP : !status","An AJAX HTTP request terminated abnormally.":"Une requ\u00eate HTTP AJAX s\u0027est termin\u00e9e anormalement.","Debugging information follows.":"Informations de d\u00e9bogage ci-dessous.","Path: !uri":"Chemin : !uri","StatusText: !statusText":"StatusText: !statusText","ResponseText: !responseText":"ResponseText : !responseText","ReadyState: !readyState":"ReadyState : !readyState","CustomMessage: !customMessage":"Message personalis\u00e9 : !customMessage","Please wait...":"
56Veuillez patienter...","The response failed verification so will not be processed.":"La v\u00e9rification de la r\u00e9ponse a \u00e9chou\u00e9, elle ne sera pas trait\u00e9e.","The callback URL is not local and not trusted: !url":"L\u0027URL de retour n\u0027est pas locale et n\u0027est pas de confiance : !url","Changed":"Modifi\u00e9","Home":"Accueil","Title":"Title","closed":"ferm\u00e9","Cancel":"Annuler","Disabled":"D\u00e9sactiv\u00e9","Enabled":"Activ\u00e9","Edit":"Edit","Link":"Lien","Image":"Image","Open":"Ouvert","Sunday":"Dimanche","Monday":"Lundi","Tuesday":"Mardi","Wednesday":"Mercredi","Thursday":"Jeudi","Friday":"Vendredi","Saturday":"Samedi","Add":"Ajouter","Continue":"Continuer","1 hour\u0003@count hours":"@count heure\u0003@count heures","1 day\u0003@count days":"@count jour\u0003@count jours","OK":"OK","Mon":"lun","Tue":"mar","Wed":"mer","Thu":"jeu","Fri":"ven","Sat":"sam","Sun":"dim","May":"mai","Close":"Fermer","Add group":"Ajouter un groupe","Show":"Afficher","Select all rows in this table":"S\u00e9lectionner toutes les lignes du tableau","Deselect all rows in this table":"D\u00e9s\u00e9lectionner toutes les lignes du tableau","Jan":"jan","Feb":"f\u00e9v","Mar":"mar","Apr":"avr","Jun":"juin","Jul":"juil","Aug":"ao\u00fb","Sep":"sep","Oct":"oct","Nov":"nov","Dec":"d\u00e9c","Caption":"L\u00e9gende","Extend":"Extension","Not published":"Non publi\u00e9","Loading...":"En cours de chargement...","Apply":"Appliquer","Hide":"Masquer","Unlink":"Supprimer le lien","1 year\u0003@count years":"@count ann\u00e9e\u0003@count ann\u00e9es","1 week\u0003@count weeks":"@count semaine\u0003@count semaines","Not promoted":"Non promu","Error message":"Message d\u0027erreur","Quick edit":"Modification rapide","1 month\u0003@count months":"@count mois\u0003@count mois","button":"bouton","Warning message":"Message d\u0027avertissement","Edit Link":"Lien de modification","Remove group":"Supprimer le groupe","By @name on @date":"Par @name le @date","By @name":"Par @name","Not in menu":"Pas dans le menu","Alias: @alias":"Alias : @alias","No alias":"Aucun alias","@label":"@label","0 sec":"0\u00a0s","New revision":"Nouvelle r\u00e9vision","Drag to re-order":"Cliquer-d\u00e9poser pour r\u00e9-organiser","Changes made in this table will not be saved until the form is submitted.":"Les changements effectu\u00e9s dans ce tableau ne seront pris en compte que lorsque la configuration aura \u00e9t\u00e9 enregistr\u00e9e.","Discard changes":"Annuler les changements","Show description":"Afficher la description","New group":"Nouveau groupe","Lock":"Verrouiller","Saving":"Enregistrement","This permission is inherited from the authenticated user role.":"Ce droit est h\u00e9rit\u00e9e du r\u00f4le de l\u0027utilisateur authentifi\u00e9.","Alternative text":"Texte alternatif","No revision":"Aucune r\u00e9vision","Requires a title":"Titre obligatoire","Not restricted":"Non restreint","(active tab)":"(onglet actif)","Status message":"Message d\u0027\u00e9tat","Restricted to certain pages":"R\u00e9serv\u00e9 \u00e0 certaines pages","The block cannot be placed in this region.":"Le bloc ne peut pas \u00eatre plac\u00e9 dans cette r\u00e9gion.","Edit summary":"Modifier le r\u00e9sum\u00e9","Don\u0027t display post information":"Ne pas afficher les informations de la contribution","Unlock":"D\u00e9verrouiller","Collapse":"Replier","Edit media":"Modifier le m\u00e9dia","The selected file %filename cannot be uploaded. Only files with the following extensions are allowed: %extensions.":"Le fichier s\u00e9lectionn\u00e9 %filename ne peut pas \u00eatre transf\u00e9r\u00e9. Seulement les fichiers avec les extensions suivantes sont permis : %extensions.","Show row weights":"Afficher le poids des lignes","Hide row weights":"Cacher le poids des lignes","Apply (all displays)":"Appliquer (tous les affichages)","Apply (this display)":"Appliquer (cet affichage)","Revert to default":"R\u00e9tablir par d\u00e9faut","Hide description":"Masquer la description","You have unsaved changes":"Vous avez des changements non enregistr\u00e9s","Needs to be updated":"N\u00e9cessite une mise \u00e0 jour","Does not need to be updated":"Ne n\u00e9cessite aucune mise \u00e0 jour","Show all columns":"Montrer toutes les colonnes","Show table cells that were hidden to make the table fit within a small screen.":"Montrer les cellules de tableau qui ont \u00e9t\u00e9 cach\u00e9es pour que le tableau rentre dans un petit \u00e9cran.","List additional actions":"Lister les actions suppl\u00e9mentaires","Flag other translations as outdated":"Marquer les autres traductions comme p\u00e9rim\u00e9es","Do not flag other translations as outdated":"Ne pas marquer les autres traductions comme p\u00e9rim\u00e9es","opened":"ouvert","Horizontal orientation":"Orientation horizontale","Vertical orientation":"Orientation verticale","Tray orientation changed to @orientation.":"L\u0027orientation du sous-menu est maintenant @orientation.","You have unsaved changes.":"Vous avez des changements non enregistr\u00e9s.","No styles configured":"Aucun style configur\u00e9","@count styles configured":"@count styles configur\u00e9s","@action @title configuration options":"options de configuration @action @title","Tabbing is no longer constrained by the C
56ontextual module.":"La tabulation n\u0027est plus contrainte par le module Contextual.","Tabbing is constrained to a set of @contextualsCount and the edit mode toggle.":"La tabulation est contrainte par un ensemble de @contextualsCount et l\u0027activation\/d\u00e9saction du mode d\u0027\u00e9dition.","Press the esc key to exit.":"Pressez la touche Echap pour quitter.","@count contextual link\u0003@count contextual links":"@count lien contextuel\u0003@count liens contextuels","Based on the text editor configuration, these tags have automatically been added: \u003Cstrong\u003E@tag-list\u003C\/strong\u003E.":"Bas\u00e9 sur la configuration de l\u0027\u00e9diteur de texte, ces balises ont automatiquement \u00e9t\u00e9 ajout\u00e9es : \u003Cstrong\u003E@tag-list\u003C\/strong\u003E.","!tour_item of !total":"!tour_item sur !total","End tour":"Terminer la visite","Uploads disabled":"Transferts d\u00e9sactiv\u00e9s","Uploads enabled, max size: @size @dimensions":"Transferts activ\u00e9s, taille max. : @size @dimensions","Discard changes?":"Annuler les changements ?","The toolbar cannot be set to a horizontal orientation when it is locked.":"La barre d\u0027outils ne peut pas \u00eatre orient\u00e9e horizontalement quand elle est verrouill\u00e9e.","Enter caption here":"Saisir la l\u00e9gende ici","Could not load the form for \u003Cq\u003E@field-label\u003C\/q\u003E, either due to a website problem or a network connection problem.\u003Cbr\u003EPlease try again.":"Impossible de charger le formulaire de \u003Cq\u003E@field-label\u003C\/q\u003E, soit \u00e0 cause d\u0027un probl\u00e8me dans le site web, soit \u00e0 cause d\u0027un probl\u00e8me de connexion r\u00e9seau. \u003Cbr \/\u003EVeuillez r\u00e9essayer.","Your changes to \u003Cq\u003E@entity-title\u003C\/q\u003E could not be saved, either due to a website problem or a network connection problem.\u003Cbr\u003EPlease try again.":"Vos modifications dans \u003Cq\u003E@entity-title\u003C\/q\u003E n\u0027ont pas pu \u00eatre enregistr\u00e9es, soit \u00e0 cause d\u0027un probl\u00e8me dans le site web, soit \u00e0 cause d\u0027un probl\u00e8me de connexion r\u00e9seau. \u003Cbr \/\u003EVeuillez recommencer.","Hide group names":"Masquer les noms des groupes","Show group names":"Afficher les noms des groupes","@groupName button group in position @position of @positionCount in row @row of @rowCount.":"Groupe de boutons @groupName \u00e0 la position @position de @positionCount \u00e0 la ligne @row de @rowCount.","Press the down arrow key to create a new row.":"Appuyer sur la touche \u0022fl\u00e8che du bas\u0022 pour cr\u00e9er une nouvelle ligne.","@name @type.":"@name @type.","Press the down arrow key to activate.":"Appuyer sur la touche \u0022fl\u00e8che du bas\u0022 pour activer.","@name @type in position @position of @positionCount in @groupName button group in row @row of @rowCount.":"@name @type \u00e0 la position @position de @positionCount dans le groupe de boutons @groupName \u00e0 la ligne @row de @rowCount.","Press the down arrow key to create a new button group in a new row.":"Presser la touche fl\u00e8che bas pour cr\u00e9er un nouveau groupe de bouton dans une nouvelle ligne.","This is the last group. Move the button forward to create a new group.":"Ceci est le dernier groupe. D\u00e9placer le bouton vers l\u0027avant pour cr\u00e9er un nouveau groupe.","The \u0022@name\u0022 button is currently enabled.":"Le bouton \u0022@name\u0022 est actuellement activ\u00e9.","Use the keyboard arrow keys to change the position of this button.":"Utiliser les fl\u00e8ches du clavier pour changer la position de ce bouton.","Press the up arrow key on the top row to disable the button.":"Appuyer sur la touche fl\u00e8che du haut sur la ligne du haut pour d\u00e9sactiver le bouton.","The \u0022@name\u0022 button is currently disabled.":"Le bouton \u0022@name\u0022 est actuellement d\u00e9sactiv\u00e9.","Use the down arrow key to move this button into the active toolbar.":"Utiliser la touche \u0022fl\u00e8che du bas\u0022 pour d\u00e9placer ce bouton dans la barre d\u0027outils active.","This @name is currently enabled.":"Ce @name est actuellement activ\u00e9.","Use the keyboard arrow keys to change the position of this separator.":"Utiliser les fl\u00e8ches du clavier pour changer la position de ce s\u00e9parateur.","Separators are used to visually split individual buttons.":"Les s\u00e9parateur
56s sont utilis\u00e9s pour s\u00e9parer visuellement des boutons individuels.","This @name is currently disabled.":"Ce @name est actuellement d\u00e9sactiv\u00e9","Use the down arrow key to move this separator into the active toolbar.":"Utiliser la touche \u0022fl\u00e8che du bas\u0022 pour d\u00e9placer ce s\u00e9parateur dans la barre d\u0027outils active.","You may add multiple separators to each button group.":"Vous pouvez ajouter plusieurs s\u00e9parateurs \u00e0 chaque groupe de boutons.","Please provide a name for the button group.":"Veuillez fournir un nom pour le groupe de boutons.","Button group name":"Nom du groupe de boutons","Editing the name of the new button group in a dialog.":"Modification du nom du nouveau groupe de boutons dans une bo\u00eete de dialogue.","Editing the name of the \u0022@groupName\u0022 button group in a dialog.":"Modification du nom du groupe de boutons @groupName dans une bo\u00eete de dialogue.","Place a button to create a new button group.":"Placer un bouton pour cr\u00e9er un nouveau groupe de boutons.","Add a CKEditor button group to the end of this row.":"Ajouter un groupe de boutons CKEditor \u00e0 la fin de cette ligne.","Changing the text format to %text_format will permanently remove content that is not allowed in that text format.\u003Cbr\u003E\u003Cbr\u003ESave your changes before switching the text format to avoid losing data.":"Basculer le format de texte en %text_format retirera d\u00e9finitivement le contenu qui n\u0027est pas autoris\u00e9 dans ce format de texte.\u003Cbr\u003E\u003Cbr\u003EPour \u00e9viter de perdre des donn\u00e9es, enregistrez vos changements avant de basculer le format de texte.","Change text format?":"Changer le format de texte ?","Rich Text Editor, !label field":"\u00c9diteur de texte riche, champ !label","Leave preview?":"Quitter l\u0027aper\u00e7u ?","Leave preview":"Quitter l\u0027aper\u00e7u","Leaving the preview will cause unsaved changes to be lost. Are you sure you want to leave the preview?":"Quitter la pr\u00e9-visualisation entra\u00eenera la perte des changements non-enregistr\u00e9s. \u00cates-vous s\u00fbr(e) de vouloir quitter la pr\u00e9-visualisation ?","CTRL+Left click will prevent this dialog from showing and proceed to the clicked link.":"CTRL + clic gauche emp\u00eachera cette fen\u00eatre de dialogue de s\u0027ouvrir et ouvrira le lien cliqu\u00e9.","Tray \u0022@tray\u0022 @action.":"Sous-menu \u0022@tray\u0022 @action.","Tray @action.":"Sous-menu @action.","Hide lower priority columns":"Cacher les colonnes de plus faible priorit\u00e9","!modules modules are available in the modified list.":"Les modules !modules sont disponibles dans la liste modifi\u00e9e.","Network problem!":"Probl\u00e8me de r\u00e9seau !","Authored on @date":"R\u00e9dig\u00e9 le @date","1 block is available in the modified list.\u0003@count blocks are available in the modified list.":"@count bloc est disponible dans la liste modifi\u00e9e.\u0003@count blocs sont disponibles dans la liste modifi\u00e9e.","Zero items selected":"Zero \u00e9l\u00e9ment s\u00e9lectionn\u00e9","All @count items selected":"Tous les @count \u00e9l\u00e9ments ont \u00e9t\u00e9 s\u00e9lectionn\u00e9s","Select all media":"S\u00e9lectionner tous les m\u00e9dias","Show media item weights":"Afficher les poids des \u00e9l\u00e9ments m\u00e9dia","Hide media item weights":"Masquer les poids des \u00e9l\u00e9ments m\u00e9dia","An error occurred while trying to preview the media. Please save your work and reload this page.":"Une erreur s\u0027est produite lors de la tentative de pr\u00e9visualisation du m\u00e9dia. Veuillez enregistrer votre travail et recharger cette page.","Embedded media":"M\u00e9dia int\u00e9gr\u00e9","Insert from Media Library":"Ins\u00e9rer \u00e0 partir de la m\u00e9diath\u00e8que","Insert this token into your form":"Ins\u00e9rer ce jeton (\u003Cem\u003Etoken\u003C\/em\u003E) dans votre formulaire","First click a text field to insert your tokens into.":"Cliquez d\u0027abord sur un champ de texte pour ins\u00e9rer vos jetons (\u003Cem\u003Etokens\u003C\/em\u003E) dans celui -ci.","Collapse all":"Tout replier","Next":"Suivant","Automatic alias":"Alias automatique","Scheduled for publishing":"Planifi\u00e9 pour publication","Scheduled for unpublishing":"Planifi\u00e9 pour d\u00e9publication","Not scheduled":"Non planifi\u00e9","Publishing enabled":"Publication activ\u00e9e","Unpublishing enabled":"D\u00e9publication activ\u00e9e","Done":"Termin\u00e9"},"Long month name":{"January":"janvier","February":"f\u00e9vrier","March":"mars","April":"avril","May":"mai","June":"juin","July":"juillet","August":"ao\u00fbt","September":"septembre","October":"octobre","November":"novembre","December":"d\u00e9cembre"}}
56,"pluralFormula":{"0":0,"1":0,"default":1}};; 57/** 58* DO NOT EDIT THIS FILE. 59* See the following change record for more information, 60* https://www.drupal.org/node/2815083 61* @preserve 62**/ 63window.Drupal = { 64 behaviors: {}, 65 locale: {} 66}; 67(function (Drupal, drupalSettings, drupalTranslations, console, Proxy, Reflect) { 68 Drupal.throwError = function (error) { 69 setTimeout(function () { 70 throw error; 71 }, 0); 72 }; 73 Drupal.attachBehaviors = function (context, settings) { 74 context = context || document; 75 settings = settings || drupalSettings; 76 var behaviors = Drupal.behaviors; 77 Object.keys(behaviors || {}).forEach(function (i) { 78 if (typeof behaviors[i].attach === 'function') { 79 try { 80 behaviors[i].attach(context, settings); 81 } catch (e) { 82 Drupal.throwError(e); 83 } 84 } 85 }); 86 }; 87 Drupal.detachBehaviors = function (context, settings, trigger) { 88 context = context || document; 89 settings = settings || drupalSettings; 90 trigger = trigger || 'unload'; 91 var behaviors = Drupal.behaviors; 92 Object.keys(behaviors || {}).forEach(function (i) { 93 if (typeof behaviors[i].detach === 'function') { 94 try { 95 behaviors[i].detach(context, settings, trigger); 96 } catch (e) { 97 Drupal.throwError(e); 98 } 99 } 100 }); 101 }; 102 Drupal.checkPlain = function (str) { 103 str = str.toString().replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>').replace(/"/g, '"').replace(/'/g, '''); 104 return str; 105 }; 106 Drupal.formatString = function (str, args) { 107 var processedArgs = {}; 108 Object.keys(args || {}).forEach(function (key) { 109 switch (key.charAt(0)) { 110 case '@': 111 processedArgs[key] = Drupal.checkPlain(args[key]); 112 break; 113 case '!': 114 processedArgs[key] = args[key]; 115 break; 116 default: 117 processedArgs[key] = Drupal.theme('placeholder', args[key]); 118 break; 119 } 120 }); 121 return Drupal.stringReplace(str, processedArgs, null); 122 }; 123 Drupal.stringReplace = function (str, args, keys) { 124 if (str.length === 0) { 125 return str; 126 } 127 if (!Array.isArray(keys)) { 128 keys = Object.keys(args || {}); 129 keys.sort(function (a, b) { 130 return a.length - b.length; 131 }); 132 } 133 if (keys.length === 0) { 134 return str; 135 } 136 var key = keys.pop(); 137 var fragments = str.split(key); 138 if (keys.length) { 139 for (var i = 0; i < fragments.length; i++) { 140 fragments[i] = Drupal.stringReplace(fragments[i], args, keys.slice(0)); 141 } 142 } 143 return fragments.join(args[key]); 144 }; 145 Drupal.t = function (str, args, options) { 146 options = options || {}; 147 options.context = options.context || ''; 148 if (typeof drupalTranslations !== 'undefined' && drupalTranslations.strings && drupalTranslations.strings[options.context] && drupalTranslations.strings[options.context][str]) { 149 str = drupalTranslations.strings[options.context][str]; 150 } 151 if (args) { 152 str = Drupal.formatString(str, args); 153 } 154 return str; 155 }; 156 Drupal.url = function (path) { 157 return drupalSettings.path.baseUrl + drupalSettings.path.pathPrefix + path; 158 }; 159 Drupal.url.toAbsolute = function (url) { 160 var urlParsingNode = document.createElement('a'); 161 try { 162 url = decodeURIComponent(url); 163 } catch (e) {} 164 urlParsingNode.setAttribute('href', url); 165 return urlParsingNode.cloneNode(false).href; 166 }; 167 Drupal.url.isLocal = function (url) { 168 var absoluteUrl = Drupal.url.toAbsolute(url); 169 var protocol = window.location.protocol; 170 if (protocol === 'http:' && absoluteUrl.indexOf('https:') === 0) { 171 protocol = 'https:'; 172 } 173 var baseUrl = "".concat(protocol, "//").concat(window.location.host).concat(drupalSettings.path.baseUrl.slice(0, -1)); 174 try { 175 absoluteUrl = decodeURIComponent(absoluteUrl); 176 } catch (e) {} 177 try { 178 baseUrl = decodeURIComponent(baseUrl); 179 } catch (e) {} 180 return absoluteUrl === baseUrl || absoluteUrl.indexOf("".concat(baseUrl, "/")) === 0; 181 }; 182 Drupal.formatPlural = function (count, singular, plural, args, options) { 183 args = args || {}; 184 args['@count'] = count; 185 var pluralDelimiter = drupalSettings.pluralDelimiter; 186 var translations = Drupal.t(singular + pluralDelimiter + plural, args, options).split(pluralDelimiter); 187 var index = 0; 188 if (typeof drupalTranslations !== 'undefined' && drupalTranslations.pluralFormula) { 189 index = count in drupalTranslations.pluralFormula ? drupalTranslations.pluralFormula[count] : drupalTranslations.pluralFormula.default; 190 } else if (args['@count'] !== 1) { 191 index = 1; 192 } 193 return translations[index]; 194 }; 195 Drupal.encodePath = function (item) { 196 return window.encodeURIComponent(item).replace(/%2F/g, '/'); 197 }; 198 Drupal.deprecationError = function (_ref) { 199 var message = _ref.message; 200 if (drupalSettings.suppressDeprecationErrors === false && typeof console !== 'undefined' && console.warn) { 201 console.warn("[Deprecation] ".concat(message)); 202 } 203 }; 204 Drupal.deprecatedProperty = function (_ref2) { 205 var target = _ref2.target, 206 deprecatedProperty = _ref2.deprecatedProperty, 207 message = _ref2.message; 208 if (!Proxy || !Reflect) { 209 return target; 210 } 211 return new Proxy(target, { 212 get: function get(target, key) { 213 if (key === deprecatedProperty) { 214 Drupal.deprecationError({ 215 message: message 216 }); 217 } 218 for (var _len = arguments.length, rest = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) { 219 rest[_key - 2] = arguments[_key]; 220 } 221 return Reflect.get.apply(Reflect, [target, key].concat(rest)); 222 } 223 }); 224 }; 225 Drupal.theme = function (func) { 226 if (func in Drupal.theme) { 227 var _Drupal$theme; 228 for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) { 229 args[_key2 - 1] = arguments[_key2]; 230 }
231 return (_Drupal$theme = Drupal.theme)[func].apply(_Drupal$theme, args); 232 } 233 }; 234 Drupal.theme.placeholder = function (str) { 235 return "<em class=\"placeholder\">".concat(Drupal.checkPlain(str), "</em>"); 236 }; 237})(Drupal, window.drupalSettings, window.drupalTranslations, window.console, window.Proxy, window.Reflect);; 238/** 239* DO NOT EDIT THIS FILE. 240* See the following change record for more information, 241* https://www.drupal.org/node/2815083 242* @preserve 243**/ 244if (window.jQuery) { 245 jQuery.noConflict(); 246} 247document.documentElement.className += ' js'; 248(function (Drupal, drupalSettings) { 249 var domReady = function domReady(callback) { 250 var listener = function listener() { 251 callback(); 252 document.removeEventListener('DOMContentLoaded', listener); 253 }; 254 if (document.readyState !== 'loading') { 255 setTimeout(callback, 0); 256 } else { 257 document.addEventListener('DOMContentLoaded', listener); 258 } 259 }; 260 domReady(function () { 261 Drupal.attachBehaviors(document, drupalSettings); 262 }); 263})(Drupal, window.drupalSettings);; 264/** 265* DO NOT EDIT THIS FILE. 266* See the following change record for more information, 267* https://www.drupal.org/node/2815083 268* @preserve 269**/ 270(function ($, once) { 271 var deprecatedMessageSuffix = "is deprecated in Drupal 9.3.0 and will be removed in Drupal 10.0.0. Use the core/once library instead. See https://www.drupal.org/node/3158256"; 272 var originalJQOnce = $.fn.once; 273 var originalJQRemoveOnce = $.fn.removeOnce; 274 $.fn.once = function jQueryOnce(id) { 275 Drupal.deprecationError({ 276 message: "jQuery.once() ".concat(deprecatedMessageSuffix) 277 }); 278 return originalJQOnce.apply(this, [id]); 279 }; 280 $.fn.removeOnce = function jQueryRemoveOnce(id) { 281 Drupal.deprecationError({ 282 message: "jQuery.removeOnce() ".concat(deprecatedMessageSuffix) 283 }); 284 return originalJQRemoveOnce.apply(this, [id]); 285 }; 286 var drupalOnce = once; 287 function augmentedOnce(id, selector, context) { 288 originalJQOnce.apply($(selector, context), [id]); 289 return drupalOnce(id, selector, context); 290 } 291 function remove(id, selector, context) { 292 originalJQRemoveOnce.apply($(selector, context), [id]); 293 return drupalOnce.remove(id, selector, context); 294 } 295 window.once = Object.assign(augmentedOnce, drupalOnce, { 296 remove: remove 297 }); 298})(jQuery, once);; 299/** 300 * @file 301 * Global utilities. 302 * 303 */ 304(function ($, Drupal) { 305 306 'use strict'; 307 308 Drupal.behaviors.bootstrap_barrio = { 309 attach: function (context, settings) { 310 311 var position = $(window).scrollTop(); 312 $(window).scroll(function () { 313 if ($(this).scrollTop() > 50) { 314 $('body').addClass("scrolled"); 315 } 316 else { 317 $('body').removeClass("scrolled"); 318 } 319 var scroll = $(window).scrollTop(); 320 if (scroll > position) { 321 $('body').addClass("scrolldown"); 322 $('body').removeClass("scrollup"); 323 } else { 324 $('body').addClass("scrollup"); 325 $('body').removeClass("scrolldown"); 326 } 327 position = scroll; 328 }); 329 330 $('.dropdown-item a.dropdown-toggle').on("click", function (e) { 331 $(this).next('ul').toggle(); 332 e.stopPropagation(); 333 e.preventDefault(); 334 }); 335 } 336 }; 337 338})(jQuery, Drupal); 339; 340/** 341 * @file 342 * Affix for Bootstrap 4. 343 * https://www.codeply.com/users/skelly 344 * 345 */ 346(function ($, Drupal) { 347 348 'use strict'; 349 350 Drupal.behaviors.bootstrap_barrio_affix = { 351 attach: function (context, settings) { 352 var toggleAffix = function (affixElement, scrollElement, wrapper) { 353 354 var height = affixElement.outerHeight(), 355 top = wrapper.offset().top; 356 357 if (scrollElement.scrollTop() >= top){ 358 wrapper.height(height); 359 affixElement.addClass("affix"); 360 } 361 else { 362 affixElement.removeClass("affix"); 363 wrapper.height('auto'); 364 } 365 366 }; 367 368 $(once('affixed', '[data-toggle="affix"]', context)).each(function () { 369 var ele = $(this), 370 wrapper = $('<div></div>'); 371 372 ele.before(wrapper); 373 $(window).on('scroll resize', function () { 374 toggleAffix(ele, $(this), wrapper); 375 }); 376 377 // init 378 toggleAffix(ele, $(window), wrapper); 379 }); 380 } 381 } 382})(jQuery, Drupal); 383;
vendor: 26,490 bytes, lines 384-1227
384/*! 385 * Bootstrap v4.6.2 (https://getbootstrap.com/) 386 * Copyright 2011-2022 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) 387 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) 388 */ 389(function (global, factory) { 390 typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('jquery')) : 391 typeof define === 'function' && define.amd ? define(['exports', 'jquery'], factory) : 392 (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.bootstrap = {}, global.jQuery)); 393})(this, (function (exports, $) { 'use strict'; 394 395 function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } 396 397 var $__default = /*#__PURE__*/_interopDefaultLegacy($); 398 399 function _defineProperties(target, props) { 400 for (var i = 0; i < props.length; i++) { 401 var descriptor = props[i]; 402 descriptor.enumerable = descriptor.enumerable || false; 403 descriptor.configurable = true; 404 if ("value" in descriptor) descriptor.writable = true; 405 Object.defineProperty(target, descriptor.key, descriptor); 406 } 407 } 408 409 function _createClass(Constructor, protoProps, staticProps) { 410 if (protoProps) _defineProperties(Constructor.prototype, protoProps); 411 if (staticProps) _defineProperties(Constructor, staticProps); 412 Object.defineProperty(Constructor, "prototype", { 413 writable: false 414 }); 415 return Constructor; 416 } 417 418 function _extends$1() { 419 _extends$1 = Object.assign ? Object.assign.bind() : function (target) { 420 for (var i = 1; i < arguments.length; i++) { 421 var source = arguments[i]; 422 423 for (var key in source) { 424 if (Object.prototype.hasOwnProperty.call(source, key)) { 425 target[key] = source[key]; 426 } 427 } 428 } 429 430 return target; 431 }; 432 return _extends$1.apply(this, arguments); 433 } 434 435 function _inheritsLoose(subClass, superClass) { 436 subClass.prototype = Object.create(superClass.prototype); 437 subClass.prototype.constructor = subClass; 438 439 _setPrototypeOf(subClass, superClass); 440 } 441 442 function _setPrototypeOf(o, p) { 443 _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { 444 o.__proto__ = p; 445 return o; 446 }; 447 return _setPrototypeOf(o, p); 448 } 449 450 /** 451 * -------------------------------------------------------------------------- 452 * Bootstrap (v4.6.2): util.js 453 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) 454 * -------------------------------------------------------------------------- 455 */ 456 /** 457 * Private TransitionEnd Helpers 458 */ 459 460 var TRANSITION_END = 'transitionend'; 461 var MAX_UID = 1000000; 462 var MILLISECONDS_MULTIPLIER = 1000; // Shoutout AngusCroll (https://goo.gl/pxwQGp) 463 464 function toType(obj) { 465 if (obj === null || typeof obj === 'undefined') { 466 return "" + obj; 467 } 468 469 return {}.toString.call(obj).match(/\s([a-z]+)/i)[1].toLowerCase(); 470 } 471 472 function getSpecialTransitionEndEvent() { 473 return { 474 bindType: TRANSITION_END, 475 delegateType: TRANSITION_END, 476 handle: function handle(event) { 477 if ($__default["default"](event.target).is(this)) { 478 return event.handleObj.handler.apply(this, arguments); // eslint-disable-line prefer-rest-params 479 } 480 481 return undefined; 482 } 483 }; 484 } 485 486 function transitionEndEmulator(duration) { 487 var _this = this; 488 489 var called = false; 490 $__default["default"](this).one(Util.TRANSITION_END, function () { 491 called = true; 492 }); 493 setTimeout(function () { 494 if (!called) { 495 Util.triggerTransitionEnd(_this); 496 } 497 }, duration); 498 return this; 499 } 500 501 function setTransitionEndSupport() { 502 $__default["default"].fn.emulateTransitionEnd = transitionEndEmulator; 503 $__default["default"].event.special[Util.TRANSITION_END] = getSpecialTransitionEndEvent(); 504 } 505 /** 506 * Public Util API 507 */ 508 509 510 var Util = { 511 TRANSITION_END: 'bsTransitionEnd', 512 getUID: function getUID(prefix) { 513 do { 514 // eslint-disable-next-line no-bitwise 515 prefix += ~~(Math.random() * MAX_UID); // "~~" acts like a faster Math.floor() here 516 } while (document.getElementById(prefix)); 517 518 return prefix; 519 }, 520 getSelectorFromElement: function getSelectorFromElement(element) { 521 var selector = element.getAttribute('data-target'); 522 523 if (!selector || selector === '#') { 524 var hrefAttr = element.getAttribute('href'); 525 selector = hrefAttr && hrefAttr !== '#' ? hrefAttr.trim() : ''; 526 } 527 528 try { 529 return document.querySelector(selector) ? selector : null; 530 } catch (_) { 531 return null; 532 } 533 }, 534 getTransitionDurationFromElement: function getTransitionDurationFromElement(element) { 535 if (!element) { 536 return 0; 537 } // Get transition-duration of the element 538 539 540 var transitionDuration = $__default["default"](element).css('transition-duration'); 541 var transitionDelay = $__default["default"](element).css('transition-delay'); 542 var floatTransitionDuration = parseFloat(transitionDuration); 543 var floatTransitionDelay = parseFloat(transitionDelay); // Return 0 if element or transition duration is not found 544 545 if (!floatTransitionDuration && !floatTransitionDelay) { 546 return 0; 547 } // If multiple durations are defined, take the first 548 549 550 transitionDuration = transitionDuration.split(',')[0]; 551 transitionDelay = transitionDelay.split(',')[0]; 552 return (parseFloat(transitionDuration) + parseFloat(transitionDelay)) * MILLISECONDS_MULTIPLIER; 553 }, 554 reflow: function reflow(element) { 555 return element.offsetHeight; 556 }, 557 triggerTransitionEnd: function triggerTransitionEnd(element) { 558 $__default["default"](element).trigger(TRANSITION_END); 559 }, 560 supportsTransitionEnd: function supportsTransitionEnd() { 561 return Boolean(TRANSITION_END); 562 }, 563 isElement: function isElement(obj) { 564 return (obj[0] || obj).nodeType; 565 }, 566 typeCheckConfig: function typeCheckConfig(componentName, config, configTypes) { 567 for (var property in configTypes) { 568 if (Object.prototype.hasOwnProperty.call(configTypes, property)) { 569 var expectedTypes = configTypes[property]; 570 var value = config[property]; 571 var valueType = value && Util.isElement(value) ? 'element' : toType(value); 572 573 if (!new RegExp(expectedTypes).test(valueType)) { 574 throw new Error(componentName.toUpperCase() + ": " + ("Option \"" + property + "\" provided type \"" + valueType + "\" ") + ("but expected type \"" + expectedTypes + "\".")); 575 } 576 } 577 } 578 }, 579 findShadowRoot: function findShadowRoot(element) { 580 if (!document.documentElement.attachShadow) { 581 return null; 582 } // Can find the shadow root otherwise it'll return the document 583 584 585 if (typeof element.getRootNode === 'function') { 586 var root = element.getRootNode(); 587 return root instanceof ShadowRoot ? root : null; 588 } 589 590 if (element instanceof ShadowRoot) { 591 return element; 592 } // when we don't find a shadow root 593 594 595 if (!element.parentNode) { 596 return null; 597 } 598 599 return Util.findShadowRoot(element.parentNode); 600 }, 601 jQueryDetection: function jQueryDetection() { 602 if (typeof $__default["default"] === 'undefined') { 603 throw new TypeError('Bootstrap\'s JavaScript requires jQuery. jQuery must be included before Bootstrap\'s JavaScript.'); 604 } 605 606 var version = $__default["default"].fn.jquery.split(' ')[0].split('.'); 607 var minMajor = 1; 608 var ltMajor = 2; 609 var minMinor = 9; 610 var minPatch = 1; 611 var maxMajor = 4; 612 613 if (version[0] < ltMajor && version[1] < minMinor || version[0] === minMajor && version[1] === minMinor && version[2] < minPatch || version[0] >= maxMajor) { 614 throw new Error('Bootstrap\'s JavaScript requires at least jQuery v1.9.1 but less than v4.0.0'); 615 } 616 } 617 }; 618 Util.jQueryDetection(); 619 setTransitionEndSupport(); 620 621 /** 622 * Constants 623 */ 624 625 var NAME$a = 'alert'; 626 var VERSION$a = '4.6.2'; 627 var DATA_KEY$a = 'bs.alert'; 628 var EVENT_KEY$a = "." + DATA_KEY$a; 629 var DATA_API_KEY$7 = '.data-api'; 630 var JQUERY_NO_CONFLICT$a = $__default["default"].fn[NAME$a]; 631 var CLASS_NAME_ALERT = 'alert'; 632 var CLASS_NAME_FADE$5 = 'fade'; 633 var CLASS_NAME_SHOW$7 = 'show'; 634 var EVENT_CLOSE = "close" + EVENT_KEY$a; 635 var EVENT_CLOSED = "closed" + EVENT_KEY$a; 636 var EVENT_CLICK_DATA_API$6 = "click" + EVENT_KEY$a + DATA_API_KEY$7; 637 var SELECTOR_DISMISS = '[data-dismiss="alert"]'; 638 /** 639 * Class definition 640 */ 641 642 var Alert = /*#__PURE__*/function () { 643 function Alert(element) { 644 this._element = element; 645 } // Getters 646 647 648 var _proto = Alert.prototype; 649 650 // Public 651 _proto.close = function close(element) { 652 var rootElement = this._element; 653 654 if (element) { 655 rootElement = this._getRootElement(element); 656 } 657 658 var customEvent = this._triggerCloseEvent(rootElement); 659 660 if (customEvent.isDefaultPrevented()) { 661 return; 662 } 663 664 this._removeElement(rootElement); 665 }; 666 667 _proto.dispose = function dispose() { 668 $__default["default"].removeData(this._element, DATA_KEY$a); 669 this._element = null; 670 } // Private 671 ; 672 673 _proto._getRootElement = function _getRootElement(element) { 674 var selector = Util.getSelectorFromElement(element); 675 var parent = false; 676 677 if (selector) { 678 parent = document.querySelector(selector); 679 } 680 681 if (!parent) { 682 parent = $__default["default"](element).closest("." + CLASS_NAME_ALERT)[0]; 683 } 684 685 return parent; 686 }; 687 688 _proto._triggerCloseEvent = function _triggerCloseEvent(element) { 689 var closeEvent = $__default["default"].Event(EVENT_CLOSE); 690 $__default["default"](element).trigger(closeEvent); 691 return closeEvent; 692 }; 693 694 _proto._removeElement = function _removeElement(element) { 695 var _this = this; 696 697 $__default["default"](element).removeClass(CLASS_NAME_SHOW$7); 698 699 if (!$__default["default"](element).hasClass(CLASS_NAME_FADE$5)) { 700 this._destroyElement(element); 701 702 return; 703 } 704 705 var transitionDuration = Util.getTransitionDurationFromElement(element); 706 $__default["default"](element).one(Util.TRANSITION_END, function (event) { 707 return _this._destroyElement(element, event); 708 }).emulateTransitionEnd(transitionDuration); 709 }; 710 711 _proto._destroyElement = function _destroyElement(element) { 712 $__default["default"](element).detach().trigger(EVENT_CLOSED).remove(); 713 } // Static 714 ; 715 716 Alert._jQueryInterface = function _jQueryInterface(config) { 717 return this.each(function () { 718 var $element = $__default["default"](this); 719 var data = $element.data(DATA_KEY$a); 720 721 if (!data) { 722 data = new Alert(this); 723 $element.data(DATA_KEY$a, data); 724 } 725 726 if (config === 'close') { 727 data[config](this); 728 } 729 }); 730 }; 731 732 Alert._handleDismiss = function _handleDismiss(alertInstance) { 733 return function (event) { 734 if (event) { 735 event.preventDefault(); 736 } 737 738 alertInstance.close(this); 739 }; 740 }; 741 742 _createClass(Alert, null, [{ 743 key: "VERSION", 744 get: function get() { 745 return VERSION$a; 746 } 747 }]); 748 749 return Alert; 750 }(); 751 /** 752 * Data API implementation 753 */ 754 755 756 $__default["default"](document).on(EVENT_CLICK_DATA_API$6, SELECTOR_DISMISS, Alert._handleDismiss(new Alert())); 757 /** 758 * jQuery 759 */ 760 761 $__default["default"].fn[NAME$a] = Alert._jQueryInterface; 762 $__default["default"].fn[NAME$a].Constructor = Alert; 763 764 $__default["default"].fn[NAME$a].noConflict = function () { 765 $__default["default"].fn[NAME$a] = JQUERY_NO_CONFLICT$a; 766 return Alert._jQueryInterface; 767 }; 768 769 /** 770 * Constants 771 */ 772 773 var NAME$9 = 'button'; 774 var VERSION$9 = '4.6.2'; 775 var DATA_KEY$9 = 'bs.button'; 776 var EVENT_KEY$9 = "." + DATA_KEY$9; 777 var DATA_API_KEY$6 = '.data-api'; 778 var JQUERY_NO_CONFLICT$9 = $__default["default"].fn[NAME$9]; 779 var CLASS_NAME_ACTIVE$3 = 'active'; 780 var CLASS_NAME_BUTTON = 'btn'; 781 var CLASS_NAME_FOCUS = 'focus'; 782 var EVENT_CLICK_DATA_API$5 = "click" + EVENT_KEY$9 + DATA_API_KEY$6; 783 var EVENT_FOCUS_BLUR_DATA_API = "focus" + EVENT_KEY$9 + DATA_API_KEY$6 + " " + ("blur" + EVENT_KEY$9 + DATA_API_KEY$6); 784 var EVENT_LOAD_DATA_API$2 = "load" + EVENT_KEY$9 + DATA_API_KEY$6; 785 var SELECTOR_DATA_TOGGLE_CARROT = '[data-toggle^="button"]'; 786 var SELECTOR_DATA_TOGGLES = '[data-toggle="buttons"]'; 787 var SELECTOR_DATA_TOGGLE$4 = '[data-toggle="button"]'; 788 var SELECTOR_DATA_TOGGLES_BUTTONS = '[data-toggle="buttons"] .btn'; 789 var SELECTOR_INPUT = 'input:not([type="hidden"])'; 790 var SELECTOR_ACTIVE$2 = '.active'; 791 var SELECTOR_BUTTON = '.btn'; 792 /** 793 * Class definition 794 */ 795 796 var Button = /*#__PURE__*/function () { 797 function Button(element) { 798 this._element = element; 799 this.shouldAvoidTriggerChange = false; 800 } // Getters 801 802 803 var _proto = Button.prototype; 804 805 // Public 806 _proto.toggle = function toggle() { 807 var triggerChangeEvent = true; 808 var addAriaPressed = true; 809 var rootElement = $__default["default"](this._element).closest(SELECTOR_DATA_TOGGLES)[0]; 810 811 if (rootElement) { 812 var input = this._element.querySelector(SELECTOR_INPUT); 813 814 if (input) { 815 if (input.type === 'radio') { 816 if (input.checked && this._element.classList.contains(CLASS_NAME_ACTIVE$3)) { 817 triggerChangeEvent = false; 818 } else { 819 var activeElement = rootElement.querySelector(SELECTOR_ACTIVE$2); 820 821 if (activeElement) { 822 $__default["default"](activeElement).removeClass(CLASS_NAME_ACTIVE$3); 823 } 824 } 825 } 826 827 if (triggerChangeEvent) { 828 // if it's not a radio button or checkbox don't add a pointless/invalid checked property to the input 829 if (input.type === 'checkbox' || input.type === 'radio') { 830 input.checked = !this._element.classList.contains(CLASS_NAME_ACTIVE$3); 831 } 832 833 if (!this.shouldAvoidTriggerChange) { 834 $__default["default"](input).trigger('change'); 835 } 836 } 837 838 input.focus(); 839 addAriaPressed = false; 840 } 841 } 842 843 if (!(this._element.hasAttribute('disabled') || this._element.classList.contains('disabled'))) { 844 if (addAriaPressed) { 845 this._element.setAttribute('aria-pressed', !this._element.classList.contains(CLASS_NAME_ACTIVE$3)); 846 } 847 848 if (triggerChangeEvent) { 849 $__default["default"](this._element).toggleClass(CLASS_NAME_ACTIVE$3); 850 } 851 } 852 }; 853 854 _proto.dispose = function dispose() { 855 $__default["default"].removeData(this._element, DATA_KEY$9); 856 this._element = null; 857 } // Static 858 ; 859 860 Button._jQueryInterface = function _jQueryInterface(config, avoidTriggerChange) { 861 return this.each(function () { 862 var $element = $__default["default"](this); 863 var data = $element.data(DATA_KEY$9); 864 865 if (!data) { 866 data = new Button(this); 867 $element.data(DATA_KEY$9, data); 868 } 869 870 data.shouldAvoidTriggerChange = avoidTriggerChange; 871 872 if (config === 'toggle') { 873 data[config](); 874 } 875 }); 876 }; 877 878 _createClass(Button, null, [{ 879 key: "VERSION", 880 get: function get() { 881 return VERSION$9; 882 } 883 }]); 884 885 return Button; 886 }(); 887 /** 888 * Data API implementation 889 */ 890 891 892 $__default["default"](document).on(EVENT_CLICK_DATA_API$5, SELECTOR_DATA_TOGGLE_CARROT, function (event) { 893 var button = event.target; 894 var initialButton = button; 895 896 if (!$__default["default"](button).hasClass(CLASS_NAME_BUTTON)) { 897 button = $__default["default"](button).closest(SELECTOR_BUTTON)[0]; 898 } 899 900 if (!button || button.hasAttribute('disabled') || button.classList.contains('disabled')) { 901 event.preventDefault(); // work around Firefox bug #1540995 902 } else { 903 var inputBtn = button.querySelector(SELECTOR_INPUT); 904 905 if (inputBtn && (inputBtn.hasAttribute('disabled') || inputBtn.classList.contains('disabled'))) { 906 event.preventDefault(); // work around Firefox bug #1540995 907 908 return; 909 } 910 911 if (initialButton.tagName === 'INPUT' || button.tagName !== 'LABEL') { 912 Button._jQueryInterface.call($__default["default"](button), 'toggle', initialButton.tagName === 'INPUT'); 913 } 914 } 915 }).on(EVENT_FOCUS_BLUR_DATA_API, SELECTOR_DATA_TOGGLE_CARROT, function (event) { 916 var button = $__default["default"](event.target).closest(SELECTOR_BUTTON)[0]; 917 $__default["default"](button).toggleClass(CLASS_NAME_FOCUS, /^focus(in)?$/.test(event.type)); 918 }); 919 $__default["default"](window).on(EVENT_LOAD_DATA_API$2, function () { 920 // ensure correct active class is set to match the controls' actual values/states 921 // find all checkboxes/readio buttons inside data-toggle groups 922 var buttons = [].slice.call(document.querySelectorAll(SELECTOR_DATA_TOGGLES_BUTTONS)); 923 924 for (var i = 0, len = buttons.length; i < len; i++) { 925 var button = buttons[i]; 926 var input = button.querySelector(SELECTOR_INPUT); 927 928 if (input.checked || input.hasAttribute('checked')) { 929 button.classList.add(CLASS_NAME_ACTIVE$3); 930 } else { 931 button.classList.remove(CLASS_NAME_ACTIVE$3); 932 } 933 } // find all button toggles 934 935 936 buttons = [].slice.call(document.querySelectorAll(SELECTOR_DATA_TOGGLE$4)); 937 938 for (var _i = 0, _len = buttons.length; _i < _len; _i++) { 939 var _button = buttons[_i]; 940 941 if (_button.getAttribute('aria-pressed') === 'true') { 942 _button.classList.add(CLASS_NAME_ACTIVE$3); 943 } else { 944 _button.classList.remove(CLASS_NAME_ACTIVE$3); 945 } 946 } 947 }); 948 /** 949 * jQuery 950 */ 951 952 $__default["default"].fn[NAME$9] = Button._jQueryInterface; 953 $__default["default"].fn[NAME$9].Constructor = Button; 954 955 $__default["default"].fn[NAME$9].noConflict = function () { 956 $__default["default"].fn[NAME$9] = JQUERY_NO_CONFLICT$9; 957 return Button._jQueryInterface; 958 }; 959 960 /** 961 * Constants 962 */ 963 964 var NAME$8 = 'carousel'; 965 var VERSION$8 = '4.6.2'; 966 var DATA_KEY$8 = 'bs.carousel'; 967 var EVENT_KEY$8 = "." + DATA_KEY$8; 968 var DATA_API_KEY$5 = '.data-api'; 969 var JQUERY_NO_CONFLICT$8 = $__default["default"].fn[NAME$8]; 970 var ARROW_LEFT_KEYCODE = 37; // KeyboardEvent.which value for left arrow key 971 972 var ARROW_RIGHT_KEYCODE = 39; // KeyboardEvent.which value for right arrow key 973 974 var TOUCHEVENT_COMPAT_WAIT = 500; // Time for mouse compat events to fire after touch 975 976 var SWIPE_THRESHOLD = 40; 977 var CLASS_NAME_CAROUSEL = 'carousel'; 978 var CLASS_NAME_ACTIVE$2 = 'active'; 979 var CLASS_NAME_SLIDE = 'slide'; 980 var CLASS_NAME_RIGHT = 'carousel-item-right'; 981 var CLASS_NAME_LEFT = 'carousel-item-left'; 982 var CLASS_NAME_NEXT = 'carousel-item-next'; 983 var CLASS_NAME_PREV = 'carousel-item-prev'; 984 var CLASS_NAME_POINTER_EVENT = 'pointer-event'; 985 var DIRECTION_NEXT = 'next'; 986 var DIRECTION_PREV = 'prev'; 987 var DIRECTION_LEFT = 'left'; 988 var DIRECTION_RIGHT = 'right'; 989 var EVENT_SLIDE = "slide" + EVENT_KEY$8; 990 var EVENT_SLID = "slid" + EVENT_KEY$8; 991 var EVENT_KEYDOWN = "keydown" + EVENT_KEY$8; 992 var EVENT_MOUSEENTER = "mouseenter" + EVENT_KEY$8; 993 var EVENT_MOUSELEAVE = "mouseleave" + EVENT_KEY$8; 994 var EVENT_TOUCHSTART = "touchstart" + EVENT_KEY$8; 995 var EVENT_TOUCHMOVE = "touchmove" + EVENT_KEY$8; 996 var EVENT_TOUCHEND = "touchend" + EVENT_KEY$8; 997 var EVENT_POINTERDOWN = "pointerdown" + EVENT_KEY$8; 998 var EVENT_POINTERUP = "pointerup" + EVENT_KEY$8; 999 var EVENT_DRAG_START = "dragstart" + EVENT_KEY$8; 1000 var EVENT_LOAD_DATA_API$1 = "load" + EVENT_KEY$8 + DATA_API_KEY$5; 1001 var EVENT_CLICK_DATA_API$4 = "click" + EVENT_KEY$8 + DATA_API_KEY$5; 1002 var SELECTOR_ACTIVE$1 = '.active'; 1003 var SELECTOR_ACTIVE_ITEM = '.active.carousel-item'; 1004 var SELECTOR_ITEM = '.carousel-item'; 1005 var SELECTOR_ITEM_IMG = '.carousel-item img'; 1006 var SELECTOR_NEXT_PREV = '.carousel-item-next, .carousel-item-prev'; 1007 var SELECTOR_INDICATORS = '.carousel-indicators'; 1008 var SELECTOR_DATA_SLIDE = '[data-slide], [data-slide-to]'; 1009 var SELECTOR_DATA_RIDE = '[data-ride="carousel"]'; 1010 var Default$7 = { 1011 interval: 5000, 1012 keyboard: true, 1013 slide: false, 1014 pause: 'hover', 1015 wrap: true, 1016 touch: true 1017 }; 1018 var DefaultType$7 = { 1019 interval: '(number|boolean)', 1020 keyboard: 'boolean', 1021 slide: '(boolean|string)', 1022 pause: '(string|boolean)', 1023 wrap: 'boolean', 1024 touch: 'boolean' 1025 }; 1026 var PointerType = { 1027 TOUCH: 'touch', 1028 PEN: 'pen' 1029 }; 1030 /** 1031 * Class definition 1032 */ 1033 1034 var Carousel = /*#__PURE__*/function () { 1035 function Carousel(element, config) { 1036 this._items = null; 1037 this._interval = null; 1038 this._activeElement = null; 1039 this._isPaused = false; 1040 this._isSliding = false; 1041 this.touchTimeout = null; 1042 this.touchStartX = 0; 1043 this.touchDeltaX = 0; 1044 this._config = this._getConfig(config); 1045 this._element = element; 1046 this._indicatorsElement = this._element.querySelector(SELECTOR_INDICATORS); 1047 this._touchSupported = 'ontouchstart' in document.documentElement || navigator.maxTouchPoints > 0; 1048 this._pointerEvent = Boolean(window.PointerEvent || window.MSPointerEvent); 1049 1050 this._addEventListeners(); 1051 } // Getters 1052 1053 1054 var _proto = Carousel.prototype; 1055 1056 // Public 1057 _proto.next = function next() { 1058 if (!this._isSliding) { 1059 this._slide(DIRECTION_NEXT); 1060 } 1061 }; 1062 1063 _proto.nextWhenVisible = function nextWhenVisible() { 1064 var $element = $__default["default"](this._element); // Don't call next when the page isn't visible 1065 // or the carousel or its parent isn't visible 1066 1067 if (!document.hidden && $element.is(':visible') && $element.css('visibility') !== 'hidden') { 1068 this.next(); 1069 } 1070 }; 1071 1072 _proto.prev = function prev() { 1073 if (!this._isSliding) { 1074 this._slide(DIRECTION_PREV); 1075 } 1076 }; 1077 1078 _proto.pause = function pause(event) { 1079 if (!event) { 1080 this._isPaused = true; 1081 } 1082 1083 if (this._element.querySelector(SELECTOR_NEXT_PREV)) { 1084 Util.triggerTransitionEnd(this._element); 1085 this.cycle(true); 1086 } 1087 1088 clearInterval(this._interval); 1089 this._interval = null; 1090 }; 1091 1092 _proto.cycle = function cycle(event) { 1093 if (!event) { 1094 this._isPaused = false; 1095 } 1096 1097 if (this._interval) { 1098 clearInterval(this._interval); 1099 this._interval = null; 1100 } 1101 1102 if (this._config.interval && !this._isPaused) { 1103 this._updateInterval(); 1104 1105 this._interval = setInterval((document.visibilityState ? this.nextWhenVisible : this.next).bind(this), this._config.interval); 1106 } 1107 }; 1108 1109 _proto.to = function to(index) { 1110 var _this = this; 1111 1112 this._activeElement = this._element.querySelector(SELECTOR_ACTIVE_ITEM); 1113 1114 var activeIndex = this._getItemIndex(this._activeElement); 1115 1116 if (index > this._items.length - 1 || index < 0) { 1117 return; 1118 } 1119 1120 if (this._isSliding) { 1121 $__default["default"](this._element).one(EVENT_SLID, function () { 1122 return _this.to(index); 1123 }); 1124 return; 1125 } 1126 1127 if (activeIndex === index) { 1128 this.pause(); 1129 this.cycle(); 1130 return; 1131 } 1132 1133 var direction = index > activeIndex ? DIRECTION_NEXT : DIRECTION_PREV; 1134 1135 this._slide(direction, this._items[index]); 1136 }; 1137 1138 _proto.dispose = function dispose() { 1139 $__default["default"](this._element).off(EVENT_KEY$8); 1140 $__default["default"].removeData(this._element, DATA_KEY$8); 1141 this._items = null; 1142 this._config = null; 1143 this._element = null; 1144 this._interval = null; 1145 this._isPaused = null; 1146 this._isSliding = null; 1147 this._activeElement = null; 1148 this._indicatorsElement = null; 1149 } // Private 1150 ; 1151 1152 _proto._getConfig = function _getConfig(config) { 1153 config = _extends$1({}, Default$7, config); 1154 Util.typeCheckConfig(NAME$8, config, DefaultType$7); 1155 return config; 1156 }; 1157 1158 _proto._handleSwipe = function _handleSwipe() { 1159 var absDeltax = Math.abs(this.touchDeltaX); 1160 1161 if (absDeltax <= SWIPE_THRESHOLD) { 1162 return; 1163 } 1164 1165 var direction = absDeltax / this.touchDeltaX; 1166 this.touchDeltaX = 0; // swipe left 1167 1168 if (direction > 0) { 1169 this.prev(); 1170 } // swipe right 1171 1172 1173 if (direction < 0) { 1174 this.next(); 1175 } 1176 }; 1177 1178 _proto._addEventListeners = function _addEventListeners() { 1179 var _this2 = this; 1180 1181 if (this._config.keyboard) { 1182 $__default["default"](this._element).on(EVENT_KEYDOWN, function (event) { 1183 return _this2._keydown(event); 1184 }); 1185 } 1186 1187 if (this._config.pause === 'hover') { 1188 $__default["default"](this._element).on(EVENT_MOUSEENTER, function (event) { 1189 return _this2.pause(event); 1190 }).on(EVENT_MOUSELEAVE, function (event) { 1191 return _this2.cycle(event); 1192 }); 1193 } 1194 1195 if (this._config.touch) { 1196 this._addTouchEventListeners(); 1197 } 1198 }; 1199 1200 _proto._addTouchEventListeners = function _addTouchEventListeners() { 1201 var _this3 = this; 1202 1203 if (!this._touchSupported) { 1204 return; 1205 } 1206 1207 var start = function start(event) { 1208 if (_this3._pointerEvent && PointerType[event.originalEvent.pointerType.toUpperCase()]) { 1209 _this3.touchStartX = event.originalEvent.clientX; 1210 } else if (!_this3._pointerEvent) { 1211 _this3.touchStartX = event.originalEvent.touches[0].clientX; 1212 } 1213 }; 1214 1215 var move = function move(event) { 1216 // ensure swiping with one touch and not pinching 1217 _this3.touchDeltaX = event.originalEvent.touches && event.originalEvent.touches.length > 1 ? 0 : event.originalEvent.touches[0].clientX - _this3.touchStartX; 1218 }; 1219 1220 var end = function end(event) { 1221 if (_this3._pointerEvent && PointerType[event.originalEvent.pointerType.toUpperCase()]) { 1222 _this3.touchDeltaX = event.originalEvent.clientX - _this3.touchStartX; 1223 } 1224 1225 _this3._handleSwipe(); 1226 1227 if (_this3._config.pause === 'hover') {
vendor: 5,760 bytes, lines 1228-1386
1228 // If it's a touch-enabled device, mouseenter/leave are fired as 1229 // part of the mouse compatibility events on first tap - the carousel 1230 // would stop cycling until user tapped out of it; 1231 // here, we listen for touchend, explicitly pause the carousel 1232 // (as if it's the second time we tap on it, mouseenter compat event 1233 // is NOT fired) and after a timeout (to allow for mouse compatibility 1234 // events to fire) we explicitly restart cycling 1235 _this3.pause(); 1236 1237 if (_this3.touchTimeout) { 1238 clearTimeout(_this3.touchTimeout); 1239 } 1240 1241 _this3.touchTimeout = setTimeout(function (event) { 1242 return _this3.cycle(event); 1243 }, TOUCHEVENT_COMPAT_WAIT + _this3._config.interval); 1244 } 1245 }; 1246 1247 $__default["default"](this._element.querySelectorAll(SELECTOR_ITEM_IMG)).on(EVENT_DRAG_START, function (e) { 1248 return e.preventDefault(); 1249 }); 1250 1251 if (this._pointerEvent) { 1252 $__default["default"](this._element).on(EVENT_POINTERDOWN, function (event) { 1253 return start(event); 1254 }); 1255 $__default["default"](this._element).on(EVENT_POINTERUP, function (event) { 1256 return end(event); 1257 }); 1258 1259 this._element.classList.add(CLASS_NAME_POINTER_EVENT); 1260 } else { 1261 $__default["default"](this._element).on(EVENT_TOUCHSTART, function (event) { 1262 return start(event); 1263 }); 1264 $__default["default"](this._element).on(EVENT_TOUCHMOVE, function (event) { 1265 return move(event); 1266 }); 1267 $__default["default"](this._element).on(EVENT_TOUCHEND, function (event) { 1268 return end(event); 1269 }); 1270 } 1271 }; 1272 1273 _proto._keydown = function _keydown(event) { 1274 if (/input|textarea/i.test(event.target.tagName)) { 1275 return; 1276 } 1277 1278 switch (event.which) { 1279 case ARROW_LEFT_KEYCODE: 1280 event.preventDefault(); 1281 this.prev(); 1282 break; 1283 1284 case ARROW_RIGHT_KEYCODE: 1285 event.preventDefault(); 1286 this.next(); 1287 break; 1288 } 1289 }; 1290 1291 _proto._getItemIndex = function _getItemIndex(element) { 1292 this._items = element && element.parentNode ? [].slice.call(element.parentNode.querySelectorAll(SELECTOR_ITEM)) : []; 1293 return this._items.indexOf(element); 1294 }; 1295 1296 _proto._getItemByDirection = function _getItemByDirection(direction, activeElement) { 1297 var isNextDirection = direction === DIRECTION_NEXT; 1298 var isPrevDirection = direction === DIRECTION_PREV; 1299 1300 var activeIndex = this._getItemIndex(activeElement); 1301 1302 var lastItemIndex = this._items.length - 1; 1303 var isGoingToWrap = isPrevDirection && activeIndex === 0 || isNextDirection && activeIndex === lastItemIndex; 1304 1305 if (isGoingToWrap && !this._config.wrap) { 1306 return activeElement; 1307 } 1308 1309 var delta = direction === DIRECTION_PREV ? -1 : 1; 1310 var itemIndex = (activeIndex + delta) % this._items.length; 1311 return itemIndex === -1 ? this._items[this._items.length - 1] : this._items[itemIndex]; 1312 }; 1313 1314 _proto._triggerSlideEvent = function _triggerSlideEvent(relatedTarget, eventDirectionName) { 1315 var targetIndex = this._getItemIndex(relatedTarget); 1316 1317 var fromIndex = this._getItemIndex(this._element.querySelector(SELECTOR_ACTIVE_ITEM)); 1318 1319 var slideEvent = $__default["default"].Event(EVENT_SLIDE, { 1320 relatedTarget: relatedTarget, 1321 direction: eventDirectionName, 1322 from: fromIndex, 1323 to: targetIndex 1324 }); 1325 $__default["default"](this._element).trigger(slideEvent); 1326 return slideEvent; 1327 }; 1328 1329 _proto._setActiveIndicatorElement = function _setActiveIndicatorElement(element) { 1330 if (this._indicatorsElement) { 1331 var indicators = [].slice.call(this._indicatorsElement.querySelectorAll(SELECTOR_ACTIVE$1)); 1332 $__default["default"](indicators).removeClass(CLASS_NAME_ACTIVE$2); 1333 1334 var nextIndicator = this._indicatorsElement.children[this._getItemIndex(element)]; 1335 1336 if (nextIndicator) { 1337 $__default["default"](nextIndicator).addClass(CLASS_NAME_ACTIVE$2); 1338 } 1339 } 1340 }; 1341 1342 _proto._updateInterval = function _updateInterval() { 1343 var element = this._activeElement || this._element.querySelector(SELECTOR_ACTIVE_ITEM); 1344 1345 if (!element) { 1346 return; 1347 } 1348 1349 var elementInterval = parseInt(element.getAttribute('data-interval'), 10); 1350 1351 if (elementInterval) { 1352 this._config.defaultInterval = this._config.defaultInterval || this._config.interval; 1353 this._config.interval = elementInterval; 1354 } else { 1355 this._config.interval = this._config.defaultInterval || this._config.interval; 1356 } 1357 }; 1358 1359 _proto._slide = function _slide(direction, element) { 1360 var _this4 = this; 1361 1362 var activeElement = this._element.querySelector(SELECTOR_ACTIVE_ITEM); 1363 1364 var activeElementIndex = this._getItemIndex(activeElement); 1365 1366 var nextElement = element || activeElement && this._getItemByDirection(direction, activeElement); 1367 1368 var nextElementIndex = this._getItemIndex(nextElement); 1369 1370 var isCycling = Boolean(this._interval); 1371 var directionalClassName; 1372 var orderClassName; 1373 var eventDirectionName; 1374 1375 if (direction === DIRECTION_NEXT) { 1376 directionalClassName = CLASS_NAME_LEFT; 1377 orderClassName = CLASS_NAME_NEXT; 1378 eventDirectionName = DIRECTION_LEFT; 1379 } else { 1380 directionalClassName = CLASS_NAME_RIGHT; 1381 orderClassName = CLASS_NAME_PREV; 1382 eventDirectionName = DIRECTION_RIGHT; 1383 } 1384 1385 if (nextElement && $__default["default"](nextElement).hasClass(CLASS_NAME_ACTIVE$2)) { 1386 this._isSliding = false;
vendor: 122,548 bytes, lines 1387-4907
1387 return; 1388 } 1389 1390 var slideEvent = this._triggerSlideEvent(nextElement, eventDirectionName); 1391 1392 if (slideEvent.isDefaultPrevented()) { 1393 return; 1394 } 1395 1396 if (!activeElement || !nextElement) { 1397 // Some weirdness is happening, so we bail 1398 return; 1399 } 1400 1401 this._isSliding = true; 1402 1403 if (isCycling) { 1404 this.pause(); 1405 } 1406 1407 this._setActiveIndicatorElement(nextElement); 1408 1409 this._activeElement = nextElement; 1410 var slidEvent = $__default["default"].Event(EVENT_SLID, { 1411 relatedTarget: nextElement, 1412 direction: eventDirectionName, 1413 from: activeElementIndex, 1414 to: nextElementIndex 1415 }); 1416 1417 if ($__default["default"](this._element).hasClass(CLASS_NAME_SLIDE)) { 1418 $__default["default"](nextElement).addClass(orderClassName); 1419 Util.reflow(nextElement); 1420 $__default["default"](activeElement).addClass(directionalClassName); 1421 $__default["default"](nextElement).addClass(directionalClassName); 1422 var transitionDuration = Util.getTransitionDurationFromElement(activeElement); 1423 $__default["default"](activeElement).one(Util.TRANSITION_END, function () { 1424 $__default["default"](nextElement).removeClass(directionalClassName + " " + orderClassName).addClass(CLASS_NAME_ACTIVE$2); 1425 $__default["default"](activeElement).removeClass(CLASS_NAME_ACTIVE$2 + " " + orderClassName + " " + directionalClassName); 1426 _this4._isSliding = false; 1427 setTimeout(function () { 1428 return $__default["default"](_this4._element).trigger(slidEvent); 1429 }, 0); 1430 }).emulateTransitionEnd(transitionDuration); 1431 } else { 1432 $__default["default"](activeElement).removeClass(CLASS_NAME_ACTIVE$2); 1433 $__default["default"](nextElement).addClass(CLASS_NAME_ACTIVE$2); 1434 this._isSliding = false; 1435 $__default["default"](this._element).trigger(slidEvent); 1436 } 1437 1438 if (isCycling) { 1439 this.cycle(); 1440 } 1441 } // Static 1442 ; 1443 1444 Carousel._jQueryInterface = function _jQueryInterface(config) { 1445 return this.each(function () { 1446 var data = $__default["default"](this).data(DATA_KEY$8); 1447 1448 var _config = _extends$1({}, Default$7, $__default["default"](this).data()); 1449 1450 if (typeof config === 'object') { 1451 _config = _extends$1({}, _config, config); 1452 } 1453 1454 var action = typeof config === 'string' ? config : _config.slide; 1455 1456 if (!data) { 1457 data = new Carousel(this, _config); 1458 $__default["default"](this).data(DATA_KEY$8, data); 1459 } 1460 1461 if (typeof config === 'number') { 1462 data.to(config); 1463 } else if (typeof action === 'string') { 1464 if (typeof data[action] === 'undefined') { 1465 throw new TypeError("No method named \"" + action + "\""); 1466 } 1467 1468 data[action](); 1469 } else if (_config.interval && _config.ride) { 1470 data.pause(); 1471 data.cycle(); 1472 } 1473 }); 1474 }; 1475 1476 Carousel._dataApiClickHandler = function _dataApiClickHandler(event) { 1477 var selector = Util.getSelectorFromElement(this); 1478 1479 if (!selector) { 1480 return; 1481 } 1482 1483 var target = $__default["default"](selector)[0]; 1484 1485 if (!target || !$__default["default"](target).hasClass(CLASS_NAME_CAROUSEL)) { 1486 return; 1487 } 1488 1489 var config = _extends$1({}, $__default["default"](target).data(), $__default["default"](this).data()); 1490 1491 var slideIndex = this.getAttribute('data-slide-to'); 1492 1493 if (slideIndex) { 1494 config.interval = false; 1495 } 1496 1497 Carousel._jQueryInterface.call($__default["default"](target), config); 1498 1499 if (slideIndex) { 1500 $__default["default"](target).data(DATA_KEY$8).to(slideIndex); 1501 } 1502 1503 event.preventDefault(); 1504 }; 1505 1506 _createClass(Carousel, null, [{ 1507 key: "VERSION", 1508 get: function get() { 1509 return VERSION$8; 1510 } 1511 }, { 1512 key: "Default", 1513 get: function get() { 1514 return Default$7; 1515 } 1516 }]); 1517 1518 return Carousel; 1519 }(); 1520 /** 1521 * Data API implementation 1522 */ 1523 1524 1525 $__default["default"](document).on(EVENT_CLICK_DATA_API$4, SELECTOR_DATA_SLIDE, Carousel._dataApiClickHandler); 1526 $__default["default"](window).on(EVENT_LOAD_DATA_API$1, function () { 1527 var carousels = [].slice.call(document.querySelectorAll(SELECTOR_DATA_RIDE)); 1528 1529 for (var i = 0, len = carousels.length; i < len; i++) { 1530 var $carousel = $__default["default"](carousels[i]); 1531 1532 Carousel._jQueryInterface.call($carousel, $carousel.data()); 1533 } 1534 }); 1535 /** 1536 * jQuery 1537 */ 1538 1539 $__default["default"].fn[NAME$8] = Carousel._jQueryInterface; 1540 $__default["default"].fn[NAME$8].Constructor = Carousel; 1541 1542 $__default["default"].fn[NAME$8].noConflict = function () { 1543 $__default["default"].fn[NAME$8] = JQUERY_NO_CONFLICT$8; 1544 return Carousel._jQueryInterface; 1545 }; 1546 1547 /** 1548 * Constants 1549 */ 1550 1551 var NAME$7 = 'collapse'; 1552 var VERSION$7 = '4.6.2'; 1553 var DATA_KEY$7 = 'bs.collapse'; 1554 var EVENT_KEY$7 = "." + DATA_KEY$7; 1555 var DATA_API_KEY$4 = '.data-api'; 1556 var JQUERY_NO_CONFLICT$7 = $__default["default"].fn[NAME$7]; 1557 var CLASS_NAME_SHOW$6 = 'show'; 1558 var CLASS_NAME_COLLAPSE = 'collapse'; 1559 var CLASS_NAME_COLLAPSING = 'collapsing'; 1560 var CLASS_NAME_COLLAPSED = 'collapsed'; 1561 var DIMENSION_WIDTH = 'width'; 1562 var DIMENSION_HEIGHT = 'height'; 1563 var EVENT_SHOW$4 = "show" + EVENT_KEY$7; 1564 var EVENT_SHOWN$4 = "shown" + EVENT_KEY$7; 1565 var EVENT_HIDE$4 = "hide" + EVENT_KEY$7; 1566 var EVENT_HIDDEN$4 = "hidden" + EVENT_KEY$7; 1567 var EVENT_CLICK_DATA_API$3 = "click" + EVENT_KEY$7 + DATA_API_KEY$4; 1568 var SELECTOR_ACTIVES = '.show, .collapsing'; 1569 var SELECTOR_DATA_TOGGLE$3 = '[data-toggle="collapse"]'; 1570 var Default$6 = { 1571 toggle: true, 1572 parent: '' 1573 }; 1574 var DefaultType$6 = { 1575 toggle: 'boolean', 1576 parent: '(string|element)' 1577 }; 1578 /** 1579 * Class definition 1580 */ 1581 1582 var Collapse = /*#__PURE__*/function () { 1583 function Collapse(element, config) { 1584 this._isTransitioning = false; 1585 this._element = element; 1586 this._config = this._getConfig(config); 1587 this._triggerArray = [].slice.call(document.querySelectorAll("[data-toggle=\"collapse\"][href=\"#" + element.id + "\"]," + ("[data-toggle=\"collapse\"][data-target=\"#" + element.id + "\"]"))); 1588 var toggleList = [].slice.call(document.querySelectorAll(SELECTOR_DATA_TOGGLE$3)); 1589 1590 for (var i = 0, len = toggleList.length; i < len; i++) { 1591 var elem = toggleList[i]; 1592 var selector = Util.getSelectorFromElement(elem); 1593 var filterElement = [].slice.call(document.querySelectorAll(selector)).filter(function (foundElem) { 1594 return foundElem === element; 1595 }); 1596 1597 if (selector !== null && filterElement.length > 0) { 1598 this._selector = selector; 1599 1600 this._triggerArray.push(elem); 1601 } 1602 } 1603 1604 this._parent = this._config.parent ? this._getParent() : null; 1605 1606 if (!this._config.parent) { 1607 this._addAriaAndCollapsedClass(this._element, this._triggerArray); 1608 } 1609 1610 if (this._config.toggle) { 1611 this.toggle(); 1612 } 1613 } // Getters 1614 1615 1616 var _proto = Collapse.prototype; 1617 1618 // Public 1619 _proto.toggle = function toggle() { 1620 if ($__default["default"](this._element).hasClass(CLASS_NAME_SHOW$6)) { 1621 this.hide(); 1622 } else { 1623 this.show(); 1624 } 1625 }; 1626 1627 _proto.show = function show() { 1628 var _this = this; 1629 1630 if (this._isTransitioning || $__default["default"](this._element).hasClass(CLASS_NAME_SHOW$6)) { 1631 return; 1632 } 1633 1634 var actives; 1635 var activesData; 1636 1637 if (this._parent) { 1638 actives = [].slice.call(this._parent.querySelectorAll(SELECTOR_ACTIVES)).filter(function (elem) { 1639 if (typeof _this._config.parent === 'string') { 1640 return elem.getAttribute('data-parent') === _this._config.parent; 1641 } 1642 1643 return elem.classList.contains(CLASS_NAME_COLLAPSE); 1644 }); 1645 1646 if (actives.length === 0) { 1647 actives = null; 1648 } 1649 } 1650 1651 if (actives) { 1652 activesData = $__default["default"](actives).not(this._selector).data(DATA_KEY$7); 1653 1654 if (activesData && activesData._isTransitioning) { 1655 return; 1656 } 1657 } 1658 1659 var startEvent = $__default["default"].Event(EVENT_SHOW$4); 1660 $__default["default"](this._element).trigger(startEvent); 1661 1662 if (startEvent.isDefaultPrevented()) { 1663 return; 1664 } 1665 1666 if (actives) { 1667 Collapse._jQueryInterface.call($__default["default"](actives).not(this._selector), 'hide'); 1668 1669 if (!activesData) { 1670 $__default["default"](actives).data(DATA_KEY$7, null); 1671 } 1672 } 1673 1674 var dimension = this._getDimension(); 1675 1676 $__default["default"](this._element).removeClass(CLASS_NAME_COLLAPSE).addClass(CLASS_NAME_COLLAPSING); 1677 this._element.style[dimension] = 0; 1678 1679 if (this._triggerArray.length) { 1680 $__default["default"](this._triggerArray).removeClass(CLASS_NAME_COLLAPSED).attr('aria-expanded', true); 1681 } 1682 1683 this.setTransitioning(true); 1684 1685 var complete = function complete() { 1686 $__default["default"](_this._element).removeClass(CLASS_NAME_COLLAPSING).addClass(CLASS_NAME_COLLAPSE + " " + CLASS_NAME_SHOW$6); 1687 _this._element.style[dimension] = ''; 1688 1689 _this.setTransitioning(false); 1690 1691 $__default["default"](_this._element).trigger(EVENT_SHOWN$4); 1692 }; 1693 1694 var capitalizedDimension = dimension[0].toUpperCase() + dimension.slice(1); 1695 var scrollSize = "scroll" + capitalizedDimension; 1696 var transitionDuration = Util.getTransitionDurationFromElement(this._element); 1697 $__default["default"](this._element).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration); 1698 this._element.style[dimension] = this._element[scrollSize] + "px"; 1699 }; 1700 1701 _proto.hide = function hide() { 1702 var _this2 = this; 1703 1704 if (this._isTransitioning || !$__default["default"](this._element).hasClass(CLASS_NAME_SHOW$6)) { 1705 return; 1706 } 1707 1708 var startEvent = $__default["default"].Event(EVENT_HIDE$4); 1709 $__default["default"](this._element).trigger(startEvent); 1710 1711 if (startEvent.isDefaultPrevented()) { 1712 return; 1713 } 1714 1715 var dimension = this._getDimension(); 1716 1717 this._element.style[dimension] = this._element.getBoundingClientRect()[dimension] + "px"; 1718 Util.reflow(this._element); 1719 $__default["default"](this._element).addClass(CLASS_NAME_COLLAPSING).removeClass(CLASS_NAME_COLLAPSE + " " + CLASS_NAME_SHOW$6); 1720 var triggerArrayLength = this._triggerArray.length; 1721 1722 if (triggerArrayLength > 0) { 1723 for (var i = 0; i < triggerArrayLength; i++) { 1724 var trigger = this._triggerArray[i]; 1725 var selector = Util.getSelectorFromElement(trigger); 1726 1727 if (selector !== null) { 1728 var $elem = $__default["default"]([].slice.call(document.querySelectorAll(selector))); 1729 1730 if (!$elem.hasClass(CLASS_NAME_SHOW$6)) { 1731 $__default["default"](trigger).addClass(CLASS_NAME_COLLAPSED).attr('aria-expanded', false); 1732 } 1733 } 1734 } 1735 } 1736 1737 this.setTransitioning(true); 1738 1739 var complete = function complete() { 1740 _this2.setTransitioning(false); 1741 1742 $__default["default"](_this2._element).removeClass(CLASS_NAME_COLLAPSING).addClass(CLASS_NAME_COLLAPSE).trigger(EVENT_HIDDEN$4); 1743 }; 1744 1745 this._element.style[dimension] = ''; 1746 var transitionDuration = Util.getTransitionDurationFromElement(this._element); 1747 $__default["default"](this._element).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration); 1748 }; 1749 1750 _proto.setTransitioning = function setTransitioning(isTransitioning) { 1751 this._isTransitioning = isTransitioning; 1752 }; 1753 1754 _proto.dispose = function dispose() { 1755 $__default["default"].removeData(this._element, DATA_KEY$7); 1756 this._config = null; 1757 this._parent = null; 1758 this._element = null; 1759 this._triggerArray = null; 1760 this._isTransitioning = null; 1761 } // Private 1762 ; 1763 1764 _proto._getConfig = function _getConfig(config) { 1765 config = _extends$1({}, Default$6, config); 1766 config.toggle = Boolean(config.toggle); // Coerce string values 1767 1768 Util.typeCheckConfig(NAME$7, config, DefaultType$6); 1769 return config; 1770 }; 1771 1772 _proto._getDimension = function _getDimension() { 1773 var hasWidth = $__default["default"](this._element).hasClass(DIMENSION_WIDTH); 1774 return hasWidth ? DIMENSION_WIDTH : DIMENSION_HEIGHT; 1775 }; 1776 1777 _proto._getParent = function _getParent() { 1778 var _this3 = this; 1779 1780 var parent; 1781 1782 if (Util.isElement(this._config.parent)) { 1783 parent = this._config.parent; // It's a jQuery object 1784 1785 if (typeof this._config.parent.jquery !== 'undefined') { 1786 parent = this._config.parent[0]; 1787 } 1788 } else { 1789 parent = document.querySelector(this._config.parent); 1790 } 1791 1792 var selector = "[data-toggle=\"collapse\"][data-parent=\"" + this._config.parent + "\"]"; 1793 var children = [].slice.call(parent.querySelectorAll(selector)); 1794 $__default["default"](children).each(function (i, element) { 1795 _this3._addAriaAndCollapsedClass(Collapse._getTargetFromElement(element), [element]); 1796 }); 1797 return parent; 1798 }; 1799 1800 _proto._addAriaAndCollapsedClass = function _addAriaAndCollapsedClass(element, triggerArray) { 1801 var isOpen = $__default["default"](element).hasClass(CLASS_NAME_SHOW$6); 1802 1803 if (triggerArray.length) { 1804 $__default["default"](triggerArray).toggleClass(CLASS_NAME_COLLAPSED, !isOpen).attr('aria-expanded', isOpen); 1805 } 1806 } // Static 1807 ; 1808 1809 Collapse._getTargetFromElement = function _getTargetFromElement(element) { 1810 var selector = Util.getSelectorFromElement(element); 1811 return selector ? document.querySelector(selector) : null; 1812 }; 1813 1814 Collapse._jQueryInterface = function _jQueryInterface(config) { 1815 return this.each(function () { 1816 var $element = $__default["default"](this); 1817 var data = $element.data(DATA_KEY$7); 1818 1819 var _config = _extends$1({}, Default$6, $element.data(), typeof config === 'object' && config ? config : {}); 1820 1821 if (!data && _config.toggle && typeof config === 'string' && /show|hide/.test(config)) { 1822 _config.toggle = false; 1823 } 1824 1825 if (!data) { 1826 data = new Collapse(this, _config); 1827 $element.data(DATA_KEY$7, data); 1828 } 1829 1830 if (typeof config === 'string') { 1831 if (typeof data[config] === 'undefined') { 1832 throw new TypeError("No method named \"" + config + "\""); 1833 } 1834 1835 data[config](); 1836 } 1837 }); 1838 }; 1839 1840 _createClass(Collapse, null, [{ 1841 key: "VERSION", 1842 get: function get() { 1843 return VERSION$7; 1844 } 1845 }, { 1846 key: "Default", 1847 get: function get() { 1848 return Default$6; 1849 } 1850 }]); 1851 1852 return Collapse; 1853 }(); 1854 /** 1855 * Data API implementation 1856 */ 1857 1858 1859 $__default["default"](document).on(EVENT_CLICK_DATA_API$3, SELECTOR_DATA_TOGGLE$3, function (event) { 1860 // preventDefault only for <a> elements (which change the URL) not inside the collapsible element 1861 if (event.currentTarget.tagName === 'A') { 1862 event.preventDefault(); 1863 } 1864 1865 var $trigger = $__default["default"](this); 1866 var selector = Util.getSelectorFromElement(this); 1867 var selectors = [].slice.call(document.querySelectorAll(selector)); 1868 $__default["default"](selectors).each(function () { 1869 var $target = $__default["default"](this); 1870 var data = $target.data(DATA_KEY$7); 1871 var config = data ? 'toggle' : $trigger.data(); 1872 1873 Collapse._jQueryInterface.call($target, config); 1874 }); 1875 }); 1876 /** 1877 * jQuery 1878 */ 1879 1880 $__default["default"].fn[NAME$7] = Collapse._jQueryInterface; 1881 $__default["default"].fn[NAME$7].Constructor = Collapse; 1882 1883 $__default["default"].fn[NAME$7].noConflict = function () { 1884 $__default["default"].fn[NAME$7] = JQUERY_NO_CONFLICT$7; 1885 return Collapse._jQueryInterface; 1886 }; 1887 1888 /**! 1889 * @fileOverview Kickass library to create and place poppers near their reference elements. 1890 * @version 1.16.1 1891 * @license 1892 * Copyright (c) 2016 Federico Zivolo and contributors 1893 * 1894 * Permission is hereby granted, free of charge, to any person obtaining a copy 1895 * of this software and associated documentation files (the "Software"), to deal 1896 * in the Software without restriction, including without limitation the rights 1897 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 1898 * copies of the Software, and to permit persons to whom the Software is 1899 * furnished to do so, subject to the following conditions: 1900 * 1901 * The above copyright notice and this permission notice shall be included in all 1902 * copies or substantial portions of the Software. 1903 * 1904 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 1905 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 1906 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 1907 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 1908 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 1909 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 1910 * SOFTWARE. 1911 */ 1912 var isBrowser = typeof window !== 'undefined' && typeof document !== 'undefined' && typeof navigator !== 'undefined'; 1913 1914 var timeoutDuration = function () { 1915 var longerTimeoutBrowsers = ['Edge', 'Trident', 'Firefox']; 1916 for (var i = 0; i < longerTimeoutBrowsers.length; i += 1) { 1917 if (isBrowser && navigator.userAgent.indexOf(longerTimeoutBrowsers[i]) >= 0) { 1918 return 1; 1919 } 1920 } 1921 return 0; 1922 }(); 1923 1924 function microtaskDebounce(fn) { 1925 var called = false; 1926 return function () { 1927 if (called) { 1928 return; 1929 } 1930 called = true; 1931 window.Promise.resolve().then(function () { 1932 called = false; 1933 fn(); 1934 }); 1935 }; 1936 } 1937 1938 function taskDebounce(fn) { 1939 var scheduled = false; 1940 return function () { 1941 if (!scheduled) { 1942 scheduled = true; 1943 setTimeout(function () { 1944 scheduled = false; 1945 fn(); 1946 }, timeoutDuration); 1947 } 1948 }; 1949 } 1950 1951 var supportsMicroTasks = isBrowser && window.Promise; 1952 1953 /** 1954 * Create a debounced version of a method, that's asynchronously deferred 1955 * but called in the minimum time possible. 1956 * 1957 * @method 1958 * @memberof Popper.Utils 1959 * @argument {Function} fn 1960 * @returns {Function} 1961 */ 1962 var debounce = supportsMicroTasks ? microtaskDebounce : taskDebounce; 1963 1964 /** 1965 * Check if the given variable is a function 1966 * @method 1967 * @memberof Popper.Utils 1968 * @argument {Any} functionToCheck - variable to check 1969 * @returns {Boolean} answer to: is a function? 1970 */ 1971 function isFunction(functionToCheck) { 1972 var getType = {}; 1973 return functionToCheck && getType.toString.call(functionToCheck) === '[object Function]'; 1974 } 1975 1976 /** 1977 * Get CSS computed property of the given element 1978 * @method 1979 * @memberof Popper.Utils 1980 * @argument {Eement} element 1981 * @argument {String} property 1982 */ 1983 function getStyleComputedProperty(element, property) { 1984 if (element.nodeType !== 1) { 1985 return []; 1986 } 1987 // NOTE: 1 DOM access here 1988 var window = element.ownerDocument.defaultView; 1989 var css = window.getComputedStyle(element, null); 1990 return property ? css[property] : css; 1991 } 1992 1993 /** 1994 * Returns the parentNode or the host of the element 1995 * @method 1996 * @memberof Popper.Utils 1997 * @argument {Element} element 1998 * @returns {Element} parent 1999 */ 2000 function getParentNode(element) { 2001 if (element.nodeName === 'HTML') { 2002 return element; 2003 } 2004 return element.parentNode || element.host; 2005 } 2006 2007 /** 2008 * Returns the scrolling parent of the given element 2009 * @method 2010 * @memberof Popper.Utils 2011 * @argument {Element} element 2012 * @returns {Element} scroll parent 2013 */ 2014 function getScrollParent(element) { 2015 // Return body, `getScroll` will take care to get the correct `scrollTop` from it 2016 if (!element) { 2017 return document.body; 2018 } 2019 2020 switch (element.nodeName) { 2021 case 'HTML': 2022 case 'BODY': 2023 return element.ownerDocument.body; 2024 case '#document': 2025 return element.body; 2026 } 2027 2028 // Firefox want us to check `-x` and `-y` variations as well 2029 2030 var _getStyleComputedProp = getStyleComputedProperty(element), 2031 overflow = _getStyleComputedProp.overflow, 2032 overflowX = _getStyleComputedProp.overflowX, 2033 overflowY = _getStyleComputedProp.overflowY; 2034 2035 if (/(auto|scroll|overlay)/.test(overflow + overflowY + overflowX)) { 2036 return element; 2037 } 2038 2039 return getScrollParent(getParentNode(element)); 2040 } 2041 2042 /** 2043 * Returns the reference node of the reference object, or the reference object itself. 2044 * @method 2045 * @memberof Popper.Utils 2046 * @param {Element|Object} reference - the reference element (the popper will be relative to this) 2047 * @returns {Element} parent 2048 */ 2049 function getReferenceNode(reference) { 2050 return reference && reference.referenceNode ? reference.referenceNode : reference; 2051 } 2052 2053 var isIE11 = isBrowser && !!(window.MSInputMethodContext && document.documentMode); 2054 var isIE10 = isBrowser && /MSIE 10/.test(navigator.userAgent); 2055 2056 /** 2057 * Determines if the browser is Internet Explorer 2058 * @method 2059 * @memberof Popper.Utils 2060 * @param {Number} version to check 2061 * @returns {Boolean} isIE 2062 */ 2063 function isIE(version) { 2064 if (version === 11) { 2065 return isIE11; 2066 } 2067 if (version === 10) { 2068 return isIE10; 2069 } 2070 return isIE11 || isIE10; 2071 } 2072 2073 /** 2074 * Returns the offset parent of the given element 2075 * @method 2076 * @memberof Popper.Utils 2077 * @argument {Element} element 2078 * @returns {Element} offset parent 2079 */ 2080 function getOffsetParent(element) { 2081 if (!element) { 2082 return document.documentElement; 2083 } 2084 2085 var noOffsetParent = isIE(10) ? document.body : null; 2086 2087 // NOTE: 1 DOM access here 2088 var offsetParent = element.offsetParent || null; 2089 // Skip hidden elements which don't have an offsetParent 2090 while (offsetParent === noOffsetParent && element.nextElementSibling) { 2091 offsetParent = (element = element.nextElementSibling).offsetParent; 2092 } 2093 2094 var nodeName = offsetParent && offsetParent.nodeName; 2095 2096 if (!nodeName || nodeName === 'BODY' || nodeName === 'HTML') { 2097 return element ? element.ownerDocument.documentElement : document.documentElement; 2098 } 2099 2100 // .offsetParent will return the closest TH, TD or TABLE in case 2101 // no offsetParent is present, I hate this job... 2102 if (['TH', 'TD', 'TABLE'].indexOf(offsetParent.nodeName) !== -1 && getStyleComputedProperty(offsetParent, 'position') === 'static') { 2103 return getOffsetParent(offsetParent); 2104 } 2105 2106 return offsetParent; 2107 } 2108 2109 function isOffsetContainer(element) { 2110 var nodeName = element.nodeName; 2111 2112 if (nodeName === 'BODY') { 2113 return false; 2114 } 2115 return nodeName === 'HTML' || getOffsetParent(element.firstElementChild) === element; 2116 } 2117 2118 /** 2119 * Finds the root node (document, shadowDOM root) of the given element 2120 * @method 2121 * @memberof Popper.Utils 2122 * @argument {Element} node 2123 * @returns {Element} root node 2124 */ 2125 function getRoot(node) { 2126 if (node.parentNode !== null) { 2127 return getRoot(node.parentNode); 2128 } 2129 2130 return node; 2131 } 2132 2133 /** 2134 * Finds the offset parent common to the two provided nodes 2135 * @method 2136 * @memberof Popper.Utils 2137 * @argument {Element} element1 2138 * @argument {Element} element2 2139 * @returns {Element} common offset parent 2140 */ 2141 function findCommonOffsetParent(element1, element2) { 2142 // This check is needed to avoid errors in case one of the elements isn't defined for any reason 2143 if (!element1 || !element1.nodeType || !element2 || !element2.nodeType) { 2144 return document.documentElement; 2145 } 2146 2147 // Here we make sure to give as "start" the element that comes first in the DOM 2148 var order = element1.compareDocumentPosition(element2) & Node.DOCUMENT_POSITION_FOLLOWING; 2149 var start = order ? element1 : element2; 2150 var end = order ? element2 : element1; 2151 2152 // Get common ancestor container 2153 var range = document.createRange(); 2154 range.setStart(start, 0); 2155 range.setEnd(end, 0); 2156 var commonAncestorContainer = range.commonAncestorContainer; 2157 2158 // Both nodes are inside #document 2159 2160 if (element1 !== commonAncestorContainer && element2 !== commonAncestorContainer || start.contains(end)) { 2161 if (isOffsetContainer(commonAncestorContainer)) { 2162 return commonAncestorContainer; 2163 } 2164 2165 return getOffsetParent(commonAncestorContainer); 2166 } 2167 2168 // one of the nodes is inside shadowDOM, find which one 2169 var element1root = getRoot(element1); 2170 if (element1root.host) { 2171 return findCommonOffsetParent(element1root.host, element2); 2172 } else { 2173 return findCommonOffsetParent(element1, getRoot(element2).host); 2174 } 2175 } 2176 2177 /** 2178 * Gets the scroll value of the given element in the given side (top and left) 2179 * @method 2180 * @memberof Popper.Utils 2181 * @argument {Element} element 2182 * @argument {String} side `top` or `left` 2183 * @returns {number} amount of scrolled pixels 2184 */ 2185 function getScroll(element) { 2186 var side = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'top'; 2187 2188 var upperSide = side === 'top' ? 'scrollTop' : 'scrollLeft'; 2189 var nodeName = element.nodeName; 2190 2191 if (nodeName === 'BODY' || nodeName === 'HTML') { 2192 var html = element.ownerDocument.documentElement; 2193 var scrollingElement = element.ownerDocument.scrollingElement || html; 2194 return scrollingElement[upperSide]; 2195 } 2196 2197 return element[upperSide]; 2198 } 2199 2200 /* 2201 * Sum or subtract the element scroll values (left and top) from a given rect object 2202 * @method 2203 * @memberof Popper.Utils 2204 * @param {Object} rect - Rect object you want to change 2205 * @param {HTMLElement} element - The element from the function reads the scroll values 2206 * @param {Boolean} subtract - set to true if you want to subtract the scroll values 2207 * @return {Object} rect - The modifier rect object 2208 */ 2209 function includeScroll(rect, element) { 2210 var subtract = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; 2211 2212 var scrollTop = getScroll(element, 'top'); 2213 var scrollLeft = getScroll(element, 'left'); 2214 var modifier = subtract ? -1 : 1; 2215 rect.top += scrollTop * modifier; 2216 rect.bottom += scrollTop * modifier; 2217 rect.left += scrollLeft * modifier; 2218 rect.right += scrollLeft * modifier; 2219 return rect; 2220 } 2221 2222 /* 2223 * Helper to detect borders of a given element 2224 * @method 2225 * @memberof Popper.Utils 2226 * @param {CSSStyleDeclaration} styles 2227 * Result of `getStyleComputedProperty` on the given element 2228 * @param {String} axis - `x` or `y` 2229 * @return {number} borders - The borders size of the given axis 2230 */ 2231 2232 function getBordersSize(styles, axis) { 2233 var sideA = axis === 'x' ? 'Left' : 'Top'; 2234 var sideB = sideA === 'Left' ? 'Right' : 'Bottom'; 2235 2236 return parseFloat(styles['border' + sideA + 'Width']) + parseFloat(styles['border' + sideB + 'Width']); 2237 } 2238 2239 function getSize(axis, body, html, computedStyle) { 2240 return Math.max(body['offset' + axis], body['scroll' + axis], html['client' + axis], html['offset' + axis], html['scroll' + axis], isIE(10) ? parseInt(html['offset' + axis]) + parseInt(computedStyle['margin' + (axis === 'Height' ? 'Top' : 'Left')]) + parseInt(computedStyle['margin' + (axis === 'Height' ? 'Bottom' : 'Right')]) : 0); 2241 } 2242 2243 function getWindowSizes(document) { 2244 var body = document.body; 2245 var html = document.documentElement; 2246 var computedStyle = isIE(10) && getComputedStyle(html); 2247 2248 return { 2249 height: getSize('Height', body, html, computedStyle), 2250 width: getSize('Width', body, html, computedStyle) 2251 }; 2252 } 2253 2254 var classCallCheck = function (instance, Constructor) { 2255 if (!(instance instanceof Constructor)) { 2256 throw new TypeError("Cannot call a class as a function"); 2257 } 2258 }; 2259 2260 var createClass = function () { 2261 function defineProperties(target, props) { 2262 for (var i = 0; i < props.length; i++) { 2263 var descriptor = props[i]; 2264 descriptor.enumerable = descriptor.enumerable || false; 2265 descriptor.configurable = true; 2266 if ("value" in descriptor) descriptor.writable = true; 2267 Object.defineProperty(target, descriptor.key, descriptor); 2268 } 2269 } 2270 2271 return function (Constructor, protoProps, staticProps) { 2272 if (protoProps) defineProperties(Constructor.prototype, protoProps); 2273 if (staticProps) defineProperties(Constructor, staticProps); 2274 return Constructor; 2275 }; 2276 }(); 2277 2278 2279 2280 2281 2282 var defineProperty = function (obj, key, value) { 2283 if (key in obj) { 2284 Object.defineProperty(obj, key, { 2285 value: value, 2286 enumerable: true, 2287 configurable: true, 2288 writable: true 2289 }); 2290 } else { 2291 obj[key] = value; 2292 } 2293 2294 return obj; 2295 }; 2296 2297 var _extends = Object.assign || function (target) { 2298 for (var i = 1; i < arguments.length; i++) { 2299 var source = arguments[i]; 2300 2301 for (var key in source) { 2302 if (Object.prototype.hasOwnProperty.call(source, key)) { 2303 target[key] = source[key]; 2304 } 2305 } 2306 } 2307 2308 return target; 2309 }; 2310 2311 /** 2312 * Given element offsets, generate an output similar to getBoundingClientRect 2313 * @method 2314 * @memberof Popper.Utils 2315 * @argument {Object} offsets 2316 * @returns {Object} ClientRect like output 2317 */ 2318 function getClientRect(offsets) { 2319 return _extends({}, offsets, { 2320 right: offsets.left + offsets.width, 2321 bottom: offsets.top + offsets.height 2322 }); 2323 } 2324 2325 /** 2326 * Get bounding client rect of given element 2327 * @method 2328 * @memberof Popper.Utils 2329 * @param {HTMLElement} element 2330 * @return {Object} client rect 2331 */ 2332 function getBoundingClientRect(element) { 2333 var rect = {}; 2334 2335 // IE10 10 FIX: Please, don't ask, the element isn't 2336 // considered in DOM in some circumstances... 2337 // This isn't reproducible in IE10 compatibility mode of IE11 2338 try { 2339 if (isIE(10)) { 2340 rect = element.getBoundingClientRect(); 2341 var scrollTop = getScroll(element, 'top'); 2342 var scrollLeft = getScroll(element, 'left'); 2343 rect.top += scrollTop; 2344 rect.left += scrollLeft; 2345 rect.bottom += scrollTop; 2346 rect.right += scrollLeft; 2347 } else { 2348 rect = element.getBoundingClientRect(); 2349 } 2350 } catch (e) {} 2351 2352 var result = { 2353 left: rect.left, 2354 top: rect.top, 2355 width: rect.right - rect.left, 2356 height: rect.bottom - rect.top 2357 }; 2358 2359 // subtract scrollbar size from sizes 2360 var sizes = element.nodeName === 'HTML' ? getWindowSizes(element.ownerDocument) : {}; 2361 var width = sizes.width || element.clientWidth || result.width; 2362 var height = sizes.height || element.clientHeight || result.height; 2363 2364 var horizScrollbar = element.offsetWidth - width; 2365 var vertScrollbar = element.offsetHeight - height; 2366 2367 // if an hypothetical scrollbar is detected, we must be sure it's not a `border` 2368 // we make this check conditional for performance reasons 2369 if (horizScrollbar || vertScrollbar) { 2370 var styles = getStyleComputedProperty(element); 2371 horizScrollbar -= getBordersSize(styles, 'x'); 2372 vertScrollbar -= getBordersSize(styles, 'y'); 2373 2374 result.width -= horizScrollbar; 2375 result.height -= vertScrollbar; 2376 } 2377 2378 return getClientRect(result); 2379 } 2380 2381 function getOffsetRectRelativeToArbitraryNode(children, parent) { 2382 var fixedPosition = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; 2383 2384 var isIE10 = isIE(10); 2385 var isHTML = parent.nodeName === 'HTML'; 2386 var childrenRect = getBoundingClientRect(children); 2387 var parentRect = getBoundingClientRect(parent); 2388 var scrollParent = getScrollParent(children); 2389 2390 var styles = getStyleComputedProperty(parent); 2391 var borderTopWidth = parseFloat(styles.borderTopWidth); 2392 var borderLeftWidth = parseFloat(styles.borderLeftWidth); 2393 2394 // In cases where the parent is fixed, we must ignore negative scroll in offset calc 2395 if (fixedPosition && isHTML) { 2396 parentRect.top = Math.max(parentRect.top, 0); 2397 parentRect.left = Math.max(parentRect.left, 0); 2398 } 2399 var offsets = getClientRect({ 2400 top: childrenRect.top - parentRect.top - borderTopWidth, 2401 left: childrenRect.left - parentRect.left - borderLeftWidth, 2402 width: childrenRect.width, 2403 height: childrenRect.height 2404 }); 2405 offsets.marginTop = 0; 2406 offsets.marginLeft = 0; 2407 2408 // Subtract margins of documentElement in case it's being used as parent 2409 // we do this only on HTML because it's the only element that behaves 2410 // differently when margins are applied to it. The margins are included in 2411 // the box of the documentElement, in the other cases not. 2412 if (!isIE10 && isHTML) { 2413 var marginTop = parseFloat(styles.marginTop); 2414 var marginLeft = parseFloat(styles.marginLeft); 2415 2416 offsets.top -= borderTopWidth - marginTop; 2417 offsets.bottom -= borderTopWidth - marginTop; 2418 offsets.left -= borderLeftWidth - marginLeft; 2419 offsets.right -= borderLeftWidth - marginLeft; 2420 2421 // Attach marginTop and marginLeft because in some circumstances we may need them 2422 offsets.marginTop = marginTop; 2423 offsets.marginLeft = marginLeft; 2424 } 2425 2426 if (isIE10 && !fixedPosition ? parent.contains(scrollParent) : parent === scrollParent && scrollParent.nodeName !== 'BODY') { 2427 offsets = includeScroll(offsets, parent); 2428 } 2429 2430 return offsets; 2431 } 2432 2433 function getViewportOffsetRectRelativeToArtbitraryNode(element) { 2434 var excludeScroll = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; 2435 2436 var html = element.ownerDocument.documentElement; 2437 var relativeOffset = getOffsetRectRelativeToArbitraryNode(element, html); 2438 var width = Math.max(html.clientWidth, window.innerWidth || 0); 2439 var height = Math.max(html.clientHeight, window.innerHeight || 0); 2440 2441 var scrollTop = !excludeScroll ? getScroll(html) : 0; 2442 var scrollLeft = !excludeScroll ? getScroll(html, 'left') : 0; 2443 2444 var offset = { 2445 top: scrollTop - relativeOffset.top + relativeOffset.marginTop, 2446 left: scrollLeft - relativeOffset.left + relativeOffset.marginLeft, 2447 width: width, 2448 height: height 2449 }; 2450 2451 return getClientRect(offset); 2452 } 2453 2454 /** 2455 * Check if the given element is fixed or is inside a fixed parent 2456 * @method 2457 * @memberof Popper.Utils 2458 * @argument {Element} element 2459 * @argument {Element} customContainer 2460 * @returns {Boolean} answer to "isFixed?" 2461 */ 2462 function isFixed(element) { 2463 var nodeName = element.nodeName; 2464 if (nodeName === 'BODY' || nodeName === 'HTML') { 2465 return false; 2466 } 2467 if (getStyleComputedProperty(element, 'position') === 'fixed') { 2468 return true; 2469 } 2470 var parentNode = getParentNode(element); 2471 if (!parentNode) { 2472 return false; 2473 } 2474 return isFixed(parentNode); 2475 } 2476 2477 /** 2478 * Finds the first parent of an element that has a transformed property defined 2479 * @method 2480 * @memberof Popper.Utils 2481 * @argument {Element} element 2482 * @returns {Element} first transformed parent or documentElement 2483 */ 2484 2485 function getFixedPositionOffsetParent(element) { 2486 // This check is needed to avoid errors in case one of the elements isn't defined for any reason 2487 if (!element || !element.parentElement || isIE()) { 2488 return document.documentElement; 2489 } 2490 var el = element.parentElement; 2491 while (el && getStyleComputedProperty(el, 'transform') === 'none') { 2492 el = el.parentElement; 2493 } 2494 return el || document.documentElement; 2495 } 2496 2497 /** 2498 * Computed the boundaries limits and return them 2499 * @method 2500 * @memberof Popper.Utils 2501 * @param {HTMLElement} popper 2502 * @param {HTMLElement} reference 2503 * @param {number} padding 2504 * @param {HTMLElement} boundariesElement - Element used to define the boundaries 2505 * @param {Boolean} fixedPosition - Is in fixed position mode 2506 * @returns {Object} Coordinates of the boundaries 2507 */ 2508 function getBoundaries(popper, reference, padding, boundariesElement) { 2509 var fixedPosition = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false; 2510 2511 // NOTE: 1 DOM access here 2512 2513 var boundaries = { top: 0, left: 0 }; 2514 var offsetParent = fixedPosition ? getFixedPositionOffsetParent(popper) : findCommonOffsetParent(popper, getReferenceNode(reference)); 2515 2516 // Handle viewport case 2517 if (boundariesElement === 'viewport') { 2518 boundaries = getViewportOffsetRectRelativeToArtbitraryNode(offsetParent, fixedPosition); 2519 } else { 2520 // Handle other cases based on DOM element used as boundaries 2521 var boundariesNode = void 0; 2522 if (boundariesElement === 'scrollParent') { 2523 boundariesNode = getScrollParent(getParentNode(reference)); 2524 if (boundariesNode.nodeName === 'BODY') { 2525 boundariesNode = popper.ownerDocument.documentElement; 2526 } 2527 } else if (boundariesElement === 'window') { 2528 boundariesNode = popper.ownerDocument.documentElement; 2529 } else { 2530 boundariesNode = boundariesElement; 2531 } 2532 2533 var offsets = getOffsetRectRelativeToArbitraryNode(boundariesNode, offsetParent, fixedPosition); 2534 2535 // In case of HTML, we need a different computation 2536 if (boundariesNode.nodeName === 'HTML' && !isFixed(offsetParent)) { 2537 var _getWindowSizes = getWindowSizes(popper.ownerDocument), 2538 height = _getWindowSizes.height, 2539 width = _getWindowSizes.width; 2540 2541 boundaries.top += offsets.top - offsets.marginTop; 2542 boundaries.bottom = height + offsets.top; 2543 boundaries.left += offsets.left - offsets.marginLeft; 2544 boundaries.right = width + offsets.left; 2545 } else { 2546 // for all the other DOM elements, this one is good 2547 boundaries = offsets; 2548 } 2549 } 2550 2551 // Add paddings 2552 padding = padding || 0; 2553 var isPaddingNumber = typeof padding === 'number'; 2554 boundaries.left += isPaddingNumber ? padding : padding.left || 0; 2555 boundaries.top += isPaddingNumber ? padding : padding.top || 0; 2556 boundaries.right -= isPaddingNumber ? padding : padding.right || 0; 2557 boundaries.bottom -= isPaddingNumber ? padding : padding.bottom || 0; 2558 2559 return boundaries; 2560 } 2561 2562 function getArea(_ref) { 2563 var width = _ref.width, 2564 height = _ref.height; 2565 2566 return width * height; 2567 } 2568 2569 /** 2570 * Utility used to transform the `auto` placement to the placement with more 2571 * available space. 2572 * @method 2573 * @memberof Popper.Utils 2574 * @argument {Object} data - The data object generated by update method 2575 * @argument {Object} options - Modifiers configuration and options 2576 * @returns {Object} The data object, properly modified 2577 */ 2578 function computeAutoPlacement(placement, refRect, popper, reference, boundariesElement) { 2579 var padding = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : 0; 2580 2581 if (placement.indexOf('auto') === -1) { 2582 return placement; 2583 } 2584 2585 var boundaries = getBoundaries(popper, reference, padding, boundariesElement); 2586 2587 var rects = { 2588 top: { 2589 width: boundaries.width, 2590 height: refRect.top - boundaries.top 2591 }, 2592 right: { 2593 width: boundaries.right - refRect.right, 2594 height: boundaries.height 2595 }, 2596 bottom: { 2597 width: boundaries.width, 2598 height: boundaries.bottom - refRect.bottom 2599 }, 2600 left: { 2601 width: refRect.left - boundaries.left, 2602 height: boundaries.height 2603 } 2604 }; 2605 2606 var sortedAreas = Object.keys(rects).map(function (key) { 2607 return _extends({ 2608 key: key 2609 }, rects[key], { 2610 area: getArea(rects[key]) 2611 }); 2612 }).sort(function (a, b) { 2613 return b.area - a.area; 2614 }); 2615 2616 var filteredAreas = sortedAreas.filter(function (_ref2) { 2617 var width = _ref2.width, 2618 height = _ref2.height; 2619 return width >= popper.clientWidth && height >= popper.clientHeight; 2620 }); 2621 2622 var computedPlacement = filteredAreas.length > 0 ? filteredAreas[0].key : sortedAreas[0].key; 2623 2624 var variation = placement.split('-')[1]; 2625 2626 return computedPlacement + (variation ? '-' + variation : ''); 2627 } 2628 2629 /** 2630 * Get offsets to the reference element 2631 * @method 2632 * @memberof Popper.Utils 2633 * @param {Object} state 2634 * @param {Element} popper - the popper element 2635 * @param {Element} reference - the reference element (the popper will be relative to this) 2636 * @param {Element} fixedPosition - is in fixed position mode 2637 * @returns {Object} An object containing the offsets which will be applied to the popper 2638 */ 2639 function getReferenceOffsets(state, popper, reference) { 2640 var fixedPosition = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null; 2641 2642 var commonOffsetParent = fixedPosition ? getFixedPositionOffsetParent(popper) : findCommonOffsetParent(popper, getReferenceNode(reference)); 2643 return getOffsetRectRelativeToArbitraryNode(reference, commonOffsetParent, fixedPosition); 2644 } 2645 2646 /** 2647 * Get the outer sizes of the given element (offset size + margins) 2648 * @method 2649 * @memberof Popper.Utils 2650 * @argument {Element} element 2651 * @returns {Object} object containing width and height properties 2652 */ 2653 function getOuterSizes(element) { 2654 var window = element.ownerDocument.defaultView; 2655 var styles = window.getComputedStyle(element); 2656 var x = parseFloat(styles.marginTop || 0) + parseFloat(styles.marginBottom || 0); 2657 var y = parseFloat(styles.marginLeft || 0) + parseFloat(styles.marginRight || 0); 2658 var result = { 2659 width: element.offsetWidth + y, 2660 height: element.offsetHeight + x 2661 }; 2662 return result; 2663 } 2664 2665 /** 2666 * Get the opposite placement of the given one 2667 * @method 2668 * @memberof Popper.Utils 2669 * @argument {String} placement 2670 * @returns {String} flipped placement 2671 */ 2672 function getOppositePlacement(placement) { 2673 var hash = { left: 'right', right: 'left', bottom: 'top', top: 'bottom' }; 2674 return placement.replace(/left|right|bottom|top/g, function (matched) { 2675 return hash[matched]; 2676 }); 2677 } 2678 2679 /** 2680 * Get offsets to the popper 2681 * @method 2682 * @memberof Popper.Utils 2683 * @param {Object} position - CSS position the Popper will get applied 2684 * @param {HTMLElement} popper - the popper element 2685 * @param {Object} referenceOffsets - the reference offsets (the popper will be relative to this) 2686 * @param {String} placement - one of the valid placement options 2687 * @returns {Object} popperOffsets - An object containing the offsets which will be applied to the popper 2688 */ 2689 function getPopperOffsets(popper, referenceOffsets, placement) { 2690 placement = placement.split('-')[0]; 2691 2692 // Get popper node sizes 2693 var popperRect = getOuterSizes(popper); 2694 2695 // Add position, width and height to our offsets object 2696 var popperOffsets = { 2697 width: popperRect.width, 2698 height: popperRect.height 2699 }; 2700 2701 // depending by the popper placement we have to compute its offsets slightly differently 2702 var isHoriz = ['right', 'left'].indexOf(placement) !== -1; 2703 var mainSide = isHoriz ? 'top' : 'left'; 2704 var secondarySide = isHoriz ? 'left' : 'top'; 2705 var measurement = isHoriz ? 'height' : 'width'; 2706 var secondaryMeasurement = !isHoriz ? 'height' : 'width'; 2707 2708 popperOffsets[mainSide] = referenceOffsets[mainSide] + referenceOffsets[measurement] / 2 - popperRect[measurement] / 2; 2709 if (placement === secondarySide) { 2710 popperOffsets[secondarySide] = referenceOffsets[secondarySide] - popperRect[secondaryMeasurement]; 2711 } else { 2712 popperOffsets[secondarySide] = referenceOffsets[getOppositePlacement(secondarySide)]; 2713 } 2714 2715 return popperOffsets; 2716 } 2717 2718 /** 2719 * Mimics the `find` method of Array 2720 * @method 2721 * @memberof Popper.Utils 2722 * @argument {Array} arr 2723 * @argument prop 2724 * @argument value 2725 * @returns index or -1 2726 */ 2727 function find(arr, check) { 2728 // use native find if supported 2729 if (Array.prototype.find) { 2730 return arr.find(check); 2731 } 2732 2733 // use `filter` to obtain the same behavior of `find` 2734 return arr.filter(check)[0]; 2735 } 2736 2737 /** 2738 * Return the index of the matching object 2739 * @method 2740 * @memberof Popper.Utils 2741 * @argument {Array} arr 2742 * @argument prop 2743 * @argument value 2744 * @returns index or -1 2745 */ 2746 function findIndex(arr, prop, value) { 2747 // use native findIndex if supported 2748 if (Array.prototype.findIndex) { 2749 return arr.findIndex(function (cur) { 2750 return cur[prop] === value; 2751 }); 2752 } 2753 2754 // use `find` + `indexOf` if `findIndex` isn't supported 2755 var match = find(arr, function (obj) { 2756 return obj[prop] === value; 2757 }); 2758 return arr.indexOf(match); 2759 } 2760 2761 /** 2762 * Loop trough the list of modifiers and run them in order, 2763 * each of them will then edit the data object. 2764 * @method 2765 * @memberof Popper.Utils 2766 * @param {dataObject} data 2767 * @param {Array} modifiers 2768 * @param {String} ends - Optional modifier name used as stopper 2769 * @returns {dataObject} 2770 */ 2771 function runModifiers(modifiers, data, ends) { 2772 var modifiersToRun = ends === undefined ? modifiers : modifiers.slice(0, findIndex(modifiers, 'name', ends)); 2773 2774 modifiersToRun.forEach(function (modifier) { 2775 if (modifier['function']) { 2776 // eslint-disable-line dot-notation 2777 console.warn('`modifier.function` is deprecated, use `modifier.fn`!'); 2778 } 2779 var fn = modifier['function'] || modifier.fn; // eslint-disable-line dot-notation 2780 if (modifier.enabled && isFunction(fn)) { 2781 // Add properties to offsets to make them a complete clientRect object 2782 // we do this before each modifier to make sure the previous one doesn't 2783 // mess with these values 2784 data.offsets.popper = getClientRect(data.offsets.popper); 2785 data.offsets.reference = getClientRect(data.offsets.reference); 2786 2787 data = fn(data, modifier); 2788 } 2789 }); 2790 2791 return data; 2792 } 2793 2794 /** 2795 * Updates the position of the popper, computing the new offsets and applying 2796 * the new style.<br /> 2797 * Prefer `scheduleUpdate` over `update` because of performance reasons. 2798 * @method 2799 * @memberof Popper 2800 */ 2801 function update() { 2802 // if popper is destroyed, don't perform any further update 2803 if (this.state.isDestroyed) { 2804 return; 2805 } 2806 2807 var data = { 2808 instance: this, 2809 styles: {}, 2810 arrowStyles: {}, 2811 attributes: {}, 2812 flipped: false, 2813 offsets: {} 2814 }; 2815 2816 // compute reference element offsets 2817 data.offsets.reference = getReferenceOffsets(this.state, this.popper, this.reference, this.options.positionFixed); 2818 2819 // compute auto placement, store placement inside the data object, 2820 // modifiers will be able to edit `placement` if needed 2821 // and refer to originalPlacement to know the original value 2822 data.placement = computeAutoPlacement(this.options.placement, data.offsets.reference, this.popper, this.reference, this.options.modifiers.flip.boundariesElement, this.options.modifiers.flip.padding); 2823 2824 // store the computed placement inside `originalPlacement` 2825 data.originalPlacement = data.placement; 2826 2827 data.positionFixed = this.options.positionFixed; 2828 2829 // compute the popper offsets 2830 data.offsets.popper = getPopperOffsets(this.popper, data.offsets.reference, data.placement); 2831 2832 data.offsets.popper.position = this.options.positionFixed ? 'fixed' : 'absolute'; 2833 2834 // run the modifiers 2835 data = runModifiers(this.modifiers, data); 2836 2837 // the first `update` will call `onCreate` callback 2838 // the other ones will call `onUpdate` callback 2839 if (!this.state.isCreated) { 2840 this.state.isCreated = true; 2841 this.options.onCreate(data); 2842 } else { 2843 this.options.onUpdate(data); 2844 } 2845 } 2846 2847 /** 2848 * Helper used to know if the given modifier is enabled. 2849 * @method 2850 * @memberof Popper.Utils 2851 * @returns {Boolean} 2852 */ 2853 function isModifierEnabled(modifiers, modifierName) { 2854 return modifiers.some(function (_ref) { 2855 var name = _ref.name, 2856 enabled = _ref.enabled; 2857 return enabled && name === modifierName; 2858 }); 2859 } 2860 2861 /** 2862 * Get the prefixed supported property name 2863 * @method 2864 * @memberof Popper.Utils 2865 * @argument {String} property (camelCase) 2866 * @returns {String} prefixed property (camelCase or PascalCase, depending on the vendor prefix) 2867 */ 2868 function getSupportedPropertyName(property) { 2869 var prefixes = [false, 'ms', 'Webkit', 'Moz', 'O']; 2870 var upperProp = property.charAt(0).toUpperCase() + property.slice(1); 2871 2872 for (var i = 0; i < prefixes.length; i++) { 2873 var prefix = prefixes[i]; 2874 var toCheck = prefix ? '' + prefix + upperProp : property; 2875 if (typeof document.body.style[toCheck] !== 'undefined') { 2876 return toCheck; 2877 } 2878 } 2879 return null; 2880 } 2881 2882 /** 2883 * Destroys the popper. 2884 * @method 2885 * @memberof Popper 2886 */ 2887 function destroy() { 2888 this.state.isDestroyed = true; 2889 2890 // touch DOM only if `applyStyle` modifier is enabled 2891 if (isModifierEnabled(this.modifiers, 'applyStyle')) { 2892 this.popper.removeAttribute('x-placement'); 2893 this.popper.style.position = ''; 2894 this.popper.style.top = ''; 2895 this.popper.style.left = ''; 2896 this.popper.style.right = ''; 2897 this.popper.style.bottom = ''; 2898 this.popper.style.willChange = ''; 2899 this.popper.style[getSupportedPropertyName('transform')] = ''; 2900 } 2901 2902 this.disableEventListeners(); 2903 2904 // remove the popper if user explicitly asked for the deletion on destroy 2905 // do not use `remove` because IE11 doesn't support it 2906 if (this.options.removeOnDestroy) { 2907 this.popper.parentNode.removeChild(this.popper); 2908 } 2909 return this; 2910 } 2911 2912 /** 2913 * Get the window associated with the element 2914 * @argument {Element} element 2915 * @returns {Window} 2916 */ 2917 function getWindow(element) { 2918 var ownerDocument = element.ownerDocument; 2919 return ownerDocument ? ownerDocument.defaultView : window; 2920 } 2921 2922 function attachToScrollParents(scrollParent, event, callback, scrollParents) { 2923 var isBody = scrollParent.nodeName === 'BODY'; 2924 var target = isBody ? scrollParent.ownerDocument.defaultView : scrollParent; 2925 target.addEventListener(event, callback, { passive: true }); 2926 2927 if (!isBody) { 2928 attachToScrollParents(getScrollParent(target.parentNode), event, callback, scrollParents); 2929 } 2930 scrollParents.push(target); 2931 } 2932 2933 /** 2934 * Setup needed event listeners used to update the popper position 2935 * @method 2936 * @memberof Popper.Utils 2937 * @private 2938 */ 2939 function setupEventListeners(reference, options, state, updateBound) { 2940 // Resize event listener on window 2941 state.updateBound = updateBound; 2942 getWindow(reference).addEventListener('resize', state.updateBound, { passive: true }); 2943 2944 // Scroll event listener on scroll parents 2945 var scrollElement = getScrollParent(reference); 2946 attachToScrollParents(scrollElement, 'scroll', state.updateBound, state.scrollParents); 2947 state.scrollElement = scrollElement; 2948 state.eventsEnabled = true; 2949 2950 return state; 2951 } 2952 2953 /** 2954 * It will add resize/scroll events and start recalculating 2955 * position of the popper element when they are triggered. 2956 * @method 2957 * @memberof Popper 2958 */ 2959 function enableEventListeners() { 2960 if (!this.state.eventsEnabled) { 2961 this.state = setupEventListeners(this.reference, this.options, this.state, this.scheduleUpdate); 2962 } 2963 } 2964 2965 /** 2966 * Remove event listeners used to update the popper position 2967 * @method 2968 * @memberof Popper.Utils 2969 * @private 2970 */ 2971 function removeEventListeners(reference, state) { 2972 // Remove resize event listener on window 2973 getWindow(reference).removeEventListener('resize', state.updateBound); 2974 2975 // Remove scroll event listener on scroll parents 2976 state.scrollParents.forEach(function (target) { 2977 target.removeEventListener('scroll', state.updateBound); 2978 }); 2979 2980 // Reset state 2981 state.updateBound = null; 2982 state.scrollParents = []; 2983 state.scrollElement = null; 2984 state.eventsEnabled = false; 2985 return state; 2986 } 2987 2988 /** 2989 * It will remove resize/scroll events and won't recalculate popper position 2990 * when they are triggered. It also won't trigger `onUpdate` callback anymore, 2991 * unless you call `update` method manually. 2992 * @method 2993 * @memberof Popper 2994 */ 2995 function disableEventListeners() { 2996 if (this.state.eventsEnabled) { 2997 cancelAnimationFrame(this.scheduleUpdate); 2998 this.state = removeEventListeners(this.reference, this.state); 2999 } 3000 } 3001 3002 /** 3003 * Tells if a given input is a number 3004 * @method 3005 * @memberof Popper.Utils 3006 * @param {*} input to check 3007 * @return {Boolean} 3008 */ 3009 function isNumeric(n) { 3010 return n !== '' && !isNaN(parseFloat(n)) && isFinite(n); 3011 } 3012 3013 /** 3014 * Set the style to the given popper 3015 * @method 3016 * @memberof Popper.Utils 3017 * @argument {Element} element - Element to apply the style to 3018 * @argument {Object} styles 3019 * Object with a list of properties and values which will be applied to the element 3020 */ 3021 function setStyles(element, styles) { 3022 Object.keys(styles).forEach(function (prop) { 3023 var unit = ''; 3024 // add unit if the value is numeric and is one of the following 3025 if (['width', 'height', 'top', 'right', 'bottom', 'left'].indexOf(prop) !== -1 && isNumeric(styles[prop])) { 3026 unit = 'px'; 3027 } 3028 element.style[prop] = styles[prop] + unit; 3029 }); 3030 } 3031 3032 /** 3033 * Set the attributes to the given popper 3034 * @method 3035 * @memberof Popper.Utils 3036 * @argument {Element} element - Element to apply the attributes to 3037 * @argument {Object} styles 3038 * Object with a list of properties and values which will be applied to the element 3039 */ 3040 function setAttributes(element, attributes) { 3041 Object.keys(attributes).forEach(function (prop) { 3042 var value = attributes[prop]; 3043 if (value !== false) { 3044 element.setAttribute(prop, attributes[prop]); 3045 } else { 3046 element.removeAttribute(prop); 3047 } 3048 }); 3049 } 3050 3051 /** 3052 * @function 3053 * @memberof Modifiers 3054 * @argument {Object} data - The data object generated by `update` method 3055 * @argument {Object} data.styles - List of style properties - values to apply to popper element 3056 * @argument {Object} data.attributes - List of attribute properties - values to apply to popper element 3057 * @argument {Object} options - Modifiers configuration and options 3058 * @returns {Object} The same data object 3059 */ 3060 function applyStyle(data) { 3061 // any property present in `data.styles` will be applied to the popper, 3062 // in this way we can make the 3rd party modifiers add custom styles to it 3063 // Be aware, modifiers could override the properties defined in the previous 3064 // lines of this modifier! 3065 setStyles(data.instance.popper, data.styles); 3066 3067 // any property present in `data.attributes` will be applied to the popper, 3068 // they will be set as HTML attributes of the element 3069 setAttributes(data.instance.popper, data.attributes); 3070 3071 // if arrowElement is defined and arrowStyles has some properties 3072 if (data.arrowElement && Object.keys(data.arrowStyles).length) { 3073 setStyles(data.arrowElement, data.arrowStyles); 3074 } 3075 3076 return data; 3077 } 3078 3079 /** 3080 * Set the x-placement attribute before everything else because it could be used 3081 * to add margins to the popper margins needs to be calculated to get the 3082 * correct popper offsets. 3083 * @method 3084 * @memberof Popper.modifiers 3085 * @param {HTMLElement} reference - The reference element used to position the popper 3086 * @param {HTMLElement} popper - The HTML element used as popper 3087 * @param {Object} options - Popper.js options 3088 */ 3089 function applyStyleOnLoad(reference, popper, options, modifierOptions, state) { 3090 // compute reference element offsets 3091 var referenceOffsets = getReferenceOffsets(state, popper, reference, options.positionFixed); 3092 3093 // compute auto placement, store placement inside the data object, 3094 // modifiers will be able to edit `placement` if needed 3095 // and refer to originalPlacement to know the original value 3096 var placement = computeAutoPlacement(options.placement, referenceOffsets, popper, reference, options.modifiers.flip.boundariesElement, options.modifiers.flip.padding); 3097 3098 popper.setAttribute('x-placement', placement); 3099 3100 // Apply `position` to popper before anything else because 3101 // without the position applied we can't guarantee correct computations 3102 setStyles(popper, { position: options.positionFixed ? 'fixed' : 'absolute' }); 3103 3104 return options; 3105 } 3106 3107 /** 3108 * @function 3109 * @memberof Popper.Utils 3110 * @argument {Object} data - The data object generated by `update` method 3111 * @argument {Boolean} shouldRound - If the offsets should be rounded at all 3112 * @returns {Object} The popper's position offsets rounded 3113 * 3114 * The tale of pixel-perfect positioning. It's still not 100% perfect, but as 3115 * good as it can be within reason. 3116 * Discussion here: https://github.com/FezVrasta/popper.js/pull/715 3117 * 3118 * Low DPI screens cause a popper to be blurry if not using full pixels (Safari 3119 * as well on High DPI screens). 3120 * 3121 * Firefox prefers no rounding for positioning and does not have blurriness on 3122 * high DPI screens. 3123 * 3124 * Only horizontal placement and left/right values need to be considered. 3125 */ 3126 function getRoundedOffsets(data, shouldRound) { 3127 var _data$offsets = data.offsets, 3128 popper = _data$offsets.popper, 3129 reference = _data$offsets.reference; 3130 var round = Math.round, 3131 floor = Math.floor; 3132 3133 var noRound = function noRound(v) { 3134 return v; 3135 }; 3136 3137 var referenceWidth = round(reference.width); 3138 var popperWidth = round(popper.width); 3139 3140 var isVertical = ['left', 'right'].indexOf(data.placement) !== -1; 3141 var isVariation = data.placement.indexOf('-') !== -1; 3142 var sameWidthParity = referenceWidth % 2 === popperWidth % 2; 3143 var bothOddWidth = referenceWidth % 2 === 1 && popperWidth % 2 === 1; 3144 3145 var horizontalToInteger = !shouldRound ? noRound : isVertical || isVariation || sameWidthParity ? round : floor; 3146 var verticalToInteger = !shouldRound ? noRound : round; 3147 3148 return { 3149 left: horizontalToInteger(bothOddWidth && !isVariation && shouldRound ? popper.left - 1 : popper.left), 3150 top: verticalToInteger(popper.top), 3151 bottom: verticalToInteger(popper.bottom), 3152 right: horizontalToInteger(popper.right) 3153 }; 3154 } 3155 3156 var isFirefox = isBrowser && /Firefox/i.test(navigator.userAgent); 3157 3158 /** 3159 * @function 3160 * @memberof Modifiers 3161 * @argument {Object} data - The data object generated by `update` method 3162 * @argument {Object} options - Modifiers configuration and options 3163 * @returns {Object} The data object, properly modified 3164 */ 3165 function computeStyle(data, options) { 3166 var x = options.x, 3167 y = options.y; 3168 var popper = data.offsets.popper; 3169 3170 // Remove this legacy support in Popper.js v2 3171 3172 var legacyGpuAccelerationOption = find(data.instance.modifiers, function (modifier) { 3173 return modifier.name === 'applyStyle'; 3174 }).gpuAcceleration; 3175 if (legacyGpuAccelerationOption !== undefined) { 3176 console.warn('WARNING: `gpuAcceleration` option moved to `computeStyle` modifier and will not be supported in future versions of Popper.js!'); 3177 } 3178 var gpuAcceleration = legacyGpuAccelerationOption !== undefined ? legacyGpuAccelerationOption : options.gpuAcceleration; 3179 3180 var offsetParent = getOffsetParent(data.instance.popper); 3181 var offsetParentRect = getBoundingClientRect(offsetParent); 3182 3183 // Styles 3184 var styles = { 3185 position: popper.position 3186 }; 3187 3188 var offsets = getRoundedOffsets(data, window.devicePixelRatio < 2 || !isFirefox); 3189 3190 var sideA = x === 'bottom' ? 'top' : 'bottom'; 3191 var sideB = y === 'right' ? 'left' : 'right'; 3192 3193 // if gpuAcceleration is set to `true` and transform is supported, 3194 // we use `translate3d` to apply the position to the popper we 3195 // automatically use the supported prefixed version if needed 3196 var prefixedProperty = getSupportedPropertyName('transform'); 3197 3198 // now, let's make a step back and look at this code closely (wtf?) 3199 // If the content of the popper grows once it's been positioned, it 3200 // may happen that the popper gets misplaced because of the new content 3201 // overflowing its reference element 3202 // To avoid this problem, we provide two options (x and y), which allow 3203 // the consumer to define the offset origin. 3204 // If we position a popper on top of a reference element, we can set 3205 // `x` to `top` to make the popper grow towards its top instead of 3206 // its bottom. 3207 var left = void 0, 3208 top = void 0; 3209 if (sideA === 'bottom') { 3210 // when offsetParent is <html> the positioning is relative to the bottom of the screen (excluding the scrollbar) 3211 // and not the bottom of the html element 3212 if (offsetParent.nodeName === 'HTML') { 3213 top = -offsetParent.clientHeight + offsets.bottom; 3214 } else { 3215 top = -offsetParentRect.height + offsets.bottom; 3216 } 3217 } else { 3218 top = offsets.top; 3219 } 3220 if (sideB === 'right') { 3221 if (offsetParent.nodeName === 'HTML') { 3222 left = -offsetParent.clientWidth + offsets.right; 3223 } else { 3224 left = -offsetParentRect.width + offsets.right; 3225 } 3226 } else { 3227 left = offsets.left; 3228 } 3229 if (gpuAcceleration && prefixedProperty) { 3230 styles[prefixedProperty] = 'translate3d(' + left + 'px, ' + top + 'px, 0)'; 3231 styles[sideA] = 0; 3232 styles[sideB] = 0; 3233 styles.willChange = 'transform'; 3234 } else { 3235 // othwerise, we use the standard `top`, `left`, `bottom` and `right` properties 3236 var invertTop = sideA === 'bottom' ? -1 : 1; 3237 var invertLeft = sideB === 'right' ? -1 : 1; 3238 styles[sideA] = top * invertTop; 3239 styles[sideB] = left * invertLeft; 3240 styles.willChange = sideA + ', ' + sideB; 3241 } 3242 3243 // Attributes 3244 var attributes = { 3245 'x-placement': data.placement 3246 }; 3247 3248 // Update `data` attributes, styles and arrowStyles 3249 data.attributes = _extends({}, attributes, data.attributes); 3250 data.styles = _extends({}, styles, data.styles); 3251 data.arrowStyles = _extends({}, data.offsets.arrow, data.arrowStyles); 3252 3253 return data; 3254 } 3255 3256 /** 3257 * Helper used to know if the given modifier depends from another one.<br /> 3258 * It checks if the needed modifier is listed and enabled. 3259 * @method 3260 * @memberof Popper.Utils 3261 * @param {Array} modifiers - list of modifiers 3262 * @param {String} requestingName - name of requesting modifier 3263 * @param {String} requestedName - name of requested modifier 3264 * @returns {Boolean} 3265 */ 3266 function isModifierRequired(modifiers, requestingName, requestedName) { 3267 var requesting = find(modifiers, function (_ref) { 3268 var name = _ref.name; 3269 return name === requestingName; 3270 }); 3271 3272 var isRequired = !!requesting && modifiers.some(function (modifier) { 3273 return modifier.name === requestedName && modifier.enabled && modifier.order < requesting.order; 3274 }); 3275 3276 if (!isRequired) { 3277 var _requesting = '`' + requestingName + '`'; 3278 var requested = '`' + requestedName + '`'; 3279 console.warn(requested + ' modifier is required by ' + _requesting + ' modifier in order to work, be sure to include it before ' + _requesting + '!'); 3280 } 3281 return isRequired; 3282 } 3283 3284 /** 3285 * @function 3286 * @memberof Modifiers 3287 * @argument {Object} data - The data object generated by update method 3288 * @argument {Object} options - Modifiers configuration and options 3289 * @returns {Object} The data object, properly modified 3290 */ 3291 function arrow(data, options) { 3292 var _data$offsets$arrow; 3293 3294 // arrow depends on keepTogether in order to work 3295 if (!isModifierRequired(data.instance.modifiers, 'arrow', 'keepTogether')) { 3296 return data; 3297 } 3298 3299 var arrowElement = options.element; 3300 3301 // if arrowElement is a string, suppose it's a CSS selector 3302 if (typeof arrowElement === 'string') { 3303 arrowElement = data.instance.popper.querySelector(arrowElement); 3304 3305 // if arrowElement is not found, don't run the modifier 3306 if (!arrowElement) { 3307 return data; 3308 } 3309 } else { 3310 // if the arrowElement isn't a query selector we must check that the 3311 // provided DOM node is child of its popper node 3312 if (!data.instance.popper.contains(arrowElement)) { 3313 console.warn('WARNING: `arrow.element` must be child of its popper element!'); 3314 return data; 3315 } 3316 } 3317 3318 var placement = data.placement.split('-')[0]; 3319 var _data$offsets = data.offsets, 3320 popper = _data$offsets.popper, 3321 reference = _data$offsets.reference; 3322 3323 var isVertical = ['left', 'right'].indexOf(placement) !== -1; 3324 3325 var len = isVertical ? 'height' : 'width'; 3326 var sideCapitalized = isVertical ? 'Top' : 'Left'; 3327 var side = sideCapitalized.toLowerCase(); 3328 var altSide = isVertical ? 'left' : 'top'; 3329 var opSide = isVertical ? 'bottom' : 'right'; 3330 var arrowElementSize = getOuterSizes(arrowElement)[len]; 3331 3332 // 3333 // extends keepTogether behavior making sure the popper and its 3334 // reference have enough pixels in conjunction 3335 // 3336 3337 // top/left side 3338 if (reference[opSide] - arrowElementSize < popper[side]) { 3339 data.offsets.popper[side] -= popper[side] - (reference[opSide] - arrowElementSize); 3340 } 3341 // bottom/right side 3342 if (reference[side] + arrowElementSize > popper[opSide]) { 3343 data.offsets.popper[side] += reference[side] + arrowElementSize - popper[opSide]; 3344 } 3345 data.offsets.popper = getClientRect(data.offsets.popper); 3346 3347 // compute center of the popper 3348 var center = reference[side] + reference[len] / 2 - arrowElementSize / 2; 3349 3350 // Compute the sideValue using the updated popper offsets 3351 // take popper margin in account because we don't have this info available 3352 var css = getStyleComputedProperty(data.instance.popper); 3353 var popperMarginSide = parseFloat(css['margin' + sideCapitalized]); 3354 var popperBorderSide = parseFloat(css['border' + sideCapitalized + 'Width']); 3355 var sideValue = center - data.offsets.popper[side] - popperMarginSide - popperBorderSide; 3356 3357 // prevent arrowElement from being placed not contiguously to its popper 3358 sideValue = Math.max(Math.min(popper[len] - arrowElementSize, sideValue), 0); 3359 3360 data.arrowElement = arrowElement; 3361 data.offsets.arrow = (_data$offsets$arrow = {}, defineProperty(_data$offsets$arrow, side, Math.round(sideValue)), defineProperty(_data$offsets$arrow, altSide, ''), _data$offsets$arrow); 3362 3363 return data; 3364 } 3365 3366 /** 3367 * Get the opposite placement variation of the given one 3368 * @method 3369 * @memberof Popper.Utils 3370 * @argument {String} placement variation 3371 * @returns {String} flipped placement variation 3372 */ 3373 function getOppositeVariation(variation) { 3374 if (variation === 'end') { 3375 return 'start'; 3376 } else if (variation === 'start') { 3377 return 'end'; 3378 } 3379 return variation; 3380 } 3381 3382 /** 3383 * List of accepted placements to use as values of the `placement` option.<br /> 3384 * Valid placements are: 3385 * - `auto` 3386 * - `top` 3387 * - `right` 3388 * - `bottom` 3389 * - `left` 3390 * 3391 * Each placement can have a variation from this list: 3392 * - `-start` 3393 * - `-end` 3394 * 3395 * Variations are interpreted easily if you think of them as the left to right 3396 * written languages. Horizontally (`top` and `bottom`), `start` is left and `end` 3397 * is right.<br /> 3398 * Vertically (`left` and `right`), `start` is top and `end` is bottom. 3399 * 3400 * Some valid examples are: 3401 * - `top-end` (on top of reference, right aligned) 3402 * - `right-start` (on right of reference, top aligned) 3403 * - `bottom` (on bottom, centered) 3404 * - `auto-end` (on the side with more space available, alignment depends by placement) 3405 * 3406 * @static 3407 * @type {Array} 3408 * @enum {String} 3409 * @readonly 3410 * @method placements 3411 * @memberof Popper 3412 */ 3413 var placements = ['auto-start', 'auto', 'auto-end', 'top-start', 'top', 'top-end', 'right-start', 'right', 'right-end', 'bottom-end', 'bottom', 'bottom-start', 'left-end', 'left', 'left-start']; 3414 3415 // Get rid of `auto` `auto-start` and `auto-end` 3416 var validPlacements = placements.slice(3); 3417 3418 /** 3419 * Given an initial placement, returns all the subsequent placements 3420 * clockwise (or counter-clockwise). 3421 * 3422 * @method 3423 * @memberof Popper.Utils 3424 * @argument {String} placement - A valid placement (it accepts variations) 3425 * @argument {Boolean} counter - Set to true to walk the placements counterclockwise 3426 * @returns {Array} placements including their variations 3427 */ 3428 function clockwise(placement) { 3429 var counter = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; 3430 3431 var index = validPlacements.indexOf(placement); 3432 var arr = validPlacements.slice(index + 1).concat(validPlacements.slice(0, index)); 3433 return counter ? arr.reverse() : arr; 3434 } 3435 3436 var BEHAVIORS = { 3437 FLIP: 'flip', 3438 CLOCKWISE: 'clockwise', 3439 COUNTERCLOCKWISE: 'counterclockwise' 3440 }; 3441 3442 /** 3443 * @function 3444 * @memberof Modifiers 3445 * @argument {Object} data - The data object generated by update method 3446 * @argument {Object} options - Modifiers configuration and options 3447 * @returns {Object} The data object, properly modified 3448 */ 3449 function flip(data, options) { 3450 // if `inner` modifier is enabled, we can't use the `flip` modifier 3451 if (isModifierEnabled(data.instance.modifiers, 'inner')) { 3452 return data; 3453 } 3454 3455 if (data.flipped && data.placement === data.originalPlacement) { 3456 // seems like flip is trying to loop, probably there's not enough space on any of the flippable sides 3457 return data; 3458 } 3459 3460 var boundaries = getBoundaries(data.instance.popper, data.instance.reference, options.padding, options.boundariesElement, data.positionFixed); 3461 3462 var placement = data.placement.split('-')[0]; 3463 var placementOpposite = getOppositePlacement(placement); 3464 var variation = data.placement.split('-')[1] || ''; 3465 3466 var flipOrder = []; 3467 3468 switch (options.behavior) { 3469 case BEHAVIORS.FLIP: 3470 flipOrder = [placement, placementOpposite]; 3471 break; 3472 case BEHAVIORS.CLOCKWISE: 3473 flipOrder = clockwise(placement); 3474 break; 3475 case BEHAVIORS.COUNTERCLOCKWISE: 3476 flipOrder = clockwise(placement, true); 3477 break; 3478 default: 3479 flipOrder = options.behavior; 3480 } 3481 3482 flipOrder.forEach(function (step, index) { 3483 if (placement !== step || flipOrder.length === index + 1) { 3484 return data; 3485 } 3486 3487 placement = data.placement.split('-')[0]; 3488 placementOpposite = getOppositePlacement(placement); 3489 3490 var popperOffsets = data.offsets.popper; 3491 var refOffsets = data.offsets.reference; 3492 3493 // using floor because the reference offsets may contain decimals we are not going to consider here 3494 var floor = Math.floor; 3495 var overlapsRef = placement === 'left' && floor(popperOffsets.right) > floor(refOffsets.left) || placement === 'right' && floor(popperOffsets.left) < floor(refOffsets.right) || placement === 'top' && floor(popperOffsets.bottom) > floor(refOffsets.top) || placement === 'bottom' && floor(popperOffsets.top) < floor(refOffsets.bottom); 3496 3497 var overflowsLeft = floor(popperOffsets.left) < floor(boundaries.left); 3498 var overflowsRight = floor(popperOffsets.right) > floor(boundaries.right); 3499 var overflowsTop = floor(popperOffsets.top) < floor(boundaries.top); 3500 var overflowsBottom = floor(popperOffsets.bottom) > floor(boundaries.bottom); 3501 3502 var overflowsBoundaries = placement === 'left' && overflowsLeft || placement === 'right' && overflowsRight || placement === 'top' && overflowsTop || placement === 'bottom' && overflowsBottom; 3503 3504 // flip the variation if required 3505 var isVertical = ['top', 'bottom'].indexOf(placement) !== -1; 3506 3507 // flips variation if reference element overflows boundaries 3508 var flippedVariationByRef = !!options.flipVariations && (isVertical && variation === 'start' && overflowsLeft || isVertical && variation === 'end' && overflowsRight || !isVertical && variation === 'start' && overflowsTop || !isVertical && variation === 'end' && overflowsBottom); 3509 3510 // flips variation if popper content overflows boundaries 3511 var flippedVariationByContent = !!options.flipVariationsByContent && (isVertical && variation === 'start' && overflowsRight || isVertical && variation === 'end' && overflowsLeft || !isVertical && variation === 'start' && overflowsBottom || !isVertical && variation === 'end' && overflowsTop); 3512 3513 var flippedVariation = flippedVariationByRef || flippedVariationByContent; 3514 3515 if (overlapsRef || overflowsBoundaries || flippedVariation) { 3516 // this boolean to detect any flip loop 3517 data.flipped = true; 3518 3519 if (overlapsRef || overflowsBoundaries) { 3520 placement = flipOrder[index + 1]; 3521 } 3522 3523 if (flippedVariation) { 3524 variation = getOppositeVariation(variation); 3525 } 3526 3527 data.placement = placement + (variation ? '-' + variation : ''); 3528 3529 // this object contains `position`, we want to preserve it along with 3530 // any additional property we may add in the future 3531 data.offsets.popper = _extends({}, data.offsets.popper, getPopperOffsets(data.instance.popper, data.offsets.reference, data.placement)); 3532 3533 data = runModifiers(data.instance.modifiers, data, 'flip'); 3534 } 3535 }); 3536 return data; 3537 } 3538 3539 /** 3540 * @function 3541 * @memberof Modifiers 3542 * @argument {Object} data - The data object generated by update method 3543 * @argument {Object} options - Modifiers configuration and options 3544 * @returns {Object} The data object, properly modified 3545 */ 3546 function keepTogether(data) { 3547 var _data$offsets = data.offsets, 3548 popper = _data$offsets.popper, 3549 reference = _data$offsets.reference; 3550 3551 var placement = data.placement.split('-')[0]; 3552 var floor = Math.floor; 3553 var isVertical = ['top', 'bottom'].indexOf(placement) !== -1; 3554 var side = isVertical ? 'right' : 'bottom'; 3555 var opSide = isVertical ? 'left' : 'top'; 3556 var measurement = isVertical ? 'width' : 'height'; 3557 3558 if (popper[side] < floor(reference[opSide])) { 3559 data.offsets.popper[opSide] = floor(reference[opSide]) - popper[measurement]; 3560 } 3561 if (popper[opSide] > floor(reference[side])) { 3562 data.offsets.popper[opSide] = floor(reference[side]); 3563 } 3564 3565 return data; 3566 } 3567 3568 /** 3569 * Converts a string containing value + unit into a px value number 3570 * @function 3571 * @memberof {modifiers~offset} 3572 * @private 3573 * @argument {String} str - Value + unit string 3574 * @argument {String} measurement - `height` or `width` 3575 * @argument {Object} popperOffsets 3576 * @argument {Object} referenceOffsets 3577 * @returns {Number|String} 3578 * Value in pixels, or original string if no values were extracted 3579 */ 3580 function toValue(str, measurement, popperOffsets, referenceOffsets) { 3581 // separate value from unit 3582 var split = str.match(/((?:\-|\+)?\d*\.?\d*)(.*)/); 3583 var value = +split[1]; 3584 var unit = split[2]; 3585 3586 // If it's not a number it's an operator, I guess 3587 if (!value) { 3588 return str; 3589 } 3590 3591 if (unit.indexOf('%') === 0) { 3592 var element = void 0; 3593 switch (unit) { 3594 case '%p': 3595 element = popperOffsets; 3596 break; 3597 case '%': 3598 case '%r': 3599 default: 3600 element = referenceOffsets; 3601 } 3602 3603 var rect = getClientRect(element); 3604 return rect[measurement] / 100 * value; 3605 } else if (unit === 'vh' || unit === 'vw') { 3606 // if is a vh or vw, we calculate the size based on the viewport 3607 var size = void 0; 3608 if (unit === 'vh') { 3609 size = Math.max(document.documentElement.clientHeight, window.innerHeight || 0); 3610 } else { 3611 size = Math.max(document.documentElement.clientWidth, window.innerWidth || 0); 3612 } 3613 return size / 100 * value; 3614 } else { 3615 // if is an explicit pixel unit, we get rid of the unit and keep the value 3616 // if is an implicit unit, it's px, and we return just the value 3617 return value; 3618 } 3619 } 3620 3621 /** 3622 * Parse an `offset` string to extrapolate `x` and `y` numeric offsets. 3623 * @function 3624 * @memberof {modifiers~offset} 3625 * @private 3626 * @argument {String} offset 3627 * @argument {Object} popperOffsets 3628 * @argument {Object} referenceOffsets 3629 * @argument {String} basePlacement 3630 * @returns {Array} a two cells array with x and y offsets in numbers 3631 */ 3632 function parseOffset(offset, popperOffsets, referenceOffsets, basePlacement) { 3633 var offsets = [0, 0]; 3634 3635 // Use height if placement is left or right and index is 0 otherwise use width 3636 // in this way the first offset will use an axis and the second one 3637 // will use the other one 3638 var useHeight = ['right', 'left'].indexOf(basePlacement) !== -1; 3639 3640 // Split the offset string to obtain a list of values and operands 3641 // The regex addresses values with the plus or minus sign in front (+10, -20, etc) 3642 var fragments = offset.split(/(\+|\-)/).map(function (frag) { 3643 return frag.trim(); 3644 }); 3645 3646 // Detect if the offset string contains a pair of values or a single one 3647 // they could be separated by comma or space 3648 var divider = fragments.indexOf(find(fragments, function (frag) { 3649 return frag.search(/,|\s/) !== -1; 3650 })); 3651 3652 if (fragments[divider] && fragments[divider].indexOf(',') === -1) { 3653 console.warn('Offsets separated by white space(s) are deprecated, use a comma (,) instead.'); 3654 } 3655 3656 // If divider is found, we divide the list of values and operands to divide 3657 // them by ofset X and Y. 3658 var splitRegex = /\s*,\s*|\s+/; 3659 var ops = divider !== -1 ? [fragments.slice(0, divider).concat([fragments[divider].split(splitRegex)[0]]), [fragments[divider].split(splitRegex)[1]].concat(fragments.slice(divider + 1))] : [fragments]; 3660 3661 // Convert the values with units to absolute pixels to allow our computations 3662 ops = ops.map(function (op, index) { 3663 // Most of the units rely on the orientation of the popper 3664 var measurement = (index === 1 ? !useHeight : useHeight) ? 'height' : 'width'; 3665 var mergeWithPrevious = false; 3666 return op 3667 // This aggregates any `+` or `-` sign that aren't considered operators 3668 // e.g.: 10 + +5 => [10, +, +5] 3669 .reduce(function (a, b) { 3670 if (a[a.length - 1] === '' && ['+', '-'].indexOf(b) !== -1) { 3671 a[a.length - 1] = b; 3672 mergeWithPrevious = true; 3673 return a; 3674 } else if (mergeWithPrevious) { 3675 a[a.length - 1] += b; 3676 mergeWithPrevious = false; 3677 return a; 3678 } else { 3679 return a.concat(b); 3680 } 3681 }, []) 3682 // Here we convert the string values into number values (in px) 3683 .map(function (str) { 3684 return toValue(str, measurement, popperOffsets, referenceOffsets); 3685 }); 3686 }); 3687 3688 // Loop trough the offsets arrays and execute the operations 3689 ops.forEach(function (op, index) { 3690 op.forEach(function (frag, index2) { 3691 if (isNumeric(frag)) { 3692 offsets[index] += frag * (op[index2 - 1] === '-' ? -1 : 1); 3693 } 3694 }); 3695 }); 3696 return offsets; 3697 } 3698 3699 /** 3700 * @function 3701 * @memberof Modifiers 3702 * @argument {Object} data - The data object generated by update method 3703 * @argument {Object} options - Modifiers configuration and options 3704 * @argument {Number|String} options.offset=0 3705 * The offset value as described in the modifier description 3706 * @returns {Object} The data object, properly modified 3707 */ 3708 function offset(data, _ref) { 3709 var offset = _ref.offset; 3710 var placement = data.placement, 3711 _data$offsets = data.offsets, 3712 popper = _data$offsets.popper, 3713 reference = _data$offsets.reference; 3714 3715 var basePlacement = placement.split('-')[0]; 3716 3717 var offsets = void 0; 3718 if (isNumeric(+offset)) { 3719 offsets = [+offset, 0]; 3720 } else { 3721 offsets = parseOffset(offset, popper, reference, basePlacement); 3722 } 3723 3724 if (basePlacement === 'left') { 3725 popper.top += offsets[0]; 3726 popper.left -= offsets[1]; 3727 } else if (basePlacement === 'right') { 3728 popper.top += offsets[0]; 3729 popper.left += offsets[1]; 3730 } else if (basePlacement === 'top') { 3731 popper.left += offsets[0]; 3732 popper.top -= offsets[1]; 3733 } else if (basePlacement === 'bottom') { 3734 popper.left += offsets[0]; 3735 popper.top += offsets[1]; 3736 } 3737 3738 data.popper = popper; 3739 return data; 3740 } 3741 3742 /** 3743 * @function 3744 * @memberof Modifiers 3745 * @argument {Object} data - The data object generated by `update` method 3746 * @argument {Object} options - Modifiers configuration and options 3747 * @returns {Object} The data object, properly modified 3748 */ 3749 function preventOverflow(data, options) { 3750 var boundariesElement = options.boundariesElement || getOffsetParent(data.instance.popper); 3751 3752 // If offsetParent is the reference element, we really want to 3753 // go one step up and use the next offsetParent as reference to 3754 // avoid to make this modifier completely useless and look like broken 3755 if (data.instance.reference === boundariesElement) { 3756 boundariesElement = getOffsetParent(boundariesElement); 3757 } 3758 3759 // NOTE: DOM access here 3760 // resets the popper's position so that the document size can be calculated excluding 3761 // the size of the popper element itself 3762 var transformProp = getSupportedPropertyName('transform'); 3763 var popperStyles = data.instance.popper.style; // assignment to help minification 3764 var top = popperStyles.top, 3765 left = popperStyles.left, 3766 transform = popperStyles[transformProp]; 3767 3768 popperStyles.top = ''; 3769 popperStyles.left = ''; 3770 popperStyles[transformProp] = ''; 3771 3772 var boundaries = getBoundaries(data.instance.popper, data.instance.reference, options.padding, boundariesElement, data.positionFixed); 3773 3774 // NOTE: DOM access here 3775 // restores the original style properties after the offsets have been computed 3776 popperStyles.top = top; 3777 popperStyles.left = left; 3778 popperStyles[transformProp] = transform; 3779 3780 options.boundaries = boundaries; 3781 3782 var order = options.priority; 3783 var popper = data.offsets.popper; 3784 3785 var check = { 3786 primary: function primary(placement) { 3787 var value = popper[placement]; 3788 if (popper[placement] < boundaries[placement] && !options.escapeWithReference) { 3789 value = Math.max(popper[placement], boundaries[placement]); 3790 } 3791 return defineProperty({}, placement, value); 3792 }, 3793 secondary: function secondary(placement) { 3794 var mainSide = placement === 'right' ? 'left' : 'top'; 3795 var value = popper[mainSide]; 3796 if (popper[placement] > boundaries[placement] && !options.escapeWithReference) { 3797 value = Math.min(popper[mainSide], boundaries[placement] - (placement === 'right' ? popper.width : popper.height)); 3798 } 3799 return defineProperty({}, mainSide, value); 3800 } 3801 }; 3802 3803 order.forEach(function (placement) { 3804 var side = ['left', 'top'].indexOf(placement) !== -1 ? 'primary' : 'secondary'; 3805 popper = _extends({}, popper, check[side](placement)); 3806 }); 3807 3808 data.offsets.popper = popper; 3809 3810 return data; 3811 } 3812 3813 /** 3814 * @function 3815 * @memberof Modifiers 3816 * @argument {Object} data - The data object generated by `update` method 3817 * @argument {Object} options - Modifiers configuration and options 3818 * @returns {Object} The data object, properly modified 3819 */ 3820 function shift(data) { 3821 var placement = data.placement; 3822 var basePlacement = placement.split('-')[0]; 3823 var shiftvariation = placement.split('-')[1]; 3824 3825 // if shift shiftvariation is specified, run the modifier 3826 if (shiftvariation) { 3827 var _data$offsets = data.offsets, 3828 reference = _data$offsets.reference, 3829 popper = _data$offsets.popper; 3830 3831 var isVertical = ['bottom', 'top'].indexOf(basePlacement) !== -1; 3832 var side = isVertical ? 'left' : 'top'; 3833 var measurement = isVertical ? 'width' : 'height'; 3834 3835 var shiftOffsets = { 3836 start: defineProperty({}, side, reference[side]), 3837 end: defineProperty({}, side, reference[side] + reference[measurement] - popper[measurement]) 3838 }; 3839 3840 data.offsets.popper = _extends({}, popper, shiftOffsets[shiftvariation]); 3841 } 3842 3843 return data; 3844 } 3845 3846 /** 3847 * @function 3848 * @memberof Modifiers 3849 * @argument {Object} data - The data object generated by update method 3850 * @argument {Object} options - Modifiers configuration and options 3851 * @returns {Object} The data object, properly modified 3852 */ 3853 function hide(data) { 3854 if (!isModifierRequired(data.instance.modifiers, 'hide', 'preventOverflow')) { 3855 return data; 3856 } 3857 3858 var refRect = data.offsets.reference; 3859 var bound = find(data.instance.modifiers, function (modifier) { 3860 return modifier.name === 'preventOverflow'; 3861 }).boundaries; 3862 3863 if (refRect.bottom < bound.top || refRect.left > bound.right || refRect.top > bound.bottom || refRect.right < bound.left) { 3864 // Avoid unnecessary DOM access if visibility hasn't changed 3865 if (data.hide === true) { 3866 return data; 3867 } 3868 3869 data.hide = true; 3870 data.attributes['x-out-of-boundaries'] = ''; 3871 } else { 3872 // Avoid unnecessary DOM access if visibility hasn't changed 3873 if (data.hide === false) { 3874 return data; 3875 } 3876 3877 data.hide = false; 3878 data.attributes['x-out-of-boundaries'] = false; 3879 } 3880 3881 return data; 3882 } 3883 3884 /** 3885 * @function 3886 * @memberof Modifiers 3887 * @argument {Object} data - The data object generated by `update` method 3888 * @argument {Object} options - Modifiers configuration and options 3889 * @returns {Object} The data object, properly modified 3890 */ 3891 function inner(data) { 3892 var placement = data.placement; 3893 var basePlacement = placement.split('-')[0]; 3894 var _data$offsets = data.offsets, 3895 popper = _data$offsets.popper, 3896 reference = _data$offsets.reference; 3897 3898 var isHoriz = ['left', 'right'].indexOf(basePlacement) !== -1; 3899 3900 var subtractLength = ['top', 'left'].indexOf(basePlacement) === -1; 3901 3902 popper[isHoriz ? 'left' : 'top'] = reference[basePlacement] - (subtractLength ? popper[isHoriz ? 'width' : 'height'] : 0); 3903 3904 data.placement = getOppositePlacement(placement); 3905 data.offsets.popper = getClientRect(popper); 3906 3907 return data; 3908 } 3909 3910 /** 3911 * Modifier function, each modifier can have a function of this type assigned 3912 * to its `fn` property.<br /> 3913 * These functions will be called on each update, this means that you must 3914 * make sure they are performant enough to avoid performance bottlenecks. 3915 * 3916 * @function ModifierFn 3917 * @argument {dataObject} data - The data object generated by `update` method 3918 * @argument {Object} options - Modifiers configuration and options 3919 * @returns {dataObject} The data object, properly modified 3920 */ 3921 3922 /** 3923 * Modifiers are plugins used to alter the behavior of your poppers.<br /> 3924 * Popper.js uses a set of 9 modifiers to provide all the basic functionalities 3925 * needed by the library. 3926 * 3927 * Usually you don't want to override the `order`, `fn` and `onLoad` props. 3928 * All the other properties are configurations that could be tweaked. 3929 * @namespace modifiers 3930 */ 3931 var modifiers = { 3932 /** 3933 * Modifier used to shift the popper on the start or end of its reference 3934 * element.<br /> 3935 * It will read the variation of the `placement` property.<br /> 3936 * It can be one either `-end` or `-start`. 3937 * @memberof modifiers 3938 * @inner 3939 */ 3940 shift: { 3941 /** @prop {number} order=100 - Index used to define the order of execution */ 3942 order: 100, 3943 /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */ 3944 enabled: true, 3945 /** @prop {ModifierFn} */ 3946 fn: shift 3947 }, 3948 3949 /** 3950 * The `offset` modifier can shift your popper on both its axis. 3951 * 3952 * It accepts the following units: 3953 * - `px` or unit-less, interpreted as pixels 3954 * - `%` or `%r`, percentage relative to the length of the reference element 3955 * - `%p`, percentage relative to the length of the popper element 3956 * - `vw`, CSS viewport width unit 3957 * - `vh`, CSS viewport height unit 3958 * 3959 * For length is intended the main axis relative to the placement of the popper.<br /> 3960 * This means that if the placement is `top` or `bottom`, the length will be the 3961 * `width`. In case of `left` or `right`, it will be the `height`. 3962 * 3963 * You can provide a single value (as `Number` or `String`), or a pair of values 3964 * as `String` divided by a comma or one (or more) white spaces.<br /> 3965 * The latter is a deprecated method because it leads to confusion and will be 3966 * removed in v2.<br /> 3967 * Additionally, it accepts additions and subtractions between different units. 3968 * Note that multiplications and divisions aren't supported. 3969 * 3970 * Valid examples are: 3971 * ``` 3972 * 10 3973 * '10%' 3974 * '10, 10' 3975 * '10%, 10' 3976 * '10 + 10%' 3977 * '10 - 5vh + 3%' 3978 * '-10px + 5vh, 5px - 6%' 3979 * ``` 3980 * > **NB**: If you desire to apply offsets to your poppers in a way that may make them overlap 3981 * > with their reference element, unfortunately, you will have to disable the `flip` modifier. 3982 * > You can read more on this at this [issue](https://github.com/FezVrasta/popper.js/issues/373). 3983 * 3984 * @memberof modifiers 3985 * @inner 3986 */ 3987 offset: { 3988 /** @prop {number} order=200 - Index used to define the order of execution */ 3989 order: 200, 3990 /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */ 3991 enabled: true, 3992 /** @prop {ModifierFn} */ 3993 fn: offset, 3994 /** @prop {Number|String} offset=0 3995 * The offset value as described in the modifier description 3996 */ 3997 offset: 0 3998 }, 3999 4000 /** 4001 * Modifier used to prevent the popper from being positioned outside the boundary. 4002 * 4003 * A scenario exists where the reference itself is not within the boundaries.<br /> 4004 * We can say it has "escaped the boundaries" â or just "escaped".<br /> 4005 * In this case we need to decide whether the popper should either: 4006 * 4007 * - detach from the reference and remain "trapped" in the boundaries, or 4008 * - if it should ignore the boundary and "escape with its reference" 4009 * 4010 * When `escapeWithReference` is set to`true` and reference is completely 4011 * outside its boundaries, the popper will overflow (or completely leave) 4012 * the boundaries in order to remain attached to the edge of the reference. 4013 * 4014 * @memberof modifiers 4015 * @inner 4016 */ 4017 preventOverflow: { 4018 /** @prop {number} order=300 - Index used to define the order of execution */ 4019 order: 300, 4020 /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */ 4021 enabled: true, 4022 /** @prop {ModifierFn} */ 4023 fn: preventOverflow, 4024 /** 4025 * @prop {Array} [priority=['left','right','top','bottom']] 4026 * Popper will try to prevent overflow following these priorities by default, 4027 * then, it could overflow on the left and on top of the `boundariesElement` 4028 */ 4029 priority: ['left', 'right', 'top', 'bottom'], 4030 /** 4031 * @prop {number} padding=5 4032 * Amount of pixel used to define a minimum distance between the boundaries 4033 * and the popper. This makes sure the popper always has a little padding 4034 * between the edges of its container 4035 */ 4036 padding: 5, 4037 /** 4038 * @prop {String|HTMLElement} boundariesElement='scrollParent' 4039 * Boundaries used by the modifier. Can be `scrollParent`, `window`, 4040 * `viewport` or any DOM element. 4041 */ 4042 boundariesElement: 'scrollParent' 4043 }, 4044 4045 /** 4046 * Modifier used to make sure the reference and its popper stay near each other 4047 * without leaving any gap between the two. Especially useful when the arrow is 4048 * enabled and you want to ensure that it points to its reference element. 4049 * It cares only about the first axis. You can still have poppers with margin 4050 * between the popper and its reference element. 4051 * @memberof modifiers 4052 * @inner 4053 */ 4054 keepTogether: { 4055 /** @prop {number} order=400 - Index used to define the order of execution */ 4056 order: 400, 4057 /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */ 4058 enabled: true, 4059 /** @prop {ModifierFn} */ 4060 fn: keepTogether 4061 }, 4062 4063 /** 4064 * This modifier is used to move the `arrowElement` of the popper to make 4065 * sure it is positioned between the reference element and its popper element. 4066 * It will read the outer size of the `arrowElement` node to detect how many 4067 * pixels of conjunction are needed. 4068 * 4069 * It has no effect if no `arrowElement` is provided. 4070 * @memberof modifiers 4071 * @inner 4072 */ 4073 arrow: { 4074 /** @prop {number} order=500 - Index used to define the order of execution */ 4075 order: 500, 4076 /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */ 4077 enabled: true, 4078 /** @prop {ModifierFn} */ 4079 fn: arrow, 4080 /** @prop {String|HTMLElement} element='[x-arrow]' - Selector or node used as arrow */ 4081 element: '[x-arrow]' 4082 }, 4083 4084 /** 4085 * Modifier used to flip the popper's placement when it starts to overlap its 4086 * reference element. 4087 * 4088 * Requires the `preventOverflow` modifier before it in order to work. 4089 * 4090 * **NOTE:** this modifier will interrupt the current update cycle and will 4091 * restart it if it detects the need to flip the placement. 4092 * @memberof modifiers 4093 * @inner 4094 */ 4095 flip: { 4096 /** @prop {number} order=600 - Index used to define the order of execution */ 4097 order: 600, 4098 /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */ 4099 enabled: true, 4100 /** @prop {ModifierFn} */ 4101 fn: flip, 4102 /** 4103 * @prop {String|Array} behavior='flip' 4104 * The behavior used to change the popper's placement. It can be one of 4105 * `flip`, `clockwise`, `counterclockwise` or an array with a list of valid 4106 * placements (with optional variations) 4107 */ 4108 behavior: 'flip', 4109 /** 4110 * @prop {number} padding=5 4111 * The popper will flip if it hits the edges of the `boundariesElement` 4112 */ 4113 padding: 5, 4114 /** 4115 * @prop {String|HTMLElement} boundariesElement='viewport' 4116 * The element which will define the boundaries of the popper position. 4117 * The popper will never be placed outside of the defined boundaries 4118 * (except if `keepTogether` is enabled) 4119 */ 4120 boundariesElement: 'viewport', 4121 /** 4122 * @prop {Boolean} flipVariations=false 4123 * The popper will switch placement variation between `-start` and `-end` when 4124 * the reference element overlaps its boundaries. 4125 * 4126 * The original placement should have a set variation. 4127 */ 4128 flipVariations: false, 4129 /** 4130 * @prop {Boolean} flipVariationsByContent=false 4131 * The popper will switch placement variation between `-start` and `-end` when 4132 * the popper element overlaps its reference boundaries. 4133 * 4134 * The original placement should have a set variation. 4135 */ 4136 flipVariationsByContent: false 4137 }, 4138 4139 /** 4140 * Modifier used to make the popper flow toward the inner of the reference element. 4141 * By default, when this modifier is disabled, the popper will be placed outside 4142 * the reference element. 4143 * @memberof modifiers 4144 * @inner 4145 */ 4146 inner: { 4147 /** @prop {number} order=700 - Index used to define the order of execution */ 4148 order: 700, 4149 /** @prop {Boolean} enabled=false - Whether the modifier is enabled or not */ 4150 enabled: false, 4151 /** @prop {ModifierFn} */ 4152 fn: inner 4153 }, 4154 4155 /** 4156 * Modifier used to hide the popper when its reference element is outside of the 4157 * popper boundaries. It will set a `x-out-of-boundaries` attribute which can 4158 * be used to hide with a CSS selector the popper when its reference is 4159 * out of boundaries. 4160 * 4161 * Requires the `preventOverflow` modifier before it in order to work. 4162 * @memberof modifiers 4163 * @inner 4164 */ 4165 hide: { 4166 /** @prop {number} order=800 - Index used to define the order of execution */ 4167 order: 800, 4168 /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */ 4169 enabled: true, 4170 /** @prop {ModifierFn} */ 4171 fn: hide 4172 }, 4173 4174 /** 4175 * Computes the style that will be applied to the popper element to gets 4176 * properly positioned. 4177 * 4178 * Note that this modifier will not touch the DOM, it just prepares the styles 4179 * so that `applyStyle` modifier can apply it. This separation is useful 4180 * in case you need to replace `applyStyle` with a custom implementation. 4181 * 4182 * This modifier has `850` as `order` value to maintain backward compatibility 4183 * with previous versions of Popper.js. Expect the modifiers ordering method 4184 * to change in future major versions of the library. 4185 * 4186 * @memberof modifiers 4187 * @inner 4188 */ 4189 computeStyle: { 4190 /** @prop {number} order=850 - Index used to define the order of execution */ 4191 order: 850, 4192 /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */ 4193 enabled: true, 4194 /** @prop {ModifierFn} */ 4195 fn: computeStyle, 4196 /** 4197 * @prop {Boolean} gpuAcceleration=true 4198 * If true, it uses the CSS 3D transformation to position the popper. 4199 * Otherwise, it will use the `top` and `left` properties 4200 */ 4201 gpuAcceleration: true, 4202 /** 4203 * @prop {string} [x='bottom'] 4204 * Where to anchor the X axis (`bottom` or `top`). AKA X offset origin. 4205 * Change this if your popper should grow in a direction different from `bottom` 4206 */ 4207 x: 'bottom', 4208 /** 4209 * @prop {string} [x='left'] 4210 * Where to anchor the Y axis (`left` or `right`). AKA Y offset origin. 4211 * Change this if your popper should grow in a direction different from `right` 4212 */ 4213 y: 'right' 4214 }, 4215 4216 /** 4217 * Applies the computed styles to the popper element. 4218 * 4219 * All the DOM manipulations are limited to this modifier. This is useful in case 4220 * you want to integrate Popper.js inside a framework or view library and you 4221 * want to delegate all the DOM manipulations to it. 4222 * 4223 * Note that if you disable this modifier, you must make sure the popper element 4224 * has its position set to `absolute` before Popper.js can do its work! 4225 * 4226 * Just disable this modifier and define your own to achieve the desired effect. 4227 * 4228 * @memberof modifiers 4229 * @inner 4230 */ 4231 applyStyle: { 4232 /** @prop {number} order=900 - Index used to define the order of execution */ 4233 order: 900, 4234 /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */ 4235 enabled: true, 4236 /** @prop {ModifierFn} */ 4237 fn: applyStyle, 4238 /** @prop {Function} */ 4239 onLoad: applyStyleOnLoad, 4240 /** 4241 * @deprecated since version 1.10.0, the property moved to `computeStyle` modifier 4242 * @prop {Boolean} gpuAcceleration=true 4243 * If true, it uses the CSS 3D transformation to position the popper. 4244 * Otherwise, it will use the `top` and `left` properties 4245 */ 4246 gpuAcceleration: undefined 4247 } 4248 }; 4249 4250 /** 4251 * The `dataObject` is an object containing all the information used by Popper.js. 4252 * This object is passed to modifiers and to the `onCreate` and `onUpdate` callbacks. 4253 * @name dataObject 4254 * @property {Object} data.instance The Popper.js instance 4255 * @property {String} data.placement Placement applied to popper 4256 * @property {String} data.originalPlacement Placement originally defined on init 4257 * @property {Boolean} data.flipped True if popper has been flipped by flip modifier 4258 * @property {Boolean} data.hide True if the reference element is out of boundaries, useful to know when to hide the popper 4259 * @property {HTMLElement} data.arrowElement Node used as arrow by arrow modifier 4260 * @property {Object} data.styles Any CSS property defined here will be applied to the popper. It expects the JavaScript nomenclature (eg. `marginBottom`) 4261 * @property {Object} data.arrowStyles Any CSS property defined here will be applied to the popper arrow. It expects the JavaScript nomenclature (eg. `marginBottom`) 4262 * @property {Object} data.boundaries Offsets of the popper boundaries 4263 * @property {Object} data.offsets The measurements of popper, reference and arrow elements 4264 * @property {Object} data.offsets.popper `top`, `left`, `width`, `height` values 4265 * @property {Object} data.offsets.reference `top`, `left`, `width`, `height` values 4266 * @property {Object} data.offsets.arrow] `top` and `left` offsets, only one of them will be different from 0 4267 */ 4268 4269 /** 4270 * Default options provided to Popper.js constructor.<br /> 4271 * These can be overridden using the `options` argument of Popper.js.<br /> 4272 * To override an option, simply pass an object with the same 4273 * structure of the `options` object, as the 3rd argument. For example: 4274 * ``` 4275 * new Popper(ref, pop, { 4276 * modifiers: { 4277 * preventOverflow: { enabled: false } 4278 * } 4279 * }) 4280 * ``` 4281 * @type {Object} 4282 * @static 4283 * @memberof Popper 4284 */ 4285 var Defaults = { 4286 /** 4287 * Popper's placement. 4288 * @prop {Popper.placements} placement='bottom' 4289 */ 4290 placement: 'bottom', 4291 4292 /** 4293 * Set this to true if you want popper to position it self in 'fixed' mode 4294 * @prop {Boolean} positionFixed=false 4295 */ 4296 positionFixed: false, 4297 4298 /** 4299 * Whether events (resize, scroll) are initially enabled. 4300 * @prop {Boolean} eventsEnabled=true 4301 */ 4302 eventsEnabled: true, 4303 4304 /** 4305 * Set to true if you want to automatically remove the popper when 4306 * you call the `destroy` method. 4307 * @prop {Boolean} removeOnDestroy=false 4308 */ 4309 removeOnDestroy: false, 4310 4311 /** 4312 * Callback called when the popper is created.<br /> 4313 * By default, it is set to no-op.<br /> 4314 * Access Popper.js instance with `data.instance`. 4315 * @prop {onCreate} 4316 */ 4317 onCreate: function onCreate() {}, 4318 4319 /** 4320 * Callback called when the popper is updated. This callback is not called 4321 * on the initialization/creation of the popper, but only on subsequent 4322 * updates.<br /> 4323 * By default, it is set to no-op.<br /> 4324 * Access Popper.js instance with `data.instance`. 4325 * @prop {onUpdate} 4326 */ 4327 onUpdate: function onUpdate() {}, 4328 4329 /** 4330 * List of modifiers used to modify the offsets before they are applied to the popper. 4331 * They provide most of the functionalities of Popper.js. 4332 * @prop {modifiers} 4333 */ 4334 modifiers: modifiers 4335 }; 4336 4337 /** 4338 * @callback onCreate 4339 * @param {dataObject} data 4340 */ 4341 4342 /** 4343 * @callback onUpdate 4344 * @param {dataObject} data 4345 */ 4346 4347 // Utils 4348 // Methods 4349 var Popper = function () { 4350 /** 4351 * Creates a new Popper.js instance. 4352 * @class Popper 4353 * @param {Element|referenceObject} reference - The reference element used to position the popper 4354 * @param {Element} popper - The HTML / XML element used as the popper 4355 * @param {Object} options - Your custom options to override the ones defined in [Defaults](#defaults) 4356 * @return {Object} instance - The generated Popper.js instance 4357 */ 4358 function Popper(reference, popper) { 4359 var _this = this; 4360 4361 var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; 4362 classCallCheck(this, Popper); 4363 4364 this.scheduleUpdate = function () { 4365 return requestAnimationFrame(_this.update); 4366 }; 4367 4368 // make update() debounced, so that it only runs at most once-per-tick 4369 this.update = debounce(this.update.bind(this)); 4370 4371 // with {} we create a new object with the options inside it 4372 this.options = _extends({}, Popper.Defaults, options); 4373 4374 // init state 4375 this.state = { 4376 isDestroyed: false, 4377 isCreated: false, 4378 scrollParents: [] 4379 }; 4380 4381 // get reference and popper elements (allow jQuery wrappers) 4382 this.reference = reference && reference.jquery ? reference[0] : reference; 4383 this.popper = popper && popper.jquery ? popper[0] : popper; 4384 4385 // Deep merge modifiers options 4386 this.options.modifiers = {}; 4387 Object.keys(_extends({}, Popper.Defaults.modifiers, options.modifiers)).forEach(function (name) { 4388 _this.options.modifiers[name] = _extends({}, Popper.Defaults.modifiers[name] || {}, options.modifiers ? options.modifiers[name] : {}); 4389 }); 4390 4391 // Refactoring modifiers' list (Object => Array) 4392 this.modifiers = Object.keys(this.options.modifiers).map(function (name) { 4393 return _extends({ 4394 name: name 4395 }, _this.options.modifiers[name]); 4396 }) 4397 // sort the modifiers by order 4398 .sort(function (a, b) { 4399 return a.order - b.order; 4400 }); 4401 4402 // modifiers have the ability to execute arbitrary code when Popper.js get inited 4403 // such code is executed in the same order of its modifier 4404 // they could add new properties to their options configuration 4405 // BE AWARE: don't add options to `options.modifiers.name` but to `modifierOptions`! 4406 this.modifiers.forEach(function (modifierOptions) { 4407 if (modifierOptions.enabled && isFunction(modifierOptions.onLoad)) { 4408 modifierOptions.onLoad(_this.reference, _this.popper, _this.options, modifierOptions, _this.state); 4409 } 4410 }); 4411 4412 // fire the first update to position the popper in the right place 4413 this.update(); 4414 4415 var eventsEnabled = this.options.eventsEnabled; 4416 if (eventsEnabled) { 4417 // setup event listeners, they will take care of update the position in specific situations 4418 this.enableEventListeners(); 4419 } 4420 4421 this.state.eventsEnabled = eventsEnabled; 4422 } 4423 4424 // We can't use class properties because they don't get listed in the 4425 // class prototype and break stuff like Sinon stubs 4426 4427 4428 createClass(Popper, [{ 4429 key: 'update', 4430 value: function update$$1() { 4431 return update.call(this); 4432 } 4433 }, { 4434 key: 'destroy', 4435 value: function destroy$$1() { 4436 return destroy.call(this); 4437 } 4438 }, { 4439 key: 'enableEventListeners', 4440 value: function enableEventListeners$$1() { 4441 return enableEventListeners.call(this); 4442 } 4443 }, { 4444 key: 'disableEventListeners', 4445 value: function disableEventListeners$$1() { 4446 return disableEventListeners.call(this); 4447 } 4448 4449 /** 4450 * Schedules an update. It will run on the next UI update available. 4451 * @method scheduleUpdate 4452 * @memberof Popper 4453 */ 4454 4455 4456 /** 4457 * Collection of utilities useful when writing custom modifiers. 4458 * Starting from version 1.7, this method is available only if you 4459 * include `popper-utils.js` before `popper.js`. 4460 * 4461 * **DEPRECATION**: This way to access PopperUtils is deprecated 4462 * and will be removed in v2! Use the PopperUtils module directly instead. 4463 * Due to the high instability of the methods contained in Utils, we can't 4464 * guarantee them to follow semver. Use them at your own risk! 4465 * @static 4466 * @private 4467 * @type {Object} 4468 * @deprecated since version 1.8 4469 * @member Utils 4470 * @memberof Popper 4471 */ 4472 4473 }]); 4474 return Popper; 4475 }(); 4476 4477 /** 4478 * The `referenceObject` is an object that provides an interface compatible with Popper.js 4479 * and lets you use it as replacement of a real DOM node.<br /> 4480 * You can use this method to position a popper relatively to a set of coordinates 4481 * in case you don't have a DOM node to use as reference. 4482 * 4483 * ``` 4484 * new Popper(referenceObject, popperNode); 4485 * ``` 4486 * 4487 * NB: This feature isn't supported in Internet Explorer 10. 4488 * @name referenceObject 4489 * @property {Function} data.getBoundingClientRect 4490 * A function that returns a set of coordinates compatible with the native `getBoundingClientRect` method. 4491 * @property {number} data.clientWidth 4492 * An ES6 getter that will return the width of the virtual reference element. 4493 * @property {number} data.clientHeight 4494 * An ES6 getter that will return the height of the virtual reference element. 4495 */ 4496 4497 4498 Popper.Utils = (typeof window !== 'undefined' ? window : global).PopperUtils; 4499 Popper.placements = placements; 4500 Popper.Defaults = Defaults; 4501 4502 var Popper$1 = Popper; 4503 4504 /** 4505 * Constants 4506 */ 4507 4508 var NAME$6 = 'dropdown'; 4509 var VERSION$6 = '4.6.2'; 4510 var DATA_KEY$6 = 'bs.dropdown'; 4511 var EVENT_KEY$6 = "." + DATA_KEY$6; 4512 var DATA_API_KEY$3 = '.data-api'; 4513 var JQUERY_NO_CONFLICT$6 = $__default["default"].fn[NAME$6]; 4514 var ESCAPE_KEYCODE$1 = 27; // KeyboardEvent.which value for Escape (Esc) key 4515 4516 var SPACE_KEYCODE = 32; // KeyboardEvent.which value for space key 4517 4518 var TAB_KEYCODE = 9; // KeyboardEvent.which value for tab key 4519 4520 var ARROW_UP_KEYCODE = 38; // KeyboardEvent.which value for up arrow key 4521 4522 var ARROW_DOWN_KEYCODE = 40; // KeyboardEvent.which value for down arrow key 4523 4524 var RIGHT_MOUSE_BUTTON_WHICH = 3; // MouseEvent.which value for the right button (assuming a right-handed mouse) 4525 4526 var REGEXP_KEYDOWN = new RegExp(ARROW_UP_KEYCODE + "|" + ARROW_DOWN_KEYCODE + "|" + ESCAPE_KEYCODE$1); 4527 var CLASS_NAME_DISABLED$1 = 'disabled'; 4528 var CLASS_NAME_SHOW$5 = 'show'; 4529 var CLASS_NAME_DROPUP = 'dropup'; 4530 var CLASS_NAME_DROPRIGHT = 'dropright'; 4531 var CLASS_NAME_DROPLEFT = 'dropleft'; 4532 var CLASS_NAME_MENURIGHT = 'dropdown-menu-right'; 4533 var CLASS_NAME_POSITION_STATIC = 'position-static'; 4534 var EVENT_HIDE$3 = "hide" + EVENT_KEY$6; 4535 var EVENT_HIDDEN$3 = "hidden" + EVENT_KEY$6; 4536 var EVENT_SHOW$3 = "show" + EVENT_KEY$6; 4537 var EVENT_SHOWN$3 = "shown" + EVENT_KEY$6; 4538 var EVENT_CLICK = "click" + EVENT_KEY$6; 4539 var EVENT_CLICK_DATA_API$2 = "click" + EVENT_KEY$6 + DATA_API_KEY$3; 4540 var EVENT_KEYDOWN_DATA_API = "keydown" + EVENT_KEY$6 + DATA_API_KEY$3; 4541 var EVENT_KEYUP_DATA_API = "keyup" + EVENT_KEY$6 + DATA_API_KEY$3; 4542 var SELECTOR_DATA_TOGGLE$2 = '[data-toggle="dropdown"]'; 4543 var SELECTOR_FORM_CHILD = '.dropdown form'; 4544 var SELECTOR_MENU = '.dropdown-menu'; 4545 var SELECTOR_NAVBAR_NAV = '.navbar-nav'; 4546 var SELECTOR_VISIBLE_ITEMS = '.dropdown-menu .dropdown-item:not(.disabled):not(:disabled)'; 4547 var PLACEMENT_TOP = 'top-start'; 4548 var PLACEMENT_TOPEND = 'top-end'; 4549 var PLACEMENT_BOTTOM = 'bottom-start'; 4550 var PLACEMENT_BOTTOMEND = 'bottom-end'; 4551 var PLACEMENT_RIGHT = 'right-start'; 4552 var PLACEMENT_LEFT = 'left-start'; 4553 var Default$5 = { 4554 offset: 0, 4555 flip: true, 4556 boundary: 'scrollParent', 4557 reference: 'toggle', 4558 display: 'dynamic', 4559 popperConfig: null 4560 }; 4561 var DefaultType$5 = { 4562 offset: '(number|string|function)', 4563 flip: 'boolean', 4564 boundary: '(string|element)', 4565 reference: '(string|element)', 4566 display: 'string', 4567 popperConfig: '(null|object)' 4568 }; 4569 /** 4570 * Class definition 4571 */ 4572 4573 var Dropdown = /*#__PURE__*/function () { 4574 function Dropdown(element, config) { 4575 this._element = element; 4576 this._popper = null; 4577 this._config = this._getConfig(config); 4578 this._menu = this._getMenuElement(); 4579 this._inNavbar = this._detectNavbar(); 4580 4581 this._addEventListeners(); 4582 } // Getters 4583 4584 4585 var _proto = Dropdown.prototype; 4586 4587 // Public 4588 _proto.toggle = function toggle() { 4589 if (this._element.disabled || $__default["default"](this._element).hasClass(CLASS_NAME_DISABLED$1)) { 4590 return; 4591 } 4592 4593 var isActive = $__default["default"](this._menu).hasClass(CLASS_NAME_SHOW$5); 4594 4595 Dropdown._clearMenus(); 4596 4597 if (isActive) { 4598 return; 4599 } 4600 4601 this.show(true); 4602 }; 4603 4604 _proto.show = function show(usePopper) { 4605 if (usePopper === void 0) { 4606 usePopper = false; 4607 } 4608 4609 if (this._element.disabled || $__default["default"](this._element).hasClass(CLASS_NAME_DISABLED$1) || $__default["default"](this._menu).hasClass(CLASS_NAME_SHOW$5)) { 4610 return; 4611 } 4612 4613 var relatedTarget = { 4614 relatedTarget: this._element 4615 }; 4616 var showEvent = $__default["default"].Event(EVENT_SHOW$3, relatedTarget); 4617 4618 var parent = Dropdown._getParentFromElement(this._element); 4619 4620 $__default["default"](parent).trigger(showEvent); 4621 4622 if (showEvent.isDefaultPrevented()) { 4623 return; 4624 } // Totally disable Popper for Dropdowns in Navbar 4625 4626 4627 if (!this._inNavbar && usePopper) { 4628 // Check for Popper dependency 4629 if (typeof Popper$1 === 'undefined') { 4630 throw new TypeError('Bootstrap\'s dropdowns require Popper (https://popper.js.org)'); 4631 } 4632 4633 var referenceElement = this._element; 4634 4635 if (this._config.reference === 'parent') { 4636 referenceElement = parent; 4637 } else if (Util.isElement(this._config.reference)) { 4638 referenceElement = this._config.reference; // Check if it's jQuery element 4639 4640 if (typeof this._config.reference.jquery !== 'undefined') { 4641 referenceElement = this._config.reference[0]; 4642 } 4643 } // If boundary is not `scrollParent`, then set position to `static` 4644 // to allow the menu to "escape" the scroll parent's boundaries 4645 // https://github.com/twbs/bootstrap/issues/24251 4646 4647 4648 if (this._config.boundary !== 'scrollParent') { 4649 $__default["default"](parent).addClass(CLASS_NAME_POSITION_STATIC); 4650 } 4651 4652 this._popper = new Popper$1(referenceElement, this._menu, this._getPopperConfig()); 4653 } // If this is a touch-enabled device we add extra 4654 // empty mouseover listeners to the body's immediate children; 4655 // only needed because of broken event delegation on iOS 4656 // https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html 4657 4658 4659 if ('ontouchstart' in document.documentElement && $__default["default"](parent).closest(SELECTOR_NAVBAR_NAV).length === 0) { 4660 $__default["default"](document.body).children().on('mouseover', null, $__default["default"].noop); 4661 } 4662 4663 this._element.focus(); 4664 4665 this._element.setAttribute('aria-expanded', true); 4666 4667 $__default["default"](this._menu).toggleClass(CLASS_NAME_SHOW$5); 4668 $__default["default"](parent).toggleClass(CLASS_NAME_SHOW$5).trigger($__default["default"].Event(EVENT_SHOWN$3, relatedTarget)); 4669 }; 4670 4671 _proto.hide = function hide() { 4672 if (this._element.disabled || $__default["default"](this._element).hasClass(CLASS_NAME_DISABLED$1) || !$__default["default"](this._menu).hasClass(CLASS_NAME_SHOW$5)) { 4673 return; 4674 } 4675 4676 var relatedTarget = { 4677 relatedTarget: this._element 4678 }; 4679 var hideEvent = $__default["default"].Event(EVENT_HIDE$3, relatedTarget); 4680 4681 var parent = Dropdown._getParentFromElement(this._element); 4682 4683 $__default["default"](parent).trigger(hideEvent); 4684 4685 if (hideEvent.isDefaultPrevented()) { 4686 return; 4687 } 4688 4689 if (this._popper) { 4690 this._popper.destroy(); 4691 } 4692 4693 $__default["default"](this._menu).toggleClass(CLASS_NAME_SHOW$5); 4694 $__default["default"](parent).toggleClass(CLASS_NAME_SHOW$5).trigger($__default["default"].Event(EVENT_HIDDEN$3, relatedTarget)); 4695 }; 4696 4697 _proto.dispose = function dispose() { 4698 $__default["default"].removeData(this._element, DATA_KEY$6); 4699 $__default["default"](this._element).off(EVENT_KEY$6); 4700 this._element = null; 4701 this._menu = null; 4702 4703 if (this._popper !== null) { 4704 this._popper.destroy(); 4705 4706 this._popper = null; 4707 } 4708 }; 4709 4710 _proto.update = function update() { 4711 this._inNavbar = this._detectNavbar(); 4712 4713 if (this._popper !== null) { 4714 this._popper.scheduleUpdate(); 4715 } 4716 } // Private 4717 ; 4718 4719 _proto._addEventListeners = function _addEventListeners() { 4720 var _this = this; 4721 4722 $__default["default"](this._element).on(EVENT_CLICK, function (event) { 4723 event.preventDefault(); 4724 event.stopPropagation(); 4725 4726 _this.toggle(); 4727 }); 4728 }; 4729 4730 _proto._getConfig = function _getConfig(config) { 4731 config = _extends$1({}, this.constructor.Default, $__default["default"](this._element).data(), config); 4732 Util.typeCheckConfig(NAME$6, config, this.constructor.DefaultType); 4733 return config; 4734 }; 4735 4736 _proto._getMenuElement = function _getMenuElement() { 4737 if (!this._menu) { 4738 var parent = Dropdown._getParentFromElement(this._element); 4739 4740 if (parent) { 4741 this._menu = parent.querySelector(SELECTOR_MENU); 4742 } 4743 } 4744 4745 return this._menu; 4746 }; 4747 4748 _proto._getPlacement = function _getPlacement() { 4749 var $parentDropdown = $__default["default"](this._element.parentNode); 4750 var placement = PLACEMENT_BOTTOM; // Handle dropup 4751 4752 if ($parentDropdown.hasClass(CLASS_NAME_DROPUP)) { 4753 placement = $__default["default"](this._menu).hasClass(CLASS_NAME_MENURIGHT) ? PLACEMENT_TOPEND : PLACEMENT_TOP; 4754 } else if ($parentDropdown.hasClass(CLASS_NAME_DROPRIGHT)) { 4755 placement = PLACEMENT_RIGHT; 4756 } else if ($parentDropdown.hasClass(CLASS_NAME_DROPLEFT)) { 4757 placement = PLACEMENT_LEFT; 4758 } else if ($__default["default"](this._menu).hasClass(CLASS_NAME_MENURIGHT)) { 4759 placement = PLACEMENT_BOTTOMEND; 4760 } 4761 4762 return placement; 4763 }; 4764 4765 _proto._detectNavbar = function _detectNavbar() { 4766 return $__default["default"](this._element).closest('.navbar').length > 0; 4767 }; 4768 4769 _proto._getOffset = function _getOffset() { 4770 var _this2 = this; 4771 4772 var offset = {}; 4773 4774 if (typeof this._config.offset === 'function') { 4775 offset.fn = function (data) { 4776 data.offsets = _extends$1({}, data.offsets, _this2._config.offset(data.offsets, _this2._element)); 4777 return data; 4778 }; 4779 } else { 4780 offset.offset = this._config.offset; 4781 } 4782 4783 return offset; 4784 }; 4785 4786 _proto._getPopperConfig = function _getPopperConfig() { 4787 var popperConfig = { 4788 placement: this._getPlacement(), 4789 modifiers: { 4790 offset: this._getOffset(), 4791 flip: { 4792 enabled: this._config.flip 4793 }, 4794 preventOverflow: { 4795 boundariesElement: this._config.boundary 4796 } 4797 } 4798 }; // Disable Popper if we have a static display 4799 4800 if (this._config.display === 'static') { 4801 popperConfig.modifiers.applyStyle = { 4802 enabled: false 4803 }; 4804 } 4805 4806 return _extends$1({}, popperConfig, this._config.popperConfig); 4807 } // Static 4808 ; 4809 4810 Dropdown._jQueryInterface = function _jQueryInterface(config) { 4811 return this.each(function () { 4812 var data = $__default["default"](this).data(DATA_KEY$6); 4813 4814 var _config = typeof config === 'object' ? config : null; 4815 4816 if (!data) { 4817 data = new Dropdown(this, _config); 4818 $__default["default"](this).data(DATA_KEY$6, data); 4819 } 4820 4821 if (typeof config === 'string') { 4822 if (typeof data[config] === 'undefined') { 4823 throw new TypeError("No method named \"" + config + "\""); 4824 } 4825 4826 data[config](); 4827 } 4828 }); 4829 }; 4830 4831 Dropdown._clearMenus = function _clearMenus(event) { 4832 if (event && (event.which === RIGHT_MOUSE_BUTTON_WHICH || event.type === 'keyup' && event.which !== TAB_KEYCODE)) { 4833 return; 4834 } 4835 4836 var toggles = [].slice.call(document.querySelectorAll(SELECTOR_DATA_TOGGLE$2)); 4837 4838 for (var i = 0, len = toggles.length; i < len; i++) { 4839 var parent = Dropdown._getParentFromElement(toggles[i]); 4840 4841 var context = $__default["default"](toggles[i]).data(DATA_KEY$6); 4842 var relatedTarget = { 4843 relatedTarget: toggles[i] 4844 }; 4845 4846 if (event && event.type === 'click') { 4847 relatedTarget.clickEvent = event; 4848 } 4849 4850 if (!context) { 4851 continue; 4852 } 4853 4854 var dropdownMenu = context._menu; 4855 4856 if (!$__default["default"](parent).hasClass(CLASS_NAME_SHOW$5)) { 4857 continue; 4858 } 4859 4860 if (event && (event.type === 'click' && /input|textarea/i.test(event.target.tagName) || event.type === 'keyup' && event.which === TAB_KEYCODE) && $__default["default"].contains(parent, event.target)) { 4861 continue; 4862 } 4863 4864 var hideEvent = $__default["default"].Event(EVENT_HIDE$3, relatedTarget); 4865 $__default["default"](parent).trigger(hideEvent); 4866 4867 if (hideEvent.isDefaultPrevented()) { 4868 continue; 4869 } // If this is a touch-enabled device we remove the extra 4870 // empty mouseover listeners we added for iOS support 4871 4872 4873 if ('ontouchstart' in document.documentElement) { 4874 $__default["default"](document.body).children().off('mouseover', null, $__default["default"].noop); 4875 } 4876 4877 toggles[i].setAttribute('aria-expanded', 'false'); 4878 4879 if (context._popper) { 4880 context._popper.destroy(); 4881 } 4882 4883 $__default["default"](dropdownMenu).removeClass(CLASS_NAME_SHOW$5); 4884 $__default["default"](parent).removeClass(CLASS_NAME_SHOW$5).trigger($__default["default"].Event(EVENT_HIDDEN$3, relatedTarget)); 4885 } 4886 }; 4887 4888 Dropdown._getParentFromElement = function _getParentFromElement(element) { 4889 var parent; 4890 var selector = Util.getSelectorFromElement(element); 4891 4892 if (selector) { 4893 parent = document.querySelector(selector); 4894 } 4895 4896 return parent || element.parentNode; 4897 } // eslint-disable-next-line complexity 4898 ; 4899 4900 Dropdown._dataApiKeydownHandler = function _dataApiKeydownHandler(event) { 4901 // If not input/textarea: 4902 // - And not a key in REGEXP_KEYDOWN => not a dropdown command 4903 // If input/textarea: 4904 // - If space key => not a dropdown command 4905 // - If key is other than escape 4906 // - If key is not up or down => not a dropdown command 4907 // - If trigger inside the menu =>
vendor: 5,113 bytes, lines 4907-5066
4907 not a dropdown command 4908 if (/input|textarea/i.test(event.target.tagName) ? event.which === SPACE_KEYCODE || event.which !== ESCAPE_KEYCODE$1 && (event.which !== ARROW_DOWN_KEYCODE && event.which !== ARROW_UP_KEYCODE || $__default["default"](event.target).closest(SELECTOR_MENU).length) : !REGEXP_KEYDOWN.test(event.which)) { 4909 return; 4910 } 4911 4912 if (this.disabled || $__default["default"](this).hasClass(CLASS_NAME_DISABLED$1)) { 4913 return; 4914 } 4915 4916 var parent = Dropdown._getParentFromElement(this); 4917 4918 var isActive = $__default["default"](parent).hasClass(CLASS_NAME_SHOW$5); 4919 4920 if (!isActive && event.which === ESCAPE_KEYCODE$1) { 4921 return; 4922 } 4923 4924 event.preventDefault(); 4925 event.stopPropagation(); 4926 4927 if (!isActive || event.which === ESCAPE_KEYCODE$1 || event.which === SPACE_KEYCODE) { 4928 if (event.which === ESCAPE_KEYCODE$1) { 4929 $__default["default"](parent.querySelector(SELECTOR_DATA_TOGGLE$2)).trigger('focus'); 4930 } 4931 4932 $__default["default"](this).trigger('click'); 4933 return; 4934 } 4935 4936 var items = [].slice.call(parent.querySelectorAll(SELECTOR_VISIBLE_ITEMS)).filter(function (item) { 4937 return $__default["default"](item).is(':visible'); 4938 }); 4939 4940 if (items.length === 0) { 4941 return; 4942 } 4943 4944 var index = items.indexOf(event.target); 4945 4946 if (event.which === ARROW_UP_KEYCODE && index > 0) { 4947 // Up 4948 index--; 4949 } 4950 4951 if (event.which === ARROW_DOWN_KEYCODE && index < items.length - 1) { 4952 // Down 4953 index++; 4954 } 4955 4956 if (index < 0) { 4957 index = 0; 4958 } 4959 4960 items[index].focus(); 4961 }; 4962 4963 _createClass(Dropdown, null, [{ 4964 key: "VERSION", 4965 get: function get() { 4966 return VERSION$6; 4967 } 4968 }, { 4969 key: "Default", 4970 get: function get() { 4971 return Default$5; 4972 } 4973 }, { 4974 key: "DefaultType", 4975 get: function get() { 4976 return DefaultType$5; 4977 } 4978 }]); 4979 4980 return Dropdown; 4981 }(); 4982 /** 4983 * Data API implementation 4984 */ 4985 4986 4987 $__default["default"](document).on(EVENT_KEYDOWN_DATA_API, SELECTOR_DATA_TOGGLE$2, Dropdown._dataApiKeydownHandler).on(EVENT_KEYDOWN_DATA_API, SELECTOR_MENU, Dropdown._dataApiKeydownHandler).on(EVENT_CLICK_DATA_API$2 + " " + EVENT_KEYUP_DATA_API, Dropdown._clearMenus).on(EVENT_CLICK_DATA_API$2, SELECTOR_DATA_TOGGLE$2, function (event) { 4988 event.preventDefault(); 4989 event.stopPropagation(); 4990 4991 Dropdown._jQueryInterface.call($__default["default"](this), 'toggle'); 4992 }).on(EVENT_CLICK_DATA_API$2, SELECTOR_FORM_CHILD, function (e) { 4993 e.stopPropagation(); 4994 }); 4995 /** 4996 * jQuery 4997 */ 4998 4999 $__default["default"].fn[NAME$6] = Dropdown._jQueryInterface; 5000 $__default["default"].fn[NAME$6].Constructor = Dropdown; 5001 5002 $__default["default"].fn[NAME$6].noConflict = function () { 5003 $__default["default"].fn[NAME$6] = JQUERY_NO_CONFLICT$6; 5004 return Dropdown._jQueryInterface; 5005 }; 5006 5007 /** 5008 * Constants 5009 */ 5010 5011 var NAME$5 = 'modal'; 5012 var VERSION$5 = '4.6.2'; 5013 var DATA_KEY$5 = 'bs.modal'; 5014 var EVENT_KEY$5 = "." + DATA_KEY$5; 5015 var DATA_API_KEY$2 = '.data-api'; 5016 var JQUERY_NO_CONFLICT$5 = $__default["default"].fn[NAME$5]; 5017 var ESCAPE_KEYCODE = 27; // KeyboardEvent.which value for Escape (Esc) key 5018 5019 var CLASS_NAME_SCROLLABLE = 'modal-dialog-scrollable'; 5020 var CLASS_NAME_SCROLLBAR_MEASURER = 'modal-scrollbar-measure'; 5021 var CLASS_NAME_BACKDROP = 'modal-backdrop'; 5022 var CLASS_NAME_OPEN = 'modal-open'; 5023 var CLASS_NAME_FADE$4 = 'fade'; 5024 var CLASS_NAME_SHOW$4 = 'show'; 5025 var CLASS_NAME_STATIC = 'modal-static'; 5026 var EVENT_HIDE$2 = "hide" + EVENT_KEY$5; 5027 var EVENT_HIDE_PREVENTED = "hidePrevented" + EVENT_KEY$5; 5028 var EVENT_HIDDEN$2 = "hidden" + EVENT_KEY$5; 5029 var EVENT_SHOW$2 = "show" + EVENT_KEY$5; 5030 var EVENT_SHOWN$2 = "shown" + EVENT_KEY$5; 5031 var EVENT_FOCUSIN = "focusin" + EVENT_KEY$5; 5032 var EVENT_RESIZE = "resize" + EVENT_KEY$5; 5033 var EVENT_CLICK_DISMISS$1 = "click.dismiss" + EVENT_KEY$5; 5034 var EVENT_KEYDOWN_DISMISS = "keydown.dismiss" + EVENT_KEY$5; 5035 var EVENT_MOUSEUP_DISMISS = "mouseup.dismiss" + EVENT_KEY$5; 5036 var EVENT_MOUSEDOWN_DISMISS = "mousedown.dismiss" + EVENT_KEY$5; 5037 var EVENT_CLICK_DATA_API$1 = "click" + EVENT_KEY$5 + DATA_API_KEY$2; 5038 var SELECTOR_DIALOG = '.modal-dialog'; 5039 var SELECTOR_MODAL_BODY = '.modal-body'; 5040 var SELECTOR_DATA_TOGGLE$1 = '[data-toggle="modal"]'; 5041 var SELECTOR_DATA_DISMISS$1 = '[data-dismiss="modal"]'; 5042 var SELECTOR_FIXED_CONTENT = '.fixed-top, .fixed-bottom, .is-fixed, .sticky-top'; 5043 var SELECTOR_STICKY_CONTENT = '.sticky-top'; 5044 var Default$4 = { 5045 backdrop: true, 5046 keyboard: true, 5047 focus: true, 5048 show: true 5049 }; 5050 var DefaultType$4 = { 5051 backdrop: '(boolean|string)', 5052 keyboard: 'boolean', 5053 focus: 'boolean', 5054 show: 'boolean' 5055 }; 5056 /** 5057 * Class definition 5058 */ 5059 5060 var Modal = /*#__PURE__*/function () { 5061 function Modal(element, config) { 5062 this._config = this._getConfig(config); 5063 this._element = element; 5064 this._dialog = element.querySelector(SELECTOR_DIALOG); 5065 this._backdrop = null; 5066 this._isShown = false;
vendor: 6,712 bytes, lines 5067-5284
5067 this._isBodyOverflowing = false; 5068 this._ignoreBackdropClick = false; 5069 this._isTransitioning = false; 5070 this._scrollbarWidth = 0; 5071 } // Getters 5072 5073 5074 var _proto = Modal.prototype; 5075 5076 // Public 5077 _proto.toggle = function toggle(relatedTarget) { 5078 return this._isShown ? this.hide() : this.show(relatedTarget); 5079 }; 5080 5081 _proto.show = function show(relatedTarget) { 5082 var _this = this; 5083 5084 if (this._isShown || this._isTransitioning) { 5085 return; 5086 } 5087 5088 var showEvent = $__default["default"].Event(EVENT_SHOW$2, { 5089 relatedTarget: relatedTarget 5090 }); 5091 $__default["default"](this._element).trigger(showEvent); 5092 5093 if (showEvent.isDefaultPrevented()) { 5094 return; 5095 } 5096 5097 this._isShown = true; 5098 5099 if ($__default["default"](this._element).hasClass(CLASS_NAME_FADE$4)) { 5100 this._isTransitioning = true; 5101 } 5102 5103 this._checkScrollbar(); 5104 5105 this._setScrollbar(); 5106 5107 this._adjustDialog(); 5108 5109 this._setEscapeEvent(); 5110 5111 this._setResizeEvent(); 5112 5113 $__default["default"](this._element).on(EVENT_CLICK_DISMISS$1, SELECTOR_DATA_DISMISS$1, function (event) { 5114 return _this.hide(event); 5115 }); 5116 $__default["default"](this._dialog).on(EVENT_MOUSEDOWN_DISMISS, function () { 5117 $__default["default"](_this._element).one(EVENT_MOUSEUP_DISMISS, function (event) { 5118 if ($__default["default"](event.target).is(_this._element)) { 5119 _this._ignoreBackdropClick = true; 5120 } 5121 }); 5122 }); 5123 5124 this._showBackdrop(function () { 5125 return _this._showElement(relatedTarget); 5126 }); 5127 }; 5128 5129 _proto.hide = function hide(event) { 5130 var _this2 = this; 5131 5132 if (event) { 5133 event.preventDefault(); 5134 } 5135 5136 if (!this._isShown || this._isTransitioning) { 5137 return; 5138 } 5139 5140 var hideEvent = $__default["default"].Event(EVENT_HIDE$2); 5141 $__default["default"](this._element).trigger(hideEvent); 5142 5143 if (!this._isShown || hideEvent.isDefaultPrevented()) { 5144 return; 5145 } 5146 5147 this._isShown = false; 5148 var transition = $__default["default"](this._element).hasClass(CLASS_NAME_FADE$4); 5149 5150 if (transition) { 5151 this._isTransitioning = true; 5152 } 5153 5154 this._setEscapeEvent(); 5155 5156 this._setResizeEvent(); 5157 5158 $__default["default"](document).off(EVENT_FOCUSIN); 5159 $__default["default"](this._element).removeClass(CLASS_NAME_SHOW$4); 5160 $__default["default"](this._element).off(EVENT_CLICK_DISMISS$1); 5161 $__default["default"](this._dialog).off(EVENT_MOUSEDOWN_DISMISS); 5162 5163 if (transition) { 5164 var transitionDuration = Util.getTransitionDurationFromElement(this._element); 5165 $__default["default"](this._element).one(Util.TRANSITION_END, function (event) { 5166 return _this2._hideModal(event); 5167 }).emulateTransitionEnd(transitionDuration); 5168 } else { 5169 this._hideModal(); 5170 } 5171 }; 5172 5173 _proto.dispose = function dispose() { 5174 [window, this._element, this._dialog].forEach(function (htmlElement) { 5175 return $__default["default"](htmlElement).off(EVENT_KEY$5); 5176 }); 5177 /** 5178 * `document` has 2 events `EVENT_FOCUSIN` and `EVENT_CLICK_DATA_API` 5179 * Do not move `document` in `htmlElements` array 5180 * It will remove `EVENT_CLICK_DATA_API` event that should remain 5181 */ 5182 5183 $__default["default"](document).off(EVENT_FOCUSIN); 5184 $__default["default"].removeData(this._element, DATA_KEY$5); 5185 this._config = null; 5186 this._element = null; 5187 this._dialog = null; 5188 this._backdrop = null; 5189 this._isShown = null; 5190 this._isBodyOverflowing = null; 5191 this._ignoreBackdropClick = null; 5192 this._isTransitioning = null; 5193 this._scrollbarWidth = null; 5194 }; 5195 5196 _proto.handleUpdate = function handleUpdate() { 5197 this._adjustDialog(); 5198 } // Private 5199 ; 5200 5201 _proto._getConfig = function _getConfig(config) { 5202 config = _extends$1({}, Default$4, config); 5203 Util.typeCheckConfig(NAME$5, config, DefaultType$4); 5204 return config; 5205 }; 5206 5207 _proto._triggerBackdropTransition = function _triggerBackdropTransition() { 5208 var _this3 = this; 5209 5210 var hideEventPrevented = $__default["default"].Event(EVENT_HIDE_PREVENTED); 5211 $__default["default"](this._element).trigger(hideEventPrevented); 5212 5213 if (hideEventPrevented.isDefaultPrevented()) { 5214 return; 5215 } 5216 5217 var isModalOverflowing = this._element.scrollHeight > document.documentElement.clientHeight; 5218 5219 if (!isModalOverflowing) { 5220 this._element.style.overflowY = 'hidden'; 5221 } 5222 5223 this._element.classList.add(CLASS_NAME_STATIC); 5224 5225 var modalTransitionDuration = Util.getTransitionDurationFromElement(this._dialog); 5226 $__default["default"](this._element).off(Util.TRANSITION_END); 5227 $__default["default"](this._element).one(Util.TRANSITION_END, function () { 5228 _this3._element.classList.remove(CLASS_NAME_STATIC); 5229 5230 if (!isModalOverflowing) { 5231 $__default["default"](_this3._element).one(Util.TRANSITION_END, function () { 5232 _this3._element.style.overflowY = ''; 5233 }).emulateTransitionEnd(_this3._element, modalTransitionDuration); 5234 } 5235 }).emulateTransitionEnd(modalTransitionDuration); 5236 5237 this._element.focus(); 5238 }; 5239 5240 _proto._showElement = function _showElement(relatedTarget) { 5241 var _this4 = this; 5242 5243 var transition = $__default["default"](this._element).hasClass(CLASS_NAME_FADE$4); 5244 var modalBody = this._dialog ? this._dialog.querySelector(SELECTOR_MODAL_BODY) : null; 5245 5246 if (!this._element.parentNode || this._element.parentNode.nodeType !== Node.ELEMENT_NODE) { 5247 // Don't move modal's DOM position 5248 document.body.appendChild(this._element); 5249 } 5250 5251 this._element.style.display = 'block'; 5252 5253 this._element.removeAttribute('aria-hidden'); 5254 5255 this._element.setAttribute('aria-modal', true); 5256 5257 this._element.setAttribute('role', 'dialog'); 5258 5259 if ($__default["default"](this._dialog).hasClass(CLASS_NAME_SCROLLABLE) && modalBody) { 5260 modalBody.scrollTop = 0; 5261 } else { 5262 this._element.scrollTop = 0; 5263 } 5264 5265 if (transition) { 5266 Util.reflow(this._element); 5267 } 5268 5269 $__default["default"](this._element).addClass(CLASS_NAME_SHOW$4); 5270 5271 if (this._config.focus) { 5272 this._enforceFocus(); 5273 } 5274 5275 var shownEvent = $__default["default"].Event(EVENT_SHOWN$2, { 5276 relatedTarget: relatedTarget 5277 }); 5278 5279 var transitionComplete = function transitionComplete() { 5280 if (_this4._config.focus) { 5281 _this4._element.focus(); 5282 } 5283 5284 _this4._isTransitioning = false;
vendor: 5,075 bytes, lines 5285-5442
5285 $__default["default"](_this4._element).trigger(shownEvent); 5286 }; 5287 5288 if (transition) { 5289 var transitionDuration = Util.getTransitionDurationFromElement(this._dialog); 5290 $__default["default"](this._dialog).one(Util.TRANSITION_END, transitionComplete).emulateTransitionEnd(transitionDuration); 5291 } else { 5292 transitionComplete(); 5293 } 5294 }; 5295 5296 _proto._enforceFocus = function _enforceFocus() { 5297 var _this5 = this; 5298 5299 $__default["default"](document).off(EVENT_FOCUSIN) // Guard against infinite focus loop 5300 .on(EVENT_FOCUSIN, function (event) { 5301 if (document !== event.target && _this5._element !== event.target && $__default["default"](_this5._element).has(event.target).length === 0) { 5302 _this5._element.focus(); 5303 } 5304 }); 5305 }; 5306 5307 _proto._setEscapeEvent = function _setEscapeEvent() { 5308 var _this6 = this; 5309 5310 if (this._isShown) { 5311 $__default["default"](this._element).on(EVENT_KEYDOWN_DISMISS, function (event) { 5312 if (_this6._config.keyboard && event.which === ESCAPE_KEYCODE) { 5313 event.preventDefault(); 5314 5315 _this6.hide(); 5316 } else if (!_this6._config.keyboard && event.which === ESCAPE_KEYCODE) { 5317 _this6._triggerBackdropTransition(); 5318 } 5319 }); 5320 } else if (!this._isShown) { 5321 $__default["default"](this._element).off(EVENT_KEYDOWN_DISMISS); 5322 } 5323 }; 5324 5325 _proto._setResizeEvent = function _setResizeEvent() { 5326 var _this7 = this; 5327 5328 if (this._isShown) { 5329 $__default["default"](window).on(EVENT_RESIZE, function (event) { 5330 return _this7.handleUpdate(event); 5331 }); 5332 } else { 5333 $__default["default"](window).off(EVENT_RESIZE); 5334 } 5335 }; 5336 5337 _proto._hideModal = function _hideModal() { 5338 var _this8 = this; 5339 5340 this._element.style.display = 'none'; 5341 5342 this._element.setAttribute('aria-hidden', true); 5343 5344 this._element.removeAttribute('aria-modal'); 5345 5346 this._element.removeAttribute('role'); 5347 5348 this._isTransitioning = false; 5349 5350 this._showBackdrop(function () { 5351 $__default["default"](document.body).removeClass(CLASS_NAME_OPEN); 5352 5353 _this8._resetAdjustments(); 5354 5355 _this8._resetScrollbar(); 5356 5357 $__default["default"](_this8._element).trigger(EVENT_HIDDEN$2); 5358 }); 5359 }; 5360 5361 _proto._removeBackdrop = function _removeBackdrop() { 5362 if (this._backdrop) { 5363 $__default["default"](this._backdrop).remove(); 5364 this._backdrop = null; 5365 } 5366 }; 5367 5368 _proto._showBackdrop = function _showBackdrop(callback) { 5369 var _this9 = this; 5370 5371 var animate = $__default["default"](this._element).hasClass(CLASS_NAME_FADE$4) ? CLASS_NAME_FADE$4 : ''; 5372 5373 if (this._isShown && this._config.backdrop) { 5374 this._backdrop = document.createElement('div'); 5375 this._backdrop.className = CLASS_NAME_BACKDROP; 5376 5377 if (animate) { 5378 this._backdrop.classList.add(animate); 5379 } 5380 5381 $__default["default"](this._backdrop).appendTo(document.body); 5382 $__default["default"](this._element).on(EVENT_CLICK_DISMISS$1, function (event) { 5383 if (_this9._ignoreBackdropClick) { 5384 _this9._ignoreBackdropClick = false; 5385 return; 5386 } 5387 5388 if (event.target !== event.currentTarget) { 5389 return; 5390 } 5391 5392 if (_this9._config.backdrop === 'static') { 5393 _this9._triggerBackdropTransition(); 5394 } else { 5395 _this9.hide(); 5396 } 5397 }); 5398 5399 if (animate) { 5400 Util.reflow(this._backdrop); 5401 } 5402 5403 $__default["default"](this._backdrop).addClass(CLASS_NAME_SHOW$4); 5404 5405 if (!callback) { 5406 return; 5407 } 5408 5409 if (!animate) { 5410 callback(); 5411 return; 5412 } 5413 5414 var backdropTransitionDuration = Util.getTransitionDurationFromElement(this._backdrop); 5415 $__default["default"](this._backdrop).one(Util.TRANSITION_END, callback).emulateTransitionEnd(backdropTransitionDuration); 5416 } else if (!this._isShown && this._backdrop) { 5417 $__default["default"](this._backdrop).removeClass(CLASS_NAME_SHOW$4); 5418 5419 var callbackRemove = function callbackRemove() { 5420 _this9._removeBackdrop(); 5421 5422 if (callback) { 5423 callback(); 5424 } 5425 }; 5426 5427 if ($__default["default"](this._element).hasClass(CLASS_NAME_FADE$4)) { 5428 var _backdropTransitionDuration = Util.getTransitionDurationFromElement(this._backdrop); 5429 5430 $__default["default"](this._backdrop).one(Util.TRANSITION_END, callbackRemove).emulateTransitionEnd(_backdropTransitionDuration); 5431 } else { 5432 callbackRemove(); 5433 } 5434 } else if (callback) { 5435 callback(); 5436 } 5437 } // ---------------------------------------------------------------------- 5438 // the following methods are used to handle overflowing modals 5439 // todo (fat): these should probably be refactored out of modal.js 5440 // ---------------------------------------------------------------------- 5441 ; 5442
vendor: 13,480 bytes, lines 5443-5848
5443 _proto._adjustDialog = function _adjustDialog() { 5444 var isModalOverflowing = this._element.scrollHeight > document.documentElement.clientHeight; 5445 5446 if (!this._isBodyOverflowing && isModalOverflowing) { 5447 this._element.style.paddingLeft = this._scrollbarWidth + "px"; 5448 } 5449 5450 if (this._isBodyOverflowing && !isModalOverflowing) { 5451 this._element.style.paddingRight = this._scrollbarWidth + "px"; 5452 } 5453 }; 5454 5455 _proto._resetAdjustments = function _resetAdjustments() { 5456 this._element.style.paddingLeft = ''; 5457 this._element.style.paddingRight = ''; 5458 }; 5459 5460 _proto._checkScrollbar = function _checkScrollbar() { 5461 var rect = document.body.getBoundingClientRect(); 5462 this._isBodyOverflowing = Math.round(rect.left + rect.right) < window.innerWidth; 5463 this._scrollbarWidth = this._getScrollbarWidth(); 5464 }; 5465 5466 _proto._setScrollbar = function _setScrollbar() { 5467 var _this10 = this; 5468 5469 if (this._isBodyOverflowing) { 5470 // Note: DOMNode.style.paddingRight returns the actual value or '' if not set 5471 // while $(DOMNode).css('padding-right') returns the calculated value or 0 if not set 5472 var fixedContent = [].slice.call(document.querySelectorAll(SELECTOR_FIXED_CONTENT)); 5473 var stickyContent = [].slice.call(document.querySelectorAll(SELECTOR_STICKY_CONTENT)); // Adjust fixed content padding 5474 5475 $__default["default"](fixedContent).each(function (index, element) { 5476 var actualPadding = element.style.paddingRight; 5477 var calculatedPadding = $__default["default"](element).css('padding-right'); 5478 $__default["default"](element).data('padding-right', actualPadding).css('padding-right', parseFloat(calculatedPadding) + _this10._scrollbarWidth + "px"); 5479 }); // Adjust sticky content margin 5480 5481 $__default["default"](stickyContent).each(function (index, element) { 5482 var actualMargin = element.style.marginRight; 5483 var calculatedMargin = $__default["default"](element).css('margin-right'); 5484 $__default["default"](element).data('margin-right', actualMargin).css('margin-right', parseFloat(calculatedMargin) - _this10._scrollbarWidth + "px"); 5485 }); // Adjust body padding 5486 5487 var actualPadding = document.body.style.paddingRight; 5488 var calculatedPadding = $__default["default"](document.body).css('padding-right'); 5489 $__default["default"](document.body).data('padding-right', actualPadding).css('padding-right', parseFloat(calculatedPadding) + this._scrollbarWidth + "px"); 5490 } 5491 5492 $__default["default"](document.body).addClass(CLASS_NAME_OPEN); 5493 }; 5494 5495 _proto._resetScrollbar = function _resetScrollbar() { 5496 // Restore fixed content padding 5497 var fixedContent = [].slice.call(document.querySelectorAll(SELECTOR_FIXED_CONTENT)); 5498 $__default["default"](fixedContent).each(function (index, element) { 5499 var padding = $__default["default"](element).data('padding-right'); 5500 $__default["default"](element).removeData('padding-right'); 5501 element.style.paddingRight = padding ? padding : ''; 5502 }); // Restore sticky content 5503 5504 var elements = [].slice.call(document.querySelectorAll("" + SELECTOR_STICKY_CONTENT)); 5505 $__default["default"](elements).each(function (index, element) { 5506 var margin = $__default["default"](element).data('margin-right'); 5507 5508 if (typeof margin !== 'undefined') { 5509 $__default["default"](element).css('margin-right', margin).removeData('margin-right'); 5510 } 5511 }); // Restore body padding 5512 5513 var padding = $__default["default"](document.body).data('padding-right'); 5514 $__default["default"](document.body).removeData('padding-right'); 5515 document.body.style.paddingRight = padding ? padding : ''; 5516 }; 5517 5518 _proto._getScrollbarWidth = function _getScrollbarWidth() { 5519 // thx d.walsh 5520 var scrollDiv = document.createElement('div'); 5521 scrollDiv.className = CLASS_NAME_SCROLLBAR_MEASURER; 5522 document.body.appendChild(scrollDiv); 5523 var scrollbarWidth = scrollDiv.getBoundingClientRect().width - scrollDiv.clientWidth; 5524 document.body.removeChild(scrollDiv); 5525 return scrollbarWidth; 5526 } // Static 5527 ; 5528 5529 Modal._jQueryInterface = function _jQueryInterface(config, relatedTarget) { 5530 return this.each(function () { 5531 var data = $__default["default"](this).data(DATA_KEY$5); 5532 5533 var _config = _extends$1({}, Default$4, $__default["default"](this).data(), typeof config === 'object' && config ? config : {}); 5534 5535 if (!data) { 5536 data = new Modal(this, _config); 5537 $__default["default"](this).data(DATA_KEY$5, data); 5538 } 5539 5540 if (typeof config === 'string') { 5541 if (typeof data[config] === 'undefined') { 5542 throw new TypeError("No method named \"" + config + "\""); 5543 } 5544 5545 data[config](relatedTarget); 5546 } else if (_config.show) { 5547 data.show(relatedTarget); 5548 } 5549 }); 5550 }; 5551 5552 _createClass(Modal, null, [{ 5553 key: "VERSION", 5554 get: function get() { 5555 return VERSION$5; 5556 } 5557 }, { 5558 key: "Default", 5559 get: function get() { 5560 return Default$4; 5561 } 5562 }]); 5563 5564 return Modal; 5565 }(); 5566 /** 5567 * Data API implementation 5568 */ 5569 5570 5571 $__default["default"](document).on(EVENT_CLICK_DATA_API$1, SELECTOR_DATA_TOGGLE$1, function (event) { 5572 var _this11 = this; 5573 5574 var target; 5575 var selector = Util.getSelectorFromElement(this); 5576 5577 if (selector) { 5578 target = document.querySelector(selector); 5579 } 5580 5581 var config = $__default["default"](target).data(DATA_KEY$5) ? 'toggle' : _extends$1({}, $__default["default"](target).data(), $__default["default"](this).data()); 5582 5583 if (this.tagName === 'A' || this.tagName === 'AREA') { 5584 event.preventDefault(); 5585 } 5586 5587 var $target = $__default["default"](target).one(EVENT_SHOW$2, function (showEvent) { 5588 if (showEvent.isDefaultPrevented()) { 5589 // Only register focus restorer if modal will actually get shown 5590 return; 5591 } 5592 5593 $target.one(EVENT_HIDDEN$2, function () { 5594 if ($__default["default"](_this11).is(':visible')) { 5595 _this11.focus(); 5596 } 5597 }); 5598 }); 5599 5600 Modal._jQueryInterface.call($__default["default"](target), config, this); 5601 }); 5602 /** 5603 * jQuery 5604 */ 5605 5606 $__default["default"].fn[NAME$5] = Modal._jQueryInterface; 5607 $__default["default"].fn[NAME$5].Constructor = Modal; 5608 5609 $__default["default"].fn[NAME$5].noConflict = function () { 5610 $__default["default"].fn[NAME$5] = JQUERY_NO_CONFLICT$5; 5611 return Modal._jQueryInterface; 5612 }; 5613 5614 /** 5615 * -------------------------------------------------------------------------- 5616 * Bootstrap (v4.6.2): tools/sanitizer.js 5617 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) 5618 * -------------------------------------------------------------------------- 5619 */ 5620 var uriAttrs = ['background', 'cite', 'href', 'itemtype', 'longdesc', 'poster', 'src', 'xlink:href']; 5621 var ARIA_ATTRIBUTE_PATTERN = /^aria-[\w-]*$/i; 5622 var DefaultWhitelist = { 5623 // Global attributes allowed on any supplied element below. 5624 '*': ['class', 'dir', 'id', 'lang', 'role', ARIA_ATTRIBUTE_PATTERN], 5625 a: ['target', 'href', 'title', 'rel'], 5626 area: [], 5627 b: [], 5628 br: [], 5629 col: [], 5630 code: [], 5631 div: [], 5632 em: [], 5633 hr: [], 5634 h1: [], 5635 h2: [], 5636 h3: [], 5637 h4: [], 5638 h5: [], 5639 h6: [], 5640 i: [], 5641 img: ['src', 'srcset', 'alt', 'title', 'width', 'height'], 5642 li: [], 5643 ol: [], 5644 p: [], 5645 pre: [], 5646 s: [], 5647 small: [], 5648 span: [], 5649 sub: [], 5650 sup: [], 5651 strong: [], 5652 u: [], 5653 ul: [] 5654 }; 5655 /** 5656 * A pattern that recognizes a commonly useful subset of URLs that are safe. 5657 * 5658 * Shoutout to Angular https://github.com/angular/angular/blob/12.2.x/packages/core/src/sanitization/url_sanitizer.ts 5659 */ 5660 5661 var SAFE_URL_PATTERN = /^(?:(?:https?|mailto|ftp|tel|file|sms):|[^#&/:?]*(?:[#/?]|$))/i; 5662 /** 5663 * A pattern that matches safe data URLs. Only matches image, video and audio types. 5664 * 5665 * Shoutout to Angular https://github.com/angular/angular/blob/12.2.x/packages/core/src/sanitization/url_sanitizer.ts 5666 */ 5667 5668 var DATA_URL_PATTERN = /^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[\d+/a-z]+=*$/i; 5669 5670 function allowedAttribute(attr, allowedAttributeList) { 5671 var attrName = attr.nodeName.toLowerCase(); 5672 5673 if (allowedAttributeList.indexOf(attrName) !== -1) { 5674 if (uriAttrs.indexOf(attrName) !== -1) { 5675 return Boolean(SAFE_URL_PATTERN.test(attr.nodeValue) || DATA_URL_PATTERN.test(attr.nodeValue)); 5676 } 5677 5678 return true; 5679 } 5680 5681 var regExp = allowedAttributeList.filter(function (attrRegex) { 5682 return attrRegex instanceof RegExp; 5683 }); // Check if a regular expression validates the attribute. 5684 5685 for (var i = 0, len = regExp.length; i < len; i++) { 5686 if (regExp[i].test(attrName)) { 5687 return true; 5688 } 5689 } 5690 5691 return false; 5692 } 5693 5694 function sanitizeHtml(unsafeHtml, whiteList, sanitizeFn) { 5695 if (unsafeHtml.length === 0) { 5696 return unsafeHtml; 5697 } 5698 5699 if (sanitizeFn && typeof sanitizeFn === 'function') { 5700 return sanitizeFn(unsafeHtml); 5701 } 5702 5703 var domParser = new window.DOMParser(); 5704 var createdDocument = domParser.parseFromString(unsafeHtml, 'text/html'); 5705 var whitelistKeys = Object.keys(whiteList); 5706 var elements = [].slice.call(createdDocument.body.querySelectorAll('*')); 5707 5708 var _loop = function _loop(i, len) { 5709 var el = elements[i]; 5710 var elName = el.nodeName.toLowerCase(); 5711 5712 if (whitelistKeys.indexOf(el.nodeName.toLowerCase()) === -1) { 5713 el.parentNode.removeChild(el); 5714 return "continue"; 5715 } 5716 5717 var attributeList = [].slice.call(el.attributes); // eslint-disable-next-line unicorn/prefer-spread 5718 5719 var whitelistedAttributes = [].concat(whiteList['*'] || [], whiteList[elName] || []); 5720 attributeList.forEach(function (attr) { 5721 if (!allowedAttribute(attr, whitelistedAttributes)) { 5722 el.removeAttribute(attr.nodeName); 5723 } 5724 }); 5725 }; 5726 5727 for (var i = 0, len = elements.length; i < len; i++) { 5728 var _ret = _loop(i); 5729 5730 if (_ret === "continue") continue; 5731 } 5732 5733 return createdDocument.body.innerHTML; 5734 } 5735 5736 /** 5737 * Constants 5738 */ 5739 5740 var NAME$4 = 'tooltip'; 5741 var VERSION$4 = '4.6.2'; 5742 var DATA_KEY$4 = 'bs.tooltip'; 5743 var EVENT_KEY$4 = "." + DATA_KEY$4; 5744 var JQUERY_NO_CONFLICT$4 = $__default["default"].fn[NAME$4]; 5745 var CLASS_PREFIX$1 = 'bs-tooltip'; 5746 var BSCLS_PREFIX_REGEX$1 = new RegExp("(^|\\s)" + CLASS_PREFIX$1 + "\\S+", 'g'); 5747 var DISALLOWED_ATTRIBUTES = ['sanitize', 'whiteList', 'sanitizeFn']; 5748 var CLASS_NAME_FADE$3 = 'fade'; 5749 var CLASS_NAME_SHOW$3 = 'show'; 5750 var HOVER_STATE_SHOW = 'show'; 5751 var HOVER_STATE_OUT = 'out'; 5752 var SELECTOR_TOOLTIP_INNER = '.tooltip-inner'; 5753 var SELECTOR_ARROW = '.arrow'; 5754 var TRIGGER_HOVER = 'hover'; 5755 var TRIGGER_FOCUS = 'focus'; 5756 var TRIGGER_CLICK = 'click'; 5757 var TRIGGER_MANUAL = 'manual'; 5758 var AttachmentMap = { 5759 AUTO: 'auto', 5760 TOP: 'top', 5761 RIGHT: 'right', 5762 BOTTOM: 'bottom', 5763 LEFT: 'left' 5764 }; 5765 var Default$3 = { 5766 animation: true, 5767 template: '<div class="tooltip" role="tooltip">' + '<div class="arrow"></div>' + '<div class="tooltip-inner"></div></div>', 5768 trigger: 'hover focus', 5769 title: '', 5770 delay: 0, 5771 html: false, 5772 selector: false, 5773 placement: 'top', 5774 offset: 0, 5775 container: false, 5776 fallbackPlacement: 'flip', 5777 boundary: 'scrollParent', 5778 customClass: '', 5779 sanitize: true, 5780 sanitizeFn: null, 5781 whiteList: DefaultWhitelist, 5782 popperConfig: null 5783 }; 5784 var DefaultType$3 = { 5785 animation: 'boolean', 5786 template: 'string', 5787 title: '(string|element|function)', 5788 trigger: 'string', 5789 delay: '(number|object)', 5790 html: 'boolean', 5791 selector: '(string|boolean)', 5792 placement: '(string|function)', 5793 offset: '(number|string|function)', 5794 container: '(string|element|boolean)', 5795 fallbackPlacement: '(string|array)', 5796 boundary: '(string|element)', 5797 customClass: '(string|function)', 5798 sanitize: 'boolean', 5799 sanitizeFn: '(null|function)', 5800 whiteList: 'object', 5801 popperConfig: '(null|object)' 5802 }; 5803 var Event$1 = { 5804 HIDE: "hide" + EVENT_KEY$4, 5805 HIDDEN: "hidden" + EVENT_KEY$4, 5806 SHOW: "show" + EVENT_KEY$4, 5807 SHOWN: "shown" + EVENT_KEY$4, 5808 INSERTED: "inserted" + EVENT_KEY$4, 5809 CLICK: "click" + EVENT_KEY$4, 5810 FOCUSIN: "focusin" + EVENT_KEY$4, 5811 FOCUSOUT: "focusout" + EVENT_KEY$4, 5812 MOUSEENTER: "mouseenter" + EVENT_KEY$4, 5813 MOUSELEAVE: "mouseleave" + EVENT_KEY$4 5814 }; 5815 /** 5816 * Class definition 5817 */ 5818 5819 var Tooltip = /*#__PURE__*/function () { 5820 function Tooltip(element, config) { 5821 if (typeof Popper$1 === 'undefined') { 5822 throw new TypeError('Bootstrap\'s tooltips require Popper (https://popper.js.org)'); 5823 } // Private 5824 5825 5826 this._isEnabled = true; 5827 this._timeout = 0; 5828 this._hoverState = ''; 5829 this._activeTrigger = {}; 5830 this._popper = null; // Protected 5831 5832 this.element = element; 5833 this.config = this._getConfig(config); 5834 this.tip = null; 5835 5836 this._setListeners(); 5837 } // Getters 5838 5839 5840 var _proto = Tooltip.prototype; 5841 5842 // Public 5843 _proto.enable = function enable() { 5844 this._isEnabled = true; 5845 }; 5846 5847 _proto.disable = function disable() { 5848 this._isEnabled = false;
vendor: 2,532 bytes, lines 5849-5931
5849 }; 5850 5851 _proto.toggleEnabled = function toggleEnabled() { 5852 this._isEnabled = !this._isEnabled; 5853 }; 5854 5855 _proto.toggle = function toggle(event) { 5856 if (!this._isEnabled) { 5857 return; 5858 } 5859 5860 if (event) { 5861 var dataKey = this.constructor.DATA_KEY; 5862 var context = $__default["default"](event.currentTarget).data(dataKey); 5863 5864 if (!context) { 5865 context = new this.constructor(event.currentTarget, this._getDelegateConfig()); 5866 $__default["default"](event.currentTarget).data(dataKey, context); 5867 } 5868 5869 context._activeTrigger.click = !context._activeTrigger.click; 5870 5871 if (context._isWithActiveTrigger()) { 5872 context._enter(null, context); 5873 } else { 5874 context._leave(null, context); 5875 } 5876 } else { 5877 if ($__default["default"](this.getTipElement()).hasClass(CLASS_NAME_SHOW$3)) { 5878 this._leave(null, this); 5879 5880 return; 5881 } 5882 5883 this._enter(null, this); 5884 } 5885 }; 5886 5887 _proto.dispose = function dispose() { 5888 clearTimeout(this._timeout); 5889 $__default["default"].removeData(this.element, this.constructor.DATA_KEY); 5890 $__default["default"](this.element).off(this.constructor.EVENT_KEY); 5891 $__default["default"](this.element).closest('.modal').off('hide.bs.modal', this._hideModalHandler); 5892 5893 if (this.tip) { 5894 $__default["default"](this.tip).remove(); 5895 } 5896 5897 this._isEnabled = null; 5898 this._timeout = null; 5899 this._hoverState = null; 5900 this._activeTrigger = null; 5901 5902 if (this._popper) { 5903 this._popper.destroy(); 5904 } 5905 5906 this._popper = null; 5907 this.element = null; 5908 this.config = null; 5909 this.tip = null; 5910 }; 5911 5912 _proto.show = function show() { 5913 var _this = this; 5914 5915 if ($__default["default"](this.element).css('display') === 'none') { 5916 throw new Error('Please use show on visible elements'); 5917 } 5918 5919 var showEvent = $__default["default"].Event(this.constructor.Event.SHOW); 5920 5921 if (this.isWithContent() && this._isEnabled) { 5922 $__default["default"](this.element).trigger(showEvent); 5923 var shadowRoot = Util.findShadowRoot(this.element); 5924 var isInTheDom = $__default["default"].contains(shadowRoot !== null ? shadowRoot : this.element.ownerDocument.documentElement, this.element); 5925 5926 if (showEvent.isDefaultPrevented() || !isInTheDom) { 5927 return; 5928 } 5929 5930 var tip = this.getTipElement(); 5931 var tipId = Util.getUID(this.constructor.NAME);
vendor: 19,358 bytes, lines 5932-6558
5932 tip.setAttribute('id', tipId); 5933 this.element.setAttribute('aria-describedby', tipId); 5934 this.setContent(); 5935 5936 if (this.config.animation) { 5937 $__default["default"](tip).addClass(CLASS_NAME_FADE$3); 5938 } 5939 5940 var placement = typeof this.config.placement === 'function' ? this.config.placement.call(this, tip, this.element) : this.config.placement; 5941 5942 var attachment = this._getAttachment(placement); 5943 5944 this.addAttachmentClass(attachment); 5945 5946 var container = this._getContainer(); 5947 5948 $__default["default"](tip).data(this.constructor.DATA_KEY, this); 5949 5950 if (!$__default["default"].contains(this.element.ownerDocument.documentElement, this.tip)) { 5951 $__default["default"](tip).appendTo(container); 5952 } 5953 5954 $__default["default"](this.element).trigger(this.constructor.Event.INSERTED); 5955 this._popper = new Popper$1(this.element, tip, this._getPopperConfig(attachment)); 5956 $__default["default"](tip).addClass(CLASS_NAME_SHOW$3); 5957 $__default["default"](tip).addClass(this.config.customClass); // If this is a touch-enabled device we add extra 5958 // empty mouseover listeners to the body's immediate children; 5959 // only needed because of broken event delegation on iOS 5960 // https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html 5961 5962 if ('ontouchstart' in document.documentElement) { 5963 $__default["default"](document.body).children().on('mouseover', null, $__default["default"].noop); 5964 } 5965 5966 var complete = function complete() { 5967 if (_this.config.animation) { 5968 _this._fixTransition(); 5969 } 5970 5971 var prevHoverState = _this._hoverState; 5972 _this._hoverState = null; 5973 $__default["default"](_this.element).trigger(_this.constructor.Event.SHOWN); 5974 5975 if (prevHoverState === HOVER_STATE_OUT) { 5976 _this._leave(null, _this); 5977 } 5978 }; 5979 5980 if ($__default["default"](this.tip).hasClass(CLASS_NAME_FADE$3)) { 5981 var transitionDuration = Util.getTransitionDurationFromElement(this.tip); 5982 $__default["default"](this.tip).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration); 5983 } else { 5984 complete(); 5985 } 5986 } 5987 }; 5988 5989 _proto.hide = function hide(callback) { 5990 var _this2 = this; 5991 5992 var tip = this.getTipElement(); 5993 var hideEvent = $__default["default"].Event(this.constructor.Event.HIDE); 5994 5995 var complete = function complete() { 5996 if (_this2._hoverState !== HOVER_STATE_SHOW && tip.parentNode) { 5997 tip.parentNode.removeChild(tip); 5998 } 5999 6000 _this2._cleanTipClass(); 6001 6002 _this2.element.removeAttribute('aria-describedby'); 6003 6004 $__default["default"](_this2.element).trigger(_this2.constructor.Event.HIDDEN); 6005 6006 if (_this2._popper !== null) { 6007 _this2._popper.destroy(); 6008 } 6009 6010 if (callback) { 6011 callback(); 6012 } 6013 }; 6014 6015 $__default["default"](this.element).trigger(hideEvent); 6016 6017 if (hideEvent.isDefaultPrevented()) { 6018 return; 6019 } 6020 6021 $__default["default"](tip).removeClass(CLASS_NAME_SHOW$3); // If this is a touch-enabled device we remove the extra 6022 // empty mouseover listeners we added for iOS support 6023 6024 if ('ontouchstart' in document.documentElement) { 6025 $__default["default"](document.body).children().off('mouseover', null, $__default["default"].noop); 6026 } 6027 6028 this._activeTrigger[TRIGGER_CLICK] = false; 6029 this._activeTrigger[TRIGGER_FOCUS] = false; 6030 this._activeTrigger[TRIGGER_HOVER] = false; 6031 6032 if ($__default["default"](this.tip).hasClass(CLASS_NAME_FADE$3)) { 6033 var transitionDuration = Util.getTransitionDurationFromElement(tip); 6034 $__default["default"](tip).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration); 6035 } else { 6036 complete(); 6037 } 6038 6039 this._hoverState = ''; 6040 }; 6041 6042 _proto.update = function update() { 6043 if (this._popper !== null) { 6044 this._popper.scheduleUpdate(); 6045 } 6046 } // Protected 6047 ; 6048 6049 _proto.isWithContent = function isWithContent() { 6050 return Boolean(this.getTitle()); 6051 }; 6052 6053 _proto.addAttachmentClass = function addAttachmentClass(attachment) { 6054 $__default["default"](this.getTipElement()).addClass(CLASS_PREFIX$1 + "-" + attachment); 6055 }; 6056 6057 _proto.getTipElement = function getTipElement() { 6058 this.tip = this.tip || $__default["default"](this.config.template)[0]; 6059 return this.tip; 6060 }; 6061 6062 _proto.setContent = function setContent() { 6063 var tip = this.getTipElement(); 6064 this.setElementContent($__default["default"](tip.querySelectorAll(SELECTOR_TOOLTIP_INNER)), this.getTitle()); 6065 $__default["default"](tip).removeClass(CLASS_NAME_FADE$3 + " " + CLASS_NAME_SHOW$3); 6066 }; 6067 6068 _proto.setElementContent = function setElementContent($element, content) { 6069 if (typeof content === 'object' && (content.nodeType || content.jquery)) { 6070 // Content is a DOM node or a jQuery 6071 if (this.config.html) { 6072 if (!$__default["default"](content).parent().is($element)) { 6073 $element.empty().append(content); 6074 } 6075 } else { 6076 $element.text($__default["default"](content).text()); 6077 } 6078 6079 return; 6080 } 6081 6082 if (this.config.html) { 6083 if (this.config.sanitize) { 6084 content = sanitizeHtml(content, this.config.whiteList, this.config.sanitizeFn); 6085 } 6086 6087 $element.html(content); 6088 } else { 6089 $element.text(content); 6090 } 6091 }; 6092 6093 _proto.getTitle = function getTitle() { 6094 var title = this.element.getAttribute('data-original-title'); 6095 6096 if (!title) { 6097 title = typeof this.config.title === 'function' ? this.config.title.call(this.element) : this.config.title; 6098 } 6099 6100 return title; 6101 } // Private 6102 ; 6103 6104 _proto._getPopperConfig = function _getPopperConfig(attachment) { 6105 var _this3 = this; 6106 6107 var defaultBsConfig = { 6108 placement: attachment, 6109 modifiers: { 6110 offset: this._getOffset(), 6111 flip: { 6112 behavior: this.config.fallbackPlacement 6113 }, 6114 arrow: { 6115 element: SELECTOR_ARROW 6116 }, 6117 preventOverflow: { 6118 boundariesElement: this.config.boundary 6119 } 6120 }, 6121 onCreate: function onCreate(data) { 6122 if (data.originalPlacement !== data.placement) { 6123 _this3._handlePopperPlacementChange(data); 6124 } 6125 }, 6126 onUpdate: function onUpdate(data) { 6127 return _this3._handlePopperPlacementChange(data); 6128 } 6129 }; 6130 return _extends$1({}, defaultBsConfig, this.config.popperConfig); 6131 }; 6132 6133 _proto._getOffset = function _getOffset() { 6134 var _this4 = this; 6135 6136 var offset = {}; 6137 6138 if (typeof this.config.offset === 'function') { 6139 offset.fn = function (data) { 6140 data.offsets = _extends$1({}, data.offsets, _this4.config.offset(data.offsets, _this4.element)); 6141 return data; 6142 }; 6143 } else { 6144 offset.offset = this.config.offset; 6145 } 6146 6147 return offset; 6148 }; 6149 6150 _proto._getContainer = function _getContainer() { 6151 if (this.config.container === false) { 6152 return document.body; 6153 } 6154 6155 if (Util.isElement(this.config.container)) { 6156 return $__default["default"](this.config.container); 6157 } 6158 6159 return $__default["default"](document).find(this.config.container); 6160 }; 6161 6162 _proto._getAttachment = function _getAttachment(placement) { 6163 return AttachmentMap[placement.toUpperCase()]; 6164 }; 6165 6166 _proto._setListeners = function _setListeners() { 6167 var _this5 = this; 6168 6169 var triggers = this.config.trigger.split(' '); 6170 triggers.forEach(function (trigger) { 6171 if (trigger === 'click') { 6172 $__default["default"](_this5.element).on(_this5.constructor.Event.CLICK, _this5.config.selector, function (event) { 6173 return _this5.toggle(event); 6174 }); 6175 } else if (trigger !== TRIGGER_MANUAL) { 6176 var eventIn = trigger === TRIGGER_HOVER ? _this5.constructor.Event.MOUSEENTER : _this5.constructor.Event.FOCUSIN; 6177 var eventOut = trigger === TRIGGER_HOVER ? _this5.constructor.Event.MOUSELEAVE : _this5.constructor.Event.FOCUSOUT; 6178 $__default["default"](_this5.element).on(eventIn, _this5.config.selector, function (event) { 6179 return _this5._enter(event); 6180 }).on(eventOut, _this5.config.selector, function (event) { 6181 return _this5._leave(event); 6182 }); 6183 } 6184 }); 6185 6186 this._hideModalHandler = function () { 6187 if (_this5.element) { 6188 _this5.hide(); 6189 } 6190 }; 6191 6192 $__default["default"](this.element).closest('.modal').on('hide.bs.modal', this._hideModalHandler); 6193 6194 if (this.config.selector) { 6195 this.config = _extends$1({}, this.config, { 6196 trigger: 'manual', 6197 selector: '' 6198 }); 6199 } else { 6200 this._fixTitle(); 6201 } 6202 }; 6203 6204 _proto._fixTitle = function _fixTitle() { 6205 var titleType = typeof this.element.getAttribute('data-original-title'); 6206 6207 if (this.element.getAttribute('title') || titleType !== 'string') { 6208 this.element.setAttribute('data-original-title', this.element.getAttribute('title') || ''); 6209 this.element.setAttribute('title', ''); 6210 } 6211 }; 6212 6213 _proto._enter = function _enter(event, context) { 6214 var dataKey = this.constructor.DATA_KEY; 6215 context = context || $__default["default"](event.currentTarget).data(dataKey); 6216 6217 if (!context) { 6218 context = new this.constructor(event.currentTarget, this._getDelegateConfig()); 6219 $__default["default"](event.currentTarget).data(dataKey, context); 6220 } 6221 6222 if (event) { 6223 context._activeTrigger[event.type === 'focusin' ? TRIGGER_FOCUS : TRIGGER_HOVER] = true; 6224 } 6225 6226 if ($__default["default"](context.getTipElement()).hasClass(CLASS_NAME_SHOW$3) || context._hoverState === HOVER_STATE_SHOW) { 6227 context._hoverState = HOVER_STATE_SHOW; 6228 return; 6229 } 6230 6231 clearTimeout(context._timeout); 6232 context._hoverState = HOVER_STATE_SHOW; 6233 6234 if (!context.config.delay || !context.config.delay.show) { 6235 context.show(); 6236 return; 6237 } 6238 6239 context._timeout = setTimeout(function () { 6240 if (context._hoverState === HOVER_STATE_SHOW) { 6241 context.show(); 6242 } 6243 }, context.config.delay.show); 6244 }; 6245 6246 _proto._leave = function _leave(event, context) { 6247 var dataKey = this.constructor.DATA_KEY; 6248 context = context || $__default["default"](event.currentTarget).data(dataKey); 6249 6250 if (!context) { 6251 context = new this.constructor(event.currentTarget, this._getDelegateConfig()); 6252 $__default["default"](event.currentTarget).data(dataKey, context); 6253 } 6254 6255 if (event) { 6256 context._activeTrigger[event.type === 'focusout' ? TRIGGER_FOCUS : TRIGGER_HOVER] = false; 6257 } 6258 6259 if (context._isWithActiveTrigger()) { 6260 return; 6261 } 6262 6263 clearTimeout(context._timeout); 6264 context._hoverState = HOVER_STATE_OUT; 6265 6266 if (!context.config.delay || !context.config.delay.hide) { 6267 context.hide(); 6268 return; 6269 } 6270 6271 context._timeout = setTimeout(function () { 6272 if (context._hoverState === HOVER_STATE_OUT) { 6273 context.hide(); 6274 } 6275 }, context.config.delay.hide); 6276 }; 6277 6278 _proto._isWithActiveTrigger = function _isWithActiveTrigger() { 6279 for (var trigger in this._activeTrigger) { 6280 if (this._activeTrigger[trigger]) { 6281 return true; 6282 } 6283 } 6284 6285 return false; 6286 }; 6287 6288 _proto._getConfig = function _getConfig(config) { 6289 var dataAttributes = $__default["default"](this.element).data(); 6290 Object.keys(dataAttributes).forEach(function (dataAttr) { 6291 if (DISALLOWED_ATTRIBUTES.indexOf(dataAttr) !== -1) { 6292 delete dataAttributes[dataAttr]; 6293 } 6294 }); 6295 config = _extends$1({}, this.constructor.Default, dataAttributes, typeof config === 'object' && config ? config : {}); 6296 6297 if (typeof config.delay === 'number') { 6298 config.delay = { 6299 show: config.delay, 6300 hide: config.delay 6301 }; 6302 } 6303 6304 if (typeof config.title === 'number') { 6305 config.title = config.title.toString(); 6306 } 6307 6308 if (typeof config.content === 'number') { 6309 config.content = config.content.toString(); 6310 } 6311 6312 Util.typeCheckConfig(NAME$4, config, this.constructor.DefaultType); 6313 6314 if (config.sanitize) { 6315 config.template = sanitizeHtml(config.template, config.whiteList, config.sanitizeFn); 6316 } 6317 6318 return config; 6319 }; 6320 6321 _proto._getDelegateConfig = function _getDelegateConfig() { 6322 var config = {}; 6323 6324 if (this.config) { 6325 for (var key in this.config) { 6326 if (this.constructor.Default[key] !== this.config[key]) { 6327 config[key] = this.config[key]; 6328 } 6329 } 6330 } 6331 6332 return config; 6333 }; 6334 6335 _proto._cleanTipClass = function _cleanTipClass() { 6336 var $tip = $__default["default"](this.getTipElement()); 6337 var tabClass = $tip.attr('class').match(BSCLS_PREFIX_REGEX$1); 6338 6339 if (tabClass !== null && tabClass.length) { 6340 $tip.removeClass(tabClass.join('')); 6341 } 6342 }; 6343 6344 _proto._handlePopperPlacementChange = function _handlePopperPlacementChange(popperData) { 6345 this.tip = popperData.instance.popper; 6346 6347 this._cleanTipClass(); 6348 6349 this.addAttachmentClass(this._getAttachment(popperData.placement)); 6350 }; 6351 6352 _proto._fixTransition = function _fixTransition() { 6353 var tip = this.getTipElement(); 6354 var initConfigAnimation = this.config.animation; 6355 6356 if (tip.getAttribute('x-placement') !== null) { 6357 return; 6358 } 6359 6360 $__default["default"](tip).removeClass(CLASS_NAME_FADE$3); 6361 this.config.animation = false; 6362 this.hide(); 6363 this.show(); 6364 this.config.animation = initConfigAnimation; 6365 } // Static 6366 ; 6367 6368 Tooltip._jQueryInterface = function _jQueryInterface(config) { 6369 return this.each(function () { 6370 var $element = $__default["default"](this); 6371 var data = $element.data(DATA_KEY$4); 6372 6373 var _config = typeof config === 'object' && config; 6374 6375 if (!data && /dispose|hide/.test(config)) { 6376 return; 6377 } 6378 6379 if (!data) { 6380 data = new Tooltip(this, _config); 6381 $element.data(DATA_KEY$4, data); 6382 } 6383 6384 if (typeof config === 'string') { 6385 if (typeof data[config] === 'undefined') { 6386 throw new TypeError("No method named \"" + config + "\""); 6387 } 6388 6389 data[config](); 6390 } 6391 }); 6392 }; 6393 6394 _createClass(Tooltip, null, [{ 6395 key: "VERSION", 6396 get: function get() { 6397 return VERSION$4; 6398 } 6399 }, { 6400 key: "Default", 6401 get: function get() { 6402 return Default$3; 6403 } 6404 }, { 6405 key: "NAME", 6406 get: function get() { 6407 return NAME$4; 6408 } 6409 }, { 6410 key: "DATA_KEY", 6411 get: function get() { 6412 return DATA_KEY$4; 6413 } 6414 }, { 6415 key: "Event", 6416 get: function get() { 6417 return Event$1; 6418 } 6419 }, { 6420 key: "EVENT_KEY", 6421 get: function get() { 6422 return EVENT_KEY$4; 6423 } 6424 }, { 6425 key: "DefaultType", 6426 get: function get() { 6427 return DefaultType$3; 6428 } 6429 }]); 6430 6431 return Tooltip; 6432 }(); 6433 /** 6434 * jQuery 6435 */ 6436 6437 6438 $__default["default"].fn[NAME$4] = Tooltip._jQueryInterface; 6439 $__default["default"].fn[NAME$4].Constructor = Tooltip; 6440 6441 $__default["default"].fn[NAME$4].noConflict = function () { 6442 $__default["default"].fn[NAME$4] = JQUERY_NO_CONFLICT$4; 6443 return Tooltip._jQueryInterface; 6444 }; 6445 6446 /** 6447 * Constants 6448 */ 6449 6450 var NAME$3 = 'popover'; 6451 var VERSION$3 = '4.6.2'; 6452 var DATA_KEY$3 = 'bs.popover'; 6453 var EVENT_KEY$3 = "." + DATA_KEY$3; 6454 var JQUERY_NO_CONFLICT$3 = $__default["default"].fn[NAME$3]; 6455 var CLASS_PREFIX = 'bs-popover'; 6456 var BSCLS_PREFIX_REGEX = new RegExp("(^|\\s)" + CLASS_PREFIX + "\\S+", 'g'); 6457 var CLASS_NAME_FADE$2 = 'fade'; 6458 var CLASS_NAME_SHOW$2 = 'show'; 6459 var SELECTOR_TITLE = '.popover-header'; 6460 var SELECTOR_CONTENT = '.popover-body'; 6461 6462 var Default$2 = _extends$1({}, Tooltip.Default, { 6463 placement: 'right', 6464 trigger: 'click', 6465 content: '', 6466 template: '<div class="popover" role="tooltip">' + '<div class="arrow"></div>' + '<h3 class="popover-header"></h3>' + '<div class="popover-body"></div></div>' 6467 }); 6468 6469 var DefaultType$2 = _extends$1({}, Tooltip.DefaultType, { 6470 content: '(string|element|function)' 6471 }); 6472 6473 var Event = { 6474 HIDE: "hide" + EVENT_KEY$3, 6475 HIDDEN: "hidden" + EVENT_KEY$3, 6476 SHOW: "show" + EVENT_KEY$3, 6477 SHOWN: "shown" + EVENT_KEY$3, 6478 INSERTED: "inserted" + EVENT_KEY$3, 6479 CLICK: "click" + EVENT_KEY$3, 6480 FOCUSIN: "focusin" + EVENT_KEY$3, 6481 FOCUSOUT: "focusout" + EVENT_KEY$3, 6482 MOUSEENTER: "mouseenter" + EVENT_KEY$3, 6483 MOUSELEAVE: "mouseleave" + EVENT_KEY$3 6484 }; 6485 /** 6486 * Class definition 6487 */ 6488 6489 var Popover = /*#__PURE__*/function (_Tooltip) { 6490 _inheritsLoose(Popover, _Tooltip); 6491 6492 function Popover() { 6493 return _Tooltip.apply(this, arguments) || this; 6494 } 6495 6496 var _proto = Popover.prototype; 6497 6498 // Overrides 6499 _proto.isWithContent = function isWithContent() { 6500 return this.getTitle() || this._getContent(); 6501 }; 6502 6503 _proto.addAttachmentClass = function addAttachmentClass(attachment) { 6504 $__default["default"](this.getTipElement()).addClass(CLASS_PREFIX + "-" + attachment); 6505 }; 6506 6507 _proto.getTipElement = function getTipElement() { 6508 this.tip = this.tip || $__default["default"](this.config.template)[0]; 6509 return this.tip; 6510 }; 6511 6512 _proto.setContent = function setContent() { 6513 var $tip = $__default["default"](this.getTipElement()); // We use append for html objects to maintain js events 6514 6515 this.setElementContent($tip.find(SELECTOR_TITLE), this.getTitle()); 6516 6517 var content = this._getContent(); 6518 6519 if (typeof content === 'function') { 6520 content = content.call(this.element); 6521 } 6522 6523 this.setElementContent($tip.find(SELECTOR_CONTENT), content); 6524 $tip.removeClass(CLASS_NAME_FADE$2 + " " + CLASS_NAME_SHOW$2); 6525 } // Private 6526 ; 6527 6528 _proto._getContent = function _getContent() { 6529 return this.element.getAttribute('data-content') || this.config.content; 6530 }; 6531 6532 _proto._cleanTipClass = function _cleanTipClass() { 6533 var $tip = $__default["default"](this.getTipElement()); 6534 var tabClass = $tip.attr('class').match(BSCLS_PREFIX_REGEX); 6535 6536 if (tabClass !== null && tabClass.length > 0) { 6537 $tip.removeClass(tabClass.join('')); 6538 } 6539 } // Static 6540 ; 6541 6542 Popover._jQueryInterface = function _jQueryInterface(config) { 6543 return this.each(function () { 6544 var data = $__default["default"](this).data(DATA_KEY$3); 6545 6546 var _config = typeof config === 'object' ? config : null; 6547 6548 if (!data && /dispose|hide/.test(config)) { 6549 return; 6550 } 6551 6552 if (!data) { 6553 data = new Popover(this, _config); 6554 $__default["default"](this).data(DATA_KEY$3, data); 6555 } 6556 6557 if (typeof config === 'string') { 6558 if (typeof data[config] === 'undefined') {
vendor: 4,302 bytes, lines 6559-6711
6559 throw new TypeError("No method named \"" + config + "\""); 6560 } 6561 6562 data[config](); 6563 } 6564 }); 6565 }; 6566 6567 _createClass(Popover, null, [{ 6568 key: "VERSION", 6569 get: // Getters 6570 function get() { 6571 return VERSION$3; 6572 } 6573 }, { 6574 key: "Default", 6575 get: function get() { 6576 return Default$2; 6577 } 6578 }, { 6579 key: "NAME", 6580 get: function get() { 6581 return NAME$3; 6582 } 6583 }, { 6584 key: "DATA_KEY", 6585 get: function get() { 6586 return DATA_KEY$3; 6587 } 6588 }, { 6589 key: "Event", 6590 get: function get() { 6591 return Event; 6592 } 6593 }, { 6594 key: "EVENT_KEY", 6595 get: function get() { 6596 return EVENT_KEY$3; 6597 } 6598 }, { 6599 key: "DefaultType", 6600 get: function get() { 6601 return DefaultType$2; 6602 } 6603 }]); 6604 6605 return Popover; 6606 }(Tooltip); 6607 /** 6608 * jQuery 6609 */ 6610 6611 6612 $__default["default"].fn[NAME$3] = Popover._jQueryInterface; 6613 $__default["default"].fn[NAME$3].Constructor = Popover; 6614 6615 $__default["default"].fn[NAME$3].noConflict = function () { 6616 $__default["default"].fn[NAME$3] = JQUERY_NO_CONFLICT$3; 6617 return Popover._jQueryInterface; 6618 }; 6619 6620 /** 6621 * Constants 6622 */ 6623 6624 var NAME$2 = 'scrollspy'; 6625 var VERSION$2 = '4.6.2'; 6626 var DATA_KEY$2 = 'bs.scrollspy'; 6627 var EVENT_KEY$2 = "." + DATA_KEY$2; 6628 var DATA_API_KEY$1 = '.data-api'; 6629 var JQUERY_NO_CONFLICT$2 = $__default["default"].fn[NAME$2]; 6630 var CLASS_NAME_DROPDOWN_ITEM = 'dropdown-item'; 6631 var CLASS_NAME_ACTIVE$1 = 'active'; 6632 var EVENT_ACTIVATE = "activate" + EVENT_KEY$2; 6633 var EVENT_SCROLL = "scroll" + EVENT_KEY$2; 6634 var EVENT_LOAD_DATA_API = "load" + EVENT_KEY$2 + DATA_API_KEY$1; 6635 var METHOD_OFFSET = 'offset'; 6636 var METHOD_POSITION = 'position'; 6637 var SELECTOR_DATA_SPY = '[data-spy="scroll"]'; 6638 var SELECTOR_NAV_LIST_GROUP$1 = '.nav, .list-group'; 6639 var SELECTOR_NAV_LINKS = '.nav-link'; 6640 var SELECTOR_NAV_ITEMS = '.nav-item'; 6641 var SELECTOR_LIST_ITEMS = '.list-group-item'; 6642 var SELECTOR_DROPDOWN$1 = '.dropdown'; 6643 var SELECTOR_DROPDOWN_ITEMS = '.dropdown-item'; 6644 var SELECTOR_DROPDOWN_TOGGLE$1 = '.dropdown-toggle'; 6645 var Default$1 = { 6646 offset: 10, 6647 method: 'auto', 6648 target: '' 6649 }; 6650 var DefaultType$1 = { 6651 offset: 'number', 6652 method: 'string', 6653 target: '(string|element)' 6654 }; 6655 /** 6656 * Class definition 6657 */ 6658 6659 var ScrollSpy = /*#__PURE__*/function () { 6660 function ScrollSpy(element, config) { 6661 var _this = this; 6662 6663 this._element = element; 6664 this._scrollElement = element.tagName === 'BODY' ? window : element; 6665 this._config = this._getConfig(config); 6666 this._selector = this._config.target + " " + SELECTOR_NAV_LINKS + "," + (this._config.target + " " + SELECTOR_LIST_ITEMS + ",") + (this._config.target + " " + SELECTOR_DROPDOWN_ITEMS); 6667 this._offsets = []; 6668 this._targets = []; 6669 this._activeTarget = null; 6670 this._scrollHeight = 0; 6671 $__default["default"](this._scrollElement).on(EVENT_SCROLL, function (event) { 6672 return _this._process(event); 6673 }); 6674 this.refresh(); 6675 6676 this._process(); 6677 } // Getters 6678 6679 6680 var _proto = ScrollSpy.prototype; 6681 6682 // Public 6683 _proto.refresh = function refresh() { 6684 var _this2 = this; 6685 6686 var autoMethod = this._scrollElement === this._scrollElement.window ? METHOD_OFFSET : METHOD_POSITION; 6687 var offsetMethod = this._config.method === 'auto' ? autoMethod : this._config.method; 6688 var offsetBase = offsetMethod === METHOD_POSITION ? this._getScrollTop() : 0; 6689 this._offsets = []; 6690 this._targets = []; 6691 this._scrollHeight = this._getScrollHeight(); 6692 var targets = [].slice.call(document.querySelectorAll(this._selector)); 6693 targets.map(function (element) { 6694 var target; 6695 var targetSelector = Util.getSelectorFromElement(element); 6696 6697 if (targetSelector) { 6698 target = document.querySelector(targetSelector); 6699 } 6700 6701 if (target) { 6702 var targetBCR = target.getBoundingClientRect(); 6703 6704 if (targetBCR.width || targetBCR.height) { 6705 // TODO (fat): remove sketch reliance on jQuery position/offset 6706 return [$__default["default"](target)[offsetMethod]().top + offsetBase, targetSelector]; 6707 } 6708 } 6709 6710 return null; 6711 }
vendor: 4,304 bytes, lines 6711-6834
6711).filter(Boolean).sort(function (a, b) { 6712 return a[0] - b[0]; 6713 }).forEach(function (item) { 6714 _this2._offsets.push(item[0]); 6715 6716 _this2._targets.push(item[1]); 6717 }); 6718 }; 6719 6720 _proto.dispose = function dispose() { 6721 $__default["default"].removeData(this._element, DATA_KEY$2); 6722 $__default["default"](this._scrollElement).off(EVENT_KEY$2); 6723 this._element = null; 6724 this._scrollElement = null; 6725 this._config = null; 6726 this._selector = null; 6727 this._offsets = null; 6728 this._targets = null; 6729 this._activeTarget = null; 6730 this._scrollHeight = null; 6731 } // Private 6732 ; 6733 6734 _proto._getConfig = function _getConfig(config) { 6735 config = _extends$1({}, Default$1, typeof config === 'object' && config ? config : {}); 6736 6737 if (typeof config.target !== 'string' && Util.isElement(config.target)) { 6738 var id = $__default["default"](config.target).attr('id'); 6739 6740 if (!id) { 6741 id = Util.getUID(NAME$2); 6742 $__default["default"](config.target).attr('id', id); 6743 } 6744 6745 config.target = "#" + id; 6746 } 6747 6748 Util.typeCheckConfig(NAME$2, config, DefaultType$1); 6749 return config; 6750 }; 6751 6752 _proto._getScrollTop = function _getScrollTop() { 6753 return this._scrollElement === window ? this._scrollElement.pageYOffset : this._scrollElement.scrollTop; 6754 }; 6755 6756 _proto._getScrollHeight = function _getScrollHeight() { 6757 return this._scrollElement.scrollHeight || Math.max(document.body.scrollHeight, document.documentElement.scrollHeight); 6758 }; 6759 6760 _proto._getOffsetHeight = function _getOffsetHeight() { 6761 return this._scrollElement === window ? window.innerHeight : this._scrollElement.getBoundingClientRect().height; 6762 }; 6763 6764 _proto._process = function _process() { 6765 var scrollTop = this._getScrollTop() + this._config.offset; 6766 6767 var scrollHeight = this._getScrollHeight(); 6768 6769 var maxScroll = this._config.offset + scrollHeight - this._getOffsetHeight(); 6770 6771 if (this._scrollHeight !== scrollHeight) { 6772 this.refresh(); 6773 } 6774 6775 if (scrollTop >= maxScroll) { 6776 var target = this._targets[this._targets.length - 1]; 6777 6778 if (this._activeTarget !== target) { 6779 this._activate(target); 6780 } 6781 6782 return; 6783 } 6784 6785 if (this._activeTarget && scrollTop < this._offsets[0] && this._offsets[0] > 0) { 6786 this._activeTarget = null; 6787 6788 this._clear(); 6789 6790 return; 6791 } 6792 6793 for (var i = this._offsets.length; i--;) { 6794 var isActiveTarget = this._activeTarget !== this._targets[i] && scrollTop >= this._offsets[i] && (typeof this._offsets[i + 1] === 'undefined' || scrollTop < this._offsets[i + 1]); 6795 6796 if (isActiveTarget) { 6797 this._activate(this._targets[i]); 6798 } 6799 } 6800 }; 6801 6802 _proto._activate = function _activate(target) { 6803 this._activeTarget = target; 6804 6805 this._clear(); 6806 6807 var queries = this._selector.split(',').map(function (selector) { 6808 return selector + "[data-target=\"" + target + "\"]," + selector + "[href=\"" + target + "\"]"; 6809 }); 6810 6811 var $link = $__default["default"]([].slice.call(document.querySelectorAll(queries.join(',')))); 6812 6813 if ($link.hasClass(CLASS_NAME_DROPDOWN_ITEM)) { 6814 $link.closest(SELECTOR_DROPDOWN$1).find(SELECTOR_DROPDOWN_TOGGLE$1).addClass(CLASS_NAME_ACTIVE$1); 6815 $link.addClass(CLASS_NAME_ACTIVE$1); 6816 } else { 6817 // Set triggered link as active 6818 $link.addClass(CLASS_NAME_ACTIVE$1); // Set triggered links parents as active 6819 // With both <ul> and <nav> markup a parent is the previous sibling of any nav ancestor 6820 6821 $link.parents(SELECTOR_NAV_LIST_GROUP$1).prev(SELECTOR_NAV_LINKS + ", " + SELECTOR_LIST_ITEMS).addClass(CLASS_NAME_ACTIVE$1); // Handle special case when .nav-link is inside .nav-item 6822 6823 $link.parents(SELECTOR_NAV_LIST_GROUP$1).prev(SELECTOR_NAV_ITEMS).children(SELECTOR_NAV_LINKS).addClass(CLASS_NAME_ACTIVE$1); 6824 } 6825 6826 $__default["default"](this._scrollElement).trigger(EVENT_ACTIVATE, { 6827 relatedTarget: target 6828 }); 6829 }; 6830 6831 _proto._clear = function _clear() { 6832 [].slice.call(document.querySelectorAll(this._selector)).filter(function (node) { 6833 return node.classList.contains(CLASS_NAME_ACTIVE$1); 6834 }
vendor: 6,282 bytes, lines 6834-7028
6834).forEach(function (node) { 6835 return node.classList.remove(CLASS_NAME_ACTIVE$1); 6836 }); 6837 } // Static 6838 ; 6839 6840 ScrollSpy._jQueryInterface = function _jQueryInterface(config) { 6841 return this.each(function () { 6842 var data = $__default["default"](this).data(DATA_KEY$2); 6843 6844 var _config = typeof config === 'object' && config; 6845 6846 if (!data) { 6847 data = new ScrollSpy(this, _config); 6848 $__default["default"](this).data(DATA_KEY$2, data); 6849 } 6850 6851 if (typeof config === 'string') { 6852 if (typeof data[config] === 'undefined') { 6853 throw new TypeError("No method named \"" + config + "\""); 6854 } 6855 6856 data[config](); 6857 } 6858 }); 6859 }; 6860 6861 _createClass(ScrollSpy, null, [{ 6862 key: "VERSION", 6863 get: function get() { 6864 return VERSION$2; 6865 } 6866 }, { 6867 key: "Default", 6868 get: function get() { 6869 return Default$1; 6870 } 6871 }]); 6872 6873 return ScrollSpy; 6874 }(); 6875 /** 6876 * Data API implementation 6877 */ 6878 6879 6880 $__default["default"](window).on(EVENT_LOAD_DATA_API, function () { 6881 var scrollSpys = [].slice.call(document.querySelectorAll(SELECTOR_DATA_SPY)); 6882 var scrollSpysLength = scrollSpys.length; 6883 6884 for (var i = scrollSpysLength; i--;) { 6885 var $spy = $__default["default"](scrollSpys[i]); 6886 6887 ScrollSpy._jQueryInterface.call($spy, $spy.data()); 6888 } 6889 }); 6890 /** 6891 * jQuery 6892 */ 6893 6894 $__default["default"].fn[NAME$2] = ScrollSpy._jQueryInterface; 6895 $__default["default"].fn[NAME$2].Constructor = ScrollSpy; 6896 6897 $__default["default"].fn[NAME$2].noConflict = function () { 6898 $__default["default"].fn[NAME$2] = JQUERY_NO_CONFLICT$2; 6899 return ScrollSpy._jQueryInterface; 6900 }; 6901 6902 /** 6903 * Constants 6904 */ 6905 6906 var NAME$1 = 'tab'; 6907 var VERSION$1 = '4.6.2'; 6908 var DATA_KEY$1 = 'bs.tab'; 6909 var EVENT_KEY$1 = "." + DATA_KEY$1; 6910 var DATA_API_KEY = '.data-api'; 6911 var JQUERY_NO_CONFLICT$1 = $__default["default"].fn[NAME$1]; 6912 var CLASS_NAME_DROPDOWN_MENU = 'dropdown-menu'; 6913 var CLASS_NAME_ACTIVE = 'active'; 6914 var CLASS_NAME_DISABLED = 'disabled'; 6915 var CLASS_NAME_FADE$1 = 'fade'; 6916 var CLASS_NAME_SHOW$1 = 'show'; 6917 var EVENT_HIDE$1 = "hide" + EVENT_KEY$1; 6918 var EVENT_HIDDEN$1 = "hidden" + EVENT_KEY$1; 6919 var EVENT_SHOW$1 = "show" + EVENT_KEY$1; 6920 var EVENT_SHOWN$1 = "shown" + EVENT_KEY$1; 6921 var EVENT_CLICK_DATA_API = "click" + EVENT_KEY$1 + DATA_API_KEY; 6922 var SELECTOR_DROPDOWN = '.dropdown'; 6923 var SELECTOR_NAV_LIST_GROUP = '.nav, .list-group'; 6924 var SELECTOR_ACTIVE = '.active'; 6925 var SELECTOR_ACTIVE_UL = '> li > .active'; 6926 var SELECTOR_DATA_TOGGLE = '[data-toggle="tab"], [data-toggle="pill"], [data-toggle="list"]'; 6927 var SELECTOR_DROPDOWN_TOGGLE = '.dropdown-toggle'; 6928 var SELECTOR_DROPDOWN_ACTIVE_CHILD = '> .dropdown-menu .active'; 6929 /** 6930 * Class definition 6931 */ 6932 6933 var Tab = /*#__PURE__*/function () { 6934 function Tab(element) { 6935 this._element = element; 6936 } // Getters 6937 6938 6939 var _proto = Tab.prototype; 6940 6941 // Public 6942 _proto.show = function show() { 6943 var _this = this; 6944 6945 if (this._element.parentNode && this._element.parentNode.nodeType === Node.ELEMENT_NODE && $__default["default"](this._element).hasClass(CLASS_NAME_ACTIVE) || $__default["default"](this._element).hasClass(CLASS_NAME_DISABLED) || this._element.hasAttribute('disabled')) { 6946 return; 6947 } 6948 6949 var target; 6950 var previous; 6951 var listElement = $__default["default"](this._element).closest(SELECTOR_NAV_LIST_GROUP)[0]; 6952 var selector = Util.getSelectorFromElement(this._element); 6953 6954 if (listElement) { 6955 var itemSelector = listElement.nodeName === 'UL' || listElement.nodeName === 'OL' ? SELECTOR_ACTIVE_UL : SELECTOR_ACTIVE; 6956 previous = $__default["default"].makeArray($__default["default"](listElement).find(itemSelector)); 6957 previous = previous[previous.length - 1]; 6958 } 6959 6960 var hideEvent = $__default["default"].Event(EVENT_HIDE$1, { 6961 relatedTarget: this._element 6962 }); 6963 var showEvent = $__default["default"].Event(EVENT_SHOW$1, { 6964 relatedTarget: previous 6965 }); 6966 6967 if (previous) { 6968 $__default["default"](previous).trigger(hideEvent); 6969 } 6970 6971 $__default["default"](this._element).trigger(showEvent); 6972 6973 if (showEvent.isDefaultPrevented() || hideEvent.isDefaultPrevented()) { 6974 return; 6975 } 6976 6977 if (selector) { 6978 target = document.querySelector(selector); 6979 } 6980 6981 this._activate(this._element, listElement); 6982 6983 var complete = function complete() { 6984 var hiddenEvent = $__default["default"].Event(EVENT_HIDDEN$1, { 6985 relatedTarget: _this._element 6986 }); 6987 var shownEvent = $__default["default"].Event(EVENT_SHOWN$1, { 6988 relatedTarget: previous 6989 }); 6990 $__default["default"](previous).trigger(hiddenEvent); 6991 $__default["default"](_this._element).trigger(shownEvent); 6992 }; 6993 6994 if (target) { 6995 this._activate(target, target.parentNode, complete); 6996 } else { 6997 complete(); 6998 } 6999 }; 7000 7001 _proto.dispose = function dispose() { 7002 $__default["default"].removeData(this._element, DATA_KEY$1); 7003 this._element = null; 7004 } // Private 7005 ; 7006 7007 _proto._activate = function _activate(element, container, callback) { 7008 var _this2 = this; 7009 7010 var activeElements = container && (container.nodeName === 'UL' || container.nodeName === 'OL') ? $__default["default"](container).find(SELECTOR_ACTIVE_UL) : $__default["default"](container).children(SELECTOR_ACTIVE); 7011 var active = activeElements[0]; 7012 var isTransitioning = callback && active && $__default["default"](active).hasClass(CLASS_NAME_FADE$1); 7013 7014 var complete = function complete() { 7015 return _this2._transitionComplete(element, active, callback); 7016 }; 7017 7018 if (active && isTransitioning) { 7019 var transitionDuration = Util.getTransitionDurationFromElement(active); 7020 $__default["default"](active).removeClass(CLASS_NAME_SHOW$1).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration); 7021 } else { 7022 complete(); 7023 } 7024 }; 7025 7026 _proto._transitionComplete = function _transitionComplete(element, active, callback) { 7027 if (active) { 7028 $__default["default"](active).removeClass(CLASS_NAME_ACTIVE);
vendor: 8,598 bytes, lines 7029-7353
7029 var dropdownChild = $__default["default"](active.parentNode).find(SELECTOR_DROPDOWN_ACTIVE_CHILD)[0]; 7030 7031 if (dropdownChild) { 7032 $__default["default"](dropdownChild).removeClass(CLASS_NAME_ACTIVE); 7033 } 7034 7035 if (active.getAttribute('role') === 'tab') { 7036 active.setAttribute('aria-selected', false); 7037 } 7038 } 7039 7040 $__default["default"](element).addClass(CLASS_NAME_ACTIVE); 7041 7042 if (element.getAttribute('role') === 'tab') { 7043 element.setAttribute('aria-selected', true); 7044 } 7045 7046 Util.reflow(element); 7047 7048 if (element.classList.contains(CLASS_NAME_FADE$1)) { 7049 element.classList.add(CLASS_NAME_SHOW$1); 7050 } 7051 7052 var parent = element.parentNode; 7053 7054 if (parent && parent.nodeName === 'LI') { 7055 parent = parent.parentNode; 7056 } 7057 7058 if (parent && $__default["default"](parent).hasClass(CLASS_NAME_DROPDOWN_MENU)) { 7059 var dropdownElement = $__default["default"](element).closest(SELECTOR_DROPDOWN)[0]; 7060 7061 if (dropdownElement) { 7062 var dropdownToggleList = [].slice.call(dropdownElement.querySelectorAll(SELECTOR_DROPDOWN_TOGGLE)); 7063 $__default["default"](dropdownToggleList).addClass(CLASS_NAME_ACTIVE); 7064 } 7065 7066 element.setAttribute('aria-expanded', true); 7067 } 7068 7069 if (callback) { 7070 callback(); 7071 } 7072 } // Static 7073 ; 7074 7075 Tab._jQueryInterface = function _jQueryInterface(config) { 7076 return this.each(function () { 7077 var $this = $__default["default"](this); 7078 var data = $this.data(DATA_KEY$1); 7079 7080 if (!data) { 7081 data = new Tab(this); 7082 $this.data(DATA_KEY$1, data); 7083 } 7084 7085 if (typeof config === 'string') { 7086 if (typeof data[config] === 'undefined') { 7087 throw new TypeError("No method named \"" + config + "\""); 7088 } 7089 7090 data[config](); 7091 } 7092 }); 7093 }; 7094 7095 _createClass(Tab, null, [{ 7096 key: "VERSION", 7097 get: function get() { 7098 return VERSION$1; 7099 } 7100 }]); 7101 7102 return Tab; 7103 }(); 7104 /** 7105 * Data API implementation 7106 */ 7107 7108 7109 $__default["default"](document).on(EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, function (event) { 7110 event.preventDefault(); 7111 7112 Tab._jQueryInterface.call($__default["default"](this), 'show'); 7113 }); 7114 /** 7115 * jQuery 7116 */ 7117 7118 $__default["default"].fn[NAME$1] = Tab._jQueryInterface; 7119 $__default["default"].fn[NAME$1].Constructor = Tab; 7120 7121 $__default["default"].fn[NAME$1].noConflict = function () { 7122 $__default["default"].fn[NAME$1] = JQUERY_NO_CONFLICT$1; 7123 return Tab._jQueryInterface; 7124 }; 7125 7126 /** 7127 * Constants 7128 */ 7129 7130 var NAME = 'toast'; 7131 var VERSION = '4.6.2'; 7132 var DATA_KEY = 'bs.toast'; 7133 var EVENT_KEY = "." + DATA_KEY; 7134 var JQUERY_NO_CONFLICT = $__default["default"].fn[NAME]; 7135 var CLASS_NAME_FADE = 'fade'; 7136 var CLASS_NAME_HIDE = 'hide'; 7137 var CLASS_NAME_SHOW = 'show'; 7138 var CLASS_NAME_SHOWING = 'showing'; 7139 var EVENT_CLICK_DISMISS = "click.dismiss" + EVENT_KEY; 7140 var EVENT_HIDE = "hide" + EVENT_KEY; 7141 var EVENT_HIDDEN = "hidden" + EVENT_KEY; 7142 var EVENT_SHOW = "show" + EVENT_KEY; 7143 var EVENT_SHOWN = "shown" + EVENT_KEY; 7144 var SELECTOR_DATA_DISMISS = '[data-dismiss="toast"]'; 7145 var Default = { 7146 animation: true, 7147 autohide: true, 7148 delay: 500 7149 }; 7150 var DefaultType = { 7151 animation: 'boolean', 7152 autohide: 'boolean', 7153 delay: 'number' 7154 }; 7155 /** 7156 * Class definition 7157 */ 7158 7159 var Toast = /*#__PURE__*/function () { 7160 function Toast(element, config) { 7161 this._element = element; 7162 this._config = this._getConfig(config); 7163 this._timeout = null; 7164 7165 this._setListeners(); 7166 } // Getters 7167 7168 7169 var _proto = Toast.prototype; 7170 7171 // Public 7172 _proto.show = function show() { 7173 var _this = this; 7174 7175 var showEvent = $__default["default"].Event(EVENT_SHOW); 7176 $__default["default"](this._element).trigger(showEvent); 7177 7178 if (showEvent.isDefaultPrevented()) { 7179 return; 7180 } 7181 7182 this._clearTimeout(); 7183 7184 if (this._config.animation) { 7185 this._element.classList.add(CLASS_NAME_FADE); 7186 } 7187 7188 var complete = function complete() { 7189 _this._element.classList.remove(CLASS_NAME_SHOWING); 7190 7191 _this._element.classList.add(CLASS_NAME_SHOW); 7192 7193 $__default["default"](_this._element).trigger(EVENT_SHOWN); 7194 7195 if (_this._config.autohide) { 7196 _this._timeout = setTimeout(function () { 7197 _this.hide(); 7198 }, _this._config.delay); 7199 } 7200 }; 7201 7202 this._element.classList.remove(CLASS_NAME_HIDE); 7203 7204 Util.reflow(this._element); 7205 7206 this._element.classList.add(CLASS_NAME_SHOWING); 7207 7208 if (this._config.animation) { 7209 var transitionDuration = Util.getTransitionDurationFromElement(this._element); 7210 $__default["default"](this._element).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration); 7211 } else { 7212 complete(); 7213 } 7214 }; 7215 7216 _proto.hide = function hide() { 7217 if (!this._element.classList.contains(CLASS_NAME_SHOW)) { 7218 return; 7219 } 7220 7221 var hideEvent = $__default["default"].Event(EVENT_HIDE); 7222 $__default["default"](this._element).trigger(hideEvent); 7223 7224 if (hideEvent.isDefaultPrevented()) { 7225 return; 7226 } 7227 7228 this._close(); 7229 }; 7230 7231 _proto.dispose = function dispose() { 7232 this._clearTimeout(); 7233 7234 if (this._element.classList.contains(CLASS_NAME_SHOW)) { 7235 this._element.classList.remove(CLASS_NAME_SHOW); 7236 } 7237 7238 $__default["default"](this._element).off(EVENT_CLICK_DISMISS); 7239 $__default["default"].removeData(this._element, DATA_KEY); 7240 this._element = null; 7241 this._config = null; 7242 } // Private 7243 ; 7244 7245 _proto._getConfig = function _getConfig(config) { 7246 config = _extends$1({}, Default, $__default["default"](this._element).data(), typeof config === 'object' && config ? config : {}); 7247 Util.typeCheckConfig(NAME, config, this.constructor.DefaultType); 7248 return config; 7249 }; 7250 7251 _proto._setListeners = function _setListeners() { 7252 var _this2 = this; 7253 7254 $__default["default"](this._element).on(EVENT_CLICK_DISMISS, SELECTOR_DATA_DISMISS, function () { 7255 return _this2.hide(); 7256 }); 7257 }; 7258 7259 _proto._close = function _close() { 7260 var _this3 = this; 7261 7262 var complete = function complete() { 7263 _this3._element.classList.add(CLASS_NAME_HIDE); 7264 7265 $__default["default"](_this3._element).trigger(EVENT_HIDDEN); 7266 }; 7267 7268 this._element.classList.remove(CLASS_NAME_SHOW); 7269 7270 if (this._config.animation) { 7271 var transitionDuration = Util.getTransitionDurationFromElement(this._element); 7272 $__default["default"](this._element).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration); 7273 } else { 7274 complete(); 7275 } 7276 }; 7277 7278 _proto._clearTimeout = function _clearTimeout() { 7279 clearTimeout(this._timeout); 7280 this._timeout = null; 7281 } // Static 7282 ; 7283 7284 Toast._jQueryInterface = function _jQueryInterface(config) { 7285 return this.each(function () { 7286 var $element = $__default["default"](this); 7287 var data = $element.data(DATA_KEY); 7288 7289 var _config = typeof config === 'object' && config; 7290 7291 if (!data) { 7292 data = new Toast(this, _config); 7293 $element.data(DATA_KEY, data); 7294 } 7295 7296 if (typeof config === 'string') { 7297 if (typeof data[config] === 'undefined') { 7298 throw new TypeError("No method named \"" + config + "\""); 7299 } 7300 7301 data[config](this); 7302 } 7303 }); 7304 }; 7305 7306 _createClass(Toast, null, [{ 7307 key: "VERSION", 7308 get: function get() { 7309 return VERSION; 7310 } 7311 }, { 7312 key: "DefaultType", 7313 get: function get() { 7314 return DefaultType; 7315 } 7316 }, { 7317 key: "Default", 7318 get: function get() { 7319 return Default; 7320 } 7321 }]); 7322 7323 return Toast; 7324 }(); 7325 /** 7326 * jQuery 7327 */ 7328 7329 7330 $__default["default"].fn[NAME] = Toast._jQueryInterface; 7331 $__default["default"].fn[NAME].Constructor = Toast; 7332 7333 $__default["default"].fn[NAME].noConflict = function () { 7334 $__default["default"].fn[NAME] = JQUERY_NO_CONFLICT; 7335 return Toast._jQueryInterface; 7336 }; 7337 7338 exports.Alert = Alert; 7339 exports.Button = Button; 7340 exports.Carousel = Carousel; 7341 exports.Collapse = Collapse; 7342 exports.Dropdown = Dropdown; 7343 exports.Modal = Modal; 7344 exports.Popover = Popover; 7345 exports.Scrollspy = ScrollSpy; 7346 exports.Tab = Tab; 7347 exports.Toast = Toast; 7348 exports.Tooltip = Tooltip; 7349 exports.Util = Util; 7350 7351 Object.defineProperty(exports, '__esModule', { value: true }); 7352 7353}));
7354 7355; 7356const _clickReadmore = (event) => { 7357 const toggleButton = event.target.parentElement; 7358 7359 const fullTextWrapper = toggleButton.parentElement.querySelector('.fulltext'); 7360 const toggleButtonText = toggleButton.querySelector('.text'); 7361 7362 // change attributes and text if full text is shown/hidden 7363 if (!fullTextWrapper.hasAttribute('hidden')) { 7364 toggleButtonText.innerText = 'Lire la suite'; 7365 fullTextWrapper.setAttribute('hidden', true); 7366 toggleButton.setAttribute('aria-expanded', false); 7367 } else { 7368 toggleButtonText.innerText = 'Voir moins'; 7369 fullTextWrapper.removeAttribute('hidden'); 7370 toggleButton.setAttribute('aria-expanded', true); 7371 } 7372}; 7373 7374const readmore = function () { 7375 // cut the mustard 7376 if ('querySelector' in document && 'addEventListener' in window) { 7377 7378 const toggleButtons = document.querySelectorAll('.toggle-content'); 7379 const fullTextWrappers = document.querySelectorAll('.fulltext'); 7380 const shortText = document.querySelector('#index-comment-short'); 7381 7382 if (shortText !== undefined && shortText !== null) { 7383 // execute only if short is not empty 7384 if (shortText.innerText !== "") { 7385 [].forEach.call(fullTextWrappers, function (fullTextWrapper) { 7386 // hide all full text on load 7387 fullTextWrapper.setAttribute('hidden', true); 7388 [].forEach.call(toggleButtons, (toggleButton) => { 7389 toggleButton.querySelector('.text').innerText = "Lire la suite"; 7390 }); 7391 }); 7392 7393 [].forEach.call(toggleButtons, (toggleButton) => { 7394 // show toggle more buttons 7395 toggleButton.removeAttribute('hidden'); 7396 7397 // add listener for each button 7398 toggleButton.addEventListener('click', _clickReadmore); 7399 }); 7400 } else { 7401 [].forEach.call(fullTextWrappers, function (fullTextWrapper) { 7402 // hide all full text on load 7403 fullTextWrapper.removeAttribute('hidden'); 7404 }); 7405 7406 [].forEach.call(toggleButtons, (toggleButton) => { 7407 // show toggle more buttons 7408 toggleButton.setAttribute('hidden', ""); 7409 toggleButton.removeEventListener('click', _clickReadmore); 7410 }); 7411 } 7412 } 7413 } 7414} 7415 7416readmore(); 7417; 7418(function ($) { 7419 let btn; 7420 7421 function clickAction() { 7422 btn.on('click', function (e) { 7423 e.preventDefault(); 7424 $('html, body').animate({scrollTop: 0}, '300'); 7425 }); 7426 } 7427 7428 $(window).scroll(() => { 7429 if (btn !== undefined) { 7430 if ($(window).scrollTop() > 300) { 7431 btn.addClass('show'); 7432 } else { 7433 btn.removeClass('show'); 7434 } 7435 } 7436 }); 7437 7438 $(document).ready(() => { 7439 btn = $('#back-to-top-button'); 7440 clickAction(); 7441 }); 7442})(jQuery); 7443; 7444(function ($) { 7445 let btn; 7446 7447 function clickAction() { 7448 btn.unbind('click').click((e) => { 7449 e.preventDefault(); 7450 const btnContainer = btn.parent().parent().find('.social-networks-button'); 7451 btnContainer.toggleClass('collapsed', 200); 7452 }); 7453 } 7454 7455 function close() { 7456 let socialNetworks = $('.social-networks-button'); 7457 let search = $('.btn-search'); 7458 search.click(() => { 7459 socialNetworks.toggleClass('collapsed', true); 7460 }); 7461 } 7462 7463 $(document).ready(() => { 7464 btn = $('#show-social-networks'); 7465 clickAction(); 7466 close(); 7467 }); 7468})(jQuery); 7469; 7470String.prototype.slugify = function () { 7471 let str = this; 7472 7473 str = str.replace(/^\s+|\s+$/g, ''); 7474 7475 // Make the string lowercase 7476 str = str.toLowerCase(); 7477 7478 // Remove accents, swap ñ for n, etc 7479 var from = "ÃÃÃÃÃà ÄÃÄÄÃÄÃÃÃẼÄÈÃÃÃÃÅÃÃÃÃÃÃÃÅÅŠŤÃÅ®ÃÃÃߎáäâà ãåÄçÄÄéÄëèêẽÄÈÃìîïÅñóöòôõøðÅÅšťúůüùûýÿžþÃÄÄÃÃa·/_,:;"; 7480 var to = "AAAAAACCCDEEEEEEEEIIIINNOOOOOORRSTUUUUUYYZaaaaaacccdeeeeeeeeiiiinnooooooorrstuuuuuyyzbBDdBAa------"; 7481 for (var i = 0, l = from.length; i < l; i++) { 7482 str = str.replace(new RegExp(from.charAt(i), 'g'), to.charAt(i)); 7483 } 7484 7485 // Remove invalid chars 7486 str = str.replace(/[^a-z0-9 -]/g, '') 7487 // Collapse whitespace and replace by - 7488 .replace(/\s+/g, '-') 7489 // Collapse dashes 7490 .replace(/-+/g, '-'); 7491 7492 return str; 7493}; 7494 7495Date.prototype.formatForUrl = function () { 7496 let me = this; 7497 let year = me.getFullYear(); 7498 let month = me.getMonth() + 1; 7499 let day = me.getDate(); 7500 if (month < 10) {
7501 month = '0' + month; 7502 } 7503 if (day < 10) { 7504 day = '0' + day; 7505 } 7506 7507 return year + '-' + month + '-' + day; 7508}; 7509 7510Date.prototype.removeDays = function (days) { 7511 let newDate = new Date(); 7512 let me = this; 7513 newDate.setDate(me.getDate() - days); 7514 return newDate; 7515}; 7516 7517/** 7518 * @file 7519 * Global utilities. 7520 */ 7521(function ($, Drupal) { 7522 7523 const isOverflownWidth = (el) => { 7524 return el.prop('scrollWidth') > el.prop('clientWidth'); 7525 } 7526 7527 const updateScrollIcon = () => { 7528 const els = $('.nav-tabs'); 7529 els.each((index, el) => { 7530 $(el).parent().removeClass('nav-tabs-scroll'); 7531 if (isOverflownWidth($(el))) { 7532 $(el).parent().addClass('nav-tabs-scroll'); 7533 } 7534 }); 7535 } 7536 7537 const addScrollIcon = () => { 7538 window.addEventListener('resize', updateScrollIcon); 7539 updateScrollIcon(); 7540 } 7541 7542 function searchForm() { 7543 $('.btn-search').unbind('click').click(function (e) { 7544 e.preventDefault(); 7545 const btn = $(this); 7546 const parentInput = btn.parents().find('.search-input'); 7547 if (parentInput.hasClass('expanded')) { 7548 parentInput.removeClass('expanded'); 7549 btn.addClass('collapsed'); 7550 } else { 7551 parentInput.addClass('expanded'); 7552 btn.removeClass('collapsed'); 7553 parentInput.find('input').first().focus(); 7554 } 7555 }); 7556 } 7557 7558 $(document).ready(() => { 7559 $('a.scroll').on('click', function (evt) { 7560 evt.preventDefault(); 7561 const target = $(this).attr('href'); 7562 $('html, body') 7563 .stop() 7564 .animate({scrollTop: $(target).offset().top - 200}, 1000); 7565 }); 7566 7567 $(function () { 7568 $('[data-toggle="popover"]').popover() 7569 }); 7570 7571 addScrollIcon(); 7572 }); 7573 7574 $('.modal-mediatheque').appendTo("body"); 7575 7576 $('.member-carousel').on('slide.bs.carousel', function (e) { 7577 $('.member-slider-visual').attr('src', $(e.relatedTarget).find('article').data('visual')); 7578 }); 7579 searchForm(); 7580})(jQuery, Drupal); 7581; 7582(function ($, Drupal) { 7583 $(document).ready(() => { 7584 // SCROLLSPY 7585 $('body').scrollspy({target: '#menuSumUpScrollspy'}); 7586 }); 7587})(jQuery, Drupal); 7588; 7589(function ($) { 7590 $(document).ready(function () { 7591 $('.img-zoom').each(function () { 7592 const image = $(this); 7593 7594 if ($(this).parents('.no-img-zoom').length === 0) { 7595 image.click(function () { 7596 const divimage = $('<img>').attr('src', image.attr('data-base-image')).css({ 7597 width: 'auto', 7598 maxWidth: '95vw', 7599 maxHeight: '95vh', 7600 margin: 'auto', 7601 cursor: 'pointer' 7602 }); 7603
7604 const imageContainer = $('<div>').append('<div class="spinner-border spinner-border-sm" role="status"></div>').attr('src', image.attr('data-base-image')).css({ 7605 color: 'white', 7606 margin: 'auto', 7607 overflow: 'hidden' 7608 }); 7609 7610 const container = $('<div>').append(imageContainer).css({ 7611 background: 'RGBA(0,0,0,.5)', 7612 width: '100%', 7613 height: '100%', 7614 position: 'fixed', 7615 zIndex: '10000', 7616 top: '0', left: '0', 7617 cursor: 'zoom-out', 7618 textAlign: 'center', 7619 display: 'flex' 7620 }).click(function () { 7621 $(this).remove(); 7622 }).appendTo('body'); 7623 7624 divimage.one('load', function () { 7625 imageContainer.html(divimage); 7626 }); 7627 7628 divimage.mouseover(function () { 7629 container.find('img').css({ 7630 'overflow': 'hidden', 7631 'transform': 'scale(' + image.attr('data-scale') + ')', 7632 }); 7633 }).mouseout(function () { 7634 container.find('img').css({'transform': 'scale(1)'}); 7635 }).mousemove(function (e) { 7636 container.find('img').css({'transform-origin': ((e.pageX - imageContainer.offset().left) / imageContainer.width()) * 100 + '% ' + ((e.pageY - imageContainer.offset().top) / imageContainer.height()) * 100 + '%'}) 7637 }); 7638 }); 7639 } else { 7640 image.css('cursor', 'unset'); 7641 } 7642 }); 7643 }); 7644})(jQuery); 7645; 7646(($) => { 7647 function init() { 7648 $('.btn-cycle').click((e) => { 7649 const carousel = $(e.target).parents('.carousel').first(); 7650 if (carousel === undefined) { 7651 return false; 7652 } 7653 play(carousel); 7654 }); 7655 $('.btn-pause').click((e) => { 7656 const carousel = $(e.target).parents('.carousel').first(); 7657 if (carousel === undefined) { 7658 return false; 7659 } 7660 pause(carousel); 7661 }); 7662 } 7663 7664 function play(carousel) { 7665 carousel.find('.btn-cycle').first().addClass('disabled'); 7666 carousel.find('.btn-pause').first().removeClass('disabled'); 7667 carousel.carousel('cycle'); 7668 } 7669 7670 function pause(carousel) { 7671 carousel.find('.btn-cycle').first().removeClass('disabled'); 7672 carousel.find('.btn-pause').first().addClass('disabled'); 7673 carousel.carousel('pause'); 7674 } 7675 7676 $(document).ready(() => { 7677 init(); 7678 }); 7679 7680})(jQuery); 7681;
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.