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xgC,OAAO+/B,eAAergC,EAAS6gC,OAAOC,YAAa,CAAE9+B,MAAO,WAE7D1B,OAAO+/B,eAAergC,EAAS,aAAc,CAAEgC,OAAO,GAAO,E,MCA9D,IAAI++B,EAAkB,CACrB,IAAK,GAaN3gC,EAAoBo/B,EAAEO,EAAKiB,GAA0C,IAA7BD,EAAgBC,GAGxD,IAAIC,EAAuB,CAACC,EAA4B5yB,KACvD,IAGI+wB,EAAU2B,GAHTvB,EAAU0B,EAAaC,GAAW9yB,EAGhBrF,EAAI,EAC3B,GAAGw2B,EAASliB,MAAMzd,GAAgC,IAAxBihC,EAAgBjhC,KAAa,CACtD,IAAIu/B,KAAY8B,EACZ/gC,EAAoBC,EAAE8gC,EAAa9B,KACrCj/B,EAAoBqkB,EAAE4a,GAAY8B,EAAY9B,IAGhD,GAAG+B,EAAS,IAAIp4B,EAASo4B,EAAQhhC,EAClC,CAEA,IADG8gC,GAA4BA,EAA2B5yB,GACrDrF,EAAIw2B,EAASt8B,OAAQ8F,IACzB+3B,EAAUvB,EAASx2B,GAChB7I,EAAoBC,EAAE0gC,EAAiBC,IAAYD,EAAgBC,IACrED,EAAgBC,GAAS,KAE1BD,EAAgBC,GAAW,EAE5B,OAAO5gC,EAAoBo/B,EAAEx2B,EAAO,EAGjCq4B,EAAqBC,KAAsB,gBAAIA,KAAsB,iBAAK,GAC9ED,EAAmB5gC,QAAQwgC,EAAqBM,KAAK,KAAM,IAC3DF,EAAmBr6B,KAAOi6B,EAAqBM,KAAK,KAAMF,EAAmBr6B,KAAKu6B,KAAKF,G,KChDvFjhC,EAAoBohC,QAAK59B,ECGzB,IAAI69B,EAAsBrhC,EAAoBo/B,OAAE57B,EAAW,CAAC,MAAM,IAAOxD,EAAoB,QAC7FqhC,EAAsBrhC,EAAoBo/B,EAAEiC,E","sources":["webpack://app/webpack/runtime/chunk loaded","webpack://app/./app/javascript/channels/ sync _channel\\.js$","webpack://app/./app/javascript/controllers/ sync \\.js$","webpack://app/./app/javascript/channels/index.js","webpack://app/./app/javascript/controllers/develop_controller.js","webpack://app/./app/javascript/components/questionnaire_builder.js","webpack://app/./app/javascript/components/hexTableauDynamique.js","webpack://app/./app/javascript/components/devenir_membre.js","webpack://app/./app/javascript/components/dragAndDropColonner.js","webpack://app/./app/javascript/components/sortable.js","webpack://app/./app/javascript/components/taskManager.js","webpack://app/./app/javascript/components/tracker.js","webpack://app/./app/javascript/bundles/HelloWorld/components/HelloWorld.jsx","webpack://app/./app/javascript/bundles/Training/components/LessonBlock.jsx","webpack://app/./app/javascript/bundles/Training/components/ProgressBar.jsx","webpack://app/./app/javascript/bundles/Training/components/QcmComponent.jsx","webpack://app/./app/javascript/bundles/Training/components/YouTubeAPI.js","webpack://app/./app/javascript/bundles/Training/components/YouTubeVideo.jsx","webpack://app/./app/javascript/bundles/Training/components/LessonContent.jsx","webpack://app/./app/javascript/bundles/Training/components/Banner.jsx","webpack://app/./app/javascript/bundles/Training/components/ChapterNavigation.jsx","webpack://app/./app/javascript/bundles/Training/components/Timer.jsx","webpack://app/./app/javascript/bundles/Training/components/Training.jsx","webpack://app/./app/javascript/bundles/Import/components/FileUpload.jsx","webpack://app/./app/javascript/bundles/Import/components/ModelSelection.jsx","webpack://app/./app/javascript/bundles/Import/components/ImportStatusModal.jsx","webpack://app/./app/javascript/bundles/Import/components/ColumnMapping.jsx","webpack://app/./app/javascript/bundles/Import/components/ImportWizard.jsx","webpack://app/./app/javascript/packs/application.js","webpack://app/./app/javascript/components/clickableDiv.js","webpack://app/./app/javascript/components/init_select2.js","webpack://app/./app/javascript/components/toggleEyes.js","webpack://app/./app/javascript/components/menu_selector.js","webpack://app/./app/javascript/components/array_input.js","webpack://app/./app/javascript/components/filter.js","webpack://app/./app/javascript/components/alert.js","webpack://app/./app/javascript/components/panel.js","webpack://app/./app/javascript/components/connection.js","webpack://app/./app/javascript/components/gantt.js","webpack://app/./app/javascript/components/hex_modal2.js","webpack://app/./app/javascript/components/tableau_hex_search_bar.js","webpack://app/./app/javascript/components/reducteur.js","webpack://app/./app/javascript/components/basic_multiple.js","webpack://app/./app/javascript/components/dropdown.js","webpack://app/./app/javascript/components/line_charts.js","webpack://app/./app/javascript/components/colonerCat.js","webpack://app/./app/javascript/components/checkAverageClosing.js","webpack://app/./app/javascript/components/detectEndNavbar.js","webpack://app/./app/javascript/components/barChart.js","webpack://app/./app/javascript/components/stackedBarChart.js","webpack://app/./app/javascript/components/half_doughnut_chart.js","webpack://app/./app/javascript/components/hexTableauCounter.js","webpack://app/./app/javascript/components/content_previewer.js","webpack://app/./app/javascript/components/gantt_v1_chart.js","webpack://app/./app/javascript/components/courses.js","webpack://app/./app/javascript/components/initAborescence.js","webpack://app/./app/javascript/components/ChapterPageLoadAnimations.js","webpack://app/./app/javascript/components/lessons.js","webpack://app/./app/javascript/components/lesson_elements.js","webpack://app/./app/javascript/components/chooseItem.js","webpack://app/./app/javascript/components/lessonQCM.js","webpack://app/./app/javascript/components/formsEnter.js","webpack://app/./app/javascript/components/centerModal.js","webpack://app/./app/javascript/components/breakout.js","webpack://app/./app/javascript/components/dropzone.js","webpack://app/./app/javascript/components/date_echeance.js","webpack://app/webpack/bootstrap","webpack://app/webpack/runtime/compat get default export","webpack://app/webpack/runtime/define property getters","webpack://app/webpack/runtime/global","webpack://app/webpack/runtime/hasOwnProperty shorthand","webpack://app/webpack/runtime/make namespace object","webpack://app/webpack/runtime/jsonp chunk loading","webpack://app/webpack/runtime/nonce","webpack://app/webpack/startup"],"sourcesContent":["var deferred = [];\n__webpack_require__.O = (result, chunkIds, fn, priority) => {\n\tif(chunkIds) {\n\t\tpriority = priority || 0;\n\t\tfor(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1];\n\t\tdeferred[i] = [chunkIds, fn, priority];\n\t\treturn;\n\t}\n\tvar notFulfilled = Infinity;\n\tfor (var i = 0; i < deferred.length; i++) {\n\t\tvar [chunkIds, fn, priority] = deferred[i];\n\t\tvar fulfilled = true;\n\t\tfor (var j = 0; j < chunkIds.length; j++) {\n\t\t\tif ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every((key) => (__webpack_require__.O[key](chunkIds[j])))) {\n\t\t\t\tchunkIds.splice(j--, 1);\n\t\t\t} else {\n\t\t\t\tfulfilled = false;\n\t\t\t\tif(priority < notFulfilled) notFulfilled = priority;\n\t\t\t}\n\t\t}\n\t\tif(fulfilled) {\n\t\t\tdeferred.splice(i--, 1)\n\t\t\tvar r = fn();\n\t\t\tif (r !== undefined) result = r;\n\t\t}\n\t}\n\treturn result;\n};","function webpackEmptyContext(req) {\n\tvar e = new Error(\"Cannot find module '\" + req + \"'\");\n\te.code = 'MODULE_NOT_FOUND';\n\tthrow e;\n}\nwebpackEmptyContext.keys = () => ([]);\nwebpackEmptyContext.resolve = webpackEmptyContext;\nwebpackEmptyContext.id = 3760;\nmodule.exports = webpackEmptyContext;","var map = {\n\t\"./develop_controller.js\": 5311,\n\t\"controllers/develop_controller.js\": 5311\n};\n\n\nfunction webpackContext(req) {\n\tvar id = webpackContextResolve(req);\n\treturn __webpack_require__(id);\n}\nfunction webpackContextResolve(req) {\n\tif(!__webpack_require__.o(map, req)) {\n\t\tvar e = new Error(\"Cannot find module '\" + req + \"'\");\n\t\te.code = 'MODULE_NOT_FOUND';\n\t\tthrow e;\n\t}\n\treturn map[req];\n}\nwebpackContext.keys = function webpackContextKeys() {\n\treturn Object.keys(map);\n};\nwebpackContext.resolve = webpackContextResolve;\nmodule.exports = webpackContext;\nwebpackContext.id = 7461;","// Load all the channels within this directory and all subdirectories.\n// Channel files must be named *_channel.js.\n\nconst channels = require.context('.', true, /_channel\\.js$/)\nchannels.keys().forEach(channels)\n","import { Controller } from \"stimulus\";\n\nexport default class extends Controller {\n static targets = [\"content\"];\n\n connect() {\n this.contentTarget.style.maxHeight = \"0px\";\n this.contentTarget.style.overflow = \"hidden\";\n this.expanded = false;\n }\n\n toggle() {\n if (this.expanded) {\n this.collapse();\n } else {\n this.expand();\n }\n }\n\n expand() {\n this.contentTarget.style.maxHeight = this.contentTarget.scrollHeight + \"px\";\n this.expanded = true;\n }\n\n collapse() {\n this.contentTarget.style.maxHeight = \"0px\";\n this.expanded = false;\n }\n}\n","import { event } from \"jquery\";\n\nconst initQuestionnaireBuilder = () => {\n if(document.querySelector('[js-activator^=\"questionnaire_builder\"]')) {\n init_questionnaire_builder_actions_navbar();\n loadQuestions()\n init_question_selector();\n initSaver()\n } \n}\n\n// Changer le contenu d'une question quand le type est modifié ===============================================================\nfunction active_question_type_eventlistener(active_question, type_selector) {\n let question_content = active_question.getElementsByClassName('questionnaire_builder_forms_question_contenu_question')[0];\n type_selector.addEventListener('change', (event) => {\n question_editor_type_update(question_content, type_selector)\n switch (type_selector.value) {\n case 'Choix Multiples': \n add_awnser_choice()\n break\n case 'Cases à cocher': \n add_awnser_choice()\n break\n case 'Liste déroulante': \n add_awnser_choice()\n break\n case 'Grille à choix multiples': \n add_awnser_choice()\n break\n case 'Grille case à cocher': \n add_awnser_choice()\n break\n }\n });\n}\n\n\n// INITIALISATION ============================================================================================================\nfunction initFirstQuestion() {\n document.getElementsByClassName('questionnaire_builder_forms_content')[0].appendChild(new_question_html());\n let selected_question = document.getElementsByClassName('selected_question')[0];\n active_question_trash_eventlistener(selected_question, selected_question.getElementsByClassName('removeQuestion')[0])\n active_question_show_options_eventlistener(selected_question, selected_question.getElementsByClassName('showConditions')[0])\n active_question_redirect_options_eventlistener(selected_question, selected_question.getElementsByClassName('redirectToSection')[0])\n\n}\n\nfunction init_questionnaire_builder_actions_navbar() {\n let html_builder_navbar = `
\n
\n
\n
\n
\n
Non sauvegardé
\n
\n \n
\n
\n
\n
\n \n \n \n
\n
\n
`\n document.getElementsByClassName('page_main')[0].innerHTML += html_builder_navbar;\n let builder_navbar = document.getElementsByClassName(\"questionnaire_builder_navbar\")[0].getElementsByClassName(\"content\")[0];\n let add_question_button = builder_navbar.getElementsByClassName(\"add_question\")[0];\n let add_title_button = builder_navbar.getElementsByClassName(\"add_title\")[0];\n let add_section_button = builder_navbar.getElementsByClassName(\"add_section\")[0];\n add_question_button.addEventListener(\"click\", (event) => {\n add_new_question();\n });\n add_title_button.addEventListener(\"click\", (event) => {\n add_new_title();\n });\n add_section_button.addEventListener(\"click\", (event) => {\n add_new_section();\n });\n}\n\nfunction init_question_selector() {\n var questions = document.getElementsByClassName('questionnaire_builder_forms_content')[0].children;\n for(let question of questions) {\n if(question.classList.contains(\"selected_question\") === false) {\n question.addEventListener('click', (event) => {\n selectQuestion(question);\n })\n } else {\n active_question_type_eventlistener(question, question.getElementsByClassName('type_question_selector')[0])\n }\n }\n}\n// NAVBAR ====================================================================================================================\nfunction add_new_question() {\n let selected_question = document.getElementsByClassName('selected_question')[0];\n if(selected_question !== undefined) {\n selected_question.after(new_question_html())\n selected_question.classList.remove('selected_question')\n unselectQuestionHide();\n reset_question_selector();\n } else {\n let new_selected = new_question_html()\n document.getElementsByClassName('questionnaire_builder_forms_content')[0].appendChild(new_selected)\n selectQuestion(new_selected);\n }\n}\n\nfunction add_new_title() {\n let selected_question = document.getElementsByClassName('selected_question')[0];\n if(selected_question !== undefined) {\n selected_question.after(new_title_html())\n selected_question.classList.remove('selected_question')\n unselectQuestionHide();\n reset_question_selector();\n } else {\n let new_selected = new_title_html()\n document.getElementsByClassName('questionnaire_builder_forms_content')[0].appendChild(new_selected)\n selectQuestion(new_selected);\n }\n}\n\nfunction add_new_section() {\n let selected_question = document.getElementsByClassName('selected_question')[0];\n if(selected_question !== undefined) {\n selected_question.after(new_section_html())\n selected_question.classList.remove('selected_question')\n unselectQuestionHide();\n reset_question_selector();\n } else {\n let new_selected = new_section_html()\n document.getElementsByClassName('questionnaire_builder_forms_content')[0].appendChild(new_selected)\n selectQuestion(new_selected);\n }\n}\n\n// Selected Question FUNCTIONS ================================================================================================\nfunction question_editor_type_update(question_content, question_type) {\n let html_question_content = \"\"\n switch (question_type.value) {\n case 'Texte Court':\n html_question_content = `\n
\n
\n \n
\n
\n `;\n break\n case 'Texte Long':\n html_question_content = `\n
\n
\n \n
\n
\n `;\n break\n case 'Choix Multiples':\n html_question_content = `\n
\n
\n
\n \n \n
\n \n \n
\n
\n
\n
\n `;\n break\n case 'Cases à cocher':\n html_question_content = `\n
\n
\n
\n \n \n
\n \n \n
\n
\n
\n
\n `;\n break\n case 'Liste déroulante':\n html_question_content = `\n
\n
\n
\n \n \n
\n \n \n
\n
\n
\n
\n `;\n break\n case 'Echelle linéaire':\n html_question_content = `\n
\n
\n \n \n
\n
\n `;\n break\n case 'Grille à choix multiples':\n html_question_content = `\n
\n
\n
\n \n \n
\n \n \n
\n
\n
\n
\n
\n \n \n
\n \n \n
\n
\n
\n
\n `;\n break\n case 'Grille case à cocher':\n html_question_content = `\n
\n
\n
\n \n \n
\n \n \n
\n
\n
\n
\n
\n \n \n
\n \n \n
\n
\n
\n
\n `;\n break\n case 'Date':\n html_question_content = `\n
\n
\n \n
\n
\n `;\n break\n case 'Nombre':\n html_question_content = `\n
\n
\n \n
\n
\n `;\n break\n default:\n html_question_content = `\n `;\n break\n }\n question_content.innerHTML = html_question_content\n return question_content\n}\n\nfunction add_awnser_choice() {\n let actions_buttons = document.getElementsByClassName('addRmvBtn');\n for(let actions_button of actions_buttons) {\n actions_button.getElementsByClassName('addInput')[0].addEventListener('click', (event) => {\n var new_element = actions_button.previousElementSibling.cloneNode();\n new_element.setAttribute(\"name\", `${id_generator(10)}`);\n actions_button.before(new_element);\n })\n actions_button.getElementsByClassName('removeInput')[0].addEventListener('click', (event) => {\n var previous_element = actions_button.previousElementSibling;\n if(actions_button.parentNode.children.length > 2) {\n actions_button.parentNode.removeChild(previous_element)\n }\n })\n }\n\n}\n\n// Selecteur de question ======================================================================================================\nfunction selectQuestion(new_selected_question) {\n let not_question_types = ['titre', 'section'];\n let old_selected_question = document.getElementsByClassName('selected_question')[0];\n if(not_question_types.includes(old_selected_question.querySelector('select#types-questions').value) === false) {\n let old_question_options = old_selected_question.getElementsByClassName('questionnaire_builder_forms_question_options_show')[0]\n if(old_question_options.style.display === 'flex') {\n old_selected_question.getElementsByClassName('showConditions')[0].click()\n }\n }\n if(old_selected_question === undefined){\n new_selected_question = document.getElementsByClassName('questionnaire_builder_forms_question')[0];\n } else {\n old_selected_question.classList.remove(\"selected_question\");\n }\n new_selected_question.classList.add(\"selected_question\");\n unselectQuestionHide();\n setSelected(new_selected_question);\n reset_question_selector();\n}\n\nfunction unselectQuestionHide() {\n let questions = document.getElementsByClassName('questionnaire_builder_forms_content')[0].children;\n for(let question of questions) {\n if(question.classList.contains(\"selected_question\") === false) {\n setUnselected(question)\n }\n }\n}\n\nfunction setUnselected(question) {\n question.getElementsByClassName('questionnaire_builder_forms_question_main')[0].style.display = \"none\";\n question.getElementsByClassName('questionnaire_builder_forms_question_titre')[0].children[1].setAttribute(\"disabled\", \"\")\n question.getElementsByClassName('questionnaire_builder_forms_question_type_question')[0].children[1].setAttribute(\"disabled\", \"\")\n question.getElementsByClassName('questionnaire_builder_forms_question_footer')[0].style.display = \"none\";\n}\n\nfunction setSelected(new_selected_question) {\n new_selected_question.getElementsByClassName('questionnaire_builder_forms_question_main')[0].style.display = \"flex\";\n new_selected_question.getElementsByClassName('questionnaire_builder_forms_question_titre')[0].children[1].removeAttribute(\"disabled\");\n new_selected_question.getElementsByClassName('questionnaire_builder_forms_question_type_question')[0].children[1].removeAttribute(\"disabled\");\n new_selected_question.getElementsByClassName('questionnaire_builder_forms_question_footer')[0].style.display = \"flex\";\n}\n\nfunction reset_question_selector() {\n var before_cloning_questions = document.getElementsByClassName('questionnaire_builder_forms_content')[0].children;\n eventListenerRemoverAll(before_cloning_questions)\n var questions = document.getElementsByClassName('questionnaire_builder_forms_content')[0].children;\n for(let question of questions) {\n if(question.classList.contains(\"selected_question\") === false) {\n question.addEventListener('click', (event) => {\n selectQuestion(question);\n })\n } else {\n active_question_type_eventlistener(question, question.getElementsByClassName('type_question_selector')[0]);\n active_question_trash_eventlistener(question, question.getElementsByClassName('removeQuestion')[0]);\n add_awnser_choice();\n let not_question_types = ['titre', 'section'];\n if(not_question_types.includes(question.querySelector('select#types-questions').value) === false) {\n active_question_show_options_eventlistener(question, question.getElementsByClassName('showConditions')[0]);\n active_question_redirect_options_eventlistener(question, question.getElementsByClassName('redirectToSection')[0]);\n }\n\n }\n }\n return questions\n}\n\n// Save =======================================================================================================================\nfunction initSaver() {\n let save_statut = document.getElementsByClassName('save_statut')[0];\n setUnsaved(save_statut);\n let save_btn = document.querySelector('body > div.page_main.options > div.questionnaire_navbar > div.questionnaire_builder_saver_navbar > div > a');\n save_btn.addEventListener('click', (event) => {\n save_questions();\n setSaved(save_statut);\n });\n document.addEventListener('keydown', (event) => {\n setUnsaved(save_statut);\n });\n}\n\nfunction setSaved(save_statut) {\n save_statut.classList.remove('unsaved')\n save_statut.classList.add('saved')\n save_statut.querySelector('.save_text').innerText = \"Sauvegardé\"\n let save_form = document.querySelector('.data_saver_questionnaires_builder').parentElement;\n save_form.submit();\n}\n\nfunction setUnsaved(save_statut) {\n save_statut.classList.remove('saved')\n save_statut.classList.add('unsaved')\n save_statut.querySelector('.save_text').innerText = \"Non sauvegardé\"\n}\n\nfunction save_questions() {\n let line_types = ['Choix Multiples', 'Cases à cocher', 'Liste déroulante', 'Texte Court', 'Texte Long', 'Nombre', 'Date', 'Echelle linéaire'];\n let grille_types = ['Grille à choix multiples', 'Grille case à cocher'];\n let not_question_types = ['titre', 'section'];\n let questions = document.querySelectorAll('.questionnaire_builder_forms_question');\n let saver_array = [];\n for(let question of questions){\n let save_qtn = {};\n let question_head = question.querySelector('.questionnaire_builder_forms_question_head');\n let question_content = question.querySelector('.questionnaire_builder_forms_question_main');\n let question_options = question.querySelector('.questionnaire_builder_forms_question_options');\n let question_footer = question.querySelector('.questionnaire_builder_forms_question_footer');\n // HEAD SAVE\n save_qtn.titre = question_head.querySelector('input#question-titre').value.replace(/ /g, \"_\");\n save_qtn.type = question_head.querySelector('select#types-questions').value.replace(/ /g, \"_\");\n // CONTENT SAVE\n if(line_types.includes(question_head.querySelector('select#types-questions').value)) {\n let question_ligne_inputs = question.querySelectorAll('.question_lignes input');\n let lignes_values = [];\n for(let input of question_ligne_inputs) {\n lignes_values.push(input.value.replace(/ /g, \"_\"));\n }\n save_qtn.lignes = lignes_values;\n } else if (grille_types.includes(question_head.querySelector('select#types-questions').value)) {\n let question_grille_ligne_inputs = question_content.querySelectorAll('.question_grille_lignes input');\n let question_grille_colonnes_inputs = question_content.querySelectorAll('.question_grille_colonnes input');\n let lignes_values = [];\n let colonnes_values = [];\n for(let input of question_grille_ligne_inputs) {\n lignes_values.push(input.value.replace(/ /g, \"_\"));\n }\n for(let input of question_grille_colonnes_inputs) {\n colonnes_values.push(input.value.replace(/ /g, \"_\"));\n }\n save_qtn.lignes = lignes_values;\n save_qtn.colonnes = colonnes_values;\n }\n // OPTIONS SAVE\n if(not_question_types.includes(question_head.querySelector('select#types-questions').value) === false) {\n let show_option = question_options.querySelector('.questionnaire_builder_forms_question_options_show');\n let redirect_option = question_options.querySelector('.questionnaire_builder_forms_question_options_redirect');\n let show_option_save = [];\n let redirect_option_save = [];\n for(let options_critere of show_option.querySelectorAll('.options_critere')) {\n let obj = {};\n obj.condition = options_critere.querySelector('#option-critere-condition').value.replace(/ /g, \"_\");\n obj.question = options_critere.querySelector('#option-critere-question').value.replace(/ /g, \"_\");\n obj.mode = options_critere.querySelector('#option-critere-mode').value.replace(/ /g, \"_\");\n obj.reponses = Array.from(options_critere.querySelector('.option_critere_show_value').options).map(option => option.value.replace(/ /g, \"_\"));\n show_option_save.push(obj);\n }\n for(let options_critere of redirect_option.querySelectorAll('.options_critere')) {\n let obj = {};\n obj.mode = options_critere.querySelector('#option-critere-mode').value.replace(/ /g, \"_\");\n obj.reponses = Array.from(options_critere.querySelector('.option_critere_redirect_value').options).map(option => option.value.replace(/ /g, \"_\"));\n obj.redirection = options_critere.querySelector('#option-critere-redirection').value.replace(/ /g, \"_\");\n redirect_option_save.push(obj);\n }\n save_qtn.show_options = show_option_save;\n save_qtn.redirect_options = redirect_option_save;\n }\n // FOOTER SAVE\n if(question.querySelector('.question_obligatoire') !== null) {\n save_qtn.obligatoire = question_footer.querySelector('.question_obligatoire').checked.toString().replace(/ /g, \"_\");\n }\n // SAVE QTN\n saver_array.push(save_qtn);\n }\n let save_input = document.querySelector('.data_saver_questionnaires_builder');\n save_input.value = JSON.stringify(saver_array);\n}\n\n// Load =======================================================================================================================\nfunction loadQuestions() {\n let questions_data = document.querySelector(\".data_saver_questionnaires_builder\").value;\n let questions_data_parsed = JSON.parse(questions_data);\n let question_types = ['Choix Multiples', 'Cases à cocher', 'Liste déroulante', 'Texte Court', 'Texte Long', 'Nombre', 'Date', 'Echelle linéaire', 'Grille à choix multiples', 'Grille case à cocher'];\n if(questions_data_parsed.length > 0) {\n for(let question of questions_data_parsed) {\n if(question_types.includes(question.type.replace(/[_]+/g, \" \"))){\n loadQuestion(question);\n } else if (question.type === 'titre') {\n loadHead(question);\n } else if (question.type === 'section') {\n loadSection(question);\n }\n }\n } else {\n initFirstQuestion();\n }\n}\n\nfunction loadQuestion(question) {\n document.getElementsByClassName('questionnaire_builder_forms_content')[0].appendChild(load_question_html(question));\n let selected_question = document.getElementsByClassName('selected_question')[0];\n selected_question = setValuesWhileLoadingQuestions(question, selected_question);\n selectQuestion = setOptionsWhileLoadingQuestions(question, selected_question);\n active_question_trash_eventlistener(selected_question, selected_question.getElementsByClassName('removeQuestion')[0])\n active_question_show_options_eventlistener(selected_question, selected_question.getElementsByClassName('showConditions')[0])\n active_question_redirect_options_eventlistener(selected_question, selected_question.getElementsByClassName('redirectToSection')[0])\n}\n\nfunction loadHead(question) {\n\n}\n\nfunction loadSection(question) {\n\n}\n\nfunction setValuesWhileLoadingQuestions(question_json, selected_question) {\n selected_question.querySelector('select#types-questions').value = question_json.type.replace(/[_]+/g, \" \");\n let question_type = selected_question.querySelector('select#types-questions');\n let question_content = selected_question.querySelector('.questionnaire_builder_forms_question_contenu_question');\n question_content.parentNode.replaceChild(question_editor_type_update(question_content, question_type), question_content)\n let type_question_lignes = ['Choix Multiples', 'Cases à cocher', 'Liste déroulante', 'Texte Court', 'Texte Long', 'Nombre', 'Date', 'Echelle linéaire'];\n let type_question_grille = ['Grille à choix multiples', 'Grille case à cocher'];\n if (type_question_lignes.includes(question_type)) {\n\n } else if (type_question_grille.includes(question_type)) {\n\n }\n return selected_question;\n}\n\nfunction setOptionsWhileLoadingQuestions(question_json, selected_question) {\n // selected_question.querySelector('select#types-questions').value = question_json.type.replace(/[_]+/g, \" \");\n // return selected_question;\n}\n\n// NEW MODULES ================================================================================================================\nfunction new_question_html() {\n let id = id_generator(10);\n if(document.getElementsByClassName('questionnaire_builder_forms_question ').length > 1) { id = \"123ABC123A\"}\n let html_question = `
\n
\n
\n \n \n
\n
\n \n \n
\n
\n
\n
\n
\n
\n
\n
\n
\n
Configurez ici les conditions d'affichage de la question
\n
\n \n \n \n \n
\n
\n \n \n
\n
\n
\n
\n
Configurez ici le renvoie de la question en fonction de la réponse à celle-ci. Ceci concerne la dernière question de la section.
\n
\n
Si réponse
\n \n \n
rediriger vers
\n \n
\n
\n \n \n
\n
\n
\n
\n \n
\n \n
Obligatoire
\n
\n \n \n
\n
`\n \n return ConvertStringToHTML(html_question).children[0]\n}\n\nfunction load_question_html(question) {\n let id = id_generator(10);\n if(document.getElementsByClassName('questionnaire_builder_forms_question ').length > 1) { id = \"123ABC123A\"}\n let html_question = `
\n
\n
\n \n \n
\n
\n \n \n
\n
\n
\n
\n
\n
\n
\n
\n
\n
Configurez ici les conditions d'affichage de la question
\n
\n \n \n \n \n
\n
\n \n \n
\n
\n
\n
\n
Configurez ici le renvoie de la question en fonction de la réponse à celle-ci. Ceci concerne la dernière question de la section.
\n
\n
Si réponse
\n \n \n
rediriger vers
\n \n
\n
\n \n \n
\n
\n
\n
\n \n
\n \n
Obligatoire
\n
\n \n \n
\n
`\n return ConvertStringToHTML(html_question).children[0]\n}\n\nfunction new_title_html() {\n let html_question = `
\n
\n
\n \n \n
\n
\n \n \n
\n
\n
\n
\n
\n
\n
\n \n
\n
`\n return ConvertStringToHTML(html_question).children[0]\n}\n\nfunction new_section_html() {\n let html_question = `
\n
\n
\n \n \n
\n
\n \n \n
\n
\n
\n
\n
\n
\n
\n \n
\n
`\n return ConvertStringToHTML(html_question).children[0]\n}\n\n// OPTIONS ====================================================================================================================\nfunction active_question_trash_eventlistener(active_question, trash_btn) {\n trash_btn.addEventListener('click', (event) => {\n removeQuestion(active_question);\n });\n}\n\nfunction active_question_show_options_eventlistener(active_question, show_conditions_btn) {\n show_conditions_btn.addEventListener('click', (event) => {\n let show_conditions_element = active_question.getElementsByClassName('questionnaire_builder_forms_question_options_show')[0];\n if(show_conditions_element.style.display === 'none' || show_conditions_element.style.display === '') {\n show_conditions_element.style.display = 'flex';\n $(function() {\n initShowOptionsDropdown(active_question);\n $(`.js_multiple_options_show_${active_question.id}`).select2();\n active_options_add_remove_btn(active_question, \"show\");\n })\n } else {\n show_conditions_element.style.display = 'none';\n $(function() {\n $(`.js_multiple_options_show_${active_question.id}`).select2(\"destroy\");\n })\n }\n });\n}\n\nfunction active_question_redirect_options_eventlistener(active_question, redirect_to_section_btn) {\n redirect_to_section_btn.addEventListener('click', (event) => {\n let show_redirect_element = active_question.getElementsByClassName('questionnaire_builder_forms_question_options_redirect')[0];\n if(show_redirect_element.style.display === 'none' || show_redirect_element.style.display === '') {\n show_redirect_element.style.display = 'flex';\n $(function() {\n initRedirectOptionsDropdown(active_question);\n $(`.js_multiple_options_redirect_${active_question.id}`).select2();\n active_options_add_remove_btn(active_question, \"redirect\");\n })\n } else {\n show_redirect_element.style.display = 'none';\n $(function() {\n $(`.js_multiple_options_redirect_${active_question.id}`).select2(\"destroy\");\n })\n }\n });\n}\n\nfunction initShowOptionsDropdown(active_question) {\n let questions_dropdown_values = [];\n let awnser_dropdown_values = [];\n let question_type = active_question.querySelectorAll('select.type_question_selector')[0].value;\n let questions = document.querySelectorAll('.questionnaire_builder_forms_question');\n let not_question_types = ['titre', 'section'];\n for(let question of questions) {\n if(not_question_types.includes(question.querySelectorAll('select.type_question_selector')[0].value) === false) {\n let obj = {};\n obj.key = question.id;\n obj.value = question.querySelector(\"input#question-titre\").value;\n questions_dropdown_values.push(obj);\n }\n }\n replaceAwnserDropdownValues(active_question, questions_dropdown_values, '#option-critere-question', \"show\");\n let options_criteres = active_question.querySelectorAll('div.questionnaire_builder_forms_question_options_show > div.options_critere');\n for(let option_critere of options_criteres) {\n let critere_question = option_critere.querySelector('select#option-critere-question');\n $(option_critere.querySelector('.option_critere_show_value')).select2();\n change_show_options_value(critere_question, option_critere);\n critere_question.addEventListener('change', (event) => {\n change_show_options_value(critere_question, option_critere);\n })\n }\n}\n\nfunction initRedirectOptionsDropdown(active_question) {\n let awnser_dropdown_values = [];\n let sections_dropdown_values = [];\n let question_type = active_question.querySelectorAll('select.type_question_selector')[0].value;\n let questions = document.querySelectorAll('.questionnaire_builder_forms_question');\n let mcq = ['Choix Multiples', 'Cases à cocher', 'Liste déroulante'];\n let grille = ['Grille à choix multiples', 'Grille case à cocher'];\n let input = ['Texte Court', 'Texte Long'];\n let intDate = ['Nombre', 'Date', 'Echelle linéaire'];\n if(mcq.includes(question_type)) {\n let reponses = active_question.getElementsByClassName('question_lignes')[0].querySelectorAll(\"input\");\n for(let reponse of reponses) {\n let obj = {};\n obj.key = reponse.value;\n obj.value = reponse.value;\n awnser_dropdown_values.push(obj);\n }\n } else if(grille.includes(question_type)) {\n let reponses = active_question.getElementsByClassName('question_grille_lignes')[0].querySelectorAll(\"input\");\n let colonnes = active_question.getElementsByClassName('question_grille_colonnes')[0].querySelectorAll(\"input\");\n for(let colonne of colonnes) {\n for(let reponse of reponses) {\n let obj = {};\n obj.key = `${colonne.value}: ${reponse.value}`;\n obj.value = `${colonne.value}: ${reponse.value}`;\n awnser_dropdown_values.push(obj);\n }\n }\n }\n for(let question of questions) {\n if(question.querySelectorAll('select#types-questions')[0].value === \"section\") {\n let obj = {};\n obj.key = question.id;\n obj.value = question.querySelector('.questionnaire_builder_forms_question_titre').querySelector('input#question-titre').value;\n sections_dropdown_values.push(obj);\n }\n }\n replaceAwnserDropdownValues(active_question, awnser_dropdown_values, '.option_critere_redirect_value', \"redirect\");\n pushAwnserDropdownValues(active_question, sections_dropdown_values, '#option-critere-redirection', \"redirect\");\n}\n\nfunction pushAwnserDropdownValues(active_question, values, querySelectorName, option_type) {\n let options_criteres = [];\n if(option_type === \"redirect\") {\n options_criteres = active_question.querySelectorAll('.questionnaire_builder_forms_question_options_redirect > div.options_critere')\n } else if(option_type === \"show\") {\n options_criteres = active_question.querySelectorAll('.questionnaire_builder_forms_question_options_show > div.options_critere')\n }\n let html = \"\";\n for(let value of values) {\n html += `\\n`;\n }\n for(let options_critere of options_criteres) {\n let old_val = $(options_critere.querySelectorAll(querySelectorName)[0]).val();\n options_critere.querySelectorAll(querySelectorName)[0].innerHTML += html;\n $(options_critere.querySelectorAll(querySelectorName)[0]).val(old_val);\n }\n}\n\nfunction replaceAwnserDropdownValues(active_question, values, querySelectorName, option_type) {\n let options_criteres = [];\n if(option_type === \"redirect\") {\n options_criteres = active_question.querySelectorAll('.questionnaire_builder_forms_question_options_redirect > div.options_critere')\n } else if(option_type === \"show\") {\n options_criteres = active_question.querySelectorAll('.questionnaire_builder_forms_question_options_show > div.options_critere')\n }\n let html = \"\";\n for(let value of values) {\n html += `\\n`;\n }\n for(let options_critere of options_criteres) {\n let old_val = $(options_critere.querySelectorAll(querySelectorName)[0]).val();\n options_critere.querySelectorAll(querySelectorName)[0].innerHTML = html;\n $(options_critere.querySelectorAll(querySelectorName)[0]).val(old_val);\n }\n}\n\nfunction active_options_add_remove_btn(active_question, type_question) {\n if(type_question === \"show\") {\n let show_options_btns = active_question.querySelector('div.questionnaire_builder_forms_question_options_show > div.addRmvOptionBtn');\n let addBtn = show_options_btns.querySelector('a.addCritere');\n let rmvBtn = show_options_btns.querySelector('a.removeCritere');\n addBtn.addEventListener('click', (event) => {\n var previous_element = show_options_btns.previousElementSibling;\n $(previous_element.querySelectorAll('.option_critere_show_value')).select2(\"destroy\");\n var new_element = previous_element.cloneNode(true);\n new_element.querySelector('.option_critere_show_value').id = `option_critere_show_value_${active_question.querySelectorAll('div.questionnaire_builder_forms_question_options_show > .options_critere').length}`\n show_options_btns.before(new_element);\n $(previous_element.querySelectorAll('.option_critere_show_value')).select2();\n $(new_element.querySelectorAll('.option_critere_show_value')).select2();\n })\n rmvBtn.addEventListener('click', (event) => {\n var previous_element = show_options_btns.previousElementSibling;\n if(show_options_btns.parentNode.querySelectorAll('.options_critere').length > 1) {\n show_options_btns.parentNode.removeChild(previous_element)\n }\n })\n } else if(type_question === \"redirect\") {\n let show_options_btns = active_question.querySelector('div.questionnaire_builder_forms_question_options_redirect > div.addRmvOptionBtn');\n let addBtn = show_options_btns.querySelector('a.addCritere');\n let rmvBtn = show_options_btns.querySelector('a.removeCritere');\n addBtn.addEventListener('click', (event) => {\n var previous_element = show_options_btns.previousElementSibling;\n $(previous_element.querySelectorAll('.option_critere_redirect_value')).select2(\"destroy\");\n var new_element = previous_element.cloneNode(true);\n new_element.querySelector('.option_critere_redirect_value').id = `option_critere_redirect_value_${active_question.querySelectorAll('div.questionnaire_builder_forms_question_options_redirect > .options_critere').length}`\n show_options_btns.before(new_element);\n $(previous_element.querySelectorAll('.option_critere_redirect_value')).select2();\n $(new_element.querySelectorAll('.option_critere_redirect_value')).select2();\n })\n rmvBtn.addEventListener('click', (event) => {\n var previous_element = show_options_btns.previousElementSibling;\n if(show_options_btns.parentNode.querySelectorAll('.options_critere').length > 1) {\n show_options_btns.parentNode.removeChild(previous_element)\n }\n })\n }\n}\n\nfunction change_show_options_value(critere_question, option_critere) {\n let mcq = ['Choix Multiples', 'Cases à cocher', 'Liste déroulante'];\n let grille = ['Grille à choix multiples', 'Grille case à cocher'];\n let input = ['Texte Court', 'Texte Long'];\n let intDate = ['Nombre', 'Date', 'Echelle linéaire'];\n let awnser_dropdown_values = [];\n if(critere_question.value === \"\") {\n critere_question.value = document.querySelector('.selected_question').id\n }\n let question_select = document.getElementById(critere_question.value);\n let question_select_type = question_select.querySelectorAll('select.type_question_selector')[0].value;\n if(mcq.includes(question_select_type)) {\n let reponses = question_select.getElementsByClassName('question_lignes')[0].querySelectorAll(\"input\");\n for(let reponse of reponses) {\n let obj = {};\n obj.key = reponse.value;\n obj.value = reponse.value;\n awnser_dropdown_values.push(obj);\n }\n } else if(grille.includes(question_select_type)) {\n let reponses = question_select.getElementsByClassName('question_grille_lignes')[0].querySelectorAll(\"input\");\n let colonnes = question_select.getElementsByClassName('question_grille_colonnes')[0].querySelectorAll(\"input\");\n for(let colonne of colonnes) {\n for(let reponse of reponses) {\n let obj = {};\n obj.key = `${colonne.value}: ${reponse.value}`;\n obj.value = `${colonne.value}: ${reponse.value}`;\n awnser_dropdown_values.push(obj);\n }\n }\n }\n $(option_critere.querySelector('.option_critere_show_value')).select2(\"destroy\");\n replaceAwnserDropdownValues(document.querySelector('.selected_question'), awnser_dropdown_values, '.option_critere_show_value', \"show\");\n $(option_critere.querySelector('.option_critere_show_value')).select2();\n}\n// SHARED FUNCTIONS ===========================================================================================================\nfunction id_generator(length) {\n var result = '';\n var characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';\n var charactersLength = characters.length;\n for ( var i = 0; i < length; i++ ) {\n result += characters.charAt(Math.floor(Math.random() * charactersLength));\n }\n return result;\n}\n\nfunction ConvertStringToHTML(str) {\n let parser = new DOMParser();\n let doc = parser.parseFromString(str, 'text/html');\n return doc.body;\n};\n\nfunction eventListenerRemoverAll(elements) {\n for(var element of elements){\n let old_id = element.id;\n let show_options_select2 = element.getElementsByClassName(`js_multiple_options_show_${old_id}`)[0];\n let redirect_options_select2 = element.getElementsByClassName(`js_multiple_options_redirect_${old_id}`)[0];\n if(show_options_select2 !== undefined) {\n if(show_options_select2.classList.contains('select2-hidden-accessible')) {\n $(`.js_multiple_options_show_${old_id}`).select2(\"destroy\");\n element.getElementsByClassName('questionnaire_builder_forms_question_options_show')[0].style.display = 'none';\n }\n if(redirect_options_select2.classList.contains('select2-hidden-accessible')) {\n $(`.js_multiple_options_redirect_${old_id}`).select2(\"destroy\");\n element.getElementsByClassName('questionnaire_builder_forms_question_options_redirect')[0].style.display = 'none';\n }\n }\n let ClonedElement = element.cloneNode(true);\n setOldValues(element, ClonedElement);\n element.parentNode.replaceChild(ClonedElement, element);\n }\n}\n\nfunction setOldValues(oldElement, clonedElement) {\n // Question ID\n clonedElement.id = oldElement.id;\n // Type values\n let old_type = oldElement.getElementsByClassName('type_question_selector')[0].value;\n clonedElement.getElementsByClassName('type_question_selector')[0].value = old_type;\n // IF NOT A QUESTION\n let not_question_types = ['titre', 'section'];\n if(not_question_types.includes(old_type) === false) {\n // Options Critères Show Select Values\n let old_options_show_criteres = oldElement.getElementsByClassName('questionnaire_builder_forms_question_options_show')[0].getElementsByClassName('options_critere')\n let cloned_options_show_criteres = clonedElement.getElementsByClassName('questionnaire_builder_forms_question_options_show')[0].getElementsByClassName('options_critere')\n for(var i = 0; i < cloned_options_show_criteres.length; i++) {\n var old_condition = old_options_show_criteres[i].children[0].value;\n var old_question = old_options_show_criteres[i].children[1].value;\n var old_mode = old_options_show_criteres[i].children[2].value;\n var old_selected_values = $(old_options_show_criteres[i].children[3]).val();\n cloned_options_show_criteres[i].children[0].value = old_condition;\n cloned_options_show_criteres[i].children[1].value = old_question;\n cloned_options_show_criteres[i].children[2].value = old_mode;\n $(cloned_options_show_criteres[i].children[3]).val(old_selected_values).trigger(\"change\");;\n }\n // Options Critères Redirect Select Values\n let old_options_redirect_criteres = oldElement.getElementsByClassName('questionnaire_builder_forms_question_options_redirect')[0].getElementsByClassName('options_critere')\n let cloned_options_redirect_criteres = clonedElement.getElementsByClassName('questionnaire_builder_forms_question_options_redirect')[0].getElementsByClassName('options_critere')\n for(var i = 0; i < cloned_options_redirect_criteres.length; i++) {\n var old_mode = old_options_redirect_criteres[i].children[1].value;\n var old_selected_values = $(old_options_redirect_criteres[i].children[2]).val();\n var old_redirection = old_options_redirect_criteres[i].children[4].value;\n cloned_options_redirect_criteres[i].children[1].value = old_mode;\n $(cloned_options_redirect_criteres[i].children[2]).val(old_selected_values).trigger(\"change\");\n cloned_options_redirect_criteres[i].children[4].value = old_redirection;\n }\n }\n}\n\n\nexport { initQuestionnaireBuilder };\n\n// Load question\n// Save Auto -> Non urgent\n// .replace(/[_]+/g, \" \")","const initHEXTableauDynamique = () => {\n if(document.getElementsByClassName('hexTableauDynamique').length > 0) {\n let tableau_layouts = document.getElementsByClassName('hexTableauDynamique');\n for(let tableau_layout of tableau_layouts) {\n let tableau_init_data_json = tableau_layout.getAttribute('data-tableau-hex');\n let tableau_init_data = JSON.parse(tableau_init_data_json)[0];\n creerTableauStructure(tableau_layout);\n ajoutHeaderAuTableau(tableau_layout, tableau_init_data);\n ajoutContentAuTableau(tableau_layout, tableau_init_data);\n if(tableau_init_data[\"action_button\"] !== \"hidden\") {\n initializeActionBtns(tableau_layout, tableau_init_data);\n }\n document.addEventListener('keyup', (event) => {\n sauvegarderLigneContenu(tableau_layout, tableau_init_data)\n });\n }\n }\n}\n\nfunction creerTableauStructure(tableau_layout) {\n var tableauHTML = `\n \n \n \n \n \n \n \n \n \n
\n `\n tableau_layout.innerHTML += tableauHTML\n}\n\nfunction generateActionTableLine(tableau_layout) {\n var nbre_colonnes = JSON.parse(tableau_layout.getAttribute('data-tableau-hex'))[0][\"colonnes\"].length\n if(nbre_colonnes > 1) {\n return `\n \n \n \n \n Sauvegarder le tableau\n `\n } else {\n return `\n \n \n Sauvegarder le tableau\n `\n }\n}\n\nfunction ajoutHeaderAuTableau(tableau_layout, tableau_init_data) {\n var headerRow = tableau_layout.getElementsByClassName('header_row')[0]\n var colonnes = tableau_init_data[\"colonnes\"];\n for (var colonne of colonnes) {\n var colonneHTML = `${colonne[\"label\"].replace(/[_]+/g, \" \")}`\n headerRow.innerHTML += colonneHTML\n }\n}\n\nfunction ajoutContentAuTableau(tableau_layout, tableau_init_data) {\n var contentRow = tableau_layout.getElementsByClassName('tabl_contenu')[0]\n var lignes = tableau_init_data[\"lignes\"];\n var colonnes = tableau_init_data[\"colonnes\"];\n for (var ligne of lignes) {\n var contentColonnesHTML = concatenerColonnesLigneContenu(colonnes, ligne)\n var ligneHTML = `\n \n ${contentColonnesHTML}\n \n `\n contentRow.innerHTML += ligneHTML\n }\n}\n\nfunction concatenerColonnesLigneContenu(colonnes, ligne) {\n var colonneHTML = ``\n for(var colonne of colonnes) {\n if(ligne === undefined) {\n var colonneInnerHTML = ajoutNewInnerHTML(colonne)\n } else {\n var colonneInnerHTML = ajoutInnerHTML(colonne, ligne)\n }\n colonneHTML += `\n \n ${colonneInnerHTML}\n \\n\n `\n }\n return colonneHTML\n}\n\nfunction ajoutInnerHTML(colonne, ligne) {\n var result = ``\n switch(colonne[\"type\"]) {\n case \"collection\":\n var options = ``\n for(var option of colonne[\"options\"]) {\n options += `\\n`\n }\n result += `\n \n `\n break;\n case \"input\":\n result += `\n o.nom === colonne[\"nom\"])[\"result\"]}\" />\n `\n break;\n case \"input:number\":\n result += `\n o.nom === colonne[\"nom\"])[\"result\"]}\" />\n `\n break; \n default:\n result += `${ligne.find(o => o.nom === colonne[\"nom\"])[\"result\"]}`\n break; \n }\n return result\n}\n\nfunction ajoutNewInnerHTML(colonne) {\n var result = ``\n switch(colonne[\"type\"]) {\n case \"collection\":\n var options = ``\n for(var option of colonne[\"options\"]) {\n options += `\\n`\n }\n result += `\n \n `\n break;\n case \"input\":\n result += `\n \n `\n break; \n case \"input:number\":\n result += `\n \n `\n break; \n default:\n result += ``\n break; \n }\n return result\n}\n\nfunction initializeActionBtns(tableau_layout, tableau_init_data) {\n let footer_action_btns = `\n ${generateActionTableLine(tableau_layout)}\n `\n tableau_layout.getElementsByClassName('tableauActionBtn')[0].innerHTML += footer_action_btns\n let addRow = tableau_layout.getElementsByClassName(\"addRow\")[0];\n let removeRow = tableau_layout.getElementsByClassName(\"removeRow\")[0];\n let saveTableBtn = tableau_layout.getElementsByClassName(\"saveTableBtn\")[0];\n\n addRow.addEventListener('click', (event) => {\n ajouterLigneContenu(tableau_layout, tableau_init_data);\n })\n removeRow.addEventListener('click', (event) => {\n retirerLigneContenu(tableau_layout, tableau_init_data);\n })\n saveTableBtn.addEventListener('click', (event) => {\n sauvegarderLigneContenu(tableau_layout, tableau_init_data);\n })\n}\n\nfunction ajouterLigneContenu(tableau_layout, tableau_init_data) {\n var colonnes = tableau_init_data[\"colonnes\"];\n var contentRow = tableau_layout.getElementsByClassName('tabl_contenu')[0];\n var contentColonnesHTML = concatenerColonnesLigneContenu(colonnes, undefined);\n var ligneHTML = `\n ${contentColonnesHTML}\n `;\n \n // Créez un nouvel élément de ligne et ajoutez-le à la fin du tableau\n var newRow = document.createElement('tr');\n newRow.classList.add('ligne');\n newRow.innerHTML = ligneHTML;\n contentRow.appendChild(newRow);\n}\n\nfunction retirerLigneContenu(tableau_layout) {\n var contentRow = tableau_layout.getElementsByClassName('tabl_contenu')[0]\n contentRow.removeChild(contentRow.lastChild);\n}\n\nfunction sauvegarderLigneContenu(tableau_layout, tableau_init_data) {\n var lignes = tableau_layout.getElementsByClassName('tabl_contenu')[0].children;\n var colonnesHEAD = tableau_init_data[\"colonnes\"];\n var result = [];\n for(var ligne of lignes) {\n var ligne_result = [];\n for(var i = 0; i < ligne.children.length; i++) {\n var colonneHEAD = colonnesHEAD[i];\n var colonneLigne = ligne.children[i];\n ligne_result.push({ nom: `${colonneHEAD.nom.replace(/ /g, '_')}`, result: `${colonneLigne.children[0].value.replace(/ /g, '_')}` });\n }\n result.push(ligne_result);\n }\n let tableau_final_data = tableau_init_data[\"lignes\"] = result;\n tableau_layout.setAttribute('data-tableau-hex', JSON.stringify(tableau_final_data));\n let awnser_input = tableau_layout.getElementsByClassName('saver_input_tableau')[0];\n awnser_input.value = JSON.stringify(tableau_final_data)\n}\n\nexport { initHEXTableauDynamique };","function checkAccessCode(correctCode, url, csrfToken, event) {\n event.preventDefault();\n event.stopPropagation();\n\n const userCode = prompt(\"Veuillez entrer le code d'accès pour devenir membre :\");\n\n if (userCode === correctCode) {\n var form = document.createElement('form');\n form.method = 'POST';\n form.action = url;\n\n var csrfInput = document.createElement('input');\n csrfInput.type = 'hidden';\n csrfInput.name = 'authenticity_token';\n csrfInput.value = csrfToken;\n form.appendChild(csrfInput);\n\n document.body.appendChild(form);\n form.submit();\n } else {\n alert(\"Code incorrect\");\n }\n}\n\nwindow.checkAccessCode = checkAccessCode;\n\nconst initDevenirMembre = () => {\n const devenirMembreButton = document.querySelector('#devenir-membre-btn');\n\n if (devenirMembreButton) {\n devenirMembreButton.addEventListener('click', (event) => {\n checkAccessCode('VotreCodeSecret', 'VotreURL', 'VotreTokenCSRF', event);\n });\n }\n}\n\nexport { initDevenirMembre };\n","const allowDrop = (event) => {\n event.preventDefault();\n};\n\nconst drag = (event) => {\n event.dataTransfer.setData(\"text\", event.target.id);\n};\n\nconst drop = (event) => {\n event.preventDefault();\n const data = event.dataTransfer.getData(\"text\");\n const etudeCard = document.getElementById(data);\n const colonne = event.target.closest('.colonner-part');\n const newStatus = colonne.getAttribute('data-status');\n const confirmation = window.confirm('Confirmez-vous la mise à jour de l\\'étude ?');\n\n\n if (confirmation) {\n colonne.querySelector('.part-content').appendChild(etudeCard);\n updateEtudeStatus(data.split('-')[1], newStatus);\n }\n};\n\n\nconst updateEtudeStatus = (etudeId, newStatus) => {\n\n\n const csrfToken = document.querySelector('meta[name=\"csrf-token\"]').getAttribute('content');\n\n const etudeElement = document.getElementById(`etude-${etudeId}`);\n const juniorId = etudeElement.getAttribute('data-junior-id');\n\n const url = `/juniors/${juniorId}/etudes/${etudeId}`;\n\n const data = { statut: newStatus };\n\n console.log(data)\n fetch(url, {\n method: 'PATCH',\n headers: {\n 'Content-Type': 'application/json',\n 'X-CSRF-Token': csrfToken,\n\n },\n body: JSON.stringify(data)\n })\n .then(response => {\n if (!response.ok) {\n throw new Error('La mise à jour a échoué');\n }\n return response.json();\n })\n .then(data => {\n window.location.reload();\n })\n .catch(error => {\n console.error('Erreur lors de la mise à jour:', error);\n window.location.reload();\n\n });\n};\n\nconst initDragAndDrop = () => {\n if (/Mobi|Android/i.test(navigator.userAgent)) {\n return;\n }\n\n const etudeCards = document.querySelectorAll('.etude-card');\n const colonnes = document.querySelectorAll('.colonner-part');\n\n etudeCards.forEach(card => {\n card.setAttribute('draggable', true);\n card.addEventListener('dragstart', drag);\n card.addEventListener('click', (event) => {\n const etudeId = event.currentTarget.id.split('-')[1];\n const juniorId = event.currentTarget.getAttribute('data-junior-id');\n window.location.href = `/juniors/${juniorId}/etudes/${etudeId}`;\n });\n });\n\n colonnes.forEach(colonne => {\n colonne.addEventListener('dragover', allowDrop);\n colonne.addEventListener('drop', drop);\n });\n};\n\n\nexport { initDragAndDrop };\n","import Sortable from 'sortablejs';\n\nconst initSortable = () => {\n const container = document.getElementById('chapters-container');\n if (container) {\n Sortable.create(container, {\n animation: 150,\n onEnd: (event) => {\n const id = event.item.dataset.id;\n const newIndex = event.newIndex + 1;\n const url = `/juniors/${container.dataset.juniorId}/courses/${container.dataset.courseId}/chapters/${id}/move`;\n\n fetch(url, {\n method: 'PATCH',\n headers: {\n 'Content-Type': 'application/json',\n 'X-CSRF-Token': document.querySelector('meta[name=\"csrf-token\"]').content,\n },\n body: JSON.stringify({ position: newIndex }),\n }).then(() => {\n const chapters = container.querySelectorAll('.chapter');\n chapters.forEach((chapter, index) => {\n chapter.querySelector('.chapter-position').textContent = `Chapitre ${index + 1}`;\n });\n });\n },\n });\n }\n const lessonElementsContainer = document.querySelector('.lesson-elements-container');\n\n if (lessonElementsContainer) {\n const juniorId = lessonElementsContainer.dataset.juniorId;\n const courseId = lessonElementsContainer.dataset.courseId;\n const chapterId = lessonElementsContainer.dataset.chapterId;\n const lessonId = lessonElementsContainer.dataset.lessonId;\n\n Sortable.create(lessonElementsContainer, {\n animation: 150,\n handle: '.drag-handle',\n onEnd: (event) => {\n const element = event.item;\n const newIndex = event.newIndex;\n\n // Send AJAX request to update the position of the lesson element\n const lessonElementId = element.dataset.lessonElementId;\n const url = `/juniors/${juniorId}/courses/${courseId}/chapters/${chapterId}/lessons/${lessonId}/lesson_elements/${lessonElementId}/update_position`;\n const token = document.querySelector('meta[name=\"csrf-token\"]').getAttribute('content');\n\n fetch(url, {\n method: 'PATCH',\n headers: {\n 'X-CSRF-Token': token,\n 'Content-Type': 'application/json'\n },\n body: JSON.stringify({ position: newIndex + 1 })\n });\n }\n });\n }\n const lessonsContainer = document.querySelector('.lessons-container');\n\n if (lessonsContainer) {\n Sortable.create(lessonsContainer, {\n animation: 150,\n handle: '.lesson-card',\n onEnd: (event) => {\n const order = Array.from(lessonsContainer.children).map((lessonCard, index) => ({\n id: lessonCard.dataset.lessonId,\n position: index + 1\n }));\n\n // Send AJAX request to update the position of the lessons\n const juniorId = lessonsContainer.dataset.juniorId;\n const courseId = lessonsContainer.dataset.courseId;\n const chapterId = lessonsContainer.dataset.chapterId;\n const url = `/juniors/${juniorId}/courses/${courseId}/chapters/${chapterId}/update_lesson_positions`;\n const token = document.querySelector('meta[name=\"csrf-token\"]').getAttribute('content');\n\n fetch(url, {\n method: 'PATCH',\n headers: {\n 'X-CSRF-Token': token,\n 'Content-Type': 'application/json'\n },\n body: JSON.stringify({ order })\n }).then(response => {\n if (response.ok) {\n console.log('Positions updated successfully');\n } else {\n console.error('Failed to update positions');\n }\n });\n }\n });\n }\n\n};\n\nexport { initSortable };\n","const initTaskManager = () => {\n var arrow = document.getElementById('arrow')\n\n if (!arrow) {\n return;\n }\n arrow.addEventListener('click', function() {\n document.getElementById('destination').scrollIntoView({behavior: 'smooth'});\n });\n\n function openModal(modalId, taskId, reference, reference_id, junior_id, campagne_id) {\n closeModals();\n\n var modal = document.getElementById(modalId);\n if (modalId === 'validActionTaskModal') {\n\n\n const url = `/juniors/1/taches/${taskId}/task_details?task_id=${taskId}`;\n fetch(url)\n .then(response => {\n if (response.ok && response.status !== 204) {\n return response.json();\n } else {\n throw new Error('No content returned from the server');\n }\n })\n .then(data => {\n document.getElementById('taskTitle').value = data.title;\n document.getElementById('taskComment').textContent = data.comment;\n var button = document.getElementById(\"customButton\");\n if (reference== \"Contact\") {\n button.textContent = \"Aller sur le contact\";\n var customLink = \"/juniors/\" + junior_id + \"/contacts/\" + reference_id\n button.setAttribute(\"href\", customLink);\n button.addEventListener('click', function() {\n window.location.href = customLink;\n });\n }\n var checkmark = modal.querySelector('.checkmark');\n checkmark.setAttribute('data-task-id', taskId);\n modal.style.display = 'flex';\n modal.querySelector('.modal-content').style.transform = 'scale(1)';\n })\n .catch(error => console.error('Error fetching task details:', error));\n }\n }\n\n\n function closeModals() {\n document.querySelectorAll('.modal').forEach(function(modal) {\n modal.style.display = 'none';\n });\n }\n\n document.querySelectorAll('.close').forEach(function(closeButton) {\n closeButton.addEventListener('click', closeModals);\n });\n\n window.addEventListener('click', function(event) {\n if (event.target.classList.contains('modal')) {\n closeModals();\n }\n });\n document.getElementById('validateTask').addEventListener('change', function() {\n if (this.checked) {\n const checkmark = this.nextElementSibling;\n const taskId = checkmark.getAttribute('data-task-id');\n const juniorId = checkmark.getAttribute('data-junior-id');\n\n submitTaskUpdate(taskId, juniorId);\n }\n });\n function sleep(ms) {\n return new Promise(resolve => setTimeout(resolve, ms));\n }\n\n function submitTaskUpdate(taskId, juniorId) {\n const url = `/juniors/${juniorId}/taches/${taskId}`;\n const data = {\n tache: {\n statut: 'valid',\n date_validation: new Date().toISOString()\n }\n };\n const csrfToken = document.querySelector('meta[name=\"csrf-token\"]').getAttribute('content');\n\n fetch(url, {\n method: 'PATCH',\n headers: {\n 'Content-Type': 'application/json',\n 'Accept': 'application/json',\n 'X-CSRF-Token': csrfToken,\n\n },\n body: JSON.stringify(data)\n })\n .then(response => {\n if (response.ok) {\n return response.json();\n } else {\n throw new Error('Problème lors de la mise à jour de la tâche');\n }\n })\n .then(data => {\n console.log('Success:', data);\n sleep(500).then(() => { location.reload(); });\n })\n .catch((error) => {\n console.error('Error:', error);\n alert('Erreur lors de la validation de la tâche');\n });\n }\n}\n\nexport { initTaskManager };\n","import { Application } from \"stimulus\";\nimport { definitionsFromContext } from \"stimulus/webpack-helpers\";\n\nconst application = Application.start();\nconst context = require.context(\"controllers\", true, /\\.js$/);\napplication.load(definitionsFromContext(context));\n\nconst initProgressInputs = () => {\n const progressInputs = document.querySelectorAll('.progress-input');\n\n if (progressInputs.length === 0) return;\n\n progressInputs.forEach(input => {\n input.removeEventListener('change', validateAndUpdateProgress);\n input.removeEventListener('blur', validateAndUpdateProgress);\n input.addEventListener('change', validateAndUpdateProgress);\n input.addEventListener('blur', validateAndUpdateProgress);\n });\n function validateAndUpdateProgress(event) {\n if (this.value > 100) {\n this.value = 100;\n } else if (this.value < 0) {\n this.value = 0;\n }\n updateProgress.call(this);\n }\n async function updateProgress(event) {\n const progressId = this.getAttribute('data-progress-id');\n const juniorId = this.getAttribute('data-junior-id');\n const parcourId = this.getAttribute('data-parcour-id');\n const progressValue = this.value / 100;\n\n const response = await fetch(`/juniors/${juniorId}/parcours/${parcourId}/update_lesson_progresses`, {\n method: 'PATCH',\n headers: {\n 'Content-Type': 'application/json',\n 'X-CSRF-Token': document.querySelector('meta[name=\"csrf-token\"]').getAttribute('content')\n },\n body: JSON.stringify({ progress_id: progressId, progress: progressValue })\n });\n\n if (response.ok) {\n console.log('Progress updated successfully');\n } else {\n console.error('Failed to update progress');\n }\n }\n}\nconst initTracker = () => {\n const viewDetailsButtons = document.querySelectorAll('.view-details');\n const detailsContent = document.getElementById('details-content');\n\n if (viewDetailsButtons.length > 0 && detailsContent) {\n viewDetailsButtons.forEach(button => {\n button.addEventListener('click', async function () {\n const userId = this.getAttribute('data-user-id');\n const juniorId = this.getAttribute('data-junior-id');\n const parcourId = this.getAttribute('data-parcour-id');\n\n const response = await fetch(`/juniors/${juniorId}/parcours/${userId}/lesson_progresses?parcour_id=${parcourId}`);\n const data = await response.text();\n detailsContent.innerHTML = data;\n\n initProgressInputs();\n application.load(definitionsFromContext(context));\n const validationSelects = document.querySelectorAll('.validation-select');\n\n if (validationSelects.length > 0) {\n validationSelects.forEach(select => {\n select.addEventListener('change', updateDepotValidation);\n });\n }\n\n async function updateDepotValidation(event) {\n const depotId = this.getAttribute('data-depot-id');\n const juniorId = this.getAttribute('data-junior-id');\n const parcourId = this.getAttribute('data-parcour-id');\n const validationValue = this.value;\n\n const response = await fetch(`/juniors/${juniorId}/parcours/${parcourId}/update_depot_fichier`, {\n method: 'PATCH',\n headers: {\n 'Content-Type': 'application/json',\n 'X-CSRF-Token': document.querySelector('meta[name=\"csrf-token\"]').getAttribute('content')\n },\n body: JSON.stringify({ depot_id: depotId, valid: validationValue })\n });\n\n if (response.ok) {\n console.log('Depot validation updated successfully');\n } else {\n console.error('Failed to update depot validation');\n }\n }\n });\n });\n }\n\n}\n\nexport { initTracker };\n","import PropTypes from 'prop-types';\nimport React, { useState } from 'react';\n\nconst HelloWorld = (props) => {\n const [name, setName] = useState(props.name);\n\n return (\n
\n

Hello, {name}!

\n
\n
\n \n
\n
\n );\n};\n\nHelloWorld.propTypes = {\n name: PropTypes.string.isRequired, // this is passed from the Rails view\n};\n\nexport default HelloWorld;\n","import React from 'react';\nimport PropTypes from 'prop-types';\n\nconst LessonBlock = ({ lesson, isCurrent, progress, onClick }) => {\n return (\n \n \n );\n};\n\nLessonBlock.propTypes = {\n lesson: PropTypes.shape({\n id: PropTypes.number.isRequired,\n title: PropTypes.string.isRequired,\n }).isRequired,\n isCurrent: PropTypes.bool.isRequired,\n progress: PropTypes.number.isRequired,\n onClick: PropTypes.func.isRequired,\n};\n\nexport default LessonBlock;\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport LessonBlock from './LessonBlock';\n\nconst ProgressBar = ({ chapters, currentLesson, lessonProgresses, onLessonClick, leftIconUrl, rightIconUrl }) => {\n return (\n
\n
\n \"Left\n
\n
\n {chapters.map((chapter, chapterIndex) => (\n
\n {chapter.lessons.map((lesson, lessonIndex) => (\n onLessonClick(lesson)}\n />\n ))}\n
\n ))}\n
\n
\n \"Right\n
\n
\n );\n};\n\nProgressBar.propTypes = {\n chapters: PropTypes.arrayOf(\n PropTypes.shape({\n id: PropTypes.number.isRequired,\n lessons: PropTypes.arrayOf(\n PropTypes.shape({\n id: PropTypes.number.isRequired,\n title: PropTypes.string.isRequired,\n }).isRequired\n ).isRequired,\n }).isRequired\n ).isRequired,\n currentLesson: PropTypes.shape({\n id: PropTypes.number.isRequired,\n }).isRequired,\n onLessonClick: PropTypes.func.isRequired,\n lessonProgresses: PropTypes.object.isRequired,\n leftIconUrl: PropTypes.string.isRequired,\n rightIconUrl: PropTypes.string.isRequired,\n};\n\nexport default ProgressBar;\n","import React, { useState, useEffect } from 'react';\nimport PropTypes from 'prop-types';\nconst QcmComponent = ({ element, junior, current_user, qcmId }) => {\n const [qcmData, setQcmData] = useState([]);\n const [userAnswers, setUserAnswers] = useState({});\n const [qcmAnswer, setQcmAnswer] = useState(null);\n const [cooldown, setCooldown] = useState(false);\n const [message, setMessage] = useState('');\n const [isCorrect, setIsCorrect] = useState(false);\n\n useEffect(() => {\n if (element.content) {\n setQcmData(JSON.parse(element.content));\n }\n fetchQcmAnswer(element.id);\n }, [element]);\n\n const fetchQcmAnswer = async (lessonElementId) => {\n const response = await fetch(`/juniors/${junior.current_junior}/qcm_answers?user_id=${current_user}&lesson_element_id=${lessonElementId}`);\n const data = await response.json();\n if (data.length > 0) {\n const latestAnswer = data.sort((a, b) => new Date(b.created_at) - new Date(a.created_at))[0];\n setQcmAnswer(latestAnswer);\n if (latestAnswer.validation) {\n setMessage('Félicitation, vous avez correctement répondu à toutes les questions ! Vous avez donc déjà validé ce QCM.');\n setIsCorrect(true);\n } else {\n const lastAttemptTime = new Date(latestAnswer.created_at).getTime();\n const currentTime = new Date().getTime();\n if ((currentTime - lastAttemptTime) / 1000 / 60 < 2) {\n setCooldown(true);\n setMessage(\"Vous n'avez pas correctement répondu au QCM. Vous devez donc attendre 2 minutes avant de pouvoir refaire ce QCM.\");\n setIsCorrect(false);\n }\n }\n }\n };\n\n const handleAnswerChange = (questionIndex, answerIndex) => {\n setUserAnswers(prevAnswers => {\n const updatedAnswers = { ...prevAnswers };\n if (!updatedAnswers[questionIndex]) {\n updatedAnswers[questionIndex] = [];\n }\n if (updatedAnswers[questionIndex].includes(answerIndex)) {\n updatedAnswers[questionIndex] = updatedAnswers[questionIndex].filter(i => i !== answerIndex);\n } else {\n updatedAnswers[questionIndex].push(answerIndex);\n }\n return updatedAnswers;\n });\n };\n\n const handleSubmit = async (event) => {\n event.preventDefault();\n if (cooldown || message === 'Vous avez déjà validé ce QCM.') return;\n\n const isCorrect = qcmData.every((question, index) => {\n const correctAnswers = question.answers.map((answer, i) => answer.correct ? i : null).filter(i => i !== null);\n return JSON.stringify(correctAnswers.sort()) === JSON.stringify(userAnswers[index]?.sort());\n });\n\n const response = await fetch(`/juniors/${junior.current_junior}/qcm_answers`, {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/json',\n 'X-CSRF-Token': document.querySelector('meta[name=\"csrf-token\"]').getAttribute('content')\n },\n body: JSON.stringify({\n user_id: current_user,\n lesson_element_id: element.id,\n lesson_progress_id: null,\n content: JSON.stringify(userAnswers),\n validation: isCorrect\n })\n });\n\n if (response.ok) {\n fetchQcmAnswer(element.id);\n setMessage(isCorrect ? 'Vous avez correctement répondu au QCM !' : 'Vous avez fait des erreurs dans le QCM.');\n setIsCorrect(isCorrect);\n }\n };\n\n return (\n
\n {message &&

{message}

}\n
\n {qcmData.map((question, questionIndex) => (\n
\n

{question.question}

\n {question.answers.map((answer, answerIndex) => (\n
\n handleAnswerChange(questionIndex, answerIndex)}\n checked={userAnswers[questionIndex]?.includes(answerIndex) || false}\n />\n \n
\n ))}\n
\n ))}\n \n
\n
\n );\n};\n\n\nQcmComponent.propTypes = {\n element: PropTypes.object.isRequired,\n junior: PropTypes.object.isRequired,\n current_user: PropTypes.number.isRequired,\n};\n\nexport default QcmComponent;\n","// YouTubeAPI.js\n\nlet isAPILoaded = false;\nlet loadAPI;\n\nconst loadYouTubeAPI = () => {\n if (isAPILoaded) {\n return Promise.resolve();\n }\n\n if (!loadAPI) {\n loadAPI = new Promise((resolve) => {\n window.onYouTubeIframeAPIReady = () => {\n isAPILoaded = true;\n resolve();\n };\n\n const tag = document.createElement('script');\n tag.src = 'https://www.youtube.com/iframe_api';\n document.head.appendChild(tag);\n });\n }\n\n return loadAPI;\n};\n\nexport default loadYouTubeAPI;\n","import React, { useEffect, useRef, useState } from 'react';\nimport loadYouTubeAPI from './YouTubeAPI'; // Import the loader\n\n\nconst YouTubeVideo = ({ element, user, junior }) => {\n const [videoProgress, setLocalVideoProgress] = useState(null);\n const videoProgressRef = useRef(null);\n const [isPlayerReady, setIsPlayerReady] = useState(false);\n\n const playerRef = useRef(null);\n const lastTimeRef = useRef(0);\n const intervalRef = useRef(null);\n const timeThreshold = 2;\n const [isSeeking, setIsSeeking] = useState(false);\n const updateLastTime = (currentTime) => {\n console.log(currentTime)\n if (!isSeeking && currentTime > lastTimeRef.current) {\n lastTimeRef.current = currentTime;\n }\n };\n\n\n useEffect(() => {\n videoProgressRef.current = videoProgress;\n }, [videoProgress]);\n\n useEffect(() => {\n if (!element.youtube_url) {\n console.warn(\"Aucun ID de vidéo YouTube fourni pour l'élément :\", element.id);\n return;\n }\n\n const initializePlayer = () => {\n if (!playerRef.current) {\n playerRef.current = new YT.Player(`youtube-player-${element.id}`, {\n videoId: element.youtube_url,\n events: {\n 'onReady': onPlayerReady,\n 'onStateChange': onPlayerStateChange,\n },\n });\n }\n };\n\n loadYouTubeAPI().then(() => {\n initializePlayer();\n });\n\n fetchVideoProgress(element.id);\n\n return () => {\n clearInterval(intervalRef.current);\n if (playerRef.current) {\n playerRef.current.destroy();\n playerRef.current = null;\n }\n };\n }, []);\n\n const fetchVideoProgress = async (lessonElementId) => {\n try {\n const response = await fetch(`/juniors/${junior.current_junior}/video_progresses/find_or_create`, {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/json',\n 'X-CSRF-Token': document.querySelector('meta[name=\"csrf-token\"]').getAttribute('content')\n },\n body: JSON.stringify({ user_id: user, lesson_element_id: lessonElementId })\n });\n const data = await response.json();\n setLocalVideoProgress(data);\n } catch (error) {\n console.error('Erreur lors de la récupération de la progression vidéo :', error);\n }\n };\n\n const onPlayerReady = (event) => {\n setIsPlayerReady(true);\n };\n\n useEffect(() => {\n if (isPlayerReady && videoProgress) {\n\n intervalRef.current = setInterval(() => {\n if (playerRef.current && playerRef.current.getCurrentTime) {\n const currentTime = playerRef.current.getCurrentTime();\n\n if (!isSeeking && currentTime > lastTimeRef.current + timeThreshold) {\n setIsSeeking(true);\n playerRef.current.seekTo(lastTimeRef.current);\n } else if (isSeeking && currentTime <= lastTimeRef.current + timeThreshold) {\n setIsSeeking(false);\n } else if (!isSeeking) {\n updateLastTime(currentTime);\n }\n }\n }, 1000);\n }\n }, [isPlayerReady, videoProgress]);\n\n const onPlayerStateChange = (event) => {\n if (event.data === YT.PlayerState.ENDED) {\n clearInterval(intervalRef.current);\n handleVideoEnd();\n } else if (event.data === YT.PlayerState.PLAYING && isSeeking) {\n setIsSeeking(false);\n }\n };\n\n const handleVideoEnd = async () => {\n const currentVideoProgress = videoProgressRef.current;\n if (!currentVideoProgress) {\n return;\n }\n if (!currentVideoProgress.watched) {\n try {\n const response = await fetch(`/juniors/${junior.current_junior}/video_progresses/${currentVideoProgress.id}`, {\n method: 'PATCH',\n headers: {\n 'Content-Type': 'application/json',\n 'X-CSRF-Token': document.querySelector('meta[name=\"csrf-token\"]').getAttribute('content')\n },\n body: JSON.stringify({ watched: true })\n });\n const data = await response.json();\n console.log('Progression vidéo mise à jour :', data);\n setLocalVideoProgress(data);\n setVideoProgress(data);\n } catch (error) {\n console.error('Erreur lors de la mise à jour de la progression vidéo :', error);\n }\n }\n };\n\n return (\n
\n
\n {!videoProgress?.watched && (\n

\n Vous devez regarder cette vidéo en entier afin de pouvoir la valider.\n

\n )}\n
\n );\n};\n\nexport default YouTubeVideo;\n","import React, { useEffect, useState, useRef } from 'react';\nimport PropTypes from 'prop-types';\nimport QcmComponent from './QcmComponent';\nimport YouTubeVideo from './YouTubeVideo';\n\n\nconst LessonContent = ({ lessonElements, junior, current_user }) => {\n const [depotAnswers, setDepotAnswers] = useState({});\n const videoRefs = useRef({});\n const fileInputRefs = useRef({});\n\n const fetchDepotAnswers = async (lessonElementId) => {\n\n const response = await fetch(`/juniors/${junior.current_junior}/depot_answers?user_id=${current_user}&lesson_element_id=${lessonElementId}`);\n const data = await response.json();\n setDepotAnswers(prevState => ({ ...prevState, [lessonElementId]: data }));\n };\n\n const handleFileSubmit = async (event, lessonElementId) => {\n event.preventDefault();\n const file = fileInputRefs.current[lessonElementId].files[0];\n const formData = new FormData();\n formData.append('file', file);\n formData.append('user_id', current_user);\n formData.append('lesson_element_id', lessonElementId);\n\n const response = await fetch(`/juniors/${junior.current_junior}/depot_answers`, {\n method: 'POST',\n headers: {\n 'X-CSRF-Token': document.querySelector('meta[name=\"csrf-token\"]').getAttribute('content')\n },\n body: formData\n });\n fetchDepotAnswers(lessonElementId);\n };\n\n useEffect(() => {\n lessonElements.forEach(element => {\n\n if (element.element_type === 'Dépot de fichier') {\n fetchDepotAnswers(element.id);\n } else if (element.element_type === 'Vidéo') {\n\n }\n });\n }, [lessonElements]);\n\n\n\n\n return (\n
\n {lessonElements.map((element) => (\n
\n {renderElementContent(element, videoRefs, fileInputRefs, depotAnswers, handleFileSubmit, junior, current_user)}\n
\n ))}\n
\n );\n};\n\nconst renderElementContent = (element, videoRefs, fileInputRefs, depotAnswers, handleFileSubmit, junior, current_user) => {\n switch (element.element_type) {\n case 'Titre':\n return
{element.content}
;\n case 'Texte':\n return

{element.content}

;\n case 'Vidéo':\n return (\n \n )\n case 'Image':\n return (\n
\n \"Content\n
\n );\n case 'Fichier':\n return (\n
\n \n \n \n
\n );\n\n\n\n case 'Dépot de fichier':\n const depotAnswer = depotAnswers[element.id];\n const validationDic = {\n pending: 'En attente de validation',\n refused: 'Refusé',\n accepted: 'Accepté',\n }\n if (depotAnswer && depotAnswer.length > 0) {\n const sortedDepotAnswers = depotAnswer.sort((a, b) => new Date(b.created_at) -new Date(a.created_at));\n const pendingAnswer = sortedDepotAnswers.find(depot => depot.validation === 'pending');\n const refusedAnswer = sortedDepotAnswers.find(depot => depot.validation === 'refused');\n const acceptedAnswer = sortedDepotAnswers.find(depot => depot.validation === 'accepted');\n if (acceptedAnswer) {\n return (\n
\n

{element.content}

\n

Votre dernier document déposé a été validé !

\n

Historique des dépôts :

\n \n \n \n \n \n \n \n \n {depotAnswer.map((depot, index) => (\n \n \n \n \n ))}\n \n
Nom du fichierValidation
{depot.file_name}{validationDic[depot.validation]}
\n
\n );\n } else if (pendingAnswer) {\n return (\n
\n

{element.content}

\n

Votre dernier document déposé est en attente de validation.

\n

Historique des dépôts :

\n \n \n \n \n \n \n \n \n {depotAnswer.map((depot, index) => (\n \n \n \n \n ))}\n \n
Nom du fichierValidation
{depot.file_name}{validationDic[depot.validation]}
\n
\n );\n } else if (refusedAnswer) {\n return (\n
\n

{element.content}

\n\n

Votre document a été refusé. Veuillez déposer un nouveau fichier.

\n
handleFileSubmit(event, element.id)}>\n fileInputRefs.current[element.id] = el}/>\n \n
\n

Historique des dépôts :

\n \n \n \n \n \n \n \n \n {depotAnswer.map((depot, index) => (\n \n \n \n \n ))}\n \n
Nom du fichierValidation
{depot.file_name}{validationDic[depot.validation]}
\n
\n );\n } else {\n return (\n
\n

{element.content}

\n\n

Historique des dépôts :

\n \n \n \n \n \n \n \n \n {depotAnswer.map((depot, index) => (\n \n \n \n \n ))}\n \n
Nom du fichierValidation
{depot.file_name}{validationDic[depot.validation]}
\n
handleFileSubmit(event, element.id)}>\n fileInputRefs.current[element.id] = el}/>\n \n
\n
\n );\n }\n } else {\n return (\n
\n

{element.content}

\n
handleFileSubmit(event, element.id)}>\n fileInputRefs.current[element.id] = el}/>\n \n
\n
\n );\n }\n case 'QCM':\n return (\n \n );\n default:\n return
{element.element_type}: {element.content}
;\n }\n};\n\nLessonContent.propTypes = {\n junior: PropTypes.shape({\n current_junior: PropTypes.number.isRequired,\n }).isRequired,\n current_user: PropTypes.number.isRequired,\n lessonElements: PropTypes.arrayOf(\n PropTypes.shape({\n id: PropTypes.number.isRequired,\n element_type: PropTypes.string.isRequired,\n content: PropTypes.string,\n youtube_url: PropTypes.string,\n download: PropTypes.string,\n })\n ).isRequired,\n};\n\nexport default LessonContent;\n","import React from 'react';\nimport PropTypes from 'prop-types';\n\nconst Banner = ({ course, parcour, junior }) => {\n const parcoursUrl = `/juniors/${junior.current_junior}/learning_center`\n return (\n
\n
\n
\n {course.is_a_parcour ? (\n <>\n Parcours > {parcour.title} \n > \n {course.title}\n \n ) : (\n <>\n Learning Center > \n {course.title}\n \n )}\n
\n
{course.title}
\n
\n {course.time} minutes\n {course.difficult}\n
\n
\n
\n \"Creator\n
Dernière mise à jour le {course.last_updated_at}
\n
\n
\n );\n};\n\n\nexport default Banner;\n","import React, { useState, useEffect } from 'react';\n\nconst ChapterNavigation = ({ chapters, currentLesson, onLessonClick, lessonProgresses }) => {\n const [currentChapterIndex, setCurrentChapterIndex] = useState(() => {\n return chapters.findIndex(chapter =>\n chapter.lessons.some(lesson => lesson.id === currentLesson.id)\n );\n });\n\n useEffect(() => {\n const newChapterIndex = chapters.findIndex(chapter =>\n chapter.lessons.some(lesson => lesson.id === currentLesson.id)\n );\n setCurrentChapterIndex(newChapterIndex);\n }, [currentLesson, chapters]);\n\n const handlePreviousChapter = () => {\n if (currentChapterIndex > 0) {\n setCurrentChapterIndex(currentChapterIndex - 1);\n }\n };\n\n const handleNextChapter = () => {\n if (currentChapterIndex < chapters.length - 1) {\n setCurrentChapterIndex(currentChapterIndex + 1);\n }\n };\n\n return (\n
\n
\n
\n \n
{chapters[currentChapterIndex].title}
\n \n
\n
\n
\n
    \n {chapters[currentChapterIndex].lessons.map((lesson) => (\n onLessonClick(lesson)}\n >\n {lesson.title}\n {lesson.id === currentLesson.id }\n \n ))}\n
\n
\n
\n );\n};\n\nexport default ChapterNavigation;\n","import React, { useState, useEffect, useRef } from 'react';\nimport PropTypes from 'prop-types';\n\nconst Timer = ({ currentLessonId, junior, current_user, onUpdateProgress }) => {\n const timerRef = useRef(null);\n const startTimeRef = useRef(null);\n const [lastProgress, setLastProgress] = useState(null);\n\n const fetchLessonProgress = async (lessonId) => {\n const response = await fetch(`/juniors/${junior.current_junior}/lesson_progresses/find_or_create`, {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/json',\n 'X-CSRF-Token': document.querySelector('meta[name=\"csrf-token\"]').getAttribute('content')\n },\n body: JSON.stringify({ user_id: current_user, lesson_id: lessonId })\n });\n const data = await response.json();\n return data;\n };\n\n const updateLessonTime = async (progressId, startTime) => {\n if (!startTime) return;\n const endTime = new Date().getTime();\n const timeSpent = Math.floor((endTime - startTime) / 1000);\n\n const response = await fetch(`/juniors/${junior.current_junior}/lesson_progresses/${progressId}/update_time`, {\n method: 'PATCH',\n headers: {\n 'Content-Type': 'application/json',\n 'X-CSRF-Token': document.querySelector('meta[name=\"csrf-token\"]').getAttribute('content')\n },\n body: JSON.stringify({ time: timeSpent })\n });\n\n if (response.ok) {\n const updatedProgress = await response.json();\n onUpdateProgress(updatedProgress.lesson_id, updatedProgress.progress);\n }\n };\n\n const startTimer = async (lessonId) => {\n const currentProgress = await fetchLessonProgress(lessonId);\n if (currentProgress.progress < 1) {\n setLastProgress(currentProgress);\n startTimeRef.current = new Date().getTime();\n timerRef.current = setInterval(() => {}, 1000);\n } else {\n setLastProgress(null);\n }\n };\n\n const stopTimer = async () => {\n if (timerRef.current) {\n clearInterval(timerRef.current);\n timerRef.current = null;\n if (lastProgress) {\n await updateLessonTime(lastProgress.id, startTimeRef.current);\n setLastProgress(null);\n }\n }\n };\n\n useEffect(() => {\n const handleUnload = async () => {\n await stopTimer();\n };\n\n window.addEventListener('beforeunload', handleUnload);\n return () => {\n window.removeEventListener('beforeunload', handleUnload);\n };\n }, []);\n\n useEffect(() => {\n const handleLessonChange = async () => {\n await stopTimer();\n await startTimer(currentLessonId);\n };\n\n handleLessonChange();\n }, [currentLessonId]);\n\n return null;\n};\n\nTimer.propTypes = {\n currentLessonId: PropTypes.number.isRequired,\n junior: PropTypes.shape({\n current_junior: PropTypes.number.isRequired,\n }).isRequired,\n current_user: PropTypes.number.isRequired,\n onUpdateProgress: PropTypes.func.isRequired,\n};\n\nexport default Timer;\n","import React, { useState, useEffect } from 'react';\nimport PropTypes from 'prop-types';\nimport ProgressBar from './ProgressBar';\nimport LessonContent from './LessonContent';\nimport Banner from './Banner';\nimport ChapterNavigation from './ChapterNavigation';\nimport Timer from './Timer';\n\nconst Training = ({ junior, course, chapters, leftIconUrl, rightIconUrl, parcour, current_user }) => {\n const [currentLesson, setCurrentLesson] = useState(chapters[0].lessons[0]);\n const [lessonProgresses, setLessonProgresses] = useState({});\n\n const fetchLessonProgress = async (lessonId) => {\n const response = await fetch(`/juniors/${junior.current_junior}/lesson_progresses/find_or_create`, {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/json',\n 'X-CSRF-Token': document.querySelector('meta[name=\"csrf-token\"]').getAttribute('content')\n },\n body: JSON.stringify({ user_id: current_user, lesson_id: lessonId })\n });\n const data = await response.json();\n return data;\n };\n\n const initializeLessonProgresses = async () => {\n const progressData = {};\n for (const chapter of chapters) {\n for (const lesson of chapter.lessons) {\n const data = await fetchLessonProgress(lesson.id);\n progressData[lesson.id] = data.progress;\n }\n }\n setLessonProgresses(progressData);\n };\n\n const verifyAndUpdateAllProgresses = async () => {\n const progressPromises = chapters.flatMap(chapter =>\n chapter.lessons.map(lesson => fetchLessonProgress(lesson.id))\n );\n\n const progressDataArray = await Promise.all(progressPromises);\n\n const progressData = {};\n progressDataArray.forEach(data => {\n progressData[data.lesson_id] = data.progress;\n });\n\n setLessonProgresses(progressData);\n };\n\n useEffect(() => {\n initializeLessonProgresses();\n }, [chapters]);\n\n const handleLessonClick = async (lesson) => {\n setCurrentLesson(lesson);\n verifyAndUpdateAllProgresses();\n };\n\n const handleUpdateProgress = (lessonId, progress) => {\n setLessonProgresses(prev => ({ ...prev, [lessonId]: progress }));\n };\n\n return (\n
\n \n \n
\n
\n

{currentLesson.title}

\n

{currentLesson.content}

\n

{currentLesson.time} minutes

\n
\n \n
\n
\n \n
\n \n
\n );\n};\n\nTraining.propTypes = {\n junior: PropTypes.shape({\n junior: PropTypes.number.isRequired,\n junior_nom: PropTypes.string.isRequired,\n current_junior: PropTypes.number.isRequired,\n }).isRequired,\n course: PropTypes.shape({\n title: PropTypes.string.isRequired,\n description: PropTypes.string.isRequired,\n creator_logo: PropTypes.string.isRequired,\n last_updated_at: PropTypes.string.isRequired,\n difficult: PropTypes.string.isRequired,\n time: PropTypes.number.isRequired,\n is_a_parcour: PropTypes.bool.isRequired,\n }).isRequired,\n chapters: PropTypes.arrayOf(\n PropTypes.shape({\n id: PropTypes.number.isRequired,\n lessons: PropTypes.arrayOf(\n PropTypes.shape({\n id: PropTypes.number.isRequired,\n position: PropTypes.number.isRequired,\n title: PropTypes.string.isRequired,\n time: PropTypes.number,\n content: PropTypes.string,\n lesson_elements: PropTypes.arrayOf(\n PropTypes.shape({\n id: PropTypes.number.isRequired,\n element_type: PropTypes.string.isRequired,\n content: PropTypes.string,\n video: PropTypes.string,\n picture: PropTypes.string,\n download: PropTypes.string,\n })\n ).isRequired,\n })\n ),\n })\n ).isRequired,\n leftIconUrl: PropTypes.string.isRequired,\n rightIconUrl: PropTypes.string.isRequired,\n parcour: PropTypes.shape({\n id: PropTypes.number,\n title: PropTypes.string,\n }),\n current_user: PropTypes.number.isRequired,\n};\n\nexport default Training;\n","import React, { useState } from 'react';\n\nconst FileUpload = ({ onNext }) => {\n const [isDragging, setIsDragging] = useState(false);\n\n const handleFileChange = (event) => {\n onNext(event.target.files[0]);\n };\n\n const handleDragOver = (event) => {\n event.preventDefault();\n setIsDragging(true);\n };\n\n const handleDragLeave = () => {\n setIsDragging(false);\n };\n\n const handleDrop = (event) => {\n event.preventDefault();\n setIsDragging(false);\n if (event.dataTransfer.files && event.dataTransfer.files[0]) {\n onNext(event.dataTransfer.files[0]);\n }\n };\n\n return (\n \n {isDragging && (\n
\n Déposez votre fichier\n
\n )}\n
\n
\n \n \n \n
\n

Déposez votre fichier juste ici (xlsx, csv)

\n \n \n
\n
\n );\n};\n\nexport default FileUpload;\n","import React, { useState } from 'react';\nimport PropTypes from 'prop-types';\n\nconst ModelSelection = ({ onNext, models }) => {\n const [selectedModel, setSelectedModel] = useState('');\n\n const handleModelChange = (event) => {\n setSelectedModel(event.target.value);\n };\n\n const handleNext = () => {\n if (selectedModel) {\n onNext(selectedModel);\n } else {\n alert(\"Please select a model\");\n }\n };\n\n return (\n
\n \n \n
\n );\n};\n\nModelSelection.propTypes = {\n onNext: PropTypes.func.isRequired,\n models: PropTypes.arrayOf(PropTypes.string).isRequired,\n};\n\nexport default ModelSelection;\n","import React, { useState, useEffect } from 'react';\nimport { Oval } from 'react-loader-spinner';\nimport { FaCheckCircle, FaTimesCircle } from 'react-icons/fa';\n\nconst ImportStatusModal = ({ jobId, onClose, juniorId }) => {\n const [status, setStatus] = useState('in_progress');\n const [errors, setErrors] = useState([]);\n\n useEffect(() => {\n const intervalId = setInterval(() => {\n fetch(`import_status?job_id=${jobId}`)\n .then(response => response.json())\n .then(data => {\n if (data.status === 'in_progress') {\n setStatus('in_progress');\n } else if (data.status === 'success') {\n setStatus('success');\n clearInterval(intervalId);\n } else if (data.status === 'error') {\n setStatus('error');\n setErrors(data.errors);\n clearInterval(intervalId);\n }\n })\n .catch(error => {\n setStatus('error');\n setErrors([error.message]);\n clearInterval(intervalId);\n });\n }, 2000);\n\n return () => clearInterval(intervalId);\n }, [jobId]);\n const handleClose = () => {\n window.location.href = `/juniors/${juniorId}`;\n };\n const renderContent = () => {\n switch (status) {\n case 'in_progress':\n return ;\n case 'success':\n return ;\n case 'error':\n return ;\n default:\n return null;\n }\n };\n\n return (\n
\n
\n {renderContent()}\n
\n {status === 'in_progress' && 'Importation en cours...'}\n {status === 'success' && 'Importation réussie !'}\n {status === 'error' && (\n <>\n

Importation échouée :

\n
    \n {errors.map((error, index) => (\n
  • {error}
  • \n ))}\n
\n \n )}\n
\n {status !== 'in_progress' && (\n \n )}\n
\n
\n );\n};\n\nexport default ImportStatusModal;\n","import React, { useState, useEffect } from 'react';\nimport * as XLSX from 'xlsx';\nimport ImportStatusModal from './ImportStatusModal';\n\nconst ColumnMapping = ({ file, model, columns, juniorId }) => {\n const [mappings, setMappings] = useState({});\n const [fileColumns, setFileColumns] = useState([]);\n const [fileData, setFileData] = useState([]);\n const [fileRawData, setFileRawData] = useState(null);\n const [importJobId, setImportJobId] = useState(null);\n\n useEffect(() => {\n const readFile = () => {\n const reader = new FileReader();\n reader.onload = (event) => {\n const data = new Uint8Array(event.target.result);\n const workbook = XLSX.read(data, { type: 'array' });\n const sheetName = workbook.SheetNames[0];\n const worksheet = XLSX.utils.sheet_to_json(workbook.Sheets[sheetName], { header: 1 });\n const columns = worksheet[0];\n const dataRows = worksheet.slice(1, 6); // Display first 5 rows of data\n\n setFileColumns(columns);\n setFileData(dataRows.map(row => row.map(cell => {\n if (typeof cell === 'number') {\n const date = XLSX.SSF.parse_date_code(cell);\n if (date) {\n const jsDate = new Date(Date.UTC(date.y, date.m - 1, date.d, date.H, date.M, date.S));\n const year = jsDate.getUTCFullYear();\n if (year >= 1990 && year <= 2050) {\n return jsDate.toLocaleDateString();\n }\n }\n }\n return cell;\n })));\n setFileRawData(worksheet);\n\n const initialMappings = {};\n columns.forEach(column => {\n initialMappings[column] = '';\n });\n setMappings(initialMappings);\n };\n reader.readAsArrayBuffer(file);\n };\n\n readFile();\n }, [file]);\n\n const handleMappingChange = (fileColumn, event) => {\n setMappings({\n ...mappings,\n [fileColumn]: event.target.value\n });\n };\n\n const getAvailableOptions = (currentColumn) => {\n const selectedColumns = Object.values(mappings).filter(value => value !== '' && value !== mappings[currentColumn]);\n return columns.filter(column => !selectedColumns.includes(column));\n };\n\n const handleSubmit = () => {\n const mappedData = fileRawData.map(row => {\n const newRow = {};\n Object.keys(mappings).forEach(fileColumn => {\n const dbColumn = mappings[fileColumn];\n if (dbColumn) {\n newRow[dbColumn] = row[fileColumns.indexOf(fileColumn)];\n }\n });\n return newRow;\n });\n\n const headers = Object.values(mappings).filter(value => value !== '');\n const data = mappedData.map(row => headers.map(header => row[header]));\n\n const payload = {\n junior_id: juniorId,\n model_name: model,\n data: [headers, ...data]\n };\n\n fetch(`/juniors/${juniorId}/jestion_data/process_data`, {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/json',\n 'X-CSRF-Token': document.querySelector('meta[name=\"csrf-token\"]').getAttribute('content')\n },\n body: JSON.stringify(payload)\n })\n .then(response => response.json())\n .then(data => {\n setImportJobId(data.job_id);\n })\n .catch((error) => {\n console.error('Error:', error);\n });\n };\n\n return (\n
\n

Colonnes

\n \n \n \n {fileColumns.map((column, index) => (\n \n ))}\n \n \n \n {fileData.map((row, rowIndex) => (\n \n {row.map((cell, cellIndex) => (\n \n ))}\n \n ))}\n \n
\n
\n {column}\n \n \n
\n
{cell}
\n \n {importJobId && setImportJobId(null)} juniorId={juniorId} />}\n
\n );\n};\n\nexport default ColumnMapping;\n","import PropTypes from 'prop-types';\nimport React, { useState, useEffect } from 'react';\nimport FileUpload from './FileUpload';\nimport ModelSelection from './ModelSelection';\nimport ColumnMapping from './ColumnMapping';\n\nconst ImportWizard = ({ models, juniorId }) => {\n const [step, setStep] = useState(1);\n const [file, setFile] = useState(null);\n const [model, setModel] = useState('');\n const [columns, setColumns] = useState([]);\n\n const handleFileUpload = (uploadedFile) => {\n setFile(uploadedFile);\n setStep(2);\n };\n\n const handleModelSelection = (selectedModel) => {\n setModel(selectedModel);\n setColumns(models[selectedModel]);\n setStep(3);\n };\n\n useEffect(() => {\n document.querySelector('.page_content').classList.add('import-wizard-background');\n return () => {\n document.querySelector('.page_content').classList.remove('import-wizard-background');\n };\n }, []);\n\n return (\n
\n
\n

Import de données - {step === 1 ? 'Fichier' : step === 2 ? 'Modèle' : 'Rapprochement des colonnes'}

\n
\n
\n
\n
\n
\n
\n
\n {step === 1 && }\n {step === 2 && }\n {step === 3 && }\n
\n
\n );\n};\n\nImportWizard.propTypes = {\n models: PropTypes.objectOf(\n PropTypes.arrayOf(PropTypes.string)\n ).isRequired,\n juniorId: PropTypes.number.isRequired,\n};\n\nexport default ImportWizard;\n","import Rails from \"@rails/ujs\";\nimport ReactOnRails from 'react-on-rails';\nimport Turbolinks from \"turbolinks\";\nimport * as ActiveStorage from \"@rails/activestorage\";\nimport \"channels\";\nglobal.$ = require('jquery');\n//= require actiontext\n\nRails.start();\nTurbolinks.start();\nActiveStorage.start();\nimport \"trix\"\nimport \"@rails/actiontext\"\n\n// Imports externes\nimport \"bootstrap\";\nimport \"chartkick/chart.js\";\n\n\n// Imports internes\nimport { initSelect2 } from '../components/init_select2';\nimport { initMenuSelector } from \"../components/menu_selector\";\nimport { initArrayInput } from \"../components/array_input\";\nimport { initHEXModal2 } from \"../components/hex_modal2\";\nimport { initTableauHexSearchBar } from \"../components/tableau_hex_search_bar\";\nimport { initReducteur } from \"../components/reducteur\";\nimport { initBasicMultiple } from \"../components/basic_multiple\";\nimport { initDropdown } from \"../components/dropdown\";\nimport { initLineChart } from \"../components/line_charts\";\nimport { initBarChart } from \"../components/barChart\";\nimport { initStackedBarChart } from \"../components/stackedBarChart\";\nimport { initHalfDoughnutChart } from \"../components/half_doughnut_chart\";\nimport { initQuestionnaireBuilder } from \"../components/questionnaire_builder\";\nimport { initHEXTableauDynamique } from \"../components/hexTableauDynamique\";\nimport { initHEXTableauCounter } from \"../components/hexTableauCounter\";\nimport { initContentPreviewer } from \"../components/content_previewer\";\nimport { initGanttV1Chart } from \"../components/gantt_v1_chart\";\nimport { initFilter } from \"../components/filter\";\nimport { initGantt } from \"../components/gantt\";\nimport { initDevenirMembre } from \"../components/devenir_membre\";\nimport { initAlert } from \"../components/alert\";\nimport { initToggleEyes } from \"../components/toggleEyes\";\nimport { initFormsEnter } from \"../components/formsEnter\";\nimport { initDetectEndNavbar } from \"../components/detectEndNavbar\";\nimport { initDragAndDrop } from \"../components/dragAndDropColonner\";\nimport { initColonerCat } from \"../components/colonerCat\";\nimport { initCheckAverageClosing } from \"../components/checkAverageClosing\";\nimport { initPanel } from \"../components/panel\";\nimport { initConnection } from \"../components/connection\";\nimport { initDateEcheance } from \"../components/date_echeance\";\nimport { initCenterModal } from \"../components/centerModal\";\nimport { initCourses } from \"../components/courses\";\nimport {initSortable} from \"../components/sortable\";\nimport {initChapterPageLoadAnimations} from \"../components/ChapterPageLoadAnimations\";\nimport {initLessons} from \"../components/lessons\";\nimport {initLessonElements} from \"../components/lesson_elements\";\n\nimport {initItemToChoose} from \"../components/chooseItem\";\nimport {initLessonQCM} from \"../components/lessonQCM\";\nimport {initAborescence} from \"../components/initAborescence\";\nimport { initTaskManager} from \"../components/taskManager\";\nimport {initClickableDiv} from \"../components/clickableDiv\";\nimport {initTracker} from \"../components/tracker\";\nimport { initDropzone } from \"../components/dropzone\";\n\n\ndocument.addEventListener('turbolinks:load', () => {\n\n initSelect2();\n initToggleEyes();\n initMenuSelector();\n initArrayInput();\n initFilter();\n initDevenirMembre();\n initAlert();\n initPanel();\n initConnection();\n initHEXTableauDynamique();\n initGantt();\n initDragAndDrop();\n initHEXModal2();\n initTableauHexSearchBar();\n initReducteur();\n initClickableDiv();\n initBasicMultiple();\n initDropdown();\n initLineChart();\n initColonerCat();\n initCheckAverageClosing();\n initDetectEndNavbar();\n initBarChart();\n initStackedBarChart();\n initHalfDoughnutChart();\n initQuestionnaireBuilder();\n initHEXTableauCounter();\n initContentPreviewer();\n initGanttV1Chart();\n initCourses();\n initAborescence();\n initSortable();\n initChapterPageLoadAnimations();\n initLessons();\n initLessonElements();\n initItemToChoose();\n initLessonQCM();\n initTracker();\n initTaskManager();\n initFormsEnter();\n initCenterModal();\n initBreakout();\n initDropzone();\n initDateEcheance()\n\n});\n\n\n// Internal Import\nimport HelloWorld from '../bundles/HelloWorld/components/HelloWorld';\nimport Training from \"../bundles/Training/components/Training\";\nimport ImportWizard from \"../bundles/Import/components/ImportWizard\";\n\n\n\n// Register components with ReactOnRails\nReactOnRails.register({\n HelloWorld,\n Training,\n ImportWizard\n});\n\n\nimport { Application } from \"stimulus\";\nimport { definitionsFromContext } from \"stimulus/webpack-helpers\";\nimport {initBreakout} from \"../components/breakout\";\n\n\nconst application = Application.start();\nconst context = require.context(\"controllers\", true, /\\.js$/);\napplication.load(definitionsFromContext(context));\n","const initClickableDiv = () => {\n var clickableDiv = document.querySelectorAll('.clickable-div');\n if (clickableDiv.length == 0) return;\n\n clickableDiv.forEach(function(div) {\n div.addEventListener('click', function() {\n var url = div.dataset.url;\n window.location = url;\n });\n })\n}\n\nexport { initClickableDiv };","// app/javascript/components/init_select2.js\nimport $ from 'jquery';\nimport 'select2';\n\nconst initSelect2 = () => {\n $('.select2').select2();\n};\n\nexport { initSelect2 };","const initToggleEyes = () => {\n const toggleEye = document.querySelector('.toggle-password');\n\n if (toggleEye) {\n toggleEye.addEventListener('click', () => {\n const fieldsToToggle = toggleEye.getAttribute('toggle').split(',');\n\n fieldsToToggle.forEach(fieldId => {\n const passwordField = document.querySelector(fieldId.trim());\n\n if (passwordField) {\n const type = passwordField.getAttribute('type') === 'password' ? 'text' : 'password';\n passwordField.setAttribute('type', type);\n }\n });\n\n toggleEye.classList.toggle('fa-eye');\n toggleEye.classList.toggle('fa-eye-slash');\n });\n }\n};\n\nexport { initToggleEyes };\n","const initMenuSelector = () => {\n if(document.getElementsByClassName('tab').length > 0) {\n let menu_tabs = document.getElementsByClassName('tab')\n let menu_contents = document.getElementsByClassName('content')\n\n AccessPageMenuConfig();\n\n for(let i = 0; i < menu_tabs.length; i++ ) {\n menu_tabs[i].addEventListener('click', (event) => {\n updateMenuTabs(i);\n updateMenuContents(i);\n UpdateMenuCookies(i);\n });\n };\n\n function updateMenuTabs(i) {\n for(let menu_tab of menu_tabs) {\n menu_tab.classList.remove('active');\n };\n menu_tabs[i].classList.add('active');\n }\n\n function updateMenuContents(i) {\n for(let menu_content of menu_contents) {\n menu_content.classList.remove('active');\n };\n menu_contents[i].classList.add('active');\n }\n\n function UpdateMenuCookies(i) {\n document.cookie = `${window.location.href}=${i}`;\n }\n\n function AccessPageMenuConfig() {\n let page_id = getCookie(window.location.href);\n if(page_id == undefined) {\n page_id = 0\n }\n updateMenuTabs(page_id);\n updateMenuContents(page_id);\n }\n\n function getCookie(cName) {\n const name = cName + \"=\";\n const cDecoded = decodeURIComponent(document.cookie); //to be careful\n const cArr = cDecoded .split('; ');\n let res;\n cArr.forEach(val => {\n if (val.indexOf(name) === 0) res = val.substring(name.length);\n })\n return res;\n }\n }\n}\n\nexport { initMenuSelector };","const initArrayInput = () => {\n let btns = document.getElementsByClassName('array_input_btn');\n\n for(let btn of btns) {\n initDestructionBtnDiv(btn);\n refreshDestroyBtn(btn)\n listenAddInput (btn)\n let destroy_btns = document.querySelectorAll(`div.array_item_delete_btn[name=\"${btn.getAttribute('name')}\"]`);\n for(let destroy_btn_id = 0; destroy_btn_id < destroy_btns.length; destroy_btn_id++) {\n deleteInput(destroy_btn_id, destroy_btns)\n }\n }\n\n function listenAddInput (btn) {\n btn.addEventListener('click', (event) => {\n if (btn.id == 'add_new_input') {\n addinput(btn);\n }\n });\n }\n \n function deleteInput(destroy_btn_id, destroy_btns) {\n destroy_btns[destroy_btn_id].addEventListener('click', (event) => {\n destroy_btns[destroy_btn_id].parentNode.parentNode.removeChild(destroy_btns[destroy_btn_id].parentNode);\n return false;\n })\n }\n \n\n function addinput(btn) {\n let forms_name = btn.getAttribute('name');\n let inputs = document.querySelectorAll(`input[name=\"${forms_name}\"]`);\n let new_input = inputs[inputs.length-1].cloneNode(true);\n new_input.setAttribute('value','')\n new_input.setAttribute('placeholder','Nouvelle entrée')\n let new_forms = document.getElementsByClassName(`${forms_name.replaceAll(']','').split('[').filter(function(el) { return el; }).join('_')}`)[0].innerHTML += new_input.outerHTML\n addDestructionBtnDiv(forms_name, btn)\n }\n\n function initDestructionBtnDiv(btn) {\n let forms_name = btn.getAttribute('name');\n let inputs = document.querySelectorAll(`input[name=\"${forms_name}\"]`);\n for(let input of inputs) {\n var input_container = input.parentElement\n var above_input = document.createElement(\"div\");\n above_input.className = 'array_item_input';\n above_input.setAttribute('name', forms_name);\n input_container.insertBefore(above_input, input)\n above_input.appendChild(input)\n var delete_btn = document.createElement(\"div\");\n delete_btn.className = 'array_item_delete_btn';\n delete_btn.setAttribute('name', forms_name);\n above_input.appendChild(delete_btn, input)\n };\n };\n\n function addDestructionBtnDiv(forms_name, btn) {\n let inputs = document.querySelectorAll(`input[name=\"${forms_name}\"]`);\n let input = inputs[inputs.length-1]\n var input_container = input.parentElement\n var above_input = document.createElement(\"div\");\n above_input.className = 'array_item_input';\n above_input.setAttribute('name', forms_name);\n input_container.insertBefore(above_input, input)\n above_input.appendChild(input)\n var delete_btn = document.createElement(\"div\");\n delete_btn.className = 'array_item_delete_btn';\n delete_btn.setAttribute('name', forms_name);\n above_input.appendChild(delete_btn, input)\n refreshDestroyBtn(btn);\n };\n\n function refreshDestroyBtn(btn) {\n var destroy_btns = document.querySelectorAll(`div.array_item_delete_btn[name=\"${btn.getAttribute('name')}\"]`);\n for(var i = 0; i < destroy_btns.length; i++) {\n destroy_btns[i].innerHTML = '';\n }\n }\n}\n\nexport { initArrayInput };","const initFilter = () => {\n const setupFilters = () => {\n const filterPanels = document.querySelectorAll('.filter-panel');\n const openFiltersBtns = document.querySelectorAll('.open-filters-btn');\n const overlay = document.querySelector('.overlay');\n const toggleOverlay = (isVisible) => {\n overlay.style.display = isVisible ? 'block' : 'none';\n };\n\n filterPanels.forEach((filterPanel, index) => {\n const openFiltersBtn = openFiltersBtns[index];\n const navbar = document.querySelector('.navbar');\n\n if (!navbar || !filterPanel || !openFiltersBtn) {\n return;\n }\n\n\n const adjustFilterPanelPosition = () => {\n if (navbar && filterPanel) {\n const navbarHeight = navbar.offsetHeight;\n filterPanel.style.top = navbarHeight + 'px';\n filterPanel.style.height = `calc(100% - ${navbarHeight}px)`;\n }\n };\n\n const handleClickOutside = (event) => {\n if (filterPanel.classList.contains('active') && !filterPanel.contains(event.target) && !openFiltersBtn.contains(event.target)) {\n filterPanel.classList.remove('active');\n toggleOverlay(false);\n\n }\n };\n\n if (openFiltersBtn) {\n openFiltersBtn.addEventListener('click', function() {\n const isActive = filterPanel.classList.toggle('active');\n toggleOverlay(isActive);\n if (isActive) {\n adjustFilterPanelPosition();\n }\n });\n }\n\n document.addEventListener('click', handleClickOutside);\n\n adjustFilterPanelPosition();\n });\n };\n\n if (document.readyState === \"loading\") {\n document.addEventListener(\"DOMContentLoaded\", setupFilters);\n } else {\n setupFilters();\n }\n};\n\nexport { initFilter };\n","const initAlert = () => {\n const closeButtons = document.querySelectorAll('.alert .close');\n\n closeButtons.forEach(button => {\n button.addEventListener('click', () => {\n const alert = button.closest('.alert');\n if (alert) {\n alert.style.display = 'none';\n }\n });\n });\n}\n\nexport { initAlert };\n","const initPanel = () => {\n const openPanelBtn = document.getElementById('open-panel-btn');\n const panel = document.getElementById('bottom-panel');\n const overlay2 = document.getElementById('overlay2');\n\n if (!openPanelBtn || !panel || !overlay2) {\n return;\n }\n const togglePanel = () => {\n panel.classList.toggle('active');\n overlay2.classList.toggle('active');\n };\n\n openPanelBtn.addEventListener('click', togglePanel);\n\n overlay2.addEventListener('click', togglePanel);\n\n document.addEventListener('click', (event) => {\n if (!panel.contains(event.target) && event.target !== openPanelBtn) {\n panel.classList.remove('active');\n overlay2.classList.remove('active');\n }\n });\n}\nexport { initPanel };","const initConnection = () => {\n const container = document.getElementById('container');\n const registerBtn = document.getElementById('register');\n const loginBtn = document.getElementById('login');\n\n if (!container || !registerBtn || !loginBtn) {\n return;\n }\n registerBtn.addEventListener('click', () => {\n container.classList.add(\"active\");\n });\n\n loginBtn.addEventListener('click', () => {\n container.classList.remove(\"active\");\n });\n\n}\nexport { initConnection };","const createGanttBar = (objectif, startDate, endDate, currentDate) => {\n const barContainer = document.createElement('div');\n barContainer.className = 'gantt-bar-container';\n\n const bar = document.createElement('div');\n bar.className = 'gantt-bar';\n bar.textContent = objectif.nom;\n\n const start = new Date(objectif.date_debut);\n const end = new Date(objectif.date_fin);\n const startOffset = (start - startDate) / (endDate - startDate) * 100;\n const duration = (end - start) / (endDate - startDate) * 100;\n\n bar.style.left = `${startOffset}%`;\n bar.style.width = `${duration}%`;\n\n const dateStartLabel = document.createElement('div');\n dateStartLabel.className = 'gantt-date-label start';\n dateStartLabel.textContent = objectif.date_debut;\n\n const dateEndLabel = document.createElement('div');\n dateEndLabel.className = 'gantt-date-label end';\n dateEndLabel.textContent = objectif.date_fin;\n\n bar.appendChild(dateStartLabel);\n bar.appendChild(dateEndLabel);\n\n // Vérifier si l'objectif est en cours\n if (currentDate >= start && currentDate <= end) {\n const currentDateMarker = document.createElement('div');\n currentDateMarker.className = 'current-date-marker';\n currentDateMarker.style.left = `${(currentDate - start) / (end - start) * 100}%`;\n bar.appendChild(currentDateMarker);\n }\n\n barContainer.appendChild(bar);\n\n return barContainer;\n};\n\nconst initGantt = () => {\n const ganttContainer = document.getElementById('gantt_here');\n if (ganttContainer) {\n const ganttData = JSON.parse(ganttContainer.getAttribute('data-gantt'));\n ganttContainer.innerHTML = '';\n\n const startDate = new Date(Math.min(...ganttData.map(obj => new Date(obj.date_debut))));\n const endDate = new Date(Math.max(...ganttData.map(obj => new Date(obj.date_fin))));\n const currentDate = new Date();\n\n ganttData.forEach(actionObjectif => {\n const bar = createGanttBar(actionObjectif, startDate, endDate, currentDate);\n ganttContainer.appendChild(bar);\n });\n }\n};\n\nexport { initGantt };\n","const initHEXModal2 = () => {\n const open_btns = document.getElementsByClassName('modal-button');\n const close_btns = document.getElementsByClassName('modal-close');\n \n\n for(let i = 0; i < open_btns.length; i++) {\n open_btns[i].addEventListener('click', (event) => {\n let already_opened_modal = document.getElementsByClassName('hex_modal_active');\n if(already_opened_modal.length != 0) {\n already_opened_modal[0].classList.remove('hex_modal_active');\n $('body').css('overflow', 'auto');\n }\n\n let button_id = open_btns[i].id;\n let modal = document.querySelector(`.hex_modal2#${button_id}`);\n modal.classList.add('hex_modal_active');\n $('body').css('overflow', 'hidden');\n $(\"html, body\").animate({ scrollTop: \"0\" });\n })\n }\n\n for(let z = 0; z < close_btns.length; z++) {\n close_btns[z].addEventListener('click', (event) => {\n let button_id = close_btns[z].id;\n let modal = document.querySelector(`.hex_modal2#${button_id}`);\n modal.classList.remove('hex_modal_active');\n $('body').css('overflow', 'auto');\n })\n }\n\n\n}\n\nexport { initHEXModal2 };","const initTableauHexSearchBar = () => {\n const tabs = document.querySelectorAll('.tabs .tab');\n const contents = document.querySelectorAll('.contents .content');\n var debounceTimeout = null;\n var debounceDelay = 800;\n const setActiveTab = (index) => {\n tabs.forEach((tab, tabIndex) => {\n if (tabIndex === index) {\n tab.classList.add('active');\n } else {\n tab.classList.remove('active');\n }\n });\n\n contents.forEach((content, contentIndex) => {\n if (contentIndex === index) {\n content.classList.add('active');\n } else {\n content.classList.remove('active');\n }\n });\n };\n\n tabs.forEach((tab, index) => {\n tab.addEventListener('click', () => {\n setActiveTab(index);\n const currentUrl = new URL(window.location);\n currentUrl.searchParams.set('active_tab', index);\n window.history.replaceState({}, '', currentUrl);\n });\n });\n\n const input1 = document.getElementById(\"tableau_search_bar\");\n const input2 = document.getElementById(\"tableau_search_bar2\");\n\n const inputHandler = (input, searchParam) => {\n if (!input) return;\n input.focus();\n let lastSearchTerm = new URLSearchParams(window.location.search).get(searchParam) || '';\n input.value = lastSearchTerm;\n\n const sendSearchQuery = () => {\n const searchQuery = input.value;\n if (searchQuery !== lastSearchTerm) {\n lastSearchTerm = searchQuery;\n\n const currentUrl = new URL(window.location);\n const searchParams = new URLSearchParams(currentUrl.search);\n\n searchParams.set(searchParam, searchQuery);\n const activeTab = searchParams.get('active_tab') || 0;\n searchParams.set('page' + activeTab, 1);\n\n const newUrl = `${currentUrl.pathname}?${searchParams.toString()}`;\n window.location.href = newUrl;\n }\n };\n\n const onInputEvent = () => {\n clearTimeout(debounceTimeout);\n debounceTimeout = setTimeout(sendSearchQuery, debounceDelay);\n };\n\n const onEnterOrBlur = (event) => {\n if (event.type === 'blur' || event.key === 'Enter') {\n clearTimeout(debounceTimeout);\n sendSearchQuery();\n }\n };\n input.addEventListener('input', onInputEvent);\n input.addEventListener('blur', onEnterOrBlur);\n input.addEventListener('keyup', onEnterOrBlur);\n };\n\n inputHandler(input1, 'search1');\n inputHandler(input2, 'search2');\n\n const activeTabIndex = parseInt(new URLSearchParams(window.location.search).get('active_tab')) || 0;\n setActiveTab(activeTabIndex);\n};\n\nexport { initTableauHexSearchBar };\n","const initReducteur = () => {\n const titre_reducteurs = document.getElementsByClassName(\"titre_reducteur\");\n if(titre_reducteurs != null) {\n for(let i = 0; i < titre_reducteurs.length; i++ ) {\n titre_reducteurs[i].addEventListener('click', (event) => {\n let content = titre_reducteurs[i].parentElement.children[1];\n let title = titre_reducteurs[i]\n if (content.style.display === '') {\n content.style.display = 'block'\n for(let titch = 0; titch < title.children.length; titch++ ) {\n switch (title.children[titch].className) {\n case (\"i_reduit\") :\n title.children[titch].style.display = \"none\";\n break;\n case (\"i_developpe\") :\n title.children[titch].style.display = \"block\";\n break;\n }\n }\n } else {\n content.style.display = ''\n for(let titch = 0; titch < title.children.length; titch++ ) {\n switch (title.children[titch].className) {\n case (\"i_reduit\") :\n title.children[titch].style.display = \"block\";\n break;\n case (\"i_developpe\") :\n title.children[titch].style.display = \"none\";\n break;\n }\n }\n }\n });\n };\n }\n\n\n}\n\nexport { initReducteur };","const initBasicMultiple = () => {\n $(function() {\n $('.js-example-basic-multiple').select2();\n });\n}\n\nexport { initBasicMultiple };","const initDropdown = () => {\n const drop_btn = document.getElementsByClassName('dropbtn');\n var overlay = document.getElementById('background_overlay');\n if (!drop_btn || !overlay) {\n return;\n }\n \n\n for(let i = 0; i < drop_btn.length; i++) {\n drop_btn[i].addEventListener('click', (event) => {\n let button_id = drop_btn[i].id;\n let modal = document.querySelector(`.drop_content#${button_id}`);\n modal.classList.add('dropdown_active');\n overlay.style.display = 'block';\n })\n }\n\n overlay.addEventListener('click', (event) => {\n let popups = document.getElementsByClassName('dropdown_active');\n for(let i = 0; i < popups.length; i++) {\n popups[i].classList.remove('dropdown_active');\n }\n overlay.style.display = 'none';\n })\n\n\n}\n\nexport { initDropdown };","import Chart from 'chart.js/auto';\n\nconst initLineChart = () => {\n if (document.getElementById('lineChart') != null) {\n var ctx = document.getElementById('lineChart').getContext('2d');\n var datasets = JSON.parse(ctx.canvas.dataset.data);\n\n // Parse DataSets\n var parsedDataSet = []\n for (let i = 0; i < datasets.length; i++) {\n const dataset = datasets[i];\n var result = dataset.reduce((map, obj) => {\n map[obj[0]] = obj[1];\n return map;\n }, {});\n parsedDataSet.push(result)\n };\n\n \n // Chart\n var myChart = new Chart(ctx, {\n type: 'line',\n data: {\n labels: JSON.parse(ctx.canvas.dataset.labels),\n datasets: parsedDataSet\n //JSON.parse(ctx.canvas.dataset.data),\n },\n options: {\n scales: {\n y: {\n display: true,\n ticks: {\n color: \"#000000\",\n font: {\n family: \"'Poppins', sans-serif\",\n size: 14,\n weight: 800,\n },\n }\n },\n x: {\n display: true,\n ticks: {\n color: \"#000000\",\n font: {\n family: \"'Poppins', sans-serif\",\n size: 14,\n weight: 800,\n },\n }\n },\n },\n responsive: true,\n animations: {\n radius: {\n duration: 1500,\n easing: 'linear',\n loop: (context) => context.active\n }\n },\n plugins: {\n legend: {\n display: true,\n position: 'bottom',\n labels: {\n fontColor: \"black\",\n fontSize: 30,\n }\n },\n title: {\n display: false,\n text: \"Chiffre d'Affaire de la structure\"\n }\n },\n },\n });\n }\n}\n\n\nexport { initLineChart };","const initColonerCat = () => {\n const categorySelector = document.getElementById('categorySelector');\n if(!categorySelector) {\n return;\n }\n const categories = document.querySelectorAll('.colonner-cat');\n\n\n categorySelector.addEventListener('change', (event) => {\n const selectedCategory = event.target.value;\n\n categories.forEach(cat => {\n if (cat.id === selectedCategory) {\n cat.style.display = 'flex';\n } else {\n cat.style.display = 'none';\n }\n });\n });\n};\n\nexport { initColonerCat };\n","const initCheckAverageClosing = () => {\n const negociationContainer = document.getElementById(\"negociation-container\");\n if (!negociationContainer) {\n return;\n }\n const negociationCards = negociationContainer.querySelectorAll(\".etude-card\");\n\n const averageClass = document.getElementsByClassName(\"average\")[0];\n const average = parseFloat(averageClass.getAttribute(\"data-average\"));\n\n\n const today = new Date();\n\n negociationCards.forEach(function(card) {\n const startDate = new Date(card.getAttribute(\"data-start-date\"));\n const differenceInDays = Math.floor((today- startDate) / (1000 * 60 * 60 * 24));\n if (differenceInDays > average) {\n card.classList.add(\"red-border\");\n } else if ((differenceInDays*1.5) > average) {\n card.classList.add(\"orange-border\");\n }\n });\n\n};\n\nexport { initCheckAverageClosing };\n","const initDetectEndNavbar = () => {\n var navbar = document.querySelector('.navbar');\n if (navbar) {\n var notificationFlash = document.querySelector('.notification-part');\n if (notificationFlash) {\n var navbarHeight = navbar.offsetHeight;\n notificationFlash.style.top = (navbarHeight + 3) + 'px';\n }\n }\n\n}\nexport { initDetectEndNavbar };","import Chart from 'chart.js/auto';\n\nconst initBarChart = () => {\n if (document.getElementById('barChart') != null) {\n var ctx = document.getElementById('barChart').getContext('2d');\n var datasets = JSON.parse(ctx.canvas.dataset.data);\n\n // Parse DataSets\n var parsedDataSet = []\n for (let i = 0; i < datasets.length; i++) {\n const dataset = datasets[i];\n var result = dataset.reduce((map, obj) => {\n map[obj[0]] = obj[1];\n return map;\n }, {});\n parsedDataSet.push(result)\n };\n\n \n // Chart\n var myChart = new Chart(ctx, {\n type: 'bar',\n data: {\n labels: JSON.parse(ctx.canvas.dataset.labels),\n datasets: parsedDataSet\n //JSON.parse(ctx.canvas.dataset.data),\n },\n options: {\n scales: {\n y: {\n display: true,\n ticks: {\n color: \"#000000\",\n font: {\n family: \"'Poppins', sans-serif\",\n size: 14,\n weight: 800,\n },\n }\n },\n x: {\n display: true,\n ticks: {\n color: \"#000000\",\n font: {\n family: \"'Poppins', sans-serif\",\n size: 14,\n weight: 800,\n },\n }\n },\n },\n responsive: true,\n animations: {\n radius: {\n duration: 1500,\n easing: 'linear',\n loop: (context) => context.active\n }\n },\n plugins: {\n legend: {\n display: true,\n position: 'bottom',\n labels: {\n fontColor: \"black\",\n fontSize: 30,\n }\n },\n title: {\n display: false,\n text: \"Chiffre d'Affaire de la structure\"\n }\n },\n },\n });\n }\n}\n\nexport { initBarChart };","import Chart from 'chart.js/auto';\n\nconst initStackedBarChart = () => {\n if (document.getElementById('stackedBarChart') != null) {\n var ctx = document.getElementById('stackedBarChart').getContext('2d');\n var datasets = JSON.parse(ctx.canvas.dataset.data);\n\n // Parse DataSets\n var parsedDataSet = []\n for (let i = 0; i < datasets.length; i++) {\n const dataset = datasets[i];\n var result = dataset.reduce((map, obj) => {\n map[obj[0]] = obj[1];\n return map;\n }, {});\n parsedDataSet.push(result)\n };\n\n \n // Chart\n var myChart = new Chart(ctx, {\n type: 'bar',\n data: {\n labels: JSON.parse(ctx.canvas.dataset.labels),\n datasets: parsedDataSet\n //JSON.parse(ctx.canvas.dataset.data),\n },\n options: {\n scales: {\n y: {\n stacked: true,\n display: true,\n ticks: {\n color: \"#000000\",\n font: {\n family: \"'Poppins', sans-serif\",\n size: 14,\n weight: 800,\n },\n }\n },\n x: {\n stacked: true,\n display: true,\n ticks: {\n color: \"#000000\",\n font: {\n family: \"'Poppins', sans-serif\",\n size: 14,\n weight: 800,\n },\n }\n },\n },\n responsive: true,\n animations: {\n radius: {\n duration: 1500,\n easing: 'linear',\n loop: (context) => context.active\n }\n },\n plugins: {\n legend: {\n display: true,\n position: 'bottom',\n labels: {\n fontColor: \"black\",\n fontSize: 30,\n }\n },\n title: {\n display: false,\n text: \"Chiffre d'Affaire de la structure\"\n }\n },\n },\n });\n }\n}\n\nexport { initStackedBarChart };","import Chart from 'chart.js/auto';\n\nconst initHalfDoughnutChart = () => {\n if (document.getElementById('halfdoughnutchart') != null) {\n var ctx = document.getElementById(\"halfdoughnutchart\").getContext('2d');\n var datasets = JSON.parse(ctx.canvas.dataset.data);\n // Parse DataSets\n var parsedDataSet = {}\n for (let i = 0; i < datasets.length; i++) {\n const dataset = datasets[i];\n parsedDataSet[dataset[0]] = dataset[1]\n };\n\n var dashboardChart = new Chart(ctx, {\n type: 'doughnut',\n data: {\n labels: JSON.parse(ctx.canvas.dataset.labels),\n datasets: [ parsedDataSet ],\n },\n options: {\n rotation: 270,\n circumference: 180,\n responsive: true,\n plugins: {\n legend: {\n position: 'top',\n },\n title: {\n display: false,\n },\n },\n cutoutPercentage: 95,\n },\n });\n }\n if (document.getElementById('halfdoughnutchart1') != null) {\n var ctx = document.getElementById(\"halfdoughnutchart1\").getContext('2d');\n var datasets = JSON.parse(ctx.canvas.dataset.data);\n // Parse DataSets\n var parsedDataSet = {}\n for (let i = 0; i < datasets.length; i++) {\n const dataset = datasets[i];\n parsedDataSet[dataset[0]] = dataset[1]\n };\n\n var dashboardChart = new Chart(ctx, {\n type: 'doughnut',\n data: {\n labels: JSON.parse(ctx.canvas.dataset.labels),\n datasets: [ parsedDataSet ],\n },\n options: {\n rotation: 270,\n circumference: 180,\n responsive: true,\n plugins: {\n legend: {\n position: 'top',\n },\n title: {\n display: false,\n },\n },\n cutoutPercentage: 95,\n },\n });\n }\n if (document.getElementById('halfdoughnutchart2') != null) {\n var ctx = document.getElementById(\"halfdoughnutchart2\").getContext('2d');\n var datasets = JSON.parse(ctx.canvas.dataset.data);\n // Parse DataSets\n var parsedDataSet = {}\n for (let i = 0; i < datasets.length; i++) {\n const dataset = datasets[i];\n parsedDataSet[dataset[0]] = dataset[1]\n };\n\n var dashboardChart = new Chart(ctx, {\n type: 'doughnut',\n data: {\n labels: JSON.parse(ctx.canvas.dataset.labels),\n datasets: [ parsedDataSet ],\n },\n options: {\n rotation: 270,\n circumference: 180,\n responsive: true,\n plugins: {\n legend: {\n position: 'top',\n },\n title: {\n display: false,\n },\n },\n cutoutPercentage: 95,\n },\n });\n }\n if (document.getElementById('halfdoughnutchart3') != null) {\n var ctx = document.getElementById(\"halfdoughnutchart3\").getContext('2d');\n var datasets = JSON.parse(ctx.canvas.dataset.data);\n // Parse DataSets\n var parsedDataSet = {}\n for (let i = 0; i < datasets.length; i++) {\n const dataset = datasets[i];\n parsedDataSet[dataset[0]] = dataset[1]\n };\n\n var dashboardChart = new Chart(ctx, {\n type: 'doughnut',\n data: {\n labels: JSON.parse(ctx.canvas.dataset.labels),\n datasets: [ parsedDataSet ],\n },\n options: {\n rotation: 270,\n circumference: 180,\n responsive: true,\n plugins: {\n legend: {\n position: 'top',\n },\n title: {\n display: false,\n },\n },\n cutoutPercentage: 95,\n },\n });\n }\n}\n\nexport { initHalfDoughnutChart };","const initHEXTableauCounter = () => {\n const tableau_counters = document.getElementsByClassName('hexTableauCounter');\n if(tableau_counters.length > 0) {\n for(let tableau_counter of tableau_counters) {\n let count_line = tableau_counter.querySelector('#count_me');\n if(count_line !== undefined) {\n let to_counts = count_line.querySelectorAll(\"[js-table-counter]\");\n for(let to_count of to_counts) {\n let attribute = to_count.getAttribute('js-table-counter');\n let lines = tableau_counter.querySelectorAll(`.${attribute}`);\n var sum = 0;\n for(let line of lines) {\n sum += parseFloat(line.innerText);\n }\n to_count.innerText = `${Math.round(sum * 100)/100} €`\n }\n }\n }\n }\n}\n\nexport { initHEXTableauCounter }","const initContentPreviewer = () => {\n let previewers = document.getElementsByClassName('previewer')\n if(previewers.length > 0) {\n for(let previewer of previewers) {\n let text_area = previewer.querySelector('textarea')\n text_area.addEventListener('keyup', (event) => {\n let value = text_area.value;\n previewer.querySelector('.previewer_area').innerHTML = value;\n })\n }\n }\n}\n\nexport { initContentPreviewer };","import Chart from 'chart.js/auto';\nimport 'chartjs-adapter-date-fns';\n\n\nconst initGanttV1Chart = () => {\n if (document.getElementById('ganttv1chart') != null) {\n var ctx = document.getElementById(\"ganttv1chart\").getContext('2d');\n var today = new Date();\n var datasets = JSON.parse(ctx.canvas.dataset.data);\n\n // Parse DataSets\n var parsedDataSet = []\n for (let i = 0; i < datasets.length; i++) {\n const dataset = datasets[i];\n var result = dataset.reduce((map, obj) => {\n map[obj[0]] = obj[1];\n return map;\n }, {});\n parsedDataSet.push(result)\n };\n\n \n // Chart\n var myChart = new Chart(ctx, {\n type: 'bar',\n data: {\n labels: JSON.parse(ctx.canvas.dataset.labels),\n datasets: parsedDataSet\n //JSON.parse(ctx.canvas.dataset.data),\n },\n options: {\n indexAxis: 'y',\n scales: {\n y: {\n display: true,\n ticks: {\n color: \"#000000\",\n font: {\n family: \"'Poppins', sans-serif\",\n size: 14,\n weight: 800,\n },\n }\n },\n x: {\n display: true,\n type: 'time',\n min: today,\n time: {\n unit: 'day',\n },\n ticks: {\n color: \"#000000\",\n font: {\n family: \"'Poppins', sans-serif\",\n size: 14,\n weight: 800,\n },\n }\n },\n },\n responsive: true,\n animations: {\n radius: {\n duration: 1500,\n easing: 'linear',\n loop: (context) => context.active\n }\n },\n plugins: {\n legend: {\n display: false,\n position: 'bottom',\n labels: {\n fontColor: \"black\",\n fontSize: 30,\n }\n },\n title: {\n display: false,\n text: \"Chiffre d'Affaire de la structure\"\n }\n },\n },\n });\n }\n}\n\nexport { initGanttV1Chart };","const initCourses = () => {\n const courseCards = document.querySelectorAll('.course-card');\n\n // Hide all course cards initially\n courseCards.forEach((card, index) => {\n card.style.opacity = 0;\n card.style.transform = \"translateY(20px)\";\n });\n\n // Fade in each card with a delay\n courseCards.forEach((card, index) => {\n setTimeout(() => {\n card.style.transition = \"all 0.5s ease\";\n card.style.opacity = 1;\n card.style.transform = \"translateY(0)\";\n }, index * 100);\n });\n\n // Add hover effect to each card\n courseCards.forEach(card => {\n card.addEventListener('mouseover', () => {\n card.style.transform = \"translateY(-10px)\";\n card.style.boxShadow = \"0 8px 16px rgba(0, 0, 0, 0.2)\";\n });\n\n card.addEventListener('mouseout', () => {\n card.style.transform = \"translateY(0)\";\n card.style.boxShadow = \"0 4px 6px rgba(0, 0, 0, 0.1)\";\n });\n });\n\n\n};\n\nexport { initCourses };\n","const initAborescence = () => {\n const treeNodes = document.querySelectorAll('.tree-node');\n\n treeNodes.forEach(node => {\n node.addEventListener('click', (event) => {\n const link = node.querySelector('a.tree-link');\n if (link) {\n window.location.href = link.href;\n }\n });\n });\n\n // Prevent propagation of click events from internal links\n const internalLinks = document.querySelectorAll('.tree-node a');\n internalLinks.forEach(link => {\n link.addEventListener('click', (event) => {\n event.stopPropagation();\n });\n });\n}\n\nexport { initAborescence };","const initChapterPageLoadAnimations = () => {\n const bannerContainer = document.querySelector('.banner-container');\n const creatorLogoContainer = document.querySelector('.creator-logo-container');\n const courseDescription = document.querySelector('.course-description');\n const buttonContainer = document.querySelector('.button-container');\n const chapters = document.querySelectorAll('.chapter');\n\n if (bannerContainer) {\n bannerContainer.classList.add('visible');\n }\n\n if (creatorLogoContainer) {\n creatorLogoContainer.classList.add('visible');\n }\n\n if (courseDescription) {\n courseDescription.classList.add('visible');\n }\n\n if (buttonContainer) {\n buttonContainer.classList.add('visible');\n }\n\n if (chapters) {\n chapters.forEach((chapter, index) => {\n setTimeout(() => {\n chapter.classList.add('visible');\n }, index * 100); // Stagger the chapter animations\n });\n }\n};\n\nexport { initChapterPageLoadAnimations };\n","const initLessons = () => {\n const lessonElements = document.querySelectorAll('.lesson-element');\n\n lessonElements.forEach((element) => {\n element.style.opacity = 0;\n element.style.transform = \"translateY(20px)\";\n });\n\n lessonElements.forEach((element, index) => {\n setTimeout(() => {\n element.style.transition = \"all 0.5s ease\";\n element.style.opacity = 1;\n element.style.transform = \"translateY(0)\";\n }, index * 100);\n });\n\n // Add drag-and-drop functionality\n const sortableContainers = document.querySelectorAll('.sortable');\n\n sortableContainers.forEach((container) => {\n new Sortable(container, {\n animation: 150,\n onEnd: function (/**Event*/evt) {\n const itemEl = evt.item; // dragged HTMLElement\n const newIndex = evt.newIndex;\n\n // Send AJAX request to update position\n fetch(`/update_position`, {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/json',\n 'X-CSRF-Token': document.querySelector('[name=csrf-token]').content\n },\n body: JSON.stringify({\n id: itemEl.dataset.id,\n new_position: newIndex\n })\n });\n }\n });\n });\n\n\n lessonElements.forEach((element) => {\n element.style.opacity = 0;\n element.style.transform = \"translateY(20px)\";\n });\n\n lessonElements.forEach((element, index) => {\n setTimeout(() => {\n element.style.transition = \"all 0.5s ease\";\n element.style.opacity = 1;\n element.style.transform = \"translateY(0)\";\n }, index * 100);\n });\n}\n\nexport { initLessons };","const initLessonElements = () => {\n const elementTypeSelect = document.querySelector('.element-type-select');\n const videoFields = document.querySelector('.video-fields');\n const textFields = document.querySelector('.text-fields');\n const qcmFields = document.querySelector('.qcm-fields');\n const fileUploadFields = document.querySelector('.file-upload-fields');\n\n if (elementTypeSelect) {\n elementTypeSelect.addEventListener('change', (e) => {\n const selectedType = e.target.value;\n videoFields.classList.add('hidden');\n textFields.classList.add('hidden');\n qcmFields.classList.add('hidden');\n fileUploadFields.classList.add('hidden');\n\n if (selectedType === 'Video') {\n videoFields.classList.remove('hidden');\n } else if (selectedType === 'Text') {\n textFields.classList.remove('hidden');\n } else if (selectedType === 'Dépot de fichier') {\n textFields.classList.remove('hidden');\n } else if (selectedType === 'QCM') {\n qcmFields.classList.remove('hidden');\n } else if (selectedType === 'FileUpload') {\n fileUploadFields.classList.remove('hidden');\n }\n });\n }\n}\n\nexport { initLessonElements };\n","const initItemToChoose = () => {\n if (document.getElementsByClassName(\"item_to_choose_selector\").length > 0) {\n let selector = document.getElementsByClassName(\"item_to_choose_selector\")[0].children[0].children[1];\n let containers = document.getElementsByClassName(\"item_to_choose\")\n\n let selector_value = selector.value;\n for(let container of containers) {\n let names = container.getAttribute('name').split(' ');\n let class_list = container.classList;\n for(let name of names) {\n if(name == selector_value) {\n if(class_list.contains('hidden')) {\n container.classList.remove('hidden')\n }\n break\n }\n if(name != selector_value && class_list.contains('hidden') == false) {\n container.classList.add('hidden')\n }\n }\n };\n\n selector.addEventListener('change', (event) => {\n let selector_value = selector.value;\n\n for(let container of containers) {\n let names = container.getAttribute('name').split(' ');\n let class_list = container.classList;\n for(let name of names) {\n if(name == selector_value) {\n if(class_list.contains('hidden')) {\n container.classList.remove('hidden')\n }\n break\n }\n if(name != selector_value && class_list.contains('hidden') == false) {\n container.classList.add('hidden')\n }\n }\n };\n })\n }\n}\n\nexport { initItemToChoose };","const initLessonQCM = () => {\n\n\n const qcmBuilder = document.getElementById('qcm-builder');\n const elementTypeInput = document.getElementById('element_type');\n const formElements = document.querySelectorAll('.formulaire_input.item_to_choose');\n const hasPotentialQcmDivs = document.querySelectorAll('.formulaire_input.item_to_choose.qcm');\n\n if (hasPotentialQcmDivs.length > 0) {\n const checkClasses = () => {\n const allPotentialQcmDivs = document.querySelectorAll('.formulaire_input.item_to_choose.qcm');\n const qcmDivHidden = Array.from(allPotentialQcmDivs).filter(element =>\n element.className === 'formulaire_input item_to_choose qcm'\n );\n if (qcmBuilder && qcmDivHidden.length > 0) {\n const addQuestionButton = document.getElementsByClassName(\"btn btn-secondary add-question hidden\")[0];\n if (addQuestionButton) {\n addQuestionButton.classList.remove('hidden');\n }\n const updateQCMContent = () => {\n const questions = [];\n document.querySelectorAll('.qcm-question').forEach((questionElement, questionIndex) => {\n const question = questionElement.querySelector('.question-input').value;\n const answers = [];\n questionElement.querySelectorAll('.answer-input').forEach((answerElement, answerIndex) => {\n const text = answerElement.value;\n const correct = answerElement.nextElementSibling.textContent === 'Correcte';\n answers.push({text, correct});\n });\n questions.push({question, answers});\n });\n\n let qcmContentField = document.querySelector('input.qcm-content');\n if (!qcmContentField) {\n qcmContentField = document.createElement('input');\n qcmContentField.setAttribute('type', 'hidden');\n qcmContentField.setAttribute('name', 'lesson_element[content]');\n qcmContentField.setAttribute('class', 'qcm-content');\n document.querySelector('form').appendChild(qcmContentField);\n }\n qcmContentField.value = JSON.stringify(questions);\n };\n\n document.querySelector('.add-question').addEventListener('click', (e) => {\n e.preventDefault();\n const questionCount = document.querySelectorAll('.qcm-question').length;\n const newQuestionHTML = `\n
\n
\n \n \n
\n
\n
\n \n \n \n
\n
\n \n
\n `;\n document.querySelector('.qcm-questions').insertAdjacentHTML('beforeend', newQuestionHTML);\n });\n\n qcmBuilder.addEventListener('click', (e) => {\n if (e.target.classList.contains('add-answer')) {\n e.preventDefault();\n const questionIndex = e.target.dataset.questionIndex;\n const questionElement = document.querySelector(`.qcm-question[data-index=\"${questionIndex}\"] .answers-container`);\n const answerCount = questionElement.children.length;\n const newAnswerHTML = `\n
\n \n \n \n
\n `;\n questionElement.insertAdjacentHTML('beforeend', newAnswerHTML);\n }\n\n if (e.target.classList.contains('toggle-correct-answer')) {\n e.preventDefault();\n const button = e.target;\n const isCorrect = button.textContent === 'Correcte';\n button.textContent = isCorrect ? 'Incorrecte' : 'Correcte';\n button.style.backgroundColor = isCorrect ? '#f44336' : '#4CAF50';\n }\n });\n\n document.querySelector('form').addEventListener('submit', updateQCMContent);\n }\n };\n\n const showRelevantField = () => {\n const selectedType = elementTypeInput.value;\n\n formElements.forEach(element => {\n\n if (element.getAttribute('name') === selectedType) {\n element.classList.remove('hidden');\n if (selectedType !== 'QCM' && !element.querySelector('.form_input')) {\n const contentField = createContentField(selectedType);\n element.appendChild(contentField);\n }\n } else {\n if (element === selectedType) {\n element.classList.remove('hidden');\n } else {\n element.classList.add('hidden');\n const inputField = element.querySelector('.form_input');\n if (inputField) {\n element.removeChild(inputField);\n }\n }\n }\n });\n };\n\n const createContentField = (type) => {\n let contentField;\n if (type === 'Vidéo') {\n\n } else {\n contentField = document.createElement('textarea');\n contentField.setAttribute('type', 'text');\n contentField.setAttribute('name', 'lesson_element[content]');\n contentField.setAttribute('class', 'form_input');\n contentField.setAttribute('placeholder', 'Texte de l\\'élément');\n }\n return contentField;\n };\n\n checkClasses();\n elementTypeInput.addEventListener('change', () => {\n checkClasses();\n showRelevantField();\n });\n\n showRelevantField();\n }\n};\n\nexport { initLessonQCM };\n","const initFormsEnter = () => {\n const inputs = document.querySelectorAll('input');\n\n inputs.forEach((input, index) => {\n input.addEventListener('keypress', (e) => {\n if (e.key === 'Enter') {\n e.preventDefault();\n\n const nextInput = inputs[index + 1];\n if (nextInput) {\n nextInput.focus();\n }\n }\n });\n });\n};\n\nexport { initFormsEnter };\n","const initCenterModal = () => {\n const modal = document.getElementById(\"myModal\");\n const btn = document.getElementById(\"openModalButton\");\n const span = document.getElementsByClassName(\"close\")[0];\n\n if (btn && modal && span) {\n btn.onclick = function() {\n modal.style.display = \"flex\";\n modal.querySelector('.modal-content').style.transform = 'scale(1)';\n };\n\n span.onclick = function() {\n modal.querySelector('.modal-content').style.transform = 'scale(0)';\n setTimeout(() => { modal.style.display = \"none\"; }, 300);\n };\n\n window.onclick = function(event) {\n if (event.target == modal) {\n modal.querySelector('.modal-content').style.transform = 'scale(0)';\n setTimeout(() => { modal.style.display = \"none\"; }, 300);\n }\n };\n }\n};\n\n\nexport { initCenterModal };","const initBreakout = () => {\n const canvas = document.getElementById(\"gameCanvas\");\n if (!canvas) {\n return;\n }\n const startBtn = document.getElementById(\"startBtn\");\n const restartBtn = document.getElementById(\"restartBtn\");\n\n let ctx;\n let ballRadius = 10;\n let x;\n let y;\n let dx;\n let dy;\n let paddleHeight = 10;\n let paddleWidth = 75;\n let paddleX;\n let rightPressed = false;\n let leftPressed = false;\n let brickRowCount = 3;\n let brickColumnCount = 5;\n let brickWidth = 75;\n let brickHeight = 20;\n let brickPadding = 10;\n let brickOffsetTop = 30;\n let brickOffsetLeft = 30;\n let bricks = [];\n let score;\n let gameInterval;\n\n function setupGame() {\n ctx = canvas.getContext(\"2d\");\n x = canvas.width / 2;\n y = canvas.height - 30;\n dx = 2;\n dy = -2;\n paddleX = (canvas.width - paddleWidth) / 2;\n rightPressed = false;\n leftPressed = false;\n bricks = [];\n for (let c = 0; c < brickColumnCount; c++) {\n bricks[c] = [];\n for (let r = 0; r < brickRowCount; r++) {\n bricks[c][r] = { x: 0, y: 0, status: 1 };\n }\n }\n score = 0;\n }\n\n function keyDownHandler(e) {\n if (e.key == \"Right\" || e.key == \"ArrowRight\") {\n rightPressed = true;\n } else if (e.key == \"Left\" || e.key == \"ArrowLeft\") {\n leftPressed = true;\n }\n }\n\n function keyUpHandler(e) {\n if (e.key == \"Right\" || e.key == \"ArrowRight\") {\n rightPressed = false;\n } else if (e.key == \"Left\" || e.key == \"ArrowLeft\") {\n leftPressed = false;\n }\n }\n\n function collisionDetection() {\n for (let c = 0; c < brickColumnCount; c++) {\n for (let r = 0; r < brickRowCount; r++) {\n let b = bricks[c][r];\n if (b.status == 1) {\n if (x > b.x && x < b.x + brickWidth && y > b.y && y < b.y + brickHeight) {\n dy = -dy;\n b.status = 0;\n score++;\n if (score == brickRowCount * brickColumnCount) {\n alert(\"YOU WIN, CONGRATULATIONS!\");\n document.location.reload();\n }\n }\n }\n }\n }\n }\n\n function drawBall() {\n ctx.beginPath();\n ctx.arc(x, y, ballRadius, 0, Math.PI * 2);\n ctx.fillStyle = \"#0095DD\";\n ctx.fill();\n ctx.closePath();\n }\n\n function drawPaddle() {\n ctx.beginPath();\n ctx.rect(paddleX, canvas.height - paddleHeight, paddleWidth, paddleHeight);\n ctx.fillStyle = \"#0095DD\";\n ctx.fill();\n ctx.closePath();\n }\n\n function drawBricks() {\n for (let c = 0; c < brickColumnCount; c++) {\n for (let r = 0; r < brickRowCount; r++) {\n if (bricks[c][r].status == 1) {\n let brickX = c * (brickWidth + brickPadding) + brickOffsetLeft;\n let brickY = r * (brickHeight + brickPadding) + brickOffsetTop;\n bricks[c][r].x = brickX;\n bricks[c][r].y = brickY;\n ctx.beginPath();\n ctx.rect(brickX, brickY, brickWidth, brickHeight);\n ctx.fillStyle = \"#0095DD\";\n ctx.fill();\n ctx.closePath();\n }\n }\n }\n }\n\n function drawScore() {\n ctx.font = \"16px Arial\";\n ctx.fillStyle = \"#0095DD\";\n ctx.fillText(\"Score: \" + score, 8, 20);\n }\n\n function draw() {\n ctx.clearRect(0, 0, canvas.width, canvas.height);\n drawBricks();\n drawBall();\n drawPaddle();\n drawScore();\n collisionDetection();\n\n if (x + dx > canvas.width - ballRadius || x + dx < ballRadius) {\n dx = -dx;\n }\n if (y + dy < ballRadius) {\n dy = -dy;\n } else if (y + dy > canvas.height - ballRadius) {\n if (x > paddleX && x < paddleX + paddleWidth) {\n dy = -dy;\n } else {\n clearInterval(gameInterval);\n restartBtn.style.display = \"block\";\n }\n }\n\n if (rightPressed && paddleX < canvas.width - paddleWidth) {\n paddleX += 7;\n } else if (leftPressed && paddleX > 0) {\n paddleX -= 7;\n }\n\n x += dx;\n y += dy;\n }\n\n function startGame() {\n setupGame();\n gameInterval = setInterval(draw, 10);\n }\n\n function restartGame() {\n setupGame();\n restartBtn.style.display = \"none\";\n startGame();\n }\n\n startBtn.addEventListener(\"click\", () => {\n startBtn.style.display = \"none\";\n startGame();\n });\n\n restartBtn.addEventListener(\"click\", restartGame);\n\n document.addEventListener(\"keydown\", keyDownHandler, false);\n document.addEventListener(\"keyup\", keyUpHandler, false);\n};\n\nexport { initBreakout };\n","const initDropzone = () => {\n const dropzone = document.getElementById('dropzone');\n const preview = document.getElementById('preview');\n const fileInput = document.getElementById('fileupload');\n let filesArray = [];\n\n const handleFiles = (files) => {\n Array.from(files).forEach(file => {\n filesArray.push(file);\n const p = document.createElement('p');\n p.textContent = file.name;\n preview.appendChild(p);\n });\n };\n\n if (dropzone) {\n dropzone.addEventListener('dragover', (e) => {\n e.preventDefault();\n e.stopPropagation();\n dropzone.classList.add('dragging');\n });\n\n dropzone.addEventListener('dragleave', (e) => {\n e.preventDefault();\n e.stopPropagation();\n dropzone.classList.remove('dragging');\n });\n\n dropzone.addEventListener('drop', (e) => {\n e.preventDefault();\n e.stopPropagation();\n dropzone.classList.remove('dragging');\n handleFiles(e.dataTransfer.files);\n });\n }\n\n // Intercepter l'envoi du formulaire pour ajouter les fichiers à FormData\n const form = document.getElementById('expense-form');\n if (form) {\n form.addEventListener('submit', (e) => {\n e.preventDefault();\n\n const formData = new FormData(form);\n filesArray.forEach(file => {\n formData.append('expense[proofs][]', file);\n });\n\n fetch(form.action, {\n method: form.method,\n body: formData,\n headers: {\n 'X-CSRF-Token': document.querySelector('meta[name=\"csrf-token\"]').content\n }\n })\n .then(response => {\n if (response.ok) {\n window.location.href = response.url;\n } else {\n return response.json().then(errors => {\n console.error('Errors:', errors);\n });\n }\n })\n .catch(error => {\n console.error('Error submitting form:', error);\n });\n });\n }\n};\n\nexport { initDropzone };\n","const initDateEcheance = () => {\n const dateEmissionField = document.getElementById('date_emission');\n const dateEcheanceField = document.getElementById('date_echeance');\n\n const adjustDateEcheance = () => {\n const dateEmission = new Date(dateEmissionField.value);\n if (!isNaN(dateEmission.getTime())) {\n dateEmission.setDate(dateEmission.getDate() + 30);\n dateEcheanceField.value = dateEmission.toISOString().split('T')[0];\n }\n };\n\n const adjustDateEmission = () => {\n const dateEcheance = new Date(dateEcheanceField.value);\n if (!isNaN(dateEcheance.getTime())) {\n dateEcheance.setDate(dateEcheance.getDate() - 30);\n dateEmissionField.value = dateEcheance.toISOString().split('T')[0];\n }\n };\n\n if (dateEmissionField) {\n dateEmissionField.addEventListener('change', adjustDateEcheance);\n }\n\n if (dateEcheanceField) {\n dateEcheanceField.addEventListener('change', adjustDateEmission);\n }\n};\n\nexport { initDateEcheance };\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].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n// expose the modules object (__webpack_modules__)\n__webpack_require__.m = __webpack_modules__;\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (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__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","// no baseURI\n\n// object to store loaded and loading chunks\n// undefined = chunk not loaded, null = chunk preloaded/prefetched\n// [resolve, reject, Promise] = chunk loading, 0 = chunk loaded\nvar installedChunks = {\n\t543: 0\n};\n\n// no chunk on demand loading\n\n// no prefetching\n\n// no preloaded\n\n// no HMR\n\n// no HMR manifest\n\n__webpack_require__.O.j = (chunkId) => (installedChunks[chunkId] === 0);\n\n// install a JSONP callback for chunk loading\nvar webpackJsonpCallback = (parentChunkLoadingFunction, data) => {\n\tvar [chunkIds, moreModules, runtime] = data;\n\t// add \"moreModules\" to the modules object,\n\t// then flag all \"chunkIds\" as loaded and fire callback\n\tvar moduleId, chunkId, i = 0;\n\tif(chunkIds.some((id) => (installedChunks[id] !== 0))) {\n\t\tfor(moduleId in moreModules) {\n\t\t\tif(__webpack_require__.o(moreModules, moduleId)) {\n\t\t\t\t__webpack_require__.m[moduleId] = moreModules[moduleId];\n\t\t\t}\n\t\t}\n\t\tif(runtime) var result = runtime(__webpack_require__);\n\t}\n\tif(parentChunkLoadingFunction) parentChunkLoadingFunction(data);\n\tfor(;i < chunkIds.length; i++) {\n\t\tchunkId = chunkIds[i];\n\t\tif(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {\n\t\t\tinstalledChunks[chunkId][0]();\n\t\t}\n\t\tinstalledChunks[chunkId] = 0;\n\t}\n\treturn __webpack_require__.O(result);\n}\n\nvar chunkLoadingGlobal = self[\"webpackChunkapp\"] = self[\"webpackChunkapp\"] || [];\nchunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));\nchunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));","__webpack_require__.nc = undefined;","// startup\n// Load entry module and return exports\n// This entry module depends on other loaded chunks and execution need to be delayed\nvar __webpack_exports__ = __webpack_require__.O(undefined, [595], () => (__webpack_require__(6486)))\n__webpack_exports__ = __webpack_require__.O(__webpack_exports__);\n"],"names":["deferred","webpackEmptyContext","req","e","Error","code","keys","resolve","id","module","exports","map","webpackContext","webpackContextResolve","__webpack_require__","o","Object","channels","require","forEach","_Class","Controller","connect","this","contentTarget","style","maxHeight","overflow","expanded","toggle","collapse","expand","scrollHeight","targets","active_question_type_eventlistener","active_question","type_selector","question_content","getElementsByClassName","addEventListener","event","question_editor_type_update","value","add_awnser_choice","question_type","html_question_content","Date","today","innerHTML","actions_buttons","document","actions_button","new_element","previousElementSibling","cloneNode","setAttribute","id_generator","before","previous_element","parentNode","children","length","removeChild","selectQuestion","new_selected_question","old_selected_question","includes","querySelector","display","click","undefined","classList","remove","add","unselectQuestionHide","removeAttribute","setSelected","reset_question_selector","questions","question","contains","setUnselected","elements","element","old_id","show_options_select2","redirect_options_select2","$","select2","ClonedElement","setOldValues","replaceChild","eventListenerRemoverAll","active_question_trash_eventlistener","active_question_show_options_eventlistener","active_question_redirect_options_eventlistener","setUnsaved","save_statut","innerText","loadQuestion","appendChild","ConvertStringToHTML","titre","replace","load_question_html","selected_question","question_json","type","setValuesWhileLoadingQuestions","setOptionsWhileLoadingQuestions","new_question_html","new_title_html","new_section_html","trash_btn","removeQuestion","show_conditions_btn","show_conditions_element","questions_dropdown_values","querySelectorAll","not_question_types","obj","key","push","replaceAwnserDropdownValues","options_criteres","option_critere","critere_question","change_show_options_value","initShowOptionsDropdown","active_options_add_remove_btn","redirect_to_section_btn","show_redirect_element","awnser_dropdown_values","sections_dropdown_values","reponses","reponse","colonnes","colonne","values","querySelectorName","option_type","html","options_critere","old_val","val","pushAwnserDropdownValues","initRedirectOptionsDropdown","type_question","show_options_btns","addBtn","rmvBtn","question_select","getElementById","question_select_type","result","i","charAt","Math","floor","characters","random","str","DOMParser","parseFromString","body","oldElement","clonedElement","old_type","old_options_show_criteres","cloned_options_show_criteres","old_condition","old_question","old_mode","old_selected_values","trigger","old_options_redirect_criteres","cloned_options_redirect_criteres","old_redirection","creerTableauStructure","tableau_layout","ajoutHeaderAuTableau","tableau_init_data","headerRow","colonneHTML","ajoutContentAuTableau","contentRow","lignes","ligne","ligneHTML","concatenerColonnesLigneContenu","colonneInnerHTML","ajoutNewInnerHTML","ajoutInnerHTML","options","option","find","nom","initializeActionBtns","footer_action_btns","nbre_colonnes","JSON","parse","getAttribute","generateActionTableLine","addRow","removeRow","saveTableBtn","newRow","createElement","ajouterLigneContenu","lastChild","retirerLigneContenu","sauvegarderLigneContenu","colonnesHEAD","ligne_result","colonneHEAD","colonneLigne","tableau_final_data","stringify","checkAccessCode","correctCode","url","csrfToken","preventDefault","stopPropagation","prompt","form","method","action","csrfInput","name","submit","alert","window","allowDrop","drag","dataTransfer","setData","target","drop","data","getData","etudeCard","closest","newStatus","confirm","updateEtudeStatus","split","etudeId","statut","console","log","fetch","headers","then","response","ok","json","location","reload","catch","error","initTaskManager","arrow","closeModals","modal","scrollIntoView","behavior","closeButton","checked","checkmark","nextElementSibling","taskId","juniorId","tache","date_validation","toISOString","Promise","setTimeout","submitTaskUpdate","application","Application","start","context","load","definitionsFromContext","initProgressInputs","progressInputs","validateAndUpdateProgress","updateProgress","call","async","progressId","parcourId","progressValue","progress_id","progress","input","removeEventListener","initTracker","viewDetailsButtons","detailsContent","button","userId","text","validationSelects","updateDepotValidation","depotId","validationValue","depot_id","valid","select","HelloWorld","props","_useState2","useState","setName","React","htmlFor","onChange","propTypes","PropTypes","isRequired","LessonBlock","lesson","isCurrent","onClick","className","title","ProgressBar","chapters","currentLesson","lessonProgresses","onLessonClick","leftIconUrl","rightIconUrl","src","alt","chapter","chapterIndex","lessons","lessonIndex","QcmComponent","junior","current_user","qcmId","_slicedToArray","qcmData","setQcmData","_useState4","userAnswers","setUserAnswers","_useState6","setQcmAnswer","_useState8","cooldown","setCooldown","_useState10","message","setMessage","_useState12","isCorrect","setIsCorrect","useEffect","content","fetchQcmAnswer","current_junior","lessonElementId","latestAnswer","sort","a","b","created_at","validation","lastAttemptTime","getTime","onSubmit","every","index","correctAnswers","answers","answer","correct","filter","user_id","lesson_element_id","lesson_progress_id","questionIndex","answerIndex","handleAnswerChange","prevAnswers","updatedAnswers","_objectSpread","disabled","loadAPI","isAPILoaded","YouTubeVideo","user","videoProgress","setLocalVideoProgress","videoProgressRef","useRef","isPlayerReady","setIsPlayerReady","playerRef","lastTimeRef","intervalRef","isSeeking","setIsSeeking","current","youtube_url","onYouTubeIframeAPIReady","tag","head","YT","Player","videoId","events","onPlayerReady","onPlayerStateChange","fetchVideoProgress","clearInterval","destroy","warn","setInterval","getCurrentTime","currentTime","seekTo","updateLastTime","PlayerState","ENDED","handleVideoEnd","PLAYING","currentVideoProgress","watched","setVideoProgress","LessonContent","lessonElements","depotAnswers","setDepotAnswers","videoRefs","fileInputRefs","fetchDepotAnswers","prevState","handleFileSubmit","file","files","formData","FormData","append","element_type","toLowerCase","renderElementContent","picture","href","download","rel","depotAnswer","validationDic","pending","refused","accepted","sortedDepotAnswers","pendingAnswer","depot","refusedAnswer","file_url","file_name","ref","el","Banner","course","parcour","parcoursUrl","is_a_parcour","time","difficult","creator_logo","last_updated_at","ChapterNavigation","findIndex","some","currentChapterIndex","setCurrentChapterIndex","newChapterIndex","handlePreviousChapter","handleNextChapter","Timer","currentLessonId","onUpdateProgress","timerRef","startTimeRef","lastProgress","setLastProgress","stopTimer","startTime","endTime","timeSpent","updatedProgress","lesson_id","updateLessonTime","handleUnload","currentProgress","lessonId","fetchLessonProgress","startTimer","handleLessonChange","Training","setCurrentLesson","setLessonProgresses","progressData","initializeLessonProgresses","handleLessonClick","progressPromises","flatMap","progressDataArray","all","verifyAndUpdateAllProgresses","lesson_elements","handleUpdateProgress","prev","junior_nom","description","position","video","FileUpload","onNext","isDragging","setIsDragging","onDragOver","onDragLeave","handleDragLeave","onDrop","xmlns","viewBox","fill","d","accept","ModelSelection","models","selectedModel","setSelectedModel","model","handleNext","ImportStatusModal","jobId","onClose","status","setStatus","errors","setErrors","intervalId","renderContent","Oval","color","height","width","FaCheckCircle","size","FaTimesCircle","handleClose","ColumnMapping","columns","mappings","setMappings","fileColumns","setFileColumns","fileData","setFileData","fileRawData","setFileRawData","importJobId","setImportJobId","readFile","reader","FileReader","onload","Uint8Array","workbook","XLSX","sheetName","SheetNames","worksheet","sheet_to_json","Sheets","header","dataRows","slice","row","cell","date","parse_date_code","jsDate","UTC","y","m","H","M","S","year","getUTCFullYear","toLocaleDateString","initialMappings","column","readAsArrayBuffer","alignItems","margin","handleMappingChange","fileColumn","currentColumn","selectedColumns","getAvailableOptions","dbColumn","rowIndex","cellIndex","handleSubmit","mappedData","indexOf","payload","junior_id","model_name","job_id","ImportWizard","step","setStep","setFile","setModel","setColumns","uploadedFile","global","Rails","Turbolinks","ActiveStorage","initClickableDiv","clickableDiv","initToggleEyes","toggleEye","fieldId","passwordField","trim","initMenuSelector","menu_tabs","menu_contents","AccessPageMenuConfig","updateMenuTabs","updateMenuContents","UpdateMenuCookies","menu_tab","menu_content","cookie","page_id","getCookie","cName","res","decodeURIComponent","substring","initArrayInput","btns","btn","initDestructionBtnDiv","refreshDestroyBtn","listenAddInput","destroy_btns","destroy_btn_id","deleteInput","forms_name","inputs","new_input","replaceAll","join","outerHTML","input_container","parentElement","above_input","insertBefore","delete_btn","addDestructionBtnDiv","addinput","initFilter","setupFilters","filterPanels","openFiltersBtns","overlay","toggleOverlay","isVisible","filterPanel","openFiltersBtn","navbar","adjustFilterPanelPosition","navbarHeight","offsetHeight","top","isActive","readyState","initDevenirMembre","devenirMembreButton","initPanel","openPanelBtn","panel","overlay2","togglePanel","initConnection","container","registerBtn","loginBtn","initHEXTableauDynamique","tableau_layouts","tableau_init_data_json","initGantt","ganttContainer","ganttData","startDate","min","date_debut","endDate","max","date_fin","currentDate","actionObjectif","bar","createGanttBar","objectif","barContainer","textContent","end","startOffset","duration","left","dateStartLabel","dateEndLabel","currentDateMarker","initDragAndDrop","test","navigator","userAgent","etudeCards","card","currentTarget","initHEXModal2","open_btns","close_btns","already_opened_modal","css","button_id","animate","scrollTop","z","initTableauHexSearchBar","tabs","contents","debounceTimeout","setActiveTab","tab","tabIndex","contentIndex","currentUrl","URL","searchParams","set","history","replaceState","input1","input2","inputHandler","searchParam","focus","lastSearchTerm","URLSearchParams","search","get","sendSearchQuery","searchQuery","activeTab","newUrl","pathname","toString","onEnterOrBlur","clearTimeout","onInputEvent","activeTabIndex","parseInt","initReducteur","titre_reducteurs","titch","div","dataset","initDropdown","drop_btn","popups","initLineChart","ctx","getContext","datasets","canvas","parsedDataSet","reduce","Chart","labels","scales","ticks","font","family","weight","x","responsive","animations","radius","easing","loop","active","plugins","legend","fontColor","fontSize","initColonerCat","categorySelector","categories","selectedCategory","cat","initCheckAverageClosing","negociationContainer","negociationCards","averageClass","average","parseFloat","differenceInDays","initDetectEndNavbar","notificationFlash","initBarChart","initStackedBarChart","stacked","initHalfDoughnutChart","rotation","circumference","cutoutPercentage","builder_navbar","add_question_button","add_title_button","add_section_button","after","new_selected","add_new_question","add_new_title","add_new_section","init_questionnaire_builder_actions_navbar","questions_data","questions_data_parsed","question_types","initFirstQuestion","loadQuestions","init_question_selector","line_types","grille_types","saver_array","save_qtn","question_head","question_options","question_footer","question_ligne_inputs","lignes_values","question_grille_ligne_inputs","question_grille_colonnes_inputs","colonnes_values","show_option","redirect_option","show_option_save","redirect_option_save","condition","mode","Array","from","redirection","show_options","redirect_options","obligatoire","save_questions","setSaved","initSaver","initHEXTableauCounter","tableau_counters","tableau_counter","count_line","to_counts","to_count","attribute","lines","sum","line","round","initContentPreviewer","previewers","previewer","text_area","initGanttV1Chart","indexAxis","unit","initCourses","courseCards","opacity","transform","transition","boxShadow","node","link","initSortable","Sortable","create","animation","onEnd","item","newIndex","courseId","lessonElementsContainer","chapterId","handle","token","lessonsContainer","order","lessonCard","initChapterPageLoadAnimations","bannerContainer","creatorLogoContainer","courseDescription","buttonContainer","initLessons","evt","itemEl","new_position","initLessonElements","elementTypeSelect","videoFields","textFields","qcmFields","fileUploadFields","selectedType","initItemToChoose","selector","containers","selector_value","names","class_list","initLessonQCM","qcmBuilder","elementTypeInput","formElements","checkClasses","allPotentialQcmDivs","qcmDivHidden","addQuestionButton","updateQCMContent","questionElement","answerElement","qcmContentField","questionCount","newQuestionHTML","insertAdjacentHTML","answerCount","newAnswerHTML","backgroundColor","showRelevantField","contentField","createContentField","inputField","initFormsEnter","nextInput","initCenterModal","span","onclick","initBreakout","startBtn","restartBtn","dx","dy","paddleX","score","gameInterval","ballRadius","paddleHeight","paddleWidth","rightPressed","leftPressed","brickRowCount","brickColumnCount","brickWidth","brickHeight","brickPadding","brickOffsetTop","brickOffsetLeft","bricks","setupGame","c","r","draw","clearRect","brickX","brickY","beginPath","rect","fillStyle","closePath","drawBricks","arc","PI","fillText","collisionDetection","startGame","initDropzone","dropzone","preview","filesArray","p","initDateEcheance","dateEmissionField","dateEcheanceField","adjustDateEcheance","dateEmission","isNaN","setDate","getDate","adjustDateEmission","dateEcheance","ReactOnRails","__webpack_module_cache__","moduleId","cachedModule","__webpack_modules__","O","chunkIds","fn","priority","notFulfilled","Infinity","fulfilled","j","splice","n","getter","__esModule","definition","defineProperty","enumerable","g","globalThis","Function","prop","prototype","hasOwnProperty","Symbol","toStringTag","installedChunks","chunkId","webpackJsonpCallback","parentChunkLoadingFunction","moreModules","runtime","chunkLoadingGlobal","self","bind","nc","__webpack_exports__"],"sourceRoot":""}