Sindbad~EG File Manager

Current Path : /proc/142261/cwd/plugins/redux-framework/redux-core/inc/fields/typography/
Upload File :
Current File : //proc/142261/cwd/plugins/redux-framework/redux-core/inc/fields/typography/redux-typography.min.js

!function(D){"use strict";let W=[],M=!1;redux.field_objects=redux.field_objects||{},redux.field_objects.typography=redux.field_objects.typography||{},redux.field_objects.typography.init=function(e){e=D.redux.getSelector(e,"typography"),D(e).each(function(){var e=D(this);let t=e;(t=e.hasClass("redux-field-container")?t:e.parents(".redux-field-container:first")).is(":hidden")||e.each(function(){D(this).find(".redux-typography-container").each(function(){var e,t=D(this);let a=t,r,s,o=D(this).find(".redux-typography-family");var i=o.data("value"),p=D(this).find(".redux-typography-family").parents(".redux-container-typography:first").data("id"),d=D("#"+p+" .redux-typography-google").val(),n=[],y=[],l=D("#"+p+" .redux-typography-font-family").data("user-fonts");if(!(a=t.hasClass("redux-field-container")?a:t.parents(".redux-field-container:first")).is(":hidden")&&a.hasClass("redux-field-init")){if(a.removeClass("redux-field-init"),void 0===i?o=D(this):""!==i&&D(o).val(i),l=l?1:0,d=d?1:0,void 0!==redux.customfonts&&n.push(redux.customfonts),void 0!==redux.typekitfonts&&n.push(redux.typekitfonts),void 0!==redux.stdfonts&&0==l&&n.push(redux.stdfonts),1==l){for(r in redux.optName.typography[p])if(redux.optName.typography[p].hasOwnProperty(r))for(s in e=redux.optName.typography[p].std_font)e.hasOwnProperty(s)&&y.push({id:s,text:s,"data-google":"false"});n.push({text:"Standard Fonts",children:y})}(1==d||!0===d&&void 0!==redux.googlefonts)&&n.push(redux.googlefonts),i=n,l=D(this).find(".redux-typography-family").data("value"),D(this).find(".redux-typography-family").addClass("ignore-change"),D(this).find(".redux-typography-family").select2({data:i}),D(this).find(".redux-typography-family").val(l).trigger("change"),D(this).find(".redux-typography-family").removeClass("ignore-change"),t.find(".redux-typography-family").hasClass("redux-typography-family")||t.find(".redux-typography-style").select2(),D(this).find(".redux-typography-subsets").select2(),D(this).find(".redux-typography-align").select2(),D(this).find(".redux-typography-family-backup").select2(),D(this).find(".redux-typography-transform").select2(),D(this).find(".redux-typography-font-variant").select2(),D(this).find(".redux-typography-decoration").select2(),D(this).find(".redux-insights-data-we-collect-typography").on("click",function(e){e.preventDefault(),D(this).parent().find(".description").toggle()}),redux.field_objects.typography.select(o,!0,!1,null,!0),D(this).find(".redux-typography-family, .redux-typography-family-backup, .redux-typography-style, .redux-typography-subsets, .redux-typography-align").on("change",function(e){var t;let a;var r=D(this).attr("id"),r=D("#"+r);D(this).hasClass("redux-typography-family")?r.val()&&(t=D(this).select2("data"),a=t?t[0].text:null,r.data("value",a),W=t[0],M=!0,redux.field_objects.typography.select(r,!0,!1,a,!0)):(e=r.val(),r.data("value",e),(D(this).hasClass("redux-typography-align")||D(this).hasClass("redux-typography-subsets")||D(this).hasClass("redux-typography-family-backup")||D(this).hasClass("redux-typography-transform")||D(this).hasClass("redux-typography-font-variant")||D(this).hasClass("redux-typography-decoration"))&&(r.find('option[selected="selected"]').attr("selected",!1),r.find('option[value="'+e+'"]').attr("selected","selected")),D(this).hasClass("redux-typography-subsets")&&r.siblings(".typography-subsets").val(e),redux.field_objects.typography.select(D(this),!0,!1,null,!1))}),D(this).find(".redux-typography-size, .redux-typography-height, .redux-typography-word, .redux-typography-letter, .redux-typography-margin-top, .redux-typography-margin-bottom").on("keyup",function(){redux.field_objects.typography.select(D(this).parents(".redux-container-typography:first"))}),D(this).find(".redux-typography-color, .redux-typography-shadow-color").wpColorPicker({change:function(e,t){D(this).val(t.color.toString()),redux.field_objects.typography.select(D(this).parents(".redux-container-typography:first"))}}),D(this).find(".redux-typography-size").numeric({allowMinus:!1}),D(this).find(".redux-typography-height, .redux-typography-word, .redux-typography-letter").numeric({allowMinus:!0}),D(this).find(".redux-typography").on("select2:unselecting",function(){var e,t;const a=D(this).data("select2").options;a.set("disabled",!0),setTimeout(function(){a.set("disabled",!1)},1),e=D(this).attr("id"),(t=D("#"+e)).data("value",""),D(this).hasClass("redux-typography-family")?(D(this).find(".redux-typography-family").addClass("ignore-change"),D(this).val(null).trigger("change"),D(this).find(".redux-typography-family").removeClass("ignore-change"),redux.field_objects.typography.select(t,!0,!1,null,!0)):((D(this).hasClass("redux-typography-align")||D(this).hasClass("redux-typography-subsets")||D(this).hasClass("redux-typography-family-backup")||D(this).hasClass("redux-typography-transform")||D(this).hasClass("redux-typography-font-variant")||D(this).hasClass("redux-typography-decoration"))&&D("#"+e+' option[selected="selected"]').removeAttr("selected"),D(this).hasClass("redux-typography-subsets")&&t.siblings(".typography-subsets").val(""),D(this).hasClass("redux-typography-family-backup")&&(D(this).find(".redux-typography-family-backup").addClass("ignore-change"),t.val(null).trigger("change"),D(this).find(".redux-typography-family-backup").removeClass("ignore-change")),redux.field_objects.typography.select(D(this),!0,!1,null,!1))}),redux.field_objects.typography.updates(D(this)),window.onbeforeunload=null,a.removeClass("redux-field-init"),redux.field_objects.typography.sliderInit(t)}})})})},redux.field_objects.typography.sliderInit=function(d){d.find(".redux-typography-slider").each(function(){const e=D(this).data("id");var t=D(this).data("min"),a=D(this).data("max"),r=D(this).data("step"),s=D(this).data("default");const o=D(this).data("label");var i=Boolean(D(this).data("rtl")),t=[t,a];const p=D(this).reduxNoUiSlider({range:t,start:s,handles:1,step:r,connect:"lower",behaviour:"tap-drag",rtl:i,serialization:{resolution:1},slide:function(){D(this).next("#redux-slider-value-"+e).attr("value",p.val()),D(this).prev("label").html(o+":  <strong>"+p.val()+"px</strong>"),redux.field_objects.typography.select(d)}})})},redux.field_objects.typography.updates=function(s){s.find(".update-google-fonts").on("click",function(e){const a=D(this).data("action"),r=D(this).parent().parent();var t=r.attr("data-nonce");return r.find("p").text(redux_typography_ajax.update_google_fonts.updating),r.find("p").attr("aria-label",redux_typography_ajax.update_google_fonts.updating),r.removeClass("updating-message updated-message notice-success notice-warning notice-error").addClass("update-message notice-warning updating-message"),D.ajax({type:"post",dataType:"json",url:redux_typography_ajax.ajaxurl,data:{action:"redux_update_google_fonts",nonce:t,data:a},error:function(e){let t;console.log(e),r.removeClass("notice-warning updating-message updated-message notice-success").addClass("notice-error"),t=(t=e.error)&&': "'+t+'"',r.find("p").html(redux_typography_ajax.update_google_fonts.error.replace("%s",a).replace("|msg",t)),r.find("p").attr("aria-label",redux_typography_ajax.update_google_fonts.error),redux.field_objects.typography.updates(s)},success:function(e){let t;console.log(e),"success"===e.status?(r.find("p").html(redux_typography_ajax.update_google_fonts.success),r.find("p").attr("aria-label",redux_typography_ajax.update_google_fonts.success),r.removeClass("updating-message notice-warning").addClass("updated-message notice-success"),D(".redux-update-google-fonts").not(".notice-success").remove()):(r.removeClass("notice-warning updating-message updated-message notice-success").addClass("notice-error"),t=(t=e.error)&&': "'+t+'"',r.find("p").html(redux_typography_ajax.update_google_fonts.error.replace("%s",a).replace("|msg",t)),r.find("p").attr("aria-label",redux_typography_ajax.update_google_fonts.error),redux.field_objects.typography.updates(s))}}),e.preventDefault(),!1})},redux.field_objects.typography.size=function(e){let t=0,a;for(a in e)e.hasOwnProperty(a)&&(t+=1);return t},redux.field_objects.typography.makeBool=function(e){return"false"!==e&&"0"!==e&&!1!==e&&0!==e&&("true"===e||"1"===e||!0===e||1===e||void 0)},redux.field_objects.typography.contrastColour=function(e){var t,a;let r="#444444";return""!==e&&(e=e.replace("#",""),t=parseInt(e.substring(0,2),16),a=parseInt(e.substring(2,2),16),e=parseInt(e.substring(4,2),16),r=128<=(299*t+587*a+114*e)/1e3?"#444444":"#ffffff"),r},redux.field_objects.typography.hexToInt=function(e){return 0===e.indexOf("#")&&(e=e.slice(1)),parseInt(e,16)},redux.field_objects.typography.select=function(e,t,a,r,s){let o,i,p,d;var n,y,l,h,g,u,f,c,x,v;let m,b,_,w,C,j,k,z,I,O,S,T,B=!1,N="",F='<option value=""></option>',P="";void 0===(o=D(e).parents(".redux-container-typography:first").data("id"))&&(o=D(e).data("id")),i=D("#"+o),p=(p=D("#"+o+"-family").val())||null,r&&(p=r),r=i.find("select.redux-typography-family-backup").val(),n=i.find(".redux-typography-size").val(),m=i.find(".redux-typography-height").val(),b=i.find(".redux-typography-word").val(),_=i.find(".redux-typography-letter").val(),y=i.find("select.redux-typography-align").val(),l=i.find("select.redux-typography-transform").val(),h=i.find("select.redux-typography-font-variant").val(),g=i.find("select.redux-typography-decoration").val(),w=i.find("select.redux-typography-style").val(),C=i.find("select.redux-typography-subsets").val(),u=i.find(".redux-typography-color").val(),c=i.find(".redux-typography-margin-top").val(),x=i.find(".redux-typography-margin-bottom").val(),v=i.find(".typography-style"),f=i.data("units"),void 0===b&&(b="0"),void 0===_&&(_="0"),0<v.length&&(T=JSON.parse(decodeURIComponent(v.data("weights")))),!0===M?(d=redux.field_objects.typography.makeBool(W["data-google"]),i.find(".redux-typography-google-font").val(d)):d=redux.field_objects.typography.makeBool(i.find(".redux-typography-google-font").val()),s&&(i.hasClass("typography-initialized")||(w=i.find("select.redux-typography-style").data("value"),C=i.find("select.redux-typography-subsets").data("value"),""!==w&&(w=String(w)),C,C=String(C)),void 0===redux.fonts.google&&(d=!1),N=!0===d&&p in redux.fonts.google?redux.fonts.google[p]:void 0!==redux.fonts.typekit&&p in redux.fonts.typekit?(B=!0,redux.fonts.typekit[p]):T,D(e).hasClass("redux-typography-subsets")&&i.find("input.typography-subsets").val(C),D(e).hasClass("redux-typography-family")?(!0===d?(D.each(N.variants,function(e,t){t.id===w||1===redux.field_objects.typography.size(N.variants)?(P=' selected="selected"',w=t.id):P="",F+='<option value="'+t.id+'"'+P+">"+t.name.replace(/\+/g," ")+"</option>"}),a&&i.find(".redux-typography-style").select2("destroy"),i.find(".redux-typography-style").html(F).select2(),P="",F='<option value=""></option>',D.each(N.subsets,function(e,t){C===t.id||1===redux.field_objects.typography.size(N.subsets)?(P=' selected="selected"',C=t.id,i.find("input.typography-subsets").val(C)):P="",F+='<option value="'+t.id+'"'+P+">"+t.name.replace(/\+/g," ")+"</option>"}),a&&i.find(".redux-typography-subsets").select2("destroy"),i.find(".redux-typography-subsets").html(F).select2({width:"100%"}),i.find(".redux-typography-subsets").parent().fadeIn("fast"),i.find(".typography-family-backup").fadeIn("fast")):!0===B?(D.each(N.variants,function(e,t){w===t.id||1===redux.field_objects.typography.size(N.variants)?(P=' selected="selected"',w=t.id):P="",F+='<option value="'+t.id+'"'+P+">"+t.name.replace(/\+/g," ")+"</option>"}),i.find(".redux-typography-style").select2("destroy"),i.find(".redux-typography-style").html(F).select2(),i.find(".redux-typography-subsets").parent().fadeOut("fast"),i.find(".typography-family-backup").fadeOut("fast")):i.find(".redux-typography-style")&&(D.each(T,function(e,t){w===e||"normal"===e?(P=' selected="selected"',i.find(".typography-style select2-selection__rendered").text(t)):P="",F+='<option value="'+e+'"'+P+">"+t.replace("+"," ")+"</option>"}),a&&i.find(".redux-typography-style").select2("destroy"),i.find(".redux-typography-style").html(F).select2()),i.find(".redux-typography-font-family").val(p)):D(e).hasClass("redux-typography-family-backup")&&""!==r?i.find(".redux-typography-font-family-backup").val(r):(N=T)&&(D.each(N,function(e,t){w===e||"normal"===e?(P=' selected="selected"',i.find(".typography-style select2-selection__rendered").text(t)):P="",F+='<option value="'+e+'"'+P+">"+t.replace("+"," ")+"</option>"}),a&&i.find(".redux-typography-style").select2("destroy"),i.find(".redux-typography-style").html(F).select2(),i.find(".redux-typography-subsets").parent().fadeOut("fast"),i.find(".typography-family-backup").fadeOut("fast"))),s&&(i.find(".redux-typography-style").addClass("ignore-change"),0===i.find("select.redux-typography-style option[value='"+w+"']").length?(w="",i.find("select.redux-typography-style").val("").trigger("change")):"400"===w&&i.find("select.redux-typography-style").val(w).trigger("change"),i.find(".redux-typography-style").removeClass("ignore-change"),0===i.find("select.redux-typography-subsets option[value='"+C+"']").length)&&(C="",i.find(".redux-typography-style").addClass("ignore-change"),i.find("select.redux-typography-subsets").val("").trigger("change"),i.find("input.typography-subsets").val(C),i.find(".redux-typography-style").removeClass("ignore-change")),v="style_link_"+o,D("."+v).remove(),null!==p&&"inherit"!==p&&i.hasClass("typography-initialized")&&(r=p.replace(/\s+/g,"+"),!0===d?(S=r,w&&""!==w&&(S+=":"+w.replace(/\-/g," ")),C&&""!==C&&(S+="&subset="+C),!1===M&&"undefined"!=typeof WebFont&&WebFont&&WebFont.load({google:{families:[S]}}),i.find(".redux-typography-google").val(!0)):i.find(".redux-typography-google").val(!1)),w&&-1!==w.indexOf("italic")?(i.find(".typography-preview").css("font-style","italic"),i.find(".typography-font-style").val("italic"),w=w.replace("italic","")):(i.find(".typography-preview").css("font-style","normal"),i.find(".typography-font-style").val("")),i.find(".typography-font-weight").val(w),Boolean(i.find(".redux-typography-height").data("allow-empty"))||(m=m||n),""===n||void 0===n?i.find(".typography-font-size").val(""):(a=i.find(".redux-typography-size").data("unit"),i.find(".typography-font-size").val(n+a)),""===m||void 0===m?i.find(".typography-line-height").val(""):(z=i.find(".redux-typography-height").data("unit"),i.find(".typography-line-height").val(m+z)),""===b||void 0===b?i.find(".typography-word-spacing").val(""):(I=i.find(".redux-typography-word").data("unit"),i.find(".typography-word-spacing").val(b+I)),""===_||void 0===_?i.find(".typography-letter-spacing").val(""):(O=i.find(".redux-typography-letter").data("unit"),i.find(".typography-letter-spacing").val(_+O)),""===c||void 0===c?i.find(".typography-margin-top").val(""):(j=i.find(".redux-typography-margin-top").data("unit"),i.find(".typography-margin-top").val(c+j)),""===x||void 0===x?i.find(".typography-margin-bottom").val(""):(k=i.find(".redux-typography-margin-bottom").data("unit"),i.find(".typography-margin-bottom").val(x+k)),i.hasClass("typography-initialized")&&(0===i.find(".typography-preview").data("preview-size")&&i.find(".typography-preview").css("font-size",n+f),i.find(".typography-preview").css({"font-weight":w,"text-align":y,"font-family":p+", sans-serif","padding-top":c+j,"padding-bottom":x+k}),"none"===p&&""===p&&i.find(".typography-preview").css("font-family","inherit"),m&&i.find(".typography-preview").css("line-height",m+z),b&&i.find(".typography-preview").css("word-spacing",b+I),_&&i.find(".typography-preview").css("letter-spacing",_+O),u&&(i.find(".typography-preview").css("color",u),s=redux.field_objects.typography.hexToInt(u),v=redux.field_objects.typography.hexToInt("ffffff"),redux.field_objects.typography.hexToInt("dddddd")<=s&&s<=v?i.find(".typography-preview").css("background-color","black"):i.find(".typography-preview").css("background-color","")),redux.field_objects.typography.previewShadow(o),i.find(".typography-style select2-selection__rendered").text(i.find(".redux-typography-style option:selected").text()),i.find(".typography-script select2-selection__rendered").text(i.find(".redux-typography-subsets option:selected").text()),y&&i.find(".typography-preview").css("text-align",y),l&&i.find(".typography-preview").css("text-transform",l),h&&i.find(".typography-preview").css("font-variant",h),g&&i.find(".typography-preview").css("text-decoration",g),i.find(".typography-preview").slideDown()),i.hasClass("typography-initialized")||i.addClass("typography-initialized"),M=!1,t||redux_change(e)},redux.field_objects.typography.previewShadow=function(e){var t=D("#"+e+" .redux-typography-shadow-color").val(),a=D("#redux-slider-value-"+e+"-h").val(),r=D("#redux-slider-value-"+e+"-v").val(),s=D("#redux-slider-value-"+e+"-b").val();t&&D("#"+e+" .typography-preview").css("text-shadow",a+"px "+r+"px "+s+"px "+t)}}(jQuery);

Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists