Submit
Path:
~
/
home
/
getwphos
/
www
/
pioneerasphalt
/
wp-content
/
plugins
/
qode-optimizer
/
inc
/
admin
/
inc
/
common
/
assets
/
js
/
File Content:
common.min.js
!function(h){"use strict";"object"!=typeof qodefFramework&&(window.qodefFramework={}),qodefFramework.scroll=0,qodefFramework.windowWidth=h(window).width(),qodefFramework.windowHeight=h(window).height(),h(document).ready(function(){var e=h(".qodef-page-v4-optimizer"),t=h(".qodef-admin-page-v4");e.length&&(n.init(e),f.init(e),a.init(e),d.init(),r.init(e),s.init(e),l.init(e),c.init(e),p.init(e),m.init(),t.length&&q.init(t),u.init(e),o.init(),w.initColorPicker(),b.init())}),h(window).load(function(){m.init(!0),k.init()}),h(window).scroll(function(){qodefFramework.scroll=h(window).scrollTop()}),h(window).resize(function(){qodefFramework.windowWidth=h(window).width(),qodefFramework.windowHeight=h(window).height(),600<qodefFramework.windowWidth&&void 0!==d.adminPage&&d.adminPage.length&&void 0!==d.adminHeader&&d.adminHeader.length&&d.adminHeader.css("width",d.adminPage.width())}),h(document).on("widget-added widget-updated",function(e,t){w.initColorPicker(t),w.initDependency(t)}),h(document).on("ajaxSuccess",function(e,t,n){-1!==n.data.indexOf("action=add-tag")&&(n=h(".qodef-field-color")).length&&n.each(function(){var e=h(this).find(".wp-picker-clear");e.length&&e.trigger("click")})});var n={init:function(e){this.holder=e.filter(".qodef-tab-wrapper"),this.holder.length&&this.holder.each(function(){n.initTabs(e,h(this)),qodefFramework.qodefPerfectScrollbar.init(h(this).find(".qodef-tab-item-nav-wrapper"),!1)})},initTabs:function(e,t){t.children(".qodef-tab-item-content").each(function(e){e+=1;var t=h(this),n=t.attr("id"),t=t.parent().find(".qodef-tab-item-nav-wrapper li:nth-child("+e+") a"),e=t.attr("href");-1<(n="#"+n).indexOf(e)&&t.attr("href",n)}),t.addClass("qodef--init").tabs({activate:function(){"object"==typeof qodefFramework.qodefAddressFields&&qodefFramework.qodefAddressFields.init(e,!0),h(document.body).trigger("qode_optimizer_trigger_tab_change")}})}},f={init:function(e){f.initOptions(e),f.initMenu(),f.initWidget(),f.initProductAttributeTypeSelectBox()},initOptions:function(e){e=e.find(".qodef-field-content .qodef-field[data-option-name]");e.length&&f.initFields(e)},initMenu:function(){var e=h("#update-nav-menu .qodef-menu-item-field[data-option-name]");e.length&&f.initFields(e)},initWidget:function(){var e=h(".widget-content .qodef-widget-field[data-option-name]");e.length&&e.each(function(){var e=h(this);e.parents("#widget-list").length<=0&&f.initField(e)})},reinitRepeater:function(e){e=e.find(".qodef-repeater-fields-holder .qodef-field-content .qodef-field[data-option-name]");e.length&&e.each(function(){var e=h(this);switch(e.data("option-type")){case"selectbox":f.qodefSelectBoxDependencyRepeater(e);break;case"radiogroup":f.qodefRadioGroupDependencyRepeater(e)}f.initField(e)})},reinitWidget:function(e){f.initFields(e)},initFields:function(e){e.each(function(){var e=h(this);e.parents(".qodef-repeater-template").length<=0&&f.initField(e)})},initField:function(e){var t=e.data("option-type");if(!e.hasClass("qodef-dependency-option"))switch(e.addClass("qodef-dependency-option"),t){case"selectbox":f.qodefSelectBoxDependency(e);break;case"radiogroup":case"yesno":f.qodefRadioGroupDependency(e);break;case"checkbox":f.qodefCheckBoxDependency(e)}},qodefSelectBoxDependency:function(t){t.on("change",function(){var e=h(this).val();f.qodefDependencyActionInit(t,e)}),t.trigger("change")},qodefSelectBoxDependencyRepeater:function(e){var t=e.val();f.qodefDependencyActionInit(e,t)},qodefRadioGroupDependency:function(t){var e=t.data("option-name");t.find('input[name="'+e+'"]').on("change",function(){var e=this.value;f.qodefDependencyActionInit(t,e)}),f.qodefDependencyActionInit(t,t.find('input[name="'+t.data("option-name")+'"]:checked').val())},qodefRadioGroupDependencyRepeater:function(e){var t=e.data("option-name"),t=e.find('input[name="'+t+'"]').value;f.qodefDependencyActionInit(e,t)},qodefCheckBoxDependency:function(n){n.on("click",function(){var e=h(this),t=e.val();e.is(":checked")&&(t+="-checked"),f.qodefDependencyActionInit(n,t)})},qodefDependencyActionInit:function(e,r){var t=h(".qodef-dependency-holder"),s=e.data("option-name");"attribute_type"===e.prop("id")&&(s=e.attr("name")),t.length&&void 0!==s&&""!==s&&void 0!==r&&t.each(function(){var e=h(this),t=e.data("show"),n=e.data("hide"),i=e.data("relation"),o="and",d="",a=!0;""!==t&&void 0!==t&&(d=t),""!==n&&void 0!==n&&(d=n,a=!1),""!==i&&void 0!==i&&(o=i),""!==d&&(1<f.qodefGetNumberOfItems(d)?f.qodefMultipleDependencyLogic(d,e,s,r,a,o):f.qodefSingleDependencyLogic(d,e,s,r,a))})},qodefGetNumberOfItems:function(e){var t,n=0;for(t in e)e.hasOwnProperty(t)&&++n;return n},qodefMultipleDependencyLogic:function(e,t,s,f,n,i){var l=[],o=!0;if(h.each(e,function(e,t){if(t=t.split(","),s===e)-1!==t.indexOf(f)?l.push(!0):l.push(!1);else{var n=(o=h('.qodef-dependency-option[data-option-name="'+e+'"]')).data("option-type"),i="";if(0===o.length){var o,d=[],a=!1,n=(o=h('.qodef-dependency-option[data-option-name^="'+e+'["]')).data("option-type");if(o.length&&"checkbox"===n){for(var r in o.each(function(){h(this).is(":checked")&&((i=h(this).val()).length&&-1!==t.indexOf(i)?d.push(!0):d.push(!1))}),d)d[r]&&(a=!0);l.push(a)}}else{switch(n){case"selectbox":i=o.val();break;case"radiogroup":i=o.find('input[name="'+e+'"]:checked').val()}i.length&&-1!==t.indexOf(i)?l.push(!0):l.push(!1)}}}),"and"===i)for(var d in l)l[d]||(o=!1);else for(var d in o=!1,l)l[d]&&(o=!0);n?o?t.fadeIn(200):t.fadeOut(200):o?t.fadeOut(200):t.fadeIn(200)},qodefSingleDependencyLogic:function(e,i,o,d,a){h.each(e,function(e,t){var n="string"==typeof d?d.replace("-checked",""):"";o===e?(t=t.split(","),a?-1!==t.indexOf(d)?(i.removeClass("qodef-hide-dependency-holder"),i.addClass("qodef-show-dependency-holder")):(i.addClass("qodef-hide-dependency-holder"),i.removeClass("qodef-show-dependency-holder")):-1!==t.indexOf(d)?(i.addClass("qodef-hide-dependency-holder"),i.removeClass("qodef-show-dependency-holder")):(i.removeClass("qodef-hide-dependency-holder"),i.addClass("qodef-show-dependency-holder"))):o===e+"["+n+"]"&&n===t&&(a?-1!==t.indexOf(n)&&-1!==d.indexOf("-checked")?(i.removeClass("qodef-hide-dependency-holder"),i.addClass("qodef-show-dependency-holder")):(i.addClass("qodef-hide-dependency-holder"),i.removeClass("qodef-show-dependency-holder")):-1!==t.indexOf(n)&&-1!==d.indexOf("-checked")?(i.addClass("qodef-hide-dependency-holder"),i.removeClass("qodef-show-dependency-holder")):(i.removeClass("qodef-hide-dependency-holder"),i.addClass("qodef-show-dependency-holder")))})},initProductAttributeTypeSelectBox:function(){var e=h("#attribute_type");e.length&&f.qodefSelectBoxDependency(e)}},a=(qodefFramework.qodefDependency=f,{init:function(e){a.initRepeater(e),a.initRepeaterInner(e)},initRepeater:function(t){var e=t.find(".qodef-repeater-wrapper");e.length&&e.each(function(){var e=h(this);a.qodefAddNewRow(e,t),a.qodefRemoveRow(e),a.qodefInitSortable(e)})},initRepeaterInner:function(t){var e=t.find(".qodef-repeater-inner-wrapper");e.length&&e.each(function(){var e=h(this);a.qodefAddNewRowInner(e,t),a.qodefRemoveRowInner(e),a.qodefInitSortableInner(e)})},qodefGetNumberOfRows:function(e){return e.find(".qodef-repeater-fields-holder").length},qodefInitSortable:function(e){e.find(".qodef-repeater-wrapper-main.sortable").length&&h(".qodef-repeater-wrapper-main.sortable").sortable({placeholder:"qodef-placeholder",forcePlaceholderSize:!0,handle:".qodef-repeater-sort"}),a.qodefInitSortableInner(e)},qodefInitSortableInner:function(e){e.find(".qodef-repeater-inner-wrapper-main.sortable").length&&h(".qodef-repeater-inner-wrapper-main.sortable").sortable({placeholder:"qodef-placeholder",forcePlaceholderSize:!0,handle:".qodef-repeater-inner-sort"})},qodefAddNewRow:function(n,i){var e=n.find(".qodef-repeater-add a"),t=n.find(".qodef-repeater-wrapper-main").data("template"),o=n.find(".qodef-repeater-wrapper-main"),d=wp.template("qodef-repeater-template-"+t);e.off().on("tap click",function(e){e.preventDefault(),e.stopPropagation();var e=h(d({rowIndex:a.qodefGetNumberOfRows(n)||0})),t=(o.append(e),e.find(".qodef-repeater-inner-wrapper"));a.qodefAddNewRowInner(t,i),a.qodefRemoveRowInner(t),a.qodefInitSortable(n),f.reinitRepeater(i),h(document).trigger("qode_optimizer_add_new_row_trigger",e.find(".qodef-repeater-fields"))})},qodefRemoveRow:function(e){e.find(".qodef-repeater-wrapper-main").off().on("click",".qodef-clone-remove",function(e){e.preventDefault(),e.stopPropagation(),window.confirm("Are you sure you want to remove this section?")&&h(this).parents(".qodef-repeater-fields-holder").remove()})},qodefAddNewRowInner:function(i,o){var e=i.find(".qodef-repeater-inner-add a"),t=i.find(".qodef-repeater-inner-wrapper-main").data("template"),d=wp.template("qodef-repeater-inner-template-"+t);e.off().on("click",function(e){e.preventDefault(),e.stopPropagation();var e=h(this),t=e.parents(".qodef-repeater-fields-holder").first(),n=t.data("index"),e=e.parent().parent().prev(),t=t.find(".qodef-repeater-inner-fields-holder").length,n=h(d({rowIndex:n,rowInnerIndex:t}));e.append(n),a.qodefInitSortableInner(i),f.reinitRepeater(o)})},qodefRemoveRowInner:function(e){e.find(".qodef-repeater-inner-wrapper-main").off().on("click",".qodef-clone-inner-remove",function(e){e.preventDefault(),e.stopPropagation(),confirm("Are you sure you want to remove section?")&&h(this).parents(".qodef-repeater-inner-fields-holder").remove()})}}),i={init:function(e,t){e.length&&i.qodefInitScroll(e,void 0===t||t)},qodefInitScroll:function(e,t){var n=new PerfectScrollbar(e[0],{wheelSpeed:.6,suppressScrollX:t});h(window).resize(function(){n.update()})}},o=(qodefFramework.qodefPerfectScrollbar=i,{init:function(){h(document).on("qode_optimizer_plugin_add_new_row_trigger",function(e,t){void 0!==q.fieldHolder&&q.fieldHolder.push(t),r.reinit(t),s.reinit(t),l.reinit(t),c.reinit(t),p.reinit(t)})}}),d={init:function(){this.adminPage=h(".qodef-admin-page-v4"),this.adminPage.length&&(this.adminHeaderPosition(),this.navigationInit(),this.saveOptionsInit(this.adminPage),this.setActivePanel(),this.navigationReset(),qodefFramework.windowWidth<=800)&&this.mobile(this.adminPage)},mobile:function(e){var t=e.find(".qodef-mobile-nav-opener"),n=e.find(".qodef-tabs-navigation-wrapper"),e=e.find(".qodef-tabs-navigation-wrapper-inner");qodefFramework.qodefPerfectScrollbar.init(e),t.on("click tap",function(e){e.preventDefault(),n.hasClass("qodef--show")?(n.removeClass("qodef--show"),g.enable()):(n.addClass("qodef--show"),g.disable())}),h(document).on("click",function(e){h(e.target).closest(".qodef-tabs-navigation-wrapper, .qodef-mobile-nav-opener").length||n.hasClass("qodef--show")&&(n.removeClass("qodef--show"),g.enable())})},navigationReset:function(){null!==new URLSearchParams(window.location.search).get("template")&&this.adminPage.find(".qodef-tabs-navigation-wrapper .navbar ul li").removeClass("qodef-active")},navigationInit:function(){this.adminPage.find(".qodef-tabs-navigation-wrapper .navbar ul li").on("click",function(){q.resetSearchView(),q.resetSearchField(),d.initTabNavItemClick(h(this)),d.initNavItemClick(h(this),!0)})},initTabNavItemClick:function(e){var t=e.find(".nav-link").data("section");null!==new URLSearchParams(window.location.search).get("template")&&(this.setCookie("qodefOptimizerActiveTab",t),window.location=e.data("options-url"))},initNavItemClick:function(e,t){var n,i;e.length&&(n=e.find(".nav-link").data("section"),e.hasClass("qodef-layout-custom")&&!e.hasClass("qodef-active")&&t&&e.data("options-url")?(this.setCookie("qodefOptimizerActiveTab",n),window.location=e.data("options-url")):((t=this.adminPage.find(".qodef-tabs-content")).find(".tab-content:visible").addClass("qodef-hide-pane"),(i=t.find(".tab-content[data-section="+n+"]")).removeClass("qodef-hide-pane"),e.siblings(".qodef-active").removeClass("qodef-active"),e.addClass("qodef-active"),this.setCookie("qodefOptimizerActiveTab",n),setTimeout(function(){qodefFramework.qodefColorPicker.checkFieldPosition(i),h(document.body).on("qode_optimizer_trigger_tab_change",function(){qodefFramework.qodefColorPicker.checkFieldPosition(i)})},500)))},setActivePanel:function(){var e=this.getCookie("qodefOptimizerActiveTab");""!==e&&"undefined"!==e?this.initNavItemClick(h(".qodef-tabs-navigation-wrapper .nav-link[data-section="+e+"]").parent()):this.initNavItemClick(h(".qodef-tabs-navigation-wrapper .navbar ul li:first-child"))},saveOptionsInit:function(o){this.optionsForm=this.adminPage.find("#qode_optimizer_framework_ajax_form");var d,a=h(".qodef-save-reset-loading"),r=h(".qodef-save-success");this.optionsForm.length&&(h(".qodef-save-reset-button").on("click",function(){d=h(this).attr("name")}),this.optionsForm.on("submit",function(e){e.preventDefault(),e.stopPropagation(),a.addClass("qodef-show-loader"),o.addClass("qodef-save-reset-disable");var e=h(this),t={action:("qodef_save"===d?"qode_optimizer_action_framework_save_options_":"qode_optimizer_action_framework_reset_options_")+e.data("options-name"),options_name:e.data("options-name")},n=e.find("[class*=qodef-page-v4]:not(.qodef-exclude-panel-from-saving) :input"),i=e.find(" > :input");e.siblings(":input").length&&(i=e.siblings(":input")),h.ajax({type:"POST",url:ajaxurl,cache:!1,data:h.param(t,!0)+"&"+n.serialize()+"&"+i.serialize(),success:function(){switch(a.removeClass("qodef-show-loader"),d){case"qodef_reset":window.location.reload(!0);break;case"qodef_save":o.removeClass("qodef-save-reset-disable"),r.fadeIn(300),setTimeout(function(){r.fadeOut(200)},2e3)}}})}))},setCookie:function(e,t){document.cookie=e+"="+t},getCookie:function(e){for(var t=e+"=",n=decodeURIComponent(document.cookie).split(";"),i=n.length,o=0;o<i;o++){for(var d=n[o];" "===d.charAt(0);)d=d.substring(1);if(0===d.indexOf(t))return d.substring(t.length,d.length)}return""},adminHeaderPosition:function(){this.adminPage=h(".qodef-admin-page-v4"),this.adminHeader=h(".qodef-admin-header"),this.adminPage.length&&this.adminHeader.length&&600<qodefFramework.windowWidth&&(this.adminBarHeight=h("#wpadminbar").height(),this.adminHeaderHeight=this.adminHeader.outerHeight(!0),this.adminHeaderTopPosition=this.adminHeader.offset().top-parseInt(this.adminBarHeight),this.adminContent=h(".qodef-admin-content"),this.adminNavigation=h(".qodef-tabs-navigation-wrapper"),this.adminHeader.css("width",this.adminPage.width()),h(window).on("scroll load",function(){qodefFramework.scroll>=d.adminHeaderTopPosition?(d.adminHeader.addClass("qodef-fixed").css("top",parseInt(d.adminBarHeight)),d.adminContent.css("marginTop",d.adminHeaderHeight),800<qodefFramework.windowWidth?d.adminNavigation.css("marginTop",0):qodefFramework.windowWidth<=800&&d.adminNavigation.css("marginTop",d.adminBarHeight+d.adminHeaderHeight)):(d.adminHeader.removeClass("qodef-fixed").css("top",0),d.adminContent.css("marginTop",0),800<qodefFramework.windowWidth?d.adminNavigation.css("marginTop",d.adminHeaderHeight):qodefFramework.windowWidth<=800&&d.adminNavigation.css("marginTop",d.adminHeader.offset().top+d.adminHeaderHeight-qodefFramework.scroll))}))}},r={init:function(e){this.$holder=e.find(".qodef-image-uploader"),this.$holder.length&&this.$holder.each(function(){r.initField(h(this))})},reinit:function(e){e=h(e).find(".qodef-image-uploader");e.length&&e.each(function(){r.initField(h(this))})},initField:function(e){var n={$multiple:"yes"===e.data("multiple")&&"no"===e.data("file"),$file:"yes"===e.data("file"),$allowed_type:"yes"===e.data("file")?e.data("allowed-type"):"image",$imageHolder:e,mediaFrame:"",attachment:"",$thumbImageHolder:e.find(".qodef-image-thumb"),$uploadId:e.find(".qodef-image-upload-id"),$removeButton:e.find(".qodef-image-remove-btn")};n.$thumbImageHolder.find("img").length&&(n.$removeButton.show(),r.remove(n.$removeButton)),r.reset(e),n.$imageHolder.on("click",".qodef-image-upload-btn",function(){n.mediaFrame||(n.mediaFrame=wp.media.frames.fileFrame=wp.media({title:h(this).data("frame-title"),button:{text:h(this).data("frame-button-text")},library:{type:n.$allowed_type},multiple:n.$multiple}),n.$file?r.fileSelect(n):n.$multiple?r.multipleSelect(n):r.singleSelect(n),n.mediaFrame.on("open",function(){var t=n.mediaFrame.state().get("selection");n.$uploadId.val().split(",").forEach(function(e){n.attachment=wp.media.attachment(e),n.attachment.fetch(),t.add(n.attachment?[n.attachment]:[])})})),n.mediaFrame.open()})},multipleSelect:function(i){i.mediaFrame.on("select",function(){i.attachment=i.mediaFrame.state().get("selection").map(function(e){return e.toJSON(),e}),i.$removeButton.show().trigger("change"),r.remove(i.$removeButton);for(var e=h.map(i.attachment,function(e){if("image"===e.attributes.type)return e.id}),t=(i.$uploadId.val(e),i.$thumbImageHolder.find("ul").empty().trigger("change"),i.attachment.length),n=0;n<t;++n)void 0!==i.attachment[n].attributes.sizes.thumbnail?i.$thumbImageHolder.find("ul").append('<li><img src="'+i.attachment[n].attributes.sizes.thumbnail.url+'" alt="thumbnail" /></li>'):i.$thumbImageHolder.find("ul").append('<li><img src="'+i.attachment[n].attributes.sizes.full.url+'" alt="thumbnail" /></li>');i.$thumbImageHolder.show().trigger("change")})},singleSelect:function(e){e.mediaFrame.on("select",function(){e.attachment=e.mediaFrame.state().get("selection").first().toJSON(),e.attachment.hasOwnProperty("url")&&"image"===e.attachment.type&&(e.$removeButton.show(),r.remove(e.$removeButton),e.$uploadId.val(e.attachment.id),e.$thumbImageHolder.empty(),e.attachment.hasOwnProperty("sizes")&&e.attachment.sizes.thumbnail?e.$thumbImageHolder.append('<img class="qodef-single-image" src="'+e.attachment.sizes.thumbnail.url+'" alt="thumbnail" />'):e.$thumbImageHolder.append('<img class="qodef-single-image" src="'+e.attachment.url+'" alt="thumbnail" />'),e.$thumbImageHolder.show().trigger("change"))})},fileSelect:function(e){e.mediaFrame.on("select",function(){e.attachment=e.mediaFrame.state().get("selection").first().toJSON(),e.attachment.hasOwnProperty("url")&&e.$allowed_type.includes(e.attachment.type)&&(e.$removeButton.show(),r.remove(e.$removeButton),e.$uploadId.val(e.attachment.id),e.$thumbImageHolder.empty(),e.$thumbImageHolder.append('<img class="qodef-file-image" src="'+e.attachment.icon+'" alt="thumbnail" /><div class="qodef-file-name">'+e.attachment.filename+"</div>"),e.$thumbImageHolder.show().trigger("change"))})},remove:function(e){e.on("click",function(){e.siblings(".qodef-image-thumb").hide(),e.siblings(".qodef-image-thumb").find("img").attr("src",""),e.siblings(".qodef-image-thumb").find("li").remove(),e.siblings(".qodef-image-meta-fields").find('input[type="hidden"]').each(function(){h(this).val("")}),e.hide().trigger("change")})},reset:function(i){h(document).on("ajaxSuccess",function(e,t,n){-1!==n.data.indexOf("action=add-tag")&&(i.find(".qodef-image-thumb").hide(),i.find(".qodef-image-thumb").find("img").attr("src",""),i.find(".qodef-image-thumb").find("li").remove(),i.find(".qodef-image-meta-fields").find('input[type="hidden"]').each(function(){h(this).val("")}))})}},s={init:function(e){this.$holder=e.find(".qodef-color-field:not(.widefat)"),this.$holder.length&&this.$holder.each(function(){s.initField(h(this))})},reinit:function(e){e=h(e).find(".qodef-color-field:not(.widefat)");e.length&&s.initField(e)},initField:function(e){e.wpColorPicker({palettes:!1,mode:"hsl"})},checkFieldPosition:function(e){e=e.find(".qodef-color-field:not(.widefat)");e.length&&e.each(function(){var e=h(this).parents(".qodef-field-content"),t=h("#wpbody-content");t.length&&t.outerHeight()-e.offset().top<340&&e.addClass("qodef-color-picker-reverse")})}},l=(qodefFramework.qodefColorPicker=s,{init:function(e){this.$holder=e.find(".qodef-datepicker"),this.$holder.length&&this.$holder.each(function(){l.initField(h(this))})},reinit:function(e){e=h(e).find(".qodef-datepicker");e.length&&l.initField(e)},initField:function(e){var t=e.data("date-format");e.datepicker({dateFormat:t})}}),c={init:function(e){this.$holder=e.find("select.qodef-select2"),this.$holder.length&&this.$holder.each(function(){c.initField(h(this))})},reinit:function(e){e=h(e).find("select.qodef-select2");e.length&&c.initField(e)},initField:function(e){"function"==typeof e.select2&&e.select2({width:"100%",allowClear:!1,minimumResultsForSearch:11,dropdownCssClass:"qodef-select-v4"})}},p=(qodefFramework.select2=c,{init:function(e){this.$holder=e.find(".qodef-iconpicker-select:not(.qodef-select2):not(.qodef--icons-init)"),this.$holder.length&&this.$holder.each(function(){var e=h(this);"function"==typeof e.fontIconPicker&&(e.addClass("qodef--icons-init"),e.fontIconPicker())})},reinit:function(e,t){t=void 0!==t&&""!==t&&!1!==t?t:h(e).find(".qodef-iconpicker-select:not(.qodef-select2)");t.length&&!t.hasClass("qodef--icons-init")&&"function"==typeof t.fontIconPicker&&(t.addClass("qodef--icons-init"),t.fontIconPicker())}}),m={init:function(e){e?(m.initObserver(),m.gutenbergEditor()):m.classicEditor()},initObserver:function(){var i,e=h(".edit-post-sidebar");e.length&&(i=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver,h.fn.attrChange=function(t){var e,n;if(i)return e={attributes:!0,attributeFilter:["class"],subtree:!1},n=new i(function(e){e.forEach(function(e){t.call(e.target)})}),this.each(function(){n.observe(this,e)})},e.find(".edit-post-sidebar__panel-tabs ul li:first-child button").attrChange(function(){h(this).hasClass("is-active")&&m.gutenbergEditor()}))},classicEditor:function(){var e=h("#post-formats-select"),t=e.find('input[name="post_format"]'),e=e.find('input[name="post_format"]:checked').attr("id");t.each(function(){m.metaBoxVisibility(!1,h(this).attr("id"))}),m.metaBoxVisibility(!0,e),t.change(function(){m.classicEditor()})},gutenbergEditor:function(){var e,t=h(".edit-post-sidebar");t.length&&(e=(t=t.find(".editor-post-format")).find("select option:selected"),t.find("select option").each(function(){m.metaBoxVisibility(!1,"post_format_"+h(this).val())}),e.length&&m.metaBoxVisibility(!0,"post_format_"+e.val()),t.find("select").one("change",function(){m.gutenbergEditor()}))},metaBoxVisibility:function(e,t){""!==t&&void 0!==t&&(t=t.replace(/-/g,"_"),e?h(".qodef-section-name-qodef_"+t+"_section").fadeIn():h(".qodef-section-name-qodef_"+t+"_section").hide())}},u={init:function(e,t){this.$addressHolder=e.find(".qodef-address-field-holder"),this.$addressHolder.length&&this.$addressHolder.each(function(){u.initMap(h(this),t)})},initMap:function(e,t){var n=e.find(".qodef-reset-marker"),i=e.find("input"),o=e.find(".qodef-map-canvas"),d=e.data("country"),a=e.data("lat"),r=h('.qodef-address-elements [name="'+a+'"]'),a=e.data("lng"),s=h('.qodef-address-elements [name="'+a+'"]');t&&i.trigger("geocode"),"function"==typeof i.geocomplete&&void 0===t&&(i.geocomplete({map:o,details:".qodef-address-elements",detailsAttribute:"data-geo",types:["geocode","establishment"],country:d,markerOptions:{draggable:!0}}).bind("geocode:result",function(){n.show()}),i.on("geocode:dragged",function(e,t){r.val(t.lat()),s.val(t.lng()),n.show(),i.geocomplete("map").panTo(t),(new google.maps.Geocoder).geocode({latLng:t},function(e,t){t===google.maps.GeocoderStatus.OK&&"object"==typeof e[0]&&i.val(e[0].formatted_address)})}),i.on("focus",function(){var e=i.geocomplete("map");google.maps.event.trigger(e,"resize")}),n.on("click",function(e){e.preventDefault(),n.hide(),i.geocomplete("resetMarker").val(""),r.val(""),s.val("")}),h(window).on("load",function(){i.trigger("geocode")}))}},q=(qodefFramework.qodefAddressFields=u,{init:function(e){var n,i,o;this.searchField=e.find(".qodef-search-field"),this.adminContent=e.find(".qodef-admin-content"),this.tabHolder=e.find(".tab-content"),this.rowHolder=e.find(".qodef-row-wrapper"),this.sectionHolder=e.find(".qodef-section-wrapper"),this.repeaterHolder=e.find(".qodef-repeater-wrapper"),this.fieldHolder=e.find(".qodef-field-holder"),this.searchField.length&&(n=this.searchField.next(".qodef-search-loading"),this.searchField.on("keyup paste",function(){var t=h(this);t.attr("autocomplete","off"),n.removeClass("qodef-hidden"),clearTimeout(o),o=setTimeout(function(){var e=t.val();i=new RegExp(t.val(),"gi"),n.addClass("qodef-hidden"),e.length<3?q.resetSearchView():(q.resetSearchView(),q.adminContent.addClass("qodef-apply-search"),q.fieldHolder.each(function(){var e=h(this);-1!==e.find(".qodef-field-desc").text().search(i)?(e.parents(".tab-content").addClass("qodef-search-show"),e.parents(".qodef-section-wrapper").addClass("qodef-search-show"),e.parents(".qodef-row-wrapper").addClass("qodef-search-show"),e.parents(".qodef-repeater-wrapper").addClass("qodef-search-show")):e.addClass("qodef-search-hide")}))},500)}))},resetSearchView:function(){this.adminContent.removeClass("qodef-apply-search"),this.tabHolder.removeClass("qodef-search-show"),this.rowHolder.removeClass("qodef-search-show"),this.sectionHolder.removeClass("qodef-search-show"),this.repeaterHolder.removeClass("qodef-search-show"),this.fieldHolder.removeClass("qodef-search-hide")},resetSearchField:function(){this.searchField.val("")}}),g={disable:function(){window.addEventListener&&(window.addEventListener("wheel",g.preventDefaultValue,{passive:!1}),window.addEventListener("touchmove",g.preventDefaultValue,{passive:!1})),document.onkeydown=g.keyDown},enable:function(){window.removeEventListener&&(window.removeEventListener("wheel",g.preventDefaultValue,{passive:!1}),window.removeEventListener("touchmove",g.preventDefaultValue,{passive:!1})),window.onmousewheel=document.onmousewheel=document.onkeydown=null},preventDefaultValue:function(e){(e=e||window.event).preventDefault&&e.preventDefault(),e.returnValue=!1},keyDown:function(e){for(var t=[37,38,39,40],n=t.length;n--;)if(e.keyCode===t[n])return void g.preventDefaultValue(e)}},v={init:function(e,t){var n=e.find(".qodef-checkbox-group-holder"),i=t.find(".qodef-field").val();i&&!i.trim()||v.multipleSelectSetOrder(n,i),v.multipleSelectSaveNewOrder(v.multipleSelectGetNewOrder(e),t),n.sortable({opacity:.6,stop:function(){v.multipleSelectSaveNewOrder(v.multipleSelectGetNewOrder(e),t)}})},multipleSelectSaveNewOrder:function(e,t){t.find(".qodef-field").val(e)},multipleSelectSetOrder:function(e,n){var t=e.find(".qodef-inline:not(.qodef-hide)");t.sort(function(e,t){e=h(e).find(".qodef-field").val(),t=h(t).find(".qodef-field").val();return n.indexOf(e)-n.indexOf(t)}),e.empty(),t.each(function(){e.append(h(this))})},multipleSelectGetNewOrder:function(e){var e=e.find(".qodef-inline:not(.qodef-hide) .qodef-field"),t="";return e.length&&e.each(function(e){t+=(0===e?"":",")+h(this).val()}),t}},w=(qodefFramework.qodefDragAndDropCheckboxFields=v,{initColorPicker:function(e){e=void 0!==e?e.find(".qodef-widget-field--color"):h("#widgets-right .qodef-widget-field--color");e.length&&w.initPickerField(e,e.find(".qodef-color-field"))},initPickerField:function(e,t){t.length&&e.find(".wp-picker-container").length<=0&&t.wpColorPicker({change:_.throttle(function(){h(this).trigger("change")},3e3)})},initDependency:function(e){e=e.find(".widget-content .qodef-widget-field[data-option-name]");e.length&&qodefFramework.qodefDependency.reinitWidget(e)}}),b={init:function(){var e,t,n,i,o,d,a,r,s,f,l,c;this.mainForm=h("#qode_optimizer_framework_ajax_form"),this.insertRewritingRules=h('input[type="radio"][name="qodef_insert_rewriting_rules"]'),this.qo_nonce=this.mainForm.find("#qode_optimizer_framework_ajax_save_nonce").val(),this.options={},this.xhr=!1,this.insertRewritingRules&&(n=(t=(e=(c=this.insertRewritingRules.closest(".qodef-field-section")).find(".qodef-field-desc")).find(".qodef-action")).find(".qodef-action-inner"),i=t.find(".qodef-title"),o=t.find(".qodef-description"),d=t.find(".qodef-source"),a=t.find(".qodef-copy"),r=t.find(".qodef-btn-note"),s=c.find(".qodef-field-content").find(".qodef-yesno"),f=s.find(".qodef-spinner-loading"),l=n.find(".qodef-note"),0===t.length&&(e.append('<div class="qodef-action"><div class="qodef-action-inner"><a class="qodef-btn qodef-btn-solid qodef-popup-modal-opener" href="qodef-rwr-opener">Rewrite rules</a></div><div id="qodef-rwr-opener" class="qodef-popup-modal qodef-rewrite-rules"><div class="qodef-pm-inner"><a class="qodef-pm-close" href=""#"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="32" height="32" viewBox="0 0 32 32"><path d="M 10.050,23.95c 0.39,0.39, 1.024,0.39, 1.414,0L 17,18.414l 5.536,5.536c 0.39,0.39, 1.024,0.39, 1.414,0 c 0.39-0.39, 0.39-1.024,0-1.414L 18.414,17l 5.536-5.536c 0.39-0.39, 0.39-1.024,0-1.414c-0.39-0.39-1.024-0.39-1.414,0 L 17,15.586L 11.464,10.050c-0.39-0.39-1.024-0.39-1.414,0c-0.39,0.39-0.39,1.024,0,1.414L 15.586,17l-5.536,5.536 C 9.66,22.926, 9.66,23.56, 10.050,23.95z"></path></svg></a><div class="qodef-pm-content-container"><div class="qodef-title qodef-h1"></div><div class="qodef-description"></div><textarea class="qodef-source"></textarea><div class="qodef-btn-holder"><button class="qodef-btn qodef-btn-solid qodef-copy">Copy rules</button><div class="qodef-btn-note"></div></div></div></div></div></div>'),n=(t=e.find(".qodef-action")).find(".qodef-action-inner"),i=t.find(".qodef-title"),o=t.find(".qodef-description"),d=t.find(".qodef-source"),a=t.find(".qodef-copy"),r=t.find(".qodef-btn-note")),0===f.length&&(s.append('<span class="qodef-spinner-loading qodef-hidden"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M304 48c0 26.51-21.49 48-48 48s-48-21.49-48-48 21.49-48 48-48 48 21.49 48 48zm-48 368c-26.51 0-48 21.49-48 48s21.49 48 48 48 48-21.49 48-48-21.49-48-48-48zm208-208c-26.51 0-48 21.49-48 48s21.49 48 48 48 48-21.49 48-48-21.49-48-48-48zM96 256c0-26.51-21.49-48-48-48S0 229.49 0 256s21.49 48 48 48 48-21.49 48-48zm12.922 99.078c-26.51 0-48 21.49-48 48s21.49 48 48 48 48-21.49 48-48c0-26.509-21.491-48-48-48zm294.156 0c-26.51 0-48 21.49-48 48s21.49 48 48 48 48-21.49 48-48c0-26.509-21.49-48-48-48zM108.922 60.922c-26.51 0-48 21.49-48 48s21.49 48 48 48 48-21.49 48-48-21.491-48-48-48z"></path></svg></span>'),f=s.find(".qodef-spinner-loading")),0===l.length&&(n.append('<div class="qodef-note"></div>'),l=n.find(".qodef-note")),c={name:"qodef_insert_rewriting_rules",qo_nonce:b.qo_nonce},b.ajaxOptionsAddDescription(c,i,o,d).then(function(){a.on("click",function(e){e.preventDefault(),d.trigger("select"),document.execCommand("copy")&&r.html("copied!")})}),b.insertRewritingRules.on("change",function(){var e=h('input[type="radio"][name="qodef_insert_rewriting_rules"]:checked').val();s.addClass("qodef-disabled"),f.removeClass("qodef-hidden"),b.options={name:"qodef_insert_rewriting_rules",value:e,qo_nonce:b.qo_nonce},b.ajaxOptionsAction(b.options,l,s).then(function(){f.addClass("qodef-hidden")})}))},ajaxOptionsAddDescription:function(n,i,o,d){return h.ajax({type:"POST",url:ajaxurl,data:{action:"options_action_ajax_option_add_description",options:n},success:function(e){var t,e=h.parseJSON(e);"success"===e.status&&"qodef_insert_rewriting_rules"===n.name&&(i.html(e.data.title),Object.values(e.data.description).map(function(e){""!==e&&(t=e.replace(/[\u00A0-\u9999<>\&]/g,function(e){return"&#"+e.charCodeAt(0)+";"}),o.html(o.html()+t+"<br />"),d.html(d.html()+t+"\r\n"))}))}})},ajaxOptionsAction:function(o,d,a){return d.length&&d.removeClass("qodef-set").removeClass("qodef-unset"),h.ajax({type:"POST",url:ajaxurl,data:{action:"options_action_ajax_option_action",options:o},success:function(e){var t,n,i,e=h.parseJSON(e);"success"===e.status?"qodef_insert_rewriting_rules"===o.name&&(i="qodef-set",d.length)&&d.text(e.message).addClass(i):"fail"===e.status&&"qodef_insert_rewriting_rules"===o.name&&(t=h('input[type="radio"][name="qodef_insert_rewriting_rules"]:checked'),n=h('input[type="radio"][name="qodef_insert_rewriting_rules"]:not(:checked)'),t.prop("checked",!(i="qodef-unset")),n.prop("checked",!0),d.length)&&d.text(e.message).addClass(i),a.removeClass("qodef-disabled")}})}},k=(qodefFramework.qodefAjaxOptions=b,{init:function(){this.holders=h(".qodef-popup-modal"),this.holders.length&&this.holders.each(function(){k.initSingle(h(this))})},initSingle:function(e){var t,n;e.length&&(e=h(".qodef-popup-modal-opener[href="+(t=e).attr("id")+"]"),n=t.find(".qodef-pm-close"),e.on("click",function(e){e.preventDefault(),t.hasClass("qodef-pm-opened")?k.handleClassAndScroll(t,"remove"):k.handleClassAndScroll(t,"add")}),n.on("click",function(e){e.preventDefault(),k.handleClassAndScroll(t,"remove")}),h(document).keyup(function(e){27===e.keyCode&&k.handleClassAndScroll(t,"remove")}))},handleClassAndScroll:function(e,t){"remove"===t&&(e.removeClass("qodef-pm-opened"),qodefFramework.qodefScroll.enable()),"add"===t&&(e.addClass("qodef-pm-opened"),qodefFramework.qodefScroll.disable())}}),y=(qodefFramework.qodefPopupModal=k,{disable:function(){window.addEventListener&&window.addEventListener("wheel",y.preventDefaultValue,{passive:!1}),document.onkeydown=y.keyDown},enable:function(){window.removeEventListener&&window.removeEventListener("wheel",y.preventDefaultValue,{passive:!1}),window.onmousewheel=document.onmousewheel=document.onkeydown=null},preventDefaultValue:function(e){(e=e||window.event).preventDefault&&e.preventDefault(),e.returnValue=!1},keyDown:function(e){for(var t=[37,38,39,40],n=t.length;n--;)if(e.keyCode===t[n])return void y.preventDefaultValue(e)}});qodefFramework.qodefScroll=y}(jQuery);
Edit
Rename
Chmod
Delete
FILE
FOLDER
Name
Size
Permission
Action
common.js
65223 bytes
0644
common.min.js
33169 bytes
0644
N4ST4R_ID | Naxtarrr