/*
 =======================================================================*\
|| ###################################################################### ||
|| # vBulletin 6.2.3
|| # ------------------------------------------------------------------ # ||
|| # Copyright 2000-2026 MH Sub I, LLC dba vBulletin. All Rights Reserved.  # ||
|| # This file may not be redistributed in whole or significant part.   # ||
|| # ----------------- VBULLETIN IS NOT FREE SOFTWARE ----------------- # ||
|| # http://www.vbulletin.com | http://www.vbulletin.com/license.html   # ||
|| ###################################################################### ||
\*========================================================================*/
// ***************************
// js.compressed/tag-editor.js
// ***************************
var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.ASSUME_ES5=!1;$jscomp.ASSUME_NO_NATIVE_MAP=!1;$jscomp.ASSUME_NO_NATIVE_SET=!1;$jscomp.SIMPLE_FROUND_POLYFILL=!1;$jscomp.ISOLATE_POLYFILLS=!1;$jscomp.FORCE_POLYFILL_PROMISE=!1;$jscomp.FORCE_POLYFILL_PROMISE_WHEN_NO_UNHANDLED_REJECTION=!1;$jscomp.defineProperty=$jscomp.ASSUME_ES5||"function"==typeof Object.defineProperties?Object.defineProperty:function(a,c,e){if(a==Array.prototype||a==Object.prototype)return a;a[c]=e.value;return a};
$jscomp.getGlobal=function(a){a=["object"==typeof globalThis&&globalThis,a,"object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof global&&global];for(var c=0;c<a.length;++c){var e=a[c];if(e&&e.Math==Math)return e}throw Error("Cannot find global object");};$jscomp.global=$jscomp.getGlobal(this);$jscomp.IS_SYMBOL_NATIVE="function"===typeof Symbol&&"symbol"===typeof Symbol("x");$jscomp.TRUST_ES6_POLYFILLS=!$jscomp.ISOLATE_POLYFILLS||$jscomp.IS_SYMBOL_NATIVE;$jscomp.polyfills={};
$jscomp.propertyToPolyfillSymbol={};$jscomp.POLYFILL_PREFIX="$jscp$";var $jscomp$lookupPolyfilledValue=function(a,c){var e=$jscomp.propertyToPolyfillSymbol[c];if(null==e)return a[c];e=a[e];return void 0!==e?e:a[c]};$jscomp.polyfill=function(a,c,e,h){c&&($jscomp.ISOLATE_POLYFILLS?$jscomp.polyfillIsolated(a,c,e,h):$jscomp.polyfillUnisolated(a,c,e,h))};
$jscomp.polyfillUnisolated=function(a,c,e,h){e=$jscomp.global;a=a.split(".");for(h=0;h<a.length-1;h++){var p=a[h];if(!(p in e))return;e=e[p]}a=a[a.length-1];h=e[a];c=c(h);c!=h&&null!=c&&$jscomp.defineProperty(e,a,{configurable:!0,writable:!0,value:c})};
$jscomp.polyfillIsolated=function(a,c,e,h){var p=a.split(".");a=1===p.length;h=p[0];h=!a&&h in $jscomp.polyfills?$jscomp.polyfills:$jscomp.global;for(var w=0;w<p.length-1;w++){var y=p[w];if(!(y in h))return;h=h[y]}p=p[p.length-1];e=$jscomp.IS_SYMBOL_NATIVE&&"es6"===e?h[p]:null;c=c(e);null!=c&&(a?$jscomp.defineProperty($jscomp.polyfills,p,{configurable:!0,writable:!0,value:c}):c!==e&&(void 0===$jscomp.propertyToPolyfillSymbol[p]&&(e=1E9*Math.random()>>>0,$jscomp.propertyToPolyfillSymbol[p]=$jscomp.IS_SYMBOL_NATIVE?
$jscomp.global.Symbol(p):$jscomp.POLYFILL_PREFIX+e+"$"+p),$jscomp.defineProperty(h,$jscomp.propertyToPolyfillSymbol[p],{configurable:!0,writable:!0,value:c})))};$jscomp.arrayIteratorImpl=function(a){var c=0;return function(){return c<a.length?{done:!1,value:a[c++]}:{done:!0}}};$jscomp.arrayIterator=function(a){return{next:$jscomp.arrayIteratorImpl(a)}};$jscomp.makeIterator=function(a){var c="undefined"!=typeof Symbol&&Symbol.iterator&&a[Symbol.iterator];return c?c.call(a):$jscomp.arrayIterator(a)};
$jscomp.polyfill("Promise.allSettled",function(a){function c(h){return{status:"fulfilled",value:h}}function e(h){return{status:"rejected",reason:h}}return a?a:function(h){var p=this;h=Array.from(h,function(w){return p.resolve(w).then(c,e)});return p.all(h)}},"es_2020","es3");
vBulletin.precache("add_tags edit_tags error error_adding_search_tips_code_x error_adding_tags_code_x error_fetching_tags invalid_server_response_please_try_again invalid_x_tag_length loading none popular_tags_cloud tag_cloud unable_to_load_tag_editor unable_to_save_tags you_may_add_one_more_tag you_may_add_x_more_tags you_may_not_add_any_more_tags save post".split(" "),["tagforcelower","tagmaxlen","tagminlen"]);
(function(a,c,e,h,p){function w(f,g=!1){function m(b){b=a(this);var d=b.parent();!d.hasClass("added")&&F(b.text())&&(d.addClass("added"),n.is(":visible")&&n[0].focus());return!1}function k(b,d,q,G={}){let Q=b.data("node-id"),R=p.getContainingEditor(b),S=H(x.data("type")||"nodes"),I;I=d.suggested?Promise.resolve(d.suggested):R?T(R.getData()):X(Q);Promise.allSettled([I,S]).then(()=>{h.openModalDialog(q,{title:"add_tags",dialogClass:"tag-editor-dialog-container",onOpen:function(){t.clearElements();var U=
x.find(".tag-input").val();U?J(U.split(",").map(Y=>Y.trim())):B&&!n.attr("placeholder")&&n.attr("placeholder",B);q.find(".save-tag-btn").text(e.get(G.saveButtonPhrase||"save"));C();Z(Q);K(S,u,"popular");K(I,u,"suggested")},onAfterClose:()=>{x.data("autocomplete-instance").close()}})});b.data("tag-dialog",q);q.data("parent",b.closest("form, .search-controls-tags, .form_row"));q.off("vb-tag-dialog-save vb-tag-dialog-cancel")}var l=this,r=!1,v=!1,z=c.options.get("tagmaxlen")||25,aa=c.options.get("tagminlen")||
3,D=0,A=0,L=!1,n=a(f),u=n.closest(".tag-editor-container"),x=n.closest(".tag-editor-wrapper"),t=!1,B=n.attr("placeholder")?n.attr("placeholder"):"",M=B?B.length:10,F=function(b,d){if(!t)return!1;if("undefined"==typeof d||1>d)d=pageData.userid;let q=t.getMinLength();if(b.length<q)return h.error("error",["invalid_x_tag_length",q]),!1;1==c.options.get("tagforcelower")&&(b=b.toLowerCase());b.length>z&&(b=b.substr(0,z));d=t.addElement(b,d);n.val("");C();return d},J=function(b){b.map(d=>F(d))},O=function(){n.attr("size",
M);var b=JShtmlEncode(a.trim(n.val()));if(""==b)return!1;0<N()&&setTimeout(function(){F(b)},10)},N=function(){if(g||0==D&&0==A)return!0;var b=t.countElements(),d=a(t.getElements()).filter(function(q,G){return 0==pageData.userid||G.value==pageData.userid}).length;b=0<D?D-b:A-b;return Math.min(0==A?b:A-d,b)},C=function(){var b=u.find(".you-may-add-text"),d=N();if(!0===d)return!0;if(1<d)var q=["you_may_add_x_more_tags",d];else 1==d?q="you_may_add_one_more_tag":(q="you_may_not_add_any_more_tags",d=0);
b.toggleClass("warning",0==d).html(e.get(q));b=!!d;n.toggle(b);b&&n[0].focus();return d},Z=function(b){g?n[0].focus():E[b]?(D=E[b].maxTags,A=E[b].maxUserTags,L=E[b].canManageTags,C()):(E[b]={},c.AJAX({call:"/ajax/api/tags/getNodeTags",data:{nodeid:b},success:function(d){a.isArray(d.tags)&&(D=parseInt(d.maxtags,10),A=parseInt(d.maxusertags,10),L=d.canmanagetags,E[b]={maxTags:D,maxUserTags:A,canManageTags:L},C())},api_error:a.noop,error:a.noop}))};this.addTag=function(b,d){F(b,d)};this.addTags=function(b){J(b)};
this.setTags=function(b){t&&(t.clearElements(),J(b))};this.removeAllTags=function(){t.clearElements()};this.getTags=function(){return t?t.getLabels():!1};this.getTagEditor=function(){return n};this.getWrapper=function(){return x};this.setSuggested=function(b){this.suggested=b};this.openTagDialog=function(b,d={}){k(b,this,u,d);return u};x.data("initialized")?console.log("Tag Editor is already initialized."):(x.attr("data-initialized",!0),function(){if(0==n.length)return!1;n.attr("maxlength",z);t=new vBulletin_Autocomplete(n,
{apiClass:"Tags",containerClass:" entry-field h-clearfix",placeholderText:B,editorContext:{type:"tags",context:l},minLength:aa,beforeAdd:function(b,d){r=v?!0:!1;return 0==N()?!1:!0},afterAdd:function(b,d){C();n.attr("placeholder","");y(u.find(".tagcloudlink"),u)},afterDelete:function(b,d){r=v?!0:!1;C();n.attr("placeholder",function(){var q=t?t.getLabels():!1;return q&&0!=q.length?"":B});b=u.find(".js-popular-tags .tagcloudlink");0==b.length&&(b=u.find(".popular-tags-link"),b.length&&b.qtip&&(b=b.qtip("api").elements.tooltip.find(".tagcloudlink")));
y(u.find(".tagcloudlink"),u)}});n=t.getInputField();x.data("autocomplete-instance",t)}(),n.offon("keydown",function(b){var d=a(b.target).val().length;a(b.target).attr("size",d>M?d:M);if(13==b.which)return r=v?!0:!1,O(),b.preventDefault(),!1}),n.offon("blur",function(b){v=setTimeout(function(){r||O();v=r=!1},0)}),n.offon("click",function(b){a(b.target).hasClass("tag-input")||(a(".tag-input",a(this)).trigger("focus"),r=v?!0:!1);return!1}),n.each(function(){a(this).closest("form").on("submit",O)}),a(".js-popular-tag-text.inline-tag-cloud .popular-tags-link",
u).offon("click",function(){K(H("nodes"),u,"popular")}),vBulletin.qtip.apply(a(".js-popular-tag-text:not(.inline-tag-cloud) .popular-tags-link",u),"qtip-populartags",{content:{title:{text:e.get("tag_cloud"),button:!1},text:function(b,d){H("nodes").then(q=>{d.set("content.text",'<div class="tag-cloud js-popular-tags">{0}</div>'.format(q||e.get("no_tags_yet")));q=d.elements.tooltip;q.on("click",".js-popular-tags .tagcloudlink label",m);y(q.find(".tagcloudlink"),x)},q=>{d.set("content.text",q.message)});
return e.get("working_ellipsis")}},position:{at:"bottom center",my:"top center",viewport:a(window),effect:!1},show:{event:"click",solo:!0},hide:"unfocus"}),u.on("click",".tagcloudlink label",m))}function y(f,g){if(0<f.length){let m=(g.find(".tag-input").val()||"").split(",").map(k=>k.trim());f.each((k,l)=>{k=a(l);k.toggleClass("added",m.includes(k.data("tag")))})}}function K(f,g,m){let k=g.find(".js-"+m+"-tags");f.then(l=>{let r=g.find(".js-"+m+"-tags-text");!l&&r.is(".inline-tag-cloud")&&(l=e.get("no_tags_yet"));
k.html(l);l&&y(k.find(".tagcloudlink"),g);r.toggle(!!l)},l=>{k.html(l.message)})}async function H(f){return P("tags/fetchTagsForCloud",{type:f,taglevels:5,limit:20,tagsonly:!0})}async function X(f){return P("tags/getSuggestedTagsForNode",{nodeid:f})}async function T(f){return P("editor/getSuggestedTagsForEditorText",{text:f})}async function P(f,g){let m,k,l=(r="")=>{k='<span class="error">{0} {1}</span>'.format(e.get("error_fetching_tags"),r)};await c.AJAX({call:"/ajax/api/"+f,data:g,success:function(r){m=
r.tags.map(v=>'<span class="tagcloudlink" data-tag="{0}"><label class="b-link js-link" tabindex="0">{0}</label></span>'.format(v)).join(", ")},api_error:r=>l(e.get(r[0])),error:()=>l()});if(k)throw Error(k);return m}function ba(f,g){c.AJAX({call:"/ajax/api/tags/updateUserTags",data:{nodeid:f,taglist:g.split(",").filter(m=>m)},success:function(m){let k=a("#content-tags-"+f);k.find(".js-content-tag, .js-content-tag-none").remove();let l=m.tags;l&&0<l.length?a.each(l,function(r,v){var z=a("<span />").addClass("js-content-tag");
a("<a />").attr("href",v.searchurl).html(v.tagtext).appendTo(z);r<l.length-1&&z.append(document.createTextNode(", "));z.appendTo(k)}):a("<span />").addClass("js-content-tag-none").html(e.get("none")).appendTo(k)},error_phrase:"unable_to_save_tags",title_phrase:"edit_tags"})}function ca(f){let g=f.data("node-id");c.AJAX({call:"/ajax/render/tag_editor",data:{nodeid:g,dialogOnly:!0,editPost:!0,editorClass:"js-topic-tag-editor",isAjaxTemplateRenderWithData:!0},success:function(m){function k(){l.dialog("destroy").closest(".tag-editor-wrapper").remove()}
a("body").append(m.template);let l=(new w(".js-topic-tag-editor",!1)).openTagDialog(f);l.on("vb-tag-dialog-cancel",k);l.on("vb-tag-dialog-save",function(r,v){ba(g,v.tagList);k()})},error_phrase:"unable_to_load_tag_editor",title_phrase:"edit_tags"})}function V(f){if(0<a(f).length){let g=new w(f);f=g.getWrapper().find(".add-tag-link");f.data("tageditor",g);f.offon("click",m=>{m.stopPropagation();g.openTagDialog(a(m.currentTarget));return!1})}}let W=c.ensureObj("jsexec.tag_editor",{exec:0});W.exec++;
if(!(1<W.exec)){var E={};c.ensureObj("tagEditor");a(()=>{a(document).offon("click.tage",".tag-editor-container .cancel-tag-btn",function(){a(".tag-editor-container").dialog("close").trigger("vb-tag-dialog-cancel")});a(document).offon("click.tage",".tag-editor-container .save-tag-btn",function(){var f=a(this).closest(".tag-editor-container"),g=f.find(".tag-input").val(),m=g.replace(/,/g,", "),k=f.data("parent");k.find(".tag-list span").text(m);k.find(".tag-input").val(g);k.find(".tag-list").toggleClass("h-hide",
!g);f.dialog("close").trigger("vb-tag-dialog-save",{tagList:g})});a(document).offon("mousedown.tage",".tag-editor-container .autocomplete-container",function(){var f=this;setTimeout(function(){var g=a(".autocompleteHelper:visible",f);0<g.length&&g[0].focus()},10);return!1});V(".js-content-entry-tag-editor");a(document).offon("click.tage",".js-edit-tags",f=>ca(a(f.currentTarget)))});c.tagEditor=a.extend(c.tagEditor,{initEditTagsContent:V,instance:w,promptForTags:function(f){let g=f.find(".add-tag-link"),
m=g.data("tageditor"),k=p.getContainingEditor(g),l=()=>{f.data("tagsdone",!0);f.submit()};if(!m||!k)return!1;T(k.getData()).then(r=>{r?(m.setSuggested(r),m.openTagDialog(g,{saveButtonPhrase:"post"}).on("vb-tag-dialog-save",()=>{l()})):l()},()=>l);return!0}})}})(jQuery,vBulletin,vBulletin.phrase,vBulletin.dialogtools,vBulletin.ckeditor);
;

// ***************************
// js.compressed/flatpickr/flatpickr.min.js
// ***************************
/*
 flatpickr v4.4.4, @license MIT */
(function(L,r){"object"===typeof exports&&"undefined"!==typeof module?module.exports=r():"function"===typeof define&&define.amd?define(r):L.flatpickr=r()})(this,function(){function L(c,d,e){void 0===e&&(e=!1);var g;return function(){var k=this,l=arguments;null!==g&&clearTimeout(g);g=window.setTimeout(function(){g=null;e||c.apply(k,l)},d);e&&!g&&c.apply(k,l)}}function r(c,d,e){void 0===e&&(e=!0);return!1!==e?(new Date(c.getTime())).setHours(0,0,0,0)-(new Date(d.getTime())).setHours(0,
0,0,0):c.getTime()-d.getTime()}function v(c,d,e){if(!0===e)return c.classList.add(d);c.classList.remove(d)}function g(c,d,e){c=window.document.createElement(c);e=e||"";c.className=d||"";void 0!==e&&(c.textContent=e);return c}function M(c){for(;c.firstChild;)c.removeChild(c.firstChild)}function ja(c,d){if(d(c))return c;if(c.parentNode)return ja(c.parentNode,d)}function N(c,d){var e=g("div","numInputWrapper");c=g("input","numInput "+c);var x=g("span","arrowUp"),k=g("span","arrowDown");c.type="text";
c.pattern="\\d*";if(void 0!==d)for(var l in d)c.setAttribute(l,d[l]);e.appendChild(c);e.appendChild(x);e.appendChild(k);return e}function R(c,d){function e(){a.utils={getDaysInMonth:function(b,f){void 0===b&&(b=a.currentMonth);void 0===f&&(f=a.currentYear);return 1===b&&(0===f%4&&0!==f%100||0===f%400)?29:a.l10n.daysInMonth[b]}}}function x(b){return b.bind(a)}function k(){if(void 0!==a.daysContainer){a.calendarContainer.style.visibility="hidden";a.calendarContainer.style.display="block";var b=(a.days.offsetWidth+
1)*a.config.showMonths;a.daysContainer.style.width=b+"px";a.calendarContainer.style.width=b+"px";void 0!==a.weekWrapper&&(a.calendarContainer.style.width=b+a.weekWrapper.offsetWidth+"px");a.calendarContainer.style.removeProperty("visibility");a.calendarContainer.style.removeProperty("display")}}function l(b){0!==a.selectedDates.length&&(za(b),"input"!==b.type?(F(),z()):setTimeout(function(){F();z()},300))}function F(){if(void 0!==a.hourElement&&void 0!==a.minuteElement){var b=(parseInt(a.hourElement.value.slice(-2),
10)||0)%24,f=(parseInt(a.minuteElement.value,10)||0)%60,c=void 0!==a.secondElement?(parseInt(a.secondElement.value,10)||0)%60:0;void 0!==a.amPM&&(b=b%12+12*t(a.amPM.textContent===a.l10n.amPM[1]));var d=void 0!==a.config.minTime||a.config.minDate&&a.minDateHasTime&&a.latestSelectedDateObj&&0===r(a.latestSelectedDateObj,a.config.minDate,!0);if(void 0!==a.config.maxTime||a.config.maxDate&&a.maxDateHasTime&&a.latestSelectedDateObj&&0===r(a.latestSelectedDateObj,a.config.maxDate,!0)){var w=void 0!==a.config.maxTime?
a.config.maxTime:a.config.maxDate;b=Math.min(b,w.getHours());b===w.getHours()&&(f=Math.min(f,w.getMinutes()));f===w.getMinutes()&&(c=Math.min(c,w.getSeconds()))}d&&(d=void 0!==a.config.minTime?a.config.minTime:a.config.minDate,b=Math.max(b,d.getHours()),b===d.getHours()&&(f=Math.max(f,d.getMinutes())),f===d.getMinutes()&&(c=Math.max(c,d.getSeconds())));S(b,f,c)}}function y(b){(b=b||a.latestSelectedDateObj)&&S(b.getHours(),b.getMinutes(),b.getSeconds())}function S(b,f,c){void 0!==a.latestSelectedDateObj&&
a.latestSelectedDateObj.setHours(b%24,f,c||0,0);a.hourElement&&a.minuteElement&&!a.isMobile&&(a.hourElement.value=u(a.config.time_24hr?b:(12+b)%12+12*t(0===b%12)),a.minuteElement.value=u(f),void 0!==a.amPM&&(a.amPM.textContent=a.l10n.amPM[t(12<=b)]),void 0!==a.secondElement&&(a.secondElement.value=u(c)))}function A(a){var b=parseInt(a.target.value)+(a.delta||0);if(4===b.toString().length||"Enter"===a.key)a.target.blur(),/[^\d]/.test(b.toString())||T(b)}function h(b,f,c,d){if(f instanceof Array)return f.forEach(function(a){return h(b,
a,c,d)});if(b instanceof Array)return b.forEach(function(a){return h(a,f,c,d)});b.addEventListener(f,c,d);a._handlers.push({element:b,event:f,handler:c})}function G(a){return function(b){1===b.which&&a(b)}}function U(){p("onChange")}function Aa(){a.config.wrap&&["open","close","toggle","clear"].forEach(function(b){Array.prototype.forEach.call(a.element.querySelectorAll("[data-"+b+"]"),function(f){return h(f,"click",a[b])})});if(a.isMobile)Ba();else{var b=L(Ca,50);a._debouncedChange=L(U,300);a.daysContainer&&
!/iPhone|iPad|iPod/i.test(navigator.userAgent)&&h(a.daysContainer,"mouseover",function(b){"range"===a.config.mode&&V(b.target)});h(window.document.body,"keydown",ka);a.config.static||h(a._input,"keydown",ka);a.config.inline||a.config.static||h(window,"resize",b);void 0!==window.ontouchstart&&h(window.document,"touchstart",W);h(window.document,"mousedown",G(W));h(window.document,"focus",W,{capture:!0});!0===a.config.clickOpens&&(h(a._input,"focus",a.open),h(a._input,"mousedown",G(a.open)));void 0!==
a.daysContainer&&(h(a.monthNav,"mousedown",G(Da)),h(a.monthNav,["keyup","increment"],A),h(a.daysContainer,"mousedown",G(la)));void 0!==a.timeContainer&&void 0!==a.minuteElement&&void 0!==a.hourElement&&(h(a.timeContainer,["input","increment"],l),h(a.timeContainer,"mousedown",G(E)),h(a.timeContainer,["input","increment"],a._debouncedChange,{passive:!0}),h([a.hourElement,a.minuteElement],["focus","click"],function(a){return a.target.select()}),void 0!==a.secondElement&&h(a.secondElement,"focus",function(){return a.secondElement&&
a.secondElement.select()}),void 0!==a.amPM&&h(a.amPM,"mousedown",G(function(a){l(a);U()})))}}function X(b){b=void 0!==b?a.parseDate(b):a.latestSelectedDateObj||(a.config.minDate&&a.config.minDate>a.now?a.config.minDate:a.config.maxDate&&a.config.maxDate<a.now?a.config.maxDate:a.now);try{void 0!==b&&(a.currentYear=b.getFullYear(),a.currentMonth=b.getMonth())}catch(f){f.message="Invalid date supplied: "+b,a.config.errorHandler(f)}a.redraw()}function E(a){~a.target.className.indexOf("arrow")&&Y(a,a.target.classList.contains("arrowUp")?
1:-1)}function Y(a,f,c){a=a&&a.target;c=c||a&&a.parentNode&&a.parentNode.firstChild;a=Z("increment");a.delta=f;c&&c.dispatchEvent(a)}function aa(b,f,c,d){var B=D(f,!0),m=g("span","flatpickr-day "+b,f.getDate().toString());m.dateObj=f;m.$i=d;m.setAttribute("aria-label",a.formatDate(f,a.config.ariaDateFormat));-1===b.indexOf("hidden")&&0===r(f,a.now)&&(a.todayDateElem=m,m.classList.add("today"),m.setAttribute("aria-current","date"));B?(m.tabIndex=-1,ba(f)&&(m.classList.add("selected"),a.selectedDateElem=
m,"range"===a.config.mode&&(v(m,"startRange",a.selectedDates[0]&&0===r(f,a.selectedDates[0],!0)),v(m,"endRange",a.selectedDates[1]&&0===r(f,a.selectedDates[1],!0)),"nextMonthDay"===b&&m.classList.add("inRange")))):m.classList.add("disabled");"range"===a.config.mode&&(d="range"!==a.config.mode||2>a.selectedDates.length?!1:0<=r(f,a.selectedDates[0])&&0>=r(f,a.selectedDates[1]),d&&!ba(f)&&m.classList.add("inRange"));a.weekNumbers&&1===a.config.showMonths&&"prevMonthDay"!==b&&1===c%7&&a.weekNumbers.insertAdjacentHTML("beforeend",
"<span class='flatpickr-day'>"+a.config.getWeek(f)+"</span>");p("onDayCreate",m);return m}function C(b){b.focus();"range"===a.config.mode&&V(b)}function O(b){for(var f=0<b?a.config.showMonths:-1,c=0<b?0:a.config.showMonths-1;c!=f;c+=b)for(var d=a.daysContainer.children[c],w=0<b?d.children.length:-1,e=0<b?0:d.children.length-1;e!=w;e+=b){var n=d.children[e];if(-1===n.className.indexOf("hidden")&&D(n.dateObj))return n}}function H(b,f){var c=ca(document.activeElement);b=void 0!==b?b:c?document.activeElement:
void 0!==a.selectedDateElem&&ca(a.selectedDateElem)?a.selectedDateElem:void 0!==a.todayDateElem&&ca(a.todayDateElem)?a.todayDateElem:O(0<f?1:-1);if(void 0===b)return a._input.focus();if(!c)return C(b);a:{c=-1===b.className.indexOf("Month")?b.dateObj.getMonth():a.currentMonth;for(var d=0<f?a.config.showMonths:-1,w=0<f?1:-1,e=c-a.currentMonth;e!=d;e+=w)for(var n=a.daysContainer.children[e],k=n.children.length,g=c-a.currentMonth===e?b.$i+f:0>f?n.children.length-1:0;0<=g&&g<k&&g!=(0<f?k:-1);g+=w){var h=
n.children[g];if(-1===h.className.indexOf("hidden")&&D(h.dateObj)&&Math.abs(b.$i-g)>=Math.abs(f)){C(h);break a}}a.changeMonth(w);H(O(w),0)}}function K(b,f){var c=((new Date(b,f,1)).getDay()-a.l10n.firstDayOfWeek+7)%7,d=a.utils.getDaysInMonth((f-1+12)%12),w=a.utils.getDaysInMonth(f),e=window.document.createDocumentFragment(),n=1<a.config.showMonths,k=n?"prevMonthDay hidden":"prevMonthDay";n=n?"nextMonthDay hidden":"nextMonthDay";for(var h=d+1-c,l=0;h<=d;h++,l++)e.appendChild(aa(k,new Date(b,f-1,h),
h,l));for(h=1;h<=w;h++,l++)e.appendChild(aa("",new Date(b,f,h),h,l));for(d=w+1;d<=42-c&&(1===a.config.showMonths||0!==l%7);d++,l++)e.appendChild(aa(n,new Date(b,f+1,d%w),d,l));b=g("div","dayContainer");b.appendChild(e);return b}function P(){if(void 0!==a.daysContainer){M(a.daysContainer);a.weekNumbers&&M(a.weekNumbers);for(var b=document.createDocumentFragment(),f=0;f<a.config.showMonths;f++){var c=new Date(a.currentYear,a.currentMonth,1);c.setMonth(a.currentMonth+f);b.appendChild(K(c.getFullYear(),
c.getMonth()))}a.daysContainer.appendChild(b);a.days=a.daysContainer.firstChild}}function ma(){M(a.monthNav);a.monthNav.appendChild(a.prevMonthNav);for(var b=a.config.showMonths;b--;){var f=g("div","flatpickr-month");var c=window.document.createDocumentFragment();var d=g("span","cur-month");d.title=a.l10n.scrollTitle;var e=N("cur-year",{tabindex:"-1"});var h=e.childNodes[0];h.title=a.l10n.scrollTitle;h.setAttribute("aria-label",a.l10n.yearAriaLabel);a.config.minDate&&h.setAttribute("data-min",a.config.minDate.getFullYear().toString());
a.config.maxDate&&(h.setAttribute("data-max",a.config.maxDate.getFullYear().toString()),h.disabled=!!a.config.minDate&&a.config.minDate.getFullYear()===a.config.maxDate.getFullYear());var n=g("div","flatpickr-current-month");n.appendChild(d);n.appendChild(e);c.appendChild(n);f.appendChild(c);a.yearElements.push(h);a.monthElements.push(d);a.monthNav.appendChild(f)}a.monthNav.appendChild(a.nextMonthNav)}function R(){a.monthNav=g("div","flatpickr-months");a.yearElements=[];a.monthElements=[];a.prevMonthNav=
g("span","flatpickr-prev-month");a.prevMonthNav.innerHTML=a.config.prevArrow;a.nextMonthNav=g("span","flatpickr-next-month");a.nextMonthNav.innerHTML=a.config.nextArrow;ma();Object.defineProperty(a,"_hidePrevMonthArrow",{get:function(){return a.__hidePrevMonthArrow},set:function(b){a.__hidePrevMonthArrow!==b&&(v(a.prevMonthNav,"disabled",b),a.__hidePrevMonthArrow=b)}});Object.defineProperty(a,"_hideNextMonthArrow",{get:function(){return a.__hideNextMonthArrow},set:function(b){a.__hideNextMonthArrow!==
b&&(v(a.nextMonthNav,"disabled",b),a.__hideNextMonthArrow=b)}});a.currentYearElement=a.yearElements[0];I();return a.monthNav}function ia(){a.calendarContainer.classList.add("hasTime");a.config.noCalendar&&a.calendarContainer.classList.add("noCalendar");a.timeContainer=g("div","flatpickr-time");a.timeContainer.tabIndex=-1;var b=g("span","flatpickr-time-separator",":"),f=N("flatpickr-hour");a.hourElement=f.childNodes[0];var c=N("flatpickr-minute");a.minuteElement=c.childNodes[0];a.hourElement.tabIndex=
a.minuteElement.tabIndex=-1;var d=a.hourElement;if(a.latestSelectedDateObj)var e=a.latestSelectedDateObj.getHours();else if(a.config.time_24hr)e=a.config.defaultHour;else a:switch(e=a.config.defaultHour,e%24){case 0:case 12:e=12;break a;default:e%=12}d.value=u(e);a.minuteElement.value=u(a.latestSelectedDateObj?a.latestSelectedDateObj.getMinutes():a.config.defaultMinute);a.hourElement.setAttribute("data-step",a.config.hourIncrement.toString());a.minuteElement.setAttribute("data-step",a.config.minuteIncrement.toString());
a.hourElement.setAttribute("data-min",a.config.time_24hr?"0":"1");a.hourElement.setAttribute("data-max",a.config.time_24hr?"23":"12");a.minuteElement.setAttribute("data-min","0");a.minuteElement.setAttribute("data-max","59");a.timeContainer.appendChild(f);a.timeContainer.appendChild(b);a.timeContainer.appendChild(c);a.config.time_24hr&&a.timeContainer.classList.add("time24hr");a.config.enableSeconds&&(a.timeContainer.classList.add("hasSeconds"),b=N("flatpickr-second"),a.secondElement=b.childNodes[0],
a.secondElement.value=u(a.latestSelectedDateObj?a.latestSelectedDateObj.getSeconds():a.config.defaultSeconds),a.secondElement.setAttribute("data-step",a.minuteElement.getAttribute("data-step")),a.secondElement.setAttribute("data-min",a.minuteElement.getAttribute("data-min")),a.secondElement.setAttribute("data-max",a.minuteElement.getAttribute("data-max")),a.timeContainer.appendChild(g("span","flatpickr-time-separator",":")),a.timeContainer.appendChild(b));a.config.time_24hr||(a.amPM=g("span","flatpickr-am-pm",
a.l10n.amPM[t(11<(a.latestSelectedDateObj?a.hourElement.value:a.config.defaultHour))]),a.amPM.title=a.l10n.toggleTitle,a.amPM.tabIndex=-1,a.timeContainer.appendChild(a.amPM));return a.timeContainer}function na(){a.weekdayContainer?M(a.weekdayContainer):a.weekdayContainer=g("div","flatpickr-weekdays");for(var b=a.config.showMonths;b--;){var c=g("div","flatpickr-weekdaycontainer");a.weekdayContainer.appendChild(c)}oa();return a.weekdayContainer}function oa(){var b=a.l10n.firstDayOfWeek,c=a.l10n.weekdays.shorthand.concat();
0<b&&b<c.length&&(c=c.splice(b,c.length).concat(c.splice(0,b)));for(b=a.config.showMonths;b--;)a.weekdayContainer.children[b].innerHTML="\n      <span class=flatpickr-weekday>\n        "+c.join("</span><span class=flatpickr-weekday>")+"\n      </span>\n      "}function da(b,c){void 0===c&&(c=!0);b=c?b:b-a.currentMonth;if(!(0>b&&!0===a._hidePrevMonthArrow||0<b&&!0===a._hideNextMonthArrow)){a.currentMonth+=b;if(0>a.currentMonth||11<a.currentMonth)a.currentYear+=11<a.currentMonth?1:-1,a.currentMonth=
(a.currentMonth+12)%12,p("onYearChange");P();p("onMonthChange");I()}}function ea(b){return a.config.appendTo&&a.config.appendTo.contains(b)?!0:a.calendarContainer.contains(b)}function W(b){if(a.isOpen&&!a.config.inline){var c=ea(b.target),d=b.target===a.input||b.target===a.altInput||a.element.contains(b.target)||b.path&&b.path.indexOf&&(~b.path.indexOf(a.input)||~b.path.indexOf(a.altInput));c="blur"===b.type?d&&b.relatedTarget&&!ea(b.relatedTarget):!d&&!c;d=!a.config.ignoredFocusElements.some(function(a){return a.contains(b.target)});
c&&d&&(a.close(),"range"===a.config.mode&&1===a.selectedDates.length&&(a.clear(!1),a.redraw()))}}function T(b){if(!(!b||a.config.minDate&&b<a.config.minDate.getFullYear()||a.config.maxDate&&b>a.config.maxDate.getFullYear())){var c=a.currentYear!==b;a.currentYear=b||a.currentYear;a.config.maxDate&&a.currentYear===a.config.maxDate.getFullYear()?a.currentMonth=Math.min(a.config.maxDate.getMonth(),a.currentMonth):a.config.minDate&&a.currentYear===a.config.minDate.getFullYear()&&(a.currentMonth=Math.max(a.config.minDate.getMonth(),
a.currentMonth));c&&(a.redraw(),p("onYearChange"))}}function D(b,c){void 0===c&&(c=!0);b=a.parseDate(b,void 0,c);if(a.config.minDate&&b&&0>r(b,a.config.minDate,void 0!==c?c:!a.minDateHasTime)||a.config.maxDate&&b&&0<r(b,a.config.maxDate,void 0!==c?c:!a.maxDateHasTime))return!1;if(0===a.config.enable.length&&0===a.config.disable.length)return!0;if(void 0===b)return!1;for(var f=(c=0<a.config.enable.length)?a.config.enable:a.config.disable,d=0,e;d<f.length;d++){e=f[d];if("function"===typeof e&&e(b)||
e instanceof Date&&void 0!==b&&e.getTime()===b.getTime())return c;if("string"===typeof e&&void 0!==b)return(f=a.parseDate(e,void 0,!0))&&f.getTime()===b.getTime()?c:!c;if("object"===typeof e&&void 0!==b&&e.from&&e.to&&b.getTime()>=e.from.getTime()&&b.getTime()<=e.to.getTime())return c}return!c}function ca(b){return void 0!==a.daysContainer?-1===b.className.indexOf("hidden")&&a.daysContainer.contains(b):!1}function ka(b){var c=b.target===a._input,d=ea(b.target),e=a.config.allowInput,h=a.isOpen&&(!e||
!c),g=a.config.inline&&c&&!e;if(13===b.keyCode&&c){b.stopPropagation();if(e)return a.setDate(a._input.value,!0,b.target===a.altInput?a.config.altFormat:a.config.dateFormat),b.target.blur();a.open()}else if(d||h||g){b.stopPropagation();d=!!a.timeContainer&&a.timeContainer.contains(b.target);switch(b.keyCode){case 13:d?z():la(b);break;case 27:b.preventDefault();pa();break;case 8:case 46:c&&!a.config.allowInput&&(b.preventDefault(),a.clear());break;case 37:case 39:d?a.hourElement&&a.hourElement.focus():
(b.preventDefault(),void 0!==a.daysContainer&&!1===a.config.allowInput&&(c=39===b.keyCode?1:-1,b.ctrlKey?(da(c),H(O(1),0)):H(void 0,c)));break;case 38:case 40:b.preventDefault();c=40===b.keyCode?1:-1;a.daysContainer?b.ctrlKey?(T(a.currentYear-c),H(O(1),0)):d||H(void 0,7*c):a.config.enableTime&&(!d&&a.hourElement&&a.hourElement.focus(),l(b),a._debouncedChange());break;case 9:b.target===a.hourElement?(b.preventDefault(),a.minuteElement.select()):b.target===a.minuteElement&&(a.secondElement||a.amPM)?
(b.preventDefault(),void 0!==a.secondElement?a.secondElement.focus():void 0!==a.amPM&&a.amPM.focus()):b.target===a.secondElement&&a.amPM&&(b.preventDefault(),a.amPM.focus())}switch(b.key){case a.l10n.amPM[0].charAt(0):case a.l10n.amPM[0].charAt(0).toLowerCase():void 0!==a.amPM&&b.target===a.amPM&&(a.amPM.textContent=a.l10n.amPM[0],F(),z());break;case a.l10n.amPM[1].charAt(0):case a.l10n.amPM[1].charAt(0).toLowerCase():void 0!==a.amPM&&b.target===a.amPM&&(a.amPM.textContent=a.l10n.amPM[1],F(),z())}p("onKeyDown",
b)}}function V(b){if(1===a.selectedDates.length&&b.classList.contains("flatpickr-day")&&!b.classList.contains("disabled")){var c=b.dateObj.getTime(),d=a.parseDate(a.selectedDates[0],void 0,!0).getTime(),e=Math.min(c,a.selectedDates[0].getTime()),h=Math.max(c,a.selectedDates[0].getTime()),g=a.daysContainer.children,n=g[0].children[0].dateObj.getTime();g=g[g.length-1].lastChild.dateObj.getTime();for(var k=!1,l=0,y=0;n<g;n+=Ea.DAY)D(new Date(n),!0)||(k=k||n>e&&n<h,n<d&&(!l||n>l)?l=n:n>d&&(!y||n<y)&&
(y=n));for(var x=0;x<a.config.showMonths;x++){var p=a.daysContainer.children[x],q=a.daysContainer.children[x-1];e=function(f,e){var B=p.children[f];f=B.dateObj.getTime();if(e=0<l&&f<l||0<y&&f>y)return B.classList.add("notAllowed"),["inRange","startRange","endRange"].forEach(function(a){B.classList.remove(a)}),"continue";if(k&&!e)return"continue";["startRange","inRange","endRange","notAllowed"].forEach(function(a){B.classList.remove(a)});b.classList.add(c<a.selectedDates[0].getTime()?"startRange":
"endRange");!p.contains(b)&&0<x&&q&&q.lastChild.dateObj.getTime()>=f||(d<c&&f===d?B.classList.add("startRange"):d>c&&f===d&&B.classList.add("endRange"),f>=l&&(0===y||f<=y)&&f>Math.min(d,c)&&f<Math.max(d,c)&&B.classList.add("inRange"))};h=0;for(n=p.children.length;h<n;h++)e(h,n)}}}function Ca(){!a.isOpen||a.config.static||a.config.inline||Q()}function qa(b){return function(c){c=a.config["_"+b+"Date"]=a.parseDate(c,a.config.dateFormat);var f=a.config["_"+("min"===b?"max":"min")+"Date"];void 0!==c&&
(a["min"===b?"minDateHasTime":"maxDateHasTime"]=0<c.getHours()||0<c.getMinutes()||0<c.getSeconds());a.selectedDates&&(a.selectedDates=a.selectedDates.filter(function(a){return D(a)}),a.selectedDates.length||"min"!==b||y(c),z());a.daysContainer&&(ra(),void 0!==c?a.currentYearElement[b]=c.getFullYear().toString():a.currentYearElement.removeAttribute(b),a.currentYearElement.disabled=!!f&&void 0!==c&&f.getFullYear()===c.getFullYear())}}function Fa(){var b="wrap weekNumbers allowInput clickOpens time_24hr enableTime noCalendar altInput shorthandCurrentMonth inline static enableSeconds disableMobile".split(" "),
f="onChange onClose onDayCreate onDestroy onKeyDown onMonthChange onOpen onParseConfig onReady onValueUpdate onYearChange onPreCalendarPosition".split(" "),e=Object.assign({},d,JSON.parse(JSON.stringify(c.dataset||{}))),m={};a.config.parseDate=e.parseDate;a.config.formatDate=e.formatDate;Object.defineProperty(a.config,"enable",{get:function(){return a.config._enable},set:function(b){a.config._enable=sa(b)}});Object.defineProperty(a.config,"disable",{get:function(){return a.config._disable},set:function(b){a.config._disable=
sa(b)}});!e.dateFormat&&e.enableTime&&(m.dateFormat=e.noCalendar?"H:i"+(e.enableSeconds?":S":""):q.defaultConfig.dateFormat+" H:i"+(e.enableSeconds?":S":""));e.altInput&&e.enableTime&&!e.altFormat&&(m.altFormat=e.noCalendar?"h:i"+(e.enableSeconds?":S K":" K"):q.defaultConfig.altFormat+(" h:i"+(e.enableSeconds?":S":"")+" K"));Object.defineProperty(a.config,"minDate",{get:function(){return a.config._minDate},set:qa("min")});Object.defineProperty(a.config,"maxDate",{get:function(){return a.config._maxDate},
set:qa("max")});var h=function(b){return function(c){a.config["min"===b?"_minTime":"_maxTime"]=a.parseDate(c,"H:i")}};Object.defineProperty(a.config,"minTime",{get:function(){return a.config._minTime},set:h("min")});Object.defineProperty(a.config,"maxTime",{get:function(){return a.config._maxTime},set:h("max")});Object.assign(a.config,m,e);for(m=0;m<b.length;m++)a.config[b[m]]=!0===a.config[b[m]]||"true"===a.config[b[m]];for(b=f.length;b--;)void 0!==a.config[f[b]]&&(a.config[f[b]]=ta(a.config[f[b]]||
[]).map(x));"time"===a.config.mode&&(a.config.noCalendar=!0,a.config.enableTime=!0);for(b=0;b<a.config.plugins.length;b++){m=a.config.plugins[b](a)||{};for(var g in m)~f.indexOf(g)?a.config[g]=ta(m[g]).map(x).concat(a.config[g]):"undefined"===typeof e[g]&&(a.config[g]=m[g])}a.isMobile=!a.config.disableMobile&&!a.config.inline&&"single"===a.config.mode&&!a.config.disable.length&&!a.config.enable.length&&!a.config.weekNumbers&&/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);
p("onParseConfig")}function ua(){"object"!==typeof a.config.locale&&"undefined"===typeof q.l10ns[a.config.locale]&&a.config.errorHandler(Error("flatpickr: invalid locale "+a.config.locale));a.l10n=Object.assign({},q.l10ns.default,"object"===typeof a.config.locale?a.config.locale:"default"!==a.config.locale?q.l10ns[a.config.locale]:void 0);fa.K="("+a.l10n.amPM[0]+"|"+a.l10n.amPM[1]+"|"+a.l10n.amPM[0].toLowerCase()+"|"+a.l10n.amPM[1].toLowerCase()+")";a.formatDate=va(a)}function Q(b){if(void 0!==a.calendarContainer){p("onPreCalendarPosition");
var c=b||a._positionElement,d=Array.prototype.reduce.call(a.calendarContainer.children,function(a,b){return a+b.offsetHeight},0);b=a.calendarContainer.offsetWidth;var e=a.config.position,h=c.getBoundingClientRect(),g=window.innerHeight-h.bottom;e="above"===e||"below"!==e&&g<d&&h.top>d;c=window.pageYOffset+h.top+(e?-d-2:c.offsetHeight+2);v(a.calendarContainer,"arrowTop",!e);v(a.calendarContainer,"arrowBottom",e);a.config.inline||(d=window.pageXOffset+h.left,h=window.document.body.offsetWidth-h.right,
b=d+b>window.document.body.offsetWidth,v(a.calendarContainer,"rightMost",b),a.config.static||(a.calendarContainer.style.top=c+"px",b?(a.calendarContainer.style.left="auto",a.calendarContainer.style.right=h+"px"):(a.calendarContainer.style.left=d+"px",a.calendarContainer.style.right="auto")))}}function ra(){a.config.noCalendar||a.isMobile||(I(),P())}function pa(){a._input.focus();-1!==window.navigator.userAgent.indexOf("MSIE")||void 0!==navigator.msMaxTouchPoints?setTimeout(a.close,0):a.close()}function la(b){b.preventDefault();
b.stopPropagation();b=ja(b.target,function(a){return a.classList&&a.classList.contains("flatpickr-day")&&!a.classList.contains("disabled")&&!a.classList.contains("notAllowed")});if(void 0!==b){var c=a.latestSelectedDateObj=new Date(b.dateObj.getTime()),d=(c.getMonth()<a.currentMonth||c.getMonth()>a.currentMonth+a.config.showMonths-1)&&"range"!==a.config.mode;a.selectedDateElem=b;if("single"===a.config.mode)a.selectedDates=[c];else if("multiple"===a.config.mode){var e=ba(c);e?a.selectedDates.splice(parseInt(e),
1):a.selectedDates.push(c)}else"range"===a.config.mode&&(2===a.selectedDates.length&&a.clear(!1),a.selectedDates.push(c),0!==r(c,a.selectedDates[0],!0)&&a.selectedDates.sort(function(a,b){return a.getTime()-b.getTime()}));F();d&&(e=a.currentYear!==c.getFullYear(),a.currentYear=c.getFullYear(),a.currentMonth=c.getMonth(),e&&p("onYearChange"),p("onMonthChange"));I();P();a.config.minDate&&a.minDateHasTime&&a.config.enableTime&&0===r(c,a.config.minDate)&&y(a.config.minDate);z();a.config.enableTime&&setTimeout(function(){return a.showTimeInput=
!0},50);"range"===a.config.mode&&(1===a.selectedDates.length?V(b):I());d||"range"===a.config.mode||1!==a.config.showMonths?a.selectedDateElem&&a.selectedDateElem.focus():C(b);void 0!==a.hourElement&&setTimeout(function(){return void 0!==a.hourElement&&a.hourElement.select()},451);a.config.closeOnSelect&&(b="range"===a.config.mode&&2===a.selectedDates.length&&!a.config.enableTime,("single"===a.config.mode&&!a.config.enableTime||b)&&pa());U()}}function wa(b,c){var d=[];if(b instanceof Array)d=b.map(function(b){return a.parseDate(b,
c)});else if(b instanceof Date||"number"===typeof b)d=[a.parseDate(b,c)];else if("string"===typeof b)switch(a.config.mode){case "single":d=[a.parseDate(b,c)];break;case "multiple":d=b.split(a.config.conjunction).map(function(b){return a.parseDate(b,c)});break;case "range":d=b.split(a.l10n.rangeSeparator).map(function(b){return a.parseDate(b,c)})}else a.config.errorHandler(Error("Invalid date supplied: "+JSON.stringify(b)));a.selectedDates=d.filter(function(a){return a instanceof Date&&D(a,!1)});"range"===
a.config.mode&&a.selectedDates.sort(function(a,b){return a.getTime()-b.getTime()})}function sa(b){return b.map(function(b){return"string"===typeof b||"number"===typeof b||b instanceof Date?a.parseDate(b,void 0,!0):b&&"object"===typeof b&&b.from&&b.to?{from:a.parseDate(b.from,void 0),to:a.parseDate(b.to,void 0)}:b}).filter(function(a){return a})}function Ga(){a.selectedDates=[];a.now=a.parseDate(a.config.now)||new Date;var b=a.config.defaultDate||a.input.value;b&&wa(b,a.config.dateFormat);b=0<a.selectedDates.length?
a.selectedDates[0]:a.config.minDate&&a.config.minDate.getTime()>a.now.getTime()?a.config.minDate:a.config.maxDate&&a.config.maxDate.getTime()<a.now.getTime()?a.config.maxDate:a.now;a.currentYear=b.getFullYear();a.currentMonth=b.getMonth();0<a.selectedDates.length&&(a.latestSelectedDateObj=a.selectedDates[0]);void 0!==a.config.minTime&&(a.config.minTime=a.parseDate(a.config.minTime,"H:i"));void 0!==a.config.maxTime&&(a.config.maxTime=a.parseDate(a.config.maxTime,"H:i"));a.minDateHasTime=!!a.config.minDate&&
(0<a.config.minDate.getHours()||0<a.config.minDate.getMinutes()||0<a.config.minDate.getSeconds());a.maxDateHasTime=!!a.config.maxDate&&(0<a.config.maxDate.getHours()||0<a.config.maxDate.getMinutes()||0<a.config.maxDate.getSeconds());Object.defineProperty(a,"showTimeInput",{get:function(){return a._showTimeInput},set:function(b){a._showTimeInput=b;a.calendarContainer&&v(a.calendarContainer,"showTimeInput",b);a.isOpen&&Q()}})}function Ba(){var b=a.config.enableTime?a.config.noCalendar?"time":"datetime-local":
"date";a.mobileInput=g("input",a.input.className+" flatpickr-mobile");a.mobileInput.step=a.input.getAttribute("step")||"any";a.mobileInput.tabIndex=1;a.mobileInput.type=b;a.mobileInput.disabled=a.input.disabled;a.mobileInput.required=a.input.required;a.mobileInput.placeholder=a.input.placeholder;a.mobileFormatStr="datetime-local"===b?"Y-m-d\\TH:i:S":"date"===b?"Y-m-d":"H:i:S";0<a.selectedDates.length&&(a.mobileInput.defaultValue=a.mobileInput.value=a.formatDate(a.selectedDates[0],a.mobileFormatStr));
a.config.minDate&&(a.mobileInput.min=a.formatDate(a.config.minDate,"Y-m-d"));a.config.maxDate&&(a.mobileInput.max=a.formatDate(a.config.maxDate,"Y-m-d"));a.input.type="hidden";void 0!==a.altInput&&(a.altInput.type="hidden");try{a.input.parentNode&&a.input.parentNode.insertBefore(a.mobileInput,a.input.nextSibling)}catch(f){}h(a.mobileInput,"change",function(b){a.setDate(b.target.value,!1,a.mobileFormatStr);p("onChange");p("onClose")})}function p(b,c){var d=a.config[b];if(void 0!==d&&0<d.length)for(var f=
0;d[f]&&f<d.length;f++)d[f](a.selectedDates,a.input.value,a,c);"onChange"===b&&(a.input.dispatchEvent(Z("change")),a.input.dispatchEvent(Z("input")))}function Z(a){var b=document.createEvent("Event");b.initEvent(a,!0,!0);return b}function ba(b){for(var c=0;c<a.selectedDates.length;c++)if(0===r(a.selectedDates[c],b))return""+c;return!1}function I(){a.config.noCalendar||a.isMobile||!a.monthNav||(a.yearElements.forEach(function(b,c){var d=new Date(a.currentYear,a.currentMonth,1);d.setMonth(a.currentMonth+
c);a.monthElements[c].textContent=ha(d.getMonth(),a.config.shorthandCurrentMonth,a.l10n)+" ";b.value=d.getFullYear().toString()}),a._hidePrevMonthArrow=void 0!==a.config.minDate&&(a.currentYear===a.config.minDate.getFullYear()?a.currentMonth<=a.config.minDate.getMonth():a.currentYear<a.config.minDate.getFullYear()),a._hideNextMonthArrow=void 0!==a.config.maxDate&&(a.currentYear===a.config.maxDate.getFullYear()?a.currentMonth+1>a.config.maxDate.getMonth():a.currentYear>a.config.maxDate.getFullYear()))}
function z(b){void 0===b&&(b=!0);if(0===a.selectedDates.length)return a.clear(b);void 0!==a.mobileInput&&a.mobileFormatStr&&(a.mobileInput.value=void 0!==a.latestSelectedDateObj?a.formatDate(a.latestSelectedDateObj,a.mobileFormatStr):"");var c="range"!==a.config.mode?a.config.conjunction:a.l10n.rangeSeparator;a.input.value=a.selectedDates.map(function(b){return a.formatDate(b,a.config.dateFormat)}).join(c);void 0!==a.altInput&&(a.altInput.value=a.selectedDates.map(function(b){return a.formatDate(b,
a.config.altFormat)}).join(c));!1!==b&&p("onValueUpdate")}function Da(b){var c=a.prevMonthNav.contains(b.target),d=a.nextMonthNav.contains(b.target);c||d?da(c?-1:1):0<=a.yearElements.indexOf(b.target)?(b.preventDefault(),b.target.select()):b.target.classList.contains("arrowUp")?a.changeYear(a.currentYear+1):b.target.classList.contains("arrowDown")&&a.changeYear(a.currentYear-1)}function za(b){b.preventDefault();var c="keydown"===b.type,d=b.target;void 0!==a.amPM&&b.target===a.amPM&&(a.amPM.textContent=
a.l10n.amPM[t(a.amPM.textContent===a.l10n.amPM[0])]);var e=parseFloat(d.getAttribute("data-min")),h=parseFloat(d.getAttribute("data-max")),g=parseFloat(d.getAttribute("data-step")),k=parseInt(d.value,10);b=k+g*(b.delta||(c?38===b.which?1:-1:0));if("undefined"!==typeof d.value&&2===d.value.length){c=d===a.hourElement;var l=d===a.minuteElement;b<e?(b=h+b+t(!c)+(t(c)&&t(!a.amPM)),l&&Y(void 0,-1,a.hourElement)):b>h&&(b=d===a.hourElement?b-h-t(!a.amPM):e,l&&Y(void 0,1,a.hourElement));a.amPM&&c&&(1===g?
23===b+k:Math.abs(b-k)>g)&&(a.amPM.textContent=a.l10n.amPM[t(a.amPM.textContent===a.l10n.amPM[0])]);d.value=u(b)}}var a={config:Object.assign({},q.defaultConfig),l10n:J};a.parseDate=xa({config:a.config,l10n:a.l10n});a._handlers=[];a._bind=h;a._setHoursFromDate=y;a.changeMonth=da;a.changeYear=T;a.clear=function(b){void 0===b&&(b=!0);a.input.value="";void 0!==a.altInput&&(a.altInput.value="");void 0!==a.mobileInput&&(a.mobileInput.value="");a.selectedDates=[];a.latestSelectedDateObj=void 0;a.showTimeInput=
!1;!0===a.config.enableTime&&(void 0!==a.config.minDate?y(a.config.minDate):S(a.config.defaultHour,a.config.defaultMinute,a.config.defaultSeconds));a.redraw();b&&p("onChange")};a.close=function(){a.isOpen=!1;a.isMobile||(a.calendarContainer.classList.remove("open"),a._input.classList.remove("active"));p("onClose")};a._createElement=g;a.destroy=function(){void 0!==a.config&&p("onDestroy");for(var b=a._handlers.length;b--;){var c=a._handlers[b];c.element.removeEventListener(c.event,c.handler)}a._handlers=
[];a.mobileInput?(a.mobileInput.parentNode&&a.mobileInput.parentNode.removeChild(a.mobileInput),a.mobileInput=void 0):a.calendarContainer&&a.calendarContainer.parentNode&&a.calendarContainer.parentNode.removeChild(a.calendarContainer);a.altInput&&(a.input.type="text",a.altInput.parentNode&&a.altInput.parentNode.removeChild(a.altInput),delete a.altInput);a.input&&(a.input.type=a.input._type,a.input.classList.remove("flatpickr-input"),a.input.removeAttribute("readonly"),a.input.value="");"_showTimeInput latestSelectedDateObj _hideNextMonthArrow _hidePrevMonthArrow __hideNextMonthArrow __hidePrevMonthArrow isMobile isOpen selectedDateElem minDateHasTime maxDateHasTime days daysContainer _input _positionElement innerContainer rContainer monthNav todayDateElem calendarContainer weekdayContainer prevMonthNav nextMonthNav currentMonthElement currentYearElement navigationCurrentMonth selectedDateElem config".split(" ").forEach(function(b){try{delete a[b]}catch(m){}})};
a.isEnabled=D;a.jumpToDate=X;a.open=function(b,c){void 0===c&&(c=a._input);!0===a.isMobile?(b&&(b.preventDefault(),b.target&&b.target.blur()),setTimeout(function(){void 0!==a.mobileInput&&a.mobileInput.click()},0),p("onOpen")):a._input.disabled||a.config.inline||(b=a.isOpen,a.isOpen=!0,b||(a.calendarContainer.classList.add("open"),a._input.classList.add("active"),p("onOpen"),Q(c)),!0===a.config.enableTime&&!0===a.config.noCalendar&&(0===a.selectedDates.length&&(a.setDate(void 0!==a.config.minDate?
new Date(a.config.minDate.getTime()):(new Date).setHours(a.config.defaultHour,a.config.defaultMinute,a.config.defaultSeconds,0),!1),F(),z()),setTimeout(function(){return a.hourElement.select()},50)))};a.redraw=ra;a.set=function(b,c){null!==b&&"object"===typeof b?Object.assign(a.config,b):(a.config[b]=c,void 0!==ya[b]&&ya[b].forEach(function(a){return a()}));a.redraw();X()};a.setDate=function(b,c,d){void 0===c&&(c=!1);void 0===d&&(d=a.config.dateFormat);if(0!==b&&!b)return a.clear(c);wa(b,d);a.showTimeInput=
0<a.selectedDates.length;a.latestSelectedDateObj=a.selectedDates[0];a.redraw();X();y();z(c);c&&p("onChange")};a.toggle=function(){if(a.isOpen)return a.close();a.open()};var ya={locale:[ua,oa],showMonths:[ma,k,na]};(function(){a.element=a.input=c;a.isOpen=!1;Fa();ua();a.input=a.config.wrap?c.querySelector("[data-input]"):c;a.input?(a.input._type=a.input.type,a.input.type="text",a.input.classList.add("flatpickr-input"),a._input=a.input,a.config.altInput&&(a.altInput=g(a.input.nodeName,a.input.className+
" "+a.config.altInputClass),a._input=a.altInput,a.altInput.placeholder=a.input.placeholder,a.altInput.disabled=a.input.disabled,a.altInput.required=a.input.required,a.altInput.tabIndex=a.input.tabIndex,a.altInput.type="text",a.input.type="hidden",!a.config.static&&a.input.parentNode&&a.input.parentNode.insertBefore(a.altInput,a.input.nextSibling)),a.config.allowInput||a._input.setAttribute("readonly","readonly"),a._positionElement=a.config.positionElement||a._input):a.config.errorHandler(Error("Invalid input element specified"));
Ga();e();if(!a.isMobile){var b=window.document.createDocumentFragment();a.calendarContainer=g("div","flatpickr-calendar");a.calendarContainer.tabIndex=-1;if(!a.config.noCalendar){b.appendChild(R());a.innerContainer=g("div","flatpickr-innerContainer");if(a.config.weekNumbers){a.calendarContainer.classList.add("hasWeeks");var d=g("div","flatpickr-weekwrapper");d.appendChild(g("span","flatpickr-weekday",a.l10n.weekAbbreviation));var h=g("div","flatpickr-weeks");d.appendChild(h);a.innerContainer.appendChild(d);
a.weekNumbers=h;a.weekWrapper=d}a.rContainer=g("div","flatpickr-rContainer");a.rContainer.appendChild(na());a.daysContainer||(a.daysContainer=g("div","flatpickr-days"),a.daysContainer.tabIndex=-1);P();a.rContainer.appendChild(a.daysContainer);a.innerContainer.appendChild(a.rContainer);b.appendChild(a.innerContainer)}a.config.enableTime&&b.appendChild(ia());v(a.calendarContainer,"rangeMode","range"===a.config.mode);v(a.calendarContainer,"animate",!0===a.config.animate);v(a.calendarContainer,"multiMonth",
1<a.config.showMonths);a.calendarContainer.appendChild(b);b=void 0!==a.config.appendTo&&void 0!==a.config.appendTo.nodeType;if(a.config.inline||a.config.static)a.calendarContainer.classList.add(a.config.inline?"inline":"static"),a.config.inline&&(!b&&a.element.parentNode?a.element.parentNode.insertBefore(a.calendarContainer,a._input.nextSibling):void 0!==a.config.appendTo&&a.config.appendTo.appendChild(a.calendarContainer)),a.config.static&&(b=g("div","flatpickr-wrapper"),a.element.parentNode&&a.element.parentNode.insertBefore(b,
a.element),b.appendChild(a.element),a.altInput&&b.appendChild(a.altInput),b.appendChild(a.calendarContainer));a.config.static||a.config.inline||(void 0!==a.config.appendTo?a.config.appendTo:window.document.body).appendChild(a.calendarContainer)}Aa();if(a.selectedDates.length||a.config.noCalendar)a.config.enableTime&&y(a.config.noCalendar?a.latestSelectedDateObj||a.config.minDate:void 0),z(!1);k();a.showTimeInput=0<a.selectedDates.length||a.config.noCalendar;b=/^((?!chrome|android).)*safari/i.test(navigator.userAgent);
!a.isMobile&&b&&Q();p("onReady")})();return a}function A(c,d){c=Array.prototype.slice.call(c);for(var e=[],g=0;g<c.length;g++){var k=c[g];try{null===k.getAttribute("data-fp-omit")&&(void 0!==k._flatpickr&&(k._flatpickr.destroy(),k._flatpickr=void 0),k._flatpickr=R(k,d||{}),e.push(k._flatpickr))}catch(l){console.error(l)}}return 1===e.length?e[0]:e}var u=function(c){return("0"+c).slice(-2)},t=function(c){return!0===c?1:0},ta=function(c){return c instanceof Array?c:[c]},K=function(){},ha=function(c,
d,e){return e.months[d?"shorthand":"longhand"][c]},ia={D:K,F:function(c,d,e){c.setMonth(e.months.longhand.indexOf(d))},G:function(c,d){c.setHours(parseFloat(d))},H:function(c,d){c.setHours(parseFloat(d))},J:function(c,d){c.setDate(parseFloat(d))},K:function(c,d,e){c.setHours(c.getHours()%12+12*t((new RegExp(e.amPM[1],"i")).test(d)))},M:function(c,d,e){c.setMonth(e.months.shorthand.indexOf(d))},S:function(c,d){c.setSeconds(parseFloat(d))},U:function(c,d){return new Date(1E3*parseFloat(d))},W:function(c,
d){d=parseInt(d);return new Date(c.getFullYear(),0,2+7*(d-1),0,0,0,0)},Y:function(c,d){c.setFullYear(parseFloat(d))},Z:function(c,d){return new Date(d)},d:function(c,d){c.setDate(parseFloat(d))},h:function(c,d){c.setHours(parseFloat(d))},i:function(c,d){c.setMinutes(parseFloat(d))},j:function(c,d){c.setDate(parseFloat(d))},l:K,m:function(c,d){c.setMonth(parseFloat(d)-1)},n:function(c,d){c.setMonth(parseFloat(d)-1)},s:function(c,d){c.setSeconds(parseFloat(d))},w:K,y:function(c,d){c.setFullYear(2E3+
parseFloat(d))}},fa={D:"(\\w+)",F:"(\\w+)",G:"(\\d\\d|\\d)",H:"(\\d\\d|\\d)",J:"(\\d\\d|\\d)\\w+",K:"",M:"(\\w+)",S:"(\\d\\d|\\d)",U:"(.+)",W:"(\\d\\d|\\d)",Y:"(\\d{4})",Z:"(.+)",d:"(\\d\\d|\\d)",h:"(\\d\\d|\\d)",i:"(\\d\\d|\\d)",j:"(\\d\\d|\\d)",l:"(\\w+)",m:"(\\d\\d|\\d)",n:"(\\d\\d|\\d)",s:"(\\d\\d|\\d)",w:"(\\d\\d|\\d)",y:"(\\d{2})"},E={Z:function(c){return c.toISOString()},D:function(c,d,e){return d.weekdays.shorthand[E.w(c,d,e)]},F:function(c,d,e){return ha(E.n(c,d,e)-1,!1,d)},G:function(c,
d,e){return u(E.h(c,d,e))},H:function(c){return u(c.getHours())},J:function(c,d){return void 0!==d.ordinal?c.getDate()+d.ordinal(c.getDate()):c.getDate()},K:function(c,d){return d.amPM[t(11<c.getHours())]},M:function(c,d){return ha(c.getMonth(),!0,d)},S:function(c){return u(c.getSeconds())},U:function(c){return c.getTime()/1E3},W:function(c,d,e){return e.getWeek(c)},Y:function(c){return c.getFullYear()},d:function(c){return u(c.getDate())},h:function(c){return c.getHours()%12?c.getHours()%12:12},
i:function(c){return u(c.getMinutes())},j:function(c){return c.getDate()},l:function(c,d){return d.weekdays.longhand[c.getDay()]},m:function(c){return u(c.getMonth()+1)},n:function(c){return c.getMonth()+1},s:function(c){return c.getSeconds()},w:function(c){return c.getDay()},y:function(c){return String(c.getFullYear()).substring(2)}},J={weekdays:{shorthand:"Sun Mon Tue Wed Thu Fri Sat".split(" "),longhand:"Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" ")},months:{shorthand:"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),
longhand:"January February March April May June July August September October November December".split(" ")},daysInMonth:[31,28,31,30,31,30,31,31,30,31,30,31],firstDayOfWeek:0,ordinal:function(c){c%=100;if(3<c&&21>c)return"th";switch(c%10){case 1:return"st";case 2:return"nd";case 3:return"rd";default:return"th"}},rangeSeparator:" to ",weekAbbreviation:"Wk",scrollTitle:"Scroll to increment",toggleTitle:"Click to toggle",amPM:["AM","PM"],yearAriaLabel:"Year"},va=function(c){var d=c.config,e=void 0===
d?C:d;c=c.l10n;var g=void 0===c?J:c;return function(c,d,x){if(void 0!==e.formatDate)return e.formatDate(c,d);var k=x||g;return d.split("").map(function(d,g,h){return E[d]&&"\\"!==h[g-1]?E[d](c,k,e):"\\"!==d?d:""}).join("")}},xa=function(c){var d=c.config,e=void 0===d?C:d;c=c.l10n;var g=void 0===c?J:c;return function(c,d,x){if(0===c||c){if(c instanceof Date)var k=new Date(c.getTime());else if("string"!==typeof c&&void 0!==c.toFixed)k=new Date(c);else if("string"===typeof c){d=d||(e||C).dateFormat;
var l=String(c).trim();if("today"===l)k=new Date,x=!0;else if(/Z$/.test(l)||/GMT$/.test(l))k=new Date(c);else if(e&&e.parseDate)k=e.parseDate(c,d);else{k=e&&e.noCalendar?new Date((new Date).setHours(0,0,0,0)):new Date((new Date).getFullYear(),0,1,0,0,0,0);var q;l=[];for(var h=0,r=0,u="";h<d.length;h++){var t=d[h],v="\\"===t,A="\\"===d[h-1]||v;if(fa[t]&&!A){if(u+=fa[t],(v=(new RegExp(u)).exec(c))&&(q=!0))l["Y"!==t?"push":"unshift"]({fn:ia[t],val:v[++r]})}else v||(u+=".");l.forEach(function(c){var d=
c.fn;return k=d(k,c.val,g)||k})}k=q?k:void 0}}if(k instanceof Date)return!0===x&&k.setHours(0,0,0,0),k;e.errorHandler(Error("Invalid date provided: "+c))}}},Ea={DAY:864E5},C={_disable:[],_enable:[],allowInput:!1,altFormat:"F j, Y",altInput:!1,altInputClass:"form-control input",animate:"object"===typeof window&&-1===window.navigator.userAgent.indexOf("MSIE"),ariaDateFormat:"F j, Y",clickOpens:!0,closeOnSelect:!0,conjunction:", ",dateFormat:"Y-m-d",defaultHour:12,defaultMinute:0,defaultSeconds:0,disable:[],
disableMobile:!1,enable:[],enableSeconds:!1,enableTime:!1,errorHandler:function(c){return"undefined"!==typeof console&&console.warn(c)},getWeek:function(c){c=new Date(c.getTime());c.setHours(0,0,0,0);c.setDate(c.getDate()+3-(c.getDay()+6)%7);var d=new Date(c.getFullYear(),0,4);return 1+Math.round(((c.getTime()-d.getTime())/864E5-3+(d.getDay()+6)%7)/7)},hourIncrement:1,ignoredFocusElements:[],inline:!1,locale:"default",minuteIncrement:5,mode:"single",nextArrow:"<svg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 17 17'><g></g><path d='M13.207 8.472l-7.854 7.854-0.707-0.707 7.146-7.146-7.146-7.148 0.707-0.707 7.854 7.854z' /></svg>",
noCalendar:!1,now:new Date,onChange:[],onClose:[],onDayCreate:[],onDestroy:[],onKeyDown:[],onMonthChange:[],onOpen:[],onParseConfig:[],onReady:[],onValueUpdate:[],onYearChange:[],onPreCalendarPosition:[],plugins:[],position:"auto",positionElement:void 0,prevArrow:"<svg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 17 17'><g></g><path d='M5.207 8.471l7.146 7.147-0.707 0.707-7.853-7.854 7.854-7.853 0.707 0.707-7.147 7.146z' /></svg>",shorthandCurrentMonth:!1,
showMonths:1,static:!1,time_24hr:!1,weekNumbers:!1,wrap:!1};"function"!==typeof Object.assign&&(Object.assign=function(c){if(!c)throw TypeError("Cannot convert undefined or null to object");for(var d=arguments.length,e=Array(1<d?d-1:0),g=1;g<d;g++)e[g-1]=arguments[g];d=function(d){d&&Object.keys(d).forEach(function(e){return c[e]=d[e]})};for(g=0;g<e.length;g++)d(e[g]);return c});"undefined"!==typeof HTMLElement&&(HTMLCollection.prototype.flatpickr=NodeList.prototype.flatpickr=function(c){return A(this,
c)},HTMLElement.prototype.flatpickr=function(c){return A([this],c)});var q=function(c,d){return c instanceof NodeList?A(c,d):"string"===typeof c?A(window.document.querySelectorAll(c),d):A([c],d)};q.defaultConfig=C;q.l10ns={en:Object.assign({},J),default:Object.assign({},J)};q.localize=function(c){q.l10ns.default=Object.assign({},q.l10ns.default,c)};q.setDefaults=function(c){q.defaultConfig=Object.assign({},q.defaultConfig,c)};q.parseDate=xa({});q.formatDate=va({});q.compareDates=r;"undefined"!==typeof jQuery&&
(jQuery.fn.flatpickr=function(c){return A(this,c)});Date.prototype.fp_incr=function(c){return new Date(this.getFullYear(),this.getMonth(),this.getDate()+("string"===typeof c?parseInt(c,10):c))};return q});
;

