<commit_before>/* eslint-disable no-console */

import { register } from "register-service-worker";

if (process.env.NODE_ENV === "production") {
  register('/service-worker.js', {
    registered() {
      navigator.storage.persist();
    },
    updated() {
      window.M.toast({ html: '<span>Доступно обновление! Перезагрузите приложение для установки.</span><button class="btn-flat toast-action" onclick="window.location.reload();">ОК</button>', displayLength: Infinity });
    },
    error(e) {
      console.error('Error occurred during service worker registration: ', e);
    }
  });<commit_msg>Update registerServiceWorker.js<commit_after>/* eslint-disable no-console */

import { register } from "register-service-worker";

if (process.env.NODE_ENV === "production") {
  register('/service-worker.js', {
    registered() {
      navigator.storage.persist();
    },
    updated() {
      window.M.toast({ html: '<span>Доступно обновление!</span><button class="btn-flat toast-action" onclick="window.location.reload();">ОК</button>', displayLength: Infinity });
    },
    error(e) {
      console.error('Error occurred during service worker registration: ', e);
    }
  });
{'fraction_non_alphanumeric': 0.1711864406779661, 'fraction_numerical': 0.0, 'mean_word_length': 3.96218487394958, 'pattern_counts': {'":': 0, '<': 11, '<?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': '3685465', 'n_tokens_mistral': 356, 'n_tokens_neox': 362, 'n_words': 67}