(()=>{"use strict";var t={n:o=>{var e=o&&o.__esModule?()=>o.default:()=>o;return t.d(e,{a:e}),e},d:(o,e)=>{for(var n in e)t.o(e,n)&&!t.o(o,n)&&Object.defineProperty(o,n,{enumerable:!0,get:e[n]})},o:(t,o)=>Object.prototype.hasOwnProperty.call(t,o)};const o=window.jQuery;var e=t.n(o);window.glaData;const n=window.glaProductData,c=[["CAMPAIGN","campaign"],["ASSET_GROUP","asset-group"]],a=(Object.fromEntries(c),c.reduce((t,o,e)=>{const n=(e+1).toString();return t[o[1]]=n,t},{}),t=>{const o=t.parents("div.select-with-text-input").find(".custom-input");"_gla_custom_value"===t.val()?o.show():o.hide()}),r=t=>{const o=t("div.select-with-text-input select");o.each(function(o,e){a(t(e))}),o.on("change",function(){a(t(this))})};e()(function(){const t=()=>{r(e())};e()("#woocommerce-product-data").on("woocommerce_variations_loaded",t),e()(document.body).on("woocommerce_variations_added",t),t()}),e()(document).on("woocommerce-product-type-change","body",(t,o)=>{const c=n.applicableProductTypes.includes(o);e()(".gla_attributes_tab, .gla_meta_box").toggle(c)})})();