diff --git a/assets/js/admin-general.js b/assets/js/admin-general.js index 0637b3b79..5549c59fb 100644 --- a/assets/js/admin-general.js +++ b/assets/js/admin-general.js @@ -1,4 +1,4 @@ -!function(t){var e={};function n(i){if(e[i])return e[i].exports;var o=e[i]={i:i,l:!1,exports:{}};return t[i].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=t,n.c=e,n.d=function(t,e,i){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:i})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(i,o,function(e){return t[e]}.bind(null,o));return i},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=18)}([function(t,e){t.exports=jQuery},function(t,e){function n(t,e){if(!t)throw new Error(e||"AssertionError")}n.notEqual=function(t,e,i){n(t!=e,i)},n.notOk=function(t,e){n(!t,e)},n.equal=function(t,e,i){n(t==e,i)},n.ok=n,t.exports=n},function(t,e,n){"use strict";var i=function(){function t(t){t&&(this.el=t,this.dialog=t.querySelector(".ac-modal__dialog"),this.initEvents())}return t.prototype.initEvents=function(){var t=this,e=this;document.addEventListener("keydown",(function(e){var n=e.key;t.isOpen()&&"Escape"===n&&t.close()}));var n=this.el.querySelectorAll('[data-dismiss="modal"], .ac-modal__dialog__close');n.length>0&&n.forEach((function(t){t.addEventListener("click",(function(t){t.preventDefault(),e.close()}))})),this.el.addEventListener("click",(function(t){t.target.classList.contains("ac-modal")&&e.close()}))},t.prototype.isOpen=function(){return this.el.classList.contains("-active")},t.prototype.close=function(){this.onClose(),this.el.classList.remove("-active")},t.prototype.open=function(){var t=this;setTimeout((function(){t.onOpen(),t.el.removeAttribute("style"),t.el.classList.add("-active")}))},t.prototype.destroy=function(){this.el.remove()},t.prototype.onClose=function(){},t.prototype.onOpen=function(){},t}();e.a=i},function(t,e,n){var i=n(4),o=n(5),s=n(1);function r(t){if(!(this instanceof r))return new r(t);this._name=t||"nanobus",this._starListeners=[],this._listeners={}}t.exports=r,r.prototype.emit=function(t){s.ok("string"==typeof t||"symbol"==typeof t,"nanobus.emit: eventName should be type string or symbol");for(var e=[],n=1,i=arguments.length;n0&&this._emit(this._listeners[t],e),this._starListeners.length>0&&this._emit(this._starListeners,t,e,r.uuid),r(),this},r.prototype.on=r.prototype.addListener=function(t,e){return s.ok("string"==typeof t||"symbol"==typeof t,"nanobus.on: eventName should be type string or symbol"),s.equal(typeof e,"function","nanobus.on: listener should be type function"),"*"===t?this._starListeners.push(e):(this._listeners[t]||(this._listeners[t]=[]),this._listeners[t].push(e)),this},r.prototype.prependListener=function(t,e){return s.ok("string"==typeof t||"symbol"==typeof t,"nanobus.prependListener: eventName should be type string or symbol"),s.equal(typeof e,"function","nanobus.prependListener: listener should be type function"),"*"===t?this._starListeners.unshift(e):(this._listeners[t]||(this._listeners[t]=[]),this._listeners[t].unshift(e)),this},r.prototype.once=function(t,e){s.ok("string"==typeof t||"symbol"==typeof t,"nanobus.once: eventName should be type string or symbol"),s.equal(typeof e,"function","nanobus.once: listener should be type function");var n=this;return this.on(t,(function i(){e.apply(n,arguments),n.removeListener(t,i)})),this},r.prototype.prependOnceListener=function(t,e){s.ok("string"==typeof t||"symbol"==typeof t,"nanobus.prependOnceListener: eventName should be type string or symbol"),s.equal(typeof e,"function","nanobus.prependOnceListener: listener should be type function");var n=this;return this.prependListener(t,(function i(){e.apply(n,arguments),n.removeListener(t,i)})),this},r.prototype.removeListener=function(t,e){return s.ok("string"==typeof t||"symbol"==typeof t,"nanobus.removeListener: eventName should be type string or symbol"),s.equal(typeof e,"function","nanobus.removeListener: listener should be type function"),"*"===t?(this._starListeners=this._starListeners.slice(),n(this._starListeners,e)):(void 0!==this._listeners[t]&&(this._listeners[t]=this._listeners[t].slice()),n(this._listeners[t],e));function n(t,e){if(t){var n=t.indexOf(e);return-1!==n?(i(t,n,1),!0):void 0}}},r.prototype.removeAllListeners=function(t){return t?"*"===t?this._starListeners=[]:this._listeners[t]=[]:(this._starListeners=[],this._listeners={}),this},r.prototype.listeners=function(t){var e="*"!==t?this._listeners[t]:this._starListeners,n=[];if(e)for(var i=e.length,o=0;o=o||0===n)){var s=o-(n=e+n>o?o-e:n);for(i=e;i0;)t.queue.shift()(e);t.scheduled=!1,t.queue.length&&t.schedule()}))}},s.prototype.setTimeout=function(t){setTimeout(t,0,{timeRemaining:function(){return 1}})},t.exports=function(){var t;return o?(window._nanoScheduler||(window._nanoScheduler=new s(!0)),t=window._nanoScheduler):t=new s,t}},function(t,e,n){"use strict";var i=function(){function t(){this.isEnabled=void 0!==jQuery.fn.qtip,this.init()}return t.prototype.init=function(){this.isEnabled?jQuery("[data-ac-tip]").qtip({content:{attr:"data-ac-tip"},position:{my:"top center",at:"bottom center"},style:{tip:!0,classes:"qtip-tipsy"}}):console.log("Tooltips not loaded!")},t}();e.a=i},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var i=n(2),o=function(){function t(){this.modals={},this.number=0,this.defaults={modal:i.a},this.initGlobalEvents()}return t.prototype.register=function(t,e){return void 0===e&&(e=""),e||(e="m"+this.number),this.modals[e]=t,this.number++,t},t.prototype.get=function(t){return this.modals.hasOwnProperty(t)?this.modals[t]:null},t.prototype.open=function(t){this.get(t)&&this.get(t).open()},t.prototype.close=function(t){this.get(t)&&this.get(t).close()},t.prototype.closeAll=function(){for(var t in this.modals)this.close(t)},t.prototype.initGlobalEvents=function(){var t=this;document.addEventListener("click",(function(e){var n=e.target;n.dataset.acModal&&(e.preventDefault(),t.open(n.dataset.acModal))}))},t}(),s=n(3),r=function(){return window.AdminColumns=window.AdminColumns||{},AdminColumns.events=s(),AdminColumns.Modals=new o,AdminColumns}},,function(t,e,n){var i,o; +!function(t){var e={};function n(i){if(e[i])return e[i].exports;var o=e[i]={i:i,l:!1,exports:{}};return t[i].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=t,n.c=e,n.d=function(t,e,i){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:i})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(i,o,function(e){return t[e]}.bind(null,o));return i},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=18)}([function(t,e){t.exports=jQuery},function(t,e){function n(t,e){if(!t)throw new Error(e||"AssertionError")}n.notEqual=function(t,e,i){n(t!=e,i)},n.notOk=function(t,e){n(!t,e)},n.equal=function(t,e,i){n(t==e,i)},n.ok=n,t.exports=n},function(t,e,n){"use strict";var i=function(){function t(t){t&&(this.el=t,this.dialog=t.querySelector(".ac-modal__dialog"),this.initEvents())}return t.prototype.initEvents=function(){var t=this,e=this;document.addEventListener("keydown",(function(e){var n=e.key;t.isOpen()&&"Escape"===n&&t.close()}));var n=this.el.querySelectorAll('[data-dismiss="modal"], .ac-modal__dialog__close');n.length>0&&n.forEach((function(t){t.addEventListener("click",(function(t){t.preventDefault(),e.close()}))})),this.el.addEventListener("click",(function(t){t.target.classList.contains("ac-modal")&&e.close()}))},t.prototype.isOpen=function(){return this.el.classList.contains("-active")},t.prototype.close=function(){this.onClose(),this.el.classList.remove("-active")},t.prototype.open=function(){var t=this;setTimeout((function(){t.onOpen(),t.el.removeAttribute("style"),t.el.classList.add("-active")}))},t.prototype.destroy=function(){this.el.remove()},t.prototype.onClose=function(){},t.prototype.onOpen=function(){},t}();e.a=i},function(t,e,n){var i=n(4),o=n(5),s=n(1);function r(t){if(!(this instanceof r))return new r(t);this._name=t||"nanobus",this._starListeners=[],this._listeners={}}t.exports=r,r.prototype.emit=function(t){s.ok("string"==typeof t||"symbol"==typeof t,"nanobus.emit: eventName should be type string or symbol");for(var e=[],n=1,i=arguments.length;n0&&this._emit(this._listeners[t],e),this._starListeners.length>0&&this._emit(this._starListeners,t,e,r.uuid),r(),this},r.prototype.on=r.prototype.addListener=function(t,e){return s.ok("string"==typeof t||"symbol"==typeof t,"nanobus.on: eventName should be type string or symbol"),s.equal(typeof e,"function","nanobus.on: listener should be type function"),"*"===t?this._starListeners.push(e):(this._listeners[t]||(this._listeners[t]=[]),this._listeners[t].push(e)),this},r.prototype.prependListener=function(t,e){return s.ok("string"==typeof t||"symbol"==typeof t,"nanobus.prependListener: eventName should be type string or symbol"),s.equal(typeof e,"function","nanobus.prependListener: listener should be type function"),"*"===t?this._starListeners.unshift(e):(this._listeners[t]||(this._listeners[t]=[]),this._listeners[t].unshift(e)),this},r.prototype.once=function(t,e){s.ok("string"==typeof t||"symbol"==typeof t,"nanobus.once: eventName should be type string or symbol"),s.equal(typeof e,"function","nanobus.once: listener should be type function");var n=this;return this.on(t,(function i(){e.apply(n,arguments),n.removeListener(t,i)})),this},r.prototype.prependOnceListener=function(t,e){s.ok("string"==typeof t||"symbol"==typeof t,"nanobus.prependOnceListener: eventName should be type string or symbol"),s.equal(typeof e,"function","nanobus.prependOnceListener: listener should be type function");var n=this;return this.prependListener(t,(function i(){e.apply(n,arguments),n.removeListener(t,i)})),this},r.prototype.removeListener=function(t,e){return s.ok("string"==typeof t||"symbol"==typeof t,"nanobus.removeListener: eventName should be type string or symbol"),s.equal(typeof e,"function","nanobus.removeListener: listener should be type function"),"*"===t?(this._starListeners=this._starListeners.slice(),n(this._starListeners,e)):(void 0!==this._listeners[t]&&(this._listeners[t]=this._listeners[t].slice()),n(this._listeners[t],e));function n(t,e){if(t){var n=t.indexOf(e);return-1!==n?(i(t,n,1),!0):void 0}}},r.prototype.removeAllListeners=function(t){return t?"*"===t?this._starListeners=[]:this._listeners[t]=[]:(this._starListeners=[],this._listeners={}),this},r.prototype.listeners=function(t){var e="*"!==t?this._listeners[t]:this._starListeners,n=[];if(e)for(var i=e.length,o=0;o=o||0===n)){var s=o-(n=e+n>o?o-e:n);for(i=e;i0;)t.queue.shift()(e);t.scheduled=!1,t.queue.length&&t.schedule()}))}},s.prototype.setTimeout=function(t){setTimeout(t,0,{timeRemaining:function(){return 1}})},t.exports=function(){var t;return o?(window._nanoScheduler||(window._nanoScheduler=new s(!0)),t=window._nanoScheduler):t=new s,t}},function(t,e,n){"use strict";var i=function(){function t(){this.isEnabled=void 0!==jQuery.fn.qtip,this.init()}return t.prototype.init=function(){this.isEnabled?jQuery("[data-ac-tip]").qtip({content:{attr:"data-ac-tip"},position:{my:"top center",at:"bottom center"},style:{tip:!0,classes:"qtip-tipsy"}}):console.log("Tooltips not loaded!")},t}();e.a=i},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var i=n(2),o=function(){function t(){this.modals={},this.number=0,this.defaults={modal:i.a},this.initGlobalEvents()}return t.prototype.register=function(t,e){return void 0===e&&(e=""),e||(e="m"+this.number),this.modals[e]=t,this.number++,t},t.prototype.get=function(t){return this.modals.hasOwnProperty(t)?this.modals[t]:null},t.prototype.open=function(t){this.get(t)&&this.get(t).open()},t.prototype.close=function(t){this.get(t)&&this.get(t).close()},t.prototype.closeAll=function(){for(var t in this.modals)this.close(t)},t.prototype.initGlobalEvents=function(){var t=this;document.addEventListener("click",(function(e){var n=e.target;n.dataset.acModal&&(e.preventDefault(),t.open(n.dataset.acModal))}))},t}(),s=n(3),r=function(){return window.AdminColumns||(window.AdminColumns=window.AdminColumns||{},AdminColumns.events=s(),AdminColumns.Modals=new o),window.AdminColumns}},,function(t,e,n){var i,o; /*! * JavaScript Cookie v2.2.1 * https://github.com/js-cookie/js-cookie diff --git a/assets/js/admin-page-columns.js b/assets/js/admin-page-columns.js index ea3076d52..86de180da 100644 --- a/assets/js/admin-page-columns.js +++ b/assets/js/admin-page-columns.js @@ -1 +1 @@ -!function(t){var e={};function n(i){if(e[i])return e[i].exports;var o=e[i]={i:i,l:!1,exports:{}};return t[i].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=t,n.c=e,n.d=function(t,e,i){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:i})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(i,o,function(e){return t[e]}.bind(null,o));return i},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=11)}([function(t,e){t.exports=jQuery},function(t,e){function n(t,e){if(!t)throw new Error(e||"AssertionError")}n.notEqual=function(t,e,i){n(t!=e,i)},n.notOk=function(t,e){n(!t,e)},n.equal=function(t,e,i){n(t==e,i)},n.ok=n,t.exports=n},function(t,e,n){"use strict";var i=function(){function t(t){t&&(this.el=t,this.dialog=t.querySelector(".ac-modal__dialog"),this.initEvents())}return t.prototype.initEvents=function(){var t=this,e=this;document.addEventListener("keydown",(function(e){var n=e.key;t.isOpen()&&"Escape"===n&&t.close()}));var n=this.el.querySelectorAll('[data-dismiss="modal"], .ac-modal__dialog__close');n.length>0&&n.forEach((function(t){t.addEventListener("click",(function(t){t.preventDefault(),e.close()}))})),this.el.addEventListener("click",(function(t){t.target.classList.contains("ac-modal")&&e.close()}))},t.prototype.isOpen=function(){return this.el.classList.contains("-active")},t.prototype.close=function(){this.onClose(),this.el.classList.remove("-active")},t.prototype.open=function(){var t=this;setTimeout((function(){t.onOpen(),t.el.removeAttribute("style"),t.el.classList.add("-active")}))},t.prototype.destroy=function(){this.el.remove()},t.prototype.onClose=function(){},t.prototype.onOpen=function(){},t}();e.a=i},function(t,e,n){var i=n(4),o=n(5),s=n(1);function r(t){if(!(this instanceof r))return new r(t);this._name=t||"nanobus",this._starListeners=[],this._listeners={}}t.exports=r,r.prototype.emit=function(t){s.ok("string"==typeof t||"symbol"==typeof t,"nanobus.emit: eventName should be type string or symbol");for(var e=[],n=1,i=arguments.length;n0&&this._emit(this._listeners[t],e),this._starListeners.length>0&&this._emit(this._starListeners,t,e,r.uuid),r(),this},r.prototype.on=r.prototype.addListener=function(t,e){return s.ok("string"==typeof t||"symbol"==typeof t,"nanobus.on: eventName should be type string or symbol"),s.equal(typeof e,"function","nanobus.on: listener should be type function"),"*"===t?this._starListeners.push(e):(this._listeners[t]||(this._listeners[t]=[]),this._listeners[t].push(e)),this},r.prototype.prependListener=function(t,e){return s.ok("string"==typeof t||"symbol"==typeof t,"nanobus.prependListener: eventName should be type string or symbol"),s.equal(typeof e,"function","nanobus.prependListener: listener should be type function"),"*"===t?this._starListeners.unshift(e):(this._listeners[t]||(this._listeners[t]=[]),this._listeners[t].unshift(e)),this},r.prototype.once=function(t,e){s.ok("string"==typeof t||"symbol"==typeof t,"nanobus.once: eventName should be type string or symbol"),s.equal(typeof e,"function","nanobus.once: listener should be type function");var n=this;return this.on(t,(function i(){e.apply(n,arguments),n.removeListener(t,i)})),this},r.prototype.prependOnceListener=function(t,e){s.ok("string"==typeof t||"symbol"==typeof t,"nanobus.prependOnceListener: eventName should be type string or symbol"),s.equal(typeof e,"function","nanobus.prependOnceListener: listener should be type function");var n=this;return this.prependListener(t,(function i(){e.apply(n,arguments),n.removeListener(t,i)})),this},r.prototype.removeListener=function(t,e){return s.ok("string"==typeof t||"symbol"==typeof t,"nanobus.removeListener: eventName should be type string or symbol"),s.equal(typeof e,"function","nanobus.removeListener: listener should be type function"),"*"===t?(this._starListeners=this._starListeners.slice(),n(this._starListeners,e)):(void 0!==this._listeners[t]&&(this._listeners[t]=this._listeners[t].slice()),n(this._listeners[t],e));function n(t,e){if(t){var n=t.indexOf(e);return-1!==n?(i(t,n,1),!0):void 0}}},r.prototype.removeAllListeners=function(t){return t?"*"===t?this._starListeners=[]:this._listeners[t]=[]:(this._starListeners=[],this._listeners={}),this},r.prototype.listeners=function(t){var e="*"!==t?this._listeners[t]:this._starListeners,n=[];if(e)for(var i=e.length,o=0;o=o||0===n)){var s=o-(n=e+n>o?o-e:n);for(i=e;i0;)t.queue.shift()(e);t.scheduled=!1,t.queue.length&&t.schedule()}))}},s.prototype.setTimeout=function(t){setTimeout(t,0,{timeRemaining:function(){return 1}})},t.exports=function(){var t;return o?(window._nanoScheduler||(window._nanoScheduler=new s(!0)),t=window._nanoScheduler):t=new s,t}},function(t,e,n){"use strict";var i=function(){function t(){this.isEnabled=void 0!==jQuery.fn.qtip,this.init()}return t.prototype.init=function(){this.isEnabled?jQuery("[data-ac-tip]").qtip({content:{attr:"data-ac-tip"},position:{my:"top center",at:"bottom center"},style:{tip:!0,classes:"qtip-tipsy"}}):console.log("Tooltips not loaded!")},t}();e.a=i},,function(t,e,n){"use strict";(function(t){var i=n(3),o=function(){function t(t,e){this.meta_type=t,this.post_type=e,this.loading=!1,this.data=!1,this.events=i()}return t.prototype.retrieveOptions=function(){return this.loading=!0,jQuery.ajax({url:ajaxurl,dataType:"json",method:"post",data:{action:"ac_custom_field_options",post_type:this.post_type,meta_type:this.meta_type,_ajax_nonce:AC._ajax_nonce}})},t.prototype.getOptions=function(){var t=this,e=jQuery.Deferred();return this.data?e.resolve(this.data):this.loading?this.events.on("loaded",(function(){e.resolve(t.data)})):this.retrieveOptions().done((function(n){n.success||e.reject(),t.data=n.data.results,t.events.emit("loaded"),e.resolve(t.data)})),e.promise()},t}(),s=function(){function e(t){this.column=t,this.setting=t.$el[0].querySelector(".ac-column-setting--custom_field"),this.setting&&this.setting.querySelector(".custom_field")&&this.bindEvents()}return e.prototype.bindEvents=function(){var e,n,i,s=this.setting.querySelector(".custom_field"),r=(e=s.dataset.type,n=s.dataset.post_type,i="custom_field_"+e+"_"+n,"undefined"==typeof AC_Requests&&(t.AC_Requests={}),AC_Requests.hasOwnProperty(i)||(AC_Requests[i]=new o(e,n)),AC_Requests[i]),a=this.column.el.querySelectorAll('[data-setting="edit"][data-indicator-toggle]').length>0;s.querySelectorAll("optgroup").forEach((function(t){t.remove()})),s.removeAttribute("data-select2-id"),this.setting.querySelectorAll(".select2").forEach((function(t){t.remove()})),r.getOptions().done((function(t){jQuery(s).ac_select2({theme:"acs2",width:"100%",tags:a,dropdownCssClass:"-customfields",data:t})}))},e}();e.a=function(t){t.settings.customfield=new s(t)}}).call(this,n(12))},,function(t,e,n){t.exports=n(16)},function(t,e){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(t){"object"==typeof window&&(n=window)}t.exports=n},function(t,e){!function(){if("function"==typeof window.CustomEvent)return!1;function t(t,e){e=e||{bubbles:!1,cancelable:!1,detail:void 0};let n=document.createEvent("CustomEvent");return n.initCustomEvent(t,e.bubbles,e.cancelable,e.detail),n}t.prototype=window.Event.prototype,window.CustomEvent=t}()},function(t,e){window.NodeList&&!NodeList.prototype.forEach&&(NodeList.prototype.forEach=Array.prototype.forEach)},,function(t,e,n){"use strict";n.r(e);var i=n(3),o=function(){function t(t){this.list_screens=t,this.processed=[],this.errors=[],this.success=[],this.events=i()}return t.prototype.doAjaxCall=function(t){return jQuery.ajax({url:t.screen_link,method:"get"})},t.prototype.run=function(){var t=this;Object.keys(this.list_screens).forEach((function(e){t.processListScreen(t.list_screens[e])}))},t.prototype.onFinish=function(){this.success.length===Object.keys(this.list_screens).length&&this.events.emit("success"),this.errors.length>0&&this.events.emit("error")},t.prototype.checkFinish=function(){this.processed.length===Object.keys(this.list_screens).length&&this.onFinish()},t.prototype.processListScreen=function(t){var e=this;return this.doAjaxCall(t).done((function(n){"ac_success"===n?e.success.push(t):e.errors.push(t)})).fail((function(){e.errors.push(t)})).always((function(){e.processed.push(t),e.checkFinish()}))},t}(),s=function(){function t(t){this.list_screens=t,this.run()}return t.prototype.run=function(){var t;if(Object.keys(this.list_screens).length>0)if(this.list_screens.hasOwnProperty(AC.list_screen)){var e=new o(((t={})[AC.list_screen]=this.list_screens[AC.list_screen],t));e.run(),e.events.on("error",(function(){document.querySelectorAll(".ac-loading-msg-wrapper").forEach((function(t){return t.remove()})),document.querySelectorAll(".menu").forEach((function(t){return t.classList.remove("hidden")}))})),e.events.on("success",(function(){window.location=location.href+"&t="+Date.now()}))}else{new o(this.list_screens).run()}},t}(),r="closed",a="open",c=function(){function t(t){this.$el=t,this.el=t[0],this.settings=[],this.state=r,this._type=this.$el.data("type")}return Object.defineProperty(t.prototype,"name",{get:function(){return this.$el.data("column-name")},set:function(t){this.$el.data("column-name",t)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"type",{get:function(){return this._type},set:function(t){this.$el.data("type",t)},enumerable:!1,configurable:!0}),t.prototype.isOriginal=function(){return 1===this.$el.data("original")},t.prototype.isDisabled=function(){return this.$el.hasClass("disabled")},t.prototype.disable=function(){return this.$el.addClass("disabled"),this},t.prototype.enable=function(){return this.$el.removeClass("disabled"),this},t.prototype.initNewInstance=function(){var t="_new_column_"+AC.Column.getNewIncementalName(),e=this.name;return this.$el.find("input, select, label").each((function(n,i){var o=jQuery(i);o.attr("name")&&o.attr("name",o.attr("name").replace("columns["+e+"]","columns["+t+"]")),o.attr("id")&&o.attr("id",o.attr("id").replace("-"+e+"-","-"+t+"-"))})),this.name=t,AC.incremental_column_name++,this},t.prototype.bindEvents=function(){var t=this;return t.$el.data("column",t),Object.keys(AC.Column.events).forEach((function(e){t.isBound(e)||(AC.Column.events[e](t),t.bind(e))})),this.bindSettings(),jQuery(document).trigger("AC_Column_InitSettings",[t]),this},t.prototype.bindSettings=function(){var t=this;Object.keys(AC.Column.settings).forEach((function(e){t.isBound(e)||(AC.Column.settings[e](t),t.bind(e))}))},t.prototype.isBound=function(t){return this.$el.data(t)},t.prototype.bind=function(t){this.$el.data(t,!0)},t.prototype.destroy=function(){this.$el.remove()},t.prototype.remove=function(t){void 0===t&&(t=350);var e=this;this.$el.addClass("deleting").animate({opacity:0,height:0},t,(function(){e.destroy()}))},t.prototype.getState=function(){return this.state},t.prototype.toggle=function(t){void 0===t&&(t=150),this.getState()===a?this.close(t):this.open(t)},t.prototype.close=function(t){void 0===t&&(t=0),this.$el.removeClass("opened").find(".ac-column-body").slideUp(t),this.state=r},t.prototype.open=function(t){void 0===t&&(t=0),this.$el.addClass("opened").find(".ac-column-body").slideDown(t),this.state=a},t.prototype.showMessage=function(t){this.$el.find(".ac-column-setting--type .msg").html(t).show()},t.prototype.switchToType=function(t){var e=this;return jQuery.ajax({url:ajaxurl,method:"post",dataType:"json",data:{action:"ac-columns",id:"select",type:t,data:AC.Form.serialize(),current_original_columns:AC.Form.originalColumns(),original_columns:AC.original_columns,_ajax_nonce:AC._ajax_nonce},success:function(n){if(!0===n.success){var i=jQuery(n.data);e.$el.replaceWith(i),e.$el=i,e.el=i[0],e._type=t,e.initNewInstance(),e.bindEvents(),e.open(),jQuery(document).trigger("AC_Column_Change",[e])}else e.showMessage(n.data.error)}})},t.prototype.refresh=function(){var t=this,e=this.$el.find(":input").serializeArray(),n={action:"ac-columns",id:"refresh",_ajax_nonce:AC._ajax_nonce,data:AC.Form.serialize(),column_name:this.name,original_columns:AC.original_columns};return jQuery.each(n,(function(t,n){e.push({name:t,value:n})})),jQuery.ajax({type:"post",url:ajaxurl,data:e,success:function(e){if(!0===e.success){var n=jQuery(e.data);t.$el.replaceWith(n),t.$el=n,t.el=n[0],t.bindEvents(),t.getState()===a&&t.open(),jQuery(document).trigger("AC_Column_Refresh",[t])}}})},t.prototype.create=function(){return this.initNewInstance(),this.bindEvents(),jQuery(document).trigger("AC_Column_Created",[this]),this},t.prototype.clone=function(){var e=this.$el.clone();e.data("column-name",this.$el.data("column-name"));var n=new t(e);return n.initNewInstance(),n.bindEvents(),n},t}(),u=function(){function t(t){this.form=t,this.$form=jQuery(t),this.$column_container=this.$form.find(".ac-columns"),this.$container=jQuery("#cpac .ac-admin"),this.columns={},this._validators=[],jQuery(document).trigger("AC_Form_Loaded"),this.init()}return t.prototype.init=function(){this.initColumns(),this.bindFormEvents(),this.bindOrdering(),this.$form.hasClass("-disabled")&&this.disableFields(),jQuery(document).trigger("AC_Form_Ready",this)},t.prototype.bindOrdering=function(){this.$form.hasClass("ui-sortable")?this.$form.sortable("refresh"):this.$form.sortable({items:".ac-column",handle:".column_sort"})},t.prototype.originalColumns=function(){var t=this,e=[];return Object.keys(t.columns).forEach((function(n){var i=t.columns[n];i.isOriginal()&&e.push(i.type)})),e},t.prototype.validateForm=function(){var t=this,e=!0;return this._validators.forEach((function(n){e=n.call(t,t)})),e},t.prototype.addValidator=function(t){this._validators.push(t)},t.prototype.bindFormEvents=function(){var t=this,e=jQuery(".sidebox a.submit, .column-footer a.submit");e.on("click",(function(){t.validateForm()&&(e.attr("disabled","disabled"),t.$container.addClass("saving"),t.submitForm().always((function(){e.removeAttr("disabled","disabled"),t.$container.removeClass("saving")})))})),t.$container.find(".add_column").on("click",(function(){t.addColumn()}));var n=jQuery("#cpac .ac-boxes");n.hasClass("disabled")&&n.find(".ac-column").each((function(t,e){jQuery(e).data("column").disable(),jQuery(e).find("input, select").prop("disabled",!0)})),jQuery("a[data-clear-columns]").on("click",(function(){t.resetColumns()}))},t.prototype.initColumns=function(){var t=this;t.columns={},this.$form.find(".ac-column").each((function(){var e=jQuery(this),n=new c(e);n.bindEvents(),e.data("column",n),t.columns[n.name]=n}))},t.prototype.reindexColumns=function(){var t=this;t.columns={},this.$form.find(".ac-column").each((function(){var e=jQuery(this).data("column");t.columns[e.name]=e}))},t.prototype.resetColumns=function(){var t=this;Object.keys(this.columns).forEach((function(e){t.columns[e].destroy()}))},t.prototype.serialize=function(){return this.$form.serialize()},t.prototype.disableFields=function(){var t=document.querySelector(this.form);if(t)for(var e=t.elements,n=0;n