<commit_before>// Copyright (c) 2015 <NAME> <<EMAIL>>
// MIT License

import Ember from 'ember';
import generatePassword from 'yith-responsive-client/utils/passwordGenerator';

export default Ember.Component.extend({
    didInsertElement: function () {
        var options = this.settings.getSetting('pwstrengthOptions');
            options.ui.container = '#password-edit-field';
        Ember.$('input[name="password1"]').pwstrength(options);
    },

    invalid: false,

    inputType: 'password',

    validate: Ember.observer('password1', 'password2', function () {
        var password = this.get('password1'),
            same = password === this.get('password2');

        if (!same) {
            this.set('invalid', true);
        } else {
            this.set('invalid', false);
            this.sendAction('action', password);
        }<commit_msg>Wait until the component is fully initialized before calling pwstrength<commit_after>// Copyright (c) 2015 <NAME> <<EMAIL>>
// MIT License

import Ember from 'ember';
import generatePassword from 'yith-responsive-client/utils/passwordGenerator';

export default Ember.Component.extend({
    didInsertElement: function () {
        var options = this.settings.getSetting('pwstrengthOptions');

        options.ui.container = '#password-edit-field';
        setTimeout(function () {
            Ember.$('input[name="password1"]').pwstrength(options);
        }, 100);
    },

    invalid: false,

    inputType: 'password',

    validate: Ember.observer('password1', 'password2', function () {
        var password = this.get('<PASSWORD>'),
            same = password === this.get('password2');

        if (!same) {
            this.set('invalid', true);
        } else {
            this.set('invalid', false);
            this.sendAction('action', password);
        }
{'fraction_non_alphanumeric': 0.14754098360655737, 'fraction_numerical': 0.01092896174863388, 'mean_word_length': 2.846638655462185, 'pattern_counts': {'":': 0, '<': 10, '<?xml version=': 0, '>': 10, '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': '2475866', 'n_tokens_mistral': 512, 'n_tokens_neox': 482, 'n_words': 111}