// ***************************
// js.compressed/flatpickr.js
// ***************************
vBulletin.precache("january february march april may june july august september october november december january_short february_short march_short april_short may_short june_short july_short august_short september_short october_short november_short december_short sunday monday tuesday wednesday thursday friday saturday sunday_short monday_short tuesday_short wednesday_short thursday_short friday_short saturday_short datepicker_am datepicker_clicktotoggle datepicker_pm datepicker_rangeseparator datepicker_scrolltoincrement datepicker_weekabbreviation datepicker_year".split(" "),
["pickerdateformat"]);
vBulletin.flatpickr=function(f){function r(a,b){var c="january february march april may june july august september october november december".split(" "),e="sunday monday tuesday wednesday thursday friday saturday".split(" "),d="long"==b?"":"_short",g=[];f.each("month"==a?c:e,function(k,h){g.push(vBulletin.phrase.get(h+d))});return g}function C(){var a=vBulletin.options.get("pickerdateformat"),b="",c="";pageData.user_lang_pickerdateformatoverride&&(a=pageData.user_lang_pickerdateformatoverride);var e=
"",d=null,g=null,k=null,h=null,t=!1,l=!1;f.each(a.split(""),function(n,p){var x=!!p.match(/[GHhiSsK]/),D=!!p.match(/[a-z]/i);"\\"!=e&&(x?("K"===p&&(t=!0),"h"===p&&(l=!0),null===d&&(d=n),g=n):D&&!x&&(null===k&&(k=n),h=n));e=p});if(g<k){var m=g+1;c=a.slice(0,m);b=a.slice(m)}else h<d?(m=h+1,b=a.slice(0,m),c=a.slice(m)):c=b=a;return{datetime:a,date:b,time:c,use24hour:!(t||l)}}function E(a,b){f.each("onChange onClose onOpen onMonthChange onYearChange onReady onValueUpdate onDayCreate".split(" "),function(c,
e){"function"==typeof b[e]&&(b[e]=[b[e]]);"function"==typeof a[e]&&(a[e]=[a[e]])});return f.extend(!0,{},a,b)}function u(a,b,c){b=b||{};var e=C(),d={time_24hr:e.use24hour,onReady:F,onOpen:G,onChange:H,onPreCalendarPosition:I,altInput:!0,locale:{weekdays:{shorthand:r("weekday","short"),longhand:r("weekday","long")},months:{shorthand:r("month","short"),longhand:r("month","long")},rangeSeparator:vBulletin.phrase.get("datepicker_rangeseparator"),weekAbbreviation:vBulletin.phrase.get("datepicker_weekabbreviation"),
scrollTitle:vBulletin.phrase.get("datepicker_scrolltoincrement"),toggleTitle:vBulletin.phrase.get("datepicker_clicktotoggle"),amPM:[vBulletin.phrase.get("datepicker_am"),vBulletin.phrase.get("datepicker_pm")],yearAriaLabel:vBulletin.phrase.get("datepicker_year"),firstDayOfWeek:(parseInt(pageData.user_startofweek,10)||1)-1}};vBulletin.isRtl()&&(d.nextArrow="<svg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 17 17'><g></g><path d='M5.207 8.471l7.146 7.147-0.707 0.707-7.853-7.854 7.854-7.853 0.707 0.707-7.147 7.146z' /></svg>",
d.prevArrow="<svg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 17 17'><g></g><path d='M13.207 8.472l-7.854 7.854-0.707-0.707 7.146-7.146-7.146-7.148 0.707-0.707 7.854 7.854z' /></svg>");switch(c){case "date":d.enableTime=!1;d.noCalendar=!1;d.dateFormat="m/d/Y";d.altFormat=e.date;break;case "time":d.enableTime=!0;d.noCalendar=!0;d.dateFormat="H:i";d.altFormat=e.time;break;case "datetime":d.enableTime=!0,d.noCalendar=!1,d.dateFormat="m/d/Y H:i",
d.altFormat=e.datetime}b=E(d,b);a.flatpickr(b);a.attr("data-vb-flatpicker-initialized",c);a.trigger("vb-flatpicker-initialized")}function y(a,b){u(a,b,"date")}function z(a,b){u(a,b,"time")}function A(a,b){u(a,b,"datetime")}function w(a){var b=a.find(".js-daterange--min[data-vb-flatpicker-initialized]"),c=a.find(".js-daterange--max[data-vb-flatpicker-initialized]");if(a.data("vb-daterange-initialized"))return!0;if(!b.length)return f(".js-daterange--min",a).one("vb-flatpicker-initialized",function(){w(a)}),
!0;if(!c.length)return f(".js-daterange--max",a).one("vb-flatpicker-initialized",function(){w(a)}),!0;if(b.length&&c.length){var e=vBulletin.flatpickr.getInstance(b),d=vBulletin.flatpickr.getInstance(c);if(!e||!d)return!0;b=e.config.onChange;c=function(){var h=!1;return function(t,l,m,n){h||(h=!0,l&&d.set("minDate",l),h=!1)}}();var g=d.config.onChange,k=function(){var h=!1;return function(t,l,m,n){h||(h=!0,l&&e.set("maxDate",l),h=!1)}}();b.push(c);e.set("onChange",b);g.push(k);d.set("onChange",g)}a.attr("data-vb-daterange-initialized",
1)}function B(){f(".js-datepicker").each(function(){y(f(this))});f(".js-timepicker").each(function(){z(f(this))});f(".js-datetimepicker").each(function(){A(f(this))});f(".js-daterange").each(function(){w(f(this))})}function q(a){try{return a.get(0)._flatpickr}catch(b){}return null}function v(a){if(vBulletin.isRtl()&&a&&a.calendarContainer&&a._positionElement){var b=a.calendarContainer,c=a._positionElement;a=b.offsetWidth;var e=c.offsetWidth;c=c.getBoundingClientRect();var d=window.document.body.offsetWidth-
c.right;window.pageXOffset+c.left+e<a||f(b).addClass("rightMost").css({left:"auto",right:d+"px"})}}function F(a,b,c,e){v(c)}function G(a,b,c,e){a=f(c.element);v(c);"1"==a.data("vb-flatpickr-disabled")&&c.close()}function H(a,b,c,e){f(c.element).change();v(c)}function I(a,b,c,e){setTimeout(function(){v(c);var d=f(c.calendarContainer),g=d.find(".flatpickr-days"),k=g.find(".dayContainer");g=g.outerWidth();k=k.outerWidth();d=d.closest(".flatpickr-calendar");g&&k&&g>k&&d.width(k-1)},0)}f(function(){B()});
return{initPickers:B,getInstance:q,disablePicker:function(a){var b=q(a);b&&(a.data("vb-flatpickr-disabled","1"),b.clear(),b.close())},enablePicker:function(a){q(a)&&a.data("vb-flatpickr-disabled","0")},initDatePicker:y,initTimePicker:z,initDateTimePicker:A,changePickerType:function(a,b){var c=q(a),e=a.val();c&&(c.destroy(),u(a,null,b),c=q(a),c.setDate(e))}}}(jQuery);
;

