{"version":3,"file":"add_field_course_plan_section-WIZw7tDn.js","sources":["../../../app/frontend/entrypoints/legacy/add_field_course_plan_section.js"],"sourcesContent":["import $ from \"jquery\";\n\nconst addFieldCoursePlanSection = () => {\n $(\"form\").on(\"click\", \".add_course_plan_section_field\", function (event) {\n var regexp, time;\n time = new Date().getTime();\n regexp = new RegExp($(this).data(\"id\"), \"g\");\n let regexp2 = new RegExp('new_course_plan_section', 'g')\n $(\".course_plan_section_fields\").append(\n $(this).data(\"fields\").replace(regexp, time).replace(regexp2, time));\n\n $(\".course_plan_section_fields\").find(\"> tr:last > td > input.order_field\").each(function(index) {\n $(this).val($(\".course_plan_section_fields\").find(\"> tr\").length);\n });\n\n\n\n return event.preventDefault();\n });\n};\n\nexport { addFieldCoursePlanSection };\n"],"names":["addFieldCoursePlanSection","$","event","regexp","time","regexp2","index"],"mappings":"yCAEK,MAACA,EAA4B,IAAM,CACtCC,EAAE,MAAM,EAAE,GAAG,QAAS,iCAAkC,SAAUC,EAAO,CACvE,IAAIC,EAAQC,EACZA,EAAO,IAAI,OAAO,UAClBD,EAAS,IAAI,OAAOF,EAAE,IAAI,EAAE,KAAK,IAAI,EAAG,GAAG,EAC3C,IAAII,EAAU,IAAI,OAAO,0BAA2B,GAAG,EACvD,OAAAJ,EAAE,6BAA6B,EAAE,OAC/BA,EAAE,IAAI,EAAE,KAAK,QAAQ,EAAE,QAAQE,EAAQC,CAAI,EAAE,QAAQC,EAASD,CAAI,CAAC,EAErEH,EAAE,6BAA6B,EAAE,KAAK,oCAAoC,EAAE,KAAK,SAASK,EAAO,CAC/FL,EAAE,IAAI,EAAE,IAAIA,EAAE,6BAA6B,EAAE,KAAK,MAAM,EAAE,MAAM,CACtE,CAAK,EAIMC,EAAM,gBACjB,CAAG,CACH"}