bootstrap.native
Advanced tools
Comparing version 3.0.0 to 3.0.1
@@ -1,2 +0,2 @@ | ||
// Native JavaScript for Bootstrap v3.0.0 | 2020 © dnp_theme | MIT-License | ||
function t(t,e){return t.classList.contains(e)}function e(t,e){t.classList.remove(e)}function n(t,e,n,i){i=i||!1,t.addEventListener(e,n,i)}function i(t,e,n,i){i=i||!1,t.removeEventListener(e,n,i)}function o(t,e,o,a){n(t,e,(function n(l){l.target===t&&(o(l),i(t,e,n,a))}),a)}var a="webkitTransition"in document.body.style?"webkitTransitionEnd":"transitionend",l="webkitTransition"in document.body.style||"transition"in document.body.style,r="webkitTransition"in document.body.style?"webkitTransitionDuration":"transitionDuration";function c(t){var e=l?window.getComputedStyle(t)[r]:0;return e="number"!=typeof(e=parseFloat(e))||isNaN(e)?0:1e3*e}function s(t,e){var n=0;c(t)?o(t,a,(function(t){!n&&e(t),n=1})):setTimeout((function(){!n&&e(),n=1}),17)}function d(t,e){var n=e&&e instanceof Element?e:document;return t instanceof Element?t:n.querySelector(t)}function u(t,e){try{t()}catch(t){console.error(e+": "+t)}}function f(t,e,n){var i=new CustomEvent(t+".bs."+e,{cancelable:!0});return i.relatedTarget=n,i}function m(t){this&&this.dispatchEvent(t)}function p(o){var a,l=this,r=f("close","alert"),c=f("closed","alert");function p(t){a=t&&t.target.closest(".alert"),(o=d('[data-dismiss="alert"]',a))&&a&&(o===t.target||o.contains(t.target))&&l.close()}function g(){i(o,"click",p),a.parentNode.removeChild(a),m.call(a,c)}l.close=function(){if(a&&o&&t(a,"show")){if(m.call(a,r),r.defaultPrevented)return;l.dispose(),e(a,"show"),t(a,"fade")?s(a,g):g()}},l.dispose=function(){i(o,"click",p),delete o.Alert},u((function(){o=d(o),a=o.closest(".alert"),o.Alert&&o.Alert.dispose(),o.Alert||n(o,"click",p),l.element=o,o.Alert=l}),"BSN.Alert")}function g(t,e){t.classList.add(e)}function h(o){var a,l=this,r=f("change","button");function c(n){var i,l="LABEL"===n.target.tagName?n.target:n.target.closest("LABEL")?n.target.closest("LABEL"):null;if(i=l&&l.getElementsByTagName("INPUT")[0]){if(m.call(i,r),m.call(o,r),"checkbox"===i.type){if(r.defaultPrevented)return;i.checked?(e(l,"active"),i.getAttribute("checked"),i.removeAttribute("checked"),i.checked=!1):(g(l,"active"),i.getAttribute("checked"),i.setAttribute("checked","checked"),i.checked=!0),o.toggled||(o.toggled=!0)}if("radio"===i.type&&!o.toggled){if(r.defaultPrevented)return;(!i.checked||0===n.screenX&&0==n.screenY)&&(g(l,"active"),g(l,"focus"),i.setAttribute("checked","checked"),i.checked=!0,o.toggled=!0,Array.from(a).map((function(n){var i=n.getElementsByTagName("INPUT")[0];n!==l&&t(n,"active")&&(m.call(i,r),e(n,"active"),i.removeAttribute("checked"),i.checked=!1)})))}setTimeout((function(){o.toggled=!1}),50)}}function s(t){32===(t.which||t.keyCode)&&t.target===document.activeElement&&c(t)}function p(t){32===(t.which||t.keyCode)&&t.preventDefault()}function h(t){var n="focusin"===t.type?g:e;"INPUT"===t.target.tagName&&n(t.target.closest(".btn"),"focus")}function v(t){t(o,"click",c),t(o,"keyup",s),t(o,"keydown",p),t(o,"focusin",h),t(o,"focusout",h)}l.dispose=function(){v(i),delete o.Button},u((function(){(o=d(o)).Button&&o.Button.dispose(),(a=o.getElementsByClassName("btn")).length&&(o.Button||v(n),o.toggled=!1,o.Button=l,Array.from(a).map((function(n){!t(n,"active")&&d("input:checked",n)&&g(n,"active"),t(n,"active")&&!d("input:checked",n)&&e(n,"active")})))}),"BSN.Button")}var v="touchstart",b="touchend",y="touchmove",w="onmouseleave"in document?["mouseenter","mouseleave"]:["mouseover","mouseout"],A=!!function(){var t=!1;try{var e=Object.defineProperty({},"passive",{get:function(){t=!0}});o(document,"DOMContentLoaded",(function(){}),e)}catch(t){}return t}()&&{passive:!0};function T(o,a){a=a||{};var l,r,p,h,T,k,N,C,x=this,E={};function P(){!1===E.interval||t(o,"paused")||(g(o,"paused"),!l.isSliding&&(clearInterval(l.timer),l.timer=null))}function S(){!1!==E.interval&&t(o,"paused")&&(e(o,"paused"),!l.isSliding&&(clearInterval(l.timer),l.timer=null),!l.isSliding&&x.cycle())}function B(e){if(e.preventDefault(),!l.isSliding){var n=e.target;if(!n||t(n,"active")||!n.getAttribute("data-slide-to"))return!1;l.index=parseInt(n.getAttribute("data-slide-to"),10),x.slideTo(l.index)}}function M(t){if(t.preventDefault(),!l.isSliding){var e=t.currentTarget||t.srcElement;e===k?l.index++:e===T&&l.index--,x.slideTo(l.index)}}function L(t){var e=t.which;if(!l.isSliding){switch(e){case 39:l.index++;break;case 37:l.index--;break;default:return}x.slideTo(l.index)}}function H(t){E.pause&&E.interval&&(t(o,w[0],P),t(o,w[1],S),t(o,v,P,A),t(o,b,S,A)),h.length>1&&t(o,v,D,A),k&&t(k,"click",M),T&&t(T,"click",M),N&&t(N,"click",B),E.keyboard&&t(window,"keydown",L)}function I(t){t(o,y,X,A),t(o,b,W,A)}function D(t){l.isTouch||(l.touchPosition.startX=t.changedTouches[0].pageX,o.contains(t.target)&&(l.isTouch=!0,I(n)))}function X(t){if(l.isTouch)return l.touchPosition.currentX=t.changedTouches[0].pageX,"touchmove"===t.type&&t.changedTouches.length>1?(t.preventDefault(),!1):void 0;t.preventDefault()}function W(t){if(l.isTouch&&!l.isSliding&&(l.touchPosition.endX=l.touchPosition.currentX||t.changedTouches[0].pageX,l.isTouch)){if((!o.contains(t.target)||!o.contains(t.relatedTarget))&&Math.abs(l.touchPosition.startX-l.touchPosition.endX)<75)return!1;l.touchPosition.currentX<l.touchPosition.startX?l.index++:l.touchPosition.currentX>l.touchPosition.startX&&l.index--,l.isTouch=!1,x.slideTo(l.index),I(i)}}function O(t){Array.from(C).map((function(t){e(t,"active")})),C[t]&&g(C[t],"active")}function R(n){if(l.touchPosition){var i=l.index,a=n&&n.target!==h[i]?1e3*n.elapsedTime+100:20,r=x.getActiveIndex(),c="left"===l.direction?"next":"prev";l.isSliding&&setTimeout((function(){l.touchPosition&&(l.isSliding=!1,g(h[i],"active"),e(h[r],"active"),e(h[i],"carousel-item-"+c),e(h[i],"carousel-item-"+l.direction),e(h[r],"carousel-item-"+l.direction),m.call(o,p),document.hidden||!E.interval||t(o,"paused")||x.cycle())}),a)}}x.cycle=function(){l.timer&&(clearInterval(l.timer),l.timer=null),l.timer=setInterval((function(){var t=l.index||x.getActiveIndex();(function(t){var e=t.getBoundingClientRect(),n=window.innerHeight||document.documentElement.clientHeight;return e.top<=n&&e.bottom>=0})(o)&&(t++,x.slideTo(t))}),E.interval)},x.slideTo=function(n){if(!l.isSliding){var i,a=x.getActiveIndex();a!==n&&(a<n||0===a&&n===h.length-1?l.direction="left":(a>n||a===h.length-1&&0===n)&&(l.direction="right"),n<0?n=h.length-1:n>=h.length&&(n=0),i="left"===l.direction?"next":"prev",r=f("slide","carousel",h[n]),p=f("slid","carousel",h[n]),m.call(o,r),r.defaultPrevented||(l.index=n,l.isSliding=!0,clearInterval(l.timer),l.timer=null,O(n),c(h[n])&&t(o,"slide")?(g(h[n],"carousel-item-"+i),h[n].offsetWidth,g(h[n],"carousel-item-"+l.direction),g(h[a],"carousel-item-"+l.direction),s(h[n],R)):(g(h[n],"active"),h[n].offsetWidth,e(h[a],"active"),setTimeout((function(){l.isSliding=!1,E.interval&&o&&!t(o,"paused")&&x.cycle(),m.call(o,p)}),100))))}},x.getActiveIndex=function(){return Array.from(h).indexOf(o.getElementsByClassName("carousel-item active")[0])||0},x.dispose=function(){var n=["left","right","prev","next"];Array.from(h).map((function(i,o){t(i,"active")&&O(o),n.map((function(t){return e(i,"carousel-item-"+t)}))})),clearInterval(l.timer),H(i),l={},delete o.Carousel},(l={}).direction="left",l.index=0,l.timer=null,l.isSliding=!1,l.isTouch=!1,l.touchPosition={startX:0,currentX:0,endX:0},u((function(){(o=d(o)).Carousel&&o.Carousel.dispose();var t=o.getAttribute("data-interval"),e=a.interval,i="false"===t?0:parseInt(t),l="hover"===o.getAttribute("data-pause")||!1,r="true"===o.getAttribute("data-keyboard")||!1;h=o.getElementsByClassName("carousel-item"),T=o.getElementsByClassName("carousel-control-prev")[0],k=o.getElementsByClassName("carousel-control-next")[0],N=o.getElementsByClassName("carousel-indicators")[0],C=N&&N.getElementsByTagName("LI")||[],E.keyboard=!0===a.keyboard||r,E.pause=!("hover"!==a.pause&&!l)&&"hover",E.interval="number"==typeof e?e:!1===e||0===i||!1===i?0:isNaN(i)?5e3:i,h.length<2||(o.Carousel||H(n),x.getActiveIndex()<0&&(h.length&&g(h[0],"active"),C.length&&O(0)),E.interval&&x.cycle(),o.Carousel=x)}),"BSN.Carousel")}function k(o,a){a=a||{};var l,r,c,p,h,v,b=this,y=null,w=null;function A(t,n){m.call(t,h),h.defaultPrevented||(t.isAnimating=!0,t.style.height=t.scrollHeight+"px",e(t,"collapse"),e(t,"show"),g(t,"collapsing"),t.offsetWidth,t.style.height="0px",s(t,(function(){t.isAnimating=!1,t.setAttribute("aria-expanded","false"),n.setAttribute("aria-expanded","false"),e(t,"collapsing"),g(t,"collapse"),t.style.height="",m.call(t,v)})))}b.toggle=function(e){(e&&"A"===e.target.tagName||"A"===o.tagName)&&e.preventDefault(),(o.contains(e.target)||e.target===o)&&(t(w,"show")?b.hide():b.show())},b.hide=function(){w.isAnimating||(A(w,o),g(o,"collapsed"))},b.show=function(){var t,n;y&&(l=y.getElementsByClassName("collapse show")[0],r=l&&(d('[data-target="#'+l.id+'"]',y)||d('[href="#'+l.id+'"]',y))),w.isAnimating||(r&&l!==w&&(A(l,r),g(r,"collapsed")),t=w,n=o,m.call(t,c),c.defaultPrevented||(t.isAnimating=!0,g(t,"collapsing"),e(t,"collapse"),t.style.height=t.scrollHeight+"px",s(t,(function(){t.isAnimating=!1,t.setAttribute("aria-expanded","true"),n.setAttribute("aria-expanded","true"),e(t,"collapsing"),g(t,"collapse"),g(t,"show"),t.style.height="",m.call(t,p)}))),e(o,"collapsed"))},b.dispose=function(){i(o,"click",b.toggle),delete o.Collapse},u((function(){(o=d(o)).Collapse&&o.Collapse.dispose();var t=o.getAttribute("data-parent");c=f("show","collapse"),p=f("shown","collapse"),h=f("hide","collapse"),v=f("hidden","collapse"),(w=d(a.target||o.getAttribute("data-target")||o.getAttribute("href"))).isAnimating=!1,y=o.closest(a.parent||t),o.Collapse||n(o,"click",b.toggle),o.Collapse=b}),"BSN.Collapse")}var N="mousedown";"webkitPerspective"in document.body.style||document.body.style,"webkitTransform"in document.body.style||document.body.style;function C(t){t.focus?t.focus():t.setActive()}function x(){return{y:window.pageYOffset||document.documentElement.scrollTop,x:window.pageXOffset||document.documentElement.scrollLeft}}function E(e,n,i,o){var a,l,r,c,s,u,f=n.offsetWidth,m=n.offsetHeight,p=document.documentElement.clientWidth||document.body.clientWidth,g=document.documentElement.clientHeight||document.body.clientHeight,h=e.getBoundingClientRect(),v=o===document.body?x():{x:o.offsetLeft+o.scrollLeft,y:o.offsetTop+o.scrollTop},b=h.right-h.left,y=h.bottom-h.top,w=t(n,"popover"),A=d(".arrow",n),T=h.top+y/2-m/2<0,k=h.left+b/2-f/2<0,N=h.left+f/2+b/2>=p,C=h.top+m/2+y/2>=g,E=h.top-m<0,P=h.left-f<0,S=h.top+m+y>=g,B=h.left+f+b>=p;i="right"===(i="left"===(i="bottom"===(i="top"===(i=("left"===i||"right"===i)&&P&&B?"top":i)&&E?"bottom":i)&&S?"top":i)&&P?"right":i)&&B?"left":i,-1===n.className.indexOf(i)&&(n.className=n.className.replace(/\b(top|bottom|left|right)+/,i)),s=A.offsetWidth,u=A.offsetHeight,"left"===i||"right"===i?(l="left"===i?h.left+v.x-f-(w?s:0):h.left+v.x+b,T?(a=h.top+v.y,r=y/2-s):C?(a=h.top+v.y-m+y,r=m-y/2-s):(a=h.top+v.y-m/2+y/2,r=m/2-(w?.9*u:u/2))):"top"!==i&&"bottom"!==i||(a="top"===i?h.top+v.y-m-(w?u:0):h.top+v.y+y,k?(l=0,c=h.left+b/2-s):N?(l=p-1.01*f,c=f-(p-h.left)+b/2-s/2):(l=h.left+v.x-f/2+b/2,c=f/2-(w?s:s/2))),n.style.top=a+"px",n.style.left=l+"px",r&&(A.style.top=r+"px"),c&&(A.style.left=c+"px")}function P(o,a){var l,r,c,s,p,h,v,b=this,y=null,w=[];function A(t){(t.href&&"#"===t.href.slice(-1)||t.parentNode&&t.parentNode.href&&"#"===t.parentNode.href.slice(-1))&&this.preventDefault()}function T(){var t=o.open?n:i;t(document,"click",k),t(document,"keydown",x),t(document,"keyup",E),t(document,"focus",k,!0)}function k(t){var e=t.target,n=e&&(e.getAttribute("data-toggle")||e.parentNode&&e.parentNode.getAttribute&&e.parentNode.getAttribute("data-toggle"));("focus"!==t.type||e!==o&&e!==h&&!h.contains(e))&&(e!==h&&!h.contains(e)||!v&&!n)&&(y=e===o||o.contains(e)?o:null,b.hide(),A.call(t,e))}function N(t){y=o,b.show(),A.call(t,t.target)}function x(t){var e=t.which||t.keyCode;38!==e&&40!==e||t.preventDefault()}function E(t){var e=t.which,n=t.keyCode,i=e||n,a=document.activeElement,l=a===o,r=h.contains(a),c=a.parentNode===h||a.parentNode.parentNode===h,s=w.indexOf(a);c&&(s=l?0:38===i?s>1?s-1:0:40===i&&s<w.length-1?s+1:s,w[s]&&C(w[s])),(w.length&&c||!w.length&&(r||l)||!r)&&o.open&&27===i&&(b.toggle(),y=null)}b.show=function(){l=f("show","dropdown",y),m.call(p,l),l.defaultPrevented||(g(h,"show"),g(p,"show"),o.setAttribute("aria-expanded",!0),o.open=!0,i(o,"click",N),setTimeout((function(){C(h.getElementsByTagName("INPUT")[0]||o),T(),r=f("shown","dropdown",y),m.call(p,r)}),1))},b.hide=function(){c=f("hide","dropdown",y),m.call(p,c),c.defaultPrevented||(e(h,"show"),e(p,"show"),o.setAttribute("aria-expanded",!1),o.open=!1,T(),C(o),setTimeout((function(){o.Dropdown&&n(o,"click",N)}),1),s=f("hidden","dropdown",y),m.call(p,s))},b.toggle=function(){t(p,"show")&&o.open?b.hide():b.show()},b.dispose=function(){t(p,"show")&&o.open&&b.hide(),i(o,"click",N),delete o.Dropdown},u((function(){(o=d(o)).Dropdown&&o.Dropdown.dispose(),p=o.parentNode,h=d(".dropdown-menu",p),Array.from(h.children).map((function(t){t.children.length&&"A"===t.children[0].tagName&&w.push(t.children[0]),"A"===t.tagName&&w.push(t)})),o.Dropdown||(!("tabindex"in h)&&h.setAttribute("tabindex","0"),n(o,"click",N)),v=!0===a||"true"===o.getAttribute("data-persist")||!1,o.open=!1,o.Dropdown=b}),"BSN.Dropdown")}function S(o,a){a=a||{};var l,r,p,h,v,b,y,w,T,k=this,N=null,x={};function E(){var e,n=t(document.body,"modal-open"),i=parseInt(getComputedStyle(document.body).paddingRight),o=l.clientHeight!==l.scrollHeight;l.style.paddingRight=!o&&b?b+"px":"",document.body.style.paddingRight=i+(n?0:b)+"px",T.length&&T.map((function(t){e=getComputedStyle(t).paddingRight,t.style.paddingRight=parseInt(e)+(n?0:b)+"px"}))}function P(){var t,e;(e=document.createElement("div")).className="modal-scrollbar-measure",document.body.appendChild(e),t=e.offsetWidth-e.clientWidth,document.body.removeChild(e),b=t}function S(){(y=d(".modal-backdrop"))&&!document.getElementsByClassName("modal show")[0]&&(document.body.removeChild(y),y=null),null===y&&(e(document.body,"modal-open"),document.body.style.paddingRight="",l.style.paddingRight="",T.length&&T.map((function(t){t.style.paddingRight=""})))}function B(t){t(window,"resize",k.update,A),t(l,"click",X),t(document,"keydown",D)}function M(){l.style.display="block",P(),E(),!document.getElementsByClassName("modal show")[0]&&g(document.body,"modal-open"),g(l,"show"),l.setAttribute("aria-hidden",!1),t(l,"fade")?s(l,L):L()}function L(){C(l),l.isAnimating=!1,B(n),p=f("shown","modal",N),m.call(l,p)}function H(n){l.style.display="",o&&C(o),y=d(".modal-backdrop"),1!==n&&y&&t(y,"show")&&!document.getElementsByClassName("modal show")[0]?(e(y,"show"),s(y,S)):S(),B(i),l.isAnimating=!1,v=f("hidden","modal"),m.call(l,v)}function I(e){if(!l.isAnimating){var n=e.target;(n=n.hasAttribute("data-target")||n.hasAttribute("href")?n:n.parentNode)!==o&&!o.contains(n)||t(l,"show")||(l.modalTrigger=o,N=o,k.show(),e.preventDefault())}}function D(e){var n=e.which;l.isAnimating||x.keyboard&&27==n&&t(l,"show")&&k.hide()}function X(e){if(!l.isAnimating){var n=e.target;t(l,"show")&&("modal"===n.parentNode.getAttribute("data-dismiss")||"modal"===n.getAttribute("data-dismiss")||n===l&&"static"!==x.backdrop)&&(k.hide(),N=null,e.preventDefault())}}k.toggle=function(){t(l,"show")?k.hide():k.show()},k.show=function(){if(!(t(l,"show")&&l.isAnimating||(r=f("show","modal",N),m.call(l,r),r.defaultPrevented))){l.isAnimating=!0;var e,n=document.getElementsByClassName("modal show")[0];n&&n!==l&&(n.modalTrigger&&n.modalTrigger.Modal.hide(),n.Modal&&n.Modal.hide()),x.backdrop&&(e=document.createElement("div"),null===(y=d(".modal-backdrop"))&&(e.setAttribute("class","modal-backdrop"+(x.animation?" fade":"")),y=e,document.body.appendChild(y)),y=y),!y||n||t(y,"show")||(y.offsetWidth,w=c(y),g(y,"show")),n?M():setTimeout(M,y&&w?w:0)}},k.hide=function(n){t(l,"show")&&(h=f("hide","modal"),m.call(l,h),h.defaultPrevented||(l.isAnimating=!0,e(l,"show"),l.setAttribute("aria-hidden",!0),t(l,"fade")&&1!==n?s(l,H):H()))},k.setContent=function(t){d(".modal-content",l).innerHTML=t},k.update=function(){t(l,"show")&&(P(),E())},k.dispose=function(){k.hide(1),o?(i(o,"click",I),delete o.Modal):delete l.Modal},u((function(){o=d(o);var e=d(o.getAttribute("data-target")||o.getAttribute("href"));l=t(o,"modal")?o:e,T=Array.from(document.getElementsByClassName("fixed-top")).concat(Array.from(document.getElementsByClassName("fixed-bottom"))),t(o,"modal")&&(o=null),o&&o.Modal&&o.Modal.dispose(),l&&l.Modal&&l.Modal.dispose(),x.keyboard=!1!==a.keyboard&&"false"!==l.getAttribute("data-keyboard"),x.backdrop="static"!==a.backdrop&&"static"!==l.getAttribute("data-backdrop")||"static",x.backdrop=!1!==a.backdrop&&"false"!==l.getAttribute("data-backdrop")&&x.backdrop,x.animation=!!t(l,"fade"),x.content=a.content,l.isAnimating=!1,o&&!o.Modal&&n(o,"click",I),x.content&&k.setContent(x.content.trim()),o?(l.modalTrigger=o,o.Modal=k):l.Modal=k}),"BSN.Modal")}function B(o,a){a=a||{};var l,r,c,p,h,b,y,T,k,C,x,P,S,B,M,L,H,I,D,X=this,W=null,O=0,R=/(iPhone|iPod|iPad)/.test(navigator.userAgent),z={};function U(t){null!==W&&t.target===d(".close",W)&&X.hide()}function q(){return{0:a.title||o.getAttribute("data-title")||null,1:a.content||o.getAttribute("data-content")||null}}function Y(){null===W&&o.focus()}function j(t){"hover"===z.trigger?(t(o,N,X.show),t(o,w[0],X.show),z.dismissible||t(o,w[1],X.hide)):"click"==z.trigger?t(o,z.trigger,X.toggle):"focus"==z.trigger&&(R&&t(o,"click",Y),t(o,z.trigger,X.toggle))}function F(t){W&&W.contains(t.target)||t.target===o||o.contains(t.target)||X.hide()}function V(t){z.dismissible?t(document,"click",U):("focus"==z.trigger&&t(o,"blur",X.hide),"hover"==z.trigger&&t(document,v,F,A)),t(window,"resize",X.hide,A)}function G(){V(n),m.call(o,x)}function J(){V(i),z.container.removeChild(W),O=null,W=null,m.call(o,S)}X.toggle=function(){null===W?X.show():X.hide()},X.show=function(){clearTimeout(O),O=setTimeout((function(){if(null===W){if(m.call(o,C),C.defaultPrevented)return;!function(){l=q()[0]||null,r=(r=q()[1])?r.trim():null,W=document.createElement("div");var e=document.createElement("div");if(g(e,"arrow"),W.appendChild(e),null!==r&&null===z.template){if(W.setAttribute("role","tooltip"),null!==l){var n=document.createElement("h3");g(n,"popover-header"),n.innerHTML=z.dismissible?l+k:l,W.appendChild(n)}var i=document.createElement("div");g(i,"popover-body"),i.innerHTML=z.dismissible&&null===l?r+k:r,W.appendChild(i)}else{var o=document.createElement("div");o.innerHTML=z.template.trim(),W.className=o.firstChild.className,W.innerHTML=o.firstChild.innerHTML;var a=d(".popover-header",W),c=d(".popover-body",W);l&&a&&(a.innerHTML=l.trim()),r&&c&&(c.innerHTML=r.trim())}z.container.appendChild(W),W.style.display="block",!t(W,"popover")&&g(W,"popover"),!t(W,z.animation)&&g(W,z.animation),!t(W,D)&&g(W,D)}(),E(o,W,z.placement,z.container),!t(W,"show")&&g(W,"show"),z.animation?s(W,G):G()}}),20)},X.hide=function(){clearTimeout(O),O=setTimeout((function(){if(W&&null!==W&&t(W,"show")){if(m.call(o,P),P.defaultPrevented)return;e(W,"show"),z.animation?s(W,J):J()}}),z.delay)},X.dispose=function(){X.hide(),j(i),delete o.Popover},u((function(){(o=d(o)).Popover&&o.Popover.dispose(),c=o.getAttribute("data-trigger"),p=o.getAttribute("data-animation"),h=o.getAttribute("data-placement"),b=o.getAttribute("data-dismissible"),y=o.getAttribute("data-delay"),T=o.getAttribute("data-container"),k='<button type="button" class="close">×</button>',C=f("show","popover"),x=f("shown","popover"),P=f("hide","popover"),S=f("hidden","popover"),B=d(a.container),M=d(T),L=o.closest(".modal"),H=o.closest(".fixed-top"),I=o.closest(".fixed-bottom"),z.template=a.template?a.template:null,z.trigger=a.trigger?a.trigger:c||"hover",z.animation=a.animation&&"fade"!==a.animation?a.animation:p||"fade",z.placement=a.placement?a.placement:h||"top",z.delay=parseInt(a.delay||y)||200,z.dismissible=!(!a.dismissible&&"true"!==b),z.container=B||(M||(H||(I||(L||document.body)))),D="bs-popover-"+z.placement;var t=q();l=t[0],((r=t[1])||z.template)&&(o.Popover||j(n),o.Popover=X)}),"BSN.Popover")}function M(o,a){a=a||{};var l,r,c,s,p,h=this,v={};function b(){var n;n=s.getElementsByTagName("A"),l.length!==n.length&&(l.items=[],l.targets=[],Array.from(n).map((function(t){var e=t.getAttribute("href"),n=e&&"#"===e.charAt(0)&&"#"!==e.slice(-1)&&d(e);n&&(l.items.push(t),l.targets.push(n))})),l.length=n.length),l.scrollOffset=l.isWindow?x().y:o.scrollTop,l.items.map((function(n,i){return function(n){var i=l.items[n],a=l.targets[n],r=t(i,"dropdown-item")&&i.closest(".dropdown-menu"),c=r&&r.previousElementSibling,s=i.nextElementSibling,d=s&&s.getElementsByClassName("active").length,u=l.isWindow&&a.getBoundingClientRect(),p=t(i,"active")||!1,h=(l.isWindow?u.top+l.scrollOffset:a.offsetTop)-v.offset,b=l.isWindow?u.bottom+l.scrollOffset-v.offset:l.targets[n+1]?l.targets[n+1].offsetTop-v.offset:o.scrollHeight,y=d||l.scrollOffset>=h&&b>l.scrollOffset;if(!p&&y)g(i,"active"),c&&!t(c,"active")&&g(c,"active"),m.call(o,f("activate","scrollspy",l.items[n]));else if(p&&!y)e(i,"active"),c&&t(c,"active")&&!i.parentNode.getElementsByClassName("active").length&&e(c,"active");else if(p&&y||!y&&!p)return}(i)}))}function y(t){t(p,"scroll",h.refresh,A),t(window,"resize",h.refresh,A)}h.refresh=function(){b()},h.dispose=function(){y(i),delete o.ScrollSpy},u((function(){(o=d(o)).ScrollSpy&&o.ScrollSpy.dispose(),r=o.getAttribute("data-target"),c=o.getAttribute("data-offset"),s=d(a.target||r),p=o.offsetHeight<o.scrollHeight?o:window,s&&(v.target=s,v.offset=parseInt(a.offset||c)||10,(l={}).length=0,l.items=[],l.targets=[],l.isWindow=p===window,o.ScrollSpy||y(n),h.refresh(),o.ScrollSpy=h)}),"BSN.ScrollSpy")}function L(o,a){a=a||{};var r,c,p,h,v,b,y,w,A,T,k,N,C,x,E,P=this,S=!1;function B(){S.style.height="",e(S,"collapsing"),c.isAnimating=!1}function M(){S?C?B():setTimeout((function(){S.style.height=x+"px",S.offsetWidth,s(S,B)}),50):c.isAnimating=!1,v=f("shown","tab",A),m.call(w,v)}function L(){S&&(T.style.float="left",k.style.float="left",N=T.scrollHeight),h=f("show","tab",A),y=f("hidden","tab",w),m.call(w,h),h.defaultPrevented||(g(k,"active"),e(T,"active"),S&&(x=k.scrollHeight,C=x===N,g(S,"collapsing"),S.style.height=N+"px",S.offsetHeight,T.style.float="",k.style.float=""),t(k,"fade")?setTimeout((function(){g(k,"show"),s(k,M)}),20):M(),m.call(A,y))}function H(){var e,n=c.getElementsByClassName("active");return 1!==n.length||t(n[0].parentNode,"dropdown")?n.length>1&&(e=n[n.length-1]):e=n[0],e}function I(){return d(H().getAttribute("href"))}function D(t){t.preventDefault(),w=t.currentTarget,!c.isAnimating&&P.show()}P.show=function(){if(!t(w=w||o,"active")){if(k=d(w.getAttribute("href")),A=H(),T=I(),b=f("hide","tab",w),m.call(A,b),b.defaultPrevented)return;c.isAnimating=!0,e(A,"active"),A.setAttribute("aria-selected","false"),g(w,"active"),w.setAttribute("aria-selected","true"),p&&(t(o.parentNode,"dropdown-menu")?t(p,"active")||g(p,"active"):t(p,"active")&&e(p,"active")),t(T,"fade")?(e(T,"show"),s(T,L)):L()}},P.dispose=function(){i(o,"click",D),delete o.Tab},u((function(){(o=d(o)).Tab&&o.Tab.dispose(),r=o.getAttribute("data-height"),c=o.closest(".nav"),p=c&&d(".dropdown-toggle",c),E=!(!l||!1===a.height||"false"===r),c.isAnimating=!1,o.Tab||n(o,"click",D),E&&(S=I().parentNode),o.Tab=P}),"BSN.Tab")}function H(o,a){a=a||{};var l,r,c,p,h,v,b,y,w=this,A=0,T={};function k(){e(l,"showing"),g(l,"show"),m.call(l,b),T.autohide&&w.hide()}function N(){g(l,"hide"),m.call(l,y)}function C(){e(l,"show"),T.animation?s(l,N):N()}function x(){clearTimeout(A),i(o,"click",w.hide),delete o.Toast}w.show=function(){if(l&&!t(l,"show")){if(m.call(l,h),h.defaultPrevented)return;T.animation&&g(l,"fade"),e(l,"hide"),l.offsetWidth,g(l,"showing"),T.animation?s(l,k):k()}},w.hide=function(e){if(l&&t(l,"show")){if(m.call(l,v),v.defaultPrevented)return;e?C():A=setTimeout(C,T.delay)}},w.dispose=function(){T.animation?s(l,x):x()},u((function(){(o=d(o)).Toast&&o.Toast.dispose(),l=o.closest(".toast"),r=o.getAttribute("data-animation"),c=o.getAttribute("data-autohide"),p=o.getAttribute("data-delay"),h=f("show","toast"),v=f("hide","toast"),b=f("shown","toast"),y=f("hidden","toast"),T.animation=!1===a.animation||"false"===r?0:1,T.autohide=!1===a.autohide||"false"===c?0:1,T.delay=parseInt(a.delay||p)||500,o.Toast||n(o,"click",w.hide),o.Toast=w}),"BSN.Toast")}function I(o,a){a=a||{};var l,r,c,p,h,b,y,T,k,C,x,P,S,B,M,L=this,H=null,I=0,D={};function X(){return o.getAttribute("title")||o.getAttribute("data-title")||o.getAttribute("data-original-title")}function W(t){H&&H.contains(t.target)||t.target===o||o.contains(t.target)||L.hide()}function O(){n(document,v,W,A),n(window,"resize",L.hide,A),m.call(o,y)}function R(){i(document,v,W,A),i(window,"resize",L.hide,A),D.container.removeChild(H),H=null,I=null,m.call(o,k)}function z(t){t(o,N,L.show),t(o,w[0],L.show),t(o,w[1],L.hide)}L.show=function(){clearTimeout(I),I=setTimeout((function(){if(null===H){if(m.call(o,b),b.defaultPrevented)return;!1!==function(){if(l=X()){if(H=document.createElement("div"),D.template){var e=document.createElement("div");e.innerHTML=D.template.trim(),H.className=e.firstChild.className,H.innerHTML=e.firstChild.innerHTML,d(".tooltip-inner",H).innerHTML=l.trim()}else{var n=document.createElement("div");g(n,"arrow"),H.appendChild(n);var i=document.createElement("div");g(i,"tooltip-inner"),H.appendChild(i),i.innerHTML=l}H.style.left="0",H.style.top="0",H.setAttribute("role","tooltip"),!t(H,"tooltip")&&g(H,"tooltip"),!t(H,D.animation)&&g(H,D.animation),!t(H,M)&&g(H,M),D.container.appendChild(H)}}()&&(E(o,H,D.placement,D.container),!t(H,"show")&&g(H,"show"),D.animation?s(H,O):O())}}),20)},L.hide=function(){clearTimeout(I),I=setTimeout((function(){if(H&&t(H,"show")){if(m.call(o,T),T.defaultPrevented)return;e(H,"show"),D.animation?s(H,R):R()}}),D.delay)},L.toggle=function(){H?L.hide():L.show()},L.dispose=function(){z(i),L.hide(),o.setAttribute("title",o.getAttribute("data-original-title")),o.removeAttribute("data-original-title"),delete o.Tooltip},u((function(){(o=d(o)).Tooltip&&o.Tooltip.dispose(),r=o.getAttribute("data-animation"),c=o.getAttribute("data-placement"),p=o.getAttribute("data-delay"),h=o.getAttribute("data-container"),b=f("show","tooltip"),y=f("shown","tooltip"),T=f("hide","tooltip"),k=f("hidden","tooltip"),C=d(a.container),x=d(h),P=o.closest(".modal"),S=o.closest(".fixed-top"),B=o.closest(".fixed-bottom"),D.animation=a.animation&&"fade"!==a.animation?a.animation:r||"fade",D.placement=a.placement?a.placement:c||"top",D.template=a.template?a.template:null,D.delay=parseInt(a.delay||p)||200,D.container=C||(x||(S||(B||(P||document.body)))),M="bs-tooltip-"+D.placement,(l=X())&&(o.Tooltip||(o.setAttribute("data-original-title",l),o.removeAttribute("title"),z(n)),o.Tooltip=L)}),"BSN.Tooltip")}var D={},X=function(t){t=t||document;var e=function(t,e){Array.from(e).map((function(e){return new t(e)}))};for(var n in D)e(D[n][0],t.querySelectorAll(D[n][1]))};D.Alert=[p,'[data-dismiss="alert"]'],D.Button=[h,'[data-toggle="buttons"]'],D.Carousel=[T,'[data-ride="carousel"]'],D.Collapse=[k,'[data-toggle="collapse"]'],D.Dropdown=[P,'[data-toggle="dropdown"]'],D.Modal=[S,'[data-toggle="modal"]'],D.Popover=[B,'[data-toggle="popover"],[data-tip="popover"]'],D.ScrollSpy=[M,'[data-spy="scroll"]'],D.Tab=[L,'[data-toggle="tab"]'],D.Toast=[H,'[data-dismiss="toast"]'],D.Tooltip=[I,'[data-toggle="tooltip"],[data-tip="tooltip"]'],document.body?X():o(document,"DOMContentLoaded",X);var W={Alert:p,Button:h,Carousel:T,Collapse:k,Dropdown:P,Modal:S,Popover:B,ScrollSpy:M,Tab:L,Toast:H,Tooltip:I,initCallback:X,removeDataAPI:function(t){t=t||document;var e=function(t,e){Array.from(e).map((function(e){return e[t].dispose()}))};for(var n in D)e(n,t.querySelectorAll(D[n][1]))},componentsInit:D,Version:"3.0.0"};export default W; | ||
// Native JavaScript for Bootstrap v3.0.1 | 2020 © dnp_theme | MIT-License | ||
function t(t,e){return t.classList.contains(e)}function e(t,e){t.classList.remove(e)}function i(t,e,i,n){n=n||!1,t.addEventListener(e,i,n)}function n(t,e,i,n){n=n||!1,t.removeEventListener(e,i,n)}function o(t,e,o,a){i(t,e,(function i(l){l.target===t&&(o(l),n(t,e,i,a))}),a)}var a="webkitTransition"in document.body.style?"webkitTransitionEnd":"transitionend",l="webkitTransition"in document.body.style||"transition"in document.body.style,r="webkitTransition"in document.body.style?"webkitTransitionDuration":"transitionDuration";function c(t){var e=l?window.getComputedStyle(t)[r]:0;return e="number"!=typeof(e=parseFloat(e))||isNaN(e)?0:1e3*e}function s(t,e){var i=0;c(t)?o(t,a,(function(t){!i&&e(t),i=1})):setTimeout((function(){!i&&e(),i=1}),17)}function d(t,e){var i=e&&e instanceof Element?e:document;return t instanceof Element?t:i.querySelector(t)}function u(t,e){try{t()}catch(t){console.error(e+": "+t)}}function f(t,e,i){var n=new CustomEvent(t+".bs."+e,{cancelable:!0});return n.relatedTarget=i,n}function m(t){this&&this.dispatchEvent(t)}function p(o){var a,l=this,r=f("close","alert"),c=f("closed","alert");function p(t){a=t&&t.target.closest(".alert"),(o=d('[data-dismiss="alert"]',a))&&a&&(o===t.target||o.contains(t.target))&&l.close()}function g(){n(o,"click",p),a.parentNode.removeChild(a),m.call(a,c)}l.close=function(){if(a&&o&&t(a,"show")){if(m.call(a,r),r.defaultPrevented)return;l.dispose(),e(a,"show"),t(a,"fade")?s(a,g):g()}},l.dispose=function(){n(o,"click",p),delete o.Alert},u((function(){o=d(o),a=o.closest(".alert"),o.Alert&&o.Alert.dispose(),o.Alert||i(o,"click",p),l.element=o,o.Alert=l}),"BSN.Alert")}function g(t,e){t.classList.add(e)}function h(o){var a,l=this,r=f("change","button");function c(i){var n,l="LABEL"===i.target.tagName?i.target:i.target.closest("LABEL")?i.target.closest("LABEL"):null;if(n=l&&l.getElementsByTagName("INPUT")[0]){if(m.call(n,r),m.call(o,r),"checkbox"===n.type){if(r.defaultPrevented)return;n.checked?(e(l,"active"),n.getAttribute("checked"),n.removeAttribute("checked"),n.checked=!1):(g(l,"active"),n.getAttribute("checked"),n.setAttribute("checked","checked"),n.checked=!0),o.toggled||(o.toggled=!0)}if("radio"===n.type&&!o.toggled){if(r.defaultPrevented)return;(!n.checked||0===i.screenX&&0==i.screenY)&&(g(l,"active"),g(l,"focus"),n.setAttribute("checked","checked"),n.checked=!0,o.toggled=!0,Array.from(a).map((function(i){var n=i.getElementsByTagName("INPUT")[0];i!==l&&t(i,"active")&&(m.call(n,r),e(i,"active"),n.removeAttribute("checked"),n.checked=!1)})))}setTimeout((function(){o.toggled=!1}),50)}}function s(t){32===(t.which||t.keyCode)&&t.target===document.activeElement&&c(t)}function p(t){32===(t.which||t.keyCode)&&t.preventDefault()}function h(t){var i="focusin"===t.type?g:e;"INPUT"===t.target.tagName&&i(t.target.closest(".btn"),"focus")}function v(t){t(o,"click",c),t(o,"keyup",s),t(o,"keydown",p),t(o,"focusin",h),t(o,"focusout",h)}l.dispose=function(){v(n),delete o.Button},u((function(){(o=d(o)).Button&&o.Button.dispose(),(a=o.getElementsByClassName("btn")).length&&(o.Button||v(i),o.toggled=!1,o.Button=l,Array.from(a).map((function(i){!t(i,"active")&&d("input:checked",i)&&g(i,"active"),t(i,"active")&&!d("input:checked",i)&&e(i,"active")})))}),"BSN.Button")}var v="touchstart",b="touchend",y="touchmove",w="onmouseleave"in document?["mouseenter","mouseleave"]:["mouseover","mouseout"],A=!!function(){var t=!1;try{var e=Object.defineProperty({},"passive",{get:function(){t=!0}});o(document,"DOMContentLoaded",(function(){}),e)}catch(t){}return t}()&&{passive:!0};function T(o,a){a=a||{};var l,r,p,h,T,k,N,C,x=this,E={};function P(){!1===E.interval||t(o,"paused")||(g(o,"paused"),!l.isSliding&&(clearInterval(l.timer),l.timer=null))}function S(){!1!==E.interval&&t(o,"paused")&&(e(o,"paused"),!l.isSliding&&(clearInterval(l.timer),l.timer=null),!l.isSliding&&x.cycle())}function B(e){if(e.preventDefault(),!l.isSliding){var i=e.target;if(!i||t(i,"active")||!i.getAttribute("data-slide-to"))return!1;l.index=parseInt(i.getAttribute("data-slide-to"),10),x.slideTo(l.index)}}function M(t){if(t.preventDefault(),!l.isSliding){var e=t.currentTarget||t.srcElement;e===k?l.index++:e===T&&l.index--,x.slideTo(l.index)}}function L(t){var e=t.which;if(!l.isSliding){switch(e){case 39:l.index++;break;case 37:l.index--;break;default:return}x.slideTo(l.index)}}function H(t){E.pause&&E.interval&&(t(o,w[0],P),t(o,w[1],S),t(o,v,P,A),t(o,b,S,A)),h.length>1&&t(o,v,D,A),k&&t(k,"click",M),T&&t(T,"click",M),N&&t(N,"click",B),E.keyboard&&t(window,"keydown",L)}function I(t){t(o,y,X,A),t(o,b,W,A)}function D(t){l.isTouch||(l.touchPosition.startX=t.changedTouches[0].pageX,o.contains(t.target)&&(l.isTouch=!0,I(i)))}function X(t){if(l.isTouch)return l.touchPosition.currentX=t.changedTouches[0].pageX,"touchmove"===t.type&&t.changedTouches.length>1?(t.preventDefault(),!1):void 0;t.preventDefault()}function W(t){if(l.isTouch&&!l.isSliding&&(l.touchPosition.endX=l.touchPosition.currentX||t.changedTouches[0].pageX,l.isTouch)){if((!o.contains(t.target)||!o.contains(t.relatedTarget))&&Math.abs(l.touchPosition.startX-l.touchPosition.endX)<75)return!1;l.touchPosition.currentX<l.touchPosition.startX?l.index++:l.touchPosition.currentX>l.touchPosition.startX&&l.index--,l.isTouch=!1,x.slideTo(l.index),I(n)}}function O(t){Array.from(C).map((function(t){e(t,"active")})),C[t]&&g(C[t],"active")}function R(i){if(l.touchPosition){var n=l.index,a=i&&i.target!==h[n]?1e3*i.elapsedTime+100:20,r=x.getActiveIndex(),c="left"===l.direction?"next":"prev";l.isSliding&&setTimeout((function(){l.touchPosition&&(l.isSliding=!1,g(h[n],"active"),e(h[r],"active"),e(h[n],"carousel-item-"+c),e(h[n],"carousel-item-"+l.direction),e(h[r],"carousel-item-"+l.direction),m.call(o,p),document.hidden||!E.interval||t(o,"paused")||x.cycle())}),a)}}x.cycle=function(){l.timer&&(clearInterval(l.timer),l.timer=null),l.timer=setInterval((function(){var t=l.index||x.getActiveIndex();(function(t){var e=t.getBoundingClientRect(),i=window.innerHeight||document.documentElement.clientHeight;return e.top<=i&&e.bottom>=0})(o)&&(t++,x.slideTo(t))}),E.interval)},x.slideTo=function(i){if(!l.isSliding){var n,a=x.getActiveIndex();a!==i&&(a<i||0===a&&i===h.length-1?l.direction="left":(a>i||a===h.length-1&&0===i)&&(l.direction="right"),i<0?i=h.length-1:i>=h.length&&(i=0),n="left"===l.direction?"next":"prev",r=f("slide","carousel",h[i]),p=f("slid","carousel",h[i]),m.call(o,r),r.defaultPrevented||(l.index=i,l.isSliding=!0,clearInterval(l.timer),l.timer=null,O(i),c(h[i])&&t(o,"slide")?(g(h[i],"carousel-item-"+n),h[i].offsetWidth,g(h[i],"carousel-item-"+l.direction),g(h[a],"carousel-item-"+l.direction),s(h[i],R)):(g(h[i],"active"),h[i].offsetWidth,e(h[a],"active"),setTimeout((function(){l.isSliding=!1,E.interval&&o&&!t(o,"paused")&&x.cycle(),m.call(o,p)}),100))))}},x.getActiveIndex=function(){return Array.from(h).indexOf(o.getElementsByClassName("carousel-item active")[0])||0},x.dispose=function(){var i=["left","right","prev","next"];Array.from(h).map((function(n,o){t(n,"active")&&O(o),i.map((function(t){return e(n,"carousel-item-"+t)}))})),clearInterval(l.timer),H(n),l={},delete o.Carousel},(l={}).direction="left",l.index=0,l.timer=null,l.isSliding=!1,l.isTouch=!1,l.touchPosition={startX:0,currentX:0,endX:0},u((function(){(o=d(o)).Carousel&&o.Carousel.dispose();var t=o.getAttribute("data-interval"),e=a.interval,n="false"===t?0:parseInt(t),l="hover"===o.getAttribute("data-pause")||!1,r="true"===o.getAttribute("data-keyboard")||!1;h=o.getElementsByClassName("carousel-item"),T=o.getElementsByClassName("carousel-control-prev")[0],k=o.getElementsByClassName("carousel-control-next")[0],N=o.getElementsByClassName("carousel-indicators")[0],C=N&&N.getElementsByTagName("LI")||[],E.keyboard=!0===a.keyboard||r,E.pause=!("hover"!==a.pause&&!l)&&"hover",E.interval="number"==typeof e?e:!1===e||0===n||!1===n?0:isNaN(n)?5e3:n,h.length<2||(o.Carousel||H(i),x.getActiveIndex()<0&&(h.length&&g(h[0],"active"),C.length&&O(0)),E.interval&&x.cycle(),o.Carousel=x)}),"BSN.Carousel")}function k(o,a){a=a||{};var l,r,c,p,h,v,b=this,y=null,w=null;function A(t,i){m.call(t,h),h.defaultPrevented||(t.isAnimating=!0,t.style.height=t.scrollHeight+"px",e(t,"collapse"),e(t,"show"),g(t,"collapsing"),t.offsetWidth,t.style.height="0px",s(t,(function(){t.isAnimating=!1,t.setAttribute("aria-expanded","false"),i.setAttribute("aria-expanded","false"),e(t,"collapsing"),g(t,"collapse"),t.style.height="",m.call(t,v)})))}b.toggle=function(e){(e&&"A"===e.target.tagName||"A"===o.tagName)&&e.preventDefault(),(o.contains(e.target)||e.target===o)&&(t(w,"show")?b.hide():b.show())},b.hide=function(){w.isAnimating||(A(w,o),g(o,"collapsed"))},b.show=function(){var t,i;y&&(l=y.getElementsByClassName("collapse show")[0],r=l&&(d('[data-target="#'+l.id+'"]',y)||d('[href="#'+l.id+'"]',y))),w.isAnimating||(r&&l!==w&&(A(l,r),g(r,"collapsed")),t=w,i=o,m.call(t,c),c.defaultPrevented||(t.isAnimating=!0,g(t,"collapsing"),e(t,"collapse"),t.style.height=t.scrollHeight+"px",s(t,(function(){t.isAnimating=!1,t.setAttribute("aria-expanded","true"),i.setAttribute("aria-expanded","true"),e(t,"collapsing"),g(t,"collapse"),g(t,"show"),t.style.height="",m.call(t,p)}))),e(o,"collapsed"))},b.dispose=function(){n(o,"click",b.toggle),delete o.Collapse},u((function(){(o=d(o)).Collapse&&o.Collapse.dispose();var t=o.getAttribute("data-parent");c=f("show","collapse"),p=f("shown","collapse"),h=f("hide","collapse"),v=f("hidden","collapse"),(w=d(a.target||o.getAttribute("data-target")||o.getAttribute("href"))).isAnimating=!1,y=o.closest(a.parent||t),o.Collapse||i(o,"click",b.toggle),o.Collapse=b}),"BSN.Collapse")}var N="mousedown";"webkitPerspective"in document.body.style||document.body.style,"webkitTransform"in document.body.style||document.body.style;function C(t){t.focus?t.focus():t.setActive()}function x(){return{y:window.pageYOffset||document.documentElement.scrollTop,x:window.pageXOffset||document.documentElement.scrollLeft}}function E(e,i,n,o){var a,l,r,c,s,u,f=i.offsetWidth,m=i.offsetHeight,p=document.documentElement.clientWidth||document.body.clientWidth,g=document.documentElement.clientHeight||document.body.clientHeight,h=e.getBoundingClientRect(),v=o===document.body?x():{x:o.offsetLeft+o.scrollLeft,y:o.offsetTop+o.scrollTop},b=h.right-h.left,y=h.bottom-h.top,w=t(i,"popover"),A=d(".arrow",i),T=h.top+y/2-m/2<0,k=h.left+b/2-f/2<0,N=h.left+f/2+b/2>=p,C=h.top+m/2+y/2>=g,E=h.top-m<0,P=h.left-f<0,S=h.top+m+y>=g,B=h.left+f+b>=p;n="right"===(n="left"===(n="bottom"===(n="top"===(n=("left"===n||"right"===n)&&P&&B?"top":n)&&E?"bottom":n)&&S?"top":n)&&P?"right":n)&&B?"left":n,-1===i.className.indexOf(n)&&(i.className=i.className.replace(/\b(top|bottom|left|right)+/,n)),s=A.offsetWidth,u=A.offsetHeight,"left"===n||"right"===n?(l="left"===n?h.left+v.x-f-(w?s:0):h.left+v.x+b,T?(a=h.top+v.y,r=y/2-s):C?(a=h.top+v.y-m+y,r=m-y/2-s):(a=h.top+v.y-m/2+y/2,r=m/2-(w?.9*u:u/2))):"top"!==n&&"bottom"!==n||(a="top"===n?h.top+v.y-m-(w?u:0):h.top+v.y+y,k?(l=0,c=h.left+b/2-s):N?(l=p-1.01*f,c=f-(p-h.left)+b/2-s/2):(l=h.left+v.x-f/2+b/2,c=f/2-(w?s:s/2))),i.style.top=a+"px",i.style.left=l+"px",r&&(A.style.top=r+"px"),c&&(A.style.left=c+"px")}function P(o,a){var l,r,c,s,p,h,v,b=this,y=null,w=[];function A(t){(t.href&&"#"===t.href.slice(-1)||t.parentNode&&t.parentNode.href&&"#"===t.parentNode.href.slice(-1))&&this.preventDefault()}function T(){var t=o.open?i:n;t(document,"click",k),t(document,"keydown",x),t(document,"keyup",E),t(document,"focus",k,!0)}function k(t){var e=t.target,i=e&&(e.getAttribute("data-toggle")||e.parentNode&&e.parentNode.getAttribute&&e.parentNode.getAttribute("data-toggle"));("focus"!==t.type||e!==o&&e!==h&&!h.contains(e))&&(e!==h&&!h.contains(e)||!v&&!i)&&(y=e===o||o.contains(e)?o:null,b.hide(),A.call(t,e))}function N(t){y=o,b.show(),A.call(t,t.target)}function x(t){var e=t.which||t.keyCode;38!==e&&40!==e||t.preventDefault()}function E(t){var e=t.which,i=t.keyCode,n=e||i,a=document.activeElement,l=a===o,r=h.contains(a),c=a.parentNode===h||a.parentNode.parentNode===h,s=w.indexOf(a);c&&(s=l?0:38===n?s>1?s-1:0:40===n&&s<w.length-1?s+1:s,w[s]&&C(w[s])),(w.length&&c||!w.length&&(r||l)||!r)&&o.open&&27===n&&(b.toggle(),y=null)}b.show=function(){l=f("show","dropdown",y),m.call(p,l),l.defaultPrevented||(g(h,"show"),g(p,"show"),o.setAttribute("aria-expanded",!0),o.open=!0,n(o,"click",N),setTimeout((function(){C(h.getElementsByTagName("INPUT")[0]||o),T(),r=f("shown","dropdown",y),m.call(p,r)}),1))},b.hide=function(){c=f("hide","dropdown",y),m.call(p,c),c.defaultPrevented||(e(h,"show"),e(p,"show"),o.setAttribute("aria-expanded",!1),o.open=!1,T(),C(o),setTimeout((function(){o.Dropdown&&i(o,"click",N)}),1),s=f("hidden","dropdown",y),m.call(p,s))},b.toggle=function(){t(p,"show")&&o.open?b.hide():b.show()},b.dispose=function(){t(p,"show")&&o.open&&b.hide(),n(o,"click",N),delete o.Dropdown},u((function(){(o=d(o)).Dropdown&&o.Dropdown.dispose(),p=o.parentNode,h=d(".dropdown-menu",p),Array.from(h.children).map((function(t){t.children.length&&"A"===t.children[0].tagName&&w.push(t.children[0]),"A"===t.tagName&&w.push(t)})),o.Dropdown||(!("tabindex"in h)&&h.setAttribute("tabindex","0"),i(o,"click",N)),v=!0===a||"true"===o.getAttribute("data-persist")||!1,o.open=!1,o.Dropdown=b}),"BSN.Dropdown")}function S(o,a){a=a||{};var l,r,p,h,v,b,y,w,T,k=this,N=null,x={};function E(){var e,i=t(document.body,"modal-open"),n=parseInt(getComputedStyle(document.body).paddingRight),o=l.clientHeight!==l.scrollHeight;l.style.paddingRight=!o&&b?b+"px":"",document.body.style.paddingRight=n+(i?0:b)+"px",T.length&&T.map((function(t){e=getComputedStyle(t).paddingRight,t.style.paddingRight=parseInt(e)+(i?0:b)+"px"}))}function P(){var t,e;(e=document.createElement("div")).className="modal-scrollbar-measure",document.body.appendChild(e),t=e.offsetWidth-e.clientWidth,document.body.removeChild(e),b=t}function S(){(y=d(".modal-backdrop"))&&!document.getElementsByClassName("modal show")[0]&&(document.body.removeChild(y),y=null),null===y&&(e(document.body,"modal-open"),document.body.style.paddingRight="",l.style.paddingRight="",T.length&&T.map((function(t){t.style.paddingRight=""})))}function B(t){t(window,"resize",k.update,A),t(l,"click",X),t(document,"keydown",D)}function M(){l.style.display="block",P(),E(),!document.getElementsByClassName("modal show")[0]&&g(document.body,"modal-open"),g(l,"show"),l.setAttribute("aria-hidden",!1),t(l,"fade")?s(l,L):L()}function L(){C(l),l.isAnimating=!1,B(i),p=f("shown","modal",N),m.call(l,p)}function H(i){l.style.display="",o&&C(o),y=d(".modal-backdrop"),1!==i&&y&&t(y,"show")&&!document.getElementsByClassName("modal show")[0]?(e(y,"show"),s(y,S)):S(),B(n),l.isAnimating=!1,v=f("hidden","modal"),m.call(l,v)}function I(e){if(!l.isAnimating){var i=e.target,n="#"+l.getAttribute("id"),a=i.getAttribute("data-target")||i.getAttribute("href"),r=o.getAttribute("data-target")||o.getAttribute("href");!t(l,"show")&&(i===o&&a===n||o.contains(i)&&r===n)&&(l.modalTrigger=o,N=o,k.show(),e.preventDefault())}}function D(e){var i=e.which;!l.isAnimating&&x.keyboard&&27==i&&t(l,"show")&&k.hide()}function X(e){if(!l.isAnimating){var i=e.target,n="modal"===i.getAttribute("data-dismiss"),o=i.closest('[data-dismiss="modal"]');t(l,"show")&&(o||n||i===l&&"static"!==x.backdrop)&&(k.hide(),N=null,e.preventDefault())}}k.toggle=function(){t(l,"show")?k.hide():k.show()},k.show=function(){if(!(t(l,"show")&&l.isAnimating||(r=f("show","modal",N),m.call(l,r),r.defaultPrevented))){l.isAnimating=!0;var e,i=document.getElementsByClassName("modal show")[0];i&&i!==l&&(i.modalTrigger&&i.modalTrigger.Modal.hide(),i.Modal&&i.Modal.hide()),x.backdrop&&(e=document.createElement("div"),null===(y=d(".modal-backdrop"))&&(e.setAttribute("class","modal-backdrop"+(x.animation?" fade":"")),y=e,document.body.appendChild(y)),y=y),!y||i||t(y,"show")||(y.offsetWidth,w=c(y),g(y,"show")),i?M():setTimeout(M,y&&w?w:0)}},k.hide=function(i){t(l,"show")&&(h=f("hide","modal"),m.call(l,h),h.defaultPrevented||(l.isAnimating=!0,e(l,"show"),l.setAttribute("aria-hidden",!0),t(l,"fade")&&1!==i?s(l,H):H()))},k.setContent=function(t){d(".modal-content",l).innerHTML=t},k.update=function(){t(l,"show")&&(P(),E())},k.dispose=function(){k.hide(1),o?(n(o,"click",I),delete o.Modal):delete l.Modal},u((function(){o=d(o);var e=d(o.getAttribute("data-target")||o.getAttribute("href"));l=t(o,"modal")?o:e,T=Array.from(document.getElementsByClassName("fixed-top")).concat(Array.from(document.getElementsByClassName("fixed-bottom"))),t(o,"modal")&&(o=null),o&&o.Modal&&o.Modal.dispose(),l&&l.Modal&&l.Modal.dispose(),x.keyboard=!1!==a.keyboard&&"false"!==l.getAttribute("data-keyboard"),x.backdrop="static"!==a.backdrop&&"static"!==l.getAttribute("data-backdrop")||"static",x.backdrop=!1!==a.backdrop&&"false"!==l.getAttribute("data-backdrop")&&x.backdrop,x.animation=!!t(l,"fade"),x.content=a.content,l.isAnimating=!1,o&&!o.Modal&&i(o,"click",I),x.content&&k.setContent(x.content.trim()),o?(l.modalTrigger=o,o.Modal=k):l.Modal=k}),"BSN.Modal")}function B(o,a){a=a||{};var l,r,c,p,h,b,y,T,k,C,x,P,S,B,M,L,H,I,D,X=this,W=null,O=0,R=/(iPhone|iPod|iPad)/.test(navigator.userAgent),z={};function U(t){null!==W&&t.target===d(".close",W)&&X.hide()}function q(){return{0:a.title||o.getAttribute("data-title")||null,1:a.content||o.getAttribute("data-content")||null}}function Y(){null===W&&o.focus()}function j(t){"hover"===z.trigger?(t(o,N,X.show),t(o,w[0],X.show),z.dismissible||t(o,w[1],X.hide)):"click"==z.trigger?t(o,z.trigger,X.toggle):"focus"==z.trigger&&(R&&t(o,"click",Y),t(o,z.trigger,X.toggle))}function F(t){W&&W.contains(t.target)||t.target===o||o.contains(t.target)||X.hide()}function V(t){z.dismissible?t(document,"click",U):("focus"==z.trigger&&t(o,"blur",X.hide),"hover"==z.trigger&&t(document,v,F,A)),t(window,"resize",X.hide,A)}function G(){V(i),m.call(o,x)}function J(){V(n),z.container.removeChild(W),O=null,W=null,m.call(o,S)}X.toggle=function(){null===W?X.show():X.hide()},X.show=function(){clearTimeout(O),O=setTimeout((function(){if(null===W){if(m.call(o,C),C.defaultPrevented)return;!function(){l=q()[0]||null,r=(r=q()[1])?r.trim():null,W=document.createElement("div");var e=document.createElement("div");if(g(e,"arrow"),W.appendChild(e),null!==r&&null===z.template){if(W.setAttribute("role","tooltip"),null!==l){var i=document.createElement("h3");g(i,"popover-header"),i.innerHTML=z.dismissible?l+k:l,W.appendChild(i)}var n=document.createElement("div");g(n,"popover-body"),n.innerHTML=z.dismissible&&null===l?r+k:r,W.appendChild(n)}else{var o=document.createElement("div");o.innerHTML=z.template.trim(),W.className=o.firstChild.className,W.innerHTML=o.firstChild.innerHTML;var a=d(".popover-header",W),c=d(".popover-body",W);l&&a&&(a.innerHTML=l.trim()),r&&c&&(c.innerHTML=r.trim())}z.container.appendChild(W),W.style.display="block",!t(W,"popover")&&g(W,"popover"),!t(W,z.animation)&&g(W,z.animation),!t(W,D)&&g(W,D)}(),E(o,W,z.placement,z.container),!t(W,"show")&&g(W,"show"),z.animation?s(W,G):G()}}),20)},X.hide=function(){clearTimeout(O),O=setTimeout((function(){if(W&&null!==W&&t(W,"show")){if(m.call(o,P),P.defaultPrevented)return;e(W,"show"),z.animation?s(W,J):J()}}),z.delay)},X.dispose=function(){X.hide(),j(n),delete o.Popover},u((function(){(o=d(o)).Popover&&o.Popover.dispose(),c=o.getAttribute("data-trigger"),p=o.getAttribute("data-animation"),h=o.getAttribute("data-placement"),b=o.getAttribute("data-dismissible"),y=o.getAttribute("data-delay"),T=o.getAttribute("data-container"),k='<button type="button" class="close">×</button>',C=f("show","popover"),x=f("shown","popover"),P=f("hide","popover"),S=f("hidden","popover"),B=d(a.container),M=d(T),L=o.closest(".modal"),H=o.closest(".fixed-top"),I=o.closest(".fixed-bottom"),z.template=a.template?a.template:null,z.trigger=a.trigger?a.trigger:c||"hover",z.animation=a.animation&&"fade"!==a.animation?a.animation:p||"fade",z.placement=a.placement?a.placement:h||"top",z.delay=parseInt(a.delay||y)||200,z.dismissible=!(!a.dismissible&&"true"!==b),z.container=B||(M||(H||(I||(L||document.body)))),D="bs-popover-"+z.placement;var t=q();l=t[0],((r=t[1])||z.template)&&(o.Popover||j(i),o.Popover=X)}),"BSN.Popover")}function M(o,a){a=a||{};var l,r,c,s,p,h=this,v={};function b(){var i;i=s.getElementsByTagName("A"),l.length!==i.length&&(l.items=[],l.targets=[],Array.from(i).map((function(t){var e=t.getAttribute("href"),i=e&&"#"===e.charAt(0)&&"#"!==e.slice(-1)&&d(e);i&&(l.items.push(t),l.targets.push(i))})),l.length=i.length),l.scrollOffset=l.isWindow?x().y:o.scrollTop,l.items.map((function(i,n){return function(i){var n=l.items[i],a=l.targets[i],r=t(n,"dropdown-item")&&n.closest(".dropdown-menu"),c=r&&r.previousElementSibling,s=n.nextElementSibling,d=s&&s.getElementsByClassName("active").length,u=l.isWindow&&a.getBoundingClientRect(),p=t(n,"active")||!1,h=(l.isWindow?u.top+l.scrollOffset:a.offsetTop)-v.offset,b=l.isWindow?u.bottom+l.scrollOffset-v.offset:l.targets[i+1]?l.targets[i+1].offsetTop-v.offset:o.scrollHeight,y=d||l.scrollOffset>=h&&b>l.scrollOffset;if(!p&&y)g(n,"active"),c&&!t(c,"active")&&g(c,"active"),m.call(o,f("activate","scrollspy",l.items[i]));else if(p&&!y)e(n,"active"),c&&t(c,"active")&&!n.parentNode.getElementsByClassName("active").length&&e(c,"active");else if(p&&y||!y&&!p)return}(n)}))}function y(t){t(p,"scroll",h.refresh,A),t(window,"resize",h.refresh,A)}h.refresh=function(){b()},h.dispose=function(){y(n),delete o.ScrollSpy},u((function(){(o=d(o)).ScrollSpy&&o.ScrollSpy.dispose(),r=o.getAttribute("data-target"),c=o.getAttribute("data-offset"),s=d(a.target||r),p=o.offsetHeight<o.scrollHeight?o:window,s&&(v.target=s,v.offset=parseInt(a.offset||c)||10,(l={}).length=0,l.items=[],l.targets=[],l.isWindow=p===window,o.ScrollSpy||y(i),h.refresh(),o.ScrollSpy=h)}),"BSN.ScrollSpy")}function L(o,a){a=a||{};var r,c,p,h,v,b,y,w,A,T,k,N,C,x,E,P=this,S=!1;function B(){S.style.height="",e(S,"collapsing"),c.isAnimating=!1}function M(){S?C?B():setTimeout((function(){S.style.height=x+"px",S.offsetWidth,s(S,B)}),50):c.isAnimating=!1,v=f("shown","tab",A),m.call(w,v)}function L(){S&&(T.style.float="left",k.style.float="left",N=T.scrollHeight),h=f("show","tab",A),y=f("hidden","tab",w),m.call(w,h),h.defaultPrevented||(g(k,"active"),e(T,"active"),S&&(x=k.scrollHeight,C=x===N,g(S,"collapsing"),S.style.height=N+"px",S.offsetHeight,T.style.float="",k.style.float=""),t(k,"fade")?setTimeout((function(){g(k,"show"),s(k,M)}),20):M(),m.call(A,y))}function H(){var e,i=c.getElementsByClassName("active");return 1!==i.length||t(i[0].parentNode,"dropdown")?i.length>1&&(e=i[i.length-1]):e=i[0],e}function I(){return d(H().getAttribute("href"))}function D(t){t.preventDefault(),w=t.currentTarget,!c.isAnimating&&P.show()}P.show=function(){if(!t(w=w||o,"active")){if(k=d(w.getAttribute("href")),A=H(),T=I(),b=f("hide","tab",w),m.call(A,b),b.defaultPrevented)return;c.isAnimating=!0,e(A,"active"),A.setAttribute("aria-selected","false"),g(w,"active"),w.setAttribute("aria-selected","true"),p&&(t(o.parentNode,"dropdown-menu")?t(p,"active")||g(p,"active"):t(p,"active")&&e(p,"active")),t(T,"fade")?(e(T,"show"),s(T,L)):L()}},P.dispose=function(){n(o,"click",D),delete o.Tab},u((function(){(o=d(o)).Tab&&o.Tab.dispose(),r=o.getAttribute("data-height"),c=o.closest(".nav"),p=c&&d(".dropdown-toggle",c),E=!(!l||!1===a.height||"false"===r),c.isAnimating=!1,o.Tab||i(o,"click",D),E&&(S=I().parentNode),o.Tab=P}),"BSN.Tab")}function H(o,a){a=a||{};var l,r,c,p,h,v,b,y,w=this,A=0,T={};function k(){e(l,"showing"),g(l,"show"),m.call(l,b),T.autohide&&w.hide()}function N(){g(l,"hide"),m.call(l,y)}function C(){e(l,"show"),T.animation?s(l,N):N()}function x(){clearTimeout(A),n(o,"click",w.hide),delete o.Toast}w.show=function(){if(l&&!t(l,"show")){if(m.call(l,h),h.defaultPrevented)return;T.animation&&g(l,"fade"),e(l,"hide"),l.offsetWidth,g(l,"showing"),T.animation?s(l,k):k()}},w.hide=function(e){if(l&&t(l,"show")){if(m.call(l,v),v.defaultPrevented)return;e?C():A=setTimeout(C,T.delay)}},w.dispose=function(){T.animation?s(l,x):x()},u((function(){(o=d(o)).Toast&&o.Toast.dispose(),l=o.closest(".toast"),r=o.getAttribute("data-animation"),c=o.getAttribute("data-autohide"),p=o.getAttribute("data-delay"),h=f("show","toast"),v=f("hide","toast"),b=f("shown","toast"),y=f("hidden","toast"),T.animation=!1===a.animation||"false"===r?0:1,T.autohide=!1===a.autohide||"false"===c?0:1,T.delay=parseInt(a.delay||p)||500,o.Toast||i(o,"click",w.hide),o.Toast=w}),"BSN.Toast")}function I(o,a){a=a||{};var l,r,c,p,h,b,y,T,k,C,x,P,S,B,M,L=this,H=null,I=0,D={};function X(){return o.getAttribute("title")||o.getAttribute("data-title")||o.getAttribute("data-original-title")}function W(t){H&&H.contains(t.target)||t.target===o||o.contains(t.target)||L.hide()}function O(){i(document,v,W,A),i(window,"resize",L.hide,A),m.call(o,y)}function R(){n(document,v,W,A),n(window,"resize",L.hide,A),D.container.removeChild(H),H=null,I=null,m.call(o,k)}function z(t){t(o,N,L.show),t(o,w[0],L.show),t(o,w[1],L.hide)}L.show=function(){clearTimeout(I),I=setTimeout((function(){if(null===H){if(m.call(o,b),b.defaultPrevented)return;!1!==function(){if(l=X()){if(H=document.createElement("div"),D.template){var e=document.createElement("div");e.innerHTML=D.template.trim(),H.className=e.firstChild.className,H.innerHTML=e.firstChild.innerHTML,d(".tooltip-inner",H).innerHTML=l.trim()}else{var i=document.createElement("div");g(i,"arrow"),H.appendChild(i);var n=document.createElement("div");g(n,"tooltip-inner"),H.appendChild(n),n.innerHTML=l}H.style.left="0",H.style.top="0",H.setAttribute("role","tooltip"),!t(H,"tooltip")&&g(H,"tooltip"),!t(H,D.animation)&&g(H,D.animation),!t(H,M)&&g(H,M),D.container.appendChild(H)}}()&&(E(o,H,D.placement,D.container),!t(H,"show")&&g(H,"show"),D.animation?s(H,O):O())}}),20)},L.hide=function(){clearTimeout(I),I=setTimeout((function(){if(H&&t(H,"show")){if(m.call(o,T),T.defaultPrevented)return;e(H,"show"),D.animation?s(H,R):R()}}),D.delay)},L.toggle=function(){H?L.hide():L.show()},L.dispose=function(){z(n),L.hide(),o.setAttribute("title",o.getAttribute("data-original-title")),o.removeAttribute("data-original-title"),delete o.Tooltip},u((function(){(o=d(o)).Tooltip&&o.Tooltip.dispose(),r=o.getAttribute("data-animation"),c=o.getAttribute("data-placement"),p=o.getAttribute("data-delay"),h=o.getAttribute("data-container"),b=f("show","tooltip"),y=f("shown","tooltip"),T=f("hide","tooltip"),k=f("hidden","tooltip"),C=d(a.container),x=d(h),P=o.closest(".modal"),S=o.closest(".fixed-top"),B=o.closest(".fixed-bottom"),D.animation=a.animation&&"fade"!==a.animation?a.animation:r||"fade",D.placement=a.placement?a.placement:c||"top",D.template=a.template?a.template:null,D.delay=parseInt(a.delay||p)||200,D.container=C||(x||(S||(B||(P||document.body)))),M="bs-tooltip-"+D.placement,(l=X())&&(o.Tooltip||(o.setAttribute("data-original-title",l),o.removeAttribute("title"),z(i)),o.Tooltip=L)}),"BSN.Tooltip")}var D={},X=function(t){t=t||document;var e=function(t,e){Array.from(e).map((function(e){return new t(e)}))};for(var i in D)e(D[i][0],t.querySelectorAll(D[i][1]))};D.Alert=[p,'[data-dismiss="alert"]'],D.Button=[h,'[data-toggle="buttons"]'],D.Carousel=[T,'[data-ride="carousel"]'],D.Collapse=[k,'[data-toggle="collapse"]'],D.Dropdown=[P,'[data-toggle="dropdown"]'],D.Modal=[S,'[data-toggle="modal"]'],D.Popover=[B,'[data-toggle="popover"],[data-tip="popover"]'],D.ScrollSpy=[M,'[data-spy="scroll"]'],D.Tab=[L,'[data-toggle="tab"]'],D.Toast=[H,'[data-dismiss="toast"]'],D.Tooltip=[I,'[data-toggle="tooltip"],[data-tip="tooltip"]'],document.body?X():o(document,"DOMContentLoaded",X);var W={Alert:p,Button:h,Carousel:T,Collapse:k,Dropdown:P,Modal:S,Popover:B,ScrollSpy:M,Tab:L,Toast:H,Tooltip:I,initCallback:X,removeDataAPI:function(t){t=t||document;var e=function(t,e){Array.from(e).map((function(e){return e[t].dispose()}))};for(var i in D)e(i,t.querySelectorAll(D[i][1]))},componentsInit:D,Version:"3.0.1"};export default W; |
@@ -1,2 +0,2 @@ | ||
// Native JavaScript for Bootstrap v3.0.0 | 2020 © dnp_theme | MIT-License | ||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t=t||self).BSN=e()}(this,(function(){"use strict";function t(t,e){return t.classList.contains(e)}function e(t,e){t.classList.remove(e)}function n(t,e,n,i){i=i||!1,t.addEventListener(e,n,i)}function i(t,e,n,i){i=i||!1,t.removeEventListener(e,n,i)}function o(t,e,o,a){n(t,e,(function n(l){l.target===t&&(o(l),i(t,e,n,a))}),a)}var a="webkitTransition"in document.body.style?"webkitTransitionEnd":"transitionend",l="webkitTransition"in document.body.style||"transition"in document.body.style,r="webkitTransition"in document.body.style?"webkitTransitionDuration":"transitionDuration";function c(t){var e=l?window.getComputedStyle(t)[r]:0;return e="number"!=typeof(e=parseFloat(e))||isNaN(e)?0:1e3*e}function s(t,e){var n=0;c(t)?o(t,a,(function(t){!n&&e(t),n=1})):setTimeout((function(){!n&&e(),n=1}),17)}function d(t,e){var n=e&&e instanceof Element?e:document;return t instanceof Element?t:n.querySelector(t)}function u(t,e){try{t()}catch(t){console.error(e+": "+t)}}function f(t,e,n){var i=new CustomEvent(t+".bs."+e,{cancelable:!0});return i.relatedTarget=n,i}function m(t){this&&this.dispatchEvent(t)}function p(o){var a,l=this,r=f("close","alert"),c=f("closed","alert");function p(t){a=t&&t.target.closest(".alert"),(o=d('[data-dismiss="alert"]',a))&&a&&(o===t.target||o.contains(t.target))&&l.close()}function h(){i(o,"click",p),a.parentNode.removeChild(a),m.call(a,c)}l.close=function(){if(a&&o&&t(a,"show")){if(m.call(a,r),r.defaultPrevented)return;l.dispose(),e(a,"show"),t(a,"fade")?s(a,h):h()}},l.dispose=function(){i(o,"click",p),delete o.Alert},u((function(){o=d(o),a=o.closest(".alert"),o.Alert&&o.Alert.dispose(),o.Alert||n(o,"click",p),l.element=o,o.Alert=l}),"BSN.Alert")}function h(t,e){t.classList.add(e)}function g(o){var a,l=this,r=f("change","button");function c(n){var i,l="LABEL"===n.target.tagName?n.target:n.target.closest("LABEL")?n.target.closest("LABEL"):null;if(i=l&&l.getElementsByTagName("INPUT")[0]){if(m.call(i,r),m.call(o,r),"checkbox"===i.type){if(r.defaultPrevented)return;i.checked?(e(l,"active"),i.getAttribute("checked"),i.removeAttribute("checked"),i.checked=!1):(h(l,"active"),i.getAttribute("checked"),i.setAttribute("checked","checked"),i.checked=!0),o.toggled||(o.toggled=!0)}if("radio"===i.type&&!o.toggled){if(r.defaultPrevented)return;(!i.checked||0===n.screenX&&0==n.screenY)&&(h(l,"active"),h(l,"focus"),i.setAttribute("checked","checked"),i.checked=!0,o.toggled=!0,Array.from(a).map((function(n){var i=n.getElementsByTagName("INPUT")[0];n!==l&&t(n,"active")&&(m.call(i,r),e(n,"active"),i.removeAttribute("checked"),i.checked=!1)})))}setTimeout((function(){o.toggled=!1}),50)}}function s(t){32===(t.which||t.keyCode)&&t.target===document.activeElement&&c(t)}function p(t){32===(t.which||t.keyCode)&&t.preventDefault()}function g(t){var n="focusin"===t.type?h:e;"INPUT"===t.target.tagName&&n(t.target.closest(".btn"),"focus")}function v(t){t(o,"click",c),t(o,"keyup",s),t(o,"keydown",p),t(o,"focusin",g),t(o,"focusout",g)}l.dispose=function(){v(i),delete o.Button},u((function(){(o=d(o)).Button&&o.Button.dispose(),(a=o.getElementsByClassName("btn")).length&&(o.Button||v(n),o.toggled=!1,o.Button=l,Array.from(a).map((function(n){!t(n,"active")&&d("input:checked",n)&&h(n,"active"),t(n,"active")&&!d("input:checked",n)&&e(n,"active")})))}),"BSN.Button")}var v="touchstart",b="touchend",y="touchmove",w="onmouseleave"in document?["mouseenter","mouseleave"]:["mouseover","mouseout"],A=!!function(){var t=!1;try{var e=Object.defineProperty({},"passive",{get:function(){t=!0}});o(document,"DOMContentLoaded",(function(){}),e)}catch(t){}return t}()&&{passive:!0};function T(o,a){a=a||{};var l,r,p,g,T,k,N,C,x=this,E={};function P(){!1===E.interval||t(o,"paused")||(h(o,"paused"),!l.isSliding&&(clearInterval(l.timer),l.timer=null))}function S(){!1!==E.interval&&t(o,"paused")&&(e(o,"paused"),!l.isSliding&&(clearInterval(l.timer),l.timer=null),!l.isSliding&&x.cycle())}function B(e){if(e.preventDefault(),!l.isSliding){var n=e.target;if(!n||t(n,"active")||!n.getAttribute("data-slide-to"))return!1;l.index=parseInt(n.getAttribute("data-slide-to"),10),x.slideTo(l.index)}}function M(t){if(t.preventDefault(),!l.isSliding){var e=t.currentTarget||t.srcElement;e===k?l.index++:e===T&&l.index--,x.slideTo(l.index)}}function L(t){var e=t.which;if(!l.isSliding){switch(e){case 39:l.index++;break;case 37:l.index--;break;default:return}x.slideTo(l.index)}}function H(t){E.pause&&E.interval&&(t(o,w[0],P),t(o,w[1],S),t(o,v,P,A),t(o,b,S,A)),g.length>1&&t(o,v,D,A),k&&t(k,"click",M),T&&t(T,"click",M),N&&t(N,"click",B),E.keyboard&&t(window,"keydown",L)}function I(t){t(o,y,X,A),t(o,b,W,A)}function D(t){l.isTouch||(l.touchPosition.startX=t.changedTouches[0].pageX,o.contains(t.target)&&(l.isTouch=!0,I(n)))}function X(t){if(l.isTouch)return l.touchPosition.currentX=t.changedTouches[0].pageX,"touchmove"===t.type&&t.changedTouches.length>1?(t.preventDefault(),!1):void 0;t.preventDefault()}function W(t){if(l.isTouch&&!l.isSliding&&(l.touchPosition.endX=l.touchPosition.currentX||t.changedTouches[0].pageX,l.isTouch)){if((!o.contains(t.target)||!o.contains(t.relatedTarget))&&Math.abs(l.touchPosition.startX-l.touchPosition.endX)<75)return!1;l.touchPosition.currentX<l.touchPosition.startX?l.index++:l.touchPosition.currentX>l.touchPosition.startX&&l.index--,l.isTouch=!1,x.slideTo(l.index),I(i)}}function O(t){Array.from(C).map((function(t){e(t,"active")})),C[t]&&h(C[t],"active")}function R(n){if(l.touchPosition){var i=l.index,a=n&&n.target!==g[i]?1e3*n.elapsedTime+100:20,r=x.getActiveIndex(),c="left"===l.direction?"next":"prev";l.isSliding&&setTimeout((function(){l.touchPosition&&(l.isSliding=!1,h(g[i],"active"),e(g[r],"active"),e(g[i],"carousel-item-"+c),e(g[i],"carousel-item-"+l.direction),e(g[r],"carousel-item-"+l.direction),m.call(o,p),document.hidden||!E.interval||t(o,"paused")||x.cycle())}),a)}}x.cycle=function(){l.timer&&(clearInterval(l.timer),l.timer=null),l.timer=setInterval((function(){var t=l.index||x.getActiveIndex();(function(t){var e=t.getBoundingClientRect(),n=window.innerHeight||document.documentElement.clientHeight;return e.top<=n&&e.bottom>=0})(o)&&(t++,x.slideTo(t))}),E.interval)},x.slideTo=function(n){if(!l.isSliding){var i,a=x.getActiveIndex();a!==n&&(a<n||0===a&&n===g.length-1?l.direction="left":(a>n||a===g.length-1&&0===n)&&(l.direction="right"),n<0?n=g.length-1:n>=g.length&&(n=0),i="left"===l.direction?"next":"prev",r=f("slide","carousel",g[n]),p=f("slid","carousel",g[n]),m.call(o,r),r.defaultPrevented||(l.index=n,l.isSliding=!0,clearInterval(l.timer),l.timer=null,O(n),c(g[n])&&t(o,"slide")?(h(g[n],"carousel-item-"+i),g[n].offsetWidth,h(g[n],"carousel-item-"+l.direction),h(g[a],"carousel-item-"+l.direction),s(g[n],R)):(h(g[n],"active"),g[n].offsetWidth,e(g[a],"active"),setTimeout((function(){l.isSliding=!1,E.interval&&o&&!t(o,"paused")&&x.cycle(),m.call(o,p)}),100))))}},x.getActiveIndex=function(){return Array.from(g).indexOf(o.getElementsByClassName("carousel-item active")[0])||0},x.dispose=function(){var n=["left","right","prev","next"];Array.from(g).map((function(i,o){t(i,"active")&&O(o),n.map((function(t){return e(i,"carousel-item-"+t)}))})),clearInterval(l.timer),H(i),l={},delete o.Carousel},(l={}).direction="left",l.index=0,l.timer=null,l.isSliding=!1,l.isTouch=!1,l.touchPosition={startX:0,currentX:0,endX:0},u((function(){(o=d(o)).Carousel&&o.Carousel.dispose();var t=o.getAttribute("data-interval"),e=a.interval,i="false"===t?0:parseInt(t),l="hover"===o.getAttribute("data-pause")||!1,r="true"===o.getAttribute("data-keyboard")||!1;g=o.getElementsByClassName("carousel-item"),T=o.getElementsByClassName("carousel-control-prev")[0],k=o.getElementsByClassName("carousel-control-next")[0],N=o.getElementsByClassName("carousel-indicators")[0],C=N&&N.getElementsByTagName("LI")||[],E.keyboard=!0===a.keyboard||r,E.pause=!("hover"!==a.pause&&!l)&&"hover",E.interval="number"==typeof e?e:!1===e||0===i||!1===i?0:isNaN(i)?5e3:i,g.length<2||(o.Carousel||H(n),x.getActiveIndex()<0&&(g.length&&h(g[0],"active"),C.length&&O(0)),E.interval&&x.cycle(),o.Carousel=x)}),"BSN.Carousel")}function k(o,a){a=a||{};var l,r,c,p,g,v,b=this,y=null,w=null;function A(t,n){m.call(t,g),g.defaultPrevented||(t.isAnimating=!0,t.style.height=t.scrollHeight+"px",e(t,"collapse"),e(t,"show"),h(t,"collapsing"),t.offsetWidth,t.style.height="0px",s(t,(function(){t.isAnimating=!1,t.setAttribute("aria-expanded","false"),n.setAttribute("aria-expanded","false"),e(t,"collapsing"),h(t,"collapse"),t.style.height="",m.call(t,v)})))}b.toggle=function(e){(e&&"A"===e.target.tagName||"A"===o.tagName)&&e.preventDefault(),(o.contains(e.target)||e.target===o)&&(t(w,"show")?b.hide():b.show())},b.hide=function(){w.isAnimating||(A(w,o),h(o,"collapsed"))},b.show=function(){var t,n;y&&(l=y.getElementsByClassName("collapse show")[0],r=l&&(d('[data-target="#'+l.id+'"]',y)||d('[href="#'+l.id+'"]',y))),w.isAnimating||(r&&l!==w&&(A(l,r),h(r,"collapsed")),t=w,n=o,m.call(t,c),c.defaultPrevented||(t.isAnimating=!0,h(t,"collapsing"),e(t,"collapse"),t.style.height=t.scrollHeight+"px",s(t,(function(){t.isAnimating=!1,t.setAttribute("aria-expanded","true"),n.setAttribute("aria-expanded","true"),e(t,"collapsing"),h(t,"collapse"),h(t,"show"),t.style.height="",m.call(t,p)}))),e(o,"collapsed"))},b.dispose=function(){i(o,"click",b.toggle),delete o.Collapse},u((function(){(o=d(o)).Collapse&&o.Collapse.dispose();var t=o.getAttribute("data-parent");c=f("show","collapse"),p=f("shown","collapse"),g=f("hide","collapse"),v=f("hidden","collapse"),(w=d(a.target||o.getAttribute("data-target")||o.getAttribute("href"))).isAnimating=!1,y=o.closest(a.parent||t),o.Collapse||n(o,"click",b.toggle),o.Collapse=b}),"BSN.Collapse")}var N="mousedown";"webkitPerspective"in document.body.style||document.body.style,"webkitTransform"in document.body.style||document.body.style;function C(t){t.focus?t.focus():t.setActive()}function x(){return{y:window.pageYOffset||document.documentElement.scrollTop,x:window.pageXOffset||document.documentElement.scrollLeft}}function E(e,n,i,o){var a,l,r,c,s,u,f=n.offsetWidth,m=n.offsetHeight,p=document.documentElement.clientWidth||document.body.clientWidth,h=document.documentElement.clientHeight||document.body.clientHeight,g=e.getBoundingClientRect(),v=o===document.body?x():{x:o.offsetLeft+o.scrollLeft,y:o.offsetTop+o.scrollTop},b=g.right-g.left,y=g.bottom-g.top,w=t(n,"popover"),A=d(".arrow",n),T=g.top+y/2-m/2<0,k=g.left+b/2-f/2<0,N=g.left+f/2+b/2>=p,C=g.top+m/2+y/2>=h,E=g.top-m<0,P=g.left-f<0,S=g.top+m+y>=h,B=g.left+f+b>=p;i="right"===(i="left"===(i="bottom"===(i="top"===(i=("left"===i||"right"===i)&&P&&B?"top":i)&&E?"bottom":i)&&S?"top":i)&&P?"right":i)&&B?"left":i,-1===n.className.indexOf(i)&&(n.className=n.className.replace(/\b(top|bottom|left|right)+/,i)),s=A.offsetWidth,u=A.offsetHeight,"left"===i||"right"===i?(l="left"===i?g.left+v.x-f-(w?s:0):g.left+v.x+b,T?(a=g.top+v.y,r=y/2-s):C?(a=g.top+v.y-m+y,r=m-y/2-s):(a=g.top+v.y-m/2+y/2,r=m/2-(w?.9*u:u/2))):"top"!==i&&"bottom"!==i||(a="top"===i?g.top+v.y-m-(w?u:0):g.top+v.y+y,k?(l=0,c=g.left+b/2-s):N?(l=p-1.01*f,c=f-(p-g.left)+b/2-s/2):(l=g.left+v.x-f/2+b/2,c=f/2-(w?s:s/2))),n.style.top=a+"px",n.style.left=l+"px",r&&(A.style.top=r+"px"),c&&(A.style.left=c+"px")}function P(o,a){var l,r,c,s,p,g,v,b=this,y=null,w=[];function A(t){(t.href&&"#"===t.href.slice(-1)||t.parentNode&&t.parentNode.href&&"#"===t.parentNode.href.slice(-1))&&this.preventDefault()}function T(){var t=o.open?n:i;t(document,"click",k),t(document,"keydown",x),t(document,"keyup",E),t(document,"focus",k,!0)}function k(t){var e=t.target,n=e&&(e.getAttribute("data-toggle")||e.parentNode&&e.parentNode.getAttribute&&e.parentNode.getAttribute("data-toggle"));("focus"!==t.type||e!==o&&e!==g&&!g.contains(e))&&(e!==g&&!g.contains(e)||!v&&!n)&&(y=e===o||o.contains(e)?o:null,b.hide(),A.call(t,e))}function N(t){y=o,b.show(),A.call(t,t.target)}function x(t){var e=t.which||t.keyCode;38!==e&&40!==e||t.preventDefault()}function E(t){var e=t.which,n=t.keyCode,i=e||n,a=document.activeElement,l=a===o,r=g.contains(a),c=a.parentNode===g||a.parentNode.parentNode===g,s=w.indexOf(a);c&&(s=l?0:38===i?s>1?s-1:0:40===i&&s<w.length-1?s+1:s,w[s]&&C(w[s])),(w.length&&c||!w.length&&(r||l)||!r)&&o.open&&27===i&&(b.toggle(),y=null)}b.show=function(){l=f("show","dropdown",y),m.call(p,l),l.defaultPrevented||(h(g,"show"),h(p,"show"),o.setAttribute("aria-expanded",!0),o.open=!0,i(o,"click",N),setTimeout((function(){C(g.getElementsByTagName("INPUT")[0]||o),T(),r=f("shown","dropdown",y),m.call(p,r)}),1))},b.hide=function(){c=f("hide","dropdown",y),m.call(p,c),c.defaultPrevented||(e(g,"show"),e(p,"show"),o.setAttribute("aria-expanded",!1),o.open=!1,T(),C(o),setTimeout((function(){o.Dropdown&&n(o,"click",N)}),1),s=f("hidden","dropdown",y),m.call(p,s))},b.toggle=function(){t(p,"show")&&o.open?b.hide():b.show()},b.dispose=function(){t(p,"show")&&o.open&&b.hide(),i(o,"click",N),delete o.Dropdown},u((function(){(o=d(o)).Dropdown&&o.Dropdown.dispose(),p=o.parentNode,g=d(".dropdown-menu",p),Array.from(g.children).map((function(t){t.children.length&&"A"===t.children[0].tagName&&w.push(t.children[0]),"A"===t.tagName&&w.push(t)})),o.Dropdown||(!("tabindex"in g)&&g.setAttribute("tabindex","0"),n(o,"click",N)),v=!0===a||"true"===o.getAttribute("data-persist")||!1,o.open=!1,o.Dropdown=b}),"BSN.Dropdown")}function S(o,a){a=a||{};var l,r,p,g,v,b,y,w,T,k=this,N=null,x={};function E(){var e,n=t(document.body,"modal-open"),i=parseInt(getComputedStyle(document.body).paddingRight),o=l.clientHeight!==l.scrollHeight;l.style.paddingRight=!o&&b?b+"px":"",document.body.style.paddingRight=i+(n?0:b)+"px",T.length&&T.map((function(t){e=getComputedStyle(t).paddingRight,t.style.paddingRight=parseInt(e)+(n?0:b)+"px"}))}function P(){var t,e;(e=document.createElement("div")).className="modal-scrollbar-measure",document.body.appendChild(e),t=e.offsetWidth-e.clientWidth,document.body.removeChild(e),b=t}function S(){(y=d(".modal-backdrop"))&&!document.getElementsByClassName("modal show")[0]&&(document.body.removeChild(y),y=null),null===y&&(e(document.body,"modal-open"),document.body.style.paddingRight="",l.style.paddingRight="",T.length&&T.map((function(t){t.style.paddingRight=""})))}function B(t){t(window,"resize",k.update,A),t(l,"click",X),t(document,"keydown",D)}function M(){l.style.display="block",P(),E(),!document.getElementsByClassName("modal show")[0]&&h(document.body,"modal-open"),h(l,"show"),l.setAttribute("aria-hidden",!1),t(l,"fade")?s(l,L):L()}function L(){C(l),l.isAnimating=!1,B(n),p=f("shown","modal",N),m.call(l,p)}function H(n){l.style.display="",o&&C(o),y=d(".modal-backdrop"),1!==n&&y&&t(y,"show")&&!document.getElementsByClassName("modal show")[0]?(e(y,"show"),s(y,S)):S(),B(i),l.isAnimating=!1,v=f("hidden","modal"),m.call(l,v)}function I(e){if(!l.isAnimating){var n=e.target;(n=n.hasAttribute("data-target")||n.hasAttribute("href")?n:n.parentNode)!==o&&!o.contains(n)||t(l,"show")||(l.modalTrigger=o,N=o,k.show(),e.preventDefault())}}function D(e){var n=e.which;l.isAnimating||x.keyboard&&27==n&&t(l,"show")&&k.hide()}function X(e){if(!l.isAnimating){var n=e.target;t(l,"show")&&("modal"===n.parentNode.getAttribute("data-dismiss")||"modal"===n.getAttribute("data-dismiss")||n===l&&"static"!==x.backdrop)&&(k.hide(),N=null,e.preventDefault())}}k.toggle=function(){t(l,"show")?k.hide():k.show()},k.show=function(){if(!(t(l,"show")&&l.isAnimating||(r=f("show","modal",N),m.call(l,r),r.defaultPrevented))){l.isAnimating=!0;var e,n=document.getElementsByClassName("modal show")[0];n&&n!==l&&(n.modalTrigger&&n.modalTrigger.Modal.hide(),n.Modal&&n.Modal.hide()),x.backdrop&&(e=document.createElement("div"),null===(y=d(".modal-backdrop"))&&(e.setAttribute("class","modal-backdrop"+(x.animation?" fade":"")),y=e,document.body.appendChild(y)),y=y),!y||n||t(y,"show")||(y.offsetWidth,w=c(y),h(y,"show")),n?M():setTimeout(M,y&&w?w:0)}},k.hide=function(n){t(l,"show")&&(g=f("hide","modal"),m.call(l,g),g.defaultPrevented||(l.isAnimating=!0,e(l,"show"),l.setAttribute("aria-hidden",!0),t(l,"fade")&&1!==n?s(l,H):H()))},k.setContent=function(t){d(".modal-content",l).innerHTML=t},k.update=function(){t(l,"show")&&(P(),E())},k.dispose=function(){k.hide(1),o?(i(o,"click",I),delete o.Modal):delete l.Modal},u((function(){o=d(o);var e=d(o.getAttribute("data-target")||o.getAttribute("href"));l=t(o,"modal")?o:e,T=Array.from(document.getElementsByClassName("fixed-top")).concat(Array.from(document.getElementsByClassName("fixed-bottom"))),t(o,"modal")&&(o=null),o&&o.Modal&&o.Modal.dispose(),l&&l.Modal&&l.Modal.dispose(),x.keyboard=!1!==a.keyboard&&"false"!==l.getAttribute("data-keyboard"),x.backdrop="static"!==a.backdrop&&"static"!==l.getAttribute("data-backdrop")||"static",x.backdrop=!1!==a.backdrop&&"false"!==l.getAttribute("data-backdrop")&&x.backdrop,x.animation=!!t(l,"fade"),x.content=a.content,l.isAnimating=!1,o&&!o.Modal&&n(o,"click",I),x.content&&k.setContent(x.content.trim()),o?(l.modalTrigger=o,o.Modal=k):l.Modal=k}),"BSN.Modal")}function B(o,a){a=a||{};var l,r,c,p,g,b,y,T,k,C,x,P,S,B,M,L,H,I,D,X=this,W=null,O=0,R=/(iPhone|iPod|iPad)/.test(navigator.userAgent),z={};function U(t){null!==W&&t.target===d(".close",W)&&X.hide()}function q(){return{0:a.title||o.getAttribute("data-title")||null,1:a.content||o.getAttribute("data-content")||null}}function j(){null===W&&o.focus()}function Y(t){"hover"===z.trigger?(t(o,N,X.show),t(o,w[0],X.show),z.dismissible||t(o,w[1],X.hide)):"click"==z.trigger?t(o,z.trigger,X.toggle):"focus"==z.trigger&&(R&&t(o,"click",j),t(o,z.trigger,X.toggle))}function F(t){W&&W.contains(t.target)||t.target===o||o.contains(t.target)||X.hide()}function V(t){z.dismissible?t(document,"click",U):("focus"==z.trigger&&t(o,"blur",X.hide),"hover"==z.trigger&&t(document,v,F,A)),t(window,"resize",X.hide,A)}function G(){V(n),m.call(o,x)}function J(){V(i),z.container.removeChild(W),O=null,W=null,m.call(o,S)}X.toggle=function(){null===W?X.show():X.hide()},X.show=function(){clearTimeout(O),O=setTimeout((function(){if(null===W){if(m.call(o,C),C.defaultPrevented)return;!function(){l=q()[0]||null,r=(r=q()[1])?r.trim():null,W=document.createElement("div");var e=document.createElement("div");if(h(e,"arrow"),W.appendChild(e),null!==r&&null===z.template){if(W.setAttribute("role","tooltip"),null!==l){var n=document.createElement("h3");h(n,"popover-header"),n.innerHTML=z.dismissible?l+k:l,W.appendChild(n)}var i=document.createElement("div");h(i,"popover-body"),i.innerHTML=z.dismissible&&null===l?r+k:r,W.appendChild(i)}else{var o=document.createElement("div");o.innerHTML=z.template.trim(),W.className=o.firstChild.className,W.innerHTML=o.firstChild.innerHTML;var a=d(".popover-header",W),c=d(".popover-body",W);l&&a&&(a.innerHTML=l.trim()),r&&c&&(c.innerHTML=r.trim())}z.container.appendChild(W),W.style.display="block",!t(W,"popover")&&h(W,"popover"),!t(W,z.animation)&&h(W,z.animation),!t(W,D)&&h(W,D)}(),E(o,W,z.placement,z.container),!t(W,"show")&&h(W,"show"),z.animation?s(W,G):G()}}),20)},X.hide=function(){clearTimeout(O),O=setTimeout((function(){if(W&&null!==W&&t(W,"show")){if(m.call(o,P),P.defaultPrevented)return;e(W,"show"),z.animation?s(W,J):J()}}),z.delay)},X.dispose=function(){X.hide(),Y(i),delete o.Popover},u((function(){(o=d(o)).Popover&&o.Popover.dispose(),c=o.getAttribute("data-trigger"),p=o.getAttribute("data-animation"),g=o.getAttribute("data-placement"),b=o.getAttribute("data-dismissible"),y=o.getAttribute("data-delay"),T=o.getAttribute("data-container"),k='<button type="button" class="close">×</button>',C=f("show","popover"),x=f("shown","popover"),P=f("hide","popover"),S=f("hidden","popover"),B=d(a.container),M=d(T),L=o.closest(".modal"),H=o.closest(".fixed-top"),I=o.closest(".fixed-bottom"),z.template=a.template?a.template:null,z.trigger=a.trigger?a.trigger:c||"hover",z.animation=a.animation&&"fade"!==a.animation?a.animation:p||"fade",z.placement=a.placement?a.placement:g||"top",z.delay=parseInt(a.delay||y)||200,z.dismissible=!(!a.dismissible&&"true"!==b),z.container=B||(M||(H||(I||(L||document.body)))),D="bs-popover-"+z.placement;var t=q();l=t[0],((r=t[1])||z.template)&&(o.Popover||Y(n),o.Popover=X)}),"BSN.Popover")}function M(o,a){a=a||{};var l,r,c,s,p,g=this,v={};function b(){var n;n=s.getElementsByTagName("A"),l.length!==n.length&&(l.items=[],l.targets=[],Array.from(n).map((function(t){var e=t.getAttribute("href"),n=e&&"#"===e.charAt(0)&&"#"!==e.slice(-1)&&d(e);n&&(l.items.push(t),l.targets.push(n))})),l.length=n.length),l.scrollOffset=l.isWindow?x().y:o.scrollTop,l.items.map((function(n,i){return function(n){var i=l.items[n],a=l.targets[n],r=t(i,"dropdown-item")&&i.closest(".dropdown-menu"),c=r&&r.previousElementSibling,s=i.nextElementSibling,d=s&&s.getElementsByClassName("active").length,u=l.isWindow&&a.getBoundingClientRect(),p=t(i,"active")||!1,g=(l.isWindow?u.top+l.scrollOffset:a.offsetTop)-v.offset,b=l.isWindow?u.bottom+l.scrollOffset-v.offset:l.targets[n+1]?l.targets[n+1].offsetTop-v.offset:o.scrollHeight,y=d||l.scrollOffset>=g&&b>l.scrollOffset;if(!p&&y)h(i,"active"),c&&!t(c,"active")&&h(c,"active"),m.call(o,f("activate","scrollspy",l.items[n]));else if(p&&!y)e(i,"active"),c&&t(c,"active")&&!i.parentNode.getElementsByClassName("active").length&&e(c,"active");else if(p&&y||!y&&!p)return}(i)}))}function y(t){t(p,"scroll",g.refresh,A),t(window,"resize",g.refresh,A)}g.refresh=function(){b()},g.dispose=function(){y(i),delete o.ScrollSpy},u((function(){(o=d(o)).ScrollSpy&&o.ScrollSpy.dispose(),r=o.getAttribute("data-target"),c=o.getAttribute("data-offset"),s=d(a.target||r),p=o.offsetHeight<o.scrollHeight?o:window,s&&(v.target=s,v.offset=parseInt(a.offset||c)||10,(l={}).length=0,l.items=[],l.targets=[],l.isWindow=p===window,o.ScrollSpy||y(n),g.refresh(),o.ScrollSpy=g)}),"BSN.ScrollSpy")}function L(o,a){a=a||{};var r,c,p,g,v,b,y,w,A,T,k,N,C,x,E,P=this,S=!1;function B(){S.style.height="",e(S,"collapsing"),c.isAnimating=!1}function M(){S?C?B():setTimeout((function(){S.style.height=x+"px",S.offsetWidth,s(S,B)}),50):c.isAnimating=!1,v=f("shown","tab",A),m.call(w,v)}function L(){S&&(T.style.float="left",k.style.float="left",N=T.scrollHeight),g=f("show","tab",A),y=f("hidden","tab",w),m.call(w,g),g.defaultPrevented||(h(k,"active"),e(T,"active"),S&&(x=k.scrollHeight,C=x===N,h(S,"collapsing"),S.style.height=N+"px",S.offsetHeight,T.style.float="",k.style.float=""),t(k,"fade")?setTimeout((function(){h(k,"show"),s(k,M)}),20):M(),m.call(A,y))}function H(){var e,n=c.getElementsByClassName("active");return 1!==n.length||t(n[0].parentNode,"dropdown")?n.length>1&&(e=n[n.length-1]):e=n[0],e}function I(){return d(H().getAttribute("href"))}function D(t){t.preventDefault(),w=t.currentTarget,!c.isAnimating&&P.show()}P.show=function(){if(!t(w=w||o,"active")){if(k=d(w.getAttribute("href")),A=H(),T=I(),b=f("hide","tab",w),m.call(A,b),b.defaultPrevented)return;c.isAnimating=!0,e(A,"active"),A.setAttribute("aria-selected","false"),h(w,"active"),w.setAttribute("aria-selected","true"),p&&(t(o.parentNode,"dropdown-menu")?t(p,"active")||h(p,"active"):t(p,"active")&&e(p,"active")),t(T,"fade")?(e(T,"show"),s(T,L)):L()}},P.dispose=function(){i(o,"click",D),delete o.Tab},u((function(){(o=d(o)).Tab&&o.Tab.dispose(),r=o.getAttribute("data-height"),c=o.closest(".nav"),p=c&&d(".dropdown-toggle",c),E=!(!l||!1===a.height||"false"===r),c.isAnimating=!1,o.Tab||n(o,"click",D),E&&(S=I().parentNode),o.Tab=P}),"BSN.Tab")}function H(o,a){a=a||{};var l,r,c,p,g,v,b,y,w=this,A=0,T={};function k(){e(l,"showing"),h(l,"show"),m.call(l,b),T.autohide&&w.hide()}function N(){h(l,"hide"),m.call(l,y)}function C(){e(l,"show"),T.animation?s(l,N):N()}function x(){clearTimeout(A),i(o,"click",w.hide),delete o.Toast}w.show=function(){if(l&&!t(l,"show")){if(m.call(l,g),g.defaultPrevented)return;T.animation&&h(l,"fade"),e(l,"hide"),l.offsetWidth,h(l,"showing"),T.animation?s(l,k):k()}},w.hide=function(e){if(l&&t(l,"show")){if(m.call(l,v),v.defaultPrevented)return;e?C():A=setTimeout(C,T.delay)}},w.dispose=function(){T.animation?s(l,x):x()},u((function(){(o=d(o)).Toast&&o.Toast.dispose(),l=o.closest(".toast"),r=o.getAttribute("data-animation"),c=o.getAttribute("data-autohide"),p=o.getAttribute("data-delay"),g=f("show","toast"),v=f("hide","toast"),b=f("shown","toast"),y=f("hidden","toast"),T.animation=!1===a.animation||"false"===r?0:1,T.autohide=!1===a.autohide||"false"===c?0:1,T.delay=parseInt(a.delay||p)||500,o.Toast||n(o,"click",w.hide),o.Toast=w}),"BSN.Toast")}function I(o,a){a=a||{};var l,r,c,p,g,b,y,T,k,C,x,P,S,B,M,L=this,H=null,I=0,D={};function X(){return o.getAttribute("title")||o.getAttribute("data-title")||o.getAttribute("data-original-title")}function W(t){H&&H.contains(t.target)||t.target===o||o.contains(t.target)||L.hide()}function O(){n(document,v,W,A),n(window,"resize",L.hide,A),m.call(o,y)}function R(){i(document,v,W,A),i(window,"resize",L.hide,A),D.container.removeChild(H),H=null,I=null,m.call(o,k)}function z(t){t(o,N,L.show),t(o,w[0],L.show),t(o,w[1],L.hide)}L.show=function(){clearTimeout(I),I=setTimeout((function(){if(null===H){if(m.call(o,b),b.defaultPrevented)return;!1!==function(){if(l=X()){if(H=document.createElement("div"),D.template){var e=document.createElement("div");e.innerHTML=D.template.trim(),H.className=e.firstChild.className,H.innerHTML=e.firstChild.innerHTML,d(".tooltip-inner",H).innerHTML=l.trim()}else{var n=document.createElement("div");h(n,"arrow"),H.appendChild(n);var i=document.createElement("div");h(i,"tooltip-inner"),H.appendChild(i),i.innerHTML=l}H.style.left="0",H.style.top="0",H.setAttribute("role","tooltip"),!t(H,"tooltip")&&h(H,"tooltip"),!t(H,D.animation)&&h(H,D.animation),!t(H,M)&&h(H,M),D.container.appendChild(H)}}()&&(E(o,H,D.placement,D.container),!t(H,"show")&&h(H,"show"),D.animation?s(H,O):O())}}),20)},L.hide=function(){clearTimeout(I),I=setTimeout((function(){if(H&&t(H,"show")){if(m.call(o,T),T.defaultPrevented)return;e(H,"show"),D.animation?s(H,R):R()}}),D.delay)},L.toggle=function(){H?L.hide():L.show()},L.dispose=function(){z(i),L.hide(),o.setAttribute("title",o.getAttribute("data-original-title")),o.removeAttribute("data-original-title"),delete o.Tooltip},u((function(){(o=d(o)).Tooltip&&o.Tooltip.dispose(),r=o.getAttribute("data-animation"),c=o.getAttribute("data-placement"),p=o.getAttribute("data-delay"),g=o.getAttribute("data-container"),b=f("show","tooltip"),y=f("shown","tooltip"),T=f("hide","tooltip"),k=f("hidden","tooltip"),C=d(a.container),x=d(g),P=o.closest(".modal"),S=o.closest(".fixed-top"),B=o.closest(".fixed-bottom"),D.animation=a.animation&&"fade"!==a.animation?a.animation:r||"fade",D.placement=a.placement?a.placement:c||"top",D.template=a.template?a.template:null,D.delay=parseInt(a.delay||p)||200,D.container=C||(x||(S||(B||(P||document.body)))),M="bs-tooltip-"+D.placement,(l=X())&&(o.Tooltip||(o.setAttribute("data-original-title",l),o.removeAttribute("title"),z(n)),o.Tooltip=L)}),"BSN.Tooltip")}var D={},X=function(t){t=t||document;var e=function(t,e){Array.from(e).map((function(e){return new t(e)}))};for(var n in D)e(D[n][0],t.querySelectorAll(D[n][1]))};D.Alert=[p,'[data-dismiss="alert"]'],D.Button=[g,'[data-toggle="buttons"]'],D.Carousel=[T,'[data-ride="carousel"]'],D.Collapse=[k,'[data-toggle="collapse"]'],D.Dropdown=[P,'[data-toggle="dropdown"]'],D.Modal=[S,'[data-toggle="modal"]'],D.Popover=[B,'[data-toggle="popover"],[data-tip="popover"]'],D.ScrollSpy=[M,'[data-spy="scroll"]'],D.Tab=[L,'[data-toggle="tab"]'],D.Toast=[H,'[data-dismiss="toast"]'],D.Tooltip=[I,'[data-toggle="tooltip"],[data-tip="tooltip"]'],document.body?X():o(document,"DOMContentLoaded",X);return{Alert:p,Button:g,Carousel:T,Collapse:k,Dropdown:P,Modal:S,Popover:B,ScrollSpy:M,Tab:L,Toast:H,Tooltip:I,initCallback:X,removeDataAPI:function(t){t=t||document;var e=function(t,e){Array.from(e).map((function(e){return e[t].dispose()}))};for(var n in D)e(n,t.querySelectorAll(D[n][1]))},componentsInit:D,Version:"3.0.0"}})); | ||
// Native JavaScript for Bootstrap v3.0.1 | 2020 © dnp_theme | MIT-License | ||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t=t||self).BSN=e()}(this,(function(){"use strict";function t(t,e){return t.classList.contains(e)}function e(t,e){t.classList.remove(e)}function n(t,e,n,i){i=i||!1,t.addEventListener(e,n,i)}function i(t,e,n,i){i=i||!1,t.removeEventListener(e,n,i)}function o(t,e,o,a){n(t,e,(function n(l){l.target===t&&(o(l),i(t,e,n,a))}),a)}var a="webkitTransition"in document.body.style?"webkitTransitionEnd":"transitionend",l="webkitTransition"in document.body.style||"transition"in document.body.style,r="webkitTransition"in document.body.style?"webkitTransitionDuration":"transitionDuration";function c(t){var e=l?window.getComputedStyle(t)[r]:0;return e="number"!=typeof(e=parseFloat(e))||isNaN(e)?0:1e3*e}function s(t,e){var n=0;c(t)?o(t,a,(function(t){!n&&e(t),n=1})):setTimeout((function(){!n&&e(),n=1}),17)}function d(t,e){var n=e&&e instanceof Element?e:document;return t instanceof Element?t:n.querySelector(t)}function u(t,e){try{t()}catch(t){console.error(e+": "+t)}}function f(t,e,n){var i=new CustomEvent(t+".bs."+e,{cancelable:!0});return i.relatedTarget=n,i}function m(t){this&&this.dispatchEvent(t)}function p(o){var a,l=this,r=f("close","alert"),c=f("closed","alert");function p(t){a=t&&t.target.closest(".alert"),(o=d('[data-dismiss="alert"]',a))&&a&&(o===t.target||o.contains(t.target))&&l.close()}function g(){i(o,"click",p),a.parentNode.removeChild(a),m.call(a,c)}l.close=function(){if(a&&o&&t(a,"show")){if(m.call(a,r),r.defaultPrevented)return;l.dispose(),e(a,"show"),t(a,"fade")?s(a,g):g()}},l.dispose=function(){i(o,"click",p),delete o.Alert},u((function(){o=d(o),a=o.closest(".alert"),o.Alert&&o.Alert.dispose(),o.Alert||n(o,"click",p),l.element=o,o.Alert=l}),"BSN.Alert")}function g(t,e){t.classList.add(e)}function h(o){var a,l=this,r=f("change","button");function c(n){var i,l="LABEL"===n.target.tagName?n.target:n.target.closest("LABEL")?n.target.closest("LABEL"):null;if(i=l&&l.getElementsByTagName("INPUT")[0]){if(m.call(i,r),m.call(o,r),"checkbox"===i.type){if(r.defaultPrevented)return;i.checked?(e(l,"active"),i.getAttribute("checked"),i.removeAttribute("checked"),i.checked=!1):(g(l,"active"),i.getAttribute("checked"),i.setAttribute("checked","checked"),i.checked=!0),o.toggled||(o.toggled=!0)}if("radio"===i.type&&!o.toggled){if(r.defaultPrevented)return;(!i.checked||0===n.screenX&&0==n.screenY)&&(g(l,"active"),g(l,"focus"),i.setAttribute("checked","checked"),i.checked=!0,o.toggled=!0,Array.from(a).map((function(n){var i=n.getElementsByTagName("INPUT")[0];n!==l&&t(n,"active")&&(m.call(i,r),e(n,"active"),i.removeAttribute("checked"),i.checked=!1)})))}setTimeout((function(){o.toggled=!1}),50)}}function s(t){32===(t.which||t.keyCode)&&t.target===document.activeElement&&c(t)}function p(t){32===(t.which||t.keyCode)&&t.preventDefault()}function h(t){var n="focusin"===t.type?g:e;"INPUT"===t.target.tagName&&n(t.target.closest(".btn"),"focus")}function v(t){t(o,"click",c),t(o,"keyup",s),t(o,"keydown",p),t(o,"focusin",h),t(o,"focusout",h)}l.dispose=function(){v(i),delete o.Button},u((function(){(o=d(o)).Button&&o.Button.dispose(),(a=o.getElementsByClassName("btn")).length&&(o.Button||v(n),o.toggled=!1,o.Button=l,Array.from(a).map((function(n){!t(n,"active")&&d("input:checked",n)&&g(n,"active"),t(n,"active")&&!d("input:checked",n)&&e(n,"active")})))}),"BSN.Button")}var v="touchstart",b="touchend",y="touchmove",w="onmouseleave"in document?["mouseenter","mouseleave"]:["mouseover","mouseout"],A=!!function(){var t=!1;try{var e=Object.defineProperty({},"passive",{get:function(){t=!0}});o(document,"DOMContentLoaded",(function(){}),e)}catch(t){}return t}()&&{passive:!0};function T(o,a){a=a||{};var l,r,p,h,T,k,N,C,x=this,E={};function P(){!1===E.interval||t(o,"paused")||(g(o,"paused"),!l.isSliding&&(clearInterval(l.timer),l.timer=null))}function S(){!1!==E.interval&&t(o,"paused")&&(e(o,"paused"),!l.isSliding&&(clearInterval(l.timer),l.timer=null),!l.isSliding&&x.cycle())}function B(e){if(e.preventDefault(),!l.isSliding){var n=e.target;if(!n||t(n,"active")||!n.getAttribute("data-slide-to"))return!1;l.index=parseInt(n.getAttribute("data-slide-to"),10),x.slideTo(l.index)}}function M(t){if(t.preventDefault(),!l.isSliding){var e=t.currentTarget||t.srcElement;e===k?l.index++:e===T&&l.index--,x.slideTo(l.index)}}function L(t){var e=t.which;if(!l.isSliding){switch(e){case 39:l.index++;break;case 37:l.index--;break;default:return}x.slideTo(l.index)}}function H(t){E.pause&&E.interval&&(t(o,w[0],P),t(o,w[1],S),t(o,v,P,A),t(o,b,S,A)),h.length>1&&t(o,v,D,A),k&&t(k,"click",M),T&&t(T,"click",M),N&&t(N,"click",B),E.keyboard&&t(window,"keydown",L)}function I(t){t(o,y,X,A),t(o,b,W,A)}function D(t){l.isTouch||(l.touchPosition.startX=t.changedTouches[0].pageX,o.contains(t.target)&&(l.isTouch=!0,I(n)))}function X(t){if(l.isTouch)return l.touchPosition.currentX=t.changedTouches[0].pageX,"touchmove"===t.type&&t.changedTouches.length>1?(t.preventDefault(),!1):void 0;t.preventDefault()}function W(t){if(l.isTouch&&!l.isSliding&&(l.touchPosition.endX=l.touchPosition.currentX||t.changedTouches[0].pageX,l.isTouch)){if((!o.contains(t.target)||!o.contains(t.relatedTarget))&&Math.abs(l.touchPosition.startX-l.touchPosition.endX)<75)return!1;l.touchPosition.currentX<l.touchPosition.startX?l.index++:l.touchPosition.currentX>l.touchPosition.startX&&l.index--,l.isTouch=!1,x.slideTo(l.index),I(i)}}function O(t){Array.from(C).map((function(t){e(t,"active")})),C[t]&&g(C[t],"active")}function R(n){if(l.touchPosition){var i=l.index,a=n&&n.target!==h[i]?1e3*n.elapsedTime+100:20,r=x.getActiveIndex(),c="left"===l.direction?"next":"prev";l.isSliding&&setTimeout((function(){l.touchPosition&&(l.isSliding=!1,g(h[i],"active"),e(h[r],"active"),e(h[i],"carousel-item-"+c),e(h[i],"carousel-item-"+l.direction),e(h[r],"carousel-item-"+l.direction),m.call(o,p),document.hidden||!E.interval||t(o,"paused")||x.cycle())}),a)}}x.cycle=function(){l.timer&&(clearInterval(l.timer),l.timer=null),l.timer=setInterval((function(){var t=l.index||x.getActiveIndex();(function(t){var e=t.getBoundingClientRect(),n=window.innerHeight||document.documentElement.clientHeight;return e.top<=n&&e.bottom>=0})(o)&&(t++,x.slideTo(t))}),E.interval)},x.slideTo=function(n){if(!l.isSliding){var i,a=x.getActiveIndex();a!==n&&(a<n||0===a&&n===h.length-1?l.direction="left":(a>n||a===h.length-1&&0===n)&&(l.direction="right"),n<0?n=h.length-1:n>=h.length&&(n=0),i="left"===l.direction?"next":"prev",r=f("slide","carousel",h[n]),p=f("slid","carousel",h[n]),m.call(o,r),r.defaultPrevented||(l.index=n,l.isSliding=!0,clearInterval(l.timer),l.timer=null,O(n),c(h[n])&&t(o,"slide")?(g(h[n],"carousel-item-"+i),h[n].offsetWidth,g(h[n],"carousel-item-"+l.direction),g(h[a],"carousel-item-"+l.direction),s(h[n],R)):(g(h[n],"active"),h[n].offsetWidth,e(h[a],"active"),setTimeout((function(){l.isSliding=!1,E.interval&&o&&!t(o,"paused")&&x.cycle(),m.call(o,p)}),100))))}},x.getActiveIndex=function(){return Array.from(h).indexOf(o.getElementsByClassName("carousel-item active")[0])||0},x.dispose=function(){var n=["left","right","prev","next"];Array.from(h).map((function(i,o){t(i,"active")&&O(o),n.map((function(t){return e(i,"carousel-item-"+t)}))})),clearInterval(l.timer),H(i),l={},delete o.Carousel},(l={}).direction="left",l.index=0,l.timer=null,l.isSliding=!1,l.isTouch=!1,l.touchPosition={startX:0,currentX:0,endX:0},u((function(){(o=d(o)).Carousel&&o.Carousel.dispose();var t=o.getAttribute("data-interval"),e=a.interval,i="false"===t?0:parseInt(t),l="hover"===o.getAttribute("data-pause")||!1,r="true"===o.getAttribute("data-keyboard")||!1;h=o.getElementsByClassName("carousel-item"),T=o.getElementsByClassName("carousel-control-prev")[0],k=o.getElementsByClassName("carousel-control-next")[0],N=o.getElementsByClassName("carousel-indicators")[0],C=N&&N.getElementsByTagName("LI")||[],E.keyboard=!0===a.keyboard||r,E.pause=!("hover"!==a.pause&&!l)&&"hover",E.interval="number"==typeof e?e:!1===e||0===i||!1===i?0:isNaN(i)?5e3:i,h.length<2||(o.Carousel||H(n),x.getActiveIndex()<0&&(h.length&&g(h[0],"active"),C.length&&O(0)),E.interval&&x.cycle(),o.Carousel=x)}),"BSN.Carousel")}function k(o,a){a=a||{};var l,r,c,p,h,v,b=this,y=null,w=null;function A(t,n){m.call(t,h),h.defaultPrevented||(t.isAnimating=!0,t.style.height=t.scrollHeight+"px",e(t,"collapse"),e(t,"show"),g(t,"collapsing"),t.offsetWidth,t.style.height="0px",s(t,(function(){t.isAnimating=!1,t.setAttribute("aria-expanded","false"),n.setAttribute("aria-expanded","false"),e(t,"collapsing"),g(t,"collapse"),t.style.height="",m.call(t,v)})))}b.toggle=function(e){(e&&"A"===e.target.tagName||"A"===o.tagName)&&e.preventDefault(),(o.contains(e.target)||e.target===o)&&(t(w,"show")?b.hide():b.show())},b.hide=function(){w.isAnimating||(A(w,o),g(o,"collapsed"))},b.show=function(){var t,n;y&&(l=y.getElementsByClassName("collapse show")[0],r=l&&(d('[data-target="#'+l.id+'"]',y)||d('[href="#'+l.id+'"]',y))),w.isAnimating||(r&&l!==w&&(A(l,r),g(r,"collapsed")),t=w,n=o,m.call(t,c),c.defaultPrevented||(t.isAnimating=!0,g(t,"collapsing"),e(t,"collapse"),t.style.height=t.scrollHeight+"px",s(t,(function(){t.isAnimating=!1,t.setAttribute("aria-expanded","true"),n.setAttribute("aria-expanded","true"),e(t,"collapsing"),g(t,"collapse"),g(t,"show"),t.style.height="",m.call(t,p)}))),e(o,"collapsed"))},b.dispose=function(){i(o,"click",b.toggle),delete o.Collapse},u((function(){(o=d(o)).Collapse&&o.Collapse.dispose();var t=o.getAttribute("data-parent");c=f("show","collapse"),p=f("shown","collapse"),h=f("hide","collapse"),v=f("hidden","collapse"),(w=d(a.target||o.getAttribute("data-target")||o.getAttribute("href"))).isAnimating=!1,y=o.closest(a.parent||t),o.Collapse||n(o,"click",b.toggle),o.Collapse=b}),"BSN.Collapse")}var N="mousedown";"webkitPerspective"in document.body.style||document.body.style,"webkitTransform"in document.body.style||document.body.style;function C(t){t.focus?t.focus():t.setActive()}function x(){return{y:window.pageYOffset||document.documentElement.scrollTop,x:window.pageXOffset||document.documentElement.scrollLeft}}function E(e,n,i,o){var a,l,r,c,s,u,f=n.offsetWidth,m=n.offsetHeight,p=document.documentElement.clientWidth||document.body.clientWidth,g=document.documentElement.clientHeight||document.body.clientHeight,h=e.getBoundingClientRect(),v=o===document.body?x():{x:o.offsetLeft+o.scrollLeft,y:o.offsetTop+o.scrollTop},b=h.right-h.left,y=h.bottom-h.top,w=t(n,"popover"),A=d(".arrow",n),T=h.top+y/2-m/2<0,k=h.left+b/2-f/2<0,N=h.left+f/2+b/2>=p,C=h.top+m/2+y/2>=g,E=h.top-m<0,P=h.left-f<0,S=h.top+m+y>=g,B=h.left+f+b>=p;i="right"===(i="left"===(i="bottom"===(i="top"===(i=("left"===i||"right"===i)&&P&&B?"top":i)&&E?"bottom":i)&&S?"top":i)&&P?"right":i)&&B?"left":i,-1===n.className.indexOf(i)&&(n.className=n.className.replace(/\b(top|bottom|left|right)+/,i)),s=A.offsetWidth,u=A.offsetHeight,"left"===i||"right"===i?(l="left"===i?h.left+v.x-f-(w?s:0):h.left+v.x+b,T?(a=h.top+v.y,r=y/2-s):C?(a=h.top+v.y-m+y,r=m-y/2-s):(a=h.top+v.y-m/2+y/2,r=m/2-(w?.9*u:u/2))):"top"!==i&&"bottom"!==i||(a="top"===i?h.top+v.y-m-(w?u:0):h.top+v.y+y,k?(l=0,c=h.left+b/2-s):N?(l=p-1.01*f,c=f-(p-h.left)+b/2-s/2):(l=h.left+v.x-f/2+b/2,c=f/2-(w?s:s/2))),n.style.top=a+"px",n.style.left=l+"px",r&&(A.style.top=r+"px"),c&&(A.style.left=c+"px")}function P(o,a){var l,r,c,s,p,h,v,b=this,y=null,w=[];function A(t){(t.href&&"#"===t.href.slice(-1)||t.parentNode&&t.parentNode.href&&"#"===t.parentNode.href.slice(-1))&&this.preventDefault()}function T(){var t=o.open?n:i;t(document,"click",k),t(document,"keydown",x),t(document,"keyup",E),t(document,"focus",k,!0)}function k(t){var e=t.target,n=e&&(e.getAttribute("data-toggle")||e.parentNode&&e.parentNode.getAttribute&&e.parentNode.getAttribute("data-toggle"));("focus"!==t.type||e!==o&&e!==h&&!h.contains(e))&&(e!==h&&!h.contains(e)||!v&&!n)&&(y=e===o||o.contains(e)?o:null,b.hide(),A.call(t,e))}function N(t){y=o,b.show(),A.call(t,t.target)}function x(t){var e=t.which||t.keyCode;38!==e&&40!==e||t.preventDefault()}function E(t){var e=t.which,n=t.keyCode,i=e||n,a=document.activeElement,l=a===o,r=h.contains(a),c=a.parentNode===h||a.parentNode.parentNode===h,s=w.indexOf(a);c&&(s=l?0:38===i?s>1?s-1:0:40===i&&s<w.length-1?s+1:s,w[s]&&C(w[s])),(w.length&&c||!w.length&&(r||l)||!r)&&o.open&&27===i&&(b.toggle(),y=null)}b.show=function(){l=f("show","dropdown",y),m.call(p,l),l.defaultPrevented||(g(h,"show"),g(p,"show"),o.setAttribute("aria-expanded",!0),o.open=!0,i(o,"click",N),setTimeout((function(){C(h.getElementsByTagName("INPUT")[0]||o),T(),r=f("shown","dropdown",y),m.call(p,r)}),1))},b.hide=function(){c=f("hide","dropdown",y),m.call(p,c),c.defaultPrevented||(e(h,"show"),e(p,"show"),o.setAttribute("aria-expanded",!1),o.open=!1,T(),C(o),setTimeout((function(){o.Dropdown&&n(o,"click",N)}),1),s=f("hidden","dropdown",y),m.call(p,s))},b.toggle=function(){t(p,"show")&&o.open?b.hide():b.show()},b.dispose=function(){t(p,"show")&&o.open&&b.hide(),i(o,"click",N),delete o.Dropdown},u((function(){(o=d(o)).Dropdown&&o.Dropdown.dispose(),p=o.parentNode,h=d(".dropdown-menu",p),Array.from(h.children).map((function(t){t.children.length&&"A"===t.children[0].tagName&&w.push(t.children[0]),"A"===t.tagName&&w.push(t)})),o.Dropdown||(!("tabindex"in h)&&h.setAttribute("tabindex","0"),n(o,"click",N)),v=!0===a||"true"===o.getAttribute("data-persist")||!1,o.open=!1,o.Dropdown=b}),"BSN.Dropdown")}function S(o,a){a=a||{};var l,r,p,h,v,b,y,w,T,k=this,N=null,x={};function E(){var e,n=t(document.body,"modal-open"),i=parseInt(getComputedStyle(document.body).paddingRight),o=l.clientHeight!==l.scrollHeight;l.style.paddingRight=!o&&b?b+"px":"",document.body.style.paddingRight=i+(n?0:b)+"px",T.length&&T.map((function(t){e=getComputedStyle(t).paddingRight,t.style.paddingRight=parseInt(e)+(n?0:b)+"px"}))}function P(){var t,e;(e=document.createElement("div")).className="modal-scrollbar-measure",document.body.appendChild(e),t=e.offsetWidth-e.clientWidth,document.body.removeChild(e),b=t}function S(){(y=d(".modal-backdrop"))&&!document.getElementsByClassName("modal show")[0]&&(document.body.removeChild(y),y=null),null===y&&(e(document.body,"modal-open"),document.body.style.paddingRight="",l.style.paddingRight="",T.length&&T.map((function(t){t.style.paddingRight=""})))}function B(t){t(window,"resize",k.update,A),t(l,"click",X),t(document,"keydown",D)}function M(){l.style.display="block",P(),E(),!document.getElementsByClassName("modal show")[0]&&g(document.body,"modal-open"),g(l,"show"),l.setAttribute("aria-hidden",!1),t(l,"fade")?s(l,L):L()}function L(){C(l),l.isAnimating=!1,B(n),p=f("shown","modal",N),m.call(l,p)}function H(n){l.style.display="",o&&C(o),y=d(".modal-backdrop"),1!==n&&y&&t(y,"show")&&!document.getElementsByClassName("modal show")[0]?(e(y,"show"),s(y,S)):S(),B(i),l.isAnimating=!1,v=f("hidden","modal"),m.call(l,v)}function I(e){if(!l.isAnimating){var n=e.target,i="#"+l.getAttribute("id"),a=n.getAttribute("data-target")||n.getAttribute("href"),r=o.getAttribute("data-target")||o.getAttribute("href");!t(l,"show")&&(n===o&&a===i||o.contains(n)&&r===i)&&(l.modalTrigger=o,N=o,k.show(),e.preventDefault())}}function D(e){var n=e.which;!l.isAnimating&&x.keyboard&&27==n&&t(l,"show")&&k.hide()}function X(e){if(!l.isAnimating){var n=e.target,i="modal"===n.getAttribute("data-dismiss"),o=n.closest('[data-dismiss="modal"]');t(l,"show")&&(o||i||n===l&&"static"!==x.backdrop)&&(k.hide(),N=null,e.preventDefault())}}k.toggle=function(){t(l,"show")?k.hide():k.show()},k.show=function(){if(!(t(l,"show")&&l.isAnimating||(r=f("show","modal",N),m.call(l,r),r.defaultPrevented))){l.isAnimating=!0;var e,n=document.getElementsByClassName("modal show")[0];n&&n!==l&&(n.modalTrigger&&n.modalTrigger.Modal.hide(),n.Modal&&n.Modal.hide()),x.backdrop&&(e=document.createElement("div"),null===(y=d(".modal-backdrop"))&&(e.setAttribute("class","modal-backdrop"+(x.animation?" fade":"")),y=e,document.body.appendChild(y)),y=y),!y||n||t(y,"show")||(y.offsetWidth,w=c(y),g(y,"show")),n?M():setTimeout(M,y&&w?w:0)}},k.hide=function(n){t(l,"show")&&(h=f("hide","modal"),m.call(l,h),h.defaultPrevented||(l.isAnimating=!0,e(l,"show"),l.setAttribute("aria-hidden",!0),t(l,"fade")&&1!==n?s(l,H):H()))},k.setContent=function(t){d(".modal-content",l).innerHTML=t},k.update=function(){t(l,"show")&&(P(),E())},k.dispose=function(){k.hide(1),o?(i(o,"click",I),delete o.Modal):delete l.Modal},u((function(){o=d(o);var e=d(o.getAttribute("data-target")||o.getAttribute("href"));l=t(o,"modal")?o:e,T=Array.from(document.getElementsByClassName("fixed-top")).concat(Array.from(document.getElementsByClassName("fixed-bottom"))),t(o,"modal")&&(o=null),o&&o.Modal&&o.Modal.dispose(),l&&l.Modal&&l.Modal.dispose(),x.keyboard=!1!==a.keyboard&&"false"!==l.getAttribute("data-keyboard"),x.backdrop="static"!==a.backdrop&&"static"!==l.getAttribute("data-backdrop")||"static",x.backdrop=!1!==a.backdrop&&"false"!==l.getAttribute("data-backdrop")&&x.backdrop,x.animation=!!t(l,"fade"),x.content=a.content,l.isAnimating=!1,o&&!o.Modal&&n(o,"click",I),x.content&&k.setContent(x.content.trim()),o?(l.modalTrigger=o,o.Modal=k):l.Modal=k}),"BSN.Modal")}function B(o,a){a=a||{};var l,r,c,p,h,b,y,T,k,C,x,P,S,B,M,L,H,I,D,X=this,W=null,O=0,R=/(iPhone|iPod|iPad)/.test(navigator.userAgent),z={};function U(t){null!==W&&t.target===d(".close",W)&&X.hide()}function q(){return{0:a.title||o.getAttribute("data-title")||null,1:a.content||o.getAttribute("data-content")||null}}function j(){null===W&&o.focus()}function Y(t){"hover"===z.trigger?(t(o,N,X.show),t(o,w[0],X.show),z.dismissible||t(o,w[1],X.hide)):"click"==z.trigger?t(o,z.trigger,X.toggle):"focus"==z.trigger&&(R&&t(o,"click",j),t(o,z.trigger,X.toggle))}function F(t){W&&W.contains(t.target)||t.target===o||o.contains(t.target)||X.hide()}function V(t){z.dismissible?t(document,"click",U):("focus"==z.trigger&&t(o,"blur",X.hide),"hover"==z.trigger&&t(document,v,F,A)),t(window,"resize",X.hide,A)}function G(){V(n),m.call(o,x)}function J(){V(i),z.container.removeChild(W),O=null,W=null,m.call(o,S)}X.toggle=function(){null===W?X.show():X.hide()},X.show=function(){clearTimeout(O),O=setTimeout((function(){if(null===W){if(m.call(o,C),C.defaultPrevented)return;!function(){l=q()[0]||null,r=(r=q()[1])?r.trim():null,W=document.createElement("div");var e=document.createElement("div");if(g(e,"arrow"),W.appendChild(e),null!==r&&null===z.template){if(W.setAttribute("role","tooltip"),null!==l){var n=document.createElement("h3");g(n,"popover-header"),n.innerHTML=z.dismissible?l+k:l,W.appendChild(n)}var i=document.createElement("div");g(i,"popover-body"),i.innerHTML=z.dismissible&&null===l?r+k:r,W.appendChild(i)}else{var o=document.createElement("div");o.innerHTML=z.template.trim(),W.className=o.firstChild.className,W.innerHTML=o.firstChild.innerHTML;var a=d(".popover-header",W),c=d(".popover-body",W);l&&a&&(a.innerHTML=l.trim()),r&&c&&(c.innerHTML=r.trim())}z.container.appendChild(W),W.style.display="block",!t(W,"popover")&&g(W,"popover"),!t(W,z.animation)&&g(W,z.animation),!t(W,D)&&g(W,D)}(),E(o,W,z.placement,z.container),!t(W,"show")&&g(W,"show"),z.animation?s(W,G):G()}}),20)},X.hide=function(){clearTimeout(O),O=setTimeout((function(){if(W&&null!==W&&t(W,"show")){if(m.call(o,P),P.defaultPrevented)return;e(W,"show"),z.animation?s(W,J):J()}}),z.delay)},X.dispose=function(){X.hide(),Y(i),delete o.Popover},u((function(){(o=d(o)).Popover&&o.Popover.dispose(),c=o.getAttribute("data-trigger"),p=o.getAttribute("data-animation"),h=o.getAttribute("data-placement"),b=o.getAttribute("data-dismissible"),y=o.getAttribute("data-delay"),T=o.getAttribute("data-container"),k='<button type="button" class="close">×</button>',C=f("show","popover"),x=f("shown","popover"),P=f("hide","popover"),S=f("hidden","popover"),B=d(a.container),M=d(T),L=o.closest(".modal"),H=o.closest(".fixed-top"),I=o.closest(".fixed-bottom"),z.template=a.template?a.template:null,z.trigger=a.trigger?a.trigger:c||"hover",z.animation=a.animation&&"fade"!==a.animation?a.animation:p||"fade",z.placement=a.placement?a.placement:h||"top",z.delay=parseInt(a.delay||y)||200,z.dismissible=!(!a.dismissible&&"true"!==b),z.container=B||(M||(H||(I||(L||document.body)))),D="bs-popover-"+z.placement;var t=q();l=t[0],((r=t[1])||z.template)&&(o.Popover||Y(n),o.Popover=X)}),"BSN.Popover")}function M(o,a){a=a||{};var l,r,c,s,p,h=this,v={};function b(){var n;n=s.getElementsByTagName("A"),l.length!==n.length&&(l.items=[],l.targets=[],Array.from(n).map((function(t){var e=t.getAttribute("href"),n=e&&"#"===e.charAt(0)&&"#"!==e.slice(-1)&&d(e);n&&(l.items.push(t),l.targets.push(n))})),l.length=n.length),l.scrollOffset=l.isWindow?x().y:o.scrollTop,l.items.map((function(n,i){return function(n){var i=l.items[n],a=l.targets[n],r=t(i,"dropdown-item")&&i.closest(".dropdown-menu"),c=r&&r.previousElementSibling,s=i.nextElementSibling,d=s&&s.getElementsByClassName("active").length,u=l.isWindow&&a.getBoundingClientRect(),p=t(i,"active")||!1,h=(l.isWindow?u.top+l.scrollOffset:a.offsetTop)-v.offset,b=l.isWindow?u.bottom+l.scrollOffset-v.offset:l.targets[n+1]?l.targets[n+1].offsetTop-v.offset:o.scrollHeight,y=d||l.scrollOffset>=h&&b>l.scrollOffset;if(!p&&y)g(i,"active"),c&&!t(c,"active")&&g(c,"active"),m.call(o,f("activate","scrollspy",l.items[n]));else if(p&&!y)e(i,"active"),c&&t(c,"active")&&!i.parentNode.getElementsByClassName("active").length&&e(c,"active");else if(p&&y||!y&&!p)return}(i)}))}function y(t){t(p,"scroll",h.refresh,A),t(window,"resize",h.refresh,A)}h.refresh=function(){b()},h.dispose=function(){y(i),delete o.ScrollSpy},u((function(){(o=d(o)).ScrollSpy&&o.ScrollSpy.dispose(),r=o.getAttribute("data-target"),c=o.getAttribute("data-offset"),s=d(a.target||r),p=o.offsetHeight<o.scrollHeight?o:window,s&&(v.target=s,v.offset=parseInt(a.offset||c)||10,(l={}).length=0,l.items=[],l.targets=[],l.isWindow=p===window,o.ScrollSpy||y(n),h.refresh(),o.ScrollSpy=h)}),"BSN.ScrollSpy")}function L(o,a){a=a||{};var r,c,p,h,v,b,y,w,A,T,k,N,C,x,E,P=this,S=!1;function B(){S.style.height="",e(S,"collapsing"),c.isAnimating=!1}function M(){S?C?B():setTimeout((function(){S.style.height=x+"px",S.offsetWidth,s(S,B)}),50):c.isAnimating=!1,v=f("shown","tab",A),m.call(w,v)}function L(){S&&(T.style.float="left",k.style.float="left",N=T.scrollHeight),h=f("show","tab",A),y=f("hidden","tab",w),m.call(w,h),h.defaultPrevented||(g(k,"active"),e(T,"active"),S&&(x=k.scrollHeight,C=x===N,g(S,"collapsing"),S.style.height=N+"px",S.offsetHeight,T.style.float="",k.style.float=""),t(k,"fade")?setTimeout((function(){g(k,"show"),s(k,M)}),20):M(),m.call(A,y))}function H(){var e,n=c.getElementsByClassName("active");return 1!==n.length||t(n[0].parentNode,"dropdown")?n.length>1&&(e=n[n.length-1]):e=n[0],e}function I(){return d(H().getAttribute("href"))}function D(t){t.preventDefault(),w=t.currentTarget,!c.isAnimating&&P.show()}P.show=function(){if(!t(w=w||o,"active")){if(k=d(w.getAttribute("href")),A=H(),T=I(),b=f("hide","tab",w),m.call(A,b),b.defaultPrevented)return;c.isAnimating=!0,e(A,"active"),A.setAttribute("aria-selected","false"),g(w,"active"),w.setAttribute("aria-selected","true"),p&&(t(o.parentNode,"dropdown-menu")?t(p,"active")||g(p,"active"):t(p,"active")&&e(p,"active")),t(T,"fade")?(e(T,"show"),s(T,L)):L()}},P.dispose=function(){i(o,"click",D),delete o.Tab},u((function(){(o=d(o)).Tab&&o.Tab.dispose(),r=o.getAttribute("data-height"),c=o.closest(".nav"),p=c&&d(".dropdown-toggle",c),E=!(!l||!1===a.height||"false"===r),c.isAnimating=!1,o.Tab||n(o,"click",D),E&&(S=I().parentNode),o.Tab=P}),"BSN.Tab")}function H(o,a){a=a||{};var l,r,c,p,h,v,b,y,w=this,A=0,T={};function k(){e(l,"showing"),g(l,"show"),m.call(l,b),T.autohide&&w.hide()}function N(){g(l,"hide"),m.call(l,y)}function C(){e(l,"show"),T.animation?s(l,N):N()}function x(){clearTimeout(A),i(o,"click",w.hide),delete o.Toast}w.show=function(){if(l&&!t(l,"show")){if(m.call(l,h),h.defaultPrevented)return;T.animation&&g(l,"fade"),e(l,"hide"),l.offsetWidth,g(l,"showing"),T.animation?s(l,k):k()}},w.hide=function(e){if(l&&t(l,"show")){if(m.call(l,v),v.defaultPrevented)return;e?C():A=setTimeout(C,T.delay)}},w.dispose=function(){T.animation?s(l,x):x()},u((function(){(o=d(o)).Toast&&o.Toast.dispose(),l=o.closest(".toast"),r=o.getAttribute("data-animation"),c=o.getAttribute("data-autohide"),p=o.getAttribute("data-delay"),h=f("show","toast"),v=f("hide","toast"),b=f("shown","toast"),y=f("hidden","toast"),T.animation=!1===a.animation||"false"===r?0:1,T.autohide=!1===a.autohide||"false"===c?0:1,T.delay=parseInt(a.delay||p)||500,o.Toast||n(o,"click",w.hide),o.Toast=w}),"BSN.Toast")}function I(o,a){a=a||{};var l,r,c,p,h,b,y,T,k,C,x,P,S,B,M,L=this,H=null,I=0,D={};function X(){return o.getAttribute("title")||o.getAttribute("data-title")||o.getAttribute("data-original-title")}function W(t){H&&H.contains(t.target)||t.target===o||o.contains(t.target)||L.hide()}function O(){n(document,v,W,A),n(window,"resize",L.hide,A),m.call(o,y)}function R(){i(document,v,W,A),i(window,"resize",L.hide,A),D.container.removeChild(H),H=null,I=null,m.call(o,k)}function z(t){t(o,N,L.show),t(o,w[0],L.show),t(o,w[1],L.hide)}L.show=function(){clearTimeout(I),I=setTimeout((function(){if(null===H){if(m.call(o,b),b.defaultPrevented)return;!1!==function(){if(l=X()){if(H=document.createElement("div"),D.template){var e=document.createElement("div");e.innerHTML=D.template.trim(),H.className=e.firstChild.className,H.innerHTML=e.firstChild.innerHTML,d(".tooltip-inner",H).innerHTML=l.trim()}else{var n=document.createElement("div");g(n,"arrow"),H.appendChild(n);var i=document.createElement("div");g(i,"tooltip-inner"),H.appendChild(i),i.innerHTML=l}H.style.left="0",H.style.top="0",H.setAttribute("role","tooltip"),!t(H,"tooltip")&&g(H,"tooltip"),!t(H,D.animation)&&g(H,D.animation),!t(H,M)&&g(H,M),D.container.appendChild(H)}}()&&(E(o,H,D.placement,D.container),!t(H,"show")&&g(H,"show"),D.animation?s(H,O):O())}}),20)},L.hide=function(){clearTimeout(I),I=setTimeout((function(){if(H&&t(H,"show")){if(m.call(o,T),T.defaultPrevented)return;e(H,"show"),D.animation?s(H,R):R()}}),D.delay)},L.toggle=function(){H?L.hide():L.show()},L.dispose=function(){z(i),L.hide(),o.setAttribute("title",o.getAttribute("data-original-title")),o.removeAttribute("data-original-title"),delete o.Tooltip},u((function(){(o=d(o)).Tooltip&&o.Tooltip.dispose(),r=o.getAttribute("data-animation"),c=o.getAttribute("data-placement"),p=o.getAttribute("data-delay"),h=o.getAttribute("data-container"),b=f("show","tooltip"),y=f("shown","tooltip"),T=f("hide","tooltip"),k=f("hidden","tooltip"),C=d(a.container),x=d(h),P=o.closest(".modal"),S=o.closest(".fixed-top"),B=o.closest(".fixed-bottom"),D.animation=a.animation&&"fade"!==a.animation?a.animation:r||"fade",D.placement=a.placement?a.placement:c||"top",D.template=a.template?a.template:null,D.delay=parseInt(a.delay||p)||200,D.container=C||(x||(S||(B||(P||document.body)))),M="bs-tooltip-"+D.placement,(l=X())&&(o.Tooltip||(o.setAttribute("data-original-title",l),o.removeAttribute("title"),z(n)),o.Tooltip=L)}),"BSN.Tooltip")}var D={},X=function(t){t=t||document;var e=function(t,e){Array.from(e).map((function(e){return new t(e)}))};for(var n in D)e(D[n][0],t.querySelectorAll(D[n][1]))};D.Alert=[p,'[data-dismiss="alert"]'],D.Button=[h,'[data-toggle="buttons"]'],D.Carousel=[T,'[data-ride="carousel"]'],D.Collapse=[k,'[data-toggle="collapse"]'],D.Dropdown=[P,'[data-toggle="dropdown"]'],D.Modal=[S,'[data-toggle="modal"]'],D.Popover=[B,'[data-toggle="popover"],[data-tip="popover"]'],D.ScrollSpy=[M,'[data-spy="scroll"]'],D.Tab=[L,'[data-toggle="tab"]'],D.Toast=[H,'[data-dismiss="toast"]'],D.Tooltip=[I,'[data-toggle="tooltip"],[data-tip="tooltip"]'],document.body?X():o(document,"DOMContentLoaded",X);return{Alert:p,Button:h,Carousel:T,Collapse:k,Dropdown:P,Modal:S,Popover:B,ScrollSpy:M,Tab:L,Toast:H,Tooltip:I,initCallback:X,removeDataAPI:function(t){t=t||document;var e=function(t,e){Array.from(e).map((function(e){return e[t].dispose()}))};for(var n in D)e(n,t.querySelectorAll(D[n][1]))},componentsInit:D,Version:"3.0.1"}})); |
{ | ||
"name": "bootstrap.native", | ||
"version": "3.0.0", | ||
"version": "3.0.1", | ||
"description": "Native JavaScript for Bootstrap, the sweetest JavaScript library without jQuery.", | ||
@@ -5,0 +5,0 @@ "main": "dist/bootstrap-native.js", |
@@ -260,3 +260,2 @@ | ||
// self.getActiveIndex = () => [].slice.call(slides).indexOf(element.getElementsByClassName('carousel-item active')[0]) || 0 | ||
self.getActiveIndex = () => Array.from(slides).indexOf(element.getElementsByClassName('carousel-item active')[0]) || 0 | ||
@@ -267,4 +266,2 @@ | ||
// [].slice.call(slides).map((slide,idx) => { | ||
// [...slides].map((slide,idx) => { // this doesn't work with buble | ||
Array.from(slides).map((slide,idx) => { | ||
@@ -271,0 +268,0 @@ if (hasClass(slide,'active')){ |
@@ -147,6 +147,10 @@ | ||
if ( modal.isAnimating ) return; | ||
let clickTarget = e.target, | ||
modalID = `#${modal.getAttribute('id')}`, | ||
targetAttrValue = clickTarget.getAttribute('data-target') || clickTarget.getAttribute('href'), | ||
elemAttrValue = element.getAttribute('data-target') || element.getAttribute('href'); | ||
let clickTarget = e.target; | ||
clickTarget = clickTarget.hasAttribute('data-target') || clickTarget.hasAttribute('href') ? clickTarget : clickTarget.parentNode; | ||
if ( (clickTarget === element || element.contains(clickTarget)) && !hasClass(modal,'show') ) { | ||
if ( !hasClass(modal,'show') | ||
&& (clickTarget === element && targetAttrValue === modalID | ||
|| element.contains(clickTarget) && elemAttrValue === modalID) ) { | ||
modal.modalTrigger = element; | ||
@@ -159,5 +163,3 @@ relatedTarget = element; | ||
function keyHandler({which}) { | ||
if ( modal.isAnimating ) return; | ||
if (ops.keyboard && which == 27 && hasClass(modal,'show') ) { | ||
if (!modal.isAnimating && ops.keyboard && which == 27 && hasClass(modal,'show') ) { | ||
self.hide(); | ||
@@ -168,6 +170,7 @@ } | ||
if ( modal.isAnimating ) return; | ||
let clickTarget = e.target; | ||
let clickTarget = e.target, | ||
hasData = clickTarget.getAttribute('data-dismiss') === 'modal', | ||
parentWithData = clickTarget.closest('[data-dismiss="modal"]'); | ||
if ( hasClass(modal,'show') && ( clickTarget.parentNode.getAttribute('data-dismiss') === 'modal' | ||
|| clickTarget.getAttribute('data-dismiss') === 'modal' | ||
if ( hasClass(modal,'show') && ( parentWithData || hasData | ||
|| clickTarget === modal && ops.backdrop !== 'static' ) ) { | ||
@@ -174,0 +177,0 @@ self.hide(); relatedTarget = null; |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
292753
5933
0