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Ac,2DA7ChB,CAiCRC,CAAcL,GAGlBR,EAAqBU,MAAQZ,EAAcY,KAR/C,IAsBkB,OAAlBT,GACAA,EAAcM,iBAAiB,SAAS,WACpC,IAEMO,EAFWb,EAAcS,MAAMK,cAAcC,QAAQ,MAAO,KAAKA,QAAQ,YAAa,IAEvD,IADnBC,KAAKC,MAAM,IAAyB,IAAhBD,KAAKE,UAI3CjB,EAAkBQ,MAAQI,EAAkBM,OAAO,EAAG,IAGtDpB,EAAqBK,MAAMC,QAAU,OACrCJ,EAAkBG,MAAMC,QAAU,MAVtC,GAnDR,G,GCCIe,EAA2B,CAAC,EAGhC,SAASC,EAAoBC,GAE5B,IAAIC,EAAeH,EAAyBE,GAC5C,QAAqBE,IAAjBD,EACH,OAAOA,EAAaE,QAGrB,IAAIC,EAASN,EAAyBE,GAAY,CAGjDG,QAAS,CAAC,GAOX,OAHAE,EAAoBL,GAAUI,EAAQA,EAAOD,QAASJ,GAG/CK,EAAOD,OACf,CCrBAJ,EAAoBO,EAAI,SAASF,GAChC,IAAIG,EAASH,GAAUA,EAAOI,WAC7B,WAAa,OAAOJ,EAAgB,OAAG,EACvC,WAAa,OAAOA,CAAQ,EAE7B,OADAL,EAAoBU,EAAEF,EAAQ,CAAEG,EAAGH,IAC5BA,CACR,ECNAR,EAAoBU,EAAI,SAASN,EAASQ,GACzC,IAAI,IAAIC,KAAOD,EACXZ,EAAoBc,EAAEF,EAAYC,KAASb,EAAoBc,EAAEV,EAASS,IAC5EE,OAAOC,eAAeZ,EAASS,EAAK,CAAEI,YAAY,EAAMC,IAAKN,EAAWC,IAG3E,ECPAb,EAAoBc,EAAI,SAASK,EAAKC,GAAQ,OAAOL,OAAOM,UAAUC,eAAeC,KAAKJ,EAAKC,EAAO,E","sources":["webpack://app/./app/packs/src/confirmation_registration.js","webpack://app/./app/packs/src/signup_form.js","webpack://app/webpack/bootstrap","webpack://app/webpack/runtime/compat get default export","webpack://app/webpack/runtime/define property getters","webpack://app/webpack/runtime/hasOwnProperty shorthand"],"sourcesContent":["$(document).ready(() => {\n $(\"#user_certification\").on(\"change\", function(e) {\n const certificationField = event.target.parentNode.parentNode;\n const certificationError = certificationField.querySelector('.form-error');\n\n if (certificationError) {\n certificationError.remove();\n }\n });\n\n $(\"#user_tos_agreement\").on(\"change\", function(e) {\n const tosField = event.target.parentNode.parentNode;\n const tosError = tosField.querySelectorAll('.form-error');\n\n if (tosError) {\n tosError.forEach(error => {\n error.remove();\n });\n }\n });\n\n $(\".select-date-container\").on(\"change\", function(e) {\n const dateField = event.target.parentNode.parentNode;\n const dateError = dateField.querySelectorAll('.form-error');\n const invalidFields = dateField.querySelectorAll('.is-invalid-input');\n\n if (dateError) {\n dateError.forEach(error => {\n error.remove();\n });\n }\n\n if (invalidFields) {\n invalidFields.forEach(field => {\n field.classList.remove('is-invalid-input');\n });\n }\n });\n});","$(document).ready(() => {\n $(\"label[for='registration_user_birth_date'] select\").wrapAll('
');\n // Omniauth registration form\n $(\"#new_user label[for='user_birth_date'] select\").wrapAll('
');\n\n // Sélection des éléments du DOM\n const passwordInput = document.getElementById('registration_user_password');\n const confirmPasswordInput = document.getElementById('registration_user_password_confirmation');\n const userNameInput = document.getElementById('registration_user_name');\n const userNicknameInput = document.getElementById('registration_user_nickname');\n const userNicknameField = document.querySelector('.user-nickname');\n const fieldElements = document.querySelectorAll('.field');\n\n // Masquer la classe \"user-nickname\"\n if (userNicknameField !== null) {\n userNicknameField.style.display = 'none';\n }\n\n // Masquer la classe \"field\" contenant la classe \"registration_user_password_confirmation\"\n fieldElements.forEach(field => {\n const confirmPasswordField = field.querySelector('#registration_user_password_confirmation');\n if (confirmPasswordField !== null) {\n field.style.display = 'none';\n }\n });\n\n // // Écouteur d'événement sur le champ du mot de passe\n if (passwordInput !== null) {\n passwordInput.addEventListener('input', function() {\n // If there is a form-error behind the password field, remove it\n const passwordField = passwordInput.parentElement;\n const passwordError = passwordField.querySelector('.form-error');\n if (passwordError !== null) {\n changeMessage(passwordError)\n }\n\n confirmPasswordInput.value = passwordInput.value;\n });\n }\n\n function changeMessage(passwordError) {\n const password = passwordInput.value;\n const passwordLength = password.length;\n\n if (passwordLength < 10) {\n passwordError.textContent = 'Le mot de passe doit contenir au moins 10 caractères.';\n }\n }\n\n // Génération automatique du surnom à partir du champ du nom\n if (userNameInput !== null) {\n userNameInput.addEventListener('input', function() {\n const userName = userNameInput.value.toLowerCase().replace(/\\s/g, '_').replace(/[^\\w\\s]/gi, ''); // Remplacement des espaces par des underscores, suppression des caractères spéciaux et mise en minuscules\n const randomNum = Math.floor(100000 + Math.random() * 900000); // Génération d'un nombre aléatoire à 6 chiffres\n const generatedNickname = userName + '_' + randomNum;\n\n // Remplissage automatique du champ du surnom\n userNicknameInput.value = generatedNickname.substr(0, 20); // Limite le surnom à 20 caractères\n\n // Cacher les champs générés automatiquement\n confirmPasswordInput.style.display = 'none'; // Cacher le champ de confirmation du mot de passe\n userNicknameInput.style.display = 'none'; // Cacher le champ du surnom\n });\n }\n})\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = function(module) {\n\tvar getter = module && module.__esModule ?\n\t\tfunction() { return module['default']; } :\n\t\tfunction() { return module; };\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = function(exports, definition) {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }"],"names":["$","document","ready","on","e","certificationError","event","target","parentNode","querySelector","remove","tosError","querySelectorAll","forEach","error","dateField","dateError","invalidFields","field","classList","wrapAll","passwordInput","getElementById","confirmPasswordInput","userNameInput","userNicknameInput","userNicknameField","fieldElements","style","display","addEventListener","passwordError","parentElement","value","length","textContent","changeMessage","generatedNickname","toLowerCase","replace","Math","floor","random","substr","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","exports","module","__webpack_modules__","n","getter","__esModule","d","a","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call"],"sourceRoot":""}