PageSourceSearch

https://genieautomata.com/wp-content/plugins/iconic-woo-attribute-…/assets/frontend/js/main.min.js?ver=1.16.3

js genieautomata.com collected 2026-09-24 13:46:10 UTC 15,559 bytes, 1 lines download raw bytes

1!function(_,t){var d={cache:function(){d.els={},d.vars={},d.vars.swatch_group_class=".iconic-was-swatches",d.vars.swatch_class=".iconic-was-swatch",d.vars.selected_class="iconic-was-swatch--selected",d.vars.li_selected_class="iconic-was-swatches__item--selected",d.vars.disabled_class="iconic-was-swatch--disabled",d.vars.follow_class="iconic-was-swatch--follow",d.vars.variations_form_class=".variations_form",d.vars.attribute_labels_class=".variations .label",d.vars.chosen_attribute_class=".iconic-was-chosen-attribute",d.vars.no_selection='<span class="iconic-was-chosen-attribute__no-selection">'+iconic_was_vars.i18n.no_selection+"</span>",d.vars.attribute_selects_selector=".variations select",d.vars.change_image_links_class=".iconic-was-swatch--change-image",d.vars.widget_class=".iconic-was-swatches--widget ul",d.vars.widget_group_item=".iconic-was-swatch[data-group]",d.vars.window_size=_(window).width()},on_ready:function(){d.cache(),d.setup_swatches(),d.setup_change_image_links(),d.setup_fees(),d.setup_filter_groups()},setup_swatches:function(){_(t.body).on("click",d.vars.swatch_class,function(e){var a=_(this),s=a.closest(d.vars.variations_form_class),t=a.closest("table"),i=a.closest(d.vars.swatch_group_class).data("attribute"),c=a.data("attribute-value"),n=t.find('select[id="'+i.replace("attribute_","")+'"]'),t=(0===n.length&&a.closest(".bundled_item_cart_content")&&(s=a.closest(".bundled_item_cart_content"),n=t.find('select[id="'+i.replace("attribute_","")+"_"+s.data("bundled_item_id")+'"]')),n.attr("name")),o=a.closest(".value").prev(".label").find(d.vars.chosen_attribute_class),r=(a.hasClass("iconic-was-swatch--colour-swatch")||a.hasClass("iconic-was-swatch--image-swatch"),d.get_current_values(s)),l=!1;if(a.hasClass(d.vars.follow_class))return!0;if(a.hasClass(d.vars.disabled_class)&&(d.reset_form(e,s),delete r[t],l=!0),n.trigger("focusin"),a.hasClass(d.vars.selected_class))return d.deselect_swatch(a),d.select_value(n,""),void o.html(d.vars.no_selection);e=!1===_(d.vars.variations_form_class).data("product_variations"),t='[value="'+d.esc_double_quotes(c)+'"]';0<n.find(t=e?t:".enabled"+t).length&&(d.deselect_swatch_group(s,i),d.select_swatch(a),d.select_value(n,c),l&&d.select_values(s,r))}),_(t).on("mouseenter mouseleave",d.vars.swatch_class,function(e){var a=_(this).closest(d.vars.swatch_group_class).next("div").find("select");a.length<=0||a.trigger("focusin")}),_(t).on("woocommerce_update_variation_values",d.vars.variations_form_class,function(){var i=_(this);i.find("select").each(function(e){var a=_(this),s=a.find("option"),a=a.data("attribute_name"),t=i.find(d.vars.swatch_group_class+'[data-attribute="'+d.esc_double_quotes(a)+'"]');t.find(d.vars.swatch_class).not(d.vars.swatch_class+"--dummy").addClass(d.vars.disabled_class),s.each(function(e,a){var a=_(a),s=a.val(),s=t.find('[data-attribute-value="'+d.esc_double_quotes(s)+'"]');a.hasClass("enabled")?s.removeClass(d.vars.disabled_class):d.deselect_swatch(s)})})}),_(t).on("change",d.vars.attribute_selects_selector,function(){d.change_label(_(this))}),_(t.body).on("click",".reset_variations",function(e){var a=_(this).closest(d.vars.variations_form_class);d.reset_form(e,a)}),_(t).on("check_variations","form.variations_form",function(){var e=_(this).find("."+d.vars.disabled_class);e.length<=0||e.hasClass(d.vars.selected_class)&&(e.closest("tr").find(d.vars.chosen_attribute_class).html(d.vars.no_selection),d.deselect_swatch(e))}),d.swatches_on_load()},select_values:function(c,n){var e=c.find("select");if(e.length<=0)return!1;e.each(function(e,a){var s,t=_(this),i=t.attr("name");void 0===n[i]||(s=t.find('option[value="'+d.esc_double_quotes(n[i])+'"]')).length<=0||s.hasClass("enabled")&&(d.select_value(t,n[i]),c.find(d.vars.swatch_class+'[data-attribute-value="'+d.esc_double_quotes(n[i])+'"]').click())})},reset_form:function(e,a){e.preventDefault();e=a.find(d.vars.swatch_class);d.deselect_swatch(e),a.find(d.vars.attribute_selects_selector).find("option").prop("selected",!1).end().change().end().find(d.vars.attribute_labels_class+" "+d.vars.chosen_attribute_class).html(d.vars.no_selection).end().trigger("reset_data"),d.deselect_all_swatch_groups(a)},get_current_values:function(e){var s={},e=e.find("select");return!(e.length<=0)&&(e.each(function(){var e=_(this),a=e.attr("name"),e=e.val();e&&""!==e&&(s[a]=e)}),s)},select_swatch:function(e){e.addClass(d.vars.selected_class).closest(".iconic-was-swatches__item").addClass(d.vars.li_selected_class)},deselect_swatch:function(e){e.removeClass(d.vars.selected_class).closest(".iconic-was-swatches__item").removeClass(d.vars.li_selected_class)},deselect_swatch_group:function(e,a){e=e.find('[data-attribute="'+d.esc_double_quotes(a)+'"] '+d.vars.swatch_class);d.deselect_swatch(e)},deselect_all_swatch_groups:function(e){e=e.find(d.vars.swatch_class);d.deselect_swatch(e)},swatches_on_load:function(){var e=_(".variations select").find(":selected");e.length<=0||e.each(function(){var e=_(this).closest("select"),a=e.closest("form"),s=e.data("attribute_name"),t=_(this).val();d.change_label(e),s&&t&&(e=_('.iconic-was-swatches[data-attribute="'+s+'"] a.iconic-was-swatch[data-attribute-value="'+t+'"]'),d.deselect_swatch_group(a,s),d.select_swatch(e))})},select_value:function(e,a){e.val(a).change()},change_label:function(e){var a=e.val(),s=e.closest(".value"),t=s.find(d.vars.swatch_class+"[data-attribute-value="+JSON.stringify(a)+"]"),s=s.prev(".label").find(d.vars.chosen_attribute_class),t=0<t.length?t.data("attribute-value-name"):e.find('option[value="'+d.esc_double_quotes(a)+'"]').text();""!==a&&void 0!==t&&s.text(t)},setup_change_image_links:function(){_(t.body).on("click",d.vars.change_image_links_class,function(){var e=_(this),a=e.attr("href"),s=e.data("srcset"),t=e.data("sizes"),e=e.closest(".product"),i=e.find("img:first"),e=e.find("picture source");return i.attr("src",a).attr("srcset",s).attr("sizes",t),0<e.length&&e.attr("srcset",s).attr("sizes",t),!1})},esc_double_quotes:function(e){return String(e).replace(/"/g,'\\"')},setup_fees:function(){_(t.body).on("change",'input[name="variation_id"]',function(){var i,e,c,n,o,a=_(this);""===a.val()||(a=a.closest("form")).length<=0||(!(i=d.get_selected_fee_value(a))||0===i.default||(e=a.find(".woocommerce-variation-
1price").find(".amount")).length<=0||(a=a.find(".woocommerce-price-suffix"),c=0<a.length&&d.get_suffix_map(a),o=n=0,e.each(function(e,a){var s,a=_(a);0<a.closest(".woocommerce-price-suffix").length?(t=c[n],o=i[t],n++):o=i.default,a.data("was-price")?s=a.data("was-price"):(s=a.text(),a.data("was-price",s));var t=accounting.unformat(s,iconic_was_vars.currency.format_decimal_sep)+o,t=accounting.formatMoney(t,{symbol:"",decimal:iconic_was_vars.currency.format_decimal_sep,thousand:iconic_was_vars.currency.format_thousand_sep,precision:iconic_was_vars.currency.format_num_decimals,format:""});a.html(a.html().toString().replace(d.get_price_match_regex(),t))})))})},get_price_match_regex:function(){var e=iconic_was_vars.currency.format_thousand_sep?"\\d{1,3}("+iconic_was_vars.currency.format_thousand_sep+"\\d{3})*":"(\\d+)";return new RegExp(e+"(\\"+iconic_was_vars.currency.format_decimal_sep+"\\d+)?","gm")},get_suffix_map:function(e){var s=[],a=iconic_was_vars.currency.price_display_suffix.split("{");return _.each(a,function(e,a){-1!==a.indexOf("price_including_tax")?s.push("price_including_tax"):-1!==a.indexOf("price_excluding_tax")&&s.push("price_excluding_tax")}),s},setup_filter_groups:function(){_(d.vars.widget_group_item).length<=0||_(d.vars.widget_group_item).each(function(){var e,a,s;""!==_(this).data("group")&&(e=!1,a="iconic-was-group-"+_(this).data("group").toLowerCase().replace(" ","-"),0===_("li.iconic-was-swatches__group."+a).length&&((e=t.createElement("li")).classList="iconic-was-swatches__group "+a,(s=t.createElement("div")).classList="iconic-was-swatches__group-label",s.innerHTML=_(this).data("group"),e.appendChild(s)),!1!==e&&_(d.vars.widget_class).append(e),_(this).parent().remove(),_("li.iconic-was-swatches__group."+a).append(_(this)))})},get_selected_fee_value:function(e){var a=e.find(".iconic-was-fees");if(a.length<=0)return!1;var s={default:0,price_including_tax:0,price_excluding_tax:0},t=JSON.parse(a.text()),a=d.get_attributes_from_form(e);return _.each(a,function(e,a){void 0!==t[e]&&void 0!==t[e][a]&&(s={default:s.default+t[e][a].default,price_including_tax:s.price_including_tax+t[e][a].price_including_tax,price_excluding_tax:s.price_excluding_tax+t[e][a].price_excluding_tax})}),s},get_attributes_from_form:function(e){var t={},e=e.serializeArray();return e.length<=0||_.each(e,function(e,a){var s;""!==a.value&&a.name.startsWith("attribute_")&&(s=a.name.replace("attribute_",""),t[s]=a.value)}),t},debounce:function(t,i,c){var n;return function(){var e=this,a=arguments,s=c&&!n;clearTimeout(n),n=setTimeout(function(){n=null,c||t.apply(e,a)},i),s&&t.apply(e,a)}}},i={on_ready:function(){_(".iconic-was-accordion.product").length&&_(".iconic-was-accordion.product").find(".iconic-was-swatches").length&&(i.cache(),i.setup_accordion_html(),i.click_handler());var e=d.debounce(i.reset_accordion_height,250);_(window).resize(e)},cache:function(){i.els={},i.els.$product=_(".iconic-was-accordion.product"),i.els.$table=i.els.$product.find("table.variations"),i.els.$trs=i.els.$table.find(">tbody>tr"),i.els.$td_labels=i.els.$table.find(">tbody>tr>.label")},setup_accordion_html:function(){i.els.$td_labels.each(function(){var e=_(this),a=e.closest("tr");0<a.find(".single_variation_wrap").length||0<e.find(".iconic-was-accordion__handle").length||(a.addClass("iconic-was-accordion__row"),e.append("<span class='iconic-was-accordion__handle'></span>"))})},click_handler:function(){i.els.$td_labels.click(function(){var e,a=_(this).parent(),s=(_(this).find(".iconic-was-accordion__handle"),_(this).siblings(".value"));a.hasClass("iconic-was-accordion--active")?(a.removeClass("iconic-was-accordion--active"),s.css("overflow","hidden"),s.height(0),window.setTimeout(function(){s.css("overflow","visible"),s.hide()},150)):(e=i.get_hidden_elements_height(s),s.show(),s.height(e),a.addClass("iconic-was-accordion--active"),s.css("overflow","hidden"),window.setTimeout(function(){s.css("overflow","visible")},150))})},reset_accordion_height:function(){var e=_(".iconic-was-accordion--active");e.length<=0||e.each(function(e,a){var a=_(a).find("td.value"),s=a.children(),t=0;0<s.length&&s.each(function(e,a){_(a).is(":visible")&&(t+=_(a).outerHeight(!0))}),a.height(t)})}
1,get_hidden_elements_height:function(e){e.height("auto").addClass("test");var a=e.height();return e.height(0),a},open_first_swatch:function(){var e=i.els.$trs&&i.els.$trs.first()&&i.els.$trs.first().find(".label");e&&e.trigger("click")}},h={on_ready:function(){_("ul.iconic-was-swatches.iconic-was-swatches--loop").not(".iconic-was-swatches--stacked").each(function(){var e=_(this);window.setTimeout(function(){h.handle_adaptive_for_single_ul(e)},1)}),_(t.body).on("click",".iconic-was-swatches__item--dummy",h.show_all_attributes);var e=d.debounce(h.on_window_resize,250);_(window).resize(e)},on_window_resize:function(){_(".iconic-was-swatches").each(function(){var e=_(this);h.handle_adaptive_for_single_ul(e)})},handle_adaptive_for_single_ul:function(e){var a,s,t,i,c,n,o,r,l=e.data("overflow");l&&"stacked"!==l&&(e.removeClass("iconic-was-swatches--loading"),e.css("height","auto"),"slider"===l?((a=0<e.parent("."+(l="iconic-was-swatches--slider-wrapper")).length)||(e.wrap('<div class="'+l+'"></div>'),a=!0),l=e.parent().width(),i=(c=(s=e.find("li")).not(".iconic-was-swatches__label").first()).outerWidth(!0),c=parseInt(c.css("margin-right")),i=(t=Math.floor(l/i))*i-c,!(c=t<s.length)&&a&&e.unwrap(),e.hasClass("flickity-enabled")?c?(e.width(l<i?i:l),e.flickity("resize")):(e.flickity("destroy"),e.width("")):c?(e.width(i),e.flickity({resize:!1,percentPosition:!1,selectedAttraction:.075,friction:.42,pageDots:!1,cellAlign:"left",groupCells:!0,contain:!0,rightToLeft:!1,arrowShape:{x0:20,x1:55,y1:35,x2:60,y2:30,x3:30}})):e.width("")):(n=e.width(),r=o=0,e.find(".iconic-was-swatches__item").each(function(){(o+=_(this).outerWidth(!0))<n&&r++}),h.adapt(e,r)))},get_inner_elements_total_width:function(e){var a=0;return jQuery(e).find(">li").each(function(){jQuery(this).is(":visible")&&(a+=jQuery(this).outerWidth(!0))}),a},adapt:function(e,a){var s=e.find(">li").not(".iconic-was-swatches__item--dummy"),s=(s.removeClass("iconic-was-swatches__item--hidden"),!(s.length<=a)&&s.slice(a-1));s?(s.addClass("iconic-was-swatches__item--hidden"),e.find(">.iconic-was-swatches__item--dummy a").text("+"+s.length),e.find(">.iconic-was-swatches__item--dummy").removeClass("iconic-was-swatches__item--hidden"),e.addClass("iconic-was-swatches--single-line")):(e.find(">.iconic-was-swatches__item--dummy").addClass("iconic-was-swatches__item--hidden"),e.removeClass("iconic-was-swatches--single-line"))},show_all_attributes:function(e){e.preventDefault();e=_(this).parent();e.hasClass("iconic-was-swatches--loop")?window.location.href=_(this).find("a").attr("href"):(e.find(".iconic-was-swatches__item--hidden").removeClass("iconic-was-swatches__item--hidden"),_(this).addClass("iconic-was-swatches__item--hidden"),e.removeClass("iconic-was-swatches--single-line"),e.data("overflow","stacked"),e.find(".iconic-was-swatches__item--dummy").hide(),_(t).trigger("iconic_was_reset_accordion_height"))}},n={cache:function(){n.cache.vars={tooltip:".iconic-was-tooltip",arrow:".iconic-was-tooltip__arrow",anchor:".iconic-was-swatches--tooltips .iconic-was-swatch:not(.iconic-was-swatch--dummy)"}},on_ready:function(){n.cache(),0===_(".iconic-was-tooltip").length&&(_("body").append('<div class="iconic-was-tooltip"><div class="iconic-was-tooltip__inner_wrap"></div><div class="iconic-was-tooltip__arrow"></div></div>'),_(".iconic-was-tooltip").hide()),_(window).resize(n.on_resize);var e=d.debounce(n.handle_mouseenter,200),a=d.debounce(n.handle_mouseleave,200);iconic_was_vars.is_mobile?(n.mobile_click_handler(),_(window).scroll(n.handle_mouseleave),_(window).on("resize_threshold",n.handle_mouseleave)):(_(t.body).on("mouseenter",n.cache.vars.anchor,e),_(t.body).on("mouseleave",n.cache.vars.anchor,a),_(window).scroll(n.handle_mouseleave).resize(n.handle_mouseleave))},handle_mouseenter:function(){var e=_(this),a=e.find(".iconic-was-swatch__text").html(),s=_(n.cache.vars.tooltip),a=(s.find(".iconic-was-tooltip__inner_wrap").html(a),s.css({left:"",right:""}),s.find(n.cache.vars.arrow)),t=s.outerWidth(!0),e=e.get(0).getBoundingClientRect(),i=e.left+e.width/2,c=(c=i-t/2)<0?0:c,t=(_(window).width()<t+c?s.css({left:"",right:0}
1):s.css({left:c,right:""}),s.outerHeight(!0)),c=e.top-t,e=(s.css("top",c).show().addClass("iconic-was-tooltip--animate-opacity iconic-was-tooltip--animate-top iconic-was-tooltip--active"),s.offset());a.css("left",i-e.left)},handle_mouseleave:function(){_(n.cache.vars.tooltip).removeClass("iconic-was-tooltip--animate-top iconic-was-tooltip--animate-opacity iconic-was-tooltip--active")},mobile_click_handler:function(){var c=t.querySelectorAll(n.cache.vars.anchor);t.addEventListener("click",function(e){var a,s=e.composedPath(),t=!1;for(a in c){var i=c[a];if(s.includes(i)){t=i;break}}t?n.handle_mouseenter.call(t):n.handle_mouseleave()})},on_resize:function(){var e=d.vars.window_size,a=_(window).width();10<Math.abs(e-a)&&(d.vars.window_size=a,_(window).trigger("resize_threshold"))}};_(t).ready(d.on_ready),_(t).ready(i.on_ready),_(t).ready(n.on_ready),_(t).ready(h.on_ready),_(t).on("iconic_was_reset_accordion_height",i.reset_accordion_height)}(jQuery,document);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.