!function(e){var t={};function i(r){if(t[r])return t[r].exports;var n=t[r]={i:r,l:!1,exports:{}};return e[r].call(n.exports,n,n.exports,i),n.l=!0,n.exports}i.m=e,i.c=t,i.d=function(e,t,r){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(i.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)i.d(r,n,function(t){return e[t]}.bind(null,n));return r},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="",i(i.s=1)}([function(e,t,i){i.p=window.flatsomeVars?window.flatsomeVars.assets_url:"/"},function(e,t,i){i(0),e.exports=i(2)},function(e,t){jQuery((function(e){"use strict";var t,i,r=window.wp,n=e("body");e(".ux-color-field").wpColorPicker(),e(".ux-swatches-add-color").off("click").on("click",(function(){var t=e(this),i=t.data("content"),r=t.nextAll(".wp-picker-container"),n=r.find(".wp-picker-clear");t.data("content",t.html()),t.html(i),n.click(),r.toggle()})),(i=e(".ux-swatches-bicolor-picker")).val()||i.closest(".wp-picker-container").hide(),n.on("click",".ux-swatches-upload-image-button",(function(i){i.preventDefault();var n=e(this);(t=r.media.frames.downloadable_file=r.media({multiple:!1})).on("select",(function(){var e=t.state().get("selection").first().toJSON(),i=e.sizes&&e.sizes.thumbnail?e.sizes.thumbnail.url:e.url;n.siblings("input.ux-swatches-term-image").val(e.id),n.siblings(".ux-swatches-remove-image-button").show(),n.parent().prev(".ux-swatches-term-image-thumbnail").find("img").attr("src",i)})),t.open()})).on("click",".ux-swatches-remove-image-button",(function(){var t=e(this);return t.siblings("input.ux-swatches-term-image").val(""),t.hide(),t.parent().prev(".ux-swatches-term-image-thumbnail").find("img").attr("src",flatsome_swatches.placeholder),!1}));var o=e(".product_page_product_attributes #attribute_label").closest("form");o.find("select#attribute_type").bind("change",(function(){var t=e(this).val(),i=o.find("#attribute_swatch_shape").closest(".form-field"),r=o.find("#attribute_swatch_size").closest(".form-field"),n=o.find("#attribute_swatch_variation_images").closest(".form-field");""!==t&&"select"!==t||[i,r,n].forEach(e=>{e.addClass("ux-dim")}),"ux_color"!==t&&"ux_image"!==t&&"ux_label"!==t||function(e){e.forEach(e=>{e.removeClass("ux-dim")})}([i,r,n])})).change()}))}]);