f0ckv2/public/s/js/bootstrap-native.min.js
2021-03-03 05:34:57 +01:00

3 lines
31 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

// Native JavaScript for Bootstrap v3.0.14f | 2021 © dnp_theme | MIT-License
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).BSN=e()}(this,(function(){"use strict";var t="webkitTransition"in document.head.style?"webkitTransitionEnd":"transitionend",e="webkitTransition"in document.head.style||"transition"in document.head.style,i="webkitTransition"in document.head.style?"webkitTransitionDuration":"transitionDuration",n="webkitTransition"in document.head.style?"webkitTransitionProperty":"transitionProperty";function o(t){var o=getComputedStyle(t),a=o[n],s=o[i],l=s.includes("ms")?1:1e3,c=e&&a&&"none"!==a?parseFloat(s)*l:0;return isNaN(c)?0:c}function a(e,i){var n=0,a=new Event(t),s=o(e);s?(e.addEventListener(t,(function o(a){a.target===e&&(i.apply(e,[a]),e.removeEventListener(t,o),n=1)})),setTimeout((function(){!n&&e.dispatchEvent(a)}),s+17)):i.apply(e,[a])}function s(t,e){var i=e&&e instanceof Element?e:document;return t instanceof Element?t:i.querySelector(t)}function l(t,e,i){var n=new CustomEvent(t+".bs."+e,{cancelable:!0});return void 0!==i&&Object.keys(i).forEach((function(t){Object.defineProperty(n,t,{value:i[t]})})),n}function c(t){this&&this.dispatchEvent(t)}function r(t){var e,i=this,n=l("close","alert"),o=l("closed","alert");function r(e){t[e=e?"addEventListener":"removeEventListener"]("click",d,!1)}function d(n){e=n&&n.target.closest(".alert"),(t=s('[data-dismiss="alert"]',e))&&e&&(t===n.target||t.contains(n.target))&&i.close()}function u(){r(),e.parentNode.removeChild(e),c.call(e,o)}i.close=function(){if(e&&t&&e.classList.contains("show")){if(c.call(e,n),n.defaultPrevented)return;i.dispose(),e.classList.remove("show"),e.classList.contains("fade")?a(e,u):u()}},i.dispose=function(){r(),delete t.Alert},t=s(t),e=t.closest(".alert"),t.Alert&&t.Alert.dispose(),t.Alert||r(1),i.element=t,t.Alert=i}function d(t){var e,i=l("change","button");function n(n){var o,a="LABEL"===n.target.tagName?n.target:n.target.closest("LABEL")?n.target.closest("LABEL"):null;if(o=a&&a.getElementsByTagName("INPUT")[0]){if(c.call(o,i),c.call(t,i),"checkbox"===o.type){if(i.defaultPrevented)return;o.checked?(a.classList.remove("active"),o.getAttribute("checked"),o.removeAttribute("checked"),o.checked=!1):(a.classList.add("active"),o.getAttribute("checked"),o.setAttribute("checked","checked"),o.checked=!0),t.toggled||(t.toggled=!0)}if("radio"===o.type&&!t.toggled){if(i.defaultPrevented)return;(!o.checked||0===n.screenX&&0==n.screenY)&&(a.classList.add("active"),a.classList.add("focus"),o.setAttribute("checked","checked"),o.checked=!0,t.toggled=!0,Array.from(e).map((function(t){var e=t.getElementsByTagName("INPUT")[0];t!==a&&t.classList.contains("active")&&(c.call(e,i),t.classList.remove("active"),e.removeAttribute("checked"),e.checked=!1)})))}setTimeout((function(){t.toggled=!1}),50)}}function o(t){32===(t.which||t.keyCode)&&t.target===document.activeElement&&n(t)}function a(t){32===(t.which||t.keyCode)&&t.preventDefault()}function r(t){if("INPUT"===t.target.tagName){var e="focusin"===t.type?"add":"remove";t.target.closest(".btn").classList[e]("focus")}}function d(e){t[e=e?"addEventListener":"removeEventListener"]("click",n,!1),t[e]("keyup",o,!1),t[e]("keydown",a,!1),t[e]("focusin",r,!1),t[e]("focusout",r,!1)}this.dispose=function(){d(),delete t.Button},(t=s(t)).Button&&t.Button.dispose(),(e=t.getElementsByClassName("btn")).length&&(t.Button||d(1),t.toggled=!1,t.Button=this,Array.from(e).map((function(t){!t.classList.contains("active")&&s("input:checked",t)&&t.classList.add("active"),t.classList.contains("active")&&!s("input:checked",t)&&t.classList.remove("active")})))}var u="onmouseleave"in document?["mouseenter","mouseleave"]:["mouseover","mouseout"],m=!!function(){var t=!1;try{var e=Object.defineProperty({},"passive",{get:function(){t=!0}});document.addEventListener("DOMContentLoaded",(function t(){document.removeEventListener("DOMContentLoaded",t,e)}),e)}catch(t){}return t}()&&{passive:!0};function f(t,e){e=e||{};var i,n,r,d,f,h,g,p,v,L=this;function b(){!1===n.interval||t.classList.contains("paused")||(t.classList.add("paused"),!i.isSliding&&(clearInterval(i.timer),i.timer=null))}function y(){!1!==n.interval&&t.classList.contains("paused")&&(t.classList.remove("paused"),!i.isSliding&&(clearInterval(i.timer),i.timer=null),!i.isSliding&&L.cycle())}function w(t){if(t.preventDefault(),!i.isSliding){var e=t.target;if(!e||e.classList.contains("active")||!e.getAttribute("data-slide-to"))return!1;i.index=parseInt(e.getAttribute("data-slide-to")),L.slideTo(i.index)}}function A(t){if(t.preventDefault(),!i.isSliding){var e=t.currentTarget||t.srcElement;e===g?i.index++:e===h&&i.index--,L.slideTo(i.index)}}function T(t){var e=t.which;if(!i.isSliding){switch(e){case 39:i.index++;break;case 37:i.index--;break;default:return}L.slideTo(i.index)}}function E(e){e=e?"addEventListener":"removeEventListener",n.pause&&n.interval&&(t[e](u[0],b,!1),t[e](u[1],y,!1),t[e]("touchstart",b,m),t[e]("touchend",y,m)),n.touch&&f.length>1&&t[e]("touchstart",x,m),g&&g[e]("click",A,!1),h&&h[e]("click",A,!1),p&&p[e]("click",w,!1),n.keyboard&&window[e]("keydown",T,!1)}function k(e){t[e=e?"addEventListener":"removeEventListener"]("touchmove",C,m),t[e]("touchend",N,m)}function x(e){i.isTouch||(i.touchPosition.startX=e.changedTouches[0].pageX,t.contains(e.target)&&(i.isTouch=!0,k(1)))}function C(t){if(i.isTouch)return i.touchPosition.currentX=t.changedTouches[0].pageX,"touchmove"===t.type&&t.changedTouches.length>1?(t.preventDefault(),!1):void 0;t.preventDefault()}function N(e){if(i.isTouch&&!i.isSliding&&(i.touchPosition.endX=i.touchPosition.currentX||e.changedTouches[0].pageX,i.isTouch)){if((!t.contains(e.target)||!t.contains(e.relatedTarget))&&Math.abs(i.touchPosition.startX-i.touchPosition.endX)<75)return!1;i.touchPosition.currentX<i.touchPosition.startX?i.index++:i.touchPosition.currentX>i.touchPosition.startX&&i.index--,i.isTouch=!1,L.slideTo(i.index),k()}}function P(t){Array.from(v).map((function(t){t.classList.remove("active")})),v[t]&&v[t].classList.add("active")}function H(e){if(i.touchPosition){var o=i.index,a=e&&e.target!==f[o]?1e3*e.elapsedTime+100:20,s=L.getActiveIndex(),l="left"===i.direction?"next":"prev";i.isSliding&&setTimeout((function(){i.touchPosition&&(i.isSliding=!1,f[o].classList.add("active"),f[s].classList.remove("active"),f[o].classList.remove("carousel-item-"+l),f[o].classList.remove("carousel-item-"+i.direction),f[s].classList.remove("carousel-item-"+i.direction),c.call(t,d),document.hidden||!n.interval||t.classList.contains("paused")||L.cycle())}),a)}}if(L.cycle=function(){i.timer&&(clearInterval(i.timer),i.timer=null),i.timer=setInterval((function(){var e=i.index||L.getActiveIndex();(function(t){var e=t.getBoundingClientRect(),i=window.innerHeight||document.documentElement.clientHeight;return e.top<=i&&e.bottom>=0})(t)&&(e++,L.slideTo(e))}),n.interval)},L.slideTo=function(e){if(!i.isSliding){var s,u,m=L.getActiveIndex();m!==e&&(m<e||0===m&&e===f.length-1?i.direction="left":(m>e||m===f.length-1&&0===e)&&(i.direction="right"),e<0?e=f.length-1:e>=f.length&&(e=0),s="left"===i.direction?"next":"prev",u={relatedTarget:f[e],direction:i.direction,from:m,to:e},r=l("slide","carousel",u),d=l("slid","carousel",u),c.call(t,r),r.defaultPrevented||(i.index=e,i.isSliding=!0,clearInterval(i.timer),i.timer=null,P(e),o(f[e])&&t.classList.contains("slide")?(f[e].classList.add("carousel-item-"+s),f[e].offsetWidth,f[e].classList.add("carousel-item-"+i.direction),f[m].classList.add("carousel-item-"+i.direction),a(f[e],H)):(f[e].classList.add("active"),f[e].offsetWidth,f[m].classList.remove("active"),setTimeout((function(){i.isSliding=!1,n.interval&&t&&!t.classList.contains("paused")&&L.cycle(),c.call(t,d)}),100))))}},L.getActiveIndex=function(){return Array.from(f).indexOf(t.getElementsByClassName("carousel-item active")[0])||0},L.dispose=function(){var e=["left","right","prev","next"];Array.from(f).map((function(t,i){t.classList.contains("active")&&P(i),e.map((function(e){return t.classList.remove("carousel-item-"+e)}))})),clearInterval(i.timer),E(),i={},n={},delete t.Carousel},(t=s(t)).Carousel&&t.Carousel.dispose(),f=t.getElementsByClassName("carousel-item"),h=t.getElementsByClassName("carousel-control-prev")[0],g=t.getElementsByClassName("carousel-control-next")[0],p=t.getElementsByClassName("carousel-indicators")[0],v=p&&p.getElementsByTagName("LI")||[],!(f.length<2)){var S=t.getAttribute("data-interval"),B="false"===S?0:parseInt(S),I="false"===t.getAttribute("data-touch")?0:1,M="hover"===t.getAttribute("data-pause")||!1,D="true"===t.getAttribute("data-keyboard")||!1,X=e.interval,W=e.touch;(n={}).keyboard=!0===e.keyboard||D,n.pause=!("hover"!==e.pause&&!M)&&"hover",n.touch=W||I,n.interval="number"==typeof X?X:!1===X||0===B||!1===B?0:isNaN(B)?5e3:B,L.getActiveIndex()<0&&(f.length&&f[0].classList.add("active"),v.length&&P(0)),(i={}).direction="left",i.index=0,i.timer=null,i.isSliding=!1,i.isTouch=!1,i.touchPosition={startX:0,currentX:0,endX:0},E(1),n.interval&&L.cycle(),t.Carousel=L}}function h(t,e){e=e||{};var i,n,o,r,d,u,m=this,f=null,h=null;function g(t,e){c.call(t,d),d.defaultPrevented||(t.isAnimating=!0,t.style.height=t.scrollHeight+"px",t.classList.remove("collapse"),t.classList.remove("show"),t.classList.add("collapsing"),t.offsetWidth,t.style.height="0px",a(t,(function(){t.isAnimating=!1,t.setAttribute("aria-expanded","false"),e.setAttribute("aria-expanded","false"),t.classList.remove("collapsing"),t.classList.add("collapse"),t.style.height="",c.call(t,u)})))}m.toggle=function(e){(e&&"A"===e.target.tagName||"A"===t.tagName)&&e.preventDefault(),(t.contains(e.target)||e.target===t)&&(h.classList.contains("show")?m.hide():m.show())},m.hide=function(){h.isAnimating||(g(h,t),t.classList.add("collapsed"))},m.show=function(){var e,l;f&&(i=f.getElementsByClassName("collapse show")[0],n=i&&(s('[data-target="#'+i.id+'"]',f)||s('[href="#'+i.id+'"]',f))),h.isAnimating||(n&&i!==h&&(g(i,n),n.classList.add("collapsed")),e=h,l=t,c.call(e,o),o.defaultPrevented||(e.isAnimating=!0,e.classList.add("collapsing"),e.classList.remove("collapse"),e.style.height=e.scrollHeight+"px",a(e,(function(){e.isAnimating=!1,e.setAttribute("aria-expanded","true"),l.setAttribute("aria-expanded","true"),e.classList.remove("collapsing"),e.classList.add("collapse"),e.classList.add("show"),e.style.height="",c.call(e,r)}))),t.classList.remove("collapsed"))},m.dispose=function(){t.removeEventListener("click",m.toggle,!1),delete t.Collapse},(t=s(t)).Collapse&&t.Collapse.dispose();var p=t.getAttribute("data-parent");o=l("show","collapse"),r=l("shown","collapse"),d=l("hide","collapse"),u=l("hidden","collapse"),null!==(h=s(e.target||t.getAttribute("data-target")||t.getAttribute("href")))&&(h.isAnimating=!1),f=t.closest(e.parent||p),t.Collapse||t.addEventListener("click",m.toggle,!1),t.Collapse=m}function g(t){t.focus?t.focus():t.setActive()}function p(t,e){var i,n,o,a,r,d,u,m=this,f=null,h=[];function p(t){(t.href&&"#"===t.href.slice(-1)||t.parentNode&&t.parentNode.href&&"#"===t.parentNode.href.slice(-1))&&this.preventDefault()}function v(){var e=t.open?"addEventListener":"removeEventListener";document[e]("click",L,!1),document[e]("keydown",y,!1),document[e]("keyup",w,!1),document[e]("focus",L,!1)}function L(e){var i=e.target,n=i&&(i.getAttribute("data-toggle")||i.parentNode&&i.parentNode.getAttribute&&i.parentNode.getAttribute("data-toggle"));("focus"!==e.type||i!==t&&i!==d&&!d.contains(i))&&(i!==d&&!d.contains(i)||!u&&!n)&&(f=i===t||t.contains(i)?t:null,m.hide(),p.call(e,i))}function b(e){f=t,m.show(),p.call(e,e.target)}function y(t){var e=t.which||t.keyCode;38!==e&&40!==e||t.preventDefault()}function w(e){var i=e.which||e.keyCode,n=document.activeElement,o=n===t,a=d.contains(n),s=n.parentNode===d||n.parentNode.parentNode===d,l=h.indexOf(n);s&&(l=o?0:38===i?l>1?l-1:0:40===i&&l<h.length-1?l+1:l,h[l]&&g(h[l])),(h.length&&s||!h.length&&(a||o)||!a)&&t.open&&27===i&&(m.toggle(),f=null)}m.show=function(){i=l("show","dropdown",{relatedTarget:f}),c.call(r,i),i.defaultPrevented||(d.classList.add("show"),r.classList.add("show"),t.setAttribute("aria-expanded",!0),t.open=!0,t.removeEventListener("click",b,!1),setTimeout((function(){g(d.getElementsByTagName("INPUT")[0]||t),v(),n=l("shown","dropdown",{relatedTarget:f}),c.call(r,n)}),1))},m.hide=function(){o=l("hide","dropdown",{relatedTarget:f}),c.call(r,o),o.defaultPrevented||(d.classList.remove("show"),r.classList.remove("show"),t.setAttribute("aria-expanded",!1),t.open=!1,v(),g(t),setTimeout((function(){t.Dropdown&&t.addEventListener("click",b,!1)}),1),a=l("hidden","dropdown",{relatedTarget:f}),c.call(r,a))},m.toggle=function(){r.classList.contains("show")&&t.open?m.hide():m.show()},m.dispose=function(){r.classList.contains("show")&&t.open&&m.hide(),t.removeEventListener("click",b,!1),delete t.Dropdown},(t=s(t)).Dropdown&&t.Dropdown.dispose(),r=t.parentNode,d=s(".dropdown-menu",r),Array.from(d.children).map((function(t){t.children.length&&"A"===t.children[0].tagName&&h.push(t.children[0]),"A"===t.tagName&&h.push(t)})),t.Dropdown||(!("tabindex"in d)&&d.setAttribute("tabindex","0"),t.addEventListener("click",b,!1)),u=!0===e||"true"===t.getAttribute("data-persist")||!1,t.open=!1,t.Dropdown=m}function v(t,e){e=e||{};var i,n,r,d,u,f,h,p,v,L=this,b=null,y={};function w(){var t,e,n=document.body.classList.contains("modal-open"),o=parseInt(getComputedStyle(document.body).paddingRight),a=document.documentElement.clientHeight!==document.documentElement.scrollHeight||document.body.clientHeight!==document.body.scrollHeight,s=i.clientHeight!==i.scrollHeight;(e=document.createElement("div")).className="modal-scrollbar-measure",document.body.appendChild(e),t=e.offsetWidth-e.clientWidth,document.body.removeChild(e),f=t,i.style.paddingRight=!s&&f?f+"px":"",document.body.style.paddingRight=s||a?o+(n?0:f)+"px":"",v.length&&v.map((function(t){var e=getComputedStyle(t).paddingRight;t.style.paddingRight=s||a?parseInt(e)+(n?0:f)+"px":parseInt(e)+"px"}))}function A(){(h=s(".modal-backdrop"))&&!document.getElementsByClassName("modal show")[0]&&(document.body.removeChild(h),h=null),null===h&&(document.body.classList.remove("modal-open"),document.body.style.paddingRight="",i.style.paddingRight="",v.length&&v.map((function(t){t.style.paddingRight=""})))}function T(t){t=t?"addEventListener":"removeEventListener",window[t]("resize",L.update,m),i[t]("click",P,!1),document[t]("keydown",N,!1)}function E(){i.style.display="block",w(),!document.getElementsByClassName("modal show")[0]&&document.body.classList.add("modal-open"),i.classList.add("show"),i.setAttribute("aria-hidden",!1),i.classList.contains("fade")?a(i,k):k()}function k(){g(i),i.isAnimating=!1,T(1),r=l("shown","modal",{relatedTarget:b}),c.call(i,r)}function x(e){i.style.display="",t&&g(t),h=s(".modal-backdrop"),1!==e&&h&&h.classList.contains("show")&&!document.getElementsByClassName("modal show")[0]?(h.classList.remove("show"),a(h,A)):A(),T(),i.isAnimating=!1,u=l("hidden","modal"),c.call(i,u)}function C(e){if(!i.isAnimating){var n=e.target,o="#"+i.getAttribute("id"),a=n.getAttribute("data-target")||n.getAttribute("href"),s=t.getAttribute("data-target")||t.getAttribute("href");!i.classList.contains("show")&&(n===t&&a===o||t.contains(n)&&s===o)&&(i.modalTrigger=t,b=t,L.show(),e.preventDefault())}}function N(t){var e=t.which;!i.isAnimating&&y.keyboard&&27==e&&i.classList.contains("show")&&L.hide()}function P(t){if(!i.isAnimating){var e=t.target,n="modal"===e.getAttribute("data-dismiss"),o=e.closest('[data-dismiss="modal"]');i.classList.contains("show")&&(o||n||e===i&&"static"!==y.backdrop)&&(L.hide(),b=null,t.preventDefault())}}L.toggle=function(){i.classList.contains("show")?L.hide():L.show()},L.show=function(){if(!(i.classList.contains("show")&&i.isAnimating||(n=l("show","modal",{relatedTarget:b}),c.call(i,n),n.defaultPrevented))){i.isAnimating=!0;var t,e=document.getElementsByClassName("modal show")[0];e&&e!==i&&(e.modalTrigger&&e.modalTrigger.Modal.hide(),e.Modal&&e.Modal.hide()),y.backdrop&&(t=document.createElement("div"),null===(h=s(".modal-backdrop"))&&(t.setAttribute("class","modal-backdrop"+(y.animation?" fade":"")),h=t,document.body.appendChild(h)),h=h),!h||e||h.classList.contains("show")||(h.offsetWidth,p=o(h),h.classList.add("show")),e?E():setTimeout(E,h&&p?p:0)}},L.hide=function(t){i.classList.contains("show")&&(d=l("hide","modal"),c.call(i,d),d.defaultPrevented||(i.isAnimating=!0,i.classList.remove("show"),i.setAttribute("aria-hidden",!0),i.classList.contains("fade")&&1!==t?a(i,x):x()))},L.setContent=function(t){s(".modal-content",i).innerHTML=t},L.update=function(){i.classList.contains("show")&&w()},L.dispose=function(){L.hide(1),t?(t.removeEventListener("click",C,!1),delete t.Modal):delete i.Modal},t=s(t);var H=s(t.getAttribute("data-target")||t.getAttribute("href"));i=t.classList.contains("modal")?t:H,v=Array.from(document.getElementsByClassName("fixed-top")).concat(Array.from(document.getElementsByClassName("fixed-bottom"))),t.classList.contains("modal")&&(t=null),t&&t.Modal&&t.Modal.dispose(),i&&i.Modal&&i.Modal.dispose(),y.keyboard=!1!==e.keyboard&&"false"!==i.getAttribute("data-keyboard"),y.backdrop="static"!==e.backdrop&&"static"!==i.getAttribute("data-backdrop")||"static",y.backdrop=!1!==e.backdrop&&"false"!==i.getAttribute("data-backdrop")&&y.backdrop,y.animation=!!i.classList.contains("fade"),y.content=e.content,i.isAnimating=!1,t&&!t.Modal&&t.addEventListener("click",C,!1),y.content&&L.setContent(y.content.trim()),t?(i.modalTrigger=t,t.Modal=L):i.Modal=L}var L="mousedown";function b(){return{y:window.pageYOffset||document.documentElement.scrollTop,x:window.pageXOffset||document.documentElement.scrollLeft}}function y(t,e,i,n){var o,a,s,l,c,r,d=e.offsetWidth,u=e.offsetHeight,m=document.documentElement.clientWidth||document.body.clientWidth,f=document.documentElement.clientHeight||document.body.clientHeight,h=t.getBoundingClientRect(),g=n===document.body?b():{x:n.offsetLeft+n.scrollLeft,y:n.offsetTop+n.scrollTop},p=h.right-h.left,v=h.bottom-h.top,L=e.classList.contains("popover"),y=e.getElementsByClassName("arrow")[0],w=h.top+v/2-u/2<0,A=h.left+p/2-d/2<0,T=h.left+d/2+p/2>=m,E=h.top+u/2+v/2>=f,k=h.top-u<0,x=h.left-d<0,C=h.top+u+v>=f,N=h.left+d+p>=m;i="right"===(i="left"===(i="bottom"===(i="top"===(i=("left"===i||"right"===i)&&x&&N?"top":i)&&k?"bottom":i)&&C?"top":i)&&x?"right":i)&&N?"left":i,-1===e.className.indexOf(i)&&(e.className=e.className.replace(/\b(top|bottom|left|right)+/,i)),c=y.offsetWidth,r=y.offsetHeight,"left"===i||"right"===i?(a="left"===i?h.left+g.x-d-(L?c:0):h.left+g.x+p,w?(o=h.top+g.y,s=v/2-c):E?(o=h.top+g.y-u+v,s=u-v/2-c):(o=h.top+g.y-u/2+v/2,s=u/2-(L?.9*r:r/2))):"top"!==i&&"bottom"!==i||(o="top"===i?h.top+g.y-u-(L?r:0):h.top+g.y+v,A?(a=0,l=h.left+p/2-c):T?(a=m-1.01*d,l=d-(m-h.left)+p/2-c/2):(a=h.left+g.x-d/2+p/2,l=d/2-(L?c:c/2))),e.style.top=o+"px",e.style.left=a+"px",s&&(y.style.top=s+"px"),l&&(y.style.left=l+"px")}function w(t,e){e=e||{};var i,n,o,r,d,f,h,g,p,v,b,w,A,T,E,k,x,C,N,P=this,H=null,S=0,B=/(iPhone|iPod|iPad)/.test(navigator.userAgent),I={};function M(t){null!==H&&t.target===s(".close",H)&&P.hide()}function D(){return{0:e.title||t.getAttribute("data-title")||null,1:e.content||t.getAttribute("data-content")||null}}function X(){null===H&&t.focus()}function W(e){e=e?"addEventListener":"removeEventListener","hover"===I.trigger?(t[e](L,P.show),t[e](u[0],P.show),I.dismissible||t[e](u[1],P.hide)):"click"==I.trigger?t[e](I.trigger,P.toggle):"focus"==I.trigger&&(B&&t[e]("click",X,!1),t[e](I.trigger,P.toggle))}function O(e){H&&H.contains(e.target)||e.target===t||t.contains(e.target)||P.hide()}function R(e){e=e?"addEventListener":"removeEventListener",I.dismissible?document[e]("click",M,!1):("focus"==I.trigger&&t[e]("blur",P.hide),"hover"==I.trigger&&document[e]("touchstart",O,m)),window[e]("resize",P.hide,m)}function j(){R(1),c.call(t,b)}function z(){R(),I.container.removeChild(H),S=null,H=null,c.call(t,A)}P.toggle=function(){null===H?P.show():P.hide()},P.show=function(){clearTimeout(S),S=setTimeout((function(){if(null===H){if(c.call(t,v),v.defaultPrevented)return;!function(){i=D()[0]||null,n=(n=D()[1])?n.trim():null,H=document.createElement("div");var t=document.createElement("div");if(t.classList.add("arrow"),H.appendChild(t),null!==n&&null===I.template){if(H.setAttribute("role","tooltip"),null!==i){var e=document.createElement("h3");e.classList.add("popover-header"),e.innerHTML=I.dismissible?i+p:i,H.appendChild(e)}var o=document.createElement("div");o.classList.add("popover-body"),o.innerHTML=I.dismissible&&null===i?n+p:n,H.appendChild(o)}else{var a=document.createElement("div");a.innerHTML=I.template.trim(),H.className=a.firstChild.className,H.innerHTML=a.firstChild.innerHTML;var l=s(".popover-header",H),c=s(".popover-body",H);i&&l&&(l.innerHTML=i.trim()),n&&c&&(c.innerHTML=n.trim())}I.container.appendChild(H),H.style.display="block",!H.classList.contains("popover")&&H.classList.add("popover"),!H.classList.contains(I.animation)&&H.classList.add(I.animation),!H.classList.contains(N)&&H.classList.add(N)}(),y(t,H,I.placement,I.container),!H.classList.contains("show")&&H.classList.add("show"),I.animation?a(H,j):j()}}),20)},P.hide=function(){clearTimeout(S),S=setTimeout((function(){if(H&&null!==H&&H.classList.contains("show")){if(c.call(t,w),w.defaultPrevented)return;H.classList.remove("show"),I.animation?a(H,z):z()}}),I.delay)},P.dispose=function(){P.hide(),W(),delete t.Popover},(t=s(t)).Popover&&t.Popover.dispose(),o=t.getAttribute("data-trigger"),r=t.getAttribute("data-animation"),d=t.getAttribute("data-placement"),f=t.getAttribute("data-dismissible"),h=t.getAttribute("data-delay"),g=t.getAttribute("data-container"),p='<button type="button" class="close">×</button>',v=l("show","popover"),b=l("shown","popover"),w=l("hide","popover"),A=l("hidden","popover"),T=s(e.container),E=s(g),k=t.closest(".modal"),x=t.closest(".fixed-top"),C=t.closest(".fixed-bottom"),I.template=e.template?e.template:null,I.trigger=e.trigger?e.trigger:o||"hover",I.animation=e.animation&&"fade"!==e.animation?e.animation:r||"fade",I.placement=e.placement?e.placement:d||"top",I.delay=parseInt(e.delay||h)||200,I.dismissible=!(!e.dismissible&&"true"!==f),I.container=T||(E||(x||(C||(k||document.body)))),N="bs-popover-"+I.placement;var U=D();i=U[0],((n=U[1])||I.template)&&(t.Popover||W(1),t.Popover=P)}function A(t,e){e=e||{};var i,n,o,a,r,d,u=this,f={};function h(){var e,o,a;(n=r.getElementsByTagName("A"),i.scrollTop=i.isWindow?b().y:t.scrollTop,i.length!==n.length||p()!==i.scrollHeight)&&(i.items=[],i.offsets=[],i.scrollHeight=p(),i.maxScroll=i.scrollHeight-(i.isWindow?window.innerHeight:t.getBoundingClientRect().height),Array.from(n).map((function(t){e=t.getAttribute("href"),(o=e&&"#"===e.charAt(0)&&"#"!==e.slice(-1)&&s(e))&&(i.items.push(t),a=o.getBoundingClientRect(),i.offsets.push((i.isWindow?a.top+i.scrollTop:o.offsetTop)-f.offset))})),i.length=i.items.length)}function g(t){d[t=t?"addEventListener":"removeEventListener"]("scroll",u.refresh,m),window[t]("resize",u.refresh,m)}function p(){return d.scrollHeight||Math.max(document.body.scrollHeight,document.documentElement.scrollHeight)}function v(){Array.from(n).map((function(t){return t.classList.contains("active")&&t.classList.remove("active")}))}function L(e){v(),i.activeItem=e,e.classList.add("active");for(var n=[];e.parentNode!==document.body;)e=e.parentNode,["dropdown-menu","nav"].some((function(t){return e.classList.contains(t)}))&&n.push(e);n.map((function(t){var e=t.previousElementSibling;e&&!e.classList.contains("active")&&e.classList.add("active")})),c.call(t,l("activate","scrollspy",{relatedTarget:i.activeItem}))}u.refresh=function(){if(h(),i.scrollTop>=i.maxScroll){var t=i.items[i.length-1];i.activeItem!==t&&L(t)}else{if(i.activeItem&&i.scrollTop<i.offsets[0]&&i.offsets[0]>0)return i.activeItem=null,void v();for(var e=i.length;e--;)i.activeItem!==i.items[e]&&i.scrollTop>=i.offsets[e]&&(void 0===i.offsets[e+1]||i.scrollTop<i.offsets[e+1])&&L(i.items[e])}},u.dispose=function(){g(),delete t.ScrollSpy},(t=s(t)).ScrollSpy&&t.ScrollSpy.dispose(),o=t.getAttribute("data-target"),a=t.getAttribute("data-offset"),r=s(e.target||o),d=t.clientHeight<t.scrollHeight?t:window,r&&(f.offset=+(e.offset||a)||10,(i={}).length=0,i.items=[],i.offsets=[],i.isWindow=d===window,i.activeItem=null,i.scrollHeight=0,i.maxScroll=0,!t.ScrollSpy&&g(1),u.refresh(),t.ScrollSpy=u)}function T(t,i){i=i||{};var n,o,r,d,u,m,f,h,g,p,v,L,b,y,w,A=this,T=!1;function E(){T.style.height="",T.classList.remove("collapsing"),o.isAnimating=!1}function k(){T?b?E():setTimeout((function(){T.style.height=y+"px",T.offsetWidth,a(T,E)}),50):o.isAnimating=!1,u=l("shown","tab",{relatedTarget:g}),c.call(h,u)}function x(){T&&(p.style.float="left",v.style.float="left",L=p.scrollHeight),d=l("show","tab",{relatedTarget:g}),f=l("hidden","tab",{relatedTarget:h}),c.call(h,d),d.defaultPrevented||(v.classList.add("active"),p.classList.remove("active"),T&&(y=v.scrollHeight,b=y===L,T.classList.add("collapsing"),T.style.height=L+"px",T.offsetHeight,p.style.float="",v.style.float=""),v.classList.contains("fade")?setTimeout((function(){v.classList.add("show"),a(v,k)}),20):k(),c.call(g,f))}function C(){var t,e=o.getElementsByClassName("active");return 1!==e.length||e[0].parentNode.classList.contains("dropdown")?e.length>1&&(t=e[e.length-1]):t=e[0],t}function N(){return s(C().getAttribute("href"))}function P(t){t.preventDefault(),h=t.currentTarget,!o.isAnimating&&A.show()}A.show=function(){if(!(h=h||t).classList.contains("active")){if(v=s(h.getAttribute("href")),g=C(),p=N(),m=l("hide","tab",{relatedTarget:h}),c.call(g,m),m.defaultPrevented)return;o.isAnimating=!0,g.classList.remove("active"),g.setAttribute("aria-selected","false"),h.classList.add("active"),h.setAttribute("aria-selected","true"),r&&(t.parentNode.classList.contains("dropdown-menu")?r.classList.contains("active")||r.classList.add("active"):r.classList.contains("active")&&r.classList.remove("active")),p.classList.contains("fade")?(p.classList.remove("show"),a(p,x)):x()}},A.dispose=function(){t.removeEventListener("click",P,!1),delete t.Tab},(t=s(t)).Tab&&t.Tab.dispose(),n=t.getAttribute("data-height"),o=t.closest(".nav"),r=o&&s(".dropdown-toggle",o),w=!(!e||!1===i.height||"false"===n),o.isAnimating=!1,t.Tab||t.addEventListener("click",P,!1),w&&(T=N().parentNode),t.Tab=A}function E(t,e){e=e||{};var i,n,o,r,d,u,m,f,h=this,g=0,p={};function v(){i.classList.remove("showing"),i.classList.add("show"),c.call(i,m),p.autohide&&h.hide()}function L(){i.classList.add("hide"),c.call(i,f)}function b(){i.classList.remove("show"),p.animation?a(i,L):L()}function y(){clearTimeout(g),t.removeEventListener("click",h.hide,!1),delete t.Toast}h.show=function(){if(i&&!i.classList.contains("show")){if(c.call(i,d),d.defaultPrevented)return;p.animation&&i.classList.add("fade"),i.classList.remove("hide"),i.offsetWidth,i.classList.add("showing"),p.animation?a(i,v):v()}},h.hide=function(t){if(i&&i.classList.contains("show")){if(c.call(i,u),u.defaultPrevented)return;t?b():g=setTimeout(b,p.delay)}},h.dispose=function(){p.animation?a(i,y):y()},(t=s(t)).Toast&&t.Toast.dispose(),i=t.closest(".toast"),n=t.getAttribute("data-animation"),o=t.getAttribute("data-autohide"),r=t.getAttribute("data-delay"),d=l("show","toast"),u=l("hide","toast"),m=l("shown","toast"),f=l("hidden","toast"),p.animation=!1===e.animation||"false"===n?0:1,p.autohide=!1===e.autohide||"false"===o?0:1,p.delay=parseInt(e.delay||r)||500,t.Toast||t.addEventListener("click",h.hide,!1),t.Toast=h}function k(t,e){e=e||{};var i,n,o,r,d,f,h,g,p,v,b,w,A,T,E,k=this,x=null,C=0,N={};function P(){return t.getAttribute("title")||t.getAttribute("data-title")||t.getAttribute("data-original-title")}function H(e){x&&x.contains(e.target)||e.target===t||t.contains(e.target)||k.hide()}function S(t){t=t?"addEventListener":"removeEventListener",document[t]("touchstart",H,m),window[t]("resize",k.hide,m)}function B(){S(1),c.call(t,h)}function I(){S(),N.container.removeChild(x),x=null,C=null,c.call(t,p)}function M(e){t[e=e?"addEventListener":"removeEventListener"](L,k.show,!1),t[e](u[0],k.show,!1),t[e](u[1],k.hide,!1)}k.show=function(){clearTimeout(C),C=setTimeout((function(){if(null===x){if(c.call(t,f),f.defaultPrevented)return;!1!==function(){if(i=P()){if(x=document.createElement("div"),N.template){var t=document.createElement("div");t.innerHTML=N.template.trim(),x.className=t.firstChild.className,x.innerHTML=t.firstChild.innerHTML,s(".tooltip-inner",x).innerHTML=i.trim()}else{var e=document.createElement("div");e.classList.add("arrow"),x.appendChild(e);var n=document.createElement("div");n.classList.add("tooltip-inner"),x.appendChild(n),n.innerHTML=i}x.style.left="0",x.style.top="0",x.setAttribute("role","tooltip"),!x.classList.contains("tooltip")&&x.classList.add("tooltip"),!x.classList.contains(N.animation)&&x.classList.add(N.animation),!x.classList.contains(E)&&x.classList.add(E),N.container.appendChild(x)}}()&&(y(t,x,N.placement,N.container),!x.classList.contains("show")&&x.classList.add("show"),N.animation?a(x,B):B())}}),20)},k.hide=function(){clearTimeout(C),C=setTimeout((function(){if(x&&x.classList.contains("show")){if(c.call(t,g),g.defaultPrevented)return;x.classList.remove("show"),N.animation?a(x,I):I()}}),N.delay)},k.toggle=function(){x?k.hide():k.show()},k.dispose=function(){M(),k.hide(),t.setAttribute("title",t.getAttribute("data-original-title")),t.removeAttribute("data-original-title"),delete t.Tooltip},(t=s(t)).Tooltip&&t.Tooltip.dispose(),n=t.getAttribute("data-animation"),o=t.getAttribute("data-placement"),r=t.getAttribute("data-delay"),d=t.getAttribute("data-container"),f=l("show","tooltip"),h=l("shown","tooltip"),g=l("hide","tooltip"),p=l("hidden","tooltip"),v=s(e.container),b=s(d),w=t.closest(".modal"),A=t.closest(".fixed-top"),T=t.closest(".fixed-bottom"),N.animation=e.animation&&"fade"!==e.animation?e.animation:n||"fade",N.placement=e.placement?e.placement:o||"top",N.template=e.template?e.template:null,N.delay=parseInt(e.delay||r)||200,N.container=v||(b||(A||(T||(w||document.body)))),E="bs-tooltip-"+N.placement,(i=P())&&(t.Tooltip||(t.setAttribute("data-original-title",i),t.removeAttribute("title"),M(1)),t.Tooltip=k)}var x={};function C(t,e){Array.from(e).map((function(e){return new t(e)}))}function N(t){for(var e in t=t||document,x)C(x[e][0],t.querySelectorAll(x[e][1]))}function P(t,e){Array.from(e).map((function(e){return e[t].dispose()}))}x.Alert=[r,'[data-dismiss="alert"]'],x.Button=[d,'[data-toggle="buttons"]'],x.Carousel=[f,'[data-ride="carousel"]'],x.Collapse=[h,'[data-toggle="collapse"]'],x.Dropdown=[p,'[data-toggle="dropdown"]'],x.Modal=[v,'[data-toggle="modal"]'],x.Popover=[w,'[data-toggle="popover"],[data-tip="popover"]'],x.ScrollSpy=[A,'[data-spy="scroll"]'],x.Tab=[T,'[data-toggle="tab"]'],x.Toast=[E,'[data-dismiss="toast"]'],x.Tooltip=[k,'[data-toggle="tooltip"],[data-tip="tooltip"]'],document.body?N():document.addEventListener("DOMContentLoaded",(function t(){N(),document.removeEventListener("DOMContentLoaded",t,!1)}),!1);return{Alert:r,Button:d,Carousel:f,Collapse:h,Dropdown:p,Modal:v,Popover:w,ScrollSpy:A,Tab:T,Toast:E,Tooltip:k,initCallback:N,removeDataAPI:function(t){for(var e in t=t||document,x)P(e,t.querySelectorAll(x[e][1]))},componentsInit:x,Version:"3.0.14f"}}));