/*! * Bootstrap [object Object] v4.6.2 (https://getbootstrap.com/) * Copyright 2011-2020 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) */ !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("jquery")):"function"==typeof define&&define.amd?define(["exports","jquery"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).bootstrap={},t.jQuery)}(this,(function(t,e){"use strict";function n(t,e){for(var n=0;n=4)throw new Error("Bootstrap's JavaScript requires at least jQuery v1.9.1 but less than v4.0.0")}};l.jQueryDetection(),e.fn.emulateTransitionEnd=a,e.event.special[l.TRANSITION_END]={bindType:s,delegateType:s,handle:function(t){if(e(t.target).is(this))return t.handleObj.handler.apply(this,arguments);// eslint-disable-line prefer-rest-params }}; /** * Constants */ var c="alert",h="bs.alert",u="."+h,f=e.fn[c],d="close"+u,p="closed"+u,m="click"+u+".data-api",g=function(){function t(t){this._element=t} // Getters var n=t.prototype; // Public return n.close=function(t){var e=this._element;t&&(e=this._getRootElement(t)),this._triggerCloseEvent(e).isDefaultPrevented()||this._removeElement(e)},n.dispose=function(){e.removeData(this._element,h),this._element=null} // Private ,n._getRootElement=function(t){var n=l.getSelectorFromElement(t),i=!1;return n&&(i=document.querySelector(n)),i||(i=e(t).closest(".alert")[0]),i},n._triggerCloseEvent=function(t){var n=e.Event(d);return e(t).trigger(n),n},n._removeElement=function(t){var n=this;if(e(t).removeClass("show"),e(t).hasClass("fade")){var i=l.getTransitionDurationFromElement(t);e(t).one(l.TRANSITION_END,(function(e){return n._destroyElement(t,e)})).emulateTransitionEnd(i)}else this._destroyElement(t)},n._destroyElement=function(t){e(t).detach().trigger(p).remove()} // Static ,t._jQueryInterface=function(n){return this.each((function(){var i=e(this),o=i.data(h);o||(o=new t(this),i.data(h,o)),"close"===n&&o[n](this)}))},t._handleDismiss=function(t){return function(e){e&&e.preventDefault(),t.close(this)}},i(t,null,[{key:"VERSION",get:function(){return"4.6.2"}}]),t}(); /** * Data API implementation */ e(document).on(m,'[data-dismiss="alert"]',g._handleDismiss(new g)), /** * jQuery */ e.fn[c]=g._jQueryInterface,e.fn[c].Constructor=g,e.fn[c].noConflict=function(){return e.fn[c]=f,g._jQueryInterface}; /** * Constants */ var _="button",v="bs.button",y="."+v,b=".data-api",E=e.fn[_],w="active",T="click"+y+b,C="focus"+y+b+" blur"+y+b,S="load"+y+b,N='[data-toggle^="button"]',D='input:not([type="hidden"])',A=".btn",O=function(){function t(t){this._element=t,this.shouldAvoidTriggerChange=!1} // Getters var n=t.prototype; // Public return n.toggle=function(){var t=!0,n=!0,i=e(this._element).closest('[data-toggle="buttons"]')[0];if(i){var o=this._element.querySelector(D);if(o){if("radio"===o.type)if(o.checked&&this._element.classList.contains(w))t=!1;else{var r=i.querySelector(".active");r&&e(r).removeClass(w)}t&&( // if it's not a radio button or checkbox don't add a pointless/invalid checked property to the input "checkbox"!==o.type&&"radio"!==o.type||(o.checked=!this._element.classList.contains(w)),this.shouldAvoidTriggerChange||e(o).trigger("change")),o.focus(),n=!1}}this._element.hasAttribute("disabled")||this._element.classList.contains("disabled")||(n&&this._element.setAttribute("aria-pressed",!this._element.classList.contains(w)),t&&e(this._element).toggleClass(w))},n.dispose=function(){e.removeData(this._element,v),this._element=null} // Static ,t._jQueryInterface=function(n,i){return this.each((function(){var o=e(this),r=o.data(v);r||(r=new t(this),o.data(v,r)),r.shouldAvoidTriggerChange=i,"toggle"===n&&r[n]()}))},i(t,null,[{key:"VERSION",get:function(){return"4.6.2"}}]),t}(); /** * Data API implementation */ e(document).on(T,N,(function(t){var n=t.target,i=n;if(e(n).hasClass("btn")||(n=e(n).closest(A)[0]),!n||n.hasAttribute("disabled")||n.classList.contains("disabled"))t.preventDefault();// work around Firefox bug #1540995 else{var o=n.querySelector(D);if(o&&(o.hasAttribute("disabled")||o.classList.contains("disabled")))// work around Firefox bug #1540995 return void t.preventDefault();"INPUT"!==i.tagName&&"LABEL"===n.tagName||O._jQueryInterface.call(e(n),"toggle","INPUT"===i.tagName)}})).on(C,N,(function(t){var n=e(t.target).closest(A)[0];e(n).toggleClass("focus",/^focus(in)?$/.test(t.type))})),e(window).on(S,(function(){for( // ensure correct active class is set to match the controls' actual values/states // find all checkboxes/readio buttons inside data-toggle groups var t=[].slice.call(document.querySelectorAll('[data-toggle="buttons"] .btn')),e=0,n=t.length;e0,this._pointerEvent=Boolean(window.PointerEvent||window.MSPointerEvent),this._addEventListeners()} // Getters var n=t.prototype; // Public return n.next=function(){this._isSliding||this._slide(F)},n.nextWhenVisible=function(){var t=e(this._element); // Don't call next when the page isn't visible // or the carousel or its parent isn't visible !document.hidden&&t.is(":visible")&&"hidden"!==t.css("visibility")&&this.next()},n.prev=function(){this._isSliding||this._slide(R)},n.pause=function(t){t||(this._isPaused=!0),this._element.querySelector(".carousel-item-next, .carousel-item-prev")&&(l.triggerTransitionEnd(this._element),this.cycle(!0)),clearInterval(this._interval),this._interval=null},n.cycle=function(t){t||(this._isPaused=!1),this._interval&&(clearInterval(this._interval),this._interval=null),this._config.interval&&!this._isPaused&&(this._updateInterval(),this._interval=setInterval((document.visibilityState?this.nextWhenVisible:this.next).bind(this),this._config.interval))},n.to=function(t){var n=this;this._activeElement=this._element.querySelector($);var i=this._getItemIndex(this._activeElement);if(!(t>this._items.length-1||t<0))if(this._isSliding)e(this._element).one(H,(function(){return n.to(t)}));else{if(i===t)return this.pause(),void this.cycle();var o=t>i?F:R;this._slide(o,this._items[t])}},n.dispose=function(){e(this._element).off(x),e.removeData(this._element,I),this._items=null,this._config=null,this._element=null,this._interval=null,this._isPaused=null,this._isSliding=null,this._activeElement=null,this._indicatorsElement=null} // Private ,n._getConfig=function(t){return t=o({},J,t),l.typeCheckConfig(k,t,Z),t},n._handleSwipe=function(){var t=Math.abs(this.touchDeltaX);if(!(t<=40)){var e=t/this.touchDeltaX;this.touchDeltaX=0, // swipe left e>0&&this.prev(), // swipe right e<0&&this.next()}},n._addEventListeners=function(){var t=this;this._config.keyboard&&e(this._element).on(q,(function(e){return t._keydown(e)})),"hover"===this._config.pause&&e(this._element).on(M,(function(e){return t.pause(e)})).on(Q,(function(e){return t.cycle(e)})),this._config.touch&&this._addTouchEventListeners()},n._addTouchEventListeners=function(){var t=this;if(this._touchSupported){var n=function(e){t._pointerEvent&&tt[e.originalEvent.pointerType.toUpperCase()]?t.touchStartX=e.originalEvent.clientX:t._pointerEvent||(t.touchStartX=e.originalEvent.touches[0].clientX)},i=function(e){t._pointerEvent&&tt[e.originalEvent.pointerType.toUpperCase()]&&(t.touchDeltaX=e.originalEvent.clientX-t.touchStartX),t._handleSwipe(),"hover"===t._config.pause&&( // If it's a touch-enabled device, mouseenter/leave are fired as // part of the mouse compatibility events on first tap - the carousel // would stop cycling until user tapped out of it; // here, we listen for touchend, explicitly pause the carousel // (as if it's the second time we tap on it, mouseenter compat event // is NOT fired) and after a timeout (to allow for mouse compatibility // events to fire) we explicitly restart cycling t.pause(),t.touchTimeout&&clearTimeout(t.touchTimeout),t.touchTimeout=setTimeout((function(e){return t.cycle(e)}),500+t._config.interval))};e(this._element.querySelectorAll(".carousel-item img")).on(K,(function(t){return t.preventDefault()})),this._pointerEvent?(e(this._element).on(Y,(function(t){return n(t)})),e(this._element).on(z,(function(t){return i(t)})),this._element.classList.add("pointer-event")):(e(this._element).on(W,(function(t){return n(t)})),e(this._element).on(U,(function(e){return function(e){ // ensure swiping with one touch and not pinching t.touchDeltaX=e.originalEvent.touches&&e.originalEvent.touches.length>1?0:e.originalEvent.touches[0].clientX-t.touchStartX}(e)})),e(this._element).on(V,(function(t){return i(t)})))}},n._keydown=function(t){if(!/input|textarea/i.test(t.target.tagName))switch(t.which){case 37:t.preventDefault(),this.prev();break;case 39:t.preventDefault(),this.next()}},n._getItemIndex=function(t){return this._items=t&&t.parentNode?[].slice.call(t.parentNode.querySelectorAll(".carousel-item")):[],this._items.indexOf(t)},n._getItemByDirection=function(t,e){var n=t===F,i=t===R,o=this._getItemIndex(e),r=this._items.length-1;if((i&&0===o||n&&o===r)&&!this._config.wrap)return e;var s=(o+(t===R?-1:1))%this._items.length;return-1===s?this._items[this._items.length-1]:this._items[s]},n._triggerSlideEvent=function(t,n){var i=this._getItemIndex(t),o=this._getItemIndex(this._element.querySelector($)),r=e.Event(B,{relatedTarget:t,direction:n,from:o,to:i});return e(this._element).trigger(r),r},n._setActiveIndicatorElement=function(t){if(this._indicatorsElement){var n=[].slice.call(this._indicatorsElement.querySelectorAll(".active"));e(n).removeClass(P);var i=this._indicatorsElement.children[this._getItemIndex(t)];i&&e(i).addClass(P)}},n._updateInterval=function(){var t=this._activeElement||this._element.querySelector($);if(t){var e=parseInt(t.getAttribute("data-interval"),10);e?(this._config.defaultInterval=this._config.defaultInterval||this._config.interval,this._config.interval=e):this._config.interval=this._config.defaultInterval||this._config.interval}},n._slide=function(t,n){var i,o,r,s=this,a=this._element.querySelector($),c=this._getItemIndex(a),h=n||a&&this._getItemByDirection(t,a),u=this._getItemIndex(h),f=Boolean(this._interval);if(t===F?(i="carousel-item-left",o="carousel-item-next",r="left"):(i="carousel-item-right",o="carousel-item-prev",r="right"),h&&e(h).hasClass(P))this._isSliding=!1;else if(!this._triggerSlideEvent(h,r).isDefaultPrevented()&&a&&h){this._isSliding=!0,f&&this.pause(),this._setActiveIndicatorElement(h),this._activeElement=h;var d=e.Event(H,{relatedTarget:h,direction:r,from:c,to:u});if(e(this._element).hasClass("slide")){e(h).addClass(o),l.reflow(h),e(a).addClass(i),e(h).addClass(i);var p=l.getTransitionDurationFromElement(a);e(a).one(l.TRANSITION_END,(function(){e(h).removeClass(i+" "+o).addClass(P),e(a).removeClass(P+" "+o+" "+i),s._isSliding=!1,setTimeout((function(){return e(s._element).trigger(d)}),0)})).emulateTransitionEnd(p)}else e(a).removeClass(P),e(h).addClass(P),this._isSliding=!1,e(this._element).trigger(d);f&&this.cycle()}} // Static ,t._jQueryInterface=function(n){return this.each((function(){var i=e(this).data(I),r=o({},J,e(this).data());"object"==typeof n&&(r=o({},r,n));var s="string"==typeof n?n:r.slide;if(i||(i=new t(this,r),e(this).data(I,i)),"number"==typeof n)i.to(n);else if("string"==typeof s){if(void 0===i[s])throw new TypeError('No method named "'+s+'"');i[s]()}else r.interval&&r.ride&&(i.pause(),i.cycle())}))},t._dataApiClickHandler=function(n){var i=l.getSelectorFromElement(this);if(!i)return!1;var r=e(i)[0];if(!r||!e(r).hasClass("carousel"))return!1;var s=o({},e(r).data(),e(this).data()),a=this.getAttribute("data-slide-to");a&&(s.interval=!1),t._jQueryInterface.call(e(r),s),a&&e(r).data(I).to(a),n.preventDefault()},i(t,null,[{key:"VERSION",get:function(){return"4.6.2"}},{key:"Default",get:function(){return J}}]),t}(); /** * Data API implementation */ e(document).on(G,"[data-slide], [data-slide-to]",et._dataApiClickHandler),e(window).on(X,(function(){for(var t=[].slice.call(document.querySelectorAll('[data-ride="carousel"]')),n=0,i=t.length;n0&&(this._selector=s,this._triggerArray.push(r))}this._parent=this._config.parent?this._getParent():null,this._config.parent||this._addAriaAndCollapsedClass(this._element,this._triggerArray),this._config.toggle&&this.toggle()} // Getters var n=t.prototype; // Public return n.toggle=function(){e(this._element).hasClass(st)?this.hide():this.show()},n.show=function(){var n,i,o=this;if(!this._isTransitioning&&!e(this._element).hasClass(st)&&(this._parent&&0===(n=[].slice.call(this._parent.querySelectorAll(".show, .collapsing")).filter((function(t){return"string"==typeof o._config.parent?t.getAttribute("data-parent")===o._config.parent:t.classList.contains(at)}))).length&&(n=null),!(n&&(i=e(n).not(this._selector).data(it))&&i._isTransitioning))){var r=e.Event(ut);if(e(this._element).trigger(r),!r.isDefaultPrevented()){n&&(t._jQueryInterface.call(e(n).not(this._selector),"hide"),i||e(n).data(it,null));var s=this._getDimension();e(this._element).removeClass(at).addClass(lt),this._element.style[s]=0,this._triggerArray.length&&e(this._triggerArray).removeClass(ct).attr("aria-expanded",!0),this.setTransitioning(!0);var a="scroll"+(s[0].toUpperCase()+s.slice(1)),c=l.getTransitionDurationFromElement(this._element);e(this._element).one(l.TRANSITION_END,(function(){e(o._element).removeClass(lt).addClass(at+" "+st),o._element.style[s]="",o.setTransitioning(!1),e(o._element).trigger(ft)})).emulateTransitionEnd(c),this._element.style[s]=this._element[a]+"px"}}},n.hide=function(){var t=this;if(!this._isTransitioning&&e(this._element).hasClass(st)){var n=e.Event(dt);if(e(this._element).trigger(n),!n.isDefaultPrevented()){var i=this._getDimension();this._element.style[i]=this._element.getBoundingClientRect()[i]+"px",l.reflow(this._element),e(this._element).addClass(lt).removeClass(at+" "+st);var o=this._triggerArray.length;if(o>0)for(var r=0;r elements (which change the URL) not inside the collapsible element "A"===t.currentTarget.tagName&&t.preventDefault();var n=e(this),i=l.getSelectorFromElement(this),o=[].slice.call(document.querySelectorAll(i));e(o).each((function(){var t=e(this),i=t.data(it)?"toggle":n.data();yt._jQueryInterface.call(t,i)}))})), /** * jQuery */ e.fn[nt]=yt._jQueryInterface,e.fn[nt].Constructor=yt,e.fn[nt].noConflict=function(){return e.fn[nt]=rt,yt._jQueryInterface};var bt="undefined"!=typeof window&&"undefined"!=typeof document&&"undefined"!=typeof navigator,Et=function(){for(var t=["Edge","Trident","Firefox"],e=0;e=0)return 1;return 0}();var wt=bt&&window.Promise?function(t){var e=!1;return function(){e||(e=!0,window.Promise.resolve().then((function(){e=!1,t()})))}}:function(t){var e=!1;return function(){e||(e=!0,setTimeout((function(){e=!1,t()}),Et))}}; /** * Create a debounced version of a method, that's asynchronously deferred * but called in the minimum time possible. * * @method * @memberof Popper.Utils * @argument {Function} fn * @returns {Function} */ /** * Check if the given variable is a function * @method * @memberof Popper.Utils * @argument {Any} functionToCheck - variable to check * @returns {Boolean} answer to: is a function? */ function Tt(t){return t&&"[object Function]"==={}.toString.call(t)} /** * Get CSS computed property of the given element * @method * @memberof Popper.Utils * @argument {Eement} element * @argument {String} property */function Ct(t,e){if(1!==t.nodeType)return[]; // NOTE: 1 DOM access here var n=t.ownerDocument.defaultView.getComputedStyle(t,null);return e?n[e]:n} /** * Returns the parentNode or the host of the element * @method * @memberof Popper.Utils * @argument {Element} element * @returns {Element} parent */function St(t){return"HTML"===t.nodeName?t:t.parentNode||t.host} /** * Returns the scrolling parent of the given element * @method * @memberof Popper.Utils * @argument {Element} element * @returns {Element} scroll parent */function Nt(t){ // Return body, `getScroll` will take care to get the correct `scrollTop` from it if(!t)return document.body;switch(t.nodeName){case"HTML":case"BODY":return t.ownerDocument.body;case"#document":return t.body} // Firefox want us to check `-x` and `-y` variations as well var e=Ct(t),n=e.overflow,i=e.overflowX,o=e.overflowY;return/(auto|scroll|overlay)/.test(n+o+i)?t:Nt(St(t))} /** * Returns the reference node of the reference object, or the reference object itself. * @method * @memberof Popper.Utils * @param {Element|Object} reference - the reference element (the popper will be relative to this) * @returns {Element} parent */function Dt(t){return t&&t.referenceNode?t.referenceNode:t}var At=bt&&!(!window.MSInputMethodContext||!document.documentMode),Ot=bt&&/MSIE 10/.test(navigator.userAgent); /** * Determines if the browser is Internet Explorer * @method * @memberof Popper.Utils * @param {Number} version to check * @returns {Boolean} isIE */ function kt(t){return 11===t?At:10===t?Ot:At||Ot} /** * Returns the offset parent of the given element * @method * @memberof Popper.Utils * @argument {Element} element * @returns {Element} offset parent */function It(t){if(!t)return document.documentElement; // Skip hidden elements which don't have an offsetParent for(var e=kt(10)?document.body:null,n=t.offsetParent||null // NOTE: 1 DOM access here ;n===e&&t.nextElementSibling;)n=(t=t.nextElementSibling).offsetParent;var i=n&&n.nodeName;return i&&"BODY"!==i&&"HTML"!==i? // .offsetParent will return the closest TH, TD or TABLE in case // no offsetParent is present, I hate this job... -1!==["TH","TD","TABLE"].indexOf(n.nodeName)&&"static"===Ct(n,"position")?It(n):n:t?t.ownerDocument.documentElement:document.documentElement} /** * Finds the root node (document, shadowDOM root) of the given element * @method * @memberof Popper.Utils * @argument {Element} node * @returns {Element} root node */ function xt(t){return null!==t.parentNode?xt(t.parentNode):t} /** * Finds the offset parent common to the two provided nodes * @method * @memberof Popper.Utils * @argument {Element} element1 * @argument {Element} element2 * @returns {Element} common offset parent */function jt(t,e){ // This check is needed to avoid errors in case one of the elements isn't defined for any reason if(!(t&&t.nodeType&&e&&e.nodeType))return document.documentElement; // Here we make sure to give as "start" the element that comes first in the DOM var n=t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_FOLLOWING,i=n?t:e,o=n?e:t,r=document.createRange();r.setStart(i,0),r.setEnd(o,0);var s,a,l=r.commonAncestorContainer; // Both nodes are inside #document if(t!==l&&e!==l||i.contains(o))return"BODY"===(a=(s=l).nodeName)||"HTML"!==a&&It(s.firstElementChild)!==s?It(l):l; // one of the nodes is inside shadowDOM, find which one var c=xt(t);return c.host?jt(c.host,e):jt(t,xt(e).host)} /** * Gets the scroll value of the given element in the given side (top and left) * @method * @memberof Popper.Utils * @argument {Element} element * @argument {String} side `top` or `left` * @returns {number} amount of scrolled pixels */function Lt(t,e){void 0===e&&(e="top");var n="top"===e?"scrollTop":"scrollLeft",i=t.nodeName;if("BODY"===i||"HTML"===i){var o=t.ownerDocument.documentElement;return(t.ownerDocument.scrollingElement||o)[n]}return t[n]} /* * Sum or subtract the element scroll values (left and top) from a given rect object * @method * @memberof Popper.Utils * @param {Object} rect - Rect object you want to change * @param {HTMLElement} element - The element from the function reads the scroll values * @param {Boolean} subtract - set to true if you want to subtract the scroll values * @return {Object} rect - The modifier rect object */ /* * Helper to detect borders of a given element * @method * @memberof Popper.Utils * @param {CSSStyleDeclaration} styles * Result of `getStyleComputedProperty` on the given element * @param {String} axis - `x` or `y` * @return {number} borders - The borders size of the given axis */ function Pt(t,e){var n="x"===e?"Left":"Top",i="Left"===n?"Right":"Bottom";return parseFloat(t["border"+n+"Width"])+parseFloat(t["border"+i+"Width"])}function Ft(t,e,n,i){return Math.max(e["offset"+t],e["scroll"+t],n["client"+t],n["offset"+t],n["scroll"+t],kt(10)?parseInt(n["offset"+t])+parseInt(i["margin"+("Height"===t?"Top":"Left")])+parseInt(i["margin"+("Height"===t?"Bottom":"Right")]):0)}function Rt(t){var e=t.body,n=t.documentElement,i=kt(10)&&getComputedStyle(n);return{height:Ft("Height",e,n,i),width:Ft("Width",e,n,i)}} /** * Given element offsets, generate an output similar to getBoundingClientRect * @method * @memberof Popper.Utils * @argument {Object} offsets * @returns {Object} ClientRect like output */function Bt(t){return Object.assign({},t,{right:t.left+t.width,bottom:t.top+t.height})} /** * Get bounding client rect of given element * @method * @memberof Popper.Utils * @param {HTMLElement} element * @return {Object} client rect */function Ht(t){var e={}; // IE10 10 FIX: Please, don't ask, the element isn't // considered in DOM in some circumstances... // This isn't reproducible in IE10 compatibility mode of IE11 try{if(kt(10)){e=t.getBoundingClientRect();var n=Lt(t,"top"),i=Lt(t,"left");e.top+=n,e.left+=i,e.bottom+=n,e.right+=i}else e=t.getBoundingClientRect()}catch(t){}var o={left:e.left,top:e.top,width:e.right-e.left,height:e.bottom-e.top},r="HTML"===t.nodeName?Rt(t.ownerDocument):{},s=r.width||t.clientWidth||o.width,a=r.height||t.clientHeight||o.height,l=t.offsetWidth-s,c=t.offsetHeight-a; // subtract scrollbar size from sizes // if an hypothetical scrollbar is detected, we must be sure it's not a `border` // we make this check conditional for performance reasons if(l||c){var h=Ct(t);l-=Pt(h,"x"),c-=Pt(h,"y"),o.width-=l,o.height-=c}return Bt(o)}function qt(t,e,n){void 0===n&&(n=!1);var i=kt(10),o="HTML"===e.nodeName,r=Ht(t),s=Ht(e),a=Nt(t),l=Ct(e),c=parseFloat(l.borderTopWidth),h=parseFloat(l.borderLeftWidth); // In cases where the parent is fixed, we must ignore negative scroll in offset calc n&&o&&(s.top=Math.max(s.top,0),s.left=Math.max(s.left,0));var u=Bt({top:r.top-s.top-c,left:r.left-s.left-h,width:r.width,height:r.height}); // Subtract margins of documentElement in case it's being used as parent // we do this only on HTML because it's the only element that behaves // differently when margins are applied to it. The margins are included in // the box of the documentElement, in the other cases not. if(u.marginTop=0,u.marginLeft=0,!i&&o){var f=parseFloat(l.marginTop),d=parseFloat(l.marginLeft);u.top-=c-f,u.bottom-=c-f,u.left-=h-d,u.right-=h-d, // Attach marginTop and marginLeft because in some circumstances we may need them u.marginTop=f,u.marginLeft=d}return(i&&!n?e.contains(a):e===a&&"BODY"!==a.nodeName)&&(u=function(t,e,n){void 0===n&&(n=!1);var i=Lt(e,"top"),o=Lt(e,"left"),r=n?-1:1;return t.top+=i*r,t.bottom+=i*r,t.left+=o*r,t.right+=o*r,t}(u,e)),u} /** * Check if the given element is fixed or is inside a fixed parent * @method * @memberof Popper.Utils * @argument {Element} element * @argument {Element} customContainer * @returns {Boolean} answer to "isFixed?" */ function Mt(t){var e=t.nodeName;if("BODY"===e||"HTML"===e)return!1;if("fixed"===Ct(t,"position"))return!0;var n=St(t);return!!n&&Mt(n)} /** * Finds the first parent of an element that has a transformed property defined * @method * @memberof Popper.Utils * @argument {Element} element * @returns {Element} first transformed parent or documentElement */function Qt(t){ // This check is needed to avoid errors in case one of the elements isn't defined for any reason if(!t||!t.parentElement||kt())return document.documentElement;for(var e=t.parentElement;e&&"none"===Ct(e,"transform");)e=e.parentElement;return e||document.documentElement} /** * Computed the boundaries limits and return them * @method * @memberof Popper.Utils * @param {HTMLElement} popper * @param {HTMLElement} reference * @param {number} padding * @param {HTMLElement} boundariesElement - Element used to define the boundaries * @param {Boolean} fixedPosition - Is in fixed position mode * @returns {Object} Coordinates of the boundaries */function Wt(t,e,n,i,o){void 0===o&&(o=!1); // NOTE: 1 DOM access here var r={top:0,left:0},s=o?Qt(t):jt(t,Dt(e)); // Handle viewport case if("viewport"===i)r=function(t,e){void 0===e&&(e=!1);var n=t.ownerDocument.documentElement,i=qt(t,n),o=Math.max(n.clientWidth,window.innerWidth||0),r=Math.max(n.clientHeight,window.innerHeight||0),s=e?0:Lt(n),a=e?0:Lt(n,"left");return Bt({top:s-i.top+i.marginTop,left:a-i.left+i.marginLeft,width:o,height:r})}(s,o);else{ // Handle other cases based on DOM element used as boundaries var a;"scrollParent"===i?"BODY"===(a=Nt(St(e))).nodeName&&(a=t.ownerDocument.documentElement):a="window"===i?t.ownerDocument.documentElement:i;var l=qt(a,s,o); // In case of HTML, we need a different computation if("HTML"!==a.nodeName||Mt(s)) // for all the other DOM elements, this one is good r=l;else{var c=Rt(t.ownerDocument),h=c.height,u=c.width;r.top+=l.top-l.marginTop,r.bottom=h+l.top,r.left+=l.left-l.marginLeft,r.right=u+l.left}} // Add paddings var f="number"==typeof(n=n||0);return r.left+=f?n:n.left||0,r.top+=f?n:n.top||0,r.right-=f?n:n.right||0,r.bottom-=f?n:n.bottom||0,r} /** * Utility used to transform the `auto` placement to the placement with more * available space. * @method * @memberof Popper.Utils * @argument {Object} data - The data object generated by update method * @argument {Object} options - Modifiers configuration and options * @returns {Object} The data object, properly modified */ function Ut(t,e,n,i,o,r){if(void 0===r&&(r=0),-1===t.indexOf("auto"))return t;var s=Wt(n,i,r,o),a={top:{width:s.width,height:e.top-s.top},right:{width:s.right-e.right,height:s.height},bottom:{width:s.width,height:s.bottom-e.bottom},left:{width:e.left-s.left,height:s.height}},l=Object.keys(a).map((function(t){return Object.assign({},{key:t},a[t],{area:(e=a[t],e.width*e.height)});var e})).sort((function(t,e){return e.area-t.area})),c=l.filter((function(t){var e=t.width,i=t.height;return e>=n.clientWidth&&i>=n.clientHeight})),h=c.length>0?c[0].key:l[0].key,u=t.split("-")[1];return h+(u?"-"+u:"")} /** * Get offsets to the reference element * @method * @memberof Popper.Utils * @param {Object} state * @param {Element} popper - the popper element * @param {Element} reference - the reference element (the popper will be relative to this) * @param {Element} fixedPosition - is in fixed position mode * @returns {Object} An object containing the offsets which will be applied to the popper */function Vt(t,e,n,i){return void 0===i&&(i=null),qt(n,i?Qt(e):jt(e,Dt(n)),i)} /** * Get the outer sizes of the given element (offset size + margins) * @method * @memberof Popper.Utils * @argument {Element} element * @returns {Object} object containing width and height properties */function Yt(t){var e=t.ownerDocument.defaultView.getComputedStyle(t),n=parseFloat(e.marginTop||0)+parseFloat(e.marginBottom||0),i=parseFloat(e.marginLeft||0)+parseFloat(e.marginRight||0);return{width:t.offsetWidth+i,height:t.offsetHeight+n}} /** * Get the opposite placement of the given one * @method * @memberof Popper.Utils * @argument {String} placement * @returns {String} flipped placement */function zt(t){var e={left:"right",right:"left",bottom:"top",top:"bottom"};return t.replace(/left|right|bottom|top/g,(function(t){return e[t]}))} /** * Get offsets to the popper * @method * @memberof Popper.Utils * @param {Object} position - CSS position the Popper will get applied * @param {HTMLElement} popper - the popper element * @param {Object} referenceOffsets - the reference offsets (the popper will be relative to this) * @param {String} placement - one of the valid placement options * @returns {Object} popperOffsets - An object containing the offsets which will be applied to the popper */function Kt(t,e,n){n=n.split("-")[0]; // Get popper node sizes var i=Yt(t),o={width:i.width,height:i.height},r=-1!==["right","left"].indexOf(n),s=r?"top":"left",a=r?"left":"top",l=r?"height":"width",c=r?"width":"height"; // Add position, width and height to our offsets object return o[s]=e[s]+e[l]/2-i[l]/2,o[a]=n===a?e[a]-i[c]:e[zt(a)],o} /** * Mimics the `find` method of Array * @method * @memberof Popper.Utils * @argument {Array} arr * @argument prop * @argument value * @returns index or -1 */function Xt(t,e){ // use native find if supported return Array.prototype.find?t.find(e):t.filter(e)[0]; // use `filter` to obtain the same behavior of `find` } /** * Return the index of the matching object * @method * @memberof Popper.Utils * @argument {Array} arr * @argument prop * @argument value * @returns index or -1 */ /** * Loop trough the list of modifiers and run them in order, * each of them will then edit the data object. * @method * @memberof Popper.Utils * @param {dataObject} data * @param {Array} modifiers * @param {String} ends - Optional modifier name used as stopper * @returns {dataObject} */ function Gt(t,e,n){return(void 0===n?t:t.slice(0,function(t,e,n){ // use native findIndex if supported if(Array.prototype.findIndex)return t.findIndex((function(t){return t[e]===n})); // use `find` + `indexOf` if `findIndex` isn't supported var i=Xt(t,(function(t){return t[e]===n}));return t.indexOf(i)}(t,"name",n))).forEach((function(t){t.function&& // eslint-disable-line dot-notation console.warn("`modifier.function` is deprecated, use `modifier.fn`!");var n=t.function||t.fn;// eslint-disable-line dot-notation t.enabled&&Tt(n)&&( // Add properties to offsets to make them a complete clientRect object // we do this before each modifier to make sure the previous one doesn't // mess with these values e.offsets.popper=Bt(e.offsets.popper),e.offsets.reference=Bt(e.offsets.reference),e=n(e,t))})),e} /** * Updates the position of the popper, computing the new offsets and applying * the new style.
* Prefer `scheduleUpdate` over `update` because of performance reasons. * @method * @memberof Popper */function $t(){ // if popper is destroyed, don't perform any further update if(!this.state.isDestroyed){var t={instance:this,styles:{},arrowStyles:{},attributes:{},flipped:!1,offsets:{}}; // compute reference element offsets t.offsets.reference=Vt(this.state,this.popper,this.reference,this.options.positionFixed), // compute auto placement, store placement inside the data object, // modifiers will be able to edit `placement` if needed // and refer to originalPlacement to know the original value t.placement=Ut(this.options.placement,t.offsets.reference,this.popper,this.reference,this.options.modifiers.flip.boundariesElement,this.options.modifiers.flip.padding), // store the computed placement inside `originalPlacement` t.originalPlacement=t.placement,t.positionFixed=this.options.positionFixed, // compute the popper offsets t.offsets.popper=Kt(this.popper,t.offsets.reference,t.placement),t.offsets.popper.position=this.options.positionFixed?"fixed":"absolute", // run the modifiers t=Gt(this.modifiers,t), // the first `update` will call `onCreate` callback // the other ones will call `onUpdate` callback this.state.isCreated?this.options.onUpdate(t):(this.state.isCreated=!0,this.options.onCreate(t))}} /** * Helper used to know if the given modifier is enabled. * @method * @memberof Popper.Utils * @returns {Boolean} */function Jt(t,e){return t.some((function(t){var n=t.name;return t.enabled&&n===e}))} /** * Get the prefixed supported property name * @method * @memberof Popper.Utils * @argument {String} property (camelCase) * @returns {String} prefixed property (camelCase or PascalCase, depending on the vendor prefix) */function Zt(t){for(var e=[!1,"ms","Webkit","Moz","O"],n=t.charAt(0).toUpperCase()+t.slice(1),i=0;i * It checks if the needed modifier is listed and enabled. * @method * @memberof Popper.Utils * @param {Array} modifiers - list of modifiers * @param {String} requestingName - name of requesting modifier * @param {String} requestedName - name of requested modifier * @returns {Boolean} */ function ce(t,e,n){var i=Xt(t,(function(t){return t.name===e})),o=!!i&&t.some((function(t){return t.name===n&&t.enabled&&t.order * Valid placements are: * - `auto` * - `top` * - `right` * - `bottom` * - `left` * * Each placement can have a variation from this list: * - `-start` * - `-end` * * Variations are interpreted easily if you think of them as the left to right * written languages. Horizontally (`top` and `bottom`), `start` is left and `end` * is right.
* Vertically (`left` and `right`), `start` is top and `end` is bottom. * * Some valid examples are: * - `top-end` (on top of reference, right aligned) * - `right-start` (on right of reference, top aligned) * - `bottom` (on bottom, centered) * - `auto-end` (on the side with more space available, alignment depends by placement) * * @static * @type {Array} * @enum {String} * @readonly * @method placements * @memberof Popper */ var he=["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"],ue=he.slice(3); // Get rid of `auto` `auto-start` and `auto-end` /** * Given an initial placement, returns all the subsequent placements * clockwise (or counter-clockwise). * * @method * @memberof Popper.Utils * @argument {String} placement - A valid placement (it accepts variations) * @argument {Boolean} counter - Set to true to walk the placements counterclockwise * @returns {Array} placements including their variations */ function fe(t,e){void 0===e&&(e=!1);var n=ue.indexOf(t),i=ue.slice(n+1).concat(ue.slice(0,n));return e?i.reverse():i}var de="flip",pe="clockwise",me="counterclockwise"; /** * @function * @memberof Modifiers * @argument {Object} data - The data object generated by update method * @argument {Object} options - Modifiers configuration and options * @returns {Object} The data object, properly modified */ /** * Parse an `offset` string to extrapolate `x` and `y` numeric offsets. * @function * @memberof {modifiers~offset} * @private * @argument {String} offset * @argument {Object} popperOffsets * @argument {Object} referenceOffsets * @argument {String} basePlacement * @returns {Array} a two cells array with x and y offsets in numbers */ function ge(t,e,n,i){var o=[0,0],r=-1!==["right","left"].indexOf(i),s=t.split(/(\+|\-)/).map((function(t){return t.trim()})),a=s.indexOf(Xt(s,(function(t){return-1!==t.search(/,|\s/)}))); // Use height if placement is left or right and index is 0 otherwise use width // in this way the first offset will use an axis and the second one // will use the other one s[a]&&-1===s[a].indexOf(",")&&console.warn("Offsets separated by white space(s) are deprecated, use a comma (,) instead."); // If divider is found, we divide the list of values and operands to divide // them by ofset X and Y. var l=/\s*,\s*|\s+/,c=-1!==a?[s.slice(0,a).concat([s[a].split(l)[0]]),[s[a].split(l)[1]].concat(s.slice(a+1))]:[s]; // Convert the values with units to absolute pixels to allow our computations return c=c.map((function(t,i){ // Most of the units rely on the orientation of the popper var o=(1===i?!r:r)?"height":"width",s=!1;return t.reduce((function(t,e){return""===t[t.length-1]&&-1!==["+","-"].indexOf(e)?(t[t.length-1]=e,s=!0,t):s?(t[t.length-1]+=e,s=!1,t):t.concat(e)}),[]).map((function(t){ /** * Converts a string containing value + unit into a px value number * @function * @memberof {modifiers~offset} * @private * @argument {String} str - Value + unit string * @argument {String} measurement - `height` or `width` * @argument {Object} popperOffsets * @argument {Object} referenceOffsets * @returns {Number|String} * Value in pixels, or original string if no values were extracted */ return function(t,e,n,i){ // separate value from unit var o=t.match(/((?:\-|\+)?\d*\.?\d*)(.*)/),r=+o[1],s=o[2]; // If it's not a number it's an operator, I guess if(!r)return t;if(0===s.indexOf("%")){return Bt("%p"===s?n:i)[e]/100*r}return"vh"===s||"vw"===s?("vh"===s?Math.max(document.documentElement.clientHeight,window.innerHeight||0):Math.max(document.documentElement.clientWidth,window.innerWidth||0))/100*r:r}(t,o,e,n)}))})), // Loop trough the offsets arrays and execute the operations c.forEach((function(t,e){t.forEach((function(n,i){se(n)&&(o[e]+=n*("-"===t[i-1]?-1:1))}))})),o} /** * @function * @memberof Modifiers * @argument {Object} data - The data object generated by update method * @argument {Object} options - Modifiers configuration and options * @argument {Number|String} options.offset=0 * The offset value as described in the modifier description * @returns {Object} The data object, properly modified */ /** * Modifier function, each modifier can have a function of this type assigned * to its `fn` property.
* These functions will be called on each update, this means that you must * make sure they are performant enough to avoid performance bottlenecks. * * @function ModifierFn * @argument {dataObject} data - The data object generated by `update` method * @argument {Object} options - Modifiers configuration and options * @returns {dataObject} The data object, properly modified */ /** * Modifiers are plugins used to alter the behavior of your poppers.
* Popper.js uses a set of 9 modifiers to provide all the basic functionalities * needed by the library. * * Usually you don't want to override the `order`, `fn` and `onLoad` props. * All the other properties are configurations that could be tweaked. * @namespace modifiers */ var _e={ /** * Modifier used to shift the popper on the start or end of its reference * element.
* It will read the variation of the `placement` property.
* It can be one either `-end` or `-start`. * @memberof modifiers * @inner */ shift:{ /** @prop {number} order=100 - Index used to define the order of execution */ order:100, /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */ enabled:!0, /** @prop {ModifierFn} */ fn: /** * @function * @memberof Modifiers * @argument {Object} data - The data object generated by `update` method * @argument {Object} options - Modifiers configuration and options * @returns {Object} The data object, properly modified */ function(t){var e,n,i=t.placement,o=i.split("-")[0],r=i.split("-")[1]; // if shift shiftvariation is specified, run the modifier if(r){var s=t.offsets,a=s.reference,l=s.popper,c=-1!==["bottom","top"].indexOf(o),h=c?"left":"top",u=c?"width":"height",f={start:(e={},e[h]=a[h],e),end:(n={},n[h]=a[h]+a[u]-l[u],n)};t.offsets.popper=Object.assign({},l,f[r])}return t} /** * @function * @memberof Modifiers * @argument {Object} data - The data object generated by update method * @argument {Object} options - Modifiers configuration and options * @returns {Object} The data object, properly modified */}, /** * The `offset` modifier can shift your popper on both its axis. * * It accepts the following units: * - `px` or unit-less, interpreted as pixels * - `%` or `%r`, percentage relative to the length of the reference element * - `%p`, percentage relative to the length of the popper element * - `vw`, CSS viewport width unit * - `vh`, CSS viewport height unit * * For length is intended the main axis relative to the placement of the popper.
* This means that if the placement is `top` or `bottom`, the length will be the * `width`. In case of `left` or `right`, it will be the `height`. * * You can provide a single value (as `Number` or `String`), or a pair of values * as `String` divided by a comma or one (or more) white spaces.
* The latter is a deprecated method because it leads to confusion and will be * removed in v2.
* Additionally, it accepts additions and subtractions between different units. * Note that multiplications and divisions aren't supported. * * Valid examples are: * ``` * 10 * '10%' * '10, 10' * '10%, 10' * '10 + 10%' * '10 - 5vh + 3%' * '-10px + 5vh, 5px - 6%' * ``` * > **NB**: If you desire to apply offsets to your poppers in a way that may make them overlap * > with their reference element, unfortunately, you will have to disable the `flip` modifier. * > You can read more on this at this [issue](https://github.com/FezVrasta/popper.js/issues/373). * * @memberof modifiers * @inner */ offset:{ /** @prop {number} order=200 - Index used to define the order of execution */ order:200, /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */ enabled:!0, /** @prop {ModifierFn} */ fn:function(t,e){var n,i=e.offset,o=t.placement,r=t.offsets,s=r.popper,a=r.reference,l=o.split("-")[0];return n=se(+i)?[+i,0]:ge(i,s,a,l),"left"===l?(s.top+=n[0],s.left-=n[1]):"right"===l?(s.top+=n[0],s.left+=n[1]):"top"===l?(s.left+=n[0],s.top-=n[1]):"bottom"===l&&(s.left+=n[0],s.top+=n[1]),t.popper=s,t} /** * @function * @memberof Modifiers * @argument {Object} data - The data object generated by `update` method * @argument {Object} options - Modifiers configuration and options * @returns {Object} The data object, properly modified */, /** @prop {Number|String} offset=0 * The offset value as described in the modifier description */ offset:0}, /** * Modifier used to prevent the popper from being positioned outside the boundary. * * A scenario exists where the reference itself is not within the boundaries.
* We can say it has "escaped the boundaries" — or just "escaped".
* In this case we need to decide whether the popper should either: * * - detach from the reference and remain "trapped" in the boundaries, or * - if it should ignore the boundary and "escape with its reference" * * When `escapeWithReference` is set to`true` and reference is completely * outside its boundaries, the popper will overflow (or completely leave) * the boundaries in order to remain attached to the edge of the reference. * * @memberof modifiers * @inner */ preventOverflow:{ /** @prop {number} order=300 - Index used to define the order of execution */ order:300, /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */ enabled:!0, /** @prop {ModifierFn} */ fn:function(t,e){var n=e.boundariesElement||It(t.instance.popper); // If offsetParent is the reference element, we really want to // go one step up and use the next offsetParent as reference to // avoid to make this modifier completely useless and look like broken t.instance.reference===n&&(n=It(n)); // NOTE: DOM access here // resets the popper's position so that the document size can be calculated excluding // the size of the popper element itself var i=Zt("transform"),o=t.instance.popper.style,r=o.top,s=o.left,a=o[i];o.top="",o.left="",o[i]="";var l=Wt(t.instance.popper,t.instance.reference,e.padding,n,t.positionFixed); // NOTE: DOM access here // restores the original style properties after the offsets have been computed o.top=r,o.left=s,o[i]=a,e.boundaries=l;var c=e.priority,h=t.offsets.popper,u={primary:function(t){var n,i=h[t];return h[t]l[t]&&!e.escapeWithReference&&(o=Math.min(h[i],l[t]-("right"===t?h.width:h.height))),(n={})[i]=o,n}};return c.forEach((function(t){var e=-1!==["left","top"].indexOf(t)?"primary":"secondary";h=Object.assign({},h,u[e](t))})),t.offsets.popper=h,t}, /** * @prop {Array} [priority=['left','right','top','bottom']] * Popper will try to prevent overflow following these priorities by default, * then, it could overflow on the left and on top of the `boundariesElement` */ priority:["left","right","top","bottom"], /** * @prop {number} padding=5 * Amount of pixel used to define a minimum distance between the boundaries * and the popper. This makes sure the popper always has a little padding * between the edges of its container */ padding:5, /** * @prop {String|HTMLElement} boundariesElement='scrollParent' * Boundaries used by the modifier. Can be `scrollParent`, `window`, * `viewport` or any DOM element. */ boundariesElement:"scrollParent"}, /** * Modifier used to make sure the reference and its popper stay near each other * without leaving any gap between the two. Especially useful when the arrow is * enabled and you want to ensure that it points to its reference element. * It cares only about the first axis. You can still have poppers with margin * between the popper and its reference element. * @memberof modifiers * @inner */ keepTogether:{ /** @prop {number} order=400 - Index used to define the order of execution */ order:400, /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */ enabled:!0, /** @prop {ModifierFn} */ fn: /** * @function * @memberof Modifiers * @argument {Object} data - The data object generated by update method * @argument {Object} options - Modifiers configuration and options * @returns {Object} The data object, properly modified */ function(t){var e=t.offsets,n=e.popper,i=e.reference,o=t.placement.split("-")[0],r=Math.floor,s=-1!==["top","bottom"].indexOf(o),a=s?"right":"bottom",l=s?"left":"top",c=s?"width":"height";return n[a]r(i[a])&&(t.offsets.popper[l]=r(i[a])),t}}, /** * This modifier is used to move the `arrowElement` of the popper to make * sure it is positioned between the reference element and its popper element. * It will read the outer size of the `arrowElement` node to detect how many * pixels of conjunction are needed. * * It has no effect if no `arrowElement` is provided. * @memberof modifiers * @inner */ arrow:{ /** @prop {number} order=500 - Index used to define the order of execution */ order:500, /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */ enabled:!0, /** @prop {ModifierFn} */ fn:function(t,e){var n; // arrow depends on keepTogether in order to work if(!ce(t.instance.modifiers,"arrow","keepTogether"))return t;var i=e.element; // if arrowElement is a string, suppose it's a CSS selector if("string"==typeof i){ // if arrowElement is not found, don't run the modifier if(!(i=t.instance.popper.querySelector(i)))return t}else // if the arrowElement isn't a query selector we must check that the // provided DOM node is child of its popper node if(!t.instance.popper.contains(i))return console.warn("WARNING: `arrow.element` must be child of its popper element!"),t;var o=t.placement.split("-")[0],r=t.offsets,s=r.popper,a=r.reference,l=-1!==["left","right"].indexOf(o),c=l?"height":"width",h=l?"Top":"Left",u=h.toLowerCase(),f=l?"left":"top",d=l?"bottom":"right",p=Yt(i)[c]; // extends keepTogether behavior making sure the popper and its // reference have enough pixels in conjunction // top/left side a[d]-ps[d]&&(t.offsets.popper[u]+=a[u]+p-s[d]),t.offsets.popper=Bt(t.offsets.popper); // compute center of the popper var m=a[u]+a[c]/2-p/2,g=Ct(t.instance.popper),_=parseFloat(g["margin"+h]),v=parseFloat(g["border"+h+"Width"]),y=m-t.offsets.popper[u]-_-v; // Compute the sideValue using the updated popper offsets // take popper margin in account because we don't have this info available // prevent arrowElement from being placed not contiguously to its popper return y=Math.max(Math.min(s[c]-p,y),0),t.arrowElement=i,t.offsets.arrow=((n={})[u]=Math.round(y),n[f]="",n),t} /** * Get the opposite placement variation of the given one * @method * @memberof Popper.Utils * @argument {String} placement variation * @returns {String} flipped placement variation */, /** @prop {String|HTMLElement} element='[x-arrow]' - Selector or node used as arrow */ element:"[x-arrow]"}, /** * Modifier used to flip the popper's placement when it starts to overlap its * reference element. * * Requires the `preventOverflow` modifier before it in order to work. * * **NOTE:** this modifier will interrupt the current update cycle and will * restart it if it detects the need to flip the placement. * @memberof modifiers * @inner */ flip:{ /** @prop {number} order=600 - Index used to define the order of execution */ order:600, /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */ enabled:!0, /** @prop {ModifierFn} */ fn:function(t,e){ // if `inner` modifier is enabled, we can't use the `flip` modifier if(Jt(t.instance.modifiers,"inner"))return t;if(t.flipped&&t.placement===t.originalPlacement) // seems like flip is trying to loop, probably there's not enough space on any of the flippable sides return t;var n=Wt(t.instance.popper,t.instance.reference,e.padding,e.boundariesElement,t.positionFixed),i=t.placement.split("-")[0],o=zt(i),r=t.placement.split("-")[1]||"",s=[];switch(e.behavior){case de:s=[i,o];break;case pe:s=fe(i);break;case me:s=fe(i,!0);break;default:s=e.behavior}return s.forEach((function(a,l){if(i!==a||s.length===l+1)return t;i=t.placement.split("-")[0],o=zt(i);var c=t.offsets.popper,h=t.offsets.reference,u=Math.floor,f="left"===i&&u(c.right)>u(h.left)||"right"===i&&u(c.left)u(h.top)||"bottom"===i&&u(c.top)u(n.right),m=u(c.top)u(n.bottom),_="left"===i&&d||"right"===i&&p||"top"===i&&m||"bottom"===i&&g,v=-1!==["top","bottom"].indexOf(i),y=!!e.flipVariations&&(v&&"start"===r&&d||v&&"end"===r&&p||!v&&"start"===r&&m||!v&&"end"===r&&g),b=!!e.flipVariationsByContent&&(v&&"start"===r&&p||v&&"end"===r&&d||!v&&"start"===r&&g||!v&&"end"===r&&m),E=y||b;(f||_||E)&&( // this boolean to detect any flip loop t.flipped=!0,(f||_)&&(i=s[l+1]),E&&(r=function(t){return"end"===t?"start":"start"===t?"end":t}(r)),t.placement=i+(r?"-"+r:""), // this object contains `position`, we want to preserve it along with // any additional property we may add in the future t.offsets.popper=Object.assign({},t.offsets.popper,Kt(t.instance.popper,t.offsets.reference,t.placement)),t=Gt(t.instance.modifiers,t,"flip"))})),t}, /** * @prop {String|Array} behavior='flip' * The behavior used to change the popper's placement. It can be one of * `flip`, `clockwise`, `counterclockwise` or an array with a list of valid * placements (with optional variations) */ behavior:"flip", /** * @prop {number} padding=5 * The popper will flip if it hits the edges of the `boundariesElement` */ padding:5, /** * @prop {String|HTMLElement} boundariesElement='viewport' * The element which will define the boundaries of the popper position. * The popper will never be placed outside of the defined boundaries * (except if `keepTogether` is enabled) */ boundariesElement:"viewport", /** * @prop {Boolean} flipVariations=false * The popper will switch placement variation between `-start` and `-end` when * the reference element overlaps its boundaries. * * The original placement should have a set variation. */ flipVariations:!1, /** * @prop {Boolean} flipVariationsByContent=false * The popper will switch placement variation between `-start` and `-end` when * the popper element overlaps its reference boundaries. * * The original placement should have a set variation. */ flipVariationsByContent:!1}, /** * Modifier used to make the popper flow toward the inner of the reference element. * By default, when this modifier is disabled, the popper will be placed outside * the reference element. * @memberof modifiers * @inner */ inner:{ /** @prop {number} order=700 - Index used to define the order of execution */ order:700, /** @prop {Boolean} enabled=false - Whether the modifier is enabled or not */ enabled:!1, /** @prop {ModifierFn} */ fn: /** * @function * @memberof Modifiers * @argument {Object} data - The data object generated by `update` method * @argument {Object} options - Modifiers configuration and options * @returns {Object} The data object, properly modified */ function(t){var e=t.placement,n=e.split("-")[0],i=t.offsets,o=i.popper,r=i.reference,s=-1!==["left","right"].indexOf(n),a=-1===["top","left"].indexOf(n);return o[s?"left":"top"]=r[n]-(a?o[s?"width":"height"]:0),t.placement=zt(e),t.offsets.popper=Bt(o),t}}, /** * Modifier used to hide the popper when its reference element is outside of the * popper boundaries. It will set a `x-out-of-boundaries` attribute which can * be used to hide with a CSS selector the popper when its reference is * out of boundaries. * * Requires the `preventOverflow` modifier before it in order to work. * @memberof modifiers * @inner */ hide:{ /** @prop {number} order=800 - Index used to define the order of execution */ order:800, /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */ enabled:!0, /** @prop {ModifierFn} */ fn:function(t){if(!ce(t.instance.modifiers,"hide","preventOverflow"))return t;var e=t.offsets.reference,n=Xt(t.instance.modifiers,(function(t){return"preventOverflow"===t.name})).boundaries;if(e.bottomn.right||e.top>n.bottom||e.right the positioning is relative to the bottom of the screen (excluding the scrollbar) // and not the bottom of the html element "HTML"===c.nodeName?-c.clientHeight+f.bottom:-h.height+f.bottom:f.top,s="right"===p?"HTML"===c.nodeName?-c.clientWidth+f.right:-h.width+f.right:f.left,l&&m)u[m]="translate3d("+s+"px, "+a+"px, 0)",u[d]=0,u[p]=0,u.willChange="transform";else{ // othwerise, we use the standard `top`, `left`, `bottom` and `right` properties var g="bottom"===d?-1:1,_="right"===p?-1:1;u[d]=a*g,u[p]=s*_,u.willChange=d+", "+p} // Attributes var v={"x-placement":t.placement}; // Update `data` attributes, styles and arrowStyles return t.attributes=Object.assign({},v,t.attributes),t.styles=Object.assign({},u,t.styles),t.arrowStyles=Object.assign({},t.offsets.arrow,t.arrowStyles),t}, /** * @prop {Boolean} gpuAcceleration=true * If true, it uses the CSS 3D transformation to position the popper. * Otherwise, it will use the `top` and `left` properties */ gpuAcceleration:!0, /** * @prop {string} [x='bottom'] * Where to anchor the X axis (`bottom` or `top`). AKA X offset origin. * Change this if your popper should grow in a direction different from `bottom` */ x:"bottom", /** * @prop {string} [x='left'] * Where to anchor the Y axis (`left` or `right`). AKA Y offset origin. * Change this if your popper should grow in a direction different from `right` */ y:"right"}, /** * Applies the computed styles to the popper element. * * All the DOM manipulations are limited to this modifier. This is useful in case * you want to integrate Popper.js inside a framework or view library and you * want to delegate all the DOM manipulations to it. * * Note that if you disable this modifier, you must make sure the popper element * has its position set to `absolute` before Popper.js can do its work! * * Just disable this modifier and define your own to achieve the desired effect. * * @memberof modifiers * @inner */ applyStyle:{ /** @prop {number} order=900 - Index used to define the order of execution */ order:900, /** @prop {Boolean} enabled=true - Whether the modifier is enabled or not */ enabled:!0, /** @prop {ModifierFn} */ fn: /** * @function * @memberof Modifiers * @argument {Object} data - The data object generated by `update` method * @argument {Object} data.styles - List of style properties - values to apply to popper element * @argument {Object} data.attributes - List of attribute properties - values to apply to popper element * @argument {Object} options - Modifiers configuration and options * @returns {Object} The same data object */ function(t){var e,n; // any property present in `data.styles` will be applied to the popper, // in this way we can make the 3rd party modifiers add custom styles to it // Be aware, modifiers could override the properties defined in the previous // lines of this modifier! return ae(t.instance.popper,t.styles), // any property present in `data.attributes` will be applied to the popper, // they will be set as HTML attributes of the element e=t.instance.popper,n=t.attributes,Object.keys(n).forEach((function(t){!1!==n[t]?e.setAttribute(t,n[t]):e.removeAttribute(t)})), // if arrowElement is defined and arrowStyles has some properties t.arrowElement&&Object.keys(t.arrowStyles).length&&ae(t.arrowElement,t.arrowStyles),t} /** * Set the x-placement attribute before everything else because it could be used * to add margins to the popper margins needs to be calculated to get the * correct popper offsets. * @method * @memberof Popper.modifiers * @param {HTMLElement} reference - The reference element used to position the popper * @param {HTMLElement} popper - The HTML element used as popper * @param {Object} options - Popper.js options */, /** @prop {Function} */ onLoad:function(t,e,n,i,o){ // compute reference element offsets var r=Vt(0,e,t,n.positionFixed),s=Ut(n.placement,r,e,t,n.modifiers.flip.boundariesElement,n.modifiers.flip.padding); // compute auto placement, store placement inside the data object, // modifiers will be able to edit `placement` if needed // and refer to originalPlacement to know the original value return e.setAttribute("x-placement",s), // Apply `position` to popper before anything else because // without the position applied we can't guarantee correct computations ae(e,{position:n.positionFixed?"fixed":"absolute"}),n}, /** * @deprecated since version 1.10.0, the property moved to `computeStyle` modifier * @prop {Boolean} gpuAcceleration=true * If true, it uses the CSS 3D transformation to position the popper. * Otherwise, it will use the `top` and `left` properties */ gpuAcceleration:void 0}},ve={ /** * Popper's placement. * @prop {Popper.placements} placement='bottom' */ placement:"bottom", /** * Set this to true if you want popper to position it self in 'fixed' mode * @prop {Boolean} positionFixed=false */ positionFixed:!1, /** * Whether events (resize, scroll) are initially enabled. * @prop {Boolean} eventsEnabled=true */ eventsEnabled:!0, /** * Set to true if you want to automatically remove the popper when * you call the `destroy` method. * @prop {Boolean} removeOnDestroy=false */ removeOnDestroy:!1, /** * Callback called when the popper is created.
* By default, it is set to no-op.
* Access Popper.js instance with `data.instance`. * @prop {onCreate} */ onCreate:function(){}, /** * Callback called when the popper is updated. This callback is not called * on the initialization/creation of the popper, but only on subsequent * updates.
* By default, it is set to no-op.
* Access Popper.js instance with `data.instance`. * @prop {onUpdate} */ onUpdate:function(){}, /** * List of modifiers used to modify the offsets before they are applied to the popper. * They provide most of the functionalities of Popper.js. * @prop {modifiers} */ modifiers:_e},ye=function t(e,n,i){var o=this;void 0===i&&(i={}), // make update() debounced, so that it only runs at most once-per-tick this.update=wt(this.update.bind(this)),this.scheduleUpdate=this.scheduleUpdate.bind(this), // with {} we create a new object with the options inside it this.options=Object.assign({},t.Defaults,i), // init state this.state={isDestroyed:!1,isCreated:!1,scrollParents:[]}, // get reference and popper elements (allow jQuery wrappers) this.reference=e&&e.jquery?e[0]:e,this.popper=n&&n.jquery?n[0]:n, // Deep merge modifiers options this.options.modifiers={},Object.keys(Object.assign({},t.Defaults.modifiers,i.modifiers)).forEach((function(e){o.options.modifiers[e]=Object.assign({},t.Defaults.modifiers[e]||{}, // If there are custom options, override and merge with default ones i.modifiers?i.modifiers[e]:{})})), // Refactoring modifiers' list (Object => Array) this.modifiers=Object.keys(this.options.modifiers).map((function(t){return Object.assign({},{name:t},o.options.modifiers[t])})).sort((function(t,e){return t.order-e.order})), // modifiers have the ability to execute arbitrary code when Popper.js get inited // such code is executed in the same order of its modifier // they could add new properties to their options configuration // BE AWARE: don't add options to `options.modifiers.name` but to `modifierOptions`! this.modifiers.forEach((function(t){t.enabled&&Tt(t.onLoad)&&t.onLoad(o.reference,o.popper,o.options,t,o.state)})), // fire the first update to position the popper in the right place this.update();var r=this.options.eventsEnabled;r&& // setup event listeners, they will take care of update the position in specific situations this.enableEventListeners(),this.state.eventsEnabled=r}; /** * The `dataObject` is an object containing all the information used by Popper.js. * This object is passed to modifiers and to the `onCreate` and `onUpdate` callbacks. * @name dataObject * @property {Object} data.instance The Popper.js instance * @property {String} data.placement Placement applied to popper * @property {String} data.originalPlacement Placement originally defined on init * @property {Boolean} data.flipped True if popper has been flipped by flip modifier * @property {Boolean} data.hide True if the reference element is out of boundaries, useful to know when to hide the popper * @property {HTMLElement} data.arrowElement Node used as arrow by arrow modifier * @property {Object} data.styles Any CSS property defined here will be applied to the popper. It expects the JavaScript nomenclature (eg. `marginBottom`) * @property {Object} data.arrowStyles Any CSS property defined here will be applied to the popper arrow. It expects the JavaScript nomenclature (eg. `marginBottom`) * @property {Object} data.boundaries Offsets of the popper boundaries * @property {Object} data.offsets The measurements of popper, reference and arrow elements * @property {Object} data.offsets.popper `top`, `left`, `width`, `height` values * @property {Object} data.offsets.reference `top`, `left`, `width`, `height` values * @property {Object} data.offsets.arrow] `top` and `left` offsets, only one of them will be different from 0 */ /** * Default options provided to Popper.js constructor.
* These can be overridden using the `options` argument of Popper.js.
* To override an option, simply pass an object with the same * structure of the `options` object, as the 3rd argument. For example: * ``` * new Popper(ref, pop, { * modifiers: { * preventOverflow: { enabled: false } * } * }) * ``` * @type {Object} * @static * @memberof Popper */ // We can't use class properties because they don't get listed in the // class prototype and break stuff like Sinon stubs ye.prototype.update=function(){return $t.call(this)},ye.prototype.destroy=function(){return te.call(this)},ye.prototype.enableEventListeners=function(){return oe.call(this)},ye.prototype.disableEventListeners=function(){return re.call(this)}, /** * Schedules an update. It will run on the next UI update available. * @method scheduleUpdate * @memberof Popper */ ye.prototype.scheduleUpdate=function(){return requestAnimationFrame(this.update)}, /** * Collection of utilities useful when writing custom modifiers. * Starting from version 1.7, this method is available only if you * include `popper-utils.js` before `popper.js`. * * **DEPRECATION**: This way to access PopperUtils is deprecated * and will be removed in v2! Use the PopperUtils module directly instead. * Due to the high instability of the methods contained in Utils, we can't * guarantee them to follow semver. Use them at your own risk! * @static * @private * @type {Object} * @deprecated since version 1.8 * @member Utils * @memberof Popper */ ye.Utils=("undefined"!=typeof window?window:global).PopperUtils,ye.placements=he,ye.Defaults=ve; /** * Constants */ var be="dropdown",Ee="bs.dropdown",we="."+Ee,Te=".data-api",Ce=e.fn[be],Se=new RegExp("38|40|27"),Ne="disabled",De="show",Ae="dropdown-menu-right",Oe="hide"+we,ke="hidden"+we,Ie="show"+we,xe="shown"+we,je="click"+we,Le="click"+we+Te,Pe="keydown"+we+Te,Fe="keyup"+we+Te,Re='[data-toggle="dropdown"]',Be=".dropdown-menu",He={offset:0,flip:!0,boundary:"scrollParent",reference:"toggle",display:"dynamic",popperConfig:null},qe={offset:"(number|string|function)",flip:"boolean",boundary:"(string|element)",reference:"(string|element)",display:"string",popperConfig:"(null|object)"},Me=function(){function t(t,e){this._element=t,this._popper=null,this._config=this._getConfig(e),this._menu=this._getMenuElement(),this._inNavbar=this._detectNavbar(),this._addEventListeners()} // Getters var n=t.prototype; // Public return n.toggle=function(){if(!this._element.disabled&&!e(this._element).hasClass(Ne)){var n=e(this._menu).hasClass(De);t._clearMenus(),n||this.show(!0)}},n.show=function(n){if(void 0===n&&(n=!1),!(this._element.disabled||e(this._element).hasClass(Ne)||e(this._menu).hasClass(De))){var i={relatedTarget:this._element},o=e.Event(Ie,i),r=t._getParentFromElement(this._element);if(e(r).trigger(o),!o.isDefaultPrevented()){ // Totally disable Popper for Dropdowns in Navbar if(!this._inNavbar&&n){ // Check for Popper dependency if(void 0===ye)throw new TypeError("Bootstrap's dropdowns require Popper (https://popper.js.org)");var s=this._element;"parent"===this._config.reference?s=r:l.isElement(this._config.reference)&&(s=this._config.reference, // Check if it's jQuery element void 0!==this._config.reference.jquery&&(s=this._config.reference[0])), // If boundary is not `scrollParent`, then set position to `static` // to allow the menu to "escape" the scroll parent's boundaries // https://github.com/twbs/bootstrap/issues/24251 "scrollParent"!==this._config.boundary&&e(r).addClass("position-static"),this._popper=new ye(s,this._menu,this._getPopperConfig())} // If this is a touch-enabled device we add extra // empty mouseover listeners to the body's immediate children; // only needed because of broken event delegation on iOS // https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html "ontouchstart"in document.documentElement&&0===e(r).closest(".navbar-nav").length&&e(document.body).children().on("mouseover",null,e.noop),this._element.focus(),this._element.setAttribute("aria-expanded",!0),e(this._menu).toggleClass(De),e(r).toggleClass(De).trigger(e.Event(xe,i))}}},n.hide=function(){if(!this._element.disabled&&!e(this._element).hasClass(Ne)&&e(this._menu).hasClass(De)){var n={relatedTarget:this._element},i=e.Event(Oe,n),o=t._getParentFromElement(this._element);e(o).trigger(i),i.isDefaultPrevented()||(this._popper&&this._popper.destroy(),e(this._menu).toggleClass(De),e(o).toggleClass(De).trigger(e.Event(ke,n)))}},n.dispose=function(){e.removeData(this._element,Ee),e(this._element).off(we),this._element=null,this._menu=null,null!==this._popper&&(this._popper.destroy(),this._popper=null)},n.update=function(){this._inNavbar=this._detectNavbar(),null!==this._popper&&this._popper.scheduleUpdate()} // Private ,n._addEventListeners=function(){var t=this;e(this._element).on(je,(function(e){e.preventDefault(),e.stopPropagation(),t.toggle()}))},n._getConfig=function(t){return t=o({},this.constructor.Default,e(this._element).data(),t),l.typeCheckConfig(be,t,this.constructor.DefaultType),t},n._getMenuElement=function(){if(!this._menu){var e=t._getParentFromElement(this._element);e&&(this._menu=e.querySelector(Be))}return this._menu},n._getPlacement=function(){var t=e(this._element.parentNode),n="bottom-start"; // Handle dropup return t.hasClass("dropup")?n=e(this._menu).hasClass(Ae)?"top-end":"top-start":t.hasClass("dropright")?n="right-start":t.hasClass("dropleft")?n="left-start":e(this._menu).hasClass(Ae)&&(n="bottom-end"),n},n._detectNavbar=function(){return e(this._element).closest(".navbar").length>0},n._getOffset=function(){var t=this,e={};return"function"==typeof this._config.offset?e.fn=function(e){return e.offsets=o({},e.offsets,t._config.offset(e.offsets,t._element)),e}:e.offset=this._config.offset,e},n._getPopperConfig=function(){var t={placement:this._getPlacement(),modifiers:{offset:this._getOffset(),flip:{enabled:this._config.flip},preventOverflow:{boundariesElement:this._config.boundary}}}; // Disable Popper if we have a static display return"static"===this._config.display&&(t.modifiers.applyStyle={enabled:!1}),o({},t,this._config.popperConfig)} // Static ,t._jQueryInterface=function(n){return this.each((function(){var i=e(this).data(Ee);if(i||(i=new t(this,"object"==typeof n?n:null),e(this).data(Ee,i)),"string"==typeof n){if(void 0===i[n])throw new TypeError('No method named "'+n+'"');i[n]()}}))},t._clearMenus=function(n){if(!n||3!==n.which&&("keyup"!==n.type||9===n.which))for(var i=[].slice.call(document.querySelectorAll(Re)),o=0,r=i.length;o not a dropdown command // If input/textarea: // - If space key => not a dropdown command // - If key is other than escape // - If key is not up or down => not a dropdown command // - If trigger inside the menu => not a dropdown command if(!(/input|textarea/i.test(n.target.tagName)?32===n.which||27!==n.which&&(40!==n.which&&38!==n.which||e(n.target).closest(Be).length):!Se.test(n.which))&&!this.disabled&&!e(this).hasClass(Ne)){var i=t._getParentFromElement(this),o=e(i).hasClass(De);if(o||27!==n.which){if(n.preventDefault(),n.stopPropagation(),!o||27===n.which||32===n.which)return 27===n.which&&e(i.querySelector(Re)).trigger("focus"),void e(this).trigger("click");var r=[].slice.call(i.querySelectorAll(".dropdown-menu .dropdown-item:not(.disabled):not(:disabled)")).filter((function(t){return e(t).is(":visible")}));if(0!==r.length){var s=r.indexOf(n.target);38===n.which&&s>0&& // Up s--,40===n.which&&sdocument.documentElement.clientHeight;i||(this._element.style.overflowY="hidden"),this._element.classList.add(Xe);var o=l.getTransitionDurationFromElement(this._dialog);e(this._element).off(l.TRANSITION_END),e(this._element).one(l.TRANSITION_END,(function(){t._element.classList.remove(Xe),i||e(t._element).one(l.TRANSITION_END,(function(){t._element.style.overflowY=""})).emulateTransitionEnd(t._element,o)})).emulateTransitionEnd(o),this._element.focus()}},n._showElement=function(t){var n=this,i=e(this._element).hasClass(ze),o=this._dialog?this._dialog.querySelector(".modal-body"):null;this._element.parentNode&&this._element.parentNode.nodeType===Node.ELEMENT_NODE|| // Don't move modal's DOM position document.body.appendChild(this._element),this._element.style.display="block",this._element.removeAttribute("aria-hidden"),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),e(this._dialog).hasClass("modal-dialog-scrollable")&&o?o.scrollTop=0:this._element.scrollTop=0,i&&l.reflow(this._element),e(this._element).addClass(Ke),this._config.focus&&this._enforceFocus();var r=e.Event(tn,{relatedTarget:t}),s=function(){n._config.focus&&n._element.focus(),n._isTransitioning=!1,e(n._element).trigger(r)};if(i){var a=l.getTransitionDurationFromElement(this._dialog);e(this._dialog).one(l.TRANSITION_END,s).emulateTransitionEnd(a)}else s()},n._enforceFocus=function(){var t=this;e(document).off(en).on(en,(function(n){document!==n.target&&t._element!==n.target&&0===e(t._element).has(n.target).length&&t._element.focus()}))},n._setEscapeEvent=function(){var t=this;this._isShown?e(this._element).on(rn,(function(e){t._config.keyboard&&27===e.which?(e.preventDefault(),t.hide()):t._config.keyboard||27!==e.which||t._triggerBackdropTransition()})):this._isShown||e(this._element).off(rn)},n._setResizeEvent=function(){var t=this;this._isShown?e(window).on(nn,(function(e){return t.handleUpdate(e)})):e(window).off(nn)},n._hideModal=function(){var t=this;this._element.style.display="none",this._element.setAttribute("aria-hidden",!0),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._isTransitioning=!1,this._showBackdrop((function(){e(document.body).removeClass(Ye),t._resetAdjustments(),t._resetScrollbar(),e(t._element).trigger(Je)}))},n._removeBackdrop=function(){this._backdrop&&(e(this._backdrop).remove(),this._backdrop=null)},n._showBackdrop=function(t){var n=this,i=e(this._element).hasClass(ze)?ze:"";if(this._isShown&&this._config.backdrop){if(this._backdrop=document.createElement("div"),this._backdrop.className="modal-backdrop",i&&this._backdrop.classList.add(i),e(this._backdrop).appendTo(document.body),e(this._element).on(on,(function(t){n._ignoreBackdropClick?n._ignoreBackdropClick=!1:t.target===t.currentTarget&&("static"===n._config.backdrop?n._triggerBackdropTransition():n.hide())})),i&&l.reflow(this._backdrop),e(this._backdrop).addClass(Ke),!t)return;if(!i)return void t();var o=l.getTransitionDurationFromElement(this._backdrop);e(this._backdrop).one(l.TRANSITION_END,t).emulateTransitionEnd(o)}else if(!this._isShown&&this._backdrop){e(this._backdrop).removeClass(Ke);var r=function(){n._removeBackdrop(),t&&t()};if(e(this._element).hasClass(ze)){var s=l.getTransitionDurationFromElement(this._backdrop);e(this._backdrop).one(l.TRANSITION_END,r).emulateTransitionEnd(s)}else r()}else t&&t()} // ---------------------------------------------------------------------- // the following methods are used to handle overflowing modals // todo (fat): these should probably be refactored out of modal.js // ---------------------------------------------------------------------- ,n._adjustDialog=function(){var t=this._element.scrollHeight>document.documentElement.clientHeight;!this._isBodyOverflowing&&t&&(this._element.style.paddingLeft=this._scrollbarWidth+"px"),this._isBodyOverflowing&&!t&&(this._element.style.paddingRight=this._scrollbarWidth+"px")},n._resetAdjustments=function(){this._element.style.paddingLeft="",this._element.style.paddingRight=""},n._checkScrollbar=function(){var t=document.body.getBoundingClientRect();this._isBodyOverflowing=Math.round(t.left+t.right)
',trigger:"hover focus",title:"",delay:0,html:!1,selector:!1,placement:"top",offset:0,container:!1,fallbackPlacement:"flip",boundary:"scrollParent",customClass:"",sanitize:!0,sanitizeFn:null,whiteList:mn,popperConfig:null},Ln={animation:"boolean",template:"string",title:"(string|element|function)",trigger:"string",delay:"(number|object)",html:"boolean",selector:"(string|boolean)",placement:"(string|function)",offset:"(number|string|function)",container:"(string|element|boolean)",fallbackPlacement:"(string|array)",boundary:"(string|element)",customClass:"(string|function)",sanitize:"boolean",sanitizeFn:"(null|function)",whiteList:"object",popperConfig:"(null|object)"},Pn={HIDE:"hide"+En,HIDDEN:"hidden"+En,SHOW:"show"+En,SHOWN:"shown"+En,INSERTED:"inserted"+En,CLICK:"click"+En,FOCUSIN:"focusin"+En,FOCUSOUT:"focusout"+En,MOUSEENTER:"mouseenter"+En,MOUSELEAVE:"mouseleave"+En},Fn=function(){function t(t,e){if(void 0===ye)throw new TypeError("Bootstrap's tooltips require Popper (https://popper.js.org)"); // Private this._isEnabled=!0,this._timeout=0,this._hoverState="",this._activeTrigger={},this._popper=null, // Protected this.element=t,this.config=this._getConfig(e),this.tip=null,this._setListeners()} // Getters var n=t.prototype; // Public return n.enable=function(){this._isEnabled=!0},n.disable=function(){this._isEnabled=!1},n.toggleEnabled=function(){this._isEnabled=!this._isEnabled},n.toggle=function(t){if(this._isEnabled)if(t){var n=this.constructor.DATA_KEY,i=e(t.currentTarget).data(n);i||(i=new this.constructor(t.currentTarget,this._getDelegateConfig()),e(t.currentTarget).data(n,i)),i._activeTrigger.click=!i._activeTrigger.click,i._isWithActiveTrigger()?i._enter(null,i):i._leave(null,i)}else{if(e(this.getTipElement()).hasClass(Dn))return void this._leave(null,this);this._enter(null,this)}},n.dispose=function(){clearTimeout(this._timeout),e.removeData(this.element,this.constructor.DATA_KEY),e(this.element).off(this.constructor.EVENT_KEY),e(this.element).closest(".modal").off("hide.bs.modal",this._hideModalHandler),this.tip&&e(this.tip).remove(),this._isEnabled=null,this._timeout=null,this._hoverState=null,this._activeTrigger=null,this._popper&&this._popper.destroy(),this._popper=null,this.element=null,this.config=null,this.tip=null},n.show=function(){var t=this;if("none"===e(this.element).css("display"))throw new Error("Please use show on visible elements");var n=e.Event(this.constructor.Event.SHOW);if(this.isWithContent()&&this._isEnabled){e(this.element).trigger(n);var i=l.findShadowRoot(this.element),o=e.contains(null!==i?i:this.element.ownerDocument.documentElement,this.element);if(n.isDefaultPrevented()||!o)return;var r=this.getTipElement(),s=l.getUID(this.constructor.NAME);r.setAttribute("id",s),this.element.setAttribute("aria-describedby",s),this.setContent(),this.config.animation&&e(r).addClass(Nn);var a="function"==typeof this.config.placement?this.config.placement.call(this,r,this.element):this.config.placement,c=this._getAttachment(a);this.addAttachmentClass(c);var h=this._getContainer();e(r).data(this.constructor.DATA_KEY,this),e.contains(this.element.ownerDocument.documentElement,this.tip)||e(r).appendTo(h),e(this.element).trigger(this.constructor.Event.INSERTED),this._popper=new ye(this.element,r,this._getPopperConfig(c)),e(r).addClass(Dn),e(r).addClass(this.config.customClass), // If this is a touch-enabled device we add extra // empty mouseover listeners to the body's immediate children; // only needed because of broken event delegation on iOS // https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html "ontouchstart"in document.documentElement&&e(document.body).children().on("mouseover",null,e.noop);var u=function(){t.config.animation&&t._fixTransition();var n=t._hoverState;t._hoverState=null,e(t.element).trigger(t.constructor.Event.SHOWN),n===On&&t._leave(null,t)};if(e(this.tip).hasClass(Nn)){var f=l.getTransitionDurationFromElement(this.tip);e(this.tip).one(l.TRANSITION_END,u).emulateTransitionEnd(f)}else u()}},n.hide=function(t){var n=this,i=this.getTipElement(),o=e.Event(this.constructor.Event.HIDE),r=function(){n._hoverState!==An&&i.parentNode&&i.parentNode.removeChild(i),n._cleanTipClass(),n.element.removeAttribute("aria-describedby"),e(n.element).trigger(n.constructor.Event.HIDDEN),null!==n._popper&&n._popper.destroy(),t&&t()};if(e(this.element).trigger(o),!o.isDefaultPrevented()){if(e(i).removeClass(Dn), // If this is a touch-enabled device we remove the extra // empty mouseover listeners we added for iOS support "ontouchstart"in document.documentElement&&e(document.body).children().off("mouseover",null,e.noop),this._activeTrigger.click=!1,this._activeTrigger[In]=!1,this._activeTrigger[kn]=!1,e(this.tip).hasClass(Nn)){var s=l.getTransitionDurationFromElement(i);e(i).one(l.TRANSITION_END,r).emulateTransitionEnd(s)}else r();this._hoverState=""}},n.update=function(){null!==this._popper&&this._popper.scheduleUpdate()} // Protected ,n.isWithContent=function(){return Boolean(this.getTitle())},n.addAttachmentClass=function(t){e(this.getTipElement()).addClass(Tn+"-"+t)},n.getTipElement=function(){return this.tip=this.tip||e(this.config.template)[0],this.tip},n.setContent=function(){var t=this.getTipElement();this.setElementContent(e(t.querySelectorAll(".tooltip-inner")),this.getTitle()),e(t).removeClass(Nn+" "+Dn)},n.setElementContent=function(t,n){"object"!=typeof n||!n.nodeType&&!n.jquery?this.config.html?(this.config.sanitize&&(n=vn(n,this.config.whiteList,this.config.sanitizeFn)),t.html(n)):t.text(n): // Content is a DOM node or a jQuery this.config.html?e(n).parent().is(t)||t.empty().append(n):t.text(e(n).text())},n.getTitle=function(){var t=this.element.getAttribute("data-original-title");return t||(t="function"==typeof this.config.title?this.config.title.call(this.element):this.config.title),t} // Private ,n._getPopperConfig=function(t){var e=this;return o({},{placement:t,modifiers:{offset:this._getOffset(),flip:{behavior:this.config.fallbackPlacement},arrow:{element:".arrow"},preventOverflow:{boundariesElement:this.config.boundary}},onCreate:function(t){t.originalPlacement!==t.placement&&e._handlePopperPlacementChange(t)},onUpdate:function(t){return e._handlePopperPlacementChange(t)}},this.config.popperConfig)},n._getOffset=function(){var t=this,e={};return"function"==typeof this.config.offset?e.fn=function(e){return e.offsets=o({},e.offsets,t.config.offset(e.offsets,t.element)),e}:e.offset=this.config.offset,e},n._getContainer=function(){return!1===this.config.container?document.body:l.isElement(this.config.container)?e(this.config.container):e(document).find(this.config.container)},n._getAttachment=function(t){return xn[t.toUpperCase()]},n._setListeners=function(){var t=this;this.config.trigger.split(" ").forEach((function(n){if("click"===n)e(t.element).on(t.constructor.Event.CLICK,t.config.selector,(function(e){return t.toggle(e)}));else if("manual"!==n){var i=n===kn?t.constructor.Event.MOUSEENTER:t.constructor.Event.FOCUSIN,o=n===kn?t.constructor.Event.MOUSELEAVE:t.constructor.Event.FOCUSOUT;e(t.element).on(i,t.config.selector,(function(e){return t._enter(e)})).on(o,t.config.selector,(function(e){return t._leave(e)}))}})),this._hideModalHandler=function(){t.element&&t.hide()},e(this.element).closest(".modal").on("hide.bs.modal",this._hideModalHandler),this.config.selector?this.config=o({},this.config,{trigger:"manual",selector:""}):this._fixTitle()},n._fixTitle=function(){var t=typeof this.element.getAttribute("data-original-title");(this.element.getAttribute("title")||"string"!==t)&&(this.element.setAttribute("data-original-title",this.element.getAttribute("title")||""),this.element.setAttribute("title",""))},n._enter=function(t,n){var i=this.constructor.DATA_KEY;(n=n||e(t.currentTarget).data(i))||(n=new this.constructor(t.currentTarget,this._getDelegateConfig()),e(t.currentTarget).data(i,n)),t&&(n._activeTrigger["focusin"===t.type?In:kn]=!0),e(n.getTipElement()).hasClass(Dn)||n._hoverState===An?n._hoverState=An:(clearTimeout(n._timeout),n._hoverState=An,n.config.delay&&n.config.delay.show?n._timeout=setTimeout((function(){n._hoverState===An&&n.show()}),n.config.delay.show):n.show())},n._leave=function(t,n){var i=this.constructor.DATA_KEY;(n=n||e(t.currentTarget).data(i))||(n=new this.constructor(t.currentTarget,this._getDelegateConfig()),e(t.currentTarget).data(i,n)),t&&(n._activeTrigger["focusout"===t.type?In:kn]=!1),n._isWithActiveTrigger()||(clearTimeout(n._timeout),n._hoverState=On,n.config.delay&&n.config.delay.hide?n._timeout=setTimeout((function(){n._hoverState===On&&n.hide()}),n.config.delay.hide):n.hide())},n._isWithActiveTrigger=function(){for(var t in this._activeTrigger)if(this._activeTrigger[t])return!0;return!1},n._getConfig=function(t){var n=e(this.element).data();return Object.keys(n).forEach((function(t){-1!==Sn.indexOf(t)&&delete n[t]})),"number"==typeof(t=o({},this.constructor.Default,n,"object"==typeof t&&t?t:{})).delay&&(t.delay={show:t.delay,hide:t.delay}),"number"==typeof t.title&&(t.title=t.title.toString()),"number"==typeof t.content&&(t.content=t.content.toString()),l.typeCheckConfig(yn,t,this.constructor.DefaultType),t.sanitize&&(t.template=vn(t.template,t.whiteList,t.sanitizeFn)),t},n._getDelegateConfig=function(){var t={};if(this.config)for(var e in this.config)this.constructor.Default[e]!==this.config[e]&&(t[e]=this.config[e]);return t},n._cleanTipClass=function(){var t=e(this.getTipElement()),n=t.attr("class").match(Cn);null!==n&&n.length&&t.removeClass(n.join(""))},n._handlePopperPlacementChange=function(t){this.tip=t.instance.popper,this._cleanTipClass(),this.addAttachmentClass(this._getAttachment(t.placement))},n._fixTransition=function(){var t=this.getTipElement(),n=this.config.animation;null===t.getAttribute("x-placement")&&(e(t).removeClass(Nn),this.config.animation=!1,this.hide(),this.show(),this.config.animation=n)} // Static ,t._jQueryInterface=function(n){return this.each((function(){var i=e(this),o=i.data(bn),r="object"==typeof n&&n;if((o||!/dispose|hide/.test(n))&&(o||(o=new t(this,r),i.data(bn,o)),"string"==typeof n)){if(void 0===o[n])throw new TypeError('No method named "'+n+'"');o[n]()}}))},i(t,null,[{key:"VERSION",get:function(){return"4.6.2"}},{key:"Default",get:function(){return jn}},{key:"NAME",get:function(){return yn}},{key:"DATA_KEY",get:function(){return bn}},{key:"Event",get:function(){return Pn}},{key:"EVENT_KEY",get:function(){return En}},{key:"DefaultType",get:function(){return Ln}}]),t}(); /** * jQuery */ e.fn[yn]=Fn._jQueryInterface,e.fn[yn].Constructor=Fn,e.fn[yn].noConflict=function(){return e.fn[yn]=wn,Fn._jQueryInterface}; /** * Constants */ var Rn="popover",Bn="bs.popover",Hn="."+Bn,qn=e.fn[Rn],Mn="bs-popover",Qn=new RegExp("(^|\\s)"+Mn+"\\S+","g"),Wn=o({},Fn.Default,{placement:"right",trigger:"click",content:"",template:''}),Un=o({},Fn.DefaultType,{content:"(string|element|function)"}),Vn={HIDE:"hide"+Hn,HIDDEN:"hidden"+Hn,SHOW:"show"+Hn,SHOWN:"shown"+Hn,INSERTED:"inserted"+Hn,CLICK:"click"+Hn,FOCUSIN:"focusin"+Hn,FOCUSOUT:"focusout"+Hn,MOUSEENTER:"mouseenter"+Hn,MOUSELEAVE:"mouseleave"+Hn},Yn=function(t){var n,o;function s(){return t.apply(this,arguments)||this}o=t,(n=s).prototype=Object.create(o.prototype),n.prototype.constructor=n,r(n,o);var a=s.prototype; // Overrides return a.isWithContent=function(){return this.getTitle()||this._getContent()},a.addAttachmentClass=function(t){e(this.getTipElement()).addClass(Mn+"-"+t)},a.getTipElement=function(){return this.tip=this.tip||e(this.config.template)[0],this.tip},a.setContent=function(){var t=e(this.getTipElement()); // We use append for html objects to maintain js events this.setElementContent(t.find(".popover-header"),this.getTitle());var n=this._getContent();"function"==typeof n&&(n=n.call(this.element)),this.setElementContent(t.find(".popover-body"),n),t.removeClass("fade show")} // Private ,a._getContent=function(){return this.element.getAttribute("data-content")||this.config.content},a._cleanTipClass=function(){var t=e(this.getTipElement()),n=t.attr("class").match(Qn);null!==n&&n.length>0&&t.removeClass(n.join(""))} // Static ,s._jQueryInterface=function(t){return this.each((function(){var n=e(this).data(Bn),i="object"==typeof t?t:null;if((n||!/dispose|hide/.test(t))&&(n||(n=new s(this,i),e(this).data(Bn,n)),"string"==typeof t)){if(void 0===n[t])throw new TypeError('No method named "'+t+'"');n[t]()}}))},i(s,null,[{key:"VERSION",get: // Getters function(){return"4.6.2"}},{key:"Default",get:function(){return Wn}},{key:"NAME",get:function(){return Rn}},{key:"DATA_KEY",get:function(){return Bn}},{key:"Event",get:function(){return Vn}},{key:"EVENT_KEY",get:function(){return Hn}},{key:"DefaultType",get:function(){return Un}}]),s}(Fn); /** * jQuery */ e.fn[Rn]=Yn._jQueryInterface,e.fn[Rn].Constructor=Yn,e.fn[Rn].noConflict=function(){return e.fn[Rn]=qn,Yn._jQueryInterface}; /** * Constants */ var zn="scrollspy",Kn="bs.scrollspy",Xn="."+Kn,Gn=e.fn[zn],$n="active",Jn="activate"+Xn,Zn="scroll"+Xn,ti="load"+Xn+".data-api",ei="position",ni=".nav, .list-group",ii=".nav-link",oi=".list-group-item",ri={offset:10,method:"auto",target:""},si={offset:"number",method:"string",target:"(string|element)"},ai=function(){function t(t,n){var i=this;this._element=t,this._scrollElement="BODY"===t.tagName?window:t,this._config=this._getConfig(n),this._selector=this._config.target+" "+ii+","+this._config.target+" "+oi+","+this._config.target+" .dropdown-item",this._offsets=[],this._targets=[],this._activeTarget=null,this._scrollHeight=0,e(this._scrollElement).on(Zn,(function(t){return i._process(t)})),this.refresh(),this._process()} // Getters var n=t.prototype; // Public return n.refresh=function(){var t=this,n=this._scrollElement===this._scrollElement.window?"offset":ei,i="auto"===this._config.method?n:this._config.method,o=i===ei?this._getScrollTop():0;this._offsets=[],this._targets=[],this._scrollHeight=this._getScrollHeight(),[].slice.call(document.querySelectorAll(this._selector)).map((function(t){var n,r=l.getSelectorFromElement(t);if(r&&(n=document.querySelector(r)),n){var s=n.getBoundingClientRect();if(s.width||s.height) // TODO (fat): remove sketch reliance on jQuery position/offset return[e(n)[i]().top+o,r]}return null})).filter(Boolean).sort((function(t,e){return t[0]-e[0]})).forEach((function(e){t._offsets.push(e[0]),t._targets.push(e[1])}))},n.dispose=function(){e.removeData(this._element,Kn),e(this._scrollElement).off(Xn),this._element=null,this._scrollElement=null,this._config=null,this._selector=null,this._offsets=null,this._targets=null,this._activeTarget=null,this._scrollHeight=null} // Private ,n._getConfig=function(t){if("string"!=typeof(t=o({},ri,"object"==typeof t&&t?t:{})).target&&l.isElement(t.target)){var n=e(t.target).attr("id");n||(n=l.getUID(zn),e(t.target).attr("id",n)),t.target="#"+n}return l.typeCheckConfig(zn,t,si),t},n._getScrollTop=function(){return this._scrollElement===window?this._scrollElement.pageYOffset:this._scrollElement.scrollTop},n._getScrollHeight=function(){return this._scrollElement.scrollHeight||Math.max(document.body.scrollHeight,document.documentElement.scrollHeight)},n._getOffsetHeight=function(){return this._scrollElement===window?window.innerHeight:this._scrollElement.getBoundingClientRect().height},n._process=function(){var t=this._getScrollTop()+this._config.offset,e=this._getScrollHeight(),n=this._config.offset+e-this._getOffsetHeight();if(this._scrollHeight!==e&&this.refresh(),t>=n){var i=this._targets[this._targets.length-1];this._activeTarget!==i&&this._activate(i)}else{if(this._activeTarget&&t0)return this._activeTarget=null,void this._clear();for(var o=this._offsets.length;o--;){this._activeTarget!==this._targets[o]&&t>=this._offsets[o]&&(void 0===this._offsets[o+1]||t and