diff --git a/assets/js/scripts.js b/assets/js/scripts.js index 64dd42f5..9e65ac99 100644 --- a/assets/js/scripts.js +++ b/assets/js/scripts.js @@ -3,6 +3,18 @@ myModal.addEventListener('show.bs.modal', function(e) { e.target && console.log('show.bs.modal triggered for #'+e.target.id); e.relatedTarget && console.log('event.relatedTarget is '+e.relatedTarget.tagName+'.'+e.relatedTarget.className.replace(/\s/g,'.')); }, false); +myModal.addEventListener('shown.bs.modal', function(e) { + e.target && console.log('shown.bs.modal triggered for #'+e.target.id); + e.relatedTarget && console.log('event.relatedTarget is '+e.relatedTarget.tagName+'.'+e.relatedTarget.className.replace(/\s/g,'.')); +}, false); +myModal.addEventListener('hide.bs.modal', function(e) { + e.target && console.log('hide.bs.modal triggered for #'+e.target.id); + e.relatedTarget && console.log('event.relatedTarget is '+e.relatedTarget.tagName+'.'+e.relatedTarget.className.replace(/\s/g,'.')); +}, false); +myModal.addEventListener('hidden.bs.modal', function(e) { + e.target && console.log('hidden.bs.modal triggered for #'+e.target.id); + e.relatedTarget && console.log('event.relatedTarget is '+e.relatedTarget.tagName+'.'+e.relatedTarget.className.replace(/\s/g,'.')); +}, false); // Modal initialized with JavaScript diff --git a/dist/bootstrap-native-v4.js b/dist/bootstrap-native-v4.js index 3aec6964..be59a993 100644 --- a/dist/bootstrap-native-v4.js +++ b/dist/bootstrap-native-v4.js @@ -1,4 +1,4 @@ -// Native Javascript for Bootstrap 4 v2.0.26 | © dnp_theme | MIT-License +// Native Javascript for Bootstrap 4 v2.0.27 | © dnp_theme | MIT-License (function (root, factory) { if (typeof define === 'function' && define.amd) { // AMD support: @@ -319,7 +319,7 @@ arrowLeft && (arrow[style][left] = arrowLeft + 'px'); }; - BSN.version = '2.0.26'; + BSN.version = '2.0.27'; /* Native Javascript for Bootstrap 4 | Alert -------------------------------------------*/ @@ -1020,8 +1020,8 @@ // determine modal, triggering element btnCheck = element[getAttribute](dataTarget)||element[getAttribute]('href'), checkModal = queryElement( btnCheck ), - modal = hasClass(element,component) ? element : checkModal; - + modal = hasClass(element,component) ? element : checkModal; + if ( hasClass(element, component) ) { element = null; } // modal is now independent of it's triggering element if ( !modal ) { return; } // invalidate @@ -1032,6 +1032,7 @@ this[keyboard] = options[keyboard] === false || modal[getAttribute](dataKeyboard) === 'false' ? false : true; this[backdrop] = options[backdrop] === staticString || modal[getAttribute](databackdrop) === staticString ? staticString : true; this[backdrop] = options[backdrop] === false || modal[getAttribute](databackdrop) === 'false' ? false : this[backdrop]; + this[animation] = hasClass(modal, 'fade') ? true : false; this[content] = options[content]; // JavaScript only // bind, constants, event targets and other vars @@ -1082,24 +1083,22 @@ scrollBarWidth = measureScrollbar(); }, createOverlay = function() { - modalOverlay = 1; - var newOverlay = DOC[createElement]('div'); overlay = queryElement('.'+modalBackdropString); if ( overlay === null ) { - newOverlay[setAttribute]('class',modalBackdropString+' fade'); + newOverlay[setAttribute]('class', modalBackdropString + (self[animation] ? ' fade' : '')); overlay = newOverlay; DOC[body][appendChild](overlay); } + modalOverlay = 1; }, removeOverlay = function() { overlay = queryElement('.'+modalBackdropString); if ( overlay && overlay !== null && typeof overlay === 'object' ) { - modalOverlay = 0; + modalOverlay = 0; DOC[body].removeChild(overlay); overlay = null; } - bootstrapCustomEvent.call(modal, hiddenEvent, component); }, keydownHandlerToggle = function() { if (hasClass(modal,showClass)) { @@ -1133,12 +1132,13 @@ triggerHide = function() { modal[style].display = ''; element && (setFocus(element)); - + bootstrapCustomEvent.call(modal, hiddenEvent, component); + (function(){ if (!getElementsByClassName(DOC,component+' '+showClass)[0]) { resetScrollbar(); removeClass(DOC[body],component+'-open'); - overlay && hasClass(overlay,'fade') ? (removeClass(overlay,showClass), emulateTransitionEnd(overlay,removeOverlay)) + overlay && hasClass(overlay,'fade') ? (removeClass(overlay,showClass), emulateTransitionEnd(overlay,removeOverlay)) : removeOverlay(); resizeHandlerToggle(); @@ -1193,7 +1193,7 @@ if ( overlay && modalOverlay && !hasClass(overlay,showClass)) { overlay[offsetWidth]; // force reflow to enable trasition - overlayDelay = getTransitionDurationFromElement(overlay); + overlayDelay = getTransitionDurationFromElement(overlay); addClass(overlay, showClass); } @@ -1208,19 +1208,19 @@ modal[setAttribute](ariaHidden, false); hasClass(modal,'fade') ? emulateTransitionEnd(modal, triggerShow) : triggerShow(); - }, supportTransitions && overlay ? overlayDelay : 0); + }, supportTransitions && overlay && overlayDelay ? overlayDelay : 0); }; this.hide = function() { bootstrapCustomEvent.call(modal, hideEvent, component); overlay = queryElement('.'+modalBackdropString); - overlayDelay = overlay && getTransitionDurationFromElement(overlay); + overlayDelay = overlay && getTransitionDurationFromElement(overlay); removeClass(modal,showClass); modal[setAttribute](ariaHidden, true); setTimeout(function(){ hasClass(modal,'fade') ? emulateTransitionEnd(modal, triggerHide) : triggerHide(); - }, supportTransitions && overlay ? overlayDelay : 0); + }, supportTransitions && overlay && overlayDelay ? overlayDelay : 1); }; this.setContent = function( content ) { queryElement('.'+component+'-content',modal)[innerHTML] = content; diff --git a/dist/bootstrap-native-v4.min.js b/dist/bootstrap-native-v4.min.js index ef9a719a..a496d743 100644 --- a/dist/bootstrap-native-v4.min.js +++ b/dist/bootstrap-native-v4.min.js @@ -1,2 +1,2 @@ -// Native Javascript for Bootstrap 4 v2.0.26 | © dnp_theme | MIT-License -!function(t,e){if("function"==typeof define&&define.amd)define([],e);else if("object"==typeof module&&module.exports)module.exports=e();else{var i=e();t.Alert=i.Alert,t.Button=i.Button,t.Carousel=i.Carousel,t.Collapse=i.Collapse,t.Dropdown=i.Dropdown,t.Modal=i.Modal,t.Popover=i.Popover,t.ScrollSpy=i.ScrollSpy,t.Tab=i.Tab,t.Toast=i.Toast,t.Tooltip=i.Tooltip}}(this,function(){"use strict";var t="undefined"!=typeof global?global:this||window,e=document,i=e.documentElement,n="body",o=t.BSN={},a=o.supports=[],l="delay",r="target",s="animation",c="getAttribute",d="setAttribute",u="parentNode",h="length",f="Transition",p="Webkit",g="style",m="push",v="active",w="left",b="top",T="onmouseleave"in e?["mouseenter","mouseleave"]:["mouseover","mouseout"],y=/\b(top|bottom|left|right)+/,k=0,C=p+f in i[g]||f.toLowerCase()in i[g],x=p+f in i[g]?p.toLowerCase()+f+"End":f.toLowerCase()+"end",A=p+"Duration"in i[g]?p.toLowerCase()+f+"Duration":f.toLowerCase()+"Duration",E={start:"touchstart",end:"touchend",move:"touchmove"},L=function(t){t.focus?t.focus():t.setActive()},N=function(t,e){t.classList.add(e)},D=function(t,e){t.classList.remove(e)},I=function(t,e){return t.classList.contains(e)},H=function(t,e){return[].slice.call(t.getElementsByClassName(e))},B=function(t,i){var n=i||e;return"object"==typeof t?t:n.querySelector(t)},M=function(t,i){var n=i.charAt(0),o=i.substr(1);if("."===n){for(;t&&t!==e;t=t[u])if(null!==B(i,t[u])&&I(t,o))return t}else if("#"===n)for(;t&&t!==e;t=t[u])if(t.id===o)return t;return!1},S=function(t,e,i){t.addEventListener(e,i,!1)},W=function(t,e,i){t.removeEventListener(e,i,!1)},R=function(t,e,i){S(t,e,function n(o){i(o),W(t,e,n)})},P=function(e){var i=C?t.getComputedStyle(e)[A]:0;return i=parseFloat(i),i="number"!=typeof i||isNaN(i)?0:1e3*i},z=function(t,e){var i=0;P(t)?R(t,x,function(t){!i&&e(t),i=1}):setTimeout(function(){!i&&e(),i=1},17)},O=function(t,e,i){var n=new CustomEvent(t+".bs."+e);n.relatedTarget=i,this.dispatchEvent(n)},X=function(){return{y:t.pageYOffset||i.scrollTop,x:t.pageXOffset||i.scrollLeft}},j=function(t,o,a,l){var r,s,c,d,u,h,f={w:o.offsetWidth,h:o.offsetHeight},p=i.clientWidth||e[n].clientWidth,m=i.clientHeight||e[n].clientHeight,v=t.getBoundingClientRect(),T=l===e[n]?X():{x:l.offsetLeft+l.scrollLeft,y:l.offsetTop+l.scrollTop},k={w:v.right-v[w],h:v.bottom-v[b]},C=I(o,"popover"),x=B(".arrow",o),A=v[b]+k.h/2-f.h/2<0,E=v[w]+k.w/2-f.w/2<0,L=v[w]+f.w/2+k.w/2>=p,N=v[b]+f.h/2+k.h/2>=m,D=v[b]-f.h<0,H=v[w]-f.w<0,M=v[b]+f.h+k.h>=m,S=v[w]+f.w+k.w>=p;a=(a===w||"right"===a)&&H&&S?b:a,a=a===b&&D?"bottom":a,a="bottom"===a&&M?b:a,a=a===w&&H?"right":a,a="right"===a&&S?w:a,-1===o.className.indexOf(a)&&(o.className=o.className.replace(y,a)),u=x.offsetWidth,h=x.offsetHeight,a===w||"right"===a?(s=a===w?v[w]+T.x-f.w-(C?u:0):v[w]+T.x+k.w,A?(r=v[b]+T.y,c=k.h/2-u):N?(r=v[b]+T.y-f.h+k.h,c=f.h-k.h/2-u):(r=v[b]+T.y-f.h/2+k.h/2,c=f.h/2-(C?.9*h:h/2))):a!==b&&"bottom"!==a||(r=a===b?v[b]+T.y-f.h-(C?h:0):v[b]+T.y+k.h,E?(s=0,d=v[w]+k.w/2-u):L?(s=p-1.01*f.w,d=f.w-(p-v[w])+k.w/2-u/2):(s=v[w]+T.x-f.w/2+k.w/2,d=f.w/2-u/2)),o[g][b]=r+"px",o[g][w]=s+"px",c&&(x[g][b]=c+"px"),d&&(x[g][w]=d+"px")};o.version="2.0.26";var U=function(t){t=B(t);var e=this,i=M(t,".alert"),n=function(){I(i,"fade")?z(i,a):a()},o=function(n){i=M(n[r],".alert"),(t=B('[data-dismiss="alert"]',i))&&i&&(t===n[r]||t.contains(n[r]))&&e.close()},a=function(){O.call(i,"closed","alert"),W(t,"click",o),i[u].removeChild(i)};this.close=function(){i&&t&&I(i,"show")&&(O.call(i,"close","alert"),D(i,"show"),i&&n())},"Alert"in t||S(t,"click",o),t.Alert=e};a[m](["Alert",U,'[data-dismiss="alert"]']);var q=function(t){t=B(t);var i=!1,n="checked",o=function(t){32===(t.which||t.keyCode)&&t[r]===e.activeElement&&l(t)},a=function(t){32===(t.which||t.keyCode)&&t.preventDefault()},l=function(e){var o="LABEL"===e[r].tagName?e[r]:"LABEL"===e[r][u].tagName?e[r][u]:null;if(o){var a=e[r],l=H(a[u],"btn"),s=o.getElementsByTagName("INPUT")[0];if(s){if("checkbox"===s.type&&(s[n]?(D(o,v),s[c](n),s.removeAttribute(n),s[n]=!1):(N(o,v),s[c](n),s[d](n,n),s[n]=!0),i||(i=!0,O.call(s,"change","button"),O.call(t,"change","button"))),"radio"===s.type&&!i&&!s[n]){N(o,v),s[d](n,n),s[n]=!0,O.call(s,"change","button"),O.call(t,"change","button"),i=!0;for(var f=0,p=l[h];f1?(t.preventDefault(),!1):void 0):void t.preventDefault()},Z=function(t){if(y&&!m&&(A=x||parseInt(t.touches[0].pageX),y)){if((!n.contains(t[r])||!n.contains(t.relatedTarget))&&Math.abs(k-A)<75)return!1;xk&&p--,y=!1,f.slideTo(p),K(W)}},$=function(){var e=n.getBoundingClientRect(),o=t.innerHeight||i.clientHeight;return e[b]<=o&&e.bottom>=0},_=function(t){for(var e=0,i=U[h];et||o===M-1&&0===t)&&(R=f.direction="right"),t<0?t=M-1:t>=M&&(t=0),p=t,i=R===w?"next":"prev",O.call(n,"slide","carousel",L[t]),m=!0,clearInterval(g),g=null,_(t),C&&I(n,"slide")?(N(L[t],"carousel-item-"+i),L[t].offsetWidth,N(L[t],"carousel-item-"+R),N(L[o],"carousel-item-"+R),z(L[t],function(a){var l=a&&a[r]!==L[t]?1e3*a.elapsedTime+100:20;m&&setTimeout(function(){m=!1,N(L[t],v),D(L[o],v),D(L[t],"carousel-item-"+i),D(L[t],"carousel-item-"+R),D(L[o],"carousel-item-"+R),O.call(n,"slid","carousel",L[t]),e.hidden||!f.interval||I(n,"paused")||f.cycle()},l)})):(N(L[t],v),L[t].offsetWidth,D(L[o],v),setTimeout(function(){m=!1,f.interval&&!I(n,"paused")&&f.cycle(),O.call(n,"slid","carousel",L[t])},100)))}},this.getActiveIndex=function(){return L.indexOf(H(n,"carousel-item active")[0])||0},"Carousel"in n||(f.pause&&f.interval&&(S(n,T[0],q),S(n,T[1],F),S(n,E.start,q),S(n,E.end,F)),L[h]>1&&S(n,E.start,Q),X&&S(X,"click",G),P&&S(P,"click",G),j&&S(j,"click",Y),!0===f.keyboard&&S(t,"keydown",J)),f.getActiveIndex()<0&&(L[h]&&N(L[0],v),U[h]&&_(0)),f.interval&&f.cycle(),n.Carousel=f}};a[m](["Carousel",F,'[data-ride="carousel"]']);var Y=function(t,e){t=B(t),e=e||{};var i,n,o=null,a=null,l=this,r=t[c]("data-parent"),s=function(t,e){O.call(t,"show","collapse"),t.isAnimating=!0,N(t,"collapsing"),D(t,"collapse"),t[g].height=t.scrollHeight+"px",z(t,function(){t.isAnimating=!1,t[d]("aria-expanded","true"),e[d]("aria-expanded","true"),D(t,"collapsing"),N(t,"collapse"),N(t,"show"),t[g].height="",O.call(t,"shown","collapse")})},u=function(t,e){O.call(t,"hide","collapse"),t.isAnimating=!0,t[g].height=t.scrollHeight+"px",D(t,"collapse"),D(t,"show"),N(t,"collapsing"),t.offsetWidth,t[g].height="0px",z(t,function(){t.isAnimating=!1,t[d]("aria-expanded","false"),e[d]("aria-expanded","false"),D(t,"collapsing"),N(t,"collapse"),t[g].height="",O.call(t,"hidden","collapse")})};this.toggle=function(t){t.preventDefault(),I(a,"show")?l.hide():l.show()},this.hide=function(){a.isAnimating||(u(a,t),N(t,"collapsed"))},this.show=function(){o&&(i=B(".collapse.show",o),n=i&&(B('[data-target="#'+i.id+'"]',o)||B('[href="#'+i.id+'"]',o))),(!a.isAnimating||i&&!i.isAnimating)&&(n&&i!==a&&(u(i,n),N(n,"collapsed")),s(a,t),D(t,"collapsed"))},"Collapse"in t||S(t,"click",l.toggle),a=function(){var e=t.href&&t[c]("href"),i=t[c]("data-target"),n=e||i&&"#"===i.charAt(0)&&i;return n&&B(n)}(),a.isAnimating=!1,o=B(e.parent)||r&&M(t,r),t.Collapse=l};a[m](["Collapse",Y,'[data-toggle="collapse"]']);var G=function(t,i){t=B(t),this.persist=!0===i||"true"===t[c]("data-persist")||!1;var n=this,o=t[u],a=null,l=B(".dropdown-menu",o),s=function(){for(var t=l.children,e=[],i=0;i1?c-1:0:40===o&&c×',w=B(o.container),y=B(m),k=M(i,".modal"),C=M(i,".fixed-top"),x=M(i,".fixed-bottom");this.template=o.template?o.template:null,this.trigger=o.trigger?o.trigger:a||"hover",this[s]=o[s]&&"fade"!==o[s]?o[s]:u||"fade",this.placement=o.placement?o.placement:h||b,this[l]=parseInt(o[l]||p)||200,this.dismissible=!(!o.dismissible&&"true"!==f),this.container=w||(y||(C||(x||(k||e[n]))));var A=this,E=i[c]("data-title")||null,L=i[c]("data-content")||null;if(L||this.template){var H=null,R=0,P=this.placement,X=function(t){null!==H&&t[r]===B(".close",H)&&A.hide()},U=function(){A.container.removeChild(H),R=null,H=null},q=function(){E=o.title||i[c]("data-title")||null,L=o.content||i[c]("data-content")||null,H=e.createElement("div");var t=e.createElement("div");if(t[d]("class","arrow"),H.appendChild(t),null!==L&&null===A.template){if(H[d]("role","tooltip"),null!==E){var n=e.createElement("h3");n[d]("class","popover-header"),n.innerHTML=A.dismissible?E+v:E,H.appendChild(n)}var a=e.createElement("div");a[d]("class","popover-body"),a.innerHTML=A.dismissible&&null===E?L+v:L,H.appendChild(a)}else{var l=e.createElement("div");l.innerHTML=A.template,H.innerHTML=l.firstChild.innerHTML}A.container.appendChild(H),H[g].display="block",H[d]("class","popover bs-popover-"+P+" "+A[s])},F=function(){!I(H,"show")&&N(H,"show")},Y=function(){j(i,H,P,A.container)},G=function(n){"click"!=A.trigger&&"focus"!=A.trigger||!A.dismissible&&n(i,"blur",A.hide),A.dismissible&&n(e,"click",X),n(t,"resize",A.hide)},J=function(){G(S),O.call(i,"shown","popover")},K=function(){G(W),U(),O.call(i,"hidden","popover")};this.toggle=function(){null===H?A.show():A.hide()},this.show=function(){clearTimeout(R),R=setTimeout(function(){null===H&&(P=A.placement,q(),Y(),F(),O.call(i,"show","popover"),A[s]?z(H,J):J())},20)},this.hide=function(){clearTimeout(R),R=setTimeout(function(){H&&null!==H&&I(H,"show")&&(O.call(i,"hide","popover"),D(H,"show"),A[s]?z(H,K):K())},A[l])},"Popover"in i||("hover"===A.trigger?(S(i,T[0],A.show),A.dismissible||S(i,T[1],A.hide)):"click"!=A.trigger&&"focus"!=A.trigger||S(i,A.trigger,A.toggle)),i.Popover=A}};a[m](["Popover",K,'[data-toggle="popover"]']);var Q=function(e,i){e=B(e);var n=B(e[c]("data-target")),o=e[c]("data-offset");if(i=i||{},i[r]||n){for(var a,l=this,s=i[r]&&B(i[r])||n,d=s&&s.getElementsByTagName("A"),f=parseInt(i.offset||o)||10,p=[],g=[],w=e.offsetHeight=c&&d>a;if(!s&&h)I(i,v)||(N(i,v),l&&!I(l,v)&&N(l,v),O.call(e,"activate","scrollspy",p[t]));else if(h){if(!h&&!s||s&&h)return}else I(i,v)&&(D(i,v),l&&I(l,v)&&!H(i[u],v).length&&D(l,v))},E=function(){a=T?X().y:e.scrollTop;for(var t=0,i=p[h];t1&&(t=e[e[h]-1]):t=e[0],t},E=function(){return B(A()[c]("href"))},L=function(t){t.preventDefault(),n=t.currentTarget,!m.isAnimating&&!I(n,v)&&p.show()};this.show=function(){n=n||t,l=B(n[c]("href")),o=A(),a=E(),m.isAnimating=!0,D(o,v),o[d]("aria-selected","false"),N(n,v),n[d]("aria-selected","true"),T&&(I(t[u],"dropdown-menu")?I(T,v)||N(T,v):I(T,v)&&D(T,v)),O.call(o,"hide","tab",n),I(a,"fade")?(D(a,"show"),z(a,x)):x()},"Tab"in t||S(t,"click",L),p.height&&(b=E()[u]),t.Tab=p}};a[m](["Tab",V,'[data-toggle="tab"]']);var Z=function(t,e){t=B(t),e=e||{};var i=t[c]("data-animation"),n=t[c]("data-autohide"),o=t[c]("data-delay");this.animation=!1===e.animation||"false"===i?0:1,this.autohide=!1===e.autohide||"false"===n?0:1,this[l]=parseInt(e[l]||o)||500;var a=this,r=0,s=M(t,".toast"),d=function(){D(s,"showing"),N(s,"show"),O.call(s,"shown","toast"),a.autohide&&a.hide()},u=function(){N(s,"hide"),O.call(s,"hidden","toast")},h=function(){D(s,"show"),a.animation?z(s,u):u()},f=function(){clearTimeout(r),r=null,N(s,"hide"),W(t,"click",a.hide),t.Toast=null,t=null,s=null};this.show=function(){s&&(O.call(s,"show","toast"),a.animation&&N(s,"fade"),D(s,"hide"),N(s,"showing"),a.animation?z(s,d):d())},this.hide=function(t){s&&I(s,"show")&&(O.call(s,"hide","toast"),t?h():r=setTimeout(h,a[l]))},this.dispose=function(){s&&I(s,"show")&&(D(s,"show"),a.animation?z(s,f):f())},"Toast"in t||S(t,"click",a.hide),t.Toast=a};a[m](["Toast",Z,'[data-dismiss="toast"]']);var $=function(i,o){i=B(i),o=o||{};var a=i[c]("data-animation"),r=i[c]("data-placement"),u=i[c]("data-delay"),h=i[c]("data-container"),f=B(o.container),p=B(h),g=M(i,".modal"),m=M(i,".fixed-top"),v=M(i,".fixed-bottom");this[s]=o[s]&&"fade"!==o[s]?o[s]:a||"fade",this.placement=o.placement?o.placement:r||b,this[l]=parseInt(o[l]||u)||200,this.container=f||(p||(m||(v||(g||e[n]))));var w=this,y=0,k=this.placement,C=null,x=i[c]("title")||i[c]("data-title")||i[c]("data-original-title");if(x&&""!=x){var A=function(){w.container.removeChild(C),C=null,y=null},E=function(){if(!(x=i[c]("title")||i[c]("data-title")||i[c]("data-original-title"))||""==x)return!1;C=e.createElement("div"),C[d]("role","tooltip");var t=e.createElement("div");t[d]("class","arrow"),C.appendChild(t);var n=e.createElement("div");n[d]("class","tooltip-inner"),C.appendChild(n),n.innerHTML=x,w.container.appendChild(C),C[d]("class","tooltip bs-tooltip-"+k+" "+w[s])},L=function(){j(i,C,k,w.container)},H=function(){!I(C,"show")&&N(C,"show")},R=function(){S(t,"resize",w.hide),O.call(i,"shown","tooltip")},P=function(){W(t,"resize",w.hide),A(),O.call(i,"hidden","tooltip")};this.show=function(){clearTimeout(y),y=setTimeout(function(){if(null===C){if(k=w.placement,0==E())return;L(),H(),O.call(i,"show","tooltip"),w[s]?z(C,R):R()}},20)},this.hide=function(){clearTimeout(y),y=setTimeout(function(){C&&I(C,"show")&&(O.call(i,"hide","tooltip"),D(C,"show"),w[s]?z(C,P):P())},w[l])},this.toggle=function(){C?w.hide():w.show()},"Tooltip"in i||(i[d]("data-original-title",x),i.removeAttribute("title"),S(i,T[0],w.show),S(i,T[1],w.hide)),i.Tooltip=w}};a[m](["Tooltip",$,'[data-toggle="tooltip"]']);var _=function(t,e){for(var i=0,n=e[h];i=p,N=v[b]+f.h/2+k.h/2>=m,D=v[b]-f.h<0,H=v[w]-f.w<0,M=v[b]+f.h+k.h>=m,S=v[w]+f.w+k.w>=p;a=(a===w||"right"===a)&&H&&S?b:a,a=a===b&&D?"bottom":a,a="bottom"===a&&M?b:a,a=a===w&&H?"right":a,a="right"===a&&S?w:a,-1===o.className.indexOf(a)&&(o.className=o.className.replace(y,a)),u=x.offsetWidth,h=x.offsetHeight,a===w||"right"===a?(s=a===w?v[w]+T.x-f.w-(C?u:0):v[w]+T.x+k.w,A?(r=v[b]+T.y,c=k.h/2-u):N?(r=v[b]+T.y-f.h+k.h,c=f.h-k.h/2-u):(r=v[b]+T.y-f.h/2+k.h/2,c=f.h/2-(C?.9*h:h/2))):a!==b&&"bottom"!==a||(r=a===b?v[b]+T.y-f.h-(C?h:0):v[b]+T.y+k.h,E?(s=0,d=v[w]+k.w/2-u):L?(s=p-1.01*f.w,d=f.w-(p-v[w])+k.w/2-u/2):(s=v[w]+T.x-f.w/2+k.w/2,d=f.w/2-u/2)),o[g][b]=r+"px",o[g][w]=s+"px",c&&(x[g][b]=c+"px"),d&&(x[g][w]=d+"px")};o.version="2.0.27";var U=function(t){t=B(t);var e=this,i=M(t,".alert"),n=function(){I(i,"fade")?z(i,a):a()},o=function(n){i=M(n[r],".alert"),(t=B('[data-dismiss="alert"]',i))&&i&&(t===n[r]||t.contains(n[r]))&&e.close()},a=function(){O.call(i,"closed","alert"),W(t,"click",o),i[u].removeChild(i)};this.close=function(){i&&t&&I(i,"show")&&(O.call(i,"close","alert"),D(i,"show"),i&&n())},"Alert"in t||S(t,"click",o),t.Alert=e};a[m](["Alert",U,'[data-dismiss="alert"]']);var q=function(t){t=B(t);var i=!1,n="checked",o=function(t){32===(t.which||t.keyCode)&&t[r]===e.activeElement&&l(t)},a=function(t){32===(t.which||t.keyCode)&&t.preventDefault()},l=function(e){var o="LABEL"===e[r].tagName?e[r]:"LABEL"===e[r][u].tagName?e[r][u]:null;if(o){var a=e[r],l=H(a[u],"btn"),s=o.getElementsByTagName("INPUT")[0];if(s){if("checkbox"===s.type&&(s[n]?(D(o,v),s[c](n),s.removeAttribute(n),s[n]=!1):(N(o,v),s[c](n),s[d](n,n),s[n]=!0),i||(i=!0,O.call(s,"change","button"),O.call(t,"change","button"))),"radio"===s.type&&!i&&!s[n]){N(o,v),s[d](n,n),s[n]=!0,O.call(s,"change","button"),O.call(t,"change","button"),i=!0;for(var f=0,p=l[h];f1?(t.preventDefault(),!1):void 0):void t.preventDefault()},Z=function(t){if(y&&!m&&(A=x||parseInt(t.touches[0].pageX),y)){if((!n.contains(t[r])||!n.contains(t.relatedTarget))&&Math.abs(k-A)<75)return!1;xk&&p--,y=!1,f.slideTo(p),K(W)}},$=function(){var e=n.getBoundingClientRect(),o=t.innerHeight||i.clientHeight;return e[b]<=o&&e.bottom>=0},_=function(t){for(var e=0,i=U[h];et||o===M-1&&0===t)&&(R=f.direction="right"),t<0?t=M-1:t>=M&&(t=0),p=t,i=R===w?"next":"prev",O.call(n,"slide","carousel",L[t]),m=!0,clearInterval(g),g=null,_(t),C&&I(n,"slide")?(N(L[t],"carousel-item-"+i),L[t].offsetWidth,N(L[t],"carousel-item-"+R),N(L[o],"carousel-item-"+R),z(L[t],function(a){var l=a&&a[r]!==L[t]?1e3*a.elapsedTime+100:20;m&&setTimeout(function(){m=!1,N(L[t],v),D(L[o],v),D(L[t],"carousel-item-"+i),D(L[t],"carousel-item-"+R),D(L[o],"carousel-item-"+R),O.call(n,"slid","carousel",L[t]),e.hidden||!f.interval||I(n,"paused")||f.cycle()},l)})):(N(L[t],v),L[t].offsetWidth,D(L[o],v),setTimeout(function(){m=!1,f.interval&&!I(n,"paused")&&f.cycle(),O.call(n,"slid","carousel",L[t])},100)))}},this.getActiveIndex=function(){return L.indexOf(H(n,"carousel-item active")[0])||0},"Carousel"in n||(f.pause&&f.interval&&(S(n,T[0],q),S(n,T[1],F),S(n,E.start,q),S(n,E.end,F)),L[h]>1&&S(n,E.start,Q),X&&S(X,"click",G),P&&S(P,"click",G),j&&S(j,"click",Y),!0===f.keyboard&&S(t,"keydown",J)),f.getActiveIndex()<0&&(L[h]&&N(L[0],v),U[h]&&_(0)),f.interval&&f.cycle(),n.Carousel=f}};a[m](["Carousel",F,'[data-ride="carousel"]']);var Y=function(t,e){t=B(t),e=e||{};var i,n,o=null,a=null,l=this,r=t[c]("data-parent"),s=function(t,e){O.call(t,"show","collapse"),t.isAnimating=!0,N(t,"collapsing"),D(t,"collapse"),t[g].height=t.scrollHeight+"px",z(t,function(){t.isAnimating=!1,t[d]("aria-expanded","true"),e[d]("aria-expanded","true"),D(t,"collapsing"),N(t,"collapse"),N(t,"show"),t[g].height="",O.call(t,"shown","collapse")})},u=function(t,e){O.call(t,"hide","collapse"),t.isAnimating=!0,t[g].height=t.scrollHeight+"px",D(t,"collapse"),D(t,"show"),N(t,"collapsing"),t.offsetWidth,t[g].height="0px",z(t,function(){t.isAnimating=!1,t[d]("aria-expanded","false"),e[d]("aria-expanded","false"),D(t,"collapsing"),N(t,"collapse"),t[g].height="",O.call(t,"hidden","collapse")})};this.toggle=function(t){t.preventDefault(),I(a,"show")?l.hide():l.show()},this.hide=function(){a.isAnimating||(u(a,t),N(t,"collapsed"))},this.show=function(){o&&(i=B(".collapse.show",o),n=i&&(B('[data-target="#'+i.id+'"]',o)||B('[href="#'+i.id+'"]',o))),(!a.isAnimating||i&&!i.isAnimating)&&(n&&i!==a&&(u(i,n),N(n,"collapsed")),s(a,t),D(t,"collapsed"))},"Collapse"in t||S(t,"click",l.toggle),a=function(){var e=t.href&&t[c]("href"),i=t[c]("data-target"),n=e||i&&"#"===i.charAt(0)&&i;return n&&B(n)}(),a.isAnimating=!1,o=B(e.parent)||r&&M(t,r),t.Collapse=l};a[m](["Collapse",Y,'[data-toggle="collapse"]']);var G=function(t,i){t=B(t),this.persist=!0===i||"true"===t[c]("data-persist")||!1;var n=this,o=t[u],a=null,l=B(".dropdown-menu",o),s=function(){for(var t=l.children,e=[],i=0;i1?c-1:0:40===o&&c×',w=B(o.container),y=B(m),k=M(i,".modal"),C=M(i,".fixed-top"),x=M(i,".fixed-bottom");this.template=o.template?o.template:null,this.trigger=o.trigger?o.trigger:a||"hover",this[s]=o[s]&&"fade"!==o[s]?o[s]:u||"fade",this.placement=o.placement?o.placement:h||b,this[l]=parseInt(o[l]||p)||200,this.dismissible=!(!o.dismissible&&"true"!==f),this.container=w||(y||(C||(x||(k||e[n]))));var A=this,E=i[c]("data-title")||null,L=i[c]("data-content")||null;if(L||this.template){var H=null,R=0,P=this.placement,X=function(t){null!==H&&t[r]===B(".close",H)&&A.hide()},U=function(){A.container.removeChild(H),R=null,H=null},q=function(){E=o.title||i[c]("data-title")||null,L=o.content||i[c]("data-content")||null,H=e.createElement("div");var t=e.createElement("div");if(t[d]("class","arrow"),H.appendChild(t),null!==L&&null===A.template){if(H[d]("role","tooltip"),null!==E){var n=e.createElement("h3");n[d]("class","popover-header"),n.innerHTML=A.dismissible?E+v:E,H.appendChild(n)}var a=e.createElement("div");a[d]("class","popover-body"),a.innerHTML=A.dismissible&&null===E?L+v:L,H.appendChild(a)}else{var l=e.createElement("div");l.innerHTML=A.template,H.innerHTML=l.firstChild.innerHTML}A.container.appendChild(H),H[g].display="block",H[d]("class","popover bs-popover-"+P+" "+A[s])},F=function(){!I(H,"show")&&N(H,"show")},Y=function(){j(i,H,P,A.container)},G=function(n){"click"!=A.trigger&&"focus"!=A.trigger||!A.dismissible&&n(i,"blur",A.hide),A.dismissible&&n(e,"click",X),n(t,"resize",A.hide)},J=function(){G(S),O.call(i,"shown","popover")},K=function(){G(W),U(),O.call(i,"hidden","popover")};this.toggle=function(){null===H?A.show():A.hide()},this.show=function(){clearTimeout(R),R=setTimeout(function(){null===H&&(P=A.placement,q(),Y(),F(),O.call(i,"show","popover"),A[s]?z(H,J):J())},20)},this.hide=function(){clearTimeout(R),R=setTimeout(function(){H&&null!==H&&I(H,"show")&&(O.call(i,"hide","popover"),D(H,"show"),A[s]?z(H,K):K())},A[l])},"Popover"in i||("hover"===A.trigger?(S(i,T[0],A.show),A.dismissible||S(i,T[1],A.hide)):"click"!=A.trigger&&"focus"!=A.trigger||S(i,A.trigger,A.toggle)),i.Popover=A}};a[m](["Popover",K,'[data-toggle="popover"]']);var Q=function(e,i){e=B(e);var n=B(e[c]("data-target")),o=e[c]("data-offset");if(i=i||{},i[r]||n){for(var a,l=this,s=i[r]&&B(i[r])||n,d=s&&s.getElementsByTagName("A"),f=parseInt(i.offset||o)||10,p=[],g=[],w=e.offsetHeight=c&&d>a;if(!s&&h)I(i,v)||(N(i,v),l&&!I(l,v)&&N(l,v),O.call(e,"activate","scrollspy",p[t]));else if(h){if(!h&&!s||s&&h)return}else I(i,v)&&(D(i,v),l&&I(l,v)&&!H(i[u],v).length&&D(l,v))},E=function(){a=T?X().y:e.scrollTop;for(var t=0,i=p[h];t1&&(t=e[e[h]-1]):t=e[0],t},E=function(){return B(A()[c]("href"))},L=function(t){t.preventDefault(),n=t.currentTarget,!m.isAnimating&&!I(n,v)&&p.show()};this.show=function(){n=n||t,l=B(n[c]("href")),o=A(),a=E(),m.isAnimating=!0,D(o,v),o[d]("aria-selected","false"),N(n,v),n[d]("aria-selected","true"),T&&(I(t[u],"dropdown-menu")?I(T,v)||N(T,v):I(T,v)&&D(T,v)),O.call(o,"hide","tab",n),I(a,"fade")?(D(a,"show"),z(a,x)):x()},"Tab"in t||S(t,"click",L),p.height&&(b=E()[u]),t.Tab=p}};a[m](["Tab",V,'[data-toggle="tab"]']);var Z=function(t,e){t=B(t),e=e||{};var i=t[c]("data-animation"),n=t[c]("data-autohide"),o=t[c]("data-delay");this.animation=!1===e.animation||"false"===i?0:1,this.autohide=!1===e.autohide||"false"===n?0:1,this[l]=parseInt(e[l]||o)||500;var a=this,r=0,s=M(t,".toast"),d=function(){D(s,"showing"),N(s,"show"),O.call(s,"shown","toast"),a.autohide&&a.hide()},u=function(){N(s,"hide"),O.call(s,"hidden","toast")},h=function(){D(s,"show"),a.animation?z(s,u):u()},f=function(){clearTimeout(r),r=null,N(s,"hide"),W(t,"click",a.hide),t.Toast=null,t=null,s=null};this.show=function(){s&&(O.call(s,"show","toast"),a.animation&&N(s,"fade"),D(s,"hide"),N(s,"showing"),a.animation?z(s,d):d())},this.hide=function(t){s&&I(s,"show")&&(O.call(s,"hide","toast"),t?h():r=setTimeout(h,a[l]))},this.dispose=function(){s&&I(s,"show")&&(D(s,"show"),a.animation?z(s,f):f())},"Toast"in t||S(t,"click",a.hide),t.Toast=a};a[m](["Toast",Z,'[data-dismiss="toast"]']);var $=function(i,o){i=B(i),o=o||{};var a=i[c]("data-animation"),r=i[c]("data-placement"),u=i[c]("data-delay"),h=i[c]("data-container"),f=B(o.container),p=B(h),g=M(i,".modal"),m=M(i,".fixed-top"),v=M(i,".fixed-bottom");this[s]=o[s]&&"fade"!==o[s]?o[s]:a||"fade",this.placement=o.placement?o.placement:r||b,this[l]=parseInt(o[l]||u)||200,this.container=f||(p||(m||(v||(g||e[n]))));var w=this,y=0,k=this.placement,C=null,x=i[c]("title")||i[c]("data-title")||i[c]("data-original-title");if(x&&""!=x){var A=function(){w.container.removeChild(C),C=null,y=null},E=function(){if(!(x=i[c]("title")||i[c]("data-title")||i[c]("data-original-title"))||""==x)return!1;C=e.createElement("div"),C[d]("role","tooltip");var t=e.createElement("div");t[d]("class","arrow"),C.appendChild(t);var n=e.createElement("div");n[d]("class","tooltip-inner"),C.appendChild(n),n.innerHTML=x,w.container.appendChild(C),C[d]("class","tooltip bs-tooltip-"+k+" "+w[s])},L=function(){j(i,C,k,w.container)},H=function(){!I(C,"show")&&N(C,"show")},R=function(){S(t,"resize",w.hide),O.call(i,"shown","tooltip")},P=function(){W(t,"resize",w.hide),A(),O.call(i,"hidden","tooltip")};this.show=function(){clearTimeout(y),y=setTimeout(function(){if(null===C){if(k=w.placement,0==E())return;L(),H(),O.call(i,"show","tooltip"),w[s]?z(C,R):R()}},20)},this.hide=function(){clearTimeout(y),y=setTimeout(function(){C&&I(C,"show")&&(O.call(i,"hide","tooltip"),D(C,"show"),w[s]?z(C,P):P())},w[l])},this.toggle=function(){C?w.hide():w.show()},"Tooltip"in i||(i[d]("data-original-title",x),i.removeAttribute("title"),S(i,T[0],w.show),S(i,T[1],w.hide)),i.Tooltip=w}};a[m](["Tooltip",$,'[data-toggle="tooltip"]']);var _=function(t,e){for(var i=0,n=e[h];i=u,A=g[b]+f.h/2+y.h/2>=h,I=g[b]-f.h<0,L=g[v]-f.w<0,B=g[b]+f.h+y.h>=h,H=g[v]+f.w+y.w>=u;a=(a===v||"right"===a)&&L&&H?b:a,a=a===b&&I?"bottom":a,a="bottom"===a&&B?b:a,a=a===v&&L?"right":a,a="right"===a&&H?v:a,a===v||"right"===a?(c=a===v?g[v]+m.x-f.w:g[v]+m.x+y.w,x?(r=g[b]+m.y,s=y.h/2):A?(r=g[b]+m.y-f.h+y.h,s=f.h-y.h/2):r=g[b]+m.y-f.h/2+y.h/2):a!==b&&"bottom"!==a||(r=a===b?g[b]+m.y-f.h:g[b]+m.y+y.h,k?(c=0,d=g[v]+y.w/2):C?(c=u-1.01*f.w,d=f.w-(u-g[v])+y.w/2):c=g[v]+m.x-f.w/2+y.w/2),o[p][b]=r+"px",o[p][v]=c+"px",s&&(w[p][b]=s+"px"),d&&(w[p][v]=d+"px"),-1===o.className.indexOf(a)&&(o.className=o.className.replace(T,a))};o.version="2.0.26";var F=function(o,a){o=S(o),a=a||{};var r=o[c]("data-target"),s=o[c]("data-offset-top"),d=o[c]("data-offset-bottom"),f="affix",u="function";if(this[l]=a[l]?S(a[l]):S(r)||null,this.offsetTop=a.offsetTop?a.offsetTop:parseInt(s)||0,this.offsetBottom=a.offsetBottom?a.offsetBottom:parseInt(d)||0,this[l]||this.offsetTop||this.offsetBottom){var h,p,g,m,v,w,T=this,x=!1,k=!1,C=function(){return Math.max(e[n].scrollHeight,e[n].offsetHeight,i.clientHeight,i.scrollHeight,i.offsetHeight)},A=function(){return null!==T[l]?T[l].getBoundingClientRect()[b]+m:T.offsetTop?parseInt(typeof T.offsetTop===u?T.offsetTop():T.offsetTop||0):void 0},I=function(){if(T.offsetBottom)return g-o.offsetHeight-parseInt(typeof T.offsetBottom===u?T.offsetBottom():T.offsetBottom||0)},L=function(){g=C(),m=parseInt(q().y,0),h=A(),p=I(),v=parseInt(h)-m<0&&m>parseInt(h),w=parseInt(p)-m<0&&m>parseInt(p)},B=function(){x||N(o,f)||(j.call(o,f,f),j.call(o,"affix-top",f),H(o,f),x=!0,j.call(o,"affixed",f),j.call(o,"affixed-top",f))},M=function(){x&&N(o,f)&&(E(o,f),x=!1)},D=function(){k||N(o,"affix-bottom")||(j.call(o,f,f),j.call(o,"affix-bottom",f),H(o,"affix-bottom"),k=!0,j.call(o,"affixed",f),j.call(o,"affixed-bottom",f))},R=function(){k&&N(o,"affix-bottom")&&(E(o,"affix-bottom"),k=!1)},P=function(){w?(v&&M(),D()):(R(),v?B():M())};this.update=function(){L(),P()},"Affix"in o||(W(t,"scroll",T.update),!y&&W(t,"resize",T.update)),o.Affix=T,T.update()}};a[g](["Affix",F,'[data-spy="affix"]']);var Y=function(t){t=S(t);var e=this,i=R(t,".alert"),n=function(){N(i,"fade")?X(i,a):a()},o=function(n){i=R(n[l],".alert"),(t=S('[data-dismiss="alert"]',i))&&i&&(t===n[l]||t.contains(n[l]))&&e.close()},a=function(){j.call(i,"closed","alert"),P(t,"click",o),i[d].removeChild(i)};this.close=function(){i&&t&&N(i,"in")&&(j.call(i,"close","alert"),E(i,"in"),i&&n())},"Alert"in t||W(t,"click",o),t.Alert=e};a[g](["Alert",Y,'[data-dismiss="alert"]']);var G=function(t,i){t=S(t),i=i||null;var n=!1,o="checked",a=function(t){32===(t.which||t.keyCode)&&t[l]===e.activeElement&&u(t)},r=function(t){32===(t.which||t.keyCode)&&t.preventDefault()},u=function(e){var i="LABEL"===e[l].tagName?e[l]:"LABEL"===e[l][d].tagName?e[l][d]:null;if(i){var a=e[l],r=D(a[d],"btn"),u=i.getElementsByTagName("INPUT")[0];if(u){if("checkbox"===u.type&&(u[o]?(E(i,m),u[c](o),u.removeAttribute(o),u[o]=!1):(H(i,m),u[c](o),u[s](o,o),u[o]=!0),n||(n=!0,j.call(u,"change","button"),j.call(t,"change","button"))),"radio"===u.type&&!n&&!u[o]){H(i,m),u[s](o,o),u[o]=!0,j.call(u,"change","button"),j.call(t,"change","button"),n=!0;for(var h=0,p=r[f];h1?(t.preventDefault(),!1):void 0):void t.preventDefault()},Z=function(t){if(y&&!g&&(k=x||parseInt(t.touches[0].pageX),y)){if((!e.contains(t[l])||!e.contains(t.relatedTarget))&&Math.abs(T-k)<75)return!1;xT&&h--,y=!1,u.slideTo(h),K(P)}},$=function(){var n=e.getBoundingClientRect(),o=t.innerHeight||i.clientHeight;return n[b]<=o&&n.bottom>=0},_=function(t){for(var e=0,i=q[f];et||n===I-1&&0===t)&&(B=u.direction="right"),t<0?t=I-1:t>=I&&(t=0),h=t,i=B===v?"next":"prev",j.call(e,"slide","carousel",A[t]),g=!0,clearInterval(p),p=null,_(t),C&&N(e,"slide")?(H(A[t],i),A[t].offsetWidth,H(A[t],B),H(A[n],B),X(A[t],function(o){var a=o&&o[l]!==A[t]?1e3*o.elapsedTime+100:20;g&&setTimeout(function(){g=!1,H(A[t],m),E(A[n],m),E(A[t],i),E(A[t],B),E(A[n],B),j.call(e,"slid","carousel",A[t]),u.interval&&!N(e,"paused")&&u.cycle()},a)})):(H(A[t],m),A[t].offsetWidth,E(A[n],m),setTimeout(function(){g=!1,u.interval&&!N(e,"paused")&&u.cycle(),j.call(e,"slid","carousel",A[t])},100)))}},this.getActiveIndex=function(){return A.indexOf(D(e,"item active")[0])||0},"Carousel"in e||(u.pause&&u.interval&&(W(e,w[0],U),W(e,w[1],F),W(e,L.start,U),W(e,L.end,F)),A[f]>1&&W(e,L.start,Q),z&&W(z,"click",G),R&&W(R,"click",G),O&&W(O,"click",Y),u.keyboard&&W(t,"keydown",J)),u.getActiveIndex()<0&&(A[f]&&H(A[0],m),q[f]&&_(0)),u.interval&&u.cycle(),e.Carousel=u}};a[g](["Carousel",J,'[data-ride="carousel"]']);var K=function(t,e){t=S(t),e=e||{};var i,n,o=null,a=null,l=this,r=t[c]("data-parent"),d=function(t,e){j.call(t,"show","collapse"),t.isAnimating=!0,H(t,"collapsing"),E(t,"collapse"),t[p].height=t.scrollHeight+"px",X(t,function(){t.isAnimating=!1,t[s]("aria-expanded","true"),e[s]("aria-expanded","true"),E(t,"collapsing"),H(t,"collapse"),H(t,"in"),t[p].height="",j.call(t,"shown","collapse")})},f=function(t,e){j.call(t,"hide","collapse"),t.isAnimating=!0,t[p].height=t.scrollHeight+"px",E(t,"collapse"),E(t,"in"),H(t,"collapsing"),t.offsetWidth,t[p].height="0px",X(t,function(){t.isAnimating=!1,t[s]("aria-expanded","false"),e[s]("aria-expanded","false"),E(t,"collapsing"),H(t,"collapse"),t[p].height="",j.call(t,"hidden","collapse")})};this.toggle=function(t){t.preventDefault(),N(a,"in")?l.hide():l.show()},this.hide=function(){a.isAnimating||(f(a,t),H(t,"collapsed"))},this.show=function(){o&&(i=S(".collapse.in",o),n=i&&(S('[data-target="#'+i.id+'"]',o)||S('[href="#'+i.id+'"]',o))),(!a.isAnimating||i&&!i.isAnimating)&&(n&&i!==a&&(f(i,n),H(n,"collapsed")),d(a,t),E(t,"collapsed"))},"Collapse"in t||W(t,"click",l.toggle),a=function(){var e=t.href&&t[c]("href"),i=t[c]("data-target"),n=e||i&&"#"===i.charAt(0)&&i;return n&&S(n)}(),a.isAnimating=!1,o=S(e.parent)||r&&R(t,r),t.Collapse=l};a[g](["Collapse",K,'[data-toggle="collapse"]']);var Q=function(t,i){t=S(t),this.persist=!0===i||"true"===t[c]("data-persist")||!1;var n=this,o=t[d],a="open",r=null,u=S(".dropdown-menu",o),h=function(){for(var t=u.children,e=[],i=0;i1?c-1:0:40===o&&c×',v=S(o.container),T=S(g),x=R(i,".modal"),C=R(i,"."+k),A=R(i,".navbar-fixed-bottom");this.template=o.template?o.template:null,this.trigger=o.trigger?o.trigger:a||"hover",this[r]=o[r]&&"fade"!==o[r]?o[r]:d||"fade",this.placement=o.placement?o.placement:f||b,this.delay=parseInt(o.delay||h)||200,this.dismissible=!(!o.dismissible&&"true"!==u),this.container=v||(T||(C||(A||(x||e[n]))));var I=this,L=o.title||i[c]("data-title")||null,B=o.content||i[c]("data-content")||null;if(B||this.template){var M=null,D=0,z=this.placement,O=function(t){null!==M&&t[l]===S(".close",M)&&I.hide()},q=function(){I.container.removeChild(M),D=null,M=null},F=function(){if(L=i[c]("data-title"),B=i[c]("data-content"),M=e.createElement("div"),null!==B&&null===I.template){if(M[s]("role","tooltip"),null!==L){var t=e.createElement("h3");t[s]("class","popover-title"),t.innerHTML=I.dismissible?L+m:L,M.appendChild(t)}var n=e.createElement("div"),o=e.createElement("div");n[s]("class","arrow"),o[s]("class","popover-content"),M.appendChild(n),M.appendChild(o),o.innerHTML=I.dismissible&&null===L?B+m:B}else{var a=e.createElement("div");a.innerHTML=I.template,M.innerHTML=a.firstChild.innerHTML}I.container.appendChild(M),M[p].display="block",M[s]("class","popover "+z+" "+I[r])},Y=function(){!N(M,"in")&&H(M,"in")},G=function(){U(i,M,z,I.container)},J=function(n){"click"!=I.trigger&&"focus"!=I.trigger||!I.dismissible&&n(i,"blur",I.hide),I.dismissible&&n(e,"click",O),!y&&n(t,"resize",I.hide)},K=function(){J(W),j.call(i,"shown","popover")},Q=function(){J(P),q(),j.call(i,"hidden","popover")};this.toggle=function(){null===M?I.show():I.hide()},this.show=function(){clearTimeout(D),D=setTimeout(function(){null===M&&(z=I.placement,F(),G(),Y(),j.call(i,"show","popover"),I[r]?X(M,K):K())},20)},this.hide=function(){clearTimeout(D),D=setTimeout(function(){M&&null!==M&&N(M,"in")&&(j.call(i,"hide","popover"),E(M,"in"),I[r]?X(M,Q):Q())},I.delay)},"Popover"in i||("hover"===I.trigger?(W(i,w[0],I.show),I.dismissible||W(i,w[1],I.hide)):"click"!=I.trigger&&"focus"!=I.trigger||W(i,I.trigger,I.toggle)),i.Popover=I}};a[g](["Popover",Z,'[data-toggle="popover"]']);var $=function(e,i){e=S(e);var n=S(e[c]("data-target")),o=e[c]("data-offset");if(i=i||{},i[l]||n){for(var a,r=this,s=i[l]&&S(i[l])||n,u=s&&s.getElementsByTagName("A"),h=parseInt(i.offset||o)||10,p=[],v=[],w=e.offsetHeight=c&&s>a;if(!r&&f)"LI"!==i.tagName||N(i,m)||(H(i,m),o&&!N(o,m)&&H(o,m),j.call(e,"activate","scrollspy",p[t]));else if(f){if(!f&&!r||r&&f)return}else"LI"===i.tagName&&N(i,m)&&(E(i,m),o&&N(o,m)&&!D(i[d],m).length&&E(o,m))},L=function(){a=T?q().y:e.scrollTop;for(var t=0,i=p[f];t1&&(t=e[e[f]-1]):t=e[0],t.getElementsByTagName("A")[0]},I=function(){return S(A()[c]("href"))},L=function(t){t.preventDefault(),n=t.currentTarget||this,!b.isAnimating&&!N(n[d],m)&&g.show()};this.show=function(){n=n||t,l=S(n[c]("href")),o=A(),a=I(),b.isAnimating=!0,E(o[d],m),o[s]("aria-expanded","false"),H(n[d],m),n[s]("aria-expanded","true"),w&&(N(t[d][d],"dropdown-menu")?N(w,m)||H(w,m):N(w,m)&&E(w,m)),j.call(o,"hide","tab",n),N(a,"fade")?(E(a,"in"),X(a,k)):k()},"Tab"in t||W(t,"click",L),g.height&&(y=I()[d]),t.Tab=g}};a[g](["Tab",_,'[data-toggle="tab"]']);var tt=function(i,o){i=S(i),o=o||{};var a=i[c]("data-animation"),l=i[c]("data-placement"),d=i[c]("data-delay"),f=i[c]("data-container"),u=S(o.container),h=S(f),p=R(i,".modal"),g=R(i,"."+k),m=R(i,".navbar-fixed-bottom");this[r]=o[r]&&"fade"!==o[r]?o[r]:a||"fade",this.placement=o.placement?o.placement:l||b,this.delay=parseInt(o.delay||d)||200,this.container=u||(h||(g||(m||(p||e[n]))));var v=this,T=0,x=this.placement,C=null,A=i[c]("title")||i[c]("data-title")||i[c]("data-original-title");if(A&&""!=A){var I=function(){v.container.removeChild(C),C=null,T=null},L=function(){if(!(A=i[c]("title")||i[c]("data-title")||i[c]("data-original-title"))||""==A)return!1;C=e.createElement("div"),C[s]("role","tooltip");var t=e.createElement("div"),n=e.createElement("div");t[s]("class","tooltip-arrow"),n[s]("class","tooltip-inner"),C.appendChild(t),C.appendChild(n),n.innerHTML=A,v.container.appendChild(C),C[s]("class","tooltip "+x+" "+v[r])},B=function(){U(i,C,x,v.container)},M=function(){!N(C,"in")&&H(C,"in")},D=function(){j.call(i,"shown","tooltip"),!y&&W(t,"resize",v.hide)},z=function(){!y&&P(t,"resize",v.hide),I(),j.call(i,"hidden","tooltip")};this.show=function(){clearTimeout(T),T=setTimeout(function(){if(null===C){if(x=v.placement,0==L())return;B(),M(),j.call(i,"show","tooltip"),v[r]?X(C,D):D()}},20)},this.hide=function(){clearTimeout(T),T=setTimeout(function(){C&&N(C,"in")&&(j.call(i,"hide","tooltip"),E(C,"in"),v[r]?X(C,z):z())},v.delay)},this.toggle=function(){C?v.hide():v.show()},"Tooltip"in i||(i[s]("data-original-title",A),i.removeAttribute("title"),W(i,w[0],v.show),W(i,w[1],v.hide)),i.Tooltip=v}};a[g](["Tooltip",tt,'[data-toggle="tooltip"]']);var et=function(t,e){for(var i=0,n=e[f];i=u,A=g[b]+f.h/2+y.h/2>=h,I=g[b]-f.h<0,L=g[v]-f.w<0,B=g[b]+f.h+y.h>=h,H=g[v]+f.w+y.w>=u;a=(a===v||"right"===a)&&L&&H?b:a,a=a===b&&I?"bottom":a,a="bottom"===a&&B?b:a,a=a===v&&L?"right":a,a="right"===a&&H?v:a,a===v||"right"===a?(c=a===v?g[v]+m.x-f.w:g[v]+m.x+y.w,x?(r=g[b]+m.y,s=y.h/2):A?(r=g[b]+m.y-f.h+y.h,s=f.h-y.h/2):r=g[b]+m.y-f.h/2+y.h/2):a!==b&&"bottom"!==a||(r=a===b?g[b]+m.y-f.h:g[b]+m.y+y.h,k?(c=0,d=g[v]+y.w/2):C?(c=u-1.01*f.w,d=f.w-(u-g[v])+y.w/2):c=g[v]+m.x-f.w/2+y.w/2),o[p][b]=r+"px",o[p][v]=c+"px",s&&(w[p][b]=s+"px"),d&&(w[p][v]=d+"px"),-1===o.className.indexOf(a)&&(o.className=o.className.replace(T,a))};o.version="2.0.27";var F=function(o,a){o=S(o),a=a||{};var r=o[c]("data-target"),s=o[c]("data-offset-top"),d=o[c]("data-offset-bottom"),f="affix",u="function";if(this[l]=a[l]?S(a[l]):S(r)||null,this.offsetTop=a.offsetTop?a.offsetTop:parseInt(s)||0,this.offsetBottom=a.offsetBottom?a.offsetBottom:parseInt(d)||0,this[l]||this.offsetTop||this.offsetBottom){var h,p,g,m,v,w,T=this,x=!1,k=!1,C=function(){return Math.max(e[n].scrollHeight,e[n].offsetHeight,i.clientHeight,i.scrollHeight,i.offsetHeight)},A=function(){return null!==T[l]?T[l].getBoundingClientRect()[b]+m:T.offsetTop?parseInt(typeof T.offsetTop===u?T.offsetTop():T.offsetTop||0):void 0},I=function(){if(T.offsetBottom)return g-o.offsetHeight-parseInt(typeof T.offsetBottom===u?T.offsetBottom():T.offsetBottom||0)},L=function(){g=C(),m=parseInt(q().y,0),h=A(),p=I(),v=parseInt(h)-m<0&&m>parseInt(h),w=parseInt(p)-m<0&&m>parseInt(p)},B=function(){x||N(o,f)||(j.call(o,f,f),j.call(o,"affix-top",f),H(o,f),x=!0,j.call(o,"affixed",f),j.call(o,"affixed-top",f))},M=function(){x&&N(o,f)&&(E(o,f),x=!1)},D=function(){k||N(o,"affix-bottom")||(j.call(o,f,f),j.call(o,"affix-bottom",f),H(o,"affix-bottom"),k=!0,j.call(o,"affixed",f),j.call(o,"affixed-bottom",f))},R=function(){k&&N(o,"affix-bottom")&&(E(o,"affix-bottom"),k=!1)},P=function(){w?(v&&M(),D()):(R(),v?B():M())};this.update=function(){L(),P()},"Affix"in o||(W(t,"scroll",T.update),!y&&W(t,"resize",T.update)),o.Affix=T,T.update()}};a[g](["Affix",F,'[data-spy="affix"]']);var Y=function(t){t=S(t);var e=this,i=R(t,".alert"),n=function(){N(i,"fade")?X(i,a):a()},o=function(n){i=R(n[l],".alert"),(t=S('[data-dismiss="alert"]',i))&&i&&(t===n[l]||t.contains(n[l]))&&e.close()},a=function(){j.call(i,"closed","alert"),P(t,"click",o),i[d].removeChild(i)};this.close=function(){i&&t&&N(i,"in")&&(j.call(i,"close","alert"),E(i,"in"),i&&n())},"Alert"in t||W(t,"click",o),t.Alert=e};a[g](["Alert",Y,'[data-dismiss="alert"]']);var G=function(t,i){t=S(t),i=i||null;var n=!1,o="checked",a=function(t){32===(t.which||t.keyCode)&&t[l]===e.activeElement&&u(t)},r=function(t){32===(t.which||t.keyCode)&&t.preventDefault()},u=function(e){var i="LABEL"===e[l].tagName?e[l]:"LABEL"===e[l][d].tagName?e[l][d]:null;if(i){var a=e[l],r=D(a[d],"btn"),u=i.getElementsByTagName("INPUT")[0];if(u){if("checkbox"===u.type&&(u[o]?(E(i,m),u[c](o),u.removeAttribute(o),u[o]=!1):(H(i,m),u[c](o),u[s](o,o),u[o]=!0),n||(n=!0,j.call(u,"change","button"),j.call(t,"change","button"))),"radio"===u.type&&!n&&!u[o]){H(i,m),u[s](o,o),u[o]=!0,j.call(u,"change","button"),j.call(t,"change","button"),n=!0;for(var h=0,p=r[f];h1?(t.preventDefault(),!1):void 0):void t.preventDefault()},Z=function(t){if(y&&!g&&(k=x||parseInt(t.touches[0].pageX),y)){if((!e.contains(t[l])||!e.contains(t.relatedTarget))&&Math.abs(T-k)<75)return!1;xT&&h--,y=!1,u.slideTo(h),K(P)}},$=function(){var n=e.getBoundingClientRect(),o=t.innerHeight||i.clientHeight;return n[b]<=o&&n.bottom>=0},_=function(t){for(var e=0,i=q[f];et||n===I-1&&0===t)&&(B=u.direction="right"),t<0?t=I-1:t>=I&&(t=0),h=t,i=B===v?"next":"prev",j.call(e,"slide","carousel",A[t]),g=!0,clearInterval(p),p=null,_(t),C&&N(e,"slide")?(H(A[t],i),A[t].offsetWidth,H(A[t],B),H(A[n],B),X(A[t],function(o){var a=o&&o[l]!==A[t]?1e3*o.elapsedTime+100:20;g&&setTimeout(function(){g=!1,H(A[t],m),E(A[n],m),E(A[t],i),E(A[t],B),E(A[n],B),j.call(e,"slid","carousel",A[t]),u.interval&&!N(e,"paused")&&u.cycle()},a)})):(H(A[t],m),A[t].offsetWidth,E(A[n],m),setTimeout(function(){g=!1,u.interval&&!N(e,"paused")&&u.cycle(),j.call(e,"slid","carousel",A[t])},100)))}},this.getActiveIndex=function(){return A.indexOf(D(e,"item active")[0])||0},"Carousel"in e||(u.pause&&u.interval&&(W(e,w[0],U),W(e,w[1],F),W(e,L.start,U),W(e,L.end,F)),A[f]>1&&W(e,L.start,Q),z&&W(z,"click",G),R&&W(R,"click",G),O&&W(O,"click",Y),u.keyboard&&W(t,"keydown",J)),u.getActiveIndex()<0&&(A[f]&&H(A[0],m),q[f]&&_(0)),u.interval&&u.cycle(),e.Carousel=u}};a[g](["Carousel",J,'[data-ride="carousel"]']);var K=function(t,e){t=S(t),e=e||{};var i,n,o=null,a=null,l=this,r=t[c]("data-parent"),d=function(t,e){j.call(t,"show","collapse"),t.isAnimating=!0,H(t,"collapsing"),E(t,"collapse"),t[p].height=t.scrollHeight+"px",X(t,function(){t.isAnimating=!1,t[s]("aria-expanded","true"),e[s]("aria-expanded","true"),E(t,"collapsing"),H(t,"collapse"),H(t,"in"),t[p].height="",j.call(t,"shown","collapse")})},f=function(t,e){j.call(t,"hide","collapse"),t.isAnimating=!0,t[p].height=t.scrollHeight+"px",E(t,"collapse"),E(t,"in"),H(t,"collapsing"),t.offsetWidth,t[p].height="0px",X(t,function(){t.isAnimating=!1,t[s]("aria-expanded","false"),e[s]("aria-expanded","false"),E(t,"collapsing"),H(t,"collapse"),t[p].height="",j.call(t,"hidden","collapse")})};this.toggle=function(t){t.preventDefault(),N(a,"in")?l.hide():l.show()},this.hide=function(){a.isAnimating||(f(a,t),H(t,"collapsed"))},this.show=function(){o&&(i=S(".collapse.in",o),n=i&&(S('[data-target="#'+i.id+'"]',o)||S('[href="#'+i.id+'"]',o))),(!a.isAnimating||i&&!i.isAnimating)&&(n&&i!==a&&(f(i,n),H(n,"collapsed")),d(a,t),E(t,"collapsed"))},"Collapse"in t||W(t,"click",l.toggle),a=function(){var e=t.href&&t[c]("href"),i=t[c]("data-target"),n=e||i&&"#"===i.charAt(0)&&i;return n&&S(n)}(),a.isAnimating=!1,o=S(e.parent)||r&&R(t,r),t.Collapse=l};a[g](["Collapse",K,'[data-toggle="collapse"]']);var Q=function(t,i){t=S(t),this.persist=!0===i||"true"===t[c]("data-persist")||!1;var n=this,o=t[d],a="open",r=null,u=S(".dropdown-menu",o),h=function(){for(var t=u.children,e=[],i=0;i1?c-1:0:40===o&&c×',v=S(o.container),T=S(g),x=R(i,".modal"),C=R(i,"."+k),A=R(i,".navbar-fixed-bottom");this.template=o.template?o.template:null,this.trigger=o.trigger?o.trigger:a||"hover",this[r]=o[r]&&"fade"!==o[r]?o[r]:d||"fade",this.placement=o.placement?o.placement:f||b,this.delay=parseInt(o.delay||h)||200,this.dismissible=!(!o.dismissible&&"true"!==u),this.container=v||(T||(C||(A||(x||e[n]))));var I=this,L=o.title||i[c]("data-title")||null,B=o.content||i[c]("data-content")||null;if(B||this.template){var M=null,D=0,z=this.placement,O=function(t){null!==M&&t[l]===S(".close",M)&&I.hide()},q=function(){I.container.removeChild(M),D=null,M=null},F=function(){if(L=i[c]("data-title"),B=i[c]("data-content"),M=e.createElement("div"),null!==B&&null===I.template){if(M[s]("role","tooltip"),null!==L){var t=e.createElement("h3");t[s]("class","popover-title"),t.innerHTML=I.dismissible?L+m:L,M.appendChild(t)}var n=e.createElement("div"),o=e.createElement("div");n[s]("class","arrow"),o[s]("class","popover-content"),M.appendChild(n),M.appendChild(o),o.innerHTML=I.dismissible&&null===L?B+m:B}else{var a=e.createElement("div");a.innerHTML=I.template,M.innerHTML=a.firstChild.innerHTML}I.container.appendChild(M),M[p].display="block",M[s]("class","popover "+z+" "+I[r])},Y=function(){!N(M,"in")&&H(M,"in")},G=function(){U(i,M,z,I.container)},J=function(n){"click"!=I.trigger&&"focus"!=I.trigger||!I.dismissible&&n(i,"blur",I.hide),I.dismissible&&n(e,"click",O),!y&&n(t,"resize",I.hide)},K=function(){J(W),j.call(i,"shown","popover")},Q=function(){J(P),q(),j.call(i,"hidden","popover")};this.toggle=function(){null===M?I.show():I.hide()},this.show=function(){clearTimeout(D),D=setTimeout(function(){null===M&&(z=I.placement,F(),G(),Y(),j.call(i,"show","popover"),I[r]?X(M,K):K())},20)},this.hide=function(){clearTimeout(D),D=setTimeout(function(){M&&null!==M&&N(M,"in")&&(j.call(i,"hide","popover"),E(M,"in"),I[r]?X(M,Q):Q())},I.delay)},"Popover"in i||("hover"===I.trigger?(W(i,w[0],I.show),I.dismissible||W(i,w[1],I.hide)):"click"!=I.trigger&&"focus"!=I.trigger||W(i,I.trigger,I.toggle)),i.Popover=I}};a[g](["Popover",Z,'[data-toggle="popover"]']);var $=function(e,i){e=S(e);var n=S(e[c]("data-target")),o=e[c]("data-offset");if(i=i||{},i[l]||n){for(var a,r=this,s=i[l]&&S(i[l])||n,u=s&&s.getElementsByTagName("A"),h=parseInt(i.offset||o)||10,p=[],v=[],w=e.offsetHeight=c&&s>a;if(!r&&f)"LI"!==i.tagName||N(i,m)||(H(i,m),o&&!N(o,m)&&H(o,m),j.call(e,"activate","scrollspy",p[t]));else if(f){if(!f&&!r||r&&f)return}else"LI"===i.tagName&&N(i,m)&&(E(i,m),o&&N(o,m)&&!D(i[d],m).length&&E(o,m))},L=function(){a=T?q().y:e.scrollTop;for(var t=0,i=p[f];t1&&(t=e[e[f]-1]):t=e[0],t.getElementsByTagName("A")[0]},I=function(){return S(A()[c]("href"))},L=function(t){t.preventDefault(),n=t.currentTarget||this,!b.isAnimating&&!N(n[d],m)&&g.show()};this.show=function(){n=n||t,l=S(n[c]("href")),o=A(),a=I(),b.isAnimating=!0,E(o[d],m),o[s]("aria-expanded","false"),H(n[d],m),n[s]("aria-expanded","true"),w&&(N(t[d][d],"dropdown-menu")?N(w,m)||H(w,m):N(w,m)&&E(w,m)),j.call(o,"hide","tab",n),N(a,"fade")?(E(a,"in"),X(a,k)):k()},"Tab"in t||W(t,"click",L),g.height&&(y=I()[d]),t.Tab=g}};a[g](["Tab",_,'[data-toggle="tab"]']);var tt=function(i,o){i=S(i),o=o||{};var a=i[c]("data-animation"),l=i[c]("data-placement"),d=i[c]("data-delay"),f=i[c]("data-container"),u=S(o.container),h=S(f),p=R(i,".modal"),g=R(i,"."+k),m=R(i,".navbar-fixed-bottom");this[r]=o[r]&&"fade"!==o[r]?o[r]:a||"fade",this.placement=o.placement?o.placement:l||b,this.delay=parseInt(o.delay||d)||200,this.container=u||(h||(g||(m||(p||e[n]))));var v=this,T=0,x=this.placement,C=null,A=i[c]("title")||i[c]("data-title")||i[c]("data-original-title");if(A&&""!=A){var I=function(){v.container.removeChild(C),C=null,T=null},L=function(){if(!(A=i[c]("title")||i[c]("data-title")||i[c]("data-original-title"))||""==A)return!1;C=e.createElement("div"),C[s]("role","tooltip");var t=e.createElement("div"),n=e.createElement("div");t[s]("class","tooltip-arrow"),n[s]("class","tooltip-inner"),C.appendChild(t),C.appendChild(n),n.innerHTML=A,v.container.appendChild(C),C[s]("class","tooltip "+x+" "+v[r])},B=function(){U(i,C,x,v.container)},M=function(){!N(C,"in")&&H(C,"in")},D=function(){j.call(i,"shown","tooltip"),!y&&W(t,"resize",v.hide)},z=function(){!y&&P(t,"resize",v.hide),I(),j.call(i,"hidden","tooltip")};this.show=function(){clearTimeout(T),T=setTimeout(function(){if(null===C){if(x=v.placement,0==L())return;B(),M(),j.call(i,"show","tooltip"),v[r]?X(C,D):D()}},20)},this.hide=function(){clearTimeout(T),T=setTimeout(function(){C&&N(C,"in")&&(j.call(i,"hide","tooltip"),E(C,"in"),v[r]?X(C,z):z())},v.delay)},this.toggle=function(){C?v.hide():v.show()},"Tooltip"in i||(i[s]("data-original-title",A),i.removeAttribute("title"),W(i,w[0],v.show),W(i,w[1],v.hide)),i.Tooltip=v}};a[g](["Tooltip",tt,'[data-toggle="tooltip"]']);var et=function(t,e){for(var i=0,n=e[f];i