laipower/wp-content/plugins/easy-digital-downloads/assets/js/edd-admin.js

1 line
14 KiB
JavaScript
Raw Normal View History

!function(e){var t={};function n(o){if(t[o])return t[o].exports;var i=t[o]={i:o,l:!1,exports:{}};return e[o].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(o,i,function(t){return e[t]}.bind(null,i));return o},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=213)}({1:function(e,t){e.exports=jQuery},11:function(e,t,n){var o=n(3).default;e.exports=function(e,t){if("object"!==o(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!==o(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)},e.exports.__esModule=!0,e.exports.default=e.exports},14:function(e,t,n){"use strict";(function(e,o){n.d(t,"a",(function(){return i}));var i=function(t){t.tooltip({content:function(){return e(this).prop("title")},tooltipClass:"edd-ui-tooltip",position:{my:"center top",at:"center bottom+10",collision:"flipfit"},hide:{duration:200},show:{duration:200}})};o(document).ready((function(e){i(e(".edd-help-tip"))}))}).call(this,n(1),n(1))},2:function(e,t,n){var o=n(7);e.exports=function(e,t,n){return(t=o(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},e.exports.__esModule=!0,e.exports.default=e.exports},213:function(e,t,n){"use strict";n.r(t),n(214),n(215),n(216),n(14),n(217),n(218),n(219),n(220),n(221),n(222),n(223),n(224),n(225)},214:function(e,t,n){(function(e){e(document).ready((function(e){var t=e("input.edd_datepicker");t.length>0&&t.attr("autocomplete","off").datepicker({dateFormat:edd_vars.date_picker_format,beforeShow:function(){e("#ui-datepicker-div").removeClass("ui-datepicker").addClass("edd-datepicker")}})}))}).call(this,n(1))},215:function(e,t,n){(function(e){e(document).ready((function(e){e(".edd-dialog").dialog({autoOpen:!1,modal:!0,draggable:!1,closeOnEscape:!0})}))}).call(this,n(1))},216:function(e,t,n){"use strict";(function(e){var t=n(6);e(document).ready((function(e){e(".edd-select-chosen").each((function(){var n=e(this);n.chosen(Object(t.a)(n))})),e(".edd-select-chosen .chosen-search input").each((function(){if(!e(this).attr("placeholder")){var t=e(this).parent().parent().parent().prev("select.edd-select-chosen").data("search-placeholder");t&&e(this).attr("placeholder",t)}})),e(".chosen-choices").on("click",(function(){var t=e(this).parent().prev().data("search-placeholder");void 0===t&&(t=edd_vars.type_to_search),e(this).children("li").children("input").attr("placeholder",t)})),e("#post").on("click",".edd-thickbox",(function(){e(".edd-select-chosen","#choose-download").css("width","100%")})),e(document.body).on("keyup",".edd-select-chosen .chosen-search input, .edd-select-chosen .search-field input",_.debounce((function(t){var n=e(this),o=n.val(),i=n.closest(".edd-select-chosen"),a=i.prev(),s=a.data("search-type"),c=i.hasClass("no-bundles"),r=i.hasClass("variations"),d=i.hasClass("variations-only"),l=t.which,u="edd_download_search";i.attr("id").replace("_chosen",""),void 0!==s&&"no_ajax"!==s&&(u="edd_"+s+"_search",o.length<=3&&"edd_download_search"===u||16===l||13===l||91===l||17===l||37===l||38===l||39===l||40===l?i.children(".spinner").remove():(i.children(".spinner").length||i.append('<span class="spinner is-active"></span>'),e.ajax({type:"GET",dataType:"json",url:ajaxurl,data:{s:o,action:u,no_bundles:c,variations:r,variations_only:d},beforeSend:function(){a.closest("ul.chosen-results").empty()},success:function(t){e("option: