<commit_before>/*
* jQuery Mobile Framework : "checkboxradio" plugin
* Copyright (c) jQuery Project
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*/  
(function($, undefined ) {
$.widget( "mobile.checkboxradio", $.mobile.widget, {
	options: {
		theme: null
	},
	_create: function(){
		var self = this,
			input = this.element,
			label = input.closest("form,fieldset,[data-role='page']").find("label[for='" + input.attr( "id" ) + "']"),
			inputtype = input.attr( "type" ),
			checkedicon = "ui-icon-" + inputtype + "-on",
			uncheckedicon = "ui-icon-" + inputtype + "-off";

		if ( inputtype != "checkbox" && inputtype != "radio" ) { return; }

		// If there's no selected theme...
		if( !this.options.theme ) {
			this.options.theme = this.element.data( "theme" );
		}

		label
			.buttonMarkup({
				theme: this.options.theme,
				icon: this.element.parents( "[data-type='horizontal']" ).length ? undefined : uncheckedicon,
				shadow: false
			});
		
		// wrap the input + label in a div 
		input
			.add( label )
			.wrapAll( "<div class='ui-" + inputtype +"'></div>" );
		
		label.bind({
			mouseover: function() {
				if( $(this).parent().is('.ui-disabled') ){ return false; }
			},
			
			"touchmove": function( event ){
				var oe = event.originalEvent.touches[0];
				if( label.data("movestart") ){
					if( Math.abs( label.data("movestart")[0] - oe.pageX ) > 10 ||
						Math.abs( abel.data("movestart")[1] - oe.pageY ) > 10 ){
							label.data("moved", true);
						}
				}
				else{
					label.data("movestart", [ parseFloat( oe.pageX ), parseFloat( oe.pageY ) ]);
				}
			},
			
			"touchend mouseup": function( event ){
				label.removeData("movestart");
				if( label.data("etype") && label.data("etype") !== event.type || label.data("moved") ){
					label.removeData("etype").removeData("moved");
					if( label.data("moved") ){
						label.removeData("moved");
					}
					return false;
				}
				label.data( "etype", event.type );
				self._cacheVals();
				input.attr( "checked", inputtype === "radio" && true || !input.is( ":checked" ) );
				self._updateAll();
				event.preventDefault();
			},
			
			click: false
			<commit_msg>Fixed a typo in checkboxradio which causes JS errors.<commit_after>/*
* jQuery Mobile Framework : "checkboxradio" plugin
* Copyright (c) jQuery Project
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*/  
(function($, undefined ) {
$.widget( "mobile.checkboxradio", $.mobile.widget, {
	options: {
		theme: null
	},
	_create: function(){
		var self = this,
			input = this.element,
			label = input.closest("form,fieldset,[data-role='page']").find("label[for='" + input.attr( "id" ) + "']"),
			inputtype = input.attr( "type" ),
			checkedicon = "ui-icon-" + inputtype + "-on",
			uncheckedicon = "ui-icon-" + inputtype + "-off";

		if ( inputtype != "checkbox" && inputtype != "radio" ) { return; }

		// If there's no selected theme...
		if( !this.options.theme ) {
			this.options.theme = this.element.data( "theme" );
		}

		label
			.buttonMarkup({
				theme: this.options.theme,
				icon: this.element.parents( "[data-type='horizontal']" ).length ? undefined : uncheckedicon,
				shadow: false
			});
		
		// wrap the input + label in a div 
		input
			.add( label )
			.wrapAll( "<div class='ui-" + inputtype +"'></div>" );
		
		label.bind({
			mouseover: function() {
				if( $(this).parent().is('.ui-disabled') ){ return false; }
			},
			
			"touchmove": function( event ){
				var oe = event.originalEvent.touches[0];
				if( label.data("movestart") ){
					if( Math.abs( label.data("movestart")[0] - oe.pageX ) > 10 ||
						Math.abs( label.data("movestart")[1] - oe.pageY ) > 10 ){
							label.data("moved", true);
						}
				}
				else{
					label.data("movestart", [ parseFloat( oe.pageX ), parseFloat( oe.pageY ) ]);
				}
			},
			
			"touchend mouseup": function( event ){
				label.removeData("movestart");
				if( label.data("etype") && label.data("etype") !== event.type || label.data("moved") ){
					label.removeData("etype").removeData("moved");
					if( label.data("moved") ){
						label.removeData("moved");
					}
					return false;
				}
				label.data( "etype", event.type );
				self._cacheVals();
				input.attr( "checked", inputtype === "radio" && true || !input.is( ":checked" ) );
				self._updateAll();
				event.preventDefault();
			},
			
			click: false
			
{'fraction_non_alphanumeric': 0.19313304721030042, 'fraction_numerical': 0.0036141856787892477, 'mean_word_length': 2.996389891696751, 'pattern_counts': {'":': 6, '<': 7, '<?xml version=': 0, '>': 11, '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': '6705475', 'n_tokens_mistral': 1835, 'n_tokens_neox': 1476, 'n_words': 322}