if("undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");!function(){"use strict";var n=jQuery.fn.jquery.split(" ")[0].split(".");if(n[0]<2&&n[1]<9||1==n[0]&&9==n[1]&&n[2]<1||3<n[0])throw new Error("Bootstrap's JavaScript requires jQuery version 1.9.1 or higher, but lower than version 4");}(),function(n){"use strict";n.fn.emulateTransitionEnd=function(t){var i=!1,r=this;n(this).one("bsTransitionEnd",function(){i=!0});return setTimeout(function(){i||n(r).trigger(n.support.transition.end)},t),this};n(function(){n.support.transition=function(){var i=document.createElement("bootstrap"),n={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var t in n)if(i.style[t]!==undefined)return{end:n[t]};return!1}();n.support.transition&&(n.event.special.bsTransitionEnd={bindType:n.support.transition.end,delegateType:n.support.transition.end,handle:function(t){if(n(t.target).is(this))return t.handleObj.handler.apply(this,arguments)}})})}(jQuery),function(n){"use strict";var i='[data-dismiss="alert"]',t=function(t){n(t).on("click",i,this.close)},r;t.VERSION="3.4.1";t.TRANSITION_DURATION=150;t.prototype.close=function(i){function e(){u.detach().trigger("closed.bs.alert").remove()}var f=n(this),r=f.attr("data-target"),u;r||(r=(r=f.attr("href"))&&r.replace(/.*(?=#[^\s]*$)/,""));r="#"===r?[]:r;u=n(document).find(r);i&&i.preventDefault();u.length||(u=f.closest(".alert"));u.trigger(i=n.Event("close.bs.alert"));i.isDefaultPrevented()||(u.removeClass("in"),n.support.transition&&u.hasClass("fade")?u.one("bsTransitionEnd",e).emulateTransitionEnd(t.TRANSITION_DURATION):e())};r=n.fn.alert;n.fn.alert=function(i){return this.each(function(){var r=n(this),u=r.data("bs.alert");u||r.data("bs.alert",u=new t(this));"string"==typeof i&&u[i].call(r)})};n.fn.alert.Constructor=t;n.fn.alert.noConflict=function(){return n.fn.alert=r,this};n(document).on("click.bs.alert.data-api",i,t.prototype.close)}(jQuery),function(n){"use strict";function i(i){return this.each(function(){var u=n(this),r=u.data("bs.button"),f="object"==typeof i&&i;r||u.data("bs.button",r=new t(this,f));"toggle"==i?r.toggle():i&&r.setState(i)})}var t=function(i,r){this.$element=n(i);this.options=n.extend({},t.DEFAULTS,r);this.isLoading=!1},r;t.VERSION="3.4.1";t.DEFAULTS={loadingText:"loading..."};t.prototype.setState=function(t){var i="disabled",r=this.$element,f=r.is("input")?"val":"html",u=r.data();t+="Text";null==u.resetText&&r.data("resetText",r[f]());setTimeout(n.proxy(function(){r[f](null==u[t]?this.options[t]:u[t]);"loadingText"==t?(this.isLoading=!0,r.addClass(i).attr(i,i).prop(i,!0)):this.isLoading&&(this.isLoading=!1,r.removeClass(i).removeAttr(i).prop(i,!1))},this),0)};t.prototype.toggle=function(){var t=!0,i=this.$element.closest('[data-toggle="buttons"]'),n;i.length?(n=this.$element.find("input"),"radio"==n.prop("type")?(n.prop("checked")&&(t=!1),i.find(".active").removeClass("active"),this.$element.addClass("active")):"checkbox"==n.prop("type")&&(n.prop("checked")!==this.$element.hasClass("active")&&(t=!1),this.$element.toggleClass("active")),n.prop("checked",this.$element.hasClass("active")),t&&n.trigger("change")):(this.$element.attr("aria-pressed",!this.$element.hasClass("active")),this.$element.toggleClass("active"))};r=n.fn.button;n.fn.button=i;n.fn.button.Constructor=t;n.fn.button.noConflict=function(){return n.fn.button=r,this};n(document).on("click.bs.button.data-api",'[data-toggle^="button"]',function(t){var r=n(t.target).closest(".btn");i.call(r,"toggle");n(t.target).is('input[type="radio"], input[type="checkbox"]')||(t.preventDefault(),r.is("input,button")?r.trigger("focus"):r.find("input:visible,button:visible").first().trigger("focus"))}).on("focus.bs.button.data-api blur.bs.button.data-api",'[data-toggle^="button"]',function(t){n(t.target).closest(".btn").toggleClass("focus",/^focus(in)?$/.test(t.type))})}(jQuery),function(n){"use strict";function i(i){return this.each(function(){var u=n(this),r=u.data("bs.carousel"),f=n.extend({},t.DEFAULTS,u.data(),"object"==typeof i&&i),e="string"==typeof i?i:f.slide;r||u.data("bs.carousel",r=new t(this,f));"number"==typeof i?r.to(i):e?r[e]():f.interval&&r.pause().cycle()})}var t=function(t,i){this.$element=n(t);this.$indicators=this.$element.find(".carousel-indicators");this.options=i;this.paused=null;this.sliding=null;this.interval=null;this.$active=null;this.$items=null;this.options.keyboard&&this.$element.on("keydown.bs.carousel",n.proxy(this.keydown,this));"hover"==this.options.pause&&!("ontouchstart"in document.documentElement)&&this.$element.on("mouseenter.bs.carousel",n.proxy(this.pause,this)).on("mouseleave.bs.carousel",n.proxy(this.cycle,this))},u,r;t.VERSION="3.4.1";t.TRANSITION_DURATION=600;t.DEFAULTS={interval:5e3,pause:"hover",wrap:!0,keyboard:!0};t.prototype.keydown=function(n){if(!/input|textarea/i.test(n.target.tagName)){switch(n.which){case 37:this.prev();break;case 39:this.next();break;default:return}n.preventDefault()}};t.prototype.cycle=function(t){return t||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(n.proxy(this.next,this),this.options.interval)),this};t.prototype.getItemIndex=function(n){return this.$items=n.parent().children(".item"),this.$items.index(n||this.$active)};t.prototype.getItemForDirection=function(n,t){var i=this.getItemIndex(t),r;return("prev"==n&&0===i||"next"==n&&i==this.$items.length-1)&&!this.options.wrap?t:(r=(i+("prev"==n?-1:1))%this.$items.length,this.$items.eq(r))};t.prototype.to=function(n){var i=this,t=this.getItemIndex(this.$active=this.$element.find(".item.active"));if(!(n>this.$items.length-1||n<0))return this.sliding?this.$element.one("slid.bs.carousel",function(){i.to(n)}):t==n?this.pause().cycle():this.slide(t<n?"next":"prev",this.$items.eq(n))};t.prototype.pause=function(t){return t||(this.paused=!0),this.$element.find(".next, .prev").length&&n.support.transition&&(this.$element.trigger(n.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this};t.prototype.next=function(){if(!this.sliding)return this.slide("next")};t.prototype.prev=function(){if(!this.sliding)return this.slide("prev")};t.prototype.slide=function(i,r){var e=this.$element.find(".item.active"),u=r||this.getItemForDirection(i,e),l=this.interval,f="next"==i?"left":"right",a=this,o,s,h,c;return u.hasClass("active")?this.sliding=!1:(o=u[0],s=n.Event("slide.bs.carousel",{relatedTarget:o,direction:f}),(this.$element.trigger(s),!s.isDefaultPrevented())?((this.sliding=!0,l&&this.pause(),this.$indicators.length)&&(this.$indicators.find(".active").removeClass("active"),h=n(this.$indicators.children()[this.getItemIndex(u)]),h&&h.addClass("active")),c=n.Event("slid.bs.carousel",{relatedTarget:o,direction:f}),n.support.transition&&this.$element.hasClass("slide")?(u.addClass(i),"object"==typeof u&&u.length&&u[0].offsetWidth,e.addClass(f),u.addClass(f),e.one("bsTransitionEnd",function(){u.removeClass([i,f].join(" ")).addClass("active");e.removeClass(["active",f].join(" "));a.sliding=!1;setTimeout(function(){a.$element.trigger(c)},0)}).emulateTransitionEnd(t.TRANSITION_DURATION)):(e.removeClass("active"),u.addClass("active"),this.sliding=!1,this.$element.trigger(c)),l&&this.cycle(),this):void 0)};u=n.fn.carousel;n.fn.carousel=i;n.fn.carousel.Constructor=t;n.fn.carousel.noConflict=function(){return n.fn.carousel=u,this};r=function(t){var u=n(this),f=u.attr("href"),s,r,o,e;f&&(f=f.replace(/.*(?=#[^\s]+$)/,""));s=u.attr("data-target")||f;r=n(document).find(s);r.hasClass("carousel")&&(o=n.extend({},r.data(),u.data()),e=u.attr("data-slide-to"),e&&(o.interval=!1),i.call(r,o),e&&r.data("bs.carousel").to(e),t.preventDefault())};n(document).on("click.bs.carousel.data-api","[data-slide]",r).on("click.bs.carousel.data-api","[data-slide-to]",r);n(window).on("load",function(){n('[data-ride="carousel"]').each(function(){var t=n(this);i.call(t,t.data())})})}(jQuery),function(n){"use strict";function r(t){var i,r=t.attr("data-target")||(i=t.attr("href"))&&i.replace(/.*(?=#[^\s]+$)/,"");return n(document).find(r)}function i(i){return this.each(function(){var u=n(this),r=u.data("bs.collapse"),f=n.extend({},t.DEFAULTS,u.data(),"object"==typeof i&&i);!r&&f.toggle&&/show|hide/.test(i)&&(f.toggle=!1);r||u.data("bs.collapse",r=new t(this,f));"string"==typeof i&&r[i]()})}var t=function(i,r){this.$element=n(i);this.options=n.extend({},t.DEFAULTS,r);this.$trigger=n('[data-toggle="collapse"][href="#'+i.id+'"],[data-toggle="collapse"][data-target="#'+i.id+'"]');this.transitioning=null;this.options.parent?this.$parent=this.getParent():this.addAriaAndCollapsedClass(this.$element,this.$trigger);this.options.toggle&&this.toggle()},u;t.VERSION="3.4.1";t.TRANSITION_DURATION=350;t.DEFAULTS={toggle:!0};t.prototype.dimension=function(){return this.$element.hasClass("width")?"width":"height"};t.prototype.show=function(){var f,r,e,u,o,s;if(!this.transitioning&&!this.$element.hasClass("in")&&(r=this.$parent&&this.$parent.children(".panel").children(".in, .collapsing"),!(r&&r.length&&(f=r.data("bs.collapse"))&&f.transitioning)&&(e=n.Event("show.bs.collapse"),this.$element.trigger(e),!e.isDefaultPrevented()))){if(r&&r.length&&(i.call(r,"hide"),f||r.data("bs.collapse",null)),u=this.dimension(),this.$element.removeClass("collapse").addClass("collapsing")[u](0).attr("aria-expanded",!0),this.$trigger.removeClass("collapsed").attr("aria-expanded",!0),this.transitioning=1,o=function(){this.$element.removeClass("collapsing").addClass("collapse in")[u]("");this.transitioning=0;this.$element.trigger("shown.bs.collapse")},!n.support.transition)return o.call(this);s=n.camelCase(["scroll",u].join("-"));this.$element.one("bsTransitionEnd",n.proxy(o,this)).emulateTransitionEnd(t.TRANSITION_DURATION)[u](this.$element[0][s])}};t.prototype.hide=function(){var r,i,u;if(!this.transitioning&&this.$element.hasClass("in")&&(r=n.Event("hide.bs.collapse"),this.$element.trigger(r),!r.isDefaultPrevented())){if(i=this.dimension(),this.$element[i](this.$element[i]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse in").attr("aria-expanded",!1),this.$trigger.addClass("collapsed").attr("aria-expanded",!1),this.transitioning=1,u=function(){this.transitioning=0;this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")},!n.support.transition)return u.call(this);this.$element[i](0).one("bsTransitionEnd",n.proxy(u,this)).emulateTransitionEnd(t.TRANSITION_DURATION)}};t.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()};t.prototype.getParent=function(){return n(document).find(this.options.parent).find('[data-toggle="collapse"][data-parent="'+this.options.parent+'"]').each(n.proxy(function(t,i){var u=n(i);this.addAriaAndCollapsedClass(r(u),u)},this)).end()};t.prototype.addAriaAndCollapsedClass=function(n,t){var i=n.hasClass("in");n.attr("aria-expanded",i);t.toggleClass("collapsed",!i).attr("aria-expanded",i)};u=n.fn.collapse;n.fn.collapse=i;n.fn.collapse.Constructor=t;n.fn.collapse.noConflict=function(){return n.fn.collapse=u,this};n(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',function(t){var u=n(this),f,e;u.attr("data-target")||t.preventDefault();f=r(u);e=f.data("bs.collapse")?"toggle":u.data();i.call(f,e)})}(jQuery),function(n){"use strict";function r(t){var i=t.attr("data-target"),r;return i||(i=(i=t.attr("href"))&&/#[A-Za-z]/.test(i)&&i.replace(/.*(?=#[^\s]*$)/,"")),r="#"!==i?n(document).find(i):null,r&&r.length?r:t.parent()}function u(t){t&&3===t.which||(n(".dropdown-backdrop").remove(),n(i).each(function(){var u=n(this),i=r(u),f={relatedTarget:this};i.hasClass("open")&&(t&&"click"==t.type&&/input|textarea/i.test(t.target.tagName)&&n.contains(i[0],t.target)||(i.trigger(t=n.Event("hide.bs.dropdown",f)),t.isDefaultPrevented()||(u.attr("aria-expanded","false"),i.removeClass("open").trigger(n.Event("hidden.bs.dropdown",f)))))}))}var i='[data-toggle="dropdown"]',t=function(t){n(t).on("click.bs.dropdown",this.toggle)},f;t.VERSION="3.4.1";t.prototype.toggle=function(t){var f=n(this),i,o,e;if(!f.is(".disabled, :disabled")){if(i=r(f),o=i.hasClass("open"),u(),!o){if("ontouchstart"in document.documentElement&&!i.closest(".navbar-nav").length&&n(document.createElement("div")).addClass("dropdown-backdrop").insertAfter(n(this)).on("click",u),e={relatedTarget:this},i.trigger(t=n.Event("show.bs.dropdown",e)),t.isDefaultPrevented())return;f.trigger("focus").attr("aria-expanded","true");i.toggleClass("open").trigger(n.Event("shown.bs.dropdown",e))}return!1}};t.prototype.keydown=function(t){var e,o,s,f,u;if(/(38|40|27|32)/.test(t.which)&&!/input|textarea/i.test(t.target.tagName)&&(e=n(this),t.preventDefault(),t.stopPropagation(),!e.is(".disabled, :disabled"))){if(o=r(e),s=o.hasClass("open"),!s&&27!=t.which||s&&27==t.which)return 27==t.which&&o.find(i).trigger("focus"),e.trigger("click");f=o.find(".dropdown-menu li:not(.disabled):visible a");f.length&&(u=f.index(t.target),38==t.which&&0<u&&u--,40==t.which&&u<f.length-1&&u++,~u||(u=0),f.eq(u).trigger("focus"))}};f=n.fn.dropdown;n.fn.dropdown=function(i){return this.each(function(){var r=n(this),u=r.data("bs.dropdown");u||r.data("bs.dropdown",u=new t(this));"string"==typeof i&&u[i].call(r)})};n.fn.dropdown.Constructor=t;n.fn.dropdown.noConflict=function(){return n.fn.dropdown=f,this};n(document).on("click.bs.dropdown.data-api",u).on("click.bs.dropdown.data-api",".dropdown form",function(n){n.stopPropagation()}).on("click.bs.dropdown.data-api",i,t.prototype.toggle).on("keydown.bs.dropdown.data-api",i,t.prototype.keydown).on("keydown.bs.dropdown.data-api",".dropdown-menu",t.prototype.keydown)}(jQuery),function(n){"use strict";function i(i,r){return this.each(function(){var f=n(this),u=f.data("bs.modal"),e=n.extend({},t.DEFAULTS,f.data(),"object"==typeof i&&i);u||f.data("bs.modal",u=new t(this,e));"string"==typeof i?u[i](r):e.show&&u.show(r)})}var t=function(t,i){this.options=i;this.$body=n(document.body);this.$element=n(t);this.$dialog=this.$element.find(".modal-dialog");this.$backdrop=null;this.isShown=null;this.originalBodyPad=null;this.scrollbarWidth=0;this.ignoreBackdropClick=!1;this.fixedContent=".navbar-fixed-top, .navbar-fixed-bottom";this.options.remote&&this.$element.find(".modal-content").load(this.options.remote,n.proxy(function(){this.$element.trigger("loaded.bs.modal")},this))},r;t.VERSION="3.4.1";t.TRANSITION_DURATION=300;t.BACKDROP_TRANSITION_DURATION=150;t.DEFAULTS={backdrop:!0,keyboard:!0,show:!0};t.prototype.toggle=function(n){return this.isShown?this.hide():this.show(n)};t.prototype.show=function(i){var r=this,u=n.Event("show.bs.modal",{relatedTarget:i});this.$element.trigger(u);this.isShown||u.isDefaultPrevented()||(this.isShown=!0,this.checkScrollbar(),this.setScrollbar(),this.$body.addClass("modal-open"),this.escape(),this.resize(),this.$element.on("click.dismiss.bs.modal",'[data-dismiss="modal"]',n.proxy(this.hide,this)),this.$dialog.on("mousedown.dismiss.bs.modal",function(){r.$element.one("mouseup.dismiss.bs.modal",function(t){n(t.target).is(r.$element)&&(r.ignoreBackdropClick=!0)})}),this.backdrop(function(){var f=n.support.transition&&r.$element.hasClass("fade"),u;r.$element.parent().length||r.$element.appendTo(r.$body);r.$element.show().scrollTop(0);r.adjustDialog();f&&r.$element[0].offsetWidth;r.$element.addClass("in");r.enforceFocus();u=n.Event("shown.bs.modal",{relatedTarget:i});f?r.$dialog.one("bsTransitionEnd",function(){r.$element.trigger("focus").trigger(u)}).emulateTransitionEnd(t.TRANSITION_DURATION):r.$element.trigger("focus").trigger(u)}))};t.prototype.hide=function(i){i&&i.preventDefault();i=n.Event("hide.bs.modal");this.$element.trigger(i);this.isShown&&!i.isDefaultPrevented()&&(this.isShown=!1,this.escape(),this.resize(),n(document).off("focusin.bs.modal"),this.$element.removeClass("in").off("click.dismiss.bs.modal").off("mouseup.dismiss.bs.modal"),this.$dialog.off("mousedown.dismiss.bs.modal"),n.support.transition&&this.$element.hasClass("fade")?this.$element.one("bsTransitionEnd",n.proxy(this.hideModal,this)).emulateTransitionEnd(t.TRANSITION_DURATION):this.hideModal())};t.prototype.enforceFocus=function(){n(document).off("focusin.bs.modal").on("focusin.bs.modal",n.proxy(function(n){document===n.target||this.$element[0]===n.target||this.$element.has(n.target).length||this.$element.trigger("focus")},this))};t.prototype.escape=function(){this.isShown&&this.options.keyboard?this.$element.on("keydown.dismiss.bs.modal",n.proxy(function(n){27==n.which&&this.hide()},this)):this.isShown||this.$element.off("keydown.dismiss.bs.modal")};t.prototype.resize=function(){this.isShown?n(window).on("resize.bs.modal",n.proxy(this.handleUpdate,this)):n(window).off("resize.bs.modal")};t.prototype.hideModal=function(){var n=this;this.$element.hide();this.backdrop(function(){n.$body.removeClass("modal-open");n.resetAdjustments();n.resetScrollbar();n.$element.trigger("hidden.bs.modal")})};t.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove();this.$backdrop=null};t.prototype.backdrop=function(i){var e=this,f=this.$element.hasClass("fade")?"fade":"",r,u;if(this.isShown&&this.options.backdrop){if(r=n.support.transition&&f,this.$backdrop=n(document.createElement("div")).addClass("modal-backdrop "+f).appendTo(this.$body),this.$element.on("click.dismiss.bs.modal",n.proxy(function(n){this.ignoreBackdropClick?this.ignoreBackdropClick=!1:n.target===n.currentTarget&&("static"==this.options.backdrop?this.$element[0].focus():this.hide())},this)),r&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),!i)return;r?this.$backdrop.one("bsTransitionEnd",i).emulateTransitionEnd(t.BACKDROP_TRANSITION_DURATION):i()}else!this.isShown&&this.$backdrop?(this.$backdrop.removeClass("in"),u=function(){e.removeBackdrop();i&&i()},n.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one("bsTransitionEnd",u).emulateTransitionEnd(t.BACKDROP_TRANSITION_DURATION):u()):i&&i()};t.prototype.handleUpdate=function(){this.adjustDialog()};t.prototype.adjustDialog=function(){var n=this.$element[0].scrollHeight>document.documentElement.clientHeight;this.$element.css({paddingLeft:!this.bodyIsOverflowing&&n?this.scrollbarWidth:"",paddingRight:this.bodyIsOverflowing&&!n?this.scrollbarWidth:""})};t.prototype.resetAdjustments=function(){this.$element.css({paddingLeft:"",paddingRight:""})};t.prototype.checkScrollbar=function(){var n=window.innerWidth,t;n||(t=document.documentElement.getBoundingClientRect(),n=t.right-Math.abs(t.left));this.bodyIsOverflowing=document.body.clientWidth<n;this.scrollbarWidth=this.measureScrollbar()};t.prototype.setScrollbar=function(){var i=parseInt(this.$body.css("padding-right")||0,10),t;this.originalBodyPad=document.body.style.paddingRight||"";t=this.scrollbarWidth;this.bodyIsOverflowing&&(this.$body.css("padding-right",i+t),n(this.fixedContent).each(function(i,r){var u=r.style.paddingRight,f=n(r).css("padding-right");n(r).data("padding-right",u).css("padding-right",parseFloat(f)+t+"px")}))};t.prototype.resetScrollbar=function(){this.$body.css("padding-right",this.originalBodyPad);n(this.fixedContent).each(function(t,i){var r=n(i).data("padding-right");n(i).removeData("padding-right");i.style.paddingRight=r||""})};t.prototype.measureScrollbar=function(){var n=document.createElement("div"),t;return n.className="modal-scrollbar-measure",this.$body.append(n),t=n.offsetWidth-n.clientWidth,this.$body[0].removeChild(n),t};r=n.fn.modal;n.fn.modal=i;n.fn.modal.Constructor=t;n.fn.modal.noConflict=function(){return n.fn.modal=r,this};n(document).on("click.bs.modal.data-api",'[data-toggle="modal"]',function(t){var r=n(this),f=r.attr("href"),e=r.attr("data-target")||f&&f.replace(/.*(?=#[^\s]+$)/,""),u=n(document).find(e),o=u.data("bs.modal")?"toggle":n.extend({remote:!/#/.test(f)&&f},u.data(),r.data());r.is("a")&&t.preventDefault();u.one("show.bs.modal",function(n){n.isDefaultPrevented()||u.one("hidden.bs.modal",function(){r.is(":visible")&&r.trigger("focus")})});i.call(u,o,this)})}(jQuery),function(n){"use strict";function s(t,i){var r=t.nodeName.toLowerCase();if(-1!==n.inArray(r,i))return-1===n.inArray(r,f)||Boolean(t.nodeValue.match(e)||t.nodeValue.match(o));for(var s=n(i).filter(function(n,t){return t instanceof RegExp}),u=0,h=s.length;u<h;u++)if(r.match(s[u]))return!0;return!1}function i(t,i,r){var f,u,h;if(0===t.length)return t;if(r&&"function"==typeof r)return r(t);if(!document.implementation||!document.implementation.createHTMLDocument)return t;f=document.implementation.createHTMLDocument("sanitization");f.body.innerHTML=t;for(var a=n.map(i,function(n,t){return t}),l=n(f.body).find("*"),o=0,v=l.length;o<v;o++)if(u=l[o],h=u.nodeName.toLowerCase(),-1!==n.inArray(h,a))for(var c=n.map(u.attributes,function(n){return n}),y=[].concat(i["*"]||[],i[h]||[]),e=0,p=c.length;e<p;e++)s(c[e],y)||u.removeAttribute(c[e].nodeName);else u.parentNode.removeChild(u);return f.body.innerHTML}var u=["sanitize","whiteList","sanitizeFn"],f=["background","cite","href","itemtype","longdesc","poster","src","xlink:href"],e=/^(?:(?:https?|mailto|ftp|tel|file):|[^&:/?#]*(?:[/?#]|$))/gi,o=/^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[a-z0-9+/]+=*$/i,t=function(n,t){this.type=null;this.options=null;this.enabled=null;this.timeout=null;this.hoverState=null;this.$element=null;this.inState=null;this.init("tooltip",n,t)},r;t.VERSION="3.4.1";t.TRANSITION_DURATION=150;t.DEFAULTS={animation:!0,placement:"top",selector:!1,template:'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"><\/div><div class="tooltip-inner"><\/div><\/div>',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0},sanitize:!0,sanitizeFn:null,whiteList:{"*":["class","dir","id","lang","role",/^aria-[\w-]*$/i],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],div:[],em:[],hr:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],i:[],img:["src","alt","title","width","height"],li:[],ol:[],p:[],pre:[],s:[],small:[],span:[],sub:[],sup:[],strong:[],u:[],ul:[]}};t.prototype.init=function(t,i,r){var f,e,u,o,s;if(this.enabled=!0,this.type=t,this.$element=n(i),this.options=this.getOptions(r),this.$viewport=this.options.viewport&&n(document).find(n.isFunction(this.options.viewport)?this.options.viewport.call(this,this.$element):this.options.viewport.selector||this.options.viewport),this.inState={click:!1,hover:!1,focus:!1},this.$element[0]instanceof document.constructor&&!this.options.selector)throw new Error("`selector` option must be specified when initializing "+this.type+" on the window.document object!");for(f=this.options.trigger.split(" "),e=f.length;e--;)if(u=f[e],"click"==u)this.$element.on("click."+this.type,this.options.selector,n.proxy(this.toggle,this));else"manual"!=u&&(o="hover"==u?"mouseenter":"focusin",s="hover"==u?"mouseleave":"focusout",this.$element.on(o+"."+this.type,this.options.selector,n.proxy(this.enter,this)),this.$element.on(s+"."+this.type,this.options.selector,n.proxy(this.leave,this)));this.options.selector?this._options=n.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()};t.prototype.getDefaults=function(){return t.DEFAULTS};t.prototype.getOptions=function(t){var r=this.$element.data();for(var f in r)r.hasOwnProperty(f)&&-1!==n.inArray(f,u)&&delete r[f];return(t=n.extend({},this.getDefaults(),r,t)).delay&&"number"==typeof t.delay&&(t.delay={show:t.delay,hide:t.delay}),t.sanitize&&(t.template=i(t.template,t.whiteList,t.sanitizeFn)),t};t.prototype.getDelegateOptions=function(){var t={},i=this.getDefaults();return this._options&&n.each(this._options,function(n,r){i[n]!=r&&(t[n]=r)}),t};t.prototype.enter=function(t){var i=t instanceof this.constructor?t:n(t.currentTarget).data("bs."+this.type);if(i||(i=new this.constructor(t.currentTarget,this.getDelegateOptions()),n(t.currentTarget).data("bs."+this.type,i)),t instanceof n.Event&&(i.inState["focusin"==t.type?"focus":"hover"]=!0),i.tip().hasClass("in")||"in"==i.hoverState)i.hoverState="in";else{if(clearTimeout(i.timeout),i.hoverState="in",!i.options.delay||!i.options.delay.show)return i.show();i.timeout=setTimeout(function(){"in"==i.hoverState&&i.show()},i.options.delay.show)}};t.prototype.isInStateTrue=function(){for(var n in this.inState)if(this.inState[n])return!0;return!1};t.prototype.leave=function(t){var i=t instanceof this.constructor?t:n(t.currentTarget).data("bs."+this.type);if(i||(i=new this.constructor(t.currentTarget,this.getDelegateOptions()),n(t.currentTarget).data("bs."+this.type,i)),t instanceof n.Event&&(i.inState["focusout"==t.type?"focus":"hover"]=!1),!i.isInStateTrue()){if(clearTimeout(i.timeout),i.hoverState="out",!i.options.delay||!i.options.delay.hide)return i.hide();i.timeout=setTimeout(function(){"out"==i.hoverState&&i.hide()},i.options.delay.hide)}};t.prototype.show=function(){var c=n.Event("show.bs."+this.type),l,p,e,w,h;if(this.hasContent()&&this.enabled){if(this.$element.trigger(c),l=n.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]),c.isDefaultPrevented()||!l)return;var u=this,r=this.tip(),a=this.getUID(this.type);this.setContent();r.attr("id",a);this.$element.attr("aria-describedby",a);this.options.animation&&r.addClass("fade");var i="function"==typeof this.options.placement?this.options.placement.call(this,r[0],this.$element[0]):this.options.placement,v=/\s?auto?\s?/i,y=v.test(i);y&&(i=i.replace(v,"")||"top");r.detach().css({top:0,left:0,display:"block"}).addClass(i).data("bs."+this.type,this);this.options.container?r.appendTo(n(document).find(this.options.container)):r.insertAfter(this.$element);this.$element.trigger("inserted.bs."+this.type);var f=this.getPosition(),o=r[0].offsetWidth,s=r[0].offsetHeight;y&&(p=i,e=this.getPosition(this.$viewport),i="bottom"==i&&f.bottom+s>e.bottom?"top":"top"==i&&f.top-s<e.top?"bottom":"right"==i&&f.right+o>e.width?"left":"left"==i&&f.left-o<e.left?"right":i,r.removeClass(p).addClass(i));w=this.getCalculatedOffset(i,f,o,s);this.applyPlacement(w,i);h=function(){var n=u.hoverState;u.$element.trigger("shown.bs."+u.type);u.hoverState=null;"out"==n&&u.leave(u)};n.support.transition&&this.$tip.hasClass("fade")?r.one("bsTransitionEnd",h).emulateTransitionEnd(t.TRANSITION_DURATION):h()}};t.prototype.applyPlacement=function(t,i){var r=this.tip(),l=r[0].offsetWidth,e=r[0].offsetHeight,o=parseInt(r.css("margin-top"),10),s=parseInt(r.css("margin-left"),10),h,f,u;isNaN(o)&&(o=0);isNaN(s)&&(s=0);t.top+=o;t.left+=s;n.offset.setOffset(r[0],n.extend({using:function(n){r.css({top:Math.round(n.top),left:Math.round(n.left)})}},t),0);r.addClass("in");h=r[0].offsetWidth;f=r[0].offsetHeight;"top"==i&&f!=e&&(t.top=t.top+e-f);u=this.getViewportAdjustedDelta(i,t,h,f);u.left?t.left+=u.left:t.top+=u.top;var c=/top|bottom/.test(i),a=c?2*u.left-l+h:2*u.top-e+f,v=c?"offsetWidth":"offsetHeight";r.offset(t);this.replaceArrow(a,r[0][v],c)};t.prototype.replaceArrow=function(n,t,i){this.arrow().css(i?"left":"top",50*(1-n/t)+"%").css(i?"top":"left","")};t.prototype.setContent=function(){var t=this.tip(),n=this.getTitle();this.options.html?(this.options.sanitize&&(n=i(n,this.options.whiteList,this.options.sanitizeFn)),t.find(".tooltip-inner").html(n)):t.find(".tooltip-inner").text(n);t.removeClass("fade in top bottom left right")};t.prototype.hide=function(i){function e(){"in"!=r.hoverState&&u.detach();r.$element&&r.$element.removeAttr("aria-describedby").trigger("hidden.bs."+r.type);i&&i()}var r=this,u=n(this.$tip),f=n.Event("hide.bs."+this.type);if(this.$element.trigger(f),!f.isDefaultPrevented())return u.removeClass("in"),n.support.transition&&u.hasClass("fade")?u.one("bsTransitionEnd",e).emulateTransitionEnd(t.TRANSITION_DURATION):e(),this.hoverState=null,this};t.prototype.fixTitle=function(){var n=this.$element;(n.attr("title")||"string"!=typeof n.attr("data-original-title"))&&n.attr("data-original-title",n.attr("title")||"").attr("title","")};t.prototype.hasContent=function(){return this.getTitle()};t.prototype.getPosition=function(t){var r=(t=t||this.$element)[0],u="BODY"==r.tagName,i=r.getBoundingClientRect();null==i.width&&(i=n.extend({},i,{width:i.right-i.left,height:i.bottom-i.top}));var f=window.SVGElement&&r instanceof window.SVGElement,e=u?{top:0,left:0}:f?null:t.offset(),o={scroll:u?document.documentElement.scrollTop||document.body.scrollTop:t.scrollTop()},s=u?{width:n(window).width(),height:n(window).height()}:null;return n.extend({},i,o,s,e)};t.prototype.getCalculatedOffset=function(n,t,i,r){return"bottom"==n?{top:t.top+t.height,left:t.left+t.width/2-i/2}:"top"==n?{top:t.top-r,left:t.left+t.width/2-i/2}:"left"==n?{top:t.top+t.height/2-r/2,left:t.left-i}:{top:t.top+t.height/2-r/2,left:t.left+t.width}};t.prototype.getViewportAdjustedDelta=function(n,t,i,r){var f={top:0,left:0},e,u,o,s,h,c;return this.$viewport?(e=this.options.viewport&&this.options.viewport.padding||0,u=this.getPosition(this.$viewport),/right|left/.test(n)?(o=t.top-e-u.scroll,s=t.top+e-u.scroll+r,o<u.top?f.top=u.top-o:s>u.top+u.height&&(f.top=u.top+u.height-s)):(h=t.left-e,c=t.left+e+i,h<u.left?f.left=u.left-h:c>u.right&&(f.left=u.left+u.width-c)),f):f};t.prototype.getTitle=function(){var t=this.$element,n=this.options;return t.attr("data-original-title")||("function"==typeof n.title?n.title.call(t[0]):n.title)};t.prototype.getUID=function(n){for(;n+=~~(1e6*Math.random()),document.getElementById(n););return n};t.prototype.tip=function(){if(!this.$tip&&(this.$tip=n(this.options.template),1!=this.$tip.length))throw new Error(this.type+" `template` option must consist of exactly 1 top-level element!");return this.$tip};t.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")};t.prototype.enable=function(){this.enabled=!0};t.prototype.disable=function(){this.enabled=!1};t.prototype.toggleEnabled=function(){this.enabled=!this.enabled};t.prototype.toggle=function(t){var i=this;t&&((i=n(t.currentTarget).data("bs."+this.type))||(i=new this.constructor(t.currentTarget,this.getDelegateOptions()),n(t.currentTarget).data("bs."+this.type,i)));t?(i.inState.click=!i.inState.click,i.isInStateTrue()?i.enter(i):i.leave(i)):i.tip().hasClass("in")?i.leave(i):i.enter(i)};t.prototype.destroy=function(){var n=this;clearTimeout(this.timeout);this.hide(function(){n.$element.off("."+n.type).removeData("bs."+n.type);n.$tip&&n.$tip.detach();n.$tip=null;n.$arrow=null;n.$viewport=null;n.$element=null})};t.prototype.sanitizeHtml=function(n){return i(n,this.options.whiteList,this.options.sanitizeFn)};r=n.fn.tooltip;n.fn.tooltip=function(i){return this.each(function(){var u=n(this),r=u.data("bs.tooltip"),f="object"==typeof i&&i;!r&&/destroy|hide/.test(i)||(r||u.data("bs.tooltip",r=new t(this,f)),"string"==typeof i&&r[i]())})};n.fn.tooltip.Constructor=t;n.fn.tooltip.noConflict=function(){return n.fn.tooltip=r,this}}(jQuery),function(n){"use strict";var t=function(n,t){this.init("popover",n,t)},i;if(!n.fn.tooltip)throw new Error("Popover requires tooltip.js");t.VERSION="3.4.1";t.DEFAULTS=n.extend({},n.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:'<div class="popover" role="tooltip"><div class="arrow"><\/div><h3 class="popover-title"><\/h3><div class="popover-content"><\/div><\/div>'});((t.prototype=n.extend({},n.fn.tooltip.Constructor.prototype)).constructor=t).prototype.getDefaults=function(){return t.DEFAULTS};t.prototype.setContent=function(){var n=this.tip(),i=this.getTitle(),t=this.getContent(),r;this.options.html?(r=typeof t,this.options.sanitize&&(i=this.sanitizeHtml(i),"string"===r&&(t=this.sanitizeHtml(t))),n.find(".popover-title").html(i),n.find(".popover-content").children().detach().end()["string"===r?"html":"append"](t)):(n.find(".popover-title").text(i),n.find(".popover-content").children().detach().end().text(t));n.removeClass("fade top bottom left right in");n.find(".popover-title").html()||n.find(".popover-title").hide()};t.prototype.hasContent=function(){return this.getTitle()||this.getContent()};t.prototype.getContent=function(){var t=this.$element,n=this.options;return t.attr("data-content")||("function"==typeof n.content?n.content.call(t[0]):n.content)};t.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")};i=n.fn.popover;n.fn.popover=function(i){return this.each(function(){var u=n(this),r=u.data("bs.popover"),f="object"==typeof i&&i;!r&&/destroy|hide/.test(i)||(r||u.data("bs.popover",r=new t(this,f)),"string"==typeof i&&r[i]())})};n.fn.popover.Constructor=t;n.fn.popover.noConflict=function(){return n.fn.popover=i,this}}(jQuery),function(n){"use strict";function t(i,r){this.$body=n(document.body);this.$scrollElement=n(i).is(document.body)?n(window):n(i);this.options=n.extend({},t.DEFAULTS,r);this.selector=(this.options.target||"")+" .nav li > a";this.offsets=[];this.targets=[];this.activeTarget=null;this.scrollHeight=0;this.$scrollElement.on("scroll.bs.scrollspy",n.proxy(this.process,this));this.refresh();this.process()}function i(i){return this.each(function(){var u=n(this),r=u.data("bs.scrollspy"),f="object"==typeof i&&i;r||u.data("bs.scrollspy",r=new t(this,f));"string"==typeof i&&r[i]()})}t.VERSION="3.4.1";t.DEFAULTS={offset:10};t.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)};t.prototype.refresh=function(){var t=this,i="offset",r=0;this.offsets=[];this.targets=[];this.scrollHeight=this.getScrollHeight();n.isWindow(this.$scrollElement[0])||(i="position",r=this.$scrollElement.scrollTop());this.$body.find(this.selector).map(function(){var f=n(this),u=f.data("target")||f.attr("href"),t=/^#./.test(u)&&n(u);return t&&t.length&&t.is(":visible")&&[[t[i]().top+r,u]]||null}).sort(function(n,t){return n[0]-t[0]}).each(function(){t.offsets.push(this[0]);t.targets.push(this[1])})};t.prototype.process=function(){var n,i=this.$scrollElement.scrollTop()+this.options.offset,f=this.getScrollHeight(),e=this.options.offset+f-this.$scrollElement.height(),t=this.offsets,r=this.targets,u=this.activeTarget;if(this.scrollHeight!=f&&this.refresh(),e<=i)return u!=(n=r[r.length-1])&&this.activate(n);if(u&&i<t[0])return this.activeTarget=null,this.clear();for(n=t.length;n--;)u!=r[n]&&i>=t[n]&&(t[n+1]===undefined||i<t[n+1])&&this.activate(r[n])};t.prototype.activate=function(t){this.activeTarget=t;this.clear();var r=this.selector+'[data-target="'+t+'"],'+this.selector+'[href="'+t+'"]',i=n(r).parents("li").addClass("active");i.parent(".dropdown-menu").length&&(i=i.closest("li.dropdown").addClass("active"));i.trigger("activate.bs.scrollspy")};t.prototype.clear=function(){n(this.selector).parentsUntil(this.options.target,".active").removeClass("active")};var r=n.fn.scrollspy;n.fn.scrollspy=i;n.fn.scrollspy.Constructor=t;n.fn.scrollspy.noConflict=function(){return n.fn.scrollspy=r,this};n(window).on("load.bs.scrollspy.data-api",function(){n('[data-spy="scroll"]').each(function(){var t=n(this);i.call(t,t.data())})})}(jQuery),function(n){"use strict";function r(i){return this.each(function(){var u=n(this),r=u.data("bs.tab");r||u.data("bs.tab",r=new t(this));"string"==typeof i&&r[i]()})}var t=function(t){this.element=n(t)},u,i;t.VERSION="3.4.1";t.TRANSITION_DURATION=150;t.prototype.show=function(){var t=this.element,f=t.closest("ul:not(.dropdown-menu)"),i=t.data("target"),u;if(i||(i=(i=t.attr("href"))&&i.replace(/.*(?=#[^\s]*$)/,"")),!t.parent("li").hasClass("active")){var r=f.find(".active:last a"),e=n.Event("hide.bs.tab",{relatedTarget:t[0]}),o=n.Event("show.bs.tab",{relatedTarget:r[0]});(r.trigger(e),t.trigger(o),o.isDefaultPrevented()||e.isDefaultPrevented())||(u=n(document).find(i),this.activate(t.closest("li"),f),this.activate(u,u.parent(),function(){r.trigger({type:"hidden.bs.tab",relatedTarget:t[0]});t.trigger({type:"shown.bs.tab",relatedTarget:r[0]})}))}};t.prototype.activate=function(i,r,u){function o(){f.removeClass("active").find("> .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!1);i.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded",!0);e?(i[0].offsetWidth,i.addClass("in")):i.removeClass("fade");i.parent(".dropdown-menu").length&&i.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!0);u&&u()}var f=r.find("> .active"),e=u&&n.support.transition&&(f.length&&f.hasClass("fade")||!!r.find("> .fade").length);f.length&&e?f.one("bsTransitionEnd",o).emulateTransitionEnd(t.TRANSITION_DURATION):o();f.removeClass("in")};u=n.fn.tab;n.fn.tab=r;n.fn.tab.Constructor=t;n.fn.tab.noConflict=function(){return n.fn.tab=u,this};i=function(t){t.preventDefault();r.call(n(this),"show")};n(document).on("click.bs.tab.data-api",'[data-toggle="tab"]',i).on("click.bs.tab.data-api",'[data-toggle="pill"]',i)}(jQuery),function(n){"use strict";function i(i){return this.each(function(){var u=n(this),r=u.data("bs.affix"),f="object"==typeof i&&i;r||u.data("bs.affix",r=new t(this,f));"string"==typeof i&&r[i]()})}var t=function(i,r){this.options=n.extend({},t.DEFAULTS,r);var u=this.options.target===t.DEFAULTS.target?n(this.options.target):n(document).find(this.options.target);this.$target=u.on("scroll.bs.affix.data-api",n.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",n.proxy(this.checkPositionWithEventLoop,this));this.$element=n(i);this.affixed=null;this.unpin=null;this.pinnedOffset=null;this.checkPosition()},r;t.VERSION="3.4.1";t.RESET="affix affix-top affix-bottom";t.DEFAULTS={offset:0,target:window};t.prototype.getState=function(n,t,i,r){var u=this.$target.scrollTop(),e=this.$element.offset(),o=this.$target.height(),f,s;return null!=i&&"top"==this.affixed?u<i&&"top":"bottom"==this.affixed?null!=i?!(u+this.unpin<=e.top)&&"bottom":!(u+o<=n-r)&&"bottom":(f=null==this.affixed,s=f?u:e.top,null!=i&&u<=i?"top":null!=r&&n-r<=s+(f?o:t)&&"bottom")};t.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(t.RESET).addClass("affix");var n=this.$target.scrollTop(),i=this.$element.offset();return this.pinnedOffset=i.top-n};t.prototype.checkPositionWithEventLoop=function(){setTimeout(n.proxy(this.checkPosition,this),1)};t.prototype.checkPosition=function(){var i,e,o;if(this.$element.is(":visible")){var s=this.$element.height(),r=this.options.offset,f=r.top,u=r.bottom,h=Math.max(n(document).height(),n(document.body).height());if("object"!=typeof r&&(u=f=r),"function"==typeof f&&(f=r.top(this.$element)),"function"==typeof u&&(u=r.bottom(this.$element)),i=this.getState(h,s,f,u),this.affixed!=i){if(null!=this.unpin&&this.$element.css("top",""),e="affix"+(i?"-"+i:""),o=n.Event(e+".bs.affix"),this.$element.trigger(o),o.isDefaultPrevented())return;this.affixed=i;this.unpin="bottom"==i?this.getPinnedOffset():null;this.$element.removeClass(t.RESET).addClass(e).trigger(e.replace("affix","affixed")+".bs.affix")}"bottom"==i&&this.$element.offset({top:h-s-u})}};r=n.fn.affix;n.fn.affix=i;n.fn.affix.Constructor=t;n.fn.affix.noConflict=function(){return n.fn.affix=r,this};n(window).on("load",function(){n('[data-spy="affix"]').each(function(){var r=n(this),t=r.data();t.offset=t.offset||{};null!=t.offsetBottom&&(t.offset.bottom=t.offsetBottom);null!=t.offsetTop&&(t.offset.top=t.offsetTop);i.call(r,t)})})}(jQuery);!function(n){"function"==typeof define&&define.amd?define(["jquery"],n):n("object"==typeof exports?require("jquery"):jQuery)}(function(n,t){function f(){return new Date(Date.UTC.apply(Date,arguments))}function o(){var n=new Date;return f(n.getFullYear(),n.getMonth(),n.getDate())}function l(n,t){return n.getUTCFullYear()===t.getUTCFullYear()&&n.getUTCMonth()===t.getUTCMonth()&&n.getUTCDate()===t.getUTCDate()}function h(i,r){return function(){return r!==t&&n.fn.datepicker.deprecated(r),this[i].apply(this,arguments)}}function p(n){return n&&!isNaN(n.getTime())}function w(t,i){function o(n,t){return t.toLowerCase()}var u,f=n(t).data(),e={},s=new RegExp("^"+i.toLowerCase()+"([A-Z])"),r;i=new RegExp("^"+i.toLowerCase());for(r in f)i.test(r)&&(u=r.replace(s,o),e[u]=f[r]);return e}function b(t){var u={},i;if(r[t]||(t=t.split("-")[0],r[t]))return i=r[t],n.each(y,function(n,t){t in i&&(u[t]=i[t])}),u}var a=function(){var t={get:function(n){return this.slice(n)[0]},contains:function(n){for(var i=n&&n.valueOf(),t=0,r=this.length;t<r;t++)if(0<=this[t].valueOf()-i&&this[t].valueOf()-i<864e5)return t;return-1},remove:function(n){this.splice(n,1)},replace:function(t){t&&(n.isArray(t)||(t=[t]),this.clear(),this.push.apply(this,t))},clear:function(){this.length=0},copy:function(){var n=new a;return n.replace(this),n}};return function(){var i=[];return i.push.apply(i,arguments),n.extend(i,t),i}}(),u=function(t,r){n.data(t,"datepicker",this);this._events=[];this._secondaryEvents=[];this._process_options(r);this.dates=new a;this.viewDate=this.o.defaultViewDate;this.focusDate=null;this.element=n(t);this.isInput=this.element.is("input");this.inputField=this.isInput?this.element:this.element.find("input");this.component=!!this.element.hasClass("date")&&this.element.find(".add-on, .input-group-addon, .input-group-append, .input-group-prepend, .btn");this.component&&0===this.component.length&&(this.component=!1);this.isInline=!this.component&&this.element.is("div");this.picker=n(i.template);this._check_template(this.o.templates.leftArrow)&&this.picker.find(".prev").html(this.o.templates.leftArrow);this._check_template(this.o.templates.rightArrow)&&this.picker.find(".next").html(this.o.templates.rightArrow);this._buildEvents();this._attachEvents();this.isInline?this.picker.addClass("datepicker-inline").appendTo(this.element):this.picker.addClass("datepicker-dropdown dropdown-menu");this.o.rtl&&this.picker.addClass("datepicker-rtl");this.o.calendarWeeks&&this.picker.find(".datepicker-days .datepicker-switch, thead .datepicker-title, tfoot .today, tfoot .clear").attr("colspan",function(n,t){return Number(t)+1});this._process_options({startDate:this._o.startDate,endDate:this._o.endDate,daysOfWeekDisabled:this.o.daysOfWeekDisabled,daysOfWeekHighlighted:this.o.daysOfWeekHighlighted,datesDisabled:this.o.datesDisabled});this._allow_update=!1;this.setViewMode(this.o.startView);this._allow_update=!0;this.fillDow();this.fillMonths();this.update();this.isInline&&this.show()},c,v,s,e,y,r,i;u.prototype={constructor:u,_resolveViewName:function(t){return n.each(i.viewModes,function(i,r){if(t===i||-1!==n.inArray(t,r.names))return t=i,!1}),t},_resolveDaysOfWeek:function(t){return n.isArray(t)||(t=t.split(/[,\s]*/)),n.map(t,Number)},_check_template:function(i){try{return i===t||""===i?!1:(i.match(/[<>]/g)||[]).length<=0?!0:n(i).length>0}catch(n){return!1}},_process_options:function(t){var u,h,l,s,c;if(this._o=n.extend({},this._o,t),u=this.o=n.extend({},this._o),h=u.language,r[h]||(h=h.split("-")[0],r[h]||(h=e.language)),u.language=h,u.startView=this._resolveViewName(u.startView),u.minViewMode=this._resolveViewName(u.minViewMode),u.maxViewMode=this._resolveViewName(u.maxViewMode),u.startView=Math.max(this.o.minViewMode,Math.min(this.o.maxViewMode,u.startView)),!0!==u.multidate&&(u.multidate=Number(u.multidate)||!1,!1!==u.multidate&&(u.multidate=Math.max(0,u.multidate))),u.multidateSeparator=String(u.multidateSeparator),u.weekStart%=7,u.weekEnd=(u.weekStart+6)%7,l=i.parseFormat(u.format),u.startDate!==-1/0&&(u.startDate=u.startDate?u.startDate instanceof Date?this._local_to_utc(this._zero_time(u.startDate)):i.parseDate(u.startDate,l,u.language,u.assumeNearbyYear):-1/0),u.endDate!==1/0&&(u.endDate=u.endDate?u.endDate instanceof Date?this._local_to_utc(this._zero_time(u.endDate)):i.parseDate(u.endDate,l,u.language,u.assumeNearbyYear):1/0),u.daysOfWeekDisabled=this._resolveDaysOfWeek(u.daysOfWeekDisabled||[]),u.daysOfWeekHighlighted=this._resolveDaysOfWeek(u.daysOfWeekHighlighted||[]),u.datesDisabled=u.datesDisabled||[],n.isArray(u.datesDisabled)||(u.datesDisabled=u.datesDisabled.split(",")),u.datesDisabled=n.map(u.datesDisabled,function(n){return i.parseDate(n,l,u.language,u.assumeNearbyYear)}),s=String(u.orientation).toLowerCase().split(/\s+/g),c=u.orientation.toLowerCase(),s=n.grep(s,function(n){return/^auto|left|right|top|bottom$/.test(n)}),u.orientation={x:"auto",y:"auto"},c&&"auto"!==c)if(1===s.length)switch(s[0]){case"top":case"bottom":u.orientation.y=s[0];break;case"left":case"right":u.orientation.x=s[0]}else c=n.grep(s,function(n){return/^left|right$/.test(n)}),u.orientation.x=c[0]||"auto",c=n.grep(s,function(n){return/^top|bottom$/.test(n)}),u.orientation.y=c[0]||"auto";if(u.defaultViewDate instanceof Date||"string"==typeof u.defaultViewDate)u.defaultViewDate=i.parseDate(u.defaultViewDate,l,u.language,u.assumeNearbyYear);else if(u.defaultViewDate){var a=u.defaultViewDate.year||(new Date).getFullYear(),v=u.defaultViewDate.month||0,y=u.defaultViewDate.day||1;u.defaultViewDate=f(a,v,y)}else u.defaultViewDate=o()},_applyEvents:function(n){for(var f,r,u,i=0;i<n.length;i++)f=n[i][0],2===n[i].length?(r=t,u=n[i][1]):3===n[i].length&&(r=n[i][1],u=n[i][2]),f.on(u,r)},_unapplyEvents:function(n){for(var f,r,u,i=0;i<n.length;i++)f=n[i][0],2===n[i].length?(u=t,r=n[i][1]):3===n[i].length&&(u=n[i][1],r=n[i][2]),f.off(r,u)},_buildEvents:function(){var t={keyup:n.proxy(function(t){-1===n.inArray(t.keyCode,[27,37,39,38,40,32,13,9])&&this.update()},this),keydown:n.proxy(this.keydown,this),paste:n.proxy(this.paste,this)};!0===this.o.showOnFocus&&(t.focus=n.proxy(this.show,this));this._events=this.isInput?[[this.element,t]]:this.component&&this.inputField.length?[[this.inputField,t],[this.component,{click:n.proxy(this.show,this)}]]:[[this.element,{click:n.proxy(this.show,this),keydown:n.proxy(this.keydown,this)}]];this._events.push([this.element,"*",{blur:n.proxy(function(n){this._focused_from=n.target},this)}],[this.element,{blur:n.proxy(function(n){this._focused_from=n.target},this)}]);this.o.immediateUpdates&&this._events.push([this.element,{"changeYear changeMonth":n.proxy(function(n){this.update(n.date)},this)}]);this._secondaryEvents=[[this.picker,{click:n.proxy(this.click,this)}],[this.picker,".prev, .next",{click:n.proxy(this.navArrowsClick,this)}],[this.picker,".day:not(.disabled)",{click:n.proxy(this.dayCellClick,this)}],[n(window),{resize:n.proxy(this.place,this)}],[n(document),{"mousedown touchstart":n.proxy(function(n){this.element.is(n.target)||this.element.find(n.target).length||this.picker.is(n.target)||this.picker.find(n.target).length||this.isInline||this.hide()},this)}]]},_attachEvents:function(){this._detachEvents();this._applyEvents(this._events)},_detachEvents:function(){this._unapplyEvents(this._events)},_attachSecondaryEvents:function(){this._detachSecondaryEvents();this._applyEvents(this._secondaryEvents)},_detachSecondaryEvents:function(){this._unapplyEvents(this._secondaryEvents)},_trigger:function(t,r){var u=r||this.dates.get(-1),f=this._utc_to_local(u);this.element.trigger({type:t,date:f,viewMode:this.viewMode,dates:n.map(this.dates,this._utc_to_local),format:n.proxy(function(n,t){0===arguments.length?(n=this.dates.length-1,t=this.o.format):"string"==typeof n&&(t=n,n=this.dates.length-1);t=t||this.o.format;var r=this.dates.get(n);return i.formatDate(r,t,this.o.language)},this)})},show:function(){if(!(this.inputField.is(":disabled")||this.inputField.prop("readonly")&&!1===this.o.enableOnReadonly))return this.isInline||this.picker.appendTo(this.o.container),this.place(),this.picker.show(),this._attachSecondaryEvents(),this._trigger("show"),(window.navigator.msMaxTouchPoints||"ontouchstart"in document)&&this.o.disableTouchKeyboard&&n(this.element).blur(),this},hide:function(){return this.isInline||!this.picker.is(":visible")?this:(this.focusDate=null,this.picker.hide().detach(),this._detachSecondaryEvents(),this.setViewMode(this.o.startView),this.o.forceParse&&this.inputField.val()&&this.setValue(),this._trigger("hide"),this)},destroy:function(){return this.hide(),this._detachEvents(),this._detachSecondaryEvents(),this.picker.remove(),delete this.element.data().datepicker,this.isInput||delete this.element.data().date,this},paste:function(t){var i;if(t.originalEvent.clipboardData&&t.originalEvent.clipboardData.types&&-1!==n.inArray("text/plain",t.originalEvent.clipboardData.types))i=t.originalEvent.clipboardData.getData("text/plain");else{if(!window.clipboardData)return;i=window.clipboardData.getData("Text")}this.setDate(i);this.update();t.preventDefault()},_utc_to_local:function(n){if(!n)return n;var t=new Date(n.getTime()+6e4*n.getTimezoneOffset());return t.getTimezoneOffset()!==n.getTimezoneOffset()&&(t=new Date(n.getTime()+6e4*t.getTimezoneOffset())),t},_local_to_utc:function(n){return n&&new Date(n.getTime()-6e4*n.getTimezoneOffset())},_zero_time:function(n){return n&&new Date(n.getFullYear(),n.getMonth(),n.getDate())},_zero_utc_time:function(n){return n&&f(n.getUTCFullYear(),n.getUTCMonth(),n.getUTCDate())},getDates:function(){return n.map(this.dates,this._utc_to_local)},getUTCDates:function(){return n.map(this.dates,function(n){return new Date(n)})},getDate:function(){return this._utc_to_local(this.getUTCDate())},getUTCDate:function(){var n=this.dates.get(-1);return n!==t?new Date(n):null},clearDates:function(){this.inputField.val("");this.update();this._trigger("changeDate");this.o.autoclose&&this.hide()},setDates:function(){var t=n.isArray(arguments[0])?arguments[0]:arguments;return this.update.apply(this,t),this._trigger("changeDate"),this.setValue(),this},setUTCDates:function(){var t=n.isArray(arguments[0])?arguments[0]:arguments;return this.setDates.apply(this,n.map(t,this._utc_to_local)),this},setDate:h("setDates"),setUTCDate:h("setUTCDates"),remove:h("destroy","Method `remove` is deprecated and will be removed in version 2.0. Use `destroy` instead"),setValue:function(){var n=this.getFormattedDate();return this.inputField.val(n),this},getFormattedDate:function(r){r===t&&(r=this.o.format);var u=this.o.language;return n.map(this.dates,function(n){return i.formatDate(n,r,u)}).join(this.o.multidateSeparator)},getStartDate:function(){return this.o.startDate},setStartDate:function(n){return this._process_options({startDate:n}),this.update(),this.updateNavArrows(),this},getEndDate:function(){return this.o.endDate},setEndDate:function(n){return this._process_options({endDate:n}),this.update(),this.updateNavArrows(),this},setDaysOfWeekDisabled:function(n){return this._process_options({daysOfWeekDisabled:n}),this.update(),this},setDaysOfWeekHighlighted:function(n){return this._process_options({daysOfWeekHighlighted:n}),this.update(),this},setDatesDisabled:function(n){return this._process_options({datesDisabled:n}),this.update(),this},place:function(){var y,r,p;if(this.isInline)return this;var f=this.picker.outerWidth(),s=this.picker.outerHeight(),e=n(this.o.container),h=e.width(),c="body"===this.o.container?n(document).scrollTop():e.scrollTop(),l=e.offset(),a=[0];this.element.parents().each(function(){var t=n(this).css("z-index");"auto"!==t&&0!==Number(t)&&a.push(Number(t))});var v=Math.max.apply(Math,a)+this.o.zIndexOffset,u=this.component?this.component.parent().offset():this.element.offset(),w=this.component?this.component.outerHeight(!0):this.element.outerHeight(!1),o=this.component?this.component.outerWidth(!0):this.element.outerWidth(!1),t=u.left-l.left,i=u.top-l.top;return"body"!==this.o.container&&(i+=c),this.picker.removeClass("datepicker-orient-top datepicker-orient-bottom datepicker-orient-right datepicker-orient-left"),"auto"!==this.o.orientation.x?(this.picker.addClass("datepicker-orient-"+this.o.orientation.x),"right"===this.o.orientation.x&&(t-=f-o)):u.left<0?(this.picker.addClass("datepicker-orient-left"),t-=u.left-10):t+f>h?(this.picker.addClass("datepicker-orient-right"),t+=o-f):this.o.rtl?this.picker.addClass("datepicker-orient-right"):this.picker.addClass("datepicker-orient-left"),r=this.o.orientation.y,("auto"===r&&(y=-c+i-s,r=y<0?"bottom":"top"),this.picker.addClass("datepicker-orient-"+r),"top"===r?i-=s+parseInt(this.picker.css("padding-top")):i+=w,this.o.rtl)?(p=h-(t+o),this.picker.css({top:i,right:p,zIndex:v})):this.picker.css({top:i,left:t,zIndex:v}),this},_allow_update:!0,update:function(){if(!this._allow_update)return this;var u=this.dates.copy(),t=[],r=!1;return arguments.length?(n.each(arguments,n.proxy(function(n,i){i instanceof Date&&(i=this._local_to_utc(i));t.push(i)},this)),r=!0):(t=this.isInput?this.element.val():this.element.data("date")||this.inputField.val(),t=t&&this.o.multidate?t.split(this.o.multidateSeparator):[t],delete this.element.data().date),t=n.map(t,n.proxy(function(n){return i.parseDate(n,this.o.format,this.o.language,this.o.assumeNearbyYear)},this)),t=n.grep(t,n.proxy(function(n){return!this.dateWithinRange(n)||!n},this),!0),this.dates.replace(t),this.o.updateViewDate&&(this.viewDate=this.dates.length?new Date(this.dates.get(-1)):this.viewDate<this.o.startDate?new Date(this.o.startDate):this.viewDate>this.o.endDate?new Date(this.o.endDate):this.o.defaultViewDate),r?(this.setValue(),this.element.change()):this.dates.length&&String(u)!==String(this.dates)&&r&&(this._trigger("changeDate"),this.element.change()),!this.dates.length&&u.length&&(this._trigger("clearDate"),this.element.change()),this.fill(),this},fillDow:function(){if(this.o.showWeekDays){var i=this.o.weekStart,t="<tr>";for(this.o.calendarWeeks&&(t+='<th class="cw">&#160;<\/th>');i<this.o.weekStart+7;)t+='<th class="dow',-1!==n.inArray(i,this.o.daysOfWeekDisabled)&&(t+=" disabled"),t+='">'+r[this.o.language].daysMin[i++%7]+"<\/th>";t+="<\/tr>";this.picker.find(".datepicker-days thead").append(t)}},fillMonths:function(){for(var t,i=this._utc_to_local(this.viewDate),u="",n=0;n<12;n++)t=i&&i.getMonth()===n?" focused":"",u+='<span class="month'+t+'">'+r[this.o.language].monthsShort[n]+"<\/span>";this.picker.find(".datepicker-months td").html(u)},setRange:function(t){t&&t.length?this.range=n.map(t,function(n){return n.valueOf()}):delete this.range;this.fill()},getClassNames:function(t){var i=[],r=this.viewDate.getUTCFullYear(),u=this.viewDate.getUTCMonth(),f=o();return t.getUTCFullYear()<r||t.getUTCFullYear()===r&&t.getUTCMonth()<u?i.push("old"):(t.getUTCFullYear()>r||t.getUTCFullYear()===r&&t.getUTCMonth()>u)&&i.push("new"),this.focusDate&&t.valueOf()===this.focusDate.valueOf()&&i.push("focused"),this.o.todayHighlight&&l(t,f)&&i.push("today"),-1!==this.dates.contains(t)&&i.push("active"),this.dateWithinRange(t)||i.push("disabled"),this.dateIsDisabled(t)&&i.push("disabled","disabled-date"),-1!==n.inArray(t.getUTCDay(),this.o.daysOfWeekHighlighted)&&i.push("highlighted"),this.range&&(t>this.range[0]&&t<this.range[this.range.length-1]&&i.push("range"),-1!==n.inArray(t.valueOf(),this.range)&&i.push("selected"),t.valueOf()===this.range[0]&&i.push("range-start"),t.valueOf()===this.range[this.range.length-1]&&i.push("range-end")),i},_fill_yearsView:function(i,r,u,f,e,o,s){for(var c,v,h,w="",l=u/10,b=this.picker.find(i),y=Math.floor(f/u)*u,p=y+9*l,k=Math.floor(this.viewDate.getFullYear()/l)*l,d=n.map(this.dates,function(n){return Math.floor(n.getUTCFullYear()/l)*l}),a=y-l;a<=p+l;a+=l)c=[r],v=null,a===y-l?c.push("old"):a===p+l&&c.push("new"),-1!==n.inArray(a,d)&&c.push("active"),(a<e||a>o)&&c.push("disabled"),a===k&&c.push("focused"),s!==n.noop&&(h=s(new Date(a,0,1)),h===t?h={}:"boolean"==typeof h?h={enabled:h}:"string"==typeof h&&(h={classes:h}),!1===h.enabled&&c.push("disabled"),h.classes&&(c=c.concat(h.classes.split(/\s+/))),h.tooltip&&(v=h.tooltip)),w+='<span class="'+c.join(" ")+'"'+(v?' title="'+v+'"':"")+">"+a+"<\/span>";b.find(".datepicker-switch").text(y+"-"+p);b.find("td").html(w)},fill:function(){var p,u,w=new Date(this.viewDate),s=w.getUTCFullYear(),nt=w.getUTCMonth(),v=this.o.startDate!==-1/0?this.o.startDate.getUTCFullYear():-1/0,et=this.o.startDate!==-1/0?this.o.startDate.getUTCMonth():-1/0,y=this.o.endDate!==1/0?this.o.endDate.getUTCFullYear():1/0,ot=this.o.endDate!==1/0?this.o.endDate.getUTCMonth():1/0,st=r[this.o.language].today||r.en.today||"",ht=r[this.o.language].clear||r.en.clear||"",ct=r[this.o.language].titleFormat||r.en.titleFormat,b=o(),lt=(!0===this.o.todayBtn||"linked"===this.o.todayBtn)&&b>=this.o.startDate&&b<=this.o.endDate&&!this.weekOfDateIsDisabled(b),e,tt,c,k,h,l,g,ut,a,ft;if(!isNaN(s)&&!isNaN(nt)){for(this.picker.find(".datepicker-days .datepicker-switch").text(i.formatDate(w,ct,this.o.language)),this.picker.find("tfoot .today").text(st).css("display",lt?"table-cell":"none"),this.picker.find("tfoot .clear").text(ht).css("display",!0===this.o.clearBtn?"table-cell":"none"),this.picker.find("thead .datepicker-title").text(this.o.title).css("display","string"==typeof this.o.title&&""!==this.o.title?"table-cell":"none"),this.updateNavArrows(),this.fillMonths(),e=f(s,nt,0),tt=e.getUTCDate(),e.setUTCDate(tt-(e.getUTCDay()-this.o.weekStart+7)%7),c=new Date(e),e.getUTCFullYear()<100&&c.setUTCFullYear(e.getUTCFullYear()),c.setUTCDate(c.getUTCDate()+42),c=c.valueOf(),l=[];e.valueOf()<c;){if((k=e.getUTCDay())===this.o.weekStart&&(l.push("<tr>"),this.o.calendarWeeks)){var it=new Date(+e+(this.o.weekStart-k-7)%7*864e5),rt=new Date(Number(it)+(11-it.getUTCDay())%7*864e5),d=new Date(Number(d=f(rt.getUTCFullYear(),0,1))+(11-d.getUTCDay())%7*864e5),at=(rt-d)/6048e5+1;l.push('<td class="cw">'+at+"<\/td>")}h=this.getClassNames(e);h.push("day");g=e.getUTCDate();this.o.beforeShowDay!==n.noop&&(u=this.o.beforeShowDay(this._utc_to_local(e)),u===t?u={}:"boolean"==typeof u?u={enabled:u}:"string"==typeof u&&(u={classes:u}),!1===u.enabled&&h.push("disabled"),u.classes&&(h=h.concat(u.classes.split(/\s+/))),u.tooltip&&(p=u.tooltip),u.content&&(g=u.content));h=n.isFunction(n.uniqueSort)?n.uniqueSort(h):n.unique(h);l.push('<td class="'+h.join(" ")+'"'+(p?' title="'+p+'"':"")+' data-date="'+e.getTime().toString()+'">'+g+"<\/td>");p=null;k===this.o.weekEnd&&l.push("<\/tr>");e.setUTCDate(e.getUTCDate()+1)}this.picker.find(".datepicker-days tbody").html(l.join(""));ut=r[this.o.language].monthsTitle||r.en.monthsTitle||"Months";a=this.picker.find(".datepicker-months").find(".datepicker-switch").text(this.o.maxViewMode<2?ut:s).end().find("tbody span").removeClass("active");(n.each(this.dates,function(n,t){t.getUTCFullYear()===s&&a.eq(t.getUTCMonth()).addClass("active")}),(s<v||s>y)&&a.addClass("disabled"),s===v&&a.slice(0,et).addClass("disabled"),s===y&&a.slice(ot+1).addClass("disabled"),this.o.beforeShowMonth!==n.noop)&&(ft=this,n.each(a,function(i,r){var f=new Date(s,i,1),u=ft.o.beforeShowMonth(f);u===t?u={}:"boolean"==typeof u?u={enabled:u}:"string"==typeof u&&(u={classes:u});!1!==u.enabled||n(r).hasClass("disabled")||n(r).addClass("disabled");u.classes&&n(r).addClass(u.classes);u.tooltip&&n(r).prop("title",u.tooltip)}));this._fill_yearsView(".datepicker-years","year",10,s,v,y,this.o.beforeShowYear);this._fill_yearsView(".datepicker-decades","decade",100,s,v,y,this.o.beforeShowDecade);this._fill_yearsView(".datepicker-centuries","century",1e3,s,v,y,this.o.beforeShowCentury)}},updateNavArrows:function(){if(this._allow_update){var i,r,u=new Date(this.viewDate),t=u.getUTCFullYear(),f=u.getUTCMonth(),e=this.o.startDate!==-1/0?this.o.startDate.getUTCFullYear():-1/0,s=this.o.startDate!==-1/0?this.o.startDate.getUTCMonth():-1/0,o=this.o.endDate!==1/0?this.o.endDate.getUTCFullYear():1/0,h=this.o.endDate!==1/0?this.o.endDate.getUTCMonth():1/0,n=1;switch(this.viewMode){case 4:n*=10;case 3:n*=10;case 2:n*=10;case 1:i=Math.floor(t/n)*n<=e;r=Math.floor(t/n)*n+n>o;break;case 0:i=t<=e&&f<=s;r=t>=o&&f>=h}this.picker.find(".prev").toggleClass("disabled",i);this.picker.find(".next").toggleClass("disabled",r)}},click:function(t){t.preventDefault();t.stopPropagation();var r,s,u,e;r=n(t.target);r.hasClass("datepicker-switch")&&this.viewMode!==this.o.maxViewMode&&this.setViewMode(this.viewMode+1);r.hasClass("today")&&!r.hasClass("day")&&(this.setViewMode(0),this._setDate(o(),"linked"===this.o.todayBtn?null:"view"));r.hasClass("clear")&&this.clearDates();r.hasClass("disabled")||(r.hasClass("month")||r.hasClass("year")||r.hasClass("decade")||r.hasClass("century"))&&(this.viewDate.setUTCDate(1),s=1,1===this.viewMode?(e=r.parent().find("span").index(r),u=this.viewDate.getUTCFullYear(),this.viewDate.setUTCMonth(e)):(e=0,u=Number(r.text()),this.viewDate.setUTCFullYear(u)),this._trigger(i.viewModes[this.viewMode-1].e,this.viewDate),this.viewMode===this.o.minViewMode?this._setDate(f(u,e,s)):(this.setViewMode(this.viewMode-1),this.fill()));this.picker.is(":visible")&&this._focused_from&&this._focused_from.focus();delete this._focused_from},dayCellClick:function(t){var r=n(t.currentTarget),u=r.data("date"),i=new Date(u);this.o.updateViewDate&&(i.getUTCFullYear()!==this.viewDate.getUTCFullYear()&&this._trigger("changeYear",this.viewDate),i.getUTCMonth()!==this.viewDate.getUTCMonth()&&this._trigger("changeMonth",this.viewDate));this._setDate(i)},navArrowsClick:function(t){var u=n(t.currentTarget),r=u.hasClass("prev")?-1:1;0!==this.viewMode&&(r*=12*i.viewModes[this.viewMode].navStep);this.viewDate=this.moveMonth(this.viewDate,r);this._trigger(i.viewModes[this.viewMode].e,this.viewDate);this.fill()},_toggle_multidate:function(n){var t=this.dates.contains(n);if(n||this.dates.clear(),-1!==t?(!0===this.o.multidate||this.o.multidate>1||this.o.toggleActive)&&this.dates.remove(t):!1===this.o.multidate?(this.dates.clear(),this.dates.push(n)):this.dates.push(n),"number"==typeof this.o.multidate)for(;this.dates.length>this.o.multidate;)this.dates.remove(0)},_setDate:function(n,t){t&&"date"!==t||this._toggle_multidate(n&&new Date(n));(!t&&this.o.updateViewDate||"view"===t)&&(this.viewDate=n&&new Date(n));this.fill();this.setValue();t&&"view"===t||this._trigger("changeDate");this.inputField.trigger("change");!this.o.autoclose||t&&"date"!==t||this.hide()},moveDay:function(n,t){var i=new Date(n);return i.setUTCDate(n.getUTCDate()+t),i},moveWeek:function(n,t){return this.moveDay(n,7*t)},moveMonth:function(n,t){var f;if(!p(n))return this.o.defaultViewDate;if(!t)return n;var r,u,i=new Date(n.valueOf()),e=i.getUTCDate(),o=i.getUTCMonth(),s=Math.abs(t);if(t=t>0?1:-1,1===s)u=-1===t?function(){return i.getUTCMonth()===o}:function(){return i.getUTCMonth()!==r},r=o+t,i.setUTCMonth(r),r=(r+12)%12;else{for(f=0;f<s;f++)i=this.moveMonth(i,t);r=i.getUTCMonth();i.setUTCDate(e);u=function(){return r!==i.getUTCMonth()}}for(;u();)i.setUTCDate(--e),i.setUTCMonth(r);return i},moveYear:function(n,t){return this.moveMonth(n,12*t)},moveAvailableDate:function(n,t,i){do{if(n=this[i](n,t),!this.dateWithinRange(n))return!1;i="moveDay"}while(this.dateIsDisabled(n));return n},weekOfDateIsDisabled:function(t){return-1!==n.inArray(t.getUTCDay(),this.o.daysOfWeekDisabled)},dateIsDisabled:function(t){return this.weekOfDateIsDisabled(t)||n.grep(this.o.datesDisabled,function(n){return l(t,n)}).length>0},dateWithinRange:function(n){return n>=this.o.startDate&&n<=this.o.endDate},keydown:function(n){if(!this.picker.is(":visible"))return void(40!==n.keyCode&&27!==n.keyCode||(this.show(),n.stopPropagation()));var t,r,u=!1,i=this.focusDate||this.viewDate;switch(n.keyCode){case 27:this.focusDate?(this.focusDate=null,this.viewDate=this.dates.get(-1)||this.viewDate,this.fill()):this.hide();n.preventDefault();n.stopPropagation();break;case 37:case 38:case 39:case 40:if(!this.o.keyboardNavigation||7===this.o.daysOfWeekDisabled.length)break;t=37===n.keyCode||38===n.keyCode?-1:1;0===this.viewMode?n.ctrlKey?(r=this.moveAvailableDate(i,t,"moveYear"))&&this._trigger("changeYear",this.viewDate):n.shiftKey?(r=this.moveAvailableDate(i,t,"moveMonth"))&&this._trigger("changeMonth",this.viewDate):37===n.keyCode||39===n.keyCode?r=this.moveAvailableDate(i,t,"moveDay"):this.weekOfDateIsDisabled(i)||(r=this.moveAvailableDate(i,t,"moveWeek")):1===this.viewMode?(38!==n.keyCode&&40!==n.keyCode||(t*=4),r=this.moveAvailableDate(i,t,"moveMonth")):2===this.viewMode&&(38!==n.keyCode&&40!==n.keyCode||(t*=4),r=this.moveAvailableDate(i,t,"moveYear"));r&&(this.focusDate=this.viewDate=r,this.setValue(),this.fill(),n.preventDefault());break;case 13:if(!this.o.forceParse)break;i=this.focusDate||this.dates.get(-1)||this.viewDate;this.o.keyboardNavigation&&(this._toggle_multidate(i),u=!0);this.focusDate=null;this.viewDate=this.dates.get(-1)||this.viewDate;this.setValue();this.fill();this.picker.is(":visible")&&(n.preventDefault(),n.stopPropagation(),this.o.autoclose&&this.hide());break;case 9:this.focusDate=null;this.viewDate=this.dates.get(-1)||this.viewDate;this.fill();this.hide()}u&&(this.dates.length?this._trigger("changeDate"):this._trigger("clearDate"),this.inputField.trigger("change"))},setViewMode:function(n){this.viewMode=n;this.picker.children("div").hide().filter(".datepicker-"+i.viewModes[this.viewMode].clsName).show();this.updateNavArrows();this._trigger("changeViewMode",new Date(this.viewDate))}};c=function(t,i){n.data(t,"datepicker",this);this.element=n(t);this.inputs=n.map(i.inputs,function(n){return n.jquery?n[0]:n});delete i.inputs;this.keepEmptyValues=i.keepEmptyValues;delete i.keepEmptyValues;s.call(n(this.inputs),i).on("changeDate",n.proxy(this.dateUpdated,this));this.pickers=n.map(this.inputs,function(t){return n.data(t,"datepicker")});this.updateDates()};c.prototype={updateDates:function(){this.dates=n.map(this.pickers,function(n){return n.getUTCDate()});this.updateRanges()},updateRanges:function(){var t=n.map(this.dates,function(n){return n.valueOf()});n.each(this.pickers,function(n,i){i.setRange(t)})},clearDates:function(){n.each(this.pickers,function(n,t){t.clearDates()})},dateUpdated:function(i){var u;if(!this.updating&&(this.updating=!0,u=n.data(i.target,"datepicker"),u!==t)){var r=u.getUTCDate(),s=this.keepEmptyValues,o=n.inArray(i.target,this.inputs),f=o-1,e=o+1,h=this.inputs.length;if(-1!==o){if(n.each(this.pickers,function(n,t){t.getUTCDate()||t!==u&&s||t.setUTCDate(r)}),r<this.dates[f])for(;f>=0&&r<this.dates[f];)this.pickers[f--].setUTCDate(r);else if(r>this.dates[e])for(;e<h&&r>this.dates[e];)this.pickers[e++].setUTCDate(r);this.updateDates();delete this.updating}}},destroy:function(){n.map(this.pickers,function(n){n.destroy()});n(this.inputs).off("changeDate",this.dateUpdated);delete this.element.data().datepicker},remove:h("destroy","Method `remove` is deprecated and will be removed in version 2.0. Use `destroy` instead")};v=n.fn.datepicker;s=function(i){var f=Array.apply(null,arguments),r;if(f.shift(),this.each(function(){var s=n(this),t=s.data("datepicker"),h="object"==typeof i&&i;if(!t){var l=w(this,"date"),a=n.extend({},e,l,h),v=b(a.language),o=n.extend({},e,v,l,h);s.hasClass("input-daterange")||o.inputs?(n.extend(o,{inputs:o.inputs||s.find("input").toArray()}),t=new c(this,o)):t=new u(this,o);s.data("datepicker",t)}"string"==typeof i&&"function"==typeof t[i]&&(r=t[i].apply(t,f))}),r===t||r instanceof u||r instanceof c)return this;if(this.length>1)throw new Error("Using only allowed for the collection of a single element ("+i+" function)");return r};n.fn.datepicker=s;e=n.fn.datepicker.defaults={assumeNearbyYear:!1,autoclose:!1,beforeShowDay:n.noop,beforeShowMonth:n.noop,beforeShowYear:n.noop,beforeShowDecade:n.noop,beforeShowCentury:n.noop,calendarWeeks:!1,clearBtn:!1,toggleActive:!1,daysOfWeekDisabled:[],daysOfWeekHighlighted:[],datesDisabled:[],endDate:1/0,forceParse:!0,format:"mm/dd/yyyy",keepEmptyValues:!1,keyboardNavigation:!0,language:"en",minViewMode:0,maxViewMode:4,multidate:!1,multidateSeparator:",",orientation:"auto",rtl:!1,startDate:-1/0,startView:0,todayBtn:!1,todayHighlight:!1,updateViewDate:!0,weekStart:0,disableTouchKeyboard:!1,enableOnReadonly:!0,showOnFocus:!0,zIndexOffset:10,container:"body",immediateUpdates:!1,title:"",templates:{leftArrow:"&#x00AB;",rightArrow:"&#x00BB;"},showWeekDays:!0};y=n.fn.datepicker.locale_opts=["format","rtl","weekStart"];n.fn.datepicker.Constructor=u;r=n.fn.datepicker.dates={en:{days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],daysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],daysMin:["Su","Mo","Tu","We","Th","Fr","Sa"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],monthsShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],today:"Today",clear:"Clear",titleFormat:"MM yyyy"}};i={viewModes:[{names:["days","month"],clsName:"days",e:"changeMonth"},{names:["months","year"],clsName:"months",e:"changeYear",navStep:1},{names:["years","decade"],clsName:"years",e:"changeDecade",navStep:10},{names:["decades","century"],clsName:"decades",e:"changeCentury",navStep:100},{names:["centuries","millennium"],clsName:"centuries",e:"changeMillennium",navStep:1e3}],validParts:/dd?|DD?|mm?|MM?|yy(?:yy)?/g,nonpunctuation:/[^ -\/:-@\u5e74\u6708\u65e5\[-`{-~\t\n\r]+/g,parseFormat:function(n){if("function"==typeof n.toValue&&"function"==typeof n.toDisplay)return n;var t=n.replace(this.validParts,"\0").split("\0"),i=n.match(this.validParts);if(!t||!t.length||!i||0===i.length)throw new Error("Invalid date format.");return{separators:t,parts:i}},parseDate:function(f,e,s,h){function et(n,t){return!0===t&&(t=10),n<100&&(n+=2e3)>(new Date).getFullYear()+t&&(n-=100),n}function tt(){var n=this.slice(0,l[c].length),t=l[c].slice(0,n.length);return n.toLowerCase()===t.toLowerCase()}var l,y,it,c,rt,ut,g,v,ft,k,d;if(!f)return t;if(f instanceof Date)return f;if("string"==typeof e&&(e=i.parseFormat(e)),e.toValue)return e.toValue(f,e,s);if(ut={d:"moveDay",m:"moveMonth",w:"moveWeek",y:"moveYear"},g={yesterday:"-1d",today:"+0d",tomorrow:"+1d"},f in g&&(f=g[f]),/^[\-+]\d+[dmwy]([\s,]+[\-+]\d+[dmwy])*$/i.test(f)){for(l=f.match(/([\-+]\d+)([dmwy])/gi),f=new Date,c=0;c<l.length;c++)y=l[c].match(/([\-+]\d+)([dmwy])/i),it=Number(y[1]),rt=ut[y[2].toLowerCase()],f=u.prototype[rt](f,it);return u.prototype._zero_utc_time(f)}l=f&&f.match(this.nonpunctuation)||[];var p,w,b={},nt=["yyyy","yy","M","MM","m","mm","d","dd"],a={yyyy:function(n,t){return n.setUTCFullYear(h?et(t,h):t)},m:function(n,t){if(isNaN(n))return n;for(t-=1;t<0;)t+=12;for(t%=12,n.setUTCMonth(t);n.getUTCMonth()!==t;)n.setUTCDate(n.getUTCDate()-1);return n},d:function(n,t){return n.setUTCDate(t)}};if(a.yy=a.yyyy,a.M=a.MM=a.mm=a.m,a.dd=a.d,f=o(),v=e.parts.slice(),l.length!==v.length&&(v=n(v).filter(function(t,i){return-1!==n.inArray(i,nt)}).toArray()),l.length===v.length){for(c=0,ft=v.length;c<ft;c++){if(p=parseInt(l[c],10),y=v[c],isNaN(p))switch(y){case"MM":w=n(r[s].months).filter(tt);p=n.inArray(w[0],r[s].months)+1;break;case"M":w=n(r[s].monthsShort).filter(tt);p=n.inArray(w[0],r[s].monthsShort)+1}b[y]=p}for(c=0;c<nt.length;c++)(d=nt[c])in b&&!isNaN(b[d])&&(k=new Date(f),a[d](k,b[d]),isNaN(k)||(f=k))}return f},formatDate:function(t,u,f){var e;if(!t)return"";if("string"==typeof u&&(u=i.parseFormat(u)),u.toDisplay)return u.toDisplay(t,u,f);e={d:t.getUTCDate(),D:r[f].daysShort[t.getUTCDay()],DD:r[f].days[t.getUTCDay()],m:t.getUTCMonth()+1,M:r[f].monthsShort[t.getUTCMonth()],MM:r[f].months[t.getUTCMonth()],yy:t.getUTCFullYear().toString().substring(2),yyyy:t.getUTCFullYear()};e.dd=(e.d<10?"0":"")+e.d;e.mm=(e.m<10?"0":"")+e.m;t=[];for(var s=n.extend([],u.separators),o=0,h=u.parts.length;o<=h;o++)s.length&&t.push(s.shift()),t.push(e[u.parts[o]]);return t.join("")},headTemplate:'<thead><tr><th colspan="7" class="datepicker-title"><\/th><\/tr><tr><th class="prev">'+e.templates.leftArrow+'<\/th><th colspan="5" class="datepicker-switch"><\/th><th class="next">'+e.templates.rightArrow+"<\/th><\/tr><\/thead>",contTemplate:'<tbody><tr><td colspan="7"><\/td><\/tr><\/tbody>',footTemplate:'<tfoot><tr><th colspan="7" class="today"><\/th><\/tr><tr><th colspan="7" class="clear"><\/th><\/tr><\/tfoot>'};i.template='<div class="datepicker"><div class="datepicker-days"><table class="table-condensed">'+i.headTemplate+"<tbody><\/tbody>"+i.footTemplate+'<\/table><\/div><div class="datepicker-months"><table class="table-condensed">'+i.headTemplate+i.contTemplate+i.footTemplate+'<\/table><\/div><div class="datepicker-years"><table class="table-condensed">'+i.headTemplate+i.contTemplate+i.footTemplate+'<\/table><\/div><div class="datepicker-decades"><table class="table-condensed">'+i.headTemplate+i.contTemplate+i.footTemplate+'<\/table><\/div><div class="datepicker-centuries"><table class="table-condensed">'+i.headTemplate+i.contTemplate+i.footTemplate+"<\/table><\/div><\/div>";n.fn.datepicker.DPGlobal=i;n.fn.datepicker.noConflict=function(){return n.fn.datepicker=v,this};n.fn.datepicker.version="1.9.0";n.fn.datepicker.deprecated=function(n){var t=window.console;t&&t.warn&&t.warn("DEPRECATED: "+n)};n(document).on("focus.datepicker.data-api click.datepicker.data-api",'[data-provide="datepicker"]',function(t){var i=n(this);i.data("datepicker")||(t.preventDefault(),s.call(i,"show"))});n(function(){s.call(n('[data-provide="datepicker-inline"]'))})})