// ***************************
// js.compressed/sb_search.js
// ***************************
vBulletin.precache("error error_adding_search_tips_code_x invalid_json_string invalid_search_syntax invalid_server_response_please_try_again search_tag_cloud please_select_past_date please_select_valid_date_range content_type_Text content_type_Gallery content_type_Link content_type_Photo content_type_Poll content_type_PrivateMessage content_type_Video save_as_search_module saved_search_module_as_x search_module_already_exists search_module_not_found please_enter_search_module_name error_saving_search_module_x".split(" "),
[]);
(function(c){if(!vBulletin.pageHasSelectors([".search-fields-widget",".search-results-widget","#search-config-dialog"]))return!1;vBulletin.search=vBulletin.search||{};vBulletin.search.SearchControl=function(p){function m(a){if("undefined"==typeof a){a=x();if(!a)return!1;a=JSON.stringify(a)}f.val(a);b.find(".form_row.form-row-json").removeClass("h-hide-imp").nextAll().hide();r.toggle(!1);t.toggle(!0)}function y(a){if(!b.find(".searchAdvancedFields").is(":visible")){a=x();if(!a)return!1;if(!(a.author||a.channel||
a.keywords||a.tag||a.type||a.date||a.last_visit||a.my_following||a.eventstartdate))return vBulletin.warning("error","error_no_criteria"),!1;b.find(".searchFields_searchJSON").val(JSON.stringify(a))}}function x(){var a={};if(b.find(".searchSwitchToForm").is(":visible")){a=JSON.parse(b.find(".searchFields_searchJSON").val()||"{}");if(0==a.length){vBulletin.warning("error","invalid_json_string");return}return a}var e=b.find(".js-search-keywords");0<e.length&&0<c.trim(e.val()).length&&(a.keywords=c.trim(e.val()));
0<b.find(".searchFields_title_only:checked").length&&(a.title_only=1);0<b.find(".searchFields_starter_only:checked").length&&(a.starter_only=1);0<b.find(".searchFields_myFriends:checked").length?a.author="myFriends":0<b.find(".searchFields_iFollow:checked").length?a.author="iFollow":u&&(e=u.getLabels(),0<e.length&&(a.author=e));0<b.find(".tag-input").length&&(e=b.find(".tag-input").val(),0<e.length&&(e=e.split(","),0<e.length&&(a.tag=e)));if(0<b.find(".searchFields_last_visit:checked").length)a.date=
"lastVisit";else{e={};var h=b.find(".searchFields_from_days");if(0<h.length&&0<c.trim(h.val()).length)e.from=c.trim(h.val());else{var g=b.find(".searchFields_from_date");h=Date.now();if(0<g.length&&0<c.trim(g.val()).length){var d=Date.parse(g.val());if(0>=d)return vBulletin.warning("error","invalid_start_date"),!1;if(d>h)return vBulletin.warning("error","please_select_past_date"),!1;e.from=c.trim(g.val())}g=b.find(".searchFields_to_date");if(0<g.length&&0<c.trim(g.val()).length){var l=Date.parse(g.val());
if(0>=l)return vBulletin.warning("error","invalid_end_date"),!1;if(l>h)return vBulletin.warning("error","please_select_past_date"),!1;if(d&&d>l)return vBulletin.warning("error","please_select_valid_date_range"),!1;e.to=c.trim(g.val())}}c.isEmptyObject(e)||(a.date=e)}d=["eventstartdate","eventenddate"];e=d.length;for(h=0;h<e;h++){l=d[h];g=b.find('[name="searchFields['+l+'][from]"]');g=g.length&&g.val().trim()||"";l=b.find('[name="searchFields['+l+'][to]"]');l=l.length&&l.val().trim()||"";var v={};
g&&(v.from=g);l&&(v.to=l);c.isEmptyObject(v)||(a.eventstartdate=v)}d=b.find(".searchFields_featured");0<d.length&&d.prop("checked")&&(a.featured=1);d=b.find(".searchFields_my_following");0<d.length&&d.prop("checked")&&(a.my_following=1);var z=[];b.find(".searchFields_type:checked").each(function(E,q){z.push(c(q).val())});0<c(z).length&&(a.type=z);if(0<b.find(".searchFields_channel_param:checked").length)a.channel={param:"channelid"};else if(d=b.find("select.searchFields_channel"),0<d.length&&(d=d.val()))a.channel=
d;d=b.find(".searchFields_order_field");e=b.find(".searchFields_order_direction");0<d.length&&0<e.length&&""!=d.val()&&(a.sort=d.val(),""!=e.val()&&(a.sort={},a.sort[d.val()]=e.val()));d=b.find(".searchFields_view");0<d.length&&(a.view=d.val());d=b.find(".searchFields_exclude");0<d.length&&0<c.trim(d.val()).length&&(a.exclude=c.trim(d.val()).split(","));d=b.find(".searchFields_exclude_type");0<d.length&&0<c.trim(d.val()).length&&(a.exclude_type=c.trim(d.val()).split(","));0<b.find('input[name="searchFields[approved_only]"]:checked').length&&
(a.approved_only=1);d=b.find('input[name="searchFields[has_answer]"]:checked');0<d.length&&(a.has_answer=d[0].value);d=b.find('input[name="searchFields[current_user_only]"]:checked');0<d.length&&(a.current_user_only=d[0].value);return a}function A(a,e,h,g){g=a;if("string"==typeof a)try{if(a=JSON.parse(a||"{}"),0==a.length)return vBulletin.warning("error","invalid_json_string"),!1}catch(k){return vBulletin.warning("error","invalid_json_string"),!1}else g=JSON.stringify(a);var d=b.find(".js-search-keywords");
0<d.length&&(d.val(a.keywords||""),delete a.keywords);c.each({".searchFields_myFriends":"myFriends",".searchFields_iFollow":"iFollow"},function(k,n){k=b.find(k);0<k.length&&((n=a.author&&a.author==n)&&delete a.author,k.prop("checked",n))});0<b.find(".searchFields_author").length&&(d=!1,c.isArray(a.author)?d=a.author:a.exactname&&(d=[a.author]),d&&(u.setElements(d),delete a.author,delete a.exactname));d=b.find(".tag-input");if(0<d.length){var l=a.tag||[];Array.isArray(l)||(l=[l]);d.val(l);B.setTags(l);
b.find(".tag-list span").html(l.join(", "));delete a.tag}var v=b.find(".searchFields_last_visit"),z=a.date&&a.date&&"lastVisit"==a.date;0<v.length&&(v.prop("checked",z),z&&delete a.date);c.each({".searchFields_from_date":"from",".searchFields_to_date":"to",".searchFields_from_days":"from"},function(k,n){k=b.find(k);if(0<k.length&&(vBulletin.flatpickr&&vBulletin.flatpickr.getInstance(k)&&(v.is(":checked")?vBulletin.flatpickr.disablePicker(k):vBulletin.flatpickr.enablePicker(k)),!z)){var C="";a.date&&
a.date[n]&&(C=a.date[n],delete a.date[n]);k.val(C)}});c.isEmptyObject(a.date)&&delete a.date;d=["eventstartdate","eventenddate"];l=d.length;for(var E=0;E<l;E++){var q=d[E],G=b.find('[name="searchFields['+q+'][from]"]'),H=b.find('[name="searchFields['+q+'][to]"]');a[q]&&(a[q].to&&H.length&&H.val(a[q].to),a[q].from&&G.length&&G.val(a[q].from));delete a[q]}c.each({".searchFields_featured":"featured",".searchFields_my_following":"my_following",".searchFields_starter_only":"starter_only",".searchFields_title_only":"title_only",
'input[name="searchFields[approved_only]"]':"approved_only"},function(k,n){k=b.find(k);0<k.length&&(k.prop("checked",a[n]?!0:!1),delete a[n])});c.each({'input[name="searchFields[has_answer]"]':"has_answer",'input[name="searchFields[current_user_only]"]':"current_user_only"},function(k,n){k=b.find(k);let C=a[n];k.each((K,D)=>{null==C?D.checked=null!=D.attributes.checked:D.value==C?(delete a[n],D.checked=!0):D.checked=!1})});d=b.find(".searchFields_type_container");if(0<d.length){if(e){var I=d.find(".field-desc");
I.prevAll().remove();c.each(e,function(k,n){"vBForum_PrivateMessage"!=k&&I.before(c('<label><input type="checkbox" name="searchFields[type][]" class="searchFields_type" value="'+k+'" /><span>'+vBulletin.phrase.get("content_type_"+n["class"])+"</span></label>"))})}b.find(".searchFields_type").val(a.type||[]);delete a.type;delete a.exclude_type}e=b.find(".searchFields_channel");0<e.length&&(h&&e.selectBox("options",w(h)),a.channel&&e.selectBox("value",c.makeArray(a.channel)));delete a.channel;h=b.find("select.searchFields_order_direction");
e=b.find("select.searchFields_order_field");var F="",J="";a.sort&&("string"==typeof a.sort?F=a.sort:"object"==typeof a.sort&&c.each(a.sort,function(k,n){F=k;J=n}),delete a.sort);0<h.length&&h.selectBox("value",J);0<e.length&&e.selectBox("value",F);h=b.find("select.searchFields_view");0<h.length&&(h.selectBox("value",a.view||""),delete a.view);if(c.isEmptyObject(a))f.val(g);else return m(g),!1;return!0}function w(a){var e="";c.each(a,function(h,g){e+=c("<option></option>").val(h).html(str_repeat("&nbsp;",
3*g.depth).concat(g.htmltitle));g.channels&&(e+=addChannels(g.channels))});return e}var b=c(p),B=!1,u=!1,r=b.find(".searchSwitchToAdvanced"),t=b.find(".searchSwitchToForm"),f=b.find(".searchFields_searchJSON");this.load=function(){return x()};this.set=function(a,e,h,g){return A(a,e,h,g)};(function(){var a=r.is(":visible"),e=t.is(":visible");a==e&&(r.toggle(!0),t.toggle(!1),b.find(".form_row.form-row-json").addClass("h-hide-imp").nextAll().show());r.off("click").on("click",()=>{m()});t.off("click").on("click",
()=>{A(b.find(".searchFields_searchJSON").val())&&(r.toggle(!0),t.toggle(!1),b.find(".form_row.form-row-json").addClass("h-hide-imp").nextAll().show())});var h=b.find(".advSearchForm");0<h.length&&h.submit(y);B=new vBulletin.tagEditor.instance("{0}-searchFields_tag".format(p.replace(/#/g,".")),!0);a=b.find(".searchFields_author");0<a.length&&(u=new vBulletin_Autocomplete(a,{apiClass:"user",containerClass:"entry-field h-clearfix"}));b.find(".js-search-keywords").off("keydown").on("keydown",function(g){13==
g.which&&0<h.length&&h.submit()});b.find(".searchFields_last_visit").off("click").on("click",function(g){b.find(".datefield").prop("disabled",c(this).prop("checked"));c(this).is(":checked")?(vBulletin.flatpickr.disablePicker(b.find(".searchFields_from_date")),vBulletin.flatpickr.disablePicker(b.find(".searchFields_to_date"))):(vBulletin.flatpickr.enablePicker(b.find(".searchFields_from_date")),vBulletin.flatpickr.enablePicker(b.find(".searchFields_to_date")))});b.find(".searchFields_channel_param").off("click").on("click",
function(g){c(this).prop("checked")?b.find(".searchFields_channel").selectBox("disable"):b.find(".searchFields_channel").selectBox("enable")});b.find(".search-tips").off("click").on("click",function(g){c(".search-tips-dialog").first().dialog({title:vBulletin.phrase.get("search_tips"),autoOpen:!1,modal:!0,resizable:!1,closeOnEscape:!0,showCloseButton:!0,width:500,dialogClass:"dialog-container search-tips-dialog-container dialog-box"}).dialog("open");g.stopPropagation();return!1});b.find(".searchFields_channel").selectBox();
b.find(".searchFields_order_field").selectBox();b.find(".searchFields_order_direction").selectBox();b.find(".searchFields_view").selectBox()})()};c(function(){var p=c("#advancedSearchFields"),m=c(".search-results-widget");vBulletin.truncatePostContent(m);if(0<p.length){var y=p.find(".searchFields_from_date"),x=p.find(".searchFields_to_date"),A=new Date;if(y.data("vb-flatpicker-initialized"))vBulletin.flatpickr.getInstance(y).set("maxDate",A);else y.one("vb-flatpicker-initialized",function(){vBulletin.flatpickr.getInstance(c(this)).set("maxDate",
A)});if(x.data("vb-flatpicker-initialized"))vBulletin.flatpickr.getInstance(x).set("maxDate",A);else x.one("vb-flatpicker-initialized",function(){vBulletin.flatpickr.getInstance(c(this)).set("maxDate",A)});y=new vBulletin.search.SearchControl("#advancedSearchFields");searchJSONStr=p.find(".searchFields_searchJSON").val();0<searchJSONStr.length&&y.set(searchJSONStr,!1,!1,!0)}var w=c(".sort-controls",m);0<w.length&&(w.find(".searchFields_order_field").selectBox().change(function(){var f=b.find(".searchResults_searchJSON").val()||
"{}";f=JSON.parse(f);f.sort={};f.sort[c(this).val()]=w.find(".searchFields_order_direction").selectBox().val();b.find(".searchResults_searchJSON").val(JSON.stringify(f));c(".resultSearchForm").submit()}),w.find(".searchFields_order_direction").selectBox().change(function(){var f=b.find(".searchResults_searchJSON").val()||"{}";f=JSON.parse(f);f.sort={};f.sort[w.find(".searchFields_order_field").selectBox().val()]=c(this).val();b.find(".searchResults_searchJSON").val(JSON.stringify(f));c(".resultSearchForm").submit()}),
w.removeClass("h-invisible"));var b=c(".search-controls",m);if(0<b.length){var B=!1,u=!1;p=b.find(".searchFields_author");0<p.length&&(B=new vBulletin_Autocomplete(p,{apiClass:"user",containerClass:"entry-field h-clearfix"}),b.find(".search-controls-members .removable-element .element-text").each(function(f,a){B.addElement(c(a).html())}));0<b.find(".searchResultTagEditor").length&&(u=new vBulletin.tagEditor.instance(".search-controls .searchResultTagEditor",!0),b.find(".search-controls-tags .removable-element .element-text").each(function(f,
a){u.addTag(c(a).html())}));b.find("button").off("click").on("click",function(f){f=b.find(".searchResults_searchJSON").val()||"{}";f=JSON.parse(f);switch(c(this).val()){case "keywords":f.keywords=b.find(".js-search-keywords").val();f.title_only=b.find(".searchFields_title_only").is(":checked");break;case "author":f.author=B.getLabels();f.starter_only=b.find(".searchFields_starter_only").is(":checked");break;case "tags":f.tag=u.getTags();break;default:return}b.find(".searchResults_searchJSON").val(JSON.stringify(f));
c(".resultSearchForm").submit()});b.find(".removable-element .element-x").off("click").on("click",function(f){f=b.find(".searchResults_searchJSON").val()||"{}";f=JSON.parse(f);var a=c(this).parents(".search-control-popup");if(a.hasClass("search-controls-members")){c(this).parents(".removable-element").remove();var e=[];a.find(".removable-element .element-text").each(function(g,d){e.push(c(d).html())});f.author=e;0==e.length&&delete f.author}if(a.hasClass("search-controls-tags")){c(this).parents(".removable-element").remove();
var h=[];a.find(".removable-element .element-text").each(function(g,d){h.push(c(d).html())});f.tag=h;0==h.length&&delete f.tag}b.find(".searchResults_searchJSON").val(JSON.stringify(f));c(".resultSearchForm").submit()})}vBulletin.inlinemod&&"function"==typeof vBulletin.inlinemod.init&&vBulletin.inlinemod.init(m);vBulletin.conversation.initContentEvents(m);m.off("click",".js-comment-entry__post").on("click",".js-comment-entry__post",function(f){vBulletin.conversation.postComment.apply(this,[f,function(a){location.reload()}])});
p="undefined"!=typeof m.data("keywords")?m.data("keywords").toString():"";if(0<p.length){var r;c(p.split(" ")).each(function(f,a){r=a.toUpperCase();"OR"!=r&&"AND"!=r&&(c(".post-header",m).highlight(a),c(".searchFields_title_only",m).prop("checked")||c(".post-content",m).highlight(a))})}if(1==m.length){var t=c(".pagenav-form",m).attr("action");t&&c(".js-pagenav .js-pagenav-button",m).each(function(){var f=c(this),a=f.prop("href");(!a||pageData.baseurl&&a==pageData.baseurl)&&f.prop("href",t+"&p="+parseInt(f.data("page"),
10))})}})})(jQuery);
;

