<commit_before><% if @img.has_key?(:parent_fieldset)  %>	
	if ($("#<%=j @img[:parent_fieldset] %>").find(".<%=j @img[:parent_element_id] %>").find(".parent_image").length) {
		var $fieldset = $("#<%=j @img[:parent_fieldset] %>");
		var data = {
			time: $fieldset.attr("id").split("_")[1],
			parentobject: $fieldset.closest(".nested_crimagify_images").data("parentobject"),
			parent: $fieldset.closest(".nested_crimagify_images").data("parent")
		};
		var $areaImg = $fieldset.find(".<%=j @img[:parent_element_id] %>");
		if ($areaImg.find(".image_profile").length) {
			$areaImg.find(".image_profile").remove();
			$areaImg.find(".parent_image").append("<%=j render :partial => 'crimagify/crop_partials/img_final', :object => @img, :locals => { :f => 'f' } %>");
			$areaImg.find(".<%=j @img[:parent_element_id] %>_image_temporal").attr("value", "<%= @img[:path_image] %>");
			$fieldset.find(".id_images").attr("value", array_names);
			$areaImg.find(".<%=j @img[:parent_element_id] %>_crop_x").attr("value", "<%= @img[:crop_x] %>");
			$areaImg.find(".<%=j @img[:parent_element_id] %>_crop_y").attr("value", "<%= @img[:crop_y] %>");
			$areaImg.find(".<%=j @img[:parent_element_id] %>_crop_w").attr("value", "<%= @img[:crop_w] %>");
			$areaImg.find(".<%=j @img[:parent_element_id] %>_crop_h").attr("value", "<%= @img[:crop_h] %>");
		} else{
			$areaImg.find(".img_start").parents('div.crimagify_default_image').hide("slow", function(){});			
			$areaImg.find(".parent_image").append("<%=j render :partial => 'crimagify/crop_partials/img_final', :object => @img, :locals => { :f => 'f' } %>");
			$areaImg.find(".<%=j @img[:parent_element_id] %>_image_temporal").attr("value", "<%= @img[:path_image] %>");
			$areaImg.find(".id_images").attr("value", array_names);
			$areaImg.find(".parent_image").append("<input class='<%=j @img[:parent_element_id] %>_crop_x' name='"+data.parentobject+"["+data.parent+"_attributes]["+data.time+"][<%=j @img[:parent_element_id] %>_crop_x]' type='hidden' value='<%= @img[:crop_x] %>'>");
			$areaImg.find(".parent_image").append("<input class='<%=j @img[:parent_element_id] %>_crop_y' name='"+data.parentobject+"["+data.parent+"_attributes]["+data.time+"][<%=j @img[:parent_element_id] %>_crop_y]' type='hidden' value='<%= @img[:crop_y] %>'>");
			$areaImg.find(".parent_image").append("<input class='<%=j @img[:parent_element_id] %>_crop_w' name='"+data.parentobject+"["+data.parent+"_attributes]["+data.time+"][<%=j @img[:parent_element_id] %>_crop_w]' type='hidden' value='<%= @img[:crop_w] %>'>");
			$areaImg.find(".parent_image").append("<input class='<%=j @img[:parent_element_id] %>_crop_h' name='"+data.parentobject+"["+data.parent+"_attributes]["+data.time+"][<%=j @img[:parent_element_id] %>_crop_h]' type='hidden' value='<%= @img[:crop_h] %>'>");
		}
		$areaImg.find(".nested_uploader").val('');
	}
