<commit_before>namespace $.$$ {
	export class $mol_select extends $.$mol_select {
		
		@ $mol_mem
		filter_pattern( next? : string ) {
			this.focused()
			
			return next || ''
		}

		open() {
			this.showed( true )
		}
		
		@ $mol_mem
		options() {
			return Object.keys( this.dictionary() ) as readonly string[]
		}
		
		@ $mol_mem
		options_filtered() {
			let options = this.options()
			options = options.filter( $mol_match_text( this.filter_pattern() , ( id : string )=> [ this.option_label( id ) ] ) )

			const index = options.indexOf( this.value() )
			if( index >= 0 ) options = [ ... options.slice( 0 , index ) , ... options.slice( index + 1 ) ]
			
			return options
		}
		
		option_label( id : string ) {
			const value = this.dictionary()[ id ]
			return value == null ? id : value
		}
		
		option_rows() {
			return this.options_filtered().map( ( option : string ) => this.Option_row( option ) )
		}
		
		@ $mol_mem
		option_focused( component? : $mol_view ) {
			if( component == null ) {
				for( let comp of this.nav_components() ) {
					if( comp && comp.focused() ) return comp
				}
				
				return null
			}
			
			if( this.showed() ) {
				component.focused( true )
			}
			
			return component
		}

		event_select( id : string , event? : MouseEvent ) {
			this.value( id )
			this.focused( false )
		}
		
		nav_components() {
			if( this.options().length > 1 && this.Filter() ) {
				return [ this.Filter() , ... this.option_rows() ]
			} else {
				return this.option_rows()
			}
		}

		trigger_content() {
			return [
				... this.option_content( this.value() ),
				... !this.value() ? [ this.Trigger_icon() ] : [],
			] as readonly $mol_view_content[]
		}
		
		menu_content() {
			return [
				... this.option_rows(),
				... ( this.options_filtered().length === 0 ) ? [ this.No_options() ] : []
			]
		}
		
	}
}<commit_msg>$mol_select: catch event on select<commit_after>namespace $.$$ {
	export class $mol_select extends $.$mol_select {
		
		@ $mol_mem
		filter_pattern( next? : string ) {
			this.focused()
			
			return next || ''
		}

		open() {
			this.showed( true )
		}
		
		@ $mol_mem
		options() {
			return Object.keys( this.dictionary() ) as readonly string[]
		}
		
		@ $mol_mem
		options_filtered() {
			let options = this.options()
			options = options.filter( $mol_match_text( this.filter_pattern() , ( id : string )=> [ this.option_label( id ) ] ) )

			const index = options.indexOf( this.value() )
			if( index >= 0 ) options = [ ... options.slice( 0 , index ) , ... options.slice( index + 1 ) ]
			
			return options
		}
		
		option_label( id : string ) {
			const value = this.dictionary()[ id ]
			return value == null ? id : value
		}
		
		option_rows() {
			return this.options_filtered().map( ( option : string ) => this.Option_row( option ) )
		}
		
		@ $mol_mem
		option_focused( component? : $mol_view ) {
			if( component == null ) {
				for( let comp of this.nav_components() ) {
					if( comp && comp.focused() ) return comp
				}
				
				return null
			}
			
			if( this.showed() ) {
				component.focused( true )
			}
			
			return component
		}

		event_select( id : string , event? : MouseEvent ) {
			this.value( id )
			this.focused( false )
			event?.preventDefault()
		}
		
		nav_components() {
			if( this.options().length > 1 && this.Filter() ) {
				return [ this.Filter() , ... this.option_rows() ]
			} else {
				return this.option_rows()
			}
		}

		trigger_content() {
			return [
				... this.option_content( this.value() ),
				... !this.value() ? [ this.Trigger_icon() ] : [],
			] as readonly $mol_view_content[]
		}
		
		menu_content() {
			return [
				... this.option_rows(),
				... ( this.options_filtered().length === 0 ) ? [ this.No_options() ] : []
			]
		}
		
	}
}
{'fraction_non_alphanumeric': 0.16249334043686733, 'fraction_numerical': 0.002663825253063399, 'mean_word_length': 2.3951175406871608, 'pattern_counts': {'":': 0, '<': 3, '<?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': '4700595', 'n_tokens_mistral': 1608, 'n_tokens_neox': 1237, 'n_words': 269}