{"version":3,"file":"gf_image_choices.js","names":["imageChoices","$","cssClasses","selected","hover","focus","getFormMarkupVersion","form_or_id","formElementID","$form","formID","attr","window","hasOwnProperty","gf_get_form_id_by_html_id","replace","jQuery","indexOf","toString","length","find","is","isLegacyMarkup","isLegacyMode","imageChoicesVars","useNewFeatures","$fieldChoices","$field","choicesSelector","closest","SelectedFields","form_id","each","this","addClass","InitLightbox","field_id","elementorCompat","opts","captions","gform","applyFilters","hasClass","substring","lastIndexOf","captionType","captionsData","jetslothLightbox","onChoiceKeyPress","e","$input","target","keyCode","preventDefault","stopImmediatePropagation","direction","$inputWrap","next","prev","onChoicesSelectAllClick","$toggle","$choices","data","n","choiceEl","$choice","onChoiceLabelClick","$label","$wrap","first","setTimeout","not","removeClass","prop","SetUpFields","current_page","i","$fields","t","toggle","on","$this","blur","wrap","append","document","parent","$choicesField","id","escapedTitle","html","thumbUrl","imgUrl","elementorAtts","$lightboxBtn","prepend","InitLazyLoad","jetslothMatchHeights","doAction","imageChoices_SetUpFields","ConditionalLogic","bind","event","gformGetOptionLabel","fields","isInit","element","selected_value","current_price","colorPicker_gformGetOptionLabel","index","price","gformGetPrice","current_diff","original_label","diff","gformGetPriceDifference","gformToNumber","price_label","tagName","toLowerCase","label","gform_format_option_label","imageChoices_gformGetOptionLabel","fullLabel","fieldLabel","priceLabel","selectedPrice","formId","fieldId","markup","$allOptions","$thisOption","eq","loadedChoices","$option","$thisOptionLabel","thisOptionImage","thisOptionLightboxSrc","jmhId","jmhAttr","shouldLazyLoad","inArray","imageMarkup","join","observer","observe","imageChoices_gform_format_option_label","gftt","option_label_reinit","colorPicker_gform_format_option_label","onImageLoaded","$el","push","loadImage","img","Image","onload","css","src","lazyLoad","elements","item","intersectionRatio","unobserve","lazyLoadInit","lazyLoadOptions","rootMargin","threshold","IntersectionObserver","$page"],"sources":["gf_image_choices.js"],"sourcesContent":["var imageChoices = imageChoices || {};\n(function($){\n\n\timageChoices.cssClasses = {\n\t\t\"selected\": \"image-choices-choice-selected\",\n\t\t\"hover\": \"image-choices-choice-hover\",\n\t\t\"focus\": \"image-choices-choice-focus\"\n\t}\n\n\timageChoices.getFormMarkupVersion = function( form_or_id ){\n\t\tvar formElementID;\n\t\tvar formID = '';\n\t\tvar $form;\n\n\t\tif ( typeof form_or_id === 'undefined' || ( typeof form_or_id === 'string' && form_or_id === '' ) || ( typeof form_or_id === 'number' && form_or_id <= 0 ) ) {\n\t\t\tformElementID = $('form[id^=\"gform_\"]:first').attr('id');\n\t\t\tformID = ( window.hasOwnProperty('gf_get_form_id_by_html_id') ) ? window.gf_get_form_id_by_html_id( formElementID ) : formElementID.replace('gform_', '');\n\t\t\t$form = $('#' + formElementID);\n\t\t}\n\t\telse if ( form_or_id instanceof jQuery ) {\n\t\t\tformElementID = form_or_id.attr('id');\n\t\t\tformID = ( window.hasOwnProperty('gf_get_form_id_by_html_id') ) ? window.gf_get_form_id_by_html_id( formElementID ) : formElementID.replace('gform_', '');\n\t\t\t$form = form_or_id;\n\t\t}\n\t\telse if ( typeof form_or_id === 'string' && form_or_id.indexOf(\"gform_\") !== -1 ) {\n\t\t\tformID = (window.hasOwnProperty('gf_get_form_id_by_html_id')) ? window.gf_get_form_id_by_html_id( form_or_id ) : form_or_id.replace('gform_', '');\n\t\t\tformElementID = \"gform_\" + formID;\n\t\t\t$form = $('#' + formElementID);\n\t\t}\n\t\telse {\n\t\t\tformID = (window.hasOwnProperty('gf_get_form_id_by_html_id')) ? window.gf_get_form_id_by_html_id( \"gform_\" + form_or_id.toString() ) : form_or_id.toString();\n\t\t\tformElementID = \"gform_\" + formID;\n\t\t\t$form = $('#' + formElementID);\n\t\t}\n\n\t\tif ( !$form.length ) {\n\t\t\treturn $('.gform_body .gfield:first').is('li') ? 1 : 2;\n\t\t}\n\n\t\treturn $form.find('.gform_body .gfield:first').is('li') ? 1 : 2;\n\t};\n\n\timageChoices.isLegacyMarkup = function( form_or_id ) {\n\t\treturn ( imageChoices.getFormMarkupVersion( form_or_id ) === 1 );\n\t}\n\n\timageChoices.isLegacyMode = function() {\n\t\tvar useNewFeatures = ( imageChoicesVars.hasOwnProperty('useNewFeatures') && imageChoicesVars.useNewFeatures.toString() === 'true');\n\t\treturn !useNewFeatures;\n\t};\n\n\timageChoices.$fieldChoices = function( $field ) {\n\t\tif ( typeof $field === 'undefined' || $field instanceof jQuery === false) {\n\t\t\treturn [];\n\t\t}\n\n\t\tvar choicesSelector = '.ginput_container .gfield_radio div[class*=\"gchoice\"], .ginput_container .gfield_checkbox div[class*=\"gchoice\"]:not(.gchoice_select_all)';// GF 2.5+\n\t\tif ( imageChoices.isLegacyMarkup( $field.closest('[id^=\"gform_wrapper_\"]') ) ) {\n\t\t\tchoicesSelector = '.ginput_container .gfield_radio li, .ginput_container .gfield_checkbox li:not(.gchoice_select_all)';\n\t\t}\n\n\t\treturn $field.find(choicesSelector);\n\t};\n\n\timageChoices.SelectedFields = function( form_id ) {\n\t\tvar $form = ( typeof form_id !== 'undefined' && form_id !== '' ) ? $('#gform_'+form_id) : $('.gform_wrapper form');\n\t\timageChoices.$fieldChoices( $form.find('.image-choices-field') ).find('input:checked').each(function() {\n\t\t\tvar $input = $(this);\n\t\t\tvar $choice = $input.closest('[class*=\"gchoice\"]');// TODO: Update to just .gchoice ?\n\t\t\t$choice.addClass(imageChoices.cssClasses.selected);\n\t\t\t/*\n\t\t\tif ( $input.val() === \"gf_other_choice\" ) {\n\t\t\t\t$input.trigger('click')\n\t\t\t}\n\t\t\t*/\n\t\t});\n\t};\n\n\timageChoices.InitLightbox = function( form_id ){\n\t\tvar $form = ( typeof form_id !== 'undefined' && form_id !== '' ) ? $('#gform_'+form_id) : $('.gform_wrapper form');\n\t\t$form.find('.image-choices-field.image-choices-use-lightbox').each(function(){\n\t\t\tvar $field = $(this);\n\t\t\tvar field_id = $field.attr('id');\n\t\t\tif ( !imageChoicesVars.hasOwnProperty('elementorCompat') || imageChoicesVars.elementorCompat !== 'elementor' ) {\n\t\t\t\tvar opts = {\n\t\t\t\t\tcaptions: imageChoices.isLegacyMode() || gform.applyFilters('gfic_lightbox_captions', $field.hasClass('ic-lightbox-captions'), form_id.toString(), field_id.substring( field_id.lastIndexOf('_') + 1 )),\n\t\t\t\t\tcaptionType: 'data',\n\t\t\t\t\tcaptionsData: 'caption'\n\t\t\t\t};\n\t\t\t\t$field.find('.image-choices-lightbox-btn').jetslothLightbox(opts);\n\t\t\t}\n\t\t});\n\t};\n\n\timageChoices.onChoiceKeyPress = function(e) {\n\t\tvar TABKEY = 9;\n\t\tvar SPACEKEY = 32;\n\t\tvar $input = $(e.target);\n\t\tvar $field = $input.closest('.gfield');\n\n\t\tif (e.keyCode === SPACEKEY && ( $input.is(':checkbox') || $input.is(':radio') ) ) {\n\t\t\tif ($input.is(':radio') && !$input.is(':checked')) {\n\t\t\t\te.preventDefault();\n\t\t\t\t//e.stopImmediatePropagation();\n\t\t\t\t//$input.next('label').click();\n\t\t\t}\n\t\t\telse if ($input.is(':checkbox')) {\n\t\t\t\te.preventDefault();\n\t\t\t\te.stopImmediatePropagation();\n\t\t\t\t//$input.next('label').click();\n\t\t\t}\n\t\t}\n\t\telse if (e.keyCode === TABKEY && $field.hasClass('image-choices-field')) {\n\t\t\tvar direction = (e.shiftKey) ? 'previous' : 'next';\n\t\t\tvar $inputWrap = $input.closest('.image-choices-choice');\n\n\t\t\tif (direction === 'next') {\n\t\t\t\tif (!$inputWrap.is(':last-child')) {\n\t\t\t\t\te.preventDefault();\n\t\t\t\t\t//e.stopImmediatePropagation();\n\t\t\t\t\t$inputWrap.next('.image-choices-choice').find('> input').focus();\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if (direction === 'previous') {\n\t\t\t\tif (!$inputWrap.is(':first-child')) {\n\t\t\t\t\te.preventDefault();\n\t\t\t\t\t//e.stopImmediatePropagation();\n\t\t\t\t\t$inputWrap.prev('.image-choices-choice').find('> input').focus();\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\t};\n\n\timageChoices.onChoicesSelectAllClick = function(e) {\n\t\tvar $toggle = $(this);\n\t\tvar $field = $toggle.closest('.gfield');\n\t\tvar toggledOn = $toggle.is('input') ? $toggle.is(':checked') : $toggle.data('checked');\n\t\tvar $choices = toggledOn ? $field.find('.image-choices-choice input:checked') : $field.find('.image-choices-choice input:not(:checked)');\n\n\t\tif ($choices.length) {\n\t\t\t$choices.each(function(n, choiceEl){\n\t\t\t\tvar $choice = $(choiceEl);\n\t\t\t\timageChoices.onChoiceLabelClick( $choice.next('label') );\n\t\t\t});\n\t\t}\n\t};\n\n\timageChoices.onChoiceLabelClick = function( $label ) {\n\t\tvar $choice = $label.closest('[class*=\"gchoice\"]');\n\t\tvar $wrap = $choice.closest('.gfield_checkbox, .gfield_radio').first();\n\n\t\tvar $input = $choice.find('input');\n\n\t\tif ($choice.hasClass('image-choices-choice-other')) {\n\t\t\tsetTimeout(function(){\n\t\t\t\t$choice.find('.gf_other_wrap').addClass('active');\n\t\t\t\t$choice.find('input:text').focus();\n\t\t\t}, 250)\n\t\t}\n\n\t\tif ($wrap.hasClass('gfield_radio')) {\n\t\t\t// radio\n\t\t\t$wrap.find('.'+imageChoices.cssClasses.selected).not($choice).removeClass(imageChoices.cssClasses.selected).find('input').prop('checked', false);\n\t\t\t$choice.addClass(imageChoices.cssClasses.selected);\n\t\t}\n\t\telse if ($wrap.hasClass('gfield_checkbox')) {\n\t\t\t// checkbox\n\t\t\tif ( $input.is( ':checked' ) ) {\n\t\t\t\t$choice.addClass(imageChoices.cssClasses.selected);\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$choice.removeClass(imageChoices.cssClasses.selected);\n\t\t\t}\n\t\t}\n\t};\n\n\n\timageChoices.SetUpFields = function( form_id, current_page ) {\n\n\t\t// Entry detail view, doesn't get the custom class on the \"field\" wrap (it's .detail-view not .gfield)\n\t\t// If we add the classes here, the rest of the script (and styles) will work\n\t\t$('.entry-details .detail-view .image-choices-choice-image-wrap').each(function(i){\n\t\t\tvar $imgWrap = $(this);\n\t\t\tvar $field = $imgWrap.closest('.detail-view');\n\t\t\t$field.addClass('image-choices-field image-choices-show-labels');\n\t\t});\n\n\n\t\tvar $form = ( typeof form_id !== 'undefined' && form_id !== '' ) ? $('#gform_'+form_id) : $('.gform_wrapper form');\n\n\t\t// WooCommerce Gravity Forms Product Add-Ons compatibility\n\t\tif ( !$form.length && $('.gform_variation_wrapper').length ) {\n\t\t\t$form = $('.gform_variation_wrapper');\n\t\t}\n\n\t\tvar $fields = $form.find('.image-choices-field');\n\t\tif ( $fields.length ) {\n\t\t\t$fields.find('.gfield_radio, .gfield_checkbox').addClass('gform-theme__no-reset--children');\n\t\t}\n\n\t\tvar $choices = imageChoices.$fieldChoices( $fields );\n\n\t\t$form.find('.gchoice_select_all input, button[id$=\"select_all\"]').each(function(t, toggle){\n\t\t\t$(toggle).on('click', imageChoices.onChoicesSelectAllClick);\n\t\t});\n\n\t\tif ($choices.length > 0) {\n\n\t\t\t$choices.each(function(){\n\t\t\t\tvar $choice = $(this);\n\n\t\t\t\tvar choiceInit = $choice.data('init');\n\t\t\t\tif (choiceInit !== true) {\n\n\t\t\t\t\t$choice.data('init', true);\n\n\t\t\t\t\t$choice.find('label').addClass('gform-field-label');// for non gf theme installs\n\n\t\t\t\t\t// add a hover state\n\t\t\t\t\t$choice.find('label').hover(function(e){\n\t\t\t\t\t\tvar $this = $(this);\n\t\t\t\t\t\tif ( $this.find('input').is(':disabled') ) {\n\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tvar $choice = $this.closest('[class*=\"gchoice\"]');// TODO: Update to just .gchoice ?\n\t\t\t\t\t\t\t$choice.addClass(imageChoices.cssClasses.hover);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}, function(e){\n\t\t\t\t\t\tvar $this = $(this);\n\t\t\t\t\t\tif ( $this.find('input').is(':disabled') ){\n\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tvar $choice = $this.closest('[class*=\"gchoice\"]');// TODO: Update to just .gchoice ?\n\t\t\t\t\t\t\t$choice.removeClass(imageChoices.cssClasses.hover);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t});\n\n\t\t\t\t\t$choice.find('input').focus(function() {\n\t\t\t\t\t\tvar $this = $(this);\n\t\t\t\t\t\tvar $choice = $this.closest('[class*=\"gchoice\"]');// TODO: Update to just .gchoice ?\n\t\t\t\t\t\t$choice.addClass(imageChoices.cssClasses.focus);\n\t\t\t\t\t}).blur( function() {\n\t\t\t\t\t\tvar $this = $(this);\n\t\t\t\t\t\tvar $choice = $this.closest('[class*=\"gchoice\"]');// TODO: Update to just .gchoice ?\n\t\t\t\t\t\t$choice.removeClass(imageChoices.cssClasses.focus);\n\t\t\t\t\t});\n\n\n\t\t\t\t\tif ($choice.find('input[value=\"gf_other_choice\"]').length) {\n\n\t\t\t\t\t\t$choice.addClass('image-choices-choice-other');\n\n\t\t\t\t\t\t$choice.find('input[type=\"text\"]').wrap('
');\n\t\t\t\t\t\t$('.gf_other_wrap').append('');\n\t\t\t\t\t\t$(document).on('click', '.gf_other_close', function(e){\n\t\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t\t\t$(this).parent().removeClass('active')\n\t\t\t\t\t\t});\n\n\t\t\t\t\t\t$choice.find( 'input:not([type=\"text\"])' ).on('click', function() {\n\t\t\t\t\t\t\tvar $this = $( this );\n\t\t\t\t\t\t\tvar $label = $this.closest('.image-choices-choice').find('label')\n\t\t\t\t\t\t\timageChoices.onChoiceLabelClick( $label );\n\t\t\t\t\t\t} );\n\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\n\t\t\t\t\t\t$choice.find( 'input' ).on('click', function() {\n\t\t\t\t\t\t\tvar $this = $( this );\n\t\t\t\t\t\t\tvar $label = $this.closest('.image-choices-choice').find('label')\n\t\t\t\t\t\t\timageChoices.onChoiceLabelClick( $label );\n\t\t\t\t\t\t} );\n\n\t\t\t\t\t}\n\n\t\t\t\t\tvar $choicesField = $choice.closest('.image-choices-field');\n\t\t\t\t\tif ($choicesField.hasClass('image-choices-use-lightbox') && !$choice.find('.image-choices-lightbox-btn').length) {\n\t\t\t\t\t\tvar id = $choicesField.attr('id');\n\t\t\t\t\t\tvar title = $choice.find('.image-choices-choice-text').html();\n\t\t\t\t\t\tvar escapedTitle = (title + '').replace(/[\\\\\"']/g, '\\\\$&').replace(/\\u0000/g, '\\\\0');\n\t\t\t\t\t\tvar thumbUrl = $choice.find('.image-choices-choice-image').attr('src');\n\t\t\t\t\t\tvar imgUrl = $choice.find('.image-choices-choice-image').data('lightbox-src');\n\t\t\t\t\t\tif (typeof imgUrl === 'undefined' || imgUrl === '') {\n\t\t\t\t\t\t\timgUrl = thumbUrl;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (imgUrl !== '') {\n\n\t\t\t\t\t\t\tvar elementorAtts = ( imageChoicesVars.hasOwnProperty('elementorCompat') && imageChoicesVars.elementorCompat !== 'elementor' ) ? 'data-elementor-open-lightbox=\"no\"' : '';\n\n\t\t\t\t\t\t\tvar $lightboxBtn = $('');\n\t\t\t\t\t\t\t$lightboxBtn.data('caption', escapedTitle);\n\t\t\t\t\t\t\t$choice.prepend($lightboxBtn);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tsetTimeout(function(){\n\t\t\t\timageChoices.SelectedFields( form_id );\n\t\t\t\timageChoices.InitLightbox( form_id );\n\t\t\t\timageChoices.InitLazyLoad( form_id, current_page );\n\t\t\t\tif ( typeof jetslothMatchHeights !== 'undefined' ) {\n\t\t\t\t\tjetslothMatchHeights();\n\t\t\t\t}\n\t\t\t\tgform.doAction('gfic_setup', form_id);\n\t\t\t}, 100);\n\n\t\t}\n\n\t};\n\twindow.imageChoices_SetUpFields = imageChoices.SetUpFields;// legacy support added in 1.3.0\n\n\timageChoices.ConditionalLogic = function( form_id ) {\n\t\t// TODO: specific form by id\n\t\tvar $form = ( typeof form_id !== 'undefined' && form_id !== '' ) ? $('#gform_'+form_id) : $('.gform_wrapper form');\n\t\t// WooCommerce Gravity Forms Product Add-Ons compatibility\n\t\tif ( !$form.length && $('.gform_variation_wrapper').length ) {\n\t\t\t$form = $('.gform_variation_wrapper');\n\t\t}\n\n\t\tvar $choicesField = $form.find('.image-choices-field');\n\t\tif ($choicesField.length) {\n\t\t\t$choicesField.each(function(){\n\t\t\t\tvar $field = $(this);\n\t\t\t\tif ($field.is(':hidden')) {\n\t\t\t\t\t$field.find('.image-choices-choice').removeClass(imageChoices.cssClasses.selected + ' ' + imageChoices.cssClasses.hover + ' ' + imageChoices.cssClasses.focus);\n\t\t\t\t}\n\t\t\t});\n\t\t\tsetTimeout(function(){\n\t\t\t\tif ( typeof jetslothMatchHeights !== 'undefined' ) {\n\t\t\t\t\tjetslothMatchHeights();\n\t\t\t\t}\n\t\t\t}, 10);\n\t\t}\n\t};\n\n\t$(document).bind('gform_post_render', function(event, form_id, current_page){\n\t\twindow.gformGetOptionLabel = imageChoices.gformGetOptionLabel;\n\t\timageChoices.SetUpFields( form_id, current_page );\n\t});\n\n\n\t$(document).bind('gform_post_conditional_logic', function(event, form_id, fields, isInit){\n\t\timageChoices.ConditionalLogic( form_id );\n\t\timageChoices.SelectedFields( form_id );\n\t});\n\n\t$(document).on('gfcf/conversational/navigate/start gfcf/conversational/navigate/next gfcf/conversational/navigate/prev gfcf/conversational/navigate/error', function(){\n\t\tif ( jetslothMatchHeights ) {\n\t\t\tjetslothMatchHeights();\n\t\t}\n\t});\n\n\timageChoices.gformGetOptionLabel = function(element, selected_value, current_price, form_id, field_id) {\n\t\telement = $(element);\n\n\t\t// Added for cross compat with Color Picker\n\t\tif (element.closest('.gfield').hasClass('color-picker-field') && typeof window.colorPicker_gformGetOptionLabel === 'function') {\n\t\t\treturn window.colorPicker_gformGetOptionLabel(element, selected_value, current_price, form_id, field_id);\n\t\t}\n\n\t\tvar wrap = element.closest('[class*=\"gchoice\"]');// TODO: Update to just .gchoice\n\t\tvar index = wrap.index();\n\n\t\tvar price = gformGetPrice(selected_value);\n\t\tvar current_diff = element.attr('price');\n\t\tvar original_label = element.html().replace(//i, \"\").replace(current_diff, \"\");\n\n\t\tvar diff = gformGetPriceDifference(current_price, price);\n\t\tdiff = gformToNumber(diff) == 0 ? \"\" : \" \" + diff;\n\t\telement.attr('price', diff);\n\n\t\t//don't add for drop down items (not supported)\n\t\tvar price_label = element[0].tagName.toLowerCase() == \"option\" ? \" \" + diff : \"\" + diff + \"\";\n\t\tvar label = original_label + price_label;\n\n\t\t//calling hook to allow for custom option formatting\n\t\tif(window[\"gform_format_option_label\"])\n\t\t\tlabel = gform_format_option_label(label, original_label, price_label, current_price, price, form_id, field_id, index);\n\n\t\treturn label;\n\t};\n\twindow.imageChoices_gformGetOptionLabel = imageChoices.gformGetOptionLabel;// legacy support added in 1.3.0\n\twindow.gformGetOptionLabel = imageChoices.gformGetOptionLabel;\n\n\n\n\timageChoices.gform_format_option_label = function(fullLabel, fieldLabel, priceLabel, selectedPrice, price, formId, fieldId, index) {\n\t\tvar markup = [fullLabel];\n\n\t\tvar $field = $('#gform_'+formId+' .gfield#field_'+formId+'_'+fieldId);\n\n\t\tif ($field.length && $field.hasClass('image-choices-field')) {\n\n\t\t\tvar $allOptions = $field.find('[class*=\"gchoice\"]');// TODO: Update to just .gchoice ?\n\t\t\tvar $thisOption = (typeof index !== 'undefined' && index >= 0) ? $allOptions.eq(index) : $allOptions;// when index is not passed in or not valid, get all options\n\t\t\tvar loadedChoices = ( typeof $field.data('jetsloth-lazy-loaded') !== 'undefined' ) ? $field.data('jetsloth-lazy-loaded') : [];\n\n\t\t\t$thisOption.each(function(){\n\n\t\t\t\tvar $option = $(this);\n\n\t\t\t\tvar $thisOptionLabel = $option.find('label');\n\t\t\t\tvar $thisOptionInput = $option.find('input');\n\n\t\t\t\tvar thisOptionImage = $thisOptionLabel.data('img');\n\t\t\t\tvar thisOptionLightboxSrc = $thisOptionLabel.data('lightbox-src');\n\n\t\t\t\t// Get the label content from the data attribute\n\t\t\t\t/*\n\t\t\t\tvar fallbackFieldLabel = $thisOptionLabel.attr('data-text');\n\t\t\t\tif ( (typeof fieldLabel === 'undefined' || fieldLabel === '') && fallbackFieldLabel !== '') {\n\t\t\t\t\tfieldLabel = fallbackFieldLabel;\n\t\t\t\t}\n\t\t\t\t*/\n\t\t\t\tfieldLabel = $thisOptionLabel.attr('data-text');\n\n\t\t\t\tif ( priceLabel === fieldLabel ) {\n\t\t\t\t\tpriceLabel = \"\";\n\t\t\t\t}\n\n\t\t\t\tif ( priceLabel === \"\" ) {\n\t\t\t\t\tpriceLabel = \" \";\n\t\t\t\t}\n\n\t\t\t\tvar jmhId = formId.toString() + '_' + fieldId.toString();\n\t\t\t\tvar jmhAttr = ( !imageChoices.isLegacyMode() && ( $field.hasClass('ic-theme--cover-tile') || $field.hasClass('ic-image--natural') ) ) ? ' data-jmh=\"' + jmhId + '_' + index + '\"' : '';\n\n\t\t\t\tvar hasLazyLoad = $field.hasClass('has-jetsloth-lazy');\n\t\t\t\tvar shouldLazyLoad = ( hasLazyLoad && $.inArray( index, loadedChoices ) === -1 );\n\t\t\t\tvar imageMarkup = [\n\t\t\t\t\t'',\n\t\t\t\t\t\t'\"\"',\n\t\t\t\t\t'',\n\t\t\t\t].join('');\n\t\t\t\tif ( shouldLazyLoad ) {\n\t\t\t\t\timageMarkup = [\n\t\t\t\t\t\t'',\n\t\t\t\t\t\t\t'\"\"',\n\t\t\t\t\t\t'',\n\t\t\t\t\t].join('');\n\t\t\t\t}\n\n\t\t\t\tvar jmhID = formId + '_' + fieldId;\n\t\t\t\tmarkup = [\n\t\t\t\t\timageMarkup,\n\t\t\t\t\t'' + gform.applyFilters( 'gfic_choice_text', fieldLabel, selectedPrice, price, formId, fieldId, index ) + '',\n\t\t\t\t\t'' + gform.applyFilters( 'gfic_choice_price', priceLabel, selectedPrice, price, formId, fieldId, index ) + ''\n\t\t\t\t];\n\n\t\t\t\tif ($field.hasClass('image-choices-use-lightbox') && $option.find('.image-choices-lightbox-btn').length) {\n\t\t\t\t\tvar escapedTitle = (fieldLabel + '').replace(/[\\\\\"']/g, '\\\\$&').replace(/\\u0000/g, '\\\\0');\n\t\t\t\t\tvar thumbUrl = thisOptionImage;\n\t\t\t\t\tvar imgUrl = thisOptionLightboxSrc;\n\t\t\t\t\tif (typeof imgUrl === 'undefined' || imgUrl === '') {\n\t\t\t\t\t\timgUrl = thumbUrl;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (imgUrl !== '') {\n\t\t\t\t\t\t$option.find('.image-choices-lightbox-btn').attr('href', imgUrl).data('caption', escapedTitle).attr('rel', fieldId);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif ( typeof jetslothMatchHeights !== 'undefined' ) {\n\t\t\t\t\tsetTimeout(() => jetslothMatchHeights, 100);\n\t\t\t\t}\n\n\t\t\t\tif ( shouldLazyLoad ) {\n\t\t\t\t\tsetTimeout(function(){\n\t\t\t\t\t\t$option.find('.jetsloth-lazy').each(function(){\n\t\t\t\t\t\t\timageChoices.observer.observe( this );\n\t\t\t\t\t\t});\n\t\t\t\t\t}, 100);\n\t\t\t\t}\n\t\t\t});\n\n\t\t}\n\n\t\treturn gform.applyFilters( 'gfic_choice_html', markup.join(''), fieldLabel, priceLabel, selectedPrice, price, formId, fieldId, index );\n\t};\n\twindow.imageChoices_gform_format_option_label = imageChoices.gform_format_option_label;// legacy support added in 1.3.0\n\n\n\twindow.gform_format_option_label = function(fullLabel, fieldLabel, priceLabel, selectedPrice, price, formId, fieldId, index) {\n\n\t\tif ( typeof gftt !== 'undefined' && typeof gftt.option_label_reinit !== 'undefined' ) {\n\t\t\tgftt.option_label_reinit( formId, fieldId );\n\t\t}\n\n\t\t// Added for cross compat with Color Picker\n\t\tvar $field = $('#field_'+formId+'_'+fieldId);\n\t\tif ($field.length && $field.hasClass('color-picker-field') && typeof window.colorPicker_gform_format_option_label === 'function') {\n\t\t\treturn window.colorPicker_gform_format_option_label(fullLabel, fieldLabel, priceLabel, selectedPrice, price, formId, fieldId, index);\n\t\t}\n\n\t\treturn imageChoices.gform_format_option_label(fullLabel, fieldLabel, priceLabel, selectedPrice, price, formId, fieldId, index);\n\t}\n\n\n\timageChoices.onImageLoaded = function( element ) {\n\n\t\tvar $el = $(element);\n\t\t$el.addClass('jetsloth-lazy-loaded');\n\n\t\tvar $field = $el.closest('.gfield');\n\t\tif ( !$field.length ) {\n\t\t\treturn;\n\t\t}\n\n\t\tvar index = $el.closest('li').index();\n\t\tvar loadedChoices = ( typeof $field.data('jetsloth-lazy-loaded') !== 'undefined' ) ? $field.data('jetsloth-lazy-loaded') : [];\n\n\t\tloadedChoices.push( index );\n\t\t$field.data('jetsloth-lazy-loaded', loadedChoices);\n\n\t\tif ( typeof jetslothMatchHeights !== 'undefined' ) {\n\t\t\tsetTimeout(() => jetslothMatchHeights, 100);\n\t\t}\n\t};\n\n\timageChoices.loadImage = function( element ) {\n\n\t\tvar $el = $(element);\n\n\t\tif ( typeof $el.data('lazy-bg') !== 'undefined' && $el.data('lazy-bg') !== '' ) {\n\t\t\tvar img = new Image();\n\t\t\timg.onload = function() {\n\t\t\t\t$el.css('background-image', 'url(' + $el.data('lazy-bg') + ')');\n\t\t\t\timageChoices.onImageLoaded( $el );\n\t\t\t};\n\t\t\timg.src = $el.data('lazy-bg');\n\t\t}\n\t\telse if ( typeof $el.data('lazy-src') !== 'undefined' && $el.data('lazy-src') !== '' ) {\n\t\t\t$el.on('load', function(){\n\t\t\t\timageChoices.onImageLoaded( $el );\n\t\t\t});\n\t\t\t$el.attr('src', $el.data('lazy-src'));\n\t\t}\n\n\t};\n\n\n\timageChoices.lazyLoad = function( elements ) {\n\n\t\t$.each(elements, function(i, item){\n\t\t\tif (item.intersectionRatio > 0) {\n\t\t\t\timageChoices.observer.unobserve(item.target);\n\t\t\t\timageChoices.loadImage(item.target);\n\t\t\t};\n\t\t});\n\n\t};\n\n\tvar lazyLoadInit = false;\n\timageChoices.InitLazyLoad = function( form_id, current_page ) {\n\n\t\tif ( !lazyLoadInit ) {\n\t\t\t// Set up the intersection observer to detect when to define\n\t\t\t// and load the real image source\n\t\t\tvar lazyLoadOptions = {\n\t\t\t\trootMargin: gform.applyFilters( 'gfic_lazy_root_margin', \"100px\" ),\n\t\t\t\tthreshold: gform.applyFilters( 'gfic_lazy_threshold', 1.0 )\n\t\t\t};\n\t\t\timageChoices.observer = new IntersectionObserver(imageChoices.lazyLoad, lazyLoadOptions);\n\t\t\tlazyLoadInit = true;\n\t\t}\n\n\t\tvar $form = $('#gform_' + form_id);\n\t\tvar $page = ( typeof current_page !== 'undefined' ) ? $form.find('#gform_page_' + form_id + '_' + current_page) : [];\n\t\tvar $elements = ( $page.length ) ? $page.find('.image-choices-field .jetsloth-lazy') : $form.find('.image-choices-field .jetsloth-lazy');\n\t\t$elements.each(function(){\n\t\t\timageChoices.observer.observe( this );\n\t\t});\n\n\t}\n\n})(jQuery);\n"],"mappings":"AAAA,IAAIA,aAAeA,cAAgB,CAAC,GACpC,SAAUC,GAETD,aAAaE,WAAa,CACzBC,SAAY,gCACZC,MAAS,6BACTC,MAAS,8BAGVL,aAAaM,qBAAuB,SAAUC,GAC7C,IAAIC,EAEAC,EADAC,EAAS,GAwBb,YArB2B,IAAfH,GAAsD,iBAAfA,GAA0C,KAAfA,GAA+C,iBAAfA,GAA2BA,GAAc,GACtJC,EAAgBP,EAAE,4BAA4BU,KAAK,MACnDD,EAAWE,OAAOC,eAAe,6BAAiCD,OAAOE,0BAA2BN,GAAkBA,EAAcO,QAAQ,SAAU,IACtJN,EAAQR,EAAE,IAAMO,IAEPD,aAAsBS,QAC/BR,EAAgBD,EAAWI,KAAK,MAChCD,EAAWE,OAAOC,eAAe,6BAAiCD,OAAOE,0BAA2BN,GAAkBA,EAAcO,QAAQ,SAAU,IACtJN,EAAQF,GAEuB,iBAAfA,IAA6D,IAAlCA,EAAWU,QAAQ,WAC9DP,EAAUE,OAAOC,eA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