WP ULike - Version 4.6.1

Version Description

  • Updated: Options panel framework.
  • Fixed: BuddyPress notification error.
Download this release

Release Info

Developer alimir
Plugin Icon 128x128 WP ULike
Version 4.6.1
Comparing to
See all releases

Code changes from version 4.6.0 to 4.6.1

admin/assets/js/plugins.js CHANGED
@@ -1,4 +1,4 @@
1
- /*! WP ULike - v4.6.0
2
  * https://wpulike.com
3
  * TechnoWich 2022;
4
  */
1
+ /*! WP ULike - v4.6.1
2
  * https://wpulike.com
3
  * TechnoWich 2022;
4
  */
admin/settings/assets/js/gutenberg.js CHANGED
@@ -20,7 +20,7 @@
20
  var RawHTML = element.RawHTML;
21
  var Button = components.Button;
22
 
23
- registerBlockType('ulf-gutenberg-block/block-'+block.hash, {
24
  title: block.gutenberg.title,
25
  description: block.gutenberg.description,
26
  icon: block.gutenberg.icon || 'screenoptions',
@@ -43,7 +43,7 @@
43
 
44
  createElement(Button, {
45
  'data-modal-id': block.modal_id,
46
- 'data-gutenberg-id': block.hash,
47
  className: 'is-secondary ulf-shortcode-button',
48
  onClick: function () {
49
  window.ulf_gutenberg_props = props;
20
  var RawHTML = element.RawHTML;
21
  var Button = components.Button;
22
 
23
+ registerBlockType(block.name, {
24
  title: block.gutenberg.title,
25
  description: block.gutenberg.description,
26
  icon: block.gutenberg.icon || 'screenoptions',
43
 
44
  createElement(Button, {
45
  'data-modal-id': block.modal_id,
46
+ 'data-gutenberg-id': block.name,
47
  className: 'is-secondary ulf-shortcode-button',
48
  onClick: function () {
49
  window.ulf_gutenberg_props = props;
admin/settings/assets/js/main.js CHANGED
@@ -2613,14 +2613,14 @@
2613
  }
2614
 
2615
  if ( sub_shortcode_value !== '' ) {
2616
- shortcode += ' ' + sub_shortcode_tag.replace('-', '_') + '="' + sub_shortcode_value.toString() + '"';
2617
  }
2618
 
2619
  });
2620
 
2621
  } else {
2622
 
2623
- shortcode += ' ' + shortcode_tag.replace('-', '_') + '="' + shortcode_value.toString() + '"';
2624
 
2625
  }
2626
 
2613
  }
2614
 
2615
  if ( sub_shortcode_value !== '' ) {
2616
+ shortcode += ' ' + sub_shortcode_tag + '="' + sub_shortcode_value.toString() + '"';
2617
  }
2618
 
2619
  });
2620
 
2621
  } else {
2622
 
2623
+ shortcode += ' ' + shortcode_tag + '="' + shortcode_value.toString() + '"';
2624
 
2625
  }
2626
 
admin/settings/assets/js/main.min.js CHANGED
@@ -1,3 +1,3 @@
1
- /* Codestar Framework | A Simple and Lightweight WordPress Option Framework - v2.2.7*/
2
 
3
- !function(I,_,b,y){"use strict";var T=T||{};T.funcs={},T.vars={onloaded:!1,$body:I("body"),$window:I(_),$document:I(b),$form_warning:null,is_confirm:!1,form_modified:!1,code_themes:[],is_rtl:I("body").hasClass("rtl")},T.helper={uid:function(e){return(e||"")+Math.random().toString(36).substr(2,9)},preg_quote:function(e){return(e+"").replace(/(\[|\])/g,"\\$1")},name_nested_replace:function(e,t){var n=new RegExp(T.helper.preg_quote(t+"[\\d+]"),"g");e.find(":radio").each(function(){(this.checked||this.orginal_checked)&&(this.orginal_checked=!0)}),e.each(function(e){I(this).find(":input").each(function(){this.name=this.name.replace(n,t+"["+e+"]"),this.orginal_checked&&(this.checked=!0)})})},debounce:function(i,a,s){var c;return function(){var e=this,t=arguments,n=s&&!c;clearTimeout(c),c=setTimeout(function(){c=null,s||i.apply(e,t)},a),n&&i.apply(e,t)}}},I.fn.ulf_clone=function(){for(var e=I.fn.clone.apply(this,arguments),t=this.find("select").add(this.filter("select")),n=e.find("select").add(e.filter("select")),i=0;i<t.length;++i)for(var a=0;a<t[i].options.length;++a)!0===t[i].options[a].selected&&(n[i].options[a].selected=!0);return this.find(":radio").each(function(){this.orginal_checked=this.checked}),e},I.fn.ulf_expand_all=function(){return this.each(function(){I(this).on("click",function(e){e.preventDefault(),I(".ulf-wrapper").toggleClass("ulf-show-all"),I(".ulf-section").ulf_reload_script(),I(this).find(".fa").toggleClass("fa-indent").toggleClass("fa-outdent")})})},I.fn.ulf_nav_options=function(){return this.each(function(){var a,e=I(this),t=I(_),s=I("#wpwrap"),c=e.find("a");t.on("hashchange ulf.hashchange",function(){var e=_.location.hash.replace("#tab=",""),t=e||c.first().attr("href").replace("#tab=",""),n=I('[data-tab-id="'+t+'"]');if(n.length){n.closest(".ulf-tab-item").addClass("ulf-tab-expanded").siblings().removeClass("ulf-tab-expanded"),n.next().is("ul")&&(t=(n=n.next().find("li").first().find("a")).data("tab-id")),c.removeClass("ulf-active"),n.addClass("ulf-active"),a&&a.addClass("hidden");var i=I('[data-section-id="'+t+'"]');i.removeClass("hidden"),i.ulf_reload_script(),I(".ulf-section-id").val(i.index()+1),a=i,s.hasClass("wp-responsive-open")&&(I("html, body").animate({scrollTop:i.offset().top-50},200),s.removeClass("wp-responsive-open"))}}).trigger("ulf.hashchange")})},I.fn.ulf_nav_metabox=function(){return this.each(function(){var a,e=I(this),s=e.find("a"),c=e.parent().find(".ulf-section");s.each(function(i){I(this).on("click",function(e){e.preventDefault();var t=I(this);s.removeClass("ulf-active"),t.addClass("ulf-active"),a!==y&&a.addClass("hidden");var n=c.eq(i);n.removeClass("hidden"),n.ulf_reload_script(),a=n})}),s.first().trigger("click")})},I.fn.ulf_page_templates=function(){this.length&&I(b).on("change",".editor-page-attributes__template select, #page_template",function(){var e=I(this).val()||"default";I(".ulf-page-templates").removeClass("ulf-metabox-show").addClass("ulf-metabox-hide"),I(".ulf-page-"+e.toLowerCase().replace(/[^a-zA-Z0-9]+/g,"-")).removeClass("ulf-metabox-hide").addClass("ulf-metabox-show")})},I.fn.ulf_post_formats=function(){this.length&&I(b).on("change",'.editor-post-format select, #formatdiv input[name="post_format"]',function(){var e=I(this).val()||"default";e="0"===e?"default":e,I(".ulf-post-formats").removeClass("ulf-metabox-show").addClass("ulf-metabox-hide"),I(".ulf-post-format-"+e).removeClass("ulf-metabox-hide").addClass("ulf-metabox-show")})},I.fn.ulf_search=function(){return this.each(function(){I(this).find("input").on("change keyup",function(){var n=I(this).val(),e=I(".ulf-wrapper"),t=e.find(".ulf-section").find("> .ulf-field:not(.ulf-depend-on)"),i=t.find("> .ulf-title, .ulf-search-tags");3<n.length?(t.addClass("ulf-metabox-hide"),e.addClass("ulf-search-all"),i.each(function(){var e=I(this);if(e.text().match(new RegExp(".*?"+n+".*?","i"))){var t=e.closest(".ulf-field");t.removeClass("ulf-metabox-hide"),t.parent().ulf_reload_script()}})):(t.removeClass("ulf-metabox-hide"),e.removeClass("ulf-search-all"))})})},I.fn.ulf_sticky=function(){return this.each(function(){var i=I(this),a=I(_),s=i.find(".ulf-header-inner"),c=parseInt(s.css("padding-left"))+parseInt(s.css("padding-right")),r=0,o=!1,e=function(){o||requestAnimationFrame(function(){var e,t,n;e=i.offset().top,t=Math.max(32,e-r),n=a.innerWidth(),t<=32&&782<n?(s.css({width:i.outerWidth()-c}),i.css({height:i.outerHeight()}).addClass("ulf-sticky")):(s.removeAttr("style"),i.removeAttr("style").removeClass("ulf-sticky")),o=!1}),o=!0},t=function(){r=a.scrollTop(),e()};a.on("scroll resize",t),t()})},I.fn.ulf_dependency=function(){return this.each(function(){var e=I(this),t=e.children("[data-controller]");if(t.length){var n=I.ulf_deps.createRuleset(),i=I.ulf_deps.createRuleset(),f=[],l=[];t.each(function(){var a=I(this),e=a.data("controller").split("|"),s=a.data("condition").split("|"),c=a.data("value").toString().split("|"),r=!!a.data("depend-global"),o=r?i:n;I.each(e,function(e,t){var n=c[e]||"",i=s[e]||s[0];(o=o.createRule('[data-depend-id="'+t+'"]',i,n)).include(a),r?l.push(t):f.push(t)})}),f.length&&I.ulf_deps.enable(e,n,f),l.length&&I.ulf_deps.enable(T.vars.$body,i,l)}})},I.fn.ulf_field_accordion=function(){return this.each(function(){I(this).find(".ulf-accordion-title").on("click",function(){var e=I(this),t=e.find(".ulf-accordion-icon"),n=e.next();t.hasClass("fa-angle-right")?t.removeClass("fa-angle-right").addClass("fa-angle-down"):t.removeClass("fa-angle-down").addClass("fa-angle-right"),n.data("opened")||(n.ulf_reload_script(),n.data("opened",!0)),n.toggleClass("ulf-accordion-open")})})},I.fn.ulf_field_backup=function(){return this.each(function(){if(_.wp.customize!==y){var t=this,n=I(this),i=(I("body"),n.find(".ulf-import")),a=n.find(".ulf-reset");t.notificationOverlay=function(){wp.customize.notifications&&wp.customize.OverlayNotification&&(wp.customize.state("saved").get()||(wp.customize.state("changesetStatus").set("trash"),wp.customize.each(function(e){e._dirty=!1}),wp.customize.state("saved").set(!0)),wp.customize.notifications.add(new wp.customize.OverlayNotification("ulf_field_backup_notification",{type:"default",message:"&nbsp;",loading:!0})))},a.on("click",function(e){e.preventDefault(),T.vars.is_confirm&&(t.notificationOverlay(),_.wp.ajax.post("ulf-reset",{unique:a.data("unique"),nonce:a.data("nonce")}).done(function(e){_.location.reload(!0)}).fail(function(e){alert(e.error),wp.customize.notifications.remove("ulf_field_backup_notification")}))}),i.on("click",function(e){e.preventDefault(),T.vars.is_confirm&&(t.notificationOverlay(),_.wp.ajax.post("ulf-import",{unique:i.data("unique"),nonce:i.data("nonce"),data:n.find(".ulf-import-data").val()}).done(function(e){_.location.reload(!0)}).fail(function(e){alert(e.error),wp.customize.notifications.remove("ulf_field_backup_notification")}))})}})},I.fn.ulf_field_background=function(){return this.each(function(){I(this).find(".ulf--background-image").ulf_reload_script()})},I.fn.ulf_field_code_editor=function(){return this.each(function(){if("function"==typeof CodeMirror){var t=I(this),i=t.find("textarea"),e=t.find(".CodeMirror"),a=i.data("editor");e.length&&e.remove();var s=setInterval(function(){if(t.is(":visible")){var n=CodeMirror.fromTextArea(i[0],a);if("default"!==a.theme&&-1===T.vars.code_themes.indexOf(a.theme)){var e=I("<link>");I("#ulf-codemirror-css").after(e),e.attr({rel:"stylesheet",id:"ulf-codemirror-"+a.theme+"-css",href:a.cdnURL+"/theme/"+a.theme+".min.css",type:"text/css",media:"all"}),T.vars.code_themes.push(a.theme)}CodeMirror.modeURL=a.cdnURL+"/mode/%N/%N.min.js",CodeMirror.autoLoadMode(n,a.mode),n.on("change",function(e,t){i.val(n.getValue()).trigger("change")}),clearInterval(s)}})}})},I.fn.ulf_field_date=function(){return this.each(function(){var e=I(this),i=e.find("input"),a=e.find(".ulf-date-settings").data("settings"),t={showAnim:"",beforeShow:function(e,t){I(t.dpDiv).addClass("ulf-datepicker-wrapper")},onClose:function(e,t){I(t.dpDiv).removeClass("ulf-datepicker-wrapper")}};a=I.extend({},a,t),2===i.length&&(a=I.extend({},a,{onSelect:function(e){I(this),i.first();var t=i.first().attr("id")===I(this).attr("id")?"minDate":"maxDate",n=I.datepicker.parseDate(a.dateFormat,e);i.not(this).datepicker("option",t,n)}})),i.each(function(){var e=I(this);e.hasClass("hasDatepicker")&&e.removeAttr("id").removeClass("hasDatepicker"),e.datepicker(a)})})},I.fn.ulf_field_datetime=function(){return this.each(function(){var e=I(this),i=e.find("input"),t=e.find(".ulf-datetime-settings").data("settings");t=I.extend({},t,{onReady:function(e,t,n){I(n.calendarContainer).addClass("ulf-flatpickr")}}),2===i.length&&(t=I.extend({},t,{onChange:function(e,t,n){"from"===I(n.element).data("type")?i.last().get(0)._flatpickr.set("minDate",e[0]):i.first().get(0)._flatpickr.set("maxDate",e[0])}})),i.each(function(){I(this).flatpickr(t)})})},I.fn.ulf_field_fieldset=function(){return this.each(function(){I(this).find(".ulf-fieldset-content").ulf_reload_script()})},I.fn.ulf_field_gallery=function(){return this.each(function(){var s,e=I(this),c=e.find(".ulf-edit-gallery"),r=e.find(".ulf-clear-gallery"),o=e.find("ul"),f=e.find("input");e.find("img");e.on("click",".ulf-button, .ulf-edit-gallery",function(e){var t=I(this),n=f.val(),i=t.hasClass("ulf-edit-gallery")?"edit":"add",a="add"!==i||n.length?"gallery-edit":"gallery";e.preventDefault(),void 0!==_.wp&&_.wp.media&&_.wp.media.gallery&&("gallery"===a?(s=_.wp.media({library:{type:"image"},frame:"post",state:"gallery",multiple:!0})).open():(s=_.wp.media.gallery.edit('[gallery ids="'+n+'"]'),"add"===i&&s.setState("gallery-library")),s.on("update",function(e){o.empty();var t=e.models.map(function(e){var t=e.toJSON(),n=t.sizes&&t.sizes.thumbnail&&t.sizes.thumbnail.url?t.sizes.thumbnail.url:t.url;return o.append('<li><img src="'+n+'"></li>'),t.id});f.val(t.join(",")).trigger("change"),r.removeClass("hidden"),c.removeClass("hidden")}))}),r.on("click",function(e){e.preventDefault(),o.empty(),f.val("").trigger("change"),r.addClass("hidden"),c.addClass("hidden")})})},I.fn.ulf_field_group=function(){return this.each(function(){var e=I(this),t=e.children(".ulf-fieldset"),n=t.length?t:e,r=n.children(".ulf-cloneable-wrapper"),i=n.children(".ulf-cloneable-hidden"),o=n.children(".ulf-cloneable-max"),f=n.children(".ulf-cloneable-min"),c=r.data("title-by"),l=r.data("title-by-prefix"),d=r.data("field-id"),h=Boolean(Number(r.data("title-number"))),p=parseInt(r.data("max")),a=parseInt(r.data("min"));r.hasClass("ui-accordion")&&r.find(".ui-accordion-header-icon").remove();var u=function(e){e.find(".ulf-cloneable-title-number").each(function(e){I(this).html(I(this).closest(".ulf-cloneable-item").index()+1+".")})};r.accordion({header:"> .ulf-cloneable-item > .ulf-cloneable-title",collapsible:!0,active:!1,animate:!1,heightStyle:"content",icons:{header:"ulf-cloneable-header-icon fas fa-angle-right",activeHeader:"ulf-cloneable-header-icon fas fa-angle-down"},activate:function(e,t){var n=t.newPanel,i=t.newHeader;if(n.length&&!n.data("opened")){var a=i.find(".ulf-cloneable-value"),s=[];I.each(c,function(e,t){s.push(n.find('[data-depend-id="'+t+'"]'))}),I.each(s,function(e,t){t.on("change keyup ulf.keyup",function(){var i=[];I.each(s,function(e,t){var n=t.val();n&&i.push(n)}),i.length&&a.text(i.join(l))}).trigger("ulf.keyup")}),n.ulf_reload_script(),n.data("opened",!0),n.data("retry",!1)}else n.data("retry")&&(n.ulf_reload_script_retry(),n.data("retry",!1))}}),r.sortable({axis:"y",handle:".ulf-cloneable-title,.ulf-cloneable-sort",helper:"original",cursor:"move",placeholder:"widget-placeholder",start:function(e,t){r.accordion({active:!1}),r.sortable("refreshPositions"),t.item.children(".ulf-cloneable-content").data("retry",!0)},update:function(e,t){T.helper.name_nested_replace(r.children(".ulf-cloneable-item"),d),r.ulf_customizer_refresh(),h&&u(r)}}),n.children(".ulf-cloneable-add").on("click",function(e){e.preventDefault();var t=r.children(".ulf-cloneable-item").length;if(f.hide(),p&&p<t+1)o.show();else{var n=i.ulf_clone(!0);n.removeClass("ulf-cloneable-hidden"),n.find(':input[name!="_pseudo"]').each(function(){this.name=this.name.replace("___","").replace(d+"[0]",d+"["+t+"]")}),r.append(n),r.accordion("refresh"),r.accordion({active:t}),r.ulf_customizer_refresh(),r.ulf_customizer_listen({closest:!0}),h&&u(r)}});var s=function(e){e.preventDefault();var t=r.children(".ulf-cloneable-item").length;if(f.hide(),p&&p<t+1)o.show();else{var n=I(this).parent().parent(),i=n.children(".ulf-cloneable-helper").ulf_clone(!0),a=n.children(".ulf-cloneable-title").ulf_clone(),s=n.children(".ulf-cloneable-content").ulf_clone(),c=I('<div class="ulf-cloneable-item" />');c.append(i),c.append(a),c.append(s),r.children().eq(n.index()).after(c),T.helper.name_nested_replace(r.children(".ulf-cloneable-item"),d),r.accordion("refresh"),r.ulf_customizer_refresh(),r.ulf_customizer_listen({closest:!0}),h&&u(r)}};r.children(".ulf-cloneable-item").children(".ulf-cloneable-helper").on("click",".ulf-cloneable-clone",s),n.children(".ulf-cloneable-hidden").children(".ulf-cloneable-helper").on("click",".ulf-cloneable-clone",s);var v=function(e){e.preventDefault();var t=r.children(".ulf-cloneable-item").length;o.hide(),f.hide(),a&&t-1<a?f.show():(I(this).closest(".ulf-cloneable-item").remove(),T.helper.name_nested_replace(r.children(".ulf-cloneable-item"),d),r.ulf_customizer_refresh(),h&&u(r))};r.children(".ulf-cloneable-item").children(".ulf-cloneable-helper").on("click",".ulf-cloneable-remove",v),n.children(".ulf-cloneable-hidden").children(".ulf-cloneable-helper").on("click",".ulf-cloneable-remove",v)})},I.fn.ulf_field_icon=function(){return this.each(function(){var n=I(this);n.on("click",".ulf-icon-add",function(e){e.preventDefault();var t=I(this),i=I("#ulf-modal-icon");i.removeClass("hidden"),T.vars.$icon_target=n,T.vars.icon_modal_loaded||(i.find(".ulf-modal-loading").show(),_.wp.ajax.post("ulf-get-icons",{nonce:t.data("nonce")}).done(function(e){i.find(".ulf-modal-loading").hide(),T.vars.icon_modal_loaded=!0;var n=i.find(".ulf-modal-load").html(e.content);n.on("click","i",function(e){e.preventDefault();var t=I(this).attr("title");T.vars.$icon_target.find(".ulf-icon-preview i").removeAttr("class").addClass(t),T.vars.$icon_target.find(".ulf-icon-preview").removeClass("hidden"),T.vars.$icon_target.find(".ulf-icon-remove").removeClass("hidden"),T.vars.$icon_target.find("input").val(t).trigger("change"),i.addClass("hidden")}),i.on("change keyup",".ulf-icon-search",function(){var t=I(this).val();n.find("i").each(function(){var e=I(this);e.attr("title").search(new RegExp(t,"i"))<0?e.hide():e.show()})}),i.on("click",".ulf-modal-close, .ulf-modal-overlay",function(){i.addClass("hidden")})}).fail(function(e){i.find(".ulf-modal-loading").hide(),i.find(".ulf-modal-load").html(e.error),i.on("click",function(){i.addClass("hidden")})}))}),n.on("click",".ulf-icon-remove",function(e){e.preventDefault(),n.find(".ulf-icon-preview").addClass("hidden"),n.find("input").val("").trigger("change"),I(this).addClass("hidden")})})},I.fn.ulf_field_map=function(){return this.each(function(){if("undefined"!=typeof L){var e=I(this),t=e.find(".ulf--map-osm"),n=e.find(".ulf--map-search input"),i=e.find(".ulf--latitude"),a=e.find(".ulf--longitude"),s=e.find(".ulf--zoom"),c=t.data("map"),r=L.map(t.get(0),c);L.tileLayer("https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",{attribution:'&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'}).addTo(r);var o=L.marker(c.center,{draggable:!0}).addTo(r),f=function(e){i.val(e.lat),a.val(e.lng),s.val(r.getZoom())};r.on("click",function(e){o.setLatLng(e.latlng),f(e.latlng)}),r.on("zoom",function(){f(o.getLatLng())}),o.on("drag",function(){f(o.getLatLng())}),n.length||(n=I('[data-depend-id="'+e.find(".ulf--address-field").data("address-field")+'"]'));var l={};n.autocomplete({source:function(e,n){var i=e.term;i in l?n(l[i]):I.get("https://nominatim.openstreetmap.org/search",{format:"json",q:i},function(e){var t;t=e.length?e.map(function(e){return{value:e.display_name,label:e.display_name,lat:e.lat,lon:e.lon}},"json"):[{value:"no-data",label:"No Results."}],l[i]=t,n(t)})},select:function(e,t){if("no-data"===t.item.value)return!1;var n=L.latLng(t.item.lat,t.item.lon);r.panTo(n),o.setLatLng(n),f(n)},create:function(e,t){I(this).autocomplete("widget").addClass("ulf-map-ui-autocomplate")}});var d=function(){var e=L.latLng(i.val(),a.val());r.panTo(e),o.setLatLng(e)};i.on("change",d),a.on("change",d)}})},I.fn.ulf_field_link=function(){return this.each(function(){var a=I(this),e=a.find(".ulf--link"),s=a.find(".ulf--add"),c=a.find(".ulf--edit"),r=a.find(".ulf--remove"),o=a.find(".ulf--result"),t=T.helper.uid("ulf-wplink-textarea-");s.on("click",function(e){e.preventDefault(),_.wpLink.open(t)}),c.on("click",function(e){e.preventDefault(),s.trigger("click"),I("#wp-link-url").val(a.find(".ulf--url").val()),I("#wp-link-text").val(a.find(".ulf--text").val()),I("#wp-link-target").prop("checked","_blank"===a.find(".ulf--target").val())}),r.on("click",function(e){e.preventDefault(),a.find(".ulf--url").val("").trigger("change"),a.find(".ulf--text").val(""),a.find(".ulf--target").val(""),s.removeClass("hidden"),c.addClass("hidden"),r.addClass("hidden"),o.parent().addClass("hidden")}),e.attr("id",t).on("change",function(){var e=_.wpLink.getAttrs(),t=e.href,n=I("#wp-link-text").val(),i=e.target?e.target:"";a.find(".ulf--url").val(t).trigger("change"),a.find(".ulf--text").val(n),a.find(".ulf--target").val(i),o.html('{url:"'+t+'", text:"'+n+'", target:"'+i+'"}'),s.addClass("hidden"),c.removeClass("hidden"),r.removeClass("hidden"),o.parent().removeClass("hidden")})})},I.fn.ulf_field_media=function(){return this.each(function(){var i,a=I(this),s=a.find(".ulf--button"),c=a.find(".ulf--remove"),r=s.data("library")&&s.data("library").split(",")||"",o=!!a.hasClass("ulf-assign-field-background")&&a.closest(".ulf-field-background").find(".ulf--auto-attributes");s.on("click",function(e){e.preventDefault(),void 0!==_.wp&&_.wp.media&&_.wp.media.gallery&&(i||(i=_.wp.media({library:{type:r}})).on("select",function(){var e,t=i.state().get("selection").first().attributes,n=s.data("preview-size")||"thumbnail";r.length&&-1===r.indexOf(t.subtype)&&-1===r.indexOf(t.type)||(a.find(".ulf--id").val(t.id),a.find(".ulf--width").val(t.width),a.find(".ulf--height").val(t.height),a.find(".ulf--alt").val(t.alt),a.find(".ulf--title").val(t.title),a.find(".ulf--description").val(t.description),e=void 0!==t.sizes&&void 0!==t.sizes.thumbnail&&"thumbnail"===n?t.sizes.thumbnail.url:void 0!==t.sizes&&void 0!==t.sizes.full?t.sizes.full.url:"image"===t.type?t.url:t.icon,o&&o.removeClass("ulf--attributes-hidden"),c.removeClass("hidden"),a.find(".ulf--preview").removeClass("hidden"),a.find(".ulf--src").attr("src",e),a.find(".ulf--thumbnail").val(e),a.find(".ulf--url").val(t.url).trigger("change"))}),i.open())}),c.on("click",function(e){e.preventDefault(),o&&o.addClass("ulf--attributes-hidden"),c.addClass("hidden"),a.find("input").val(""),a.find(".ulf--preview").addClass("hidden"),a.find(".ulf--url").trigger("change")})})},I.fn.ulf_field_repeater=function(){return this.each(function(){var e=I(this),t=e.children(".ulf-fieldset"),n=t.length?t:e,c=n.children(".ulf-repeater-wrapper"),i=n.children(".ulf-repeater-hidden"),r=n.children(".ulf-repeater-max"),o=n.children(".ulf-repeater-min"),f=c.data("field-id"),l=parseInt(c.data("max")),a=parseInt(c.data("min"));c.children(".ulf-repeater-item").children(".ulf-repeater-content").ulf_reload_script(),c.sortable({axis:"y",handle:".ulf-repeater-sort",helper:"original",cursor:"move",placeholder:"widget-placeholder",update:function(e,t){T.helper.name_nested_replace(c.children(".ulf-repeater-item"),f),c.ulf_customizer_refresh(),t.item.ulf_reload_script_retry()}}),n.children(".ulf-repeater-add").on("click",function(e){e.preventDefault();var t=c.children(".ulf-repeater-item").length;if(o.hide(),l&&l<t+1)r.show();else{var n=i.ulf_clone(!0);n.removeClass("ulf-repeater-hidden"),n.find(':input[name!="_pseudo"]').each(function(){this.name=this.name.replace("___","").replace(f+"[0]",f+"["+t+"]")}),c.append(n),n.children(".ulf-repeater-content").ulf_reload_script(),c.ulf_customizer_refresh(),c.ulf_customizer_listen({closest:!0})}});var s=function(e){e.preventDefault();var t=c.children(".ulf-repeater-item").length;if(o.hide(),l&&l<t+1)r.show();else{var n=I(this).parent().parent().parent(),i=n.children(".ulf-repeater-content").ulf_clone(),a=n.children(".ulf-repeater-helper").ulf_clone(!0),s=I('<div class="ulf-repeater-item" />');s.append(i),s.append(a),c.children().eq(n.index()).after(s),s.children(".ulf-repeater-content").ulf_reload_script(),T.helper.name_nested_replace(c.children(".ulf-repeater-item"),f),c.ulf_customizer_refresh(),c.ulf_customizer_listen({closest:!0})}};c.children(".ulf-repeater-item").children(".ulf-repeater-helper").on("click",".ulf-repeater-clone",s),n.children(".ulf-repeater-hidden").children(".ulf-repeater-helper").on("click",".ulf-repeater-clone",s);var d=function(e){e.preventDefault();var t=c.children(".ulf-repeater-item").length;r.hide(),o.hide(),a&&t-1<a?o.show():(I(this).closest(".ulf-repeater-item").remove(),T.helper.name_nested_replace(c.children(".ulf-repeater-item"),f),c.ulf_customizer_refresh())};c.children(".ulf-repeater-item").children(".ulf-repeater-helper").on("click",".ulf-repeater-remove",d),n.children(".ulf-repeater-hidden").children(".ulf-repeater-helper").on("click",".ulf-repeater-remove",d)})},I.fn.ulf_field_slider=function(){return this.each(function(){var e=I(this),n=e.find("input"),t=e.find(".ulf-slider-ui"),i=n.data(),a=n.val()||0;t.hasClass("ui-slider")&&t.empty(),t.slider({range:"min",value:a,min:i.min||0,max:i.max||100,step:i.step||1,slide:function(e,t){n.val(t.value).trigger("change")}}),n.on("keyup",function(){t.slider("value",n.val())})})},I.fn.ulf_field_sortable=function(){return this.each(function(){var n=I(this).find(".ulf-sortable");n.sortable({axis:"y",helper:"original",cursor:"move",placeholder:"widget-placeholder",update:function(e,t){n.ulf_customizer_refresh()}}),n.find(".ulf-sortable-content").ulf_reload_script()})},I.fn.ulf_field_sorter=function(){return this.each(function(){var i=I(this),e=i.find(".ulf-enabled"),t=i.find(".ulf-disabled"),n=!!t.length&&t;e.sortable({connectWith:n,placeholder:"ui-sortable-placeholder",update:function(e,t){var n=t.item.find("input");t.item.parent().hasClass("ulf-enabled")?n.attr("name",n.attr("name").replace("disabled","enabled")):n.attr("name",n.attr("name").replace("enabled","disabled")),i.ulf_customizer_refresh()}}),n&&n.sortable({connectWith:e,placeholder:"ui-sortable-placeholder",update:function(e,t){i.ulf_customizer_refresh()}})})},I.fn.ulf_field_spinner=function(){return this.each(function(){var e=I(this),n=e.find("input"),t=e.find(".ui-button"),i=n.data();t.length&&t.remove(),n.spinner({min:i.min||0,max:i.max||100,step:i.step||1,create:function(e,t){i.unit&&n.after('<span class="ui-button ulf--unit">'+i.unit+"</span>")},spin:function(e,t){n.val(t.value).trigger("change")}})})},I.fn.ulf_field_switcher=function(){return this.each(function(){var n=I(this).find(".ulf--switcher");n.on("click",function(){var e=0,t=n.find("input");n.hasClass("ulf--active")?n.removeClass("ulf--active"):(e=1,n.addClass("ulf--active")),t.val(e).trigger("change")})})},I.fn.ulf_field_tabbed=function(){return this.each(function(){var e=I(this),t=e.find(".ulf-tabbed-nav a"),a=e.find(".ulf-tabbed-content");a.eq(0).ulf_reload_script(),t.on("click",function(e){e.preventDefault();var t=I(this),n=t.index(),i=a.eq(n);t.addClass("ulf-tabbed-active").siblings().removeClass("ulf-tabbed-active"),i.ulf_reload_script(),i.removeClass("hidden").siblings().addClass("hidden")})})},I.fn.ulf_field_typography=function(){return this.each(function(){var j=this,L=I(this),i=[],A=ulf_typography_json.webfonts,t=ulf_typography_json.googlestyles,q=ulf_typography_json.defaultstyles;j.sanitize_subset=function(e){return e=(e=e.replace("-ext"," Extended")).charAt(0).toUpperCase()+e.slice(1)},j.sanitize_style=function(e){return t[e]?t[e]:e},j.load_google_font=function(e,t,n){e&&"object"==typeof WebFont&&(t=t?t.replace("normal",""):"",n=n?n.replace("normal",""):"",(t||n)&&(e=e+":"+t+n),-1===i.indexOf(e)&&WebFont.load({google:{families:[e]}}),i.push(e))},j.append_select_options=function(e,t,a,s,c){e.find("option").not(":first").remove();var r="";I.each(t,function(e,t){var n,i=t;n=c?a&&-1!==a.indexOf(t)?" selected":"":a&&a===t?" selected":"","subset"===s?i=j.sanitize_subset(t):"style"===s&&(i=j.sanitize_style(t)),r+='<option value="'+t+'"'+n+">"+i+"</option>"}),e.append(r).trigger("ulf.change").trigger("chosen:updated")},j.init=function(){var l=[],e=L.find(".ulf--typography"),d=L.find(".ulf--type"),h=L.find(".ulf--block-font-style"),v=e.data("unit"),g=e.data("line-height-unit"),t=e.data("exclude")?e.data("exclude").split(","):[];L.find(".ulf--chosen").length&&L.find("select").each(function(){var e=I(this),t=e.parent().find(".chosen-container");t.length&&t.remove(),e.chosen({allow_single_deselect:!0,disable_search_threshold:15,width:"100%"})});var m=L.find(".ulf--font-family"),i=m.val();m.find("option").not(":first-child").remove();var a="";I.each(A,function(n,e){t&&-1!==t.indexOf(n)||(a+='<optgroup label="'+e.label+'">',I.each(e.fonts,function(e,t){a+='<option value="'+(t="object"==typeof t?e:t)+'" data-type="'+n+'"'+(t===i?" selected":"")+">"+t+"</option>"}),a+="</optgroup>")}),m.append(a).trigger("chosen:updated");var p=L.find(".ulf--block-font-style");if(p.length){var u=L.find(".ulf--font-style-select"),_=u.val()?u.val().replace(/normal/g,""):"";u.on("change ulf.change",function(e){var t=u.val();!t&&l&&-1===l.indexOf("normal")&&(t=l[0]);var n=t&&"italic"!==t&&"normal"===t?"normal":"",i=t&&"italic"!==t&&"normal"!==t?t.replace("italic",""):n,a=t&&"italic"===t.substr(-6)?"italic":"";L.find(".ulf--font-weight").val(i),L.find(".ulf--font-style").val(a)});var b=L.find(".ulf--block-extra-styles");if(b.length)var y=L.find(".ulf--extra-styles"),w=y.val()}var C=L.find(".ulf--block-subset");if(C.length)var k=L.find(".ulf--subset"),x=k.val(),z=k.data("multiple")||!1;var D=L.find(".ulf--block-backup-font-family");m.on("change ulf.change",function(e){C.length&&C.addClass("hidden"),b.length&&b.addClass("hidden"),D.length&&D.addClass("hidden");var t=m.find(":selected"),n=t.val(),i=t.data("type");if(i&&n){if("google"!==i&&"custom"!==i||!D.length||D.removeClass("hidden"),p.length){var a=q;"google"===i&&A[i].fonts[n][0]?a=A[i].fonts[n][0]:"custom"===i&&A[i].fonts[n]&&(a=A[i].fonts[n]);var s=-1!==(l=a).indexOf("normal")?"normal":a[0],c=_&&-1!==a.indexOf(_)?_:s;j.append_select_options(u,a,c,"style"),_=!1,p.removeClass("hidden"),"google"===i&&b.length&&1<a.length&&(j.append_select_options(y,a,w,"style",!0),w=!1,b.removeClass("hidden"))}if("google"===i&&C.length&&A[i].fonts[n][1]){var r=A[i].fonts[n][1],o=r.length<2&&"latin"!==r[0]?r[0]:"",f=x&&-1!==r.indexOf(x)?x:o;f=z&&x?x:f,j.append_select_options(k,r,f,"subset",z),x=!1,C.removeClass("hidden")}}else h.find(":input").val(""),C.length&&(k.find("option").not(":first-child").remove(),k.trigger("chosen:updated")),p.length&&(u.find("option").not(":first-child").remove(),u.trigger("chosen:updated"));d.val(i)}).trigger("ulf.change");var O=L.find(".ulf--block-preview");if(O.length){var S=L.find(".ulf--preview");L.on("change",T.helper.debounce(function(e){O.removeClass("hidden");var t=m.val(),n=L.find(".ulf--font-weight").val(),i=L.find(".ulf--font-style").val(),a=L.find(".ulf--font-size").val(),s=L.find(".ulf--font-variant").val(),c=L.find(".ulf--line-height").val(),r=L.find(".ulf--text-align").val(),o=L.find(".ulf--text-transform").val(),f=L.find(".ulf--text-decoration").val(),l=L.find(".ulf--color").val(),d=L.find(".ulf--word-spacing").val(),h=L.find(".ulf--letter-spacing").val(),p=L.find(".ulf--custom-style").val();"google"===L.find(".ulf--type").val()&&j.load_google_font(t,n,i);var u={};t&&(u.fontFamily=t),n&&(u.fontWeight=n),i&&(u.fontStyle=i),s&&(u.fontVariant=s),a&&(u.fontSize=a+v),c&&(u.lineHeight=c+g),h&&(u.letterSpacing=h+v),d&&(u.wordSpacing=d+v),r&&(u.textAlign=r),o&&(u.textTransform=o),f&&(u.textDecoration=f),l&&(u.color=l),S.removeAttr("style"),p&&S.attr("style",p),S.css(u)},100)),O.on("click",function(){S.toggleClass("ulf--black-background");var e=O.find(".ulf--toggle");e.hasClass("fa-toggle-off")?e.removeClass("fa-toggle-off").addClass("fa-toggle-on"):e.removeClass("fa-toggle-on").addClass("fa-toggle-off")}),O.hasClass("hidden")||L.trigger("change")}},j.init()})},I.fn.ulf_field_upload=function(){return this.each(function(){var t,e=I(this),n=e.find("input"),i=e.find(".ulf--button"),a=e.find(".ulf--remove"),s=e.find(".ulf--preview"),c=e.find(".ulf--src"),r=i.data("library")&&i.data("library").split(",")||"";i.on("click",function(e){e.preventDefault(),void 0!==_.wp&&_.wp.media&&_.wp.media.gallery&&(t||(t=_.wp.media({library:{type:r}})).on("select",function(){var e=t.state().get("selection").first().attributes;r.length&&-1===r.indexOf(e.subtype)&&-1===r.indexOf(e.type)||n.val(e.url).trigger("change")}),t.open())}),a.on("click",function(e){e.preventDefault(),n.val("").trigger("change")}),n.on("change",function(e){var t=n.val();t?a.removeClass("hidden"):a.addClass("hidden"),s.length&&(-1!==I.inArray(t.split(".").pop().toLowerCase(),["jpg","jpeg","gif","png","svg","webp"])?(s.removeClass("hidden"),c.attr("src",t)):s.addClass("hidden"))})})},I.fn.ulf_field_wp_editor=function(){return this.each(function(){if(void 0!==_.wp.editor&&void 0!==_.tinyMCEPreInit&&void 0!==_.tinyMCEPreInit.mceInit.ulf_wp_editor){var e=I(this),t=e.find(".ulf-wp-editor"),n=e.find("textarea");(e.find(".wp-editor-wrap").length||e.find(".mce-container").length)&&(t.empty(),t.append(n),n.css("display",""));var i=T.helper.uid("ulf-editor-");n.attr("id",i);var a={tinymce:_.tinyMCEPreInit.mceInit.ulf_wp_editor,quicktags:_.tinyMCEPreInit.qtInit.ulf_wp_editor},s=t.data("editor-settings"),c=wp.oldEditor?wp.oldEditor:wp.editor;c&&c.hasOwnProperty("autop")&&(wp.editor.autop=c.autop,wp.editor.removep=c.removep,wp.editor.initialize=c.initialize);a.tinymce=I.extend({},a.tinymce,{selector:"#"+i,setup:function(t){t.on("change keyup",function(){var e=s.wpautop?t.getContent():wp.editor.removep(t.getContent());n.val(e).trigger("change")})}}),!1===s.tinymce&&(a.tinymce=!1,t.addClass("ulf-no-tinymce")),!1===s.quicktags&&(a.quicktags=!1,t.addClass("ulf-no-quicktags"));var r=setInterval(function(){e.is(":visible")&&(_.wp.editor.initialize(i,a),clearInterval(r))});if(s.media_buttons&&_.ulf_media_buttons){var o=t.find(".wp-media-buttons");if(o.length)o.find(".ulf-shortcode-button").data("editor-id",i);else{var f=I(_.ulf_media_buttons);f.find(".ulf-shortcode-button").data("editor-id",i),t.prepend(f)}}}})},I.fn.ulf_confirm=function(){return this.each(function(){I(this).on("click",function(e){var t=I(this).data("confirm")||_.ulf_vars.i18n.confirm;if(!confirm(t))return e.preventDefault(),!1;T.vars.is_confirm=!0,T.vars.form_modified=!1})})},I.fn.serializeObject=function(){var a={};return I.each(this.serializeArray(),function(e,t){var n=t.name,i=t.value;a[n]=a[n]===y?i:I.isArray(a[n])?a[n].concat(i):[a[n],i]}),a},I.fn.ulf_save=function(){return this.each(function(){var i,a=I(this),c=I(".ulf-save"),r=I(".ulf-options"),o=!1;a.on("click",function(e){if(!o){var t=a.data("save"),n=a.val();c.attr("value",t),a.hasClass("ulf-save-ajax")?(e.preventDefault(),r.addClass("ulf-saving"),c.prop("disabled",!0),_.wp.ajax.post("ulf_"+r.data("unique")+"_ajax_save",{data:I("#ulf-form").serializeJSONULF()}).done(function(e){if(I(".ulf-error").remove(),Object.keys(e.errors).length){var s='<i class="ulf-label-error ulf-error">!</i>';I.each(e.errors,function(e,t){var n=I('[data-depend-id="'+e+'"]'),i=I('a[href="#tab='+n.closest(".ulf-section").data("section-id")+'"]'),a=i.closest(".ulf-tab-item");n.closest(".ulf-fieldset").append('<p class="ulf-error ulf-error-text">'+t+"</p>"),i.find(".ulf-error").length||i.append(s),a.find(".ulf-arrow .ulf-error").length||a.find(".ulf-arrow").append(s)})}r.removeClass("ulf-saving"),c.prop("disabled",!1).attr("value",n),o=!1,T.vars.form_modified=!1,T.vars.$form_warning.hide(),clearTimeout(i);var t=I(".ulf-form-success");t.empty().append(e.notice).fadeIn("fast",function(){i=setTimeout(function(){t.fadeOut("fast")},1e3)})}).fail(function(e){alert(e.error)})):T.vars.form_modified=!1}o=!0})})},I.fn.ulf_options=function(){return this.each(function(){var e=I(this),t=e.find(".ulf-content"),n=e.find(".ulf-form-success"),i=e.find(".ulf-form-warning"),a=e.find(".ulf-header .ulf-save");(T.vars.$form_warning=i).length&&(_.onbeforeunload=function(){return!!T.vars.form_modified||y},t.on("change keypress",":input",function(){T.vars.form_modified||(n.hide(),i.fadeIn("fast"),T.vars.form_modified=!0)})),n.hasClass("ulf-form-show")&&setTimeout(function(){n.fadeOut("fast")},1e3),I(b).keydown(function(e){if((e.ctrlKey||e.metaKey)&&83===e.which)return a.trigger("click"),e.preventDefault(),!1})})},I.fn.ulf_taxonomy=function(){return this.each(function(){var e=I(this),t=e.parents("form");if("addtag"===t.attr("id")){var n=t.find("#submit"),i=e.find(".ulf-field").ulf_clone();n.on("click",function(){t.find(".form-required").hasClass("form-invalid")||(e.data("inited",!1),e.empty(),e.html(i),i=i.ulf_clone(),e.ulf_reload_script())})}})},I.fn.ulf_shortcode=function(){var m=this;return m.shortcode_parse=function(e,n){var i="";return I.each(e,function(e,t){i+="["+(n=n||e),I.each(t,function(e,t){"content"===e?(i+="]",i+=t,i+="[/"+n):i+=m.shortcode_tags(e,t)}),i+="]"}),i},m.shortcode_tags=function(e,t){var n="";return""!==t&&("object"!=typeof t||I.isArray(t)?n+=" "+e.replace("-","_")+'="'+t.toString()+'"':I.each(t,function(e,t){switch(e){case"background-image":t=t.url?t.url:""}""!==t&&(n+=" "+e.replace("-","_")+'="'+t.toString()+'"')})),n},m.insertAtChars=function(e,t){var n=void 0!==e[0].name?e[0]:e;return n.value.length&&void 0!==n.selectionStart?(n.focus(),n.value.substring(0,n.selectionStart)+t+n.value.substring(n.selectionEnd,n.value.length)):(n.focus(),t)},m.send_to_editor=function(e,t){var n;if("undefined"!=typeof tinymce&&(n=tinymce.get(t)),n&&!n.isHidden())n.execCommand("mceInsertContent",!1,e);else{var i=I("#"+t);i.val(m.insertAtChars(i,e)).trigger("change")}},this.each(function(){var c,r,o,n,f,l,d,a,h,p=I(this),i=p.find(".ulf-modal-load"),u=(p.find(".ulf-modal-content"),p.find(".ulf-modal-insert")),s=p.find(".ulf-modal-loading"),t=p.find("select"),v=p.data("modal-id"),g=p.data("nonce");I(b).on("click",'.ulf-shortcode-button[data-modal-id="'+v+'"]',function(e){e.preventDefault(),h=I(this),c=h.data("editor-id")||!1,r=h.data("target-id")||!1,o=h.data("gutenberg-id")||!1,p.removeClass("hidden"),p.hasClass("ulf-shortcode-single")&&f===y&&t.trigger("change")}),t.on("change",function(){var e=I(this),t=e.find(":selected");n=e.val(),f=t.data("shortcode"),l=t.data("view")||"normal",d=t.data("group")||f,i.empty(),n?(s.show(),_.wp.ajax.post("ulf-get-shortcode-"+v,{shortcode_key:n,nonce:g}).done(function(e){s.hide();var t=I(e.content).appendTo(i);u.parent().removeClass("hidden"),a=t.find(".ulf--repeat-shortcode").ulf_clone(),t.ulf_reload_script(),t.find(".ulf-fields").ulf_reload_script()})):u.parent().addClass("hidden")}),u.on("click",function(e){if(e.preventDefault(),!u.prop("disabled")&&!u.attr("disabled")){var i="",t=p.find(".ulf-field:not(.ulf-depend-on)").find(":input:not(.ignore)").serializeObjectULF();switch(l){case"contents":var n=f?t[f]:t;I.each(n,function(e,t){var n=f||e;i+="["+n+"]"+t+"[/"+n+"]"});break;case"group":i+="["+f,I.each(t[f],function(e,t){i+=m.shortcode_tags(e,t)}),i+="]",i+=m.shortcode_parse(t[d],d),i+="[/"+f+"]";break;case"repeater":i+=m.shortcode_parse(t[d],d);break;default:i+=m.shortcode_parse(t)}if(i=""===i?"["+f+"]":i,o){var a=_.ulf_gutenberg_props.attributes.hasOwnProperty("shortcode")?_.ulf_gutenberg_props.attributes.shortcode:"";_.ulf_gutenberg_props.setAttributes({shortcode:a+i})}else if(c)m.send_to_editor(i,c);else{var s=r?I(r):h.parent().find("textarea");s.val(m.insertAtChars(s,i)).trigger("change")}p.addClass("hidden")}}),p.on("click",".ulf--repeat-button",function(e){e.preventDefault();var t=p.find(".ulf--repeatable"),n=a.ulf_clone(),i=n.find(".ulf-repeat-remove");n.appendTo(t);n.find(".ulf-fields").ulf_reload_script(),T.helper.name_nested_replace(p.find(".ulf--repeat-shortcode"),d),i.on("click",function(){n.remove(),T.helper.name_nested_replace(p.find(".ulf--repeat-shortcode"),d)})}),p.on("click",".ulf-modal-close, .ulf-modal-overlay",function(){p.addClass("hidden")})})},"function"==typeof Color&&(Color.prototype.toString=function(){if(this._alpha<1)return this.toCSS("rgba",this._alpha).replace(/\s+/g,"");var e=parseInt(this._color,10).toString(16);if(this.error)return"";if(e.length<6)for(var t=6-e.length-1;0<=t;t--)e="0"+e;return"#"+e}),T.funcs.parse_color=function(e){var t=e.replace(/\s+/g,""),n=-1!==t.indexOf("rgba")?parseFloat(100*t.replace(/^.*,(.+)\)/,"$1")):100;return{value:t,transparent:n,rgba:n<100}},I.fn.ulf_color=function(){return this.each(function(){var c,r=I(this),o=T.funcs.parse_color(r.val()),e=!_.ulf_vars.color_palette.length||_.ulf_vars.color_palette;r.hasClass("wp-color-picker")&&r.closest(".wp-picker-container").after(r).remove(),r.wpColorPicker({palettes:e,change:function(e,t){var n=t.color.toString();c.removeClass("ulf--transparent-active"),c.find(".ulf--transparent-offset").css("background-color",n),r.val(n).trigger("change")},create:function(){c=r.closest(".wp-picker-container");var i=r.data("a8cIris"),e=I('<div class="ulf--transparent-wrap"><div class="ulf--transparent-slider"></div><div class="ulf--transparent-offset"></div><div class="ulf--transparent-text"></div><div class="ulf--transparent-button">transparent <i class="fas fa-toggle-off"></i></div></div>').appendTo(c.find(".wp-picker-holder")),a=e.find(".ulf--transparent-slider"),s=e.find(".ulf--transparent-text"),n=e.find(".ulf--transparent-offset"),t=e.find(".ulf--transparent-button");"transparent"===r.val()&&c.addClass("ulf--transparent-active"),t.on("click",function(){"transparent"!==r.val()?(r.val("transparent").trigger("change").removeClass("iris-error"),c.addClass("ulf--transparent-active")):(r.val(i._color.toString()).trigger("change"),c.removeClass("ulf--transparent-active"))}),a.slider({value:o.transparent,step:1,min:0,max:100,slide:function(e,t){var n=parseFloat(t.value/100);i._color._alpha=n,r.wpColorPicker("color",i._color.toString()),s.text(1===n||0===n?"":n)},create:function(){var e=parseFloat(o.transparent/100),t=e<1?e:"";s.text(t),n.css("background-color",o.value),c.on("click",".wp-picker-clear",function(){i._color._alpha=1,s.text(""),a.slider("option","value",100),c.removeClass("ulf--transparent-active"),r.trigger("change")}),c.on("click",".wp-picker-default",function(){var e=T.funcs.parse_color(r.data("default-color")),t=parseFloat(e.transparent/100),n=t<1?t:"";i._color._alpha=t,s.text(n),a.slider("option","value",e.transparent),"transparent"===e.value&&(r.removeClass("iris-error"),c.addClass("ulf--transparent-active"))})}})}})})},I.fn.ulf_chosen=function(){return this.each(function(){var s=I(this),e=s.parent().find(".chosen-container"),t=s.hasClass("ulf-chosen-sortable")||!1,n=s.hasClass("ulf-chosen-ajax")||!1,i=s.attr("multiple")||!1,a=i?"100%":"auto",c=I.extend({allow_single_deselect:!0,disable_search_threshold:10,width:a,no_results_text:_.ulf_vars.i18n.no_results_text},s.data("chosen-settings"));if(e.length&&e.remove(),n){var r=I.extend({data:{type:"post",nonce:""},allow_single_deselect:!0,disable_search_threshold:-1,width:"100%",min_length:3,type_delay:500,typing_text:_.ulf_vars.i18n.typing_text,searching_text:_.ulf_vars.i18n.searching_text,no_results_text:_.ulf_vars.i18n.no_results_text},s.data("chosen-settings"));s.ULFAjaxChosen(r)}else s.chosen(c);if(i){var o=s.parent().find(".ulf-hide-select"),f=o.val()||[];s.on("change",function(e,t){t&&t.selected?o.append('<option value="'+t.selected+'" selected="selected">'+t.selected+"</option>"):t&&t.deselected&&o.find('option[value="'+t.deselected+'"]').remove(),_.wp.customize!==y&&0===o.children().length&&o.data("customize-setting-link")&&_.wp.customize.control(o.data("customize-setting-link")).setting.set(""),o.trigger("change")}),s.ULFChosenOrder(f,!0)}if(t){var l=s.parent().find(".chosen-container").find(".chosen-choices");l.bind("mousedown",function(e){I(e.target).is("span")&&e.stopPropagation()}),l.sortable({items:"li:not(.search-field)",helper:"orginal",cursor:"move",placeholder:"search-choice-placeholder",start:function(e,t){t.placeholder.width(t.item.innerWidth()),t.placeholder.height(t.item.innerHeight())},update:function(e,t){var i="",a=s.data("chosen"),n=s.parent().find(".ulf-hide-select");l.find(".search-choice-close").each(function(){var n=I(this).data("option-array-index");I.each(a.results_data,function(e,t){t.array_index===n&&(i+='<option value="'+t.value+'" selected>'+t.value+"</option>")})}),n.children().remove(),n.append(i),n.trigger("change")}})}})},I.fn.ulf_checkbox=function(){return this.each(function(){var e=I(this),t=e.find(".ulf--input"),n=e.find(".ulf--checkbox");n.on("click",function(){t.val(Number(n.prop("checked"))).trigger("change")})})},I.fn.ulf_siblings=function(){return this.each(function(){var t=I(this),e=t.find(".ulf--sibling"),n=t.data("multiple")||!1;e.on("click",function(){var e=I(this);n?e.hasClass("ulf--active")?(e.removeClass("ulf--active"),e.find("input").prop("checked",!1).trigger("change")):(e.addClass("ulf--active"),e.find("input").prop("checked",!0).trigger("change")):(t.find("input").prop("checked",!1),e.find("input").prop("checked",!0).trigger("change"),e.addClass("ulf--active").siblings().removeClass("ulf--active"))})})},I.fn.ulf_help=function(){return this.each(function(){var e,t,n=I(this);n.on({mouseenter:function(){e=I('<div class="ulf-tooltip"></div>').html(n.find(".ulf-help-text").html()).appendTo("body"),t=T.vars.is_rtl?n.offset().left+24:n.offset().left-e.outerWidth(),e.css({top:n.offset().top-(e.outerHeight()/2-14),left:t})},mouseleave:function(){e!==y&&e.remove()}})})},I.fn.ulf_customizer_refresh=function(){return this.each(function(){var e=I(this),t=e.closest(".ulf-customize-complex");if(t.length){var n=t.data("unique-id");if(n===y)return;var i=t.find(":input"),a=t.data("option-id"),s=i.serializeObjectULF(),c=!I.isEmptyObject(s)&&s[n]&&s[n][a]?s[n][a]:"",r=_.wp.customize.control(n+"["+a+"]");r.setting._value=null,r.setting.set(c)}else e.find(":input").first().trigger("change");I(b).trigger("ulf-customizer-refresh",e)})},I.fn.ulf_customizer_listen=function(e){var t=I.extend({closest:!1},e);return this.each(function(){if(_.wp.customize!==y){var n=t.closest?I(this).closest(".ulf-customize-complex"):I(this),e=n.find(":input"),i=n.data("unique-id"),a=n.data("option-id");i!==y&&e.on("change keyup ulf.change",function(){var e=n.find(":input").serializeObjectULF(),t=!I.isEmptyObject(e)&&e[i]&&e[i][a]?e[i][a]:"";_.wp.customize.control(i+"["+a+"]").setting.set(t)})}})},I(b).on("expanded",".control-section",function(){var e=I(this);if(e.hasClass("open")&&!e.data("inited")){var t=e.find(".ulf-customize-field"),n=e.find(".ulf-customize-complex");t.length&&(e.ulf_dependency(),t.ulf_reload_script({dependency:!1}),n.ulf_customizer_listen()),e.data("inited",!0)}}),T.vars.$window.on("resize ulf.resize",T.helper.debounce(function(e){(-1<navigator.userAgent.indexOf("AppleWebKit/")?T.vars.$window.width():_.innerWidth)<=782&&!T.vars.onloaded&&(I(".ulf-section").ulf_reload_script(),T.vars.onloaded=!0)},200)).trigger("ulf.resize"),I.fn.ulf_widgets=function(){return this.each(function(){I(b).on("widget-added widget-updated",function(e,t){var n=t.find(".ulf-fields");n.length&&n.ulf_reload_script()}),I(b).on("click",".widget-top",function(e){var t=I(this).parent().find(".ulf-fields");t.length&&t.ulf_reload_script()}),I(".widgets-sortables, .control-section-sidebar").on("sortstop",function(e,t){t.item.find(".ulf-fields").ulf_reload_script_retry()})})},I.fn.ulf_nav_menu=function(){return this.each(function(){var e=I(this);e.on("click","a.item-edit",function(){I(this).closest("li.menu-item").find(".ulf-fields").ulf_reload_script()}),e.on("sortstop",function(e,t){t.item.find(".ulf-fields").ulf_reload_script_retry()})})},I.fn.ulf_reload_script_retry=function(){return this.each(function(){var e=I(this);e.data("inited")&&e.children(".ulf-field-wp_editor").ulf_field_wp_editor()})},I.fn.ulf_reload_script=function(e){var t=I.extend({dependency:!0},e);return this.each(function(){var e=I(this);e.data("inited")||(e.children(".ulf-field-accordion").ulf_field_accordion(),e.children(".ulf-field-backup").ulf_field_backup(),e.children(".ulf-field-background").ulf_field_background(),e.children(".ulf-field-code_editor").ulf_field_code_editor(),e.children(".ulf-field-date").ulf_field_date(),e.children(".ulf-field-datetime").ulf_field_datetime(),e.children(".ulf-field-fieldset").ulf_field_fieldset(),e.children(".ulf-field-gallery").ulf_field_gallery(),e.children(".ulf-field-group").ulf_field_group(),e.children(".ulf-field-icon").ulf_field_icon(),e.children(".ulf-field-link").ulf_field_link(),e.children(".ulf-field-media").ulf_field_media(),e.children(".ulf-field-map").ulf_field_map(),e.children(".ulf-field-repeater").ulf_field_repeater(),e.children(".ulf-field-slider").ulf_field_slider(),e.children(".ulf-field-sortable").ulf_field_sortable(),e.children(".ulf-field-sorter").ulf_field_sorter(),e.children(".ulf-field-spinner").ulf_field_spinner(),e.children(".ulf-field-switcher").ulf_field_switcher(),e.children(".ulf-field-tabbed").ulf_field_tabbed(),e.children(".ulf-field-typography").ulf_field_typography(),e.children(".ulf-field-upload").ulf_field_upload(),e.children(".ulf-field-wp_editor").ulf_field_wp_editor(),e.children(".ulf-field-border").find(".ulf-color").ulf_color(),e.children(".ulf-field-background").find(".ulf-color").ulf_color(),e.children(".ulf-field-color").find(".ulf-color").ulf_color(),e.children(".ulf-field-color_group").find(".ulf-color").ulf_color(),e.children(".ulf-field-link_color").find(".ulf-color").ulf_color(),e.children(".ulf-field-typography").find(".ulf-color").ulf_color(),e.children(".ulf-field-select").find(".ulf-chosen").ulf_chosen(),e.children(".ulf-field-checkbox").find(".ulf-checkbox").ulf_checkbox(),e.children(".ulf-field-button_set").find(".ulf-siblings").ulf_siblings(),e.children(".ulf-field-image_select").find(".ulf-siblings").ulf_siblings(),e.children(".ulf-field-palette").find(".ulf-siblings").ulf_siblings(),e.children(".ulf-field").find(".ulf-help").ulf_help(),t.dependency&&e.ulf_dependency(),e.data("inited",!0),I(b).trigger("ulf-reload-script",e))})},I(b).ready(function(){I(".ulf-save").ulf_save(),I(".ulf-options").ulf_options(),I(".ulf-sticky-header").ulf_sticky(),I(".ulf-nav-options").ulf_nav_options(),I(".ulf-nav-metabox").ulf_nav_metabox(),I(".ulf-taxonomy").ulf_taxonomy(),I(".ulf-page-templates").ulf_page_templates(),I(".ulf-post-formats").ulf_post_formats(),I(".ulf-shortcode").ulf_shortcode(),I(".ulf-search").ulf_search(),I(".ulf-confirm").ulf_confirm(),I(".ulf-expand-all").ulf_expand_all(),I(".ulf-onload").ulf_reload_script(),I("#widgets-editor").ulf_widgets(),I("#widgets-right").ulf_widgets(),I("#menu-to-edit").ulf_nav_menu()})}(jQuery,window,document);
1
+ /* Codestar Framework | A Simple and Lightweight WordPress Option Framework - v2.2.8*/
2
 
3
+ !function(I,_,b,y){"use strict";var T=T||{};T.funcs={},T.vars={onloaded:!1,$body:I("body"),$window:I(_),$document:I(b),$form_warning:null,is_confirm:!1,form_modified:!1,code_themes:[],is_rtl:I("body").hasClass("rtl")},T.helper={uid:function(e){return(e||"")+Math.random().toString(36).substr(2,9)},preg_quote:function(e){return(e+"").replace(/(\[|\])/g,"\\$1")},name_nested_replace:function(e,t){var n=new RegExp(T.helper.preg_quote(t+"[\\d+]"),"g");e.find(":radio").each(function(){(this.checked||this.orginal_checked)&&(this.orginal_checked=!0)}),e.each(function(e){I(this).find(":input").each(function(){this.name=this.name.replace(n,t+"["+e+"]"),this.orginal_checked&&(this.checked=!0)})})},debounce:function(i,a,s){var c;return function(){var e=this,t=arguments,n=s&&!c;clearTimeout(c),c=setTimeout(function(){c=null,s||i.apply(e,t)},a),n&&i.apply(e,t)}}},I.fn.ulf_clone=function(){for(var e=I.fn.clone.apply(this,arguments),t=this.find("select").add(this.filter("select")),n=e.find("select").add(e.filter("select")),i=0;i<t.length;++i)for(var a=0;a<t[i].options.length;++a)!0===t[i].options[a].selected&&(n[i].options[a].selected=!0);return this.find(":radio").each(function(){this.orginal_checked=this.checked}),e},I.fn.ulf_expand_all=function(){return this.each(function(){I(this).on("click",function(e){e.preventDefault(),I(".ulf-wrapper").toggleClass("ulf-show-all"),I(".ulf-section").ulf_reload_script(),I(this).find(".fa").toggleClass("fa-indent").toggleClass("fa-outdent")})})},I.fn.ulf_nav_options=function(){return this.each(function(){var a,e=I(this),t=I(_),s=I("#wpwrap"),c=e.find("a");t.on("hashchange ulf.hashchange",function(){var e=_.location.hash.replace("#tab=",""),t=e||c.first().attr("href").replace("#tab=",""),n=I('[data-tab-id="'+t+'"]');if(n.length){n.closest(".ulf-tab-item").addClass("ulf-tab-expanded").siblings().removeClass("ulf-tab-expanded"),n.next().is("ul")&&(t=(n=n.next().find("li").first().find("a")).data("tab-id")),c.removeClass("ulf-active"),n.addClass("ulf-active"),a&&a.addClass("hidden");var i=I('[data-section-id="'+t+'"]');i.removeClass("hidden"),i.ulf_reload_script(),I(".ulf-section-id").val(i.index()+1),a=i,s.hasClass("wp-responsive-open")&&(I("html, body").animate({scrollTop:i.offset().top-50},200),s.removeClass("wp-responsive-open"))}}).trigger("ulf.hashchange")})},I.fn.ulf_nav_metabox=function(){return this.each(function(){var a,e=I(this),s=e.find("a"),c=e.parent().find(".ulf-section");s.each(function(i){I(this).on("click",function(e){e.preventDefault();var t=I(this);s.removeClass("ulf-active"),t.addClass("ulf-active"),a!==y&&a.addClass("hidden");var n=c.eq(i);n.removeClass("hidden"),n.ulf_reload_script(),a=n})}),s.first().trigger("click")})},I.fn.ulf_page_templates=function(){this.length&&I(b).on("change",".editor-page-attributes__template select, #page_template",function(){var e=I(this).val()||"default";I(".ulf-page-templates").removeClass("ulf-metabox-show").addClass("ulf-metabox-hide"),I(".ulf-page-"+e.toLowerCase().replace(/[^a-zA-Z0-9]+/g,"-")).removeClass("ulf-metabox-hide").addClass("ulf-metabox-show")})},I.fn.ulf_post_formats=function(){this.length&&I(b).on("change",'.editor-post-format select, #formatdiv input[name="post_format"]',function(){var e=I(this).val()||"default";e="0"===e?"default":e,I(".ulf-post-formats").removeClass("ulf-metabox-show").addClass("ulf-metabox-hide"),I(".ulf-post-format-"+e).removeClass("ulf-metabox-hide").addClass("ulf-metabox-show")})},I.fn.ulf_search=function(){return this.each(function(){I(this).find("input").on("change keyup",function(){var n=I(this).val(),e=I(".ulf-wrapper"),t=e.find(".ulf-section").find("> .ulf-field:not(.ulf-depend-on)"),i=t.find("> .ulf-title, .ulf-search-tags");3<n.length?(t.addClass("ulf-metabox-hide"),e.addClass("ulf-search-all"),i.each(function(){var e=I(this);if(e.text().match(new RegExp(".*?"+n+".*?","i"))){var t=e.closest(".ulf-field");t.removeClass("ulf-metabox-hide"),t.parent().ulf_reload_script()}})):(t.removeClass("ulf-metabox-hide"),e.removeClass("ulf-search-all"))})})},I.fn.ulf_sticky=function(){return this.each(function(){var i=I(this),a=I(_),s=i.find(".ulf-header-inner"),c=parseInt(s.css("padding-left"))+parseInt(s.css("padding-right")),r=0,o=!1,e=function(){o||requestAnimationFrame(function(){var e,t,n;e=i.offset().top,t=Math.max(32,e-r),n=a.innerWidth(),t<=32&&782<n?(s.css({width:i.outerWidth()-c}),i.css({height:i.outerHeight()}).addClass("ulf-sticky")):(s.removeAttr("style"),i.removeAttr("style").removeClass("ulf-sticky")),o=!1}),o=!0},t=function(){r=a.scrollTop(),e()};a.on("scroll resize",t),t()})},I.fn.ulf_dependency=function(){return this.each(function(){var e=I(this),t=e.children("[data-controller]");if(t.length){var n=I.ulf_deps.createRuleset(),i=I.ulf_deps.createRuleset(),f=[],l=[];t.each(function(){var a=I(this),e=a.data("controller").split("|"),s=a.data("condition").split("|"),c=a.data("value").toString().split("|"),r=!!a.data("depend-global"),o=r?i:n;I.each(e,function(e,t){var n=c[e]||"",i=s[e]||s[0];(o=o.createRule('[data-depend-id="'+t+'"]',i,n)).include(a),r?l.push(t):f.push(t)})}),f.length&&I.ulf_deps.enable(e,n,f),l.length&&I.ulf_deps.enable(T.vars.$body,i,l)}})},I.fn.ulf_field_accordion=function(){return this.each(function(){I(this).find(".ulf-accordion-title").on("click",function(){var e=I(this),t=e.find(".ulf-accordion-icon"),n=e.next();t.hasClass("fa-angle-right")?t.removeClass("fa-angle-right").addClass("fa-angle-down"):t.removeClass("fa-angle-down").addClass("fa-angle-right"),n.data("opened")||(n.ulf_reload_script(),n.data("opened",!0)),n.toggleClass("ulf-accordion-open")})})},I.fn.ulf_field_backup=function(){return this.each(function(){if(_.wp.customize!==y){var t=this,n=I(this),i=(I("body"),n.find(".ulf-import")),a=n.find(".ulf-reset");t.notificationOverlay=function(){wp.customize.notifications&&wp.customize.OverlayNotification&&(wp.customize.state("saved").get()||(wp.customize.state("changesetStatus").set("trash"),wp.customize.each(function(e){e._dirty=!1}),wp.customize.state("saved").set(!0)),wp.customize.notifications.add(new wp.customize.OverlayNotification("ulf_field_backup_notification",{type:"default",message:"&nbsp;",loading:!0})))},a.on("click",function(e){e.preventDefault(),T.vars.is_confirm&&(t.notificationOverlay(),_.wp.ajax.post("ulf-reset",{unique:a.data("unique"),nonce:a.data("nonce")}).done(function(e){_.location.reload(!0)}).fail(function(e){alert(e.error),wp.customize.notifications.remove("ulf_field_backup_notification")}))}),i.on("click",function(e){e.preventDefault(),T.vars.is_confirm&&(t.notificationOverlay(),_.wp.ajax.post("ulf-import",{unique:i.data("unique"),nonce:i.data("nonce"),data:n.find(".ulf-import-data").val()}).done(function(e){_.location.reload(!0)}).fail(function(e){alert(e.error),wp.customize.notifications.remove("ulf_field_backup_notification")}))})}})},I.fn.ulf_field_background=function(){return this.each(function(){I(this).find(".ulf--background-image").ulf_reload_script()})},I.fn.ulf_field_code_editor=function(){return this.each(function(){if("function"==typeof CodeMirror){var t=I(this),i=t.find("textarea"),e=t.find(".CodeMirror"),a=i.data("editor");e.length&&e.remove();var s=setInterval(function(){if(t.is(":visible")){var n=CodeMirror.fromTextArea(i[0],a);if("default"!==a.theme&&-1===T.vars.code_themes.indexOf(a.theme)){var e=I("<link>");I("#ulf-codemirror-css").after(e),e.attr({rel:"stylesheet",id:"ulf-codemirror-"+a.theme+"-css",href:a.cdnURL+"/theme/"+a.theme+".min.css",type:"text/css",media:"all"}),T.vars.code_themes.push(a.theme)}CodeMirror.modeURL=a.cdnURL+"/mode/%N/%N.min.js",CodeMirror.autoLoadMode(n,a.mode),n.on("change",function(e,t){i.val(n.getValue()).trigger("change")}),clearInterval(s)}})}})},I.fn.ulf_field_date=function(){return this.each(function(){var e=I(this),i=e.find("input"),a=e.find(".ulf-date-settings").data("settings"),t={showAnim:"",beforeShow:function(e,t){I(t.dpDiv).addClass("ulf-datepicker-wrapper")},onClose:function(e,t){I(t.dpDiv).removeClass("ulf-datepicker-wrapper")}};a=I.extend({},a,t),2===i.length&&(a=I.extend({},a,{onSelect:function(e){I(this),i.first();var t=i.first().attr("id")===I(this).attr("id")?"minDate":"maxDate",n=I.datepicker.parseDate(a.dateFormat,e);i.not(this).datepicker("option",t,n)}})),i.each(function(){var e=I(this);e.hasClass("hasDatepicker")&&e.removeAttr("id").removeClass("hasDatepicker"),e.datepicker(a)})})},I.fn.ulf_field_datetime=function(){return this.each(function(){var e=I(this),i=e.find("input"),t=e.find(".ulf-datetime-settings").data("settings");t=I.extend({},t,{onReady:function(e,t,n){I(n.calendarContainer).addClass("ulf-flatpickr")}}),2===i.length&&(t=I.extend({},t,{onChange:function(e,t,n){"from"===I(n.element).data("type")?i.last().get(0)._flatpickr.set("minDate",e[0]):i.first().get(0)._flatpickr.set("maxDate",e[0])}})),i.each(function(){I(this).flatpickr(t)})})},I.fn.ulf_field_fieldset=function(){return this.each(function(){I(this).find(".ulf-fieldset-content").ulf_reload_script()})},I.fn.ulf_field_gallery=function(){return this.each(function(){var s,e=I(this),c=e.find(".ulf-edit-gallery"),r=e.find(".ulf-clear-gallery"),o=e.find("ul"),f=e.find("input");e.find("img");e.on("click",".ulf-button, .ulf-edit-gallery",function(e){var t=I(this),n=f.val(),i=t.hasClass("ulf-edit-gallery")?"edit":"add",a="add"!==i||n.length?"gallery-edit":"gallery";e.preventDefault(),void 0!==_.wp&&_.wp.media&&_.wp.media.gallery&&("gallery"===a?(s=_.wp.media({library:{type:"image"},frame:"post",state:"gallery",multiple:!0})).open():(s=_.wp.media.gallery.edit('[gallery ids="'+n+'"]'),"add"===i&&s.setState("gallery-library")),s.on("update",function(e){o.empty();var t=e.models.map(function(e){var t=e.toJSON(),n=t.sizes&&t.sizes.thumbnail&&t.sizes.thumbnail.url?t.sizes.thumbnail.url:t.url;return o.append('<li><img src="'+n+'"></li>'),t.id});f.val(t.join(",")).trigger("change"),r.removeClass("hidden"),c.removeClass("hidden")}))}),r.on("click",function(e){e.preventDefault(),o.empty(),f.val("").trigger("change"),r.addClass("hidden"),c.addClass("hidden")})})},I.fn.ulf_field_group=function(){return this.each(function(){var e=I(this),t=e.children(".ulf-fieldset"),n=t.length?t:e,r=n.children(".ulf-cloneable-wrapper"),i=n.children(".ulf-cloneable-hidden"),o=n.children(".ulf-cloneable-max"),f=n.children(".ulf-cloneable-min"),c=r.data("title-by"),l=r.data("title-by-prefix"),d=r.data("field-id"),h=Boolean(Number(r.data("title-number"))),p=parseInt(r.data("max")),a=parseInt(r.data("min"));r.hasClass("ui-accordion")&&r.find(".ui-accordion-header-icon").remove();var u=function(e){e.find(".ulf-cloneable-title-number").each(function(e){I(this).html(I(this).closest(".ulf-cloneable-item").index()+1+".")})};r.accordion({header:"> .ulf-cloneable-item > .ulf-cloneable-title",collapsible:!0,active:!1,animate:!1,heightStyle:"content",icons:{header:"ulf-cloneable-header-icon fas fa-angle-right",activeHeader:"ulf-cloneable-header-icon fas fa-angle-down"},activate:function(e,t){var n=t.newPanel,i=t.newHeader;if(n.length&&!n.data("opened")){var a=i.find(".ulf-cloneable-value"),s=[];I.each(c,function(e,t){s.push(n.find('[data-depend-id="'+t+'"]'))}),I.each(s,function(e,t){t.on("change keyup ulf.keyup",function(){var i=[];I.each(s,function(e,t){var n=t.val();n&&i.push(n)}),i.length&&a.text(i.join(l))}).trigger("ulf.keyup")}),n.ulf_reload_script(),n.data("opened",!0),n.data("retry",!1)}else n.data("retry")&&(n.ulf_reload_script_retry(),n.data("retry",!1))}}),r.sortable({axis:"y",handle:".ulf-cloneable-title,.ulf-cloneable-sort",helper:"original",cursor:"move",placeholder:"widget-placeholder",start:function(e,t){r.accordion({active:!1}),r.sortable("refreshPositions"),t.item.children(".ulf-cloneable-content").data("retry",!0)},update:function(e,t){T.helper.name_nested_replace(r.children(".ulf-cloneable-item"),d),r.ulf_customizer_refresh(),h&&u(r)}}),n.children(".ulf-cloneable-add").on("click",function(e){e.preventDefault();var t=r.children(".ulf-cloneable-item").length;if(f.hide(),p&&p<t+1)o.show();else{var n=i.ulf_clone(!0);n.removeClass("ulf-cloneable-hidden"),n.find(':input[name!="_pseudo"]').each(function(){this.name=this.name.replace("___","").replace(d+"[0]",d+"["+t+"]")}),r.append(n),r.accordion("refresh"),r.accordion({active:t}),r.ulf_customizer_refresh(),r.ulf_customizer_listen({closest:!0}),h&&u(r)}});var s=function(e){e.preventDefault();var t=r.children(".ulf-cloneable-item").length;if(f.hide(),p&&p<t+1)o.show();else{var n=I(this).parent().parent(),i=n.children(".ulf-cloneable-helper").ulf_clone(!0),a=n.children(".ulf-cloneable-title").ulf_clone(),s=n.children(".ulf-cloneable-content").ulf_clone(),c=I('<div class="ulf-cloneable-item" />');c.append(i),c.append(a),c.append(s),r.children().eq(n.index()).after(c),T.helper.name_nested_replace(r.children(".ulf-cloneable-item"),d),r.accordion("refresh"),r.ulf_customizer_refresh(),r.ulf_customizer_listen({closest:!0}),h&&u(r)}};r.children(".ulf-cloneable-item").children(".ulf-cloneable-helper").on("click",".ulf-cloneable-clone",s),n.children(".ulf-cloneable-hidden").children(".ulf-cloneable-helper").on("click",".ulf-cloneable-clone",s);var v=function(e){e.preventDefault();var t=r.children(".ulf-cloneable-item").length;o.hide(),f.hide(),a&&t-1<a?f.show():(I(this).closest(".ulf-cloneable-item").remove(),T.helper.name_nested_replace(r.children(".ulf-cloneable-item"),d),r.ulf_customizer_refresh(),h&&u(r))};r.children(".ulf-cloneable-item").children(".ulf-cloneable-helper").on("click",".ulf-cloneable-remove",v),n.children(".ulf-cloneable-hidden").children(".ulf-cloneable-helper").on("click",".ulf-cloneable-remove",v)})},I.fn.ulf_field_icon=function(){return this.each(function(){var n=I(this);n.on("click",".ulf-icon-add",function(e){e.preventDefault();var t=I(this),i=I("#ulf-modal-icon");i.removeClass("hidden"),T.vars.$icon_target=n,T.vars.icon_modal_loaded||(i.find(".ulf-modal-loading").show(),_.wp.ajax.post("ulf-get-icons",{nonce:t.data("nonce")}).done(function(e){i.find(".ulf-modal-loading").hide(),T.vars.icon_modal_loaded=!0;var n=i.find(".ulf-modal-load").html(e.content);n.on("click","i",function(e){e.preventDefault();var t=I(this).attr("title");T.vars.$icon_target.find(".ulf-icon-preview i").removeAttr("class").addClass(t),T.vars.$icon_target.find(".ulf-icon-preview").removeClass("hidden"),T.vars.$icon_target.find(".ulf-icon-remove").removeClass("hidden"),T.vars.$icon_target.find("input").val(t).trigger("change"),i.addClass("hidden")}),i.on("change keyup",".ulf-icon-search",function(){var t=I(this).val();n.find("i").each(function(){var e=I(this);e.attr("title").search(new RegExp(t,"i"))<0?e.hide():e.show()})}),i.on("click",".ulf-modal-close, .ulf-modal-overlay",function(){i.addClass("hidden")})}).fail(function(e){i.find(".ulf-modal-loading").hide(),i.find(".ulf-modal-load").html(e.error),i.on("click",function(){i.addClass("hidden")})}))}),n.on("click",".ulf-icon-remove",function(e){e.preventDefault(),n.find(".ulf-icon-preview").addClass("hidden"),n.find("input").val("").trigger("change"),I(this).addClass("hidden")})})},I.fn.ulf_field_map=function(){return this.each(function(){if("undefined"!=typeof L){var e=I(this),t=e.find(".ulf--map-osm"),n=e.find(".ulf--map-search input"),i=e.find(".ulf--latitude"),a=e.find(".ulf--longitude"),s=e.find(".ulf--zoom"),c=t.data("map"),r=L.map(t.get(0),c);L.tileLayer("https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",{attribution:'&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'}).addTo(r);var o=L.marker(c.center,{draggable:!0}).addTo(r),f=function(e){i.val(e.lat),a.val(e.lng),s.val(r.getZoom())};r.on("click",function(e){o.setLatLng(e.latlng),f(e.latlng)}),r.on("zoom",function(){f(o.getLatLng())}),o.on("drag",function(){f(o.getLatLng())}),n.length||(n=I('[data-depend-id="'+e.find(".ulf--address-field").data("address-field")+'"]'));var l={};n.autocomplete({source:function(e,n){var i=e.term;i in l?n(l[i]):I.get("https://nominatim.openstreetmap.org/search",{format:"json",q:i},function(e){var t;t=e.length?e.map(function(e){return{value:e.display_name,label:e.display_name,lat:e.lat,lon:e.lon}},"json"):[{value:"no-data",label:"No Results."}],l[i]=t,n(t)})},select:function(e,t){if("no-data"===t.item.value)return!1;var n=L.latLng(t.item.lat,t.item.lon);r.panTo(n),o.setLatLng(n),f(n)},create:function(e,t){I(this).autocomplete("widget").addClass("ulf-map-ui-autocomplate")}});var d=function(){var e=L.latLng(i.val(),a.val());r.panTo(e),o.setLatLng(e)};i.on("change",d),a.on("change",d)}})},I.fn.ulf_field_link=function(){return this.each(function(){var a=I(this),e=a.find(".ulf--link"),s=a.find(".ulf--add"),c=a.find(".ulf--edit"),r=a.find(".ulf--remove"),o=a.find(".ulf--result"),t=T.helper.uid("ulf-wplink-textarea-");s.on("click",function(e){e.preventDefault(),_.wpLink.open(t)}),c.on("click",function(e){e.preventDefault(),s.trigger("click"),I("#wp-link-url").val(a.find(".ulf--url").val()),I("#wp-link-text").val(a.find(".ulf--text").val()),I("#wp-link-target").prop("checked","_blank"===a.find(".ulf--target").val())}),r.on("click",function(e){e.preventDefault(),a.find(".ulf--url").val("").trigger("change"),a.find(".ulf--text").val(""),a.find(".ulf--target").val(""),s.removeClass("hidden"),c.addClass("hidden"),r.addClass("hidden"),o.parent().addClass("hidden")}),e.attr("id",t).on("change",function(){var e=_.wpLink.getAttrs(),t=e.href,n=I("#wp-link-text").val(),i=e.target?e.target:"";a.find(".ulf--url").val(t).trigger("change"),a.find(".ulf--text").val(n),a.find(".ulf--target").val(i),o.html('{url:"'+t+'", text:"'+n+'", target:"'+i+'"}'),s.addClass("hidden"),c.removeClass("hidden"),r.removeClass("hidden"),o.parent().removeClass("hidden")})})},I.fn.ulf_field_media=function(){return this.each(function(){var i,a=I(this),s=a.find(".ulf--button"),c=a.find(".ulf--remove"),r=s.data("library")&&s.data("library").split(",")||"",o=!!a.hasClass("ulf-assign-field-background")&&a.closest(".ulf-field-background").find(".ulf--auto-attributes");s.on("click",function(e){e.preventDefault(),void 0!==_.wp&&_.wp.media&&_.wp.media.gallery&&(i||(i=_.wp.media({library:{type:r}})).on("select",function(){var e,t=i.state().get("selection").first().attributes,n=s.data("preview-size")||"thumbnail";r.length&&-1===r.indexOf(t.subtype)&&-1===r.indexOf(t.type)||(a.find(".ulf--id").val(t.id),a.find(".ulf--width").val(t.width),a.find(".ulf--height").val(t.height),a.find(".ulf--alt").val(t.alt),a.find(".ulf--title").val(t.title),a.find(".ulf--description").val(t.description),e=void 0!==t.sizes&&void 0!==t.sizes.thumbnail&&"thumbnail"===n?t.sizes.thumbnail.url:void 0!==t.sizes&&void 0!==t.sizes.full?t.sizes.full.url:"image"===t.type?t.url:t.icon,o&&o.removeClass("ulf--attributes-hidden"),c.removeClass("hidden"),a.find(".ulf--preview").removeClass("hidden"),a.find(".ulf--src").attr("src",e),a.find(".ulf--thumbnail").val(e),a.find(".ulf--url").val(t.url).trigger("change"))}),i.open())}),c.on("click",function(e){e.preventDefault(),o&&o.addClass("ulf--attributes-hidden"),c.addClass("hidden"),a.find("input").val(""),a.find(".ulf--preview").addClass("hidden"),a.find(".ulf--url").trigger("change")})})},I.fn.ulf_field_repeater=function(){return this.each(function(){var e=I(this),t=e.children(".ulf-fieldset"),n=t.length?t:e,c=n.children(".ulf-repeater-wrapper"),i=n.children(".ulf-repeater-hidden"),r=n.children(".ulf-repeater-max"),o=n.children(".ulf-repeater-min"),f=c.data("field-id"),l=parseInt(c.data("max")),a=parseInt(c.data("min"));c.children(".ulf-repeater-item").children(".ulf-repeater-content").ulf_reload_script(),c.sortable({axis:"y",handle:".ulf-repeater-sort",helper:"original",cursor:"move",placeholder:"widget-placeholder",update:function(e,t){T.helper.name_nested_replace(c.children(".ulf-repeater-item"),f),c.ulf_customizer_refresh(),t.item.ulf_reload_script_retry()}}),n.children(".ulf-repeater-add").on("click",function(e){e.preventDefault();var t=c.children(".ulf-repeater-item").length;if(o.hide(),l&&l<t+1)r.show();else{var n=i.ulf_clone(!0);n.removeClass("ulf-repeater-hidden"),n.find(':input[name!="_pseudo"]').each(function(){this.name=this.name.replace("___","").replace(f+"[0]",f+"["+t+"]")}),c.append(n),n.children(".ulf-repeater-content").ulf_reload_script(),c.ulf_customizer_refresh(),c.ulf_customizer_listen({closest:!0})}});var s=function(e){e.preventDefault();var t=c.children(".ulf-repeater-item").length;if(o.hide(),l&&l<t+1)r.show();else{var n=I(this).parent().parent().parent(),i=n.children(".ulf-repeater-content").ulf_clone(),a=n.children(".ulf-repeater-helper").ulf_clone(!0),s=I('<div class="ulf-repeater-item" />');s.append(i),s.append(a),c.children().eq(n.index()).after(s),s.children(".ulf-repeater-content").ulf_reload_script(),T.helper.name_nested_replace(c.children(".ulf-repeater-item"),f),c.ulf_customizer_refresh(),c.ulf_customizer_listen({closest:!0})}};c.children(".ulf-repeater-item").children(".ulf-repeater-helper").on("click",".ulf-repeater-clone",s),n.children(".ulf-repeater-hidden").children(".ulf-repeater-helper").on("click",".ulf-repeater-clone",s);var d=function(e){e.preventDefault();var t=c.children(".ulf-repeater-item").length;r.hide(),o.hide(),a&&t-1<a?o.show():(I(this).closest(".ulf-repeater-item").remove(),T.helper.name_nested_replace(c.children(".ulf-repeater-item"),f),c.ulf_customizer_refresh())};c.children(".ulf-repeater-item").children(".ulf-repeater-helper").on("click",".ulf-repeater-remove",d),n.children(".ulf-repeater-hidden").children(".ulf-repeater-helper").on("click",".ulf-repeater-remove",d)})},I.fn.ulf_field_slider=function(){return this.each(function(){var e=I(this),n=e.find("input"),t=e.find(".ulf-slider-ui"),i=n.data(),a=n.val()||0;t.hasClass("ui-slider")&&t.empty(),t.slider({range:"min",value:a,min:i.min||0,max:i.max||100,step:i.step||1,slide:function(e,t){n.val(t.value).trigger("change")}}),n.on("keyup",function(){t.slider("value",n.val())})})},I.fn.ulf_field_sortable=function(){return this.each(function(){var n=I(this).find(".ulf-sortable");n.sortable({axis:"y",helper:"original",cursor:"move",placeholder:"widget-placeholder",update:function(e,t){n.ulf_customizer_refresh()}}),n.find(".ulf-sortable-content").ulf_reload_script()})},I.fn.ulf_field_sorter=function(){return this.each(function(){var i=I(this),e=i.find(".ulf-enabled"),t=i.find(".ulf-disabled"),n=!!t.length&&t;e.sortable({connectWith:n,placeholder:"ui-sortable-placeholder",update:function(e,t){var n=t.item.find("input");t.item.parent().hasClass("ulf-enabled")?n.attr("name",n.attr("name").replace("disabled","enabled")):n.attr("name",n.attr("name").replace("enabled","disabled")),i.ulf_customizer_refresh()}}),n&&n.sortable({connectWith:e,placeholder:"ui-sortable-placeholder",update:function(e,t){i.ulf_customizer_refresh()}})})},I.fn.ulf_field_spinner=function(){return this.each(function(){var e=I(this),n=e.find("input"),t=e.find(".ui-button"),i=n.data();t.length&&t.remove(),n.spinner({min:i.min||0,max:i.max||100,step:i.step||1,create:function(e,t){i.unit&&n.after('<span class="ui-button ulf--unit">'+i.unit+"</span>")},spin:function(e,t){n.val(t.value).trigger("change")}})})},I.fn.ulf_field_switcher=function(){return this.each(function(){var n=I(this).find(".ulf--switcher");n.on("click",function(){var e=0,t=n.find("input");n.hasClass("ulf--active")?n.removeClass("ulf--active"):(e=1,n.addClass("ulf--active")),t.val(e).trigger("change")})})},I.fn.ulf_field_tabbed=function(){return this.each(function(){var e=I(this),t=e.find(".ulf-tabbed-nav a"),a=e.find(".ulf-tabbed-content");a.eq(0).ulf_reload_script(),t.on("click",function(e){e.preventDefault();var t=I(this),n=t.index(),i=a.eq(n);t.addClass("ulf-tabbed-active").siblings().removeClass("ulf-tabbed-active"),i.ulf_reload_script(),i.removeClass("hidden").siblings().addClass("hidden")})})},I.fn.ulf_field_typography=function(){return this.each(function(){var j=this,L=I(this),i=[],A=ulf_typography_json.webfonts,t=ulf_typography_json.googlestyles,q=ulf_typography_json.defaultstyles;j.sanitize_subset=function(e){return e=(e=e.replace("-ext"," Extended")).charAt(0).toUpperCase()+e.slice(1)},j.sanitize_style=function(e){return t[e]?t[e]:e},j.load_google_font=function(e,t,n){e&&"object"==typeof WebFont&&(t=t?t.replace("normal",""):"",n=n?n.replace("normal",""):"",(t||n)&&(e=e+":"+t+n),-1===i.indexOf(e)&&WebFont.load({google:{families:[e]}}),i.push(e))},j.append_select_options=function(e,t,a,s,c){e.find("option").not(":first").remove();var r="";I.each(t,function(e,t){var n,i=t;n=c?a&&-1!==a.indexOf(t)?" selected":"":a&&a===t?" selected":"","subset"===s?i=j.sanitize_subset(t):"style"===s&&(i=j.sanitize_style(t)),r+='<option value="'+t+'"'+n+">"+i+"</option>"}),e.append(r).trigger("ulf.change").trigger("chosen:updated")},j.init=function(){var l=[],e=L.find(".ulf--typography"),d=L.find(".ulf--type"),h=L.find(".ulf--block-font-style"),v=e.data("unit"),g=e.data("line-height-unit"),t=e.data("exclude")?e.data("exclude").split(","):[];L.find(".ulf--chosen").length&&L.find("select").each(function(){var e=I(this),t=e.parent().find(".chosen-container");t.length&&t.remove(),e.chosen({allow_single_deselect:!0,disable_search_threshold:15,width:"100%"})});var m=L.find(".ulf--font-family"),i=m.val();m.find("option").not(":first-child").remove();var a="";I.each(A,function(n,e){t&&-1!==t.indexOf(n)||(a+='<optgroup label="'+e.label+'">',I.each(e.fonts,function(e,t){a+='<option value="'+(t="object"==typeof t?e:t)+'" data-type="'+n+'"'+(t===i?" selected":"")+">"+t+"</option>"}),a+="</optgroup>")}),m.append(a).trigger("chosen:updated");var p=L.find(".ulf--block-font-style");if(p.length){var u=L.find(".ulf--font-style-select"),_=u.val()?u.val().replace(/normal/g,""):"";u.on("change ulf.change",function(e){var t=u.val();!t&&l&&-1===l.indexOf("normal")&&(t=l[0]);var n=t&&"italic"!==t&&"normal"===t?"normal":"",i=t&&"italic"!==t&&"normal"!==t?t.replace("italic",""):n,a=t&&"italic"===t.substr(-6)?"italic":"";L.find(".ulf--font-weight").val(i),L.find(".ulf--font-style").val(a)});var b=L.find(".ulf--block-extra-styles");if(b.length)var y=L.find(".ulf--extra-styles"),w=y.val()}var C=L.find(".ulf--block-subset");if(C.length)var k=L.find(".ulf--subset"),x=k.val(),z=k.data("multiple")||!1;var D=L.find(".ulf--block-backup-font-family");m.on("change ulf.change",function(e){C.length&&C.addClass("hidden"),b.length&&b.addClass("hidden"),D.length&&D.addClass("hidden");var t=m.find(":selected"),n=t.val(),i=t.data("type");if(i&&n){if("google"!==i&&"custom"!==i||!D.length||D.removeClass("hidden"),p.length){var a=q;"google"===i&&A[i].fonts[n][0]?a=A[i].fonts[n][0]:"custom"===i&&A[i].fonts[n]&&(a=A[i].fonts[n]);var s=-1!==(l=a).indexOf("normal")?"normal":a[0],c=_&&-1!==a.indexOf(_)?_:s;j.append_select_options(u,a,c,"style"),_=!1,p.removeClass("hidden"),"google"===i&&b.length&&1<a.length&&(j.append_select_options(y,a,w,"style",!0),w=!1,b.removeClass("hidden"))}if("google"===i&&C.length&&A[i].fonts[n][1]){var r=A[i].fonts[n][1],o=r.length<2&&"latin"!==r[0]?r[0]:"",f=x&&-1!==r.indexOf(x)?x:o;f=z&&x?x:f,j.append_select_options(k,r,f,"subset",z),x=!1,C.removeClass("hidden")}}else h.find(":input").val(""),C.length&&(k.find("option").not(":first-child").remove(),k.trigger("chosen:updated")),p.length&&(u.find("option").not(":first-child").remove(),u.trigger("chosen:updated"));d.val(i)}).trigger("ulf.change");var O=L.find(".ulf--block-preview");if(O.length){var S=L.find(".ulf--preview");L.on("change",T.helper.debounce(function(e){O.removeClass("hidden");var t=m.val(),n=L.find(".ulf--font-weight").val(),i=L.find(".ulf--font-style").val(),a=L.find(".ulf--font-size").val(),s=L.find(".ulf--font-variant").val(),c=L.find(".ulf--line-height").val(),r=L.find(".ulf--text-align").val(),o=L.find(".ulf--text-transform").val(),f=L.find(".ulf--text-decoration").val(),l=L.find(".ulf--color").val(),d=L.find(".ulf--word-spacing").val(),h=L.find(".ulf--letter-spacing").val(),p=L.find(".ulf--custom-style").val();"google"===L.find(".ulf--type").val()&&j.load_google_font(t,n,i);var u={};t&&(u.fontFamily=t),n&&(u.fontWeight=n),i&&(u.fontStyle=i),s&&(u.fontVariant=s),a&&(u.fontSize=a+v),c&&(u.lineHeight=c+g),h&&(u.letterSpacing=h+v),d&&(u.wordSpacing=d+v),r&&(u.textAlign=r),o&&(u.textTransform=o),f&&(u.textDecoration=f),l&&(u.color=l),S.removeAttr("style"),p&&S.attr("style",p),S.css(u)},100)),O.on("click",function(){S.toggleClass("ulf--black-background");var e=O.find(".ulf--toggle");e.hasClass("fa-toggle-off")?e.removeClass("fa-toggle-off").addClass("fa-toggle-on"):e.removeClass("fa-toggle-on").addClass("fa-toggle-off")}),O.hasClass("hidden")||L.trigger("change")}},j.init()})},I.fn.ulf_field_upload=function(){return this.each(function(){var t,e=I(this),n=e.find("input"),i=e.find(".ulf--button"),a=e.find(".ulf--remove"),s=e.find(".ulf--preview"),c=e.find(".ulf--src"),r=i.data("library")&&i.data("library").split(",")||"";i.on("click",function(e){e.preventDefault(),void 0!==_.wp&&_.wp.media&&_.wp.media.gallery&&(t||(t=_.wp.media({library:{type:r}})).on("select",function(){var e=t.state().get("selection").first().attributes;r.length&&-1===r.indexOf(e.subtype)&&-1===r.indexOf(e.type)||n.val(e.url).trigger("change")}),t.open())}),a.on("click",function(e){e.preventDefault(),n.val("").trigger("change")}),n.on("change",function(e){var t=n.val();t?a.removeClass("hidden"):a.addClass("hidden"),s.length&&(-1!==I.inArray(t.split(".").pop().toLowerCase(),["jpg","jpeg","gif","png","svg","webp"])?(s.removeClass("hidden"),c.attr("src",t)):s.addClass("hidden"))})})},I.fn.ulf_field_wp_editor=function(){return this.each(function(){if(void 0!==_.wp.editor&&void 0!==_.tinyMCEPreInit&&void 0!==_.tinyMCEPreInit.mceInit.ulf_wp_editor){var e=I(this),t=e.find(".ulf-wp-editor"),n=e.find("textarea");(e.find(".wp-editor-wrap").length||e.find(".mce-container").length)&&(t.empty(),t.append(n),n.css("display",""));var i=T.helper.uid("ulf-editor-");n.attr("id",i);var a={tinymce:_.tinyMCEPreInit.mceInit.ulf_wp_editor,quicktags:_.tinyMCEPreInit.qtInit.ulf_wp_editor},s=t.data("editor-settings"),c=wp.oldEditor?wp.oldEditor:wp.editor;c&&c.hasOwnProperty("autop")&&(wp.editor.autop=c.autop,wp.editor.removep=c.removep,wp.editor.initialize=c.initialize);a.tinymce=I.extend({},a.tinymce,{selector:"#"+i,setup:function(t){t.on("change keyup",function(){var e=s.wpautop?t.getContent():wp.editor.removep(t.getContent());n.val(e).trigger("change")})}}),!1===s.tinymce&&(a.tinymce=!1,t.addClass("ulf-no-tinymce")),!1===s.quicktags&&(a.quicktags=!1,t.addClass("ulf-no-quicktags"));var r=setInterval(function(){e.is(":visible")&&(_.wp.editor.initialize(i,a),clearInterval(r))});if(s.media_buttons&&_.ulf_media_buttons){var o=t.find(".wp-media-buttons");if(o.length)o.find(".ulf-shortcode-button").data("editor-id",i);else{var f=I(_.ulf_media_buttons);f.find(".ulf-shortcode-button").data("editor-id",i),t.prepend(f)}}}})},I.fn.ulf_confirm=function(){return this.each(function(){I(this).on("click",function(e){var t=I(this).data("confirm")||_.ulf_vars.i18n.confirm;if(!confirm(t))return e.preventDefault(),!1;T.vars.is_confirm=!0,T.vars.form_modified=!1})})},I.fn.serializeObject=function(){var a={};return I.each(this.serializeArray(),function(e,t){var n=t.name,i=t.value;a[n]=a[n]===y?i:I.isArray(a[n])?a[n].concat(i):[a[n],i]}),a},I.fn.ulf_save=function(){return this.each(function(){var i,a=I(this),c=I(".ulf-save"),r=I(".ulf-options"),o=!1;a.on("click",function(e){if(!o){var t=a.data("save"),n=a.val();c.attr("value",t),a.hasClass("ulf-save-ajax")?(e.preventDefault(),r.addClass("ulf-saving"),c.prop("disabled",!0),_.wp.ajax.post("ulf_"+r.data("unique")+"_ajax_save",{data:I("#ulf-form").serializeJSONULF()}).done(function(e){if(I(".ulf-error").remove(),Object.keys(e.errors).length){var s='<i class="ulf-label-error ulf-error">!</i>';I.each(e.errors,function(e,t){var n=I('[data-depend-id="'+e+'"]'),i=I('a[href="#tab='+n.closest(".ulf-section").data("section-id")+'"]'),a=i.closest(".ulf-tab-item");n.closest(".ulf-fieldset").append('<p class="ulf-error ulf-error-text">'+t+"</p>"),i.find(".ulf-error").length||i.append(s),a.find(".ulf-arrow .ulf-error").length||a.find(".ulf-arrow").append(s)})}r.removeClass("ulf-saving"),c.prop("disabled",!1).attr("value",n),o=!1,T.vars.form_modified=!1,T.vars.$form_warning.hide(),clearTimeout(i);var t=I(".ulf-form-success");t.empty().append(e.notice).fadeIn("fast",function(){i=setTimeout(function(){t.fadeOut("fast")},1e3)})}).fail(function(e){alert(e.error)})):T.vars.form_modified=!1}o=!0})})},I.fn.ulf_options=function(){return this.each(function(){var e=I(this),t=e.find(".ulf-content"),n=e.find(".ulf-form-success"),i=e.find(".ulf-form-warning"),a=e.find(".ulf-header .ulf-save");(T.vars.$form_warning=i).length&&(_.onbeforeunload=function(){return!!T.vars.form_modified||y},t.on("change keypress",":input",function(){T.vars.form_modified||(n.hide(),i.fadeIn("fast"),T.vars.form_modified=!0)})),n.hasClass("ulf-form-show")&&setTimeout(function(){n.fadeOut("fast")},1e3),I(b).keydown(function(e){if((e.ctrlKey||e.metaKey)&&83===e.which)return a.trigger("click"),e.preventDefault(),!1})})},I.fn.ulf_taxonomy=function(){return this.each(function(){var e=I(this),t=e.parents("form");if("addtag"===t.attr("id")){var n=t.find("#submit"),i=e.find(".ulf-field").ulf_clone();n.on("click",function(){t.find(".form-required").hasClass("form-invalid")||(e.data("inited",!1),e.empty(),e.html(i),i=i.ulf_clone(),e.ulf_reload_script())})}})},I.fn.ulf_shortcode=function(){var m=this;return m.shortcode_parse=function(e,n){var i="";return I.each(e,function(e,t){i+="["+(n=n||e),I.each(t,function(e,t){"content"===e?(i+="]",i+=t,i+="[/"+n):i+=m.shortcode_tags(e,t)}),i+="]"}),i},m.shortcode_tags=function(e,t){var n="";return""!==t&&("object"!=typeof t||I.isArray(t)?n+=" "+e+'="'+t.toString()+'"':I.each(t,function(e,t){switch(e){case"background-image":t=t.url?t.url:""}""!==t&&(n+=" "+e+'="'+t.toString()+'"')})),n},m.insertAtChars=function(e,t){var n=void 0!==e[0].name?e[0]:e;return n.value.length&&void 0!==n.selectionStart?(n.focus(),n.value.substring(0,n.selectionStart)+t+n.value.substring(n.selectionEnd,n.value.length)):(n.focus(),t)},m.send_to_editor=function(e,t){var n;if("undefined"!=typeof tinymce&&(n=tinymce.get(t)),n&&!n.isHidden())n.execCommand("mceInsertContent",!1,e);else{var i=I("#"+t);i.val(m.insertAtChars(i,e)).trigger("change")}},this.each(function(){var c,r,o,n,f,l,d,a,h,p=I(this),i=p.find(".ulf-modal-load"),u=(p.find(".ulf-modal-content"),p.find(".ulf-modal-insert")),s=p.find(".ulf-modal-loading"),t=p.find("select"),v=p.data("modal-id"),g=p.data("nonce");I(b).on("click",'.ulf-shortcode-button[data-modal-id="'+v+'"]',function(e){e.preventDefault(),h=I(this),c=h.data("editor-id")||!1,r=h.data("target-id")||!1,o=h.data("gutenberg-id")||!1,p.removeClass("hidden"),p.hasClass("ulf-shortcode-single")&&f===y&&t.trigger("change")}),t.on("change",function(){var e=I(this),t=e.find(":selected");n=e.val(),f=t.data("shortcode"),l=t.data("view")||"normal",d=t.data("group")||f,i.empty(),n?(s.show(),_.wp.ajax.post("ulf-get-shortcode-"+v,{shortcode_key:n,nonce:g}).done(function(e){s.hide();var t=I(e.content).appendTo(i);u.parent().removeClass("hidden"),a=t.find(".ulf--repeat-shortcode").ulf_clone(),t.ulf_reload_script(),t.find(".ulf-fields").ulf_reload_script()})):u.parent().addClass("hidden")}),u.on("click",function(e){if(e.preventDefault(),!u.prop("disabled")&&!u.attr("disabled")){var i="",t=p.find(".ulf-field:not(.ulf-depend-on)").find(":input:not(.ignore)").serializeObjectULF();switch(l){case"contents":var n=f?t[f]:t;I.each(n,function(e,t){var n=f||e;i+="["+n+"]"+t+"[/"+n+"]"});break;case"group":i+="["+f,I.each(t[f],function(e,t){i+=m.shortcode_tags(e,t)}),i+="]",i+=m.shortcode_parse(t[d],d),i+="[/"+f+"]";break;case"repeater":i+=m.shortcode_parse(t[d],d);break;default:i+=m.shortcode_parse(t)}if(i=""===i?"["+f+"]":i,o){var a=_.ulf_gutenberg_props.attributes.hasOwnProperty("shortcode")?_.ulf_gutenberg_props.attributes.shortcode:"";_.ulf_gutenberg_props.setAttributes({shortcode:a+i})}else if(c)m.send_to_editor(i,c);else{var s=r?I(r):h.parent().find("textarea");s.val(m.insertAtChars(s,i)).trigger("change")}p.addClass("hidden")}}),p.on("click",".ulf--repeat-button",function(e){e.preventDefault();var t=p.find(".ulf--repeatable"),n=a.ulf_clone(),i=n.find(".ulf-repeat-remove");n.appendTo(t);n.find(".ulf-fields").ulf_reload_script(),T.helper.name_nested_replace(p.find(".ulf--repeat-shortcode"),d),i.on("click",function(){n.remove(),T.helper.name_nested_replace(p.find(".ulf--repeat-shortcode"),d)})}),p.on("click",".ulf-modal-close, .ulf-modal-overlay",function(){p.addClass("hidden")})})},"function"==typeof Color&&(Color.prototype.toString=function(){if(this._alpha<1)return this.toCSS("rgba",this._alpha).replace(/\s+/g,"");var e=parseInt(this._color,10).toString(16);if(this.error)return"";if(e.length<6)for(var t=6-e.length-1;0<=t;t--)e="0"+e;return"#"+e}),T.funcs.parse_color=function(e){var t=e.replace(/\s+/g,""),n=-1!==t.indexOf("rgba")?parseFloat(100*t.replace(/^.*,(.+)\)/,"$1")):100;return{value:t,transparent:n,rgba:n<100}},I.fn.ulf_color=function(){return this.each(function(){var c,r=I(this),o=T.funcs.parse_color(r.val()),e=!_.ulf_vars.color_palette.length||_.ulf_vars.color_palette;r.hasClass("wp-color-picker")&&r.closest(".wp-picker-container").after(r).remove(),r.wpColorPicker({palettes:e,change:function(e,t){var n=t.color.toString();c.removeClass("ulf--transparent-active"),c.find(".ulf--transparent-offset").css("background-color",n),r.val(n).trigger("change")},create:function(){c=r.closest(".wp-picker-container");var i=r.data("a8cIris"),e=I('<div class="ulf--transparent-wrap"><div class="ulf--transparent-slider"></div><div class="ulf--transparent-offset"></div><div class="ulf--transparent-text"></div><div class="ulf--transparent-button">transparent <i class="fas fa-toggle-off"></i></div></div>').appendTo(c.find(".wp-picker-holder")),a=e.find(".ulf--transparent-slider"),s=e.find(".ulf--transparent-text"),n=e.find(".ulf--transparent-offset"),t=e.find(".ulf--transparent-button");"transparent"===r.val()&&c.addClass("ulf--transparent-active"),t.on("click",function(){"transparent"!==r.val()?(r.val("transparent").trigger("change").removeClass("iris-error"),c.addClass("ulf--transparent-active")):(r.val(i._color.toString()).trigger("change"),c.removeClass("ulf--transparent-active"))}),a.slider({value:o.transparent,step:1,min:0,max:100,slide:function(e,t){var n=parseFloat(t.value/100);i._color._alpha=n,r.wpColorPicker("color",i._color.toString()),s.text(1===n||0===n?"":n)},create:function(){var e=parseFloat(o.transparent/100),t=e<1?e:"";s.text(t),n.css("background-color",o.value),c.on("click",".wp-picker-clear",function(){i._color._alpha=1,s.text(""),a.slider("option","value",100),c.removeClass("ulf--transparent-active"),r.trigger("change")}),c.on("click",".wp-picker-default",function(){var e=T.funcs.parse_color(r.data("default-color")),t=parseFloat(e.transparent/100),n=t<1?t:"";i._color._alpha=t,s.text(n),a.slider("option","value",e.transparent),"transparent"===e.value&&(r.removeClass("iris-error"),c.addClass("ulf--transparent-active"))})}})}})})},I.fn.ulf_chosen=function(){return this.each(function(){var s=I(this),e=s.parent().find(".chosen-container"),t=s.hasClass("ulf-chosen-sortable")||!1,n=s.hasClass("ulf-chosen-ajax")||!1,i=s.attr("multiple")||!1,a=i?"100%":"auto",c=I.extend({allow_single_deselect:!0,disable_search_threshold:10,width:a,no_results_text:_.ulf_vars.i18n.no_results_text},s.data("chosen-settings"));if(e.length&&e.remove(),n){var r=I.extend({data:{type:"post",nonce:""},allow_single_deselect:!0,disable_search_threshold:-1,width:"100%",min_length:3,type_delay:500,typing_text:_.ulf_vars.i18n.typing_text,searching_text:_.ulf_vars.i18n.searching_text,no_results_text:_.ulf_vars.i18n.no_results_text},s.data("chosen-settings"));s.ULFAjaxChosen(r)}else s.chosen(c);if(i){var o=s.parent().find(".ulf-hide-select"),f=o.val()||[];s.on("change",function(e,t){t&&t.selected?o.append('<option value="'+t.selected+'" selected="selected">'+t.selected+"</option>"):t&&t.deselected&&o.find('option[value="'+t.deselected+'"]').remove(),_.wp.customize!==y&&0===o.children().length&&o.data("customize-setting-link")&&_.wp.customize.control(o.data("customize-setting-link")).setting.set(""),o.trigger("change")}),s.ULFChosenOrder(f,!0)}if(t){var l=s.parent().find(".chosen-container").find(".chosen-choices");l.bind("mousedown",function(e){I(e.target).is("span")&&e.stopPropagation()}),l.sortable({items:"li:not(.search-field)",helper:"orginal",cursor:"move",placeholder:"search-choice-placeholder",start:function(e,t){t.placeholder.width(t.item.innerWidth()),t.placeholder.height(t.item.innerHeight())},update:function(e,t){var i="",a=s.data("chosen"),n=s.parent().find(".ulf-hide-select");l.find(".search-choice-close").each(function(){var n=I(this).data("option-array-index");I.each(a.results_data,function(e,t){t.array_index===n&&(i+='<option value="'+t.value+'" selected>'+t.value+"</option>")})}),n.children().remove(),n.append(i),n.trigger("change")}})}})},I.fn.ulf_checkbox=function(){return this.each(function(){var e=I(this),t=e.find(".ulf--input"),n=e.find(".ulf--checkbox");n.on("click",function(){t.val(Number(n.prop("checked"))).trigger("change")})})},I.fn.ulf_siblings=function(){return this.each(function(){var t=I(this),e=t.find(".ulf--sibling"),n=t.data("multiple")||!1;e.on("click",function(){var e=I(this);n?e.hasClass("ulf--active")?(e.removeClass("ulf--active"),e.find("input").prop("checked",!1).trigger("change")):(e.addClass("ulf--active"),e.find("input").prop("checked",!0).trigger("change")):(t.find("input").prop("checked",!1),e.find("input").prop("checked",!0).trigger("change"),e.addClass("ulf--active").siblings().removeClass("ulf--active"))})})},I.fn.ulf_help=function(){return this.each(function(){var e,t,n=I(this);n.on({mouseenter:function(){e=I('<div class="ulf-tooltip"></div>').html(n.find(".ulf-help-text").html()).appendTo("body"),t=T.vars.is_rtl?n.offset().left+24:n.offset().left-e.outerWidth(),e.css({top:n.offset().top-(e.outerHeight()/2-14),left:t})},mouseleave:function(){e!==y&&e.remove()}})})},I.fn.ulf_customizer_refresh=function(){return this.each(function(){var e=I(this),t=e.closest(".ulf-customize-complex");if(t.length){var n=t.data("unique-id");if(n===y)return;var i=t.find(":input"),a=t.data("option-id"),s=i.serializeObjectULF(),c=!I.isEmptyObject(s)&&s[n]&&s[n][a]?s[n][a]:"",r=_.wp.customize.control(n+"["+a+"]");r.setting._value=null,r.setting.set(c)}else e.find(":input").first().trigger("change");I(b).trigger("ulf-customizer-refresh",e)})},I.fn.ulf_customizer_listen=function(e){var t=I.extend({closest:!1},e);return this.each(function(){if(_.wp.customize!==y){var n=t.closest?I(this).closest(".ulf-customize-complex"):I(this),e=n.find(":input"),i=n.data("unique-id"),a=n.data("option-id");i!==y&&e.on("change keyup ulf.change",function(){var e=n.find(":input").serializeObjectULF(),t=!I.isEmptyObject(e)&&e[i]&&e[i][a]?e[i][a]:"";_.wp.customize.control(i+"["+a+"]").setting.set(t)})}})},I(b).on("expanded",".control-section",function(){var e=I(this);if(e.hasClass("open")&&!e.data("inited")){var t=e.find(".ulf-customize-field"),n=e.find(".ulf-customize-complex");t.length&&(e.ulf_dependency(),t.ulf_reload_script({dependency:!1}),n.ulf_customizer_listen()),e.data("inited",!0)}}),T.vars.$window.on("resize ulf.resize",T.helper.debounce(function(e){(-1<navigator.userAgent.indexOf("AppleWebKit/")?T.vars.$window.width():_.innerWidth)<=782&&!T.vars.onloaded&&(I(".ulf-section").ulf_reload_script(),T.vars.onloaded=!0)},200)).trigger("ulf.resize"),I.fn.ulf_widgets=function(){return this.each(function(){I(b).on("widget-added widget-updated",function(e,t){var n=t.find(".ulf-fields");n.length&&n.ulf_reload_script()}),I(b).on("click",".widget-top",function(e){var t=I(this).parent().find(".ulf-fields");t.length&&t.ulf_reload_script()}),I(".widgets-sortables, .control-section-sidebar").on("sortstop",function(e,t){t.item.find(".ulf-fields").ulf_reload_script_retry()})})},I.fn.ulf_nav_menu=function(){return this.each(function(){var e=I(this);e.on("click","a.item-edit",function(){I(this).closest("li.menu-item").find(".ulf-fields").ulf_reload_script()}),e.on("sortstop",function(e,t){t.item.find(".ulf-fields").ulf_reload_script_retry()})})},I.fn.ulf_reload_script_retry=function(){return this.each(function(){var e=I(this);e.data("inited")&&e.children(".ulf-field-wp_editor").ulf_field_wp_editor()})},I.fn.ulf_reload_script=function(e){var t=I.extend({dependency:!0},e);return this.each(function(){var e=I(this);e.data("inited")||(e.children(".ulf-field-accordion").ulf_field_accordion(),e.children(".ulf-field-backup").ulf_field_backup(),e.children(".ulf-field-background").ulf_field_background(),e.children(".ulf-field-code_editor").ulf_field_code_editor(),e.children(".ulf-field-date").ulf_field_date(),e.children(".ulf-field-datetime").ulf_field_datetime(),e.children(".ulf-field-fieldset").ulf_field_fieldset(),e.children(".ulf-field-gallery").ulf_field_gallery(),e.children(".ulf-field-group").ulf_field_group(),e.children(".ulf-field-icon").ulf_field_icon(),e.children(".ulf-field-link").ulf_field_link(),e.children(".ulf-field-media").ulf_field_media(),e.children(".ulf-field-map").ulf_field_map(),e.children(".ulf-field-repeater").ulf_field_repeater(),e.children(".ulf-field-slider").ulf_field_slider(),e.children(".ulf-field-sortable").ulf_field_sortable(),e.children(".ulf-field-sorter").ulf_field_sorter(),e.children(".ulf-field-spinner").ulf_field_spinner(),e.children(".ulf-field-switcher").ulf_field_switcher(),e.children(".ulf-field-tabbed").ulf_field_tabbed(),e.children(".ulf-field-typography").ulf_field_typography(),e.children(".ulf-field-upload").ulf_field_upload(),e.children(".ulf-field-wp_editor").ulf_field_wp_editor(),e.children(".ulf-field-border").find(".ulf-color").ulf_color(),e.children(".ulf-field-background").find(".ulf-color").ulf_color(),e.children(".ulf-field-color").find(".ulf-color").ulf_color(),e.children(".ulf-field-color_group").find(".ulf-color").ulf_color(),e.children(".ulf-field-link_color").find(".ulf-color").ulf_color(),e.children(".ulf-field-typography").find(".ulf-color").ulf_color(),e.children(".ulf-field-select").find(".ulf-chosen").ulf_chosen(),e.children(".ulf-field-checkbox").find(".ulf-checkbox").ulf_checkbox(),e.children(".ulf-field-button_set").find(".ulf-siblings").ulf_siblings(),e.children(".ulf-field-image_select").find(".ulf-siblings").ulf_siblings(),e.children(".ulf-field-palette").find(".ulf-siblings").ulf_siblings(),e.children(".ulf-field").find(".ulf-help").ulf_help(),t.dependency&&e.ulf_dependency(),e.data("inited",!0),I(b).trigger("ulf-reload-script",e))})},I(b).ready(function(){I(".ulf-save").ulf_save(),I(".ulf-options").ulf_options(),I(".ulf-sticky-header").ulf_sticky(),I(".ulf-nav-options").ulf_nav_options(),I(".ulf-nav-metabox").ulf_nav_metabox(),I(".ulf-taxonomy").ulf_taxonomy(),I(".ulf-page-templates").ulf_page_templates(),I(".ulf-post-formats").ulf_post_formats(),I(".ulf-shortcode").ulf_shortcode(),I(".ulf-search").ulf_search(),I(".ulf-confirm").ulf_confirm(),I(".ulf-expand-all").ulf_expand_all(),I(".ulf-onload").ulf_reload_script(),I("#widgets-editor").ulf_widgets(),I("#widgets-right").ulf_widgets(),I("#menu-to-edit").ulf_nav_menu()})}(jQuery,window,document);
admin/settings/assets/js/plugins.min.js CHANGED
@@ -1,3 +1,3 @@
1
- /* Codestar Framework | A Simple and Lightweight WordPress Option Framework - v2.2.7*/
2
 
3
  !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).flatpickr=t()}(this,function(){"use strict";var ee=function(){return(ee=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function te(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var i=Array(e),o=0;for(t=0;t<n;t++)for(var r=arguments[t],s=0,a=r.length;s<a;s++,o++)i[o]=r[s];return i}var ne=["onChange","onClose","onDayCreate","onDestroy","onKeyDown","onMonthChange","onOpen","onParseConfig","onReady","onValueUpdate","onYearChange","onPreCalendarPosition"],ie={_disable:[],allowInput:!1,allowInvalidPreload:!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",autoFillDefaultTime:!0,clickOpens:!0,closeOnSelect:!0,conjunction:", ",dateFormat:"Y-m-d",defaultHour:12,defaultMinute:0,defaultSeconds:0,disable:[],disableMobile:!1,enableSeconds:!1,enableTime:!1,errorHandler:function(e){return"undefined"!=typeof console&&console.warn(e)},getWeek:function(e){var t=new Date(e.getTime());t.setHours(0,0,0,0),t.setDate(t.getDate()+3-(t.getDay()+6)%7);var n=new Date(t.getFullYear(),0,4);return 1+Math.round(((t.getTime()-n.getTime())/864e5-3+(n.getDay()+6)%7)/7)},hourIncrement:1,ignoredFocusElements:[],inline:!1,locale:"default",minuteIncrement:5,mode:"single",monthSelectorType:"dropdown",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},oe={weekdays:{shorthand:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],longhand:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},months:{shorthand:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],longhand:["January","February","March","April","May","June","July","August","September","October","November","December"]},daysInMonth:[31,28,31,30,31,30,31,31,30,31,30,31],firstDayOfWeek:0,ordinal:function(e){var t=e%100;if(3<t&&t<21)return"th";switch(t%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",monthAriaLabel:"Month",hourAriaLabel:"Hour",minuteAriaLabel:"Minute",time_24hr:!1},re=function(e,t){return void 0===t&&(t=2),("000"+e).slice(-1*t)},se=function(e){return!0===e?1:0};function ae(t,n){var i;return function(){var e=this;clearTimeout(i),i=setTimeout(function(){return t.apply(e,arguments)},n)}}var le=function(e){return e instanceof Array?e:[e]};function ce(e,t,n){if(!0===n)return e.classList.add(t);e.classList.remove(t)}function ue(e,t,n){var i=window.document.createElement(e);return t=t||"",n=n||"",i.className=t,void 0!==n&&(i.textContent=n),i}function he(e){for(;e.firstChild;)e.removeChild(e.firstChild)}function de(e,t){var n=ue("div","numInputWrapper"),i=ue("input","numInput "+e),o=ue("span","arrowUp"),r=ue("span","arrowDown");if(-1===navigator.userAgent.indexOf("MSIE 9.0")?i.type="number":(i.type="text",i.pattern="\\d*"),void 0!==t)for(var s in t)i.setAttribute(s,t[s]);return n.appendChild(i),n.appendChild(o),n.appendChild(r),n}function fe(t){try{return"function"!=typeof t.composedPath?t.target:t.composedPath()[0]}catch(e){return t.target}}var e=function(){},pe=function(e,t,n){return n.months[t?"shorthand":"longhand"][e]},b={D:e,F:function(e,t,n){e.setMonth(n.months.longhand.indexOf(t))},G:function(e,t){e.setHours(parseFloat(t))},H:function(e,t){e.setHours(parseFloat(t))},J:function(e,t){e.setDate(parseFloat(t))},K:function(e,t,n){e.setHours(e.getHours()%12+12*se(new RegExp(n.amPM[1],"i").test(t)))},M:function(e,t,n){e.setMonth(n.months.shorthand.indexOf(t))},S:function(e,t){e.setSeconds(parseFloat(t))},U:function(e,t){return new Date(1e3*parseFloat(t))},W:function(e,t,n){var i=parseInt(t),o=new Date(e.getFullYear(),0,2+7*(i-1),0,0,0,0);return o.setDate(o.getDate()-o.getDay()+n.firstDayOfWeek),o},Y:function(e,t){e.setFullYear(parseFloat(t))},Z:function(e,t){return new Date(t)},d:function(e,t){e.setDate(parseFloat(t))},h:function(e,t){e.setHours(parseFloat(t))},i:function(e,t){e.setMinutes(parseFloat(t))},j:function(e,t){e.setDate(parseFloat(t))},l:e,m:function(e,t){e.setMonth(parseFloat(t)-1)},n:function(e,t){e.setMonth(parseFloat(t)-1)},s:function(e,t){e.setSeconds(parseFloat(t))},u:function(e,t){return new Date(parseFloat(t))},w:e,y:function(e,t){e.setFullYear(2e3+parseFloat(t))}},_e={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)",u:"(.+)",w:"(\\d\\d|\\d)",y:"(\\d{2})"},l={Z:function(e){return e.toISOString()},D:function(e,t,n){return t.weekdays.shorthand[l.w(e,t,n)]},F:function(e,t,n){return pe(l.n(e,t,n)-1,!1,t)},G:function(e,t,n){return re(l.h(e,t,n))},H:function(e){return re(e.getHours())},J:function(e,t){return void 0!==t.ordinal?e.getDate()+t.ordinal(e.getDate()):e.getDate()},K:function(e,t){return t.amPM[se(11<e.getHours())]},M:function(e,t){return pe(e.getMonth(),!0,t)},S:function(e){return re(e.getSeconds())},U:function(e){return e.getTime()/1e3},W:function(e,t,n){return n.getWeek(e)},Y:function(e){return re(e.getFullYear(),4)},d:function(e){return re(e.getDate())},h:function(e){return e.getHours()%12?e.getHours()%12:12},i:function(e){return re(e.getMinutes())},j:function(e){return e.getDate()},l:function(e,t){return t.weekdays.longhand[e.getDay()]},m:function(e){return re(e.getMonth()+1)},n:function(e){return e.getMonth()+1},s:function(e){return e.getSeconds()},u:function(e){return e.getTime()},w:function(e){return e.getDay()},y:function(e){return String(e.getFullYear()).substring(2)}},me=function(e){var t=e.config,r=void 0===t?ie:t,n=e.l10n,s=void 0===n?oe:n,i=e.isMobile,a=void 0!==i&&i;return function(i,e,t){var o=t||s;return void 0===r.formatDate||a?e.split("").map(function(e,t,n){return l[e]&&"\\"!==n[t-1]?l[e](i,o,r):"\\"!==e?e:""}).join(""):r.formatDate(i,e,o)}},ge=function(e){var t=e.config,v=void 0===t?ie:t,n=e.l10n,y=void 0===n?oe:n;return function(e,t,n,i){if(0===e||e){var o,r=i||y,s=e;if(e instanceof Date)o=new Date(e.getTime());else if("string"!=typeof e&&void 0!==e.toFixed)o=new Date(e);else if("string"==typeof e){var a=t||(v||ie).dateFormat,l=String(e).trim();if("today"===l)o=new Date,n=!0;else if(/Z$/.test(l)||/GMT$/.test(l))o=new Date(e);else if(v&&v.parseDate)o=v.parseDate(e,a);else{o=v&&v.noCalendar?new Date((new Date).setHours(0,0,0,0)):new Date((new Date).getFullYear(),0,1,0,0,0,0);for(var c=void 0,u=[],h=0,d=0,f="";h<a.length;h++){var p=a[h],_="\\"===p,m="\\"===a[h-1]||_;if(_e[p]&&!m){f+=_e[p];var g=new RegExp(f).exec(e);g&&(c=!0)&&u["Y"!==p?"push":"unshift"]({fn:b[p],val:g[++d]})}else _||(f+=".");u.forEach(function(e){var t=e.fn,n=e.val;return o=t(o,n,r)||o})}o=c?o:void 0}}if(o instanceof Date&&!isNaN(o.getTime()))return!0===n&&o.setHours(0,0,0,0),o;v.errorHandler(new Error("Invalid date provided: "+s))}}};function ve(e,t,n){return void 0===n&&(n=!0),!1!==n?new Date(e.getTime()).setHours(0,0,0,0)-new Date(t.getTime()).setHours(0,0,0,0):e.getTime()-t.getTime()}var ye=function(e,t,n){return e>Math.min(t,n)&&e<Math.max(t,n)},be={DAY:864e5};function we(e){var t=e.defaultHour,n=e.defaultMinute,i=e.defaultSeconds;if(void 0!==e.minDate){var o=e.minDate.getHours(),r=e.minDate.getMinutes(),s=e.minDate.getSeconds();t<o&&(t=o),t===o&&n<r&&(n=r),t===o&&n===r&&i<s&&(i=e.minDate.getSeconds())}if(void 0!==e.maxDate){var a=e.maxDate.getHours(),l=e.maxDate.getMinutes();(t=Math.min(t,a))===a&&(n=Math.min(l,n)),t===a&&n===l&&(i=e.maxDate.getSeconds())}return{hours:t,minutes:n,seconds:i}}"function"!=typeof Object.assign&&(Object.assign=function(n){for(var e=[],t=1;t<arguments.length;t++)e[t-1]=arguments[t];if(!n)throw TypeError("Cannot convert undefined or null to object");for(var i=function(t){t&&Object.keys(t).forEach(function(e){return n[e]=t[e]})},o=0,r=e;o<r.length;o++){i(r[o])}return n});var De=300;function s(d,u){var D={config:ee(ee({},ie),Ce.defaultConfig),l10n:oe};function h(e){return e.bind(D)}function t(){var t=D.config;!1===t.weekNumbers&&1===t.showMonths||!0!==t.noCalendar&&window.requestAnimationFrame(function(){if(void 0!==D.calendarContainer&&(D.calendarContainer.style.visibility="hidden",D.calendarContainer.style.display="block"),void 0!==D.daysContainer){var e=(D.days.offsetWidth+1)*t.showMonths;D.daysContainer.style.width=e+"px",D.calendarContainer.style.width=e+(void 0!==D.weekWrapper?D.weekWrapper.offsetWidth:0)+"px",D.calendarContainer.style.removeProperty("visibility"),D.calendarContainer.style.removeProperty("display")}})}function f(e){if(0===D.selectedDates.length){var t=void 0===D.config.minDate||0<=ve(new Date,D.config.minDate)?new Date:new Date(D.config.minDate.getTime()),n=we(D.config);t.setHours(n.hours,n.minutes,n.seconds,t.getMilliseconds()),D.selectedDates=[t],D.latestSelectedDateObj=t}void 0!==e&&"blur"!==e.type&&function(e){e.preventDefault();var t="keydown"===e.type,n=fe(e),i=n;void 0!==D.amPM&&n===D.amPM&&(D.amPM.textContent=D.l10n.amPM[se(D.amPM.textContent===D.l10n.amPM[0])]);var o=parseFloat(i.getAttribute("min")),r=parseFloat(i.getAttribute("max")),s=parseFloat(i.getAttribute("step")),a=parseInt(i.value,10),l=e.delta||(t?38===e.which?1:-1:0),c=a+s*l;if(void 0!==i.value&&2===i.value.length){var u=i===D.hourElement,h=i===D.minuteElement;c<o?(c=r+c+se(!u)+(se(u)&&se(!D.amPM)),h&&_(void 0,-1,D.hourElement)):r<c&&(c=i===D.hourElement?c-r-se(!D.amPM):o,h&&_(void 0,1,D.hourElement)),D.amPM&&u&&(1===s?c+a===23:Math.abs(c-a)>s)&&(D.amPM.textContent=D.l10n.amPM[se(D.amPM.textContent===D.l10n.amPM[0])]),i.value=re(c)}}(e);var i=D._input.value;p(),X(),D._input.value!==i&&D._debouncedChange()}function p(){if(void 0!==D.hourElement&&void 0!==D.minuteElement){var e,t,n=(parseInt(D.hourElement.value.slice(-2),10)||0)%24,i=(parseInt(D.minuteElement.value,10)||0)%60,o=void 0!==D.secondElement?(parseInt(D.secondElement.value,10)||0)%60:0;void 0!==D.amPM&&(e=n,t=D.amPM.textContent,n=e%12+12*se(t===D.l10n.amPM[1]));var r=void 0!==D.config.minTime||D.config.minDate&&D.minDateHasTime&&D.latestSelectedDateObj&&0===ve(D.latestSelectedDateObj,D.config.minDate,!0);if(void 0!==D.config.maxTime||D.config.maxDate&&D.maxDateHasTime&&D.latestSelectedDateObj&&0===ve(D.latestSelectedDateObj,D.config.maxDate,!0)){var s=void 0!==D.config.maxTime?D.config.maxTime:D.config.maxDate;(n=Math.min(n,s.getHours()))===s.getHours()&&(i=Math.min(i,s.getMinutes())),i===s.getMinutes()&&(o=Math.min(o,s.getSeconds()))}if(r){var a=void 0!==D.config.minTime?D.config.minTime:D.config.minDate;(n=Math.max(n,a.getHours()))===a.getHours()&&i<a.getMinutes()&&(i=a.getMinutes()),i===a.getMinutes()&&(o=Math.max(o,a.getSeconds()))}l(n,i,o)}}function o(e){var t=e||D.latestSelectedDateObj;t&&l(t.getHours(),t.getMinutes(),t.getSeconds())}function l(e,t,n){void 0!==D.latestSelectedDateObj&&D.latestSelectedDateObj.setHours(e%24,t,n||0,0),D.hourElement&&D.minuteElement&&!D.isMobile&&(D.hourElement.value=re(D.config.time_24hr?e:(12+e)%12+12*se(e%12==0)),D.minuteElement.value=re(t),void 0!==D.amPM&&(D.amPM.textContent=D.l10n.amPM[se(12<=e)]),void 0!==D.secondElement&&(D.secondElement.value=re(n)))}function n(e){var t=fe(e),n=parseInt(t.value)+(e.delta||0);(1<n/1e3||"Enter"===e.key&&!/[^\d]/.test(n.toString()))&&S(n)}function s(t,n,i,o){return n instanceof Array?n.forEach(function(e){return s(t,e,i,o)}):t instanceof Array?t.forEach(function(e){return s(e,n,i,o)}):(t.addEventListener(n,i,o),void D._handlers.push({remove:function(){return t.removeEventListener(n,i)}}))}function c(){K("onChange")}function i(e,t){var n=void 0!==e?D.parseDate(e):D.latestSelectedDateObj||(D.config.minDate&&D.config.minDate>D.now?D.config.minDate:D.config.maxDate&&D.config.maxDate<D.now?D.config.maxDate:D.now),i=D.currentYear,o=D.currentMonth;try{void 0!==n&&(D.currentYear=n.getFullYear(),D.currentMonth=n.getMonth())}catch(e){e.message="Invalid date supplied: "+n,D.config.errorHandler(e)}t&&D.currentYear!==i&&(K("onYearChange"),w()),!t||D.currentYear===i&&D.currentMonth===o||K("onMonthChange"),D.redraw()}function r(e){var t=fe(e);~t.className.indexOf("arrow")&&_(e,t.classList.contains("arrowUp")?1:-1)}function _(e,t,n){var i=e&&fe(e),o=n||i&&i.parentNode&&i.parentNode.firstChild,r=$("increment");r.delta=t,o&&o.dispatchEvent(r)}function m(e,t,n,i){var o,r=A(t,!0),s=ue("span","flatpickr-day "+e,t.getDate().toString());return s.dateObj=t,s.$i=i,s.setAttribute("aria-label",D.formatDate(t,D.config.ariaDateFormat)),-1===e.indexOf("hidden")&&0===ve(t,D.now)&&((D.todayDateElem=s).classList.add("today"),s.setAttribute("aria-current","date")),r?(s.tabIndex=-1,Q(t)&&(s.classList.add("selected"),D.selectedDateElem=s,"range"===D.config.mode&&(ce(s,"startRange",D.selectedDates[0]&&0===ve(t,D.selectedDates[0],!0)),ce(s,"endRange",D.selectedDates[1]&&0===ve(t,D.selectedDates[1],!0)),"nextMonthDay"===e&&s.classList.add("inRange")))):s.classList.add("flatpickr-disabled"),"range"===D.config.mode&&(o=t,!("range"!==D.config.mode||D.selectedDates.length<2)&&0<=ve(o,D.selectedDates[0])&&ve(o,D.selectedDates[1])<=0&&!Q(t)&&s.classList.add("inRange")),D.weekNumbers&&1===D.config.showMonths&&"prevMonthDay"!==e&&n%7==1&&D.weekNumbers.insertAdjacentHTML("beforeend","<span class='flatpickr-day'>"+D.config.getWeek(t)+"</span>"),K("onDayCreate",s),s}function g(e){e.focus(),"range"===D.config.mode&&F(e)}function v(e){for(var t=0<e?0:D.config.showMonths-1,n=0<e?D.config.showMonths:-1,i=t;i!=n;i+=e)for(var o=D.daysContainer.children[i],r=0<e?0:o.children.length-1,s=0<e?o.children.length:-1,a=r;a!=s;a+=e){var l=o.children[a];if(-1===l.className.indexOf("hidden")&&A(l.dateObj))return l}}function y(e,t){var n=I(document.activeElement||document.body),i=void 0!==e?e:n?document.activeElement:void 0!==D.selectedDateElem&&I(D.selectedDateElem)?D.selectedDateElem:void 0!==D.todayDateElem&&I(D.todayDateElem)?D.todayDateElem:v(0<t?1:-1);void 0===i?D._input.focus():n?function(e,t){for(var n=-1===e.className.indexOf("Month")?e.dateObj.getMonth():D.currentMonth,i=0<t?D.config.showMonths:-1,o=0<t?1:-1,r=n-D.currentMonth;r!=i;r+=o)for(var s=D.daysContainer.children[r],a=n-D.currentMonth===r?e.$i+t:t<0?s.children.length-1:0,l=s.children.length,c=a;0<=c&&c<l&&c!=(0<t?l:-1);c+=o){var u=s.children[c];if(-1===u.className.indexOf("hidden")&&A(u.dateObj)&&Math.abs(e.$i-c)>=Math.abs(t))return g(u)}D.changeMonth(o),y(v(o),0)}(i,t):g(i)}function a(e,t){for(var n=(new Date(e,t,1).getDay()-D.l10n.firstDayOfWeek+7)%7,i=D.utils.getDaysInMonth((t-1+12)%12,e),o=D.utils.getDaysInMonth(t,e),r=window.document.createDocumentFragment(),s=1<D.config.showMonths,a=s?"prevMonthDay hidden":"prevMonthDay",l=s?"nextMonthDay hidden":"nextMonthDay",c=i+1-n,u=0;c<=i;c++,u++)r.appendChild(m(a,new Date(e,t-1,c),c,u));for(c=1;c<=o;c++,u++)r.appendChild(m("",new Date(e,t,c),c,u));for(var h=o+1;h<=42-n&&(1===D.config.showMonths||u%7!=0);h++,u++)r.appendChild(m(l,new Date(e,t+1,h%o),h,u));var d=ue("div","dayContainer");return d.appendChild(r),d}function b(){if(void 0!==D.daysContainer){he(D.daysContainer),D.weekNumbers&&he(D.weekNumbers);for(var e=document.createDocumentFragment(),t=0;t<D.config.showMonths;t++){var n=new Date(D.currentYear,D.currentMonth,1);n.setMonth(D.currentMonth+t),e.appendChild(a(n.getFullYear(),n.getMonth()))}D.daysContainer.appendChild(e),D.days=D.daysContainer.firstChild,"range"===D.config.mode&&1===D.selectedDates.length&&F()}}function w(){if(!(1<D.config.showMonths||"dropdown"!==D.config.monthSelectorType)){var e;D.monthsDropdownContainer.tabIndex=-1,D.monthsDropdownContainer.innerHTML="";for(var t=0;t<12;t++)if(e=t,!(void 0!==D.config.minDate&&D.currentYear===D.config.minDate.getFullYear()&&e<D.config.minDate.getMonth()||void 0!==D.config.maxDate&&D.currentYear===D.config.maxDate.getFullYear()&&e>D.config.maxDate.getMonth())){var n=ue("option","flatpickr-monthDropdown-month");n.value=new Date(D.currentYear,t).getMonth().toString(),n.textContent=pe(t,D.config.shorthandCurrentMonth,D.l10n),n.tabIndex=-1,D.currentMonth===t&&(n.selected=!0),D.monthsDropdownContainer.appendChild(n)}}}function C(){var e,t=ue("div","flatpickr-month"),n=window.document.createDocumentFragment();e=1<D.config.showMonths||"static"===D.config.monthSelectorType?ue("span","cur-month"):(D.monthsDropdownContainer=ue("select","flatpickr-monthDropdown-months"),D.monthsDropdownContainer.setAttribute("aria-label",D.l10n.monthAriaLabel),s(D.monthsDropdownContainer,"change",function(e){var t=fe(e),n=parseInt(t.value,10);D.changeMonth(n-D.currentMonth),K("onMonthChange")}),w(),D.monthsDropdownContainer);var i=de("cur-year",{tabindex:"-1"}),o=i.getElementsByTagName("input")[0];o.setAttribute("aria-label",D.l10n.yearAriaLabel),D.config.minDate&&o.setAttribute("min",D.config.minDate.getFullYear().toString()),D.config.maxDate&&(o.setAttribute("max",D.config.maxDate.getFullYear().toString()),o.disabled=!!D.config.minDate&&D.config.minDate.getFullYear()===D.config.maxDate.getFullYear());var r=ue("div","flatpickr-current-month");return r.appendChild(e),r.appendChild(i),n.appendChild(r),t.appendChild(n),{container:t,yearElement:o,monthElement:e}}function x(){he(D.monthNav),D.monthNav.appendChild(D.prevMonthNav),D.config.showMonths&&(D.yearElements=[],D.monthElements=[]);for(var e=D.config.showMonths;e--;){var t=C();D.yearElements.push(t.yearElement),D.monthElements.push(t.monthElement),D.monthNav.appendChild(t.container)}D.monthNav.appendChild(D.nextMonthNav)}function M(){D.weekdayContainer?he(D.weekdayContainer):D.weekdayContainer=ue("div","flatpickr-weekdays");for(var e=D.config.showMonths;e--;){var t=ue("div","flatpickr-weekdaycontainer");D.weekdayContainer.appendChild(t)}return k(),D.weekdayContainer}function k(){if(D.weekdayContainer){var e=D.l10n.firstDayOfWeek,t=te(D.l10n.weekdays.shorthand);0<e&&e<t.length&&(t=te(t.splice(e,t.length),t.splice(0,e)));for(var n=D.config.showMonths;n--;)D.weekdayContainer.children[n].innerHTML="\n <span class='flatpickr-weekday'>\n "+t.join("</span><span class='flatpickr-weekday'>")+"\n </span>\n "}}function E(e,t){void 0===t&&(t=!0);var n=t?e:e-D.currentMonth;n<0&&!0===D._hidePrevMonthArrow||0<n&&!0===D._hideNextMonthArrow||(D.currentMonth+=n,(D.currentMonth<0||11<D.currentMonth)&&(D.currentYear+=11<D.currentMonth?1:-1,D.currentMonth=(D.currentMonth+12)%12,K("onYearChange"),w()),b(),K("onMonthChange"),V())}function T(e){return!(!D.config.appendTo||!D.config.appendTo.contains(e))||D.calendarContainer.contains(e)}function O(e){if(D.isOpen&&!D.config.inline){var t=fe(e),n=T(t),i=t===D.input||t===D.altInput||D.element.contains(t)||e.path&&e.path.indexOf&&(~e.path.indexOf(D.input)||~e.path.indexOf(D.altInput)),o="blur"===e.type?i&&e.relatedTarget&&!T(e.relatedTarget):!i&&!n&&!T(e.relatedTarget),r=!D.config.ignoredFocusElements.some(function(e){return e.contains(t)});o&&r&&(void 0!==D.timeContainer&&void 0!==D.minuteElement&&void 0!==D.hourElement&&""!==D.input.value&&void 0!==D.input.value&&f(),D.close(),D.config&&"range"===D.config.mode&&1===D.selectedDates.length&&(D.clear(!1),D.redraw()))}}function S(e){if(!(!e||D.config.minDate&&e<D.config.minDate.getFullYear()||D.config.maxDate&&e>D.config.maxDate.getFullYear())){var t=e,n=D.currentYear!==t;D.currentYear=t||D.currentYear,D.config.maxDate&&D.currentYear===D.config.maxDate.getFullYear()?D.currentMonth=Math.min(D.config.maxDate.getMonth(),D.currentMonth):D.config.minDate&&D.currentYear===D.config.minDate.getFullYear()&&(D.currentMonth=Math.max(D.config.minDate.getMonth(),D.currentMonth)),n&&(D.redraw(),K("onYearChange"),w())}}function A(e,t){var n;void 0===t&&(t=!0);var i=D.parseDate(e,void 0,t);if(D.config.minDate&&i&&ve(i,D.config.minDate,void 0!==t?t:!D.minDateHasTime)<0||D.config.maxDate&&i&&0<ve(i,D.config.maxDate,void 0!==t?t:!D.maxDateHasTime))return!1;if(!D.config.enable&&0===D.config.disable.length)return!0;if(void 0===i)return!1;for(var o=!!D.config.enable,r=null!==(n=D.config.enable)&&void 0!==n?n:D.config.disable,s=0,a=void 0;s<r.length;s++){if("function"==typeof(a=r[s])&&a(i))return o;if(a instanceof Date&&void 0!==i&&a.getTime()===i.getTime())return o;if("string"==typeof a){var l=D.parseDate(a,void 0,!0);return l&&l.getTime()===i.getTime()?o:!o}if("object"==typeof a&&void 0!==i&&a.from&&a.to&&i.getTime()>=a.from.getTime()&&i.getTime()<=a.to.getTime())return o}return!o}function I(e){return void 0!==D.daysContainer&&(-1===e.className.indexOf("hidden")&&-1===e.className.indexOf("flatpickr-disabled")&&D.daysContainer.contains(e))}function N(e){!(e.target===D._input)||!(0<D.selectedDates.length||0<D._input.value.length)||e.relatedTarget&&T(e.relatedTarget)||D.setDate(D._input.value,!0,e.target===D.altInput?D.config.altFormat:D.config.dateFormat)}function j(e){var t=fe(e),n=D.config.wrap?d.contains(t):t===D._input,i=D.config.allowInput,o=D.isOpen&&(!i||!n),r=D.config.inline&&n&&!i;if(13===e.keyCode&&n){if(i)return D.setDate(D._input.value,!0,t===D.altInput?D.config.altFormat:D.config.dateFormat),t.blur();D.open()}else if(T(t)||o||r){var s=!!D.timeContainer&&D.timeContainer.contains(t);switch(e.keyCode){case 13:s?(e.preventDefault(),f(),W()):B(e);break;case 27:e.preventDefault(),W();break;case 8:case 46:n&&!D.config.allowInput&&(e.preventDefault(),D.clear());break;case 37:case 39:if(s||n)D.hourElement&&D.hourElement.focus();else if(e.preventDefault(),void 0!==D.daysContainer&&(!1===i||document.activeElement&&I(document.activeElement))){var a=39===e.keyCode?1:-1;e.ctrlKey?(e.stopPropagation(),E(a),y(v(1),0)):y(void 0,a)}break;case 38:case 40:e.preventDefault();var l=40===e.keyCode?1:-1;D.daysContainer&&void 0!==t.$i||t===D.input||t===D.altInput?e.ctrlKey?(e.stopPropagation(),S(D.currentYear-l),y(v(1),0)):s||y(void 0,7*l):t===D.currentYearElement?S(D.currentYear-l):D.config.enableTime&&(!s&&D.hourElement&&D.hourElement.focus(),f(e),D._debouncedChange());break;case 9:if(s){var c=[D.hourElement,D.minuteElement,D.secondElement,D.amPM].concat(D.pluginElements).filter(function(e){return e}),u=c.indexOf(t);if(-1!==u){var h=c[u+(e.shiftKey?-1:1)];e.preventDefault(),(h||D._input).focus()}}else!D.config.noCalendar&&D.daysContainer&&D.daysContainer.contains(t)&&e.shiftKey&&(e.preventDefault(),D._input.focus())}}if(void 0!==D.amPM&&t===D.amPM)switch(e.key){case D.l10n.amPM[0].charAt(0):case D.l10n.amPM[0].charAt(0).toLowerCase():D.amPM.textContent=D.l10n.amPM[0],p(),X();break;case D.l10n.amPM[1].charAt(0):case D.l10n.amPM[1].charAt(0).toLowerCase():D.amPM.textContent=D.l10n.amPM[1],p(),X()}(n||T(t))&&K("onKeyDown",e)}function F(r){if(1===D.selectedDates.length&&(!r||r.classList.contains("flatpickr-day")&&!r.classList.contains("flatpickr-disabled"))){for(var s=r?r.dateObj.getTime():D.days.firstElementChild.dateObj.getTime(),a=D.parseDate(D.selectedDates[0],void 0,!0).getTime(),e=Math.min(s,D.selectedDates[0].getTime()),t=Math.max(s,D.selectedDates[0].getTime()),l=!1,c=0,u=0,n=e;n<t;n+=be.DAY)A(new Date(n),!0)||(l=l||e<n&&n<t,n<a&&(!c||c<n)?c=n:a<n&&(!u||n<u)&&(u=n));for(var i=0;i<D.config.showMonths;i++)for(var h=D.daysContainer.children[i],o=function(e,t){var n=h.children[e],i=n.dateObj.getTime(),o=0<c&&i<c||0<u&&u<i;return o?(n.classList.add("notAllowed"),["inRange","startRange","endRange"].forEach(function(e){n.classList.remove(e)}),"continue"):l&&!o?"continue":(["startRange","inRange","endRange","notAllowed"].forEach(function(e){n.classList.remove(e)}),void(void 0!==r&&(r.classList.add(s<=D.selectedDates[0].getTime()?"startRange":"endRange"),a<s&&i===a?n.classList.add("startRange"):s<a&&i===a&&n.classList.add("endRange"),c<=i&&(0===u||i<=u)&&ye(i,a,s)&&n.classList.add("inRange"))))},d=0,f=h.children.length;d<f;d++)o(d)}}function P(){!D.isOpen||D.config.static||D.config.inline||R()}function Y(i){return function(e){var t=D.config["_"+i+"Date"]=D.parseDate(e,D.config.dateFormat),n=D.config["_"+("min"===i?"max":"min")+"Date"];void 0!==t&&(D["min"===i?"minDateHasTime":"maxDateHasTime"]=0<t.getHours()||0<t.getMinutes()||0<t.getSeconds()),D.selectedDates&&(D.selectedDates=D.selectedDates.filter(function(e){return A(e)}),D.selectedDates.length||"min"!==i||o(t),X()),D.daysContainer&&(q(),void 0!==t?D.currentYearElement[i]=t.getFullYear().toString():D.currentYearElement.removeAttribute(i),D.currentYearElement.disabled=!!n&&void 0!==t&&n.getFullYear()===t.getFullYear())}}function H(){return D.config.wrap?d.querySelector("[data-input]"):d}function L(){"object"!=typeof D.config.locale&&void 0===Ce.l10ns[D.config.locale]&&D.config.errorHandler(new Error("flatpickr: invalid locale "+D.config.locale)),D.l10n=ee(ee({},Ce.l10ns.default),"object"==typeof D.config.locale?D.config.locale:"default"!==D.config.locale?Ce.l10ns[D.config.locale]:void 0),_e.K="("+D.l10n.amPM[0]+"|"+D.l10n.amPM[1]+"|"+D.l10n.amPM[0].toLowerCase()+"|"+D.l10n.amPM[1].toLowerCase()+")",void 0===ee(ee({},u),JSON.parse(JSON.stringify(d.dataset||{}))).time_24hr&&void 0===Ce.defaultConfig.time_24hr&&(D.config.time_24hr=D.l10n.time_24hr),D.formatDate=me(D),D.parseDate=ge({config:D.config,l10n:D.l10n})}function R(e){if("function"!=typeof D.config.position){if(void 0!==D.calendarContainer){K("onPreCalendarPosition");var t=e||D._positionElement,n=Array.prototype.reduce.call(D.calendarContainer.children,function(e,t){return e+t.offsetHeight},0),i=D.calendarContainer.offsetWidth,o=D.config.position.split(" "),r=o[0],s=1<o.length?o[1]:null,a=t.getBoundingClientRect(),l=window.innerHeight-a.bottom,c="above"===r||"below"!==r&&l<n&&a.top>n,u=window.pageYOffset+a.top+(c?-n-2:t.offsetHeight+2);if(ce(D.calendarContainer,"arrowTop",!c),ce(D.calendarContainer,"arrowBottom",c),!D.config.inline){var h=window.pageXOffset+a.left,d=!1,f=!1;"center"===s?(h-=(i-a.width)/2,d=!0):"right"===s&&(h-=i-a.width,f=!0),ce(D.calendarContainer,"arrowLeft",!d&&!f),ce(D.calendarContainer,"arrowCenter",d),ce(D.calendarContainer,"arrowRight",f);var p=window.document.body.offsetWidth-(window.pageXOffset+a.right),_=h+i>window.document.body.offsetWidth,m=p+i>window.document.body.offsetWidth;if(ce(D.calendarContainer,"rightMost",_),!D.config.static)if(D.calendarContainer.style.top=u+"px",_)if(m){var g=function(){for(var e=null,t=0;t<document.styleSheets.length;t++){var n=document.styleSheets[t];try{n.cssRules}catch(e){continue}e=n;break}return null!=e?e:(i=document.createElement("style"),document.head.appendChild(i),i.sheet);var i}();if(void 0===g)return;var v=window.document.body.offsetWidth,y=Math.max(0,v/2-i/2),b=g.cssRules.length,w="{left:"+a.left+"px;right:auto;}";ce(D.calendarContainer,"rightMost",!1),ce(D.calendarContainer,"centerMost",!0),g.insertRule(".flatpickr-calendar.centerMost:before,.flatpickr-calendar.centerMost:after"+w,b),D.calendarContainer.style.left=y+"px",D.calendarContainer.style.right="auto"}else D.calendarContainer.style.left="auto",D.calendarContainer.style.right=p+"px";else D.calendarContainer.style.left=h+"px",D.calendarContainer.style.right="auto"}}}else D.config.position(D,e)}function q(){D.config.noCalendar||D.isMobile||(w(),V(),b())}function W(){D._input.focus(),-1!==window.navigator.userAgent.indexOf("MSIE")||void 0!==navigator.msMaxTouchPoints?setTimeout(D.close,0):D.close()}function B(e){e.preventDefault(),e.stopPropagation();var t=function e(t,n){return n(t)?t:t.parentNode?e(t.parentNode,n):void 0}(fe(e),function(e){return e.classList&&e.classList.contains("flatpickr-day")&&!e.classList.contains("flatpickr-disabled")&&!e.classList.contains("notAllowed")});if(void 0!==t){var n=t,i=D.latestSelectedDateObj=new Date(n.dateObj.getTime()),o=(i.getMonth()<D.currentMonth||i.getMonth()>D.currentMonth+D.config.showMonths-1)&&"range"!==D.config.mode;if(D.selectedDateElem=n,"single"===D.config.mode)D.selectedDates=[i];else if("multiple"===D.config.mode){var r=Q(i);r?D.selectedDates.splice(parseInt(r),1):D.selectedDates.push(i)}else"range"===D.config.mode&&(2===D.selectedDates.length&&D.clear(!1,!1),D.latestSelectedDateObj=i,D.selectedDates.push(i),0!==ve(i,D.selectedDates[0],!0)&&D.selectedDates.sort(function(e,t){return e.getTime()-t.getTime()}));if(p(),o){var s=D.currentYear!==i.getFullYear();D.currentYear=i.getFullYear(),D.currentMonth=i.getMonth(),s&&(K("onYearChange"),w()),K("onMonthChange")}if(V(),b(),X(),o||"range"===D.config.mode||1!==D.config.showMonths?void 0!==D.selectedDateElem&&void 0===D.hourElement&&D.selectedDateElem&&D.selectedDateElem.focus():g(n),void 0!==D.hourElement&&void 0!==D.hourElement&&D.hourElement.focus(),D.config.closeOnSelect){var a="single"===D.config.mode&&!D.config.enableTime,l="range"===D.config.mode&&2===D.selectedDates.length&&!D.config.enableTime;(a||l)&&W()}c()}}D.parseDate=ge({config:D.config,l10n:D.l10n}),D._handlers=[],D.pluginElements=[],D.loadedPlugins=[],D._bind=s,D._setHoursFromDate=o,D._positionCalendar=R,D.changeMonth=E,D.changeYear=S,D.clear=function(e,t){void 0===e&&(e=!0);void 0===t&&(t=!0);D.input.value="",void 0!==D.altInput&&(D.altInput.value="");void 0!==D.mobileInput&&(D.mobileInput.value="");D.selectedDates=[],!(D.latestSelectedDateObj=void 0)===t&&(D.currentYear=D._initialDate.getFullYear(),D.currentMonth=D._initialDate.getMonth());if(!0===D.config.enableTime){var n=we(D.config),i=n.hours,o=n.minutes,r=n.seconds;l(i,o,r)}D.redraw(),e&&K("onChange")},D.close=function(){D.isOpen=!1,D.isMobile||(void 0!==D.calendarContainer&&D.calendarContainer.classList.remove("open"),void 0!==D._input&&D._input.classList.remove("active"));K("onClose")},D._createElement=ue,D.destroy=function(){void 0!==D.config&&K("onDestroy");for(var e=D._handlers.length;e--;)D._handlers[e].remove();if(D._handlers=[],D.mobileInput)D.mobileInput.parentNode&&D.mobileInput.parentNode.removeChild(D.mobileInput),D.mobileInput=void 0;else if(D.calendarContainer&&D.calendarContainer.parentNode)if(D.config.static&&D.calendarContainer.parentNode){var t=D.calendarContainer.parentNode;if(t.lastChild&&t.removeChild(t.lastChild),t.parentNode){for(;t.firstChild;)t.parentNode.insertBefore(t.firstChild,t);t.parentNode.removeChild(t)}}else D.calendarContainer.parentNode.removeChild(D.calendarContainer);D.altInput&&(D.input.type="text",D.altInput.parentNode&&D.altInput.parentNode.removeChild(D.altInput),delete D.altInput);D.input&&(D.input.type=D.input._type,D.input.classList.remove("flatpickr-input"),D.input.removeAttribute("readonly"));["_showTimeInput","latestSelectedDateObj","_hideNextMonthArrow","_hidePrevMonthArrow","__hideNextMonthArrow","__hidePrevMonthArrow","isMobile","isOpen","selectedDateElem","minDateHasTime","maxDateHasTime","days","daysContainer","_input","_positionElement","innerContainer","rContainer","monthNav","todayDateElem","calendarContainer","weekdayContainer","prevMonthNav","nextMonthNav","monthsDropdownContainer","currentMonthElement","currentYearElement","navigationCurrentMonth","selectedDateElem","config"].forEach(function(e){try{delete D[e]}catch(e){}})},D.isEnabled=A,D.jumpToDate=i,D.open=function(e,t){void 0===t&&(t=D._positionElement);{if(!0===D.isMobile){if(e){e.preventDefault();var n=fe(e);n&&n.blur()}return void 0!==D.mobileInput&&(D.mobileInput.focus(),D.mobileInput.click()),void K("onOpen")}if(D._input.disabled||D.config.inline)return}var i=D.isOpen;D.isOpen=!0,i||(D.calendarContainer.classList.add("open"),D._input.classList.add("active"),K("onOpen"),R(t));!0===D.config.enableTime&&!0===D.config.noCalendar&&(!1!==D.config.allowInput||void 0!==e&&D.timeContainer.contains(e.relatedTarget)||setTimeout(function(){return D.hourElement.select()},50))},D.redraw=q,D.set=function(e,t){if(null!==e&&"object"==typeof e)for(var n in Object.assign(D.config,e),e)void 0!==z[n]&&z[n].forEach(function(e){return e()});else D.config[e]=t,void 0!==z[e]?z[e].forEach(function(e){return e()}):-1<ne.indexOf(e)&&(D.config[e]=le(t));D.redraw(),X(!0)},D.setDate=function(e,t,n){void 0===t&&(t=!1);void 0===n&&(n=D.config.dateFormat);if(0!==e&&!e||e instanceof Array&&0===e.length)return D.clear(t);U(e,n),D.latestSelectedDateObj=D.selectedDates[D.selectedDates.length-1],D.redraw(),i(void 0,t),o(),0===D.selectedDates.length&&D.clear(!1);X(t),t&&K("onChange")},D.toggle=function(e){if(!0===D.isOpen)return D.close();D.open(e)};var z={locale:[L,k],showMonths:[x,t,M],minDate:[i],maxDate:[i],clickOpens:[function(){!0===D.config.clickOpens?(s(D._input,"focus",D.open),s(D._input,"click",D.open)):(D._input.removeEventListener("focus",D.open),D._input.removeEventListener("click",D.open))}]};function U(e,t){var n=[];if(e instanceof Array)n=e.map(function(e){return D.parseDate(e,t)});else if(e instanceof Date||"number"==typeof e)n=[D.parseDate(e,t)];else if("string"==typeof e)switch(D.config.mode){case"single":case"time":n=[D.parseDate(e,t)];break;case"multiple":n=e.split(D.config.conjunction).map(function(e){return D.parseDate(e,t)});break;case"range":n=e.split(D.l10n.rangeSeparator).map(function(e){return D.parseDate(e,t)})}else D.config.errorHandler(new Error("Invalid date supplied: "+JSON.stringify(e)));D.selectedDates=D.config.allowInvalidPreload?n:n.filter(function(e){return e instanceof Date&&A(e,!1)}),"range"===D.config.mode&&D.selectedDates.sort(function(e,t){return e.getTime()-t.getTime()})}function J(e){return e.slice().map(function(e){return"string"==typeof e||"number"==typeof e||e instanceof Date?D.parseDate(e,void 0,!0):e&&"object"==typeof e&&e.from&&e.to?{from:D.parseDate(e.from,void 0),to:D.parseDate(e.to,void 0)}:e}).filter(function(e){return e})}function K(e,t){if(void 0!==D.config){var n=D.config[e];if(void 0!==n&&0<n.length)for(var i=0;n[i]&&i<n.length;i++)n[i](D.selectedDates,D.input.value,D,t);"onChange"===e&&(D.input.dispatchEvent($("change")),D.input.dispatchEvent($("input")))}}function $(e){var t=document.createEvent("Event");return t.initEvent(e,!0,!0),t}function Q(e){for(var t=0;t<D.selectedDates.length;t++)if(0===ve(D.selectedDates[t],e))return""+t;return!1}function V(){D.config.noCalendar||D.isMobile||!D.monthNav||(D.yearElements.forEach(function(e,t){var n=new Date(D.currentYear,D.currentMonth,1);n.setMonth(D.currentMonth+t),1<D.config.showMonths||"static"===D.config.monthSelectorType?D.monthElements[t].textContent=pe(n.getMonth(),D.config.shorthandCurrentMonth,D.l10n)+" ":D.monthsDropdownContainer.value=n.getMonth().toString(),e.value=n.getFullYear().toString()}),D._hidePrevMonthArrow=void 0!==D.config.minDate&&(D.currentYear===D.config.minDate.getFullYear()?D.currentMonth<=D.config.minDate.getMonth():D.currentYear<D.config.minDate.getFullYear()),D._hideNextMonthArrow=void 0!==D.config.maxDate&&(D.currentYear===D.config.maxDate.getFullYear()?D.currentMonth+1>D.config.maxDate.getMonth():D.currentYear>D.config.maxDate.getFullYear()))}function G(t){return D.selectedDates.map(function(e){return D.formatDate(e,t)}).filter(function(e,t,n){return"range"!==D.config.mode||D.config.enableTime||n.indexOf(e)===t}).join("range"!==D.config.mode?D.config.conjunction:D.l10n.rangeSeparator)}function X(e){void 0===e&&(e=!0),void 0!==D.mobileInput&&D.mobileFormatStr&&(D.mobileInput.value=void 0!==D.latestSelectedDateObj?D.formatDate(D.latestSelectedDateObj,D.mobileFormatStr):""),D.input.value=G(D.config.dateFormat),void 0!==D.altInput&&(D.altInput.value=G(D.config.altFormat)),!1!==e&&K("onValueUpdate")}function Z(e){var t=fe(e),n=D.prevMonthNav.contains(t),i=D.nextMonthNav.contains(t);n||i?E(n?-1:1):0<=D.yearElements.indexOf(t)?t.select():t.classList.contains("arrowUp")?D.changeYear(D.currentYear+1):t.classList.contains("arrowDown")&&D.changeYear(D.currentYear-1)}return function(){D.element=D.input=d,D.isOpen=!1,function(){var e=["wrap","weekNumbers","allowInput","allowInvalidPreload","clickOpens","time_24hr","enableTime","noCalendar","altInput","shorthandCurrentMonth","inline","static","enableSeconds","disableMobile"],t=ee(ee({},JSON.parse(JSON.stringify(d.dataset||{}))),u),n={};D.config.parseDate=t.parseDate,D.config.formatDate=t.formatDate,Object.defineProperty(D.config,"enable",{get:function(){return D.config._enable},set:function(e){D.config._enable=J(e)}}),Object.defineProperty(D.config,"disable",{get:function(){return D.config._disable},set:function(e){D.config._disable=J(e)}});var i="time"===t.mode;if(!t.dateFormat&&(t.enableTime||i)){var o=Ce.defaultConfig.dateFormat||ie.dateFormat;n.dateFormat=t.noCalendar||i?"H:i"+(t.enableSeconds?":S":""):o+" H:i"+(t.enableSeconds?":S":"")}if(t.altInput&&(t.enableTime||i)&&!t.altFormat){var r=Ce.defaultConfig.altFormat||ie.altFormat;n.altFormat=t.noCalendar||i?"h:i"+(t.enableSeconds?":S K":" K"):r+" h:i"+(t.enableSeconds?":S":"")+" K"}Object.defineProperty(D.config,"minDate",{get:function(){return D.config._minDate},set:Y("min")}),Object.defineProperty(D.config,"maxDate",{get:function(){return D.config._maxDate},set:Y("max")});var s=function(t){return function(e){D.config["min"===t?"_minTime":"_maxTime"]=D.parseDate(e,"H:i:S")}};Object.defineProperty(D.config,"minTime",{get:function(){return D.config._minTime},set:s("min")}),Object.defineProperty(D.config,"maxTime",{get:function(){return D.config._maxTime},set:s("max")}),"time"===t.mode&&(D.config.noCalendar=!0,D.config.enableTime=!0),Object.assign(D.config,n,t);for(var a=0;a<e.length;a++)D.config[e[a]]=!0===D.config[e[a]]||"true"===D.config[e[a]];ne.filter(function(e){return void 0!==D.config[e]}).forEach(function(e){D.config[e]=le(D.config[e]||[]).map(h)}),D.isMobile=!D.config.disableMobile&&!D.config.inline&&"single"===D.config.mode&&!D.config.disable.length&&!D.config.enable&&!D.config.weekNumbers&&/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);for(var a=0;a<D.config.plugins.length;a++){var l=D.config.plugins[a](D)||{};for(var c in l)-1<ne.indexOf(c)?D.config[c]=le(l[c]).map(h).concat(D.config[c]):void 0===t[c]&&(D.config[c]=l[c])}t.altInputClass||(D.config.altInputClass=H().className+" "+D.config.altInputClass),K("onParseConfig")}(),L(),function(){if(D.input=H(),!D.input)return D.config.errorHandler(new Error("Invalid input element specified"));D.input._type=D.input.type,D.input.type="text",D.input.classList.add("flatpickr-input"),D._input=D.input,D.config.altInput&&(D.altInput=ue(D.input.nodeName,D.config.altInputClass),D._input=D.altInput,D.altInput.placeholder=D.input.placeholder,D.altInput.disabled=D.input.disabled,D.altInput.required=D.input.required,D.altInput.tabIndex=D.input.tabIndex,D.altInput.type="text",D.input.setAttribute("type","hidden"),!D.config.static&&D.input.parentNode&&D.input.parentNode.insertBefore(D.altInput,D.input.nextSibling)),D.config.allowInput||D._input.setAttribute("readonly","readonly"),D._positionElement=D.config.positionElement||D._input}(),function(){D.selectedDates=[],D.now=D.parseDate(D.config.now)||new Date;var e=D.config.defaultDate||("INPUT"!==D.input.nodeName&&"TEXTAREA"!==D.input.nodeName||!D.input.placeholder||D.input.value!==D.input.placeholder?D.input.value:null);e&&U(e,D.config.dateFormat),D._initialDate=0<D.selectedDates.length?D.selectedDates[0]:D.config.minDate&&D.config.minDate.getTime()>D.now.getTime()?D.config.minDate:D.config.maxDate&&D.config.maxDate.getTime()<D.now.getTime()?D.config.maxDate:D.now,D.currentYear=D._initialDate.getFullYear(),D.currentMonth=D._initialDate.getMonth(),0<D.selectedDates.length&&(D.latestSelectedDateObj=D.selectedDates[0]),void 0!==D.config.minTime&&(D.config.minTime=D.parseDate(D.config.minTime,"H:i")),void 0!==D.config.maxTime&&(D.config.maxTime=D.parseDate(D.config.maxTime,"H:i")),D.minDateHasTime=!!D.config.minDate&&(0<D.config.minDate.getHours()||0<D.config.minDate.getMinutes()||0<D.config.minDate.getSeconds()),D.maxDateHasTime=!!D.config.maxDate&&(0<D.config.maxDate.getHours()||0<D.config.maxDate.getMinutes()||0<D.config.maxDate.getSeconds())}(),D.utils={getDaysInMonth:function(e,t){return void 0===e&&(e=D.currentMonth),void 0===t&&(t=D.currentYear),1===e&&(t%4==0&&t%100!=0||t%400==0)?29:D.l10n.daysInMonth[e]}},D.isMobile||function(){var e=window.document.createDocumentFragment();if(D.calendarContainer=ue("div","flatpickr-calendar"),D.calendarContainer.tabIndex=-1,!D.config.noCalendar){if(e.appendChild((D.monthNav=ue("div","flatpickr-months"),D.yearElements=[],D.monthElements=[],D.prevMonthNav=ue("span","flatpickr-prev-month"),D.prevMonthNav.innerHTML=D.config.prevArrow,D.nextMonthNav=ue("span","flatpickr-next-month"),D.nextMonthNav.innerHTML=D.config.nextArrow,x(),Object.defineProperty(D,"_hidePrevMonthArrow",{get:function(){return D.__hidePrevMonthArrow},set:function(e){D.__hidePrevMonthArrow!==e&&(ce(D.prevMonthNav,"flatpickr-disabled",e),D.__hidePrevMonthArrow=e)}}),Object.defineProperty(D,"_hideNextMonthArrow",{get:function(){return D.__hideNextMonthArrow},set:function(e){D.__hideNextMonthArrow!==e&&(ce(D.nextMonthNav,"flatpickr-disabled",e),D.__hideNextMonthArrow=e)}}),D.currentYearElement=D.yearElements[0],V(),D.monthNav)),D.innerContainer=ue("div","flatpickr-innerContainer"),D.config.weekNumbers){var t=function(){D.calendarContainer.classList.add("hasWeeks");var e=ue("div","flatpickr-weekwrapper");e.appendChild(ue("span","flatpickr-weekday",D.l10n.weekAbbreviation));var t=ue("div","flatpickr-weeks");return e.appendChild(t),{weekWrapper:e,weekNumbers:t}}(),n=t.weekWrapper,i=t.weekNumbers;D.innerContainer.appendChild(n),D.weekNumbers=i,D.weekWrapper=n}D.rContainer=ue("div","flatpickr-rContainer"),D.rContainer.appendChild(M()),D.daysContainer||(D.daysContainer=ue("div","flatpickr-days"),D.daysContainer.tabIndex=-1),b(),D.rContainer.appendChild(D.daysContainer),D.innerContainer.appendChild(D.rContainer),e.appendChild(D.innerContainer)}D.config.enableTime&&e.appendChild(function(){D.calendarContainer.classList.add("hasTime"),D.config.noCalendar&&D.calendarContainer.classList.add("noCalendar");var e=we(D.config);D.timeContainer=ue("div","flatpickr-time"),D.timeContainer.tabIndex=-1;var t=ue("span","flatpickr-time-separator",":"),n=de("flatpickr-hour",{"aria-label":D.l10n.hourAriaLabel});D.hourElement=n.getElementsByTagName("input")[0];var i=de("flatpickr-minute",{"aria-label":D.l10n.minuteAriaLabel});if(D.minuteElement=i.getElementsByTagName("input")[0],D.hourElement.tabIndex=D.minuteElement.tabIndex=-1,D.hourElement.value=re(D.latestSelectedDateObj?D.latestSelectedDateObj.getHours():D.config.time_24hr?e.hours:function(e){switch(e%24){case 0:case 12:return 12;default:return e%12}}(e.hours)),D.minuteElement.value=re(D.latestSelectedDateObj?D.latestSelectedDateObj.getMinutes():e.minutes),D.hourElement.setAttribute("step",D.config.hourIncrement.toString()),D.minuteElement.setAttribute("step",D.config.minuteIncrement.toString()),D.hourElement.setAttribute("min",D.config.time_24hr?"0":"1"),D.hourElement.setAttribute("max",D.config.time_24hr?"23":"12"),D.hourElement.setAttribute("maxlength","2"),D.minuteElement.setAttribute("min","0"),D.minuteElement.setAttribute("max","59"),D.minuteElement.setAttribute("maxlength","2"),D.timeContainer.appendChild(n),D.timeContainer.appendChild(t),D.timeContainer.appendChild(i),D.config.time_24hr&&D.timeContainer.classList.add("time24hr"),D.config.enableSeconds){D.timeContainer.classList.add("hasSeconds");var o=de("flatpickr-second");D.secondElement=o.getElementsByTagName("input")[0],D.secondElement.value=re(D.latestSelectedDateObj?D.latestSelectedDateObj.getSeconds():e.seconds),D.secondElement.setAttribute("step",D.minuteElement.getAttribute("step")),D.secondElement.setAttribute("min","0"),D.secondElement.setAttribute("max","59"),D.secondElement.setAttribute("maxlength","2"),D.timeContainer.appendChild(ue("span","flatpickr-time-separator",":")),D.timeContainer.appendChild(o)}return D.config.time_24hr||(D.amPM=ue("span","flatpickr-am-pm",D.l10n.amPM[se(11<(D.latestSelectedDateObj?D.hourElement.value:D.config.defaultHour))]),D.amPM.title=D.l10n.toggleTitle,D.amPM.tabIndex=-1,D.timeContainer.appendChild(D.amPM)),D.timeContainer}()),ce(D.calendarContainer,"rangeMode","range"===D.config.mode),ce(D.calendarContainer,"animate",!0===D.config.animate),ce(D.calendarContainer,"multiMonth",1<D.config.showMonths),D.calendarContainer.appendChild(e);var o=void 0!==D.config.appendTo&&void 0!==D.config.appendTo.nodeType;if((D.config.inline||D.config.static)&&(D.calendarContainer.classList.add(D.config.inline?"inline":"static"),D.config.inline&&(!o&&D.element.parentNode?D.element.parentNode.insertBefore(D.calendarContainer,D._input.nextSibling):void 0!==D.config.appendTo&&D.config.appendTo.appendChild(D.calendarContainer)),D.config.static)){var r=ue("div","flatpickr-wrapper");D.element.parentNode&&D.element.parentNode.insertBefore(r,D.element),r.appendChild(D.element),D.altInput&&r.appendChild(D.altInput),r.appendChild(D.calendarContainer)}D.config.static||D.config.inline||(void 0!==D.config.appendTo?D.config.appendTo:window.document.body).appendChild(D.calendarContainer)}(),function(){if(D.config.wrap&&["open","close","toggle","clear"].forEach(function(t){Array.prototype.forEach.call(D.element.querySelectorAll("[data-"+t+"]"),function(e){return s(e,"click",D[t])})}),D.isMobile)return function(){var e=D.config.enableTime?D.config.noCalendar?"time":"datetime-local":"date";D.mobileInput=ue("input",D.input.className+" flatpickr-mobile"),D.mobileInput.tabIndex=1,D.mobileInput.type=e,D.mobileInput.disabled=D.input.disabled,D.mobileInput.required=D.input.required,D.mobileInput.placeholder=D.input.placeholder,D.mobileFormatStr="datetime-local"===e?"Y-m-d\\TH:i:S":"date"===e?"Y-m-d":"H:i:S",0<D.selectedDates.length&&(D.mobileInput.defaultValue=D.mobileInput.value=D.formatDate(D.selectedDates[0],D.mobileFormatStr)),D.config.minDate&&(D.mobileInput.min=D.formatDate(D.config.minDate,"Y-m-d")),D.config.maxDate&&(D.mobileInput.max=D.formatDate(D.config.maxDate,"Y-m-d")),D.input.getAttribute("step")&&(D.mobileInput.step=String(D.input.getAttribute("step"))),D.input.type="hidden",void 0!==D.altInput&&(D.altInput.type="hidden");try{D.input.parentNode&&D.input.parentNode.insertBefore(D.mobileInput,D.input.nextSibling)}catch(e){}s(D.mobileInput,"change",function(e){D.setDate(fe(e).value,!1,D.mobileFormatStr),K("onChange"),K("onClose")})}();var e=ae(P,50);D._debouncedChange=ae(c,De),D.daysContainer&&!/iPhone|iPad|iPod/i.test(navigator.userAgent)&&s(D.daysContainer,"mouseover",function(e){"range"===D.config.mode&&F(fe(e))}),s(window.document.body,"keydown",j),D.config.inline||D.config.static||s(window,"resize",e),void 0!==window.ontouchstart?s(window.document,"touchstart",O):s(window.document,"mousedown",O),s(window.document,"focus",O,{capture:!0}),!0===D.config.clickOpens&&(s(D._input,"focus",D.open),s(D._input,"click",D.open)),void 0!==D.daysContainer&&(s(D.monthNav,"click",Z),s(D.monthNav,["keyup","increment"],n),s(D.daysContainer,"click",B)),void 0!==D.timeContainer&&void 0!==D.minuteElement&&void 0!==D.hourElement&&(s(D.timeContainer,["increment"],f),s(D.timeContainer,"blur",f,{capture:!0}),s(D.timeContainer,"click",r),s([D.hourElement,D.minuteElement],["focus","click"],function(e){return fe(e).select()}),void 0!==D.secondElement&&s(D.secondElement,"focus",function(){return D.secondElement&&D.secondElement.select()}),void 0!==D.amPM&&s(D.amPM,"click",function(e){f(e),c()})),D.config.allowInput&&s(D._input,"blur",N)}(),(D.selectedDates.length||D.config.noCalendar)&&(D.config.enableTime&&o(D.config.noCalendar?D.latestSelectedDateObj:void 0),X(!1)),t();var e=/^((?!chrome|android).)*safari/i.test(navigator.userAgent);!D.isMobile&&e&&R(),K("onReady")}(),D}function n(e,t){for(var n=Array.prototype.slice.call(e).filter(function(e){return e instanceof HTMLElement}),i=[],o=0;o<n.length;o++){var r=n[o];try{if(null!==r.getAttribute("data-fp-omit"))continue;void 0!==r._flatpickr&&(r._flatpickr.destroy(),r._flatpickr=void 0),r._flatpickr=s(r,t||{}),i.push(r._flatpickr)}catch(e){console.error(e)}}return 1===i.length?i[0]:i}"undefined"!=typeof HTMLElement&&"undefined"!=typeof HTMLCollection&&"undefined"!=typeof NodeList&&(HTMLCollection.prototype.flatpickr=NodeList.prototype.flatpickr=function(e){return n(this,e)},HTMLElement.prototype.flatpickr=function(e){return n([this],e)});var Ce=function(e,t){return"string"==typeof e?n(window.document.querySelectorAll(e),t):e instanceof Node?n([e],t):n(e,t)};return Ce.defaultConfig={},Ce.l10ns={en:ee({},oe),default:ee({},oe)},Ce.localize=function(e){Ce.l10ns.default=ee(ee({},Ce.l10ns.default),e)},Ce.setDefaults=function(e){Ce.defaultConfig=ee(ee({},Ce.defaultConfig),e)},Ce.parseDate=ge({}),Ce.formatDate=me({}),Ce.compareDates=ve,"undefined"!=typeof jQuery&&void 0!==jQuery.fn&&(jQuery.fn.flatpickr=function(e){return n(this,e)}),Date.prototype.fp_incr=function(e){return new Date(this.getFullYear(),this.getMonth(),this.getDate()+("string"==typeof e?parseInt(e,10):e))},"undefined"!=typeof window&&(window.flatpickr=Ce),Ce}),function(s){function t(e,t){this.element=s(e),this.options=t,this.init()}t.prototype.init=function(){this.element.chosen(this.options),this.container=this.element.next(".chosen-container"),this.search_field=this.container.find(".chosen-search-input"),this.is_multiple=this.container.hasClass("chosen-container-multi"),this.is_typing=!1,this.chosenXhr=null,this.events()},t.prototype.events=function(){var e=this;this.search_field.on("compositionstart",function(){e.is_typing=!0}),this.search_field.on("compositionend",function(){e.is_typing=!1,e.update_list()}),this.search_field.on("keyup",function(){e.update_list()}),this.search_field.on("focus",function(){e.search_field_focused()})},t.prototype.search_field_focused=function(){this.search_welcome_message(),0===this.options.min_length&&0===this.search_field.val().length&&this.update_list()},t.prototype.search_welcome_message=function(){var e=s.trim(this.search_field.val()),t=this.container.find(".chosen-results");0===t.children().length&&0===e.length&&t.html('<li class="no-results">'+this.options.typing_text.replace("%s",this.options.min_length-e.length)+"</li>")},t.prototype.update_list=function(){var t=this;if(this.search_welcome_message(),!this.is_typing){var e=s.trim(this.search_field.val()),n=e.length<this.options.min_length?this.options.typing_text.replace("%s",this.options.min_length-e.length):this.options.searching_text;this.container.find(".no-results").text(n),e!==this.search_field.data("prevVal")&&(this.search_field.data("prevVal",e),this.timer&&clearTimeout(this.timer),e.length<this.options.min_length||(this.timer=setTimeout(function(){t.chosenXhr&&t.chosenXhr.abort(),t.options.data.term=e,t.chosenXhr=window.wp.ajax.post("ulf-chosen",t.options.data).done(function(e){t.show_results(e)}).fail(function(e){t.container.find(".no-results").text(e.error)})},this.options.type_delay)))}},t.prototype.show_results=function(e){var n=this;if(!this.is_typing&&null!==e){if(0===e.length)return this.element.data().chosen.no_results_clear(),void this.element.data().chosen.no_results(this.search_field.val());var i=[];this.element.find("option").each(function(){s(this).is(":selected")?i.push(s(this).val()+"-"+s(this).text()):s(this).attr("value").length&&s(this).remove()}),s.each(e,function(e,t){-1===s.inArray(t.value+"-"+t.text,i)&&s("<option />").attr("value",t.value).html(t.text).appendTo(n.element)});var t=this.search_field.val(),o=this.search_field.innerWidth();if(this.element.trigger("chosen:updated"),this.is_multiple){var r=this.element.parent().find(".ulf-hide-select").val()||[];this.element.ULFChosenOrder(r,!0),this.search_field.css("width",o)}this.search_field.val(t),null!==this.chosenXhr.done&&this.chosenXhr.done(e)}},s.fn.ULFAjaxChosen=function(e){return this.each(function(){new t(this,e)})}}(jQuery),function(){var n,i,s=[].indexOf||function(e){for(var t=0,n=this.length;t<n;t++)if(t in this&&this[t]===e)return t;return-1},o={}.hasOwnProperty;i=function(){function e(){}return e.insertAt=function(e,t,n){return n.insertBefore(e,n.children[t].nextSibling)},e.getFlattenedOptionsAndGroups=function(e){var t,n,i,o,r,s,a,l,c;for(t=[],s=0,l=(i=Array.prototype.filter.call(e.childNodes,function(e){var t;return"OPTION"===(t=e.nodeName.toUpperCase())||"OPTGROUP"===t})).length;s<l;s++)if(n=i[s],t.push(n),"OPTGROUP"===n.nodeName.toUpperCase())for(a=0,c=(r=Array.prototype.filter.call(n.childNodes,function(e){return"OPTION"===e.nodeName.toUpperCase()})).length;a<c;a++)o=r[a],t.push(o);return t},e.isValidMultipleSelectElement=function(e){return null!=e&&"SELECT"===e.nodeName&&e.multiple},e.getChosenUIContainer=function(e){return""!==e.id?document.getElementById(e.id.replace(/-/g,"_")+"_chosen"):this.searchChosenUIContainer(e)},e.isChosenified=function(e){return null!=this.getChosenUIContainer(e)},e.forceSelection=function(e,t){var n,i,o,r;for(o=this.getFlattenedOptionsAndGroups(e),n=0;n<o.length;)r=(i=o[n]).getAttribute("value"),0<=s.call(t,r)?(i.selected=!0,i.setAttribute("selected","")):(i.selected=!1,i.removeAttribute("selected")),n++;return this.triggerEvent(e,"chosen:updated")},e.ULFChosenOrder=function(e,t,n){var i,o,r,s,a,l,c,u,h,d,f,p,_,m;if(null!=this.getDOMElement&&(e=this.getDOMElement(e)),this.isValidMultipleSelectElement(e)&&null!=(o=this.getChosenUIContainer(e))&&t instanceof Array){for(t=t.map(Function.prototype.call,String.prototype.trim),c=this.getFlattenedOptionsAndGroups(e),null!=n&&!0===n&&this.forceSelection(e,t),m=[],r=d=0,p=t.length;d<p;r=++d){for(a=t[r],u=null,s=f=0,_=c.length;f<_;s=++f)c[s].value===a&&(u=s);i=o.querySelectorAll(".search-choice"),h=this.relAttributeName,null!=(l=Array.prototype.filter.call(i,function(e){return null!=e.querySelector("a.search-choice-close["+h+'="'+u+'"]')})[0])&&(o.querySelector("ul.chosen-choices"),m.push(this.insertAt(l,r,o.querySelector("ul.chosen-choices"))))}return m}},e}(),(n=jQuery).fn.extend({ULFChosenOrder:function(e,t){return _ULFChosenOrder.ULFChosenOrder(this,e,t)}}),this._ULFChosenOrder=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return function(e,t){for(var n in t)o.call(t,n)&&(e[n]=t[n]);function i(){this.constructor=e}i.prototype=t.prototype,e.prototype=new i,e.__super__=t.prototype}(t,i),t.relAttributeName="data-option-array-index",t.isjQueryObject=function(e){return"undefined"!=typeof jQuery&&null!==jQuery&&e instanceof jQuery},t.getDOMElement=function(e){return this.isjQueryObject(e)?e.get(0):e},t.searchChosenUIContainer=function(e){return null!=n(e).data("chosen")?n(e).data("chosen").container[0]:n(e).next(".chosen-container.chosen-container-multi").get(0)},t.triggerEvent=function(e,t){return n(e).trigger(t)},t}()}.call(this),function(){var a,n,o,s,r={}.hasOwnProperty;(s=function(){function e(){this.options_index=0,this.parsed=[]}return e.prototype.add_node=function(e){return"OPTGROUP"===e.nodeName.toUpperCase()?this.add_group(e):this.add_option(e)},e.prototype.add_group=function(e){var t,n,i,o,r,s;for(t=this.parsed.length,this.parsed.push({array_index:t,group:!0,label:e.label,title:e.title?e.title:void 0,children:0,disabled:e.disabled,classes:e.className}),s=[],n=0,i=(r=e.childNodes).length;n<i;n++)o=r[n],s.push(this.add_option(o,t,e.disabled));return s},e.prototype.add_option=function(e,t,n){if("OPTION"===e.nodeName.toUpperCase())return""!==e.text?(null!=t&&(this.parsed[t].children+=1),this.parsed.push({array_index:this.parsed.length,options_index:this.options_index,value:e.value,text:e.text,html:e.innerHTML,title:e.title?e.title:void 0,selected:e.selected,disabled:!0===n?n:e.disabled,group_array_index:t,group_label:null!=t?this.parsed[t].label:null,classes:e.className,style:e.style.cssText})):this.parsed.push({array_index:this.parsed.length,options_index:this.options_index,empty:!0}),this.options_index+=1},e}()).select_to_array=function(e){var t,n,i,o,r;for(o=new s,n=0,i=(r=e.childNodes).length;n<i;n++)t=r[n],o.add_node(t);return o.parsed},n=function(){function o(e,t){var n,i;this.form_field=e,this.options=null!=t?t:{},this.label_click_handler=(n=this.label_click_handler,i=this,function(){return n.apply(i,arguments)}),o.browser_is_supported()&&(this.is_multiple=this.form_field.multiple,this.set_default_text(),this.set_default_values(),this.setup(),this.set_up_html(),this.register_observers(),this.on_ready())}return o.prototype.set_default_values=function(){var t,n;return this.click_test_action=(t=this,function(e){return t.test_active_click(e)}),this.activate_action=(n=this,function(e){return n.activate_field(e)}),this.active_field=!1,this.mouse_on_container=!1,this.results_showing=!1,this.result_highlighted=null,this.is_rtl=this.options.rtl||/\bchosen-rtl\b/.test(this.form_field.className),this.allow_single_deselect=null!=this.options.allow_single_deselect&&null!=this.form_field.options[0]&&""===this.form_field.options[0].text&&this.options.allow_single_deselect,this.disable_search_threshold=this.options.disable_search_threshold||0,this.disable_search=this.options.disable_search||!1,this.enable_split_word_search=null==this.options.enable_split_word_search||this.options.enable_split_word_search,this.group_search=null==this.options.group_search||this.options.group_search,this.search_contains=this.options.search_contains||!1,this.single_backstroke_delete=null==this.options.single_backstroke_delete||this.options.single_backstroke_delete,this.max_selected_options=this.options.max_selected_options||1/0,this.inherit_select_classes=this.options.inherit_select_classes||!1,this.display_selected_options=null==this.options.display_selected_options||this.options.display_selected_options,this.display_disabled_options=null==this.options.display_disabled_options||this.options.display_disabled_options,this.include_group_label_in_selected=this.options.include_group_label_in_selected||!1,this.max_shown_results=this.options.max_shown_results||Number.POSITIVE_INFINITY,this.case_sensitive_search=this.options.case_sensitive_search||!1,this.hide_results_on_select=null==this.options.hide_results_on_select||this.options.hide_results_on_select},o.prototype.set_default_text=function(){return this.form_field.getAttribute("data-placeholder")?this.default_text=this.form_field.getAttribute("data-placeholder"):this.is_multiple?this.default_text=this.options.placeholder_text_multiple||this.options.placeholder_text||o.default_multiple_text:this.default_text=this.options.placeholder_text_single||this.options.placeholder_text||o.default_single_text,this.default_text=this.escape_html(this.default_text),this.results_none_found=this.form_field.getAttribute("data-no_results_text")||this.options.no_results_text||o.default_no_result_text},o.prototype.choice_label=function(e){return this.include_group_label_in_selected&&null!=e.group_label?"<b class='group-name'>"+this.escape_html(e.group_label)+"</b>"+e.html:e.html},o.prototype.mouse_enter=function(){return this.mouse_on_container=!0},o.prototype.mouse_leave=function(){return this.mouse_on_container=!1},o.prototype.input_focus=function(e){if(this.is_multiple){if(!this.active_field)return setTimeout((t=this,function(){return t.container_mousedown()}),50)}else if(!this.active_field)return this.activate_field();var t},o.prototype.input_blur=function(e){if(!this.mouse_on_container)return this.active_field=!1,setTimeout((t=this,function(){return t.blur_test()}),100);var t},o.prototype.label_click_handler=function(e){return this.is_multiple?this.container_mousedown(e):this.activate_field()},o.prototype.results_option_build=function(e){var t,n,i,o,r,s,a;for(t="",o=a=0,r=(s=this.results_data).length;o<r&&((i="")!==(i=(n=s[o]).group?this.result_add_group(n):this.result_add_option(n))&&(a++,t+=i),(null!=e?e.first:void 0)&&(n.selected&&this.is_multiple?this.choice_build(n):n.selected&&!this.is_multiple&&this.single_set_selected_text(this.choice_label(n))),!(a>=this.max_shown_results));o++);return t},o.prototype.result_add_option=function(e){var t,n;return e.search_match&&this.include_option_in_results(e)?(t=[],e.disabled||e.selected&&this.is_multiple||t.push("active-result"),!e.disabled||e.selected&&this.is_multiple||t.push("disabled-result"),e.selected&&t.push("result-selected"),null!=e.group_array_index&&t.push("group-option"),""!==e.classes&&t.push(e.classes),(n=document.createElement("li")).className=t.join(" "),e.style&&(n.style.cssText=e.style),n.setAttribute("data-option-array-index",e.array_index),n.innerHTML=e.highlighted_html||e.html,e.title&&(n.title=e.title),this.outerHTML(n)):""},o.prototype.result_add_group=function(e){var t,n;return(e.search_match||e.group_match)&&0<e.active_options?((t=[]).push("group-result"),e.classes&&t.push(e.classes),(n=document.createElement("li")).className=t.join(" "),n.innerHTML=e.highlighted_html||this.escape_html(e.label),e.title&&(n.title=e.title),this.outerHTML(n)):""},o.prototype.results_update_field=function(){if(this.set_default_text(),this.is_multiple||this.results_reset_cleanup(),this.result_clear_highlight(),this.results_build(),this.results_showing)return this.winnow_results()},o.prototype.reset_single_select_options=function(){var e,t,n,i,o;for(o=[],e=0,t=(n=this.results_data).length;e<t;e++)(i=n[e]).selected?o.push(i.selected=!1):o.push(void 0);return o},o.prototype.results_toggle=function(){return this.results_showing?this.results_hide():this.results_show()},o.prototype.results_search=function(e){return this.results_showing?this.winnow_results():this.results_show()},o.prototype.winnow_results=function(e){var t,n,i,o,r,s,a,l,c,u,h,d,f,p,_;for(this.no_results_clear(),u=0,t=(a=this.get_search_text()).replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),c=this.get_search_regex(t),i=0,o=(l=this.results_data).length;i<o;i++)(r=l[i]).search_match=!1,d=h=null,r.highlighted_html="",this.include_option_in_results(r)&&(r.group&&(r.group_match=!1,r.active_options=0),null!=r.group_array_index&&this.results_data[r.group_array_index]&&(0===(h=this.results_data[r.group_array_index]).active_options&&h.search_match&&(u+=1),h.active_options+=1),_=r.group?r.label:r.text,r.group&&!this.group_search||(d=this.search_string_match(_,c),r.search_match=null!=d,r.search_match&&!r.group&&(u+=1),r.search_match?(a.length&&(f=d.index,s=_.slice(0,f),n=_.slice(f,f+a.length),p=_.slice(f+a.length),r.highlighted_html=this.escape_html(s)+"<em>"+this.escape_html(n)+"</em>"+this.escape_html(p)),null!=h&&(h.group_match=!0)):null!=r.group_array_index&&this.results_data[r.group_array_index].search_match&&(r.search_match=!0)));return this.result_clear_highlight(),u<1&&a.length?(this.update_results_content(""),this.no_results(a)):(this.update_results_content(this.results_option_build()),(null!=e?e.skip_highlight:void 0)?void 0:this.winnow_results_set_highlight())},o.prototype.get_search_regex=function(e){var t,n;return n=this.search_contains?e:"(^|\\s|\\b)"+e+"[^\\s]*",this.enable_split_word_search||this.search_contains||(n="^"+n),t=this.case_sensitive_search?"":"i",new RegExp(n,t)},o.prototype.search_string_match=function(e,t){var n;return n=t.exec(e),!this.search_contains&&(null!=n?n[1]:void 0)&&(n.index+=1),n},o.prototype.choices_count=function(){var e,t,n;if(null!=this.selected_option_count)return this.selected_option_count;for(e=this.selected_option_count=0,t=(n=this.form_field.options).length;e<t;e++)n[e].selected&&(this.selected_option_count+=1);return this.selected_option_count},o.prototype.choices_click=function(e){if(e.preventDefault(),this.activate_field(),!this.results_showing&&!this.is_disabled)return this.results_show()},o.prototype.keydown_checker=function(e){var t,n;switch(n=null!=(t=e.which)?t:e.keyCode,this.search_field_scale(),8!==n&&this.pending_backstroke&&this.clear_backstroke(),n){case 8:this.backstroke_length=this.get_search_field_value().length;break;case 9:this.results_showing&&!this.is_multiple&&this.result_select(e),this.mouse_on_container=!1;break;case 13:case 27:this.results_showing&&e.preventDefault();break;case 32:this.disable_search&&e.preventDefault();break;case 38:e.preventDefault(),this.keyup_arrow();break;case 40:e.preventDefault(),this.keydown_arrow()}},o.prototype.keyup_checker=function(e){var t,n;switch(n=null!=(t=e.which)?t:e.keyCode,this.search_field_scale(),n){case 8:this.is_multiple&&this.backstroke_length<1&&0<this.choices_count()?this.keydown_backstroke():this.pending_backstroke||(this.result_clear_highlight(),this.results_search());break;case 13:e.preventDefault(),this.results_showing&&this.result_select(e);break;case 27:this.results_showing&&this.results_hide();break;case 9:case 16:case 17:case 18:case 38:case 40:case 91:break;default:this.results_search()}},o.prototype.clipboard_event_checker=function(e){var t;if(!this.is_disabled)return setTimeout((t=this,function(){return t.results_search()}),50)},o.prototype.container_width=function(){return null!=this.options.width?this.options.width:this.form_field.offsetWidth+"px"},o.prototype.include_option_in_results=function(e){return!(this.is_multiple&&!this.display_selected_options&&e.selected)&&(!(!this.display_disabled_options&&e.disabled)&&!e.empty)},o.prototype.search_results_touchstart=function(e){return this.touch_started=!0,this.search_results_mouseover(e)},o.prototype.search_results_touchmove=function(e){return this.touch_started=!1,this.search_results_mouseout(e)},o.prototype.search_results_touchend=function(e){if(this.touch_started)return this.search_results_mouseup(e)},o.prototype.outerHTML=function(e){var t;return e.outerHTML?e.outerHTML:((t=document.createElement("div")).appendChild(e),t.innerHTML)},o.prototype.get_single_html=function(){return'<a class="chosen-single chosen-default">\n <span>'+this.default_text+'</span>\n <div><b></b></div>\n</a>\n<div class="chosen-drop">\n <div class="chosen-search">\n <input class="chosen-search-input" type="text" autocomplete="off" />\n </div>\n <ul class="chosen-results"></ul>\n</div>'},o.prototype.get_multi_html=function(){return'<ul class="chosen-choices">\n <li class="search-field">\n <input class="chosen-search-input" type="text" autocomplete="off" value="'+this.default_text+'" />\n </li>\n</ul>\n<div class="chosen-drop">\n <ul class="chosen-results"></ul>\n</div>'},o.prototype.get_no_results_html=function(e){return'<li class="no-results">\n '+this.results_none_found+" <span>"+this.escape_html(e)+"</span>\n</li>"},o.browser_is_supported=function(){return"Microsoft Internet Explorer"===window.navigator.appName?8<=document.documentMode:!(/iP(od|hone)/i.test(window.navigator.userAgent)||/IEMobile/i.test(window.navigator.userAgent)||/Windows Phone/i.test(window.navigator.userAgent)||/BlackBerry/i.test(window.navigator.userAgent)||/BB10/i.test(window.navigator.userAgent)||/Android.*Mobile/i.test(window.navigator.userAgent))},o.default_multiple_text="Select Some Options",o.default_single_text="Select an Option",o.default_no_result_text="No results match",o}(),(a=jQuery).fn.extend({chosen:function(i){return n.browser_is_supported()?this.each(function(e){var t,n;n=(t=a(this)).data("chosen"),"destroy"!==i?n instanceof o||t.data("chosen",new o(this,i)):n instanceof o&&n.destroy()}):this}}),o=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return function(e,t){for(var n in t)r.call(t,n)&&(e[n]=t[n]);function i(){this.constructor=e}i.prototype=t.prototype,e.prototype=new i,e.__super__=t.prototype}(t,n),t.prototype.setup=function(){return this.form_field_jq=a(this.form_field),this.current_selectedIndex=this.form_field.selectedIndex},t.prototype.set_up_html=function(){var e,t;return(e=["chosen-container"]).push("chosen-container-"+(this.is_multiple?"multi":"single")),this.inherit_select_classes&&this.form_field.className&&e.push(this.form_field.className),this.is_rtl&&e.push("chosen-rtl"),t={class:e.join(" "),title:this.form_field.title},this.form_field.id.length&&(t.id=this.form_field.id.replace(/[^\w]/g,"_")+"_chosen"),this.container=a("<div />",t),this.container.width(this.container_width()),this.is_multiple?this.container.html(this.get_multi_html()):this.container.html(this.get_single_html()),this.form_field_jq.hide().after(this.container),this.dropdown=this.container.find("div.chosen-drop").first(),this.search_field=this.container.find("input").first(),this.search_results=this.container.find("ul.chosen-results").first(),this.search_field_scale(),this.search_no_results=this.container.find("li.no-results").first(),this.is_multiple?(this.search_choices=this.container.find("ul.chosen-choices").first(),this.search_container=this.container.find("li.search-field").first()):(this.search_container=this.container.find("div.chosen-search").first(),this.selected_item=this.container.find(".chosen-single").first()),this.results_build(),this.set_tab_index(),this.set_label_behavior()},t.prototype.on_ready=function(){return this.form_field_jq.trigger("chosen:ready",{chosen:this})},t.prototype.register_observers=function(){var t,n,i,o,r,s,a,l,c,u,h,d,f,p,_,m,g,v,y,b,w,D,C,x;return this.container.on("touchstart.chosen",(t=this,function(e){t.container_mousedown(e)})),this.container.on("touchend.chosen",(n=this,function(e){n.container_mouseup(e)})),this.container.on("mousedown.chosen",(i=this,function(e){i.container_mousedown(e)})),this.container.on("mouseup.chosen",(o=this,function(e){o.container_mouseup(e)})),this.container.on("mouseenter.chosen",(r=this,function(e){r.mouse_enter(e)})),this.container.on("mouseleave.chosen",(s=this,function(e){s.mouse_leave(e)})),this.search_results.on("mouseup.chosen",(a=this,function(e){a.search_results_mouseup(e)})),this.search_results.on("mouseover.chosen",(l=this,function(e){l.search_results_mouseover(e)})),this.search_results.on("mouseout.chosen",(c=this,function(e){c.search_results_mouseout(e)})),this.search_results.on("mousewheel.chosen DOMMouseScroll.chosen",(u=this,function(e){u.search_results_mousewheel(e)})),this.search_results.on("touchstart.chosen",(h=this,function(e){h.search_results_touchstart(e)})),this.search_results.on("touchmove.chosen",(d=this,function(e){d.search_results_touchmove(e)})),this.search_results.on("touchend.chosen",(f=this,function(e){f.search_results_touchend(e)})),this.form_field_jq.on("chosen:updated.chosen",(p=this,function(e){p.results_update_field(e)})),this.form_field_jq.on("chosen:activate.chosen",(_=this,function(e){_.activate_field(e)})),this.form_field_jq.on("chosen:open.chosen",(m=this,function(e){m.container_mousedown(e)})),this.form_field_jq.on("chosen:close.chosen",(g=this,function(e){g.close_field(e)})),this.search_field.on("blur.chosen",(v=this,function(e){v.input_blur(e)})),this.search_field.on("keyup.chosen",(y=this,function(e){y.keyup_checker(e)})),this.search_field.on("keydown.chosen",(b=this,function(e){b.keydown_checker(e)})),this.search_field.on("focus.chosen",(w=this,function(e){w.input_focus(e)})),this.search_field.on("cut.chosen",(D=this,function(e){D.clipboard_event_checker(e)})),this.search_field.on("paste.chosen",(C=this,function(e){C.clipboard_event_checker(e)})),this.is_multiple?this.search_choices.on("click.chosen",(x=this,function(e){x.choices_click(e)})):this.container.on("click.chosen",function(e){e.preventDefault()})},t.prototype.destroy=function(){return a(this.container[0].ownerDocument).off("click.chosen",this.click_test_action),0<this.form_field_label.length&&this.form_field_label.off("click.chosen"),this.search_field[0].tabIndex&&(this.form_field_jq[0].tabIndex=this.search_field[0].tabIndex),this.container.remove(),this.form_field_jq.removeData("chosen"),this.form_field_jq.show()},t.prototype.search_field_disabled=function(){return this.is_disabled=this.form_field.disabled||this.form_field_jq.parents("fieldset").is(":disabled"),this.container.toggleClass("chosen-disabled",this.is_disabled),this.search_field[0].disabled=this.is_disabled,this.is_multiple||this.selected_item.off("focus.chosen",this.activate_field),this.is_disabled?this.close_field():this.is_multiple?void 0:this.selected_item.on("focus.chosen",this.activate_field)},t.prototype.container_mousedown=function(e){var t;if(!this.is_disabled)return!e||"mousedown"!==(t=e.type)&&"touchstart"!==t||this.results_showing||e.preventDefault(),null!=e&&a(e.target).hasClass("search-choice-close")?void 0:(this.active_field?this.is_multiple||!e||a(e.target)[0]!==this.selected_item[0]&&!a(e.target).parents("a.chosen-single").length||(e.preventDefault(),this.results_toggle()):(this.is_multiple&&this.search_field.val(""),a(this.container[0].ownerDocument).on("click.chosen",this.click_test_action),this.results_show()),this.activate_field())},t.prototype.container_mouseup=function(e){if("ABBR"===e.target.nodeName&&!this.is_disabled)return this.results_reset(e)},t.prototype.search_results_mousewheel=function(e){var t;if(e.originalEvent&&(t=e.originalEvent.deltaY||-e.originalEvent.wheelDelta||e.originalEvent.detail),null!=t)return e.preventDefault(),"DOMMouseScroll"===e.type&&(t*=40),this.search_results.scrollTop(t+this.search_results.scrollTop())},t.prototype.blur_test=function(e){if(!this.active_field&&this.container.hasClass("chosen-container-active"))return this.close_field()},t.prototype.close_field=function(){return a(this.container[0].ownerDocument).off("click.chosen",this.click_test_action),this.active_field=!1,this.results_hide(),this.container.removeClass("chosen-container-active"),this.clear_backstroke(),this.show_search_field_default(),this.search_field_scale(),this.search_field.blur()},t.prototype.activate_field=function(){if(!this.is_disabled)return this.container.addClass("chosen-container-active"),this.active_field=!0,this.search_field.val(this.search_field.val()),this.search_field.focus()},t.prototype.test_active_click=function(e){var t;return(t=a(e.target).closest(".chosen-container")).length&&this.container[0]===t[0]?this.active_field=!0:this.close_field()},t.prototype.results_build=function(){return this.parsing=!0,this.selected_option_count=null,this.results_data=s.select_to_array(this.form_field),this.is_multiple?this.search_choices.find("li.search-choice").remove():(this.single_set_selected_text(),this.disable_search||this.form_field.options.length<=this.disable_search_threshold?(this.search_field[0].readOnly=!0,this.container.addClass("chosen-container-single-nosearch")):(this.search_field[0].readOnly=!1,this.container.removeClass("chosen-container-single-nosearch"))),this.update_results_content(this.results_option_build({first:!0})),this.search_field_disabled(),this.show_search_field_default(),this.search_field_scale(),this.parsing=!1},t.prototype.result_do_highlight=function(e){var t,n,i,o;if(e.length){if(this.result_clear_highlight(),this.result_highlight=e,this.result_highlight.addClass("highlighted"),(i=parseInt(this.search_results.css("maxHeight"),10))+(o=this.search_results.scrollTop())<=(t=(n=this.result_highlight.position().top+this.search_results.scrollTop())+this.result_highlight.outerHeight()))return this.search_results.scrollTop(0<t-i?t-i:0);if(n<o)return this.search_results.scrollTop(n)}},t.prototype.result_clear_highlight=function(){return this.result_highlight&&this.result_highlight.removeClass("highlighted"),this.result_highlight=null},t.prototype.results_show=function(){return this.is_multiple&&this.max_selected_options<=this.choices_count()?(this.form_field_jq.trigger("chosen:maxselected",{chosen:this}),!1):(this.container.addClass("chosen-with-drop"),this.results_showing=!0,this.search_field.focus(),this.search_field.val(this.get_search_field_value()),this.winnow_results(),this.form_field_jq.trigger("chosen:showing_dropdown",{chosen:this}))},t.prototype.update_results_content=function(e){return this.search_results.html(e)},t.prototype.results_hide=function(){return this.results_showing&&(this.result_clear_highlight(),this.container.removeClass("chosen-with-drop"),this.form_field_jq.trigger("chosen:hiding_dropdown",{chosen:this})),this.results_showing=!1},t.prototype.set_tab_index=function(e){var t;if(this.form_field.tabIndex)return t=this.form_field.tabIndex,this.form_field.tabIndex=-1,this.search_field[0].tabIndex=t},t.prototype.set_label_behavior=function(){if(this.form_field_label=this.form_field_jq.parents("label"),!this.form_field_label.length&&this.form_field.id.length&&(this.form_field_label=a("label[for='"+this.form_field.id+"']")),0<this.form_field_label.length)return this.form_field_label.on("click.chosen",this.label_click_handler)},t.prototype.show_search_field_default=function(){return this.is_multiple&&this.choices_count()<1&&!this.active_field?(this.search_field.val(this.default_text),this.search_field.addClass("default")):(this.search_field.val(""),this.search_field.removeClass("default"))},t.prototype.search_results_mouseup=function(e){var t;if((t=a(e.target).hasClass("active-result")?a(e.target):a(e.target).parents(".active-result").first()).length)return this.result_highlight=t,this.result_select(e),this.search_field.focus()},t.prototype.search_results_mouseover=function(e){var t;if(t=a(e.target).hasClass("active-result")?a(e.target):a(e.target).parents(".active-result").first())return this.result_do_highlight(t)},t.prototype.search_results_mouseout=function(e){if(a(e.target).hasClass("active-result")||a(e.target).parents(".active-result").first())return this.result_clear_highlight()},t.prototype.choice_build=function(e){var t,n,i;return t=a("<li />",{class:"search-choice"}).html("<span>"+this.choice_label(e)+"</span>"),e.disabled?t.addClass("search-choice-disabled"):((n=a("<a />",{class:"search-choice-close","data-option-array-index":e.array_index})).on("click.chosen",(i=this,function(e){return i.choice_destroy_link_click(e)})),t.append(n)),this.search_container.before(t)},t.prototype.choice_destroy_link_click=function(e){if(e.preventDefault(),e.stopPropagation(),!this.is_disabled)return this.choice_destroy(a(e.target))},t.prototype.choice_destroy=function(e){if(this.result_deselect(e[0].getAttribute("data-option-array-index")))return this.active_field?this.search_field.focus():this.show_search_field_default(),this.is_multiple&&0<this.choices_count()&&this.get_search_field_value().length<1&&this.results_hide(),e.parents("li").first().remove(),this.search_field_scale()},t.prototype.results_reset=function(){if(this.reset_single_select_options(),this.form_field.options[0].selected=!0,this.single_set_selected_text(),this.show_search_field_default(),this.results_reset_cleanup(),this.trigger_form_field_change(),this.active_field)return this.results_hide()},t.prototype.results_reset_cleanup=function(){return this.current_selectedIndex=this.form_field.selectedIndex,this.selected_item.find("abbr").remove()},t.prototype.result_select=function(e){var t,n;if(this.result_highlight)return t=this.result_highlight,this.result_clear_highlight(),this.is_multiple&&this.max_selected_options<=this.choices_count()?(this.form_field_jq.trigger("chosen:maxselected",{chosen:this}),!1):(this.is_multiple?t.removeClass("active-result"):this.reset_single_select_options(),t.addClass("result-selected"),(n=this.results_data[t[0].getAttribute("data-option-array-index")]).selected=!0,this.form_field.options[n.options_index].selected=!0,this.selected_option_count=null,this.is_multiple?this.choice_build(n):this.single_set_selected_text(this.choice_label(n)),this.is_multiple&&(!this.hide_results_on_select||e.metaKey||e.ctrlKey)?e.metaKey||e.ctrlKey?this.winnow_results({skip_highlight:!0}):(this.search_field.val(""),this.winnow_results()):(this.results_hide(),this.show_search_field_default()),(this.is_multiple||this.form_field.selectedIndex!==this.current_selectedIndex)&&this.trigger_form_field_change({selected:this.form_field.options[n.options_index].value}),this.current_selectedIndex=this.form_field.selectedIndex,e.preventDefault(),this.search_field_scale())},t.prototype.single_set_selected_text=function(e){return null==e&&(e=this.default_text),e===this.default_text?this.selected_item.addClass("chosen-default"):(this.single_deselect_control_build(),this.selected_item.removeClass("chosen-default")),this.selected_item.find("span").html(e)},t.prototype.result_deselect=function(e){var t;return t=this.results_data[e],!this.form_field.options[t.options_index].disabled&&(t.selected=!1,this.form_field.options[t.options_index].selected=!1,this.selected_option_count=null,this.result_clear_highlight(),this.results_showing&&this.winnow_results(),this.trigger_form_field_change({deselected:this.form_field.options[t.options_index].value}),this.search_field_scale(),!0)},t.prototype.single_deselect_control_build=function(){if(this.allow_single_deselect)return this.selected_item.find("abbr").length||this.selected_item.find("span").first().after('<abbr class="search-choice-close"></abbr>'),this.selected_item.addClass("chosen-single-with-deselect")},t.prototype.get_search_field_value=function(){return this.search_field.val()},t.prototype.get_search_text=function(){return a.trim(this.get_search_field_value())},t.prototype.escape_html=function(e){return a("<div/>").text(e).html()},t.prototype.winnow_results_set_highlight=function(){var e,t;if(null!=(e=(t=this.is_multiple?[]:this.search_results.find(".result-selected.active-result")).length?t.first():this.search_results.find(".active-result").first()))return this.result_do_highlight(e)},t.prototype.no_results=function(e){var t;return t=this.get_no_results_html(e),this.search_results.append(t),this.form_field_jq.trigger("chosen:no_results",{chosen:this})},t.prototype.no_results_clear=function(){return this.search_results.find(".no-results").remove()},t.prototype.keydown_arrow=function(){var e;return this.results_showing&&this.result_highlight?(e=this.result_highlight.nextAll("li.active-result").first())?this.result_do_highlight(e):void 0:this.results_show()},t.prototype.keyup_arrow=function(){var e;return this.results_showing||this.is_multiple?this.result_highlight?(e=this.result_highlight.prevAll("li.active-result")).length?this.result_do_highlight(e.first()):(0<this.choices_count()&&this.results_hide(),this.result_clear_highlight()):void 0:this.results_show()},t.prototype.keydown_backstroke=function(){var e;return this.pending_backstroke?(this.choice_destroy(this.pending_backstroke.find("a").first()),this.clear_backstroke()):(e=this.search_container.siblings("li.search-choice").last()).length&&!e.hasClass("search-choice-disabled")?(this.pending_backstroke=e,this.single_backstroke_delete?this.keydown_backstroke():this.pending_backstroke.addClass("search-choice-focus")):void 0},t.prototype.clear_backstroke=function(){return this.pending_backstroke&&this.pending_backstroke.removeClass("search-choice-focus"),this.pending_backstroke=null},t.prototype.search_field_scale=function(){var e,t,n,i,o,r,s;if(this.is_multiple){for(o={position:"absolute",left:"-1000px",top:"-1000px",display:"none",whiteSpace:"pre"},t=0,n=(r=["fontSize","fontStyle","fontWeight","fontFamily","lineHeight","textTransform","letterSpacing"]).length;t<n;t++)o[i=r[t]]=this.search_field.css(i);return(e=a("<div />").css(o)).text(this.get_search_field_value()),a("body").append(e),s=e.width()+25,e.remove(),this.container.is(":visible")&&(s=Math.min(this.container.outerWidth()-10,s)),this.search_field.width(s)}},t.prototype.trigger_form_field_change=function(e){return this.form_field_jq.trigger("input",e),this.form_field_jq.trigger("change",e)},t}()}.call(this),function(s){"use strict";function o(e,t,n){this.init(e,t,n)}function e(){this.rules=[]}s.extend(o.prototype,{init:function(e,t,n){this.controller=e,this.condition=t,this.value=n,this.rules=[],this.controls=[]},evalCondition:function(e,t,n,i,o){if("=="==n)return this.checkBoolean(i)==this.checkBoolean(o);if("!="==n)return this.checkBoolean(i)!=this.checkBoolean(o);if(">="==n)return Number(o)>=Number(i);if("<="==n)return Number(o)<=Number(i);if(">"==n)return Number(o)>Number(i);if("<"==n)return Number(o)<Number(i);if("()"==n)return window[i](e,t,o);if("any"==n){if(s.isArray(o)){for(var r=o.length-1;0<=r;r--)if(-1!==s.inArray(o[r],i.split(",")))return!0}else if(-1!==s.inArray(o,i.split(",")))return!0}else if("not-any"==n)if(s.isArray(o)){for(r=o.length-1;0<=r;r--)if(-1==s.inArray(o[r],i.split(",")))return!0}else if(-1==s.inArray(o,i.split(",")))return!0;return!1},checkBoolean:function(e){switch(e){case!0:case"true":case 1:case"1":e=!0;break;case null:case!1:case"false":case 0:case"0":e=!1}return e},checkCondition:function(e){if(!this.condition)return!0;var t=e.find(this.controller),n=this.getControlValue(e,t);return void 0!==n&&(n=this.normalizeValue(t,this.value,n),this.evalCondition(e,t,this.condition,this.value,n))},normalizeValue:function(e,t,n){return"number"==typeof t?parseFloat(n):n},getControlValue:function(e,t){return 1<t.length&&("radio"==t.attr("type")||"checkbox"==t.attr("type"))?t.filter(":checked").map(function(){return this.value}).get():"checkbox"==t.attr("type")||"radio"==t.attr("type")?t.is(":checked"):t.val()},createRule:function(e,t,n){var i=new o(e,t,n);return this.rules.push(i),i},include:function(e){this.controls.push(e)},applyRule:function(n,e){var t;t=void 0===e?this.checkCondition(n):e;var i=s.map(this.controls,function(e,t){return n.find(e)});t?(s(i).each(function(){s(this).removeClass("ulf-depend-on")}),s(this.rules).each(function(){this.applyRule(n)})):(s(i).each(function(){s(this).addClass("ulf-depend-on")}),s(this.rules).each(function(){this.applyRule(n,!1)}))}}),s.extend(e.prototype,{createRule:function(e,t,n){var i=new o(e,t,n);return this.rules.push(i),i},applyRules:function(e){s(this.rules).each(function(){this.applyRule(e)})}}),s.ulf_deps={createRuleset:function(){return new e},enable:function(n,i,o){return n.on("change keyup",function(e){var t=e.target.getAttribute("data-depend-id")||e.target.getAttribute("data-sub-depend-id");-1!==o.indexOf(t)&&i.applyRules(n)}),i.applyRules(n),!0}}}(jQuery),function(e,n){if("function"==typeof define&&define.amd)define(["exports","jquery"],function(e,t){return n(e,t)});else if("undefined"!=typeof exports){var t=require("jquery");n(exports,t)}else n(e,e.jQuery||e.Zepto||e.ender||e.$)}(this,function(e,t){var a={validate:/^(?!(_nonce|_pseudo))[a-zA-Z0-9_-]*(?:\[(?:\d*|(?!(_nonce|_pseudo))[a-zA-Z0-9_-]+)\])*$/i,key:/[a-zA-Z0-9_-]+|(?=\[\])/g,named:/^[a-zA-Z0-9_-]+$/,push:/^$/,fixed:/^\d+$/};function n(i,e){var n={},r={};function s(e,t,n){return e[t]=n,e}function t(){return n}this.addPair=function(e){if(!a.validate.test(e.name))return this;var t=function(e,t){for(var n,i=e.match(a.key);void 0!==(n=i.pop());)a.push.test(n)?t=s([],(o=e.replace(/\[\]$/,""),void 0===r[o]&&(r[o]=0),r[o]++),t):a.fixed.test(n)?t=s([],n,t):a.named.test(n)&&(t=s({},n,t));var o;return t}(e.name,e.value);return n=i.extend(!0,n,t),this},this.addPairs=function(e){if(!i.isArray(e))throw new Error("formSerializer.addPairs expects an Array");for(var t=0,n=e.length;t<n;t++)this.addPair(e[t]);return this},this.serialize=t,this.serializeJSON=function(){return JSON.stringify(t())}}return n.patterns=a,n.serializeObject=function(){return new n(t,this).addPairs(this.serializeArray()).serialize()},n.serializeJSON=function(){return new n(t,this).addPairs(this.serializeArray()).serializeJSON()},void 0!==t.fn&&(t.fn.serializeObjectULF=n.serializeObject,t.fn.serializeJSONULF=n.serializeJSON),e.FormSerializer=n});
1
+ /* Codestar Framework | A Simple and Lightweight WordPress Option Framework - v2.2.8*/
2
 
3
  !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).flatpickr=t()}(this,function(){"use strict";var ee=function(){return(ee=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function te(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var i=Array(e),o=0;for(t=0;t<n;t++)for(var r=arguments[t],s=0,a=r.length;s<a;s++,o++)i[o]=r[s];return i}var ne=["onChange","onClose","onDayCreate","onDestroy","onKeyDown","onMonthChange","onOpen","onParseConfig","onReady","onValueUpdate","onYearChange","onPreCalendarPosition"],ie={_disable:[],allowInput:!1,allowInvalidPreload:!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",autoFillDefaultTime:!0,clickOpens:!0,closeOnSelect:!0,conjunction:", ",dateFormat:"Y-m-d",defaultHour:12,defaultMinute:0,defaultSeconds:0,disable:[],disableMobile:!1,enableSeconds:!1,enableTime:!1,errorHandler:function(e){return"undefined"!=typeof console&&console.warn(e)},getWeek:function(e){var t=new Date(e.getTime());t.setHours(0,0,0,0),t.setDate(t.getDate()+3-(t.getDay()+6)%7);var n=new Date(t.getFullYear(),0,4);return 1+Math.round(((t.getTime()-n.getTime())/864e5-3+(n.getDay()+6)%7)/7)},hourIncrement:1,ignoredFocusElements:[],inline:!1,locale:"default",minuteIncrement:5,mode:"single",monthSelectorType:"dropdown",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},oe={weekdays:{shorthand:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],longhand:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},months:{shorthand:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],longhand:["January","February","March","April","May","June","July","August","September","October","November","December"]},daysInMonth:[31,28,31,30,31,30,31,31,30,31,30,31],firstDayOfWeek:0,ordinal:function(e){var t=e%100;if(3<t&&t<21)return"th";switch(t%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",monthAriaLabel:"Month",hourAriaLabel:"Hour",minuteAriaLabel:"Minute",time_24hr:!1},re=function(e,t){return void 0===t&&(t=2),("000"+e).slice(-1*t)},se=function(e){return!0===e?1:0};function ae(t,n){var i;return function(){var e=this;clearTimeout(i),i=setTimeout(function(){return t.apply(e,arguments)},n)}}var le=function(e){return e instanceof Array?e:[e]};function ce(e,t,n){if(!0===n)return e.classList.add(t);e.classList.remove(t)}function ue(e,t,n){var i=window.document.createElement(e);return t=t||"",n=n||"",i.className=t,void 0!==n&&(i.textContent=n),i}function he(e){for(;e.firstChild;)e.removeChild(e.firstChild)}function de(e,t){var n=ue("div","numInputWrapper"),i=ue("input","numInput "+e),o=ue("span","arrowUp"),r=ue("span","arrowDown");if(-1===navigator.userAgent.indexOf("MSIE 9.0")?i.type="number":(i.type="text",i.pattern="\\d*"),void 0!==t)for(var s in t)i.setAttribute(s,t[s]);return n.appendChild(i),n.appendChild(o),n.appendChild(r),n}function fe(t){try{return"function"!=typeof t.composedPath?t.target:t.composedPath()[0]}catch(e){return t.target}}var e=function(){},pe=function(e,t,n){return n.months[t?"shorthand":"longhand"][e]},b={D:e,F:function(e,t,n){e.setMonth(n.months.longhand.indexOf(t))},G:function(e,t){e.setHours(parseFloat(t))},H:function(e,t){e.setHours(parseFloat(t))},J:function(e,t){e.setDate(parseFloat(t))},K:function(e,t,n){e.setHours(e.getHours()%12+12*se(new RegExp(n.amPM[1],"i").test(t)))},M:function(e,t,n){e.setMonth(n.months.shorthand.indexOf(t))},S:function(e,t){e.setSeconds(parseFloat(t))},U:function(e,t){return new Date(1e3*parseFloat(t))},W:function(e,t,n){var i=parseInt(t),o=new Date(e.getFullYear(),0,2+7*(i-1),0,0,0,0);return o.setDate(o.getDate()-o.getDay()+n.firstDayOfWeek),o},Y:function(e,t){e.setFullYear(parseFloat(t))},Z:function(e,t){return new Date(t)},d:function(e,t){e.setDate(parseFloat(t))},h:function(e,t){e.setHours(parseFloat(t))},i:function(e,t){e.setMinutes(parseFloat(t))},j:function(e,t){e.setDate(parseFloat(t))},l:e,m:function(e,t){e.setMonth(parseFloat(t)-1)},n:function(e,t){e.setMonth(parseFloat(t)-1)},s:function(e,t){e.setSeconds(parseFloat(t))},u:function(e,t){return new Date(parseFloat(t))},w:e,y:function(e,t){e.setFullYear(2e3+parseFloat(t))}},_e={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)",u:"(.+)",w:"(\\d\\d|\\d)",y:"(\\d{2})"},l={Z:function(e){return e.toISOString()},D:function(e,t,n){return t.weekdays.shorthand[l.w(e,t,n)]},F:function(e,t,n){return pe(l.n(e,t,n)-1,!1,t)},G:function(e,t,n){return re(l.h(e,t,n))},H:function(e){return re(e.getHours())},J:function(e,t){return void 0!==t.ordinal?e.getDate()+t.ordinal(e.getDate()):e.getDate()},K:function(e,t){return t.amPM[se(11<e.getHours())]},M:function(e,t){return pe(e.getMonth(),!0,t)},S:function(e){return re(e.getSeconds())},U:function(e){return e.getTime()/1e3},W:function(e,t,n){return n.getWeek(e)},Y:function(e){return re(e.getFullYear(),4)},d:function(e){return re(e.getDate())},h:function(e){return e.getHours()%12?e.getHours()%12:12},i:function(e){return re(e.getMinutes())},j:function(e){return e.getDate()},l:function(e,t){return t.weekdays.longhand[e.getDay()]},m:function(e){return re(e.getMonth()+1)},n:function(e){return e.getMonth()+1},s:function(e){return e.getSeconds()},u:function(e){return e.getTime()},w:function(e){return e.getDay()},y:function(e){return String(e.getFullYear()).substring(2)}},me=function(e){var t=e.config,r=void 0===t?ie:t,n=e.l10n,s=void 0===n?oe:n,i=e.isMobile,a=void 0!==i&&i;return function(i,e,t){var o=t||s;return void 0===r.formatDate||a?e.split("").map(function(e,t,n){return l[e]&&"\\"!==n[t-1]?l[e](i,o,r):"\\"!==e?e:""}).join(""):r.formatDate(i,e,o)}},ge=function(e){var t=e.config,v=void 0===t?ie:t,n=e.l10n,y=void 0===n?oe:n;return function(e,t,n,i){if(0===e||e){var o,r=i||y,s=e;if(e instanceof Date)o=new Date(e.getTime());else if("string"!=typeof e&&void 0!==e.toFixed)o=new Date(e);else if("string"==typeof e){var a=t||(v||ie).dateFormat,l=String(e).trim();if("today"===l)o=new Date,n=!0;else if(/Z$/.test(l)||/GMT$/.test(l))o=new Date(e);else if(v&&v.parseDate)o=v.parseDate(e,a);else{o=v&&v.noCalendar?new Date((new Date).setHours(0,0,0,0)):new Date((new Date).getFullYear(),0,1,0,0,0,0);for(var c=void 0,u=[],h=0,d=0,f="";h<a.length;h++){var p=a[h],_="\\"===p,m="\\"===a[h-1]||_;if(_e[p]&&!m){f+=_e[p];var g=new RegExp(f).exec(e);g&&(c=!0)&&u["Y"!==p?"push":"unshift"]({fn:b[p],val:g[++d]})}else _||(f+=".");u.forEach(function(e){var t=e.fn,n=e.val;return o=t(o,n,r)||o})}o=c?o:void 0}}if(o instanceof Date&&!isNaN(o.getTime()))return!0===n&&o.setHours(0,0,0,0),o;v.errorHandler(new Error("Invalid date provided: "+s))}}};function ve(e,t,n){return void 0===n&&(n=!0),!1!==n?new Date(e.getTime()).setHours(0,0,0,0)-new Date(t.getTime()).setHours(0,0,0,0):e.getTime()-t.getTime()}var ye=function(e,t,n){return e>Math.min(t,n)&&e<Math.max(t,n)},be={DAY:864e5};function we(e){var t=e.defaultHour,n=e.defaultMinute,i=e.defaultSeconds;if(void 0!==e.minDate){var o=e.minDate.getHours(),r=e.minDate.getMinutes(),s=e.minDate.getSeconds();t<o&&(t=o),t===o&&n<r&&(n=r),t===o&&n===r&&i<s&&(i=e.minDate.getSeconds())}if(void 0!==e.maxDate){var a=e.maxDate.getHours(),l=e.maxDate.getMinutes();(t=Math.min(t,a))===a&&(n=Math.min(l,n)),t===a&&n===l&&(i=e.maxDate.getSeconds())}return{hours:t,minutes:n,seconds:i}}"function"!=typeof Object.assign&&(Object.assign=function(n){for(var e=[],t=1;t<arguments.length;t++)e[t-1]=arguments[t];if(!n)throw TypeError("Cannot convert undefined or null to object");for(var i=function(t){t&&Object.keys(t).forEach(function(e){return n[e]=t[e]})},o=0,r=e;o<r.length;o++){i(r[o])}return n});var De=300;function s(d,u){var D={config:ee(ee({},ie),Ce.defaultConfig),l10n:oe};function h(e){return e.bind(D)}function t(){var t=D.config;!1===t.weekNumbers&&1===t.showMonths||!0!==t.noCalendar&&window.requestAnimationFrame(function(){if(void 0!==D.calendarContainer&&(D.calendarContainer.style.visibility="hidden",D.calendarContainer.style.display="block"),void 0!==D.daysContainer){var e=(D.days.offsetWidth+1)*t.showMonths;D.daysContainer.style.width=e+"px",D.calendarContainer.style.width=e+(void 0!==D.weekWrapper?D.weekWrapper.offsetWidth:0)+"px",D.calendarContainer.style.removeProperty("visibility"),D.calendarContainer.style.removeProperty("display")}})}function f(e){if(0===D.selectedDates.length){var t=void 0===D.config.minDate||0<=ve(new Date,D.config.minDate)?new Date:new Date(D.config.minDate.getTime()),n=we(D.config);t.setHours(n.hours,n.minutes,n.seconds,t.getMilliseconds()),D.selectedDates=[t],D.latestSelectedDateObj=t}void 0!==e&&"blur"!==e.type&&function(e){e.preventDefault();var t="keydown"===e.type,n=fe(e),i=n;void 0!==D.amPM&&n===D.amPM&&(D.amPM.textContent=D.l10n.amPM[se(D.amPM.textContent===D.l10n.amPM[0])]);var o=parseFloat(i.getAttribute("min")),r=parseFloat(i.getAttribute("max")),s=parseFloat(i.getAttribute("step")),a=parseInt(i.value,10),l=e.delta||(t?38===e.which?1:-1:0),c=a+s*l;if(void 0!==i.value&&2===i.value.length){var u=i===D.hourElement,h=i===D.minuteElement;c<o?(c=r+c+se(!u)+(se(u)&&se(!D.amPM)),h&&_(void 0,-1,D.hourElement)):r<c&&(c=i===D.hourElement?c-r-se(!D.amPM):o,h&&_(void 0,1,D.hourElement)),D.amPM&&u&&(1===s?c+a===23:Math.abs(c-a)>s)&&(D.amPM.textContent=D.l10n.amPM[se(D.amPM.textContent===D.l10n.amPM[0])]),i.value=re(c)}}(e);var i=D._input.value;p(),X(),D._input.value!==i&&D._debouncedChange()}function p(){if(void 0!==D.hourElement&&void 0!==D.minuteElement){var e,t,n=(parseInt(D.hourElement.value.slice(-2),10)||0)%24,i=(parseInt(D.minuteElement.value,10)||0)%60,o=void 0!==D.secondElement?(parseInt(D.secondElement.value,10)||0)%60:0;void 0!==D.amPM&&(e=n,t=D.amPM.textContent,n=e%12+12*se(t===D.l10n.amPM[1]));var r=void 0!==D.config.minTime||D.config.minDate&&D.minDateHasTime&&D.latestSelectedDateObj&&0===ve(D.latestSelectedDateObj,D.config.minDate,!0);if(void 0!==D.config.maxTime||D.config.maxDate&&D.maxDateHasTime&&D.latestSelectedDateObj&&0===ve(D.latestSelectedDateObj,D.config.maxDate,!0)){var s=void 0!==D.config.maxTime?D.config.maxTime:D.config.maxDate;(n=Math.min(n,s.getHours()))===s.getHours()&&(i=Math.min(i,s.getMinutes())),i===s.getMinutes()&&(o=Math.min(o,s.getSeconds()))}if(r){var a=void 0!==D.config.minTime?D.config.minTime:D.config.minDate;(n=Math.max(n,a.getHours()))===a.getHours()&&i<a.getMinutes()&&(i=a.getMinutes()),i===a.getMinutes()&&(o=Math.max(o,a.getSeconds()))}l(n,i,o)}}function o(e){var t=e||D.latestSelectedDateObj;t&&l(t.getHours(),t.getMinutes(),t.getSeconds())}function l(e,t,n){void 0!==D.latestSelectedDateObj&&D.latestSelectedDateObj.setHours(e%24,t,n||0,0),D.hourElement&&D.minuteElement&&!D.isMobile&&(D.hourElement.value=re(D.config.time_24hr?e:(12+e)%12+12*se(e%12==0)),D.minuteElement.value=re(t),void 0!==D.amPM&&(D.amPM.textContent=D.l10n.amPM[se(12<=e)]),void 0!==D.secondElement&&(D.secondElement.value=re(n)))}function n(e){var t=fe(e),n=parseInt(t.value)+(e.delta||0);(1<n/1e3||"Enter"===e.key&&!/[^\d]/.test(n.toString()))&&S(n)}function s(t,n,i,o){return n instanceof Array?n.forEach(function(e){return s(t,e,i,o)}):t instanceof Array?t.forEach(function(e){return s(e,n,i,o)}):(t.addEventListener(n,i,o),void D._handlers.push({remove:function(){return t.removeEventListener(n,i)}}))}function c(){K("onChange")}function i(e,t){var n=void 0!==e?D.parseDate(e):D.latestSelectedDateObj||(D.config.minDate&&D.config.minDate>D.now?D.config.minDate:D.config.maxDate&&D.config.maxDate<D.now?D.config.maxDate:D.now),i=D.currentYear,o=D.currentMonth;try{void 0!==n&&(D.currentYear=n.getFullYear(),D.currentMonth=n.getMonth())}catch(e){e.message="Invalid date supplied: "+n,D.config.errorHandler(e)}t&&D.currentYear!==i&&(K("onYearChange"),w()),!t||D.currentYear===i&&D.currentMonth===o||K("onMonthChange"),D.redraw()}function r(e){var t=fe(e);~t.className.indexOf("arrow")&&_(e,t.classList.contains("arrowUp")?1:-1)}function _(e,t,n){var i=e&&fe(e),o=n||i&&i.parentNode&&i.parentNode.firstChild,r=$("increment");r.delta=t,o&&o.dispatchEvent(r)}function m(e,t,n,i){var o,r=A(t,!0),s=ue("span","flatpickr-day "+e,t.getDate().toString());return s.dateObj=t,s.$i=i,s.setAttribute("aria-label",D.formatDate(t,D.config.ariaDateFormat)),-1===e.indexOf("hidden")&&0===ve(t,D.now)&&((D.todayDateElem=s).classList.add("today"),s.setAttribute("aria-current","date")),r?(s.tabIndex=-1,Q(t)&&(s.classList.add("selected"),D.selectedDateElem=s,"range"===D.config.mode&&(ce(s,"startRange",D.selectedDates[0]&&0===ve(t,D.selectedDates[0],!0)),ce(s,"endRange",D.selectedDates[1]&&0===ve(t,D.selectedDates[1],!0)),"nextMonthDay"===e&&s.classList.add("inRange")))):s.classList.add("flatpickr-disabled"),"range"===D.config.mode&&(o=t,!("range"!==D.config.mode||D.selectedDates.length<2)&&0<=ve(o,D.selectedDates[0])&&ve(o,D.selectedDates[1])<=0&&!Q(t)&&s.classList.add("inRange")),D.weekNumbers&&1===D.config.showMonths&&"prevMonthDay"!==e&&n%7==1&&D.weekNumbers.insertAdjacentHTML("beforeend","<span class='flatpickr-day'>"+D.config.getWeek(t)+"</span>"),K("onDayCreate",s),s}function g(e){e.focus(),"range"===D.config.mode&&F(e)}function v(e){for(var t=0<e?0:D.config.showMonths-1,n=0<e?D.config.showMonths:-1,i=t;i!=n;i+=e)for(var o=D.daysContainer.children[i],r=0<e?0:o.children.length-1,s=0<e?o.children.length:-1,a=r;a!=s;a+=e){var l=o.children[a];if(-1===l.className.indexOf("hidden")&&A(l.dateObj))return l}}function y(e,t){var n=I(document.activeElement||document.body),i=void 0!==e?e:n?document.activeElement:void 0!==D.selectedDateElem&&I(D.selectedDateElem)?D.selectedDateElem:void 0!==D.todayDateElem&&I(D.todayDateElem)?D.todayDateElem:v(0<t?1:-1);void 0===i?D._input.focus():n?function(e,t){for(var n=-1===e.className.indexOf("Month")?e.dateObj.getMonth():D.currentMonth,i=0<t?D.config.showMonths:-1,o=0<t?1:-1,r=n-D.currentMonth;r!=i;r+=o)for(var s=D.daysContainer.children[r],a=n-D.currentMonth===r?e.$i+t:t<0?s.children.length-1:0,l=s.children.length,c=a;0<=c&&c<l&&c!=(0<t?l:-1);c+=o){var u=s.children[c];if(-1===u.className.indexOf("hidden")&&A(u.dateObj)&&Math.abs(e.$i-c)>=Math.abs(t))return g(u)}D.changeMonth(o),y(v(o),0)}(i,t):g(i)}function a(e,t){for(var n=(new Date(e,t,1).getDay()-D.l10n.firstDayOfWeek+7)%7,i=D.utils.getDaysInMonth((t-1+12)%12,e),o=D.utils.getDaysInMonth(t,e),r=window.document.createDocumentFragment(),s=1<D.config.showMonths,a=s?"prevMonthDay hidden":"prevMonthDay",l=s?"nextMonthDay hidden":"nextMonthDay",c=i+1-n,u=0;c<=i;c++,u++)r.appendChild(m(a,new Date(e,t-1,c),c,u));for(c=1;c<=o;c++,u++)r.appendChild(m("",new Date(e,t,c),c,u));for(var h=o+1;h<=42-n&&(1===D.config.showMonths||u%7!=0);h++,u++)r.appendChild(m(l,new Date(e,t+1,h%o),h,u));var d=ue("div","dayContainer");return d.appendChild(r),d}function b(){if(void 0!==D.daysContainer){he(D.daysContainer),D.weekNumbers&&he(D.weekNumbers);for(var e=document.createDocumentFragment(),t=0;t<D.config.showMonths;t++){var n=new Date(D.currentYear,D.currentMonth,1);n.setMonth(D.currentMonth+t),e.appendChild(a(n.getFullYear(),n.getMonth()))}D.daysContainer.appendChild(e),D.days=D.daysContainer.firstChild,"range"===D.config.mode&&1===D.selectedDates.length&&F()}}function w(){if(!(1<D.config.showMonths||"dropdown"!==D.config.monthSelectorType)){var e;D.monthsDropdownContainer.tabIndex=-1,D.monthsDropdownContainer.innerHTML="";for(var t=0;t<12;t++)if(e=t,!(void 0!==D.config.minDate&&D.currentYear===D.config.minDate.getFullYear()&&e<D.config.minDate.getMonth()||void 0!==D.config.maxDate&&D.currentYear===D.config.maxDate.getFullYear()&&e>D.config.maxDate.getMonth())){var n=ue("option","flatpickr-monthDropdown-month");n.value=new Date(D.currentYear,t).getMonth().toString(),n.textContent=pe(t,D.config.shorthandCurrentMonth,D.l10n),n.tabIndex=-1,D.currentMonth===t&&(n.selected=!0),D.monthsDropdownContainer.appendChild(n)}}}function C(){var e,t=ue("div","flatpickr-month"),n=window.document.createDocumentFragment();e=1<D.config.showMonths||"static"===D.config.monthSelectorType?ue("span","cur-month"):(D.monthsDropdownContainer=ue("select","flatpickr-monthDropdown-months"),D.monthsDropdownContainer.setAttribute("aria-label",D.l10n.monthAriaLabel),s(D.monthsDropdownContainer,"change",function(e){var t=fe(e),n=parseInt(t.value,10);D.changeMonth(n-D.currentMonth),K("onMonthChange")}),w(),D.monthsDropdownContainer);var i=de("cur-year",{tabindex:"-1"}),o=i.getElementsByTagName("input")[0];o.setAttribute("aria-label",D.l10n.yearAriaLabel),D.config.minDate&&o.setAttribute("min",D.config.minDate.getFullYear().toString()),D.config.maxDate&&(o.setAttribute("max",D.config.maxDate.getFullYear().toString()),o.disabled=!!D.config.minDate&&D.config.minDate.getFullYear()===D.config.maxDate.getFullYear());var r=ue("div","flatpickr-current-month");return r.appendChild(e),r.appendChild(i),n.appendChild(r),t.appendChild(n),{container:t,yearElement:o,monthElement:e}}function x(){he(D.monthNav),D.monthNav.appendChild(D.prevMonthNav),D.config.showMonths&&(D.yearElements=[],D.monthElements=[]);for(var e=D.config.showMonths;e--;){var t=C();D.yearElements.push(t.yearElement),D.monthElements.push(t.monthElement),D.monthNav.appendChild(t.container)}D.monthNav.appendChild(D.nextMonthNav)}function M(){D.weekdayContainer?he(D.weekdayContainer):D.weekdayContainer=ue("div","flatpickr-weekdays");for(var e=D.config.showMonths;e--;){var t=ue("div","flatpickr-weekdaycontainer");D.weekdayContainer.appendChild(t)}return k(),D.weekdayContainer}function k(){if(D.weekdayContainer){var e=D.l10n.firstDayOfWeek,t=te(D.l10n.weekdays.shorthand);0<e&&e<t.length&&(t=te(t.splice(e,t.length),t.splice(0,e)));for(var n=D.config.showMonths;n--;)D.weekdayContainer.children[n].innerHTML="\n <span class='flatpickr-weekday'>\n "+t.join("</span><span class='flatpickr-weekday'>")+"\n </span>\n "}}function E(e,t){void 0===t&&(t=!0);var n=t?e:e-D.currentMonth;n<0&&!0===D._hidePrevMonthArrow||0<n&&!0===D._hideNextMonthArrow||(D.currentMonth+=n,(D.currentMonth<0||11<D.currentMonth)&&(D.currentYear+=11<D.currentMonth?1:-1,D.currentMonth=(D.currentMonth+12)%12,K("onYearChange"),w()),b(),K("onMonthChange"),V())}function T(e){return!(!D.config.appendTo||!D.config.appendTo.contains(e))||D.calendarContainer.contains(e)}function O(e){if(D.isOpen&&!D.config.inline){var t=fe(e),n=T(t),i=t===D.input||t===D.altInput||D.element.contains(t)||e.path&&e.path.indexOf&&(~e.path.indexOf(D.input)||~e.path.indexOf(D.altInput)),o="blur"===e.type?i&&e.relatedTarget&&!T(e.relatedTarget):!i&&!n&&!T(e.relatedTarget),r=!D.config.ignoredFocusElements.some(function(e){return e.contains(t)});o&&r&&(void 0!==D.timeContainer&&void 0!==D.minuteElement&&void 0!==D.hourElement&&""!==D.input.value&&void 0!==D.input.value&&f(),D.close(),D.config&&"range"===D.config.mode&&1===D.selectedDates.length&&(D.clear(!1),D.redraw()))}}function S(e){if(!(!e||D.config.minDate&&e<D.config.minDate.getFullYear()||D.config.maxDate&&e>D.config.maxDate.getFullYear())){var t=e,n=D.currentYear!==t;D.currentYear=t||D.currentYear,D.config.maxDate&&D.currentYear===D.config.maxDate.getFullYear()?D.currentMonth=Math.min(D.config.maxDate.getMonth(),D.currentMonth):D.config.minDate&&D.currentYear===D.config.minDate.getFullYear()&&(D.currentMonth=Math.max(D.config.minDate.getMonth(),D.currentMonth)),n&&(D.redraw(),K("onYearChange"),w())}}function A(e,t){var n;void 0===t&&(t=!0);var i=D.parseDate(e,void 0,t);if(D.config.minDate&&i&&ve(i,D.config.minDate,void 0!==t?t:!D.minDateHasTime)<0||D.config.maxDate&&i&&0<ve(i,D.config.maxDate,void 0!==t?t:!D.maxDateHasTime))return!1;if(!D.config.enable&&0===D.config.disable.length)return!0;if(void 0===i)return!1;for(var o=!!D.config.enable,r=null!==(n=D.config.enable)&&void 0!==n?n:D.config.disable,s=0,a=void 0;s<r.length;s++){if("function"==typeof(a=r[s])&&a(i))return o;if(a instanceof Date&&void 0!==i&&a.getTime()===i.getTime())return o;if("string"==typeof a){var l=D.parseDate(a,void 0,!0);return l&&l.getTime()===i.getTime()?o:!o}if("object"==typeof a&&void 0!==i&&a.from&&a.to&&i.getTime()>=a.from.getTime()&&i.getTime()<=a.to.getTime())return o}return!o}function I(e){return void 0!==D.daysContainer&&(-1===e.className.indexOf("hidden")&&-1===e.className.indexOf("flatpickr-disabled")&&D.daysContainer.contains(e))}function N(e){!(e.target===D._input)||!(0<D.selectedDates.length||0<D._input.value.length)||e.relatedTarget&&T(e.relatedTarget)||D.setDate(D._input.value,!0,e.target===D.altInput?D.config.altFormat:D.config.dateFormat)}function j(e){var t=fe(e),n=D.config.wrap?d.contains(t):t===D._input,i=D.config.allowInput,o=D.isOpen&&(!i||!n),r=D.config.inline&&n&&!i;if(13===e.keyCode&&n){if(i)return D.setDate(D._input.value,!0,t===D.altInput?D.config.altFormat:D.config.dateFormat),t.blur();D.open()}else if(T(t)||o||r){var s=!!D.timeContainer&&D.timeContainer.contains(t);switch(e.keyCode){case 13:s?(e.preventDefault(),f(),W()):B(e);break;case 27:e.preventDefault(),W();break;case 8:case 46:n&&!D.config.allowInput&&(e.preventDefault(),D.clear());break;case 37:case 39:if(s||n)D.hourElement&&D.hourElement.focus();else if(e.preventDefault(),void 0!==D.daysContainer&&(!1===i||document.activeElement&&I(document.activeElement))){var a=39===e.keyCode?1:-1;e.ctrlKey?(e.stopPropagation(),E(a),y(v(1),0)):y(void 0,a)}break;case 38:case 40:e.preventDefault();var l=40===e.keyCode?1:-1;D.daysContainer&&void 0!==t.$i||t===D.input||t===D.altInput?e.ctrlKey?(e.stopPropagation(),S(D.currentYear-l),y(v(1),0)):s||y(void 0,7*l):t===D.currentYearElement?S(D.currentYear-l):D.config.enableTime&&(!s&&D.hourElement&&D.hourElement.focus(),f(e),D._debouncedChange());break;case 9:if(s){var c=[D.hourElement,D.minuteElement,D.secondElement,D.amPM].concat(D.pluginElements).filter(function(e){return e}),u=c.indexOf(t);if(-1!==u){var h=c[u+(e.shiftKey?-1:1)];e.preventDefault(),(h||D._input).focus()}}else!D.config.noCalendar&&D.daysContainer&&D.daysContainer.contains(t)&&e.shiftKey&&(e.preventDefault(),D._input.focus())}}if(void 0!==D.amPM&&t===D.amPM)switch(e.key){case D.l10n.amPM[0].charAt(0):case D.l10n.amPM[0].charAt(0).toLowerCase():D.amPM.textContent=D.l10n.amPM[0],p(),X();break;case D.l10n.amPM[1].charAt(0):case D.l10n.amPM[1].charAt(0).toLowerCase():D.amPM.textContent=D.l10n.amPM[1],p(),X()}(n||T(t))&&K("onKeyDown",e)}function F(r){if(1===D.selectedDates.length&&(!r||r.classList.contains("flatpickr-day")&&!r.classList.contains("flatpickr-disabled"))){for(var s=r?r.dateObj.getTime():D.days.firstElementChild.dateObj.getTime(),a=D.parseDate(D.selectedDates[0],void 0,!0).getTime(),e=Math.min(s,D.selectedDates[0].getTime()),t=Math.max(s,D.selectedDates[0].getTime()),l=!1,c=0,u=0,n=e;n<t;n+=be.DAY)A(new Date(n),!0)||(l=l||e<n&&n<t,n<a&&(!c||c<n)?c=n:a<n&&(!u||n<u)&&(u=n));for(var i=0;i<D.config.showMonths;i++)for(var h=D.daysContainer.children[i],o=function(e,t){var n=h.children[e],i=n.dateObj.getTime(),o=0<c&&i<c||0<u&&u<i;return o?(n.classList.add("notAllowed"),["inRange","startRange","endRange"].forEach(function(e){n.classList.remove(e)}),"continue"):l&&!o?"continue":(["startRange","inRange","endRange","notAllowed"].forEach(function(e){n.classList.remove(e)}),void(void 0!==r&&(r.classList.add(s<=D.selectedDates[0].getTime()?"startRange":"endRange"),a<s&&i===a?n.classList.add("startRange"):s<a&&i===a&&n.classList.add("endRange"),c<=i&&(0===u||i<=u)&&ye(i,a,s)&&n.classList.add("inRange"))))},d=0,f=h.children.length;d<f;d++)o(d)}}function P(){!D.isOpen||D.config.static||D.config.inline||R()}function Y(i){return function(e){var t=D.config["_"+i+"Date"]=D.parseDate(e,D.config.dateFormat),n=D.config["_"+("min"===i?"max":"min")+"Date"];void 0!==t&&(D["min"===i?"minDateHasTime":"maxDateHasTime"]=0<t.getHours()||0<t.getMinutes()||0<t.getSeconds()),D.selectedDates&&(D.selectedDates=D.selectedDates.filter(function(e){return A(e)}),D.selectedDates.length||"min"!==i||o(t),X()),D.daysContainer&&(q(),void 0!==t?D.currentYearElement[i]=t.getFullYear().toString():D.currentYearElement.removeAttribute(i),D.currentYearElement.disabled=!!n&&void 0!==t&&n.getFullYear()===t.getFullYear())}}function H(){return D.config.wrap?d.querySelector("[data-input]"):d}function L(){"object"!=typeof D.config.locale&&void 0===Ce.l10ns[D.config.locale]&&D.config.errorHandler(new Error("flatpickr: invalid locale "+D.config.locale)),D.l10n=ee(ee({},Ce.l10ns.default),"object"==typeof D.config.locale?D.config.locale:"default"!==D.config.locale?Ce.l10ns[D.config.locale]:void 0),_e.K="("+D.l10n.amPM[0]+"|"+D.l10n.amPM[1]+"|"+D.l10n.amPM[0].toLowerCase()+"|"+D.l10n.amPM[1].toLowerCase()+")",void 0===ee(ee({},u),JSON.parse(JSON.stringify(d.dataset||{}))).time_24hr&&void 0===Ce.defaultConfig.time_24hr&&(D.config.time_24hr=D.l10n.time_24hr),D.formatDate=me(D),D.parseDate=ge({config:D.config,l10n:D.l10n})}function R(e){if("function"!=typeof D.config.position){if(void 0!==D.calendarContainer){K("onPreCalendarPosition");var t=e||D._positionElement,n=Array.prototype.reduce.call(D.calendarContainer.children,function(e,t){return e+t.offsetHeight},0),i=D.calendarContainer.offsetWidth,o=D.config.position.split(" "),r=o[0],s=1<o.length?o[1]:null,a=t.getBoundingClientRect(),l=window.innerHeight-a.bottom,c="above"===r||"below"!==r&&l<n&&a.top>n,u=window.pageYOffset+a.top+(c?-n-2:t.offsetHeight+2);if(ce(D.calendarContainer,"arrowTop",!c),ce(D.calendarContainer,"arrowBottom",c),!D.config.inline){var h=window.pageXOffset+a.left,d=!1,f=!1;"center"===s?(h-=(i-a.width)/2,d=!0):"right"===s&&(h-=i-a.width,f=!0),ce(D.calendarContainer,"arrowLeft",!d&&!f),ce(D.calendarContainer,"arrowCenter",d),ce(D.calendarContainer,"arrowRight",f);var p=window.document.body.offsetWidth-(window.pageXOffset+a.right),_=h+i>window.document.body.offsetWidth,m=p+i>window.document.body.offsetWidth;if(ce(D.calendarContainer,"rightMost",_),!D.config.static)if(D.calendarContainer.style.top=u+"px",_)if(m){var g=function(){for(var e=null,t=0;t<document.styleSheets.length;t++){var n=document.styleSheets[t];try{n.cssRules}catch(e){continue}e=n;break}return null!=e?e:(i=document.createElement("style"),document.head.appendChild(i),i.sheet);var i}();if(void 0===g)return;var v=window.document.body.offsetWidth,y=Math.max(0,v/2-i/2),b=g.cssRules.length,w="{left:"+a.left+"px;right:auto;}";ce(D.calendarContainer,"rightMost",!1),ce(D.calendarContainer,"centerMost",!0),g.insertRule(".flatpickr-calendar.centerMost:before,.flatpickr-calendar.centerMost:after"+w,b),D.calendarContainer.style.left=y+"px",D.calendarContainer.style.right="auto"}else D.calendarContainer.style.left="auto",D.calendarContainer.style.right=p+"px";else D.calendarContainer.style.left=h+"px",D.calendarContainer.style.right="auto"}}}else D.config.position(D,e)}function q(){D.config.noCalendar||D.isMobile||(w(),V(),b())}function W(){D._input.focus(),-1!==window.navigator.userAgent.indexOf("MSIE")||void 0!==navigator.msMaxTouchPoints?setTimeout(D.close,0):D.close()}function B(e){e.preventDefault(),e.stopPropagation();var t=function e(t,n){return n(t)?t:t.parentNode?e(t.parentNode,n):void 0}(fe(e),function(e){return e.classList&&e.classList.contains("flatpickr-day")&&!e.classList.contains("flatpickr-disabled")&&!e.classList.contains("notAllowed")});if(void 0!==t){var n=t,i=D.latestSelectedDateObj=new Date(n.dateObj.getTime()),o=(i.getMonth()<D.currentMonth||i.getMonth()>D.currentMonth+D.config.showMonths-1)&&"range"!==D.config.mode;if(D.selectedDateElem=n,"single"===D.config.mode)D.selectedDates=[i];else if("multiple"===D.config.mode){var r=Q(i);r?D.selectedDates.splice(parseInt(r),1):D.selectedDates.push(i)}else"range"===D.config.mode&&(2===D.selectedDates.length&&D.clear(!1,!1),D.latestSelectedDateObj=i,D.selectedDates.push(i),0!==ve(i,D.selectedDates[0],!0)&&D.selectedDates.sort(function(e,t){return e.getTime()-t.getTime()}));if(p(),o){var s=D.currentYear!==i.getFullYear();D.currentYear=i.getFullYear(),D.currentMonth=i.getMonth(),s&&(K("onYearChange"),w()),K("onMonthChange")}if(V(),b(),X(),o||"range"===D.config.mode||1!==D.config.showMonths?void 0!==D.selectedDateElem&&void 0===D.hourElement&&D.selectedDateElem&&D.selectedDateElem.focus():g(n),void 0!==D.hourElement&&void 0!==D.hourElement&&D.hourElement.focus(),D.config.closeOnSelect){var a="single"===D.config.mode&&!D.config.enableTime,l="range"===D.config.mode&&2===D.selectedDates.length&&!D.config.enableTime;(a||l)&&W()}c()}}D.parseDate=ge({config:D.config,l10n:D.l10n}),D._handlers=[],D.pluginElements=[],D.loadedPlugins=[],D._bind=s,D._setHoursFromDate=o,D._positionCalendar=R,D.changeMonth=E,D.changeYear=S,D.clear=function(e,t){void 0===e&&(e=!0);void 0===t&&(t=!0);D.input.value="",void 0!==D.altInput&&(D.altInput.value="");void 0!==D.mobileInput&&(D.mobileInput.value="");D.selectedDates=[],!(D.latestSelectedDateObj=void 0)===t&&(D.currentYear=D._initialDate.getFullYear(),D.currentMonth=D._initialDate.getMonth());if(!0===D.config.enableTime){var n=we(D.config),i=n.hours,o=n.minutes,r=n.seconds;l(i,o,r)}D.redraw(),e&&K("onChange")},D.close=function(){D.isOpen=!1,D.isMobile||(void 0!==D.calendarContainer&&D.calendarContainer.classList.remove("open"),void 0!==D._input&&D._input.classList.remove("active"));K("onClose")},D._createElement=ue,D.destroy=function(){void 0!==D.config&&K("onDestroy");for(var e=D._handlers.length;e--;)D._handlers[e].remove();if(D._handlers=[],D.mobileInput)D.mobileInput.parentNode&&D.mobileInput.parentNode.removeChild(D.mobileInput),D.mobileInput=void 0;else if(D.calendarContainer&&D.calendarContainer.parentNode)if(D.config.static&&D.calendarContainer.parentNode){var t=D.calendarContainer.parentNode;if(t.lastChild&&t.removeChild(t.lastChild),t.parentNode){for(;t.firstChild;)t.parentNode.insertBefore(t.firstChild,t);t.parentNode.removeChild(t)}}else D.calendarContainer.parentNode.removeChild(D.calendarContainer);D.altInput&&(D.input.type="text",D.altInput.parentNode&&D.altInput.parentNode.removeChild(D.altInput),delete D.altInput);D.input&&(D.input.type=D.input._type,D.input.classList.remove("flatpickr-input"),D.input.removeAttribute("readonly"));["_showTimeInput","latestSelectedDateObj","_hideNextMonthArrow","_hidePrevMonthArrow","__hideNextMonthArrow","__hidePrevMonthArrow","isMobile","isOpen","selectedDateElem","minDateHasTime","maxDateHasTime","days","daysContainer","_input","_positionElement","innerContainer","rContainer","monthNav","todayDateElem","calendarContainer","weekdayContainer","prevMonthNav","nextMonthNav","monthsDropdownContainer","currentMonthElement","currentYearElement","navigationCurrentMonth","selectedDateElem","config"].forEach(function(e){try{delete D[e]}catch(e){}})},D.isEnabled=A,D.jumpToDate=i,D.open=function(e,t){void 0===t&&(t=D._positionElement);{if(!0===D.isMobile){if(e){e.preventDefault();var n=fe(e);n&&n.blur()}return void 0!==D.mobileInput&&(D.mobileInput.focus(),D.mobileInput.click()),void K("onOpen")}if(D._input.disabled||D.config.inline)return}var i=D.isOpen;D.isOpen=!0,i||(D.calendarContainer.classList.add("open"),D._input.classList.add("active"),K("onOpen"),R(t));!0===D.config.enableTime&&!0===D.config.noCalendar&&(!1!==D.config.allowInput||void 0!==e&&D.timeContainer.contains(e.relatedTarget)||setTimeout(function(){return D.hourElement.select()},50))},D.redraw=q,D.set=function(e,t){if(null!==e&&"object"==typeof e)for(var n in Object.assign(D.config,e),e)void 0!==z[n]&&z[n].forEach(function(e){return e()});else D.config[e]=t,void 0!==z[e]?z[e].forEach(function(e){return e()}):-1<ne.indexOf(e)&&(D.config[e]=le(t));D.redraw(),X(!0)},D.setDate=function(e,t,n){void 0===t&&(t=!1);void 0===n&&(n=D.config.dateFormat);if(0!==e&&!e||e instanceof Array&&0===e.length)return D.clear(t);U(e,n),D.latestSelectedDateObj=D.selectedDates[D.selectedDates.length-1],D.redraw(),i(void 0,t),o(),0===D.selectedDates.length&&D.clear(!1);X(t),t&&K("onChange")},D.toggle=function(e){if(!0===D.isOpen)return D.close();D.open(e)};var z={locale:[L,k],showMonths:[x,t,M],minDate:[i],maxDate:[i],clickOpens:[function(){!0===D.config.clickOpens?(s(D._input,"focus",D.open),s(D._input,"click",D.open)):(D._input.removeEventListener("focus",D.open),D._input.removeEventListener("click",D.open))}]};function U(e,t){var n=[];if(e instanceof Array)n=e.map(function(e){return D.parseDate(e,t)});else if(e instanceof Date||"number"==typeof e)n=[D.parseDate(e,t)];else if("string"==typeof e)switch(D.config.mode){case"single":case"time":n=[D.parseDate(e,t)];break;case"multiple":n=e.split(D.config.conjunction).map(function(e){return D.parseDate(e,t)});break;case"range":n=e.split(D.l10n.rangeSeparator).map(function(e){return D.parseDate(e,t)})}else D.config.errorHandler(new Error("Invalid date supplied: "+JSON.stringify(e)));D.selectedDates=D.config.allowInvalidPreload?n:n.filter(function(e){return e instanceof Date&&A(e,!1)}),"range"===D.config.mode&&D.selectedDates.sort(function(e,t){return e.getTime()-t.getTime()})}function J(e){return e.slice().map(function(e){return"string"==typeof e||"number"==typeof e||e instanceof Date?D.parseDate(e,void 0,!0):e&&"object"==typeof e&&e.from&&e.to?{from:D.parseDate(e.from,void 0),to:D.parseDate(e.to,void 0)}:e}).filter(function(e){return e})}function K(e,t){if(void 0!==D.config){var n=D.config[e];if(void 0!==n&&0<n.length)for(var i=0;n[i]&&i<n.length;i++)n[i](D.selectedDates,D.input.value,D,t);"onChange"===e&&(D.input.dispatchEvent($("change")),D.input.dispatchEvent($("input")))}}function $(e){var t=document.createEvent("Event");return t.initEvent(e,!0,!0),t}function Q(e){for(var t=0;t<D.selectedDates.length;t++)if(0===ve(D.selectedDates[t],e))return""+t;return!1}function V(){D.config.noCalendar||D.isMobile||!D.monthNav||(D.yearElements.forEach(function(e,t){var n=new Date(D.currentYear,D.currentMonth,1);n.setMonth(D.currentMonth+t),1<D.config.showMonths||"static"===D.config.monthSelectorType?D.monthElements[t].textContent=pe(n.getMonth(),D.config.shorthandCurrentMonth,D.l10n)+" ":D.monthsDropdownContainer.value=n.getMonth().toString(),e.value=n.getFullYear().toString()}),D._hidePrevMonthArrow=void 0!==D.config.minDate&&(D.currentYear===D.config.minDate.getFullYear()?D.currentMonth<=D.config.minDate.getMonth():D.currentYear<D.config.minDate.getFullYear()),D._hideNextMonthArrow=void 0!==D.config.maxDate&&(D.currentYear===D.config.maxDate.getFullYear()?D.currentMonth+1>D.config.maxDate.getMonth():D.currentYear>D.config.maxDate.getFullYear()))}function G(t){return D.selectedDates.map(function(e){return D.formatDate(e,t)}).filter(function(e,t,n){return"range"!==D.config.mode||D.config.enableTime||n.indexOf(e)===t}).join("range"!==D.config.mode?D.config.conjunction:D.l10n.rangeSeparator)}function X(e){void 0===e&&(e=!0),void 0!==D.mobileInput&&D.mobileFormatStr&&(D.mobileInput.value=void 0!==D.latestSelectedDateObj?D.formatDate(D.latestSelectedDateObj,D.mobileFormatStr):""),D.input.value=G(D.config.dateFormat),void 0!==D.altInput&&(D.altInput.value=G(D.config.altFormat)),!1!==e&&K("onValueUpdate")}function Z(e){var t=fe(e),n=D.prevMonthNav.contains(t),i=D.nextMonthNav.contains(t);n||i?E(n?-1:1):0<=D.yearElements.indexOf(t)?t.select():t.classList.contains("arrowUp")?D.changeYear(D.currentYear+1):t.classList.contains("arrowDown")&&D.changeYear(D.currentYear-1)}return function(){D.element=D.input=d,D.isOpen=!1,function(){var e=["wrap","weekNumbers","allowInput","allowInvalidPreload","clickOpens","time_24hr","enableTime","noCalendar","altInput","shorthandCurrentMonth","inline","static","enableSeconds","disableMobile"],t=ee(ee({},JSON.parse(JSON.stringify(d.dataset||{}))),u),n={};D.config.parseDate=t.parseDate,D.config.formatDate=t.formatDate,Object.defineProperty(D.config,"enable",{get:function(){return D.config._enable},set:function(e){D.config._enable=J(e)}}),Object.defineProperty(D.config,"disable",{get:function(){return D.config._disable},set:function(e){D.config._disable=J(e)}});var i="time"===t.mode;if(!t.dateFormat&&(t.enableTime||i)){var o=Ce.defaultConfig.dateFormat||ie.dateFormat;n.dateFormat=t.noCalendar||i?"H:i"+(t.enableSeconds?":S":""):o+" H:i"+(t.enableSeconds?":S":"")}if(t.altInput&&(t.enableTime||i)&&!t.altFormat){var r=Ce.defaultConfig.altFormat||ie.altFormat;n.altFormat=t.noCalendar||i?"h:i"+(t.enableSeconds?":S K":" K"):r+" h:i"+(t.enableSeconds?":S":"")+" K"}Object.defineProperty(D.config,"minDate",{get:function(){return D.config._minDate},set:Y("min")}),Object.defineProperty(D.config,"maxDate",{get:function(){return D.config._maxDate},set:Y("max")});var s=function(t){return function(e){D.config["min"===t?"_minTime":"_maxTime"]=D.parseDate(e,"H:i:S")}};Object.defineProperty(D.config,"minTime",{get:function(){return D.config._minTime},set:s("min")}),Object.defineProperty(D.config,"maxTime",{get:function(){return D.config._maxTime},set:s("max")}),"time"===t.mode&&(D.config.noCalendar=!0,D.config.enableTime=!0),Object.assign(D.config,n,t);for(var a=0;a<e.length;a++)D.config[e[a]]=!0===D.config[e[a]]||"true"===D.config[e[a]];ne.filter(function(e){return void 0!==D.config[e]}).forEach(function(e){D.config[e]=le(D.config[e]||[]).map(h)}),D.isMobile=!D.config.disableMobile&&!D.config.inline&&"single"===D.config.mode&&!D.config.disable.length&&!D.config.enable&&!D.config.weekNumbers&&/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);for(var a=0;a<D.config.plugins.length;a++){var l=D.config.plugins[a](D)||{};for(var c in l)-1<ne.indexOf(c)?D.config[c]=le(l[c]).map(h).concat(D.config[c]):void 0===t[c]&&(D.config[c]=l[c])}t.altInputClass||(D.config.altInputClass=H().className+" "+D.config.altInputClass),K("onParseConfig")}(),L(),function(){if(D.input=H(),!D.input)return D.config.errorHandler(new Error("Invalid input element specified"));D.input._type=D.input.type,D.input.type="text",D.input.classList.add("flatpickr-input"),D._input=D.input,D.config.altInput&&(D.altInput=ue(D.input.nodeName,D.config.altInputClass),D._input=D.altInput,D.altInput.placeholder=D.input.placeholder,D.altInput.disabled=D.input.disabled,D.altInput.required=D.input.required,D.altInput.tabIndex=D.input.tabIndex,D.altInput.type="text",D.input.setAttribute("type","hidden"),!D.config.static&&D.input.parentNode&&D.input.parentNode.insertBefore(D.altInput,D.input.nextSibling)),D.config.allowInput||D._input.setAttribute("readonly","readonly"),D._positionElement=D.config.positionElement||D._input}(),function(){D.selectedDates=[],D.now=D.parseDate(D.config.now)||new Date;var e=D.config.defaultDate||("INPUT"!==D.input.nodeName&&"TEXTAREA"!==D.input.nodeName||!D.input.placeholder||D.input.value!==D.input.placeholder?D.input.value:null);e&&U(e,D.config.dateFormat),D._initialDate=0<D.selectedDates.length?D.selectedDates[0]:D.config.minDate&&D.config.minDate.getTime()>D.now.getTime()?D.config.minDate:D.config.maxDate&&D.config.maxDate.getTime()<D.now.getTime()?D.config.maxDate:D.now,D.currentYear=D._initialDate.getFullYear(),D.currentMonth=D._initialDate.getMonth(),0<D.selectedDates.length&&(D.latestSelectedDateObj=D.selectedDates[0]),void 0!==D.config.minTime&&(D.config.minTime=D.parseDate(D.config.minTime,"H:i")),void 0!==D.config.maxTime&&(D.config.maxTime=D.parseDate(D.config.maxTime,"H:i")),D.minDateHasTime=!!D.config.minDate&&(0<D.config.minDate.getHours()||0<D.config.minDate.getMinutes()||0<D.config.minDate.getSeconds()),D.maxDateHasTime=!!D.config.maxDate&&(0<D.config.maxDate.getHours()||0<D.config.maxDate.getMinutes()||0<D.config.maxDate.getSeconds())}(),D.utils={getDaysInMonth:function(e,t){return void 0===e&&(e=D.currentMonth),void 0===t&&(t=D.currentYear),1===e&&(t%4==0&&t%100!=0||t%400==0)?29:D.l10n.daysInMonth[e]}},D.isMobile||function(){var e=window.document.createDocumentFragment();if(D.calendarContainer=ue("div","flatpickr-calendar"),D.calendarContainer.tabIndex=-1,!D.config.noCalendar){if(e.appendChild((D.monthNav=ue("div","flatpickr-months"),D.yearElements=[],D.monthElements=[],D.prevMonthNav=ue("span","flatpickr-prev-month"),D.prevMonthNav.innerHTML=D.config.prevArrow,D.nextMonthNav=ue("span","flatpickr-next-month"),D.nextMonthNav.innerHTML=D.config.nextArrow,x(),Object.defineProperty(D,"_hidePrevMonthArrow",{get:function(){return D.__hidePrevMonthArrow},set:function(e){D.__hidePrevMonthArrow!==e&&(ce(D.prevMonthNav,"flatpickr-disabled",e),D.__hidePrevMonthArrow=e)}}),Object.defineProperty(D,"_hideNextMonthArrow",{get:function(){return D.__hideNextMonthArrow},set:function(e){D.__hideNextMonthArrow!==e&&(ce(D.nextMonthNav,"flatpickr-disabled",e),D.__hideNextMonthArrow=e)}}),D.currentYearElement=D.yearElements[0],V(),D.monthNav)),D.innerContainer=ue("div","flatpickr-innerContainer"),D.config.weekNumbers){var t=function(){D.calendarContainer.classList.add("hasWeeks");var e=ue("div","flatpickr-weekwrapper");e.appendChild(ue("span","flatpickr-weekday",D.l10n.weekAbbreviation));var t=ue("div","flatpickr-weeks");return e.appendChild(t),{weekWrapper:e,weekNumbers:t}}(),n=t.weekWrapper,i=t.weekNumbers;D.innerContainer.appendChild(n),D.weekNumbers=i,D.weekWrapper=n}D.rContainer=ue("div","flatpickr-rContainer"),D.rContainer.appendChild(M()),D.daysContainer||(D.daysContainer=ue("div","flatpickr-days"),D.daysContainer.tabIndex=-1),b(),D.rContainer.appendChild(D.daysContainer),D.innerContainer.appendChild(D.rContainer),e.appendChild(D.innerContainer)}D.config.enableTime&&e.appendChild(function(){D.calendarContainer.classList.add("hasTime"),D.config.noCalendar&&D.calendarContainer.classList.add("noCalendar");var e=we(D.config);D.timeContainer=ue("div","flatpickr-time"),D.timeContainer.tabIndex=-1;var t=ue("span","flatpickr-time-separator",":"),n=de("flatpickr-hour",{"aria-label":D.l10n.hourAriaLabel});D.hourElement=n.getElementsByTagName("input")[0];var i=de("flatpickr-minute",{"aria-label":D.l10n.minuteAriaLabel});if(D.minuteElement=i.getElementsByTagName("input")[0],D.hourElement.tabIndex=D.minuteElement.tabIndex=-1,D.hourElement.value=re(D.latestSelectedDateObj?D.latestSelectedDateObj.getHours():D.config.time_24hr?e.hours:function(e){switch(e%24){case 0:case 12:return 12;default:return e%12}}(e.hours)),D.minuteElement.value=re(D.latestSelectedDateObj?D.latestSelectedDateObj.getMinutes():e.minutes),D.hourElement.setAttribute("step",D.config.hourIncrement.toString()),D.minuteElement.setAttribute("step",D.config.minuteIncrement.toString()),D.hourElement.setAttribute("min",D.config.time_24hr?"0":"1"),D.hourElement.setAttribute("max",D.config.time_24hr?"23":"12"),D.hourElement.setAttribute("maxlength","2"),D.minuteElement.setAttribute("min","0"),D.minuteElement.setAttribute("max","59"),D.minuteElement.setAttribute("maxlength","2"),D.timeContainer.appendChild(n),D.timeContainer.appendChild(t),D.timeContainer.appendChild(i),D.config.time_24hr&&D.timeContainer.classList.add("time24hr"),D.config.enableSeconds){D.timeContainer.classList.add("hasSeconds");var o=de("flatpickr-second");D.secondElement=o.getElementsByTagName("input")[0],D.secondElement.value=re(D.latestSelectedDateObj?D.latestSelectedDateObj.getSeconds():e.seconds),D.secondElement.setAttribute("step",D.minuteElement.getAttribute("step")),D.secondElement.setAttribute("min","0"),D.secondElement.setAttribute("max","59"),D.secondElement.setAttribute("maxlength","2"),D.timeContainer.appendChild(ue("span","flatpickr-time-separator",":")),D.timeContainer.appendChild(o)}return D.config.time_24hr||(D.amPM=ue("span","flatpickr-am-pm",D.l10n.amPM[se(11<(D.latestSelectedDateObj?D.hourElement.value:D.config.defaultHour))]),D.amPM.title=D.l10n.toggleTitle,D.amPM.tabIndex=-1,D.timeContainer.appendChild(D.amPM)),D.timeContainer}()),ce(D.calendarContainer,"rangeMode","range"===D.config.mode),ce(D.calendarContainer,"animate",!0===D.config.animate),ce(D.calendarContainer,"multiMonth",1<D.config.showMonths),D.calendarContainer.appendChild(e);var o=void 0!==D.config.appendTo&&void 0!==D.config.appendTo.nodeType;if((D.config.inline||D.config.static)&&(D.calendarContainer.classList.add(D.config.inline?"inline":"static"),D.config.inline&&(!o&&D.element.parentNode?D.element.parentNode.insertBefore(D.calendarContainer,D._input.nextSibling):void 0!==D.config.appendTo&&D.config.appendTo.appendChild(D.calendarContainer)),D.config.static)){var r=ue("div","flatpickr-wrapper");D.element.parentNode&&D.element.parentNode.insertBefore(r,D.element),r.appendChild(D.element),D.altInput&&r.appendChild(D.altInput),r.appendChild(D.calendarContainer)}D.config.static||D.config.inline||(void 0!==D.config.appendTo?D.config.appendTo:window.document.body).appendChild(D.calendarContainer)}(),function(){if(D.config.wrap&&["open","close","toggle","clear"].forEach(function(t){Array.prototype.forEach.call(D.element.querySelectorAll("[data-"+t+"]"),function(e){return s(e,"click",D[t])})}),D.isMobile)return function(){var e=D.config.enableTime?D.config.noCalendar?"time":"datetime-local":"date";D.mobileInput=ue("input",D.input.className+" flatpickr-mobile"),D.mobileInput.tabIndex=1,D.mobileInput.type=e,D.mobileInput.disabled=D.input.disabled,D.mobileInput.required=D.input.required,D.mobileInput.placeholder=D.input.placeholder,D.mobileFormatStr="datetime-local"===e?"Y-m-d\\TH:i:S":"date"===e?"Y-m-d":"H:i:S",0<D.selectedDates.length&&(D.mobileInput.defaultValue=D.mobileInput.value=D.formatDate(D.selectedDates[0],D.mobileFormatStr)),D.config.minDate&&(D.mobileInput.min=D.formatDate(D.config.minDate,"Y-m-d")),D.config.maxDate&&(D.mobileInput.max=D.formatDate(D.config.maxDate,"Y-m-d")),D.input.getAttribute("step")&&(D.mobileInput.step=String(D.input.getAttribute("step"))),D.input.type="hidden",void 0!==D.altInput&&(D.altInput.type="hidden");try{D.input.parentNode&&D.input.parentNode.insertBefore(D.mobileInput,D.input.nextSibling)}catch(e){}s(D.mobileInput,"change",function(e){D.setDate(fe(e).value,!1,D.mobileFormatStr),K("onChange"),K("onClose")})}();var e=ae(P,50);D._debouncedChange=ae(c,De),D.daysContainer&&!/iPhone|iPad|iPod/i.test(navigator.userAgent)&&s(D.daysContainer,"mouseover",function(e){"range"===D.config.mode&&F(fe(e))}),s(window.document.body,"keydown",j),D.config.inline||D.config.static||s(window,"resize",e),void 0!==window.ontouchstart?s(window.document,"touchstart",O):s(window.document,"mousedown",O),s(window.document,"focus",O,{capture:!0}),!0===D.config.clickOpens&&(s(D._input,"focus",D.open),s(D._input,"click",D.open)),void 0!==D.daysContainer&&(s(D.monthNav,"click",Z),s(D.monthNav,["keyup","increment"],n),s(D.daysContainer,"click",B)),void 0!==D.timeContainer&&void 0!==D.minuteElement&&void 0!==D.hourElement&&(s(D.timeContainer,["increment"],f),s(D.timeContainer,"blur",f,{capture:!0}),s(D.timeContainer,"click",r),s([D.hourElement,D.minuteElement],["focus","click"],function(e){return fe(e).select()}),void 0!==D.secondElement&&s(D.secondElement,"focus",function(){return D.secondElement&&D.secondElement.select()}),void 0!==D.amPM&&s(D.amPM,"click",function(e){f(e),c()})),D.config.allowInput&&s(D._input,"blur",N)}(),(D.selectedDates.length||D.config.noCalendar)&&(D.config.enableTime&&o(D.config.noCalendar?D.latestSelectedDateObj:void 0),X(!1)),t();var e=/^((?!chrome|android).)*safari/i.test(navigator.userAgent);!D.isMobile&&e&&R(),K("onReady")}(),D}function n(e,t){for(var n=Array.prototype.slice.call(e).filter(function(e){return e instanceof HTMLElement}),i=[],o=0;o<n.length;o++){var r=n[o];try{if(null!==r.getAttribute("data-fp-omit"))continue;void 0!==r._flatpickr&&(r._flatpickr.destroy(),r._flatpickr=void 0),r._flatpickr=s(r,t||{}),i.push(r._flatpickr)}catch(e){console.error(e)}}return 1===i.length?i[0]:i}"undefined"!=typeof HTMLElement&&"undefined"!=typeof HTMLCollection&&"undefined"!=typeof NodeList&&(HTMLCollection.prototype.flatpickr=NodeList.prototype.flatpickr=function(e){return n(this,e)},HTMLElement.prototype.flatpickr=function(e){return n([this],e)});var Ce=function(e,t){return"string"==typeof e?n(window.document.querySelectorAll(e),t):e instanceof Node?n([e],t):n(e,t)};return Ce.defaultConfig={},Ce.l10ns={en:ee({},oe),default:ee({},oe)},Ce.localize=function(e){Ce.l10ns.default=ee(ee({},Ce.l10ns.default),e)},Ce.setDefaults=function(e){Ce.defaultConfig=ee(ee({},Ce.defaultConfig),e)},Ce.parseDate=ge({}),Ce.formatDate=me({}),Ce.compareDates=ve,"undefined"!=typeof jQuery&&void 0!==jQuery.fn&&(jQuery.fn.flatpickr=function(e){return n(this,e)}),Date.prototype.fp_incr=function(e){return new Date(this.getFullYear(),this.getMonth(),this.getDate()+("string"==typeof e?parseInt(e,10):e))},"undefined"!=typeof window&&(window.flatpickr=Ce),Ce}),function(s){function t(e,t){this.element=s(e),this.options=t,this.init()}t.prototype.init=function(){this.element.chosen(this.options),this.container=this.element.next(".chosen-container"),this.search_field=this.container.find(".chosen-search-input"),this.is_multiple=this.container.hasClass("chosen-container-multi"),this.is_typing=!1,this.chosenXhr=null,this.events()},t.prototype.events=function(){var e=this;this.search_field.on("compositionstart",function(){e.is_typing=!0}),this.search_field.on("compositionend",function(){e.is_typing=!1,e.update_list()}),this.search_field.on("keyup",function(){e.update_list()}),this.search_field.on("focus",function(){e.search_field_focused()})},t.prototype.search_field_focused=function(){this.search_welcome_message(),0===this.options.min_length&&0===this.search_field.val().length&&this.update_list()},t.prototype.search_welcome_message=function(){var e=s.trim(this.search_field.val()),t=this.container.find(".chosen-results");0===t.children().length&&0===e.length&&t.html('<li class="no-results">'+this.options.typing_text.replace("%s",this.options.min_length-e.length)+"</li>")},t.prototype.update_list=function(){var t=this;if(this.search_welcome_message(),!this.is_typing){var e=s.trim(this.search_field.val()),n=e.length<this.options.min_length?this.options.typing_text.replace("%s",this.options.min_length-e.length):this.options.searching_text;this.container.find(".no-results").text(n),e!==this.search_field.data("prevVal")&&(this.search_field.data("prevVal",e),this.timer&&clearTimeout(this.timer),e.length<this.options.min_length||(this.timer=setTimeout(function(){t.chosenXhr&&t.chosenXhr.abort(),t.options.data.term=e,t.chosenXhr=window.wp.ajax.post("ulf-chosen",t.options.data).done(function(e){t.show_results(e)}).fail(function(e){t.container.find(".no-results").text(e.error)})},this.options.type_delay)))}},t.prototype.show_results=function(e){var n=this;if(!this.is_typing&&null!==e){if(0===e.length)return this.element.data().chosen.no_results_clear(),void this.element.data().chosen.no_results(this.search_field.val());var i=[];this.element.find("option").each(function(){s(this).is(":selected")?i.push(s(this).val()+"-"+s(this).text()):s(this).attr("value").length&&s(this).remove()}),s.each(e,function(e,t){-1===s.inArray(t.value+"-"+t.text,i)&&s("<option />").attr("value",t.value).html(t.text).appendTo(n.element)});var t=this.search_field.val(),o=this.search_field.innerWidth();if(this.element.trigger("chosen:updated"),this.is_multiple){var r=this.element.parent().find(".ulf-hide-select").val()||[];this.element.ULFChosenOrder(r,!0),this.search_field.css("width",o)}this.search_field.val(t),null!==this.chosenXhr.done&&this.chosenXhr.done(e)}},s.fn.ULFAjaxChosen=function(e){return this.each(function(){new t(this,e)})}}(jQuery),function(){var n,i,s=[].indexOf||function(e){for(var t=0,n=this.length;t<n;t++)if(t in this&&this[t]===e)return t;return-1},o={}.hasOwnProperty;i=function(){function e(){}return e.insertAt=function(e,t,n){return n.insertBefore(e,n.children[t].nextSibling)},e.getFlattenedOptionsAndGroups=function(e){var t,n,i,o,r,s,a,l,c;for(t=[],s=0,l=(i=Array.prototype.filter.call(e.childNodes,function(e){var t;return"OPTION"===(t=e.nodeName.toUpperCase())||"OPTGROUP"===t})).length;s<l;s++)if(n=i[s],t.push(n),"OPTGROUP"===n.nodeName.toUpperCase())for(a=0,c=(r=Array.prototype.filter.call(n.childNodes,function(e){return"OPTION"===e.nodeName.toUpperCase()})).length;a<c;a++)o=r[a],t.push(o);return t},e.isValidMultipleSelectElement=function(e){return null!=e&&"SELECT"===e.nodeName&&e.multiple},e.getChosenUIContainer=function(e){return""!==e.id?document.getElementById(e.id.replace(/-/g,"_")+"_chosen"):this.searchChosenUIContainer(e)},e.isChosenified=function(e){return null!=this.getChosenUIContainer(e)},e.forceSelection=function(e,t){var n,i,o,r;for(o=this.getFlattenedOptionsAndGroups(e),n=0;n<o.length;)r=(i=o[n]).getAttribute("value"),0<=s.call(t,r)?(i.selected=!0,i.setAttribute("selected","")):(i.selected=!1,i.removeAttribute("selected")),n++;return this.triggerEvent(e,"chosen:updated")},e.ULFChosenOrder=function(e,t,n){var i,o,r,s,a,l,c,u,h,d,f,p,_,m;if(null!=this.getDOMElement&&(e=this.getDOMElement(e)),this.isValidMultipleSelectElement(e)&&null!=(o=this.getChosenUIContainer(e))&&t instanceof Array){for(t=t.map(Function.prototype.call,String.prototype.trim),c=this.getFlattenedOptionsAndGroups(e),null!=n&&!0===n&&this.forceSelection(e,t),m=[],r=d=0,p=t.length;d<p;r=++d){for(a=t[r],u=null,s=f=0,_=c.length;f<_;s=++f)c[s].value===a&&(u=s);i=o.querySelectorAll(".search-choice"),h=this.relAttributeName,null!=(l=Array.prototype.filter.call(i,function(e){return null!=e.querySelector("a.search-choice-close["+h+'="'+u+'"]')})[0])&&(o.querySelector("ul.chosen-choices"),m.push(this.insertAt(l,r,o.querySelector("ul.chosen-choices"))))}return m}},e}(),(n=jQuery).fn.extend({ULFChosenOrder:function(e,t){return _ULFChosenOrder.ULFChosenOrder(this,e,t)}}),this._ULFChosenOrder=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return function(e,t){for(var n in t)o.call(t,n)&&(e[n]=t[n]);function i(){this.constructor=e}i.prototype=t.prototype,e.prototype=new i,e.__super__=t.prototype}(t,i),t.relAttributeName="data-option-array-index",t.isjQueryObject=function(e){return"undefined"!=typeof jQuery&&null!==jQuery&&e instanceof jQuery},t.getDOMElement=function(e){return this.isjQueryObject(e)?e.get(0):e},t.searchChosenUIContainer=function(e){return null!=n(e).data("chosen")?n(e).data("chosen").container[0]:n(e).next(".chosen-container.chosen-container-multi").get(0)},t.triggerEvent=function(e,t){return n(e).trigger(t)},t}()}.call(this),function(){var a,n,o,s,r={}.hasOwnProperty;(s=function(){function e(){this.options_index=0,this.parsed=[]}return e.prototype.add_node=function(e){return"OPTGROUP"===e.nodeName.toUpperCase()?this.add_group(e):this.add_option(e)},e.prototype.add_group=function(e){var t,n,i,o,r,s;for(t=this.parsed.length,this.parsed.push({array_index:t,group:!0,label:e.label,title:e.title?e.title:void 0,children:0,disabled:e.disabled,classes:e.className}),s=[],n=0,i=(r=e.childNodes).length;n<i;n++)o=r[n],s.push(this.add_option(o,t,e.disabled));return s},e.prototype.add_option=function(e,t,n){if("OPTION"===e.nodeName.toUpperCase())return""!==e.text?(null!=t&&(this.parsed[t].children+=1),this.parsed.push({array_index:this.parsed.length,options_index:this.options_index,value:e.value,text:e.text,html:e.innerHTML,title:e.title?e.title:void 0,selected:e.selected,disabled:!0===n?n:e.disabled,group_array_index:t,group_label:null!=t?this.parsed[t].label:null,classes:e.className,style:e.style.cssText})):this.parsed.push({array_index:this.parsed.length,options_index:this.options_index,empty:!0}),this.options_index+=1},e}()).select_to_array=function(e){var t,n,i,o,r;for(o=new s,n=0,i=(r=e.childNodes).length;n<i;n++)t=r[n],o.add_node(t);return o.parsed},n=function(){function o(e,t){var n,i;this.form_field=e,this.options=null!=t?t:{},this.label_click_handler=(n=this.label_click_handler,i=this,function(){return n.apply(i,arguments)}),o.browser_is_supported()&&(this.is_multiple=this.form_field.multiple,this.set_default_text(),this.set_default_values(),this.setup(),this.set_up_html(),this.register_observers(),this.on_ready())}return o.prototype.set_default_values=function(){var t,n;return this.click_test_action=(t=this,function(e){return t.test_active_click(e)}),this.activate_action=(n=this,function(e){return n.activate_field(e)}),this.active_field=!1,this.mouse_on_container=!1,this.results_showing=!1,this.result_highlighted=null,this.is_rtl=this.options.rtl||/\bchosen-rtl\b/.test(this.form_field.className),this.allow_single_deselect=null!=this.options.allow_single_deselect&&null!=this.form_field.options[0]&&""===this.form_field.options[0].text&&this.options.allow_single_deselect,this.disable_search_threshold=this.options.disable_search_threshold||0,this.disable_search=this.options.disable_search||!1,this.enable_split_word_search=null==this.options.enable_split_word_search||this.options.enable_split_word_search,this.group_search=null==this.options.group_search||this.options.group_search,this.search_contains=this.options.search_contains||!1,this.single_backstroke_delete=null==this.options.single_backstroke_delete||this.options.single_backstroke_delete,this.max_selected_options=this.options.max_selected_options||1/0,this.inherit_select_classes=this.options.inherit_select_classes||!1,this.display_selected_options=null==this.options.display_selected_options||this.options.display_selected_options,this.display_disabled_options=null==this.options.display_disabled_options||this.options.display_disabled_options,this.include_group_label_in_selected=this.options.include_group_label_in_selected||!1,this.max_shown_results=this.options.max_shown_results||Number.POSITIVE_INFINITY,this.case_sensitive_search=this.options.case_sensitive_search||!1,this.hide_results_on_select=null==this.options.hide_results_on_select||this.options.hide_results_on_select},o.prototype.set_default_text=function(){return this.form_field.getAttribute("data-placeholder")?this.default_text=this.form_field.getAttribute("data-placeholder"):this.is_multiple?this.default_text=this.options.placeholder_text_multiple||this.options.placeholder_text||o.default_multiple_text:this.default_text=this.options.placeholder_text_single||this.options.placeholder_text||o.default_single_text,this.default_text=this.escape_html(this.default_text),this.results_none_found=this.form_field.getAttribute("data-no_results_text")||this.options.no_results_text||o.default_no_result_text},o.prototype.choice_label=function(e){return this.include_group_label_in_selected&&null!=e.group_label?"<b class='group-name'>"+this.escape_html(e.group_label)+"</b>"+e.html:e.html},o.prototype.mouse_enter=function(){return this.mouse_on_container=!0},o.prototype.mouse_leave=function(){return this.mouse_on_container=!1},o.prototype.input_focus=function(e){if(this.is_multiple){if(!this.active_field)return setTimeout((t=this,function(){return t.container_mousedown()}),50)}else if(!this.active_field)return this.activate_field();var t},o.prototype.input_blur=function(e){if(!this.mouse_on_container)return this.active_field=!1,setTimeout((t=this,function(){return t.blur_test()}),100);var t},o.prototype.label_click_handler=function(e){return this.is_multiple?this.container_mousedown(e):this.activate_field()},o.prototype.results_option_build=function(e){var t,n,i,o,r,s,a;for(t="",o=a=0,r=(s=this.results_data).length;o<r&&((i="")!==(i=(n=s[o]).group?this.result_add_group(n):this.result_add_option(n))&&(a++,t+=i),(null!=e?e.first:void 0)&&(n.selected&&this.is_multiple?this.choice_build(n):n.selected&&!this.is_multiple&&this.single_set_selected_text(this.choice_label(n))),!(a>=this.max_shown_results));o++);return t},o.prototype.result_add_option=function(e){var t,n;return e.search_match&&this.include_option_in_results(e)?(t=[],e.disabled||e.selected&&this.is_multiple||t.push("active-result"),!e.disabled||e.selected&&this.is_multiple||t.push("disabled-result"),e.selected&&t.push("result-selected"),null!=e.group_array_index&&t.push("group-option"),""!==e.classes&&t.push(e.classes),(n=document.createElement("li")).className=t.join(" "),e.style&&(n.style.cssText=e.style),n.setAttribute("data-option-array-index",e.array_index),n.innerHTML=e.highlighted_html||e.html,e.title&&(n.title=e.title),this.outerHTML(n)):""},o.prototype.result_add_group=function(e){var t,n;return(e.search_match||e.group_match)&&0<e.active_options?((t=[]).push("group-result"),e.classes&&t.push(e.classes),(n=document.createElement("li")).className=t.join(" "),n.innerHTML=e.highlighted_html||this.escape_html(e.label),e.title&&(n.title=e.title),this.outerHTML(n)):""},o.prototype.results_update_field=function(){if(this.set_default_text(),this.is_multiple||this.results_reset_cleanup(),this.result_clear_highlight(),this.results_build(),this.results_showing)return this.winnow_results()},o.prototype.reset_single_select_options=function(){var e,t,n,i,o;for(o=[],e=0,t=(n=this.results_data).length;e<t;e++)(i=n[e]).selected?o.push(i.selected=!1):o.push(void 0);return o},o.prototype.results_toggle=function(){return this.results_showing?this.results_hide():this.results_show()},o.prototype.results_search=function(e){return this.results_showing?this.winnow_results():this.results_show()},o.prototype.winnow_results=function(e){var t,n,i,o,r,s,a,l,c,u,h,d,f,p,_;for(this.no_results_clear(),u=0,t=(a=this.get_search_text()).replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),c=this.get_search_regex(t),i=0,o=(l=this.results_data).length;i<o;i++)(r=l[i]).search_match=!1,d=h=null,r.highlighted_html="",this.include_option_in_results(r)&&(r.group&&(r.group_match=!1,r.active_options=0),null!=r.group_array_index&&this.results_data[r.group_array_index]&&(0===(h=this.results_data[r.group_array_index]).active_options&&h.search_match&&(u+=1),h.active_options+=1),_=r.group?r.label:r.text,r.group&&!this.group_search||(d=this.search_string_match(_,c),r.search_match=null!=d,r.search_match&&!r.group&&(u+=1),r.search_match?(a.length&&(f=d.index,s=_.slice(0,f),n=_.slice(f,f+a.length),p=_.slice(f+a.length),r.highlighted_html=this.escape_html(s)+"<em>"+this.escape_html(n)+"</em>"+this.escape_html(p)),null!=h&&(h.group_match=!0)):null!=r.group_array_index&&this.results_data[r.group_array_index].search_match&&(r.search_match=!0)));return this.result_clear_highlight(),u<1&&a.length?(this.update_results_content(""),this.no_results(a)):(this.update_results_content(this.results_option_build()),(null!=e?e.skip_highlight:void 0)?void 0:this.winnow_results_set_highlight())},o.prototype.get_search_regex=function(e){var t,n;return n=this.search_contains?e:"(^|\\s|\\b)"+e+"[^\\s]*",this.enable_split_word_search||this.search_contains||(n="^"+n),t=this.case_sensitive_search?"":"i",new RegExp(n,t)},o.prototype.search_string_match=function(e,t){var n;return n=t.exec(e),!this.search_contains&&(null!=n?n[1]:void 0)&&(n.index+=1),n},o.prototype.choices_count=function(){var e,t,n;if(null!=this.selected_option_count)return this.selected_option_count;for(e=this.selected_option_count=0,t=(n=this.form_field.options).length;e<t;e++)n[e].selected&&(this.selected_option_count+=1);return this.selected_option_count},o.prototype.choices_click=function(e){if(e.preventDefault(),this.activate_field(),!this.results_showing&&!this.is_disabled)return this.results_show()},o.prototype.keydown_checker=function(e){var t,n;switch(n=null!=(t=e.which)?t:e.keyCode,this.search_field_scale(),8!==n&&this.pending_backstroke&&this.clear_backstroke(),n){case 8:this.backstroke_length=this.get_search_field_value().length;break;case 9:this.results_showing&&!this.is_multiple&&this.result_select(e),this.mouse_on_container=!1;break;case 13:case 27:this.results_showing&&e.preventDefault();break;case 32:this.disable_search&&e.preventDefault();break;case 38:e.preventDefault(),this.keyup_arrow();break;case 40:e.preventDefault(),this.keydown_arrow()}},o.prototype.keyup_checker=function(e){var t,n;switch(n=null!=(t=e.which)?t:e.keyCode,this.search_field_scale(),n){case 8:this.is_multiple&&this.backstroke_length<1&&0<this.choices_count()?this.keydown_backstroke():this.pending_backstroke||(this.result_clear_highlight(),this.results_search());break;case 13:e.preventDefault(),this.results_showing&&this.result_select(e);break;case 27:this.results_showing&&this.results_hide();break;case 9:case 16:case 17:case 18:case 38:case 40:case 91:break;default:this.results_search()}},o.prototype.clipboard_event_checker=function(e){var t;if(!this.is_disabled)return setTimeout((t=this,function(){return t.results_search()}),50)},o.prototype.container_width=function(){return null!=this.options.width?this.options.width:this.form_field.offsetWidth+"px"},o.prototype.include_option_in_results=function(e){return!(this.is_multiple&&!this.display_selected_options&&e.selected)&&(!(!this.display_disabled_options&&e.disabled)&&!e.empty)},o.prototype.search_results_touchstart=function(e){return this.touch_started=!0,this.search_results_mouseover(e)},o.prototype.search_results_touchmove=function(e){return this.touch_started=!1,this.search_results_mouseout(e)},o.prototype.search_results_touchend=function(e){if(this.touch_started)return this.search_results_mouseup(e)},o.prototype.outerHTML=function(e){var t;return e.outerHTML?e.outerHTML:((t=document.createElement("div")).appendChild(e),t.innerHTML)},o.prototype.get_single_html=function(){return'<a class="chosen-single chosen-default">\n <span>'+this.default_text+'</span>\n <div><b></b></div>\n</a>\n<div class="chosen-drop">\n <div class="chosen-search">\n <input class="chosen-search-input" type="text" autocomplete="off" />\n </div>\n <ul class="chosen-results"></ul>\n</div>'},o.prototype.get_multi_html=function(){return'<ul class="chosen-choices">\n <li class="search-field">\n <input class="chosen-search-input" type="text" autocomplete="off" value="'+this.default_text+'" />\n </li>\n</ul>\n<div class="chosen-drop">\n <ul class="chosen-results"></ul>\n</div>'},o.prototype.get_no_results_html=function(e){return'<li class="no-results">\n '+this.results_none_found+" <span>"+this.escape_html(e)+"</span>\n</li>"},o.browser_is_supported=function(){return"Microsoft Internet Explorer"===window.navigator.appName?8<=document.documentMode:!(/iP(od|hone)/i.test(window.navigator.userAgent)||/IEMobile/i.test(window.navigator.userAgent)||/Windows Phone/i.test(window.navigator.userAgent)||/BlackBerry/i.test(window.navigator.userAgent)||/BB10/i.test(window.navigator.userAgent)||/Android.*Mobile/i.test(window.navigator.userAgent))},o.default_multiple_text="Select Some Options",o.default_single_text="Select an Option",o.default_no_result_text="No results match",o}(),(a=jQuery).fn.extend({chosen:function(i){return n.browser_is_supported()?this.each(function(e){var t,n;n=(t=a(this)).data("chosen"),"destroy"!==i?n instanceof o||t.data("chosen",new o(this,i)):n instanceof o&&n.destroy()}):this}}),o=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return function(e,t){for(var n in t)r.call(t,n)&&(e[n]=t[n]);function i(){this.constructor=e}i.prototype=t.prototype,e.prototype=new i,e.__super__=t.prototype}(t,n),t.prototype.setup=function(){return this.form_field_jq=a(this.form_field),this.current_selectedIndex=this.form_field.selectedIndex},t.prototype.set_up_html=function(){var e,t;return(e=["chosen-container"]).push("chosen-container-"+(this.is_multiple?"multi":"single")),this.inherit_select_classes&&this.form_field.className&&e.push(this.form_field.className),this.is_rtl&&e.push("chosen-rtl"),t={class:e.join(" "),title:this.form_field.title},this.form_field.id.length&&(t.id=this.form_field.id.replace(/[^\w]/g,"_")+"_chosen"),this.container=a("<div />",t),this.container.width(this.container_width()),this.is_multiple?this.container.html(this.get_multi_html()):this.container.html(this.get_single_html()),this.form_field_jq.hide().after(this.container),this.dropdown=this.container.find("div.chosen-drop").first(),this.search_field=this.container.find("input").first(),this.search_results=this.container.find("ul.chosen-results").first(),this.search_field_scale(),this.search_no_results=this.container.find("li.no-results").first(),this.is_multiple?(this.search_choices=this.container.find("ul.chosen-choices").first(),this.search_container=this.container.find("li.search-field").first()):(this.search_container=this.container.find("div.chosen-search").first(),this.selected_item=this.container.find(".chosen-single").first()),this.results_build(),this.set_tab_index(),this.set_label_behavior()},t.prototype.on_ready=function(){return this.form_field_jq.trigger("chosen:ready",{chosen:this})},t.prototype.register_observers=function(){var t,n,i,o,r,s,a,l,c,u,h,d,f,p,_,m,g,v,y,b,w,D,C,x;return this.container.on("touchstart.chosen",(t=this,function(e){t.container_mousedown(e)})),this.container.on("touchend.chosen",(n=this,function(e){n.container_mouseup(e)})),this.container.on("mousedown.chosen",(i=this,function(e){i.container_mousedown(e)})),this.container.on("mouseup.chosen",(o=this,function(e){o.container_mouseup(e)})),this.container.on("mouseenter.chosen",(r=this,function(e){r.mouse_enter(e)})),this.container.on("mouseleave.chosen",(s=this,function(e){s.mouse_leave(e)})),this.search_results.on("mouseup.chosen",(a=this,function(e){a.search_results_mouseup(e)})),this.search_results.on("mouseover.chosen",(l=this,function(e){l.search_results_mouseover(e)})),this.search_results.on("mouseout.chosen",(c=this,function(e){c.search_results_mouseout(e)})),this.search_results.on("mousewheel.chosen DOMMouseScroll.chosen",(u=this,function(e){u.search_results_mousewheel(e)})),this.search_results.on("touchstart.chosen",(h=this,function(e){h.search_results_touchstart(e)})),this.search_results.on("touchmove.chosen",(d=this,function(e){d.search_results_touchmove(e)})),this.search_results.on("touchend.chosen",(f=this,function(e){f.search_results_touchend(e)})),this.form_field_jq.on("chosen:updated.chosen",(p=this,function(e){p.results_update_field(e)})),this.form_field_jq.on("chosen:activate.chosen",(_=this,function(e){_.activate_field(e)})),this.form_field_jq.on("chosen:open.chosen",(m=this,function(e){m.container_mousedown(e)})),this.form_field_jq.on("chosen:close.chosen",(g=this,function(e){g.close_field(e)})),this.search_field.on("blur.chosen",(v=this,function(e){v.input_blur(e)})),this.search_field.on("keyup.chosen",(y=this,function(e){y.keyup_checker(e)})),this.search_field.on("keydown.chosen",(b=this,function(e){b.keydown_checker(e)})),this.search_field.on("focus.chosen",(w=this,function(e){w.input_focus(e)})),this.search_field.on("cut.chosen",(D=this,function(e){D.clipboard_event_checker(e)})),this.search_field.on("paste.chosen",(C=this,function(e){C.clipboard_event_checker(e)})),this.is_multiple?this.search_choices.on("click.chosen",(x=this,function(e){x.choices_click(e)})):this.container.on("click.chosen",function(e){e.preventDefault()})},t.prototype.destroy=function(){return a(this.container[0].ownerDocument).off("click.chosen",this.click_test_action),0<this.form_field_label.length&&this.form_field_label.off("click.chosen"),this.search_field[0].tabIndex&&(this.form_field_jq[0].tabIndex=this.search_field[0].tabIndex),this.container.remove(),this.form_field_jq.removeData("chosen"),this.form_field_jq.show()},t.prototype.search_field_disabled=function(){return this.is_disabled=this.form_field.disabled||this.form_field_jq.parents("fieldset").is(":disabled"),this.container.toggleClass("chosen-disabled",this.is_disabled),this.search_field[0].disabled=this.is_disabled,this.is_multiple||this.selected_item.off("focus.chosen",this.activate_field),this.is_disabled?this.close_field():this.is_multiple?void 0:this.selected_item.on("focus.chosen",this.activate_field)},t.prototype.container_mousedown=function(e){var t;if(!this.is_disabled)return!e||"mousedown"!==(t=e.type)&&"touchstart"!==t||this.results_showing||e.preventDefault(),null!=e&&a(e.target).hasClass("search-choice-close")?void 0:(this.active_field?this.is_multiple||!e||a(e.target)[0]!==this.selected_item[0]&&!a(e.target).parents("a.chosen-single").length||(e.preventDefault(),this.results_toggle()):(this.is_multiple&&this.search_field.val(""),a(this.container[0].ownerDocument).on("click.chosen",this.click_test_action),this.results_show()),this.activate_field())},t.prototype.container_mouseup=function(e){if("ABBR"===e.target.nodeName&&!this.is_disabled)return this.results_reset(e)},t.prototype.search_results_mousewheel=function(e){var t;if(e.originalEvent&&(t=e.originalEvent.deltaY||-e.originalEvent.wheelDelta||e.originalEvent.detail),null!=t)return e.preventDefault(),"DOMMouseScroll"===e.type&&(t*=40),this.search_results.scrollTop(t+this.search_results.scrollTop())},t.prototype.blur_test=function(e){if(!this.active_field&&this.container.hasClass("chosen-container-active"))return this.close_field()},t.prototype.close_field=function(){return a(this.container[0].ownerDocument).off("click.chosen",this.click_test_action),this.active_field=!1,this.results_hide(),this.container.removeClass("chosen-container-active"),this.clear_backstroke(),this.show_search_field_default(),this.search_field_scale(),this.search_field.blur()},t.prototype.activate_field=function(){if(!this.is_disabled)return this.container.addClass("chosen-container-active"),this.active_field=!0,this.search_field.val(this.search_field.val()),this.search_field.focus()},t.prototype.test_active_click=function(e){var t;return(t=a(e.target).closest(".chosen-container")).length&&this.container[0]===t[0]?this.active_field=!0:this.close_field()},t.prototype.results_build=function(){return this.parsing=!0,this.selected_option_count=null,this.results_data=s.select_to_array(this.form_field),this.is_multiple?this.search_choices.find("li.search-choice").remove():(this.single_set_selected_text(),this.disable_search||this.form_field.options.length<=this.disable_search_threshold?(this.search_field[0].readOnly=!0,this.container.addClass("chosen-container-single-nosearch")):(this.search_field[0].readOnly=!1,this.container.removeClass("chosen-container-single-nosearch"))),this.update_results_content(this.results_option_build({first:!0})),this.search_field_disabled(),this.show_search_field_default(),this.search_field_scale(),this.parsing=!1},t.prototype.result_do_highlight=function(e){var t,n,i,o;if(e.length){if(this.result_clear_highlight(),this.result_highlight=e,this.result_highlight.addClass("highlighted"),(i=parseInt(this.search_results.css("maxHeight"),10))+(o=this.search_results.scrollTop())<=(t=(n=this.result_highlight.position().top+this.search_results.scrollTop())+this.result_highlight.outerHeight()))return this.search_results.scrollTop(0<t-i?t-i:0);if(n<o)return this.search_results.scrollTop(n)}},t.prototype.result_clear_highlight=function(){return this.result_highlight&&this.result_highlight.removeClass("highlighted"),this.result_highlight=null},t.prototype.results_show=function(){return this.is_multiple&&this.max_selected_options<=this.choices_count()?(this.form_field_jq.trigger("chosen:maxselected",{chosen:this}),!1):(this.container.addClass("chosen-with-drop"),this.results_showing=!0,this.search_field.focus(),this.search_field.val(this.get_search_field_value()),this.winnow_results(),this.form_field_jq.trigger("chosen:showing_dropdown",{chosen:this}))},t.prototype.update_results_content=function(e){return this.search_results.html(e)},t.prototype.results_hide=function(){return this.results_showing&&(this.result_clear_highlight(),this.container.removeClass("chosen-with-drop"),this.form_field_jq.trigger("chosen:hiding_dropdown",{chosen:this})),this.results_showing=!1},t.prototype.set_tab_index=function(e){var t;if(this.form_field.tabIndex)return t=this.form_field.tabIndex,this.form_field.tabIndex=-1,this.search_field[0].tabIndex=t},t.prototype.set_label_behavior=function(){if(this.form_field_label=this.form_field_jq.parents("label"),!this.form_field_label.length&&this.form_field.id.length&&(this.form_field_label=a("label[for='"+this.form_field.id+"']")),0<this.form_field_label.length)return this.form_field_label.on("click.chosen",this.label_click_handler)},t.prototype.show_search_field_default=function(){return this.is_multiple&&this.choices_count()<1&&!this.active_field?(this.search_field.val(this.default_text),this.search_field.addClass("default")):(this.search_field.val(""),this.search_field.removeClass("default"))},t.prototype.search_results_mouseup=function(e){var t;if((t=a(e.target).hasClass("active-result")?a(e.target):a(e.target).parents(".active-result").first()).length)return this.result_highlight=t,this.result_select(e),this.search_field.focus()},t.prototype.search_results_mouseover=function(e){var t;if(t=a(e.target).hasClass("active-result")?a(e.target):a(e.target).parents(".active-result").first())return this.result_do_highlight(t)},t.prototype.search_results_mouseout=function(e){if(a(e.target).hasClass("active-result")||a(e.target).parents(".active-result").first())return this.result_clear_highlight()},t.prototype.choice_build=function(e){var t,n,i;return t=a("<li />",{class:"search-choice"}).html("<span>"+this.choice_label(e)+"</span>"),e.disabled?t.addClass("search-choice-disabled"):((n=a("<a />",{class:"search-choice-close","data-option-array-index":e.array_index})).on("click.chosen",(i=this,function(e){return i.choice_destroy_link_click(e)})),t.append(n)),this.search_container.before(t)},t.prototype.choice_destroy_link_click=function(e){if(e.preventDefault(),e.stopPropagation(),!this.is_disabled)return this.choice_destroy(a(e.target))},t.prototype.choice_destroy=function(e){if(this.result_deselect(e[0].getAttribute("data-option-array-index")))return this.active_field?this.search_field.focus():this.show_search_field_default(),this.is_multiple&&0<this.choices_count()&&this.get_search_field_value().length<1&&this.results_hide(),e.parents("li").first().remove(),this.search_field_scale()},t.prototype.results_reset=function(){if(this.reset_single_select_options(),this.form_field.options[0].selected=!0,this.single_set_selected_text(),this.show_search_field_default(),this.results_reset_cleanup(),this.trigger_form_field_change(),this.active_field)return this.results_hide()},t.prototype.results_reset_cleanup=function(){return this.current_selectedIndex=this.form_field.selectedIndex,this.selected_item.find("abbr").remove()},t.prototype.result_select=function(e){var t,n;if(this.result_highlight)return t=this.result_highlight,this.result_clear_highlight(),this.is_multiple&&this.max_selected_options<=this.choices_count()?(this.form_field_jq.trigger("chosen:maxselected",{chosen:this}),!1):(this.is_multiple?t.removeClass("active-result"):this.reset_single_select_options(),t.addClass("result-selected"),(n=this.results_data[t[0].getAttribute("data-option-array-index")]).selected=!0,this.form_field.options[n.options_index].selected=!0,this.selected_option_count=null,this.is_multiple?this.choice_build(n):this.single_set_selected_text(this.choice_label(n)),this.is_multiple&&(!this.hide_results_on_select||e.metaKey||e.ctrlKey)?e.metaKey||e.ctrlKey?this.winnow_results({skip_highlight:!0}):(this.search_field.val(""),this.winnow_results()):(this.results_hide(),this.show_search_field_default()),(this.is_multiple||this.form_field.selectedIndex!==this.current_selectedIndex)&&this.trigger_form_field_change({selected:this.form_field.options[n.options_index].value}),this.current_selectedIndex=this.form_field.selectedIndex,e.preventDefault(),this.search_field_scale())},t.prototype.single_set_selected_text=function(e){return null==e&&(e=this.default_text),e===this.default_text?this.selected_item.addClass("chosen-default"):(this.single_deselect_control_build(),this.selected_item.removeClass("chosen-default")),this.selected_item.find("span").html(e)},t.prototype.result_deselect=function(e){var t;return t=this.results_data[e],!this.form_field.options[t.options_index].disabled&&(t.selected=!1,this.form_field.options[t.options_index].selected=!1,this.selected_option_count=null,this.result_clear_highlight(),this.results_showing&&this.winnow_results(),this.trigger_form_field_change({deselected:this.form_field.options[t.options_index].value}),this.search_field_scale(),!0)},t.prototype.single_deselect_control_build=function(){if(this.allow_single_deselect)return this.selected_item.find("abbr").length||this.selected_item.find("span").first().after('<abbr class="search-choice-close"></abbr>'),this.selected_item.addClass("chosen-single-with-deselect")},t.prototype.get_search_field_value=function(){return this.search_field.val()},t.prototype.get_search_text=function(){return a.trim(this.get_search_field_value())},t.prototype.escape_html=function(e){return a("<div/>").text(e).html()},t.prototype.winnow_results_set_highlight=function(){var e,t;if(null!=(e=(t=this.is_multiple?[]:this.search_results.find(".result-selected.active-result")).length?t.first():this.search_results.find(".active-result").first()))return this.result_do_highlight(e)},t.prototype.no_results=function(e){var t;return t=this.get_no_results_html(e),this.search_results.append(t),this.form_field_jq.trigger("chosen:no_results",{chosen:this})},t.prototype.no_results_clear=function(){return this.search_results.find(".no-results").remove()},t.prototype.keydown_arrow=function(){var e;return this.results_showing&&this.result_highlight?(e=this.result_highlight.nextAll("li.active-result").first())?this.result_do_highlight(e):void 0:this.results_show()},t.prototype.keyup_arrow=function(){var e;return this.results_showing||this.is_multiple?this.result_highlight?(e=this.result_highlight.prevAll("li.active-result")).length?this.result_do_highlight(e.first()):(0<this.choices_count()&&this.results_hide(),this.result_clear_highlight()):void 0:this.results_show()},t.prototype.keydown_backstroke=function(){var e;return this.pending_backstroke?(this.choice_destroy(this.pending_backstroke.find("a").first()),this.clear_backstroke()):(e=this.search_container.siblings("li.search-choice").last()).length&&!e.hasClass("search-choice-disabled")?(this.pending_backstroke=e,this.single_backstroke_delete?this.keydown_backstroke():this.pending_backstroke.addClass("search-choice-focus")):void 0},t.prototype.clear_backstroke=function(){return this.pending_backstroke&&this.pending_backstroke.removeClass("search-choice-focus"),this.pending_backstroke=null},t.prototype.search_field_scale=function(){var e,t,n,i,o,r,s;if(this.is_multiple){for(o={position:"absolute",left:"-1000px",top:"-1000px",display:"none",whiteSpace:"pre"},t=0,n=(r=["fontSize","fontStyle","fontWeight","fontFamily","lineHeight","textTransform","letterSpacing"]).length;t<n;t++)o[i=r[t]]=this.search_field.css(i);return(e=a("<div />").css(o)).text(this.get_search_field_value()),a("body").append(e),s=e.width()+25,e.remove(),this.container.is(":visible")&&(s=Math.min(this.container.outerWidth()-10,s)),this.search_field.width(s)}},t.prototype.trigger_form_field_change=function(e){return this.form_field_jq.trigger("input",e),this.form_field_jq.trigger("change",e)},t}()}.call(this),function(s){"use strict";function o(e,t,n){this.init(e,t,n)}function e(){this.rules=[]}s.extend(o.prototype,{init:function(e,t,n){this.controller=e,this.condition=t,this.value=n,this.rules=[],this.controls=[]},evalCondition:function(e,t,n,i,o){if("=="==n)return this.checkBoolean(i)==this.checkBoolean(o);if("!="==n)return this.checkBoolean(i)!=this.checkBoolean(o);if(">="==n)return Number(o)>=Number(i);if("<="==n)return Number(o)<=Number(i);if(">"==n)return Number(o)>Number(i);if("<"==n)return Number(o)<Number(i);if("()"==n)return window[i](e,t,o);if("any"==n){if(s.isArray(o)){for(var r=o.length-1;0<=r;r--)if(-1!==s.inArray(o[r],i.split(",")))return!0}else if(-1!==s.inArray(o,i.split(",")))return!0}else if("not-any"==n)if(s.isArray(o)){for(r=o.length-1;0<=r;r--)if(-1==s.inArray(o[r],i.split(",")))return!0}else if(-1==s.inArray(o,i.split(",")))return!0;return!1},checkBoolean:function(e){switch(e){case!0:case"true":case 1:case"1":e=!0;break;case null:case!1:case"false":case 0:case"0":e=!1}return e},checkCondition:function(e){if(!this.condition)return!0;var t=e.find(this.controller),n=this.getControlValue(e,t);return void 0!==n&&(n=this.normalizeValue(t,this.value,n),this.evalCondition(e,t,this.condition,this.value,n))},normalizeValue:function(e,t,n){return"number"==typeof t?parseFloat(n):n},getControlValue:function(e,t){return 1<t.length&&("radio"==t.attr("type")||"checkbox"==t.attr("type"))?t.filter(":checked").map(function(){return this.value}).get():"checkbox"==t.attr("type")||"radio"==t.attr("type")?t.is(":checked"):t.val()},createRule:function(e,t,n){var i=new o(e,t,n);return this.rules.push(i),i},include:function(e){this.controls.push(e)},applyRule:function(n,e){var t;t=void 0===e?this.checkCondition(n):e;var i=s.map(this.controls,function(e,t){return n.find(e)});t?(s(i).each(function(){s(this).removeClass("ulf-depend-on")}),s(this.rules).each(function(){this.applyRule(n)})):(s(i).each(function(){s(this).addClass("ulf-depend-on")}),s(this.rules).each(function(){this.applyRule(n,!1)}))}}),s.extend(e.prototype,{createRule:function(e,t,n){var i=new o(e,t,n);return this.rules.push(i),i},applyRules:function(e){s(this.rules).each(function(){this.applyRule(e)})}}),s.ulf_deps={createRuleset:function(){return new e},enable:function(n,i,o){return n.on("change keyup",function(e){var t=e.target.getAttribute("data-depend-id")||e.target.getAttribute("data-sub-depend-id");-1!==o.indexOf(t)&&i.applyRules(n)}),i.applyRules(n),!0}}}(jQuery),function(e,n){if("function"==typeof define&&define.amd)define(["exports","jquery"],function(e,t){return n(e,t)});else if("undefined"!=typeof exports){var t=require("jquery");n(exports,t)}else n(e,e.jQuery||e.Zepto||e.ender||e.$)}(this,function(e,t){var a={validate:/^(?!(_nonce|_pseudo))[a-zA-Z0-9_-]*(?:\[(?:\d*|(?!(_nonce|_pseudo))[a-zA-Z0-9_-]+)\])*$/i,key:/[a-zA-Z0-9_-]+|(?=\[\])/g,named:/^[a-zA-Z0-9_-]+$/,push:/^$/,fixed:/^\d+$/};function n(i,e){var n={},r={};function s(e,t,n){return e[t]=n,e}function t(){return n}this.addPair=function(e){if(!a.validate.test(e.name))return this;var t=function(e,t){for(var n,i=e.match(a.key);void 0!==(n=i.pop());)a.push.test(n)?t=s([],(o=e.replace(/\[\]$/,""),void 0===r[o]&&(r[o]=0),r[o]++),t):a.fixed.test(n)?t=s([],n,t):a.named.test(n)&&(t=s({},n,t));var o;return t}(e.name,e.value);return n=i.extend(!0,n,t),this},this.addPairs=function(e){if(!i.isArray(e))throw new Error("formSerializer.addPairs expects an Array");for(var t=0,n=e.length;t<n;t++)this.addPair(e[t]);return this},this.serialize=t,this.serializeJSON=function(){return JSON.stringify(t())}}return n.patterns=a,n.serializeObject=function(){return new n(t,this).addPairs(this.serializeArray()).serialize()},n.serializeJSON=function(){return new n(t,this).addPairs(this.serializeArray()).serializeJSON()},void 0!==t.fn&&(t.fn.serializeObjectULF=n.serializeObject,t.fn.serializeJSONULF=n.serializeJSON),e.FormSerializer=n});
admin/settings/classes/setup.class.php CHANGED
@@ -7,12 +7,12 @@
7
  * @version 1.0.0
8
  *
9
  */
10
- if ( ! class_exists( 'ULF' ) ) {
11
- class ULF {
12
 
13
  // Default constants
14
  public static $premium = true;
15
- public static $version = '2.2.7';
16
  public static $dir = '';
17
  public static $url = '';
18
  public static $css = '';
@@ -39,11 +39,14 @@ if ( ! class_exists( 'ULF' ) ) {
39
 
40
  private static $instance = null;
41
 
42
- public static function init( $file = __FILE__ ) {
43
 
44
  // Set file constant
45
  self::$file = $file;
46
 
 
 
 
47
  // Set constants
48
  self::constants();
49
 
@@ -375,18 +378,18 @@ if ( ! class_exists( 'ULF' ) ) {
375
  // Include files
376
  public static function includes() {
377
 
378
- // Helpers
379
  self::include_plugin_file( 'functions/actions.php' );
380
  self::include_plugin_file( 'functions/helpers.php' );
381
  self::include_plugin_file( 'functions/sanitize.php' );
382
  self::include_plugin_file( 'functions/validate.php' );
383
 
384
- // Includes free version classes
385
  self::include_plugin_file( 'classes/abstract.class.php' );
386
  self::include_plugin_file( 'classes/fields.class.php' );
387
  self::include_plugin_file( 'classes/admin-options.class.php' );
388
 
389
- // Includes premium version classes
390
  if ( self::$premium ) {
391
  self::include_plugin_file( 'classes/customize-options.class.php' );
392
  self::include_plugin_file( 'classes/metabox-options.class.php' );
@@ -560,9 +563,6 @@ if ( ! class_exists( 'ULF' ) ) {
560
  return;
561
  }
562
 
563
- // Check for developer mode
564
- $min = ( self::$premium && SCRIPT_DEBUG ) ? '' : '.min';
565
-
566
  // Admin utilities
567
  wp_enqueue_media();
568
 
@@ -572,12 +572,15 @@ if ( ! class_exists( 'ULF' ) ) {
572
 
573
  // Font awesome 4 and 5 loader
574
  if ( apply_filters( 'ulf_fa4', false ) ) {
575
- wp_enqueue_style( 'ulf-fa', 'https://cdn.jsdelivr.net/npm/font-awesome@4.7.0/css/font-awesome'. $min .'.css', array(), '4.7.0', 'all' );
576
  } else {
577
- wp_enqueue_style( 'ulf-fa5', 'https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@5.15.4/css/all'. $min .'.css', array(), '5.15.5', 'all' );
578
- wp_enqueue_style( 'ulf-fa5-v4-shims', 'https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@5.15.4/css/v4-shims'. $min .'.css', array(), '5.15.5', 'all' );
579
  }
580
 
 
 
 
581
  // Main style
582
  wp_enqueue_style( 'ulf', self::include_plugin_url( 'assets/css/style'. $min .'.css' ), array(), self::$version, 'all' );
583
 
@@ -783,4 +786,16 @@ if ( ! class_exists( 'ULF' ) ) {
783
 
784
  }
785
 
786
- ULF::init( __FILE__ );
 
 
 
 
 
 
 
 
 
 
 
 
7
  * @version 1.0.0
8
  *
9
  */
10
+ if ( ! class_exists( 'ULF_Setup' ) ) {
11
+ class ULF_Setup {
12
 
13
  // Default constants
14
  public static $premium = true;
15
+ public static $version = '2.2.8';
16
  public static $dir = '';
17
  public static $url = '';
18
  public static $css = '';
39
 
40
  private static $instance = null;
41
 
42
+ public static function init( $file = __FILE__, $premium = true ) {
43
 
44
  // Set file constant
45
  self::$file = $file;
46
 
47
+ // Set file constant
48
+ self::$premium = $premium;
49
+
50
  // Set constants
51
  self::constants();
52
 
378
  // Include files
379
  public static function includes() {
380
 
381
+ // Include common functions
382
  self::include_plugin_file( 'functions/actions.php' );
383
  self::include_plugin_file( 'functions/helpers.php' );
384
  self::include_plugin_file( 'functions/sanitize.php' );
385
  self::include_plugin_file( 'functions/validate.php' );
386
 
387
+ // Include free version classes
388
  self::include_plugin_file( 'classes/abstract.class.php' );
389
  self::include_plugin_file( 'classes/fields.class.php' );
390
  self::include_plugin_file( 'classes/admin-options.class.php' );
391
 
392
+ // Include premium version classes
393
  if ( self::$premium ) {
394
  self::include_plugin_file( 'classes/customize-options.class.php' );
395
  self::include_plugin_file( 'classes/metabox-options.class.php' );
563
  return;
564
  }
565
 
 
 
 
566
  // Admin utilities
567
  wp_enqueue_media();
568
 
572
 
573
  // Font awesome 4 and 5 loader
574
  if ( apply_filters( 'ulf_fa4', false ) ) {
575
+ wp_enqueue_style( 'ulf-fa', 'https://cdn.jsdelivr.net/npm/font-awesome@4.7.0/css/font-awesome.min.css', array(), '4.7.0', 'all' );
576
  } else {
577
+ wp_enqueue_style( 'ulf-fa5', 'https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@5.15.4/css/all.min.css', array(), '5.15.5', 'all' );
578
+ wp_enqueue_style( 'ulf-fa5-v4-shims', 'https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@5.15.4/css/v4-shims.min.css', array(), '5.15.5', 'all' );
579
  }
580
 
581
+ // Check for developer mode
582
+ $min = ( self::$premium && SCRIPT_DEBUG ) ? '' : '.min';
583
+
584
  // Main style
585
  wp_enqueue_style( 'ulf', self::include_plugin_url( 'assets/css/style'. $min .'.css' ), array(), self::$version, 'all' );
586
 
786
 
787
  }
788
 
789
+ ULF_Setup::init( __FILE__, true );
790
+
791
+ /**
792
+ *
793
+ * Extended Setup Class for Shortland
794
+ *
795
+ * @since 1.0.0
796
+ * @version 1.0.0
797
+ *
798
+ */
799
+ if ( ! class_exists( 'ULF' ) ) {
800
+ class ULF extends ULF_Setup{}
801
+ }
admin/settings/classes/shortcode-options.class.php CHANGED
@@ -50,7 +50,9 @@ if ( ! class_exists( 'ULF_Shortcoder' ) ) {
50
 
51
  if ( ! empty( $this->args['show_in_editor'] ) ) {
52
 
53
- ULF::$shortcode_instances[$this->unique] = wp_parse_args( array( 'hash' => md5( $key ), 'modal_id' => $this->unique ), $this->args );
 
 
54
 
55
  // elementor editor support
56
  if ( ULF::is_active_plugin( 'elementor/elementor.php' ) ) {
@@ -322,9 +324,9 @@ if ( ! class_exists( 'ULF_Shortcoder' ) ) {
322
 
323
  wp_localize_script( 'ulf-gutenberg-block', 'ulf_gutenberg_blocks', ULF::$shortcode_instances );
324
 
325
- foreach ( ULF::$shortcode_instances as $value ) {
326
 
327
- register_block_type( 'ulf-gutenberg-block/block-'. $value['hash'], array(
328
  'editor_script' => 'ulf-gutenberg-block',
329
  ) );
330
 
50
 
51
  if ( ! empty( $this->args['show_in_editor'] ) ) {
52
 
53
+ $name = str_replace( '_', '-', sanitize_title( $this->unique ) );
54
+
55
+ ULF::$shortcode_instances[] = wp_parse_args( array( 'name' => 'ulf/'. $name, 'modal_id' => $this->unique ), $this->args );
56
 
57
  // elementor editor support
58
  if ( ULF::is_active_plugin( 'elementor/elementor.php' ) ) {
324
 
325
  wp_localize_script( 'ulf-gutenberg-block', 'ulf_gutenberg_blocks', ULF::$shortcode_instances );
326
 
327
+ foreach ( ULF::$shortcode_instances as $block ) {
328
 
329
+ register_block_type( $block['name'], array(
330
  'editor_script' => 'ulf-gutenberg-block',
331
  ) );
332
 
assets/js/wp-ulike.js CHANGED
@@ -1,4 +1,4 @@
1
- /*! WP ULike - v4.6.0
2
  * https://wpulike.com
3
  * TechnoWich 2022;
4
  */
1
+ /*! WP ULike - v4.6.1
2
  * https://wpulike.com
3
  * TechnoWich 2022;
4
  */
assets/js/wp-ulike.min.js CHANGED
@@ -1,4 +1,4 @@
1
- /*! WP ULike - v4.6.0
2
  * https://wpulike.com
3
  * TechnoWich 2022;
4
  */
1
+ /*! WP ULike - v4.6.1
2
  * https://wpulike.com
3
  * TechnoWich 2022;
4
  */
includes/hooks/third-party.php CHANGED
@@ -343,8 +343,7 @@ if( ! function_exists( 'wp_ulike_format_buddypress_notifications' ) ){
343
  * @return string $return Formatted notification.
344
  */
345
  function wp_ulike_format_buddypress_notifications( $content, $item_id, $secondary_item_id, $total_items, $format, $action, $component, $id ) {
346
- global $wp_filter,$wp_version;
347
-
348
  if ( strpos( $action, 'wp_ulike_' ) !== false ) {
349
  //Extracting ulike type from the action value.
350
  preg_match('/wp_ulike_(.*?)_action/', $action, $type);
@@ -406,19 +405,6 @@ if( ! function_exists( 'wp_ulike_format_buddypress_notifications' ) ){
406
  'link' => $custom_link
407
  ), $custom_link, (int) $total_items, $item_id, $user_ID );
408
  }
409
-
410
- if ( function_exists('bbp_get_version') && version_compare( bbp_get_version(), '2.6.0' , '<') ) {
411
- // global wp_filter to call bbPress wrapper function
412
- if( isset( $wp_filter['bp_notifications_get_notifications_for_user'][10]['bbp_format_buddypress_notifications'] ) ) {
413
- if( version_compare( $wp_version, '4.7', '>=' ) ) {
414
- $wp_filter['bp_notifications_get_notifications_for_user']->callbacks[10]['bbp_format_buddypress_notifications']['function'] = 'wp_ulike_bbp_format_buddypress_notifications';
415
- } else {
416
- $wp_filter['bp_notifications_get_notifications_for_user'][10]['bbp_format_buddypress_notifications']['function'] = 'wp_ulike_bbp_format_buddypress_notifications';
417
- }
418
- }
419
- }
420
-
421
- return $content;
422
  }
423
 
424
  return $content;
343
  * @return string $return Formatted notification.
344
  */
345
  function wp_ulike_format_buddypress_notifications( $content, $item_id, $secondary_item_id, $total_items, $format, $action, $component, $id ) {
346
+ // check for ulike notifications
 
347
  if ( strpos( $action, 'wp_ulike_' ) !== false ) {
348
  //Extracting ulike type from the action value.
349
  preg_match('/wp_ulike_(.*?)_action/', $action, $type);
405
  'link' => $custom_link
406
  ), $custom_link, (int) $total_items, $item_id, $user_ID );
407
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
408
  }
409
 
410
  return $content;
readme.txt CHANGED
@@ -6,7 +6,7 @@ Tags: like, marketing, elementor, user profile, rating, favorite, statistics, bu
6
  Requires PHP: 5.6
7
  Requires at least: 5.0
8
  Tested up to: 5.9.3
9
- Stable tag: 4.6.0
10
  License: GPLv2 or later
11
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
12
 
@@ -140,6 +140,10 @@ Yes, WP ULike is compatible with Apache, Nginx, Microsoft IIS et LiteSpeed web s
140
 
141
  == Changelog ==
142
 
 
 
 
 
143
  = 4.6.0 =
144
  * Added: Increase security for user accounts by using 2-factor authentication steps. [PRO]
145
  * Added: Animated Smiley Switch Template. [PRO]
6
  Requires PHP: 5.6
7
  Requires at least: 5.0
8
  Tested up to: 5.9.3
9
+ Stable tag: 4.6.1
10
  License: GPLv2 or later
11
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
12
 
140
 
141
  == Changelog ==
142
 
143
+ = 4.6.1 =
144
+ * Updated: Options panel framework.
145
+ * Fixed: BuddyPress notification error.
146
+
147
  = 4.6.0 =
148
  * Added: Increase security for user accounts by using 2-factor authentication steps. [PRO]
149
  * Added: Animated Smiley Switch Template. [PRO]
wp-ulike.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: WP ULike
4
  * Plugin URI: https://wpulike.com/?utm_source=wp-plugins&utm_campaign=plugin-uri&utm_medium=wp-dash
5
  * Description: Receiving feedback is crucial as a content creator, but unfortunately, the pieces of content you can collect it on are limited by default. However, with the help of the WP ULike plugin, it is possible to cast voting to any type of content you may have on your website. With outstanding and eye-catching widgets, you can have Like and Dislike Button on all of your content would it be a post, comment, BuddyPress activity, bbPress topics, WooCommerce products, you name it. Now you can feel your users Love for each part of your work.
6
- * Version: 4.6.0
7
  * Author: TechnoWich
8
  * Author URI: https://technowich.com/?utm_source=wp-plugins&utm_campaign=author-uri&utm_medium=wp-dash
9
  * Text Domain: wp-ulike
@@ -27,7 +27,7 @@ if ( ! defined( 'ABSPATH' ) ) {
27
 
28
  // Do not change these values
29
  define( 'WP_ULIKE_PLUGIN_URI' , 'https://wpulike.com/' );
30
- define( 'WP_ULIKE_VERSION' , '4.6.0' );
31
  define( 'WP_ULIKE_DB_VERSION' , '2.3' );
32
  define( 'WP_ULIKE_SLUG' , 'wp-ulike' );
33
  define( 'WP_ULIKE_NAME' , __( 'WP ULike', WP_ULIKE_SLUG ) );
3
  * Plugin Name: WP ULike
4
  * Plugin URI: https://wpulike.com/?utm_source=wp-plugins&utm_campaign=plugin-uri&utm_medium=wp-dash
5
  * Description: Receiving feedback is crucial as a content creator, but unfortunately, the pieces of content you can collect it on are limited by default. However, with the help of the WP ULike plugin, it is possible to cast voting to any type of content you may have on your website. With outstanding and eye-catching widgets, you can have Like and Dislike Button on all of your content would it be a post, comment, BuddyPress activity, bbPress topics, WooCommerce products, you name it. Now you can feel your users Love for each part of your work.
6
+ * Version: 4.6.1
7
  * Author: TechnoWich
8
  * Author URI: https://technowich.com/?utm_source=wp-plugins&utm_campaign=author-uri&utm_medium=wp-dash
9
  * Text Domain: wp-ulike
27
 
28
  // Do not change these values
29
  define( 'WP_ULIKE_PLUGIN_URI' , 'https://wpulike.com/' );
30
+ define( 'WP_ULIKE_VERSION' , '4.6.1' );
31
  define( 'WP_ULIKE_DB_VERSION' , '2.3' );
32
  define( 'WP_ULIKE_SLUG' , 'wp-ulike' );
33
  define( 'WP_ULIKE_NAME' , __( 'WP ULike', WP_ULIKE_SLUG ) );