Файловый менеджер - Редактировать - /home/kunzqhe/www/wp-content/themes/themify-ultra/themify/js/generate-style.min.js
Назад
'use strict';var ThemifyStyles; (function(y,t){"function"!==typeof String.prototype.trimRight&&(String.prototype.trimRight=function(){return this.replace(/\s+$/,"")});var z=null,h={},x={},A={};ThemifyStyles={styleName:"tb_component_customize_",storeAgekey:"tb_styles_rules",breakpoint:null,builder_id:null,saving:null,disableNestedSel:null,fonts:{},cf_fonts:{},bgImages:[],GS:{},init(a,b,d){this.breakpointsReverse=b;A=a;this.builder_id=d;z="undefined"!==typeof tb_app&&"visual"===tb_app.mode;!0===z&&this.InitInlineStyles()},getRules:function(a){return a? h[h]:h},getStorageRules(){if(themifyBuilder.debug)return!1;var a=localStorage.getItem(this.storeAgekey);return a?a=JSON.parse(a):!1},setStorageRules(a){},getStyleData:function(a,b){var d={},e;for(e in a)"label"!==e&&"units"!==e&&"description"!==e&&"after"!==e&&"options"!==e&&"wrap_class"!==e&&"option_js"!==e&&"class"!==e&&"binding"!==e&&(d[e]=a[e]);d.p=b;return d},parseFontName:function(a){if(a){a=a.split(",");for(var b="",d=0,e=a.length;d<e;++d){var c=a[d].trim();b="serif"!==c&&"sans-serif"!==c&& "monospace"!==c&&"fantasy"!==c&&"cursive"!==c&&'"'!==c[0]&&"'"!==c[0]?b+('"'+c+'"'):b+c;d!==e-1&&(b+=", ")}}else return a;return b},extend(){var a={},b=!1,d=0,e=arguments.length;!0===arguments[0]&&(b=arguments[0],++d);for(;d<e;++d){var c=void 0,f=arguments[d];for(c in f)Object.prototype.hasOwnProperty.call(f,c)&&(b&&"[object Object]"===Object.prototype.toString.call(f[c])?a[c]=this.extend(!0,a[c],f[c]):a[c]=f[c])}return a},InitInlineStyles(){var a=this.breakpointsReverse,b=t.createDocumentFragment(); if(!1===tb_app.GS.isGSPage)for(var d=a.length-1;-1<d;--d){var e=t.createElement("style");e.type="text/css";e.id=this.styleName+a[d]+"_global";"desktop"!==a[d]&&(e.media="screen and (max-width:"+tb_app.Utils.getBPWidth(a[d])+"px)");b.appendChild(e)}for(d=a.length-1;-1<d;--d)e=t.createElement("style"),e.type="text/css",e.id=this.styleName+a[d],"desktop"!==a[d]&&(e.media="screen and (max-width:"+tb_app.Utils.getBPWidth(a[d])+"px)"),b.appendChild(e);a=t.getElementById("tb_active_style_"+this.builder_id); null!==a?a.parentNode.replaceChild(b,a):(a=t.getElementById("themify_concate-css"),null!==a?a.parentNode.insertBefore(b,a.nextSibling):t.body.appendChild(b))},getSheet(a,b){!0===b&&(a+="_global");return t.getElementById(this.styleName+a).sheet},getBaseSelector(a,b){return".themify_builder_content-"+this.builder_id+" .tb_"+b+".module"+("row"===a||"column"===a||"subrow"===a?"_":"-")+a},getNestedSelector(a){if(null===this.disableNestedSel){var b="p blockquote h1 h2 h3 h4 h5 h6 li span".split(" "),d= b.length;a=a.slice(0);for(var e=a.length-1;-1<e;--e)if(-1!==a[e].indexOf(".tb_text_wrap")){var c=a[e].trimRight();if(c.endsWith(".tb_text_wrap"))for(var f=0;f<d;++f)a.push(c+" "+b[f])}}return a},toRGBA(a){if(void 0!==a&&""!==a&&"#"!==a){if(0<=a.indexOf("rgba"))return a;var b=a.split("_"),d=/^([\da-fA-F]{2})([\da-fA-F]{2})([\da-fA-F]{2})$/;if(void 0!==b[0])return d=d.exec(b[0].replace("#","")),b=void 0!==b[1]&&"0.99"!=b[1]?b[1]:1,d?"rgba("+parseInt(d[1],16)+", "+parseInt(d[2],16)+", "+parseInt(d[3], 16)+", "+b+")":"#"!==a[0]?"#"+a:a;"#"!==a[0]&&(a="#"+a)}else a="";return a},getStyleVal(a,b){if("desktop"===this.breakpoint)return""!==b[a]?b[a]:void 0;for(var d=this.breakpointsReverse,e=d.indexOf(this.breakpoint),c=d.length;e<c;++e)if("desktop"!==d[e]){if(void 0!==b["breakpoint_"+d[e]]&&void 0!==b["breakpoint_"+d[e]][a]&&""!==b["breakpoint_"+d[e]][a])return b["breakpoint_"+d[e]][a]}else if(""!==b[a])return b[a]},generateGSstyles:function(a,b,d){void 0===x[b]&&(x[b]={});for(var e=this.getStyleOptions(b), c=this.breakpointsReverse,f={},g=function(a,c,d){if(void 0!==x[b][c])return x[b][c];if(void 0===a.is_overlay&&"frame"!==a.type&&"video"!==a.type&&("radio"!==a.type||void 0!==a.prop)){var f=a.p,g=a.type,k=a.is_responsive,l=null,h=a.is_hover,m=a.prop;if("select"===g||"icon_radio"===g||"radio"===g||"checkbox"===g||"icon_checkbox"===g)for(var r in a)if(!0===a[r]&&"option_js"!==r){l=r;break}a=function(){for(var a in e)if(f===e[a].p&&m===e[a].prop&&g===e[a].type&&h===e[a].is_hover&&(null===l||!0===e[a][l])&& k===e[a].is_responsive)return x[b][c]=a,!0;return!1};if(!0===a())return x[b][c];if("background-image"===m&&("image"===g||"imageGradient"===g)){if(g="imageGradient",!0===a())return x[b][c]}else if("margin-top"===m||"margin-bottom"===m)if("row"===b||"column"===b){if("margin"===g&&"row"!==d&&"column"!==d&&(g="range",!0===a()))return x[b][c]}else if("range"===g&&("row"===d||"column"===d)&&(g="margin",!0===a()))return x[b][c]}return x[b][c]=!1},k=c.length,l=0,h=a.length;l<h;++l){var m=a[l].trim();if(""!== m&&void 0!==d[m]){var q=d[m].data[0];m=d[m].type;"row"!==m&&"subrow"!==m&&(q=q.cols[0]);"column"===m||"row"===m||"subrow"===m?q=q.styling:(q=q.modules[0],m=q.mod_name,q=q.mod_settings);if(void 0!==q)for(var n=b===m?e:this.getStyleOptions(m),p=k-1;-1<p;--p)if("desktop"===c[p])for(var u in q){if(void 0!==n[u]&&(void 0===f[u]||""===f[u]||!1===f[u])){var v=void 0!==e[u]?u:g(n[u],u,m);if(v===u||!1!==v&&!f[v]&&"0"!=f[v])f[v]=q[u]}}else if(void 0!==q["breakpoint_"+c[p]]){var B=!0,w="breakpoint_"+c[p];void 0=== f[w]&&(f[w]={},B=!1);for(u in q[w])void 0===n[u]||void 0!==n[u].is_responsive||void 0!==f[w][u]&&""!==f[w][u]&&!1!==f[w][u]||(v=void 0!==e[u]?u:g(n[u],u,m),v!==u&&(!1===v||f[w][v]||"0"==f[w][v]))||(f[w][v]=q[w][u],B=!0);!1===B&&delete f[w]}}}return f},createCss(a,b,d,e,c){b||(b="row");this.saving=d;var f=this.breakpointsReverse,g=f.length,k=this,l={},h=this.builder_id;d=function(a,c){var d=function(a,c,d){if(void 0!==e&&void 0!==d.global_styles&&""!==d.global_styles){var m=k.generateGSstyles(d.global_styles.split(" "), a,e);k.GS=k.extend(!0,{},k.GS,k.createCss([{styling:m,element_id:c}],a,k.saving,void 0,!0))}void 0!==d&&null!==d&&void 0!==d.builder_content&&(k.builder_id=c,"string"===typeof d.builder_content&&(d.builder_content=JSON.parse(d.builder_content)),b(d.builder_content,"row"),k.builder_id=h);if(void 0!==d)for(d=k.extend(!0,{},d),m=g-1;-1<m;--m){var r=null;k.breakpoint=f[m];"desktop"===f[m]?r=k.getFieldCss(c,a,d):void 0!==d["breakpoint_"+f[m]]&&0<Object.keys(d["breakpoint_"+f[m]]).length&&(r=k.getFieldCss(c, a,d["breakpoint_"+f[m]]));if(r&&0<Object.keys(r).length){void 0===l[f[m]]&&(l[f[m]]={});for(var q in r)if(void 0===l[f[m]][q])l[f[m]][q]=r[q];else for(var n=r[q].length-1;-1<n;--n)l[f[m]][q].push(r[q][n])}}},b=function(a,c){for(var e in a){var f=a[e],g=f.styling?f.styling:f.mod_settings;void 0!==g&&d(c,f.element_id,g);if(void 0!==f.cols)for(var k in f.cols)if(g=f.cols[k],void 0!==g.styling&&d("column",g.element_id,g.styling),void 0!==g.modules)for(var l in g.modules){var m=g.modules[l];null!==m&& (void 0!==m.mod_name?void 0!==m.mod_settings&&d(m.mod_name,m.element_id,m.mod_settings):b([m],"subrow"))}}};b(a,c)};d(a,b);void 0===c&&(0<Object.keys(this.fonts).length&&(l.fonts=this.fonts),0<Object.keys(this.cf_fonts).length&&(l.cf_fonts=this.cf_fonts),0<Object.keys(this.GS).length&&(l.gs=this.GS),0<Object.keys(this.bgImages).length&&(l.bg=this.bgImages),this.fonts={},this.GS={},this.cf_fonts={},this.bgImages=[],this.saving=null);f=g=k=h=d=null;return l},getStyleOptions(a){if(void 0===h[a]){var b= A;if(void 0!==b[a]){h[a]={};var d=this,e=function(c,b){for(var g in c)if(null!==c[g]){var f=c[g].type;if("expand"===f||"multi"===f||"group"===f){var l=b;"expand"===f&&void 0!==c[g].label&&(l=b+"_"+c[g].label.replace(/\s/g,""));e(c[g].options,l)}else if("tabs"===f)for(var r in c[g].options)l=void 0===b?r:b+"_"+r,e(c[g].options[r].options,l);else if(void 0!==c[g].id)if(l=c[g].id,void 0!==c[g].prop){h[a][l]=d.getStyleData(c[g],b);var m=c[g].prop;if("font-size"===m||"line-height"===m||"letter-spacing"=== m||"range"===f&&("margin-top"===m||"margin-bottom"===m))h[a][l+"_unit"]={type:"select",p:b};if("box_shadow"===f||"text_shadow"===f){var q="box_shadow"===f?["hOffset","vOffset","blur","spread","color"]:["hShadow","vShadow","blur","color"];for(r=q.length-1;-1<r;--r){var n=l+"_"+q[r];h[a][n]=d.getStyleData(c[g],b);"color"!==q[r]&&(h[a][n+"_unit"]={type:"select",p:b})}"box_shadow"===f&&(h[a][l+"_inset"]={type:"checkbox",p:b})}else if("fontColor"===f)void 0===h[a][c[g].s]&&(h[a][c[g].s]={type:"color", prop:"color",isFontColor:!0,selector:c[g].selector,origId:l,p:b}),void 0===h[a][c[g].g]&&(h[a][c[g].g]={type:"gradient",p:b},h[a][c[g].g]=h[a][c[g].g+"-gradient-angle"]=h[a][c[g].g+"-circle-radial"]=h[a][c[g].g+"-gradient-type"]={type:"gradient",p:b});else if("padding"===f||"margin"===f||"border"===f||"border_radius"===f){q=["top","right","bottom","left"];var p="border"===f;f=!1===p&&"border_radius"===f;!0===p?h[a][l+"-type"]={type:"radio",p:b}:(h[a]["checkbox_"+l+"_apply_all"]={type:"checkbox",p:b}, !1===f&&(h[a][l+"_opp_top"]={type:"checkbox",p:b},h[a][l+"_opp_left"]={type:"checkbox",p:b}));for(r=3;-1<r;--r)if(n=l+"_"+q[r],!0===p&&(h[a][n+"_style"]=d.getStyleData(c[g],b),h[a][n+"_color"]=d.getStyleData(c[g],b),h[a][n+"_style"].prop=m+"-"+q[r]+"-style",h[a][n+"_color"].prop=m+"-"+q[r]+"-color",n+="_width"),h[a][n]=d.getStyleData(c[g],b),h[a][n+"_unit"]={type:"select",p:b},!0===f){var u="border-";"top"===q[r]?u+="top-left-radius":"right"===q[r]?u+="top-right-radius":"left"===q[r]?u+="bottom-left-radius": "bottom"===q[r]&&(u+="bottom-right-radius");h[a][n].prop=u}else h[a][n].prop=m+"-"+q[r]}else if("gradient"===f||"imageGradient"===f)h[a][l+"-gradient"]=d.getStyleData(c[g],b),h[a][l+"-gradient-angle"]=h[a][l+"-circle-radial"]=h[a][l+"-gradient-type"]={type:"gradient",p:b},"imageGradient"===f&&(h[a][l+"-type"]={type:"radio",p:b},h[a][c[g].colorId]=d.getStyleData(c[g],b),h[a][c[g].colorId].prop="background-color",h[a][c[g].colorId].type="color",h[a][c[g].colorId].id=c[g].colorId);else if("multiColumns"=== f)h[a][l+"_gap"]=h[a][l+"_divider_color"]=h[a][l+"_divider_width"]=h[a][l+"_divider_style"]={type:f,p:b};else if("font_select"===f)h[a][l+"_w"]={type:"font_weight"};else if("filters"===f)for(q="hue saturation brightness contrast invert sepia opacity blur".split(" "),r=q.length-1;-1<r;--r)h[a][l+"_"+q[r]]=d.getStyleData(c[g],b);else if("width"===f)h[a]["min_"+l]={prop:"min-width",selector:c[g].selector,type:"width",p:b},h[a]["max_"+l]={prop:"max-width",selector:c[g].selector,type:"width",p:b},h[a][l+ "_auto_width"]={prop:"width",selector:c[g].selector,type:"width",p:b},h[a][l+"_unit"]={type:"select",p:b};else if("transform"===f||"transform-origin"===m)if(m=d.getStyleData(c[g],b),"transform"===f){for(let b=["scale","translate","skew"],c=b.length-1;-1<c;--c)f=l+"_"+b[c],h[a][f+"_top"]=h[a][f+"_bottom"]=m;for(let b=["x","y","z"],c=b.length-1;-1<c;--c)h[a][l+"_rotate_"+b[c]]=m}else m.type="transform",h[a][l]=m}else h[a][l]=d.getStyleData(c[g],b);else"margin_opposity"===f&&(h[a][c[g].topId]={prop:"margin-top", selector:c[g].selector,type:"range",p:b},h[a][c[g].bottomId]={prop:"margin-bottom",selector:c[g].selector,type:"range",p:b},h[a][c[g].topId+"_unit"]={type:"select",p:b},h[a][c[g].bottomId+"_unit"]={type:"select",p:b},h[a][c[g].topId+"_opp_top"]={type:"checkbox",p:b})}};void 0!==b[a].styling?void 0!==b[a].styling.options.length?e(b[a].styling.options):e(b[a].styling):e(void 0===b[a].type?b[a]:[b[a]])}else return!1}return h[a]},getFieldCss(a,b,d){if(void 0!==A[b]){var e={},c=this.getStyleOptions(b); a=this.getBaseSelector(b,a);var f=!0===this.saving,g;for(g in d)if(void 0!==c[g]&&void 0!==c[g].selector){var k=c[g].type;"margin"===k&&(k="padding");k=this.fields[k].call(this,g,b,c[g],d);if(!1!==k){var l=Array.isArray(c[g].selector)?c[g].selector:[c[g].selector],h=!0===c[g].ishover,m=[];l=this.getNestedSelector(l);for(var n=0,p=l.length;n<p;++n){var t=l[n];!0!==h||t.endsWith(":after")||t.endsWith(":before")||(t+=":hover");if(!0===z)if(!1===f){if(!0===h||-1!==t.indexOf(":hover"))t+=","+a+t.replace(":hover", ".tb_visual_hover")}else if(-1!==t.indexOf(".tb_visual_hover")){t=t.split(",");for(var u=t.length-1;-1<u;--u)-1!==t[u].indexOf(".tb_visual_hover")&&t.splice(u,1);t=t.join(",")}m.push(a+t)}m=m.join(",").trim().replace(/\s\s+/g," ");void 0===e[m]&&(e[m]=[]);-1===e[m].indexOf(k)&&e[m].push(k)}else null===k&&delete d[g]}return e}return!1},fields:{frameCache:{},imageGradient(a,b,d,e){var c=!1,f=-1!==a.indexOf("-gradient",3),g=!0===f?a.replace("-gradient","-type"):a+"-type";g=this.getStyleVal(g,e);"gradient"=== g?!0===f&&(c=this.fields.gradient.call(this,a,b,d,e),c+="background-color:transparent;"):!1===f&&(c=this.fields.image.call(this,a,b,d,e),!1!==c&&""!==this.getStyleVal(a,e)&&(a=this.fields.select.call(this,d.repeatId,b,{prop:"background-mode",origId:d.origId},e),!1!==a&&(c+=a),a=this.fields.position_box.call(this,d.posId,b,{prop:"background-position",origId:d.origId},e),c=!1!==a?c+a:c+"background-position:50% 50%;"));return c},image(a,b,d,e){b=this.getStyleVal(a,e);var c=!1;if(void 0!==b){if("background_image"=== a||"bg_i_h"===a){if((a=this.getStyleVal("background_image"===a?"background_type":"b_t_h",e))&&"image"!==a&&"video"!==a)return!1;b="desktop"!==this.breakpoint&&"none"===this.getStyleVal("resp_no_bg",e)?"":b}""===b?"desktop"!==this.breakpoint&&(c=d.prop+":none;"):(!0===this.saving&&this.bgImages.push(b),c=d.prop+":url("+b+");")}return c},gradient(a,b,d,e){b=!1;var c=d.id;a=this.getStyleVal(a,e);if("background_gradient"===c||"b_g_h"===c||"cover_gradient"===c||"cover_gradient_hover"===c){var f=this.getStyleVal("background_gradient"=== c?"background_type":"b_g_h"===c?"b_t_h":"cover_gradient"===c?"cover_color-type":"cover_color_hover-type",e);if("gradient"!==f&&"hover_gradient"!==f&&"cover_gradient"!==f)return!1}if(a){a=a.split("|");(b=this.getStyleVal(c+"-gradient-type",e))||(b="linear");"radial"===b?e=this.getStyleVal(c+"-circle-radial",e)?"circle":"":((e=this.getStyleVal(c+"-gradient-angle",e))||(e="180"),e+="deg");""!==e&&(e+=",");c=[];f=0;for(var g=a.length;f<g;++f){var k=parseInt(a[f])+"%",l=a[f].replace(k,"").trim();c.push(l+ " "+k)}c=c.join(",");b=d.prop+":"+b+"-gradient("+e+c+");"}return b},icon_radio(a,b,d,e){return(a=this.getStyleVal(a,e))?d.prop+":"+a+";":!1},color(a,b,d,e){if("column-rule-color"===d.prop)return!1;var c=this.getStyleVal(a,e);if(""===c||void 0===c)return delete e[a],!1;c=this.toRGBA(c);if(""===c||"_"===c)return delete e[a],!1;if(!0===d.isFontColor)return this.fields.fontColor.call(this,d.origId,b,{s:a},e);c=d.prop+":"+c+";";if(d.colorId!==a||void 0===d.origId||this.getStyleVal(d.origId,e))"b_c_h"!== a&&"b_c_i_h"!==a||"row"!==b&&"column"!==b&&"subrow"!==b&&"sub-column"!==b||this.getStyleVal("b_c_h"===a?"bg_i_h":"b_i_i_h",e)||"b_c_h"===a&&("b_c_h"!==a||"gradient"===this.getStyleVal("b_t_h",e))||(c+="background-image:none;");else{if("gradient"===this.getStyleVal(d.origId+"-type",e))return!1;c+="background-image:none;"}return c},fontColor(a,b,d,e){a=this.getStyleVal(a,e);var c=!1;void 0===a||-1===a.indexOf("_gradient")?(c=this.fields.color.call(this,void 0!==d.s?d.s:a.replace(/_solid$/ig,""),b,{prop:"color"}, e),!1!==c&&(c+="-webkit-background-clip:border-box;background-clip:border-box;background-image:none;")):void 0!==a&&(c=this.fields.gradient.call(this,a.replace(/_gradient$/ig,"-gradient"),b,{prop:"background-image",id:d.g},e),!1!==c&&(c+="-webkit-background-clip:text;background-clip:text;color:transparent;"));return c},padding(a,b,d,e){b=d.prop;var c=-1!==b.indexOf("padding")?"padding":"margin",f=d.id;d=this.getStyleVal(a,e);if(void 0===d||""===d)return delete e[a+"_unit"],!1;if(e["checkbox_"+f+"_apply_all"]&& "|"!==e["checkbox_"+f+"_apply_all"]&&"false"!==e["checkbox_"+f+"_apply_all"]){if(b!==c+"-top")return!1;b=c}(a=this.getStyleVal(a+"_unit",e))||(a="px");return b+":"+d+a+";"},box_shadow(a,b,d,e){b=d.prop;d=d.id;var c=this.getStyleVal(a,e);if(void 0===c||""===c)return delete e[a+"_unit"],!1;a="box-shadow"===b?["hOffset","vOffset","blur","spread"]:["hShadow","vShadow","blur"];c="";for(var f=!0,g=0,k=a.length;g<k;++g){var l=d+"_"+a[g],h=this.getStyleVal(l,e);void 0===h||""===h?h="0":f=!1;(l=this.getStyleVal(l+ "_unit",e))||(l="px");c+=h+l+" "}return!1===f?(c+=this.toRGBA(this.getStyleVal(d+"_color",e)),"box-shadow"===b&&"inset"===e[d+"_inset"]&&(c="inset "+c),b+":"+c+";"):!1},text_shadow(a,b,d,e){return this.fields.box_shadow.call(this,a,b,d,e)},border_radius(a,b,d,e){b=d.id;d=d.prop;"1"===e["checkbox_"+b+"_apply_all"]&&(a=b+"_top",d="border-radius");b=this.getStyleVal(a,e);if(void 0===b||""===b)return delete e[a+"_unit"],!1;(a=this.getStyleVal(a+"_unit",e))||(a="px");return d+":"+b+a+";"},border(a,b,d, e){b=d.prop;var c=d.id;d=this.getStyleVal(a,e);if(-1!==a.indexOf("_color")||"none"!==d&&-1!==a.indexOf("_style"))return!1;c=this.getStyleVal(c+"-type",e);if(void 0!==c&&"all"===c){if(-1===b.indexOf("border-top"))return!1;b="border"}c=this.getStyleVal(a.replace("_width","_style"),e);a=a.replace("_width","_color");if("none"===c)d=c;else{if(void 0===d)return!1;c||(c="solid");d=d+"px "+c;c=this.getStyleVal(a,e);""!==c&&void 0!==c?d+=" "+this.toRGBA(c):delete e[a]}return b+":"+d+";"},select(a,b,d,e){b= d.prop;var c="",f=this.getStyleVal(a,e);if(void 0===f||""===f||"column-rule-style"===b)return!1;if("background-mode"===b||"background-repeat"===b||"background-attachment"===b){if(void 0===e[d.origId]||""===e[d.origId])return!1;"background-mode"===b?(e={repeat:"repeat","repeat-x":"repeat-x","repeat-y":"repeat-y","repeat-none":"no-repeat","no-repeat":"no-repeat",fullcover:"cover","best-fit-image":"contain","builder-parallax-scrolling":"cover","builder-zoom-scrolling":"100%","builder-zooming":"100%"}, void 0!==e[f]&&(-1!==f.indexOf("repeat")?b="background-repeat":(b="background-size",c="background-repeat:no-repeat;","builder-zooming"===f?c+="background-position:center center;":"builder-zoom-scrolling"===f&&(c+="background-position:50%;")),f=e[f])):"background-repeat"===b&&"fullcover"===f&&(b="background-size",f="cover")}else if("column-count"===b){if("0"==f){b=[a,a+"_gap",a+"_divider_color",a+"_width",a+"_divider_style"];for(c=b.length-1;-1<c;--c)delete e[b[c]];return!1}(d=this.getStyleVal(a+"_gap", e))&&(c="column-gap:"+d+"px;");d=this.getStyleVal(a+"_divider_style",e);var g=this.getStyleVal(a+"_width",e);"none"===d?(delete e[a+"_divider_color"],delete e[a+"_width"],c+="column-rule:none;"):""===g||void 0===g?(delete e[a+"_divider_color"],delete e[a+"_width"],delete e[a+"_divider_style"]):(d||(d="solid"),c+="column-rule:"+g+"px "+d,e=this.getStyleVal(a+"_divider_color",e),""!==e&&void 0!==e&&(c+=" "+this.toRGBA(e)),c+=";")}else if("vertical-align"===b){if("inline-block"!==e[d.origID])return delete e[a], !1;""!==f&&!0!==this.saving&&void 0!==themifyBuilder&&(c+="align-self:"+("top"===f?"flex-start":"middle"===f?"center":"flex-end")+";")}else if(!0===d.display&&!0!==this.saving&&void 0!==themifyBuilder){if("none"===f)return!1;c+="inline-block"===f?"width:auto;":"width:100%;"}return c+(b+":"+f+";")},position_box(a,b,d,e){b=d.prop;a=this.getStyleVal(a,e);if(void 0===a||""===a)return!1;if("background-position"===b){if(!(void 0!==e[d.origId]&&""!==e[d.origId]||e.__dc__&&void 0!==e.__dc__[d.origId]&&""!== e.__dc__[d.origId]))return!1;-1!==a.indexOf("-")?a=a.replace("-"," "):(d=a.split(","),a=d[0]+"% "+d[1]+"%")}return b+":"+a+";"},font_select(a,b,d,e){var c=e[a],f="";if("default"===c||""===c||void 0===c)return delete e[a],delete e[a+"_w"],!1;b="undefined"!==typeof ThemifyConstructor&&void 0!==ThemifyConstructor.font_select.google[c]||"undefined"!==typeof ThemifyBuilderStyle&&void 0!==ThemifyBuilderStyle.google[c];var g=!0===b?!1:"undefined"!==typeof ThemifyConstructor&&void 0!==ThemifyConstructor.font_select.cf[c]|| "undefined"!==typeof ThemifyBuilderStyle&&void 0!==ThemifyBuilderStyle.cf[c];b||g||(b="undefined"!==typeof themifyBuilder&&null!==themifyBuilder.google&&void 0!==themifyBuilder.google[c],g=!0===b?!1:"undefined"!==typeof themifyBuilder&&null!==themifyBuilder.cf&&void 0!==themifyBuilder.cf[c]);b||g?(a=e[a+"_w"],b=!0===b?"fonts":"cf_fonts",void 0===this[b][c]&&(this[b][c]=[]),a&&(f={normal:"normal",regular:400,italic:400,bold:700},-1===this[b][c].indexOf(a)&&this[b][c].push(void 0!==f[a]?f[a]:a),b=-1!== a.indexOf("italic")?";font-style:italic":"",a=void 0!==f[a]?f[a]:a.replace(/[^0-9]/g,""),f="font-weight:"+(a+b)+";")):delete e[a+"_w"];return f+=d.prop+":"+this.parseFontName(c)+";"},frame(a,b,d,e){return!1},range(a,b,d,e){if("column-gap"===d.prop&&!0!==d.grid_gap||"column-rule-width"===d.prop)return!1;b=this.getStyleVal(a,e);if(""===b||void 0===b)return delete e[a],delete e[a+"_unit"],!1;(a=this.getStyleVal(a+"_unit",e))||(a="px");return d.prop+":"+b+a+";"},radio(a,b,d,e){if("frame-custom"===d.prop){var c= a.split("-")[0];b=this.getStyleVal(a,e);a=b===c+"-presets"?this.getStyleVal(c+"-frame_layout",e):this.getStyleVal(c+"-frame_custom",e);if(!a||"none"===a)return a?"desktop"===this.breakpoint?!1:"background-image:none;":!1;var f="";if(b===c+"-presets"){if("left"===c||"right"===c)a+="-l";var g=Themify.hash(a),k=this,l=function(a){var b=k.getStyleVal(c+"-frame_color",e);void 0!==b&&""!==b&&(a=a.replace(/#D3D3D3/ig,k.toRGBA(b)));f='background-image:url("data:image/svg+xml;utf8,'+encodeURIComponent(a)+ '");'};if(void 0!==k.fields.frameCache[g])l(k.fields.frameCache[g]);else if(b=t.getElementById("tmpl-frame_"+a),null!==b)k.fields.frameCache[g]=b.textContent.trim(),l(k.fields.frameCache[g]);else{var h=new XMLHttpRequest;h.open("GET",(!0!==z&&"undefined"!==typeof themifyBuilder?themifyBuilder.builder_url:ThemifyBuilderStyle.builder_url)+("/img/row-frame/"+a+".svg"),!1);h.onreadystatechange=function(){4!==this.readyState||200!==this.status&&0!==h.status||(k.fields.frameCache[g]=this.responseText,l(this.responseText))}; h.send(null)}}else f='background-image:url("'+a+'");';a=this.getStyleVal(c+"-frame_width",e);b=this.getStyleVal(c+"-frame_height",e);a?((d=this.getStyleVal(c+"-frame_width_unit",e))||(d="%"),f+="width:"+a+d+";"):(delete e[c+"-frame_width"],delete e[c+"-frame_width_unit"]);b?((d=this.getStyleVal(c+"-frame_height_unit",e))||(d="%"),f+="height:"+b+d+";"):(delete e[c+"-frame_height"],delete e[c+"-frame_height_unit"]);(a=this.getStyleVal(c+"-frame_repeat",e))?(a=.1+100/a,f="left"===c||"right"===c?f+("background-size:100% "+ a+"%;"):f+("background-size:"+a+"% 100%;")):delete e[c+"-frame_repeat"];return f}},multiColumns(a,b,d,e){if("column-count"!==d.prop)return!1;var c=this.getStyleVal(a,e);b=!1;c?(b=d.prop+":"+c+";",c=this.getStyleVal(a+"_gap",e),d=this.getStyleVal(a+"_divider_width",e),""!==c&&void 0!==c?b+="column-gap:"+c+"px;":delete e[a+"_gap"],d?(c=this.getStyleVal(a+"_divider_style",e),a=this.getStyleVal(a+"_divider_color",e),b=b+("column-rule:"+d+"px ")+(c?c:"solid")+(""!==a&&void 0!==a?" "+this.toRGBA(a):""), b+=";"):(delete e[a+"_divider_color"],delete e[a+"_divider_width"],delete e[a+"_divider_style"])):(delete e[a],delete e[a+"_gap"],delete e[a+"_divider_color"],delete e[a+"_divider_width"],delete e[a+"_divider_style"]);return b},height(a,b,d,e){if("auto"===this.getStyleVal(a+"_auto_height",e))a="height:auto;";else{b=this.getStyleVal(a,e);if(!b)return!1;(a=this.getStyleVal(a+"_unit",e))||(a="px");a="height:"+b+a+";"}return a},filters(a,b,d,e){a={hue:{unit:"deg",prop:"hue-rotate"},saturation:{unit:"%", prop:"saturate"},brightness:{unit:"%",prop:"brightness"},contrast:{unit:"%",prop:"contrast"},invert:{unit:"%",prop:"invert"},sepia:{unit:"%",prop:"sepia"},opacity:{unit:"%",prop:"opacity"},blur:{unit:"px",prop:"blur"}};b="";for(var c=Object.keys(a),f=0,g=c.length;f<g;++f){var k=this.getStyleVal(d.id+"_"+c[f],e);k?b+=a[c[f]].prop+"("+k+a[c[f]].unit+") ":delete e[d.id+"_"+c[f]]}return""===b?!1:"filter:"+b+";"},text(a,b,d,e){a=this.getStyleVal(a,e);b=!1;void 0!==a&&""!==a&&(b=d.prop+":"+a+";");return b}, number(a,b,d,e){return this.fields.text.call(this,a,b,d,e)},width(a,b,d,e){b=d.prop;d=this.getStyleVal(a,e);if("auto"===d)a="width:auto;";else{if(!d||"width"===b&&"auto"===this.getStyleVal(a+"_auto_width",e))return!1;(a=this.getStyleVal(a+"_unit",e))||(a="px");a=b+":"+d+a+";"}return a},position(a,b,d,e){d=this.getStyleVal(a,e);if(""===d)return!1;b="position:"+d+";";if("absolute"===d||"fixed"===d){d=["top","right","bottom","left"];for(var c,f=d.length-1;0<=f;--f)c=this.getStyleVal(a+"_"+d[f]+"_auto", e),"auto"===c?c="auto":(c=this.getStyleVal(a+"_"+d[f],e),c=""===c||isNaN(c)?"":c+this.getStyleVal(a+"_"+d[f]+"_unit",e)),b+=""!==c?d[f]+":"+c+";":""}return b},transform(a,b,d,e){b="";d=["skew","rotate","translate","scale"];a=a.split("_")[0];for(let k=3;-1<k;--k)switch(d[k]){case "scale":case "translate":case "skew":var c=this.getStyleVal(a+"_"+d[k]+"_top",e);var f=this.getStyleVal(a+"_"+d[k]+"_bottom",e);var g="translate"===d[k]?{x:this.getStyleVal(a+"_"+d[k]+"_top_unit",e),y:this.getStyleVal(a+"_"+ d[k]+"_bottom_unit",e)}:"skew"===d[k]?"deg":"";if(c||f)b=c&&this.getStyleVal(a+"_"+d[k]+"_opp_bottom",e)?b+(d[k]+"("+c+("translate"===d[k]?g.x:g)+") "):c&&f?b+(d[k]+"("+c+("translate"===d[k]?g.x:g)+","+f+("translate"===d[k]?g.y:g)+") "):b+(c?d[k]+"X("+c+("translate"===d[k]?g.x:g)+") ":d[k]+"Y("+f+("translate"===d[k]?g.y:g)+") ");break;case "rotate":for(f=["z","y","x"],g=2;-1<g;g--)(c=this.getStyleVal(a+"_"+d[k]+"_"+f[g],e))&&(b+=d[k]+f[g].toUpperCase()+"("+c+"deg) ")}""!==b&&(b="transform:"+b+";", c=this.getStyleVal(a+"_position",e))&&(c=c.split(","),b+="transform-origin:"+c[0]+"% "+c[1]+"%;");return b}},cleanUnusedStyles(a){for(var b in a){var d=[],e=void 0!==h[b]?h[b].type:null,c=function(a){if(""!==f){a=a.split("_");for(var b=[],c=0,d=a.length;c<d;++c)b.push(a[0]);return b.join("_")+"_"+f}return a};if("background_type"===b||"b_t_h"===b||"background_image"===b||"b_i_h"===b){if("background_image"===b||"b_i_h"===b){var f="b_i_h"===b?"h":"";if(a[c("background_image")])continue;else b="h"=== f?"b_t_h":"background_type",a[b]="image"}f="b_t_h"===b?"h":"";"gradient"!==a[b]?(d=c("background_gradient"),d=[d+"-circle-radial",d+"-gradient",d+"-gradient-angle",d+"-gradient-type"]):d=[c("background_color")];"slider"!==a[b]&&(d.push(c("background_slider")),d.push(c("background_slider_size")),d.push(c("background_slider_mode")),d.push(c("background_slider_speed")));"video"!==a[b]&&(d.push("background_video_options"),d.push("background_video"));e=c("background_image");"image"===a[b]&&a[e]||("video"!== a[b]&&d.push(e),d.push(c("background_repeat")),d.push(c("background_zoom")),d.push(c("background_position")),d.push(c("background_attachment")));for(e=d.length-1;-1<e;--e)delete a[d[e]]}else if("background_attachment_inner"===b||"b_a_i_h"===b){if(f="b_a_i_h"===b?"h":"",d=c("background_image_inner"),!a[d])for(d=[d,c("background_repeat_inner"),c("background_position_inner"),b],e=d.length-1;-1<e;--e)delete a[d[e]]}else if("cover_color-type"===b||"cover_color_hover-type"===b)for(c="cover_color_hover-type"=== b,!0===c&&"hover_color"===a[b]||!1===c&&"color"===a[b]?(d="cover_gradient",!0===c&&(d+="_hover"),d=[d+"-circle-radial",d+"-gradient",d+"-gradient-angle",d+"-gradient-type"]):d=!0===c?["cover_color_hover"]:["cover_color"],e=d.length-1;-1<e;--e)delete a[d[e]];else if("radio"===e&&-1!==b.indexOf("-frame_type"))for(c=b.replace("-frame_type",""),e=!1,a[b]===c+"-presets"?(d=[c+"-frame_custom"],e=!a[c+"-frame_layout"]||"none"===a[c+"-frame_layout"]):(d=[c+"-frame_layout"],d.push(c+"-frame_color"),e=!a[c+ "-frame_custom"]),e&&(d.push(c+"-frame_color"),d.push(c+"-frame_width"),d.push(c+"-frame_width_unit"),d.push(c+"-frame_height"),d.push(c+"-frame_height_unit"),d.push(c+"-frame_repeat"),d.push(c+"-frame_location")),e=d.length-1;-1<e;--e)delete a[d[e]];else if("background_image-type"===b||"b_i_h-type"===b)for(f="b_i_h-type"===b?"h":"",e=c("background_image"),"image"===a[b]&&(d=c("background_image"),d=[d+"-circle-radial",d+"-gradient",d+"-gradient-angle",d+"-gradient-type"]),"image"===a[b]&&a[e]||(d= [e,c("background_repeat"),c("background_position")],"image"!==a[b]&&d.push(c("background_color"))),e=d.length-1;-1<e;--e)delete a[d[e]];else if("multiColumns"===e&&-1!==b.indexOf("_count")){if(c=b.replace("_count",""),!a[c])for(d=[c,c+"_gap",c+"_divider_color",c+"_divider_width",c+"_divider_style"],e=d.length-1;-1<e;--e)delete a[d[e]]}else if(a[b]&&-1!==b.indexOf("_apply_all")&&0===b.indexOf("checkbox_")){if(c=b.replace("_apply_all","").replace("checkbox_",""),void 0!==h[c]&&h[c].type===c)for(d=["right", "bottom","left"],e=0;3>e;++e)delete a[c+"_"+d[e]]}else if("all"===a[b]&&-1!==b.indexOf("-type")){c=b.replace("-type","");var g=["color","style","width"],k=g.length;d=["right","bottom","left"];for(e=d.length-1;-1<e;--e)for(var l=k-1;-1<l;--l)delete a[c+"_"+d[e]+"_"+g[l]]}else"element_font_weight"!==b&&"e_f_w_h"!==b||400!=a[b]?"font_select"!==e||a[b]&&"default"!==a[b]?-1!==b.indexOf("breakpoint_")&&(a[b]=this.cleanUnusedStyles(a[b])):(delete a[b],delete a[b+"_w"]):delete a[b]}return a}};if("undefined"!== typeof ThemifyBuilderStyle){var n=Object.keys(ThemifyBuilderStyle.points).reverse();n.push("desktop");ThemifyStyles.init(ThemifyBuilderStyle.styles,n);ThemifyBuilderStyle.styles=n=null;if(void 0!==ThemifyBuilderStyle.google){n=ThemifyBuilderStyle.google;ThemifyBuilderStyle.google={};for(var p=n.length-1;-1<p;--p)""!==n[p].value&&"default"!==n[p].value&&(ThemifyBuilderStyle.google[n[p].value]={n:n[p].name,v:n[p].variant});n=null}if(void 0!==ThemifyBuilderStyle.cf){n=ThemifyBuilderStyle.cf;ThemifyBuilderStyle.cf= {};for(p=n.length-1;-1<p;--p)""!==n[p].value&&"default"!==n[p].value&&(ThemifyBuilderStyle.cf[n[p].value]={n:n[p].name,v:n[p].variant});n=null}n=function(){for(var a in y)if(0===a.indexOf("themify_builder_data_")&&null!==y[a]){var b=a.replace("themify_builder_data_","");ThemifyStyles.builder_id=b;var d=ThemifyStyles.createCss(y[a],null,!0,y["themify_builder_gs_"+b]),e={fonts:[],cf_fonts:[]},c=t.getElementById("themify_builder_content-"+b),f=t.createDocumentFragment();y[a]=null;if(void 0!==d.gs)for(var g in d.gs){var k= t.createElement("style"),l="";k.type="text/css";k.id="tb_temp_global_styles_"+b;if("desktop"!==g){var h=ThemifyBuilderStyle.points[g];"mobile"!==g&&(h=h[1]);k.media="screen and (max-width:"+h+"px)"}for(var m in d.gs[g])l+=m+"{"+d.gs[g][m].join(" ")+"}";k.appendChild(t.createTextNode(l));f.appendChild(k)}for(g in d)if("gs"!==g&&"bg"!==g)if("fonts"!==g&&"cf_fonts"!==g){k=t.createElement("style");l="";k.type="text/css";k.id="tb_temp_styles_"+b;"desktop"!==g&&(h=ThemifyBuilderStyle.points[g],"mobile"!== g&&(h=h[1]),k.media="screen and (max-width:"+h+"px)");for(m in d[g])l+=m+"{"+d[g][m].join(" ")+"}";k.appendChild(t.createTextNode(l));f.appendChild(k)}else for(m in d[g])k=m.split(" ").join("+"),0<d[g][m].length&&(k+=":"+d[g][m].join(",")),e[g].push(k);k=Object.keys(e);for(l=k.length-1;0<=l;--l)0<e[k[l]].length?(h="fonts"===k[l]?"//fonts.googleapis.com/css?family="+e[k[l]].join("|"):ThemifyBuilderStyle.cf_api_url+e[k[l]].join("|"),Themify.LoadCss(h,!1)):delete d[k[l]];t.head.appendChild(f);null!== c&&(c.style.visibility=c.style.opacity="",c.classList.remove("tb_generate_css"));e=new XMLHttpRequest;b={css:JSON.stringify(d),action:"tb_generate_on_fly",tb_load_nonce:ThemifyBuilderStyle.nonce,id:b};d="";for(g in b)""!==d&&(d+="&"),d+=encodeURIComponent(g)+"="+encodeURIComponent(b[g]);e.open("POST",ThemifyBuilderStyle.ajaxurl);e.responseType="json";e.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8");e.send(d)}};t.addEventListener("DOMContentLoaded",n);t.addEventListener("tb_regenerate_css", n)}else if(void 0!==y.themifyBuilder){if(void 0!==themifyBuilder.google)for(n=themifyBuilder.google,themifyBuilder.google={},p=n.length-1;-1<p;--p)""!==n[p].value&&"default"!==n[p].value&&(themifyBuilder.google[n[p].value]={n:n[p].name,v:n[p].variant});if(void 0!==themifyBuilder.cf)for(n=themifyBuilder.cf,themifyBuilder.cf={},p=n.length-1;-1<p;--p)""!==n[p].value&&"default"!==n[p].value&&(themifyBuilder.cf[n[p].value]={n:n[p].name,v:n[p].variant})}})(window,document);
| ver. 1.4 |
Github
|
.
| PHP 7.4.33 | Генерация страницы: 0 |
proxy
|
phpinfo
|
Настройка