wp_back/wp-content/plugins/advanced-custom-fields/assets/build/js/acf-input.min.js

1 line
101 KiB
JavaScript
Raw Permalink Normal View History

2024-05-20 15:37:46 +03:00
!function(){var t={7787:function(){!function(t,e){acf.newCompatibility=function(t,e){return(e=e||{}).__proto__=t.__proto__,t.__proto__=e,t.compatibility=e,e},acf.getCompatibility=function(t){return t.compatibility||null};var i=acf.newCompatibility(acf,{l10n:{},o:{},fields:{},update:acf.set,add_action:acf.addAction,remove_action:acf.removeAction,do_action:acf.doAction,add_filter:acf.addFilter,remove_filter:acf.removeFilter,apply_filters:acf.applyFilters,parse_args:acf.parseArgs,disable_el:acf.disable,disable_form:acf.disable,enable_el:acf.enable,enable_form:acf.enable,update_user_setting:acf.updateUserSetting,prepare_for_ajax:acf.prepareForAjax,is_ajax_success:acf.isAjaxSuccess,remove_el:acf.remove,remove_tr:acf.remove,str_replace:acf.strReplace,render_select:acf.renderSelect,get_uniqid:acf.uniqid,serialize_form:acf.serialize,esc_html:acf.strEscape,str_sanitize:acf.strSanitize});i._e=function(t,e){t=t||"";var i=(e=e||"")?t+"."+e:t,a={"image.select":"Select Image","image.edit":"Edit Image","image.update":"Update Image"};if(a[i])return acf.__(a[i]);var n=this.l10n[t]||"";return e&&(n=n[e]||""),n},i.get_selector=function(e){var i=".acf-field";if(!e)return i;if(t.isPlainObject(e)){if(t.isEmptyObject(e))return i;for(var a in e){e=e[a];break}}return i+="-"+e,i=acf.strReplace("_","-",i),acf.strReplace("field-field-","field-",i)},i.get_fields=function(t,e,i){var a={is:t||"",parent:e||!1,suppressFilters:i||!1};return a.is&&(a.is=this.get_selector(a.is)),acf.findFields(a)},i.get_field=function(t,e){var i=this.get_fields.apply(this,arguments);return!!i.length&&i.first()},i.get_closest_field=function(t,e){return t.closest(this.get_selector(e))},i.get_field_wrap=function(t){return t.closest(this.get_selector())},i.get_field_key=function(t){return t.data("key")},i.get_field_type=function(t){return t.data("type")},i.get_data=function(t,e){return acf.parseArgs(t.data(),e)},i.maybe_get=function(t,e,i){void 0===i&&(i=null),keys=String(e).split(".");for(var a=0;a<keys.length;a++){if(!t.hasOwnProperty(keys[a]))return i;t=t[keys[a]]}return t};var a=function(t){return t instanceof acf.Field?t.$el:t},n=function(e){return function(){if(arguments.length)var i=function(t){return acf.arrayArgs(t).map(a)}(arguments);else i=[t(document)];return e.apply(this,i)}};i.add_action=function(t,e,a,s){var o=t.split(" "),r=o.length;if(r>1){for(var c=0;c<r;c++)t=o[c],i.add_action.apply(this,arguments);return this}return e=n(e),acf.addAction.apply(this,arguments)},i.add_filter=function(t,e,i,a){return e=n(e),acf.addFilter.apply(this,arguments)},i.model={actions:{},filters:{},events:{},extend:function(e){var i=t.extend({},this,e);return t.each(i.actions,(function(t,e){i._add_action(t,e)})),t.each(i.filters,(function(t,e){i._add_filter(t,e)})),t.each(i.events,(function(t,e){i._add_event(t,e)})),i},_add_action:function(t,e){var i=t.split(" "),a=(t=i[0]||"",i[1]||10);acf.add_action(t,this[e],a,this)},_add_filter:function(t,e){var i=t.split(" "),a=(t=i[0]||"",i[1]||10);acf.add_filter(t,this[e],a,this)},_add_event:function(e,i){var a=this,n=e.indexOf(" "),s=n>0?e.substr(0,n):e,o=n>0?e.substr(n+1):"",r=function(e){e.$el=t(this),acf.field_group&&(e.$field=e.$el.closest(".acf-field-object")),"function"==typeof a.event&&(e=a.event(e)),a[i].apply(a,arguments)};o?t(document).on(s,o,r):t(document).on(s,r)},get:function(t,e){return e=e||null,void 0!==this[t]&&(e=this[t]),e},set:function(t,e){return this[t]=e,"function"==typeof this["_set_"+t]&&this["_set_"+t].apply(this),this}},i.field=acf.model.extend({type:"",o:{},$field:null,_add_action:function(t,e){var i=this;t=t+"_field/type="+i.type,acf.add_action(t,(function(t){i.set("$field",t),i[e].apply(i,arguments)}))},_add_filter:function(t,e){var i=this;t=t+"_field/type="+i.type,acf.add_filter(t,(function(t){i.set("$field",t),i[e].apply(i,arguments)}))},_add_event:function(e,i){var a=this,n=e.substr(0,e.indexOf(" ")),s=e.substr(e.indexOf(" ")+1),o=acf.get_selector(a.type);t(document).on(n,o+" "+s,(function(e){var n=t(this),s=acf.get_closest_field(n,a.type);s.length&&(s.is(a.$field)||a.set("$field",s),e.$el=n,e.$field=s,a[i].app