/
bootstrap-native.min.js
2 lines (2 loc) · 19.4 KB
/
bootstrap-native.min.js
1
2
// Native Javascript for Bootstrap 3 v2.0.24 | © dnp_theme | MIT-License
!function(t,n){if("function"==typeof define&&define.amd)define([],n);else if("object"==typeof module&&module.exports)module.exports=n();else{var e=n();t.Affix=e.Affix,t.Alert=e.Alert,t.Button=e.Button,t.Carousel=e.Carousel,t.Collapse=e.Collapse,t.Dropdown=e.Dropdown,t.Modal=e.Modal,t.Popover=e.Popover,t.ScrollSpy=e.ScrollSpy,t.Tab=e.Tab,t.Tooltip=e.Tooltip}}(this,function(){"use strict";var t="undefined"!=typeof global?global:this||window,n=document,e=n.documentElement,i="body",o=t.BSN={},a=o.supports=[],l="data-toggle",r="data-dismiss",c="data-spy",u="data-ride",f="Affix",s="Alert",d="Button",h="Carousel",p="Collapse",v="Dropdown",m="Modal",g="Popover",b="ScrollSpy",w="Tab",y="Tooltip",x="data-backdrop",T="data-keyboard",A="data-target",C="data-interval",I="data-height",k="data-pause",N="data-title",L="data-original-title",S="data-original-text",E="data-dismissible",B="data-trigger",M="data-animation",D="data-container",P="data-placement",H="data-delay",O="data-offset-top",W="data-offset-bottom",j="backdrop",q="keyboard",z="delay",R="content",U="target",F="interval",X="pause",Y="animation",G="placement",J="container",K="offsetTop",Q="offsetBottom",V="offsetLeft",Z="scrollTop",$="scrollLeft",_="clientWidth",tt="clientHeight",nt="offsetWidth",et="offsetHeight",it="innerWidth",ot="innerHeight",at="scrollHeight",lt="height",rt="aria-expanded",ct="aria-hidden",ut="click",ft="hover",st="keydown",dt="keyup",ht="resize",pt="scroll",vt="show",mt="shown",gt="hide",bt="hidden",wt="close",yt="closed",xt="slid",Tt="slide",At="change",Ct="getAttribute",It="setAttribute",kt="hasAttribute",Nt="createElement",Lt="appendChild",St="innerHTML",Et="getElementsByTagName",Bt="preventDefault",Mt="getBoundingClientRect",Dt="querySelectorAll",Pt="getElementsByClassName",Ht="getComputedStyle",Ot="indexOf",Wt="parentNode",jt="length",qt="toLowerCase",zt="Transition",Rt="Duration",Ut="Webkit",Ft="style",Xt="push",Yt="tabindex",Gt="contains",Jt="active",Kt="in",Qt="collapsing",Vt="disabled",Zt="loading",$t="left",_t="right",tn="top",nn="bottom",en=!("opacity"in e[Ft]),on="onmouseleave"in n?["mouseenter","mouseleave"]:["mouseover","mouseout"],an=/\b(top|bottom|left|right)+/,ln=0,rn="navbar-fixed-top",cn="navbar-fixed-bottom",un=Ut+zt in e[Ft]||zt[qt]()in e[Ft],fn=Ut+zt in e[Ft]?Ut[qt]()+zt+"End":zt[qt]()+"end",sn=Ut+Rt in e[Ft]?Ut[qt]()+zt+Rt:zt[qt]()+Rt,dn=function(t){t.focus?t.focus():t.setActive()},hn=function(t,n){t.classList.add(n)},pn=function(t,n){t.classList.remove(n)},vn=function(t,n){return t.classList[Gt](n)},mn=function(t){for(var n=[],e=0,i=t[jt];e<i;e++)n[Xt](t[e]);return n},gn=function(t,n){var e=en?Dt:Pt;return mn(t[e](en?"."+n.replace(/\s(?=[a-z])/g,"."):n))},bn=function(t,e){var i=e?e:n;return"object"==typeof t?t:i.querySelector(t)},wn=function(t,e){var i=e.charAt(0),o=e.substr(1);if("."===i){for(;t&&t!==n;t=t[Wt])if(null!==bn(e,t[Wt])&&vn(t,o))return t}else if("#"===i)for(;t&&t!==n;t=t[Wt])if(t.id===o)return t;return!1},yn=function(t,n,e){t.addEventListener(n,e,!1)},xn=function(t,n,e){t.removeEventListener(n,e,!1)},Tn=function(t,n,e){yn(t,n,function i(o){e(o),xn(t,n,i)})},An=function(n){var e=t[Ht](n)[sn];return e=parseFloat(e),e="number"!=typeof e||isNaN(e)?0:1e3*e,e+50},Cn=function(t,n){var e=0,i=An(t);un&&Tn(t,fn,function(t){n(t),e=1}),setTimeout(function(){!e&&n()},i)},In=function(t,n,e){var i=new CustomEvent(t+".bs."+n);i.relatedTarget=e,this.dispatchEvent(i)},kn=function(){return{y:t.pageYOffset||e[Z],x:t.pageXOffset||e[$]}},Nn=function(t,o,a,l){var r,c,u,f,s={w:o[nt],h:o[et]},d=e[_]||n[i][_],h=e[tt]||n[i][tt],p=t[Mt](),v=l===n[i]?kn():{x:l[V]+l[$],y:l[K]+l[Z]},m={w:p[_t]-p[$t],h:p[nn]-p[tn]},g=bn('[class*="arrow"]',o),b=p[tn]+m.h/2-s.h/2<0,w=p[$t]+m.w/2-s.w/2<0,y=p[$t]+s.w/2+m.w/2>=d,x=p[tn]+s.h/2+m.h/2>=h,T=p[tn]-s.h<0,A=p[$t]-s.w<0,C=p[tn]+s.h+m.h>=h,I=p[$t]+s.w+m.w>=d;a=(a===$t||a===_t)&&A&&I?tn:a,a=a===tn&&T?nn:a,a=a===nn&&C?tn:a,a=a===$t&&A?_t:a,a=a===_t&&I?$t:a,a===$t||a===_t?(c=a===$t?p[$t]+v.x-s.w:p[$t]+v.x+m.w,b?(r=p[tn]+v.y,u=m.h/2):x?(r=p[tn]+v.y-s.h+m.h,u=s.h-m.h/2):r=p[tn]+v.y-s.h/2+m.h/2):a!==tn&&a!==nn||(r=a===tn?p[tn]+v.y-s.h:p[tn]+v.y+m.h,w?(c=0,f=p[$t]+m.w/2):y?(c=d-1.01*s.w,f=s.w-(d-p[$t])+m.w/2):c=p[$t]+v.x-s.w/2+m.w/2),o[Ft][tn]=r+"px",o[Ft][$t]=c+"px",u&&(g[Ft][tn]=u+"px"),f&&(g[Ft][$t]=f+"px"),o.className[Ot](a)===-1&&(o.className=o.className.replace(an,a))};o.version="2.0.24";var Ln=function(o,a){o=bn(o),a=a||{};var l=o[Ct](A),r=o[Ct](O),c=o[Ct](W),u="affix",s="affixed",d="function",h="update",p="affix-top",v="affixed-top",m="affix-bottom",g="affixed-bottom";if(this[U]=a[U]?bn(a[U]):bn(l)||null,this[K]=a[K]?a[K]:parseInt(r)||0,this[Q]=a[Q]?a[Q]:parseInt(c)||0,this[U]||this[K]||this[Q]){var b,w,y,x,T,C,I=this,k=!1,N=!1,L=function(){return Math.max(n[i][at],n[i][et],e[tt],e[at],e[et])},S=function(){return null!==I[U]?I[U][Mt]()[tn]+x:I[K]?parseInt(typeof I[K]===d?I[K]():I[K]||0):void 0},E=function(){if(I[Q])return y-o[et]-parseInt(typeof I[Q]===d?I[Q]():I[Q]||0)},B=function(){y=L(),x=parseInt(kn().y,0),b=S(),w=E(),T=parseInt(b)-x<0&&x>parseInt(b),C=parseInt(w)-x<0&&x>parseInt(w)},M=function(){k||vn(o,u)||(In.call(o,u,u),In.call(o,p,u),hn(o,u),k=!0,In.call(o,s,u),In.call(o,v,u))},D=function(){k&&vn(o,u)&&(pn(o,u),k=!1)},P=function(){N||vn(o,m)||(In.call(o,u,u),In.call(o,m,u),hn(o,m),N=!0,In.call(o,s,u),In.call(o,g,u))},H=function(){N&&vn(o,m)&&(pn(o,m),N=!1)},j=function(){C?(T&&D(),P()):(H(),T?M():D())};this[h]=function(){B(),j()},f in o||(yn(t,pt,I[h]),!en&&yn(t,ht,I[h])),o[f]=I,I[h]()}};a[Xt]([f,Ln,"["+c+'="affix"]']);var Sn=function(t){t=bn(t);var n=this,e="alert",i=wn(t,"."+e),o=function(){vn(i,"fade")?Cn(i,l):l()},a=function(o){i=wn(o[U],"."+e),t=bn("["+r+'="'+e+'"]',i),t&&i&&(t===o[U]||t[Gt](o[U]))&&n.close()},l=function(){In.call(i,yt,e),xn(t,ut,a),i[Wt].removeChild(i)};this.close=function(){i&&t&&vn(i,Kt)&&(In.call(i,wt,e),pn(i,Kt),i&&o())},s in t||yn(t,ut,a),t[s]=n};a[Xt]([s,Sn,"["+r+'="alert"]']);var En=function(t,e){t=bn(t),e=e||null;var i=!1,o="button",a="checked",l="reset",r="LABEL",c="INPUT",u=function(){e&&e!==l&&(e===Zt&&(hn(t,Vt),t[It](Vt,Vt),t[It](S,t[St].trim())),t[St]=t[Ct]("data-"+e+"-text"))},f=function(){t[Ct](S)&&((vn(t,Vt)||t[Ct](Vt)===Vt)&&(pn(t,Vt),t.removeAttribute(Vt)),t[St]=t[Ct](S))},s=function(t){var e=t.which||t.keyCode;32===e&&t[U]===n.activeElement&&p(t)},h=function(t){var n=t.which||t.keyCode;32===n&&t[Bt]()},p=function(n){var e=n[U].tagName===r?n[U]:n[U][Wt].tagName===r?n[U][Wt]:null;if(e){var l=n[U],u=gn(l[Wt],"btn"),f=e[Et](c)[0];if(f){if("checkbox"===f.type&&(f[a]?(pn(e,Jt),f[Ct](a),f.removeAttribute(a),f[a]=!1):(hn(e,Jt),f[Ct](a),f[It](a,a),f[a]=!0),i||(i=!0,In.call(f,At,o),In.call(t,At,o))),"radio"===f.type&&!i&&!f[a]){hn(e,Jt),f[It](a,a),f[a]=!0,In.call(f,At,o),In.call(t,At,o),i=!0;for(var s=0,d=u[jt];s<d;s++){var h=u[s],p=h[Et](c)[0];h!==e&&vn(h,Jt)&&(pn(h,Jt),p.removeAttribute(a),p[a]=!1,In.call(p,At,o))}}setTimeout(function(){i=!1},50)}}};if(vn(t,"btn"))null!==e&&(e!==l?u():f());else{d in t||(yn(t,ut,p),bn("["+Yt+"]",t)&&yn(t,dt,s),yn(t,st,h));for(var v=gn(t,"btn"),m=v[jt],g=0;g<m;g++)!vn(v[g],Jt)&&bn("input",v[g])[Ct](a)&&hn(v[g],Jt);t[d]=this}};a[Xt]([d,En,"["+l+'="buttons"]']);var Bn=function(n,i){n=bn(n),i=i||{};var o=n[Ct](C),a=i[F],l="false"===o?0:parseInt(o),r=n[Ct](k)===ft||!1,c="true"===n[Ct](T)||!1,u="carousel",f="paused",s="direction",d="data-slide-to";this[q]=i[q]===!0||c,this[X]=!(i[X]!==ft&&!r)&&ft,this[F]="number"==typeof a?a:a===!1||0===l||l===!1?0:5e3;var p=this,v=n.index=0,m=n.timer=0,g=!1,b=gn(n,"item"),w=b[jt],y=this[s]=$t,x=gn(n,u+"-control"),A=x[0],I=x[1],N=bn("."+u+"-indicators",n),L=N&&N[Et]("LI")||[],S=function(){p[F]===!1||vn(n,f)||(hn(n,f),!g&&clearInterval(m))},E=function(){p[F]!==!1&&vn(n,f)&&(pn(n,f),!g&&clearInterval(m),!g&&p.cycle())},B=function(t){if(t[Bt](),!g){var n=t[U];if(!n||vn(n,Jt)||!n[Ct](d))return!1;v=parseInt(n[Ct](d),10),p.slideTo(v)}},M=function(t){if(t[Bt](),!g){var n=t.currentTarget||t.srcElement;n===I?v++:n===A&&v--,p.slideTo(v)}},D=function(t){if(!g){switch(t.which){case 39:v++;break;case 37:v--;break;default:return}p.slideTo(v)}},P=function(){var i=n[Mt](),o=t[ot]||e[tt];return i[tn]<=o&&i[nn]>=0},H=function(t){for(var n=0,e=L[jt];n<e;n++)pn(L[n],Jt);L[t]&&hn(L[t],Jt)};this.cycle=function(){m=setInterval(function(){P()&&(v++,p.slideTo(v))},this[F])},this.slideTo=function(t){if(!g){var e,i=this.getActiveIndex();i!==t&&(i<t||0===i&&t===w-1?y=p[s]=$t:(i>t||i===w-1&&0===t)&&(y=p[s]=_t),t<0?t=w-1:t===w&&(t=0),v=t,e=y===$t?"next":"prev",In.call(n,Tt,u,b[t]),g=!0,clearInterval(m),H(t),un&&vn(n,"slide")?(hn(b[t],e),b[t][nt],hn(b[t],y),hn(b[i],y),Tn(b[t],fn,function(o){var a=o[U]!==b[t]?1e3*o.elapsedTime+100:20;g&&setTimeout(function(){g=!1,hn(b[t],Jt),pn(b[i],Jt),pn(b[t],e),pn(b[t],y),pn(b[i],y),In.call(n,xt,u,b[t]),p[F]&&!vn(n,f)&&p.cycle()},a)})):(hn(b[t],Jt),b[t][nt],pn(b[i],Jt),setTimeout(function(){g=!1,p[F]&&!vn(n,f)&&p.cycle(),In.call(n,xt,u,b[t])},100)))}},this.getActiveIndex=function(){return b[Ot](gn(n,"item active")[0])||0},h in n||(p[X]&&p[F]&&(yn(n,on[0],S),yn(n,on[1],E),yn(n,"touchstart",S),yn(n,"touchend",E)),I&&yn(I,ut,M),A&&yn(A,ut,M),N&&yn(N,ut,B),p[q]&&yn(t,st,D)),p.getActiveIndex()<0&&(b[jt]&&hn(b[0],Jt),L[jt]&&H(0)),p[F]&&p.cycle(),n[h]=p};a[Xt]([h,Bn,"["+u+'="carousel"]']);var Mn=function(t,n){t=bn(t),n=n||{};var e,i,o=null,a=null,r=this,c=t[Ct]("data-parent"),u="collapse",f="collapsed",s="isAnimating",d=function(t,n){In.call(t,vt,u),t[s]=!0,hn(t,Qt),pn(t,u),t[Ft][lt]=t[at]+"px",Cn(t,function(){t[s]=!1,t[It](rt,"true"),n[It](rt,"true"),pn(t,Qt),hn(t,u),hn(t,Kt),t[Ft][lt]="",In.call(t,mt,u)})},h=function(t,n){In.call(t,gt,u),t[s]=!0,t[Ft][lt]=t[at]+"px",pn(t,u),pn(t,Kt),hn(t,Qt),t[nt],t[Ft][lt]="0px",Cn(t,function(){t[s]=!1,t[It](rt,"false"),n[It](rt,"false"),pn(t,Qt),hn(t,u),t[Ft][lt]="",In.call(t,bt,u)})},v=function(){var n=t.href&&t[Ct]("href"),e=t[Ct](A),i=n||e&&"#"===e.charAt(0)&&e;return i&&bn(i)};this.toggle=function(t){t[Bt](),vn(a,Kt)?r.hide():r.show()},this.hide=function(){a[s]||(h(a,t),hn(t,f))},this.show=function(){o&&(e=bn("."+u+"."+Kt,o),i=e&&(bn("["+l+'="'+u+'"]['+A+'="#'+e.id+'"]',o)||bn("["+l+'="'+u+'"][href="#'+e.id+'"]',o))),(!a[s]||e&&!e[s])&&(i&&e!==a&&(h(e,i),hn(i,f)),d(a,t),pn(t,f))},p in t||yn(t,ut,r.toggle),a=v(),a[s]=!1,o=bn(n.parent)||c&&wn(t,c),t[p]=r};a[Xt]([p,Mn,"["+l+'="collapse"]']);var Dn=function(t,e){t=bn(t),this.persist=e===!0||"true"===t[Ct]("data-persist")||!1;var i=this,o="children",a=t[Wt],l="dropdown",r="open",c=null,u=bn(".dropdown-menu",a),f=function(){for(var t=u[o],n=[],e=0;e<t[jt];e++)t[e][o][jt]&&"A"===t[e][o][0].tagName&&n[Xt](t[e]);return n}(),s=function(t){(t.href&&"#"===t.href.slice(-1)||t[Wt]&&t[Wt].href&&"#"===t[Wt].href.slice(-1))&&this[Bt]()},d=function(){var e=t[r]?yn:xn;e(n,ut,h),e(n,st,m),e(n,dt,g)},h=function(n){var e=n[U],o=e&&(v in e||v in e[Wt]);(e!==u&&!u[Gt](e)||!i.persist&&!o)&&(c=e===t||t[Gt](e)?t:null,w(),s.call(n,e))},p=function(n){c=t,b(),s.call(n,n[U])},m=function(t){var n=t.which||t.keyCode;38!==n&&40!==n||t[Bt]()},g=function(e){var a=e.which||e.keyCode,l=n.activeElement,s=f[Ot](l[Wt]),d=l===t,h=u[Gt](l),p=l[Wt][Wt]===u;(p||d)&&(s=d?0:38===a?s>1?s-1:0:40===a&&s<f[jt]-1?s+1:s,f[s]&&dn(f[s][o][0])),(f[jt]&&p||!f[jt]&&(h||d)||!h)&&t[r]&&27===a&&(i.toggle(),c=null)},b=function(){In.call(a,vt,l,c),hn(a,r),u[It](rt,!0),In.call(a,mt,l,c),t[r]=!0,xn(t,ut,p),setTimeout(function(){dn(u[Et]("INPUT")[0]||t),d()},1)},w=function(){In.call(a,gt,l,c),pn(a,r),u[It](rt,!1),In.call(a,bt,l,c),t[r]=!1,d(),dn(t),setTimeout(function(){yn(t,ut,p)},1)};t[r]=!1,this.toggle=function(){vn(a,r)&&t[r]?w():b()},v in t||(!Yt in u&&u[It](Yt,"0"),yn(t,ut,p)),t[v]=i};a[Xt]([v,Dn,"["+l+'="dropdown"]']);var Pn=function(o,a){o=bn(o);var l,c=o[Ct](A)||o[Ct]("href"),u=bn(c),f=vn(o,"modal")?o:u,s="modal",d="static",h="paddingLeft",p="paddingRight",v="modal-backdrop";if(vn(o,"modal")&&(o=null),f){a=a||{},this[q]=a[q]!==!1&&"false"!==f[Ct](T),this[j]=a[j]!==d&&f[Ct](x)!==d||d,this[j]=a[j]!==!1&&"false"!==f[Ct](x)&&this[j],this[R]=a[R];var g,b,w,y,C=this,I=null,k=gn(e,rn).concat(gn(e,cn)),N=function(){var n=e[Mt]();return t[it]||n[_t]-Math.abs(n[$t])},L=function(){var e,o=n[i].currentStyle||t[Ht](n[i]),a=parseInt(o[p],10);if(g&&(n[i][Ft][p]=a+w+"px",k[jt]))for(var l=0;l<k[jt];l++)e=(k[l].currentStyle||t[Ht](k[l]))[p],k[l][Ft][p]=parseInt(e)+w+"px"},S=function(){if(n[i][Ft][p]="",k[jt])for(var t=0;t<k[jt];t++)k[t][Ft][p]=""},E=function(){var t,e=n[Nt]("div");return e.className=s+"-scrollbar-measure",n[i][Lt](e),t=e[nt]-e[_],n[i].removeChild(e),t},B=function(){g=n[i][_]<N(),b=f[at]>e[tt],w=E()},M=function(){f[Ft][h]=!g&&b?w+"px":"",f[Ft][p]=g&&!b?w+"px":""},D=function(){f[Ft][h]="",f[Ft][p]=""},P=function(){ln=1;var t=n[Nt]("div");y=bn("."+v),null===y&&(t[It]("class",v+" fade"),y=t,n[i][Lt](y))},H=function(){y=bn("."+v),y&&null!==y&&"object"==typeof y&&(ln=0,n[i].removeChild(y),y=null),In.call(f,bt,s)},O=function(){vn(f,Kt)?yn(n,st,G):xn(n,st,G)},W=function(){vn(f,Kt)?yn(t,ht,C.update):xn(t,ht,C.update)},z=function(){vn(f,Kt)?yn(f,ut,J):xn(f,ut,J)},F=function(){dn(f),In.call(f,mt,s,I)},X=function(){f[Ft].display="",o&&dn(o),function(){gn(n,s+" "+Kt)[0]||(D(),S(),pn(n[i],s+"-open"),y&&vn(y,"fade")?(pn(y,Kt),Cn(y,H)):H(),W(),z(),O())}()},Y=function(t){var n=t[U];n=n[kt](A)||n[kt]("href")?n:n[Wt],n!==o||vn(f,Kt)||(f.modalTrigger=o,I=o,C.show(),t[Bt]())},G=function(t){var n=t.which||t.keyCode;C[q]&&27==n&&vn(f,Kt)&&C.hide()},J=function(t){var n=t[U];vn(f,Kt)&&(n[Wt][Ct](r)===s||n[Ct](r)===s||n===f&&C[j]!==d)&&(C.hide(),I=null,t[Bt]())};this.toggle=function(){vn(f,Kt)?this.hide():this.show()},this.show=function(){In.call(f,vt,s,I);var t=gn(n,s+" in")[0];t&&t!==f&&t.modalTrigger[m].hide(),this[j]&&!ln&&P(),y&&ln&&!vn(y,Kt)&&(y[nt],l=An(y),hn(y,Kt)),setTimeout(function(){f[Ft].display="block",B(),L(),M(),hn(n[i],s+"-open"),hn(f,Kt),f[It](ct,!1),W(),z(),O(),vn(f,"fade")?Cn(f,F):F()},un&&y?l:0)},this.hide=function(){In.call(f,gt,s),y=bn("."+v),l=y&&An(y),pn(f,Kt),f[It](ct,!0),setTimeout(function(){vn(f,"fade")?Cn(f,X):X()},un&&y?l:0)},this.setContent=function(t){bn("."+s+"-content",f)[St]=t},this.update=function(){vn(f,Kt)&&(B(),L(),M())},!o||m in o||yn(o,ut,Y),C[R]&&C.setContent(C[R]),!!o&&(o[m]=C)}};a[Xt]([m,Pn,"["+l+'="modal"]']);var Hn=function(e,o){e=bn(e),o=o||{};var a=e[Ct](B),l=e[Ct](M),r=e[Ct](P),c=e[Ct](E),u=e[Ct](H),f=e[Ct](D),s="popover",d="template",h="trigger",p="class",v="div",m="fade",b="data-content",w="dismissible",y='<button type="button" class="close">×</button>',x=bn(o[J]),T=bn(f),A=wn(e,".modal"),C=wn(e,"."+rn),I=wn(e,"."+cn);this[d]=o[d]?o[d]:null,this[h]=o[h]?o[h]:a||ft,this[Y]=o[Y]&&o[Y]!==m?o[Y]:l||m,this[G]=o[G]?o[G]:r||tn,this[z]=parseInt(o[z]||u)||200,this[w]=!(!o[w]&&"true"!==c),this[J]=x?x:T?T:C?C:I?I:A?A:n[i];var k=this,L=e[Ct](N)||null,S=e[Ct](b)||null;if(S||this[d]){var O=null,W=0,j=this[G],q=function(t){null!==O&&t[U]===bn(".close",O)&&k.hide()},R=function(){k[J].removeChild(O),W=null,O=null},F=function(){if(L=e[Ct](N),S=e[Ct](b),O=n[Nt](v),null!==S&&null===k[d]){if(O[It]("role","tooltip"),null!==L){var t=n[Nt]("h3");t[It](p,s+"-title"),t[St]=k[w]?L+y:L,O[Lt](t)}var i=n[Nt](v),o=n[Nt](v);i[It](p,"arrow"),o[It](p,s+"-content"),O[Lt](i),O[Lt](o),o[St]=k[w]&&null===L?S+y:S}else{var a=n[Nt](v);a[St]=k[d],O[St]=a.firstChild[St]}k[J][Lt](O),O[Ft].display="block",O[It](p,s+" "+j+" "+k[Y])},X=function(){!vn(O,Kt)&&hn(O,Kt)},K=function(){Nn(e,O,j,k[J])},Q=function(i){ut!=k[h]&&"focus"!=k[h]||!k[w]&&i(e,"blur",k.hide),k[w]&&i(n,ut,q),!en&&i(t,ht,k.hide)},V=function(){Q(yn),In.call(e,mt,s)},Z=function(){Q(xn),R(),In.call(e,bt,s)};this.toggle=function(){null===O?k.show():k.hide()},this.show=function(){clearTimeout(W),W=setTimeout(function(){null===O&&(j=k[G],F(),K(),X(),In.call(e,vt,s),k[Y]?Cn(O,V):V())},20)},this.hide=function(){clearTimeout(W),W=setTimeout(function(){O&&null!==O&&vn(O,Kt)&&(In.call(e,gt,s),pn(O,Kt),k[Y]?Cn(O,Z):Z())},k[z])},g in e||(k[h]===ft?(yn(e,on[0],k.show),k[w]||yn(e,on[1],k.hide)):ut!=k[h]&&"focus"!=k[h]||yn(e,k[h],k.toggle)),e[g]=k}};a[Xt]([g,Hn,"["+l+'="popover"]']);var On=function(n,e){n=bn(n);var i=bn(n[Ct](A)),o=n[Ct]("data-offset");if(e=e||{},e[U]||i){for(var a,l=this,r=e[U]&&bn(e[U])||i,c=r&&r[Et]("A"),u=parseInt(o||e.offset)||10,f=[],s=[],d=n[et]<n[at]?n:t,h=d===t,p=0,v=c[jt];p<v;p++){var m=c[p][Ct]("href"),g=m&&"#"===m.charAt(0)&&"#"!==m.slice(-1)&&bn(m);g&&(f[Xt](c[p]),s[Xt](g))}var w=function(t){var e=f[t][Wt],i=s[t],o=wn(e,".dropdown"),l=h&&i[Mt](),r=vn(e,Jt)||!1,c=(h?l[tn]+a:i[K])-u,d=h?l[nn]+a-u:s[t+1]?s[t+1][K]-u:n[at],p=a>=c&&d>a;if(!r&&p)"LI"!==e.tagName||vn(e,Jt)||(hn(e,Jt),o&&!vn(o,Jt)&&hn(o,Jt),In.call(n,"activate","scrollspy",f[t]));else if(p){if(!p&&!r||r&&p)return}else"LI"===e.tagName&&vn(e,Jt)&&(pn(e,Jt),o&&vn(o,Jt)&&!gn(e[Wt],Jt).length&&pn(o,Jt))},y=function(){a=h?kn().y:n[Z];for(var t=0,e=f[jt];t<e;t++)w(t)};this.refresh=function(){y()},b in n||(yn(d,pt,l.refresh),!en&&yn(t,ht,l.refresh)),l.refresh(),n[b]=l}};a[Xt]([b,On,"["+c+'="scroll"]']);var Wn=function(t,n){t=bn(t);var e=t[Ct](I),i="tab",o="height",a="float",r="isAnimating";n=n||{},this[o]=!!un&&(n[o]||"true"===e);var c,u,f,s,d,h,p,v=this,m=wn(t,".nav"),g=!1,b=m&&bn(".dropdown",m),y=function(){g[Ft][o]="",pn(g,Qt),m[r]=!1},x=function(){g?h?y():setTimeout(function(){g[Ft][o]=p+"px",g[nt],Cn(g,y)},50):m[r]=!1,In.call(c,mt,i,u)},T=function(){g&&(f[Ft][a]=$t,s[Ft][a]=$t,d=f[at]),hn(s,Jt),In.call(c,vt,i,u),pn(f,Jt),In.call(u,bt,i,c),g&&(p=s[at],h=p===d,hn(g,Qt),g[Ft][o]=d+"px",g[et],f[Ft][a]="",s[Ft][a]=""),vn(s,"fade")?setTimeout(function(){hn(s,Kt),Cn(s,x)},20):x()};if(m){m[r]=!1;var A=function(){var t,n=gn(m,Jt);return 1!==n[jt]||vn(n[0],"dropdown")?n[jt]>1&&(t=n[n[jt]-1]):t=n[0],t[Et]("A")[0]},C=function(){return bn(A()[Ct]("href"))},k=function(t){var n=t[U][Ct]("href");t[Bt](),c=t[U][Ct](l)===i||n&&"#"===n.charAt(0)?t[U]:t[U][Wt],!m[r]&&!vn(c[Wt],Jt)&&v.show()};this.show=function(){c=c||t,s=bn(c[Ct]("href")),u=A(),f=C(),m[r]=!0,pn(u[Wt],Jt),hn(c[Wt],Jt),b&&(vn(t[Wt][Wt],"dropdown-menu")?vn(b,Jt)||hn(b,Jt):vn(b,Jt)&&pn(b,Jt)),In.call(u,gt,i,c),vn(f,"fade")?(pn(f,Kt),Cn(f,T)):T()},w in t||yn(t,ut,k),v[o]&&(g=C()[Wt]),t[w]=v}};a[Xt]([w,Wn,"["+l+'="tab"]']);var jn=function(e,o){e=bn(e),o=o||{};var a=e[Ct](M),l=e[Ct](P),r=e[Ct](H),c=e[Ct](D),u="tooltip",f="class",s="title",d="fade",h="div",p=bn(o[J]),v=bn(c),m=wn(e,".modal"),g=wn(e,"."+rn),b=wn(e,"."+cn);this[Y]=o[Y]&&o[Y]!==d?o[Y]:a||d,this[G]=o[G]?o[G]:l||tn,this[z]=parseInt(o[z]||r)||200,this[J]=p?p:v?v:g?g:b?b:m?m:n[i];var w=this,x=0,T=this[G],A=null,C=e[Ct](s)||e[Ct](N)||e[Ct](L);if(C&&""!=C){var I=function(){w[J].removeChild(A),A=null,x=null},k=function(){if(C=e[Ct](s)||e[Ct](N)||e[Ct](L),!C||""==C)return!1;A=n[Nt](h),A[It]("role",u);var t=n[Nt](h),i=n[Nt](h);t[It](f,u+"-arrow"),i[It](f,u+"-inner"),A[Lt](t),A[Lt](i),i[St]=C,w[J][Lt](A),A[It](f,u+" "+T+" "+w[Y])},S=function(){Nn(e,A,T,w[J])},E=function(){!vn(A,Kt)&&hn(A,Kt)},B=function(){In.call(e,mt,u),!en&&yn(t,ht,w.hide)},O=function(){!en&&xn(t,ht,w.hide),I(),In.call(e,bt,u)};this.show=function(){clearTimeout(x),x=setTimeout(function(){if(null===A){if(T=w[G],0==k())return;S(),E(),In.call(e,vt,u),w[Y]?Cn(A,B):B()}},20)},this.hide=function(){clearTimeout(x),x=setTimeout(function(){A&&vn(A,Kt)&&(In.call(e,gt,u),pn(A,Kt),w[Y]?Cn(A,O):O())},w[z])},this.toggle=function(){A?w.hide():w.show()},y in e||(e[It](L,C),e.removeAttribute(s),yn(e,on[0],w.show),yn(e,on[1],w.hide)),e[y]=w}};a[Xt]([y,jn,"["+l+'="tooltip"]']);var qn=function(t,n){for(var e=0,i=n[jt];e<i;e++)new t(n[e])},zn=o.initCallback=function(t){t=t||n;for(var e=0,i=a[jt];e<i;e++)qn(a[e][1],t[Dt](a[e][2]))};return n[i]?zn():yn(n,"DOMContentLoaded",function(){zn()}),{Affix:Ln,Alert:Sn,Button:En,Carousel:Bn,Collapse:Mn,Dropdown:Dn,Modal:Pn,Popover:Hn,ScrollSpy:On,Tab:Wn,Tooltip:jn}});