<commit_before>(function( $ ) {
	'use strict';

	$(function() {

		var menu = {

			isOpen: false,

			toggle: function() {

				if ( this.isOpen ) {
					this.close();
				} else {
					this.open();
				}

			},

			open: function() {

				$( 'body' ).addClass( 'has-off-canvas' );

				$( '.js-off-canvas-toggle' ).addClass( 'is-on' );

				this.isOpen = true;

			},

			close: function() {

				$( 'body' ).removeClass( 'has-off-canvas' );

				$( '.js-off-canvas-toggle' ).removeClass( 'is-on' );

				this.isOpen = false;

			}

		};

		$( document ).on( 'click', '.has-off-canvas .off-canvas__inner', function( e ) {

			// Do not trigger on clicks on the menu
			if ( !$( e.target ).closest( '.off-canvas__menu' ).length ) {

				menu.close();

  		}

		});

		$( '.js-off-canvas-toggle' ).on( 'click', function( e ) {
			e.stopPropagation(); // Sorry world, I shouldn't be doing that.

			var data = $( this ).data();

			// Reveal the correct menu
			if ( !menu.isOpen && 'offCanvasTarget' in data ) {
				$( '.off-canvas__menu' ).hide();
				$( data.offCanvasTarget ).show();
			}<commit_msg>Add touch events<commit_after>(function( $ ) {
	'use strict';

	$(function() {

		var menu = {

			isOpen: false,

			toggle: function() {

				if ( this.isOpen ) {
					this.close();
				} else {
					this.open();
				}

			},

			open: function() {

				$( 'body' ).addClass( 'has-off-canvas' );

				$( '.js-off-canvas-toggle' ).addClass( 'is-on' );

				this.isOpen = true;

			},

			close: function() {

				$( 'body' ).removeClass( 'has-off-canvas' );

				$( '.js-off-canvas-toggle' ).removeClass( 'is-on' );

				this.isOpen = false;

			}

		};

		$( document ).on( 'click touchstart', '.has-off-canvas .off-canvas__inner', function( e ) {

			// Do not trigger on clicks on the menu
			if ( !$( e.target ).closest( '.off-canvas__menu' ).length ) {

				menu.close();

  			}

		});

		$( '.js-off-canvas-toggle' ).on( 'click touchstart', function( e ) {
			e.stopPropagation(); // Sorry world, I shouldn't be doing that.

			var data = $( this ).data();

			// Reveal the correct menu
			if ( !menu.isOpen && 'offCanvasTarget' in data ) {
				$( '.off-canvas__menu' ).hide();
				$( data.offCanvasTarget ).show();
			}
{'fraction_non_alphanumeric': 0.20430107526881722, 'fraction_numerical': 0.0, 'mean_word_length': 2.3130563798219583, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '4065894', 'n_tokens_mistral': 974, 'n_tokens_neox': 767, 'n_words': 176}