<% else %>
	var $parent = $("#<%=j @img[:parent_element_id] %>");	
	if ($parent.find(".parent_image").length) {
		if ($parent.find(".image_profile").length) {
			$parent.find(".image_profile").remove();
			$parent.find(".parent_image").append("<%=j render :partial => 'crimagify/crop_partials/img_final', :object => @img, :locals => { :f => 'f' } %>");
			$parent.find(".image_temporal").attr("value", "<%= @img[:path_image] %>");
			$("#id_images").attr("value", array_names);
			$parent.find("#<%=j @img[:parent_element_id] %>_crop_x").attr("value", "<%= @img[:crop_x] %>");
			$parent.find("#<%=j @img[:parent_element_id] %>_crop_y").attr("value", "<%= @img[:crop_y] %>");
			$parent.find("#<%=j @img[:parent_element_id] %>_crop_w").attr("value", "<%= @img[:crop_w] %>");
			$parent.find("#<%=j @img[:parent_element_id] %>_crop_h").attr("value", "<%= @img[:crop_h] %>");
		} else{
			$parent.find(".img_start").parents('div.crimagify_default_image').hide("slow", function(){});	
			$parent.find(".parent_image").append("<%=j render :partial => 'crimagify/crop_partials/img_final', :object => @img, :locals => { :f => 'f' } %>");
			$parent.find(".image_temporal").attr("value", "<%= @img[:path_image] %>");
			$("#id_images").attr("value", array_names);
			$parent.find("#parent_image").append("<input id='<%=j @img[:parent_element_id] %>_crop_x' name='<%=j @img[:parent_element_id] %>_crop_x' type='hidden' value='<%= @img[:crop_x] %>'>");
			$parent.find("#parent_image").append("<input id='<%=j @img[:parent_element_id] %>_crop_y' name='<%=j @img[:parent_element_id] %>_crop_y' type='hidden' value='<%= @img[:crop_y] %>'>");
			$parent.find("#parent_image").append("<input id='<%=j @img[:parent_element_id] %>_crop_w' name='<%=j @img[:parent_element_id] %>_crop_w' type='hidden' value='<%= @img[:crop_w] %>'>");
			$parent.find("#parent_image").append("<input id='<%=j @img[:parent_element_id] %>_crop_h' name='<%=j @img[:parent_element_id] %>_crop_h' type='hidden' value='<%= @img[:crop_h] %>'>");
		}
		$parent.find(".uploader").val('');
	}
<% end %><commit_msg>cambios<commit_after><% if @img.has_key?(:parent_fieldset)  %>	
	if ($("#<%=j @img[:parent_fieldset] %>").find(".<%=j @img[:parent_element_id] %>").find(".parent_image").length) {
		var $fieldset = $("#<%=j @img[:parent_fieldset] %>");
		var data = {
			time: $fieldset.attr("id").split("_")[1],
			parentobject: $fieldset.closest(".nested_crimagify_images").data("parentobject"),
			parent: $fieldset.closest(".nested_crimagify_images").data("parent")
		};
		var $areaImg = $fieldset.find(".<%=j @img[:parent_element_id] %>");
		if ($areaImg.find(".image_profile").length) {
			$areaImg.find(".image_profile").remove();
			$areaImg.find(".parent_image").append("<%=j render :partial => 'crimagify/crop_partials/img_final', :object => @img, :locals => { :f => 'f' } %>");
			$areaImg.find(".<%=j @img[:parent_element_id] %>_image_temporal").attr("value", "<%= @img[:path_image] %>");
			$fieldset.find(".id_images").attr("value", array_names);
			$areaImg.find(".<%=j @img[:parent_element_id] %>_crop_x").attr("value", "<%= @img[:crop_x] %>");
			$areaImg.find(".<%=j @img[:parent_element_id] %>_crop_y").attr("value", "<%= @img[:crop_y] %>");
			$areaImg.find(".<%=j @img[:parent_element_id] %>_crop_w").attr("value", "<%= @img[:crop_w] %>");
			$areaImg.find(".<%=j @img[:parent_element_id] %>_crop_h").attr("value", "<%= @img[:crop_h] %>");
		} else{
			$areaImg.find(".img_start").parents('div.crimagify_default_image').hide("slow", function(){});			
			$areaImg.find(".parent_image").append("<%=j render :partial => 'crimagify/crop_partials/img_final', :object => @img, :locals => { :f => 'f' } %>");
			$areaImg.find(".<%=j @img[:parent_element_id] %>_image_temporal").attr("value", "<%= @img[:path_image] %>");
			$areaImg.find(".id_images").attr("value", array_names);
			$areaImg.find(".parent_image").append("<input class='<%=j @img[:parent_element_id] %>_crop_x' name='"+data.parentobject+"["+data.parent+"_attributes]["+data.time+"][<%=j @img[:parent_element_id] %>_crop_x]' type='hidden' value='<%= @img[:crop_x] %>'>");
			$areaImg.find(".parent_image").append("<input class='<%=j @img[:parent_element_id] %>_crop_y' name='"+data.parentobject+"["+data.parent+"_attributes]["+data.time+"][<%=j @img[:parent_element_id] %>_crop_y]' type='hidden' value='<%= @img[:crop_y] %>'>");
			$areaImg.find(".parent_image").append("<input class='<%=j @img[:parent_element_id] %>_crop_w' name='"+data.parentobject+"["+data.parent+"_attributes]["+data.time+"][<%=j @img[:parent_element_id] %>_crop_w]' type='hidden' value='<%= @img[:crop_w] %>'>");
			$areaImg.find(".parent_image").append("<input class='<%=j @img[:parent_element_id] %>_crop_h' name='"+data.parentobject+"["+data.parent+"_attributes]["+data.time+"][<%=j @img[:parent_element_id] %>_crop_h]' type='hidden' value='<%= @img[:crop_h] %>'>");
		}
		$areaImg.find(".nested_uploader").val('');
	}
