<commit_before><template>
  <div class="youtube-container" v-if="!expanded">
    <p>
      <svg class="svg-icon svg-icon-youtube-play" viewBox="0 0 1792 1792"><path d="M1280 896q0-37-30-54l-512-320q-31-20-65-2-33 18-33 56v640q0 38 33 56 16 8 31 8 20 0 34-10l512-320q30-17 30-54zm512 0q0 96-1 150t-8.5 136.5-22.5 147.5q-16 73-69 123t-124 58q-222 25-671 25t-671-25q-71-8-124.5-58t-69.5-123q-14-65-21.5-147.5t-8.5-136.5-1-150 1-150 8.5-136.5 22.5-147.5q16-73 69-123t124-58q222-25 671-25t671 25q71 8 124.5 58t69.5 123q14 65 21.5 147.5t8.5 136.5 1 150z"/></svg>
      <a class="pseudo" @click="expand">
        {{ title }}
      </a>
    </p>
  </div>

  <div class="youtube-container" v-else>
    <p>
      <svg class="svg-icon svg-icon-times" viewBox="0 0 1792 1792"><path d="M1490 1322q0 40-28 68l-136 136q-28 28-68 28t-68-28l-294-294-294 294q-28 28-68 28t-68-28l-136-136q-28-28-28-68t28-68l294-294-294-294q-28-28-28-68t28-68l136-136q28-28 68-28t68 28l294 294 294-294q28-28 68-28t68 28l136 136q28 28 28 68t-28 68l-294 294 294 294q28 28 28 68z"/></svg>
      <a class="pseudo" @click="collapse">
        <span v-if="lang === 'ru'">
          Закрыть видео «{{ title }}»
        </span>
        <span v-if="lang === 'en'">
          Close video "{{ title }}"
        </span>
      </a>
    </p>
    <p>
      <iframe class="youtube-video" :style="{ height: height() + 'px' }" :src="`https://www.youtube.com/embed/${v}?autoplay=1`" frameborder="0" allowfullscreen></iframe>
    </p>
  </div>
</template>

<script>
export default {
  props: {
    ratio: {
      type: String,
      default: '16/9',
    },
    title: String,
    v: String,
  },

  data() {
    return {
      expanded: false,
      lang: '',
    }
  },

  mounted() {
    this.lang = window['AppOptions'].locale
  },

  methods: {<commit_msg>Рефакторинг<commit_after><template>
  <div class="youtube-container">
    <div v-if="!expanded">
      <p>
        <svg class="svg-icon svg-icon-youtube-play" viewBox="0 0 1792 1792"><path d="M1280 896q0-37-30-54l-512-320q-31-20-65-2-33 18-33 56v640q0 38 33 56 16 8 31 8 20 0 34-10l512-320q30-17 30-54zm512 0q0 96-1 150t-8.5 136.5-22.5 147.5q-16 73-69 123t-124 58q-222 25-671 25t-671-25q-71-8-124.5-58t-69.5-123q-14-65-21.5-147.5t-8.5-136.5-1-150 1-150 8.5-136.5 22.5-147.5q16-73 69-123t124-58q222-25 671-25t671 25q71 8 124.5 58t69.5 123q14 65 21.5 147.5t8.5 136.5 1 150z"/></svg>
        <a class="pseudo" @click="expand">
          {{ title }}
        </a>
      </p>
    </div>
    <div v-if="expanded">
      <p>
        <svg class="svg-icon svg-icon-times" viewBox="0 0 1792 1792"><path d="M1490 1322q0 40-28 68l-136 136q-28 28-68 28t-68-28l-294-294-294 294q-28 28-68 28t-68-28l-136-136q-28-28-28-68t28-68l294-294-294-294q-28-28-28-68t28-68l136-136q28-28 68-28t68 28l294 294 294-294q28-28 68-28t68 28l136 136q28 28 28 68t-28 68l-294 294 294 294q28 28 28 68z"/></svg>
        <a class="pseudo" @click="collapse">
        <span v-if="lang === 'ru'">
          Закрыть видео «{{ title }}»
        </span>
          <span v-if="lang === 'en'">
          Close video "{{ title }}"
        </span>
        </a>
      </p>
      <p>
        <iframe class="youtube-video" :style="{ height: height() + 'px' }" :src="`https://www.youtube.com/embed/${v}?autoplay=1`" frameborder="0" allowfullscreen></iframe>
      </p>
    </div>
  </div>
</template>

<script>
export default {
  props: {
    ratio: {
      type: String,
      default: '16/9',
    },
    title: String,
    v: String,
  },

  data() {
    return {
      expanded: false,
      lang: '',
    }
  },

  mounted() {
    this.lang = window['AppOptions'].locale
  },

  methods: {
{'fraction_non_alphanumeric': 0.1933534743202417, 'fraction_numerical': 0.24553694040098875, 'mean_word_length': 2.3566820276497698, 'pattern_counts': {'":': 0, '<': 63, '<?xml version=': 0, '>': 63, 'https://': 2, 'lorem ipsum': 0, 'www.': 2, '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': '662627', 'n_tokens_mistral': 2181, 'n_tokens_neox': 1572, 'n_words': 309}