if(function(t,e){function n(t){var e=t.length,n=ct.type(t);return!ct.isWindow(t)&&(!(1!==t.nodeType||!e)||("array"===n||"function"!==n&&(0===e||"number"==typeof e&&e>0&&e-1 in t)))}function r(t){var e=Dt[t]={};return ct.each(t.match(ft)||[],function(t,n){e[n]=!0}),e}function i(t,n,r,i){if(ct.acceptData(t)){var o,a,s=ct.expando,l=t.nodeType,u=l?ct.cache:t,c=l?t[s]:t[s]&&s;if(c&&u[c]&&(i||u[c].data)||r!==e||"string"!=typeof n)return c||(c=l?t[s]=et.pop()||ct.guid++:s),u[c]||(u[c]=l?{}:{toJSON:ct.noop}),("object"==typeof n||"function"==typeof n)&&(i?u[c]=ct.extend(u[c],n):u[c].data=ct.extend(u[c].data,n)),a=u[c],i||(a.data||(a.data={}),a=a.data),r!==e&&(a[ct.camelCase(n)]=r),"string"==typeof n?(o=a[n],null==o&&(o=a[ct.camelCase(n)])):o=a,o}}function o(t,e,n){if(ct.acceptData(t)){var r,i,o=t.nodeType,a=o?ct.cache:t,l=o?t[ct.expando]:ct.expando;if(a[l]){if(e&&(r=n?a[l]:a[l].data)){ct.isArray(e)?e=e.concat(ct.map(e,ct.camelCase)):e in r?e=[e]:(e=ct.camelCase(e),e=e in r?[e]:e.split(" ")),i=e.length;for(;i--;)delete r[e[i]];if(n?!s(r):!ct.isEmptyObject(r))return}(n||(delete a[l].data,s(a[l])))&&(o?ct.cleanData([t],!0):ct.support.deleteExpando||a!=a.window?delete a[l]:a[l]=null)}}}function a(t,n,r){if(r===e&&1===t.nodeType){var i="data-"+n.replace(Mt,"-$1").toLowerCase();if(r=t.getAttribute(i),"string"==typeof r){try{r="true"===r||"false"!==r&&("null"===r?null:+r+""===r?+r:Tt.test(r)?ct.parseJSON(r):r)}catch(t){}ct.data(t,n,r)}else r=e}return r}function s(t){var e;for(e in t)if(("data"!==e||!ct.isEmptyObject(t[e]))&&"toJSON"!==e)return!1;return!0}function l(){return!0}function u(){return!1}function c(){try{return Z.activeElement}catch(t){}}function d(t,e){do t=t[e];while(t&&1!==t.nodeType);return t}function f(t,e,n){if(ct.isFunction(e))return ct.grep(t,function(t,r){return!!e.call(t,r,t)!==n});if(e.nodeType)return ct.grep(t,function(t){return t===e!==n});if("string"==typeof e){if(Ut.test(e))return ct.filter(e,t,n);e=ct.filter(e,t)}return ct.grep(t,function(t){return ct.inArray(t,e)>=0!==n})}function h(t){var e=Yt.split("|"),n=t.createDocumentFragment();if(n.createElement)for(;e.length;)n.createElement(e.pop());return n}function p(t,e){return ct.nodeName(t,"table")&&ct.nodeName(1===e.nodeType?e:e.firstChild,"tr")?t.getElementsByTagName("tbody")[0]||t.appendChild(t.ownerDocument.createElement("tbody")):t}function g(t){return t.type=(null!==ct.find.attr(t,"type"))+"/"+t.type,t}function m(t){var e=ie.exec(t.type);return e?t.type=e[1]:t.removeAttribute("type"),t}function v(t,e){for(var n,r=0;null!=(n=t[r]);r++)ct._data(n,"globalEval",!e||ct._data(e[r],"globalEval"))}function y(t,e){if(1===e.nodeType&&ct.hasData(t)){var n,r,i,o=ct._data(t),a=ct._data(e,o),s=o.events;if(s){delete a.handle,a.events={};for(n in s)for(r=0,i=s[n].length;i>r;r++)ct.event.add(e,n,s[n][r])}a.data&&(a.data=ct.extend({},a.data))}}function b(t,e){var n,r,i;if(1===e.nodeType){if(n=e.nodeName.toLowerCase(),!ct.support.noCloneEvent&&e[ct.expando]){i=ct._data(e);for(r in i.events)ct.removeEvent(e,r,i.handle);e.removeAttribute(ct.expando)}"script"===n&&e.text!==t.text?(g(e).text=t.text,m(e)):"object"===n?(e.parentNode&&(e.outerHTML=t.outerHTML),ct.support.html5Clone&&t.innerHTML&&!ct.trim(e.innerHTML)&&(e.innerHTML=t.innerHTML)):"input"===n&&ee.test(t.type)?(e.defaultChecked=e.checked=t.checked,e.value!==t.value&&(e.value=t.value)):"option"===n?e.defaultSelected=e.selected=t.defaultSelected:("input"===n||"textarea"===n)&&(e.defaultValue=t.defaultValue)}}function x(t,n){var r,i,o=0,a=typeof t.getElementsByTagName!==V?t.getElementsByTagName(n||"*"):typeof t.querySelectorAll!==V?t.querySelectorAll(n||"*"):e;if(!a)for(a=[],r=t.childNodes||t;null!=(i=r[o]);o++)!n||ct.nodeName(i,n)?a.push(i):ct.merge(a,x(i,n));return n===e||n&&ct.nodeName(t,n)?ct.merge([t],a):a}function w(t){ee.test(t.type)&&(t.defaultChecked=t.checked)}function _(t,e){if(e in t)return e;for(var n=e.charAt(0).toUpperCase()+e.slice(1),r=e,i=Ce.length;i--;)if(e=Ce[i]+n,e in t)return e;return r}function S(t,e){return t=e||t,"none"===ct.css(t,"display")||!ct.contains(t.ownerDocument,t)}function C(t,e){for(var n,r,i,o=[],a=0,s=t.length;s>a;a++)r=t[a],r.style&&(o[a]=ct._data(r,"olddisplay"),n=r.style.display,e?(o[a]||"none"!==n||(r.style.display=""),""===r.style.display&&S(r)&&(o[a]=ct._data(r,"olddisplay",k(r.nodeName)))):o[a]||(i=S(r),(n&&"none"!==n||!i)&&ct._data(r,"olddisplay",i?n:ct.css(r,"display"))));for(a=0;s>a;a++)r=t[a],r.style&&(e&&"none"!==r.style.display&&""!==r.style.display||(r.style.display=e?o[a]||"":"none"));return t}function D(t,e,n){var r=ve.exec(e);return r?Math.max(0,r[1]-(n||0))+(r[2]||"px"):e}function T(t,e,n,r,i){for(var o=n===(r?"border":"content")?4:"width"===e?1:0,a=0;4>o;o+=2)"margin"===n&&(a+=ct.css(t,n+Se[o],!0,i)),r?("content"===n&&(a-=ct.css(t,"padding"+Se[o],!0,i)),"margin"!==n&&(a-=ct.css(t,"border"+Se[o]+"Width",!0,i))):(a+=ct.css(t,"padding"+Se[o],!0,i),"padding"!==n&&(a+=ct.css(t,"border"+Se[o]+"Width",!0,i)));return a}function M(t,e,n){var r=!0,i="width"===e?t.offsetWidth:t.offsetHeight,o=ce(t),a=ct.support.boxSizing&&"border-box"===ct.css(t,"boxSizing",!1,o);if(0>=i||null==i){if(i=de(t,e,o),(0>i||null==i)&&(i=t.style[e]),ye.test(i))return i;r=a&&(ct.support.boxSizingReliable||i===t.style[e]),i=parseFloat(i)||0}return i+T(t,e,n||(a?"border":"content"),r,o)+"px"}function k(t){var e=Z,n=xe[t];return n||(n=E(t,e),"none"!==n&&n||(ue=(ue||ct("').bind("load",function(){var e,o=t.isArray(n.paramName)?n.paramName:[n.paramName];i.unbind("load").bind("load",function(){var e;try{if(e=i.contents(),!e.length||!e[0].firstChild)throw new Error}catch(t){e=void 0}l(200,"success",{iframe:e}),t('').appendTo(r),window.setTimeout(function(){r.remove()},0)}),r.prop("target",i.prop("name")).prop("action",n.url).prop("method",n.type),n.formData&&t.each(n.formData,function(e,n){t('').prop("name",n.name).val(n.value).appendTo(r)}),n.fileInput&&n.fileInput.length&&"POST"===n.type&&(e=n.fileInput.clone(),n.fileInput.after(function(t){return e[t]}),n.paramName&&n.fileInput.each(function(e){t(this).prop("name",o[e]||n.paramName)}),r.append(n.fileInput).prop("enctype","multipart/form-data").prop("encoding","multipart/form-data"),n.fileInput.removeAttr("form")),r.submit(),e&&e.length&&n.fileInput.each(function(n,r){var i=t(e[n]);t(r).prop("name",i.prop("name")).attr("form",i.attr("form")),i.replaceWith(r)})}),r.append(i).appendTo(document.body)},abort:function(){i&&i.unbind("load").prop("src",a),r&&r.remove()}}}}),t.ajaxSetup({converters:{"iframe text":function(e){return e&&t(e[0].body).text()},"iframe json":function(e){return e&&t.parseJSON(t(e[0].body).text())},"iframe html":function(e){return e&&t(e[0].body).html()},"iframe xml":function(e){var n=e&&e[0];return n&&t.isXMLDoc(n)?n:t.parseXML(n.XMLDocument&&n.XMLDocument.xml||t(n.body).html())},"iframe script":function(e){return e&&t.globalEval(t(e[0].body).text())}}})}),!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.Sweetalert2=e()}(this,function(){"use strict";function t(){if(void 0===arguments[0])return console.error("sweetAlert2 expects at least 1 attribute!"),!1;var t=l({},O);switch(typeof arguments[0]){case"string":t.title=arguments[0],t.text=arguments[1]||"",t.type=arguments[2]||"";break;case"object":l(t,arguments[0]),t.extraParams=arguments[0].extraParams,"email"===t.input&&null===t.inputValidator&&(t.inputValidator=function(t){return new Promise(function(e,n){var r=/^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,6}$/;r.test(t)?e():n("Invalid email address")})});break;default:return console.error('Unexpected type of argument! Expected "string" or "object", got '+typeof arguments[0]),!1}I(t);var r=h();return new Promise(function(o,a){function s(t,e){for(var n=0;n0;)O.removeAttribute(O.attributes[0].name);for(var H in t.inputAttributes)O.setAttribute(H,t.inputAttributes[H]);O.className=R,t.inputClass&&b(O,t.inputClass),C(O)}var $;switch(t.input){case"text":case"email":case"password":case"file":O=w(r,i.input),O.value=t.inputValue,O.placeholder=t.inputPlaceholder,O.type=t.input,_(O);break;case"select":var q=w(r,i.select);if(q.innerHTML="",t.inputPlaceholder){var U=document.createElement("option");U.innerHTML=t.inputPlaceholder,U.value="",U.disabled=!0,U.selected=!0,q.appendChild(U)}$=function(e){for(var n in e){var r=document.createElement("option");r.value=n,r.innerHTML=e[n],t.inputValue===n&&(r.selected=!0),q.appendChild(r)}_(q),q.focus()};break;case"radio":var z=w(r,i.radio);z.innerHTML="",$=function(e){for(var n in e){var r=1,o=document.createElement("input"),a=document.createElement("label"),s=document.createElement("span");o.type="radio",o.name=i.radio,o.value=n,o.id=i.radio+"-"+r++,t.inputValue===n&&(o.checked=!0),s.innerHTML=e[n],a.appendChild(o),a.appendChild(s),a.for=o.id,z.appendChild(a)}_(z);var l=z.querySelectorAll("input");l.length&&l[0].focus()};break;case"checkbox":var B=w(r,i.checkbox),W=r.querySelector("#"+i.checkbox);W.value=1,W.checked=Boolean(t.inputValue);var Y=B.getElementsByTagName("span");Y.length&&B.removeChild(Y[0]),Y=document.createElement("span"),Y.innerHTML=t.inputPlaceholder,B.appendChild(Y),_(B);break;case"textarea":var G=w(r,i.textarea);G.value=t.inputValue,G.placeholder=t.inputPlaceholder,_(G);break;case null:break;default:console.error('Unexpected type of input! Expected "text" or "email" or "password", "select", "checkbox", "textarea" or "file", got '+typeof arguments[0])}"select"!==t.input&&"radio"!==t.input||(t.inputOptions instanceof Promise?(e.showLoading(),t.inputOptions.then(function(t){e.hideLoading(),$(t)})):"object"==typeof t.inputOptions?$(t.inputOptions):console.error("Unexpected type of inputOptions! Expected object or Promise, got "+t.inputOptions)),F(),j(t.animation,t.onOpen),s(-1,1)})}function e(){var n=arguments,r=h();return null===r&&(e.init(),r=h()),v(r,"visible")&&L(),t.apply(this,n)}var n="swal2-",r=function(t){var e={};for(var r in t)e[t[r]]=n+t[r];return e},i=r(["container","modal","overlay","close","content","spacer","confirm","cancel","icon","image","input","select","radio","checkbox","textarea","validationerror"]),o=r(["success","warning","info","question","error"]),a={title:"",text:"",html:"",type:null,animation:!0,allowOutsideClick:!0,allowEscapeKey:!0,showConfirmButton:!0,showCancelButton:!1,preConfirm:null,confirmButtonText:"OK",confirmButtonColor:"#3085d6",confirmButtonClass:null,cancelButtonText:"Cancel",cancelButtonColor:"#aaa",cancelButtonClass:null,buttonsStyling:!0,reverseButtons:!1,showCloseButton:!1,showLoaderOnConfirm:!1,imageUrl:null,imageWidth:null,imageHeight:null,imageClass:null,timer:null,width:500,padding:20,background:"#fff",input:null,inputPlaceholder:"",inputValue:"",inputOptions:{},inputAutoTrim:!0,inputClass:null,inputAttributes:{},inputValidator:null,onOpen:null,onClose:null},s='
',l=function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t},u=function(t,e){t=String(t).replace(/[^0-9a-f]/gi,""),t.length<6&&(t=t[0]+t[0]+t[1]+t[1]+t[2]+t[2]),e=e||0;for(var n="#",r=0;3>r;r++){var i=parseInt(t.substr(2*r,2),16);i=Math.round(Math.min(Math.max(0,i+i*e),255)).toString(16),n+=("00"+i).substr(i.length)}return n},c=n+"mediaquery",d={previousDocumentClick:null,previousWindowKeyDown:null,previousActiveElement:null},f=function(t){return document.querySelector("."+t)},h=function(){return f(i.modal)},p=function(){return f(i.overlay)},g=function(){return f(i.confirm)},m=function(){return f(i.cancel)},v=function(t,e){return new RegExp(" "+e+" ").test(" "+t.className+" ")},y=function(t){t.focus();var e=t.value;t.value="",t.value=e},b=function(t,e){e&&!v(t,e)&&(t.className+=" "+e)},x=function(t,e){var n=" "+t.className.replace(/[\t\r\n]/g," ")+" ";if(v(t,e)){for(;n.indexOf(" "+e+" ")>=0;)n=n.replace(" "+e+" "," ");t.className=n.replace(/^\s+|\s+$/g,"")}},w=function(t,e){for(var n=0;n1?1:i,n=+new Date,+t.style.opacity<1&&setTimeout(r,e)};r()}},E=function(t,e){if(+t.style.opacity>0){e=e||16;var n=t.style.opacity,r=+new Date,i=function(){var o=new Date-r,a=+t.style.opacity-o/(100*n);t.style.opacity=a,r=+new Date,+t.style.opacity>0?setTimeout(i,e):C(t)};i()}},A=function(t){if("function"==typeof MouseEvent){var e=new MouseEvent("click",{view:window,bubbles:!1,cancelable:!0});t.dispatchEvent(e)}else if(document.createEvent){var n=document.createEvent("MouseEvents");n.initEvent("click",!1,!1),t.dispatchEvent(n)}else document.createEventObject?t.fireEvent("onclick"):"function"==typeof t.onclick&&t.onclick()},P=function(t){"function"==typeof t.stopPropagation?(t.stopPropagation(),t.preventDefault()):window.event&&window.event.hasOwnProperty("cancelBubble")&&(window.event.cancelBubble=!0)},N=function(){var t=document.createElement("div"),e={WebkitAnimation:"webkitAnimationEnd",MozAnimation:"animationend",OAnimation:"oAnimationEnd oanimationend",msAnimation:"MSAnimationEnd",animation:"animationend"};for(var n in e)if(e.hasOwnProperty(n)&&void 0!==t.style[n])return e[n];return!1}(),L=function(){var t=h();window.onkeydown=d.previousWindowKeyDown,document.onclick=d.previousDocumentClick,d.previousActiveElement&&d.previousActiveElement.focus(),clearTimeout(t.timeout);var e=document.getElementsByTagName("head")[0],n=document.getElementById(c);n&&e.removeChild(n)},O=l({},a),I=function(t){var e,n=h();n.style.width=t.width+"px",n.style.padding=t.padding+"px",n.style.marginLeft=-t.width/2+"px",n.style.background=t.background;var r=document.getElementsByTagName("head")[0],a=document.createElement("style");a.type="text/css",a.id=c;var s=5,l=t.width+parseInt(t.width*(s/100)*2,10);a.innerHTML="@media screen and (max-width: "+l+"px) {."+i.modal+" {width: auto !important;left: "+s+"% !important;right: "+s+"% !important;margin-left: 0 !important;}}",r.appendChild(a);var u=n.querySelector("h2"),d=n.querySelector("."+i.content),f=g(),p=m(),v=n.querySelector("."+i.spacer),y=n.querySelector("."+i.close);if(u.innerHTML=t.title.split("\n").join("
"),t.text||t.html){if("object"==typeof t.html)if(d.innerHTML="",0 in t.html)for(e=0;e in t.html;e++)d.appendChild(t.html[e]);else d.appendChild(t.html);else d.innerHTML=t.html||t.text.split("\n").join("
");S(d)}else D(d);if(t.showCloseButton?S(y):D(y),n.className=i.modal,t.customClass&&b(n,t.customClass),D(n.querySelectorAll("."+i.icon)),t.type){var w=!1;for(var _ in o)if(t.type===_){w=!0;break}if(!w)return console.error("Unknown alert type: "+t.type),!1;var C=n.querySelector("."+i.icon+"."+o[t.type]);switch(S(C),t.type){case"success":b(C,"animate"),b(C.querySelector(".tip"),"animate-success-tip"),b(C.querySelector(".long"),"animate-success-long");break;case"error":b(C,"animate-error-icon"),b(C.querySelector(".x-mark"),"animate-x-mark");break;case"warning":b(C,"pulse-warning")}}var M=n.querySelector("."+i.image);t.imageUrl?(M.setAttribute("src",t.imageUrl),S(M),t.imageWidth&&M.setAttribute("width",t.imageWidth),t.imageHeight&&M.setAttribute("height",t.imageHeight),t.imageClass&&b(M,t.imageClass)):D(M),t.showCancelButton?p.style.display="inline-block":D(p),t.showConfirmButton?T(f,"display"):D(f),t.showConfirmButton||t.showCancelButton?S(v):D(v),f.innerHTML=t.confirmButtonText,p.innerHTML=t.cancelButtonText,t.buttonsStyling&&(f.style.backgroundColor=t.confirmButtonColor,p.style.backgroundColor=t.cancelButtonColor),f.className=i.confirm,b(f,t.confirmButtonClass),p.className=i.cancel,b(p,t.cancelButtonClass),t.buttonsStyling?(b(f,"styled"),b(p,"styled")):(x(f,"styled"),x(p,"styled"),f.style.backgroundColor=f.style.borderLeftColor=f.style.borderRightColor="",p.style.backgroundColor=p.style.borderLeftColor=p.style.borderRightColor=""),t.animation===!0?x(n,"no-animation"):b(n,"no-animation")},j=function(t,e){var n=h();t?(k(p(),10),b(n,"show-swal2"),x(n,"hide-swal2")):S(p()),S(n),d.previousActiveElement=document.activeElement,b(n,"visible"),null!==e&&"function"==typeof e&&e.call(this,n)},F=function(){var t=h();t.style.marginTop=M(t)};return e.queue=function(t){return new Promise(function(n,r){!function i(o,a){o1)throw new TypeError("isEnabled expects a single character string parameter");switch(t){case"y":return l.indexOf("Y")!==-1;case"M":return l.indexOf("M")!==-1;case"d":return l.toLowerCase().indexOf("d")!==-1;case"h":case"H":return l.toLowerCase().indexOf("h")!==-1;case"m":return l.indexOf("m")!==-1;case"s":return l.indexOf("s")!==-1;default:return!1}},D=function(){return C("h")||C("m")||C("s")},T=function(){return C("y")||C("M")||C("d")},M=function(){var e=t("").append(t("").append(t("").addClass("prev").attr("data-action","previous").append(t("").addClass(r.icons.previous))).append(t("").addClass("picker-switch").attr("data-action","pickerSwitch").attr("colspan",r.calendarWeeks?"6":"5")).append(t("").addClass("next").attr("data-action","next").append(t("").addClass(r.icons.next)))),n=t("").append(t("").append(t("").attr("colspan",r.calendarWeeks?"8":"7")));return[t("
").addClass("datepicker-days").append(t("").addClass("table-condensed").append(e).append(t(""))),t("
").addClass("datepicker-months").append(t("
").addClass("table-condensed").append(e.clone()).append(n.clone())),t("
").addClass("datepicker-years").append(t("
").addClass("table-condensed").append(e.clone()).append(n.clone())),t("
").addClass("datepicker-decades").append(t("
").addClass("table-condensed").append(e.clone()).append(n.clone()))]},k=function(){var e=t(""),n=t(""),i=t("");return C("h")&&(e.append(t("
").append(t("").attr({href:"#",tabindex:"-1",title:r.tooltips.incrementHour}).addClass("btn").attr("data-action","incrementHours").append(t("").addClass(r.icons.up)))),n.append(t("").append(t("").addClass("timepicker-hour").attr({"data-time-component":"hours",title:r.tooltips.pickHour}).attr("data-action","showHours"))),i.append(t("").append(t("").attr({href:"#",tabindex:"-1",title:r.tooltips.decrementHour}).addClass("btn").attr("data-action","decrementHours").append(t("").addClass(r.icons.down))))),C("m")&&(C("h")&&(e.append(t("").addClass("separator")),n.append(t("").addClass("separator").html(":")),i.append(t("").addClass("separator"))),e.append(t("").append(t("").attr({href:"#",tabindex:"-1",title:r.tooltips.incrementMinute}).addClass("btn").attr("data-action","incrementMinutes").append(t("").addClass(r.icons.up)))),n.append(t("").append(t("").addClass("timepicker-minute").attr({"data-time-component":"minutes",title:r.tooltips.pickMinute}).attr("data-action","showMinutes"))),i.append(t("").append(t("").attr({href:"#",tabindex:"-1",title:r.tooltips.decrementMinute}).addClass("btn").attr("data-action","decrementMinutes").append(t("").addClass(r.icons.down))))),C("s")&&(C("m")&&(e.append(t("").addClass("separator")),n.append(t("").addClass("separator").html(":")),i.append(t("").addClass("separator"))),e.append(t("").append(t("").attr({href:"#",tabindex:"-1",title:r.tooltips.incrementSecond}).addClass("btn").attr("data-action","incrementSeconds").append(t("").addClass(r.icons.up)))),n.append(t("").append(t("").addClass("timepicker-second").attr({"data-time-component":"seconds",title:r.tooltips.pickSecond}).attr("data-action","showSeconds"))),i.append(t("").append(t("").attr({href:"#",tabindex:"-1",title:r.tooltips.decrementSecond}).addClass("btn").attr("data-action","decrementSeconds").append(t("").addClass(r.icons.down))))),s||(e.append(t("").addClass("separator")),n.append(t("").append(t("").addClass("separator"))),t("
").addClass("timepicker-picker").append(t("").addClass("table-condensed").append([e,n,i]))},E=function(){var e=t("
").addClass("timepicker-hours").append(t("
").addClass("table-condensed")),n=t("
").addClass("timepicker-minutes").append(t("
").addClass("table-condensed")),r=t("
").addClass("timepicker-seconds").append(t("
").addClass("table-condensed")),i=[k()];return C("h")&&i.push(e),C("m")&&i.push(n),C("s")&&i.push(r),i},A=function(){var e=[];return r.showTodayButton&&e.push(t("
").append(t("").attr({"data-action":"today",title:r.tooltips.today}).append(t("").addClass(r.icons.today)))),!r.sideBySide&&T()&&D()&&e.push(t("").append(t("").attr({"data-action":"togglePicker",title:r.tooltips.selectTime}).append(t("").addClass(r.icons.time)))),r.showClear&&e.push(t("").append(t("").attr({"data-action":"clear",title:r.tooltips.clear}).append(t("").addClass(r.icons.clear)))),r.showClose&&e.push(t("").append(t("").attr({"data-action":"close",title:r.tooltips.close}).append(t("").addClass(r.icons.close)))),t("").addClass("table-condensed").append(t("").append(t("").append(e)))},P=function(){var e=t("
").addClass("bootstrap-datetimepicker-widget dropdown-menu"),n=t("
").addClass("datepicker").append(M()),i=t("
").addClass("timepicker").append(E()),o=t("
    ").addClass("list-unstyled"),a=t("
  • ").addClass("picker-switch"+(r.collapse?" accordion-toggle":"")).append(A());return r.inline&&e.removeClass("dropdown-menu"),s&&e.addClass("usetwentyfour"),C("s")&&!s&&e.addClass("wider"),r.sideBySide&&T()&&D()?(e.addClass("timepicker-sbs"),"top"===r.toolbarPlacement&&e.append(a),e.append(t("
    ").addClass("row").append(n.addClass("col-md-6")).append(i.addClass("col-md-6"))),"bottom"===r.toolbarPlacement&&e.append(a),e):("top"===r.toolbarPlacement&&o.append(a),T()&&o.append(t("
  • ").addClass(r.collapse&&D()?"collapse in":"").append(n)),"default"===r.toolbarPlacement&&o.append(a),D()&&o.append(t("
  • ").addClass(r.collapse&&T()?"collapse":"").append(i)),"bottom"===r.toolbarPlacement&&o.append(a),e.append(o))},N=function(){var e,i={};return e=n.is("input")||r.inline?n.data():n.find("input").data(),e.dateOptions&&e.dateOptions instanceof Object&&(i=t.extend(!0,i,e.dateOptions)),t.each(r,function(t){var n="date"+t.charAt(0).toUpperCase()+t.slice(1);void 0!==e[n]&&(i[t]=e[n])}),i},L=function(){var e,i=(h||n).position(),o=(h||n).offset(),a=r.widgetPositioning.vertical,s=r.widgetPositioning.horizontal;if(r.widgetParent)e=r.widgetParent.append(p);else if(n.is("input"))e=n.after(p).parent();else{if(r.inline)return void(e=n.append(p));e=n,n.children().first().after(p)}if("auto"===a&&(a=o.top+1.5*p.height()>=t(window).height()+t(window).scrollTop()&&p.height()+n.outerHeight()t(window).width()?"right":"left"),"top"===a?p.addClass("top").removeClass("bottom"):p.addClass("bottom").removeClass("top"),"right"===s?p.addClass("pull-right"):p.removeClass("pull-right"),"relative"!==e.css("position")&&(e=e.parents().filter(function(){return"relative"===t(this).css("position")}).first()),0===e.length)throw new Error("datetimepicker component should be placed within a relative positioned container");p.css({top:"top"===a?"auto":i.top+n.outerHeight(),bottom:"top"===a?i.top+n.outerHeight():"auto",left:"left"===s?e===n?0:i.left:"auto",right:"left"===s?"auto":e.outerWidth()-n.outerWidth()-(e===n?0:i.left)})},O=function(t){"dp.change"===t.type&&(t.date&&t.date.isSame(t.oldDate)||!t.date&&!t.oldDate)||n.trigger(t)},I=function(t){"y"===t&&(t="YYYY"),O({type:"dp.update",change:t,viewDate:o.clone()})},j=function(t){p&&(t&&(c=Math.max(g,Math.min(3,c+t))),p.find(".datepicker > div").hide().filter(".datepicker-"+m[c].clsName).show())},F=function(){var e=t("
"),n=o.clone().startOf("w").startOf("d");for(r.calendarWeeks===!0&&e.append(t(""),r.calendarWeeks&&n.append('"),c.push(n)),a="",e.isBefore(o,"M")&&(a+=" old"),e.isAfter(o,"M")&&(a+=" new"),e.isSame(i,"d")&&!f&&(a+=" active"),U(e,"d")||(a+=" disabled"),e.isSame(S(),"d")&&(a+=" today"),0!==e.day()&&6!==e.day()||(a+=" weekend"),n.append('"),e.add(1,"d");l.find("tbody").empty().append(c),B(),W(),Y()}},V=function(){var e=p.find(".timepicker-hours table"),n=o.clone().startOf("d"),r=[],i=t("");for(o.hour()>11&&!s&&n.hour(12);n.isSame(o,"d")&&(s||o.hour()<12&&n.hour()<12||o.hour()>11);)n.hour()%4===0&&(i=t(""),r.push(i)),i.append('"),n.add(1,"h");e.empty().append(r)},X=function(){for(var e=p.find(".timepicker-minutes table"),n=o.clone().startOf("h"),i=[],a=t(""),s=1===r.stepping?5:r.stepping;o.isSame(n,"h");)n.minute()%(4*s)===0&&(a=t(""),i.push(a)),a.append('"),n.add(s,"m");e.empty().append(i)},Z=function(){for(var e=p.find(".timepicker-seconds table"),n=o.clone().startOf("m"),r=[],i=t("");o.isSame(n,"m");)n.second()%20===0&&(i=t(""),r.push(i)),i.append('"),n.add(5,"s");e.empty().append(r)},J=function(){var t,e,n=p.find(".timepicker span[data-time-component]");s||(t=p.find(".timepicker [data-action=togglePeriod]"),e=i.clone().add(i.hours()>=12?-12:12,"h"),t.text(i.format("A")),U(e,"h")?t.removeClass("disabled"):t.addClass("disabled")),n.filter("[data-time-component=hours]").text(i.format(s?"HH":"hh")),n.filter("[data-time-component=minutes]").text(i.format("mm")),n.filter("[data-time-component=seconds]").text(i.format("ss")),V(),X(),Z()},K=function(){p&&(G(),J())},Q=function(t){var e=f?null:i;return t?(t=t.clone().locale(r.locale),1!==r.stepping&&t.minutes(Math.round(t.minutes()/r.stepping)*r.stepping%60).seconds(0),void(U(t)?(i=t,o=i.clone(),a.val(i.format(l)),n.data("date",i.format(l)),f=!1,K(),O({type:"dp.change",date:i.clone(),oldDate:e})):(r.keepInvalid||a.val(f?"":i.format(l)),O({type:"dp.error",date:t})))):(f=!0,a.val(""),n.data("date",""),O({type:"dp.change",date:!1,oldDate:e}),void K())},tt=function(){var e=!1;return p?(p.find(".collapse").each(function(){var n=t(this).data("collapse");return!n||!n.transitioning||(e=!0,!1)}),e?d:(h&&h.hasClass("btn")&&h.toggleClass("active"),p.hide(),t(window).off("resize",L),p.off("click","[data-action]"),p.off("mousedown",!1),p.remove(),p=!1,O({type:"dp.hide",date:i.clone()}),a.blur(),d)):d},et=function(){Q(null)},nt={next:function(){var t=m[c].navFnc;o.add(m[c].navStep,t),G(),I(t)},previous:function(){var t=m[c].navFnc;o.subtract(m[c].navStep,t),G(),I(t)},pickerSwitch:function(){j(1)},selectMonth:function(e){var n=t(e.target).closest("tbody").find("span").index(t(e.target));o.month(n),c===g?(Q(i.clone().year(o.year()).month(o.month())),r.inline||tt()):(j(-1),G()),I("M")},selectYear:function(e){var n=parseInt(t(e.target).text(),10)||0;o.year(n),c===g?(Q(i.clone().year(o.year())),r.inline||tt()):(j(-1),G()),I("YYYY")},selectDecade:function(e){var n=parseInt(t(e.target).data("selection"),10)||0;o.year(n),c===g?(Q(i.clone().year(o.year())),r.inline||tt()):(j(-1),G()),I("YYYY")},selectDay:function(e){var n=o.clone();t(e.target).is(".old")&&n.subtract(1,"M"),t(e.target).is(".new")&&n.add(1,"M"),Q(n.date(parseInt(t(e.target).text(),10))),D()||r.keepOpen||r.inline||tt()},incrementHours:function(){var t=i.clone().add(1,"h");U(t,"h")&&Q(t)},incrementMinutes:function(){var t=i.clone().add(r.stepping,"m");U(t,"m")&&Q(t)},incrementSeconds:function(){var t=i.clone().add(1,"s");U(t,"s")&&Q(t)},decrementHours:function(){var t=i.clone().subtract(1,"h");U(t,"h")&&Q(t)},decrementMinutes:function(){var t=i.clone().subtract(r.stepping,"m");U(t,"m")&&Q(t)},decrementSeconds:function(){var t=i.clone().subtract(1,"s");U(t,"s")&&Q(t)},togglePeriod:function(){Q(i.clone().add(i.hours()>=12?-12:12,"h"))},togglePicker:function(e){var n,i=t(e.target),o=i.closest("ul"),a=o.find(".in"),s=o.find(".collapse:not(.in)");if(a&&a.length){if(n=a.data("collapse"),n&&n.transitioning)return;a.collapse?(a.collapse("hide"),s.collapse("show")):(a.removeClass("in"),s.addClass("in")),i.is("span")?i.toggleClass(r.icons.time+" "+r.icons.date):i.find("span").toggleClass(r.icons.time+" "+r.icons.date)}},showPicker:function(){p.find(".timepicker > div:not(.timepicker-picker)").hide(),p.find(".timepicker .timepicker-picker").show()},showHours:function(){p.find(".timepicker .timepicker-picker").hide(),p.find(".timepicker .timepicker-hours").show()},showMinutes:function(){p.find(".timepicker .timepicker-picker").hide(),p.find(".timepicker .timepicker-minutes").show()},showSeconds:function(){p.find(".timepicker .timepicker-picker").hide(),p.find(".timepicker .timepicker-seconds").show()},selectHour:function(e){var n=parseInt(t(e.target).text(),10);s||(i.hours()>=12?12!==n&&(n+=12):12===n&&(n=0)),Q(i.clone().hours(n)),nt.showPicker.call(d)},selectMinute:function(e){Q(i.clone().minutes(parseInt(t(e.target).text(),10))),nt.showPicker.call(d)},selectSecond:function(e){Q(i.clone().seconds(parseInt(t(e.target).text(),10))),nt.showPicker.call(d)},clear:et,today:function(){var t=S();U(t,"d")&&Q(t)},close:tt},rt=function(e){return!t(e.currentTarget).is(".disabled")&&(nt[t(e.currentTarget).data("action")].apply(d,arguments),!1)},it=function(){var e,n={year:function(t){return t.month(0).date(1).hours(0).seconds(0).minutes(0)},month:function(t){return t.date(1).hours(0).seconds(0).minutes(0)},day:function(t){return t.hours(0).seconds(0).minutes(0)},hour:function(t){return t.seconds(0).minutes(0)},minute:function(t){return t.seconds(0)}};return a.prop("disabled")||!r.ignoreReadonly&&a.prop("readonly")||p?d:(void 0!==a.val()&&0!==a.val().trim().length?Q(at(a.val().trim())):r.useCurrent&&f&&(a.is("input")&&0===a.val().trim().length||r.inline)&&(e=S(),"string"==typeof r.useCurrent&&(e=n[r.useCurrent](e)),Q(e)),p=P(),F(),z(),p.find(".timepicker-hours").hide(),p.find(".timepicker-minutes").hide(),p.find(".timepicker-seconds").hide(),K(),j(),t(window).on("resize",L),p.on("click","[data-action]",rt),p.on("mousedown",!1),h&&h.hasClass("btn")&&h.toggleClass("active"),p.show(),L(),r.focusOnShow&&!a.is(":focus")&&a.focus(),O({type:"dp.show"}),d)},ot=function(){return p?tt():it()},at=function(t){return t=void 0===r.parseInputDate?e.isMoment(t)||t instanceof Date?e(t):S(t):r.parseInputDate(t),t.locale(r.locale),t},st=function(t){var e,n,i,o,a=null,s=[],l={},u=t.which,c="p";_[u]=c;for(e in _)_.hasOwnProperty(e)&&_[e]===c&&(s.push(e),parseInt(e,10)!==u&&(l[e]=!0));for(e in r.keyBinds)if(r.keyBinds.hasOwnProperty(e)&&"function"==typeof r.keyBinds[e]&&(i=e.split(" "),i.length===s.length&&w[u]===i[i.length-1])){for(o=!0,n=i.length-2;n>=0;n--)if(!(w[i[n]]in l)){o=!1;break}if(o){a=r.keyBinds[e];break}}a&&(a.call(d,p),t.stopPropagation(),t.preventDefault())},lt=function(t){_[t.which]="r",t.stopPropagation(),t.preventDefault()},ut=function(e){var n=t(e.target).val().trim(),r=n?at(n):null;return Q(r),e.stopImmediatePropagation(),!1},ct=function(){a.on({change:ut,blur:r.debug?"":tt,keydown:st,keyup:lt,focus:r.allowInputToggle?it:""}),n.is("input")?a.on({focus:it}):h&&(h.on("click",ot),h.on("mousedown",!1))},dt=function(){a.off({change:ut,blur:blur,keydown:st,keyup:lt,focus:r.allowInputToggle?tt:""}),n.is("input")?a.off({focus:it}):h&&(h.off("click",ot),h.off("mousedown",!1))},ft=function(e){var n={};return t.each(e,function(){var t=at(this);t.isValid()&&(n[t.format("YYYY-MM-DD")]=!0)}),!!Object.keys(n).length&&n},ht=function(e){var n={};return t.each(e,function(){n[this]=!0}),!!Object.keys(n).length&&n},pt=function(){var t=r.format||"L LT";l=t.replace(/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,function(t){var e=i.localeData().longDateFormat(t)||t;return e.replace(/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,function(t){return i.localeData().longDateFormat(t)||t})}),u=r.extraFormats?r.extraFormats.slice():[],u.indexOf(t)<0&&u.indexOf(l)<0&&u.push(l),s=l.toLowerCase().indexOf("a")<1&&l.replace(/\[.*?\]/g,"").indexOf("h")<1,C("y")&&(g=2),C("M")&&(g=1),C("d")&&(g=0),c=Math.max(g,c),f||Q(i)};if(d.destroy=function(){tt(),dt(),n.removeData("DateTimePicker"),n.removeData("date")},d.toggle=ot,d.show=it,d.hide=tt,d.disable=function(){return tt(),h&&h.hasClass("btn")&&h.addClass("disabled"),a.prop("disabled",!0),d},d.enable=function(){return h&&h.hasClass("btn")&&h.removeClass("disabled"),a.prop("disabled",!1),d},d.ignoreReadonly=function(t){if(0===arguments.length)return r.ignoreReadonly;if("boolean"!=typeof t)throw new TypeError("ignoreReadonly () expects a boolean parameter");return r.ignoreReadonly=t,d},d.options=function(e){if(0===arguments.length)return t.extend(!0,{},r);if(!(e instanceof Object))throw new TypeError("options() options parameter should be an object");return t.extend(!0,r,e),t.each(r,function(t,e){if(void 0===d[t])throw new TypeError("option "+t+" is not recognized!");d[t](e)}),d},d.date=function(t){if(0===arguments.length)return f?null:i.clone();if(!(null===t||"string"==typeof t||e.isMoment(t)||t instanceof Date))throw new TypeError("date() parameter must be one of [null, string, moment or Date]");return Q(null===t?null:at(t)),d},d.format=function(t){if(0===arguments.length)return r.format;if("string"!=typeof t&&("boolean"!=typeof t||t!==!1))throw new TypeError("format() expects a sting or boolean:false parameter "+t);return r.format=t,l&&pt(),d},d.timeZone=function(t){return 0===arguments.length?r.timeZone:(r.timeZone=t,d)},d.dayViewHeaderFormat=function(t){if(0===arguments.length)return r.dayViewHeaderFormat;if("string"!=typeof t)throw new TypeError("dayViewHeaderFormat() expects a string parameter");return r.dayViewHeaderFormat=t,d},d.extraFormats=function(t){if(0===arguments.length)return r.extraFormats;if(t!==!1&&!(t instanceof Array))throw new TypeError("extraFormats() expects an array or false parameter");return r.extraFormats=t,u&&pt(),d},d.disabledDates=function(e){if(0===arguments.length)return r.disabledDates?t.extend({},r.disabledDates):r.disabledDates;if(!e)return r.disabledDates=!1,K(),d;if(!(e instanceof Array))throw new TypeError("disabledDates() expects an array parameter");return r.disabledDates=ft(e),r.enabledDates=!1,K(),d},d.enabledDates=function(e){if(0===arguments.length)return r.enabledDates?t.extend({},r.enabledDates):r.enabledDates;if(!e)return r.enabledDates=!1,K(),d;if(!(e instanceof Array))throw new TypeError("enabledDates() expects an array parameter");return r.enabledDates=ft(e),r.disabledDates=!1,K(),d},d.daysOfWeekDisabled=function(t){if(0===arguments.length)return r.daysOfWeekDisabled.splice(0);if("boolean"==typeof t&&!t)return r.daysOfWeekDisabled=!1,K(),d;if(!(t instanceof Array))throw new TypeError("daysOfWeekDisabled() expects an array parameter");if(r.daysOfWeekDisabled=t.reduce(function(t,e){return e=parseInt(e,10),e>6||e<0||isNaN(e)?t:(t.indexOf(e)===-1&&t.push(e),t)},[]).sort(),r.useCurrent&&!r.keepInvalid){for(var e=0;!U(i,"d");){if(i.add(1,"d"),7===e)throw"Tried 7 times to find a valid date";e++}Q(i)}return K(),d},d.maxDate=function(t){if(0===arguments.length)return r.maxDate?r.maxDate.clone():r.maxDate;if("boolean"==typeof t&&t===!1)return r.maxDate=!1,K(),d;"string"==typeof t&&("now"!==t&&"moment"!==t||(t=S()));var e=at(t);if(!e.isValid())throw new TypeError("maxDate() Could not parse date parameter: "+t);if(r.minDate&&e.isBefore(r.minDate))throw new TypeError("maxDate() date parameter is before options.minDate: "+e.format(l));return r.maxDate=e,r.useCurrent&&!r.keepInvalid&&i.isAfter(t)&&Q(r.maxDate),o.isAfter(e)&&(o=e.clone().subtract(r.stepping,"m")),K(),d},d.minDate=function(t){if(0===arguments.length)return r.minDate?r.minDate.clone():r.minDate;if("boolean"==typeof t&&t===!1)return r.minDate=!1,K(),d;"string"==typeof t&&("now"!==t&&"moment"!==t||(t=S()));var e=at(t);if(!e.isValid())throw new TypeError("minDate() Could not parse date parameter: "+t);if(r.maxDate&&e.isAfter(r.maxDate))throw new TypeError("minDate() date parameter is after options.maxDate: "+e.format(l));return r.minDate=e,r.useCurrent&&!r.keepInvalid&&i.isBefore(t)&&Q(r.minDate),o.isBefore(e)&&(o=e.clone().add(r.stepping,"m")),K(),d},d.defaultDate=function(t){if(0===arguments.length)return r.defaultDate?r.defaultDate.clone():r.defaultDate;if(!t)return r.defaultDate=!1,d;"string"==typeof t&&("now"!==t&&"moment"!==t||(t=S()));var e=at(t);if(!e.isValid())throw new TypeError("defaultDate() Could not parse date parameter: "+t);if(!U(e))throw new TypeError("defaultDate() date passed is invalid according to component setup validations");return r.defaultDate=e,(r.defaultDate&&r.inline||""===a.val().trim())&&Q(r.defaultDate),d},d.locale=function(t){if(0===arguments.length)return r.locale;if(!e.localeData(t))throw new TypeError("locale() locale "+t+" is not loaded from moment locales!");return r.locale=t,i.locale(r.locale),o.locale(r.locale),l&&pt(),p&&(tt(),it()),d},d.stepping=function(t){return 0===arguments.length?r.stepping:(t=parseInt(t,10),(isNaN(t)||t<1)&&(t=1),r.stepping=t,d)},d.useCurrent=function(t){var e=["year","month","day","hour","minute"];if(0===arguments.length)return r.useCurrent;if("boolean"!=typeof t&&"string"!=typeof t)throw new TypeError("useCurrent() expects a boolean or string parameter");if("string"==typeof t&&e.indexOf(t.toLowerCase())===-1)throw new TypeError("useCurrent() expects a string parameter of "+e.join(", "));return r.useCurrent=t,d},d.collapse=function(t){if(0===arguments.length)return r.collapse;if("boolean"!=typeof t)throw new TypeError("collapse() expects a boolean parameter");return r.collapse===t?d:(r.collapse=t,p&&(tt(),it()),d)},d.icons=function(e){if(0===arguments.length)return t.extend({},r.icons);if(!(e instanceof Object))throw new TypeError("icons() expects parameter to be an Object");return t.extend(r.icons,e),p&&(tt(),it()),d},d.tooltips=function(e){if(0===arguments.length)return t.extend({},r.tooltips);if(!(e instanceof Object))throw new TypeError("tooltips() expects parameter to be an Object");return t.extend(r.tooltips,e),p&&(tt(),it()),d},d.useStrict=function(t){if(0===arguments.length)return r.useStrict;if("boolean"!=typeof t)throw new TypeError("useStrict() expects a boolean parameter");return r.useStrict=t,d},d.sideBySide=function(t){if(0===arguments.length)return r.sideBySide;if("boolean"!=typeof t)throw new TypeError("sideBySide() expects a boolean parameter");return r.sideBySide=t,p&&(tt(),it()),d},d.viewMode=function(t){if(0===arguments.length)return r.viewMode;if("string"!=typeof t)throw new TypeError("viewMode() expects a string parameter");if(v.indexOf(t)===-1)throw new TypeError("viewMode() parameter must be one of ("+v.join(", ")+") value");return r.viewMode=t,c=Math.max(v.indexOf(t),g),j(),d},d.toolbarPlacement=function(t){if(0===arguments.length)return r.toolbarPlacement;if("string"!=typeof t)throw new TypeError("toolbarPlacement() expects a string parameter");if(x.indexOf(t)===-1)throw new TypeError("toolbarPlacement() parameter must be one of ("+x.join(", ")+") value");return r.toolbarPlacement=t,p&&(tt(),it()),d},d.widgetPositioning=function(e){if(0===arguments.length)return t.extend({},r.widgetPositioning);if("[object Object]"!=={}.toString.call(e))throw new TypeError("widgetPositioning() expects an object variable");if(e.horizontal){if("string"!=typeof e.horizontal)throw new TypeError("widgetPositioning() horizontal variable must be a string");if(e.horizontal=e.horizontal.toLowerCase(),b.indexOf(e.horizontal)===-1)throw new TypeError("widgetPositioning() expects horizontal parameter to be one of ("+b.join(", ")+")");r.widgetPositioning.horizontal=e.horizontal}if(e.vertical){if("string"!=typeof e.vertical)throw new TypeError("widgetPositioning() vertical variable must be a string");if(e.vertical=e.vertical.toLowerCase(),y.indexOf(e.vertical)===-1)throw new TypeError("widgetPositioning() expects vertical parameter to be one of ("+y.join(", ")+")");r.widgetPositioning.vertical=e.vertical}return K(),d},d.calendarWeeks=function(t){if(0===arguments.length)return r.calendarWeeks;if("boolean"!=typeof t)throw new TypeError("calendarWeeks() expects parameter to be a boolean value");return r.calendarWeeks=t,K(),d},d.showTodayButton=function(t){if(0===arguments.length)return r.showTodayButton;if("boolean"!=typeof t)throw new TypeError("showTodayButton() expects a boolean parameter");return r.showTodayButton=t,p&&(tt(),it()),d},d.showClear=function(t){if(0===arguments.length)return r.showClear;if("boolean"!=typeof t)throw new TypeError("showClear() expects a boolean parameter"); return r.showClear=t,p&&(tt(),it()),d},d.widgetParent=function(e){if(0===arguments.length)return r.widgetParent;if("string"==typeof e&&(e=t(e)),null!==e&&"string"!=typeof e&&!(e instanceof t))throw new TypeError("widgetParent() expects a string or a jQuery object parameter");return r.widgetParent=e,p&&(tt(),it()),d},d.keepOpen=function(t){if(0===arguments.length)return r.keepOpen;if("boolean"!=typeof t)throw new TypeError("keepOpen() expects a boolean parameter");return r.keepOpen=t,d},d.focusOnShow=function(t){if(0===arguments.length)return r.focusOnShow;if("boolean"!=typeof t)throw new TypeError("focusOnShow() expects a boolean parameter");return r.focusOnShow=t,d},d.inline=function(t){if(0===arguments.length)return r.inline;if("boolean"!=typeof t)throw new TypeError("inline() expects a boolean parameter");return r.inline=t,d},d.clear=function(){return et(),d},d.keyBinds=function(t){return r.keyBinds=t,d},d.getMoment=function(t){return S(t)},d.debug=function(t){if("boolean"!=typeof t)throw new TypeError("debug() expects a boolean parameter");return r.debug=t,d},d.allowInputToggle=function(t){if(0===arguments.length)return r.allowInputToggle;if("boolean"!=typeof t)throw new TypeError("allowInputToggle() expects a boolean parameter");return r.allowInputToggle=t,d},d.showClose=function(t){if(0===arguments.length)return r.showClose;if("boolean"!=typeof t)throw new TypeError("showClose() expects a boolean parameter");return r.showClose=t,d},d.keepInvalid=function(t){if(0===arguments.length)return r.keepInvalid;if("boolean"!=typeof t)throw new TypeError("keepInvalid() expects a boolean parameter");return r.keepInvalid=t,d},d.datepickerInput=function(t){if(0===arguments.length)return r.datepickerInput;if("string"!=typeof t)throw new TypeError("datepickerInput() expects a string parameter");return r.datepickerInput=t,d},d.parseInputDate=function(t){if(0===arguments.length)return r.parseInputDate;if("function"!=typeof t)throw new TypeError("parseInputDate() sholud be as function");return r.parseInputDate=t,d},d.disabledTimeIntervals=function(e){if(0===arguments.length)return r.disabledTimeIntervals?t.extend({},r.disabledTimeIntervals):r.disabledTimeIntervals;if(!e)return r.disabledTimeIntervals=!1,K(),d;if(!(e instanceof Array))throw new TypeError("disabledTimeIntervals() expects an array parameter");return r.disabledTimeIntervals=e,K(),d},d.disabledHours=function(e){if(0===arguments.length)return r.disabledHours?t.extend({},r.disabledHours):r.disabledHours;if(!e)return r.disabledHours=!1,K(),d;if(!(e instanceof Array))throw new TypeError("disabledHours() expects an array parameter");if(r.disabledHours=ht(e),r.enabledHours=!1,r.useCurrent&&!r.keepInvalid){for(var n=0;!U(i,"h");){if(i.add(1,"h"),24===n)throw"Tried 24 times to find a valid date";n++}Q(i)}return K(),d},d.enabledHours=function(e){if(0===arguments.length)return r.enabledHours?t.extend({},r.enabledHours):r.enabledHours;if(!e)return r.enabledHours=!1,K(),d;if(!(e instanceof Array))throw new TypeError("enabledHours() expects an array parameter");if(r.enabledHours=ht(e),r.disabledHours=!1,r.useCurrent&&!r.keepInvalid){for(var n=0;!U(i,"h");){if(i.add(1,"h"),24===n)throw"Tried 24 times to find a valid date";n++}Q(i)}return K(),d},d.viewDate=function(t){if(0===arguments.length)return o.clone();if(!t)return o=i.clone(),d;if(!("string"==typeof t||e.isMoment(t)||t instanceof Date))throw new TypeError("viewDate() parameter must be one of [string, moment or Date]");return o=at(t),I(),d},n.is("input"))a=n;else if(a=n.find(r.datepickerInput),0===a.size())a=n.find("input");else if(!a.is("input"))throw new Error('CSS class "'+r.datepickerInput+'" cannot be applied to non input element');if(n.hasClass("input-group")&&(h=0===n.find(".datepickerbutton").size()?n.find(".input-group-addon"):n.find(".datepickerbutton")),!r.inline&&!a.is("input"))throw new Error("Could not initialize DateTimePicker without an input element");return i=S(),o=i.clone(),t.extend(!0,r,N()),d.options(r),pt(),ct(),a.prop("disabled")&&d.disable(),a.is("input")&&0!==a.val().trim().length?Q(at(a.val().trim())):r.defaultDate&&void 0===a.attr("placeholder")&&Q(r.defaultDate),r.inline&&it(),d};t.fn.datetimepicker=function(e){return this.each(function(){var r=t(this);r.data("DateTimePicker")||(e=t.extend(!0,{},t.fn.datetimepicker.defaults,e),r.data("DateTimePicker",n(r,e)))})},t.fn.datetimepicker.defaults={timeZone:"Etc/UTC",format:!1,dayViewHeaderFormat:"MMMM YYYY",extraFormats:!1,stepping:1,minDate:!1,maxDate:!1,useCurrent:!0,collapse:!0,locale:e.locale(),defaultDate:!1,disabledDates:!1,enabledDates:!1,icons:{time:"glyphicon glyphicon-time",date:"glyphicon glyphicon-calendar",up:"glyphicon glyphicon-chevron-up",down:"glyphicon glyphicon-chevron-down",previous:"glyphicon glyphicon-chevron-left",next:"glyphicon glyphicon-chevron-right",today:"glyphicon glyphicon-screenshot",clear:"glyphicon glyphicon-trash",close:"glyphicon glyphicon-remove"},tooltips:{today:"Go to today",clear:"Clear selection",close:"Close the picker",selectMonth:"Select Month",prevMonth:"Previous Month",nextMonth:"Next Month",selectYear:"Select Year",prevYear:"Previous Year",nextYear:"Next Year",selectDecade:"Select Decade",prevDecade:"Previous Decade",nextDecade:"Next Decade",prevCentury:"Previous Century",nextCentury:"Next Century",pickHour:"Pick Hour",incrementHour:"Increment Hour",decrementHour:"Decrement Hour",pickMinute:"Pick Minute",incrementMinute:"Increment Minute",decrementMinute:"Decrement Minute",pickSecond:"Pick Second",incrementSecond:"Increment Second",decrementSecond:"Decrement Second",togglePeriod:"Toggle Period",selectTime:"Select Time"},useStrict:!1,sideBySide:!1,daysOfWeekDisabled:!1,calendarWeeks:!1,viewMode:"days",toolbarPlacement:"default",showTodayButton:!1,showClear:!1,showClose:!1,widgetPositioning:{horizontal:"auto",vertical:"auto"},widgetParent:null,ignoreReadonly:!1,keepOpen:!1,focusOnShow:!0,inline:!1,keepInvalid:!1,datepickerInput:".datepickerinput",keyBinds:{up:function(t){if(t){var e=this.date()||this.getMoment();t.find(".datepicker").is(":visible")?this.date(e.clone().subtract(7,"d")):this.date(e.clone().add(this.stepping(),"m"))}},down:function(t){if(!t)return void this.show();var e=this.date()||this.getMoment();t.find(".datepicker").is(":visible")?this.date(e.clone().add(7,"d")):this.date(e.clone().subtract(this.stepping(),"m"))},"control up":function(t){if(t){var e=this.date()||this.getMoment();t.find(".datepicker").is(":visible")?this.date(e.clone().subtract(1,"y")):this.date(e.clone().add(1,"h"))}},"control down":function(t){if(t){var e=this.date()||this.getMoment();t.find(".datepicker").is(":visible")?this.date(e.clone().add(1,"y")):this.date(e.clone().subtract(1,"h"))}},left:function(t){if(t){var e=this.date()||this.getMoment();t.find(".datepicker").is(":visible")&&this.date(e.clone().subtract(1,"d"))}},right:function(t){if(t){var e=this.date()||this.getMoment();t.find(".datepicker").is(":visible")&&this.date(e.clone().add(1,"d"))}},pageUp:function(t){if(t){var e=this.date()||this.getMoment();t.find(".datepicker").is(":visible")&&this.date(e.clone().subtract(1,"M"))}},pageDown:function(t){if(t){var e=this.date()||this.getMoment();t.find(".datepicker").is(":visible")&&this.date(e.clone().add(1,"M"))}},enter:function(){this.hide()},escape:function(){this.hide()},"control space":function(t){t.find(".timepicker").is(":visible")&&t.find('.btn[data-action="togglePeriod"]').click()},t:function(){this.date(this.getMoment())},delete:function(){this.clear()}},debug:!1,allowInputToggle:!1,disabledTimeIntervals:!1,disabledHours:!1,enabledHours:!1,viewDate:!1}}),!function(t){"function"==typeof define&&define.amd?define(["jquery"],t):t("object"==typeof exports?require("jquery"):jQuery)}(function(t){var e=function(){if(t&&t.fn&&t.fn.select2&&t.fn.select2.amd)var e=t.fn.select2.amd;var e;return function(){if(!e||!e.requirejs){e?n=e:e={};var t,n,r;!function(e){function i(t,e){return x.call(t,e)}function o(t,e){var n,r,i,o,a,s,l,u,c,d,f,h=e&&e.split("/"),p=y.map,g=p&&p["*"]||{};if(t&&"."===t.charAt(0))if(e){for(t=t.split("/"),a=t.length-1,y.nodeIdCompat&&_.test(t[a])&&(t[a]=t[a].replace(_,"")),t=h.slice(0,h.length-1).concat(t),c=0;c0&&(t.splice(c-1,2),c-=2)}t=t.join("/")}else 0===t.indexOf("./")&&(t=t.substring(2));if((h||g)&&p){for(n=t.split("/"),c=n.length;c>0;c-=1){if(r=n.slice(0,c).join("/"),h)for(d=h.length;d>0;d-=1)if(i=p[h.slice(0,d).join("/")],i&&(i=i[r])){o=i,s=c;break}if(o)break;!l&&g&&g[r]&&(l=g[r],u=c)}!o&&l&&(o=l,s=u),o&&(n.splice(0,s,o),t=n.join("/"))}return t}function a(t,n){return function(){var r=w.call(arguments,0);return"string"!=typeof r[0]&&1===r.length&&r.push(null),h.apply(e,r.concat([t,n]))}}function s(t){return function(e){return o(e,t)}}function l(t){return function(e){m[t]=e}}function u(t){if(i(v,t)){var n=v[t];delete v[t],b[t]=!0,f.apply(e,n)}if(!i(m,t)&&!i(b,t))throw new Error("No "+t);return m[t]}function c(t){var e,n=t?t.indexOf("!"):-1;return n>-1&&(e=t.substring(0,n),t=t.substring(n+1,t.length)),[e,t]}function d(t){return function(){return y&&y.config&&y.config[t]||{}}}var f,h,p,g,m={},v={},y={},b={},x=Object.prototype.hasOwnProperty,w=[].slice,_=/\.js$/;p=function(t,e){var n,r=c(t),i=r[0];return t=r[1],i&&(i=o(i,e),n=u(i)),i?t=n&&n.normalize?n.normalize(t,s(e)):o(t,e):(t=o(t,e),r=c(t),i=r[0],t=r[1],i&&(n=u(i))),{f:i?i+"!"+t:t,n:t,pr:i,p:n}},g={require:function(t){return a(t)},exports:function(t){var e=m[t];return"undefined"!=typeof e?e:m[t]={}},module:function(t){return{id:t,uri:"",exports:m[t],config:d(t)}}},f=function(t,n,r,o){var s,c,d,f,h,y,x=[],w=typeof r;if(o=o||t,"undefined"===w||"function"===w){for(n=!n.length&&r.length?["require","exports","module"]:n,h=0;h0&&(e.call(arguments,t.prototype.constructor),i=n.prototype.constructor),i.apply(this,arguments)}function i(){this.constructor=r}var o=e(n),a=e(t);n.displayName=t.displayName,r.prototype=new i;for(var s=0;sn;n++)t[n].apply(this,e)},n.Observable=r,n.generateChars=function(t){for(var e="",n=0;t>n;n++){var r=Math.floor(36*Math.random());e+=r.toString(36)}return e},n.bind=function(t,e){return function(){t.apply(e,arguments)}},n._convertData=function(t){for(var e in t){var n=e.split("-"),r=t;if(1!==n.length){for(var i=0;i":">",'"':""","'":"'","/":"/"};return"string"!=typeof t?t:String(t).replace(/[&<>"'\/\\]/g,function(t){return e[t]})},n.appendMany=function(e,n){if("1.7"===t.fn.jquery.substr(0,3)){var r=t();t.map(n,function(t){r=r.add(t)}),n=r}e.append(n)},n}),e.define("select2/results",["jquery","./utils"],function(t,e){function n(t,e,r){this.$element=t,this.data=r,this.options=e,n.__super__.constructor.call(this)}return e.Extend(n,e.Observable),n.prototype.render=function(){var e=t('
    ');return this.options.get("multiple")&&e.attr("aria-multiselectable","true"),this.$results=e,e},n.prototype.clear=function(){this.$results.empty()},n.prototype.displayMessage=function(e){var n=this.options.get("escapeMarkup");this.clear(),this.hideLoading();var r=t('
  • '),i=this.options.get("translations").get(e.message);r.append(n(i(e.args))),r[0].className+=" select2-results__message",this.$results.append(r)},n.prototype.hideMessages=function(){this.$results.find(".select2-results__message").remove()},n.prototype.append=function(t){this.hideLoading();var e=[];if(null==t.results||0===t.results.length)return void(0===this.$results.children().length&&this.trigger("results:message",{message:"noResults"}));t.results=this.sort(t.results);for(var n=0;n0?e.first().trigger("mouseenter"):t.first().trigger("mouseenter"),this.ensureHighlightVisible()},n.prototype.setClasses=function(){var e=this;this.data.current(function(n){var r=t.map(n,function(t){return t.id.toString()}),i=e.$results.find(".select2-results__option[aria-selected]");i.each(function(){var e=t(this),n=t.data(this,"data"),i=""+n.id;null!=n.element&&n.element.selected||null==n.element&&t.inArray(i,r)>-1?e.attr("aria-selected","true"):e.attr("aria-selected","false")})})},n.prototype.showLoading=function(t){this.hideLoading();var e=this.options.get("translations").get("searching"),n={disabled:!0,loading:!0,text:e(t)},r=this.option(n);r.className+=" loading-results",this.$results.prepend(r)},n.prototype.hideLoading=function(){this.$results.find(".loading-results").remove()},n.prototype.option=function(e){var n=document.createElement("li");n.className="select2-results__option";var r={role:"treeitem","aria-selected":"false"};e.disabled&&(delete r["aria-selected"],r["aria-disabled"]="true"),null==e.id&&delete r["aria-selected"],null!=e._resultId&&(n.id=e._resultId),e.title&&(n.title=e.title),e.children&&(r.role="group",r["aria-label"]=e.text,delete r["aria-selected"]);for(var i in r){var o=r[i];n.setAttribute(i,o)}if(e.children){var a=t(n),s=document.createElement("strong");s.className="select2-results__group",t(s),this.template(e,s);for(var l=[],u=0;u",{class:"select2-results__options select2-results__options--nested"});f.append(l),a.append(s),a.append(f)}else this.template(e,n);return t.data(n,"data",e),n},n.prototype.bind=function(e,n){var r=this,i=e.id+"-results";this.$results.attr("id",i),e.on("results:all",function(t){r.clear(),r.append(t.data),e.isOpen()&&(r.setClasses(),r.highlightFirstItem())}),e.on("results:append",function(t){r.append(t.data),e.isOpen()&&r.setClasses()}),e.on("query",function(t){r.hideMessages(),r.showLoading(t)}),e.on("select",function(){e.isOpen()&&(r.setClasses(),r.highlightFirstItem())}),e.on("unselect",function(){e.isOpen()&&(r.setClasses(),r.highlightFirstItem())}),e.on("open",function(){r.$results.attr("aria-expanded","true"),r.$results.attr("aria-hidden","false"),r.setClasses(),r.ensureHighlightVisible()}),e.on("close",function(){r.$results.attr("aria-expanded","false"),r.$results.attr("aria-hidden","true"),r.$results.removeAttr("aria-activedescendant")}),e.on("results:toggle",function(){var t=r.getHighlightedResults();0!==t.length&&t.trigger("mouseup")}),e.on("results:select",function(){var t=r.getHighlightedResults();if(0!==t.length){var e=t.data("data");"true"==t.attr("aria-selected")?r.trigger("close",{}):r.trigger("select",{data:e})}}),e.on("results:previous",function(){var t=r.getHighlightedResults(),e=r.$results.find("[aria-selected]"),n=e.index(t);if(0!==n){var i=n-1;0===t.length&&(i=0);var o=e.eq(i);o.trigger("mouseenter");var a=r.$results.offset().top,s=o.offset().top,l=r.$results.scrollTop()+(s-a);0===i?r.$results.scrollTop(0):0>s-a&&r.$results.scrollTop(l)}}),e.on("results:next",function(){var t=r.getHighlightedResults(),e=r.$results.find("[aria-selected]"),n=e.index(t),i=n+1;if(!(i>=e.length)){var o=e.eq(i);o.trigger("mouseenter");var a=r.$results.offset().top+r.$results.outerHeight(!1),s=o.offset().top+o.outerHeight(!1),l=r.$results.scrollTop()+s-a;0===i?r.$results.scrollTop(0):s>a&&r.$results.scrollTop(l)}}),e.on("results:focus",function(t){t.element.addClass("select2-results__option--highlighted")}),e.on("results:message",function(t){r.displayMessage(t)}),t.fn.mousewheel&&this.$results.on("mousewheel",function(t){var e=r.$results.scrollTop(),n=r.$results.get(0).scrollHeight-e+t.deltaY,i=t.deltaY>0&&e-t.deltaY<=0,o=t.deltaY<0&&n<=r.$results.height();i?(r.$results.scrollTop(0),t.preventDefault(),t.stopPropagation()):o&&(r.$results.scrollTop(r.$results.get(0).scrollHeight-r.$results.height()),t.preventDefault(),t.stopPropagation())}),this.$results.on("mouseup",".select2-results__option[aria-selected]",function(e){var n=t(this),i=n.data("data");return"true"===n.attr("aria-selected")?void(r.options.get("multiple")?r.trigger("unselect",{originalEvent:e,data:i}):r.trigger("close",{})):void r.trigger("select",{originalEvent:e,data:i})}),this.$results.on("mouseenter",".select2-results__option[aria-selected]",function(e){var n=t(this).data("data");r.getHighlightedResults().removeClass("select2-results__option--highlighted"),r.trigger("results:focus",{data:n,element:t(this)})})},n.prototype.getHighlightedResults=function(){var t=this.$results.find(".select2-results__option--highlighted");return t},n.prototype.destroy=function(){this.$results.remove()},n.prototype.ensureHighlightVisible=function(){var t=this.getHighlightedResults();if(0!==t.length){var e=this.$results.find("[aria-selected]"),n=e.index(t),r=this.$results.offset().top,i=t.offset().top,o=this.$results.scrollTop()+(i-r),a=i-r;o-=2*t.outerHeight(!1),2>=n?this.$results.scrollTop(0):(a>this.$results.outerHeight()||0>a)&&this.$results.scrollTop(o)}},n.prototype.template=function(e,n){var r=this.options.get("templateResult"),i=this.options.get("escapeMarkup"),o=r(e,n);null==o?n.style.display="none":"string"==typeof o?n.innerHTML=i(o):t(n).append(o)},n}),e.define("select2/keys",[],function(){var t={BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46};return t}),e.define("select2/selection/base",["jquery","../utils","../keys"],function(t,e,n){function r(t,e){this.$element=t,this.options=e,r.__super__.constructor.call(this)}return e.Extend(r,e.Observable),r.prototype.render=function(){var e=t('');return this._tabindex=0,null!=this.$element.data("old-tabindex")?this._tabindex=this.$element.data("old-tabindex"):null!=this.$element.attr("tabindex")&&(this._tabindex=this.$element.attr("tabindex")),e.attr("title",this.$element.attr("title")),e.attr("tabindex",this._tabindex),this.$selection=e,e},r.prototype.bind=function(t,e){var r=this,i=(t.id+"-container",t.id+"-results");this.container=t,this.$selection.on("focus",function(t){r.trigger("focus",t)}),this.$selection.on("blur",function(t){r._handleBlur(t)}),this.$selection.on("keydown",function(t){r.trigger("keypress",t),t.which===n.SPACE&&t.preventDefault()}),t.on("results:focus",function(t){r.$selection.attr("aria-activedescendant",t.data._resultId)}),t.on("selection:update",function(t){r.update(t.data)}),t.on("open",function(){r.$selection.attr("aria-expanded","true"),r.$selection.attr("aria-owns",i),r._attachCloseHandler(t)}),t.on("close",function(){r.$selection.attr("aria-expanded","false"),r.$selection.removeAttr("aria-activedescendant"),r.$selection.removeAttr("aria-owns"),r.$selection.focus(),r._detachCloseHandler(t)}),t.on("enable",function(){r.$selection.attr("tabindex",r._tabindex)}),t.on("disable",function(){r.$selection.attr("tabindex","-1")})},r.prototype._handleBlur=function(e){var n=this;window.setTimeout(function(){document.activeElement==n.$selection[0]||t.contains(n.$selection[0],document.activeElement)||n.trigger("blur",e)},1)},r.prototype._attachCloseHandler=function(e){t(document.body).on("mousedown.select2."+e.id,function(e){var n=t(e.target),r=n.closest(".select2"),i=t(".select2.select2-container--open");i.each(function(){var e=t(this);if(this!=r[0]){var n=e.data("element");n.select2("close")}})})},r.prototype._detachCloseHandler=function(e){t(document.body).off("mousedown.select2."+e.id)},r.prototype.position=function(t,e){var n=e.find(".selection");n.append(t)},r.prototype.destroy=function(){this._detachCloseHandler(this.container)},r.prototype.update=function(t){throw new Error("The `update` method must be defined in child classes.")},r}),e.define("select2/selection/single",["jquery","./base","../utils","../keys"],function(t,e,n,r){function i(){i.__super__.constructor.apply(this,arguments)}return n.Extend(i,e),i.prototype.render=function(){var t=i.__super__.render.call(this);return t.addClass("select2-selection--single"),t.html(''),t},i.prototype.bind=function(t,e){var n=this;i.__super__.bind.apply(this,arguments);var r=t.id+"-container";this.$selection.find(".select2-selection__rendered").attr("id",r),this.$selection.attr("aria-labelledby",r),this.$selection.on("mousedown",function(t){1===t.which&&n.trigger("toggle",{originalEvent:t})}),this.$selection.on("focus",function(t){}),this.$selection.on("blur",function(t){}),t.on("focus",function(e){t.isOpen()||n.$selection.focus()}),t.on("selection:update",function(t){n.update(t.data)})},i.prototype.clear=function(){this.$selection.find(".select2-selection__rendered").empty()},i.prototype.display=function(t,e){var n=this.options.get("templateSelection"),r=this.options.get("escapeMarkup");return r(n(t,e))},i.prototype.selectionContainer=function(){return t("")},i.prototype.update=function(t){if(0===t.length)return void this.clear();var e=t[0],n=this.$selection.find(".select2-selection__rendered"),r=this.display(e,n);n.empty().append(r),n.prop("title",e.title||e.text)},i}),e.define("select2/selection/multiple",["jquery","./base","../utils"],function(t,e,n){function r(t,e){r.__super__.constructor.apply(this,arguments)}return n.Extend(r,e),r.prototype.render=function(){var t=r.__super__.render.call(this);return t.addClass("select2-selection--multiple"),t.html('
      '),t},r.prototype.bind=function(e,n){var i=this;r.__super__.bind.apply(this,arguments),this.$selection.on("click",function(t){i.trigger("toggle",{originalEvent:t})}),this.$selection.on("click",".select2-selection__choice__remove",function(e){if(!i.options.get("disabled")){var n=t(this),r=n.parent(),o=r.data("data");i.trigger("unselect",{originalEvent:e,data:o})}})},r.prototype.clear=function(){this.$selection.find(".select2-selection__rendered").empty()},r.prototype.display=function(t,e){var n=this.options.get("templateSelection"),r=this.options.get("escapeMarkup");return r(n(t,e))},r.prototype.selectionContainer=function(){var e=t('
    • ×
    • ');return e},r.prototype.update=function(t){if(this.clear(),0!==t.length){for(var e=[],r=0;r1;if(r||n)return t.call(this,e);this.clear();var i=this.createPlaceholder(this.placeholder);this.$selection.find(".select2-selection__rendered").append(i)},e}),e.define("select2/selection/allowClear",["jquery","../keys"],function(t,e){function n(){}return n.prototype.bind=function(t,e,n){var r=this;t.call(this,e,n),null==this.placeholder&&this.options.get("debug")&&window.console&&console.error&&console.error("Select2: The `allowClear` option should be used in combination with the `placeholder` option."),this.$selection.on("mousedown",".select2-selection__clear",function(t){r._handleClear(t)}),e.on("keypress",function(t){r._handleKeyboardClear(t,e)})},n.prototype._handleClear=function(t,e){if(!this.options.get("disabled")){var n=this.$selection.find(".select2-selection__clear");if(0!==n.length){e.stopPropagation();for(var r=n.data("data"),i=0;i0||0===n.length)){var r=t('×');r.data("data",n),this.$selection.find(".select2-selection__rendered").prepend(r)}},n}),e.define("select2/selection/search",["jquery","../utils","../keys"],function(t,e,n){function r(t,e,n){t.call(this,e,n)}return r.prototype.render=function(e){var n=t('');this.$searchContainer=n,this.$search=n.find("input");var r=e.call(this);return this._transferTabIndex(),r},r.prototype.bind=function(t,e,r){var i=this;t.call(this,e,r),e.on("open",function(){i.$search.trigger("focus")}),e.on("close",function(){i.$search.val(""),i.$search.removeAttr("aria-activedescendant"),i.$search.trigger("focus")}),e.on("enable",function(){i.$search.prop("disabled",!1),i._transferTabIndex()}),e.on("disable",function(){i.$search.prop("disabled",!0)}),e.on("focus",function(t){i.$search.trigger("focus")}),e.on("results:focus",function(t){i.$search.attr("aria-activedescendant",t.id)}),this.$selection.on("focusin",".select2-search--inline",function(t){i.trigger("focus",t)}),this.$selection.on("focusout",".select2-search--inline",function(t){i._handleBlur(t)}),this.$selection.on("keydown",".select2-search--inline",function(t){t.stopPropagation(),i.trigger("keypress",t),i._keyUpPrevented=t.isDefaultPrevented();var e=t.which;if(e===n.BACKSPACE&&""===i.$search.val()){var r=i.$searchContainer.prev(".select2-selection__choice");if(r.length>0){var o=r.data("data");i.searchRemoveChoice(o),t.preventDefault()}}});var o=document.documentMode,a=o&&11>=o;this.$selection.on("input.searchcheck",".select2-search--inline",function(t){return a?void i.$selection.off("input.search input.searchcheck"):void i.$selection.off("keyup.search")}),this.$selection.on("keyup.search input.search",".select2-search--inline",function(t){if(a&&"input"===t.type)return void i.$selection.off("input.search input.searchcheck");var e=t.which;e!=n.SHIFT&&e!=n.CTRL&&e!=n.ALT&&e!=n.TAB&&i.handleSearch(t)})},r.prototype._transferTabIndex=function(t){this.$search.attr("tabindex",this.$selection.attr("tabindex")),this.$selection.attr("tabindex","-1")},r.prototype.createPlaceholder=function(t,e){this.$search.attr("placeholder",e.text)},r.prototype.update=function(t,e){var n=this.$search[0]==document.activeElement;this.$search.attr("placeholder",""),t.call(this,e),this.$selection.find(".select2-selection__rendered").append(this.$searchContainer),this.resizeSearch(),n&&this.$search.focus()},r.prototype.handleSearch=function(){if(this.resizeSearch(),!this._keyUpPrevented){var t=this.$search.val();this.trigger("query",{term:t})}this._keyUpPrevented=!1},r.prototype.searchRemoveChoice=function(t,e){this.trigger("unselect",{data:e}),this.$search.val(e.text),this.handleSearch()},r.prototype.resizeSearch=function(){this.$search.css("width","25px");var t="";if(""!==this.$search.attr("placeholder"))t=this.$selection.find(".select2-selection__rendered").innerWidth();else{var e=this.$search.val().length+1;t=.75*e+"em"}this.$search.css("width",t)},r}),e.define("select2/selection/eventRelay",["jquery"],function(t){function e(){}return e.prototype.bind=function(e,n,r){var i=this,o=["open","opening","close","closing","select","selecting","unselect","unselecting"],a=["opening","closing","selecting","unselecting"];e.call(this,n,r),n.on("*",function(e,n){if(-1!==t.inArray(e,o)){n=n||{};var r=t.Event("select2:"+e,{params:n});i.$element.trigger(r),-1!==t.inArray(e,a)&&(n.prevented=r.isDefaultPrevented())}})},e}),e.define("select2/translation",["jquery","require"],function(t,e){function n(t){this.dict=t||{}}return n.prototype.all=function(){return this.dict},n.prototype.get=function(t){return this.dict[t]},n.prototype.extend=function(e){this.dict=t.extend({},e.all(),this.dict)},n._cache={},n.loadPath=function(t){if(!(t in n._cache)){var r=e(t);n._cache[t]=r}return new n(n._cache[t])},n}),e.define("select2/diacritics",[],function(){var t={"Ⓐ":"A","A":"A","À":"A","Á":"A","Â":"A","Ầ":"A","Ấ":"A","Ẫ":"A","Ẩ":"A","Ã":"A","Ā":"A","Ă":"A","Ằ":"A","Ắ":"A","Ẵ":"A","Ẳ":"A","Ȧ":"A","Ǡ":"A","Ä":"A","Ǟ":"A","Ả":"A","Å":"A","Ǻ":"A","Ǎ":"A", "Ȁ":"A","Ȃ":"A","Ạ":"A","Ậ":"A","Ặ":"A","Ḁ":"A","Ą":"A","Ⱥ":"A","Ɐ":"A","Ꜳ":"AA","Æ":"AE","Ǽ":"AE","Ǣ":"AE","Ꜵ":"AO","Ꜷ":"AU","Ꜹ":"AV","Ꜻ":"AV","Ꜽ":"AY","Ⓑ":"B","B":"B","Ḃ":"B","Ḅ":"B","Ḇ":"B","Ƀ":"B","Ƃ":"B","Ɓ":"B","Ⓒ":"C","C":"C","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","Ç":"C","Ḉ":"C","Ƈ":"C","Ȼ":"C","Ꜿ":"C","Ⓓ":"D","D":"D","Ḋ":"D","Ď":"D","Ḍ":"D","Ḑ":"D","Ḓ":"D","Ḏ":"D","Đ":"D","Ƌ":"D","Ɗ":"D","Ɖ":"D","Ꝺ":"D","DZ":"DZ","DŽ":"DZ","Dz":"Dz","Dž":"Dz","Ⓔ":"E","E":"E","È":"E","É":"E","Ê":"E","Ề":"E","Ế":"E","Ễ":"E","Ể":"E","Ẽ":"E","Ē":"E","Ḕ":"E","Ḗ":"E","Ĕ":"E","Ė":"E","Ë":"E","Ẻ":"E","Ě":"E","Ȅ":"E","Ȇ":"E","Ẹ":"E","Ệ":"E","Ȩ":"E","Ḝ":"E","Ę":"E","Ḙ":"E","Ḛ":"E","Ɛ":"E","Ǝ":"E","Ⓕ":"F","F":"F","Ḟ":"F","Ƒ":"F","Ꝼ":"F","Ⓖ":"G","G":"G","Ǵ":"G","Ĝ":"G","Ḡ":"G","Ğ":"G","Ġ":"G","Ǧ":"G","Ģ":"G","Ǥ":"G","Ɠ":"G","Ꞡ":"G","Ᵹ":"G","Ꝿ":"G","Ⓗ":"H","H":"H","Ĥ":"H","Ḣ":"H","Ḧ":"H","Ȟ":"H","Ḥ":"H","Ḩ":"H","Ḫ":"H","Ħ":"H","Ⱨ":"H","Ⱶ":"H","Ɥ":"H","Ⓘ":"I","I":"I","Ì":"I","Í":"I","Î":"I","Ĩ":"I","Ī":"I","Ĭ":"I","İ":"I","Ï":"I","Ḯ":"I","Ỉ":"I","Ǐ":"I","Ȉ":"I","Ȋ":"I","Ị":"I","Į":"I","Ḭ":"I","Ɨ":"I","Ⓙ":"J","J":"J","Ĵ":"J","Ɉ":"J","Ⓚ":"K","K":"K","Ḱ":"K","Ǩ":"K","Ḳ":"K","Ķ":"K","Ḵ":"K","Ƙ":"K","Ⱪ":"K","Ꝁ":"K","Ꝃ":"K","Ꝅ":"K","Ꞣ":"K","Ⓛ":"L","L":"L","Ŀ":"L","Ĺ":"L","Ľ":"L","Ḷ":"L","Ḹ":"L","Ļ":"L","Ḽ":"L","Ḻ":"L","Ł":"L","Ƚ":"L","Ɫ":"L","Ⱡ":"L","Ꝉ":"L","Ꝇ":"L","Ꞁ":"L","LJ":"LJ","Lj":"Lj","Ⓜ":"M","M":"M","Ḿ":"M","Ṁ":"M","Ṃ":"M","Ɱ":"M","Ɯ":"M","Ⓝ":"N","N":"N","Ǹ":"N","Ń":"N","Ñ":"N","Ṅ":"N","Ň":"N","Ṇ":"N","Ņ":"N","Ṋ":"N","Ṉ":"N","Ƞ":"N","Ɲ":"N","Ꞑ":"N","Ꞥ":"N","NJ":"NJ","Nj":"Nj","Ⓞ":"O","O":"O","Ò":"O","Ó":"O","Ô":"O","Ồ":"O","Ố":"O","Ỗ":"O","Ổ":"O","Õ":"O","Ṍ":"O","Ȭ":"O","Ṏ":"O","Ō":"O","Ṑ":"O","Ṓ":"O","Ŏ":"O","Ȯ":"O","Ȱ":"O","Ö":"O","Ȫ":"O","Ỏ":"O","Ő":"O","Ǒ":"O","Ȍ":"O","Ȏ":"O","Ơ":"O","Ờ":"O","Ớ":"O","Ỡ":"O","Ở":"O","Ợ":"O","Ọ":"O","Ộ":"O","Ǫ":"O","Ǭ":"O","Ø":"O","Ǿ":"O","Ɔ":"O","Ɵ":"O","Ꝋ":"O","Ꝍ":"O","Ƣ":"OI","Ꝏ":"OO","Ȣ":"OU","Ⓟ":"P","P":"P","Ṕ":"P","Ṗ":"P","Ƥ":"P","Ᵽ":"P","Ꝑ":"P","Ꝓ":"P","Ꝕ":"P","Ⓠ":"Q","Q":"Q","Ꝗ":"Q","Ꝙ":"Q","Ɋ":"Q","Ⓡ":"R","R":"R","Ŕ":"R","Ṙ":"R","Ř":"R","Ȑ":"R","Ȓ":"R","Ṛ":"R","Ṝ":"R","Ŗ":"R","Ṟ":"R","Ɍ":"R","Ɽ":"R","Ꝛ":"R","Ꞧ":"R","Ꞃ":"R","Ⓢ":"S","S":"S","ẞ":"S","Ś":"S","Ṥ":"S","Ŝ":"S","Ṡ":"S","Š":"S","Ṧ":"S","Ṣ":"S","Ṩ":"S","Ș":"S","Ş":"S","Ȿ":"S","Ꞩ":"S","Ꞅ":"S","Ⓣ":"T","T":"T","Ṫ":"T","Ť":"T","Ṭ":"T","Ț":"T","Ţ":"T","Ṱ":"T","Ṯ":"T","Ŧ":"T","Ƭ":"T","Ʈ":"T","Ⱦ":"T","Ꞇ":"T","Ꜩ":"TZ","Ⓤ":"U","U":"U","Ù":"U","Ú":"U","Û":"U","Ũ":"U","Ṹ":"U","Ū":"U","Ṻ":"U","Ŭ":"U","Ü":"U","Ǜ":"U","Ǘ":"U","Ǖ":"U","Ǚ":"U","Ủ":"U","Ů":"U","Ű":"U","Ǔ":"U","Ȕ":"U","Ȗ":"U","Ư":"U","Ừ":"U","Ứ":"U","Ữ":"U","Ử":"U","Ự":"U","Ụ":"U","Ṳ":"U","Ų":"U","Ṷ":"U","Ṵ":"U","Ʉ":"U","Ⓥ":"V","V":"V","Ṽ":"V","Ṿ":"V","Ʋ":"V","Ꝟ":"V","Ʌ":"V","Ꝡ":"VY","Ⓦ":"W","W":"W","Ẁ":"W","Ẃ":"W","Ŵ":"W","Ẇ":"W","Ẅ":"W","Ẉ":"W","Ⱳ":"W","Ⓧ":"X","X":"X","Ẋ":"X","Ẍ":"X","Ⓨ":"Y","Y":"Y","Ỳ":"Y","Ý":"Y","Ŷ":"Y","Ỹ":"Y","Ȳ":"Y","Ẏ":"Y","Ÿ":"Y","Ỷ":"Y","Ỵ":"Y","Ƴ":"Y","Ɏ":"Y","Ỿ":"Y","Ⓩ":"Z","Z":"Z","Ź":"Z","Ẑ":"Z","Ż":"Z","Ž":"Z","Ẓ":"Z","Ẕ":"Z","Ƶ":"Z","Ȥ":"Z","Ɀ":"Z","Ⱬ":"Z","Ꝣ":"Z","ⓐ":"a","a":"a","ẚ":"a","à":"a","á":"a","â":"a","ầ":"a","ấ":"a","ẫ":"a","ẩ":"a","ã":"a","ā":"a","ă":"a","ằ":"a","ắ":"a","ẵ":"a","ẳ":"a","ȧ":"a","ǡ":"a","ä":"a","ǟ":"a","ả":"a","å":"a","ǻ":"a","ǎ":"a","ȁ":"a","ȃ":"a","ạ":"a","ậ":"a","ặ":"a","ḁ":"a","ą":"a","ⱥ":"a","ɐ":"a","ꜳ":"aa","æ":"ae","ǽ":"ae","ǣ":"ae","ꜵ":"ao","ꜷ":"au","ꜹ":"av","ꜻ":"av","ꜽ":"ay","ⓑ":"b","b":"b","ḃ":"b","ḅ":"b","ḇ":"b","ƀ":"b","ƃ":"b","ɓ":"b","ⓒ":"c","c":"c","ć":"c","ĉ":"c","ċ":"c","č":"c","ç":"c","ḉ":"c","ƈ":"c","ȼ":"c","ꜿ":"c","ↄ":"c","ⓓ":"d","d":"d","ḋ":"d","ď":"d","ḍ":"d","ḑ":"d","ḓ":"d","ḏ":"d","đ":"d","ƌ":"d","ɖ":"d","ɗ":"d","ꝺ":"d","dz":"dz","dž":"dz","ⓔ":"e","e":"e","è":"e","é":"e","ê":"e","ề":"e","ế":"e","ễ":"e","ể":"e","ẽ":"e","ē":"e","ḕ":"e","ḗ":"e","ĕ":"e","ė":"e","ë":"e","ẻ":"e","ě":"e","ȅ":"e","ȇ":"e","ẹ":"e","ệ":"e","ȩ":"e","ḝ":"e","ę":"e","ḙ":"e","ḛ":"e","ɇ":"e","ɛ":"e","ǝ":"e","ⓕ":"f","f":"f","ḟ":"f","ƒ":"f","ꝼ":"f","ⓖ":"g","g":"g","ǵ":"g","ĝ":"g","ḡ":"g","ğ":"g","ġ":"g","ǧ":"g","ģ":"g","ǥ":"g","ɠ":"g","ꞡ":"g","ᵹ":"g","ꝿ":"g","ⓗ":"h","h":"h","ĥ":"h","ḣ":"h","ḧ":"h","ȟ":"h","ḥ":"h","ḩ":"h","ḫ":"h","ẖ":"h","ħ":"h","ⱨ":"h","ⱶ":"h","ɥ":"h","ƕ":"hv","ⓘ":"i","i":"i","ì":"i","í":"i","î":"i","ĩ":"i","ī":"i","ĭ":"i","ï":"i","ḯ":"i","ỉ":"i","ǐ":"i","ȉ":"i","ȋ":"i","ị":"i","į":"i","ḭ":"i","ɨ":"i","ı":"i","ⓙ":"j","j":"j","ĵ":"j","ǰ":"j","ɉ":"j","ⓚ":"k","k":"k","ḱ":"k","ǩ":"k","ḳ":"k","ķ":"k","ḵ":"k","ƙ":"k","ⱪ":"k","ꝁ":"k","ꝃ":"k","ꝅ":"k","ꞣ":"k","ⓛ":"l","l":"l","ŀ":"l","ĺ":"l","ľ":"l","ḷ":"l","ḹ":"l","ļ":"l","ḽ":"l","ḻ":"l","ſ":"l","ł":"l","ƚ":"l","ɫ":"l","ⱡ":"l","ꝉ":"l","ꞁ":"l","ꝇ":"l","lj":"lj","ⓜ":"m","m":"m","ḿ":"m","ṁ":"m","ṃ":"m","ɱ":"m","ɯ":"m","ⓝ":"n","n":"n","ǹ":"n","ń":"n","ñ":"n","ṅ":"n","ň":"n","ṇ":"n","ņ":"n","ṋ":"n","ṉ":"n","ƞ":"n","ɲ":"n","ʼn":"n","ꞑ":"n","ꞥ":"n","nj":"nj","ⓞ":"o","o":"o","ò":"o","ó":"o","ô":"o","ồ":"o","ố":"o","ỗ":"o","ổ":"o","õ":"o","ṍ":"o","ȭ":"o","ṏ":"o","ō":"o","ṑ":"o","ṓ":"o","ŏ":"o","ȯ":"o","ȱ":"o","ö":"o","ȫ":"o","ỏ":"o","ő":"o","ǒ":"o","ȍ":"o","ȏ":"o","ơ":"o","ờ":"o","ớ":"o","ỡ":"o","ở":"o","ợ":"o","ọ":"o","ộ":"o","ǫ":"o","ǭ":"o","ø":"o","ǿ":"o","ɔ":"o","ꝋ":"o","ꝍ":"o","ɵ":"o","ƣ":"oi","ȣ":"ou","ꝏ":"oo","ⓟ":"p","p":"p","ṕ":"p","ṗ":"p","ƥ":"p","ᵽ":"p","ꝑ":"p","ꝓ":"p","ꝕ":"p","ⓠ":"q","q":"q","ɋ":"q","ꝗ":"q","ꝙ":"q","ⓡ":"r","r":"r","ŕ":"r","ṙ":"r","ř":"r","ȑ":"r","ȓ":"r","ṛ":"r","ṝ":"r","ŗ":"r","ṟ":"r","ɍ":"r","ɽ":"r","ꝛ":"r","ꞧ":"r","ꞃ":"r","ⓢ":"s","s":"s","ß":"s","ś":"s","ṥ":"s","ŝ":"s","ṡ":"s","š":"s","ṧ":"s","ṣ":"s","ṩ":"s","ș":"s","ş":"s","ȿ":"s","ꞩ":"s","ꞅ":"s","ẛ":"s","ⓣ":"t","t":"t","ṫ":"t","ẗ":"t","ť":"t","ṭ":"t","ț":"t","ţ":"t","ṱ":"t","ṯ":"t","ŧ":"t","ƭ":"t","ʈ":"t","ⱦ":"t","ꞇ":"t","ꜩ":"tz","ⓤ":"u","u":"u","ù":"u","ú":"u","û":"u","ũ":"u","ṹ":"u","ū":"u","ṻ":"u","ŭ":"u","ü":"u","ǜ":"u","ǘ":"u","ǖ":"u","ǚ":"u","ủ":"u","ů":"u","ű":"u","ǔ":"u","ȕ":"u","ȗ":"u","ư":"u","ừ":"u","ứ":"u","ữ":"u","ử":"u","ự":"u","ụ":"u","ṳ":"u","ų":"u","ṷ":"u","ṵ":"u","ʉ":"u","ⓥ":"v","v":"v","ṽ":"v","ṿ":"v","ʋ":"v","ꝟ":"v","ʌ":"v","ꝡ":"vy","ⓦ":"w","w":"w","ẁ":"w","ẃ":"w","ŵ":"w","ẇ":"w","ẅ":"w","ẘ":"w","ẉ":"w","ⱳ":"w","ⓧ":"x","x":"x","ẋ":"x","ẍ":"x","ⓨ":"y","y":"y","ỳ":"y","ý":"y","ŷ":"y","ỹ":"y","ȳ":"y","ẏ":"y","ÿ":"y","ỷ":"y","ẙ":"y","ỵ":"y","ƴ":"y","ɏ":"y","ỿ":"y","ⓩ":"z","z":"z","ź":"z","ẑ":"z","ż":"z","ž":"z","ẓ":"z","ẕ":"z","ƶ":"z","ȥ":"z","ɀ":"z","ⱬ":"z","ꝣ":"z","Ά":"Α","Έ":"Ε","Ή":"Η","Ί":"Ι","Ϊ":"Ι","Ό":"Ο","Ύ":"Υ","Ϋ":"Υ","Ώ":"Ω","ά":"α","έ":"ε","ή":"η","ί":"ι","ϊ":"ι","ΐ":"ι","ό":"ο","ύ":"υ","ϋ":"υ","ΰ":"υ","ω":"ω","ς":"σ"};return t}),e.define("select2/data/base",["../utils"],function(t){function e(t,n){e.__super__.constructor.call(this)}return t.Extend(e,t.Observable),e.prototype.current=function(t){throw new Error("The `current` method must be defined in child classes.")},e.prototype.query=function(t,e){throw new Error("The `query` method must be defined in child classes.")},e.prototype.bind=function(t,e){},e.prototype.destroy=function(){},e.prototype.generateResultId=function(e,n){var r=e.id+"-result-";return r+=t.generateChars(4),r+=null!=n.id?"-"+n.id.toString():"-"+t.generateChars(4)},e}),e.define("select2/data/select",["./base","../utils","jquery"],function(t,e,n){function r(t,e){this.$element=t,this.options=e,r.__super__.constructor.call(this)}return e.Extend(r,t),r.prototype.current=function(t){var e=[],r=this;this.$element.find(":selected").each(function(){var t=n(this),i=r.item(t);e.push(i)}),t(e)},r.prototype.select=function(t){var e=this;if(t.selected=!0,n(t.element).is("option"))return t.element.selected=!0,void this.$element.trigger("change");if(this.$element.prop("multiple"))this.current(function(r){var i=[];t=[t],t.push.apply(t,r);for(var o=0;o=0){var c=o.filter(r(u)),d=this.item(c),f=n.extend(!0,{},u,d),h=this.option(f);c.replaceWith(h)}else{var p=this.option(u);if(u.children){var g=this.convertToOptions(u.children);e.appendMany(p,g)}s.push(p)}}return s},r}),e.define("select2/data/ajax",["./array","../utils","jquery"],function(t,e,n){function r(t,e){this.ajaxOptions=this._applyDefaults(e.get("ajax")),null!=this.ajaxOptions.processResults&&(this.processResults=this.ajaxOptions.processResults),r.__super__.constructor.call(this,t,e)}return e.Extend(r,t),r.prototype._applyDefaults=function(t){var e={data:function(t){return n.extend({},t,{q:t.term})},transport:function(t,e,r){var i=n.ajax(t);return i.then(e),i.fail(r),i}};return n.extend({},e,t,!0)},r.prototype.processResults=function(t){return t},r.prototype.query=function(t,e){function r(){var r=o.transport(o,function(r){var o=i.processResults(r,t);i.options.get("debug")&&window.console&&console.error&&(o&&o.results&&n.isArray(o.results)||console.error("Select2: The AJAX results did not return an array in the `results` key of the response.")),e(o)},function(){r.status&&"0"===r.status||i.trigger("results:message",{message:"errorLoading"})});i._request=r}var i=this;null!=this._request&&(n.isFunction(this._request.abort)&&this._request.abort(),this._request=null);var o=n.extend({type:"GET"},this.ajaxOptions);"function"==typeof o.url&&(o.url=o.url.call(this.$element,t)),"function"==typeof o.data&&(o.data=o.data.call(this.$element,t)),this.ajaxOptions.delay&&null!=t.term?(this._queryTimeout&&window.clearTimeout(this._queryTimeout),this._queryTimeout=window.setTimeout(r,this.ajaxOptions.delay)):r()},r}),e.define("select2/data/tags",["jquery"],function(t){function e(e,n,r){var i=r.get("tags"),o=r.get("createTag");void 0!==o&&(this.createTag=o);var a=r.get("insertTag");if(void 0!==a&&(this.insertTag=a),e.call(this,n,r),t.isArray(i))for(var s=0;s0&&e.term.length>this.maximumInputLength?void this.trigger("results:message",{message:"inputTooLong",args:{maximum:this.maximumInputLength,input:e.term,params:e}}):void t.call(this,e,n)},t}),e.define("select2/data/maximumSelectionLength",[],function(){function t(t,e,n){this.maximumSelectionLength=n.get("maximumSelectionLength"),t.call(this,e,n)}return t.prototype.query=function(t,e,n){var r=this;this.current(function(i){var o=null!=i?i.length:0;return r.maximumSelectionLength>0&&o>=r.maximumSelectionLength?void r.trigger("results:message",{message:"maximumSelected",args:{maximum:r.maximumSelectionLength}}):void t.call(r,e,n)})},t}),e.define("select2/dropdown",["jquery","./utils"],function(t,e){function n(t,e){this.$element=t,this.options=e,n.__super__.constructor.call(this)}return e.Extend(n,e.Observable),n.prototype.render=function(){var e=t('');return e.attr("dir",this.options.get("dir")),this.$dropdown=e,e},n.prototype.bind=function(){},n.prototype.position=function(t,e){},n.prototype.destroy=function(){this.$dropdown.remove()},n}),e.define("select2/dropdown/search",["jquery","../utils"],function(t,e){function n(){}return n.prototype.render=function(e){var n=e.call(this),r=t('');return this.$searchContainer=r,this.$search=r.find("input"),n.prepend(r),n},n.prototype.bind=function(e,n,r){var i=this;e.call(this,n,r),this.$search.on("keydown",function(t){i.trigger("keypress",t),i._keyUpPrevented=t.isDefaultPrevented()}),this.$search.on("input",function(e){t(this).off("keyup")}),this.$search.on("keyup input",function(t){i.handleSearch(t)}),n.on("open",function(){i.$search.attr("tabindex",0),i.$search.focus(),window.setTimeout(function(){i.$search.focus()},0)}),n.on("close",function(){i.$search.attr("tabindex",-1),i.$search.val("")}),n.on("focus",function(){n.isOpen()&&i.$search.focus()}),n.on("results:all",function(t){if(null==t.query.term||""===t.query.term){var e=i.showSearch(t);e?i.$searchContainer.removeClass("select2-search--hide"):i.$searchContainer.addClass("select2-search--hide")}})},n.prototype.handleSearch=function(t){if(!this._keyUpPrevented){var e=this.$search.val();this.trigger("query",{term:e})}this._keyUpPrevented=!1},n.prototype.showSearch=function(t,e){return!0},n}),e.define("select2/dropdown/hidePlaceholder",[],function(){function t(t,e,n,r){this.placeholder=this.normalizePlaceholder(n.get("placeholder")),t.call(this,e,n,r)}return t.prototype.append=function(t,e){e.results=this.removePlaceholder(e.results),t.call(this,e)},t.prototype.normalizePlaceholder=function(t,e){return"string"==typeof e&&(e={id:"",text:e}),e},t.prototype.removePlaceholder=function(t,e){for(var n=e.slice(0),r=e.length-1;r>=0;r--){var i=e[r];this.placeholder.id===i.id&&n.splice(r,1)}return n},t}),e.define("select2/dropdown/infiniteScroll",["jquery"],function(t){function e(t,e,n,r){this.lastParams={},t.call(this,e,n,r),this.$loadingMore=this.createLoadingMore(),this.loading=!1}return e.prototype.append=function(t,e){this.$loadingMore.remove(),this.loading=!1,t.call(this,e),this.showLoadingMore(e)&&this.$results.append(this.$loadingMore)},e.prototype.bind=function(e,n,r){var i=this;e.call(this,n,r),n.on("query",function(t){i.lastParams=t,i.loading=!0}),n.on("query:append",function(t){i.lastParams=t,i.loading=!0}),this.$results.on("scroll",function(){var e=t.contains(document.documentElement,i.$loadingMore[0]);if(!i.loading&&e){var n=i.$results.offset().top+i.$results.outerHeight(!1),r=i.$loadingMore.offset().top+i.$loadingMore.outerHeight(!1);n+50>=r&&i.loadMore()}})},e.prototype.loadMore=function(){this.loading=!0;var e=t.extend({},{page:1},this.lastParams);e.page++,this.trigger("query:append",e)},e.prototype.showLoadingMore=function(t,e){return e.pagination&&e.pagination.more},e.prototype.createLoadingMore=function(){var e=t('
    • '),n=this.options.get("translations").get("loadingMore");return e.html(n(this.lastParams)),e},e}),e.define("select2/dropdown/attachBody",["jquery","../utils"],function(t,e){function n(e,n,r){this.$dropdownParent=r.get("dropdownParent")||t(document.body),e.call(this,n,r)}return n.prototype.bind=function(t,e,n){var r=this,i=!1;t.call(this,e,n),e.on("open",function(){r._showDropdown(),r._attachPositioningHandler(e),i||(i=!0,e.on("results:all",function(){r._positionDropdown(),r._resizeDropdown()}),e.on("results:append",function(){r._positionDropdown(),r._resizeDropdown()}))}),e.on("close",function(){r._hideDropdown(),r._detachPositioningHandler(e)}),this.$dropdownContainer.on("mousedown",function(t){t.stopPropagation()})},n.prototype.destroy=function(t){t.call(this),this.$dropdownContainer.remove()},n.prototype.position=function(t,e,n){e.attr("class",n.attr("class")),e.removeClass("select2"),e.addClass("select2-container--open"),e.css({position:"absolute",top:-999999}),this.$container=n},n.prototype.render=function(e){var n=t(""),r=e.call(this);return n.append(r),this.$dropdownContainer=n,n},n.prototype._hideDropdown=function(t){this.$dropdownContainer.detach()},n.prototype._attachPositioningHandler=function(n,r){var i=this,o="scroll.select2."+r.id,a="resize.select2."+r.id,s="orientationchange.select2."+r.id,l=this.$container.parents().filter(e.hasScroll);l.each(function(){t(this).data("select2-scroll-position",{x:t(this).scrollLeft(),y:t(this).scrollTop()})}),l.on(o,function(e){var n=t(this).data("select2-scroll-position");t(this).scrollTop(n.y)}),t(window).on(o+" "+a+" "+s,function(t){i._positionDropdown(),i._resizeDropdown()})},n.prototype._detachPositioningHandler=function(n,r){var i="scroll.select2."+r.id,o="resize.select2."+r.id,a="orientationchange.select2."+r.id,s=this.$container.parents().filter(e.hasScroll);s.off(i),t(window).off(i+" "+o+" "+a)},n.prototype._positionDropdown=function(){var e=t(window),n=this.$dropdown.hasClass("select2-dropdown--above"),r=this.$dropdown.hasClass("select2-dropdown--below"),i=null,o=this.$container.offset();o.bottom=o.top+this.$container.outerHeight(!1);var a={height:this.$container.outerHeight(!1)};a.top=o.top,a.bottom=o.top+a.height;var s={height:this.$dropdown.outerHeight(!1)},l={top:e.scrollTop(),bottom:e.scrollTop()+e.height()},u=l.topo.bottom+s.height,d={left:o.left,top:a.bottom},f=this.$dropdownParent;"static"===f.css("position")&&(f=f.offsetParent());var h=f.offset();d.top-=h.top,d.left-=h.left,n||r||(i="below"),c||!u||n?!u&&c&&n&&(i="below"):i="above",("above"==i||n&&"below"!==i)&&(d.top=a.top-h.top-s.height),null!=i&&(this.$dropdown.removeClass("select2-dropdown--below select2-dropdown--above").addClass("select2-dropdown--"+i),this.$container.removeClass("select2-container--below select2-container--above").addClass("select2-container--"+i)),this.$dropdownContainer.css(d)},n.prototype._resizeDropdown=function(){var t={width:this.$container.outerWidth(!1)+"px"};this.options.get("dropdownAutoWidth")&&(t.minWidth=t.width,t.position="relative",t.width="auto"),this.$dropdown.css(t)},n.prototype._showDropdown=function(t){this.$dropdownContainer.appendTo(this.$dropdownParent),this._positionDropdown(),this._resizeDropdown()},n}),e.define("select2/dropdown/minimumResultsForSearch",[],function(){function t(e){for(var n=0,r=0;r0&&(d.dataAdapter=u.Decorate(d.dataAdapter,v)),d.maximumInputLength>0&&(d.dataAdapter=u.Decorate(d.dataAdapter,y)),d.maximumSelectionLength>0&&(d.dataAdapter=u.Decorate(d.dataAdapter,b)),d.tags&&(d.dataAdapter=u.Decorate(d.dataAdapter,g)),(null!=d.tokenSeparators||null!=d.tokenizer)&&(d.dataAdapter=u.Decorate(d.dataAdapter,m)),null!=d.query){var k=e(d.amdBase+"compat/query");d.dataAdapter=u.Decorate(d.dataAdapter,k)}if(null!=d.initSelection){var E=e(d.amdBase+"compat/initSelection");d.dataAdapter=u.Decorate(d.dataAdapter,E)}}if(null==d.resultsAdapter&&(d.resultsAdapter=n,null!=d.ajax&&(d.resultsAdapter=u.Decorate(d.resultsAdapter,S)),null!=d.placeholder&&(d.resultsAdapter=u.Decorate(d.resultsAdapter,_)),d.selectOnClose&&(d.resultsAdapter=u.Decorate(d.resultsAdapter,T))),null==d.dropdownAdapter){if(d.multiple)d.dropdownAdapter=x;else{var A=u.Decorate(x,w);d.dropdownAdapter=A}if(0!==d.minimumResultsForSearch&&(d.dropdownAdapter=u.Decorate(d.dropdownAdapter,D)),d.closeOnSelect&&(d.dropdownAdapter=u.Decorate(d.dropdownAdapter,M)),null!=d.dropdownCssClass||null!=d.dropdownCss||null!=d.adaptDropdownCssClass){var P=e(d.amdBase+"compat/dropdownCss");d.dropdownAdapter=u.Decorate(d.dropdownAdapter,P)}d.dropdownAdapter=u.Decorate(d.dropdownAdapter,C)}if(null==d.selectionAdapter){if(d.multiple?d.selectionAdapter=i:d.selectionAdapter=r,null!=d.placeholder&&(d.selectionAdapter=u.Decorate(d.selectionAdapter,o)),d.allowClear&&(d.selectionAdapter=u.Decorate(d.selectionAdapter,a)),d.multiple&&(d.selectionAdapter=u.Decorate(d.selectionAdapter,s)),null!=d.containerCssClass||null!=d.containerCss||null!=d.adaptContainerCssClass){var N=e(d.amdBase+"compat/containerCss");d.selectionAdapter=u.Decorate(d.selectionAdapter,N)}d.selectionAdapter=u.Decorate(d.selectionAdapter,l)}if("string"==typeof d.language)if(d.language.indexOf("-")>0){var L=d.language.split("-"),O=L[0];d.language=[d.language,O]}else d.language=[d.language];if(t.isArray(d.language)){var I=new c;d.language.push("en");for(var j=d.language,F=0;F0){for(var o=t.extend(!0,{},i),a=i.children.length-1;a>=0;a--){var s=i.children[a],l=n(r,s);null==l&&o.children.splice(a,1)}return o.children.length>0?o:n(r,o)}var u=e(i.text).toUpperCase(),c=e(r.term).toUpperCase();return u.indexOf(c)>-1?i:null}this.defaults={amdBase:"./",amdLanguageBase:"./i18n/",closeOnSelect:!0,debug:!1,dropdownAutoWidth:!1,escapeMarkup:u.escapeMarkup,language:k,matcher:n,minimumInputLength:0,maximumInputLength:0,maximumSelectionLength:0,minimumResultsForSearch:0,selectOnClose:!1,sorter:function(t){return t},templateResult:function(t){return t.text},templateSelection:function(t){return t.text},theme:"default",width:"resolve"}},E.prototype.set=function(e,n){var r=t.camelCase(e),i={};i[r]=n;var o=u._convertData(i);t.extend(this.defaults,o)};var A=new E;return A}),e.define("select2/options",["require","jquery","./defaults","./utils"],function(t,e,n,r){function i(e,i){if(this.options=e,null!=i&&this.fromElement(i),this.options=n.apply(this.options),i&&i.is("input")){var o=t(this.get("amdBase")+"compat/inputData");this.options.dataAdapter=r.Decorate(this.options.dataAdapter,o)}}return i.prototype.fromElement=function(t){var n=["select2"];null==this.options.multiple&&(this.options.multiple=t.prop("multiple")),null==this.options.disabled&&(this.options.disabled=t.prop("disabled")),null==this.options.language&&(t.prop("lang")?this.options.language=t.prop("lang").toLowerCase():t.closest("[lang]").prop("lang")&&(this.options.language=t.closest("[lang]").prop("lang"))),null==this.options.dir&&(t.prop("dir")?this.options.dir=t.prop("dir"):t.closest("[dir]").prop("dir")?this.options.dir=t.closest("[dir]").prop("dir"):this.options.dir="ltr"),t.prop("disabled",this.options.disabled),t.prop("multiple",this.options.multiple),t.data("select2Tags")&&(this.options.debug&&window.console&&console.warn&&console.warn('Select2: The `data-select2-tags` attribute has been changed to use the `data-data` and `data-tags="true"` attributes and will be removed in future versions of Select2.'),t.data("data",t.data("select2Tags")),t.data("tags",!0)),t.data("ajaxUrl")&&(this.options.debug&&window.console&&console.warn&&console.warn("Select2: The `data-ajax-url` attribute has been changed to `data-ajax--url` and support for the old attribute will be removed in future versions of Select2."),t.attr("ajax--url",t.data("ajaxUrl")),t.data("ajax--url",t.data("ajaxUrl")));var i={};i=e.fn.jquery&&"1."==e.fn.jquery.substr(0,2)&&t[0].dataset?e.extend(!0,{},t[0].dataset,t.data()):t.data();var o=e.extend(!0,{},i);o=r._convertData(o);for(var a in o)e.inArray(a,n)>-1||(e.isPlainObject(this.options[a])?e.extend(this.options[a],o[a]):this.options[a]=o[a]);return this},i.prototype.get=function(t){return this.options[t]},i.prototype.set=function(t,e){this.options[t]=e},i}),e.define("select2/core",["jquery","./options","./utils","./keys"],function(t,e,n,r){var i=function(t,n){null!=t.data("select2")&&t.data("select2").destroy(),this.$element=t,this.id=this._generateId(t),n=n||{},this.options=new e(n,t),i.__super__.constructor.call(this);var r=t.attr("tabindex")||0;t.data("old-tabindex",r),t.attr("tabindex","-1");var o=this.options.get("dataAdapter");this.dataAdapter=new o(t,this.options);var a=this.render();this._placeContainer(a);var s=this.options.get("selectionAdapter");this.selection=new s(t,this.options),this.$selection=this.selection.render(),this.selection.position(this.$selection,a);var l=this.options.get("dropdownAdapter");this.dropdown=new l(t,this.options),this.$dropdown=this.dropdown.render(),this.dropdown.position(this.$dropdown,a);var u=this.options.get("resultsAdapter");this.results=new u(t,this.options,this.dataAdapter),this.$results=this.results.render(),this.results.position(this.$results,this.$dropdown);var c=this; this._bindAdapters(),this._registerDomEvents(),this._registerDataEvents(),this._registerSelectionEvents(),this._registerDropdownEvents(),this._registerResultsEvents(),this._registerEvents(),this.dataAdapter.current(function(t){c.trigger("selection:update",{data:t})}),t.addClass("select2-hidden-accessible"),t.attr("aria-hidden","true"),this._syncAttributes(),t.data("select2",this)};return n.Extend(i,n.Observable),i.prototype._generateId=function(t){var e="";return e=null!=t.attr("id")?t.attr("id"):null!=t.attr("name")?t.attr("name")+"-"+n.generateChars(2):n.generateChars(4),e=e.replace(/(:|\.|\[|\]|,)/g,""),e="select2-"+e},i.prototype._placeContainer=function(t){t.insertAfter(this.$element);var e=this._resolveWidth(this.$element,this.options.get("width"));null!=e&&t.css("width",e)},i.prototype._resolveWidth=function(t,e){var n=/^width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/i;if("resolve"==e){var r=this._resolveWidth(t,"style");return null!=r?r:this._resolveWidth(t,"element")}if("element"==e){var i=t.outerWidth(!1);return 0>=i?"auto":i+"px"}if("style"==e){var o=t.attr("style");if("string"!=typeof o)return null;for(var a=o.split(";"),s=0,l=a.length;l>s;s+=1){var u=a[s].replace(/\s/g,""),c=u.match(n);if(null!==c&&c.length>=1)return c[1]}return null}return e},i.prototype._bindAdapters=function(){this.dataAdapter.bind(this,this.$container),this.selection.bind(this,this.$container),this.dropdown.bind(this,this.$container),this.results.bind(this,this.$container)},i.prototype._registerDomEvents=function(){var e=this;this.$element.on("change.select2",function(){e.dataAdapter.current(function(t){e.trigger("selection:update",{data:t})})}),this.$element.on("focus.select2",function(t){e.trigger("focus",t)}),this._syncA=n.bind(this._syncAttributes,this),this._syncS=n.bind(this._syncSubtree,this),this.$element[0].attachEvent&&this.$element[0].attachEvent("onpropertychange",this._syncA);var r=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;null!=r?(this._observer=new r(function(n){t.each(n,e._syncA),t.each(n,e._syncS)}),this._observer.observe(this.$element[0],{attributes:!0,childList:!0,subtree:!1})):this.$element[0].addEventListener&&(this.$element[0].addEventListener("DOMAttrModified",e._syncA,!1),this.$element[0].addEventListener("DOMNodeInserted",e._syncS,!1),this.$element[0].addEventListener("DOMNodeRemoved",e._syncS,!1))},i.prototype._registerDataEvents=function(){var t=this;this.dataAdapter.on("*",function(e,n){t.trigger(e,n)})},i.prototype._registerSelectionEvents=function(){var e=this,n=["toggle","focus"];this.selection.on("toggle",function(){e.toggleDropdown()}),this.selection.on("focus",function(t){e.focus(t)}),this.selection.on("*",function(r,i){-1===t.inArray(r,n)&&e.trigger(r,i)})},i.prototype._registerDropdownEvents=function(){var t=this;this.dropdown.on("*",function(e,n){t.trigger(e,n)})},i.prototype._registerResultsEvents=function(){var t=this;this.results.on("*",function(e,n){t.trigger(e,n)})},i.prototype._registerEvents=function(){var t=this;this.on("open",function(){t.$container.addClass("select2-container--open")}),this.on("close",function(){t.$container.removeClass("select2-container--open")}),this.on("enable",function(){t.$container.removeClass("select2-container--disabled")}),this.on("disable",function(){t.$container.addClass("select2-container--disabled")}),this.on("blur",function(){t.$container.removeClass("select2-container--focus")}),this.on("query",function(e){t.isOpen()||t.trigger("open",{}),this.dataAdapter.query(e,function(n){t.trigger("results:all",{data:n,query:e})})}),this.on("query:append",function(e){this.dataAdapter.query(e,function(n){t.trigger("results:append",{data:n,query:e})})}),this.on("keypress",function(e){var n=e.which;t.isOpen()?n===r.ESC||n===r.TAB||n===r.UP&&e.altKey?(t.close(),e.preventDefault()):n===r.ENTER?(t.trigger("results:select",{}),e.preventDefault()):n===r.SPACE&&e.ctrlKey?(t.trigger("results:toggle",{}),e.preventDefault()):n===r.UP?(t.trigger("results:previous",{}),e.preventDefault()):n===r.DOWN&&(t.trigger("results:next",{}),e.preventDefault()):(n===r.ENTER||n===r.SPACE||n===r.DOWN&&e.altKey)&&(t.open(),e.preventDefault())})},i.prototype._syncAttributes=function(){this.options.set("disabled",this.$element.prop("disabled")),this.options.get("disabled")?(this.isOpen()&&this.close(),this.trigger("disable",{})):this.trigger("enable",{})},i.prototype._syncSubtree=function(t,e){var n=!1,r=this;if(!t||!t.target||"OPTION"===t.target.nodeName||"OPTGROUP"===t.target.nodeName){if(e)if(e.addedNodes&&e.addedNodes.length>0)for(var i=0;i0&&(n=!0);else n=!0;n&&this.dataAdapter.current(function(t){r.trigger("selection:update",{data:t})})}},i.prototype.trigger=function(t,e){var n=i.__super__.trigger,r={open:"opening",close:"closing",select:"selecting",unselect:"unselecting"};if(void 0===e&&(e={}),t in r){var o=r[t],a={prevented:!1,name:t,args:e};if(n.call(this,o,a),a.prevented)return void(e.prevented=!0)}n.call(this,t,e)},i.prototype.toggleDropdown=function(){this.options.get("disabled")||(this.isOpen()?this.close():this.open())},i.prototype.open=function(){this.isOpen()||this.trigger("query",{})},i.prototype.close=function(){this.isOpen()&&this.trigger("close",{})},i.prototype.isOpen=function(){return this.$container.hasClass("select2-container--open")},i.prototype.hasFocus=function(){return this.$container.hasClass("select2-container--focus")},i.prototype.focus=function(t){this.hasFocus()||(this.$container.addClass("select2-container--focus"),this.trigger("focus",{}))},i.prototype.enable=function(t){this.options.get("debug")&&window.console&&console.warn&&console.warn('Select2: The `select2("enable")` method has been deprecated and will be removed in later Select2 versions. Use $element.prop("disabled") instead.'),(null==t||0===t.length)&&(t=[!0]);var e=!t[0];this.$element.prop("disabled",e)},i.prototype.data=function(){this.options.get("debug")&&arguments.length>0&&window.console&&console.warn&&console.warn('Select2: Data can no longer be set using `select2("data")`. You should consider setting the value instead using `$element.val()`.');var t=[];return this.dataAdapter.current(function(e){t=e}),t},i.prototype.val=function(e){if(this.options.get("debug")&&window.console&&console.warn&&console.warn('Select2: The `select2("val")` method has been deprecated and will be removed in later Select2 versions. Use $element.val() instead.'),null==e||0===e.length)return this.$element.val();var n=e[0];t.isArray(n)&&(n=t.map(n,function(t){return t.toString()})),this.$element.val(n).trigger("change")},i.prototype.destroy=function(){this.$container.remove(),this.$element[0].detachEvent&&this.$element[0].detachEvent("onpropertychange",this._syncA),null!=this._observer?(this._observer.disconnect(),this._observer=null):this.$element[0].removeEventListener&&(this.$element[0].removeEventListener("DOMAttrModified",this._syncA,!1),this.$element[0].removeEventListener("DOMNodeInserted",this._syncS,!1),this.$element[0].removeEventListener("DOMNodeRemoved",this._syncS,!1)),this._syncA=null,this._syncS=null,this.$element.off(".select2"),this.$element.attr("tabindex",this.$element.data("old-tabindex")),this.$element.removeClass("select2-hidden-accessible"),this.$element.attr("aria-hidden","false"),this.$element.removeData("select2"),this.dataAdapter.destroy(),this.selection.destroy(),this.dropdown.destroy(),this.results.destroy(),this.dataAdapter=null,this.selection=null,this.dropdown=null,this.results=null},i.prototype.render=function(){var e=t('');return e.attr("dir",this.options.get("dir")),this.$container=e,this.$container.addClass("select2-container--"+this.options.get("theme")),e.data("element",this.$element),e},i}),e.define("jquery-mousewheel",["jquery"],function(t){return t}),e.define("jquery.select2",["jquery","jquery-mousewheel","./select2/core","./select2/defaults"],function(t,e,n,r){if(null==t.fn.select2){var i=["open","close","destroy"];t.fn.select2=function(e){if(e=e||{},"object"==typeof e)return this.each(function(){var r=t.extend(!0,{},e);new n(t(this),r)}),this;if("string"==typeof e){var r,o=Array.prototype.slice.call(arguments,1);return this.each(function(){var n=t(this).data("select2");null==n&&window.console&&console.error&&console.error("The select2('"+e+"') method was called on an element that is not using Select2."),r=n[e].apply(n,o)}),t.inArray(e,i)>-1?this:r}throw new Error("Invalid arguments for Select2: "+e)}}return null==t.fn.select2.defaults&&(t.fn.select2.defaults=r),n}),{define:e.define,require:e.require}}(),n=e.require("jquery.select2");return t.fn.select2.amd=e,n});
      ").addClass("cw").text("#"));n.isBefore(o.clone().endOf("w"));)e.append(t("").addClass("dow").text(n.format("dd"))),n.add(1,"d");p.find(".datepicker-days thead").append(e)},R=function(t){return r.disabledDates[t.format("YYYY-MM-DD")]===!0},H=function(t){return r.enabledDates[t.format("YYYY-MM-DD")]===!0},$=function(t){return r.disabledHours[t.format("H")]===!0},q=function(t){return r.enabledHours[t.format("H")]===!0},U=function(e,n){if(!e.isValid())return!1;if(r.disabledDates&&"d"===n&&R(e))return!1;if(r.enabledDates&&"d"===n&&!H(e))return!1;if(r.minDate&&e.isBefore(r.minDate,n))return!1;if(r.maxDate&&e.isAfter(r.maxDate,n))return!1;if(r.daysOfWeekDisabled&&"d"===n&&r.daysOfWeekDisabled.indexOf(e.day())!==-1)return!1;if(r.disabledHours&&("h"===n||"m"===n||"s"===n)&&$(e))return!1;if(r.enabledHours&&("h"===n||"m"===n||"s"===n)&&!q(e))return!1;if(r.disabledTimeIntervals&&("h"===n||"m"===n||"s"===n)){var i=!1;if(t.each(r.disabledTimeIntervals,function(){if(e.isBetween(this[0],this[1]))return i=!0,!1}),i)return!1}return!0},z=function(){for(var e=[],n=o.clone().startOf("y").startOf("d");n.isSame(o,"y");)e.push(t("").attr("data-action","selectMonth").addClass("month").text(n.format("MMM"))),n.add(1,"M");p.find(".datepicker-months td").empty().append(e)},B=function(){var e=p.find(".datepicker-months"),n=e.find("th"),a=e.find("tbody").find("span");n.eq(0).find("span").attr("title",r.tooltips.prevYear),n.eq(1).attr("title",r.tooltips.selectYear),n.eq(2).find("span").attr("title",r.tooltips.nextYear),e.find(".disabled").removeClass("disabled"),U(o.clone().subtract(1,"y"),"y")||n.eq(0).addClass("disabled"),n.eq(1).text(o.year()),U(o.clone().add(1,"y"),"y")||n.eq(2).addClass("disabled"),a.removeClass("active"),i.isSame(o,"y")&&!f&&a.eq(i.month()).addClass("active"),a.each(function(e){U(o.clone().month(e),"M")||t(this).addClass("disabled")})},W=function(){var t=p.find(".datepicker-years"),e=t.find("th"),n=o.clone().subtract(5,"y"),a=o.clone().add(6,"y"),s="";for(e.eq(0).find("span").attr("title",r.tooltips.prevDecade),e.eq(1).attr("title",r.tooltips.selectDecade),e.eq(2).find("span").attr("title",r.tooltips.nextDecade),t.find(".disabled").removeClass("disabled"),r.minDate&&r.minDate.isAfter(n,"y")&&e.eq(0).addClass("disabled"),e.eq(1).text(n.year()+"-"+a.year()),r.maxDate&&r.maxDate.isBefore(a,"y")&&e.eq(2).addClass("disabled");!n.isAfter(a,"y");)s+=''+n.year()+"",n.add(1,"y");t.find("td").html(s)},Y=function(){var t=p.find(".datepicker-decades"),n=t.find("th"),a=e({y:o.year()-o.year()%100-1}),s=a.clone().add(100,"y"),l=a.clone(),u="";for(n.eq(0).find("span").attr("title",r.tooltips.prevCentury),n.eq(2).find("span").attr("title",r.tooltips.nextCentury),t.find(".disabled").removeClass("disabled"),(a.isSame(e({y:1900}))||r.minDate&&r.minDate.isAfter(a,"y"))&&n.eq(0).addClass("disabled"),n.eq(1).text(a.year()+"-"+s.year()),(a.isSame(e({y:2e3}))||r.maxDate&&r.maxDate.isBefore(s,"y"))&&n.eq(2).addClass("disabled");!a.isAfter(s,"y");)u+=''+(a.year()+1)+" - "+(a.year()+12)+"",a.add(12,"y");u+="",t.find("td").html(u),n.eq(1).text(l.year()+1+"-"+a.year())},G=function(){var e,n,a,s,l=p.find(".datepicker-days"),u=l.find("th"),c=[];if(T()){for(u.eq(0).find("span").attr("title",r.tooltips.prevMonth),u.eq(1).attr("title",r.tooltips.selectMonth),u.eq(2).find("span").attr("title",r.tooltips.nextMonth),l.find(".disabled").removeClass("disabled"),u.eq(1).text(o.format(r.dayViewHeaderFormat)),U(o.clone().subtract(1,"M"),"M")||u.eq(0).addClass("disabled"),U(o.clone().add(1,"M"),"M")||u.eq(2).addClass("disabled"),e=o.clone().startOf("M").startOf("w").startOf("d"),s=0;s<42;s++)0===e.weekday()&&(n=t("
      '+e.week()+"'+e.date()+"
      '+n.format(s?"HH":"hh")+"
      '+n.format("mm")+"
      '+n.format("ss")+"