<% else %>
	var $parent = $("#<%=j @img[:parent_element_id] %>");	
	if ($parent.find(".parent_image").length) {
		if ($parent.find(".image_profile").length) {
			$parent.find(".image_profile").remove();
			$parent.find(".parent_image").append("<%=j render :partial => 'crimagify/crop_partials/img_final', :object => @img, :locals => { :f => 'f' } %>");
			$parent.find(".<%=j @img[:parent_element_id] %>_image_temporal").attr("value", "<%= @img[:path_image] %>");
			$("#id_images").attr("value", array_names);
			$parent.find("#<%=j @img[:parent_element_id] %>_crop_x").attr("value", "<%= @img[:crop_x] %>");
			$parent.find("#<%=j @img[:parent_element_id] %>_crop_y").attr("value", "<%= @img[:crop_y] %>");
			$parent.find("#<%=j @img[:parent_element_id] %>_crop_w").attr("value", "<%= @img[:crop_w] %>");
			$parent.find("#<%=j @img[:parent_element_id] %>_crop_h").attr("value", "<%= @img[:crop_h] %>");
		} else{
			$parent.find(".img_start").parents('div.crimagify_default_image').hide("slow", function(){});	
			$parent.find(".parent_image").append("<%=j render :partial => 'crimagify/crop_partials/img_final', :object => @img, :locals => { :f => 'f' } %>");
			$parent.find(".<%=j @img[:parent_element_id] %>_image_temporal").attr("value", "<%= @img[:path_image] %>");
			$("#id_images").attr("value", array_names);
			$parent.find("#parent_image").append("<input id='<%=j @img[:parent_element_id] %>_crop_x' name='<%=j @img[:parent_element_id] %>_crop_x' type='hidden' value='<%= @img[:crop_x] %>'>");
			$parent.find("#parent_image").append("<input id='<%=j @img[:parent_element_id] %>_crop_y' name='<%=j @img[:parent_element_id] %>_crop_y' type='hidden' value='<%= @img[:crop_y] %>'>");
			$parent.find("#parent_image").append("<input id='<%=j @img[:parent_element_id] %>_crop_w' name='<%=j @img[:parent_element_id] %>_crop_w' type='hidden' value='<%= @img[:crop_w] %>'>");
			$parent.find("#parent_image").append("<input id='<%=j @img[:parent_element_id] %>_crop_h' name='<%=j @img[:parent_element_id] %>_crop_h' type='hidden' value='<%= @img[:crop_h] %>'>");
		}
		$parent.find(".uploader").val('');
	}
<% end %>
{'fraction_non_alphanumeric': 0.2892344980811957, 'fraction_numerical': 0.00020197939810139365, 'mean_word_length': 7.529715762273902, 'pattern_counts': {'":': 0, '<': 137, '<?xml version=': 0, '>': 169, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '972079', 'n_tokens_mistral': 4188, 'n_tokens_neox': 3772, 'n_words': 434}