LearnPress – WordPress LMS Plugin - Version 4.1.7.3.1

Version Description

(2022-11-03) = ~ Fixed: error build missing styles.

Download this release

Release Info

Developer ThimPress
Plugin Icon 128x128 LearnPress – WordPress LMS Plugin
Version 4.1.7.3.1
Comparing to
See all releases

Code changes from version 4.1.7.3 to 4.1.7.3.1

Files changed (118) hide show
  1. assets/css/admin/admin-rtl.css +0 -3
  2. assets/css/admin/admin.css +0 -3
  3. assets/css/learnpress-rtl.css +0 -2
  4. assets/css/learnpress.css +0 -2
  5. assets/js/dist/admin/editor/course.asset.php +1 -0
  6. assets/js/dist/admin/editor/course.js.map +1 -0
  7. assets/js/dist/admin/editor/course.min.asset.php +1 -0
  8. assets/js/dist/admin/editor/question.asset.php +1 -0
  9. assets/js/dist/admin/editor/question.js.map +1 -0
  10. assets/js/dist/admin/editor/question.min.asset.php +1 -0
  11. assets/js/dist/admin/editor/quiz.asset.php +1 -0
  12. assets/js/dist/admin/editor/quiz.js.map +1 -0
  13. assets/js/dist/admin/editor/quiz.min.asset.php +1 -0
  14. assets/js/dist/admin/pages/dashboard.asset.php +1 -0
  15. assets/js/dist/admin/pages/dashboard.js.map +1 -0
  16. assets/js/dist/admin/pages/dashboard.min.asset.php +1 -0
  17. assets/js/dist/admin/pages/setup.asset.php +1 -0
  18. assets/js/dist/admin/pages/setup.js.map +1 -0
  19. assets/js/dist/admin/pages/setup.min.asset.php +1 -0
  20. assets/js/dist/admin/pages/statistic.asset.php +1 -0
  21. assets/js/dist/admin/pages/statistic.js.map +1 -0
  22. assets/js/dist/admin/pages/statistic.min.asset.php +1 -0
  23. assets/js/dist/admin/pages/sync-data.asset.php +1 -0
  24. assets/js/dist/admin/pages/sync-data.js.map +1 -0
  25. assets/js/dist/admin/pages/sync-data.min.asset.php +1 -0
  26. assets/js/dist/admin/pages/themes-addons.asset.php +1 -0
  27. assets/js/dist/admin/pages/themes-addons.js.map +1 -0
  28. assets/js/dist/admin/pages/themes-addons.min.asset.php +1 -0
  29. assets/js/dist/admin/pages/tools.asset.php +1 -0
  30. assets/js/dist/admin/pages/tools.js +5 -0
  31. assets/js/dist/admin/pages/tools.js.map +1 -0
  32. assets/js/dist/admin/pages/tools.min.asset.php +1 -0
  33. assets/js/dist/admin/pages/widgets.asset.php +1 -0
  34. assets/js/dist/admin/pages/widgets.js.map +1 -0
  35. assets/js/dist/admin/pages/widgets.min.asset.php +1 -0
  36. assets/js/dist/blocks/index.asset.php +1 -0
  37. assets/js/dist/blocks/index.deps.json +1 -0
  38. assets/js/dist/blocks/index.js +1 -1
  39. assets/js/dist/blocks/index.js.map +1 -0
  40. assets/js/dist/blocks/index.min.asset.php +1 -0
  41. assets/js/dist/blocks/index.min.deps.json +1 -0
  42. assets/js/dist/frontend/become-teacher.asset.php +1 -0
  43. assets/js/dist/frontend/become-teacher.js.map +1 -0
  44. assets/js/dist/frontend/become-teacher.min.asset.php +1 -0
  45. assets/js/dist/frontend/checkout.asset.php +1 -0
  46. assets/js/dist/frontend/checkout.js.map +1 -0
  47. assets/js/dist/frontend/checkout.min.asset.php +1 -0
  48. assets/js/dist/frontend/courses.asset.php +1 -0
  49. assets/js/dist/frontend/courses.deps.json +1 -0
  50. assets/js/dist/frontend/courses.js +5 -5
  51. assets/js/dist/frontend/courses.js.map +1 -0
  52. assets/js/dist/frontend/courses.min.asset.php +1 -0
  53. assets/js/dist/frontend/courses.min.deps.json +1 -0
  54. assets/js/dist/frontend/custom.asset.php +1 -0
  55. assets/js/dist/frontend/custom.deps.json +1 -0
  56. assets/js/dist/frontend/custom.js.map +1 -0
  57. assets/js/dist/frontend/custom.min.asset.php +1 -0
  58. assets/js/dist/frontend/custom.min.deps.json +1 -0
  59. assets/js/dist/frontend/lesson.asset.php +1 -0
  60. assets/js/dist/frontend/lesson.deps.json +1 -0
  61. assets/js/dist/frontend/lesson.js.map +1 -0
  62. assets/js/dist/frontend/lesson.min.asset.php +1 -0
  63. assets/js/dist/frontend/lesson.min.deps.json +1 -0
  64. assets/js/dist/frontend/lp-configs.asset.php +1 -0
  65. assets/js/dist/frontend/lp-configs.deps.json +1 -0
  66. assets/js/dist/frontend/lp-configs.js.map +1 -0
  67. assets/js/dist/frontend/lp-configs.min.asset.php +1 -0
  68. assets/js/dist/frontend/lp-configs.min.deps.json +1 -0
  69. assets/js/dist/frontend/modal.asset.php +1 -0
  70. assets/js/dist/frontend/modal.deps.json +1 -0
  71. assets/js/dist/frontend/modal.js.map +1 -0
  72. assets/js/dist/frontend/modal.min.asset.php +1 -0
  73. assets/js/dist/frontend/modal.min.deps.json +1 -0
  74. assets/js/dist/frontend/profile.asset.php +1 -0
  75. assets/js/dist/frontend/profile.deps.json +1 -0
  76. assets/js/dist/frontend/profile.js +2 -2
  77. assets/js/dist/frontend/profile.js.map +1 -0
  78. assets/js/dist/frontend/profile.min.asset.php +1 -0
  79. assets/js/dist/frontend/profile.min.deps.json +1 -0
  80. assets/js/dist/frontend/question-types.asset.php +1 -0
  81. assets/js/dist/frontend/question-types.deps.json +1 -0
  82. assets/js/dist/frontend/question-types.js +1 -1
  83. assets/js/dist/frontend/question-types.js.map +1 -0
  84. assets/js/dist/frontend/question-types.min.asset.php +1 -0
  85. assets/js/dist/frontend/question-types.min.deps.json +1 -0
  86. assets/js/dist/frontend/quiz.asset.php +1 -0
  87. assets/js/dist/frontend/quiz.deps.json +1 -0
  88. assets/js/dist/frontend/quiz.js +11 -16
  89. assets/js/dist/frontend/quiz.js.map +1 -0
  90. assets/js/dist/frontend/quiz.min.asset.php +1 -0
  91. assets/js/dist/frontend/quiz.min.deps.json +1 -0
  92. assets/js/dist/frontend/single-course.asset.php +1 -0
  93. assets/js/dist/frontend/single-course.deps.json +1 -0
  94. assets/js/dist/frontend/single-course.js +8 -2
  95. assets/js/dist/frontend/single-course.js.map +1 -0
  96. assets/js/dist/frontend/single-course.min.asset.php +1 -0
  97. assets/js/dist/frontend/single-course.min.deps.json +1 -0
  98. assets/js/dist/frontend/single-curriculum.asset.php +1 -0
  99. assets/js/dist/frontend/single-curriculum.deps.json +1 -0
  100. assets/js/dist/frontend/single-curriculum.js +8 -2
  101. assets/js/dist/frontend/single-curriculum.js.map +1 -0
  102. assets/js/dist/frontend/single-curriculum.min.asset.php +1 -0
  103. assets/js/dist/frontend/single-curriculum.min.deps.json +1 -0
  104. assets/js/dist/frontend/widgets.asset.php +1 -0
  105. assets/js/dist/frontend/widgets.deps.json +1 -0
  106. assets/js/dist/frontend/widgets.js.map +1 -0
  107. assets/js/dist/frontend/widgets.min.asset.php +1 -0
  108. assets/js/dist/frontend/widgets.min.deps.json +1 -0
  109. assets/js/dist/js/data-controls.asset.php +1 -0
  110. assets/js/dist/js/data-controls.deps.json +1 -0
  111. assets/js/dist/js/data-controls.js.map +1 -0
  112. assets/js/dist/js/data-controls.min.asset.php +1 -0
  113. assets/js/dist/js/data-controls.min.deps.json +1 -0
  114. assets/js/dist/utils.asset.php +1 -0
  115. assets/js/dist/utils.js.map +1 -0
  116. assets/js/dist/utils.min.asset.php +1 -0
  117. assets/js/vendor/plugins.all.js +359 -1
  118. assets/js/vendor/vue/vue_libs.js +0 -1
assets/css/admin/admin-rtl.css CHANGED
@@ -1172,7 +1172,6 @@ ul .clearfix {
1172
  .learn-press-advertisement-slider .slide-item .slide-detail .slide-controls .button {
1173
  margin-bottom: 0;
1174
  }
1175
-
1176
  .wp-responsive-open .learn-press-advertisement-slider {
1177
  margin-right: 56px;
1178
  }
@@ -2567,7 +2566,6 @@ input[name=_lp_course_result]:checked ~ #passing-condition-quiz-result {
2567
  .plugin-card:not(.hide-if-js):nth-child(even) {
2568
  margin-left: 8px;
2569
  }
2570
-
2571
  .plugin-card:not(.hide-if-js):nth-child(3n) {
2572
  margin-left: 0;
2573
  }
@@ -6071,7 +6069,6 @@ body.lp-item-moving {
6071
  .learn-press-dropdown-pages .select2-selection__rendered {
6072
  line-height: 31px !important;
6073
  }
6074
-
6075
  #learn-press-advertisement {
6076
  margin: 0 12px;
6077
  padding-bottom: 0;
1172
  .learn-press-advertisement-slider .slide-item .slide-detail .slide-controls .button {
1173
  margin-bottom: 0;
1174
  }
 
1175
  .wp-responsive-open .learn-press-advertisement-slider {
1176
  margin-right: 56px;
1177
  }
2566
  .plugin-card:not(.hide-if-js):nth-child(even) {
2567
  margin-left: 8px;
2568
  }
 
2569
  .plugin-card:not(.hide-if-js):nth-child(3n) {
2570
  margin-left: 0;
2571
  }
6069
  .learn-press-dropdown-pages .select2-selection__rendered {
6070
  line-height: 31px !important;
6071
  }
 
6072
  #learn-press-advertisement {
6073
  margin: 0 12px;
6074
  padding-bottom: 0;
assets/css/admin/admin.css CHANGED
@@ -1172,7 +1172,6 @@ ul .clearfix {
1172
  .learn-press-advertisement-slider .slide-item .slide-detail .slide-controls .button {
1173
  margin-bottom: 0;
1174
  }
1175
-
1176
  .wp-responsive-open .learn-press-advertisement-slider {
1177
  margin-left: 56px;
1178
  }
@@ -2567,7 +2566,6 @@ input[name=_lp_course_result]:checked ~ #passing-condition-quiz-result {
2567
  .plugin-card:not(.hide-if-js):nth-child(even) {
2568
  margin-right: 8px;
2569
  }
2570
-
2571
  .plugin-card:not(.hide-if-js):nth-child(3n) {
2572
  margin-right: 0;
2573
  }
@@ -6071,7 +6069,6 @@ body.lp-item-moving {
6071
  .learn-press-dropdown-pages .select2-selection__rendered {
6072
  line-height: 31px !important;
6073
  }
6074
-
6075
  #learn-press-advertisement {
6076
  margin: 0 12px;
6077
  padding-bottom: 0;
1172
  .learn-press-advertisement-slider .slide-item .slide-detail .slide-controls .button {
1173
  margin-bottom: 0;
1174
  }
 
1175
  .wp-responsive-open .learn-press-advertisement-slider {
1176
  margin-left: 56px;
1177
  }
2566
  .plugin-card:not(.hide-if-js):nth-child(even) {
2567
  margin-right: 8px;
2568
  }
 
2569
  .plugin-card:not(.hide-if-js):nth-child(3n) {
2570
  margin-right: 0;
2571
  }
6069
  .learn-press-dropdown-pages .select2-selection__rendered {
6070
  line-height: 31px !important;
6071
  }
 
6072
  #learn-press-advertisement {
6073
  margin: 0 12px;
6074
  padding-bottom: 0;
assets/css/learnpress-rtl.css CHANGED
@@ -3519,7 +3519,6 @@ input[name=course-faqs-box-ratio]:checked + .course-faqs-box .course-faqs-box__t
3519
  body.course-item-popup.wpadminbar #learn-press-course-curriculum {
3520
  top: 106px;
3521
  }
3522
-
3523
  .learn-press-course-results-progress {
3524
  margin-left: 0%;
3525
  }
@@ -6913,7 +6912,6 @@ body.lp-sidebar-toggle__close #popup-course #popup-header, body.lp-sidebar-toggl
6913
  body.admin-bar #popup-course {
6914
  top: 46px;
6915
  }
6916
-
6917
  #popup-course #popup-sidebar {
6918
  flex-basis: 250px;
6919
  }
3519
  body.course-item-popup.wpadminbar #learn-press-course-curriculum {
3520
  top: 106px;
3521
  }
 
3522
  .learn-press-course-results-progress {
3523
  margin-left: 0%;
3524
  }
6912
  body.admin-bar #popup-course {
6913
  top: 46px;
6914
  }
 
6915
  #popup-course #popup-sidebar {
6916
  flex-basis: 250px;
6917
  }
assets/css/learnpress.css CHANGED
@@ -3519,7 +3519,6 @@ input[name=course-faqs-box-ratio]:checked + .course-faqs-box .course-faqs-box__t
3519
  body.course-item-popup.wpadminbar #learn-press-course-curriculum {
3520
  top: 106px;
3521
  }
3522
-
3523
  .learn-press-course-results-progress {
3524
  margin-right: 0%;
3525
  }
@@ -6913,7 +6912,6 @@ body.lp-sidebar-toggle__close #popup-course #popup-header, body.lp-sidebar-toggl
6913
  body.admin-bar #popup-course {
6914
  top: 46px;
6915
  }
6916
-
6917
  #popup-course #popup-sidebar {
6918
  flex-basis: 250px;
6919
  }
3519
  body.course-item-popup.wpadminbar #learn-press-course-curriculum {
3520
  top: 106px;
3521
  }
 
3522
  .learn-press-course-results-progress {
3523
  margin-right: 0%;
3524
  }
6912
  body.admin-bar #popup-course {
6913
  top: 46px;
6914
  }
 
6915
  #popup-course #popup-sidebar {
6916
  flex-basis: 250px;
6917
  }
assets/js/dist/admin/editor/course.asset.php ADDED
@@ -0,0 +1 @@
 
1
+ <?php return array('dependencies' => array(), 'version' => 'ef352d489fbb2adb96da');
assets/js/dist/admin/editor/course.js.map ADDED
@@ -0,0 +1 @@
 
1
+ {"version":3,"file":"./assets/js/dist/admin/editor/course.js","mappings":";;;;;;;;;;;AAAA,MAAMA,CAAC,GAAGC,MAAM,CAACC,MAAP,IAAiBA,MAA3B;AAEA,MAAMC,gBAAgB,GAAG;AACxBC,EAAAA,iBAAiB,CAAEC,OAAF,EAAY;AAC5B,UAAMC,MAAM,GAAGD,OAAO,CAACE,OAAR,CAAgBC,mBAA/B;;AAEA,QAAKF,MAAL,EAAc;AACbD,MAAAA,OAAO,CAACI,MAAR,CAAgB,mBAAhB;AACA,KAFD,MAEO;AACNJ,MAAAA,OAAO,CAACI,MAAR,CAAgB,oBAAhB;AACA;;AAEDC,IAAAA,EAAE,CAACC,OAAH,CAAY;AACXC,MAAAA,IAAI,EAAE,iBADK;AAEXN,MAAAA,MAAM,EAAED,OAAO,CAACE,OAAR,CAAgBM;AAFb,KAAZ;AAIA,GAduB;;AAgBxBC,EAAAA,mBAAmB,CAAET,OAAF,EAAWU,KAAX,EAAmB;AACrCL,IAAAA,EAAE,CAACC,OAAH,CAAY;AACXC,MAAAA,IAAI,EAAE,eADK;AAEXG,MAAAA,KAAK,EAAEC,IAAI,CAACC,SAAL,CAAgBF,KAAhB;AAFI,KAAZ,EAGIG,IAHJ,CAIC,UAAUC,QAAV,EAAqB;AACpB,YAAMC,MAAM,GAAGD,QAAQ,CAACE,IAAxB;AACA,YAAMC,cAAc,GAAGF,MAAM,CAACG,IAA9B;AAEAlB,MAAAA,OAAO,CAACI,MAAR,CAAgB,cAAhB,EAAgCa,cAAhC;AACA,KATF,EAUC,UAAUE,KAAV,EAAkB;AACjBC,MAAAA,OAAO,CAACD,KAAR,CAAeA,KAAf;AACA,KAZF;AAcA,GA/BuB;;AAiCxBE,EAAAA,aAAa,CAAErB,OAAF,EAAWsB,OAAX,EAAqB;AACjC,QAAKA,OAAO,CAACC,IAAb,EAAoB;AACnBvB,MAAAA,OAAO,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AAuD,iBAAiB;WACxE;WACA,gDAAgD,aAAa;WAC7D;;;;;;;;;;;;;ACNA;AACA;AAEAtL,MAAM,CAACwI,IAAP,GAAcxI,MAAM,CAACwI,IAAP,IAAe1B,GAA7B;AACA9G,MAAM,CAAC+L,KAAP,GAAe/L,MAAM,CAAC+L,KAAP,IAAgBC,IAA/B;AAEA,MAAMjM,CAAC,GAAGC,MAAM,CAACC,MAAjB;AAEA;AACA;AACA;AACA;AACA;;AACAF,CAAC,CAAEkM,QAAF,CAAD,CAAcC,KAAd,CAAqB,YAAW;AAC/BlM,EAAAA,MAAM,CAACmM,mBAAP,GAA6B,IAAIJ,KAAK,CAACK,KAAV,CAAiBN,yDAAW,CAAEO,2BAAF,CAA5B,CAA7B;AACA1F,EAAAA,iDAAI,CAAE;AAAEK,IAAAA,EAAE,EAAE,qBAAN;AAA6BC,IAAAA,KAAK,EAAEkF;AAApC,GAAF,CAAJ;AAEAG,EAAAA,UAAU,CAAE,MAAM;AACjBtM,IAAAA,MAAM,CAACuM,gBAAP,GAA0B,IAAI/D,IAAJ,CAAU;AACnCgE,MAAAA,EAAE,EAAE,yBAD+B;AAEnCC,MAAAA,QAAQ,EAAE;AAFyB,KAAV,CAA1B;AAIA,GALS,EAKP,GALO,CAAV;AAMA,CAVD,E","sources":["webpack://learnpress/./assets/src/apps/js/admin/editor/actions/course-section.js","webpack://learnpress/./assets/src/apps/js/admin/editor/actions/course.js","webpack://learnpress/./assets/src/apps/js/admin/editor/actions/modal-course-items.js","webpack://learnpress/./assets/src/apps/js/admin/editor/getters/course-section.js","webpack://learnpress/./assets/src/apps/js/admin/editor/getters/course.js","webpack://learnpress/./assets/src/apps/js/admin/editor/getters/modal-course-items.js","webpack://learnpress/./assets/src/apps/js/admin/editor/http.js","webpack://learnpress/./assets/src/apps/js/admin/editor/mutations/course-section.js","webpack://learnpress/./assets/src/apps/js/admin/editor/mutations/course.js","webpack://learnpress/./assets/src/apps/js/admin/editor/mutations/modal-course-items.js","webpack://learnpress/./assets/src/apps/js/admin/editor/store/course-section.js","webpack://learnpress/./assets/src/apps/js/admin/editor/store/course.js","webpack://learnpress/./assets/src/apps/js/admin/editor/store/i18n.js","webpack://learnpress/./assets/src/apps/js/admin/editor/store/modal-course-items.js","webpack://learnpress/webpack/bootstrap","webpack://learnpress/webpack/runtime/define property getters","webpack://learnpress/webpack/runtime/hasOwnProperty shorthand","webpack://learnpress/webpack/runtime/make namespace object","webpack://learnpress/./assets/src/apps/js/admin/editor/course.js"],"sourcesContent":["const $ = window.jQuery || jQuery;\n\nconst CourseCurriculum = {\n\ttoggleAllSections( context ) {\n\t\tconst hidden = context.getters.isHiddenAllSections;\n\n\t\tif ( hidden ) {\n\t\t\tcontext.commit( 'OPEN_ALL_SECTIONS' );\n\t\t} else {\n\t\t\tcontext.commit( 'CLOSE_ALL_SECTIONS' );\n\t\t}\n\n\t\tLP.Request( {\n\t\t\ttype: 'hidden-sections',\n\t\t\thidden: context.getters.hiddenSections,\n\t\t} );\n\t},\n\n\tupdateSectionsOrder( context, order ) {\n\t\tLP.Request( {\n\t\t\ttype: 'sort-sections',\n\t\t\torder: JSON.stringify( order ),\n\t\t} ).then(\n\t\t\tfunction( response ) {\n\t\t\t\tconst result = response.body;\n\t\t\t\tconst order_sections = result.data;\n\n\t\t\t\tcontext.commit( 'SORT_SECTION', order_sections );\n\t\t\t},\n\t\t\tfunction( error ) {\n\t\t\t\tconsole.error( error );\n\t\t\t}\n\t\t);\n\t},\n\n\ttoggleSection( context, section ) {\n\t\tif ( section.open ) {\n\t\t\tcontext.commit( 'CLOSE_SECTION', section );\n\t\t} else {\n\t\t\tcontext.commit( 'OPEN_SECTION', section );\n\t\t}\n\n\t\tLP.Request( {\n\t\t\ttype: 'hidden-sections',\n\t\t\thidden: context.getters.hiddenSections,\n\t\t} );\n\t},\n\n\tupdateSection( context, section ) {\n\t\tcontext.commit( 'UPDATE_SECTION_REQUEST', section.id );\n\n\t\tLP.Request( {\n\t\t\ttype: 'update-section',\n\t\t\tsection: JSON.stringify( section ),\n\t\t} ).then( function() {\n\t\t\tcontext.commit( 'UPDATE_SECTION_SUCCESS', section.id );\n\t\t} )\n\t\t\t.catch( function() {\n\t\t\t\tcontext.commit( 'UPDATE_SECTION_FAILURE', section.id );\n\t\t\t} );\n\t},\n\n\tremoveSection( context, payload ) {\n\t\tcontext.commit( 'REMOVE_SECTION', payload.index );\n\n\t\tLP.Request( {\n\t\t\ttype: 'remove-section',\n\t\t\tsection_id: payload.section.id,\n\t\t} ).then(\n\t\t\tfunction( response ) {\n\t\t\t\tconst result = response.body;\n\t\t\t},\n\t\t\tfunction( error ) {\n\t\t\t\tconsole.error( error );\n\t\t\t}\n\t\t);\n\t},\n\n\tnewSection( context, name ) {\n\t\tconst newSection = {\n\t\t\ttype: 'new-section',\n\t\t\tsection_name: name,\n\t\t\ttemp_id: LP.uniqueId(),\n\t\t};\n\t\tcontext.commit( 'ADD_NEW_SECTION', {\n\t\t\tid: newSection.temp_id,\n\t\t\titems: [],\n\t\t\topen: false,\n\t\t\ttitle: newSection.section_name,\n\t\t} );\n\n\t\tLP.Request( newSection ).then(\n\t\t\tfunction( response ) {\n\t\t\t\tconst result = response.body;\n\n\t\t\t\tif ( result.success ) {\n\t\t\t\t\tconst section = $.extend( {}, result.data, { open: true } );\n\t\t\t\t\tcontext.commit( 'ADD_NEW_SECTION', section );\n\t\t\t\t}\n\t\t\t},\n\t\t\tfunction( error ) {\n\t\t\t\tconsole.error( error );\n\t\t\t}\n\t\t);\n\t},\n\n\tupdateSectionItem( context, payload ) {\n\t\tcontext.commit( 'UPDATE_SECTION_ITEM_REQUEST', payload.item.id );\n\n\t\tLP.Request( {\n\t\t\ttype: 'update-section-item',\n\t\t\tsection_id: payload.section_id,\n\t\t\titem: JSON.stringify( payload.item ),\n\n\t\t} ).then(\n\t\t\tfunction( response ) {\n\t\t\t\tcontext.commit( 'UPDATE_SECTION_ITEM_SUCCESS', payload.item.id );\n\n\t\t\t\tconst result = response.body;\n\t\t\t\tif ( result.success ) {\n\t\t\t\t\tconst item = result.data;\n\n\t\t\t\t\tcontext.commit( 'UPDATE_SECTION_ITEM', { section_id: payload.section_id, item } );\n\t\t\t\t}\n\t\t\t},\n\t\t\tfunction( error ) {\n\t\t\t\tcontext.commit( 'UPDATE_SECTION_ITEM_FAILURE', payload.item.id );\n\t\t\t\tconsole.error( error );\n\t\t\t}\n\t\t);\n\t},\n\n\tremoveSectionItem( context, payload ) {\n\t\tconst id = payload.item.id;\n\t\tcontext.commit( 'REMOVE_SECTION_ITEM', payload );\n\t\tpayload.item.temp_id = 0;\n\t\tLP.Request( {\n\t\t\ttype: 'remove-section-item',\n\t\t\tsection_id: payload.section_id,\n\t\t\titem_id: id,\n\t\t} ).then(\n\t\t\tfunction( rs ) {\n\t\t\t\tconst { data, success } = rs.body;\n\n\t\t\t\tif ( success ) {\n\t\t\t\t\tcontext.commit( 'REMOVE_SECTION_ITEM', payload );\n\t\t\t\t} else {\n\t\t\t\t\talert( data );\n\t\t\t\t\tpayload.oldId = id;\n\t\t\t\t\tcontext.commit( 'REMOVE_SECTION_ITEM', payload );\n\t\t\t\t}\n\t\t\t\tcontext.commit( 'REMOVE_SECTION_ITEM', payload );\n\t\t\t}\n\t\t);\n\t},\n\n\tdeleteSectionItem( context, payload ) {\n\t\tconst id = payload.item.id;\n\t\tcontext.commit( 'REMOVE_SECTION_ITEM', payload );\n\t\tpayload.item.temp_id = 0;\n\t\tLP.Request( {\n\t\t\ttype: 'delete-section-item',\n\t\t\tsection_id: payload.section_id,\n\t\t\titem_id: id,\n\t\t} ).then(\n\t\t\tfunction( rs ) {\n\t\t\t\tconst { data, success } = rs.body;\n\n\t\t\t\tif ( success ) {\n\t\t\t\t\tcontext.commit( 'REMOVE_SECTION_ITEM', payload );\n\t\t\t\t} else {\n\t\t\t\t\talert( data );\n\t\t\t\t\tpayload.oldId = id;\n\t\t\t\t\tcontext.commit( 'REMOVE_SECTION_ITEM', payload );\n\t\t\t\t}\n\t\t\t}\n\t\t);\n\t},\n\n\tnewSectionItem( context, payload ) {\n\t\tcontext.commit( 'APPEND_EMPTY_ITEM_TO_SECTION', payload );\n\t\t//context.commit('UPDATE_SECTION_ITEMS', {section_id: payload.section_id, items: result.data});\n\t\tLP.Request( {\n\t\t\ttype: 'new-section-item',\n\t\t\tsection_id: payload.section_id,\n\t\t\titem: JSON.stringify( payload.item ),\n\t\t} ).then(\n\t\t\tfunction( response ) {\n\t\t\t\tconst result = response.body;\n\n\t\t\t\tif ( result.success ) {\n\t\t\t\t\t// context.commit('UPDATE_SECTION_ITEMS', {section_id: payload.section_id, items: result.data});\n\t\t\t\t\tconst items = {};\n\t\t\t\t\t$.each( result.data, function( i, a ) {\n\t\t\t\t\t\titems[ a.old_id ? a.old_id : a.id ] = a;\n\t\t\t\t\t} );\n\n\t\t\t\t\tcontext.commit( 'UPDATE_ITEM_SECTION_BY_ID', {\n\t\t\t\t\t\tsection_id: payload.section_id,\n\t\t\t\t\t\titems,\n\t\t\t\t\t} );\n\t\t\t\t}\n\t\t\t},\n\t\t\tfunction( error ) {\n\t\t\t\tconsole.error( error );\n\t\t\t}\n\t\t);\n\t},\n\n\tupdateSectionItems( { state }, payload ) {\n\t\tLP.Request( {\n\t\t\ttype: 'update-section-items',\n\t\t\tsection_id: payload.section_id,\n\t\t\titems: JSON.stringify( payload.items ),\n\t\t\tlast_section: state.sections[ state.sections.length - 1 ] === ( payload.section_id ),\n\t\t} ).then(\n\t\t\tfunction( response ) {\n\t\t\t\tconst result = response.body;\n\n\t\t\t\tif ( result.success ) {\n\t\t\t\t\t// console.log(result);\n\t\t\t\t}\n\t\t\t},\n\t\t\tfunction( error ) {\n\t\t\t\tconsole.error( error );\n\t\t\t}\n\t\t);\n\t},\n};\n\nexport default CourseCurriculum;\n","const Course = {\n\theartbeat: function( context ) {\n\t\tLP.Request( {\n\t\t\ttype: 'heartbeat',\n\t\t} ).then(\n\t\t\tfunction( response ) {\n\t\t\t\tvar result = response.body;\n\t\t\t\tcontext.commit( 'UPDATE_HEART_BEAT', !! result.success );\n\t\t\t},\n\t\t\tfunction( error ) {\n\t\t\t\tcontext.commit( 'UPDATE_HEART_BEAT', false );\n\t\t\t}\n\t\t);\n\t},\n\n\tdraftCourse: function( context, payload ) {\n\t\tvar auto_draft = context.getters.autoDraft;\n\n\t\tif ( auto_draft ) {\n\t\t\tLP.Request( {\n\t\t\t\ttype: 'draft-course',\n\t\t\t\tcourse: JSON.stringify( payload ),\n\t\t\t} ).then( function( response ) {\n\t\t\t\tvar result = response.body;\n\n\t\t\t\tif ( ! result.success ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tcontext.commit( 'UPDATE_AUTO_DRAFT_STATUS', false );\n\t\t\t}\n\t\t\t);\n\t\t}\n\t},\n\n\tnewRequest: function( context ) {\n\t\tcontext.commit( 'INCREASE_NUMBER_REQUEST' );\n\t\tcontext.commit( 'UPDATE_STATUS', 'loading' );\n\n\t\twindow.onbeforeunload = function() {\n\t\t\treturn '';\n\t\t};\n\t},\n\n\trequestCompleted: function( context, status ) {\n\t\tcontext.commit( 'DECREASE_NUMBER_REQUEST' );\n\n\t\tif ( context.getters.currentRequest === 0 ) {\n\t\t\tcontext.commit( 'UPDATE_STATUS', status );\n\t\t\twindow.onbeforeunload = null;\n\t\t}\n\t},\n};\n\nexport default Course;\n","const ModalCourseItems = {\n\n\ttoggle: function( context ) {\n\t\tcontext.commit( 'TOGGLE' );\n\t},\n\n\topen: function( context, sectionId ) {\n\t\tcontext.commit( 'SET_SECTION', sectionId );\n\t\tcontext.commit( 'RESET' );\n\t\tcontext.commit( 'TOGGLE' );\n\t},\n\n\tsearchItems: function( context, payload ) {\n\t\tcontext.commit( 'SEARCH_ITEMS_REQUEST' );\n\n\t\tLP.Request( {\n\t\t\ttype: 'search-items',\n\t\t\tquery: payload.query,\n\t\t\titem_type: payload.type,\n\t\t\tpage: payload.page,\n\t\t\texclude: JSON.stringify( [] ),\n\t\t} ).then(\n\t\t\tfunction( response ) {\n\t\t\t\tvar result = response.body;\n\n\t\t\t\tif ( ! result.success ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tvar data = result.data;\n\n\t\t\t\tcontext.commit( 'SET_LIST_ITEMS', data.items );\n\t\t\t\tcontext.commit( 'UPDATE_PAGINATION', data.pagination );\n\t\t\t\tcontext.commit( 'SEARCH_ITEMS_SUCCESS' );\n\t\t\t},\n\t\t\tfunction( error ) {\n\t\t\t\tcontext.commit( 'SEARCH_ITEMS_FAILURE' );\n\n\t\t\t\tconsole.error( error );\n\t\t\t}\n\t\t);\n\t},\n\n\taddItem: function( context, item ) {\n\t\tcontext.commit( 'ADD_ITEM', item );\n\t},\n\n\tremoveItem: function( context, index ) {\n\t\tcontext.commit( 'REMOVE_ADDED_ITEM', index );\n\t},\n\n\taddItemsToSection: function( context ) {\n\t\tvar items = context.getters.addedItems;\n\n\t\tif ( items.length > 0 ) {\n\t\t\tLP.Request( {\n\t\t\t\ttype: 'add-items-to-section',\n\t\t\t\tsection_id: context.getters.section,\n\t\t\t\titems: JSON.stringify( items ),\n\t\t\t} ).then(\n\t\t\t\tfunction( response ) {\n\t\t\t\t\tvar result = response.body;\n\n\t\t\t\t\tif ( result.success ) {\n\t\t\t\t\t\tcontext.commit( 'TOGGLE' );\n\n\t\t\t\t\t\tvar items = result.data;\n\t\t\t\t\t\tcontext.commit( 'ss/UPDATE_SECTION_ITEMS', {\n\t\t\t\t\t\t\tsection_id: context.getters.section,\n\t\t\t\t\t\t\titems: items,\n\t\t\t\t\t\t}, { root: true } );\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\tfunction( error ) {\n\t\t\t\t\tconsole.error( error );\n\t\t\t\t}\n\t\t\t);\n\t\t}\n\t},\n};\n\nexport default ModalCourseItems;\n","const CourseCurriculum = {\n\tsections: function( state ) {\n\t\treturn state.sections || [];\n\t},\n\turlEdit: function( state ) {\n\t\treturn state.urlEdit;\n\t},\n\thiddenSections: function( state ) {\n\t\treturn state.sections\n\t\t\t.filter( function( section ) {\n\t\t\t\treturn ! section.open;\n\t\t\t} )\n\t\t\t.map( function( section ) {\n\t\t\t\treturn parseInt( section.id );\n\t\t\t} );\n\t},\n\tisHiddenAllSections: function( state, getters ) {\n\t\tvar sections = getters.sections;\n\t\tvar hiddenSections = getters.hiddenSections;\n\n\t\treturn hiddenSections.length === sections.length;\n\t},\n\tstatusUpdateSection: function( state ) {\n\t\treturn state.statusUpdateSection;\n\t},\n\tstatusUpdateSectionItem: function( state ) {\n\t\treturn state.statusUpdateSectionItem;\n\t},\n};\n\nexport default CourseCurriculum;\n","const Course = {\n\theartbeat: function( state ) {\n\t\treturn state.heartbeat;\n\t},\n\taction: function( state ) {\n\t\treturn state.action;\n\t},\n\tid: function( state ) {\n\t\treturn state.course_id;\n\t},\n\tautoDraft: function( state ) {\n\t\treturn state.auto_draft;\n\t},\n\tdisable_curriculum: function( state ) {\n\t\treturn state.disable_curriculum;\n\t},\n\tstatus: function( state ) {\n\t\treturn state.status || 'error';\n\t},\n\tcurrentRequest: function( state ) {\n\t\treturn state.countCurrentRequest || 0;\n\t},\n\turlAjax: function( state ) {\n\t\treturn state.ajax;\n\t},\n\tnonce: function( state ) {\n\t\treturn state.nonce;\n\t},\n};\n\nexport default Course;\n","\nconst Getters = {\n\tstatus: function( state ) {\n\t\treturn state.status;\n\t},\n\tpagination: function( state ) {\n\t\treturn state.pagination;\n\t},\n\titems: function( state, _getters ) {\n\t\treturn state.items.map( function( item ) {\n\t\t\tvar find = _getters.addedItems.find( function( _item ) {\n\t\t\t\treturn item.id === _item.id;\n\t\t\t} );\n\n\t\t\titem.added = !! find;\n\n\t\t\treturn item;\n\t\t} );\n\t},\n\taddedItems: function( state ) {\n\t\treturn state.addedItems;\n\t},\n\tisOpen: function( state ) {\n\t\treturn state.open;\n\t},\n\ttypes: function( state ) {\n\t\treturn state.types;\n\t},\n\tsection: function( state ) {\n\t\treturn state.sectionId;\n\t},\n};\n\nexport default Getters;\n","export default function HTTP( options ) {\n\tconst $ = window.jQuery || jQuery;\n\tconst $VueHTTP = Vue.http;\n\n\toptions = $.extend( {\n\t\tns: 'LPRequest',\n\t\tstore: false,\n\t}, options || {} );\n\n\tlet $publishingAction = null;\n\n\tLP.Request = function( payload ) {\n\t\t$publishingAction = $( '#publishing-action' );\n\n\t\tpayload.id = options.store.getters.id;\n\t\tpayload.nonce = options.store.getters.nonce;\n\t\tpayload[ 'lp-ajax' ] = options.store.getters.action;\n\t\tpayload.code = options.store.getters.code;\n\n\t\t$publishingAction.find( '#publish' ).addClass( 'disabled' );\n\t\t$publishingAction.find( '.spinner' ).addClass( 'is-active' );\n\t\t$publishingAction.addClass( 'code-' + payload.code );\n\n\t\treturn $VueHTTP.post( options.store.getters.urlAjax,\n\t\t\tpayload,\n\t\t\t{\n\t\t\t\temulateJSON: true,\n\t\t\t\tparams: {\n\t\t\t\t\tnamespace: options.ns,\n\t\t\t\t\tcode: payload.code,\n\t\t\t\t},\n\t\t\t} );\n\t};\n\n\t$VueHTTP.interceptors.push( function( request, next ) {\n\t\tif ( request.params.namespace !== options.ns ) {\n\t\t\tnext();\n\t\t\treturn;\n\t\t}\n\n\t\toptions.store.dispatch( 'newRequest' );\n\n\t\tnext( function( response ) {\n\t\t\tif ( ! jQuery.isPlainObject( response.body ) ) {\n\t\t\t\tresponse.body = LP.parseJSON( response.body );\n\t\t\t}\n\n\t\t\tconst body = response.body;\n\t\t\tconst result = body.success || false;\n\n\t\t\tif ( result ) {\n\t\t\t\toptions.store.dispatch( 'requestCompleted', 'successful' );\n\t\t\t} else {\n\t\t\t\toptions.store.dispatch( 'requestCompleted', 'failed' );\n\t\t\t}\n\n\t\t\t$publishingAction.removeClass( 'code-' + request.params.code );\n\n\t\t\tif ( ! $publishingAction.attr( 'class' ) ) {\n\t\t\t\t$publishingAction.find( '#publish' ).removeClass( 'disabled' );\n\t\t\t\t$publishingAction.find( '.spinner' ).removeClass( 'is-active' );\n\t\t\t}\n\t\t} );\n\t} );\n}\n","const CourseCurriculum = {\n\tSORT_SECTION( state, orders ) {\n\t\tstate.sections = state.sections.map( function( section ) {\n\t\t\tsection.order = orders[ section.id ];\n\n\t\t\treturn section;\n\t\t} );\n\t},\n\tSET_SECTIONS( state, sections ) {\n\t\tstate.sections = sections;\n\t},\n\tADD_NEW_SECTION( state, newSection ) {\n\t\tif ( newSection.open === undefined ) {\n\t\t\tnewSection.open = true;\n\t\t}\n\t\tlet pos;\n\n\t\tif ( newSection.temp_id ) {\n\t\t\tstate.sections.map( function( section, i ) {\n\t\t\t\tif ( newSection.temp_id == section.id ) {\n\t\t\t\t\tpos = i;\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t} );\n\t\t}\n\n\t\tif ( pos !== undefined ) {\n\t\t\t$Vue.set( state.sections, pos, newSection );\n\t\t} else {\n\t\t\tstate.sections.push( newSection );\n\t\t}\n\t},\n\tADD_EMPTY_SECTION( state, section ) {\n\t\tsection.open = true;\n\t\tstate.sections.push( section );\n\t},\n\tREMOVE_SECTION( state, index ) {\n\t\tstate.sections.splice( index, 1 );\n\t},\n\tREMOVE_SECTION_ITEM( state, payload ) {\n\t\tconst section = state.sections.find( function( section ) {\n\t\t\treturn ( section.id === payload.section_id );\n\t\t} );\n\n\t\tlet items = section.items || [],\n\t\t\titem = payload.item,\n\t\t\tindex = -1;\n\t\titems.forEach( function( it, i ) {\n\t\t\tif ( it.id === item.id ) {\n\t\t\t\tindex = i;\n\t\t\t}\n\t\t} );\n\n\t\tif ( index !== -1 ) {\n\t\t\tif ( payload.oldId !== undefined ) {\n\t\t\t\titems[ index ].id = payload.oldId;\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ( item.temp_id ) {\n\t\t\t\titems[ index ].id = item.temp_id;\n\t\t\t} else {\n\t\t\t\titems.splice( index, 1 );\n\t\t\t}\n\t\t}\n\t},\n\tUPDATE_SECTION_ITEMS( state, payload ) {\n\t\tconst section = state.sections.find( function( section ) {\n\t\t\treturn parseInt( section.id ) === parseInt( payload.section_id );\n\t\t} );\n\n\t\tif ( ! section ) {\n\t\t\treturn;\n\t\t}\n\t\tsection.items = payload.items;\n\t},\n\tUPDATE_SECTION_ITEM( state, payload ) {\n\n\t},\n\n\tCLOSE_SECTION( state, section ) {\n\t\tstate.sections.forEach( function( _section, index ) {\n\t\t\tif ( section.id === _section.id ) {\n\t\t\t\tstate.sections[ index ].open = false;\n\t\t\t}\n\t\t} );\n\t},\n\n\tOPEN_SECTION( state, section ) {\n\t\tstate.sections.forEach( function( _section, index ) {\n\t\t\tif ( section.id === _section.id ) {\n\t\t\t\tstate.sections[ index ].open = true;\n\t\t\t}\n\t\t} );\n\t},\n\n\tOPEN_ALL_SECTIONS( state ) {\n\t\tstate.sections = state.sections.map( function( _section ) {\n\t\t\t_section.open = true;\n\n\t\t\treturn _section;\n\t\t} );\n\t},\n\n\tCLOSE_ALL_SECTIONS( state ) {\n\t\tstate.sections = state.sections.map( function( _section ) {\n\t\t\t_section.open = false;\n\n\t\t\treturn _section;\n\t\t} );\n\t},\n\n\tUPDATE_SECTION_REQUEST( state, sectionId ) {\n\t\t$Vue.set( state.statusUpdateSection, sectionId, 'updating' );\n\t},\n\n\tUPDATE_SECTION_SUCCESS( state, sectionId ) {\n\t\t$Vue.set( state.statusUpdateSection, sectionId, 'successful' );\n\t},\n\n\tUPDATE_SECTION_FAILURE( state, sectionId ) {\n\t\t$Vue.set( state.statusUpdateSection, sectionId, 'failed' );\n\t},\n\n\tUPDATE_SECTION_ITEM_REQUEST( state, itemId ) {\n\t\t$Vue.set( state.statusUpdateSectionItem, itemId, 'updating' );\n\t},\n\n\tUPDATE_SECTION_ITEM_SUCCESS( state, itemId ) {\n\t\t$Vue.set( state.statusUpdateSectionItem, itemId, 'successful' );\n\t},\n\n\tUPDATE_SECTION_ITEM_FAILURE( state, itemId ) {\n\t\t$Vue.set( state.statusUpdateSectionItem, itemId, 'failed' );\n\t},\n\tAPPEND_EMPTY_ITEM_TO_SECTION( state, data ) {\n\t\tconst section = state.sections.find( function( section ) {\n\t\t\treturn parseInt( section.id ) === parseInt( data.section_id );\n\t\t} );\n\n\t\tif ( ! section ) {\n\t\t\treturn;\n\t\t}\n\n\t\tsection.items.push( { id: data.item.id, title: data.item.title, type: 'empty-item' } );\n\t},\n\tUPDATE_ITEM_SECTION_BY_ID( state, data ) {\n\t\tconst section = state.sections.find( function( section ) {\n\t\t\treturn parseInt( section.id ) === parseInt( data.section_id );\n\t\t} );\n\n\t\tif ( ! section ) {\n\t\t\treturn;\n\t\t}\n\n\t\tfor ( let i = 0; i < section.items.length; i++ ) {\n\t\t\ttry {\n\t\t\t\tif ( ! section.items[ i ] ) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tconst item_id = section.items[ i ].id;\n\n\t\t\t\tif ( item_id ) {\n\t\t\t\t\tif ( data.items[ item_id ] ) {\n\t\t\t\t\t\t$Vue.set( section.items, i, data.items[ item_id ] );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} catch ( ex ) {\n\t\t\t\tconsole.log( ex );\n\t\t\t}\n\t\t}\n\n\t\t//section.items.push({id: data.item.id, title: data.item.title, type: 'empty-item'});\n\t},\n};\n\nexport default CourseCurriculum;\n","const Course = {\n\n\tUPDATE_HEART_BEAT: function( state, status ) {\n\t\tstate.heartbeat = !! status;\n\t},\n\n\tUPDATE_AUTO_DRAFT_STATUS: function( state, status ) {\n\t\tstate.auto_draft = status;\n\t},\n\n\tUPDATE_STATUS: function( state, status ) {\n\t\tstate.status = status;\n\t},\n\n\tINCREASE_NUMBER_REQUEST: function( state ) {\n\t\tstate.countCurrentRequest++;\n\t},\n\n\tDECREASE_NUMBER_REQUEST: function( state ) {\n\t\tstate.countCurrentRequest--;\n\t},\n};\n\nexport default Course;\n","const Mutations = {\n\tTOGGLE: function( state ) {\n\t\tstate.open = ! state.open;\n\t},\n\tSET_SECTION: function( state, sectionId ) {\n\t\tstate.sectionId = sectionId;\n\t},\n\tSET_LIST_ITEMS: function( state, items ) {\n\t\tstate.items = items;\n\t},\n\tADD_ITEM: function( state, item ) {\n\t\tstate.addedItems.push( item );\n\t},\n\tREMOVE_ADDED_ITEM: function( state, item ) {\n\t\tstate.addedItems.forEach( function( _item, index ) {\n\t\t\tif ( _item.id === item.id ) {\n\t\t\t\tstate.addedItems.splice( index, 1 );\n\t\t\t}\n\t\t} );\n\t},\n\tRESET: function( state ) {\n\t\tstate.addedItems = [];\n\t\tstate.items = [];\n\t},\n\tUPDATE_PAGINATION: function( state, pagination ) {\n\t\tstate.pagination = pagination;\n\t},\n\tSEARCH_ITEMS_REQUEST: function( state ) {\n\t\tstate.status = 'loading';\n\t},\n\tSEARCH_ITEMS_SUCCESS: function( state ) {\n\t\tstate.status = 'successful';\n\t},\n\tSEARCH_ITEMS_FAILURE: function( state ) {\n\t\tstate.status = 'failed';\n\t},\n};\n\nexport default Mutations;\n","import Actions from '../actions/course-section';\nimport Mutations from '../mutations/course-section';\nimport Getters from '../getters/course-section';\n\nconst $ = window.jQuery;\n\nexport default function( data ) {\n\tvar state = $.extend( {}, data.sections );\n\n\tstate.statusUpdateSection = {};\n\tstate.statusUpdateSectionItem = {};\n\n\tstate.sections = state.sections.map( function( section ) {\n\t\tvar hiddenSections = state.hidden_sections;\n\n\t\tvar find = hiddenSections.find( function( sectionId ) {\n\t\t\treturn parseInt( section.id ) === parseInt( sectionId );\n\t\t} );\n\n\t\tsection.open = ! find;\n\n\t\treturn section;\n\t} );\n\n\treturn {\n\t\tnamespaced: true,\n\t\tstate: state,\n\t\tgetters: Getters,\n\t\tmutations: Mutations,\n\t\tactions: Actions,\n\t};\n}\n","import ModalCourseItems from '../store/modal-course-items';\nimport CourseSection from '../store/course-section';\nimport i18n from '../store/i18n';\nimport getters from '../getters/course';\nimport mutations from '../mutations/course';\nimport actions from '../actions/course';\n\nconst $ = window.jQuery;\n\nconst Course = function Course( data ) {\n\tvar state = $.extend( {}, data.root );\n\n\tstate.status = 'success';\n\tstate.heartbeat = true;\n\tstate.countCurrentRequest = 0;\n\n\treturn {\n\t\tstate: state,\n\t\tgetters: getters,\n\t\tmutations: mutations,\n\t\tactions: actions,\n\t\tmodules: {\n\t\t\tci: ModalCourseItems( data ),\n\t\t\ti18n: i18n( data.i18n ),\n\t\t\tss: CourseSection( data ),\n\t\t},\n\t};\n};\n\nexport default Course;\n","const $ = window.jQuery || jQuery;\n\nconst i18n = function i18n( i18n ) {\n\tconst state = $.extend( {}, i18n );\n\tconst getters = {\n\t\tall: function( state ) {\n\t\t\treturn state;\n\t\t},\n\t};\n\n\treturn {\n\t\tnamespaced: true,\n\t\tstate: state,\n\t\tgetters: getters,\n\t};\n};\n\nexport default i18n;\n","import getters from '../getters/modal-course-items';\nimport mutations from '../mutations/modal-course-items';\nimport actions from '../actions/modal-course-items';\n\nconst $ = window.jQuery || jQuery;\n\nexport default function( data ) {\n\tvar state = $.extend( {}, data.chooseItems );\n\tstate.sectionId = false;\n\tstate.pagination = '';\n\tstate.status = '';\n\n\treturn {\n\t\tnamespaced: true,\n\t\tstate: state,\n\t\tgetters: getters,\n\t\tmutations: mutations,\n\t\tactions: actions,\n\t};\n}\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// define getter functions for harmony exports\n__webpack_require__.d = function(exports, definition) {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }","// define __esModule on exports\n__webpack_require__.r = function(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};","import HTTP from './http';\nimport CourseStore from './store/course';\n\nwindow.$Vue = window.$Vue || Vue;\nwindow.$Vuex = window.$Vuex || Vuex;\n\nconst $ = window.jQuery;\n\n/**\n * Init app.\n *\n * @since 3.0.0\n */\n$( document ).ready( function() {\n\twindow.LP_Curriculum_Store = new $Vuex.Store( CourseStore( lpAdminCourseEditorSettings ) );\n\tHTTP( { ns: 'LPCurriculumRequest', store: LP_Curriculum_Store } );\n\n\tsetTimeout( () => {\n\t\twindow.LP_Course_Editor = new $Vue( {\n\t\t\tel: '#admin-editor-lp_course',\n\t\t\ttemplate: '<lp-course-editor></lp-course-editor>',\n\t\t} );\n\t}, 100 );\n} );\n"],"names":["$","window","jQuery","CourseCurriculum","toggleAllSections","context","hidden","getters","isHiddenAllSections","commit","LP","Request","type","hiddenSections","updateSectionsOrder","order","JSON","stringify","then","response","result","body","order_sections","data","error","console","toggleSection","section","open","updateSection","id","catch","removeSection","payload","index","section_id","newSection","name","section_name","temp_id","uniqueId","items","title","success","extend","updateSectionItem","item","removeSectionItem","item_id","rs","alert","oldId","deleteSectionItem","newSectionItem","each","i","a","old_id","updateSectionItems","state","last_section","sections","length","Course","heartbeat","draftCourse","auto_draft","autoDraft","course","newRequest","onbeforeunload","requestCompleted","status","currentRequest","ModalCourseItems","toggle","sectionId","searchItems","query","item_type","page","exclude","pagination","addItem","removeItem","addItemsToSection","addedItems","root","urlEdit","filter","map","parseInt","statusUpdateSection","statusUpdateSectionItem","action","course_id","disable_curriculum","countCurrentRequest","urlAjax","ajax","nonce","Getters","_getters","find","_item","added","isOpen","types","HTTP","options","$VueHTTP","Vue","http","ns","store","$publishingAction","code","addClass","post","emulateJSON","params","namespace","interceptors","push","request","next","dispatch","isPlainObject","parseJSON","removeClass","attr","SORT_SECTION","orders","SET_SECTIONS","ADD_NEW_SECTION","undefined","pos","$Vue","set","ADD_EMPTY_SECTION","REMOVE_SECTION","splice","REMOVE_SECTION_ITEM","forEach","it","UPDATE_SECTION_ITEMS","UPDATE_SECTION_ITEM","CLOSE_SECTION","_section","OPEN_SECTION","OPEN_ALL_SECTIONS","CLOSE_ALL_SECTIONS","UPDATE_SECTION_REQUEST","UPDATE_SECTION_SUCCESS","UPDATE_SECTION_FAILURE","UPDATE_SECTION_ITEM_REQUEST","itemId","UPDATE_SECTION_ITEM_SUCCESS","UPDATE_SECTION_ITEM_FAILURE","APPEND_EMPTY_ITEM_TO_SECTION","UPDATE_ITEM_SECTION_BY_ID","ex","log","UPDATE_HEART_BEAT","UPDATE_AUTO_DRAFT_STATUS","UPDATE_STATUS","INCREASE_NUMBER_REQUEST","DECREASE_NUMBER_REQUEST","Mutations","TOGGLE","SET_SECTION","SET_LIST_ITEMS","ADD_ITEM","REMOVE_ADDED_ITEM","RESET","UPDATE_PAGINATION","SEARCH_ITEMS_REQUEST","SEARCH_ITEMS_SUCCESS","SEARCH_ITEMS_FAILURE","Actions","hidden_sections","namespaced","mutations","actions","CourseSection","i18n","modules","ci","ss","all","chooseItems","CourseStore","$Vuex","Vuex","document","ready","LP_Curriculum_Store","Store","lpAdminCourseEditorSettings","setTimeout","LP_Course_Editor","el","template"],"sourceRoot":""}
assets/js/dist/admin/editor/course.min.asset.php ADDED
@@ -0,0 +1 @@
 
1
+ <?php return array('dependencies' => array(), 'version' => '863b124d4d9edcd94a9d');
assets/js/dist/admin/editor/question.asset.php ADDED
@@ -0,0 +1 @@
 
1
+ <?php return array('dependencies' => array(), 'version' => 'f4735390dfde84120897');
assets/js/dist/admin/editor/question.js.map ADDED
@@ -0,0 +1 @@
 
1
+ {"version":3,"file":"./assets/js/dist/admin/editor/question.js","mappings":";;;;;;;;;;;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ACA;AACA;;AACAhD,CAAC,CAAEQ,QAAF,CAAD,CAAckC,KAAd,CAAqB,YAAW;AAC/B/C,EAAAA,MAAM,CAACqH,iBAAP,GAA2B,IAAIF,KAAK,CAACF,KAAV,CAAiBA,2DAAK,CAAEK,kBAAF,CAAtB,CAA3B;AAEAzC,EAAAA,iDAAI,CAAE;AAAEM,IAAAA,EAAE,EAAE,yBAAN;AAAiCC,IAAAA,KAAK,EAAEiC;AAAxC,GAAF,CAAJ;AAEAE,EAAAA,UAAU,CAAE,MAAM;AACjB,QAAKlH,CAAC,CAAE,2BAAF,CAAD,CAAiCyB,MAAtC,EAA+C;AAC9C9B,MAAAA,MAAM,CAACwH,kBAAP,GAA4B,IAAIN,IAAJ,CAAU;AACrCO,QAAAA,EAAE,EAAE,2BADiC;AAErCC,QAAAA,QAAQ,EAAE;AAF2B,OAAV,CAA5B;AAIA;AACD,GAPS,EAOP,GAPO,CAAV;AAQA,CAbD,E","sources":["webpack://learnpress/./assets/src/apps/js/admin/editor/actions/question.js","webpack://learnpress/./assets/src/apps/js/admin/editor/fill-in-blanks.js","webpack://learnpress/./assets/src/apps/js/admin/editor/getters/question.js","webpack://learnpress/./assets/src/apps/js/admin/editor/http.js","webpack://learnpress/./assets/src/apps/js/admin/editor/mutations/question.js","webpack://learnpress/./assets/src/apps/js/admin/editor/store/question.js","webpack://learnpress/webpack/bootstrap","webpack://learnpress/webpack/runtime/compat get default export","webpack://learnpress/webpack/runtime/define property getters","webpack://learnpress/webpack/runtime/hasOwnProperty shorthand","webpack://learnpress/webpack/runtime/make namespace object","webpack://learnpress/./assets/src/apps/js/admin/editor/question.js"],"sourcesContent":["const Question = {\n\tchangeQuestionType( context, payload ) {\n\t\tconst draftQuestion = undefined !== payload.question ? payload.question : '';\n\n\t\tLP.Request( {\n\t\t\ttype: 'change-question-type',\n\t\t\tquestion_type: payload.type,\n\t\t\tdraft_question: context.getters.autoDraft ? draftQuestion : '',\n\t\t} ).then( function( response ) {\n\t\t\tconst result = response.body;\n\n\t\t\tif ( result.success ) {\n\t\t\t\tcontext.commit( 'UPDATE_AUTO_DRAFT_STATUS', false );\n\t\t\t\tcontext.commit( 'CHANGE_QUESTION_TYPE', result.data );\n\t\t\t}\n\t\t} );\n\t},\n\n\tupdateAnswersOrder( context, order ) {\n\t\tLP.Request( {\n\t\t\ttype: 'sort-answer',\n\t\t\torder,\n\t\t} ).then(\n\t\t\tfunction( response ) {\n\t\t\t\tconst result = response.body;\n\t\t\t\tif ( result.success ) {\n\t\t\t\t\t// context.commit('SET_ANSWERS', result.data);\n\t\t\t\t}\n\t\t\t}\n\t\t);\n\t},\n\n\tupdateAnswerTitle( context, answer ) {\n\t\tif ( typeof answer.question_answer_id == 'undefined' ) {\n\t\t\treturn;\n\t\t}\n\n\t\tanswer = JSON.stringify( answer );\n\n\t\tLP.Request( {\n\t\t\ttype: 'update-answer-title',\n\t\t\tanswer,\n\t\t} );\n\t},\n\n\tupdateCorrectAnswer( context, correct ) {\n\t\tLP.Request( {\n\t\t\ttype: 'change-correct',\n\t\t\tcorrect: JSON.stringify( correct ),\n\t\t} ).then(\n\t\t\tfunction( response ) {\n\t\t\t\tconst result = response.body;\n\t\t\t\tif ( result.success ) {\n\t\t\t\t\tcontext.commit( 'UPDATE_ANSWERS', result.data );\n\t\t\t\t\tcontext.commit( 'UPDATE_AUTO_DRAFT_STATUS', false );\n\t\t\t\t}\n\t\t\t}\n\t\t);\n\t},\n\n\tdeleteAnswer( context, payload ) {\n\t\tcontext.commit( 'DELETE_ANSWER', payload.id );\n\t\tLP.Request( {\n\t\t\ttype: 'delete-answer',\n\t\t\tanswer_id: payload.id,\n\t\t} ).then(\n\t\t\tfunction( response ) {\n\t\t\t\tconst result = response.body;\n\n\t\t\t\tif ( result.success ) {\n\t\t\t\t\tcontext.commit( 'SET_ANSWERS', result.data );\n\t\t\t\t} else {\n\t\t\t\t\t// notice error\n\t\t\t\t}\n\t\t\t} );\n\t},\n\n\tnewAnswer( context, data ) {\n\t\tcontext.commit( 'ADD_NEW_ANSWER', data.answer );\n\t\tLP.Request( {\n\t\t\ttype: 'new-answer',\n\t\t} ).then(\n\t\t\tfunction( response ) {\n\t\t\t\tconst result = response.body;\n\n\t\t\t\tif ( result.success ) {\n\t\t\t\t\tcontext.commit( 'UPDATE_ANSWERS', result.data );\n\t\t\t\t} else {\n\t\t\t\t\t// notice error\n\t\t\t\t}\n\t\t\t} );\n\t},\n\n\tnewRequest( context ) {\n\t\tcontext.commit( 'INCREASE_NUMBER_REQUEST' );\n\t\tcontext.commit( 'UPDATE_STATUS', 'loading' );\n\n\t\twindow.onbeforeunload = function() {\n\t\t\treturn '';\n\t\t};\n\t},\n\n\trequestCompleted( context, status ) {\n\t\tcontext.commit( 'DECREASE_NUMBER_REQUEST' );\n\n\t\tif ( context.getters.currentRequest === 0 ) {\n\t\t\tcontext.commit( 'UPDATE_STATUS', status );\n\t\t\twindow.onbeforeunload = null;\n\t\t}\n\t},\n};\n\nexport default Question;\n","( function( $ ) {\n\twindow.FIB = {\n\n\t\tgetSelectedText: function getSelectedText() {\n\t\t\tlet html = '';\n\t\t\tif ( typeof window.getSelection !== 'undefined' ) {\n\t\t\t\tconst sel = window.getSelection();\n\t\t\t\tif ( sel.rangeCount ) {\n\t\t\t\t\tconst container = document.createElement( 'div' );\n\t\t\t\t\tfor ( let i = 0, len = sel.rangeCount; i < len; ++i ) {\n\t\t\t\t\t\tcontainer.appendChild( sel.getRangeAt( i ).cloneContents() );\n\t\t\t\t\t}\n\t\t\t\t\thtml = container.innerHTML;\n\t\t\t\t}\n\t\t\t} else if ( typeof document.selection !== 'undefined' ) {\n\t\t\t\tif ( document.selection.type === 'Text' ) {\n\t\t\t\t\thtml = document.selection.createRange().htmlText;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn html;\n\t\t},\n\n\t\tcreateTextNode( content ) {\n\t\t\treturn document.createTextNode( content );\n\t\t},\n\n\t\tisContainHtml: function isContainHtml( content ) {\n\t\t\tconst $el = $( content ),\n\t\t\t\tsel = 'b.fib-blank';\n\t\t\treturn $el.is( sel ) || $el.find( sel ).length || $el.parent().is( sel );\n\t\t},\n\n\t\tgetSelectionRange: function getSelectionRange() {\n\t\t\tlet t = '';\n\t\t\tif ( window.getSelection ) {\n\t\t\t\tt = window.getSelection();\n\t\t\t} else if ( document.getSelection ) {\n\t\t\t\tt = document.getSelection();\n\t\t\t} else if ( document.selection ) {\n\t\t\t\tt = document.selection.createRange().text;\n\t\t\t}\n\t\t\treturn t;\n\t\t},\n\n\t\touterHTML( $dom ) {\n\t\t\treturn $( '<div>' ).append( $( $dom ).clone() ).html();\n\t\t},\n\n\t\tdoUpgrade( callback ) {\n\t\t\t$.ajax( {\n\t\t\t\turl: '',\n\t\t\t\tdata: {\n\t\t\t\t\t'lp-ajax': 'fib-upgrade',\n\t\t\t\t},\n\t\t\t\tsuccess( res ) {\n\t\t\t\t\tconsole.log( res );\n\t\t\t\t\tcallback && callback.call( res );\n\t\t\t\t},\n\t\t\t} );\n\t\t},\n\t};\n\n\t$( document ).ready( function() {\n\t\t$( '#do-upgrade-fib' ).on( 'click', function() {\n\t\t\tconst $button = $( this ).prop( 'disabled', true ).addClass( 'ajaxloading' );\n\t\t\tFIB.doUpgrade( function() {\n\t\t\t\t$button.prop( 'disabled', false ).removeClass( 'ajaxloading' );\n\t\t\t} );\n\t\t} );\n\t} );\n}( jQuery ) );\n","const Question = {\n\tid: function( state ) {\n\t\treturn state.id;\n\t},\n\ttype: function( state ) {\n\t\treturn state.type;\n\t},\n\tcode: function( state ) {\n\t\treturn Date.now();\n\t},\n\tautoDraft: function( state ) {\n\t\treturn state.auto_draft;\n\t},\n\tanswers: function( state ) {\n\t\treturn Object.values( state.answers ) || [];\n\t},\n\tsettings: function( state ) {\n\t\treturn state.setting;\n\t},\n\ttypes: function( state ) {\n\t\treturn state.questionTypes || [];\n\t},\n\tnumberCorrect: function( state ) {\n\t\tvar correct = 0;\n\t\tObject.keys( state.answers ).forEach( function( key ) {\n\t\t\tif ( state.answers[key].is_true === 'yes' ) {\n\t\t\t\tcorrect += 1;\n\t\t\t}\n\t\t} );\n\t\treturn correct;\n\t},\n\tstatus: function( state ) {\n\t\treturn state.status;\n\t},\n\tcurrentRequest: function( state ) {\n\t\treturn state.countCurrentRequest || 0;\n\t},\n\taction: function( state ) {\n\t\treturn state.action;\n\t},\n\tnonce: function( state ) {\n\t\treturn state.nonce;\n\t},\n\texternalComponent: function( state ) {\n\t\treturn state.externalComponent || [];\n\t},\n\tsupportAnswerOptions: function( state ) {\n\t\treturn state.supportAnswerOptions || [];\n\t},\n\tstate: function( state ) {\n\t\treturn state;\n\t},\n\ti18n: function( state ) {\n\t\treturn state.i18n;\n\t},\n};\n\nexport default Question;\n","export default function HTTP( options ) {\n\tconst $ = window.jQuery || jQuery;\n\tconst $VueHTTP = Vue.http;\n\n\toptions = $.extend( {\n\t\tns: 'LPRequest',\n\t\tstore: false,\n\t}, options || {} );\n\n\tlet $publishingAction = null;\n\n\tLP.Request = function( payload ) {\n\t\t$publishingAction = $( '#publishing-action' );\n\n\t\tpayload.id = options.store.getters.id;\n\t\tpayload.nonce = options.store.getters.nonce;\n\t\tpayload[ 'lp-ajax' ] = options.store.getters.action;\n\t\tpayload.code = options.store.getters.code;\n\n\t\t$publishingAction.find( '#publish' ).addClass( 'disabled' );\n\t\t$publishingAction.find( '.spinner' ).addClass( 'is-active' );\n\t\t$publishingAction.addClass( 'code-' + payload.code );\n\n\t\treturn $VueHTTP.post( options.store.getters.urlAjax,\n\t\t\tpayload,\n\t\t\t{\n\t\t\t\temulateJSON: true,\n\t\t\t\tparams: {\n\t\t\t\t\tnamespace: options.ns,\n\t\t\t\t\tcode: payload.code,\n\t\t\t\t},\n\t\t\t} );\n\t};\n\n\t$VueHTTP.interceptors.push( function( request, next ) {\n\t\tif ( request.params.namespace !== options.ns ) {\n\t\t\tnext();\n\t\t\treturn;\n\t\t}\n\n\t\toptions.store.dispatch( 'newRequest' );\n\n\t\tnext( function( response ) {\n\t\t\tif ( ! jQuery.isPlainObject( response.body ) ) {\n\t\t\t\tresponse.body = LP.parseJSON( response.body );\n\t\t\t}\n\n\t\t\tconst body = response.body;\n\t\t\tconst result = body.success || false;\n\n\t\t\tif ( result ) {\n\t\t\t\toptions.store.dispatch( 'requestCompleted', 'successful' );\n\t\t\t} else {\n\t\t\t\toptions.store.dispatch( 'requestCompleted', 'failed' );\n\t\t\t}\n\n\t\t\t$publishingAction.removeClass( 'code-' + request.params.code );\n\n\t\t\tif ( ! $publishingAction.attr( 'class' ) ) {\n\t\t\t\t$publishingAction.find( '#publish' ).removeClass( 'disabled' );\n\t\t\t\t$publishingAction.find( '.spinner' ).removeClass( 'is-active' );\n\t\t\t}\n\t\t} );\n\t} );\n}\n","const Question = {\n\n\tUPDATE_STATUS: function( state, status ) {\n\t\tstate.status = status;\n\t},\n\n\tUPDATE_AUTO_DRAFT_STATUS: function( state, status ) {\n\t\tstate.auto_draft = status;\n\t},\n\n\tCHANGE_QUESTION_TYPE: function( state, question ) {\n\t\tstate.answers = question.answers;\n\t\tstate.type = question.type;\n\t},\n\n\tSET_ANSWERS: function( state, answers ) {\n\t\tstate.answers = answers;\n\t},\n\n\tDELETE_ANSWER: function( state, id ) {\n\t\tfor ( var i = 0, n = state.answers.length; i < n; i++ ) {\n\t\t\tif ( state.answers[i].question_answer_id == id ) {\n\t\t\t\tstate.answers[i].question_answer_id = LP.uniqueId();\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t},\n\n\tADD_NEW_ANSWER: function( state, answer ) {\n\t\tstate.answers.push( answer );\n\t},\n\n\tUPDATE_ANSWERS: function( state, answers ) {\n\t\tstate.answers = answers;\n\t},\n\n\tINCREASE_NUMBER_REQUEST: function( state ) {\n\t\tstate.countCurrentRequest++;\n\t},\n\n\tDECREASE_NUMBER_REQUEST: function( state ) {\n\t\tstate.countCurrentRequest--;\n\t},\n};\n\nexport default Question;\n","import getters from '../getters/question';\nimport mutations from '../mutations/question';\nimport actions from '../actions/question';\n\nconst $ = window.jQuery || jQuery;\n\nconst Question = function Question( data ) {\n\tvar state = $.extend( {\n\t\tstatus: 'successful',\n\t\tcountCurrentRequest: 0,\n\t\ti18n: $.extend( {}, data.i18n ),\n\t}, data.root );\n\n\treturn {\n\t\tstate: state,\n\t\tgetters: getters,\n\t\tmutations: mutations,\n\t\tactions: actions,\n\t};\n};\n\nexport default Question;\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = function(module) {\n\tvar getter = module && module.__esModule ?\n\t\tfunction() { return module['default']; } :\n\t\tfunction() { return module; };\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = function(exports, definition) {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }","// define __esModule on exports\n__webpack_require__.r = function(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};","import HTTP from './http';\nimport Store from './store/question';\nimport './fill-in-blanks';\n\nwindow.$Vue = window.$Vue || Vue;\nwindow.$Vuex = window.$Vuex || Vuex;\n\nconst $ = window.jQuery;\n\n/**\n * Init app.\n *\n * @since 3.0.0\n */\n$( document ).ready( function() {\n\twindow.LP_Question_Store = new $Vuex.Store( Store( lp_question_editor ) );\n\n\tHTTP( { ns: 'LPQuestionEditorRequest', store: LP_Question_Store } );\n\n\tsetTimeout( () => {\n\t\tif ( $( '#admin-editor-lp_question' ).length ) {\n\t\t\twindow.LP_Question_Editor = new $Vue( {\n\t\t\t\tel: '#admin-editor-lp_question',\n\t\t\t\ttemplate: '<lp-question-editor></lp-question-editor>',\n\t\t\t} );\n\t\t}\n\t}, 100 );\n} );\n"],"names":["Question","changeQuestionType","context","payload","draftQuestion","undefined","question","LP","Request","type","question_type","draft_question","getters","autoDraft","then","response","result","body","success","commit","data","updateAnswersOrder","order","updateAnswerTitle","answer","question_answer_id","JSON","stringify","updateCorrectAnswer","correct","deleteAnswer","id","answer_id","newAnswer","newRequest","window","onbeforeunload","requestCompleted","status","currentRequest","$","FIB","getSelectedText","html","getSelection","sel","rangeCount","container","document","createElement","i","len","appendChild","getRangeAt","cloneContents","innerHTML","selection","createRange","htmlText","createTextNode","content","isContainHtml","$el","is","find","length","parent","getSelectionRange","t","text","outerHTML","$dom","append","clone","doUpgrade","callback","ajax","url","res","console","log","call","ready","on","$button","prop","addClass","removeClass","jQuery","state","code","Date","now","auto_draft","answers","Object","values","settings","setting","types","questionTypes","numberCorrect","keys","forEach","key","is_true","countCurrentRequest","action","nonce","externalComponent","supportAnswerOptions","i18n","HTTP","options","$VueHTTP","Vue","http","extend","ns","store","$publishingAction","post","urlAjax","emulateJSON","params","namespace","interceptors","push","request","next","dispatch","isPlainObject","parseJSON","attr","UPDATE_STATUS","UPDATE_AUTO_DRAFT_STATUS","CHANGE_QUESTION_TYPE","SET_ANSWERS","DELETE_ANSWER","n","uniqueId","ADD_NEW_ANSWER","UPDATE_ANSWERS","INCREASE_NUMBER_REQUEST","DECREASE_NUMBER_REQUEST","mutations","actions","root","Store","$Vue","$Vuex","Vuex","LP_Question_Store","lp_question_editor","setTimeout","LP_Question_Editor","el","template"],"sourceRoot":""}
assets/js/dist/admin/editor/question.min.asset.php ADDED
@@ -0,0 +1 @@
 
1
+ <?php return array('dependencies' => array(), 'version' => 'c5d10ff894dff82e8a84');
assets/js/dist/admin/editor/quiz.asset.php ADDED
@@ -0,0 +1 @@
 
1
+ <?php return array('dependencies' => array(), 'version' => '6fe4d906b7139998ca0d');
assets/js/dist/admin/editor/quiz.js.map ADDED
@@ -0,0 +1 @@
 
1
+ {"version":3,"file":"./assets/js/dist/admin/editor/quiz.js","mappings":";;;;;;;;;;;AAAA,MAAMA,cAAc,GAAG;AAEtBC,EAAAA,MAAM,EAAE,UAAUC,OAAV,EAAoB;AAC3BA,IAAAA,OAAO,CAACC,MAAR,CAAgB,QAAhB;AACA,GAJqB;AAMtB;AACAC,EAAAA,IAAI,EAAE,UAAUF,OAAV,EAAmBG,MAAnB,EAA4B;AACjCH,IAAAA,OAAO,CAACC,MAAR,CAAgB,UAAhB,EAA4BE,MAA5B;AACAH,IAAAA,OAAO,CAACC,MAAR,CAAgB,OAAhB;AACAD,IAAAA,OAAO,CAACC,MAAR,CAAgB,QAAhB;AACA,GAXqB;AAatB;AACAG,EAAAA,WAAW,EAAE,UAAUJ,OAAV,EAAmBK,OAAnB,EAA6B;AACzCL,IAAAA,OAAO,CAACC,MAAR,CAAgB,qBAAhB;AAEAK,IAAAA,EAAE,CAACC,OAAH,CAAY;AACXC,MAAAA,IAAI,EAAE,cADK;AAEXC,MAAAA,KAAK,EAAEJ,OAAO,CAACI,KAFJ;AAGXC,MAAAA,IAAI,EAAEL,OAAO,CAACK,IAHH;AAIXC,MAAAA,OAAO,EAAEC,IAAI,CAACC,SAAL,CAAgB,EAAhB;AAJE,KAAZ,EAKIC,IALJ,CAMC,UAAUC,QAAV,EAAqB;AACpB,UAAIC,MAAM,GAAGD,QAAQ,CAACE,IAAtB;;AAEA,UAAK,CAAED,MAAM,CAACE,OAAd,EAAwB;A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ACjB1C,IAAAA,MAAM,CAACwN,cAAP,GAAwB,IAAIlD,IAAJ,CAAU;AACjCmD,MAAAA,EAAE,EAAE,uBAD6B;AAEjCC,MAAAA,QAAQ,EAAE;AAFuB,KAAV,CAAxB;AAIA,GALS,EAKP,GALO,CAAV;AAMA,CAVD,E","sources":["webpack://learnpress/./assets/src/apps/js/admin/editor/actions/modal-quiz-items.js","webpack://learnpress/./assets/src/apps/js/admin/editor/actions/question-list.js","webpack://learnpress/./assets/src/apps/js/admin/editor/actions/quiz.js","webpack://learnpress/./assets/src/apps/js/admin/editor/fill-in-blanks.js","webpack://learnpress/./assets/src/apps/js/admin/editor/getters/modal-quiz-items.js","webpack://learnpress/./assets/src/apps/js/admin/editor/getters/question-list.js","webpack://learnpress/./assets/src/apps/js/admin/editor/getters/quiz.js","webpack://learnpress/./assets/src/apps/js/admin/editor/http.js","webpack://learnpress/./assets/src/apps/js/admin/editor/mutations/modal-quiz-items.js","webpack://learnpress/./assets/src/apps/js/admin/editor/mutations/question-list.js","webpack://learnpress/./assets/src/apps/js/admin/editor/mutations/quiz.js","webpack://learnpress/./assets/src/apps/js/admin/editor/store/i18n.js","webpack://learnpress/./assets/src/apps/js/admin/editor/store/modal-quiz-items.js","webpack://learnpress/./assets/src/apps/js/admin/editor/store/question-list.js","webpack://learnpress/./assets/src/apps/js/admin/editor/store/quiz.js","webpack://learnpress/webpack/bootstrap","webpack://learnpress/webpack/runtime/compat get default export","webpack://learnpress/webpack/runtime/define property getters","webpack://learnpress/webpack/runtime/hasOwnProperty shorthand","webpack://learnpress/webpack/runtime/make namespace object","webpack://learnpress/./assets/src/apps/js/admin/editor/quiz.js"],"sourcesContent":["const ModalQuizItems = {\n\n\ttoggle: function( context ) {\n\t\tcontext.commit( 'TOGGLE' );\n\t},\n\n\t// open modal\n\topen: function( context, quizId ) {\n\t\tcontext.commit( 'SET_QUIZ', quizId );\n\t\tcontext.commit( 'RESET' );\n\t\tcontext.commit( 'TOGGLE' );\n\t},\n\n\t// query available question\n\tsearchItems: function( context, payload ) {\n\t\tcontext.commit( 'SEARCH_ITEM_REQUEST' );\n\n\t\tLP.Request( {\n\t\t\ttype: 'search-items',\n\t\t\tquery: payload.query,\n\t\t\tpage: payload.page,\n\t\t\texclude: JSON.stringify( [] ),\n\t\t} ).then(\n\t\t\tfunction( response ) {\n\t\t\t\tvar result = response.body;\n\n\t\t\t\tif ( ! result.success ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tvar data = result.data;\n\n\t\t\t\tcontext.commit( 'SET_LIST_ITEMS', data.items );\n\t\t\t\tcontext.commit( 'UPDATE_PAGINATION', data.pagination );\n\t\t\t\tcontext.commit( 'SEARCH_ITEM_SUCCESS' );\n\t\t\t},\n\t\t\tfunction( error ) {\n\t\t\t\tcontext.commit( 'SEARCH_ITEMS_FAIL' );\n\n\t\t\t\tconsole.log( error );\n\t\t\t}\n\t\t);\n\t},\n\n\t// add question\n\taddItem: function( context, item ) {\n\t\tcontext.commit( 'ADD_ITEM', item );\n\t},\n\n\t// remove question\n\tremoveItem: function( context, index ) {\n\t\tcontext.commit( 'REMOVE_ADDED_ITEM', index );\n\t},\n\n\taddQuestionsToQuiz: function( context, quiz ) {\n\t\tvar items = context.getters.addedItems;\n\t\tif ( items.length > 0 ) {\n\t\t\tLP.Request( {\n\t\t\t\ttype: 'add-questions-to-quiz',\n\t\t\t\titems: JSON.stringify( items ),\n\t\t\t\tdraft_quiz: JSON.stringify( quiz ),\n\t\t\t} ).then(\n\t\t\t\tfunction( response ) {\n\t\t\t\t\tvar result = response.body;\n\n\t\t\t\t\tif ( result.success ) {\n\t\t\t\t\t\tvar questions = result.data;\n\n\t\t\t\t\t\t// update quiz list questions\n\t\t\t\t\t\tcontext.commit( 'lqs/SET_QUESTIONS', questions, { root: true } );\n\t\t\t\t\t\tcontext.commit( 'TOGGLE' );\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\tfunction( error ) {\n\t\t\t\t\tconsole.log( error );\n\t\t\t\t}\n\t\t\t);\n\t\t}\n\t},\n};\n\nexport default ModalQuizItems;\n","const $ = window.jQuery;\n\nconst QuestionList = {\n\n\ttoggleAll: function( context ) {\n\t\tvar hidden = context.getters.isHiddenListQuestions;\n\n\t\tif ( hidden ) {\n\t\t\tcontext.commit( 'OPEN_LIST_QUESTIONS' );\n\t\t} else {\n\t\t\tcontext.commit( 'CLOSE_LIST_QUESTIONS' );\n\t\t}\n\n\t\tLP.Request( {\n\t\t\ttype: 'hidden-questions',\n\t\t\thidden: context.getters.hiddenQuestions,\n\t\t} );\n\t},\n\n\tupdateQuizQuestionsHidden: function( context, data ) {\n\t\tLP.Request( $.extend( {}, data, {\n\t\t\ttype: 'update-quiz-questions-hidden',\n\t\t} ) );\n\t},\n\n\tnewQuestion: function( context, payload ) {\n\t\tvar newQuestion = JSON.parse( JSON.stringify( payload.question ) );\n\t\tnewQuestion.settings = {};\n\t\tcontext.commit( 'ADD_NEW_QUESTION', newQuestion );\n\n\t\tLP.Request( {\n\t\t\ttype: 'new-question',\n\t\t\tquestion: JSON.stringify( payload.question ),\n\t\t\tdraft_quiz: JSON.stringify( payload.quiz ),\n\t\t} ).then(\n\t\t\tfunction( response ) {\n\t\t\t\tvar result = response.body;\n\n\t\t\t\tif ( result.success ) {\n\t\t\t\t\tcontext.commit( 'UPDATE_NEW_QUESTION_TYPE', payload.question.type, { root: true } );\n\t\t\t\t\tcontext.commit( 'ADD_NEW_QUESTION', result.data );\n\t\t\t\t\tcontext.commit( 'CLOSE_LIST_QUESTIONS' );\n\t\t\t\t\tcontext.commit( 'OPEN_QUESTION', result.data );\n\t\t\t\t}\n\t\t\t},\n\t\t\tfunction( error ) {\n\t\t\t\tconsole.log( error );\n\t\t\t}\n\t\t);\n\t},\n\n\tupdateQuestionsOrder: function( context, order ) {\n\t\tLP.Request( {\n\t\t\ttype: 'sort-questions',\n\t\t\torder: JSON.stringify( order ),\n\t\t} ).then(\n\t\t\tfunction( response ) {\n\t\t\t\tcontext.commit( 'SORT_QUESTIONS', order );\n\t\t\t},\n\t\t\tfunction( error ) {\n\t\t\t\tconsole.log( error );\n\t\t\t}\n\t\t);\n\t},\n\n\tupdateQuestionTitle: function( context, question ) {\n\t\tcontext.commit( 'UPDATE_QUESTION_REQUEST', question.id );\n\n\t\tLP.Request( {\n\t\t\ttype: 'update-question-title',\n\t\t\tquestion: JSON.stringify( question ),\n\t\t} ).then(\n\t\t\tfunction() {\n\t\t\t\tcontext.commit( 'UPDATE_QUESTION_SUCCESS', question.id );\n\t\t\t}\n\t\t).catch(\n\t\t\tfunction() {\n\t\t\t\tcontext.commit( 'UPDATE_QUESTION_FAILURE', question.id );\n\t\t\t} );\n\t},\n\n\tchangeQuestionType: function( context, payload ) {\n\t\tcontext.commit( 'UPDATE_QUESTION_REQUEST', payload.question_id );\n\n\t\tLP.Request( {\n\t\t\ttype: 'change-question-type',\n\t\t\tquestion_id: payload.question_id,\n\t\t\tquestion_type: payload.type,\n\t\t} ).then( function( response ) {\n\t\t\tvar result = response.body;\n\n\t\t\tif ( result.success ) {\n\t\t\t\tvar question = result.data;\n\t\t\t\tcontext.commit( 'CHANGE_QUESTION_TYPE', question );\n\t\t\t\tcontext.commit( 'UPDATE_NEW_QUESTION_TYPE', question.type.key, { root: true } );\n\t\t\t\tcontext.commit( 'UPDATE_QUESTION_SUCCESS', payload.question_id );\n\t\t\t}\n\t\t} ).catch( function() {\n\t\t\tcontext.commit( 'UPDATE_QUESTION_FAILURE', payload.question_id );\n\t\t} );\n\t},\n\n\tisHiddenQuestionsSettings: function( context, id ) {\n\t},\n\n\tcloneQuestion: function( context, question ) {\n\t\tLP.Request( {\n\t\t\ttype: 'clone-question',\n\t\t\tquestion: JSON.stringify( question ),\n\t\t} ).then(\n\t\t\tfunction( response ) {\n\t\t\t\tvar result = response.body;\n\n\t\t\t\tif ( result.success ) {\n\t\t\t\t\tvar question = result.data;\n\n\t\t\t\t\tcontext.commit( 'ADD_NEW_QUESTION', result.data );\n\t\t\t\t\tcontext.commit( 'UPDATE_NEW_QUESTION_TYPE', question.type.key, { root: true } );\n\t\t\t\t}\n\t\t\t},\n\t\t\tfunction( error ) {\n\t\t\t\tconsole.log( error );\n\t\t\t}\n\t\t);\n\t},\n\n\tremoveQuestion: function( context, question ) {\n\t\tvar question_id = question.id;\n\t\tquestion.temp_id = LP.uniqueId();\n\t\tcontext.commit( 'REMOVE_QUESTION', question );\n\n\t\tLP.Request( {\n\t\t\ttype: 'remove-question',\n\t\t\tquestion_id: question_id,\n\t\t} ).then(\n\t\t\tfunction( response ) {\n\t\t\t\tvar result = response.body;\n\n\t\t\t\tif ( result.success ) {\n\t\t\t\t\tquestion.id = question.temp_id;\n\t\t\t\t\tquestion.temp_id = 0;\n\t\t\t\t\tcontext.commit( 'REMOVE_QUESTION', question );\n\t\t\t\t}\n\t\t\t},\n\t\t\tfunction( error ) {\n\t\t\t\tconsole.error( error );\n\t\t\t}\n\t\t);\n\t},\n\n\tdeleteQuestion: function( context, question ) {\n\t\tvar question_id = question.id;\n\t\tquestion.temp_id = LP.uniqueId();\n\t\tcontext.commit( 'REMOVE_QUESTION', question );\n\t\tLP.Request( {\n\t\t\ttype: 'delete-question',\n\t\t\tquestion_id: question_id,\n\t\t} )\n\t\t\t.then( function() {\n\t\t\t\tquestion.id = question.temp_id;\n\t\t\t\tquestion.temp_id = 0;\n\t\t\t\tcontext.commit( 'REMOVE_QUESTION', question );\n\t\t\t\tcontext.commit( 'UPDATE_QUESTION_SUCCESS', question.id );\n\t\t\t} )\n\t\t\t.catch( function() {\n\t\t\t\tcontext.commit( 'UPDATE_QUESTION_FAILURE', question.id );\n\t\t\t} );\n\t},\n\n\ttoggleQuestion: function( context, question ) {\n\t\tif ( question.open ) {\n\t\t\tcontext.commit( 'CLOSE_QUESTION', question );\n\t\t} else {\n\t\t\tcontext.commit( 'OPEN_QUESTION', question );\n\t\t}\n\n\t\tLP.Request( {\n\t\t\ttype: 'hidden-questions',\n\t\t\thidden: context.getters.hiddenQuestions,\n\t\t}\n\t\t);\n\t},\n\n\tupdateQuestionAnswersOrder: function( context, payload ) {\n\t\tcontext.commit( 'UPDATE_QUESTION_REQUEST', payload.question_id );\n\n\t\tLP.Request( {\n\t\t\ttype: 'sort-question-answers',\n\t\t\tquestion_id: payload.question_id,\n\t\t\torder: JSON.stringify( payload.order ),\n\t\t} ).then(\n\t\t\tfunction( response ) {\n\t\t\t\tvar result = response.body,\n\t\t\t\t\torder = result.data;\n\t\t\t\tcontext.commit( 'SORT_QUESTION_ANSWERS', order );\n\t\t\t\tcontext.commit( 'UPDATE_QUESTION_SUCCESS', payload.question_id );\n\t\t\t},\n\t\t\tfunction( error ) {\n\t\t\t\tcontext.commit( 'UPDATE_QUESTION_FAILURE', payload.question_id );\n\t\t\t\tconsole.log( error );\n\t\t\t}\n\t\t);\n\t},\n\n\tupdateQuestionAnswerTitle: function( context, payload ) {\n\t\tcontext.commit( 'UPDATE_QUESTION_REQUEST', payload.question_id );\n\n\t\tLP.Request( {\n\t\t\ttype: 'update-question-answer-title',\n\t\t\tquestion_id: parseInt( payload.question_id ),\n\t\t\tanswer: JSON.stringify( payload.answer ),\n\t\t} ).then(\n\t\t\tfunction() {\n\t\t\t\tcontext.commit( 'UPDATE_QUESTION_ANSWER_SUCCESS', parseInt( payload.question_id ) );\n\t\t\t\tcontext.commit( 'UPDATE_QUESTION_SUCCESS', payload.question_id );\n\t\t\t}\n\t\t).catch(\n\t\t\tfunction() {\n\t\t\t\tcontext.commit( 'UPDATE_QUESTION_ANSWER_FAILURE', parseInt( payload.question_id ) );\n\t\t\t\tcontext.commit( 'UPDATE_QUESTION_FAILURE', payload.question_id );\n\t\t\t} );\n\t},\n\n\tupdateQuestionCorrectAnswer: function( context, payload ) {\n\t\tcontext.commit( 'UPDATE_QUESTION_REQUEST', payload.question_id );\n\n\t\tLP.Request( {\n\t\t\ttype: 'change-question-correct-answer',\n\t\t\tquestion_id: payload.question_id,\n\t\t\tcorrect: JSON.stringify( payload.correct ),\n\t\t} ).then(\n\t\t\tfunction( response ) {\n\t\t\t\tvar result = response.body;\n\t\t\t\tif ( result.success ) {\n\t\t\t\t\tcontext.commit( 'CHANGE_QUESTION_CORRECT_ANSWERS', result.data );\n\t\t\t\t\tcontext.commit( 'UPDATE_QUESTION_SUCCESS', payload.question_id );\n\t\t\t\t}\n\t\t\t},\n\t\t\tfunction( error ) {\n\t\t\t\tcontext.commit( 'UPDATE_QUESTION_FAILURE', payload.question_id );\n\t\t\t\tconsole.log( error );\n\t\t\t}\n\t\t);\n\t},\n\n\tdeleteQuestionAnswer: function( context, payload ) {\n\t\tpayload.temp_id = LP.uniqueId();\n\t\tcontext.commit( 'DELETE_ANSWER', payload );\n\t\tcontext.commit( 'UPDATE_QUESTION_REQUEST', payload.question_id );\n\n\t\tLP.Request( {\n\t\t\ttype: 'delete-question-answer',\n\t\t\tquestion_id: payload.question_id,\n\t\t\tanswer_id: payload.answer_id,\n\t\t} ).then(\n\t\t\tfunction( response ) {\n\t\t\t\tvar result = response.body;\n\n\t\t\t\tif ( result.success ) {\n\t\t\t\t\tcontext.commit( 'DELETE_QUESTION_ANSWER', {\n\t\t\t\t\t\tquestion_id: payload.question_id,\n\t\t\t\t\t\tanswer_id: payload.temp_id,\n\t\t\t\t\t\t//answer_id: payload.answer_id\n\t\t\t\t\t} );\n\t\t\t\t\tcontext.commit( 'UPDATE_QUESTION_SUCCESS', payload.question_id );\n\t\t\t\t}\n\t\t\t},\n\t\t\tfunction( error ) {\n\t\t\t\tcontext.commit( 'UPDATE_QUESTION_FAILURE', payload.question_id );\n\t\t\t\tconsole.log( error );\n\t\t\t}\n\t\t);\n\t},\n\n\tnewQuestionAnswer: function( context, data ) {\n\t\tvar temp_id = LP.uniqueId(),\n\t\t\tquestion_id = data.question_id;\n\t\tcontext.commit( 'UPDATE_QUESTION_REQUEST', question_id );\n\t\tcontext.commit( 'ADD_QUESTION_ANSWER', {\n\t\t\tquestion_id: question_id,\n\t\t\tanswer: { text: LP_Quiz_Store.getters['i18n/all'].new_option, question_answer_id: temp_id },\n\t\t} );\n\t\tLP.Request( {\n\t\t\ttype: 'new-question-answer',\n\t\t\tquestion_id: question_id,\n\t\t\tquestion_answer_id: temp_id,\n\t\t} )\n\t\t\t.then(\n\t\t\t\tfunction( response ) {\n\t\t\t\t\tvar result = response.body;\n\t\t\t\t\tif ( result.success ) {\n\t\t\t\t\t\tvar answer = result.data;\n\t\t\t\t\t\tcontext.commit( 'ADD_QUESTION_ANSWER', { question_id: question_id, answer: answer } );\n\t\t\t\t\t\tcontext.commit( 'UPDATE_QUESTION_SUCCESS', question_id );\n\n\t\t\t\t\t\tdata.success && setTimeout( function() {\n\t\t\t\t\t\t\tdata.success.apply( data.context, [ answer ] );\n\t\t\t\t\t\t}, 300 );\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\tfunction( error ) {\n\t\t\t\t\tcontext.commit( 'UPDATE_QUESTION_FAILURE', question_id );\n\t\t\t\t\tconsole.error( error );\n\t\t\t\t}\n\t\t\t);\n\t},\n\n\tupdateQuestionContent: function( context, question ) {\n\t\tcontext.commit( 'UPDATE_QUESTION_REQUEST', question.id );\n\n\t\tLP.Request( {\n\t\t\ttype: 'update-question-content',\n\t\t\tquestion: JSON.stringify( question ),\n\t\t} ).then(\n\t\t\tfunction() {\n\t\t\t\tcontext.commit( 'UPDATE_QUESTION_SUCCESS', question.id );\n\t\t\t}\n\t\t).catch(\n\t\t\tfunction() {\n\t\t\t\tcontext.commit( 'UPDATE_QUESTION_FAILURE', question.id );\n\t\t\t} );\n\t},\n\n\tupdateQuestionMeta: function( context, payload ) {\n\t\tcontext.commit( 'UPDATE_QUESTION_REQUEST', payload.question.id );\n\n\t\tLP.Request( {\n\t\t\ttype: 'update-question-meta',\n\t\t\tquestion: JSON.stringify( payload.question ),\n\t\t\tmeta_key: payload.meta_key,\n\t\t} ).then(\n\t\t\tfunction() {\n\t\t\t\tcontext.commit( 'UPDATE_QUESTION_SUCCESS', payload.question.id );\n\t\t\t}\n\t\t).catch(\n\t\t\tfunction() {\n\t\t\t\tcontext.commit( 'UPDATE_QUESTION_FAILURE', payload.question.id );\n\t\t\t} );\n\t},\n};\n\nexport default QuestionList;\n","const Quiz = {\n heartbeat: function (context) {\n LP.Request({\n type: 'heartbeat'\n }\n )\n .then(\n function (response) {\n var result = response.body;\n context.commit('UPDATE_HEART_BEAT', !!result.success);\n },\n function (error) {\n context.commit('UPDATE_HEART_BEAT', false);\n }\n );\n },\n\n newRequest: function (context) {\n context.commit('INCREASE_NUMBER_REQUEST');\n context.commit('UPDATE_STATUS', 'loading');\n\n window.onbeforeunload = function () {\n return '';\n }\n },\n\n requestCompleted: function (context, status) {\n context.commit('DECREASE_NUMBER_REQUEST');\n\n if (context.getters.currentRequest === 0) {\n context.commit('UPDATE_STATUS', status);\n window.onbeforeunload = null;\n }\n }\n};\n\nexport default Quiz;","( function( $ ) {\n\twindow.FIB = {\n\n\t\tgetSelectedText: function getSelectedText() {\n\t\t\tlet html = '';\n\t\t\tif ( typeof window.getSelection !== 'undefined' ) {\n\t\t\t\tconst sel = window.getSelection();\n\t\t\t\tif ( sel.rangeCount ) {\n\t\t\t\t\tconst container = document.createElement( 'div' );\n\t\t\t\t\tfor ( let i = 0, len = sel.rangeCount; i < len; ++i ) {\n\t\t\t\t\t\tcontainer.appendChild( sel.getRangeAt( i ).cloneContents() );\n\t\t\t\t\t}\n\t\t\t\t\thtml = container.innerHTML;\n\t\t\t\t}\n\t\t\t} else if ( typeof document.selection !== 'undefined' ) {\n\t\t\t\tif ( document.selection.type === 'Text' ) {\n\t\t\t\t\thtml = document.selection.createRange().htmlText;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn html;\n\t\t},\n\n\t\tcreateTextNode( content ) {\n\t\t\treturn document.createTextNode( content );\n\t\t},\n\n\t\tisContainHtml: function isContainHtml( content ) {\n\t\t\tconst $el = $( content ),\n\t\t\t\tsel = 'b.fib-blank';\n\t\t\treturn $el.is( sel ) || $el.find( sel ).length || $el.parent().is( sel );\n\t\t},\n\n\t\tgetSelectionRange: function getSelectionRange() {\n\t\t\tlet t = '';\n\t\t\tif ( window.getSelection ) {\n\t\t\t\tt = window.getSelection();\n\t\t\t} else if ( document.getSelection ) {\n\t\t\t\tt = document.getSelection();\n\t\t\t} else if ( document.selection ) {\n\t\t\t\tt = document.selection.createRange().text;\n\t\t\t}\n\t\t\treturn t;\n\t\t},\n\n\t\touterHTML( $dom ) {\n\t\t\treturn $( '<div>' ).append( $( $dom ).clone() ).html();\n\t\t},\n\n\t\tdoUpgrade( callback ) {\n\t\t\t$.ajax( {\n\t\t\t\turl: '',\n\t\t\t\tdata: {\n\t\t\t\t\t'lp-ajax': 'fib-upgrade',\n\t\t\t\t},\n\t\t\t\tsuccess( res ) {\n\t\t\t\t\tconsole.log( res );\n\t\t\t\t\tcallback && callback.call( res );\n\t\t\t\t},\n\t\t\t} );\n\t\t},\n\t};\n\n\t$( document ).ready( function() {\n\t\t$( '#do-upgrade-fib' ).on( 'click', function() {\n\t\t\tconst $button = $( this ).prop( 'disabled', true ).addClass( 'ajaxloading' );\n\t\t\tFIB.doUpgrade( function() {\n\t\t\t\t$button.prop( 'disabled', false ).removeClass( 'ajaxloading' );\n\t\t\t} );\n\t\t} );\n\t} );\n}( jQuery ) );\n","const ModalQuizItems = {\n\tstatus: function( state ) {\n\t\treturn state.status;\n\t},\n\tpagination: function( state ) {\n\t\treturn state.pagination;\n\t},\n\titems: function( state, _getters ) {\n\t\treturn state.items.map( function( item ) {\n\t\t\tvar find = _getters.addedItems.find( function( _item ) {\n\t\t\t\treturn item.id === _item.id;\n\t\t\t} );\n\n\t\t\titem.added = !! find;\n\n\t\t\treturn item;\n\t\t} );\n\t},\n\tcode: function( state ) {\n\t\treturn Date.now();\n\t},\n\taddedItems: function( state ) {\n\t\treturn state.addedItems;\n\t},\n\tisOpen: function( state ) {\n\t\treturn state.open;\n\t},\n\tquiz: function( state ) {\n\t\treturn state.quizId;\n\t},\n};\n\nexport default ModalQuizItems;\n","const QuestionList = {\n\tlistQuestions: function( state ) {\n\t\treturn state.questions || [];\n\t},\n\tquestionsOrder: function( state ) {\n\t\treturn state.order || [];\n\t},\n\texternalComponent: function( state ) {\n\t\treturn state.externalComponent || [];\n\t},\n\tsupportAnswerOptions: function( state ) {\n\t\treturn state.supportAnswerOptions || [];\n\t},\n\thiddenQuestionsSettings: function( state ) {\n\t\treturn state.hidden_questions_settings || [];\n\t},\n\thiddenQuestions: function( state ) {\n\t\treturn state.questions\n\t\t\t.filter( function( question ) {\n\t\t\t\treturn ! question.open;\n\t\t\t} )\n\t\t\t.map( function( question ) {\n\t\t\t\treturn parseInt( question.id );\n\t\t\t} );\n\t},\n\tisHiddenListQuestions: function( state, getters ) {\n\t\tvar questions = getters.listQuestions;\n\t\tvar hiddenQuestions = getters.hiddenQuestions;\n\n\t\treturn questions.length === hiddenQuestions.length;\n\t},\n\tdisableUpdateList: function( state ) {\n\t\treturn state.disableUpdateList;\n\t},\n\tstatusUpdateQuestions: function( state ) {\n\t\treturn state.statusUpdateQuestions;\n\t},\n\tstatusUpdateQuestionItem: function( state ) {\n\t\treturn state.statusUpdateQuestionItem;\n\t},\n\tstatusUpdateQuestionAnswer: function( state ) {\n\t\treturn state.statusUpdateQuestionAnswer;\n\t},\n};\n\nexport default QuestionList;\n","const Quiz = {\n\theartbeat: function( state ) {\n\t\treturn state.heartbeat;\n\t},\n\tquestionTypes: function( state ) {\n\t\treturn state.types;\n\t},\n\tdefaultNewQuestionType: function( state ) {\n\t\treturn state.default_new;\n\t},\n\taction: function( state ) {\n\t\treturn state.action;\n\t},\n\tid: function( state ) {\n\t\treturn state.quiz_id;\n\t},\n\tstatus: function( state ) {\n\t\treturn state.status || 'error';\n\t},\n\tcurrentRequest: function( state ) {\n\t\treturn state.countCurrentRequest || 0;\n\t},\n\tnonce: function( state ) {\n\t\treturn state.nonce;\n\t},\n};\n\nexport default Quiz;\n","export default function HTTP( options ) {\n\tconst $ = window.jQuery || jQuery;\n\tconst $VueHTTP = Vue.http;\n\n\toptions = $.extend( {\n\t\tns: 'LPRequest',\n\t\tstore: false,\n\t}, options || {} );\n\n\tlet $publishingAction = null;\n\n\tLP.Request = function( payload ) {\n\t\t$publishingAction = $( '#publishing-action' );\n\n\t\tpayload.id = options.store.getters.id;\n\t\tpayload.nonce = options.store.getters.nonce;\n\t\tpayload[ 'lp-ajax' ] = options.store.getters.action;\n\t\tpayload.code = options.store.getters.code;\n\n\t\t$publishingAction.find( '#publish' ).addClass( 'disabled' );\n\t\t$publishingAction.find( '.spinner' ).addClass( 'is-active' );\n\t\t$publishingAction.addClass( 'code-' + payload.code );\n\n\t\treturn $VueHTTP.post( options.store.getters.urlAjax,\n\t\t\tpayload,\n\t\t\t{\n\t\t\t\temulateJSON: true,\n\t\t\t\tparams: {\n\t\t\t\t\tnamespace: options.ns,\n\t\t\t\t\tcode: payload.code,\n\t\t\t\t},\n\t\t\t} );\n\t};\n\n\t$VueHTTP.interceptors.push( function( request, next ) {\n\t\tif ( request.params.namespace !== options.ns ) {\n\t\t\tnext();\n\t\t\treturn;\n\t\t}\n\n\t\toptions.store.dispatch( 'newRequest' );\n\n\t\tnext( function( response ) {\n\t\t\tif ( ! jQuery.isPlainObject( response.body ) ) {\n\t\t\t\tresponse.body = LP.parseJSON( response.body );\n\t\t\t}\n\n\t\t\tconst body = response.body;\n\t\t\tconst result = body.success || false;\n\n\t\t\tif ( result ) {\n\t\t\t\toptions.store.dispatch( 'requestCompleted', 'successful' );\n\t\t\t} else {\n\t\t\t\toptions.store.dispatch( 'requestCompleted', 'failed' );\n\t\t\t}\n\n\t\t\t$publishingAction.removeClass( 'code-' + request.params.code );\n\n\t\t\tif ( ! $publishingAction.attr( 'class' ) ) {\n\t\t\t\t$publishingAction.find( '#publish' ).removeClass( 'disabled' );\n\t\t\t\t$publishingAction.find( '.spinner' ).removeClass( 'is-active' );\n\t\t\t}\n\t\t} );\n\t} );\n}\n","const ModalQuizItems = {\n\tTOGGLE: function( state ) {\n\t\tstate.open = ! state.open;\n\t},\n\tSET_QUIZ: function( state, quizId ) {\n\t\tstate.quizId = quizId;\n\t},\n\tSET_LIST_ITEMS: function( state, items ) {\n\t\tstate.items = items;\n\t},\n\tADD_ITEM: function( state, item ) {\n\t\tstate.addedItems.push( item );\n\t},\n\tREMOVE_ADDED_ITEM: function( state, item ) {\n\t\tstate.addedItems.forEach( function( _item, index ) {\n\t\t\tif ( _item.id === item.id ) {\n\t\t\t\tstate.addedItems.splice( index, 1 );\n\t\t\t}\n\t\t} );\n\t},\n\tRESET: function( state ) {\n\t\tstate.addedItems = [];\n\t\tstate.items = [];\n\t},\n\tUPDATE_PAGINATION: function( state, pagination ) {\n\t\tstate.pagination = pagination;\n\t},\n\tSEARCH_ITEM_REQUEST: function( state ) {\n\t\tstate.status = 'loading';\n\t},\n\tSEARCH_ITEM_SUCCESS: function( state ) {\n\t\tstate.status = 'successful';\n\t},\n\tSEARCH_ITEM_FAIL: function( state ) {\n\t\tstate.status = 'fail';\n\t},\n};\n\nexport default ModalQuizItems;\n","var $ = window.jQuery;\n\nconst QuestionList = {\n\tSORT_QUESTIONS: function( state, orders ) {\n\t\tstate.questions = state.questions.map( function( question ) {\n\t\t\tquestion.order = orders[question.id];\n\t\t\treturn question;\n\t\t} );\n\t},\n\tSORT_QUESTION_ANSWERS: function( state, orders ) {\n\t\tstate.questions = state.questions.map( function( question ) {\n\t\t\tquestion.answers.answer_order = orders[question.answers.question_answer_id];\n\t\t\treturn question;\n\t\t} );\n\t},\n\tADD_QUESTION_ANSWER: function( state, payload ) {\n\t\tstate.questions = state.questions.map( function( question ) {\n\t\t\tif ( question.id === payload.question_id ) {\n\t\t\t\tvar found = false;\n\t\t\t\tif ( payload.answer.temp_id ) {\n\t\t\t\t\tfor ( var i = 0, n = question.answers.length; i < n; i++ ) {\n\t\t\t\t\t\tif ( question.answers[i].question_answer_id == payload.answer.temp_id ) {\n\t\t\t\t\t\t\tfound = true;\n\t\t\t\t\t\t\t$Vue.set( question.answers, i, payload.answer );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t! found && question.answers.push( payload.answer );\n\t\t\t\treturn question;\n\t\t\t}\n\t\t\treturn question;\n\t\t} );\n\t},\n\tCHANGE_QUESTION_CORRECT_ANSWERS: function( state, data ) {\n\t\tstate.questions = state.questions.map( function( question ) {\n\t\t\tif ( parseInt( question.id ) === data.id ) {\n\t\t\t\tquestion.answers = data.answers;\n\t\t\t}\n\t\t\treturn question;\n\t\t} );\n\t},\n\tSET_QUESTIONS: function( state, questions ) {\n\t\tstate.questions = questions;\n\t},\n\tADD_NEW_QUESTION: function( state, question ) {\n\t\tvar found = false;\n\t\tif ( question.temp_id ) {\n\t\t\tfor ( var i = 0, n = state.questions.length; i < n; i++ ) {\n\t\t\t\tif ( state.questions[i].id === question.temp_id ) {\n\t\t\t\t\t$Vue.set( state.questions, i, question );\n\t\t\t\t\tfound = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif ( ! found ) {\n\t\t\tvar _last_child = $( '.lp-list-questions .main > div:last-child' );\n\t\t\tif ( _last_child.length ) {\n\t\t\t\tvar _offset = _last_child.offset().top;\n\t\t\t\t$( 'html,body' ).animate( { scrollTop: _offset } );\n\t\t\t}\n\n\t\t\tstate.questions.push( question );\n\t\t}\n\t},\n\tCHANGE_QUESTION_TYPE: function( state, data ) {\n\t\tstate.questions = state.questions.map( function( question ) {\n\t\t\tif ( parseInt( question.id ) === data.id ) {\n\t\t\t\tquestion.answers = data.answers;\n\t\t\t\tquestion.type = data.type;\n\t\t\t\tquestion.open = true;\n\t\t\t}\n\t\t\treturn question;\n\t\t} );\n\t},\n\tREMOVE_QUESTION: function( state, item ) {\n\t\tvar questions = state.questions,\n\t\t\tindex = questions.indexOf( item );\n\n\t\tif ( item.temp_id ) {\n\t\t\tstate.questions[index].id = item.temp_id;\n\t\t} else {\n\t\t\tstate.questions.splice( index, 1 );\n\t\t}\n\t},\n\tDELETE_QUESTION_ANSWER: function( state, payload ) {\n\t\tvar question_id = payload.question_id,\n\t\t\tanswer_id = payload.answer_id;\n\n\t\tstate.questions = state.questions.map( function( question ) {\n\t\t\tif ( question.id === question_id ) {\n\t\t\t\tvar answers = question.answers;\n\t\t\t\tanswers.forEach( function( answer ) {\n\t\t\t\t\tif ( answer.question_answer_id === answer_id ) {\n\t\t\t\t\t\tvar index = answers.indexOf( answer );\n\t\t\t\t\t\tanswers.splice( index, 1 );\n\t\t\t\t\t}\n\t\t\t\t} );\n\t\t\t}\n\t\t\treturn question;\n\t\t} );\n\t},\n\tREMOVE_QUESTIONS: function() {\n\t\t// code\n\t},\n\tCLOSE_QUESTION: function( state, question ) {\n\t\tstate.questions.forEach( function( _question, index ) {\n\t\t\tif ( question.id === _question.id ) {\n\t\t\t\tstate.questions[index].open = false;\n\t\t\t}\n\t\t} );\n\t},\n\tOPEN_QUESTION: function( state, question ) {\n\t\tstate.questions.forEach( function( _question, index ) {\n\t\t\tif ( ( question.id ) === _question.id ) {\n\t\t\t\tstate.questions[index].open = true;\n\t\t\t}\n\t\t} );\n\t},\n\tCLOSE_LIST_QUESTIONS: function( state ) {\n\t\tstate.questions = state.questions.map( function( _question ) {\n\t\t\t_question.open = false;\n\n\t\t\treturn _question;\n\t\t} );\n\t},\n\tOPEN_LIST_QUESTIONS: function( state ) {\n\t\tstate.questions = state.questions.map( function( _question ) {\n\t\t\t_question.open = true;\n\n\t\t\treturn _question;\n\t\t} );\n\t},\n\tUPDATE_QUESTION_REQUEST: function( state, questionId ) {\n\t\t$Vue.set( state.statusUpdateQuestionItem, questionId, 'updating' );\n\t},\n\tUPDATE_QUESTION_SUCCESS: function( state, questionID ) {\n\t\t$Vue.set( state.statusUpdateQuestionItem, questionID, 'successful' );\n\t},\n\tUPDATE_QUESTION_FAILURE: function( state, questionID ) {\n\t\t$Vue.set( state.statusUpdateQuestionItem, questionID, 'failed' );\n\t},\n\n\tUPDATE_QUESTION_ANSWER_REQUEST: function( state, question_id ) {\n\t\t$Vue.set( state.statusUpdateQuestionAnswer, question_id, 'updating' );\n\t},\n\tUPDATE_QUESTION_ANSWER_SUCCESS: function( state, question_id ) {\n\t\t$Vue.set( state.statusUpdateQuestionAnswer, question_id, 'successful' );\n\t},\n\tUPDATE_QUESTION_ANSWER_FAIL: function( state, question_id ) {\n\t\t$Vue.set( state.statusUpdateQuestionAnswer, question_id, 'failed' );\n\t},\n\tDELETE_ANSWER: function( state, data ) {\n\t\tstate.questions.map( function( question, index ) {\n\t\t\tif ( question.id == data.question_id ) {\n\t\t\t\tfor ( var i = 0, n = question.answers.length; i < n; i++ ) {\n\t\t\t\t\tif ( question.answers[i].question_answer_id == data.answer_id ) {\n\t\t\t\t\t\tquestion.answers[i].question_answer_id = data.temp_id;\n\t\t\t\t\t\t//state.questions[index].answers.splice(i, 1);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn false;\n\t\t\t}\n\t\t} );\n\t},\n};\n\nexport default QuestionList;\n","const Quiz = {\n\n\tUPDATE_HEART_BEAT: function( state, status ) {\n\t\tstate.heartbeat = !! status;\n\t},\n\n\tUPDATE_STATUS: function( state, status ) {\n\t\tstate.status = status;\n\t},\n\n\tUPDATE_NEW_QUESTION_TYPE: function( state, type ) {\n\t\tstate.default_new = type;\n\t},\n\n\tINCREASE_NUMBER_REQUEST: function( state ) {\n\t\tstate.countCurrentRequest++;\n\t},\n\n\tDECREASE_NUMBER_REQUEST: function( state ) {\n\t\tstate.countCurrentRequest--;\n\t},\n};\n\nexport default Quiz;\n","const $ = window.jQuery || jQuery;\n\nconst i18n = function i18n( i18n ) {\n\tconst state = $.extend( {}, i18n );\n\tconst getters = {\n\t\tall: function( state ) {\n\t\t\treturn state;\n\t\t},\n\t};\n\n\treturn {\n\t\tnamespaced: true,\n\t\tstate: state,\n\t\tgetters: getters,\n\t};\n};\n\nexport default i18n;\n","import getters from '../getters/modal-quiz-items';\nimport mutations from '../mutations/modal-quiz-items';\nimport actions from '../actions/modal-quiz-items';\n\nconst $ = window.jQuery || jQuery;\n\nconst Quiz = function( data ) {\n\tvar state = $.extend( {\n\t\tquizId: false,\n\t\tpagination: '',\n\t\tstatus: '',\n\t}, data.chooseItems );\n\n\treturn {\n\t\tnamespaced: true,\n\t\tstate: state,\n\t\tgetters: getters,\n\t\tmutations: mutations,\n\t\tactions: actions,\n\t};\n};\n\nexport default Quiz;\n","import getters from '../getters/question-list';\nimport mutations from '../mutations/question-list';\nimport actions from '../actions/question-list';\n\nconst $ = window.jQuery || jQuery;\n\nconst QuestionList = function QuestionList( data ) {\n\tconst listQuestions = data.listQuestions;\n\tvar state = $.extend( {\n\t\tstatusUpdateQuestions: {},\n\t\tstatusUpdateQuestionItem: {},\n\t\tstatusUpdateQuestionAnswer: {},\n\t\tquestions: listQuestions.questions.map( function( question ) {\n\t\t\tvar hiddenQuestions = listQuestions.hidden_questions;\n\n\t\t\tvar find = hiddenQuestions.find( function( questionId ) {\n\t\t\t\treturn parseInt( question.id ) === parseInt( questionId );\n\t\t\t} );\n\n\t\t\tquestion.open = ! find;\n\n\t\t\treturn question;\n\t\t} ),\n\t}, listQuestions );\n\n\treturn {\n\t\tnamespaced: true,\n\t\tstate: state,\n\t\tgetters: getters,\n\t\tmutations: mutations,\n\t\tactions: actions,\n\t};\n};\n\nexport default QuestionList;\n","import getters from '../getters/quiz';\nimport mutations from '../mutations/quiz';\nimport actions from '../actions/quiz';\n\nimport ModalQuizItems from '../store/modal-quiz-items';\nimport i18n from '../store/i18n';\nimport QuestionList from '../store/question-list';\n\nconst $ = window.jQuery || jQuery;\n\nconst Quiz = function Quiz( data ) {\n\tconst state = $.extend( {\n\t\tstatus: 'success',\n\t\theartbeat: true,\n\t\tcountCurrentRequest: 0,\n\t}, data.root );\n\n\treturn {\n\t\tstate: state,\n\t\tgetters: getters,\n\t\tmutations: mutations,\n\t\tactions: actions,\n\t\tmodules: {\n\t\t\tcqi: ModalQuizItems( data ),\n\t\t\ti18n: i18n( data.i18n ),\n\t\t\tlqs: QuestionList( data ),\n\t\t},\n\t};\n};\n\nexport default Quiz;\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = function(module) {\n\tvar getter = module && module.__esModule ?\n\t\tfunction() { return module['default']; } :\n\t\tfunction() { return module; };\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = function(exports, definition) {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }","// define __esModule on exports\n__webpack_require__.r = function(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};","import QuizStore from './store/quiz';\nimport HTTP from './http';\nimport './fill-in-blanks';\n\nwindow.$Vue = window.$Vue || Vue;\nwindow.$Vuex = window.$Vuex || Vuex;\n\n/**\n * Init app.\n *\n * @since 3.0.0\n */\n\nwindow.jQuery( document ).ready( function() {\n\twindow.LP_Quiz_Store = new $Vuex.Store( QuizStore( lp_quiz_editor ) );\n\tHTTP( { ns: 'LPListQuizQuestionsRequest', store: LP_Quiz_Store } );\n\n\tsetTimeout( () => {\n\t\twindow.LP_Quiz_Editor = new $Vue( {\n\t\t\tel: '#admin-editor-lp_quiz',\n\t\t\ttemplate: '<lp-quiz-editor></lp-quiz-editor>',\n\t\t} );\n\t}, 100 );\n} );\n"],"names":["ModalQuizItems","toggle","context","commit","open","quizId","searchItems","payload","LP","Request","type","query","page","exclude","JSON","stringify","then","response","result","body","success","data","items","pagination","error","console","log","addItem","item","removeItem","index","addQuestionsToQuiz","quiz","getters","addedItems","length","draft_quiz","questions","root","$","window","jQuery","QuestionList","toggleAll","hidden","isHiddenListQuestions","hiddenQuestions","updateQuizQuestionsHidden","extend","newQuestion","parse","question","settings","updateQuestionsOrder","order","updateQuestionTitle","id","catch","changeQuestionType","question_id","question_type","key","isHiddenQuestionsSettings","cloneQuestion","removeQuestion","temp_id","uniqueId","deleteQuestion","toggleQuestion","updateQuestionAnswersOrder","updateQuestionAnswerTitle","parseInt","answer","updateQuestionCorrectAnswer","correct","deleteQuestionAnswer","answer_id","newQuestionAnswer","text","LP_Quiz_Store","new_option","question_answer_id","setTimeout","apply","updateQuestionContent","updateQuestionMeta","meta_key","Quiz","heartbeat","newRequest","onbeforeunload","requestCompleted","status","currentRequest","FIB","getSelectedText","html","getSelection","sel","rangeCount","container","document","createElement","i","len","appendChild","getRangeAt","cloneContents","innerHTML","selection","createRange","htmlText","createTextNode","content","isContainHtml","$el","is","find","parent","getSelectionRange","t","outerHTML","$dom","append","clone","doUpgrade","callback","ajax","url","res","call","ready","on","$button","prop","addClass","removeClass","state","_getters","map","_item","added","code","Date","now","isOpen","listQuestions","questionsOrder","externalComponent","supportAnswerOptions","hiddenQuestionsSettings","hidden_questions_settings","filter","disableUpdateList","statusUpdateQuestions","statusUpdateQuestionItem","statusUpdateQuestionAnswer","questionTypes","types","defaultNewQuestionType","default_new","action","quiz_id","countCurrentRequest","nonce","HTTP","options","$VueHTTP","Vue","http","ns","store","$publishingAction","post","urlAjax","emulateJSON","params","namespace","interceptors","push","request","next","dispatch","isPlainObject","parseJSON","attr","TOGGLE","SET_QUIZ","SET_LIST_ITEMS","ADD_ITEM","REMOVE_ADDED_ITEM","forEach","splice","RESET","UPDATE_PAGINATION","SEARCH_ITEM_REQUEST","SEARCH_ITEM_SUCCESS","SEARCH_ITEM_FAIL","SORT_QUESTIONS","orders","SORT_QUESTION_ANSWERS","answers","answer_order","ADD_QUESTION_ANSWER","found","n","$Vue","set","CHANGE_QUESTION_CORRECT_ANSWERS","SET_QUESTIONS","ADD_NEW_QUESTION","_last_child","_offset","offset","top","animate","scrollTop","CHANGE_QUESTION_TYPE","REMOVE_QUESTION","indexOf","DELETE_QUESTION_ANSWER","REMOVE_QUESTIONS","CLOSE_QUESTION","_question","OPEN_QUESTION","CLOSE_LIST_QUESTIONS","OPEN_LIST_QUESTIONS","UPDATE_QUESTION_REQUEST","questionId","UPDATE_QUESTION_SUCCESS","questionID","UPDATE_QUESTION_FAILURE","UPDATE_QUESTION_ANSWER_REQUEST","UPDATE_QUESTION_ANSWER_SUCCESS","UPDATE_QUESTION_ANSWER_FAIL","DELETE_ANSWER","UPDATE_HEART_BEAT","UPDATE_STATUS","UPDATE_NEW_QUESTION_TYPE","INCREASE_NUMBER_REQUEST","DECREASE_NUMBER_REQUEST","i18n","all","namespaced","mutations","actions","chooseItems","hidden_questions","modules","cqi","lqs","QuizStore","$Vuex","Vuex","Store","lp_quiz_editor","LP_Quiz_Editor","el","template"],"sourceRoot":""}
assets/js/dist/admin/editor/quiz.min.asset.php ADDED
@@ -0,0 +1 @@
 
1
+ <?php return array('dependencies' => array(), 'version' => '539e6e70d3aa82aba79c');
assets/js/dist/admin/pages/dashboard.asset.php ADDED
@@ -0,0 +1 @@
 
1
+ <?php return array('dependencies' => array(), 'version' => 'c3021838b672b886c0f4');
assets/js/dist/admin/pages/dashboard.js.map ADDED
@@ -0,0 +1 @@
 
1
+ {"version":3,"file":"./assets/js/dist/admin/pages/dashboard.js","mappings":";;;;;AAAAA,QAAQ,CAACC,gBAAT,CAA2B,kBAA3B,EAA+C,UAAUC,KAAV,EAAkB;AAChE,QAAMC,QAAQ,GAAGH,QAAQ,CAACI,aAAT,CAAwB,mBAAxB,CAAjB;;AAEA,QAAMC,WAAW,GAAG,MAAQC,GAAR,IAAiB;AACpC,QAAI;AACH,YAAMC,QAAQ,GAAG,MAAMC,EAAE,CAACC,QAAH,CAAa;AACnCC,QAAAA,IAAI,EAAEF,EAAE,CAACG,GAAH,CAAOC,YAAP,CAAqB,wBAArB,CAD6B;AAEnCC,QAAAA,MAAM,EAAE;AAF2B,OAAb,CAAvB;;AAKA,UAAKN,QAAQ,CAACO,MAAT,KAAoB,SAApB,IAAiCP,QAAQ,CAACQ,IAA/C,EAAsD;AACrDT,QAAAA,GAAG,CAACU,SAAJ,GAAgBT,QAAQ,CAACQ,IAAzB;AACA,OAFD,MAEO;AACNT,QAAAA,GAAG,CAACU,SAAJ,GAAiB,4DAA4DT,QAAQ,CAACU,OAAT,IAC7EV,QAAQ,CAACU,OAAS,QADlB;AAEA;AACD,KAZD,CAYE,OAAQC,KAAR,EAAgB;AACjBZ,MAAAA,GAAG,CAACU,SAAJ,IAAkB,4DAA4DE,KAAK,CAACD,OAAN,IAC9EC,KAAK,CAACD,OAAS,QADf;AAEA;AACD,GAjBD;;AAmBAZ,EAAAA,WAAW,CAAEF,QAAF,CAAX;AACA,CAvBD,E","sources":["webpack://learnpress/./assets/src/apps/js/admin/pages/dashboard.js"],"sourcesContent":["document.addEventListener( 'DOMContentLoaded', function( event ) {\n\tconst elements = document.querySelector( 'ul.lp_append_data' );\n\n\tconst getResponse = async ( ele ) => {\n\t\ttry {\n\t\t\tconst response = await wp.apiFetch( {\n\t\t\t\tpath: wp.url.addQueryArgs( 'lp/v1/orders/statistic' ),\n\t\t\t\tmethod: 'GET',\n\t\t\t} );\n\n\t\t\tif ( response.status === 'success' && response.data ) {\n\t\t\t\tele.innerHTML = response.data;\n\t\t\t} else {\n\t\t\t\tele.innerHTML = `<div class=\"lp-ajax-message error\" style=\"display:block\">${ response.message &&\n\t\t\t\tresponse.message }</div>`;\n\t\t\t}\n\t\t} catch ( error ) {\n\t\t\tele.innerHTML += `<div class=\"lp-ajax-message error\" style=\"display:block\">${ error.message &&\n\t\t\terror.message }</div>`;\n\t\t}\n\t};\n\n\tgetResponse( elements );\n} );\n"],"names":["document","addEventListener","event","elements","querySelector","getResponse","ele","response","wp","apiFetch","path","url","addQueryArgs","method","status","data","innerHTML","message","error"],"sourceRoot":""}
assets/js/dist/admin/pages/dashboard.min.asset.php ADDED
@@ -0,0 +1 @@
 
1
+ <?php return array('dependencies' => array(), 'version' => '61e23f32dc55ad90ba18');
assets/js/dist/admin/pages/setup.asset.php ADDED
@@ -0,0 +1 @@
 
1
+ <?php return array('dependencies' => array(), 'version' => 'ab358d70fea67a925379');
assets/js/dist/admin/pages/setup.js.map ADDED
@@ -0,0 +1 @@
 
1
+ {"version":3,"file":"./assets/js/dist/admin/pages/setup.js","mappings":";;;;;AAAE,WAAUA,CAAV,EAAc;AACf;;AACA,MAAIC,KAAJ,EAAWC,UAAX;;AAEA,QAAMC,SAAS,GAAG,SAASA,SAAT,CAAoBC,KAApB,EAA4B;AAC7C,UAAMC,OAAO,GAAGD,KAAK,CAACE,IAAN,CAAY,qBAAZ,CAAhB;AACA,QAAIC,KAAK,GAAG,IAAZ;AAEAF,IAAAA,OAAO,CAACG,IAAR,CAAc,YAAW;AACxB,YAAMC,KAAK,GAAGT,CAAC,CAAE,IAAF,CAAf;AACAS,MAAAA,KAAK,CAACC,GAAN,CAAW,cAAX,EAA2B,EAA3B;;AAEA,cAASD,KAAK,CAACE,IAAN,CAAY,MAAZ,CAAT;AACA,aAAK,gCAAL;AACA,aAAK,wCAAL;AACC,cAAK,CAAEF,KAAK,CAACG,OAAN,CAAe,IAAf,EAAsBC,IAAtB,GAA6BP,IAA7B,CAAmC,wBAAnC,EAA8DQ,EAA9D,CAAkE,UAAlE,CAAP,EAA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n\t'use strict';\n\tlet $main, $setupForm;\n\n\tconst checkForm = function checkForm( $form ) {\n\t\tconst $emails = $form.find( 'input[type=\"email\"]' );\n\t\tlet valid = true;\n\n\t\t$emails.each( function() {\n\t\t\tconst $this = $( this );\n\t\t\t$this.css( 'border-color', '' );\n\n\t\t\tswitch ( $this.attr( 'name' ) ) {\n\t\t\tcase 'settings[paypal][paypal_email]':\n\t\t\tcase 'settings[paypal][paypal_sandbox_email]':\n\t\t\t\tif ( ! $this.closest( 'tr' ).prev().find( 'input[type=\"checkbox\"]' ).is( ':checked' ) ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tif ( ! isEmail( this.value ) ) {\n\t\t\t\tvalid = false;\n\t\t\t\t$this.css( 'border-color', '#FF0000' );\n\t\t\t}\n\t\t} );\n\n\t\treturn valid;\n\t};\n\n\tconst blockContent = function blockContent( block ) {\n\t\t$main.toggleClass( 'loading', block === undefined ? true : block );\n\t};\n\n\tconst getFormData = function getFormData( more ) {\n\t\t$setupForm = $( '#learn-press-setup-form' );\n\t\tconst data = $setupForm.serializeJSON();\n\n\t\treturn $.extend( data, more || {} );\n\t};\n\n\tconst replaceMainContent = function replaceMainContent( newContent ) {\n\t\tconst $newContent = $( newContent );\n\t\t$main.replaceWith( $newContent );\n\t\t$main = $newContent;\n\t};\n\n\t/*const navPages = function navPages( e ) {\n\t\te.preventDefault();\n\n\t\tif ( ! checkForm( $setupForm ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst loadUrl = $( this ).attr( 'href' );\n\n\t\t$main.addClass( 'loading' );\n\t\t$.post( {\n\t\t\turl: loadUrl,\n\t\t\tdata: getFormData(),\n\t\t\tsuccess( res ) {\n\t\t\t\tconst $html = $( res );\n\t\t\t\treplaceMainContent( $html.contents().filter( '#main' ) );\n\n\t\t\t\tLP.setUrl( loadUrl );\n\n\t\t\t\t$( '.learn-press-dropdown-pages' ).LP( 'DropdownPages' );\n\t\t\t\t$( '.learn-press-tip' ).LP( 'QuickTip' );\n\t\t\t\t$main.removeClass( 'loading' );\n\t\t\t},\n\t\t} );\n\t};*/\n\n\tconst updateCurrency = function updateCurrency() {\n\t\tconst m = $( this ).children( ':selected' ).html().match( /\\((.*)\\)/ ),\n\t\t\tsymbol = m ? m[ 1 ] : '';\n\t\t$( '#currency-pos' ).children().each( function() {\n\t\t\tconst $option = $( this );\n\t\t\tlet text = $option.html();\n\n\t\t\tswitch ( $option.val() ) {\n\t\t\tcase 'left':\n\t\t\t\ttext = text.replace( /\\( (.*)69/, '( ' + symbol + '69' );\n\t\t\t\tbreak;\n\t\t\tcase 'right':\n\t\t\t\ttext = text.replace( /9([^0-9]*) \\)/, '9' + symbol + ' )' );\n\t\t\t\tbreak;\n\t\t\tcase 'left_with_space':\n\t\t\t\ttext = text.replace( /\\( (.*) 6/, '( ' + symbol + ' 6' );\n\t\t\t\tbreak;\n\t\t\tcase 'right_with_space':\n\t\t\t\ttext = text.replace( /9 (.*) \\)/, '9 ' + symbol + ' )' );\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t$option.html( text );\n\t\t} );\n\t};\n\n\tconst updatePrice = function updatePrice() {\n\t\t$.post( {\n\t\t\turl: '',\n\t\t\tdataType: 'html',\n\t\t\tdata: getFormData( {\n\t\t\t\t'lp-ajax': 'get-price-format',\n\t\t\t} ),\n\t\t\tsuccess( res ) {\n\t\t\t\t$( '#preview-price' ).html( res );\n\t\t\t},\n\t\t} );\n\t};\n\n\tconst createPages = function createPages( e ) {\n\t\te.preventDefault();\n\t\tblockContent();\n\n\t\t$.post( {\n\t\t\turl: $( this ).attr( 'href' ),\n\t\t\tdataType: 'html',\n\t\t\tdata: getFormData( {\n\t\t\t\t'lp-ajax': 'setup-create-pages',\n\t\t\t} ),\n\t\t\tsuccess( res ) {\n\t\t\t\treplaceMainContent( $( res ).contents().filter( '#main' ) );\n\t\t\t\t$( '.learn-press-dropdown-pages' ).LP( 'DropdownPages' );\n\t\t\t\tblockContent( false );\n\t\t\t},\n\t\t} );\n\t};\n\n\tfunction isEmail( email ) {\n\t\tconst re = /^(([^<>()\\[\\]\\\\.,;:\\s@\"]+(\\.[^<>()\\[\\]\\\\.,;:\\s@\"]+)*)|(\".+\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$/;\n\t\treturn re.test( email );\n\t}\n\n\t$( function() {\n\t\t$main = $( '#main' );\n\t\t$setupForm = $( '#learn-press-setup-form' );\n\t\t$( '.learn-press-select2' ).select2();\n\n\t\t$( document ).\n\t\t\t// on( 'click', '.buttons .button', navPages ).\n\t\t\ton( 'change', '#currency', updateCurrency ).\n\t\t\ton( 'change', 'input, select', updatePrice ).\n\t\t\ton( 'click', '#create-pages', createPages );\n\t} );\n}( jQuery ) );\n"],"names":["$","$main","$setupForm","checkForm","$form","$emails","find","valid","each","$this","css","attr","closest","prev","is","isEmail","value","blockContent","block","toggleClass","undefined","getFormData","more","data","serializeJSON","extend","replaceMainContent","newContent","$newContent","replaceWith","updateCurrency","m","children","html","match","symbol","$option","text","val","replace","updatePrice","post","url","dataType","success","res","createPages","e","preventDefault","contents","filter","LP","email","re","test","select2","document","on","jQuery"],"sourceRoot":""}
assets/js/dist/admin/pages/setup.min.asset.php ADDED
@@ -0,0 +1 @@
 
1
+ <?php return array('dependencies' => array(), 'version' => 'd3c4b0e68d7d46a239f2');
assets/js/dist/admin/pages/statistic.asset.php ADDED
@@ -0,0 +1 @@
 
1
+ <?php return array('dependencies' => array(), 'version' => '00b01432cdb399eccf00');
assets/js/dist/admin/pages/statistic.js.map ADDED
@@ -0,0 +1 @@
 
1
+ {"version":3,"file":"./assets/js/dist/admin/pages/statistic.js","mappings":";;;;;AAAE,WAAUA,CAAV,EAAc;AACfA,EAAAA,CAAC,CAACC,EAAF,CAAKC,aAAL,GAAqB,UAAUC,IAAV,EAAgBC,MAAhB,EA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AE,CAAF,CAAP,CAAaG,KAAvB,CAAtC,EAAuE;AACtE,iBAAO,IAAP;AACA;AACD,OAJD;;AAKAxB,MAAAA,QAAQ,CAACyB,MAAT,CAAiB,iCAAjB,EAAqDnB,IAArD,CAA2D,UAA3D,EAAuEe,OAAO,CAACI,MAAR,CAAgB,YAAW;AACjG,eAAO,KAAKD,KAAL,IAAc,EAArB;AACA,OAFsE,EAEnEE,GAFmE,GAE7D3B,MAF6D,IAEnD,CAAEuB,WAAW,EAFjC;AAGA,KATa,CAAd;AAUA,GA1ID;;AA2IAvC,EAAAA,CAAC,CAAE,YAAW;AACb,QAAK,OAAOA,CAAC,CAACC,EAAF,CAAK8D,UAAZ,IAA0B,WAA/B,EAA6C;AAC5C/D,MAAAA,CAAC,CAAE,cAAF,CAAD,CAAoB+D,UAApB,CAAgC;AAC/BC,QAAAA,UAAU,EAAE;AADmB,OAAhC;AAGA;;AACDhE,IAAAA,CAAC,CAAE,8BAAF,CAAD,CAAoCc,kBAApC;AACAd,IAAAA,CAAC,CAAE,gCAAF,CAAD,CAAsC4C,oBAAtC;AACA5C,IAAAA,CAAC,CAAE,+BAAF,CAAD,CAAqC6C,mBAArC;AACA,GATA,CAAD;AAUA;AAEA,CAhRC,EAgRCoB,MAhRD,CAAF,C","sources":["webpack://learnpress/./assets/src/apps/js/admin/pages/statistic.js"],"sourcesContent":["( function( $ ) {\n\t$.fn.LP_Chart_Line = function( data, config ) {\n\t\treturn $.each( this, function() {\n\t\t\tconst $elem = $( this ),\n\t\t\t\t$canvas = $( '<canvas />' );\n\t\t\t$elem.html( '' );\n\t\t\t$canvas.appendTo( $elem );\n\t\t\tvar lineChart = new Chart($canvas,{\n\t\t\t\ttype: 'line',\n\t\t\t\tdata: data,\n\t\t\t\toptions: config\n\t\t\t})\n\t\t} );\n\t\t//\n\t};\n\n\t$.fn.LP_Statistic_Users = function() {\n\t\tif ( parseInt( $( this ).length ) === 0 ) {\n\t\t\treturn;\n\t\t}\n\t\treturn $.each( this, function() {\n\t\t\tconst $buttons = $( '.chart-buttons button' ).on( 'click', function() {\n\t\t\t\t\tconst $button = $( this ),\n\t\t\t\t\t\ttype = $button.data( 'type' );\n\t\t\t\t\tlet from = '',\n\t\t\t\t\t\tto = '';\n\t\t\t\t\t$buttons.not( this ).not( '[data-type=\"user-custom-time\"]' ).prop( 'disabled', false );\n\t\t\t\t\tif ( type == 'user-custom-time' ) {\n\t\t\t\t\t\tfrom = $( '#user-custom-time input[name=\"from\"]' ).val();\n\t\t\t\t\t\tto = $( '#user-custom-time input[name=\"to\"]' ).val();\n\n\t\t\t\t\t\tif ( from == '' || to == '' ) {\n\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$button.prop( 'disabled', true );\n\t\t\t\t\t}\n\n\t\t\t\t\tconst $container = $( '#learn-press-chart' );\n\t\t\t\t\t$container.addClass( 'loading' );\n\t\t\t\t\t$.ajax( {\n\t\t\t\t\t\turl: 'admin-ajax.php',\n\t\t\t\t\t\tdata: {\n\t\t\t\t\t\t\taction: 'learnpress_load_chart',\n\t\t\t\t\t\t\ttype,\n\t\t\t\t\t\t\trange: [ from, to ],\n\t\t\t\t\t\t},\n\t\t\t\t\t\tdataType: 'text',\n\t\t\t\t\t\tsuccess( response ) {\n\t\t\t\t\t\t\tresponse = LP.parseJSON( response );\n\t\t\t\t\t\t\t$container.LP_Chart_Line( response, LP_Chart_Config );\n\t\t\t\t\t\t\t$container.removeClass( 'loading' );\n\t\t\t\t\t\t},\n\t\t\t\t\t} );\n\t\t\t\t\treturn false;\n\t\t\t\t} ),\n\t\t\t\t$inputs = $( '.chart-buttons #user-custom-time input[type=\"text\"]' ).on( 'change', function() {\n\t\t\t\t\tconst _valid_date = function() {\n\t\t\t\t\t\tif ( new Date( $inputs[ 0 ].value ) < new Date( $inputs[ 1 ].value ) ) {\n\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\t\t\t\t\t$buttons.filter( '[data-type=\"user-custom-time\"]' ).prop( 'disabled', $inputs.filter( function() {\n\t\t\t\t\t\treturn this.value == '';\n\t\t\t\t\t} ).get().length || ! _valid_date() );\n\t\t\t\t} );\n\t\t} );\n\t};\n\n\t$.fn.LP_Statistic_Courses = function() {\n\t\tif ( parseInt( $( this ).length ) === 0 ) {\n\t\t\treturn;\n\t\t}\n\t\treturn $.each( this, function() {\n\t\t\tvar $buttons = $( '.chart-buttons button' ).on( 'click', function() {\n\t\t\t\t\tlet $button = $( this ),\n\t\t\t\t\t\ttype = $button.data( 'type' ),\n\t\t\t\t\t\tfrom = '',\n\t\t\t\t\t\tto = '',\n\t\t\t\t\t\t$container = $( '#learn-press-chart' );\n\t\t\t\t\t$buttons.not( this ).not( '[data-type=\"course-custom-time\"]' ).prop( 'disabled', false );\n\t\t\t\t\tif ( type == 'course-custom-time' ) {\n\t\t\t\t\t\tfrom = $( '#course-custom-time input[name=\"from\"]' ).val();\n\t\t\t\t\t\tto = $( '#course-custom-time input[name=\"to\"]' ).val();\n\n\t\t\t\t\t\tif ( from == '' || to == '' ) {\n\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$button.prop( 'disabled', true );\n\t\t\t\t\t}\n\t\t\t\t\t$container.addClass( 'loading' );\n\t\t\t\t\t$.ajax( {\n\t\t\t\t\t\turl: 'admin-ajax.php',\n\t\t\t\t\t\tdata: {\n\t\t\t\t\t\t\taction: 'learnpress_load_chart',\n\t\t\t\t\t\t\ttype,\n\t\t\t\t\t\t\trange: [ from, to ],\n\t\t\t\t\t\t},\n\t\t\t\t\t\tdataType: 'text',\n\t\t\t\t\t\tsuccess( response ) {\n\t\t\t\t\t\t\tresponse = LP.parseJSON( response );\n\t\t\t\t\t\t\t$container.LP_Chart_Line( response, LP_Chart_Config );\n\t\t\t\t\t\t\t$container.removeClass( 'loading' );\n\t\t\t\t\t\t},\n\t\t\t\t\t} );\n\t\t\t\t\treturn false;\n\t\t\t\t} ),\n\t\t\t\t$inputs = $( '.chart-buttons #course-custom-time input[type=\"text\"]' ).on( 'change', function() {\n\t\t\t\t\tconst _valid_date = function() {\n\t\t\t\t\t\tif ( new Date( $inputs[ 0 ].value ) < new Date( $inputs[ 1 ].value ) ) {\n\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\t\t\t\t\t$buttons.filter( '[data-type=\"course-custom-time\"]' ).prop( 'disabled', $inputs.filter( function() {\n\t\t\t\t\t\treturn this.value == '';\n\t\t\t\t\t} ).get().length || ! _valid_date() );\n\t\t\t\t} );\n\t\t} );\n\t};\n\n\t$.fn.LP_Statistic_Orders = function() {\n\t\tif ( parseInt( $( this ).length ) === 0 ) {\n\t\t\treturn;\n\t\t}\n\t\t$( '.panel_report_option' ).hide();\n\t\t$( '#panel_report_sales_by_' + $( '#report_sales_by' ).val() ).show();\n\t\t$( '#report_sales_by' ).on( 'change', function() {\n\t\t\t$( '.panel_report_option' ).hide();\n\t\t\t$( '#panel_report_sales_by_' + $( this ).val() ).show();\n\t\t\tif ( 'date' == $( this ).val() ) {\n\t\t\t\tLP_Statistic_Orders_Upgrade_Chart();\n\t\t\t}\n\t\t} );\n\n\t\t/**\n\t\t * Upgrade Chart for Order Statistics\n\t\t *\n\t\t * @return {boolean}\n\t\t */\n\t\tvar LP_Statistic_Orders_Upgrade_Chart = function() {\n\t\t\tlet type = '',\n\t\t\t\tfrom = '',\n\t\t\t\tto = '',\n\t\t\t\treport_sales_by = 'date',\n\t\t\t\tcat_id = 0,\n\t\t\t\tcourse_id = 0;\n\t\t\treport_sales_by = $( '#report_sales_by' ).val();\n\t\t\t$container = $( '#learn-press-chart' );\n\t\t\t$container.addClass( 'loading' );\n\t\t\t// get type\n\t\t\tconst $buttons = $( '.chart-buttons button:disabled' ).not( '[data-type=\"order-custom-time\"]' );\n\t\t\tif ( parseInt( $buttons.length ) > 0 ) {\n\t\t\t\ttype\t= $( $buttons[ 0 ] ).data( 'type' );\n\t\t\t} else {\n\t\t\t\ttype\t= 'order-custom-time';\n\t\t\t\tfrom\t= $( '#order-custom-time input[name=\"from\"]' ).val();\n\t\t\t\tto\t\t= $( '#order-custom-time input[name=\"to\"]' ).val();\n\t\t\t\tif ( from == '' || to == '' ) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( 'course' === report_sales_by ) {\n\t\t\t\tcourse_id = $( '#report-by-course-id' ).val();\n\t\t\t} else if ( 'category' === report_sales_by ) {\n\t\t\t\tcat_id = $( '#report-by-course-category-id' ).val();\n\t\t\t}\n\n\t\t\t$.ajax( {\n\t\t\t\turl: 'admin-ajax.php',\n\t\t\t\tdata: {\n\t\t\t\t\taction: 'learnpress_load_chart',\n\t\t\t\t\ttype,\n\t\t\t\t\trange: [ from, to ],\n\t\t\t\t\treport_sales_by,\n\t\t\t\t\tcourse_id,\n\t\t\t\t\tcat_id,\n\t\t\t\t},\n\t\t\t\tdataType: 'text',\n\t\t\t\tsuccess( response ) {\n\t\t\t\t\tresponse = LP.parseJSON( response );\n\t\t\t\t\t$container.LP_Chart_Line( response, LP_Chart_Config );\n\t\t\t\t\t$container.removeClass( 'loading' );\n\t\t\t\t},\n\t\t\t} );\n\t\t};\n\n\t\t$( '#report-by-course-id' ).select2( {\n\t\t\tplaceholder: 'Select a course',\n\t\t\tminimumInputLength: 1,\n\t\t\tajax: {\n\t\t\t\turl: ajaxurl + '?action=learnpress_search_course',\n\t\t\t\tdataType: 'json',\n\t\t\t\tquietMillis: 250,\n\t\t\t\tdata( term, page ) {\n\t\t\t\t\treturn {\n\t\t\t\t\t\tq: term, // search term\n\t\t\t\t\t};\n\t\t\t\t},\n\t\t\t\tresults( data, page ) {\n\t\t\t\t\treturn { results: data.items };\n\t\t\t\t},\n\t\t\t\tcache: true,\n\t\t\t},\n\t\t} );\n\n\t\t$( '#report-by-course-id' ).on( 'change', function() {\n\t\t\tLP_Statistic_Orders_Upgrade_Chart();\n\t\t} );\n\n\t\t$( '#report-by-course-category-id' ).select2( {\n\t\t\tplaceholder: 'Select a course',\n\t\t\tminimumInputLength: 1,\n\t\t\tajax: {\n\t\t\t\turl: ajaxurl + '?action=learnpress_search_course_category',\n\t\t\t\tdataType: 'json',\n\t\t\t\tquietMillis: 250,\n\t\t\t\tdata( term, page ) {\n\t\t\t\t\treturn {\n\t\t\t\t\t\tq: term, // search term\n\t\t\t\t\t};\n\t\t\t\t},\n\t\t\t\tresults( data, page ) {\n\t\t\t\t\treturn { results: data.items };\n\t\t\t\t},\n\t\t\t\tcache: true,\n\t\t\t},\n\t\t} );\n\n\t\t$( '#report-by-course-category-id' ).on( 'change', function() {\n\t\t\tLP_Statistic_Orders_Upgrade_Chart();\n\t\t} );\n\n\t\tvar $buttons = $( '.chart-buttons button' ).on( 'click', function() {\n\t\t\tconst $button = $( this ),\n\t\t\t\ttype = $button.data( 'type' ),\n\t\t\t\tfrom = '',\n\t\t\t\tto = '',\n\t\t\t\t$container = $( '#learn-press-chart' );\n\t\t\t$buttons.not( this ).not( '[data-type=\"order-custom-time\"]' ).prop( 'disabled', false );\n\t\t\tif ( type !== 'order-custom-time' ) {\n\t\t\t\t$button.prop( 'disabled', true );\n\t\t\t\t$( '#order-custom-time input[name=\"from\"]' ).val( '' );\n\t\t\t\t$( '#order-custom-time input[name=\"to\"]' ).val( '' );\n\t\t\t}\n\t\t\tLP_Statistic_Orders_Upgrade_Chart();\n\t\t\treturn false;\n\t\t} );\n\n\t\tvar $inputs = $( '.chart-buttons #order-custom-time input[type=\"text\"]' ).on( 'change', function() {\n\t\t\tconst _valid_date = function() {\n\t\t\t\tif ( new Date( $inputs[ 0 ].value ) < new Date( $inputs[ 1 ].value ) ) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t};\n\t\t\t$buttons.filter( '[data-type=\"order-custom-time\"]' ).prop( 'disabled', $inputs.filter( function() {\n\t\t\t\treturn this.value == '';\n\t\t\t} ).get().length || ! _valid_date() );\n\t\t} );\n\t};\n\t$( function() {\n\t\tif ( typeof $.fn.datepicker != 'undefined' ) {\n\t\t\t$( '.date-picker' ).datepicker( {\n\t\t\t\tdateFormat: 'yy/mm/dd',\n\t\t\t} );\n\t\t}\n\t\t$( '.learn-press-statistic-users' ).LP_Statistic_Users();\n\t\t$( '.learn-press-statistic-courses' ).LP_Statistic_Courses();\n\t\t$( '.learn-press-statistic-orders' ).LP_Statistic_Orders();\n\t} );\n\treturn;\n\n}( jQuery ) );\n\n\n"],"names":["$","fn","LP_Chart_Line","data","config","each","$elem","$canvas","html","appendTo","lineChart","Chart","type","options","LP_Statistic_Users","parseInt","length","$buttons","on","$button","from","to","not","prop","val","$container","addClass","ajax","url","action","range","dataType","success","response","LP","parseJSON","LP_Chart_Config","removeClass","$inputs","_valid_date","Date","value","filter","get","LP_Statistic_Courses","LP_Statistic_Orders","hide","show","LP_Statistic_Orders_Upgrade_Chart","report_sales_by","cat_id","course_id","select2","placeholder","minimumInputLength","ajaxurl","quietMillis","term","page","q","results","items","cache","datepicker","dateFormat","jQuery"],"sourceRoot":""}
assets/js/dist/admin/pages/statistic.min.asset.php ADDED
@@ -0,0 +1 @@
 
1
+ <?php return array('dependencies' => array(), 'version' => '29ac52b6368a2a3f9b35');
assets/js/dist/admin/pages/sync-data.asset.php ADDED
@@ -0,0 +1 @@
 
1
+ <?php return array('dependencies' => array(), 'version' => '2e728a52bec08b0ea710');
assets/js/dist/admin/pages/sync-data.js.map ADDED
@@ -0,0 +1 @@
 
1
+ {"version":3,"file":"./assets/js/dist/admin/pages/sync-data.js","mappings":";;;;;AAAE,WAAUA,CAAV,EAAc;AACf,QAAMC,SAAS,GAAG;AACjBC,IAAAA,EAAE,EAAE,WADa;AAEjBC,IAAAA,OAAO,EAAE,KAFQ;AAGjBC,IAAAA,KAAK,EAAE,KAHU;AAIjBC,IAAAA,SAAS,EAAE,KAJM;AAKjBC,IAAAA,QAAQ,EAAE,IALO;AAMjBC,IAAAA,cAAc,EAAE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CAAD,CAA4BkE,IAA5B,CAAkC,kBAAkBxD,IAAlB,GAAyB,IAA3D,CAAP;AACA;;AAED2B,IAAAA,YAAY,CAACG,KAAb,CAAoB;AACnBC,MAAAA,MAAM,GAAG;AACRzC,QAAAA,CAAC,CAAE,sBAAF,CAAD,CAA4BwE,QAA5B,GAAuCC,WAAvC,CAAoD,gBAApD;AACAzE,QAAAA,CAAC,CAAE,mBAAF,CAAD,CAAyBoE,IAAzB,CAA+B,UAA/B,EAA2C,IAA3C;AACA,OAJkB;;AAKnB1B,MAAAA,OAAO,CAAEO,KAAF,EAAU;AAChBsB,QAAAA,QAAQ,CAAEtB,KAAK,CAAC/C,EAAR,CAAR,CAAqBwE,OAArB,CAA8B,IAA9B,EAAqCC,QAArC,CAA+C,SAA/C;AACA,OAPkB;;AAQnBhC,MAAAA,WAAW,CAAEM,KAAF,EAAU;AACpBsB,QAAAA,QAAQ,CAAEtB,KAAK,CAAC/C,EAAR,CAAR,CAAqBwE,OAArB,CAA8B,IAA9B,EAAqCD,WAArC,CAAkD,SAAlD,EAA8DE,QAA9D,CAAwE,QAAxE;AACA,OAVkB;;AAWnB/B,MAAAA,cAAc,GAAG;AAChB5C,QAAAA,CAAC,CAAE,sBAAF,CAAD,CAA4BwE,QAA5B,GAAuCC,WAAvC,CAAoD,gBAApD;AACAzE,QAAAA,CAAC,CAAE,mBAAF,CAAD,CAAyBoE,IAAzB,CAA+B,UAA/B,EAA2C,KAA3C;AACA;;AAdkB,KAApB;AAgBA,GApCD;AAqCA,CArQC,EAqQCQ,MArQD,CAAF,C","sources":["webpack://learnpress/./assets/src/apps/js/admin/pages/sync-data.js"],"sourcesContent":["( function( $ ) {\n\tconst Sync_Base = {\n\t\tid: 'sync-base',\n\t\tsyncing: false,\n\t\titems: false,\n\t\tcompleted: false,\n\t\tcallback: null,\n\t\tmethodGetItems: '',\n\t\titemsKey: '',\n\t\tchunkSize: 50,\n\t\tsync( callback ) {\n\t\t\tif ( this.syncing ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tthis.callback = callback;\n\n\t\t\tif ( this.items === false ) {\n\t\t\t\tthis.get_items();\n\t\t\t} else if ( ! this.dispatch() ) {\n\t\t\t\tthis.completed = true;\n\t\t\t\tthis.callToCallback();\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tthis.syncing = true;\n\t\t},\n\t\tinit() {\n\t\t\tthis.syncing = false;\n\t\t\tthis.items = false;\n\t\t\tthis.completed = false;\n\t\t},\n\t\tis_completed() {\n\t\t\treturn this.completed;\n\t\t},\n\t\tdispatch() {\n\t\t\tconst that = this,\n\t\t\t\titems = this.items ? this.items.splice( 0, this.chunkSize ) : false;\n\t\t\tif ( ! items || items.length === 0 ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t$.ajax( {\n\t\t\t\turl: '',\n\t\t\t\tdata: {\n\t\t\t\t\t'lp-ajax': this.id,\n\t\t\t\t\tsync: items,\n\t\t\t\t},\n\t\t\t\tmethod: 'post',\n\t\t\t\tsuccess( response ) {\n\t\t\t\t\tresponse = LP.parseJSON( response );\n\t\t\t\t\tthat.syncing = false;\n\t\t\t\t\tif ( response.result !== 'success' ) {\n\t\t\t\t\t\tthat.completed = true;\n\t\t\t\t\t}\n\t\t\t\t\tthat.callToCallback();\n\t\t\t\t\tif ( that.is_completed() ) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tthat.sync( that.callback );\n\t\t\t\t},\n\t\t\t} );\n\n\t\t\treturn true;\n\t\t},\n\t\tcallToCallback() {\n\t\t\tthis.callback && this.callback.call( this );\n\t\t},\n\t\tget_items() {\n\t\t\tconst that = this;\n\t\t\t$.ajax( {\n\t\t\t\turl: '',\n\t\t\t\tdata: {\n\t\t\t\t\t'lp-ajax': this.id,\n\t\t\t\t\tsync: this.methodGetItems,\n\t\t\t\t},\n\t\t\t\tsuccess( response ) {\n\t\t\t\t\tthat.syncing = false;\n\t\t\t\t\tresponse = LP.parseJSON( response );\n\t\t\t\t\tif ( response[ that.itemsKey ] ) {\n\t\t\t\t\t\tthat.items = response[ that.itemsKey ];\n\t\t\t\t\t\tthat.sync( that.callback );\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthat.completed = true;\n\t\t\t\t\t\tthat.items = [];\n\t\t\t\t\t\tthat.callToCallback();\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t} );\n\t\t},\n\t};\n\n\tconst Sync_Course_Orders = $.extend( {}, Sync_Base, {\n\t\tid: 'sync-course-orders',\n\t\tmethodGetItems: 'get-courses',\n\t\titemsKey: 'courses',\n\t} );\n\n\tconst Sync_User_Courses = $.extend( {}, Sync_Base, {\n\t\tid: 'sync-user-courses',\n\t\tmethodGetItems: 'get-users',\n\t\titemsKey: 'users',\n\t\tchunkSize: 500,\n\t} );\n\n\tconst Sync_User_Orders = $.extend( {}, Sync_Base, {\n\t\tid: 'sync-user-orders',\n\t\tmethodGetItems: 'get-users',\n\t\titemsKey: 'users',\n\t\tchunkSize: 500,\n\t} );\n\n\tconst Sync_Course_Final_Quiz = $.extend( {}, Sync_Base, {\n\t\tid: 'sync-course-final-quiz',\n\t\tmethodGetItems: 'get-courses',\n\t\titemsKey: 'courses',\n\t\tchunkSize: 500,\n\t} );\n\n\tconst Sync_Remove_Older_Data = $.extend( {}, Sync_Base, {\n\t\tid: 'sync-remove-older-data',\n\t\tmethodGetItems: 'remove-older-data',\n\t\titemsKey: '_nothing_here',\n\t\tchunkSize: 500,\n\t} );\n\n\tconst Sync_Calculate_Course_Results = $.extend( {}, Sync_Base, {\n\t\tid: 'sync-calculate-course-results',\n\t\tmethodGetItems: 'get-users',\n\t\titemsKey: 'users',\n\t\tchunkSize: 1,\n\t} );\n\n\twindow.LP_Sync_Data = {\n\t\tsyncs: [],\n\t\tsyncing: 0,\n\t\toptions: {},\n\t\tstart( options ) {\n\t\t\tthis.syncs = [];\n\t\t\tthis.options = $.extend( {\n\t\t\t\tonInit() {\n\t\t\t\t},\n\t\t\t\tonStart() {\n\n\t\t\t\t},\n\t\t\t\tonCompleted() {\n\n\t\t\t\t},\n\t\t\t\tonCompletedAll() {\n\n\t\t\t\t},\n\t\t\t}, options || {} );\n\n\t\t\tif ( ! this.get_syncs() ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tthis.reset();\n\t\t\tthis.options.onInit.call( this );\n\t\t\tvar that = this,\n\t\t\t\tsyncing = 0,\n\t\t\t\ttotalSyncs = this.syncs.length,\n\t\t\t\tsyncCallback = function( $sync ) {\n\t\t\t\t\tif ( $sync.is_completed() ) {\n\t\t\t\t\t\tsyncing++;\n\t\t\t\t\t\tthat.options.onCompleted.call( that, $sync );\n\t\t\t\t\t\tif ( syncing >= totalSyncs ) {\n\t\t\t\t\t\t\tthat.options.onCompletedAll.call( that );\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tthat.sync( syncing, syncCallback );\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\tthis.sync( syncing, syncCallback );\n\t\t},\n\t\treset() {\n\t\t\tfor ( const sync in this.syncs ) {\n\t\t\t\ttry {\n\t\t\t\t\tthis[ this.syncs[ sync ] ].init();\n\t\t\t\t} catch ( e ) {\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tsync( sync, callback ) {\n\t\t\tconst that = this,\n\t\t\t\t$sync = this[ this.syncs[ sync ] ];\n\t\t\tthat.options.onStart.call( that, $sync );\n\t\t\t$sync.sync( function() {\n\t\t\t\tcallback.call( that, $sync );\n\t\t\t} );\n\t\t},\n\t\tget_syncs() {\n\t\t\tconst syncs = $( 'input[name^=\"lp-repair\"]:checked' ).serializeJSON()[ 'lp-repair' ];\n\t\t\tif ( ! syncs ) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tfor ( let sync in syncs ) {\n\t\t\t\tif ( syncs[ sync ] !== 'yes' ) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tsync = sync.replace( /[-]+/g, '_' );\n\n\t\t\t\tif ( ! this[ sync ] ) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tthis.syncs.push( sync );\n\t\t\t}\n\n\t\t\treturn this.syncs;\n\t\t},\n\t\tget_sync( id ) {\n\t\t\tid = id.replace( /[-]+/g, '_' );\n\t\t\treturn this[ id ];\n\t\t},\n\t\tsync_course_orders: Sync_Course_Orders,\n\t\tsync_user_orders: Sync_User_Orders,\n\t\tsync_user_courses: Sync_User_Courses,\n\t\tsync_course_final_quiz: Sync_Course_Final_Quiz,\n\t\tsync_remove_older_data: Sync_Remove_Older_Data,\n\t\tsync_calculate_course_results: Sync_Calculate_Course_Results,\n\t};\n\n\t$( document ).ready( function() {\n\t\tfunction initSyncs() {\n\t\t\tconst $chkAll = $( '#learn-press-check-all-syncs' ),\n\t\t\t\t$chks = $( '#learn-press-syncs' ).find( '[name^=\"lp-repair\"]' );\n\n\t\t\t$chkAll.on( 'click', function() {\n\t\t\t\t$chks.prop( 'checked', this.checked );\n\t\t\t} );\n\n\t\t\t$chks.on( 'click', function() {\n\t\t\t\t$chkAll.prop( 'checked', $chks.filter( ':checked' ).length === $chks.length );\n\t\t\t} );\n\t\t}\n\n\t\tinitSyncs();\n\t} ).on( 'click', '.lp-button-repair', function() {\n\t\tfunction getInput( sync ) {\n\t\t\treturn $( 'ul#learn-press-syncs' ).find( 'input[name*=\"' + sync + '\"]' );\n\t\t}\n\n\t\tLP_Sync_Data.start( {\n\t\t\tonInit() {\n\t\t\t\t$( 'ul#learn-press-syncs' ).children().removeClass( 'syncing synced' );\n\t\t\t\t$( '.lp-button-repair' ).prop( 'disabled', true );\n\t\t\t},\n\t\t\tonStart( $sync ) {\n\t\t\t\tgetInput( $sync.id ).closest( 'li' ).addClass( 'syncing' );\n\t\t\t},\n\t\t\tonCompleted( $sync ) {\n\t\t\t\tgetInput( $sync.id ).closest( 'li' ).removeClass( 'syncing' ).addClass( 'synced' );\n\t\t\t},\n\t\t\tonCompletedAll() {\n\t\t\t\t$( 'ul#learn-press-syncs' ).children().removeClass( 'syncing synced' );\n\t\t\t\t$( '.lp-button-repair' ).prop( 'disabled', false );\n\t\t\t},\n\t\t} );\n\t} );\n}( jQuery ) );\n"],"names":["$","Sync_Base","id","syncing","items","completed","callback","methodGetItems","itemsKey","chunkSize","sync","get_items","dispatch","callToCallback","init","is_completed","that","splice","length","ajax","url","data","method","success","response","LP","parseJSON","result","call","Sync_Course_Orders","extend","Sync_User_Courses","Sync_User_Orders","Sync_Course_Final_Quiz","Sync_Remove_Older_Data","Sync_Calculate_Course_Results","window","LP_Sync_Data","syncs","options","start","onInit","onStart","onCompleted","onCompletedAll","get_syncs","reset","totalSyncs","syncCallback","$sync","e","serializeJSON","replace","push","get_sync","sync_course_orders","sync_user_orders","sync_user_courses","sync_course_final_quiz","sync_remove_older_data","sync_calculate_course_results","document","ready","initSyncs","$chkAll","$chks","find","on","prop","checked","filter","getInput","children","removeClass","closest","addClass","jQuery"],"sourceRoot":""}
assets/js/dist/admin/pages/sync-data.min.asset.php ADDED
@@ -0,0 +1 @@
 
1
+ <?php return array('dependencies' => array(), 'version' => '403b09fb3a035e950b8f');
assets/js/dist/admin/pages/themes-addons.asset.php ADDED
@@ -0,0 +1 @@
 
1
+ <?php return array('dependencies' => array(), 'version' => '1824c46120753232bd00');
assets/js/dist/admin/pages/themes-addons.js.map ADDED
@@ -0,0 +1 @@
 
1
+ {"version":3,"file":"./assets/js/dist/admin/pages/themes-addons.js","mappings":";;;;;;;;;;;AAAE,WAAUA,CAAV,EAAc;AACf,MAAIC,KAAK,GAAG,IAAZ;AAAA,MACCC,MAAM,GAAG,IADV;AAAA,MAECC,WAAW,GAAG,IAFf;;AAIA,QAAMC,QAAQ,GAAG,UAAUC,OAAV,EAAoB;AACpC,QAAK,CAAEF,WAAP,EAAqB;AACpBA,MAAAA,WAAW,GAAGD,MAAM,CAACI,KAAP,EAAd;AACA;;AACD,UAAMC,QAAQ,GAAGF,OAAO,CAACG,WAAR,GAAsBC,KAAtB,CA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AAW,CAAC+B,EAAZ,CAAgBJ,CAAhB,CAAF,EAAuBC,KAAvB,CADpB;AAAA,YAECI,KAAK,GAAGJ,KAAK,CAACK,QAAN,GAAiBvB,MAF1B;AAIAkB,MAAAA,KAAK,CAACM,IAAN,CAAY,IAAZ,EAAmBpB,IAAnB,CAAyB,MAAzB,EAAkCe,IAAlC,CAAwCG,KAAxC;AACA,KAND;AAOA,GAlCD;;AAoCAnC,EAAAA,CAAC,CAAEsC,QAAF,CAAD,CAAcC,EAAd,CAAkB,OAAlB,EAA2B,kBAA3B,EAA+C,UAAUC,CAAV,EAAc;AAC5DvC,IAAAA,KAAK,IAAIwC,YAAY,CAAExC,KAAF,CAArB;AACAA,IAAAA,KAAK,GAAGyC,UAAU,CAAEtC,QAAF,EAAY,GAAZ,EAAiBoC,CAAC,CAACG,MAAF,CAASC,KAA1B,CAAlB;AACA,GAHD;AAKA5C,EAAAA,CAAC,CAAE,YAAW;AACbE,IAAAA,MAAM,GAAGF,CAAC,CAAE,gBAAF,CAAV;AACA,GAFA,CAAD;AAGA,CAjDC,EAiDC6C,MAjDD,CAAF;;AAmDA,MAAMC,kBAAkB,GAAG,MAAM,CAEhC,CAFD;;AAIA,+DAAeA,kBAAf;;;;;;UCvDA;UACA;;UAEA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;UAEA;UACA;;UAEA;UACA;UACA;;;;;WCtBA;WACA;WACA;WACA,uDAAuD,iBAAiB;WACxE;WACA,gDAAgD,aAAa;WAC7D;;;;;;;;;;;;ACNA;AAEAR,QAAQ,CAACS,gBAAT,CAA2B,kBAA3B,EAA+C,UAAUC,KAAV,EAAkB;AAChEF,EAAAA,2EAAkB;AAClB,CAFD,E","sources":["webpack://learnpress/./assets/src/apps/js/admin/pages/addons/search-lp-addons-themes.js","webpack://learnpress/webpack/bootstrap","webpack://learnpress/webpack/runtime/make namespace object","webpack://learnpress/./assets/src/apps/js/admin/pages/themes-addons.js"],"sourcesContent":["( function( $ ) {\n\tlet timer = null,\n\t\t$wraps = null,\n\t\t$cloneWraps = null;\n\n\tconst onSearch = function( keyword ) {\n\t\tif ( ! $cloneWraps ) {\n\t\t\t$cloneWraps = $wraps.clone();\n\t\t}\n\t\tconst keywords = keyword.toLowerCase().split( /\\s+/ ).filter( function( a, b ) {\n\t\t\treturn a.length >= 3;\n\t\t} );\n\t\tconst foundItems = function( $w1, $w2 ) {\n\t\t\treturn $w1.find( '.plugin-card' ).each( function() {\n\t\t\t\tconst $item = $( this ),\n\t\t\t\t\titemText = $item.find( '.item-title' ).text().toLowerCase(),\n\t\t\t\t\titemDesc = $item.find( '.column-description, .theme-description' ).text();\n\t\t\t\tconst found = function() {\n\t\t\t\t\tconst reg = new RegExp( keywords.join( '|' ), 'ig' );\n\t\t\t\t\treturn itemText.match( reg ) || itemDesc.match( reg );\n\t\t\t\t};\n\t\t\t\tif ( keywords.length ) {\n\t\t\t\t\tif ( found() ) {\n\t\t\t\t\t\tconst $clone = $item.clone();\n\t\t\t\t\t\t$w2.append( $clone );\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t$w2.append( $item.clone() );\n\t\t\t\t}\n\t\t\t} );\n\t\t};\n\n\t\t$wraps.each( function( i ) {\n\t\t\tconst $this = $( this ).html( '' ),\n\t\t\t\t$items = foundItems( $cloneWraps.eq( i ), $this ),\n\t\t\t\tcount = $this.children().length;\n\n\t\t\t$this.prev( 'h2' ).find( 'span' ).html( count );\n\t\t} );\n\t};\n\n\t$( document ).on( 'keyup', '.lp-search-addon', function( e ) {\n\t\ttimer && clearTimeout( timer );\n\t\ttimer = setTimeout( onSearch, 300, e.target.value );\n\t} );\n\n\t$( function() {\n\t\t$wraps = $( '.addons-browse' );\n\t} );\n}( jQuery ) );\n\nconst searchThemesAddons = () => {\n\n};\n\nexport default searchThemesAddons;\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// define __esModule on exports\n__webpack_require__.r = function(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};","import searchThemesAddons from './addons/search-lp-addons-themes';\n\ndocument.addEventListener( 'DOMContentLoaded', function( event ) {\n\tsearchThemesAddons();\n} );\n"],"names":["$","timer","$wraps","$cloneWraps","onSearch","keyword","clone","keywords","toLowerCase","split","filter","a","b","length","foundItems","$w1","$w2","find","each","$item","itemText","text","itemDesc","found","reg","RegExp","join","match","$clone","append","i","$this","html","$items","eq","count","children","prev","document","on","e","clearTimeout","setTimeout","target","value","jQuery","searchThemesAddons","addEventListener","event"],"sourceRoot":""}
assets/js/dist/admin/pages/themes-addons.min.asset.php ADDED
@@ -0,0 +1 @@
 
1
+ <?php return array('dependencies' => array(), 'version' => 'ea5d0c3c38755b706e56');
assets/js/dist/admin/pages/tools.asset.php ADDED
@@ -0,0 +1 @@
 
1
+ <?php return array('dependencies' => array('wp-element'), 'version' => 'fefd623f7ff09486f556');
assets/js/dist/admin/pages/tools.js CHANGED
@@ -469,6 +469,11 @@ const upgradeDB = () => {
469
 
470
  const scrollToStepCurrent = stepCurrent => {
471
  elItemStepCurrent = elGroupStep.find('input[value=' + stepCurrent + ']').closest('.lp-item-step');
 
 
 
 
 
472
  const offset = elItemStepCurrent.offset().top - _utils_lp_modal_overlay__WEBPACK_IMPORTED_MODULE_0__["default"].elMainContent.offset().top + _utils_lp_modal_overlay__WEBPACK_IMPORTED_MODULE_0__["default"].elMainContent.scrollTop();
473
  _utils_lp_modal_overlay__WEBPACK_IMPORTED_MODULE_0__["default"].elMainContent.stop().animate({
474
  scrollTop: offset
469
 
470
  const scrollToStepCurrent = stepCurrent => {
471
  elItemStepCurrent = elGroupStep.find('input[value=' + stepCurrent + ']').closest('.lp-item-step');
472
+
473
+ if (!elItemStepCurrent.length) {
474
+ return;
475
+ }
476
+
477
  const offset = elItemStepCurrent.offset().top - _utils_lp_modal_overlay__WEBPACK_IMPORTED_MODULE_0__["default"].elMainContent.offset().top + _utils_lp_modal_overlay__WEBPACK_IMPORTED_MODULE_0__["default"].elMainContent.scrollTop();
478
  _utils_lp_modal_overlay__WEBPACK_IMPORTED_MODULE_0__["default"].elMainContent.stop().animate({
479
  scrollTop: offset
assets/js/dist/admin/pages/tools.js.map ADDED
@@ -0,0 +1 @@
 
1
+ {"version":3,"file":"./assets/js/dist/admin/pages/tools.js","mappings":";;;;;;;;;;;;;AAAA;AACA;;AAEA,MAAME,cAAc,GAAG,MAAM;AAC5B,QAAMC,gBAAgB,GAAGC,QAAQ,CAACC,aAAT,CAAwB,yBAAxB,CAAzB;;AAEA,MAAK,CAAEF,gBAAP,EAA0B;AACzB;AACA;;AAED,QAAMG,mBAAmB,GAAGH,gBAAgB,CAACE,aAAjB,CAAgC,kBAAhC,CAA5B;AACAC,EAAAA,mBAAmB,CAACC,gBAApB,CAAsC,OAAtC,EAA+C,UAAUC,CAAV,EAAc;AAC5DA,IAAAA,CAAC,CAACC,cAAF;AACA,UAAMC,aAAa,GAAGN,QAAQ,CAACC,aAAT,CAAwB,mBAAxB,CAAtB;AACA,UAAMM,cAAc,GAAGD,aAAa,CAACE,gBAAd,CAAgC,aAAhC,CAAvB;AACA,UAAMC,UAAU,GAAGC,KAAK,CAACC,SAAN,CAAgBC,KAAhB,CAAsBC,IAAtB,CAA4BN,cAA5B,EAA6CO,IAA7C,CAAqDC,CAAF,IAASA,CAAC,CAACC,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AAjD,EACEpF,EADF,CACM,OADN,EACe,+BADf,EACgD4F,qBADhD,EAEE5F,EAFF,CAEM,OAFN,EAEe,0BAFf,EAE2C8F,cAF3C,EAGE9F,EAHF,CAGM,OAHN,EAGe,iCAHf,EAGkD+F,eAHlD,EAIE/F,EAJF,CAIM,OAJN,EAIe,oCAJf,EAIqDiG,aAJrD;AAKA,GAXA,CAAD;AAYA,CArHC,EAqHCtI,MArHD,CAAF,C","sources":["webpack://learnpress/./assets/src/apps/js/admin/pages/tools/database/clean_database.js","webpack://learnpress/./assets/src/apps/js/admin/pages/tools/database/create_indexs.js","webpack://learnpress/./assets/src/apps/js/admin/pages/tools/database/re-upgrade-db.js","webpack://learnpress/./assets/src/apps/js/admin/pages/tools/database/upgrade.js","webpack://learnpress/./assets/src/apps/js/admin/pages/tools/reset-data/course.js","webpack://learnpress/./assets/src/apps/js/admin/pages/tools/reset-data/index.js","webpack://learnpress/./assets/src/apps/js/utils/handle-ajax-api.js","webpack://learnpress/./assets/src/apps/js/utils/lp-modal-overlay.js","webpack://learnpress/external window [\"wp\",\"element\"]","webpack://learnpress/webpack/bootstrap","webpack://learnpress/webpack/runtime/compat get default export","webpack://learnpress/webpack/runtime/define property getters","webpack://learnpress/webpack/runtime/hasOwnProperty shorthand","webpack://learnpress/webpack/runtime/make namespace object","webpack://learnpress/./assets/src/apps/js/admin/pages/tools.js"],"sourcesContent":["import lpModalOverlay from '../../../../utils/lp-modal-overlay';\nimport handleAjax from '../../../../utils/handle-ajax-api';\n\nconst cleanDatabases = () => {\n\tconst elCleanDatabases = document.querySelector( '#lp-tool-clean-database' );\n\n\tif ( ! elCleanDatabases ) {\n\t\treturn;\n\t}\n\n\tconst elBtnCleanDatabases = elCleanDatabases.querySelector( '.lp-btn-clean-db' );\n\telBtnCleanDatabases.addEventListener( 'click', function( e ) {\n\t\te.preventDefault();\n\t\tconst elToolsSelect = document.querySelector( '#tools-select__id' );\n\t\tconst ElToolSelectLi = elToolsSelect.querySelectorAll( 'ul li input' );\n\t\tconst checkedOne = Array.prototype.slice.call( ElToolSelectLi ).some( ( x ) => x.checked );\n\t\tconst prepareMessage = elCleanDatabases.querySelector( '.tools-prepare__message' );\n\t\tif ( checkedOne == false ) {\n\t\t\tprepareMessage.style.display = 'block';\n\t\t\tprepareMessage.textContent = 'You must choose at least one table to take this action';\n\t\t\treturn;\n\t\t}\n\t\tprepareMessage.style.display = 'none';\n\n\t\tconst elLoading = elCleanDatabases.querySelector( '.wrapper-lp-loading' );\n\t\tif ( ! lpModalOverlay.init() ) {\n\t\t\treturn;\n\t\t}\n\n\t\tlpModalOverlay.elLPOverlay.show();\n\t\tlpModalOverlay.setContentModal( elLoading.innerHTML );\n\t\tlpModalOverlay.setTitleModal( elCleanDatabases.querySelector( 'h2' ).textContent );\n\t\tlpModalOverlay.elBtnYes[ 0 ].style.display = 'inline-block';\n\t\tlpModalOverlay.elBtnYes[ 0 ].textContent = 'Run';\n\t\tlpModalOverlay.elBtnNo[ 0 ].textContent = 'Close';\n\t\tconst listTables = new Array();\n\t\tconst ElToolSelectLiCheked = elToolsSelect.querySelectorAll( 'ul li input:checked' );\n\t\tElToolSelectLiCheked.forEach( ( e ) => {\n\t\t\tlistTables.push( e.value );\n\t\t} );\n\t\tconst tables = listTables[ 0 ];\n\t\tconst item = elLoading.querySelector( '.progressbar__item' );\n\n\t\tconst itemtotal = item.getAttribute( 'data-total' );\n\t\tconst modal = document.querySelector( '.lp-modal-body .main-content' );\n\t\tconst notice = modal.querySelector( '.lp-tool__message' );\n\t\tif ( itemtotal <= 0 ) {\n\t\t\tlpModalOverlay.elBtnYes[ 0 ].style.display = 'none';\n\t\t\tnotice.textContent = ( 'There is no data that need to be repaired in the chosen tables' );\n\t\t\tnotice.style.display = 'block';\n\t\t\treturn;\n\t\t}\n\t\tlpModalOverlay.callBackYes = () => {\n\t\t\t// warn user before doing\n\t\t\tconst r = confirm( 'The modified data is impossible to be restored. Please backup your website before doing this.' );\n\t\t\tif ( r == false ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tconst modal = document.querySelector( '.lp-modal-body .main-content' );\n\t\t\tconst notice = modal.querySelector( '.lp-tool__message' );\n\t\t\tnotice.textContent = 'This action is in processing. Don\\'t close this page';\n\t\t\tnotice.style.display = 'block';\n\t\t\tconst url = '/lp/v1/admin/tools/clean-tables';\n\t\t\tconst params = { tables, itemtotal };\n\n\t\t\tlpModalOverlay.elBtnNo[ 0 ].style.display = 'none';\n\t\t\tlpModalOverlay.elBtnYes[ 0 ].style.display = 'none';\n\n\t\t\tconst functions = {\n\t\t\t\tsuccess: ( res ) => {\n\t\t\t\t\tconst { status, message, data: { processed, percent } } = res;\n\t\t\t\t\tconst modalItem = modal.querySelector( '.progressbar__item' );\n\t\t\t\t\tconst progressBarRows = modalItem.querySelector( '.progressbar__rows' );\n\t\t\t\t\tconst progressPercent = modalItem.querySelector( '.progressbar__percent' );\n\t\t\t\t\tconst progressValue = modalItem.querySelector( '.progressbar__value' );\n\n\t\t\t\t\tconsole.log( status );\n\t\t\t\t\tif ( 'success' === status ) {\n\t\t\t\t\t\tsetTimeout( () => {\n\t\t\t\t\t\t\thandleAjax( url, params, functions );\n\t\t\t\t\t\t}, 2000 );\n\t\t\t\t\t\t// update processed quantity\n\t\t\t\t\t\tprogressBarRows.textContent = processed + ' / ' + itemtotal;\n\t\t\t\t\t\t// update percent\n\t\t\t\t\t\tprogressPercent.textContent = '( ' + percent + '%' + ' )';\n\t\t\t\t\t\t// update percent width\n\t\t\t\t\t\tprogressValue.style.width = percent + '%';\n\t\t\t\t\t} else if ( 'finished' === status ) {\n\t\t\t\t\t\t// Re-update indexs\n\t\t\t\t\t\tprogressBarRows.textContent = itemtotal + ' / ' + itemtotal;\n\t\t\t\t\t\tprogressPercent.textContent = '( 100% )';\n\t\t\t\t\t\t// Update complete nofication\n\t\t\t\t\t\tconst modal = document.querySelector( '.lp-modal-body .main-content' );\n\t\t\t\t\t\tconst notice = modal.querySelector( '.lp-tool__message' );\n\t\t\t\t\t\tnotice.textContent = 'Process has been completed. Press click the finish button to close this popup';\n\t\t\t\t\t\tnotice.style.color = 'white';\n\t\t\t\t\t\tnotice.style.background = 'green';\n\t\t\t\t\t\tprogressValue.style.width = '100%';\n\t\t\t\t\t\t// Show finish button\n\t\t\t\t\t\tlpModalOverlay.elBtnNo[ 0 ].style.display = 'inline-block';\n\t\t\t\t\t\tlpModalOverlay.elBtnNo[ 0 ].textContent = 'Finish';\n\t\t\t\t\t\tlpModalOverlay.elBtnNo[ 0 ].addEventListener( 'click', function() {\n\t\t\t\t\t\t\tlocation.reload();\n\t\t\t\t\t\t} );\n\t\t\t\t\t} else {\n\t\t\t\t\t\tconsole.log( message );\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\terror: ( err ) => {\n\t\t\t\t\tconsole.log( err );\n\t\t\t\t},\n\t\t\t\tcompleted: () => {\n\n\t\t\t\t},\n\t\t\t};\n\t\t\thandleAjax( url, params, functions );\n\t\t};\n\t} );\n};\nexport default cleanDatabases;\n","import lpModalOverlay from '../../../../utils/lp-modal-overlay';\nimport handleAjax from '../../../../utils/handle-ajax-api';\n\nconst createIndexes = () => {\n\tconst elCreateIndexTables = document.querySelector( '#lp-tool-create-indexes-tables' );\n\n\tif ( ! elCreateIndexTables ) {\n\t\treturn;\n\t}\n\n\tconst elBtnCreateIndexes = elCreateIndexTables.querySelector( '.lp-btn-create-indexes' );\n\n\telBtnCreateIndexes.addEventListener( 'click', ( e ) => {\n\t\te.preventDefault();\n\t\tconst elLoading = elCreateIndexTables.querySelector( '.wrapper-lp-loading' );\n\n\t\tif ( ! lpModalOverlay.init() ) {\n\t\t\treturn;\n\t\t}\n\n\t\tlpModalOverlay.elLPOverlay.show();\n\t\tlpModalOverlay.setContentModal( elLoading.innerHTML );\n\t\tlpModalOverlay.setTitleModal( elCreateIndexTables.querySelector( 'h2' ).textContent );\n\t\tlpModalOverlay.elBtnYes[ 0 ].style.display = 'inline-block';\n\t\tlpModalOverlay.elBtnYes[ 0 ].textContent = 'Run';\n\t\tlpModalOverlay.elBtnNo[ 0 ].textContent = 'Close';\n\n\t\tconst url = '/lp/v1/admin/tools/list-tables-indexs';\n\t\tconst params = {};\n\t\tconst functions = {\n\t\t\tsuccess: ( res ) => {\n\t\t\t\tconst { status, message, data: { tables, table } } = res;\n\t\t\t\tconst elSteps = document.querySelector( '.example-lp-group-step' );\n\n\t\t\t\tlpModalOverlay.setContentModal( elSteps.innerHTML );\n\n\t\t\t\tconst elGroupStep = lpModalOverlay.elLPOverlay[ 0 ].querySelector( '.lp-group-step ' );\n\n\t\t\t\t// Show progress when upgrading.\n\t\t\t\tconst showProgress = ( stepCurrent, percent ) => {\n\t\t\t\t\tconst elItemStepCurrent = elGroupStep.querySelector( 'input[value=' + stepCurrent + ']' ).closest( '.lp-item-step' );\n\t\t\t\t\telItemStepCurrent.classList.add( 'running' );\n\n\t\t\t\t\tif ( 100 === percent ) {\n\t\t\t\t\t\telItemStepCurrent.classList.remove( 'running' );\n\t\t\t\t\t\telItemStepCurrent.classList.add( 'completed' );\n\t\t\t\t\t}\n\n\t\t\t\t\tconst progressBar = elItemStepCurrent.querySelector( '.progress-bar' );\n\t\t\t\t\tprogressBar.style.width = percent;\n\t\t\t\t};\n\n\t\t\t\t// Scroll to step current.\n\t\t\t\tconst scrollToStepCurrent = ( stepCurrent ) => {\n\t\t\t\t\tconst elItemStepCurrent = elGroupStep.querySelector( 'input[value=' + stepCurrent + ']' ).closest( '.lp-item-step' );\n\n\t\t\t\t\tconst offset = elItemStepCurrent.offsetTop - lpModalOverlay.elMainContent[ 0 ].offsetTop +\n\t\t\t\t\t\tlpModalOverlay.elMainContent[ 0 ].scrollTop;\n\n\t\t\t\t\tlpModalOverlay.elMainContent.stop().animate( {\n\t\t\t\t\t\tscrollTop: offset,\n\t\t\t\t\t}, 600 );\n\t\t\t\t};\n\n\t\t\t\tfor ( const table in tables ) {\n\t\t\t\t\tconst elItemStep = lpModalOverlay.elLPOverlay[ 0 ].querySelector( '.lp-item-step' ).cloneNode( true );\n\t\t\t\t\tconst input = elItemStep.querySelector( 'input' );\n\t\t\t\t\tconst label = elItemStep.querySelector( 'label' );\n\n\t\t\t\t\tlabel.textContent = `Table: ${ table }`;\n\t\t\t\t\tinput.value = table;\n\n\t\t\t\t\telGroupStep.append( elItemStep );\n\t\t\t\t}\n\n\t\t\t\tlpModalOverlay.callBackYes = () => {\n\t\t\t\t\tconst url = '/lp/v1/admin/tools/create-indexs';\n\t\t\t\t\tconst params = { tables, table };\n\n\t\t\t\t\tlpModalOverlay.elBtnNo[ 0 ].style.display = 'none';\n\t\t\t\t\tlpModalOverlay.elBtnYes[ 0 ].style.display = 'none';\n\n\t\t\t\t\tshowProgress( table, 0.1 );\n\n\t\t\t\t\tconst functions = {\n\t\t\t\t\t\tsuccess: ( res ) => {\n\t\t\t\t\t\t\tconst { status, message, data: { table, percent } } = res;\n\n\t\t\t\t\t\t\tshowProgress( params.table, percent );\n\n\t\t\t\t\t\t\tif ( undefined !== table ) {\n\t\t\t\t\t\t\t\tif ( params.table !== table ) {\n\t\t\t\t\t\t\t\t\tshowProgress( table, 0.1 );\n\t\t\t\t\t\t\t\t\tscrollToStepCurrent( table );\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tparams.table = table;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif ( 'success' === status ) {\n\t\t\t\t\t\t\t\tsetTimeout( () => {\n\t\t\t\t\t\t\t\t\thandleAjax( url, params, functions );\n\t\t\t\t\t\t\t\t}, 2000 );\n\t\t\t\t\t\t\t} else if ( 'finished' === status ) {\n\t\t\t\t\t\t\t\tconsole.log( 'finished' );\n\t\t\t\t\t\t\t\tlpModalOverlay.elBtnNo[ 0 ].style.display = 'inline-block';\n\t\t\t\t\t\t\t\tlpModalOverlay.elBtnNo[ 0 ].textContent = 'Finish';\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tconsole.log( message );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t},\n\t\t\t\t\t\terror: ( err ) => {\n\t\t\t\t\t\t\tconsole.log( err );\n\t\t\t\t\t\t},\n\t\t\t\t\t\tcompleted: () => {\n\n\t\t\t\t\t\t},\n\t\t\t\t\t};\n\t\t\t\t\thandleAjax( url, params, functions );\n\t\t\t\t};\n\t\t\t},\n\t\t\terror: ( err ) => {\n\n\t\t\t},\n\t\t\tcompleted: () => {\n\n\t\t\t},\n\t\t};\n\n\t\thandleAjax( url, params, functions );\n\t} );\n};\n\nexport default createIndexes;\n","import lpModalOverlay from '../../../../utils/lp-modal-overlay';\nimport handleAjax from '../../../../utils/handle-ajax-api';\n\nconst reUpgradeDB = () => {\n\tconst elToolReUpgradeDB = document.querySelector( '#lp-tool-re-upgrade-db' );\n\n\tif ( ! elToolReUpgradeDB ) {\n\t\treturn;\n\t}\n\n\t// Check valid to show popup re-upgrade\n\tlet url = 'lp/v1/database/check-db-valid-re-upgrade';\n\thandleAjax( url, {}, {\n\t\tsuccess( res ) {\n\t\t\tconst { data: { can_re_upgrade } } = res;\n\n\t\t\tif ( ! can_re_upgrade ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\telToolReUpgradeDB.style.display = 'block';\n\n\t\t\tconst elBtnReUpradeDB = elToolReUpgradeDB.querySelector( '.lp-btn-re-upgrade-db' );\n\t\t\tconst elMessage = elToolReUpgradeDB.querySelector( '.learn-press-message' );\n\n\t\t\telBtnReUpradeDB.addEventListener( 'click', () => {\n\t\t\t\t// eslint-disable-next-line no-alert\n\t\t\t\tif ( confirm( 'Are you want to Re Upgrade!' ) ) {\n\t\t\t\t\turl = 'lp/v1/database/del-tb-lp-upgrade-db';\n\t\t\t\t\thandleAjax( url, {}, {\n\t\t\t\t\t\tsuccess( res ) {\n\t\t\t\t\t\t\tconst { status, message, data: { url } } = res;\n\n\t\t\t\t\t\t\tif ( 'success' === status && undefined !== url ) {\n\t\t\t\t\t\t\t\twindow.location.href = url;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t},\n\t\t\t\t\t\terror( err ) {\n\t\t\t\t\t\t\telMessage.classList.add( 'error' );\n\t\t\t\t\t\t\telMessage.textContent = err.message;\n\t\t\t\t\t\t\telMessage.style.display = 'block';\n\t\t\t\t\t\t},\n\t\t\t\t\t} );\n\t\t\t\t}\n\t\t\t} );\n\t\t},\n\t\terror( err ) {\n\n\t\t},\n\t} );\n};\n\nexport default reUpgradeDB;\n","import lpModalOverlay from '../../../../utils/lp-modal-overlay';\nimport handleAjax from '../../../../utils/handle-ajax-api';\n\nconst $ = jQuery;\n\nconst elToolUpgradeDB = $( '#lp-tool-upgrade-db' );\n\nconst upgradeDB = () => {\n\tlet isUpgrading = 0;\n\tconst elWrapperTermsUpgrade = elToolUpgradeDB.find( '.wrapper-terms-upgrade' );\n\tconst elStatusUpgrade = elToolUpgradeDB.find( '.wrapper-lp-status-upgrade' );\n\tconst elWrapperUpgradeMessage = elToolUpgradeDB.find( '.wrapper-lp-upgrade-message' );\n\tlet checkValidBeforeUpgrade = null;\n\n\tif ( elWrapperTermsUpgrade.length ) { // Show Terms Upgrade.\n\t\tlpModalOverlay.setContentModal( elWrapperTermsUpgrade.html() );\n\n\t\tconst elTermUpdate = lpModalOverlay.elLPOverlay.find( '.terms-upgrade' );\n\t\tconst elLPAgreeTerm = elTermUpdate.find( 'input[name=lp-agree-term]' );\n\t\tconst elTermMessage = elTermUpdate.find( '.error' );\n\t\tconst elMessageUpgrading = $( 'input[name=message-when-upgrading]' ).val();\n\n\t\tcheckValidBeforeUpgrade = function() {\n\t\t\telTermMessage.hide();\n\t\t\telTermMessage.removeClass( 'learn-press-message' );\n\n\t\t\tif ( elLPAgreeTerm.is( ':checked' ) ) {\n\t\t\t\thandleAjax( '/lp/v1/database/agree_terms', { agree_terms: 1 }, {} );\n\n\t\t\t\tlpModalOverlay.elFooter.find( '.learn-press-notice' ).remove();\n\t\t\t\tlpModalOverlay.elFooter.prepend( '<span class=\"learn-press-notice\">' + elMessageUpgrading + '</span>' );\n\t\t\t\tlpModalOverlay.setContentModal( elStatusUpgrade.html() );\n\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\telTermMessage.show();\n\t\t\telTermMessage.addClass( 'learn-press-message' );\n\t\t\tlpModalOverlay.elMainContent.animate( {\n\t\t\t\tscrollTop: elTermMessage.offset().top,\n\t\t\t} );\n\n\t\t\treturn false;\n\t\t};\n\t} else { // Show Steps Upgrade.\n\t\tlpModalOverlay.setContentModal( elStatusUpgrade.html() );\n\t\tcheckValidBeforeUpgrade = function() {\n\t\t\treturn true;\n\t\t};\n\t}\n\n\tlpModalOverlay.setTitleModal( elToolUpgradeDB.find( 'h2' ).html() );\n\tlpModalOverlay.elBtnYes.text( 'Upgrade' );\n\tlpModalOverlay.elBtnYes.show();\n\tlpModalOverlay.elBtnNo.text( 'close' );\n\tlpModalOverlay.callBackYes = function() {\n\t\tif ( ! checkValidBeforeUpgrade() ) {\n\t\t\treturn;\n\t\t}\n\n\t\tisUpgrading = 1;\n\n\t\tlpModalOverlay.elBtnYes.hide();\n\t\tlpModalOverlay.elBtnNo.hide();\n\n\t\tconst urlHandle = '/lp/v1/database/upgrade';\n\t\tconst elGroupStep = lpModalOverlay.elLPOverlay.find( '.lp-group-step' );\n\t\tconst elItemSteps = elToolUpgradeDB.find( '.lp-item-step' );\n\n\t\t// Get params.\n\t\tconst steps = [];\n\n\t\t$.each( elItemSteps, function( i, el ) {\n\t\t\tconst elItemStepsTmp = $( el );\n\n\t\t\tif ( ! elItemStepsTmp.hasClass( 'completed' ) ) {\n\t\t\t\tconst step = elItemStepsTmp.find( 'input' ).val();\n\t\t\t\tsteps.push( step );\n\t\t\t}\n\t\t} );\n\n\t\tconst params = {\n\t\t\tsteps,\n\t\t\tstep: steps[ 0 ],\n\t\t};\n\n\t\tlet elItemStepCurrent = null;\n\n\t\t// Show progress when upgrading.\n\t\tconst showProgress = ( stepCurrent, percent ) => {\n\t\t\telItemStepCurrent = elGroupStep.find( 'input[value=' + stepCurrent + ']' ).closest( '.lp-item-step' );\n\t\t\telItemStepCurrent.addClass( 'running' );\n\n\t\t\tif ( 100 === percent ) {\n\t\t\t\telItemStepCurrent.removeClass( 'running' ).addClass( 'completed' );\n\t\t\t}\n\n\t\t\telItemStepCurrent.find( '.progress-bar' ).css( 'width', percent + '%' );\n\t\t\telItemStepCurrent.find( '.percent' ).text( percent + '%' );\n\t\t};\n\n\t\t// Scroll to step current.\n\t\tconst scrollToStepCurrent = ( stepCurrent ) => {\n\t\t\telItemStepCurrent = elGroupStep.find( 'input[value=' + stepCurrent + ']' ).closest( '.lp-item-step' );\n\n\t\t\tif ( ! elItemStepCurrent.length ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst offset = elItemStepCurrent.offset().top - lpModalOverlay.elMainContent.offset().top +\n\t\t\t\tlpModalOverlay.elMainContent.scrollTop();\n\n\t\t\tlpModalOverlay.elMainContent.stop().animate( {\n\t\t\t\tscrollTop: offset,\n\t\t\t}, 600 );\n\t\t};\n\n\t\tshowProgress( steps[ 0 ], 0.1 );\n\n\t\tconst funcCallBack = {\n\t\t\tsuccess: ( res ) => {\n\t\t\t\tshowProgress( params.step, res.percent );\n\n\t\t\t\tif ( params.step !== res.name ) {\n\t\t\t\t\tshowProgress( res.name, 0.1 );\n\t\t\t\t}\n\n\t\t\t\tscrollToStepCurrent( params.step );\n\n\t\t\t\tif ( 'success' === res.status ) {\n\t\t\t\t\tparams.step = res.name;\n\t\t\t\t\tparams.data = res.data;\n\n\t\t\t\t\tsetTimeout( () => {\n\t\t\t\t\t\thandleAjax( urlHandle, params, funcCallBack );\n\t\t\t\t\t}, 800 );\n\t\t\t\t} else if ( 'finished' === res.status ) {\n\t\t\t\t\tisUpgrading = 0;\n\t\t\t\t\telItemStepCurrent.removeClass( 'running' ).addClass( 'completed' );\n\t\t\t\t\tsetTimeout( () => {\n\t\t\t\t\t\tlpModalOverlay.setContentModal( elWrapperUpgradeMessage.html() );\n\t\t\t\t\t}, 1000 );\n\t\t\t\t\tlpModalOverlay.elFooter.find( '.learn-press-notice' ).remove();\n\t\t\t\t\tlpModalOverlay.elBtnNo.show();\n\t\t\t\t\tlpModalOverlay.elBtnNo.on( 'click', () => {\n\t\t\t\t\t\twindow.location.reload();\n\t\t\t\t\t} );\n\t\t\t\t} else {\n\t\t\t\t\tisUpgrading = 0;\n\t\t\t\t\tlpModalOverlay.elFooter.find( '.learn-press-notice' ).remove();\n\t\t\t\t\telItemStepCurrent.removeClass( 'running' ).addClass( 'error' );\n\t\t\t\t\tlpModalOverlay.setContentModal( elWrapperUpgradeMessage.html(), function() {\n\t\t\t\t\t\tlpModalOverlay.elBtnYes.text( 'Retry' ).show();\n\t\t\t\t\t\tlpModalOverlay.callBackYes = () => {\n\t\t\t\t\t\t\twindow.location.href = lpGlobalSettings.siteurl + '/wp-admin/admin.php?page=learn-press-tools&tab=database&action=upgrade-db';\n\t\t\t\t\t\t};\n\t\t\t\t\t\tlpModalOverlay.elBtnNo.show();\n\n\t\t\t\t\t\tif ( ! res.message ) {\n\t\t\t\t\t\t\tres.message = 'Upgrade not success! Please clear cache, restart sever then retry or contact to LP to help';\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tlpModalOverlay.elMainContent.find( '.learn-press-message' ).addClass( 'error' ).html( res.message );\n\t\t\t\t\t} );\n\t\t\t\t}\n\t\t\t},\n\t\t\terror: ( err ) => {\n\t\t\t\tisUpgrading = 0;\n\t\t\t\tlpModalOverlay.setContentModal( elWrapperUpgradeMessage.html(), function() {\n\t\t\t\t\tlpModalOverlay.elBtnYes.text( 'Retry' ).show();\n\t\t\t\t\tlpModalOverlay.callBackYes = () => {\n\t\t\t\t\t\twindow.location.location = 'wp-admin/admin.php?page=learn-press-tools&tab=database&action=upgrade-db';\n\t\t\t\t\t};\n\t\t\t\t\tlpModalOverlay.elBtnNo.show();\n\n\t\t\t\t\tif ( ! err.message ) {\n\t\t\t\t\t\terr.message = 'Upgrade not success! Something wrong. Please clear cache, restart sever then retry or contact to LP to help';\n\t\t\t\t\t}\n\n\t\t\t\t\tlpModalOverlay.elMainContent.find( '.learn-press-message' ).addClass( 'error' ).html( err.message );\n\t\t\t\t} );\n\t\t\t},\n\t\t\tcompleted: () => {\n\n\t\t\t},\n\t\t};\n\n\t\thandleAjax( urlHandle, params, funcCallBack );\n\t};\n\n\t// Show confirm if, within upgrading, the user reload the page.\n\twindow.onbeforeunload = function() {\n\t\tif ( isUpgrading ) {\n\t\t\treturn 'LP is upgrading Database. Are you want to reload page?';\n\t\t}\n\t};\n\n\t// Show confirm if, within upgrading, the user close the page.\n\twindow.onclose = function() {\n\t\tif ( isUpgrading ) {\n\t\t\treturn 'LP is upgrading Database. Are you want to close page?';\n\t\t}\n\t};\n};\n\nconst getStepsUpgradeStatus = () => {\n\tif ( ! elToolUpgradeDB.length ) {\n\t\treturn;\n\t}\n\n\t// initial LP Modal Overlay\n\tif ( ! lpModalOverlay.init() ) {\n\t\treturn;\n\t}\n\n\tconst elWrapperStatusUpgrade = $( '.wrapper-lp-status-upgrade' );\n\tconst urlHandle = '/lp/v1/database/get_steps';\n\n\t// Show dialog upgrade database.\n\tconst queryString = window.location.search;\n\tconst urlParams = new URLSearchParams( queryString );\n\tconst action = urlParams.get( 'action' );\n\n\tif ( 'upgrade-db' === action ) {\n\t\tlpModalOverlay.elLPOverlay.show();\n\t\tlpModalOverlay.setTitleModal( elToolUpgradeDB.find( 'h2' ).html() );\n\t\tlpModalOverlay.setContentModal( $( '.wrapper-lp-loading' ).html() );\n\t}\n\n\tconst funcCallBack = {\n\t\tsuccess: ( res ) => {\n\t\t\tconst { steps_completed, steps_default } = res;\n\n\t\t\tif ( undefined === steps_completed || undefined === steps_default ) {\n\t\t\t\tconsole.log( 'invalid steps_completed and steps_default' );\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t// Render show Steps.\n\t\t\tlet htmlStep = '';\n\t\t\tfor ( const k_gr_steps in steps_default ) {\n\t\t\t\tconst step_group = steps_default[ k_gr_steps ];\n\t\t\t\tconst steps = step_group.steps;\n\n\t\t\t\thtmlStep = '<div class=\"lp-group-step\">';\n\t\t\t\thtmlStep += '<h3>' + step_group.label + '</h3>';\n\n\t\t\t\tfor ( const k_step in steps ) {\n\t\t\t\t\tconst step = steps[ k_step ];\n\t\t\t\t\tlet completed = '';\n\n\t\t\t\t\tif ( undefined !== steps_completed[ k_step ] ) {\n\t\t\t\t\t\tcompleted = 'completed';\n\t\t\t\t\t}\n\n\t\t\t\t\thtmlStep += '<div class=\"lp-item-step ' + completed + '\">';\n\t\t\t\t\thtmlStep += '<div class=\"lp-item-step-left\"><input type=\"hidden\" name=\"lp_steps_upgrade_db[]\" value=\"' + step.name + '\" /></div>';\n\t\t\t\t\thtmlStep += '<div class=\"lp-item-step-right\">';\n\t\t\t\t\thtmlStep += '<label for=\"\"><strong></strong>' + step.label + '</label>';\n\t\t\t\t\thtmlStep += '<div class=\"description\">' + step.description + '</div>';\n\t\t\t\t\thtmlStep += '<div class=\"percent\"></div>';\n\t\t\t\t\thtmlStep += '<span class=\"progress-bar\"></span>';\n\t\t\t\t\thtmlStep += '</div>';\n\t\t\t\t\thtmlStep += '</div>';\n\t\t\t\t}\n\n\t\t\t\thtmlStep += '</div>';\n\n\t\t\t\telWrapperStatusUpgrade.append( htmlStep );\n\n\t\t\t\tconst elBtnUpgradeDB = $( '.lp-btn-upgrade-db' );\n\n\t\t\t\tif ( 'upgrade-db' === action ) {\n\t\t\t\t\tupgradeDB();\n\t\t\t\t}\n\n\t\t\t\telBtnUpgradeDB.on( 'click', function() {\n\t\t\t\t\tlpModalOverlay.elLPOverlay.show();\n\t\t\t\t\tupgradeDB();\n\t\t\t\t} );\n\t\t\t}\n\t\t},\n\t\terror: ( err ) => {\n\n\t\t},\n\t\tcompleted: () => {\n\n\t\t},\n\t};\n\n\thandleAjax( urlHandle, {}, funcCallBack );\n};\n\nexport default getStepsUpgradeStatus;\n","/**\n * Reset course progress.\n *\n * @since 4.0.5.\n * @author Nhamdv - Code choi choi in Physcode.\n */\nconst { __ } = wp.i18n;\nconst { TextControl, Button, Spinner, CheckboxControl, Notice } = wp.components;\nconst { useState, useEffect } = wp.element;\nconst { addQueryArgs } = wp.url;\n\nconst ResetCourse = () => {\n\tconst [ loading, setLoading ] = useState( false );\n\tconst [ search, setSearch ] = useState( '' );\n\tconst [ data, setData ] = useState( [] );\n\tconst [ checkData, setCheckData ] = useState( [] );\n\tconst [ message, setMessage ] = useState( [] );\n\tconst [ loadingReset, setLoadingReset ] = useState( false );\n\n\tuseEffect( () => {\n\t\tresponsiveData( search );\n\t}, [ search ] );\n\n\tconst responsiveData = async ( s ) => {\n\t\ttry {\n\t\t\tif ( ! s || loading ) {\n\t\t\t\tsetMessage( [] );\n\t\t\t\tsetData( [] );\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ( s.length < 3 ) {\n\t\t\t\tsetMessage( [ { status: 'error', message: 'Please enter at least 3 characters to searching course.' } ] );\n\t\t\t\tsetData( [] );\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tsetLoading( true );\n\n\t\t\tconst response = await wp.apiFetch( {\n\t\t\t\tpath: addQueryArgs( 'lp/v1/admin/tools/reset-data/search-courses', {\n\t\t\t\t\ts,\n\t\t\t\t} ),\n\t\t\t\tmethod: 'GET',\n\t\t\t} );\n\n\t\t\tconst { status, data } = response;\n\n\t\t\tsetLoading( false );\n\n\t\t\tif ( status === 'success' ) {\n\t\t\t\tsetData( data );\n\t\t\t\tsetMessage( [] );\n\t\t\t} else {\n\t\t\t\tsetMessage( [ { status: 'error', message: response.message || 'LearnPress: Search Course Fail!' } ] );\n\t\t\t\tsetData( [] );\n\t\t\t}\n\t\t} catch ( error ) {\n\t\t\tconsole.log( error.message );\n\t\t}\n\t};\n\n\tfunction checkItems( id ) {\n\t\tconst datas = [ ...checkData ];\n\n\t\tif ( datas.includes( id ) ) {\n\t\t\tconst index = datas.indexOf( id );\n\n\t\t\tif ( index > -1 ) {\n\t\t\t\tdatas.splice( index, 1 );\n\t\t\t}\n\t\t} else {\n\t\t\tdatas.push( id );\n\t\t}\n\n\t\tsetCheckData( datas );\n\t}\n\n\tconst resetCourse = async () => {\n\t\tif ( checkData.length === 0 ) {\n\t\t\tsetMessage( [ { status: 'error', message: 'Please chooce Course for reset data!' } ] );\n\t\t\treturn;\n\t\t}\n\n\t\t// eslint-disable-next-line no-alert\n\t\tif ( ! confirm( 'Are you sure to reset course progress of all users enrolled this course?' ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst notice = [];\n\n\t\ttry {\n\t\t\tsetLoadingReset( true );\n\n\t\t\tfor ( const courseId of checkData ) {\n\t\t\t\tconst response = await wp.apiFetch( {\n\t\t\t\t\tpath: addQueryArgs( 'lp/v1/admin/tools/reset-data/reset-courses', {\n\t\t\t\t\t\tcourseId,\n\t\t\t\t\t} ),\n\t\t\t\t\tmethod: 'GET',\n\t\t\t\t} );\n\n\t\t\t\tconst { status, data, message } = response;\n\n\t\t\t\tnotice.push( { status, message: message || `Course #${ courseId } reset successfully!` } );\n\t\t\t}\n\n\t\t\tsetLoadingReset( false );\n\t\t} catch ( error ) {\n\t\t\tnotice.push( { status: 'error', message: error.message || `LearnPress Error: Reset Course Data.` } );\n\t\t}\n\n\t\tsetMessage( notice );\n\t};\n\n\treturn (\n\t\t<>\n\t\t\t<h2>{ __( 'Reset course progress', 'learnpress' ) }</h2>\n\t\t\t<div className=\"description\">\n\t\t\t\t<p>{ __( 'This action will reset progress of a course for all users have enrolled.', 'learnpress' ) }</p>\n\t\t\t\t<p>{ __( 'Search results only show course have user data.', 'learnpress' ) }</p>\n\t\t\t\t<div>\n\t\t\t\t\t<TextControl\n\t\t\t\t\t\tplaceholder={ __( 'Search course by name', 'learnpress' ) }\n\t\t\t\t\t\tvalue={ search }\n\t\t\t\t\t\tonChange={ ( value ) => setSearch( value ) }\n\t\t\t\t\t\tstyle={ { width: 300 } }\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t</div>\n\n\t\t\t{ loading && <Spinner /> }\n\n\t\t\t{ data.length > 0 && (\n\t\t\t\t<>\n\t\t\t\t\t<div className=\"lp-reset-course_progress\" style={ {\n\t\t\t\t\t\tborder: '1px solid #eee',\n\t\t\t\t\t} }>\n\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t<div style={ { background: '#eee' } }>\n\t\t\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t\t\t<CheckboxControl\n\t\t\t\t\t\t\t\t\t\tchecked={ checkData.length === data.length }\n\t\t\t\t\t\t\t\t\t\tonChange={ () => {\n\t\t\t\t\t\t\t\t\t\t\tif ( checkData.length === data.length ) {\n\t\t\t\t\t\t\t\t\t\t\t\tsetCheckData( [] );\n\t\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\t\tsetCheckData( data.map( ( dt ) => dt.id ) );\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\t\t\tstyle={ { margin: 0 } }\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<div>{ __( 'ID', 'learnpress' ) }</div>\n\t\t\t\t\t\t\t\t<div>{ __( 'Name', 'learnpress' ) }</div>\n\t\t\t\t\t\t\t\t<div>{ __( 'Students', 'learnpress' ) }</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t<div style={ { height: '100%', maxHeight: 200, overflow: 'auto' } }>\n\t\t\t\t\t\t\t{ data.map( ( dt ) => {\n\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t<div style={ { borderTop: '1px solid #eee' } } key={ dt.id }>\n\t\t\t\t\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t\t\t\t\t<CheckboxControl\n\t\t\t\t\t\t\t\t\t\t\t\tchecked={ checkData.includes( dt.id ) }\n\t\t\t\t\t\t\t\t\t\t\t\tonChange={ () => checkItems( dt.id ) }\n\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t<div>#{ dt.id }</div>\n\t\t\t\t\t\t\t\t\t\t<div>{ dt.title }</div>\n\t\t\t\t\t\t\t\t\t\t<div>{ dt.students }</div>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t} ) }\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\n\t\t\t\t\t{ loadingReset ? <Spinner /> : (\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tisPrimary\n\t\t\t\t\t\t\tonClick={ () => resetCourse() }\n\t\t\t\t\t\t\tstyle={ { marginTop: 10, height: 30 } }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ __( 'Reset now', 'learnpress' ) }\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t) }\n\t\t\t\t</>\n\t\t\t) }\n\n\t\t\t{ message.length > 0 && message.map( ( mess, index ) => {\n\t\t\t\treturn (\n\t\t\t\t\t<Notice status={ mess.status } key={ index } isDismissible={ false }>\n\t\t\t\t\t\t{ mess.message }\n\t\t\t\t\t</Notice>\n\t\t\t\t);\n\t\t\t} ) }\n\n\t\t\t<style>\n\t\t\t\t{ '\\\n\t\t\t\t.lp-reset-course_progress .components-base-control__field {\\\n\t\t\t\t\tmargin: 0;\\\n\t\t\t\t}\\\n\t\t\t\t.components-notice{\\\n\t\t\t\t\tmargin-left: 0;\\\n\t\t\t\t}\\\n\t\t\t\t.lp-reset-course_progress > div > div{\\\n\t\t\t\t\tdisplay: grid;\\\n\t\t\t\t\tgrid-template-columns: 80px 50px 1fr 80px;\\\n\t\t\t\t\talign-items: center;\\\n\t\t\t\t}\\\n\t\t\t\t.lp-reset-course_progress > div > div > div{\\\n\t\t\t\t\tmaegin: 0;\\\n\t\t\t\t\tpadding: 8px 10px;\\\n\t\t\t\t}\\\n\t\t\t\t' }\n\n\t\t\t</style>\n\t\t</>\n\t);\n};\nexport default ResetCourse;\n","import ResetCourse from './course';\n\nconst resetData = () => {\n\tif ( document.querySelectorAll( '#learn-press-reset-course-users' ).length > 0 ) {\n\t\twp.element.render( <ResetCourse />, [ ...document.querySelectorAll( '#learn-press-reset-course-users' ) ][ 0 ] );\n\t}\n};\nexport default resetData;\n","const handleAjax = function( url, params, functions ) {\n\twp.apiFetch( {\n\t\tpath: url,\n\t\tmethod: 'POST',\n\t\tdata: params,\n\t} ).then( ( res ) => {\n\t\tif ( 'function' === typeof functions.success ) {\n\t\t\tfunctions.success( res );\n\t\t}\n\t} ).catch( ( err ) => {\n\t\tif ( 'function' === typeof functions.error ) {\n\t\t\tfunctions.error( err );\n\t\t}\n\t} ).then( () => {\n\t\tif ( 'function' === typeof functions.completed ) {\n\t\t\tfunctions.completed();\n\t\t}\n\t} );\n};\n\nexport default handleAjax;\n","const $ = jQuery;\nlet elLPOverlay = null;\nconst lpModalOverlay = {\n\telLPOverlay: null,\n\telMainContent: null,\n\telTitle: null,\n\telBtnYes: null,\n\telBtnNo: null,\n\telFooter: null,\n\telCalledModal: null,\n\tcallBackYes: null,\n\tinstance: null,\n\tinit() {\n\t\tif ( this.instance ) {\n\t\t\treturn true;\n\t\t}\n\n\t\tthis.elLPOverlay = $( '.lp-overlay' );\n\n\t\tif ( ! this.elLPOverlay.length ) {\n\t\t\treturn false;\n\t\t}\n\t\telLPOverlay = this.elLPOverlay;\n\n\t\tthis.elMainContent = elLPOverlay.find( '.main-content' );\n\t\tthis.elTitle = elLPOverlay.find( '.modal-title' );\n\t\tthis.elBtnYes = elLPOverlay.find( '.btn-yes' );\n\t\tthis.elBtnNo = elLPOverlay.find( '.btn-no' );\n\t\tthis.elFooter = elLPOverlay.find( '.lp-modal-footer' );\n\n\t\t$( document ).on( 'click', '.close, .btn-no', function() {\n\t\t\telLPOverlay.hide();\n\t\t} );\n\n\t\t$( document ).on( 'click', '.btn-yes', function( e ) {\n\t\t\te.preventDefault();\n\t\t\te.stopPropagation();\n\n\t\t\tif ( 'function' === typeof lpModalOverlay.callBackYes ) {\n\t\t\t\tlpModalOverlay.callBackYes();\n\t\t\t}\n\t\t} );\n\n\t\tthis.instance = this;\n\n\t\treturn true;\n\t},\n\tsetElCalledModal( elCalledModal ) {\n\t\tthis.elCalledModal = elCalledModal;\n\t},\n\tsetContentModal( content, event ) {\n\t\tthis.elMainContent.html( content );\n\t\tif ( 'function' === typeof event ) {\n\t\t\tevent();\n\t\t}\n\t},\n\tsetTitleModal( content ) {\n\t\tthis.elTitle.html( content );\n\t},\n};\n\nexport default lpModalOverlay;\n","module.exports = window[\"wp\"][\"element\"];","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = function(module) {\n\tvar getter = module && module.__esModule ?\n\t\tfunction() { return module['default']; } :\n\t\tfunction() { return module; };\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = function(exports, definition) {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }","// define __esModule on exports\n__webpack_require__.r = function(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};","import getStepsUpgradeStatus from './tools/database/upgrade';\nimport createIndexes from './tools/database/create_indexs';\nimport reUpgradeDB from './tools/database/re-upgrade-db';\nimport cleanDatabases from './tools/database/clean_database';\n\nimport resetData from './tools/reset-data';\n\n( function( $ ) {\n\tconst $doc = $( document );\n\tlet isRunning = false;\n\n\tconst installSampleCourse = function installSampleCourse( e ) {\n\t\te.preventDefault();\n\n\t\tconst $button = $( this );\n\n\t\tif ( isRunning ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( ! confirm( lpGlobalSettings.i18n.confirm_install_sample_data ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$button.addClass( 'disabled' ).html( $button.data( 'installing-text' ) );\n\t\t$( '.lp-install-sample__response' ).remove();\n\t\tisRunning = true;\n\n\t\t$.ajax( {\n\t\t\turl: $button.attr( 'href' ),\n\t\t\tdata: $( '.lp-install-sample__options' ).serializeJSON(),\n\t\t\tsuccess( response ) {\n\t\t\t\t$button.removeClass( 'disabled' ).html( $button.data( 'text' ) );\n\t\t\t\tisRunning = false;\n\t\t\t\t$( response ).insertBefore( $button.parent() );\n\t\t\t},\n\t\t\terror() {\n\t\t\t\t$button.removeClass( 'disabled' ).html( $button.data( 'text' ) );\n\t\t\t\tisRunning = false;\n\t\t\t\t$( response ).insertBefore( $button.parent() );\n\t\t\t},\n\t\t} );\n\t};\n\n\tconst uninstallSampleCourse = function uninstallSampleCourse( e ) {\n\t\te.preventDefault();\n\n\t\tconst $button = $( this );\n\n\t\tif ( isRunning ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( ! confirm( lpGlobalSettings.i18n.confirm_uninstall_sample_data ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$button.addClass( 'disabled' ).html( $button.data( 'uninstalling-text' ) );\n\t\tisRunning = true;\n\n\t\t$.ajax( {\n\t\t\turl: $button.attr( 'href' ),\n\t\t\tsuccess( response ) {\n\t\t\t\t$button.removeClass( 'disabled' ).html( $button.data( 'text' ) );\n\t\t\t\tisRunning = false;\n\t\t\t\t$( response ).insertBefore( $button.parent() );\n\t\t\t},\n\t\t\terror() {\n\t\t\t\t$button.removeClass( 'disabled' ).html( $button.data( 'text' ) );\n\t\t\t\tisRunning = false;\n\t\t\t\t$( response ).insertBefore( $button.parent() );\n\t\t\t},\n\t\t} );\n\t};\n\n\tconst clearHardCache = function clearHardCache( e ) {\n\t\te.preventDefault();\n\t\tconst $button = $( this );\n\n\t\tif ( $button.hasClass( 'disabled' ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$button.addClass( 'disabled' ).html( $button.data( 'cleaning-text' ) );\n\t\t$.ajax( {\n\t\t\turl: $button.attr( 'href' ),\n\t\t\tdata: {},\n\t\t\tsuccess( response ) {\n\t\t\t\t$button.removeClass( 'disabled' ).html( $button.data( 'text' ) );\n\t\t\t},\n\t\t\terror() {\n\t\t\t\t$button.removeClass( 'disabled' ).html( $button.data( 'text' ) );\n\t\t\t},\n\t\t} );\n\t};\n\n\tconst toggleHardCache = function toggleHardCache() {\n\t\t$.ajax( {\n\t\t\turl: 'admin.php?page=lp-toggle-hard-cache-option',\n\t\t\tdata: { v: this.checked ? 'yes' : 'no' },\n\t\t\tsuccess( response ) {\n\t\t\t},\n\t\t\terror() {\n\t\t\t},\n\t\t} );\n\t};\n\n\tconst toggleOptions = function toggleOptions( e ) {\n\t\te.preventDefault();\n\t\t$( '.lp-install-sample__options' ).toggleClass( 'hide-if-js' );\n\t};\n\n\t$( function() {\n\t\tgetStepsUpgradeStatus();\n\t\tcreateIndexes();\n\t\treUpgradeDB();\n\t\tresetData();\n\t\tcleanDatabases();\n\t\t$doc.on( 'click', '.lp-install-sample__install', installSampleCourse )\n\t\t\t.on( 'click', '.lp-install-sample__uninstall', uninstallSampleCourse )\n\t\t\t.on( 'click', '#learn-press-clear-cache', clearHardCache )\n\t\t\t.on( 'click', 'input[name=\"enable_hard_cache\"]', toggleHardCache )\n\t\t\t.on( 'click', '.lp-install-sample__toggle-options', toggleOptions );\n\t} );\n}( jQuery ) );\n"],"names":["lpModalOverlay","handleAjax","cleanDatabases","elCleanDatabases","document","querySelector","elBtnCleanDatabases","addEventListener","e","preventDefault","elToolsSelect","ElToolSelectLi","querySelectorAll","checkedOne","Array","prototype","slice","call","some","x","checked","prepareMessage","style","display","textContent","elLoading","init","elLPOverlay","show","setContentModal","innerHTML","setTitleModal","elBtnYes","elBtnNo","listTables","ElToolSelectLiCheked","forEach","push","value","tables","item","itemtotal","getAttribute","modal","notice","callBackYes","r","confirm","url","params","functions","success","res","status","message","data","processed","percent","modalItem","progressBarRows","progressPercent","progressValue","console","log","setTimeout","width","color","background","location","reload","error","err","completed","createIndexes","elCreateIndexTables","elBtnCreateIndexes","table","elSteps","elGroupStep","showProgress","stepCurrent","elItemStepCurrent","closest","classList","add","remove","progressBar","scrollToStepCurrent","offset","offsetTop","elMainContent","scrollTop","stop","animate","elItemStep","cloneNode","input","label","append","undefined","reUpgradeDB","elToolReUpgradeDB","can_re_upgrade","elBtnReUpradeDB","elMessage","window","href","$","jQuery","elToolUpgradeDB","upgradeDB","isUpgrading","elWrapperTermsUpgrade","find","elStatusUpgrade","elWrapperUpgradeMessage","checkValidBeforeUpgrade","length","html","elTermUpdate","elLPAgreeTerm","elTermMessage","elMessageUpgrading","val","hide","removeClass","is","agree_terms","elFooter","prepend","addClass","top","text","urlHandle","elItemSteps","steps","each","i","el","elItemStepsTmp","hasClass","step","css","funcCallBack","name","on","lpGlobalSettings","siteurl","onbeforeunload","onclose","getStepsUpgradeStatus","elWrapperStatusUpgrade","queryString","search","urlParams","URLSearchParams","action","get","steps_completed","steps_default","htmlStep","k_gr_steps","step_group","k_step","description","elBtnUpgradeDB","__","wp","i18n","TextControl","Button","Spinner","CheckboxControl","Notice","components","useState","useEffect","element","addQueryArgs","ResetCourse","loading","setLoading","setSearch","setData","checkData","setCheckData","setMessage","loadingReset","setLoadingReset","responsiveData","s","response","apiFetch","path","method","checkItems","id","datas","includes","index","indexOf","splice","resetCourse","courseId","border","map","dt","margin","height","maxHeight","overflow","borderTop","title","students","marginTop","mess","resetData","render","then","catch","elTitle","elCalledModal","instance","stopPropagation","setElCalledModal","content","event","$doc","isRunning","installSampleCourse","$button","confirm_install_sample_data","ajax","attr","serializeJSON","insertBefore","parent","uninstallSampleCourse","confirm_uninstall_sample_data","clearHardCache","toggleHardCache","v","toggleOptions","toggleClass"],"sourceRoot":""}
assets/js/dist/admin/pages/tools.min.asset.php ADDED
@@ -0,0 +1 @@
 
1
+ <?php return array('dependencies' => array('wp-element'), 'version' => '19c061020aacc34db1f5');
assets/js/dist/admin/pages/widgets.asset.php ADDED
@@ -0,0 +1 @@
 
1
+ <?php return array('dependencies' => array(), 'version' => '7c77b9edfd6623e822d9');
assets/js/dist/admin/pages/widgets.js.map ADDED
@@ -0,0 +1 @@
 
1
+ {"version":3,"file":"./assets/js/dist/admin/pages/widgets.js","mappings":";;;;;AAAA,MAAMA,CAAC,GAAGC,MAAV;;AAEA,SAASC,YAAT,CAAuBC,IAAvB,EAA8B;AAC7B,MAAKA,IAAI,CAACC,OAAV,EAAoB;AACnB,WAAOD,IAAI,CAACE,IAAZ;AACA;;AACD,QAAMC,MAAM,GAAG,8CAA8CH,IAAI,CAACI,EAAnD,GAAwD,KAAxD,GAAgEJ,IAAI,CAACK,KAAL,CAAWC,QAA3E,GAAsF,QAArG;AACA,SAAOH,MAAP;AACA;;AAED,SAASI,qBAAT,CAAgCP,IAAhC,EAAuC;AACtC,SAAOA,IAAI,CAACK,KAAL,CAAWC,QAAX,IAAuBN,IAAI,CAACE,IAAnC;AACA;;AAED,SAASM,kBAAT,GAA6C;AAAA,MAAhBC,MAAgB,uEAAP,IAAO;AAC5C,QAAMC,OAAO,GAAGb,CAAC,CAAE,0BAAF,CAAjB;AACA,QAAMc,SAAS,GAAGD,OAAO,CAACE,IAAR,CAAc,UAAd,CAAlB;AACA,QAAMC,QAAQ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CAAkB,2BAAlB,EAA+C,YAAW;AACzD3B,MAAAA,kBAAkB;AAClB,KAFD;AAIAA,IAAAA,kBAAkB;AAClB;AACD,CAZD,E","sources":["webpack://learnpress/./assets/src/apps/js/admin/pages/widgets.js"],"sourcesContent":["const $ = jQuery;\n\nfunction formatCourse( repo ) {\n\tif ( repo.loading ) {\n\t\treturn repo.text;\n\t}\n\tconst markup = \"<div class='select2-result-course_title'>\" + repo.id + ' - ' + repo.title.rendered + '</div>';\n\treturn markup;\n}\n\nfunction formatCourseSelection( repo ) {\n\treturn repo.title.rendered || repo.text;\n}\n\nfunction autocompleteWidget( widget = null ) {\n\tconst searchs = $( '.lp-widget_select_course' );\n\tconst wpRestUrl = searchs.data( 'rest-url' );\n\tconst postType = searchs.data( 'post_type' ) || 'lp_course';\n\n\tsearchs.select2( {\n\t\tajax: {\n\t\t\tmethod: 'GET',\n\t\t\turl: wpRestUrl + 'wp/v2/' + postType,\n\t\t\tdataType: 'json',\n\t\t\tdelay: 250,\n\t\t\tdata( params ) {\n\t\t\t\treturn {\n\t\t\t\t\tsearch: params.term,\n\t\t\t\t};\n\t\t\t},\n\t\t\tprocessResults( data, params ) {\n\t\t\t\tparams.page = params.page || 1;\n\n\t\t\t\treturn {\n\t\t\t\t\tresults: data,\n\t\t\t\t};\n\t\t\t},\n\t\t\tcache: true,\n\t\t},\n\t\tescapeMarkup( markup ) {\n\t\t\treturn markup;\n\t\t},\n\t\tminimumInputLength: 2,\n\t\ttemplateResult: formatCourse, // omitted for brevity, see the source of this page\n\t\ttemplateSelection: formatCourseSelection, // omitted for brevity, see the source of this page\n\t} );\n}\n\ndocument.addEventListener( 'DOMContentLoaded', function( event ) {\n\tif ( document.querySelector( '#widgets-editor' ) ) {\n\t\t$( document ).on( 'widget-added', function( event, widget ) {\n\t\t\tautocompleteWidget( widget );\n\t\t} );\n\t} else {\n\t\t$( document ).on( 'learnpress/widgets/select', function() {\n\t\t\tautocompleteWidget();\n\t\t} );\n\n\t\tautocompleteWidget();\n\t}\n} );\n"],"names":["$","jQuery","formatCourse","repo","loading","text","markup","id","title","rendered","formatCourseSelection","autocompleteWidget","widget","searchs","wpRestUrl","data","postType","select2","ajax","method","url","dataType","delay","params","search","term","processResults","page","results","cache","escapeMarkup","minimumInputLength","templateResult","templateSelection","document","addEventListener","event","querySelector","on"],"sourceRoot":""}
assets/js/dist/admin/pages/widgets.min.asset.php ADDED
@@ -0,0 +1 @@
 
1
+ <?php return array('dependencies' => array(), 'version' => '1e98165f6a5c249f68e7');
assets/js/dist/blocks/index.asset.php ADDED
@@ -0,0 +1 @@
 
1
+ <?php return array('dependencies' => array('wp-block-editor', 'wp-blocks', 'wp-components', 'wp-element', 'wp-i18n', 'wp-primitives'), 'version' => '73019e47f1103c1cb5be');
assets/js/dist/blocks/index.deps.json ADDED
@@ -0,0 +1 @@
 
1
+ []
assets/js/dist/blocks/index.js CHANGED
@@ -105,7 +105,7 @@ function Edit(_ref) {
105
  className: "wp-block-learnpress-template__placeholder-inner"
106
  }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__.sprintf)(
107
  /* translators: %s is the template title */
108
- (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)('This is an editor placeholder for the %s. On your store this will be replaced by the template and display with your course image(s), title, price, etc. You can move this placeholder around and add further blocks around it to extend the template.', 'learnpress'), templateTitle))));
109
  }
110
 
111
  /***/ }),
105
  className: "wp-block-learnpress-template__placeholder-inner"
106
  }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__.sprintf)(
107
  /* translators: %s is the template title */
108
+ (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)('This is an editor placeholder for the %s. This will be replaced by the template in your store and displayed with your course image(s), title, price, and so on. You can move this placeholder around and add further blocks around it to extend the template.', 'learnpress'), templateTitle))));
109
  }
110
 
111
  /***/ }),
assets/js/dist/blocks/index.js.map ADDED
@@ -0,0 +1 @@
 
1
+ {"version":3,"file":"./assets/js/dist/blocks/index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;AAUA;AACA;AACA;;;AACO,MAAMQ,wBAAwB,GAAG,MAAM;AAC7C,GACCZ,sCADD,EAEEa,OAFF,CAEWH,aAFX;AAGA,CAJM;AAMPE,wBAAwB,G","sources":["webpack://learnpress/./node_modules/@wordpress/icons/build-module/library/page.js","webpack://learnpress/./assets/src/apps/js/blocks/category.js","webpack://learnpress/./assets/src/apps/js/blocks/template/edit.js","webpack://learnpress/./assets/src/apps/js/blocks/template/index.js","webpack://learnpress/external window [\"wp\",\"blockEditor\"]","webpack://learnpress/external window [\"wp\",\"blocks\"]","webpack://learnpress/external window [\"wp\",\"components\"]","webpack://learnpress/external window [\"wp\",\"element\"]","webpack://learnpress/external window [\"wp\",\"i18n\"]","webpack://learnpress/external window [\"wp\",\"primitives\"]","webpack://learnpress/webpack/bootstrap","webpack://learnpress/webpack/runtime/compat get default export","webpack://learnpress/webpack/runtime/define property getters","webpack://learnpress/webpack/runtime/hasOwnProperty shorthand","webpack://learnpress/webpack/runtime/make namespace object","webpack://learnpress/./assets/src/apps/js/blocks/index.js"],"sourcesContent":["import { createElement } from \"@wordpress/element\";\n\n/**\n * WordPress dependencies\n */\nimport { SVG, Path } from '@wordpress/primitives';\nconst page = createElement(SVG, {\n xmlns: \"http://www.w3.org/2000/svg\",\n viewBox: \"0 0 24 24\"\n}, createElement(Path, {\n d: \"M7 5.5h10a.5.5 0 01.5.5v12a.5.5 0 01-.5.5H7a.5.5 0 01-.5-.5V6a.5.5 0 01.5-.5zM17 4H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V6a2 2 0 00-2-2zm-1 3.75H8v1.5h8v-1.5zM8 11h8v1.5H8V11zm6 3.25H8v1.5h6v-1.5z\"\n}));\nexport default page;\n//# sourceMappingURL=page.js.map","import { getCategories, setCategories } from '@wordpress/blocks';\nimport { __ } from '@wordpress/i18n';\n\nsetCategories( [\n\t...getCategories().filter( ( { slug } ) => slug !== 'learnpress' ),\n\t{\n\t\tslug: 'learnpress',\n\t\ttitle: __( 'LearnPress', 'learnpress' ),\n\t},\n] );\n","\nimport { useBlockProps } from '@wordpress/block-editor';\nimport { Placeholder } from '@wordpress/components';\nimport { __, sprintf } from '@wordpress/i18n';\nimport { page } from '@wordpress/icons';\n\nconst TEMPLATES = {\n\t'single-course': {\n\t\ttitle: __( 'LearnPress Single Course Template', 'learnpress' ),\n\t\tplaceholder: 'single-course',\n\t},\n\t'archive-course': {\n\t\ttitle: __( 'LearnPress Course Archive Template', 'learnpress' ),\n\t\tplaceholder: 'archive-course',\n\t},\n};\n\nexport default function Edit( { attributes } ) {\n\tconst blockProps = useBlockProps();\n\tconst templateTitle = TEMPLATES[ attributes.template ]?.title ?? attributes.template;\n\n\treturn (\n\t\t<div { ...blockProps }>\n\t\t\t<Placeholder\n\t\t\t\ticon={ page }\n\t\t\t\tlabel={ templateTitle }\n\t\t\t\tclassName=\"wp-block-learnpress-template__placeholder\"\n\t\t\t>\n\t\t\t\t<div className=\"wp-block-learnpress-template__placeholder-inner\">\n\t\t\t\t\t{ sprintf(\n\t\t\t\t\t\t/* translators: %s is the template title */\n\t\t\t\t\t\t__(\n\t\t\t\t\t\t\t'This is an editor placeholder for the %s. This will be replaced by the template in your store and displayed with your course image(s), title, price, and so on. You can move this placeholder around and add further blocks around it to extend the template.',\n\t\t\t\t\t\t\t'learnpress'\n\t\t\t\t\t\t),\n\t\t\t\t\t\ttemplateTitle\n\t\t\t\t\t) }\n\t\t\t\t</div>\n\t\t\t</Placeholder>\n\t\t</div>\n\t);\n}\n","\nimport { __ } from '@wordpress/i18n';\n\nimport edit from './edit';\n\nimport metadata from './block.json';\n\nconst { name } = metadata;\n\nconst settings = {\n\ttitle: 'LearnPress Template',\n\tkeywords: [ 'learnpress', 'template' ],\n\tdescription: __( 'Renders LearnPress PHP templates.', 'learnpress' ),\n\ticon: 'archive',\n\tedit,\n\tsave: () => null,\n};\n\nexport { name, settings, metadata };\n","module.exports = window[\"wp\"][\"blockEditor\"];","module.exports = window[\"wp\"][\"blocks\"];","module.exports = window[\"wp\"][\"components\"];","module.exports = window[\"wp\"][\"element\"];","module.exports = window[\"wp\"][\"i18n\"];","module.exports = window[\"wp\"][\"primitives\"];","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = function(module) {\n\tvar getter = module && module.__esModule ?\n\t\tfunction() { return module['default']; } :\n\t\tfunction() { return module; };\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = function(exports, definition) {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }","// define __esModule on exports\n__webpack_require__.r = function(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};","import { registerBlockType } from '@wordpress/blocks';\n\nimport './category';\n\nimport * as template from './template';\n\nconst registerBlock = ( block ) => {\n\tif ( ! block ) {\n\t\treturn;\n\t}\n\n\tconst { metadata, settings, name } = block;\n\n\tregisterBlockType( name, { ...metadata, ...settings } );\n};\n\n/**\n * Function to register blocks.\n */\nexport const registerLearnPressBlocks = () => {\n\t[\n\t\ttemplate,\n\t].forEach( registerBlock );\n};\n\nregisterLearnPressBlocks();\n"],"names":["getCategories","setCategories","__","filter","slug","title","useBlockProps","Placeholder","sprintf","page","TEMPLATES","placeholder","Edit","attributes","blockProps","templateTitle","template","edit","metadata","name","settings","keywords","description","icon","save","registerBlockType","registerBlock","block","registerLearnPressBlocks","forEach"],"sourceRoot":""}
assets/js/dist/blocks/index.min.asset.php ADDED
@@ -0,0 +1 @@
 
1
+ <?php return array('dependencies' => array('wp-block-editor', 'wp-blocks', 'wp-components', 'wp-element', 'wp-i18n', 'wp-primitives'), 'version' => '120b0f287e2d3d963d6e');
assets/js/dist/blocks/index.min.deps.json ADDED
@@ -0,0 +1 @@
 
1
+ []
assets/js/dist/frontend/become-teacher.asset.php ADDED
@@ -0,0 +1 @@
 
1
+ <?php return array('dependencies' => array(), 'version' => 'b5a6a897ba6e93068ca3');
assets/js/dist/frontend/become-teacher.js.map ADDED
@@ -0,0 +1 @@
 
1
+ {"version":3,"file":"./assets/js/dist/frontend/become-teacher.js","mappings":";;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AAEAA,MAAM,CAAE,UAAUC,CAAV,EAAc;AACrBA,EAAAA,CAAC,CAAE,kCAAF,CAAD,CAAwCC,IAAxC,CAA8C,YAAW;AACxD,UAAMC,KAAK,GAAGF,CAAC,CAAE,IAAF,CAAf;AAAA,UACCG,OAAO,GAAGD,KAAK,CAACE,IAAN,CAAY,uBAAZ,CADX;AAAA,UAECC,YAAY,GAAG,YAAW;AACzBL,MAAAA,CAAC,CAAE,0CAAF,CAAD,CAAgDM,OAAhD,CAAyD,MAAzD,EAAiE,YAAW;AAC3EN,QAAAA,CAAC,CAAE,IAAF,CAAD,CAAUO,MAAV;AACA,OAFD;AAGA,KANF;AAAA,UAOCC,YAAY,GAAG,UAAUC,QAAV,EAAqB;AACnC,UAAIC,CAAC,GAAG,EAAR;;AACA,UAAKV,CAAC,CAACW,aAAF,CAAiBF,QAAjB,CAAL,E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AO,EAAEtB,WANF;AAOPuB,UAAAA,KAAK,EAAEjB;AAPA,SAAR;AASA;;AACD,aAAO,KAAP;AACA,KAjBD;AAkBA,GA9ED;AA+EA,CAhFK,CAAN,C","sources":["webpack://learnpress/./assets/src/apps/js/frontend/become-teacher.js"],"sourcesContent":["/**\n * Become a Teacher form handler js\n *\n * @author ThimPress\n * @version 3.0.0\n */\n\njQuery( function( $ ) {\n\t$( 'form[name=\"become-teacher-form\"]' ).each( function() {\n\t\tconst $form = $( this ),\n\t\t\t$submit = $form.find( 'button[type=\"submit\"]' ),\n\t\t\thideMessages = function() {\n\t\t\t\t$( '.learn-press-error, .learn-press-message' ).fadeOut( 'fast', function() {\n\t\t\t\t\t$( this ).remove();\n\t\t\t\t} );\n\t\t\t},\n\t\t\tshowMessages = function( messages ) {\n\t\t\t\tlet m = [];\n\t\t\t\tif ( $.isPlainObject( messages ) ) {\n\t\t\t\t\tfor ( const i in messages ) {\n\t\t\t\t\t\tm.push( $( messages[ i ] ) );\n\t\t\t\t\t}\n\t\t\t\t} else if ( $.isArray( messages ) ) {\n\t\t\t\t\tm = messages.reverse();\n\t\t\t\t} else {\n\t\t\t\t\tm = [ messages ];\n\t\t\t\t}\n\t\t\t\tfor ( let i = 0; i < m.length; i++ ) {\n\t\t\t\t\t$( m[ i ] ).insertBefore( $form );\n\t\t\t\t}\n\t\t\t},\n\t\t\tblockForm = function( block ) {\n\t\t\t\treturn $form.find( 'input, select, button, textarea' )\n\t\t\t\t\t.prop( 'disabled', !! block );\n\t\t\t},\n\t\t\tbeforeSend = function() {\n\t\t\t\thideMessages();\n\n\t\t\t\tblockForm( true )\n\t\t\t\t\t.filter( $submit )\n\t\t\t\t\t.data( 'origin-text', $submit.text() )\n\t\t\t\t\t.html( $submit.data( 'text' ) );\n\t\t\t},\n\t\t\tajaxSuccess = function( response ) {\n\t\t\t\tresponse = LP.parseJSON( response );\n\t\t\t\tif ( response.message ) {\n\t\t\t\t\tshowMessages( response.message );\n\t\t\t\t}\n\n\t\t\t\tblockForm().filter( $submit ).html( $submit.data( 'origin-text' ) );\n\n\t\t\t\tif ( response.result === 'success' ) {\n\t\t\t\t\t$form.remove();\n\t\t\t\t} else {\n\t\t\t\t\t$submit.prop( 'disabled', false );\n\t\t\t\t\t$submit.html( $submit.data( 'text' ) );\n\t\t\t\t}\n\t\t\t},\n\t\t\tajaxError = function( response ) {\n\t\t\t\tresponse = LP.parseJSON( response );\n\n\t\t\t\tif ( response.message ) {\n\t\t\t\t\tshowMessages( response.message );\n\t\t\t\t}\n\n\t\t\t\tblockForm().filter( $submit ).html( $submit.data( 'origin-text' ) );\n\t\t\t};\n\n\t\t$form.on( 'submit', function( e ) {\n\t\t\te.preventDefault();\n\t\t\tif ( $form.triggerHandler( 'become_teacher_send' ) !== false ) {\n\t\t\t\tconst url = new URL( window.location.href );\n\t\t\t\turl.searchParams.set( 'lp-ajax', 'request-become-a-teacher' );\n\n\t\t\t\t$.ajax( {\n\t\t\t\t\turl,\n\t\t\t\t\tdata: $form.serialize(),\n\t\t\t\t\tdataType: 'text',\n\t\t\t\t\ttype: 'POST',\n\t\t\t\t\tbeforeSend,\n\t\t\t\t\tsuccess: ajaxSuccess,\n\t\t\t\t\terror: ajaxError,\n\t\t\t\t} );\n\t\t\t}\n\t\t\treturn false;\n\t\t} );\n\t} );\n} );\n\n"],"names":["jQuery","$","each","$form","$submit","find","hideMessages","fadeOut","remove","showMessages","messages","m","isPlainObject","i","push","isArray","reverse","length","insertBefore","blockForm","block","prop","beforeSend","filter","data","text","html","ajaxSuccess","response","LP","parseJSON","message","result","ajaxError","on","e","preventDefault","triggerHandler","url","URL","window","location","href","searchParams","set","ajax","serialize","dataType","type","success","error"],"sourceRoot":""}
assets/js/dist/frontend/become-teacher.min.asset.php ADDED
@@ -0,0 +1 @@
 
1
+ <?php return array('dependencies' => array(), 'version' => '294829317bd95b4cafa7');
assets/js/dist/frontend/checkout.asset.php ADDED
@@ -0,0 +1 @@
 
1
+ <?php return array('dependencies' => array(), 'version' => '2cf04ff10e0b5aa59941');
assets/js/dist/frontend/checkout.js.map ADDED
@@ -0,0 +1 @@
 
1
+ {"version":3,"file":"./assets/js/dist/frontend/checkout.js","mappings":";;;;;AAAE,WAAUA,CAAV,EAAaC,QAAb,EAAwB;AACzB;;AAEA,MAAKC,MAAM,CAACC,EAAP,KAAcC,SAAnB,EAA+B;AAC9BF,IAAAA,MAAM,CAACC,EAAP,GAAY,EAAZ;AACA;AAED;AACD;AACA;AACA;AACA;;;AACC,QAAME,QAAQ,GAAGF,EAAE,CAACE,QAAH,GAAc,UAAUC,OAAV,EAAoB;AAClD,UAAMC,aAAa,GAAGP,CAAC,CAAE,4BAAF,CAAvB;AAAA,UAECQ,UAAU,GAAGR,CAAC,CAAE,6BAAF,CAFf;AAAA,UAICS,aAAa,GAAGT,CAAC,CAAE,gCAAF,CAJlB;AAAA,UAMCU,SAAS,GAAGV,CAAC,CAAE,kBAAF,CANd;AAAA,UAQCW,eAAe,GAAGX,CAAC,CAAE,mCAAF,CARpB;AAAA,UAUCY,cAAc,GAAGZ,CAAC,CAAE,2BAAF,CAVnB;AAYA,QAAIa,cAAc,GAAG,EAArB;;AAEA,QAAKC,MAAM,CAACC,SAAP,CAAiBC,OAAjB,KAA6BZ,SAAlC,EAA8C;AAC7CU,MAAAA,MAAM,CAACC,SAAP,CAAiBC,OAAjB,GAA2B,YAAW;AACrC,eAAO,IAAIC,MAAJ,CAAY,+GAAZ,EAA8HC,IAA9H,CAAoI,IAApI,CAAP;AACA,OAFD;AAGA;;AAED,UAAMC,WAAW,GAAG,YAAW;AAC9B,aAAOT,SAAS,CAACU,MAAV,GAAmB,CAA1B;AACA,KAFD;;AAIA,UAAMC,eAAe,GAAG,YAAW;AAClC,aAAOX,SAAS,CAACY,IAAV,CAAgB,sCAAhB,EAAyDC,GAAzD,EAAP;AACA,KAFD;;AAIA,UAAMC,UAAU,GAAG,YAAW;AAC7B,aAAOjB,aAAa,CAACe,IAAd,CAAoB,oDAApB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AAnE,CAA4E,OAA5E;AACA,KAFS,EAEP,GAFO,CAAV;AAGA,GAvTD;;AAyTArC,EAAAA,CAAC,CAAEwG,QAAF,CAAD,CAAcsB,KAAd,CAAqB,YAAW;AAC/B,QAAK,OAAOC,kBAAP,KAA8B,WAAnC,EAAiD;AAChD5H,MAAAA,EAAE,CAAC6H,SAAH,GAAe,IAAI3H,QAAJ,CAAc0H,kBAAd,CAAf;AACA;AACD,GAJD;AAKA,CA1UC,EA0UCE,MA1UD,CAAF,C","sources":["webpack://learnpress/./assets/src/apps/js/frontend/checkout.js"],"sourcesContent":["( function( $, settings ) {\n\t'use strict';\n\n\tif ( window.LP === undefined ) {\n\t\twindow.LP = {};\n\t}\n\n\t/**\n\t * Checkout\n\t *\n\t * @param options\n\t */\n\tconst Checkout = LP.Checkout = function( options ) {\n\t\tconst $formCheckout = $( '#learn-press-checkout-form' ),\n\n\t\t\t$formLogin = $( '#learn-press-checkout-login' ),\n\n\t\t\t$formRegister = $( '#learn-press-checkout-register' ),\n\n\t\t\t$payments = $( '.payment-methods' ),\n\n\t\t\t$buttonCheckout = $( '#learn-press-checkout-place-order' ),\n\n\t\t\t$checkoutEmail = $( 'input[name=\"guest_email\"]' );\n\n\t\tlet selectedMethod = '';\n\n\t\tif ( String.prototype.isEmail === undefined ) {\n\t\t\tString.prototype.isEmail = function() {\n\t\t\t\treturn new RegExp( '^[-!#$%&\\'*+\\\\./0-9=?A-Z^_`a-z{|}~]+@[-!#$%&\\'*+\\\\/0-9=?A-Z^_`a-z{|}~]+\\.[-!#$%&\\'*+\\\\./0-9=?A-Z^_`a-z{|}~]+$' ).test( this );\n\t\t\t};\n\t\t}\n\n\t\tconst needPayment = function() {\n\t\t\treturn $payments.length > 0;\n\t\t};\n\n\t\tconst selectedPayment = function() {\n\t\t\treturn $payments.find( 'input[name=\"payment_method\"]:checked' ).val();\n\t\t};\n\n\t\tconst isLoggedIn = function() {\n\t\t\treturn $formCheckout.find( 'input[name=\"checkout-account-switch-form\"]:checked' ).length = 0;\n\t\t};\n\n\t\tconst getActiveFormData = function() {\n\t\t\tconst formName = $formCheckout.find( 'input[name=\"checkout-account-switch-form\"]:checked' ).val();\n\t\t\tconst $form = $( '#checkout-account-' + formName );\n\n\t\t\treturn $form.serializeJSON();\n\t\t};\n\n\t\tconst getPaymentData = function() {\n\t\t\treturn $( '#checkout-payment' ).serializeJSON();\n\t\t};\n\n\t\tconst getPaymentNote = function() {\n\t\t\treturn $( '.learn-press-checkout-comment' ).serializeJSON();\n\t\t};\n\n\t\tconst showErrors = function( errors ) {\n\t\t\tshowMessage( errors );\n\t\t\tconst firstId = Object.keys( errors )[ 0 ];\n\n\t\t\t$( 'input[name=\"' + firstId + '\"]:visible' ).trigger( 'focus' );\n\t\t};\n\n\t\tconst _formSubmit = function( e ) {\n\t\t\te.preventDefault();\n\n\t\t\tif ( needPayment() && ! selectedPayment() ) {\n\t\t\t\tshowMessage( 'Please select payment method', true );\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tlet formData = {};\n\n\t\t\tif ( ! isLoggedIn() ) {\n\t\t\t\tformData = $.extend( formData, getActiveFormData(), getPaymentNote() );\n\t\t\t}\n\n\t\t\tformData = $.extend( formData, getPaymentData() );\n\n\t\t\tremoveMessage();\n\n\t\t\tconst btnText = $buttonCheckout.text();\n\n\t\t\tconst urlHandle = new URL( options.ajaxurl );\n\t\t\turlHandle.searchParams.set( 'lp-ajax', 'checkout' );\n\n\t\t\t$.ajax( {\n\t\t\t\turl: urlHandle,\n\t\t\t\tdataType: 'html',\n\t\t\t\tdata: formData,\n\t\t\t\ttype: 'POST',\n\t\t\t\tbeforeSend() {\n\t\t\t\t\t$( '#learn-press-checkout-place-order' ).addClass( 'loading' );\n\t\t\t\t\t$buttonCheckout.html( options.i18n_processing );\n\t\t\t\t},\n\t\t\t\tsuccess( response ) {\n\t\t\t\t\tresponse = LP.parseJSON( response );\n\n\t\t\t\t\tif ( response.messages ) {\n\t\t\t\t\t\tshowErrors( response.messages );\n\t\t\t\t\t} else if ( response.message ) {\n\t\t\t\t\t\tshowMessage( '<div class=\"learn-press-message error\">' + response.message + '</div>' );\n\t\t\t\t\t}\n\n\t\t\t\t\t$( '#learn-press-checkout-place-order' ).removeClass( 'loading' );\n\n\t\t\t\t\tif ( 'success' === response.result ) {\n\t\t\t\t\t\tif ( response.redirect && response.redirect.match( /https?/ ) ) {\n\t\t\t\t\t\t\t$buttonCheckout.html( options.i18n_redirecting );\n\t\t\t\t\t\t\twindow.location = response.redirect;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$buttonCheckout.html( btnText );\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\terror( jqXHR, textStatus, errorThrown ) {\n\t\t\t\t\t$( '#learn-press-checkout-place-order' ).removeClass( 'loading' );\n\n\t\t\t\t\tshowMessage( '<div class=\"learn-press-message error\">' + errorThrown + '</div>' );\n\n\t\t\t\t\t$buttonCheckout.html( btnText );\n\n\t\t\t\t\tLP.unblockContent();\n\t\t\t\t},\n\t\t\t} );\n\n\t\t\treturn false;\n\t\t};\n\n\t\tconst _selectPaymentChange = function() {\n\t\t\tconst id = $( this ).val(),\n\t\t\t\t$selected = $payments.children().filter( '.selected' ).removeClass( 'selected' ),\n\t\t\t\tbuttonText = $selected.find( '#payment_method_' + selectedMethod ).data( 'order_button_text' );\n\n\t\t\t$selected.find( '.payment-method-form' ).slideUp();\n\t\t\t$selected.end().filter( '#learn-press-payment-method-' + id ).addClass( 'selected' ).find( '.payment-method-form' ).hide().slideDown();\n\n\t\t\tselectedMethod = $selected.find( 'payment_method' ).val();\n\n\t\t\tif ( buttonText ) {\n\t\t\t\t$buttonCheckout.html( buttonText );\n\t\t\t}\n\t\t};\n\n\t\t/**\n\t\t * Button to switch between mode login/register or place order\n\t\t * in case user is not logged in and guest checkout is enabled.\n\t\t */\n\t\tconst _guestCheckoutClick = function() {\n\t\t\tconst showOrHide = $formCheckout.toggle().is( ':visible' );\n\t\t\t$formLogin.toggle( ! showOrHide );\n\t\t\t$formRegister.toggle( ! showOrHide );\n\n\t\t\t$( '#learn-press-button-guest-checkout' ).toggle( ! showOrHide );\n\t\t};\n\n\t\t/**\n\t\t * Append messages into document.\n\t\t *\n\t\t * @param message\n\t\t * @param wrap\n\t\t */\n\t\tconst showMessage = function( message, wrap = false ) {\n\t\t\tremoveMessage();\n\n\t\t\tif ( $.isPlainObject( message ) ) {\n\t\t\t\tObject.keys( message ).reverse().forEach( ( id ) => {\n\t\t\t\t\tconst m = message[ id ];\n\t\t\t\t\tlet msg = Array.isArray( m ) ? m[ 0 ] : m;\n\t\t\t\t\tconst type = Array.isArray( m ) ? m[ 1 ] : '';\n\t\t\t\t\tmsg = '<div class=\"learn-press-message ' + ( typeof ( type ) === 'string' ? type : '' ) + '\">' + msg + '</div>';\n\t\t\t\t\t$formCheckout.prepend( msg );\n\t\t\t\t} );\n\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ( wrap ) {\n\t\t\t\tmessage = '<div class=\"learn-press-message ' + ( typeof ( wrap ) === 'string' ? wrap : '' ) + '\">' + message + '</div>';\n\t\t\t}\n\n\t\t\tif ( Array.isArray( message ) ) {\n\t\t\t\tmessage.map( ( msg ) => $formCheckout.prepend( '<div class=\"learn-press-message error\">' + msg + '</div>') );\n\t\t\t} else {\n\t\t\t\t$formCheckout.prepend( '<div class=\"learn-press-message error\">' + message + '</div>' );\n\t\t\t}\n\n\t\t\t$( 'html, body' ).animate( {\n\t\t\t\tscrollTop: ( $formCheckout.offset().top - 100 ),\n\t\t\t}, 1000 );\n\n\t\t\t$( document ).trigger( 'learn-press/checkout-error' );\n\t\t};\n\n\t\t/**\n\t\t * Callback function for guest email.\n\t\t *\n\t\t * @private\n\t\t */\n\t\tconst _checkEmail = function() {\n\t\t\tif ( ! this.value.isEmail() ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tthis.timer && clearTimeout( this.timer );\n\n\t\t\t$checkoutEmail.addClass( 'loading' );\n\n\t\t\tthis.timer = setTimeout( function() {\n\t\t\t\t$.post( {\n\t\t\t\t\turl: window.location.href,\n\t\t\t\t\tdata: {\n\t\t\t\t\t\t'lp-ajax': 'checkout-user-email-exists',\n\t\t\t\t\t\temail: $checkoutEmail.val(),\n\t\t\t\t\t},\n\t\t\t\t\tsuccess( response ) {\n\t\t\t\t\t\tconst res = LP.parseJSON( response );\n\n\t\t\t\t\t\t$checkoutEmail.removeClass( 'loading' );\n\n\t\t\t\t\t\t$( '.lp-guest-checkout-output' ).remove();\n\n\t\t\t\t\t\tif ( res && res.output ) {\n\t\t\t\t\t\t\t$checkoutEmail.after( res.output );\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t} );\n\t\t\t}, 500 );\n\t\t};\n\n\t\t/**\n\t\t * Remove all messages\n\t\t */\n\t\tconst removeMessage = function() {\n\t\t\t$( '.learn-press-error, .learn-press-notice, .learn-press-message' ).remove();\n\t\t};\n\n\t\t/**\n\t\t * Callback function for showing/hiding register form.\n\t\t *\n\t\t * @param e\n\t\t * @param toggle\n\t\t */\n\t\tconst _toggleRegisterForm = function( e, toggle ) {\n\t\t\ttoggle = $formRegister.find( '.learn-press-form-register' ).toggle( toggle ).is( ':visible' );\n\t\t\t$formRegister.find( '.checkout-form-register-toggle[data-toggle=\"show\"]' ).toggle( ! toggle );\n\n\t\t\te && ( e.preventDefault(), _toggleLoginForm( null, ! toggle ) );\n\t\t};\n\n\t\t/**\n\t\t * Callback function for showing/hiding login form.\n\t\t *\n\t\t * @param e {Event}\n\t\t * @param toggle {boolean}\n\t\t * @private\n\t\t */\n\t\tconst _toggleLoginForm = function( e, toggle ) {\n\t\t\ttoggle = $formLogin.find( '.learn-press-form-login' ).toggle( toggle ).is( ':visible' );\n\n\t\t\t$formLogin.find( '.checkout-form-login-toggle[data-toggle=\"show\"]' ).toggle( ! toggle );\n\n\t\t\te && ( e.preventDefault(), _toggleRegisterForm( null, ! toggle ) );\n\t\t};\n\n\t\t/**\n\t\t * Place order action\n\t\t */\n\t\t$buttonCheckout.on( 'click', function( e ) {\n\n\t\t} );\n\n\t\t$( '.lp-button-guest-checkout' ).on( 'click', _guestCheckoutClick );\n\t\t$( '#learn-press-button-cancel-guest-checkout' ).on( 'click', _guestCheckoutClick );\n\n\t\t$checkoutEmail.on( 'keyup changex', _checkEmail ).trigger( 'changex' );\n\t\t$payments.on( 'change select', 'input[name=\"payment_method\"]', _selectPaymentChange );\n\t\t$formCheckout.on( 'submit', _formSubmit );\n\t\t$payments.children( '.selected' ).find( 'input[name=\"payment_method\"]' ).trigger( 'select' );\n\t\t$formLogin.on( 'click', '.checkout-form-login-toggle', _toggleLoginForm );\n\t\t$formRegister.on( 'click', '.checkout-form-register-toggle', _toggleRegisterForm );\n\n\t\t$formRegister.find( 'input' ).each( function() {\n\t\t\tif ( ( -1 !== $.inArray( $( this ).attr( 'type' ).toLowerCase(), [ 'text', 'email', 'number' ] ) ) && $( this ).val() ) {\n\t\t\t\t_toggleRegisterForm();\n\n\t\t\t\treturn false;\n\t\t\t}\n\t\t} );\n\n\t\t$formLogin.find( 'input:not([type=\"hidden\"])' ).each( function() {\n\t\t\tif ( ( -1 !== $.inArray( $( this ).attr( 'type' ).toLowerCase(), [ 'text', 'email', 'number' ] ) ) && $( this ).val() ) {\n\t\t\t\t_toggleLoginForm();\n\n\t\t\t\treturn false;\n\t\t\t}\n\t\t} );\n\n\t\t// Show form if there is only one form Register or Login\n\t\tif ( $formRegister.length && ! $formLogin.length ) {\n\t\t\t_toggleRegisterForm();\n\t\t} else if ( ! $formRegister.length && $formLogin.length ) {\n\t\t\t_toggleLoginForm();\n\t\t}\n\n\t\t$formCheckout\n\t\t\t.on( 'change', 'input[name=\"checkout-account-switch-form\"]', function() {\n\t\t\t\t$( this ).next().find( 'input:not([type=\"hidden\"]):visible' ).first().trigger( 'focus' );\n\t\t\t} )\n\t\t\t.on( 'change', '#guest_email', function() {\n\t\t\t\t$formCheckout.find( '#reg_email' ).val( this.value );\n\t\t\t} )\n\t\t\t.on( 'change', '#reg_email', function() {\n\t\t\t\t$formCheckout.find( '#guest_email' ).val( this.value );\n\t\t\t} );\n\n\t\tsetTimeout( function() {\n\t\t\t$formCheckout.find( 'input:not([type=\"hidden\"]):visible' ).first().trigger( 'focus' );\n\t\t}, 300 );\n\t};\n\n\t$( document ).ready( function() {\n\t\tif ( typeof lpCheckoutSettings !== 'undefined' ) {\n\t\t\tLP.$checkout = new Checkout( lpCheckoutSettings );\n\t\t}\n\t} );\n}( jQuery ) );\n"],"names":["$","settings","window","LP","undefined","Checkout","options","$formCheckout","$formLogin","$formRegister","$payments","$buttonCheckout","$checkoutEmail","selectedMethod","String","prototype","isEmail","RegExp","test","needPayment","length","selectedPayment","find","val","isLoggedIn","getActiveFormData","formName","$form","serializeJSON","getPaymentData","getPaymentNote","showErrors","errors","showMessage","firstId","Object","keys","trigger","_formSubmit","e","preventDefault","formData","extend","removeMessage","btnText","text","urlHandle","URL","ajaxurl","searchParams","set","ajax","url","dataType","data","type","beforeSend","addClass","html","i18n_processing","success","response","parseJSON","messages","message","removeClass","result","redirect","match","i18n_redirecting","location","error","jqXHR","textStatus","errorThrown","unblockContent","_selectPaymentChange","id","$selected","children","filter","buttonText","slideUp","end","hide","slideDown","_guestCheckoutClick","showOrHide","toggle","is","wrap","isPlainObject","reverse","forEach","m","msg","Array","isArray","prepend","map","animate","scrollTop","offset","top","document","_checkEmail","value","timer","clearTimeout","setTimeout","post","href","email","res","remove","output","after","_toggleRegisterForm","_toggleLoginForm","on","each","inArray","attr","toLowerCase","next","first","ready","lpCheckoutSettings","$checkout","jQuery"],"sourceRoot":""}
assets/js/dist/frontend/checkout.min.asset.php ADDED
@@ -0,0 +1 @@
 
1
+ <?php return array('dependencies' => array(), 'version' => '8535b4d63257c44ba282');
assets/js/dist/frontend/courses.asset.php ADDED
@@ -0,0 +1 @@
 
1
+ <?php return array('dependencies' => array(), 'version' => '0b1c069ecceef5f57b52');
assets/js/dist/frontend/courses.deps.json ADDED
@@ -0,0 +1 @@
 
1
+ []
assets/js/dist/frontend/courses.js CHANGED
@@ -10,8 +10,8 @@ let skeleton;
10
  let skeletonClone;
11
  let isLoading = false;
12
  let firstLoad = 1;
13
- let elNoLoadAjaxFirst = null;
14
- let elArchive = null;
15
 
16
  if (lpGlobalSettings.is_course_archive) {
17
  const queryString = window.location.search;
@@ -39,10 +39,10 @@ const lpArchiveCourse = () => {
39
 
40
  if (!elNoLoadAjaxFirst) {
41
  lpArchiveRequestCourse(filterCourses);
42
- } else {
43
- lpArchivePaginationCourse();
44
- lpArchiveSearchCourse();
45
  }
 
 
 
46
  };
47
 
48
  window.lpArchiveRequestCourse = (args, callBackSuccess) => {
10
  let skeletonClone;
11
  let isLoading = false;
12
  let firstLoad = 1;
13
+ let elNoLoadAjaxFirst;
14
+ let elArchive;
15
 
16
  if (lpGlobalSettings.is_course_archive) {
17
  const queryString = window.location.search;
39
 
40
  if (!elNoLoadAjaxFirst) {
41
  lpArchiveRequestCourse(filterCourses);
 
 
 
42
  }
43
+
44
+ lpArchivePaginationCourse();
45
+ lpArchiveSearchCourse();
46
  };
47
 
48
  window.lpArchiveRequestCourse = (args, callBackSuccess) => {
assets/js/dist/frontend/courses.js.map ADDED
@@ -0,0 +1 @@
 
1
+ {"version":3,"file":"./assets/js/dist/frontend/courses.js","mappings":";;;;;AAAA,MAAMA,UAAU,GAAGC,gBAAgB,CAACC,WAAjB,IAAgC,EAAnD;AACA,MAAMC,UAAU,GAAGC,QAAQ,CAACC,QAAT,CAAkBC,IAArC;AACA,IAAIC,aAAa,GAAGC,IAAI,CAACC,KAAL,CAAYC,MAAM,CAACC,YAAP,CAAoBC,OAApB,CAA6B,mBAA7B,CAAZ,KAAoE,EAAxF;AACA,IAAIC,QAAJ;AACA,IAAIC,aAAJ;AACA,IAAIC,SAAS,GAAG,KAAhB;AACA,IAAIC,SAAS,GAAG,CAAhB;AACA,IAAIC,iBAAJ;AACA,IAAIC,SAAJ;;AAEA,IAAKjB,gBAA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AAQ,CAACzG,MAAT,GAAkB,CAAlB,IAAuByG,QAAQ,CAACjG,OAAT,CAAoBkG,OAAF,IAAeA,OAAO,CAACxC,gBAAR,CAA0B,QAA1B,EAAsCe,CAAF,IAAS;AACpGA,IAAAA,CAAC,CAACX,cAAF;AAEA,UAAM2B,MAAM,GAAGhB,CAAC,CAACV,MAAF,CAASC,KAAxB;;AAEA,QAAKyB,MAAL,EAAc;AACb,YAAMU,UAAU,GAAG7H,QAAQ,CAAC+B,aAAT,CAAwB,uDAAxB,CAAnB;AAEA8F,MAAAA,UAAU,KAAMA,UAAU,CAACC,OAAX,CAAmBX,MAAnB,GAA4BA,MAAlC,CAAV;AACAC,MAAAA,EAAE,CAACC,OAAH,CAAWxF,GAAX,CAAgB,gBAAhB,EAAkCsF,MAAlC;AACA;AACD,GAXuD,CAAjC,CAAvB;AAYA,CAfD;;AAiBA,SAASY,mBAAT,GAA+B;AAC9BjG,EAAAA,eAAe;AACf4F,EAAAA,6BAA6B;AAC7BR,EAAAA,uBAAuB;AACvB,EAED;AACA;AACA;;;AAEA,MAAMc,iBAAiB,GAAGC,WAAW,CAAE,YAAW;AACjD,MAAK,OAAOpI,gBAAgB,CAAC8C,iBAAxB,KAA8C,WAAnD,EAAiE;AAChE;AACA;;AAEDlC,EAAAA,QAAQ,GAAGT,QAAQ,CAAC+B,aAAT,CAAwB,6BAAxB,CAAX;AACAjB,EAAAA,SAAS,GAAGd,QAAQ,CAAC+B,aAAT,CAAwB,qBAAxB,CAAZ;;AAEA,MAAKjB,SAAS,IAAIL,QAAlB,EAA6B;AAC5BsH,IAAAA,mBAAmB;AACnBG,IAAAA,aAAa,CAAEF,iBAAF,CAAb;AACA;AACD,CAZoC,EAYlC,CAZkC,CAArC,C","sources":["webpack://learnpress/./assets/src/apps/js/frontend/courses.js"],"sourcesContent":["const urlCourses = lpGlobalSettings.courses_url || '';\nconst urlCurrent = document.location.href;\nlet filterCourses = JSON.parse( window.localStorage.getItem( 'lp_filter_courses' ) ) || {};\nlet skeleton;\nlet skeletonClone;\nlet isLoading = false;\nlet firstLoad = 1;\nlet elNoLoadAjaxFirst;\nlet elArchive;\n\nif ( lpGlobalSettings.is_course_archive ) {\n\tconst queryString = window.location.search;\n\n\tif ( ! queryString.length && urlCurrent.search( 'page' ) === -1 ) {\n\t\tfilterCourses = {};\n\t}\n}\n\nconst lpArchiveAddQueryArgs = ( endpoint, args ) => {\n\tconst url = new URL( endpoint );\n\n\tObject.keys( args ).forEach( ( arg ) => {\n\t\turl.searchParams.set( arg, args[ arg ] );\n\t} );\n\n\treturn url;\n};\n\nconst lpArchiveCourse = () => {\n\tskeleton = document.querySelector( '.lp-archive-course-skeleton' );\n\telNoLoadAjaxFirst = document.querySelector( '.no-first-load-ajax' );\n\n\tif ( ! skeleton ) {\n\t\treturn;\n\t}\n\n\tif ( ! elNoLoadAjaxFirst ) {\n\t\tlpArchiveRequestCourse( filterCourses );\n\t}\n\n\tlpArchivePaginationCourse();\n\tlpArchiveSearchCourse();\n};\n\nwindow.lpArchiveRequestCourse = ( args, callBackSuccess ) => {\n\tconst wpRestUrl = lpGlobalSettings.lp_rest_url;\n\n\tif ( ! wpRestUrl ) {\n\t\treturn;\n\t}\n\n\tif ( ! skeleton ) {\n\t\treturn;\n\t}\n\n\tconst archiveCourse = elArchive && elArchive.querySelector( 'div.lp-archive-courses .lp-content-area' );\n\tconst listCourse = archiveCourse && archiveCourse.querySelector( 'ul.learn-press-courses' );\n\n\tif ( ! listCourse ) {\n\t\treturn;\n\t}\n\n\tif ( isLoading ) {\n\t\treturn;\n\t}\n\n\tisLoading = true;\n\n\tif ( ! skeletonClone ) {\n\t\tskeletonClone = skeleton.outerHTML;\n\t} else {\n\t\tlistCourse.append( skeleton );\n\t\t// return;\n\t}\n\n\tconst urlCourseArchive = lpArchiveAddQueryArgs( wpRestUrl + 'lp/v1/courses/archive-course', { ...lpGlobalSettings.lpArchiveSkeleton, ...args } );\n\tconst url = lpGlobalSettings.lp_rest_url + 'lp/v1/courses/archive-course' + urlCourseArchive.search;\n\n\tfetch( url, {\n\t\tmethod: 'GET',\n\t} )\n\t\t.then( ( response ) => response.json() )\n\t\t.then( ( response ) => {\n\t\t\tif ( typeof response.data.content !== 'undefined' && listCourse ) {\n\t\t\t\tlistCourse.innerHTML = response.data.content || '';\n\t\t\t}\n\n\t\t\tconst pagination = response.data.pagination;\n\n\t\t\t// lpArchiveSearchCourse();\n\n\t\t\tconst paginationEle = document.querySelector( '.learn-press-pagination' );\n\t\t\tif ( paginationEle ) {\n\t\t\t\tpaginationEle.remove();\n\t\t\t}\n\n\t\t\tif ( typeof pagination !== 'undefined' ) {\n\t\t\t\tconst paginationHTML = new DOMParser().parseFromString( pagination, 'text/html' );\n\t\t\t\tconst paginationNewNode = paginationHTML.querySelector( '.learn-press-pagination' );\n\t\t\t\t//const paginationInnerHTML = paginationSelector && paginationSelector.innerHTML;\n\n\t\t\t\tif ( paginationNewNode ) {\n\t\t\t\t\tlistCourse.after( paginationNewNode );\n\t\t\t\t\tlpArchivePaginationCourse();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\twp.hooks.doAction( 'lp-js-get-courses', response );\n\n\t\t\tif ( typeof callBackSuccess === 'function' ) {\n\t\t\t\tcallBackSuccess( response );\n\t\t\t}\n\t\t} ).catch( ( error ) => {\n\t\t\tlistCourse.innerHTML += `<div class=\"lp-ajax-message error\" style=\"display:block\">${ error.message || 'Error: Query lp/v1/courses/archive-course' }</div>`;\n\t\t\tconsole.log( error );\n\t\t} ).finally( () => {\n\t\t\tisLoading = false;\n\t\t\t// skeleton && skeleton.remove();\n\n\t\t\tjQuery( 'form.search-courses button' ).removeClass( 'loading' );\n\n\t\t\tif ( ! firstLoad ) {\n\t\t\t// Scroll to archive element\n\t\t\t\tconst optionScroll = { behavior: 'smooth' };\n\t\t\t\telArchive.scrollIntoView( optionScroll );\n\t\t\t} else {\n\t\t\t\tfirstLoad = 0;\n\t\t\t}\n\n\t\t\t// Save filter courses to Storage\n\t\t\twindow.localStorage.setItem( 'lp_filter_courses', JSON.stringify( args ) );\n\t\t\t// Change url by params filter courses\n\t\t\tconst urlPush = lpArchiveAddQueryArgs( document.location, args );\n\t\t\twindow.history.pushState( '', '', urlPush );\n\t\t} );\n};\n\nconst lpArchiveSearchCourse = () => {\n\tconst searchForm = document.querySelectorAll( 'form.search-courses' );\n\tconst filterCourses = JSON.parse( window.localStorage.getItem( 'lp_filter_courses' ) ) || {};\n\n\tsearchForm.forEach( ( s ) => {\n\t\tconst search = s.querySelector( 'input[name=\"c_search\"]' );\n\t\tconst btn = s.querySelector( '[type=\"submit\"]' );\n\t\tlet timeOutSearch;\n\n\t\tsearch.addEventListener( 'keyup', ( event ) => {\n\t\t\tif ( skeleton ) {\n\t\t\t\tskeleton.style.display = 'block';\n\t\t\t}\n\t\t\tevent.preventDefault();\n\n\t\t\tconst s = event.target.value.trim();\n\n\t\t\tif ( ! s || ( s && s.length > 2 ) ) {\n\t\t\t\tif ( undefined !== timeOutSearch ) {\n\t\t\t\t\tclearTimeout( timeOutSearch );\n\t\t\t\t}\n\n\t\t\t\ttimeOutSearch = setTimeout( function() {\n\t\t\t\t\tbtn.classList.add( 'loading' );\n\n\t\t\t\t\tfilterCourses.c_search = s;\n\t\t\t\t\tfilterCourses.paged = 1;\n\n\t\t\t\t\tlpArchiveRequestCourse( { ...filterCourses } );\n\t\t\t\t}, 800 );\n\t\t\t}\n\t\t} );\n\n\t\ts.addEventListener( 'submit', ( e ) => {\n\t\t\te.preventDefault();\n\n\t\t\tconst eleSearch = s.querySelector( 'input[name=\"c_search\"]' );\n\t\t\teleSearch && eleSearch.dispatchEvent( new Event( 'keyup' ) );\n\t\t} );\n\t} );\n};\n\nconst lpArchivePaginationCourse = () => {\n\tconst paginationEle = document.querySelectorAll( '.lp-archive-courses .learn-press-pagination .page-numbers' );\n\n\tpaginationEle.length > 0 && paginationEle.forEach( ( ele ) => ele.addEventListener( 'click', ( event ) => {\n\t\tevent.preventDefault();\n\t\tevent.stopPropagation();\n\n\t\tif ( ! elArchive ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( skeleton ) {\n\t\t\tskeleton.style.display = 'block';\n\t\t}\n\n\t\t// Scroll to archive element\n\t\telArchive.scrollIntoView( { behavior: 'smooth' } );\n\n\t\tlet filterCourses = {};\n\t\tfilterCourses = JSON.parse( window.localStorage.getItem( 'lp_filter_courses' ) ) || {};\n\n\t\tconst urlString = event.currentTarget.getAttribute( 'href' );\n\n\t\tif ( urlString ) {\n\t\t\tconst current = [ ...paginationEle ].filter( ( el ) => el.classList.contains( 'current' ) );\n\t\t\tconst paged = event.currentTarget.textContent || ( ele.classList.contains( 'next' ) && parseInt( current[ 0 ].textContent ) + 1 ) || ( ele.classList.contains( 'prev' ) && parseInt( current[ 0 ].textContent ) - 1 );\n\t\t\tfilterCourses.paged = paged;\n\n\t\t\tlpArchiveRequestCourse( { ...filterCourses } );\n\t\t}\n\t} ) );\n};\n\nconst lpArchiveGridListCourse = () => {\n\tconst layout = LP.Cookies.get( 'courses-layout' );\n\n\tconst switches = document.querySelectorAll( '.lp-courses-bar .switch-layout [name=\"lp-switch-layout-btn\"]' );\n\n\tswitches.length > 0 && [ ...switches ].map( ( ele ) => ele.value === layout && ( ele.checked = true ) );\n};\n\nconst lpArchiveGridListCourseHandle = () => {\n\tconst gridList = document.querySelectorAll( '.lp-archive-courses input[name=\"lp-switch-layout-btn\"]' );\n\n\tgridList.length > 0 && gridList.forEach( ( element ) => element.addEventListener( 'change', ( e ) => {\n\t\te.preventDefault();\n\n\t\tconst layout = e.target.value;\n\n\t\tif ( layout ) {\n\t\t\tconst dataLayout = document.querySelector( '.lp-archive-courses .learn-press-courses[data-layout]' );\n\n\t\t\tdataLayout && ( dataLayout.dataset.layout = layout );\n\t\t\tLP.Cookies.set( 'courses-layout', layout );\n\t\t}\n\t} ) );\n};\n\nfunction LPArchiveCourseInit() {\n\tlpArchiveCourse();\n\tlpArchiveGridListCourseHandle();\n\tlpArchiveGridListCourse();\n}\n\n// document.addEventListener( 'DOMContentLoaded', function( event ) {\n// \tLPArchiveCourseInit();\n// } );\n\nconst detectedElArchive = setInterval( function() {\n\tif ( typeof lpGlobalSettings.lpArchiveSkeleton === 'undefined' ) {\n\t\treturn;\n\t}\n\n\tskeleton = document.querySelector( '.lp-archive-course-skeleton' );\n\telArchive = document.querySelector( '.lp-archive-courses' );\n\n\tif ( elArchive && skeleton ) {\n\t\tLPArchiveCourseInit();\n\t\tclearInterval( detectedElArchive );\n\t}\n}, 1 );\n"],"names":["urlCourses","lpGlobalSettings","courses_url","urlCurrent","document","location","href","filterCourses","JSON","parse","window","localStorage","getItem","skeleton","skeletonClone","isLoading","firstLoad","elNoLoadAjaxFirst","elArchive","is_course_archive","queryString","search","length","lpArchiveAddQueryArgs","endpoint","args","url","URL","Object","keys","forEach","arg","searchParams","set","lpArchiveCourse","querySelector","lpArchiveRequestCourse","lpArchivePaginationCourse","lpArchiveSearchCourse","callBackSuccess","wpRestUrl","lp_rest_url","archiveCourse","listCourse","outerHTML","append","urlCourseArchive","lpArchiveSkeleton","fetch","method","then","response","json","data","content","innerHTML","pagination","paginationEle","remove","paginationHTML","DOMParser","parseFromString","paginationNewNode","after","wp","hooks","doAction","catch","error","message","console","log","finally","jQuery","removeClass","optionScroll","behavior","scrollIntoView","setItem","stringify","urlPush","history","pushState","searchForm","querySelectorAll","s","btn","timeOutSearch","addEventListener","event","style","display","preventDefault","target","value","trim","undefined","clearTimeout","setTimeout","classList","add","c_search","paged","e","eleSearch","dispatchEvent","Event","ele","stopPropagation","urlString","currentTarget","getAttribute","current","filter","el","contains","textContent","parseInt","lpArchiveGridListCourse","layout","LP","Cookies","get","switches","map","checked","lpArchiveGridListCourseHandle","gridList","element","dataLayout","dataset","LPArchiveCourseInit","detectedElArchive","setInterval","clearInterval"],"sourceRoot":""}
assets/js/dist/frontend/courses.min.asset.php ADDED
@@ -0,0 +1 @@
 
1
+ <?php return array('dependencies' => array(), 'version' => 'f698d47d3ab2b90e5eb8');
assets/js/dist/frontend/courses.min.deps.json ADDED
@@ -0,0 +1 @@
 
1
+ []
assets/js/dist/frontend/custom.asset.php ADDED
@@ -0,0 +1 @@
 
1
+ <?php return array('dependencies' => array(), 'version' => '0ee52a4e18c91552fb50');
assets/js/dist/frontend/custom.deps.json ADDED
@@ -0,0 +1 @@
 
1
+ []
assets/js/dist/frontend/custom.js.map ADDED
@@ -0,0 +1 @@
 
1
+ {"version":3,"file":"./assets/js/dist/frontend/custom.js","mappings":";;;;;AAAA;AACA;AACA;AAEA,MAAM;AAAEA,EAAAA;AAAF,IAAWC,EAAjB;AAEA,MAAMC,CAAC,GAAGC,MAAM,CAACC,MAAP,IAAiBA,MAA3B;AAEAJ,IAAI,CAACK,SAAL,CAAgB,iBAAhB,EAAmC,UAAUC,MAAV,EAAmB;AACrD,SAAOA,MAAP,CADqD,CACtC;AACf,CAFD;AAIAN,IAAI,CAACO,SAAL,CAAgB,mBAAhB,EAAqC,YAAW,CAC/C,CADD;AAGAP,IAAI,CAACO,SAAL,CAAgB,cAAhB,EAAgC,UAAUC,OAAV,EAAmBC,EAAnB,EAAwB;AACvDP,EAAAA,CAAC,CAAG,gBAAgBO,EAAI,EAAvB,CAAD,CAA4BC,WAA5B,CAAyC,gCAAzC,EAA4EC,QAA5E,CAAsF,2BAAtF;;AAEAR,EAAAA,MAAM,CAACS,cAAP,GAAwB,YAAW;AAClC,WAAO,UAAP;AACA,GAFD;AAGA,CAND;AAQAZ,IAAI,CAACO,SAAL,CAAgB,gBAAhB,EAAkC,UAAUM,QAAV,EAAoBJ,EAApB,EAAyB;AAC1DP,EAAAA,CAAC,CAAG,gBAAgBO,EAAI,EAAvB,CAAD,CAA4BC,WAA5B,CAAyC,8BAAzC,EAA0EC,QAA1E,CAAqF,+BAA+BE,QAAQ,CAACL,OAAT,CAAiBM,UAAY,EAAjJ;AACAX,EAAAA,MAAM,CAACS,cAAP,GAAwB,IAAxB;AACA,CAHD,E","sources":["webpack://learnpress/./assets/src/apps/js/frontend/custom.js"],"sourcesContent":["/**\n * Custom functions for frontend quiz.\n */\n\nconst { Hook } = LP;\n\nconst $ = window.jQuery || jQuery;\n\nHook.addFilter( 'question-blocks', function( blocks ) {\n\treturn blocks; ///[ 'answer-options', 'title', 'content', 'hint', 'explanation'];\n} );\n\nHook.addAction( 'before-start-quiz', function() {\n} );\n\nHook.addAction( 'quiz-started', function( results, id ) {\n\t$( `.course-item-${ id }` ).removeClass( 'status-completed failed passed' ).addClass( 'has-status status-started' );\n\n\twindow.onbeforeunload = function() {\n\t\treturn 'Warning!';\n\t};\n} );\n\nHook.addAction( 'quiz-submitted', function( response, id ) {\n\t$( `.course-item-${ id }` ).removeClass( 'status-started passed failed' ).addClass( `has-status status-completed ${ response.results.graduation }` );\n\twindow.onbeforeunload = null;\n} );\n"],"names":["Hook","LP","$","window","jQuery","addFilter","blocks","addAction","results","id","removeClass","addClass","onbeforeunload","response","graduation"],"sourceRoot":""}
assets/js/dist/frontend/custom.min.asset.php ADDED
@@ -0,0 +1 @@
 
1
+ <?php return array('dependencies' => array(), 'version' => '000802e7005fe63c7846');
assets/js/dist/frontend/custom.min.deps.json ADDED
@@ -0,0 +1 @@
 
1
+ []
assets/js/dist/frontend/lesson.asset.php ADDED
@@ -0,0 +1 @@
 
1
+ <?php return array('dependencies' => array(), 'version' => '0677aa8c0984d1567565');
assets/js/dist/frontend/lesson.deps.json ADDED
@@ -0,0 +1 @@
 
1
+ []
assets/js/dist/frontend/lesson.js.map ADDED
@@ -0,0 +1 @@
 
1
+ {"version":3,"sources":["webpack://LP.[name]/webpack/bootstrap"],"names":[],"mappings":";;QAAA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;;;QAGA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA,0CAA0C,gCAAgC;QAC1E;QACA;;QAEA;QACA;QACA;QACA,wDAAwD,kBAAkB;QAC1E;QACA,iDAAiD,cAAc;QAC/D;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA,yCAAyC,iCAAiC;QAC1E,gHAAgH,mBAAmB,EAAE;QACrI;QACA;;QAEA;QACA;QACA;QACA,2BAA2B,0BAA0B,EAAE;QACvD,iCAAiC,eAAe;QAChD;QACA;QACA;;QAEA;QACA,sDAAsD,+DAA+D;;QAErH;QACA;;;QAGA;QACA","file":"frontend/lesson.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = \"./assets/src/apps/js/frontend/lesson.js\");\n"],"sourceRoot":""}
assets/js/dist/frontend/lesson.min.asset.php ADDED
@@ -0,0 +1 @@
 
1
+ <?php return array('dependencies' => array(), 'version' => 'dd4d6723e70b4d227f83');
assets/js/dist/frontend/lesson.min.deps.json ADDED
@@ -0,0 +1 @@
 
1
+ []
assets/js/dist/frontend/lp-configs.asset.php ADDED
@@ -0,0 +1 @@
 
1
+ <?php return array('dependencies' => array(), 'version' => '5f6881ea352f729a0340');
assets/js/dist/frontend/lp-configs.deps.json ADDED
@@ -0,0 +1 @@
 
1
+ []
assets/js/dist/frontend/lp-configs.js.map ADDED
@@ -0,0 +1 @@
 
1
+ {"version":3,"file":"./assets/js/dist/frontend/lp-configs.js","mappings":";;UAAA;UACA;;;;;WCDA;WACA;WACA;WACA;WACA,yCAAyC,wCAAwC;WACjF;WACA;WACA;;;;;WCPA,8CAA8C;;;;;WCA9C;W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,eAAe,GAAG,UAAUC,IAAV,EAAiB;AAC/C,QAAMC,CAAC,GAAGpB,EAAE,CAACD,IAAH,CAAQgB,YAAR,CAAsB,mBAAtB,EAA2CP,gBAA3C,CAAV;AAEA,SAAOW,IAAI,IAAIC,CAAC,CAAED,IAAF,CAAT,GAAoBC,CAAC,CAAED,IAAF,CAArB,GAAgC,YAAW;AACjD,WAAO,EAAP;AACA,GAFD;AAGA,CANM;AAQA,MAAME,eAAe,GAAG,YAAW;AACzC,QAAMC,MAAM,GAAGvB,IAAI,CAACgB,YAAL,CAAmB,mBAAnB,EAAwC;AACtDQ,IAAAA,IAAI,EAAE,IADgD;AAEtDC,IAAAA,WAAW,EAAE,IAFyC;AAGtDC,IAAAA,MAAM,EAAE;AAH8C,GAAxC,CAAf;AAKA,CANM,C","sources":["webpack://learnpress/webpack/bootstrap","webpack://learnpress/webpack/runtime/define property getters","webpack://learnpress/webpack/runtime/hasOwnProperty shorthand","webpack://learnpress/webpack/runtime/make namespace object","webpack://learnpress/./assets/src/apps/js/frontend/lp-configs.js"],"sourcesContent":["// The require scope\nvar __webpack_require__ = {};\n\n","// define getter functions for harmony exports\n__webpack_require__.d = function(exports, definition) {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }","// define __esModule on exports\n__webpack_require__.r = function(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};","const { Hook } = LP;\n\nexport const classNames = {\n\tQuiz: {\n\t\tResult: [ 'quiz-result' ],\n\t\tContent: [ 'quiz-content' ],\n\t\tQuestions: [ 'quiz-questions' ],\n\t\tButtons: [ 'quiz-buttons' ],\n\t\tAttempts: [ 'quiz-attempts' ],\n\t},\n};\n\nconst questionCheckers = {\n\tsingle_choice() {\n\n\t},\n\n\tmulti_choice() {\n\n\t},\n\n\ttrue_or_false() {\n\n\t},\n};\n\nexport const isQuestionCorrect = {\n\tfill_in_blank() {\n\t\treturn true;\n\t},\n};\n\n/**\n * Question blocks.\n *\n * Allow to sort the blocks of question\n */\nexport const questionBlocks = function() {\n\treturn LP.Hook.applyFilters( 'question-blocks', [ 'title', 'content', 'answer-options', 'explanation', 'hint', 'buttons' ] );\n};\n\nexport const questionFooterButtons = function() {\n\treturn LP.Hook.applyFilters( 'question-footer-buttons', [ 'instant-check' ] );\n};\n\nexport const questionTitleParts = function() {\n\treturn LP.Hook.applyFilters( 'question-title-parts', [ 'index', 'title', 'hint', 'edit-permalink' ] );\n};\n\nexport const questionChecker = function( type ) {\n\tconst c = LP.Hook.applyFilters( 'question-checkers', questionCheckers );\n\n\treturn type && c[ type ] ? c[ type ] : function() {\n\t\treturn {};\n\t};\n};\n\nexport const quizStartBlocks = function() {\n\tconst blocks = Hook.applyFilters( 'quiz-start-blocks', {\n\t\tmeta: true,\n\t\tdescription: true,\n\t\tcustom: 'Hello',\n\t} );\n};\n"],"names":["Hook","LP","classNames","Quiz","Result","Content","Questions","Buttons","Attempts","questionCheckers","single_choice","multi_choice","true_or_false","isQuestionCorrect","fill_in_blank","questionBlocks","applyFilters","questionFooterButtons","questionTitleParts","questionChecker","type","c","quizStartBlocks","blocks","meta","description","custom"],"sourceRoot":""}
assets/js/dist/frontend/lp-configs.min.asset.php ADDED
@@ -0,0 +1 @@
 
1
+ <?php return array('dependencies' => array(), 'version' => '2c724a34e57939f1da12');
assets/js/dist/frontend/lp-configs.min.deps.json ADDED
@@ -0,0 +1 @@
 
1
+ []
assets/js/dist/frontend/modal.asset.php ADDED
@@ -0,0 +1 @@
 
1
+ <?php return array('dependencies' => array('wp-data', 'wp-element', 'wp-i18n'), 'version' => 'b77718c7c65ccd14d0a4');
assets/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Ae;WACf,iCAAiC,WAAW;WAC5C;WACA;;;;;WCPA;WACA;WACA;WACA;WACA,yCAAyC,wCAAwC;WACjF;WACA;WACA;;;;;WCPA,8CAA8C;;;;;WCA9C;WACA;WACA;WACA,uDAAuD,iBAAiB;WACxE;WACA,gDAAgD,aAAa;WAC7D;;;;;;;;;;;;ACNA;AAEA,+DAAeJ,oDAAf,E","sources":["webpack://learnpress/./assets/src/apps/js/frontend/modal/index.js","webpack://learnpress/./assets/src/apps/js/frontend/modal/store/actions.js","webpack://learnpress/./assets/src/apps/js/frontend/modal/store/index.js","webpack://learnpress/./assets/src/apps/js/frontend/modal/store/middlewares.js","webpack://learnpress/./assets/src/apps/js/frontend/modal/store/reducer.js","webpack://learnpress/./assets/src/apps/js/frontend/modal/store/selectors.js","webpack://learnpress/./node_modules/refx/refx.js","webpack://learnpress/external window [\"wp\",\"data\"]","webpack://learnpress/external window [\"wp\",\"element\"]","webpack://learnpress/external window [\"wp\",\"i18n\"]","webpack://learnpress/webpack/bootstrap","webpack://learnpress/webpack/runtime/compat get default export","webpack://learnpress/webpack/runtime/define property getters","webpack://learnpress/webpack/runtime/hasOwnProperty shorthand","webpack://learnpress/webpack/runtime/make namespace object","webpack://learnpress/./assets/src/apps/js/frontend/modal.js"],"sourcesContent":["/**\n * Create Modal popup.\n * Edit: Use React Hook.\n *\n * @author Nhamdv - ThimPress.\n */\n\nimport store from './store';\nimport { __ } from '@wordpress/i18n';\nimport { useSelect, dispatch } from '@wordpress/data';\n\nconst Modal = ( { children } ) => {\n\tconst { show, hide, confirm } = dispatch( 'learnpress/modal' );\n\n\tconst isShow = useSelect( ( select ) => {\n\t\tconst isOpen = select( 'learnpress/modal' ).isOpen();\n\t\treturn isOpen;\n\t} );\n\n\tconst message = useSelect( ( select ) => {\n\t\tconst getMessage = select( 'learnpress/modal' ).getMessage();\n\t\treturn getMessage;\n\t} );\n\n\tconst dataConfirm = ( c ) => ( event ) => {\n\t\tconfirm( c );\n\t};\n\n\tconst styles = {\n\t\tdisplay: isShow ? 'block' : 'none',\n\t};\n\n\treturn (\n\t\t<>\n\t\t\t<div>\n\t\t\t\t<div id=\"lp-modal-overlay\" style={ styles }></div>\n\t\t\t\t<div id=\"lp-modal-window\" style={ styles }>\n\t\t\t\t\t<div id=\"lp-modal-content\" dangerouslySetInnerHTML={ { __html: message } }></div>\n\t\t\t\t\t<div id=\"lp-modal-buttons\">\n\t\t\t\t\t\t<button className=\"lp-button modal-button-ok\" onClick={ dataConfirm( 'yes' ) }>\n\t\t\t\t\t\t\t<span>{ __( 'OK', 'learnpress' ) }</span>\n\t\t\t\t\t\t</button>\n\t\t\t\t\t\t<button className=\"lp-button modal-button-cancel\" onClick={ dataConfirm( 'no' ) }>\n\t\t\t\t\t\t\t<span>{ __( 'Cancel', 'learnpress' ) }</span>\n\t\t\t\t\t\t</button>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t{ children }\n\t\t</>\n\t);\n};\n\nexport default Modal;\n","export function show( message, cb ) {\n\treturn {\n\t\ttype: 'SHOW_MODAL',\n\t\tmessage,\n\t\tcb,\n\t};\n}\n\nexport function hide() {\n\treturn {\n\t\ttype: 'HIDE_MODAL',\n\t};\n}\n\nexport function confirm( value ) {\n\treturn {\n\t\ttype: 'CONFIRM',\n\t\tvalue,\n\t};\n}\n","import { registerStore } from '@wordpress/data';\n\nimport reducer from './reducer';\nimport * as actions from './actions';\nimport * as selectors from './selectors';\nimport applyMiddlewares from './middlewares';\n\nconst { controls: dataControls } = LP.dataControls;\n\nconst store = registerStore( 'learnpress/modal', {\n\treducer,\n\tselectors,\n\tactions,\n\tcontrols: {\n\t\t...dataControls,\n\t},\n} );\n\napplyMiddlewares( store );\n\nexport default store;\n","/**\n * External dependencies\n */\nimport refx from 'refx';\n\nconst effects = {\n\tENROLL_COURSE_X: ( action, store ) => {\n\t\tenrollCourse: ( action, store ) => {\n\t\t\tconst { dispatch } = store;\n\n\t\t\t//dispatch()\n\t\t};\n\t},\n};\n\n/**\n * Applies the custom middlewares used specifically in the editor module.\n *\n * @param {Object} store Store Object.\n *\n * @return {Object} Update Store Object.\n */\nfunction applyMiddlewares( store ) {\n\tlet enhancedDispatch = () => {\n\t\tthrow new Error(\n\t\t\t'Dispatching while constructing your middleware is not allowed. ' +\n\t\t\t\t'Other middleware would not be applied to this dispatch.'\n\t\t);\n\t};\n\n\tconst middlewareAPI = {\n\t\tgetState: store.getState,\n\t\tdispatch: ( ...args ) => enhancedDispatch( ...args ),\n\t};\n\n\tenhancedDispatch = refx( effects )( middlewareAPI )( store.dispatch );\n\n\tstore.dispatch = enhancedDispatch;\n\treturn store;\n}\n\nexport default applyMiddlewares;\n","const STORE_DATA = {};\n\nexport const Modal = ( state = STORE_DATA, action ) => {\n\tswitch ( action.type ) {\n\tcase 'SHOW_MODAL':\n\t\treturn {\n\t\t\t...state,\n\t\t\tisOpen: true,\n\t\t\tmessage: action.message,\n\t\t\tcb: action.cb,\n\t\t};\n\tcase 'HIDE_MODAL':\n\t\treturn {\n\t\t\t...state,\n\t\t\tisOpen: false,\n\t\t\tmessage: false,\n\t\t\tcb: null,\n\t\t};\n\tcase 'CONFIRM':\n\t\tstate.cb &&\n\t\t\t\tsetTimeout( () => {\n\t\t\t\t\tstate.cb();\n\t\t\t\t}, 10 );\n\n\t\treturn {\n\t\t\t...state,\n\t\t\tconfirm: action.value,\n\t\t};\n\t}\n\treturn state;\n};\n\nexport default Modal;\n","import { dispatch } from '@wordpress/data';\n\nexport function isOpen( state ) {\n\treturn state.isOpen;\n}\n\nexport function getMessage( state ) {\n\treturn state.message;\n}\n\nexport function confirm( state, message, cb ) {\n\tconst { show, hide } = dispatch( 'learnpress/modal' );\n\n\tif ( ! state.message ) {\n\t\tshow( message, cb );\n\t} else {\n\t\thide();\n\t\treturn state.confirm;\n\t}\n\n\treturn 'no';\n}\n","'use strict';\n\nfunction flattenIntoMap( map, effects ) {\n\tvar i;\n\tif ( Array.isArray( effects ) ) {\n\t\tfor ( i = 0; i < effects.length; i++ ) {\n\t\t\tflattenIntoMap( map, effects[ i ] );\n\t\t}\n\t} else {\n\t\tfor ( i in effects ) {\n\t\t\tmap[ i ] = ( map[ i ] || [] ).concat( effects[ i ] );\n\t\t}\n\t}\n}\n\nfunction refx( effects ) {\n\tvar map = {},\n\t\tmiddleware;\n\n\tflattenIntoMap( map, effects );\n\n\tmiddleware = function( store ) {\n\t\treturn function( next ) {\n\t\t\treturn function( action ) {\n\t\t\t\tvar handlers = map[ action.type ],\n\t\t\t\t\tresult = next( action ),\n\t\t\t\t\ti, handlerAction;\n\n\t\t\t\tif ( handlers ) {\n\t\t\t\t\tfor ( i = 0; i < handlers.length; i++ ) {\n\t\t\t\t\t\thandlerAction = handlers[ i ]( action, store );\n\t\t\t\t\t\tif ( handlerAction ) {\n\t\t\t\t\t\t\tstore.dispatch( handlerAction );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn result;\n\t\t\t};\n\t\t};\n\t};\n\n\tmiddleware.effects = map;\n\n\treturn middleware;\n}\n\nmodule.exports = refx;\n","module.exports = window[\"wp\"][\"data\"];","module.exports = window[\"wp\"][\"element\"];","module.exports = window[\"wp\"][\"i18n\"];","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = function(module) {\n\tvar getter = module && module.__esModule ?\n\t\tfunction() { return module['default']; } :\n\t\tfunction() { return module; };\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = function(exports, definition) {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }","// define __esModule on exports\n__webpack_require__.r = function(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};","import Modal from './modal/index';\n\nexport default Modal;\n"],"names":["store","__","useSelect","dispatch","Modal","children","show","hide","confirm","isShow","select","isOpen","message","getMessage","dataConfirm","c","event","styles","display","__html","cb","type","value","registerStore","reducer","actions","selectors","applyMiddlewares","controls","dataControls","LP","refx","effects","ENROLL_COURSE_X","action","enrollCourse","enhancedDispatch","Error","middlewareAPI","getState","STORE_DATA","state","setTimeout"],"sourceRoot":""}
assets/js/dist/frontend/modal.min.asset.php ADDED
@@ -0,0 +1 @@
 
1
+ <?php return array('dependencies' => array('wp-data', 'wp-element', 'wp-i18n'), 'version' => '56b29fd7370c209c0daa');
assets/js/dist/frontend/modal.min.deps.json ADDED
@@ -0,0 +1 @@
 
1
+ []
assets/js/dist/frontend/profile.asset.php ADDED
@@ -0,0 +1 @@
 
1
+ <?php return array('dependencies' => array('react', 'wp-api-fetch', 'wp-element', 'wp-i18n', 'wp-url'), 'version' => '520ee0771c22cfedf02f');
assets/js/dist/frontend/profile.deps.json ADDED
@@ -0,0 +1 @@
 
1
+ ["react"]
assets/js/dist/frontend/profile.js CHANGED
@@ -157,9 +157,9 @@ function Avatar() {
157
  let error = '';
158
 
159
  if (parseInt(fileUpload.size) > 2097152) {
160
- error = (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('File size too large. You need to upload a file < 2MB', 'learnpress');
161
  } else if (img.naturalWidth < width || img.naturalHeight < height) {
162
- error = (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.sprintf)((0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Image size must be greater than or equal to %1$sx%2$spx', 'learnpress'), width, height);
163
  }
164
 
165
  if (error) {
157
  let error = '';
158
 
159
  if (parseInt(fileUpload.size) > 2097152) {
160
+ error = (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('The file size is too large. You need to upload a file < 2MB.', 'learnpress');
161
  } else if (img.naturalWidth < width || img.naturalHeight < height) {
162
+ error = (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.sprintf)((0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('The image size must be greater than or equal to %1$sx%2$spx', 'learnpress'), width, height);
163
  }
164
 
165
  if (error) {
assets/js/dist/frontend/profile.js.map ADDED
@@ -0,0 +1 @@
 
1
+ {"version":3,"file":"./assets/js/dist/frontend/profile.js","mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA;AACA;AACA;AACA;AAEe,SAASQ,MAAT,GAAkB;AAChC,QAAM,CAAEC,IAAF,EAAQC,OAAR,IAAoBV,4DAAQ,EAAlC;AACA,QAAM,CAAEW,KAAF,EAASC,QAAT,IAAsBZ,4DAAQ,CAAE,CAAF,CAApC;AACA,QAAM,CAAEa,MAAF,EAAUC,SAAV,IAAwBd,4DAAQ,CAAE,CAAF,CAAtC;AACA,QAAM,CAAEe,IAAF,EAAQC,OAAR,IAAoBhB,4DAAQ,CAAE;AAAEiB,IAAAA,CAAC,EAAE,CAAL;AAAQC,IAAAA,CAAC,EAAE;AAAX,GAAF,CAAlC;AACA,QAAM,CAAEC,QAAF,EAAYC,WAAZ,IAA4BpB,4DAAQ,CAAE,CAAF,CAA1C;AACA,QAAM,CAAEqB,iBAAF,EAAqBC,oBAArB,IAA8CtB,4DAAQ,CAAE,IAAF,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AW;AACrB0H,MAAAA,OAAO,CAACC,GAAR,CAAa3H,GAAb,EADqB,CAErB;AACA,KAZD;AAaA,GAdD;;AAgBA,QAAM4H,cAAc,GAAGvI,QAAQ,CAACyE,aAAT,CAAwB,4CAAxB,CAAvB;;AACA,MAAK,CAAE8D,cAAP,EAAwB;AACvB;AACA;;AAED,QAAMzJ,IAAI,GAAG4G,IAAI,CAACC,KAAL,CAAY4C,cAAc,CAAC3C,KAA3B,CAAb;AAEA1B,EAAAA,WAAW,CAAEF,QAAF,EAAYlF,IAAZ,CAAX;AACA,CA/BD;;AAgCA,+DAAesJ,gBAAf;;;;;;;;;;ACnCA,2HAAmD;;;;;;;;;;;;ACAnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEa;;AAEb;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;;;;;;;;;;;AC1CA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,uBAAuB;AACvB;;AAEA;AACA,iBAAiB;AACjB,+BAA+B;AAC/B;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,IAAI;AACJ;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;;AAGH;AACA,6EAA6E;AAC7E;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;;AAGH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;;AAGH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;;AAGH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;;AAGH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;ACzRA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEa;;AAEb,2BAA2B,mBAAO,CAAC,0FAAwB;;AAE3D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,UAAU;AACrB,YAAY,SAAS;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,4CAA4C;AAC5C;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;;;;;;;;;;;AC9DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEa;;AAEb,2BAA2B,mBAAO,CAAC,0FAAwB;;AAE3D,uBAAuB,mBAAO,CAAC,kFAAoB;;;AAGnD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B;;AAE5B;AACA,gCAAgC;AAChC,gCAAgC;AAChC,gCAAgC;AAChC,gCAAgC;;AAEhC;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,2BAA2B;AAC3B,2BAA2B;;AAE3B;AACA,yCAAyC;AACzC;AACA;AACA,MAAM,mCAAmC;AACzC;AACA;AACA;AACA;;AAEA;AACA,mBAAmB;AACnB,mBAAmB;;AAEnB,WAAW;AACX;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;;;;;;;;;;;;;;;;;ACpL4C;AAClB;AACmB;;AAE7C;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8DAA8D,iBAAiB;AAC/E;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,IAAI;AACJ;;;AAGA;AACA;AACA,oGAAoG;AACpG;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;;AAEL;AACA;AACA,+FAA+F;AAC/F;AACA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;AAEA,0BAA0B,+CAAQ,CAAC,+CAAQ,GAAG;AAC9C;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA,+EAA+E;;AAE/E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,mBAAmB,uBAAuB;AAC1C;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,GAAG;AACH;;AAEA,0CAA0C,uBAAuB,WAAW,YAAY,aAAa,cAAc,qBAAqB,sBAAsB,uBAAuB,iBAAiB,kBAAkB,4BAA4B,wBAAwB,GAAG,iDAAiD,4BAA4B,6EAA6E,4BAA4B,oBAAoB,qBAAqB,iBAAiB,uBAAuB,WAAW,cAAc,YAAY,aAAa,GAAG,mCAAmC,gBAAgB,iBAAiB,GAAG,iCAAiC,gBAAgB,iBAAiB,GAAG,6BAA6B,uBAAuB,cAAc,aAAa,qCAAqC,+CAA+C,2BAA2B,6BAA6B,8BAA8B,qBAAqB,GAAG,kCAAkC,uBAAuB,GAAG,yCAAyC,iBAAiB,2BAA2B,uBAAuB,+CAA+C,WAAW,cAAc,iBAAiB,kBAAkB,kBAAkB,qBAAqB,GAAG,wCAAwC,iBAAiB,2BAA2B,uBAAuB,+CAA+C,gBAAgB,mBAAmB,YAAY,aAAa,mBAAmB,oBAAoB,GAAG;;AAEriD;AACA;;AAEA;AACA;AACA;AACA,EAAE,gDAAS;;AAEX;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;;AAEP;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,QAAQ;AACR;AACA;AACA;;AAEA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,wDAAwD;AACxD;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;;AAEA,0BAA0B,+CAAQ,CAAC,+CAAQ,GAAG;AAC9C;AACA;AACA,SAAS;AACT;;AAEA;AACA;AACA;;AAEA;AACA;AACA,SAAS;;AAET;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,OAAO,GAAG;;AAEV;;AAEA;AACA;AACA,QAAQ;AACR;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,QAAQ;AACR;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,+CAAQ,GAAG;AACvC;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,OAAO;AACP;;AAEA;AACA;;AAEA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,mBAAmB,sDAAc;AACjC;;AAEA;;AAEA;AACA;AACA;AACA,SAAS;AACT;;AAEA;AACA,SAAS;AACT;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,SAAS;AACT;;AAEA;AACA,SAAS;AACT,OAAO;AACP;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,QAAQ;;;AAGR;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,MAAM;;;AAGN;AACA;AACA;AACA;;AAEA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA,MAAM;AACN;AACA;;AAEA;AACA;AACA;AACA,OAAO;AACP;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wBAAwB,0DAAmB;AAC3C;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA,KAAK,uBAAuB,0DAAmB,QAAQ,+CAAQ;AAC/D;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,OAAO;AACP,aAAa,+CAAQ,CAAC,+CAAQ,GAAG;AACjC;AACA,OAAO;AACP;AACA,KAAK,2BAA2B,0DAAmB,UAAU,+CAAQ;AACrE;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,OAAO;AACP;AACA,aAAa,+CAAQ,CAAC,+CAAQ,GAAG;AACjC;AACA,OAAO;AACP;AACA,KAAK;AACL;AACA,KAAK;AACL,0BAA0B,0DAAmB,WAAW,+CAAQ;AAChE;AACA,OAAO;AACP,KAAK,wCAAwC,0DAAmB;AAChE,aAAa,+CAAQ,CAAC,+CAAQ,GAAG;AACjC;AACA;AACA,OAAO;AACP;AACA;AACA,KAAK;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,eAAe;AACf,kBAAkB;AAClB;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,CAAC,CAAC,wDAAe;;AAEjB,+DAAe,OAAO,EAAC;AACvB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACt0BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,gBAAgB,sCAAsC,kBAAkB;AACnF,0BAA0B;AAC1B;AACA;AACA;AACO;AACP;AACA,oBAAoB;AACpB;AACA;AACA;AACO;AACP;AACA,iDAAiD,OAAO;AACxD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA,6DAA6D,cAAc;AAC3E;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA,6CAA6C,QAAQ;AACrD;AACA;AACA;AACO;AACP,oCAAoC;AACpC;AACA;AACO;AACP;AACA;AACA;AACO;AACP,4BAA4B,+DAA+D,iBAAiB;AAC5G;AACA,oCAAoC,MAAM,+BAA+B,YAAY;AACrF,mCAAmC,MAAM,mCAAmC,YAAY;AACxF,gCAAgC;AAChC;AACA,KAAK;AACL;AACA;AACO;AACP,cAAc,6BAA6B,0BAA0B,cAAc,qBAAqB;AACxG,iBAAiB,oDAAoD,qEAAqE,cAAc;AACxJ,uBAAuB,sBAAsB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC;AACxC,mCAAmC,SAAS;AAC5C,mCAAmC,WAAW,UAAU;AACxD,0CAA0C,cAAc;AACxD;AACA,8GAA8G,OAAO;AACrH,iFAAiF,iBAAiB;AAClG,yDAAyD,gBAAgB,QAAQ;AACjF,+CAA+C,gBAAgB,gBAAgB;AAC/E;AACA,kCAAkC;AAClC;AACA;AACA,UAAU,YAAY,aAAa,SAAS,UAAU;AACtD,oCAAoC,SAAS;AAC7C;AACA;AACA;AACO;AACP;AACA,mCAAmC,oCAAoC,gBAAgB;AACvF,CAAC;AACD;AACA;AACA,CAAC;AACD;AACO;AACP;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,MAAM;AAC1B;AACA;AACA;AACA;AACA,kBAAkB;AAClB;AACA;AACA;AACA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;WACA;WACA,uDAAuD,iBAAiB;WACxE;WACA,gDAAgD,aAAa;WAC7D;;;;;;;;;;;;;;;;;;;ACNA;AACA;AACA;AACA;AAEApI,QAAQ,CAACT,gBAAT,CAA2B,kBAA3B,EAA+C,UAAUiJ,KAAV,EAAkB;AAChEzE,EAAAA,+DAAS;AACTqE,EAAAA,8DAAgB;AAChBpB,EAAAA,kEAAY;AACZ,CAJD;;AAMA,IAAKhH,QAAQ,CAACyI,cAAT,CAAyB,0BAAzB,CAAL,EAA6D;AAC5DlE,EAAAA,EAAE,CAACqC,OAAH,CAAW8B,MAAX,CAAmB,kEAAC,uDAAD,OAAnB,EAA+B1I,QAAQ,CAACyI,cAAT,CAAyB,0BAAzB,CAA/B;AACA,C","sources":["webpack://learnpress/./assets/src/apps/js/frontend/profile/avatar.js","webpack://learnpress/./assets/src/apps/js/frontend/profile/course-tab.js","webpack://learnpress/./assets/src/apps/js/frontend/profile/order-recover.js","webpack://learnpress/./assets/src/apps/js/frontend/profile/statistic.js","webpack://learnpress/./node_modules/normalize-wheel/index.js","webpack://learnpress/./node_modules/normalize-wheel/src/ExecutionEnvironment.js","webpack://learnpress/./node_modules/normalize-wheel/src/UserAgent_DEPRECATED.js","webpack://learnpress/./node_modules/normalize-wheel/src/isEventSupported.js","webpack://learnpress/./node_modules/normalize-wheel/src/normalizeWheel.js","webpack://learnpress/./node_modules/react-easy-crop/index.module.js","webpack://learnpress/./node_modules/react-easy-crop/node_modules/tslib/tslib.es6.js","webpack://learnpress/external window \"React\"","webpack://learnpress/external window [\"wp\",\"apiFetch\"]","webpack://learnpress/external window [\"wp\",\"element\"]","webpack://learnpress/external window [\"wp\",\"i18n\"]","webpack://learnpress/external window [\"wp\",\"url\"]","webpack://learnpress/webpack/bootstrap","webpack://learnpress/webpack/runtime/compat get default export","webpack://learnpress/webpack/runtime/define property getters","webpack://learnpress/webpack/runtime/hasOwnProperty shorthand","webpack://learnpress/webpack/runtime/make namespace object","webpack://learnpress/./assets/src/apps/js/frontend/profile.js"],"sourcesContent":["import { useState, useCallback, useEffect, useRef } from '@wordpress/element';\nimport apiFetch from '@wordpress/api-fetch';\nimport { __, sprintf } from '@wordpress/i18n';\nimport Cropper from 'react-easy-crop';\n\nexport default function Avatar() {\n\tconst [ file, setFile ] = useState();\n\tconst [ width, setWidth ] = useState( 0 );\n\tconst [ height, setHeight ] = useState( 0 );\n\tconst [ crop, setCrop ] = useState( { x: 0, y: 0 } );\n\tconst [ rotation, setRotation ] = useState( 0 );\n\tconst [ croppedAreaPixels, setCroppedAreaPixels ] = useState( null );\n\tconst [ naturalWidth, setNaturalWidth ] = useState( 0 );\n\tconst [ naturalHeight, setNaturalHeight ] = useState( 0 );\n\tconst [ loading, setLoading ] = useState( false );\n\tconst [ skeleton, setSkeleton ] = useState( true );\n\tconst [ uploadError, setUploadError ] = useState( '' );\n\tconst [ notice, setNotice ] = useState( {\n\t\ttype: '',\n\t\tmessage: '',\n\t} );\n\n\tconst fileInput = useRef();\n\n\tuseEffect( () => {\n\t\tasync function getAvatar() {\n\t\t\tsetSkeleton( true );\n\t\t\ttry {\n\t\t\t\tconst response = await apiFetch( {\n\t\t\t\t\tmethod: 'GET',\n\t\t\t\t\tpath: 'lp/v1/profile/get-avatar',\n\t\t\t\t} );\n\n\t\t\t\tsetWidth( response?.data?.width ? parseInt( response.data.width ) : 0 );\n\t\t\t\tsetHeight( response?.data?.height ? parseInt( response.data.height ) : 0 );\n\t\t\t\tsetFile( response?.data?.url ? response.data.url : '' );\n\t\t\t} catch ( error ) {\n\t\t\t\tsetNotice( {\n\t\t\t\t\ttype: 'error',\n\t\t\t\t\tmessage: error.message,\n\t\t\t\t} );\n\t\t\t}\n\t\t\tsetSkeleton( false );\n\t\t}\n\n\t\tgetAvatar();\n\t}, [] );\n\n\tfunction readFile( file ) {\n\t\treturn new Promise( ( resolve ) => {\n\t\t\tconst reader = new FileReader();\n\t\t\treader.addEventListener( 'load', () => resolve( reader.result ), false );\n\t\t\treader.readAsDataURL( file );\n\t\t} );\n\t}\n\n\tconst onCropComplete = useCallback( ( croppedArea, croppedAreaPixels ) => {\n\t\tsetCroppedAreaPixels( croppedAreaPixels );\n\t}, [] );\n\n\tconst base64Resize = ( base64, width, height ) => {\n\t\treturn new Promise( ( resolve, reject ) => {\n\t\t\tconst canvas = document.createElement( 'canvas' );\n\t\t\tconst img = document.createElement( 'img' );\n\t\t\timg.src = base64;\n\t\t\timg.setAttribute( 'crossOrigin', 'anonymous' );\n\t\t\timg.onload = () => {\n\t\t\t\tif ( img.naturalWidth > width || img.naturalHeight > height ) {\n\t\t\t\t\tcanvas.width = width;\n\t\t\t\t\tcanvas.height = height;\n\t\t\t\t\tconst ctx = canvas.getContext( '2d' );\n\t\t\t\t\tctx.drawImage( img, 0, 0, width, height );\n\t\t\t\t\tresolve( canvas.toDataURL( 'image/jpeg' ) );\n\t\t\t\t}\n\n\t\t\t\tresolve( base64 );\n\t\t\t};\n\t\t\timg.onerror = ( err ) => reject( err );\n\t\t} );\n\t};\n\n\tconst updateAvatar = useCallback( async () => {\n\t\tsetLoading( { save: true } );\n\n\t\ttry {\n\t\t\tconst croppedImage = await getCroppedImg(\n\t\t\t\tfile,\n\t\t\t\tcroppedAreaPixels,\n\t\t\t\trotation,\n\t\t\t);\n\n\t\t\tconst imageResize = await base64Resize( croppedImage, width, height );\n\n\t\t\tconst response = await apiFetch( {\n\t\t\t\tpath: 'lp/v1/profile/upload-avatar',\n\t\t\t\tmethod: 'POST',\n\t\t\t\tdata: { file: imageResize || '' },\n\t\t\t} );\n\n\t\t\tconst { data, status, message } = await response;\n\n\t\t\tif ( status === 'success' ) {\n\t\t\t\twindow.location.reload();\n\t\t\t}\n\n\t\t\tsetNotice( {\n\t\t\t\ttype: status,\n\t\t\t\tmessage,\n\t\t\t} );\n\t\t} catch ( e ) {\n\t\t\tsetNotice( {\n\t\t\t\ttype: 'error',\n\t\t\t\tmessage: e.message || '',\n\t\t\t} );\n\t\t}\n\n\t\tsetLoading( { save: false } );\n\t}, [ croppedAreaPixels, rotation ] );\n\n\tconst setFileInput = async ( fileUpload ) => {\n\t\tconst file = await readFile( fileUpload );\n\n\t\tconst img = new Image();\n\t\timg.src = await file;\n\t\timg.onload = await function() {\n\t\t\tsetNaturalWidth( img.naturalWidth );\n\t\t\tsetNaturalHeight( img.naturalHeight );\n\n\t\t\tlet error = '';\n\t\t\tif ( parseInt( fileUpload.size ) > 2097152 ) {\n\t\t\t\terror = __( 'The file size is too large. You need to upload a file < 2MB.', 'learnpress' );\n\t\t\t} else if ( img.naturalWidth < width || img.naturalHeight < height ) {\n\t\t\t\terror = sprintf( __( 'The image size must be greater than or equal to %1$sx%2$spx', 'learnpress' ), width, height );\n\t\t\t}\n\n\t\t\tif ( error ) {\n\t\t\t\tsetUploadError( error );\n\t\t\t} else {\n\t\t\t\tsetUploadError( '' );\n\t\t\t\tsetFile( file );\n\t\t\t}\n\t\t};\n\t};\n\n\tasync function removeAvatar() {\n\t\tif ( confirm( __( 'Are you sure you want to remove your avatar?', 'learnpress' ) ) ) {\n\t\t\tsetLoading( { remove: true } );\n\t\t\ttry {\n\t\t\t\tconst response = await apiFetch( {\n\t\t\t\t\tpath: 'lp/v1/profile/remove-avatar',\n\t\t\t\t\tmethod: 'POST',\n\t\t\t\t} );\n\n\t\t\t\tconst { data, status, message } = await response;\n\n\t\t\t\tsetNotice( {\n\t\t\t\t\ttype: status,\n\t\t\t\t\tmessage,\n\t\t\t\t} );\n\n\t\t\t\tsetFile( '' );\n\t\t\t} catch ( e ) {\n\t\t\t\tsetNotice( {\n\t\t\t\t\ttype: 'error',\n\t\t\t\t\tmessage: e.message || '',\n\t\t\t\t} );\n\t\t\t}\n\t\t\tsetLoading( { remove: false } );\n\t\t}\n\t}\n\n\treturn (\n\t\t<div className=\"learnpress_avatar\">\n\t\t\t{ ! skeleton ? (\n\t\t\t\t<>\n\t\t\t\t\t{ file && ! uploadError && (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t{ naturalHeight && naturalWidth ? (\n\t\t\t\t\t\t\t\t<div className=\"learnpress_avatar__cropper\">\n\t\t\t\t\t\t\t\t\t<div style={ { position: 'relative', width: naturalWidth, height: naturalHeight, zIndex: 9999, maxWidth: '100%', maxHeight: '800px' } }>\n\t\t\t\t\t\t\t\t\t\t<Cropper\n\t\t\t\t\t\t\t\t\t\t\timage={ file }\n\t\t\t\t\t\t\t\t\t\t\tcrop={ crop }\n\t\t\t\t\t\t\t\t\t\t\tzoom=\"1\"\n\t\t\t\t\t\t\t\t\t\t\tcropSize={ { width, height } }\n\t\t\t\t\t\t\t\t\t\t\tonCropChange={ setCrop }\n\t\t\t\t\t\t\t\t\t\t\tonCropComplete={ onCropComplete }\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t</div>\n\n\t\t\t\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t\t\t\t<button className={ `learnpress_avatar__button learnpress_avatar__button--save ${ loading?.save ? 'learnpress_avatar__button--loading' : '' }` } onClick={ updateAvatar }>{ __( 'Save', 'learnpress' ) }</button>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t\t<div className=\"learnpress_avatar__cropper\">\n\t\t\t\t\t\t\t\t\t<img src={ file } alt=\"\" />\n\n\t\t\t\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t\t\t\t<button className={ `learnpress_avatar__button learnpress_avatar__button--replace` } onClick={ () => fileInput.current && fileInput.current.click() }>{ __( 'Replace', 'learnpress' ) }</button>\n\t\t\t\t\t\t\t\t\t\t<button className={ `learnpress_avatar__button learnpress_avatar__button--remove ${ loading?.remove ? 'learnpress_avatar__button--loading' : '' }` } onClick={ removeAvatar }>{ __( 'Remove', 'learnpress' ) }</button>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t</>\n\t\t\t\t\t) }\n\n\t\t\t\t\t<form style={ { display: ! file ? '' : 'none' } }>\n\t\t\t\t\t\t<div className=\"learnpress_avatar__form\">\n\t\t\t\t\t\t\t<div className=\"learnpress_avatar__form-group\">\n\t\t\t\t\t\t\t\t<label htmlFor=\"avatar-file\">\n\t\t\t\t\t\t\t\t\t<div className=\"learnpress_avatar__form__upload\">\n\t\t\t\t\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t\t\t\t\t<span><svg viewBox=\"64 64 896 896\" focusable=\"false\" data-icon=\"plus\" width=\"1em\" height=\"1em\" fill=\"currentColor\" aria-hidden=\"true\"><defs><style></style></defs><path d=\"M482 152h60q8 0 8 8v704q0 8-8 8h-60q-8 0-8-8V160q0-8 8-8z\"></path><path d=\"M176 474h672q8 0 8 8v60q0 8-8 8H176q-8 0-8-8v-60q0-8 8-8z\"></path></svg></span>\n\t\t\t\t\t\t\t\t\t\t\t<div>{ __( 'Upload', 'learnpress' ) }</div>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<input ref={ fileInput } type=\"file\" id=\"avatar-file\" accept=\"image/*\" onChange={ ( e ) => setFileInput( e.target.files && e.target.files.length > 0 ? e.target.files[ 0 ] : '' ) } />\n\t\t\t\t\t\t\t\t</label>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</form>\n\n\t\t\t\t\t{ uploadError && (\n\t\t\t\t\t\t<div className={ `lp-ajax-message error` } style={ { display: 'block' } }>{ uploadError }</div>\n\t\t\t\t\t) }\n\n\t\t\t\t\t{ ! uploadError && notice && notice.type && notice.message && (\n\t\t\t\t\t\t<div className={ `lp-ajax-message ${ notice.type }` } style={ { display: 'block' } }>{ notice.message }</div>\n\t\t\t\t\t) }\n\t\t\t\t</>\n\t\t\t) : (\n\t\t\t\t<ul className=\"lp-skeleton-animation\">\n\t\t\t\t\t<li style={ { width: 200, height: 200 } }></li>\n\t\t\t\t\t<li style={ { width: 200, height: 20 } }></li>\n\t\t\t\t\t<li style={ { width: 200, height: 20 } }></li>\n\t\t\t\t</ul>\n\t\t\t) }\n\t\t</div>\n\t);\n}\n\n// Link: https://codesandbox.io/s/q8q1mnr01w\nconst createImage = ( url ) =>\n\tnew Promise( ( resolve, reject ) => {\n\t\tconst image = new Image();\n\t\timage.addEventListener( 'load', () => resolve( image ) );\n\t\timage.addEventListener( 'error', ( error ) => reject( error ) );\n\t\timage.setAttribute( 'crossOrigin', 'anonymous' ); // needed to avoid cross-origin issues on CodeSandbox\n\t\timage.src = url;\n\t} );\n\nfunction getRadianAngle( degreeValue ) {\n\treturn ( degreeValue * Math.PI ) / 180;\n}\n\n/**\n * Returns the new bounding area of a rotated rectangle.\n *\n * @param width\n * @param height\n * @param rotation\n */\nfunction rotateSize( width, height, rotation ) {\n\tconst rotRad = getRadianAngle( rotation );\n\n\treturn {\n\t\twidth:\nMath.abs( Math.cos( rotRad ) * width ) + Math.abs( Math.sin( rotRad ) * height ),\n\t\theight:\nMath.abs( Math.sin( rotRad ) * width ) + Math.abs( Math.cos( rotRad ) * height ),\n\t};\n}\n\n/**\n * This function was adapted from the one in the ReadMe of https://github.com/DominicTobias/react-image-crop\n *\n * @param imageSrc\n * @param pixelCrop\n * @param rotation\n * @param flip\n */\nasync function getCroppedImg(\n\timageSrc,\n\tpixelCrop,\n\trotation = 0,\n\tflip = { horizontal: false, vertical: false }\n) {\n\tconst image = await createImage( imageSrc );\n\tconst canvas = document.createElement( 'canvas' );\n\tconst ctx = canvas.getContext( '2d' );\n\n\tif ( ! ctx ) {\n\t\treturn null;\n\t}\n\n\tconst rotRad = getRadianAngle( rotation );\n\n\t// calculate bounding box of the rotated image\n\tconst { width: bBoxWidth, height: bBoxHeight } = rotateSize(\n\t\timage.width,\n\t\timage.height,\n\t\trotation\n\t);\n\n\t// set canvas size to match the bounding box\n\tcanvas.width = bBoxWidth;\n\tcanvas.height = bBoxHeight;\n\n\t// translate canvas context to a central location to allow rotating and flipping around the center\n\tctx.translate( bBoxWidth / 2, bBoxHeight / 2 );\n\tctx.rotate( rotRad );\n\tctx.scale( flip.horizontal ? -1 : 1, flip.vertical ? -1 : 1 );\n\tctx.translate( -image.width / 2, -image.height / 2 );\n\n\t// draw rotated image\n\tctx.drawImage( image, 0, 0 );\n\n\t// croppedAreaPixels values are bounding box relative\n\t// extract the cropped image using these values\n\tconst data = ctx.getImageData(\n\t\tpixelCrop.x,\n\t\tpixelCrop.y,\n\t\tpixelCrop.width,\n\t\tpixelCrop.height\n\t);\n\n\t// set canvas width to final desired crop size - this will clear existing context\n\tcanvas.width = pixelCrop.width;\n\tcanvas.height = pixelCrop.height;\n\n\t// paste generated rotate image at the top left corner\n\tctx.putImageData( data, 0, 0 );\n\n\t// As Base64 string\n\treturn canvas.toDataURL( 'image/jpeg' );\n}\n","import { addQueryArgs } from '@wordpress/url';\n\n// Rest API load content course enrolled, created - Nhamdv.\nconst courseTab = () => {\n\tconst elements = document.querySelectorAll( '.learn-press-course-tab__filter__content' );\n\n\tconst getResponse = ( ele, dataset, append = false, viewMoreEle = false ) => {\n\t\twp.apiFetch( {\n\t\t\tpath: addQueryArgs( 'lp/v1/profile/course-tab', dataset ),\n\t\t\tmethod: 'GET',\n\t\t} ).then( ( response ) => {\n\t\t\tconst skeleton = ele.querySelector( '.lp-skeleton-animation' );\n\t\t\tskeleton && skeleton.remove();\n\n\t\t\tif ( response.status === 'success' && response.data ) {\n\t\t\t\tif ( append ) {\n\t\t\t\t\tele.innerHTML += response.data;\n\t\t\t\t} else {\n\t\t\t\t\tele.innerHTML = response.data;\n\t\t\t\t}\n\t\t\t} else if ( append ) {\n\t\t\t\tele.innerHTML += `<div class=\"lp-ajax-message\" style=\"display:block\">${ response.message && response.message }</div>`;\n\t\t\t} else {\n\t\t\t\tele.innerHTML = `<div class=\"lp-ajax-message\" style=\"display:block\">${ response.message && response.message }</div>`;\n\t\t\t}\n\n\t\t\tif ( viewMoreEle ) {\n\t\t\t\tviewMoreEle.classList.remove( 'loading' );\n\n\t\t\t\tconst paged = viewMoreEle.dataset.paged;\n\t\t\t\tconst numberPage = viewMoreEle.dataset.number;\n\n\t\t\t\tif ( numberPage <= paged ) {\n\t\t\t\t\tviewMoreEle.remove();\n\t\t\t\t}\n\n\t\t\t\tviewMoreEle.dataset.paged = parseInt( paged ) + 1;\n\t\t\t}\n\n\t\t\tviewMore( ele, dataset );\n\t\t} ).catch( ( error ) => {\n\t\t\tif ( append ) {\n\t\t\t\tele.innerHTML += `<div class=\"lp-ajax-message error\" style=\"display:block\">${ error.message && error.message }</div>`;\n\t\t\t} else {\n\t\t\t\tele.innerHTML = `<div class=\"lp-ajax-message error\" style=\"display:block\">${ error.message && error.message }</div>`;\n\t\t\t}\n\n\t\t\tif ( viewMoreEle ) {\n\t\t\t\tviewMoreEle.classList.remove( 'loading' );\n\n\t\t\t\tconst paged = viewMoreEle.dataset.paged;\n\t\t\t\tconst numberPage = viewMoreEle.dataset.number;\n\n\t\t\t\tif ( numberPage <= paged ) {\n\t\t\t\t\tviewMoreEle.remove();\n\t\t\t\t}\n\n\t\t\t\tviewMoreEle.dataset.paged = parseInt( paged ) + 1;\n\t\t\t}\n\t\t} );\n\t};\n\n\tif ( 'IntersectionObserver' in window ) {\n\t\tconst eleObserver = new IntersectionObserver( ( entries, observer ) => {\n\t\t\tentries.forEach( ( entry ) => {\n\t\t\t\tif ( entry.isIntersecting ) {\n\t\t\t\t\tconst ele = entry.target;\n\n\t\t\t\t\tconst params = ele.parentNode.querySelector( '.lp_profile_tab_input_param' );\n\t\t\t\t\tconst data = { ...JSON.parse( params.value ), status: ele.dataset.tab || '' };\n\n\t\t\t\t\tgetResponse( ele, data );\n\n\t\t\t\t\teleObserver.unobserve( ele );\n\t\t\t\t}\n\t\t\t} );\n\t\t} );\n\n\t\t[ ...elements ].map( ( ele ) => {\n\t\t\tif ( ele.dataset.tab !== 'all' ) {\n\t\t\t\teleObserver.observe( ele );\n\t\t\t} else {\n\t\t\t\tconst params = ele.parentNode.querySelector( '.lp_profile_tab_input_param' );\n\t\t\t\tconst data = { ...JSON.parse( params.value ), status: ele.dataset.tab === 'all' ? '' : ele.dataset.tab || '' };\n\n\t\t\t\tgetResponse( ele, data );\n\t\t\t}\n\t\t} );\n\t}\n\n\tconst changeFilter = () => {\n\t\tconst tabs = document.querySelectorAll( '.learn-press-course-tab-filters' );\n\n\t\ttabs.forEach( ( tab ) => {\n\t\t\tconst filters = tab.querySelectorAll( '.learn-press-filters a' );\n\n\t\t\tfilters.forEach( ( filter ) => {\n\t\t\t\tfilter.addEventListener( 'click', ( e ) => {\n\t\t\t\t\te.preventDefault();\n\n\t\t\t\t\tconst tabName = filter.dataset.tab;\n\n\t\t\t\t\t[ ...filters ].map( ( ele ) => {\n\t\t\t\t\t\tele.classList.remove( 'active' );\n\t\t\t\t\t} );\n\n\t\t\t\t\tfilter.classList.add( 'active' );\n\n\t\t\t\t\t[ ...tab.querySelectorAll( '.learn-press-course-tab__filter__content' ) ].map( ( ele ) => {\n\t\t\t\t\t\tele.style.display = 'none';\n\n\t\t\t\t\t\tif ( ele.dataset.tab === tabName ) {\n\t\t\t\t\t\t\tele.style.display = '';\n\t\t\t\t\t\t}\n\t\t\t\t\t} );\n\t\t\t\t} );\n\t\t\t} );\n\t\t} );\n\t};\n\n\tchangeFilter();\n\n\tconst changeTab = () => {\n\t\tconst tabUls = document.querySelectorAll( '.learn-press-profile-course__tab__inner' );\n\n\t\ttabUls.forEach( ( tabUl ) => {\n\t\t\tconst tabs = tabUl.querySelectorAll( 'li> a' );\n\n\t\t\ttabs.forEach( ( tab ) => {\n\t\t\t\ttab.addEventListener( 'click', ( e ) => {\n\t\t\t\t\te.preventDefault();\n\n\t\t\t\t\tconst tabName = tab.dataset.tab;\n\n\t\t\t\t\t[ ...tabs ].map( ( ele ) => {\n\t\t\t\t\t\tele.classList.remove( 'active' );\n\t\t\t\t\t} );\n\n\t\t\t\t\ttab.classList.add( 'active' );\n\n\t\t\t\t\t[ ...document.querySelectorAll( '.learn-press-course-tab-filters' ) ].map( ( ele ) => {\n\t\t\t\t\t\tele.style.display = 'none';\n\n\t\t\t\t\t\tif ( ele.dataset.tab === tabName ) {\n\t\t\t\t\t\t\tele.style.display = '';\n\t\t\t\t\t\t}\n\t\t\t\t\t} );\n\t\t\t\t} );\n\t\t\t} );\n\t\t} );\n\t};\n\tchangeTab();\n\n\tconst viewMore = ( ele, dataset ) => {\n\t\tconst viewMoreEle = ele.querySelector( 'button[data-paged]' );\n\n\t\tif ( viewMoreEle ) {\n\t\t\tviewMoreEle.addEventListener( 'click', ( e ) => {\n\t\t\t\te.preventDefault();\n\n\t\t\t\tconst paged = viewMoreEle && viewMoreEle.dataset.paged;\n\n\t\t\t\tviewMoreEle.classList.add( 'loading' );\n\n\t\t\t\tconst element = dataset.layout === 'list' ? '.lp_profile_course_progress' : '.learn-press-courses';\n\n\t\t\t\tgetResponse( ele.querySelector( element ), { ...dataset, ...{ paged } }, true, viewMoreEle );\n\t\t\t} );\n\t\t}\n\t};\n};\nexport default courseTab;\n","const $ = window.jQuery;\n\nexport default function recoverOrder() {\n\t\tconst wrap = $( '.order-recover' ),\n\t\tbuttonRecoverOrder = wrap.find( '.button-recover-order' );\n\n\t\tconst ajaxRecover = () => {\n\t\t\twrap.find( '.learn-press-message' ).remove();\n\n\t\t\t$( '.profile-recover-order' ).find( '.learn-press-message' ).remove();\n\n\t\t\t$.post( {\n\t\t\t\turl: '',\n\t\t\t\tdata: wrap.serializeJSON(),\n\t\t\t\tbeforeSend() {\n\t\t\t\t\tbuttonRecoverOrder.addClass( 'loading' ).attr( 'disabled', 'disabled' );\n\t\t\t\t},\n\t\t\t\tsuccess( response ) {\n\t\t\t\t\tresponse = LP.parseJSON( response );\n\n\t\t\t\t\tif ( response.message ) {\n\t\t\t\t\t\tconst $msg = $( '<div class=\"learn-press-message icon\"><i class=\"fa\"></i> ' + response.message + '</div>' );\n\n\t\t\t\t\t\tif ( response.result == 'error' ) {\n\t\t\t\t\t\t\t$msg.addClass( 'error' );\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\twrap.before( $msg );\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( response.redirect ) {\n\t\t\t\t\t\twindow.location.href = response.redirect;\n\t\t\t\t\t}\n\n\t\t\t\t\tbuttonRecoverOrder.removeClass( 'loading' ).removeAttr( 'disabled', '' );\n\t\t\t\t},\n\t\t\t\terror() {\n\t\t\t\t\tbuttonRecoverOrder.removeClass( 'loading' ).removeAttr( 'disabled', '' );\n\t\t\t\t},\n\t\t\t} );\n\t\t}\n\n\t\tbuttonRecoverOrder.on( 'click', ajaxRecover );\n};\n\n","import { addQueryArgs } from '@wordpress/url';\n\n// Rest API load content course progress - Nhamdv.\nconst courseStatistics = () => {\n\tconst elements = document.querySelector( '.learn-press-profile-course__statistic' );\n\n\tif ( ! elements ) {\n\t\treturn;\n\t}\n\n\tconst getResponse = ( ele, dataset ) => {\n\t\twp.apiFetch( {\n\t\t\tpath: addQueryArgs( 'lp/v1/profile/statistic', dataset ),\n\t\t\tmethod: 'GET',\n\t\t} ).then( ( response ) => {\n\t\t\tif ( response.status === 'success' && response.data ) {\n\t\t\t\tele.innerHTML = response.data;\n\t\t\t} else {\n\t\t\t\tele.innerHTML = `<div class=\"lp-ajax-message error\" style=\"display:block\">${ response.message && response.message }</div>`;\n\t\t\t}\n\t\t} ).catch( ( err ) => {\n\t\t\tconsole.log( err );\n\t\t\t//ele.innerHTML += `<div class=\"lp-ajax-message error\" style=\"display:block\">${ err.message && err.message }</div>`;\n\t\t} );\n\t};\n\n\tconst elArgStatistic = document.querySelector( '[name=\"args_query_user_courses_statistic\"]' );\n\tif ( ! elArgStatistic ) {\n\t\treturn;\n\t}\n\n\tconst data = JSON.parse( elArgStatistic.value );\n\n\tgetResponse( elements, data );\n};\nexport default courseStatistics;\n","module.exports = require('./src/normalizeWheel.js');\n","/**\n * Copyright (c) 2015, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n * @providesModule ExecutionEnvironment\n */\n\n/*jslint evil: true */\n\n'use strict';\n\nvar canUseDOM = !!(\n typeof window !== 'undefined' &&\n window.document &&\n window.document.createElement\n);\n\n/**\n * Simple, lightweight module assisting with the detection and context of\n * Worker. Helps avoid circular dependencies and allows code to reason about\n * whether or not they are in a Worker, even if they never include the main\n * `ReactWorker` dependency.\n */\nvar ExecutionEnvironment = {\n\n canUseDOM: canUseDOM,\n\n canUseWorkers: typeof Worker !== 'undefined',\n\n canUseEventListeners:\n canUseDOM && !!(window.addEventListener || window.attachEvent),\n\n canUseViewport: canUseDOM && !!window.screen,\n\n isInWorker: !canUseDOM // For now, this is true - might change in the future.\n\n};\n\nmodule.exports = ExecutionEnvironment;\n","/**\n * Copyright 2004-present Facebook. All Rights Reserved.\n *\n * @providesModule UserAgent_DEPRECATED\n */\n\n/**\n * Provides entirely client-side User Agent and OS detection. You should prefer\n * the non-deprecated UserAgent module when possible, which exposes our\n * authoritative server-side PHP-based detection to the client.\n *\n * Usage is straightforward:\n *\n * if (UserAgent_DEPRECATED.ie()) {\n * // IE\n * }\n *\n * You can also do version checks:\n *\n * if (UserAgent_DEPRECATED.ie() >= 7) {\n * // IE7 or better\n * }\n *\n * The browser functions will return NaN if the browser does not match, so\n * you can also do version compares the other way:\n *\n * if (UserAgent_DEPRECATED.ie() < 7) {\n * // IE6 or worse\n * }\n *\n * Note that the version is a float and may include a minor version number,\n * so you should always use range operators to perform comparisons, not\n * strict equality.\n *\n * **Note:** You should **strongly** prefer capability detection to browser\n * version detection where it's reasonable:\n *\n * http://www.quirksmode.org/js/support.html\n *\n * Further, we have a large number of mature wrapper functions and classes\n * which abstract away many browser irregularities. Check the documentation,\n * grep for things, or ask on javascript@lists.facebook.com before writing yet\n * another copy of \"event || window.event\".\n *\n */\n\nvar _populated = false;\n\n// Browsers\nvar _ie, _firefox, _opera, _webkit, _chrome;\n\n// Actual IE browser for compatibility mode\nvar _ie_real_version;\n\n// Platforms\nvar _osx, _windows, _linux, _android;\n\n// Architectures\nvar _win64;\n\n// Devices\nvar _iphone, _ipad, _native;\n\nvar _mobile;\n\nfunction _populate() {\n if (_populated) {\n return;\n }\n\n _populated = true;\n\n // To work around buggy JS libraries that can't handle multi-digit\n // version numbers, Opera 10's user agent string claims it's Opera\n // 9, then later includes a Version/X.Y field:\n //\n // Opera/9.80 (foo) Presto/2.2.15 Version/10.10\n var uas = navigator.userAgent;\n var agent = /(?:MSIE.(\\d+\\.\\d+))|(?:(?:Firefox|GranParadiso|Iceweasel).(\\d+\\.\\d+))|(?:Opera(?:.+Version.|.)(\\d+\\.\\d+))|(?:AppleWebKit.(\\d+(?:\\.\\d+)?))|(?:Trident\\/\\d+\\.\\d+.*rv:(\\d+\\.\\d+))/.exec(uas);\n var os = /(Mac OS X)|(Windows)|(Linux)/.exec(uas);\n\n _iphone = /\\b(iPhone|iP[ao]d)/.exec(uas);\n _ipad = /\\b(iP[ao]d)/.exec(uas);\n _android = /Android/i.exec(uas);\n _native = /FBAN\\/\\w+;/i.exec(uas);\n _mobile = /Mobile/i.exec(uas);\n\n // Note that the IE team blog would have you believe you should be checking\n // for 'Win64; x64'. But MSDN then reveals that you can actually be coming\n // from either x64 or ia64; so ultimately, you should just check for Win64\n // as in indicator of whether you're in 64-bit IE. 32-bit IE on 64-bit\n // Windows will send 'WOW64' instead.\n _win64 = !!(/Win64/.exec(uas));\n\n if (agent) {\n _ie = agent[1] ? parseFloat(agent[1]) : (\n agent[5] ? parseFloat(agent[5]) : NaN);\n // IE compatibility mode\n if (_ie && document && document.documentMode) {\n _ie = document.documentMode;\n }\n // grab the \"true\" ie version from the trident token if available\n var trident = /(?:Trident\\/(\\d+.\\d+))/.exec(uas);\n _ie_real_version = trident ? parseFloat(trident[1]) + 4 : _ie;\n\n _firefox = agent[2] ? parseFloat(agent[2]) : NaN;\n _opera = agent[3] ? parseFloat(agent[3]) : NaN;\n _webkit = agent[4] ? parseFloat(agent[4]) : NaN;\n if (_webkit) {\n // We do not add the regexp to the above test, because it will always\n // match 'safari' only since 'AppleWebKit' appears before 'Chrome' in\n // the userAgent string.\n agent = /(?:Chrome\\/(\\d+\\.\\d+))/.exec(uas);\n _chrome = agent && agent[1] ? parseFloat(agent[1]) : NaN;\n } else {\n _chrome = NaN;\n }\n } else {\n _ie = _firefox = _opera = _chrome = _webkit = NaN;\n }\n\n if (os) {\n if (os[1]) {\n // Detect OS X version. If no version number matches, set _osx to true.\n // Version examples: 10, 10_6_1, 10.7\n // Parses version number as a float, taking only first two sets of\n // digits. If only one set of digits is found, returns just the major\n // version number.\n var ver = /(?:Mac OS X (\\d+(?:[._]\\d+)?))/.exec(uas);\n\n _osx = ver ? parseFloat(ver[1].replace('_', '.')) : true;\n } else {\n _osx = false;\n }\n _windows = !!os[2];\n _linux = !!os[3];\n } else {\n _osx = _windows = _linux = false;\n }\n}\n\nvar UserAgent_DEPRECATED = {\n\n /**\n * Check if the UA is Internet Explorer.\n *\n *\n * @return float|NaN Version number (if match) or NaN.\n */\n ie: function() {\n return _populate() || _ie;\n },\n\n /**\n * Check if we're in Internet Explorer compatibility mode.\n *\n * @return bool true if in compatibility mode, false if\n * not compatibility mode or not ie\n */\n ieCompatibilityMode: function() {\n return _populate() || (_ie_real_version > _ie);\n },\n\n\n /**\n * Whether the browser is 64-bit IE. Really, this is kind of weak sauce; we\n * only need this because Skype can't handle 64-bit IE yet. We need to remove\n * this when we don't need it -- tracked by #601957.\n */\n ie64: function() {\n return UserAgent_DEPRECATED.ie() && _win64;\n },\n\n /**\n * Check if the UA is Firefox.\n *\n *\n * @return float|NaN Version number (if match) or NaN.\n */\n firefox: function() {\n return _populate() || _firefox;\n },\n\n\n /**\n * Check if the UA is Opera.\n *\n *\n * @return float|NaN Version number (if match) or NaN.\n */\n opera: function() {\n return _populate() || _opera;\n },\n\n\n /**\n * Check if the UA is WebKit.\n *\n *\n * @return float|NaN Version number (if match) or NaN.\n */\n webkit: function() {\n return _populate() || _webkit;\n },\n\n /**\n * For Push\n * WILL BE REMOVED VERY SOON. Use UserAgent_DEPRECATED.webkit\n */\n safari: function() {\n return UserAgent_DEPRECATED.webkit();\n },\n\n /**\n * Check if the UA is a Chrome browser.\n *\n *\n * @return float|NaN Version number (if match) or NaN.\n */\n chrome : function() {\n return _populate() || _chrome;\n },\n\n\n /**\n * Check if the user is running Windows.\n *\n * @return bool `true' if the user's OS is Windows.\n */\n windows: function() {\n return _populate() || _windows;\n },\n\n\n /**\n * Check if the user is running Mac OS X.\n *\n * @return float|bool Returns a float if a version number is detected,\n * otherwise true/false.\n */\n osx: function() {\n return _populate() || _osx;\n },\n\n /**\n * Check if the user is running Linux.\n *\n * @return bool `true' if the user's OS is some flavor of Linux.\n */\n linux: function() {\n return _populate() || _linux;\n },\n\n /**\n * Check if the user is running on an iPhone or iPod platform.\n *\n * @return bool `true' if the user is running some flavor of the\n * iPhone OS.\n */\n iphone: function() {\n return _populate() || _iphone;\n },\n\n mobile: function() {\n return _populate() || (_iphone || _ipad || _android || _mobile);\n },\n\n nativeApp: function() {\n // webviews inside of the native apps\n return _populate() || _native;\n },\n\n android: function() {\n return _populate() || _android;\n },\n\n ipad: function() {\n return _populate() || _ipad;\n }\n};\n\nmodule.exports = UserAgent_DEPRECATED;\n","/**\n * Copyright 2013-2015, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n * @providesModule isEventSupported\n */\n\n'use strict';\n\nvar ExecutionEnvironment = require('./ExecutionEnvironment');\n\nvar useHasFeature;\nif (ExecutionEnvironment.canUseDOM) {\n useHasFeature =\n document.implementation &&\n document.implementation.hasFeature &&\n // always returns true in newer browsers as per the standard.\n // @see http://dom.spec.whatwg.org/#dom-domimplementation-hasfeature\n document.implementation.hasFeature('', '') !== true;\n}\n\n/**\n * Checks if an event is supported in the current execution environment.\n *\n * NOTE: This will not work correctly for non-generic events such as `change`,\n * `reset`, `load`, `error`, and `select`.\n *\n * Borrows from Modernizr.\n *\n * @param {string} eventNameSuffix Event name, e.g. \"click\".\n * @param {?boolean} capture Check if the capture phase is supported.\n * @return {boolean} True if the event is supported.\n * @internal\n * @license Modernizr 3.0.0pre (Custom Build) | MIT\n */\nfunction isEventSupported(eventNameSuffix, capture) {\n if (!ExecutionEnvironment.canUseDOM ||\n capture && !('addEventListener' in document)) {\n return false;\n }\n\n var eventName = 'on' + eventNameSuffix;\n var isSupported = eventName in document;\n\n if (!isSupported) {\n var element = document.createElement('div');\n element.setAttribute(eventName, 'return;');\n isSupported = typeof element[eventName] === 'function';\n }\n\n if (!isSupported && useHasFeature && eventNameSuffix === 'wheel') {\n // This is the only way to test support for the `wheel` event in IE9+.\n isSupported = document.implementation.hasFeature('Events.wheel', '3.0');\n }\n\n return isSupported;\n}\n\nmodule.exports = isEventSupported;\n","/**\n * Copyright (c) 2015, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the BSD-style license found in the\n * LICENSE file in the root directory of this source tree. An additional grant\n * of patent rights can be found in the PATENTS file in the same directory.\n *\n * @providesModule normalizeWheel\n * @typechecks\n */\n\n'use strict';\n\nvar UserAgent_DEPRECATED = require('./UserAgent_DEPRECATED');\n\nvar isEventSupported = require('./isEventSupported');\n\n\n// Reasonable defaults\nvar PIXEL_STEP = 10;\nvar LINE_HEIGHT = 40;\nvar PAGE_HEIGHT = 800;\n\n/**\n * Mouse wheel (and 2-finger trackpad) support on the web sucks. It is\n * complicated, thus this doc is long and (hopefully) detailed enough to answer\n * your questions.\n *\n * If you need to react to the mouse wheel in a predictable way, this code is\n * like your bestest friend. * hugs *\n *\n * As of today, there are 4 DOM event types you can listen to:\n *\n * 'wheel' -- Chrome(31+), FF(17+), IE(9+)\n * 'mousewheel' -- Chrome, IE(6+), Opera, Safari\n * 'MozMousePixelScroll' -- FF(3.5 only!) (2010-2013) -- don't bother!\n * 'DOMMouseScroll' -- FF(0.9.7+) since 2003\n *\n * So what to do? The is the best:\n *\n * normalizeWheel.getEventType();\n *\n * In your event callback, use this code to get sane interpretation of the\n * deltas. This code will return an object with properties:\n *\n * spinX -- normalized spin speed (use for zoom) - x plane\n * spinY -- \" - y plane\n * pixelX -- normalized distance (to pixels) - x plane\n * pixelY -- \" - y plane\n *\n * Wheel values are provided by the browser assuming you are using the wheel to\n * scroll a web page by a number of lines or pixels (or pages). Values can vary\n * significantly on different platforms and browsers, forgetting that you can\n * scroll at different speeds. Some devices (like trackpads) emit more events\n * at smaller increments with fine granularity, and some emit massive jumps with\n * linear speed or acceleration.\n *\n * This code does its best to normalize the deltas for you:\n *\n * - spin is trying to normalize how far the wheel was spun (or trackpad\n * dragged). This is super useful for zoom support where you want to\n * throw away the chunky scroll steps on the PC and make those equal to\n * the slow and smooth tiny steps on the Mac. Key data: This code tries to\n * resolve a single slow step on a wheel to 1.\n *\n * - pixel is normalizing the desired scroll delta in pixel units. You'll\n * get the crazy differences between browsers, but at least it'll be in\n * pixels!\n *\n * - positive value indicates scrolling DOWN/RIGHT, negative UP/LEFT. This\n * should translate to positive value zooming IN, negative zooming OUT.\n * This matches the newer 'wheel' event.\n *\n * Why are there spinX, spinY (or pixels)?\n *\n * - spinX is a 2-finger side drag on the trackpad, and a shift + wheel turn\n * with a mouse. It results in side-scrolling in the browser by default.\n *\n * - spinY is what you expect -- it's the classic axis of a mouse wheel.\n *\n * - I dropped spinZ/pixelZ. It is supported by the DOM 3 'wheel' event and\n * probably is by browsers in conjunction with fancy 3D controllers .. but\n * you know.\n *\n * Implementation info:\n *\n * Examples of 'wheel' event if you scroll slowly (down) by one step with an\n * average mouse:\n *\n * OS X + Chrome (mouse) - 4 pixel delta (wheelDelta -120)\n * OS X + Safari (mouse) - N/A pixel delta (wheelDelta -12)\n * OS X + Firefox (mouse) - 0.1 line delta (wheelDelta N/A)\n * Win8 + Chrome (mouse) - 100 pixel delta (wheelDelta -120)\n * Win8 + Firefox (mouse) - 3 line delta (wheelDelta -120)\n *\n * On the trackpad:\n *\n * OS X + Chrome (trackpad) - 2 pixel delta (wheelDelta -6)\n * OS X + Firefox (trackpad) - 1 pixel delta (wheelDelta N/A)\n *\n * On other/older browsers.. it's more complicated as there can be multiple and\n * also missing delta values.\n *\n * The 'wheel' event is more standard:\n *\n * http://www.w3.org/TR/DOM-Level-3-Events/#events-wheelevents\n *\n * The basics is that it includes a unit, deltaMode (pixels, lines, pages), and\n * deltaX, deltaY and deltaZ. Some browsers provide other values to maintain\n * backward compatibility with older events. Those other values help us\n * better normalize spin speed. Example of what the browsers provide:\n *\n * | event.wheelDelta | event.detail\n * ------------------+------------------+--------------\n * Safari v5/OS X | -120 | 0\n * Safari v5/Win7 | -120 | 0\n * Chrome v17/OS X | -120 | 0\n * Chrome v17/Win7 | -120 | 0\n * IE9/Win7 | -120 | undefined\n * Firefox v4/OS X | undefined | 1\n * Firefox v4/Win7 | undefined | 3\n *\n */\nfunction normalizeWheel(/*object*/ event) /*object*/ {\n var sX = 0, sY = 0, // spinX, spinY\n pX = 0, pY = 0; // pixelX, pixelY\n\n // Legacy\n if ('detail' in event) { sY = event.detail; }\n if ('wheelDelta' in event) { sY = -event.wheelDelta / 120; }\n if ('wheelDeltaY' in event) { sY = -event.wheelDeltaY / 120; }\n if ('wheelDeltaX' in event) { sX = -event.wheelDeltaX / 120; }\n\n // side scrolling on FF with DOMMouseScroll\n if ( 'axis' in event && event.axis === event.HORIZONTAL_AXIS ) {\n sX = sY;\n sY = 0;\n }\n\n pX = sX * PIXEL_STEP;\n pY = sY * PIXEL_STEP;\n\n if ('deltaY' in event) { pY = event.deltaY; }\n if ('deltaX' in event) { pX = event.deltaX; }\n\n if ((pX || pY) && event.deltaMode) {\n if (event.deltaMode == 1) { // delta in LINE units\n pX *= LINE_HEIGHT;\n pY *= LINE_HEIGHT;\n } else { // delta in PAGE units\n pX *= PAGE_HEIGHT;\n pY *= PAGE_HEIGHT;\n }\n }\n\n // Fall-back if spin cannot be determined\n if (pX && !sX) { sX = (pX < 1) ? -1 : 1; }\n if (pY && !sY) { sY = (pY < 1) ? -1 : 1; }\n\n return { spinX : sX,\n spinY : sY,\n pixelX : pX,\n pixelY : pY };\n}\n\n\n/**\n * The best combination if you prefer spinX + spinY normalization. It favors\n * the older DOMMouseScroll for Firefox, as FF does not include wheelDelta with\n * 'wheel' event, making spin speed determination impossible.\n */\nnormalizeWheel.getEventType = function() /*string*/ {\n return (UserAgent_DEPRECATED.firefox())\n ? 'DOMMouseScroll'\n : (isEventSupported('wheel'))\n ? 'wheel'\n : 'mousewheel';\n};\n\nmodule.exports = normalizeWheel;\n","import { __assign, __extends } from 'tslib';\nimport React from 'react';\nimport normalizeWheel from 'normalize-wheel';\n\n/**\r\n * Compute the dimension of the crop area based on media size,\r\n * aspect ratio and optionally rotation\r\n */\n\nfunction getCropSize(mediaWidth, mediaHeight, containerWidth, containerHeight, aspect, rotation) {\n if (rotation === void 0) {\n rotation = 0;\n }\n\n var _a = rotateSize(mediaWidth, mediaHeight, rotation),\n width = _a.width,\n height = _a.height;\n\n var fittingWidth = Math.min(width, containerWidth);\n var fittingHeight = Math.min(height, containerHeight);\n\n if (fittingWidth > fittingHeight * aspect) {\n return {\n width: fittingHeight * aspect,\n height: fittingHeight\n };\n }\n\n return {\n width: fittingWidth,\n height: fittingWidth / aspect\n };\n}\n/**\r\n * Compute media zoom.\r\n * We fit the media into the container with \"max-width: 100%; max-height: 100%;\"\r\n */\n\nfunction getMediaZoom(mediaSize) {\n // Take the axis with more pixels to improve accuracy\n return mediaSize.width > mediaSize.height ? mediaSize.width / mediaSize.naturalWidth : mediaSize.height / mediaSize.naturalHeight;\n}\n/**\r\n * Ensure a new media position stays in the crop area.\r\n */\n\nfunction restrictPosition(position, mediaSize, cropSize, zoom, rotation) {\n if (rotation === void 0) {\n rotation = 0;\n }\n\n var _a = rotateSize(mediaSize.width, mediaSize.height, rotation),\n width = _a.width,\n height = _a.height;\n\n return {\n x: restrictPositionCoord(position.x, width, cropSize.width, zoom),\n y: restrictPositionCoord(position.y, height, cropSize.height, zoom)\n };\n}\n\nfunction restrictPositionCoord(position, mediaSize, cropSize, zoom) {\n var maxPosition = mediaSize * zoom / 2 - cropSize / 2;\n return clamp(position, -maxPosition, maxPosition);\n}\n\nfunction getDistanceBetweenPoints(pointA, pointB) {\n return Math.sqrt(Math.pow(pointA.y - pointB.y, 2) + Math.pow(pointA.x - pointB.x, 2));\n}\nfunction getRotationBetweenPoints(pointA, pointB) {\n return Math.atan2(pointB.y - pointA.y, pointB.x - pointA.x) * 180 / Math.PI;\n}\n/**\r\n * Compute the output cropped area of the media in percentages and pixels.\r\n * x/y are the top-left coordinates on the src media\r\n */\n\nfunction computeCroppedArea(crop, mediaSize, cropSize, aspect, zoom, rotation, restrictPosition) {\n if (rotation === void 0) {\n rotation = 0;\n }\n\n if (restrictPosition === void 0) {\n restrictPosition = true;\n } // if the media is rotated by the user, we cannot limit the position anymore\n // as it might need to be negative.\n\n\n var limitAreaFn = restrictPosition ? limitArea : noOp;\n var mediaBBoxSize = rotateSize(mediaSize.width, mediaSize.height, rotation);\n var mediaNaturalBBoxSize = rotateSize(mediaSize.naturalWidth, mediaSize.naturalHeight, rotation); // calculate the crop area in percentages\n // in the rotated space\n\n var croppedAreaPercentages = {\n x: limitAreaFn(100, ((mediaBBoxSize.width - cropSize.width / zoom) / 2 - crop.x / zoom) / mediaBBoxSize.width * 100),\n y: limitAreaFn(100, ((mediaBBoxSize.height - cropSize.height / zoom) / 2 - crop.y / zoom) / mediaBBoxSize.height * 100),\n width: limitAreaFn(100, cropSize.width / mediaBBoxSize.width * 100 / zoom),\n height: limitAreaFn(100, cropSize.height / mediaBBoxSize.height * 100 / zoom)\n }; // we compute the pixels size naively\n\n var widthInPixels = Math.round(limitAreaFn(mediaNaturalBBoxSize.width, croppedAreaPercentages.width * mediaNaturalBBoxSize.width / 100));\n var heightInPixels = Math.round(limitAreaFn(mediaNaturalBBoxSize.height, croppedAreaPercentages.height * mediaNaturalBBoxSize.height / 100));\n var isImgWiderThanHigh = mediaNaturalBBoxSize.width >= mediaNaturalBBoxSize.height * aspect; // then we ensure the width and height exactly match the aspect (to avoid rounding approximations)\n // if the media is wider than high, when zoom is 0, the crop height will be equals to image height\n // thus we want to compute the width from the height and aspect for accuracy.\n // Otherwise, we compute the height from width and aspect.\n\n var sizePixels = isImgWiderThanHigh ? {\n width: Math.round(heightInPixels * aspect),\n height: heightInPixels\n } : {\n width: widthInPixels,\n height: Math.round(widthInPixels / aspect)\n };\n\n var croppedAreaPixels = __assign(__assign({}, sizePixels), {\n x: Math.round(limitAreaFn(mediaNaturalBBoxSize.width - sizePixels.width, croppedAreaPercentages.x * mediaNaturalBBoxSize.width / 100)),\n y: Math.round(limitAreaFn(mediaNaturalBBoxSize.height - sizePixels.height, croppedAreaPercentages.y * mediaNaturalBBoxSize.height / 100))\n });\n\n return {\n croppedAreaPercentages: croppedAreaPercentages,\n croppedAreaPixels: croppedAreaPixels\n };\n}\n/**\r\n * Ensure the returned value is between 0 and max\r\n */\n\nfunction limitArea(max, value) {\n return Math.min(max, Math.max(0, value));\n}\n\nfunction noOp(_max, value) {\n return value;\n}\n/**\r\n * Compute crop and zoom from the croppedAreaPercentages.\r\n */\n\n\nfunction getInitialCropFromCroppedAreaPercentages(croppedAreaPercentages, mediaSize, rotation, cropSize, minZoom, maxZoom) {\n var mediaBBoxSize = rotateSize(mediaSize.width, mediaSize.height, rotation); // This is the inverse process of computeCroppedArea\n\n var zoom = clamp(cropSize.width / mediaBBoxSize.width * (100 / croppedAreaPercentages.width), minZoom, maxZoom);\n var crop = {\n x: zoom * mediaBBoxSize.width / 2 - cropSize.width / 2 - mediaBBoxSize.width * zoom * (croppedAreaPercentages.x / 100),\n y: zoom * mediaBBoxSize.height / 2 - cropSize.height / 2 - mediaBBoxSize.height * zoom * (croppedAreaPercentages.y / 100)\n };\n return {\n crop: crop,\n zoom: zoom\n };\n}\n/**\r\n * Compute zoom from the croppedAreaPixels\r\n */\n\nfunction getZoomFromCroppedAreaPixels(croppedAreaPixels, mediaSize, cropSize) {\n var mediaZoom = getMediaZoom(mediaSize);\n return cropSize.height > cropSize.width ? cropSize.height / (croppedAreaPixels.height * mediaZoom) : cropSize.width / (croppedAreaPixels.width * mediaZoom);\n}\n/**\r\n * Compute crop and zoom from the croppedAreaPixels\r\n */\n\n\nfunction getInitialCropFromCroppedAreaPixels(croppedAreaPixels, mediaSize, rotation, cropSize, minZoom, maxZoom) {\n if (rotation === void 0) {\n rotation = 0;\n }\n\n var mediaNaturalBBoxSize = rotateSize(mediaSize.naturalWidth, mediaSize.naturalHeight, rotation);\n var zoom = clamp(getZoomFromCroppedAreaPixels(croppedAreaPixels, mediaSize, cropSize), minZoom, maxZoom);\n var cropZoom = cropSize.height > cropSize.width ? cropSize.height / croppedAreaPixels.height : cropSize.width / croppedAreaPixels.width;\n var crop = {\n x: ((mediaNaturalBBoxSize.width - croppedAreaPixels.width) / 2 - croppedAreaPixels.x) * cropZoom,\n y: ((mediaNaturalBBoxSize.height - croppedAreaPixels.height) / 2 - croppedAreaPixels.y) * cropZoom\n };\n return {\n crop: crop,\n zoom: zoom\n };\n}\n/**\r\n * Return the point that is the center of point a and b\r\n */\n\nfunction getCenter(a, b) {\n return {\n x: (b.x + a.x) / 2,\n y: (b.y + a.y) / 2\n };\n}\nfunction getRadianAngle(degreeValue) {\n return degreeValue * Math.PI / 180;\n}\n/**\r\n * Returns the new bounding area of a rotated rectangle.\r\n */\n\nfunction rotateSize(width, height, rotation) {\n var rotRad = getRadianAngle(rotation);\n return {\n width: Math.abs(Math.cos(rotRad) * width) + Math.abs(Math.sin(rotRad) * height),\n height: Math.abs(Math.sin(rotRad) * width) + Math.abs(Math.cos(rotRad) * height)\n };\n}\n/**\r\n * Clamp value between min and max\r\n */\n\nfunction clamp(value, min, max) {\n return Math.min(Math.max(value, min), max);\n}\n/**\r\n * Combine multiple class names into a single string.\r\n */\n\nfunction classNames() {\n var args = [];\n\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n\n return args.filter(function (value) {\n if (typeof value === 'string' && value.length > 0) {\n return true;\n }\n\n return false;\n }).join(' ').trim();\n}\n\nvar css_248z = \".reactEasyCrop_Container {\\n position: absolute;\\n top: 0;\\n left: 0;\\n right: 0;\\n bottom: 0;\\n overflow: hidden;\\n user-select: none;\\n touch-action: none;\\n cursor: move;\\n display: flex;\\n justify-content: center;\\n align-items: center;\\n}\\n\\n.reactEasyCrop_Image,\\n.reactEasyCrop_Video {\\n will-change: transform; /* this improves performances and prevent painting issues on iOS Chrome */\\n}\\n\\n.reactEasyCrop_Contain {\\n max-width: 100%;\\n max-height: 100%;\\n margin: auto;\\n position: absolute;\\n top: 0;\\n bottom: 0;\\n left: 0;\\n right: 0;\\n}\\n.reactEasyCrop_Cover_Horizontal {\\n width: 100%;\\n height: auto;\\n}\\n.reactEasyCrop_Cover_Vertical {\\n width: auto;\\n height: 100%;\\n}\\n\\n.reactEasyCrop_CropArea {\\n position: absolute;\\n left: 50%;\\n top: 50%;\\n transform: translate(-50%, -50%);\\n border: 1px solid rgba(255, 255, 255, 0.5);\\n box-sizing: border-box;\\n box-shadow: 0 0 0 9999em;\\n color: rgba(0, 0, 0, 0.5);\\n overflow: hidden;\\n}\\n\\n.reactEasyCrop_CropAreaRound {\\n border-radius: 50%;\\n}\\n\\n.reactEasyCrop_CropAreaGrid::before {\\n content: ' ';\\n box-sizing: border-box;\\n position: absolute;\\n border: 1px solid rgba(255, 255, 255, 0.5);\\n top: 0;\\n bottom: 0;\\n left: 33.33%;\\n right: 33.33%;\\n border-top: 0;\\n border-bottom: 0;\\n}\\n\\n.reactEasyCrop_CropAreaGrid::after {\\n content: ' ';\\n box-sizing: border-box;\\n position: absolute;\\n border: 1px solid rgba(255, 255, 255, 0.5);\\n top: 33.33%;\\n bottom: 33.33%;\\n left: 0;\\n right: 0;\\n border-left: 0;\\n border-right: 0;\\n}\\n\";\n\nvar MIN_ZOOM = 1;\nvar MAX_ZOOM = 3;\n\nvar Cropper =\n/** @class */\nfunction (_super) {\n __extends(Cropper, _super);\n\n function Cropper() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n\n _this.imageRef = null;\n _this.videoRef = null;\n _this.containerRef = null;\n _this.styleRef = null;\n _this.containerRect = null;\n _this.mediaSize = {\n width: 0,\n height: 0,\n naturalWidth: 0,\n naturalHeight: 0\n };\n _this.dragStartPosition = {\n x: 0,\n y: 0\n };\n _this.dragStartCrop = {\n x: 0,\n y: 0\n };\n _this.lastPinchDistance = 0;\n _this.lastPinchRotation = 0;\n _this.rafDragTimeout = null;\n _this.rafPinchTimeout = null;\n _this.wheelTimer = null;\n _this.state = {\n cropSize: null,\n hasWheelJustStarted: false\n }; // this is to prevent Safari on iOS >= 10 to zoom the page\n\n _this.preventZoomSafari = function (e) {\n return e.preventDefault();\n };\n\n _this.cleanEvents = function () {\n document.removeEventListener('mousemove', _this.onMouseMove);\n document.removeEventListener('mouseup', _this.onDragStopped);\n document.removeEventListener('touchmove', _this.onTouchMove);\n document.removeEventListener('touchend', _this.onDragStopped);\n };\n\n _this.clearScrollEvent = function () {\n if (_this.containerRef) _this.containerRef.removeEventListener('wheel', _this.onWheel);\n\n if (_this.wheelTimer) {\n clearTimeout(_this.wheelTimer);\n }\n };\n\n _this.onMediaLoad = function () {\n var cropSize = _this.computeSizes();\n\n if (cropSize) {\n _this.emitCropData();\n\n _this.setInitialCrop(cropSize);\n }\n\n if (_this.props.onMediaLoaded) {\n _this.props.onMediaLoaded(_this.mediaSize);\n }\n };\n\n _this.setInitialCrop = function (cropSize) {\n if (_this.props.initialCroppedAreaPercentages) {\n var _a = getInitialCropFromCroppedAreaPercentages(_this.props.initialCroppedAreaPercentages, _this.mediaSize, _this.props.rotation, cropSize, _this.props.minZoom, _this.props.maxZoom),\n crop = _a.crop,\n zoom = _a.zoom;\n\n _this.props.onCropChange(crop);\n\n _this.props.onZoomChange && _this.props.onZoomChange(zoom);\n } else if (_this.props.initialCroppedAreaPixels) {\n var _b = getInitialCropFromCroppedAreaPixels(_this.props.initialCroppedAreaPixels, _this.mediaSize, _this.props.rotation, cropSize, _this.props.minZoom, _this.props.maxZoom),\n crop = _b.crop,\n zoom = _b.zoom;\n\n _this.props.onCropChange(crop);\n\n _this.props.onZoomChange && _this.props.onZoomChange(zoom);\n }\n };\n\n _this.computeSizes = function () {\n var _a, _b, _c, _d, _e, _f;\n\n var mediaRef = _this.imageRef || _this.videoRef;\n\n if (mediaRef && _this.containerRef) {\n _this.containerRect = _this.containerRef.getBoundingClientRect();\n var containerAspect = _this.containerRect.width / _this.containerRect.height;\n var naturalWidth = ((_a = _this.imageRef) === null || _a === void 0 ? void 0 : _a.naturalWidth) || ((_b = _this.videoRef) === null || _b === void 0 ? void 0 : _b.videoWidth) || 0;\n var naturalHeight = ((_c = _this.imageRef) === null || _c === void 0 ? void 0 : _c.naturalHeight) || ((_d = _this.videoRef) === null || _d === void 0 ? void 0 : _d.videoHeight) || 0;\n var isMediaScaledDown = mediaRef.offsetWidth < naturalWidth || mediaRef.offsetHeight < naturalHeight;\n var mediaAspect = naturalWidth / naturalHeight; // We do not rely on the offsetWidth/offsetHeight if the media is scaled down\n // as the values they report are rounded. That will result in precision losses\n // when calculating zoom. We use the fact that the media is positionned relative\n // to the container. That allows us to use the container's dimensions\n // and natural aspect ratio of the media to calculate accurate media size.\n // However, for this to work, the container should not be rotated\n\n var renderedMediaSize = void 0;\n\n if (isMediaScaledDown) {\n switch (_this.props.objectFit) {\n default:\n case 'contain':\n renderedMediaSize = containerAspect > mediaAspect ? {\n width: _this.containerRect.height * mediaAspect,\n height: _this.containerRect.height\n } : {\n width: _this.containerRect.width,\n height: _this.containerRect.width / mediaAspect\n };\n break;\n\n case 'horizontal-cover':\n renderedMediaSize = {\n width: _this.containerRect.width,\n height: _this.containerRect.width / mediaAspect\n };\n break;\n\n case 'vertical-cover':\n renderedMediaSize = {\n width: _this.containerRect.height * mediaAspect,\n height: _this.containerRect.height\n };\n break;\n }\n } else {\n renderedMediaSize = {\n width: mediaRef.offsetWidth,\n height: mediaRef.offsetHeight\n };\n }\n\n _this.mediaSize = __assign(__assign({}, renderedMediaSize), {\n naturalWidth: naturalWidth,\n naturalHeight: naturalHeight\n });\n var cropSize = _this.props.cropSize ? _this.props.cropSize : getCropSize(_this.mediaSize.width, _this.mediaSize.height, _this.containerRect.width, _this.containerRect.height, _this.props.aspect, _this.props.rotation);\n\n if (((_e = _this.state.cropSize) === null || _e === void 0 ? void 0 : _e.height) !== cropSize.height || ((_f = _this.state.cropSize) === null || _f === void 0 ? void 0 : _f.width) !== cropSize.width) {\n _this.props.onCropSizeChange && _this.props.onCropSizeChange(cropSize);\n }\n\n _this.setState({\n cropSize: cropSize\n }, _this.recomputeCropPosition);\n\n return cropSize;\n }\n };\n\n _this.onMouseDown = function (e) {\n e.preventDefault();\n document.addEventListener('mousemove', _this.onMouseMove);\n document.addEventListener('mouseup', _this.onDragStopped);\n\n _this.onDragStart(Cropper.getMousePoint(e));\n };\n\n _this.onMouseMove = function (e) {\n return _this.onDrag(Cropper.getMousePoint(e));\n };\n\n _this.onTouchStart = function (e) {\n if (_this.props.onTouchRequest && !_this.props.onTouchRequest(e)) {\n return;\n }\n\n document.addEventListener('touchmove', _this.onTouchMove, {\n passive: false\n }); // iOS 11 now defaults to passive: true\n\n document.addEventListener('touchend', _this.onDragStopped);\n\n if (e.touches.length === 2) {\n _this.onPinchStart(e);\n } else if (e.touches.length === 1) {\n _this.onDragStart(Cropper.getTouchPoint(e.touches[0]));\n }\n };\n\n _this.onTouchMove = function (e) {\n // Prevent whole page from scrolling on iOS.\n e.preventDefault();\n\n if (e.touches.length === 2) {\n _this.onPinchMove(e);\n } else if (e.touches.length === 1) {\n _this.onDrag(Cropper.getTouchPoint(e.touches[0]));\n }\n };\n\n _this.onDragStart = function (_a) {\n var _b, _c;\n\n var x = _a.x,\n y = _a.y;\n _this.dragStartPosition = {\n x: x,\n y: y\n };\n _this.dragStartCrop = __assign({}, _this.props.crop);\n (_c = (_b = _this.props).onInteractionStart) === null || _c === void 0 ? void 0 : _c.call(_b);\n };\n\n _this.onDrag = function (_a) {\n var x = _a.x,\n y = _a.y;\n if (_this.rafDragTimeout) window.cancelAnimationFrame(_this.rafDragTimeout);\n _this.rafDragTimeout = window.requestAnimationFrame(function () {\n if (!_this.state.cropSize) return;\n if (x === undefined || y === undefined) return;\n var offsetX = x - _this.dragStartPosition.x;\n var offsetY = y - _this.dragStartPosition.y;\n var requestedPosition = {\n x: _this.dragStartCrop.x + offsetX,\n y: _this.dragStartCrop.y + offsetY\n };\n var newPosition = _this.props.restrictPosition ? restrictPosition(requestedPosition, _this.mediaSize, _this.state.cropSize, _this.props.zoom, _this.props.rotation) : requestedPosition;\n\n _this.props.onCropChange(newPosition);\n });\n };\n\n _this.onDragStopped = function () {\n var _a, _b;\n\n _this.cleanEvents();\n\n _this.emitCropData();\n\n (_b = (_a = _this.props).onInteractionEnd) === null || _b === void 0 ? void 0 : _b.call(_a);\n };\n\n _this.onWheel = function (e) {\n if (_this.props.onWheelRequest && !_this.props.onWheelRequest(e)) {\n return;\n }\n\n e.preventDefault();\n var point = Cropper.getMousePoint(e);\n var pixelY = normalizeWheel(e).pixelY;\n var newZoom = _this.props.zoom - pixelY * _this.props.zoomSpeed / 200;\n\n _this.setNewZoom(newZoom, point);\n\n if (!_this.state.hasWheelJustStarted) {\n _this.setState({\n hasWheelJustStarted: true\n }, function () {\n var _a, _b;\n\n return (_b = (_a = _this.props).onInteractionStart) === null || _b === void 0 ? void 0 : _b.call(_a);\n });\n }\n\n if (_this.wheelTimer) {\n clearTimeout(_this.wheelTimer);\n }\n\n _this.wheelTimer = window.setTimeout(function () {\n return _this.setState({\n hasWheelJustStarted: false\n }, function () {\n var _a, _b;\n\n return (_b = (_a = _this.props).onInteractionEnd) === null || _b === void 0 ? void 0 : _b.call(_a);\n });\n }, 250);\n };\n\n _this.getPointOnContainer = function (_a) {\n var x = _a.x,\n y = _a.y;\n\n if (!_this.containerRect) {\n throw new Error('The Cropper is not mounted');\n }\n\n return {\n x: _this.containerRect.width / 2 - (x - _this.containerRect.left),\n y: _this.containerRect.height / 2 - (y - _this.containerRect.top)\n };\n };\n\n _this.getPointOnMedia = function (_a) {\n var x = _a.x,\n y = _a.y;\n var _b = _this.props,\n crop = _b.crop,\n zoom = _b.zoom;\n return {\n x: (x + crop.x) / zoom,\n y: (y + crop.y) / zoom\n };\n };\n\n _this.setNewZoom = function (zoom, point) {\n if (!_this.state.cropSize || !_this.props.onZoomChange) return;\n\n var zoomPoint = _this.getPointOnContainer(point);\n\n var zoomTarget = _this.getPointOnMedia(zoomPoint);\n\n var newZoom = clamp(zoom, _this.props.minZoom, _this.props.maxZoom);\n var requestedPosition = {\n x: zoomTarget.x * newZoom - zoomPoint.x,\n y: zoomTarget.y * newZoom - zoomPoint.y\n };\n var newPosition = _this.props.restrictPosition ? restrictPosition(requestedPosition, _this.mediaSize, _this.state.cropSize, newZoom, _this.props.rotation) : requestedPosition;\n\n _this.props.onCropChange(newPosition);\n\n _this.props.onZoomChange(newZoom);\n };\n\n _this.getCropData = function () {\n if (!_this.state.cropSize) {\n return null;\n } // this is to ensure the crop is correctly restricted after a zoom back (https://github.com/ValentinH/react-easy-crop/issues/6)\n\n\n var restrictedPosition = _this.props.restrictPosition ? restrictPosition(_this.props.crop, _this.mediaSize, _this.state.cropSize, _this.props.zoom, _this.props.rotation) : _this.props.crop;\n return computeCroppedArea(restrictedPosition, _this.mediaSize, _this.state.cropSize, _this.getAspect(), _this.props.zoom, _this.props.rotation, _this.props.restrictPosition);\n };\n\n _this.emitCropData = function () {\n var cropData = _this.getCropData();\n\n if (!cropData) return;\n var croppedAreaPercentages = cropData.croppedAreaPercentages,\n croppedAreaPixels = cropData.croppedAreaPixels;\n\n if (_this.props.onCropComplete) {\n _this.props.onCropComplete(croppedAreaPercentages, croppedAreaPixels);\n }\n\n if (_this.props.onCropAreaChange) {\n _this.props.onCropAreaChange(croppedAreaPercentages, croppedAreaPixels);\n }\n };\n\n _this.emitCropAreaChange = function () {\n var cropData = _this.getCropData();\n\n if (!cropData) return;\n var croppedAreaPercentages = cropData.croppedAreaPercentages,\n croppedAreaPixels = cropData.croppedAreaPixels;\n\n if (_this.props.onCropAreaChange) {\n _this.props.onCropAreaChange(croppedAreaPercentages, croppedAreaPixels);\n }\n };\n\n _this.recomputeCropPosition = function () {\n if (!_this.state.cropSize) return;\n var newPosition = _this.props.restrictPosition ? restrictPosition(_this.props.crop, _this.mediaSize, _this.state.cropSize, _this.props.zoom, _this.props.rotation) : _this.props.crop;\n\n _this.props.onCropChange(newPosition);\n\n _this.emitCropData();\n };\n\n return _this;\n }\n\n Cropper.prototype.componentDidMount = function () {\n window.addEventListener('resize', this.computeSizes);\n\n if (this.containerRef) {\n this.props.zoomWithScroll && this.containerRef.addEventListener('wheel', this.onWheel, {\n passive: false\n });\n this.containerRef.addEventListener('gesturestart', this.preventZoomSafari);\n this.containerRef.addEventListener('gesturechange', this.preventZoomSafari);\n }\n\n if (!this.props.disableAutomaticStylesInjection) {\n this.styleRef = document.createElement('style');\n this.styleRef.setAttribute('type', 'text/css');\n this.styleRef.innerHTML = css_248z;\n document.head.appendChild(this.styleRef);\n } // when rendered via SSR, the image can already be loaded and its onLoad callback will never be called\n\n\n if (this.imageRef && this.imageRef.complete) {\n this.onMediaLoad();\n }\n };\n\n Cropper.prototype.componentWillUnmount = function () {\n var _a;\n\n window.removeEventListener('resize', this.computeSizes);\n\n if (this.containerRef) {\n this.containerRef.removeEventListener('gesturestart', this.preventZoomSafari);\n this.containerRef.removeEventListener('gesturechange', this.preventZoomSafari);\n }\n\n if (this.styleRef) {\n (_a = this.styleRef.parentNode) === null || _a === void 0 ? void 0 : _a.removeChild(this.styleRef);\n }\n\n this.cleanEvents();\n this.props.zoomWithScroll && this.clearScrollEvent();\n };\n\n Cropper.prototype.componentDidUpdate = function (prevProps) {\n var _a, _b, _c, _d, _e, _f, _g, _h, _j;\n\n if (prevProps.rotation !== this.props.rotation) {\n this.computeSizes();\n this.recomputeCropPosition();\n } else if (prevProps.aspect !== this.props.aspect) {\n this.computeSizes();\n } else if (prevProps.zoom !== this.props.zoom) {\n this.recomputeCropPosition();\n } else if (((_a = prevProps.cropSize) === null || _a === void 0 ? void 0 : _a.height) !== ((_b = this.props.cropSize) === null || _b === void 0 ? void 0 : _b.height) || ((_c = prevProps.cropSize) === null || _c === void 0 ? void 0 : _c.width) !== ((_d = this.props.cropSize) === null || _d === void 0 ? void 0 : _d.width)) {\n this.computeSizes();\n } else if (((_e = prevProps.crop) === null || _e === void 0 ? void 0 : _e.x) !== ((_f = this.props.crop) === null || _f === void 0 ? void 0 : _f.x) || ((_g = prevProps.crop) === null || _g === void 0 ? void 0 : _g.y) !== ((_h = this.props.crop) === null || _h === void 0 ? void 0 : _h.y)) {\n this.emitCropAreaChange();\n }\n\n if (prevProps.zoomWithScroll !== this.props.zoomWithScroll && this.containerRef) {\n this.props.zoomWithScroll ? this.containerRef.addEventListener('wheel', this.onWheel, {\n passive: false\n }) : this.clearScrollEvent();\n }\n\n if (prevProps.video !== this.props.video) {\n (_j = this.videoRef) === null || _j === void 0 ? void 0 : _j.load();\n }\n };\n\n Cropper.prototype.getAspect = function () {\n var _a = this.props,\n cropSize = _a.cropSize,\n aspect = _a.aspect;\n\n if (cropSize) {\n return cropSize.width / cropSize.height;\n }\n\n return aspect;\n };\n\n Cropper.prototype.onPinchStart = function (e) {\n var pointA = Cropper.getTouchPoint(e.touches[0]);\n var pointB = Cropper.getTouchPoint(e.touches[1]);\n this.lastPinchDistance = getDistanceBetweenPoints(pointA, pointB);\n this.lastPinchRotation = getRotationBetweenPoints(pointA, pointB);\n this.onDragStart(getCenter(pointA, pointB));\n };\n\n Cropper.prototype.onPinchMove = function (e) {\n var _this = this;\n\n var pointA = Cropper.getTouchPoint(e.touches[0]);\n var pointB = Cropper.getTouchPoint(e.touches[1]);\n var center = getCenter(pointA, pointB);\n this.onDrag(center);\n if (this.rafPinchTimeout) window.cancelAnimationFrame(this.rafPinchTimeout);\n this.rafPinchTimeout = window.requestAnimationFrame(function () {\n var distance = getDistanceBetweenPoints(pointA, pointB);\n var newZoom = _this.props.zoom * (distance / _this.lastPinchDistance);\n\n _this.setNewZoom(newZoom, center);\n\n _this.lastPinchDistance = distance;\n var rotation = getRotationBetweenPoints(pointA, pointB);\n var newRotation = _this.props.rotation + (rotation - _this.lastPinchRotation);\n _this.props.onRotationChange && _this.props.onRotationChange(newRotation);\n _this.lastPinchRotation = rotation;\n });\n };\n\n Cropper.prototype.render = function () {\n var _this = this;\n\n var _a = this.props,\n image = _a.image,\n video = _a.video,\n mediaProps = _a.mediaProps,\n transform = _a.transform,\n _b = _a.crop,\n x = _b.x,\n y = _b.y,\n rotation = _a.rotation,\n zoom = _a.zoom,\n cropShape = _a.cropShape,\n showGrid = _a.showGrid,\n _c = _a.style,\n containerStyle = _c.containerStyle,\n cropAreaStyle = _c.cropAreaStyle,\n mediaStyle = _c.mediaStyle,\n _d = _a.classes,\n containerClassName = _d.containerClassName,\n cropAreaClassName = _d.cropAreaClassName,\n mediaClassName = _d.mediaClassName,\n objectFit = _a.objectFit;\n return /*#__PURE__*/React.createElement(\"div\", {\n onMouseDown: this.onMouseDown,\n onTouchStart: this.onTouchStart,\n ref: function ref(el) {\n return _this.containerRef = el;\n },\n \"data-testid\": \"container\",\n style: containerStyle,\n className: classNames('reactEasyCrop_Container', containerClassName)\n }, image ? /*#__PURE__*/React.createElement(\"img\", __assign({\n alt: \"\",\n className: classNames('reactEasyCrop_Image', objectFit === 'contain' && 'reactEasyCrop_Contain', objectFit === 'horizontal-cover' && 'reactEasyCrop_Cover_Horizontal', objectFit === 'vertical-cover' && 'reactEasyCrop_Cover_Vertical', mediaClassName)\n }, mediaProps, {\n src: image,\n ref: function ref(el) {\n return _this.imageRef = el;\n },\n style: __assign(__assign({}, mediaStyle), {\n transform: transform || \"translate(\" + x + \"px, \" + y + \"px) rotate(\" + rotation + \"deg) scale(\" + zoom + \")\"\n }),\n onLoad: this.onMediaLoad\n })) : video && /*#__PURE__*/React.createElement(\"video\", __assign({\n autoPlay: true,\n loop: true,\n muted: true,\n className: classNames('reactEasyCrop_Video', objectFit === 'contain' && 'reactEasyCrop_Contain', objectFit === 'horizontal-cover' && 'reactEasyCrop_Cover_Horizontal', objectFit === 'vertical-cover' && 'reactEasyCrop_Cover_Vertical', mediaClassName)\n }, mediaProps, {\n ref: function ref(el) {\n return _this.videoRef = el;\n },\n onLoadedMetadata: this.onMediaLoad,\n style: __assign(__assign({}, mediaStyle), {\n transform: transform || \"translate(\" + x + \"px, \" + y + \"px) rotate(\" + rotation + \"deg) scale(\" + zoom + \")\"\n }),\n controls: false\n }), (Array.isArray(video) ? video : [{\n src: video\n }]).map(function (item) {\n return /*#__PURE__*/React.createElement(\"source\", __assign({\n key: item.src\n }, item));\n })), this.state.cropSize && /*#__PURE__*/React.createElement(\"div\", {\n style: __assign(__assign({}, cropAreaStyle), {\n width: this.state.cropSize.width,\n height: this.state.cropSize.height\n }),\n \"data-testid\": \"cropper\",\n className: classNames('reactEasyCrop_CropArea', cropShape === 'round' && 'reactEasyCrop_CropAreaRound', showGrid && 'reactEasyCrop_CropAreaGrid', cropAreaClassName)\n }));\n };\n\n Cropper.defaultProps = {\n zoom: 1,\n rotation: 0,\n aspect: 4 / 3,\n maxZoom: MAX_ZOOM,\n minZoom: MIN_ZOOM,\n cropShape: 'rect',\n objectFit: 'contain',\n showGrid: true,\n style: {},\n classes: {},\n mediaProps: {},\n zoomSpeed: 1,\n restrictPosition: true,\n zoomWithScroll: true\n };\n\n Cropper.getMousePoint = function (e) {\n return {\n x: Number(e.clientX),\n y: Number(e.clientY)\n };\n };\n\n Cropper.getTouchPoint = function (touch) {\n return {\n x: Number(touch.clientX),\n y: Number(touch.clientY)\n };\n };\n\n return Cropper;\n}(React.Component);\n\nexport default Cropper;\n//# sourceMappingURL=index.module.js.map\n","/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n};\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, privateMap) {\r\n if (!privateMap.has(receiver)) {\r\n throw new TypeError(\"attempted to get private field on non-instance\");\r\n }\r\n return privateMap.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, privateMap, value) {\r\n if (!privateMap.has(receiver)) {\r\n throw new TypeError(\"attempted to set private field on non-instance\");\r\n }\r\n privateMap.set(receiver, value);\r\n return value;\r\n}\r\n","module.exports = window[\"React\"];","module.exports = window[\"wp\"][\"apiFetch\"];","module.exports = window[\"wp\"][\"element\"];","module.exports = window[\"wp\"][\"i18n\"];","module.exports = window[\"wp\"][\"url\"];","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = function(module) {\n\tvar getter = module && module.__esModule ?\n\t\tfunction() { return module['default']; } :\n\t\tfunction() { return module; };\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = function(exports, definition) {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }","// define __esModule on exports\n__webpack_require__.r = function(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};","import courseTab from './profile/course-tab';\nimport courseStatistics from './profile/statistic';\nimport recoverOrder from './profile/order-recover';\nimport Avatar from './profile/avatar';\n\ndocument.addEventListener( 'DOMContentLoaded', function( event ) {\n\tcourseTab();\n\tcourseStatistics();\n\trecoverOrder();\n} );\n\nif ( document.getElementById( 'learnpress-avatar-upload' ) ) {\n\twp.element.render( <Avatar />, document.getElementById( 'learnpress-avatar-upload' ) );\n}\n"],"names":["useState","useCallback","useEffect","useRef","apiFetch","__","sprintf","Cropper","Avatar","file","setFile","width","setWidth","height","setHeight","crop","setCrop","x","y","rotation","setRotation","croppedAreaPixels","setCroppedAreaPixels","naturalWidth","setNaturalWidth","naturalHeight","setNaturalHeight","loading","setLoading","skeleton","setSkeleton","uploadError","setUploadError","notice","setNotice","type","message","fileInput","getAvatar","response","method","path","data","parseInt","url","error","readFile","Promise","resolve","reader","FileReader","addEventListener","result","readAsDataURL","onCropComplete","croppedArea","base64Resize","base64","reject","canvas","document","createElement","img","src","setAttribute","onload","ctx","getContext","drawImage","toDataURL","onerror","err","updateAvatar","save","croppedImage","getCroppedImg","imageResize","status","window","location","reload","e","setFileInput","fileUpload","Image","size","removeAvatar","confirm","remove","position","zIndex","maxWidth","maxHeight","current","click","display","target","files","length","createImage","image","getRadianAngle","degreeValue","Math","PI","rotateSize","rotRad","abs","cos","sin","imageSrc","pixelCrop","flip","horizontal","vertical","bBoxWidth","bBoxHeight","translate","rotate","scale","getImageData","putImageData","addQueryArgs","courseTab","elements","querySelectorAll","getResponse","ele","dataset","append","viewMoreEle","wp","then","querySelector","innerHTML","classList","paged","numberPage","number","viewMore","catch","eleObserver","IntersectionObserver","entries","observer","forEach","entry","isIntersecting","params","parentNode","JSON","parse","value","tab","unobserve","map","observe","changeFilter","tabs","filters","filter","preventDefault","tabName","add","style","changeTab","tabUls","tabUl","element","layout","$","jQuery","recoverOrder","wrap","buttonRecoverOrder","find","ajaxRecover","post","serializeJSON","beforeSend","addClass","attr","success","LP","parseJSON","$msg","before","redirect","href","removeClass","removeAttr","on","courseStatistics","console","log","elArgStatistic","event","getElementById","render"],"sourceRoot":""}
assets/js/dist/frontend/profile.min.asset.php ADDED
@@ -0,0 +1 @@
 
1
+ <?php return array('dependencies' => array('react', 'wp-api-fetch', 'wp-element', 'wp-i18n', 'wp-url'), 'version' => '4373293e1147e2ab2a86');
assets/js/dist/frontend/profile.min.deps.json ADDED
@@ -0,0 +1 @@
 
1
+ ["react"]
assets/js/dist/frontend/question-types.asset.php ADDED
@@ -0,0 +1 @@
 
1
+ <?php return array('dependencies' => array('wp-compose', 'wp-data', 'wp-element', 'wp-i18n'), 'version' => 'f471f496128517385a6a');
assets/js/dist/frontend/question-types.deps.json ADDED
@@ -0,0 +1 @@
 
1
+ []
assets/js/dist/frontend/question-types.js CHANGED
@@ -158,7 +158,7 @@ class QuestionBase extends _wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Compo
158
  });
159
 
160
  (0,_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "getWarningMessage", () => {
161
- return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)('Render function should be overwritten from base.', 'learnpress'));
162
  });
163
 
164
  (0,_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "getOptionClass", option => {
158
  });
159
 
160
  (0,_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "getWarningMessage", () => {
161
+ return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)('The render function should be overwritten from the base.', 'learnpress'));
162
  });
163
 
164
  (0,_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__["default"])(this, "getOptionClass", option => {
assets/js/dist/frontend/question-types.js.map ADDED
@@ -0,0 +1 @@
 
1
+ {"version":3,"file":"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L7B,GAAP;AAOA,CAbS,CADW,EAerBd,6DAAY,CAAE,MAAM;AACnB,SAAO,EAAP;AACA,CAFW,CAfS,CAAP,CAkBZE,aAlBY,CAAf;;;;;;;;;;AC9CA;;;;;;;;;;ACAA;;;;;;;;;;ACAA;;;;;;;;;;ACAA;;;;;;;;;;;;;;ACAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,IAAI;AACJ;AACA;;AAEA;AACA;;;;;;UCbA;UACA;;UAEA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;UAEA;UACA;;UAEA;UACA;UACA;;;;;WCtBA;WACA;WACA;WACA,eAAe,4BAA4B;WAC3C,eAAe;WACf,iCAAiC,WAAW;WAC5C;WACA;;;;;WCPA;WACA;WACA;WACA;WACA,yCAAyC,wCAAwC;WACjF;WACA;WACA;;;;;WCPA,8CAA8C;;;;;WCA9C;WACA;WACA;WACA,uDAAuD,iBAAiB;WACxE;WACA,gDAAgD,aAAa;WAC7D;;;;;;;;;;;;;;;;;;;ACNA;AACA;AAEA,+DAAeA,6DAAf,E","sources":["webpack://learnpress/./assets/src/apps/js/frontend/question-types/components/index.js","webpack://learnpress/./assets/src/apps/js/frontend/question-types/components/question-base/index.js","webpack://learnpress/./assets/src/apps/js/frontend/question-types/components/questions/fill-in-blanks/index.js","webpack://learnpress/./assets/src/apps/js/frontend/question-types/components/questions/multiple-choices/index.js","webpack://learnpress/./assets/src/apps/js/frontend/question-types/components/questions/single-choice/index.js","webpack://learnpress/./assets/src/apps/js/frontend/question-types/components/questions/true-or-false/index.js","webpack://learnpress/./assets/src/apps/js/frontend/question-types/index.js","webpack://learnpress/external window [\"wp\",\"compose\"]","webpack://learnpress/external window [\"wp\",\"data\"]","webpack://learnpress/external window [\"wp\",\"element\"]","webpack://learnpress/external window [\"wp\",\"i18n\"]","webpack://learnpress/./node_modules/@babel/runtime/helpers/esm/defineProperty.js","webpack://learnpress/webpack/bootstrap","webpack://learnpress/webpack/runtime/compat get default export","webpack://learnpress/webpack/runtime/define property getters","webpack://learnpress/webpack/runtime/hasOwnProperty shorthand","webpack://learnpress/webpack/runtime/make namespace object","webpack://learnpress/./assets/src/apps/js/frontend/question-types.js"],"sourcesContent":["export { default as QuestionBase } from './question-base';\nexport { default as SingleChoice } from './questions/single-choice';\nexport { default as MultipleChoices } from './questions/multiple-choices';\nexport { default as TrueOrFalse } from './questions/true-or-false';\nexport { default as FillInBlanks } from './questions/fill-in-blanks';\n","/* eslint-disable no-mixed-spaces-and-tabs */\nimport { Component } from '@wordpress/element';\nimport { select as wpSelect } from '@wordpress/data';\nimport { __ } from '@wordpress/i18n';\n\nconst { isArray, get, set } = lodash;\n\nclass QuestionBase extends Component {\n\tconstructor( props ) {\n\t\tsuper( ...arguments );\n\n\t\tconst { question } = props;\n\n\t\tthis.state = {\n\t\t\toptionClass: [ 'answer-option' ],\n\t\t\tquestionId: 0,\n\t\t\toptions: question ? this.parseOptions( question.options ) : [],\n\t\t\tself: this,\n\t\t};\n\n\t\tif ( props.$wrap ) {\n\t\t\tthis.$wrap = props.$wrap;\n\t\t}\n\t}\n\n\tstatic getDerivedStateFromProps( props, state ) {\n\t\treturn state.self.prepare( props, state );\n\t}\n\n\tcomponentDidMount() {\n\t\tconst newState = this.prepare( this.props, this.state );\n\n\t\tif ( newState ) {\n\t\t\tthis.setState( newState );\n\t\t}\n\t}\n\n\tprepare = ( props, state ) => {\n\t\tconst { question } = props;\n\n\t\tif ( question && question.id !== state.questionId ) {\n\t\t\treturn {\n\t\t\t\toptions: state.self.parseOptions( question.options ),\n\t\t\t};\n\t\t}\n\n\t\treturn null;\n\t}\n\n\tsetInputRef = ( el, k ) => {\n\t\tif ( ! this.inputs ) {\n\t\t\tthis.inputs = {};\n\t\t}\n\n\t\tthis.inputs[ k ] = el;\n\t}\n\n\t/**\n\t * Only show correct answer\n\t * status = completed\n\t * todo: check isset answered but if skip it will not show.\n\t *\n\t * @author Nhamdv\n\t */\n\tmaybeShowCorrectAnswer = () => {\n\t\tconst { status, isCheckedAnswer, showCorrectReview, isReviewing } = this.props;\n\n\t\treturn ( status === 'completed' && showCorrectReview ) || ( isCheckedAnswer && ! isReviewing );\n\t};\n\n\t/**\n\t * Disable answer option in review mode or user has checked the question.\n\t *\n\t * @param option Doc.\n\t */\n\tmaybeDisabledOption = ( option ) => {\n\t\tconst {\n\t\t\tanswered,\n\t\t\tstatus,\n\t\t\tisCheckedAnswer,\n\t\t} = this.props;\n\n\t\treturn isCheckedAnswer || ( status !== 'started' );\n\t};\n\n\t/**\n\t * Event callback for clicking on answer option to\n\t * store answered\n\t */\n\tsetAnswerChecked = () => ( event ) => {\n\t\tconst {\n\t\t\tupdateUserQuestionAnswers,\n\t\t\tquestion,\n\t\t\tstatus,\n\t\t} = this.props;\n\n\t\tif ( status !== 'started' ) {\n\t\t\treturn __( 'LP Error: can not set answers', 'learnpress' );\n\t\t}\n\n\t\tconst $options = this.$wrap.find( '.option-check' );\n\t\tconst answered = [];\n\t\tconst isSingle = question.type !== 'multi_choice';\n\n\t\t$options.each( ( i, option ) => {\n\t\t\tif ( option.checked ) {\n\t\t\t\tanswered.push( option.value );\n\n\t\t\t\tif ( isSingle ) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\n\t\tupdateUserQuestionAnswers( question.id, isSingle ? answered[ 0 ] : answered );\n\t};\n\n\tmaybeCheckedAnswer = ( value ) => {\n\t\tconst { answered } = this.props;\n\n\t\tif ( isArray( answered ) ) {\n\t\t\treturn !! answered.find( ( a ) => {\n\t\t\t\treturn a == value;\n\t\t\t} );\n\t\t}\n\n\t\treturn value == answered;\n\t};\n\n\tgetOptionType = ( questionType, option ) => {\n\t\tlet type = 'radio';\n\n\t\tswitch ( questionType ) {\n\t\tcase 'multi_choice':\n\t\t\ttype = 'checkbox';\n\t\t\tbreak;\n\t\t}\n\n\t\treturn type;\n\t};\n\n\tisDefaultType = () => {\n\t\treturn this.props.supportOptions;\n\t};\n\n\tgetWarningMessage = () => {\n\t\treturn <>{ __( 'The render function should be overwritten from the base.', 'learnpress' ) }</>;\n\t};\n\n\tgetOptionClass = ( option ) => {\n\t\tconst { answered } = this.props;\n\n\t\tconst classes = [ 'answer-option' ];\n\n\t\treturn classes;\n\t};\n\n\tparseOptions = ( options ) => {\n\t\tif ( options ) {\n\t\t\toptions = ! isArray( options ) ? JSON.parse( CryptoJS.AES.decrypt( options.data, options.key, { format: CryptoJSAesJson } ).toString( CryptoJS.enc.Utf8 ) ) : options;\n\t\t\toptions = ! isArray( options ) ? JSON.parse( options ) : options;\n\t\t}\n\n\t\treturn options || [];\n\t};\n\n\tgetOptions = () => {\n\t\treturn this.state.options || [];\n\t};\n\n\tisCorrect = () => {\n\t\tconst { answered } = this.props;\n\n\t\tif ( ! answered ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tlet i, option, options;\n\n\t\tfor ( i = 0, options = this.getOptions(); i < options.length; i++ ) {\n\t\t\toption = options[ i ];\n\n\t\t\tif ( option.isTrue === 'yes' ) {\n\t\t\t\tif ( answered == option.value ) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t};\n\n\tisChecked = () => {\n\t\tconst { question } = this.props;\n\n\t\treturn wpSelect( 'learnpress/quiz' ).isCheckedAnswer( question.id );\n\t};\n\n\tgetCorrectLabel = () => {\n\t\tconst { status, answered, question } = this.props;\n\n\t\tconst checker = LP.config.isQuestionCorrect[ question.type ] || this.isCorrect;\n\t\tconst isCorrect = checker.call( this );\n\n\t\treturn this.maybeShowCorrectAnswer() && (\n\t\t\t<div className={ `question-response` + ( isCorrect ? ' correct' : ' incorrect' ) }>\n\t\t\t\t<span className=\"label\">{ isCorrect ? __( 'Correct', 'learnpress' ) : __( 'Incorrect', 'learnpress' ) }</span>\n\t\t\t\t<span className=\"point\">{ sprintf( __( '%d/%d point', 'learnpress' ), isCorrect ? question.point : 0, question.point ) }</span>\n\t\t\t</div>\n\t\t);\n\t};\n\n\trender() {\n\t\tconst { question, status } = this.props;\n\n\t\treturn (\n\t\t\t<div className=\"question-answers\">\n\n\t\t\t\t{ this.isDefaultType() && (\n\t\t\t\t\t<ul id={ `answer-options-${ question.id }` } className=\"answer-options\">\n\n\t\t\t\t\t\t{ this.getOptions().map( ( option ) => {\n\t\t\t\t\t\t\tconst ID = `learn-press-answer-option-${ option.uid }`;\n\n\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t<li className={ this.getOptionClass( option ).join( ' ' ) }\n\t\t\t\t\t\t\t\t\tkey={ `answer-option-${ option.uid }` }\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<input type={ this.getOptionType( question.type, option ) }\n\t\t\t\t\t\t\t\t\t\tclassName=\"option-check\"\n\t\t\t\t\t\t\t\t\t\tname={ status === 'started' ? `learn-press-question-${ question.id }` : '' }\n\t\t\t\t\t\t\t\t\t\tid={ ID }\n\t\t\t\t\t\t\t\t\t\tref={ ( el ) => {\n\t\t\t\t\t\t\t\t\t\t\tthis.setInputRef( el, option.value );\n\t\t\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\t\t\tonChange={ this.setAnswerChecked() }\n\t\t\t\t\t\t\t\t\t\tdisabled={ this.maybeDisabledOption( option ) }\n\t\t\t\t\t\t\t\t\t\tchecked={ this.maybeCheckedAnswer( option.value ) }\n\t\t\t\t\t\t\t\t\t\tvalue={ status === 'started' ? option.value : '' }\n\t\t\t\t\t\t\t\t\t/>\n\n\t\t\t\t\t\t\t\t\t<label htmlFor={ ID }\n\t\t\t\t\t\t\t\t\t\tclassName=\"option-title\"\n\t\t\t\t\t\t\t\t\t\tdangerouslySetInnerHTML={ { __html: option.title || option.value } }>\n\t\t\t\t\t\t\t\t\t</label>\n\t\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t} ) }\n\t\t\t\t\t</ul>\n\t\t\t\t) }\n\n\t\t\t\t{ ! this.isDefaultType() && this.getWarningMessage() }\n\t\t\t\t{ this.getCorrectLabel() }\n\t\t\t</div>\n\t\t);\n\t}\n}\nexport default QuestionBase;\n","import { __ } from '@wordpress/i18n';\nimport QuestionBase from '../../question-base';\n\nclass QuestionFillInBlanks extends QuestionBase {\n\tcomponentDidMount() {\n\t\tconst { answered } = this.props;\n\n\t\tif ( answered ) {\n\t\t\tconst allFIBs = document.querySelectorAll( '.lp-fib-input > input' );\n\n\t\t\t[ ...allFIBs ].map( ( ele ) => {\n\t\t\t\tif ( answered[ ele.dataset.id ] ) {\n\t\t\t\t\tele.value = answered[ ele.dataset.id ];\n\t\t\t\t}\n\t\t\t} );\n\t\t}\n\n\t\tthis.updateFibAnswer();\n\t}\n\n\tcomponentDidUpdate( prevProps ) {\n\t\tif ( ! prevProps.answered ) {\n\t\t\tthis.updateFibAnswer();\n\t\t}\n\t}\n\n\tupdateFibAnswer = () => {\n\t\tconst allFIBs = document.querySelectorAll( '.lp-fib-input > input' );\n\t\tconst { answered } = this.props;\n\n\t\tconst answereds = answered || {};\n\n\t\t[ ...allFIBs ].map( ( ele ) => {\n\t\t\tif ( answered === undefined ) {\n\t\t\t\tele.value = '';\n\t\t\t}\n\n\t\t\tele.addEventListener( 'input', ( e ) => {\n\t\t\t\tthis.setAnswered( answereds, ele.dataset.id, e.target.value );\n\t\t\t} );\n\n\t\t\tele.addEventListener( 'paste', ( e ) => {\n\t\t\t\tthis.setAnswered( answereds, ele.dataset.id, e.target.value );\n\t\t\t} );\n\t\t} );\n\t};\n\n\tsetAnswered = ( answered, id, value ) => {\n\t\tconst {\n\t\t\tupdateUserQuestionAnswers,\n\t\t\tquestion,\n\t\t\tstatus,\n\t\t} = this.props;\n\n\t\tif ( status !== 'started' ) {\n\t\t\treturn 'LP Error: can not set answers';\n\t\t}\n\n\t\tconst newAnswered = Object.assign( answered, { [ id ]: value } );\n\n\t\tupdateUserQuestionAnswers( question.id, newAnswered );\n\t};\n\n\tgetCorrectLabel = () => {\n\t\tconst { question, mark } = this.props;\n\n\t\tlet getMark = mark || 0;\n\n\t\tif ( mark ) {\n\t\t\tif ( ! Number.isInteger( mark ) ) {\n\t\t\t\tgetMark = mark.toFixed( 2 );\n\t\t\t}\n\t\t}\n\t\treturn this.maybeShowCorrectAnswer() && (\n\t\t\t<div className=\"question-response correct\">\n\t\t\t\t<span className=\"label\">{ __( 'Points', 'learnpress' ) }</span>\n\t\t\t\t<span className=\"point\">{ `${ getMark }/${ question.point } ${ __( 'point', 'learnpress' ) }` }</span>\n\t\t\t\t<span className=\"lp-fib-note\"><span style={ { background: '#00adff' } }></span>{ __( 'Correct', 'learnpress' ) }</span>\n\t\t\t\t<span className=\"lp-fib-note\"><span style={ { background: '#d85554' } }></span>{ __( 'Incorrect', 'learnpress' ) }</span>\n\t\t\t</div>\n\t\t);\n\t};\n\n\tconvertInputField = ( option ) => {\n\t\tconst { answered, isReviewing, showCorrectReview, isCheckedAnswer } = this.props;\n\n\t\tlet title = option.title;\n\n\t\tconst answers = option?.answers;\n\n\t\toption.ids.map( ( id, index ) => {\n\t\t\tconst textReplace = '{{FIB_' + id + '}}';\n\t\t\tlet elContent = '';\n\n\t\t\tconst answerID = answers ? answers?.[ id ] : undefined;\n\n\t\t\tif ( answerID || isReviewing ) {\n\t\t\t\telContent += `<span class=\"lp-fib-answered ${ ( showCorrectReview || isCheckedAnswer ) && answerID?.correct ? ( answerID?.isCorrect ? 'correct' : 'fail' ) : '' }\">`;\n\n\t\t\t\tif ( ! answerID?.isCorrect ) {\n\t\t\t\t\telContent += `<span class=\"lp-fib-answered__answer\">${ answered?.[ id ] ?? '' }</span>`;\n\t\t\t\t}\n\n\t\t\t\tif ( ! answerID?.isCorrect && answerID?.correct ) {\n\t\t\t\t\telContent += ' → ';\n\t\t\t\t}\n\n\t\t\t\telContent += `<span class=\"lp-fib-answered__fill\">${ answerID?.correct ?? '' }</span>`;\n\t\t\t\telContent += '</span>';\n\t\t\t} else {\n\t\t\t\telContent += '<div class=\"lp-fib-input\" style=\"display: inline-block; width: auto;\">';\n\t\t\t\telContent += '<input type=\"text\" data-id=\"' + id + '\" value=\"\" />';\n\t\t\t\telContent += '</div>';\n\t\t\t}\n\n\t\t\ttitle = title.replace( textReplace, elContent );\n\t\t} );\n\n\t\treturn title;\n\t};\n\n\trender() {\n\t\treturn (\n\t\t\t<>\n\t\t\t\t<div className=\"lp-fib-content\">\n\t\t\t\t\t{ this.getOptions().map( ( option ) => {\n\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t<div key={ `blank-${ option.uid }` } dangerouslySetInnerHTML={ { __html: this.convertInputField( option ) || option.value } }></div>\n\t\t\t\t\t\t);\n\t\t\t\t\t} ) }\n\t\t\t\t</div>\n\n\t\t\t\t{ ! this.isDefaultType() && this.getWarningMessage() }\n\t\t\t\t{ this.getCorrectLabel() }\n\t\t\t</>\n\t\t);\n\t}\n}\n\nexport default QuestionFillInBlanks;\n","import { Component } from '@wordpress/element';\nimport { __ } from '@wordpress/i18n';\nimport QuestionBase from '../../question-base';\n\nconst { isBoolean } = lodash;\n\nclass QuestionMultipleChoices extends QuestionBase {\n\tisCorrect = () => {\n\t\tconst { answered } = this.props;\n\n\t\tif ( isBoolean( answered ) || ! answered ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tlet i, option, options;\n\n\t\tfor ( i = 0, options = this.getOptions(); i < options.length; i++ ) {\n\t\t\toption = options[ i ];\n\n\t\t\tif ( option.isTrue === 'yes' ) {\n\t\t\t\tif ( answered.indexOf( option.value ) === -1 ) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t} else if ( answered.indexOf( option.value ) !== -1 ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\treturn true;\n\t};\n\n\tgetOptionClass = ( option ) => {\n\t\tconst { answered } = this.props;\n\t\tconst optionClass = [ ...this.state.optionClass ];\n\n\t\tif ( this.maybeShowCorrectAnswer() ) {\n\t\t\tif ( option.isTrue === 'yes' ) {\n\t\t\t\toptionClass.push( 'answer-correct' );\n\t\t\t}\n\n\t\t\tif ( answered ) {\n\t\t\t\tif ( option.isTrue === 'yes' ) {\n\t\t\t\t\tanswered.indexOf( option.value ) !== -1 && optionClass.push( 'answered-correct' );\n\t\t\t\t} else {\n\t\t\t\t\tanswered.indexOf( option.value ) !== -1 && optionClass.push( 'answered-wrong' );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn optionClass;\n\t};\n}\n\nexport default QuestionMultipleChoices;\n","/* eslint-disable no-mixed-spaces-and-tabs */\nimport QuestionBase from '../../question-base';\n\nclass QuestionSingleChoice extends QuestionBase {\n getOptionClass = ( option ) => {\n \tconst { answered } = this.props;\n \tconst optionClass = [ ...this.state.optionClass ];\n\n \tif ( this.maybeShowCorrectAnswer() ) {\n \t\tif ( option.isTrue === 'yes' ) {\n \t\t\toptionClass.push( 'answer-correct' );\n \t\t}\n\n \t\tif ( answered ) {\n \t\t\tif ( option.isTrue === 'yes' ) {\n \t\t\t\t( answered === option.value ) && optionClass.push( 'answered-correct' );\n \t\t\t} else {\n \t\t\t\t( answered === option.value ) && optionClass.push( 'answered-wrong' );\n \t\t\t}\n \t\t}\n \t}\n\n \treturn optionClass;\n };\n}\n\nexport default QuestionSingleChoice;\n","import QuestionBase from '../../question-base';\n\nclass QuestionTrueOrFalse extends QuestionBase {\n\tgetOptionClass = ( option ) => {\n\t\tconst { answered } = this.props;\n\t\tconst optionClass = [ ...this.state.optionClass ];\n\n\t\tif ( this.maybeShowCorrectAnswer() ) {\n\t\t\tif ( option.isTrue === 'yes' ) {\n\t\t\t\toptionClass.push( 'answer-correct' );\n\t\t\t}\n\n\t\t\tif ( answered ) {\n\t\t\t\tif ( option.isTrue === 'yes' ) {\n\t\t\t\t\t( answered === option.value ) && optionClass.push( 'answered-correct' );\n\t\t\t\t} else {\n\t\t\t\t\t( answered === option.value ) && optionClass.push( 'answered-wrong' );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn optionClass;\n\t};\n}\n\nexport default QuestionTrueOrFalse;\n","import { Component } from '@wordpress/element';\nimport { compose } from '@wordpress/compose';\nimport { withDispatch, withSelect } from '@wordpress/data';\nimport { __, sprintf } from '@wordpress/i18n';\n\nexport * from './components';\n\nclass QuestionTypes extends Component {\n\tgetQuestion = () => {\n\t\tconst { question } = this.props;\n\n\t\tconst types = LP.Hook.applyFilters( 'question-types', {\n\t\t\tsingle_choice: LP.questionTypes.SingleChoice,\n\t\t\tmulti_choice: LP.questionTypes.MultipleChoices,\n\t\t\ttrue_or_false: LP.questionTypes.TrueOrFalse,\n\t\t\tfill_in_blanks: LP.questionTypes.FillInBlanks,\n\t\t} );\n\n\t\treturn types[ question.type ];\n\t};\n\n\trender() {\n\t\tconst {\n\t\t\tquestion,\n\t\t\tsupportOptions,\n\t\t} = this.props;\n\n\t\tconst childProps = { ...this.props };\n\t\tchildProps.supportOptions = supportOptions.indexOf( question.type ) !== -1;\n\n\t\tconst TheQuestion = this.getQuestion() || function() {\n\t\t\treturn (\n\t\t\t\t<div className=\"question-types\"\n\t\t\t\t\tdangerouslySetInnerHTML={ { __html: sprintf( __( 'Question <code>%s</code> invalid!', 'learnpress' ), question.type ) } }>\n\t\t\t\t</div>\n\t\t\t);\n\t\t};\n\n\t\treturn (\n\t\t\t<>\n\t\t\t\t<TheQuestion { ...childProps } />\n\t\t\t</>\n\t\t);\n\t}\n}\n\nexport default compose(\n\twithSelect( ( select, { question: { id } } ) => {\n\t\tconst {\n\t\t\tgetData,\n\t\t\tisCheckedAnswer,\n\t\t} = select( 'learnpress/quiz' );\n\n\t\treturn {\n\t\t\tsupportOptions: getData( 'supportOptions' ),\n\t\t\tisCheckedAnswer: isCheckedAnswer( id ),\n\t\t\tkeyPressed: getData( 'keyPressed' ),\n\t\t\tshowCorrectReview: getData( 'showCorrectReview' ),\n\t\t\tisReviewing: getData( 'mode' ) === 'reviewing',\n\t\t};\n\t} ),\n\twithDispatch( () => {\n\t\treturn {};\n\t} )\n)( QuestionTypes );\n","module.exports = window[\"wp\"][\"compose\"];","module.exports = window[\"wp\"][\"data\"];","module.exports = window[\"wp\"][\"element\"];","module.exports = window[\"wp\"][\"i18n\"];","export default function _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = function(module) {\n\tvar getter = module && module.__esModule ?\n\t\tfunction() { return module['default']; } :\n\t\tfunction() { return module; };\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = function(exports, definition) {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }","// define __esModule on exports\n__webpack_require__.r = function(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};","export * from './question-types/index';\nimport QuestionTypes from './question-types/index';\n\nexport default QuestionTypes;\n"],"names":["default","QuestionBase","SingleChoice","MultipleChoices","TrueOrFalse","FillInBlanks","Component","select","wpSelect","__","isArray","get","set","lodash","constructor","props","arguments","state","question","id","questionId","options","self","parseOptions","el","k","inputs","status","isCheckedAnswer","showCorrectReview","isReviewing","option","answered","event","updateUserQuestionAnswers","$options","$wrap","find","isSingle","type","each","i","checked","push","value","a","questionType","supportOptions","classes","JSON","parse","CryptoJS","AES","decrypt","data","key","format","CryptoJSAesJson","toString","enc","Utf8","getOptions","length","isTrue","checker","LP","config","isQuestionCorrect","isCorrect","call","maybeShowCorrectAnswer","sprintf","point","optionClass","getDerivedStateFromProps","prepare","componentDidMount","newState","setState","render","isDefaultType","map","ID","uid","getOptionClass","join","getOptionType","setInputRef","setAnswerChecked","maybeDisabledOption","maybeCheckedAnswer","__html","title","getWarningMessage","getCorrectLabel","QuestionFillInBlanks","allFIBs","document","querySelectorAll","answereds","ele","undefined","addEventListener","e","setAnswered","dataset","target","newAnswered","Object","assign","mark","getMark","Number","isInteger","toFixed","background","answers","ids","index","textReplace","elContent","answerID","correct","replace","updateFibAnswer","componentDidUpdate","prevProps","convertInputField","isBoolean","QuestionMultipleChoices","indexOf","QuestionSingleChoice","QuestionTrueOrFalse","compose","withDispatch","withSelect","QuestionTypes","types","Hook","applyFilters","single_choice","questionTypes","multi_choice","true_or_false","fill_in_blanks","childProps","TheQuestion","getQuestion","getData","keyPressed"],"sourceRoot":""}
assets/js/dist/frontend/question-types.min.asset.php ADDED
@@ -0,0 +1 @@
 
1
+ <?php return array('dependencies' => array('wp-compose', 'wp-data', 'wp-element', 'wp-i18n'), 'version' => '3cfc6e1d4c1c1fa2326e');
assets/js/dist/frontend/question-types.min.deps.json ADDED
@@ -0,0 +1 @@
 
1
+ []
assets/js/dist/frontend/quiz.asset.php ADDED
@@ -0,0 +1 @@
 
1
+ <?php return array('dependencies' => array('wp-compose', 'wp-data', 'wp-element', 'wp-i18n', 'wp-url'), 'version' => '99b6b198172cb31911a3');
assets/js/dist/frontend/quiz.deps.json ADDED
@@ -0,0 +1 @@
 
1
+ ["LP-data-controls"]
assets/js/dist/frontend/quiz.js CHANGED
@@ -31,7 +31,7 @@ const Attempts = () => {
31
  className: "quiz-attempts"
32
  }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("h4", {
33
  className: "attempts-heading"
34
- }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Last Attempted', 'learnpress')), hasAttempts && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("table", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("thead", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("tr", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("th", {
35
  className: "quiz-attempts__questions"
36
  }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Questions', 'learnpress')), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("th", {
37
  className: "quiz-attempts__spend"
@@ -189,10 +189,10 @@ class ButtonCheck extends _wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Compon
189
  onClick: this.checkAnswer
190
  }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", {
191
  className: "instant-check__icon"
192
- }), (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_5__.__)('Check answer', 'learnpress'), !answered && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", {
193
  className: "instant-check__info",
194
  dangerouslySetInnerHTML: {
195
- __html: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_5__.__)('You need to answer the question before check answer.', 'learnpress')
196
  }
197
  })));
198
  }
@@ -341,7 +341,7 @@ class Buttons extends _wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Component
341
  isOpen
342
  } = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_2__.select)('learnpress/modal');
343
 
344
- if ('no' === confirm((0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('Are you sure you want to retake quiz?', 'learnpress'), this.startQuiz)) {
345
  !isOpen() && btn && btn.removeAttribute('disabled');
346
  return;
347
  }
@@ -436,7 +436,7 @@ class Buttons extends _wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Component
436
  confirm
437
  } = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_2__.select)('learnpress/modal');
438
 
439
- if ('no' === confirm((0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('Are you sure to submit quiz?', 'learnpress'), this.submit)) {
440
  return;
441
  }
442
 
@@ -1810,7 +1810,7 @@ const Status = () => {
1810
  confirm
1811
  } = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_1__.select)('learnpress/modal');
1812
 
1813
- if ('no' === confirm((0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)('Are you sure to submit quiz?', 'learnpress'), submit)) {
1814
  return;
1815
  }
1816
 
@@ -1907,18 +1907,11 @@ const Timer = () => {
1907
  } = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_1__.dispatch)('learnpress/quiz');
1908
  const totalTime = getData('totalTime');
1909
  const durationTime = getData('duration');
1910
- /* const endTime = getData( 'endTime' );
1911
- const d1 = new Date( endTime.replace( /-/g, '/' ) );
1912
- const d2 = new Date();
1913
- const tz = new Date().getTimezoneOffset();
1914
- const t = parseInt( ( d1.getTime() / 1000 ) - ( ( d2.getTime() / 1000 ) + ( tz * 60 ) ) );*/
1915
-
1916
  const [seconds, setSeconds] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(totalTime);
1917
  let [timeSpend, setTimeSpend] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(0);
1918
- const limitTime = totalTime > 0;
1919
  (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {
1920
  const myInterval = setInterval(() => {
1921
- if (limitTime) {
1922
  let remainSeconds = seconds;
1923
  remainSeconds -= 1;
1924
 
@@ -2697,11 +2690,13 @@ const submitQuiz = (state, action) => {
2697
  const newArgs = {};
2698
 
2699
  if (state.reviewQuestions) {
2700
- if (action.results.questions[question.id].explanation) {
 
 
2701
  newArgs.explanation = action.results.questions[question.id].explanation;
2702
  }
2703
 
2704
- if (action.results.questions[question.id].options) {
2705
  newArgs.options = action.results.questions[question.id].options;
2706
  }
2707
  }
31
  className: "quiz-attempts"
32
  }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("h4", {
33
  className: "attempts-heading"
34
+ }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Last Attempt', 'learnpress')), hasAttempts && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("table", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("thead", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("tr", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("th", {
35
  className: "quiz-attempts__questions"
36
  }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)('Questions', 'learnpress')), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("th", {
37
  className: "quiz-attempts__spend"
189
  onClick: this.checkAnswer
190
  }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", {
191
  className: "instant-check__icon"
192
+ }), (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_5__.__)('Check answers', 'learnpress'), !answered && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", {
193
  className: "instant-check__info",
194
  dangerouslySetInnerHTML: {
195
+ __html: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_5__.__)('You need to answer the question before checking the answer key.', 'learnpress')
196
  }
197
  })));
198
  }
341
  isOpen
342
  } = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_2__.select)('learnpress/modal');
343
 
344
+ if ('no' === confirm((0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('Are you sure you want to retake the quiz?', 'learnpress'), this.startQuiz)) {
345
  !isOpen() && btn && btn.removeAttribute('disabled');
346
  return;
347
  }
436
  confirm
437
  } = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_2__.select)('learnpress/modal');
438
 
439
+ if ('no' === confirm((0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__.__)('Are you sure to submit the quiz?', 'learnpress'), this.submit)) {
440
  return;
441
  }
442
 
1810
  confirm
1811
  } = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_1__.select)('learnpress/modal');
1812
 
1813
+ if ('no' === confirm((0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)('Are you sure to submit the quiz?', 'learnpress'), submit)) {
1814
  return;
1815
  }
1816
 
1907
  } = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_1__.dispatch)('learnpress/quiz');
1908
  const totalTime = getData('totalTime');
1909
  const durationTime = getData('duration');
 
 
 
 
 
 
1910
  const [seconds, setSeconds] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(totalTime);
1911
  let [timeSpend, setTimeSpend] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(0);
 
1912
  (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {
1913
  const myInterval = setInterval(() => {
1914
+ if (durationTime > 0) {
1915
  let remainSeconds = seconds;
1916
  remainSeconds -= 1;
1917
 
2690
  const newArgs = {};
2691
 
2692
  if (state.reviewQuestions) {
2693
+ var _action$results$quest, _action$results$quest2;
2694
+
2695
+ if ((_action$results$quest = action.results.questions[question.id]) !== null && _action$results$quest !== void 0 && _action$results$quest.explanation) {
2696
  newArgs.explanation = action.results.questions[question.id].explanation;
2697
  }
2698
 
2699
+ if ((_action$results$quest2 = action.results.questions[question.id]) !== null && _action$results$quest2 !== void 0 && _action$results$quest2.options) {
2700
  newArgs.options = action.results.questions[question.id].options;
2701
  }
2702
  }
assets/js/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js/frontend/quiz/components/attempts/index.js","webpack://learnpress/./assets/src/apps/js/frontend/quiz/components/buttons/button-check.js","webpack://learnpress/./assets/src/apps/js/frontend/quiz/components/buttons/button-hint.js","webpack://learnpress/./assets/src/apps/js/frontend/quiz/components/buttons/index.js","webpack://learnpress/./assets/src/apps/js/frontend/quiz/components/content/index.js","webpack://learnpress/./assets/src/apps/js/frontend/quiz/components/duration/index.js","webpack://learnpress/./assets/src/apps/js/frontend/quiz/components/index.js","webpack://learnpress/./assets/src/apps/js/frontend/quiz/components/meta/index.js","webpack://learnpress/./assets/src/apps/js/frontend/quiz/components/questions/buttons.js","webpack://learnpress/./assets/src/apps/js/frontend/quiz/components/questions/index.js","webpack://learnpress/./assets/src/apps/js/frontend/quiz/components/questions/question.js","webpack://learnpress/./assets/src/apps/js/frontend/quiz/components/result/index.js","webpack://learnpress/./assets/src/apps/js/frontend/quiz/components/status/index.js","webpack://learnpress/./assets/src/apps/js/frontend/quiz/components/timer/index.js","webpack://learnpress/./assets/src/apps/js/frontend/quiz/components/title/index.js","webpack://learnpress/./assets/src/apps/js/frontend/quiz/index.js","webpack://learnpress/./assets/src/apps/js/frontend/quiz/store/actions.js","webpack://learnpress/./assets/src/apps/js/frontend/quiz/store/index.js","webpack://learnpress/./assets/src/apps/js/frontend/quiz/store/middlewares.js","webpack://learnpress/./assets/src/apps/js/frontend/quiz/store/reducer.js","webpack://learnpress/./assets/src/apps/js/frontend/quiz/store/selectors.js","webpack://learnpress/./assets/src/apps/js/frontend/show-lp-overlay-complete-item.js","webpack://learnpress/./assets/src/apps/js/frontend/single-curriculum/components/compatible.js","webpack://learnpress/./assets/src/apps/js/frontend/single-curriculum/components/items-progress.js","webpack://learnpress/./assets/src/apps/js/utils/lp-modal-overlay.js","webpack://learnpress/./node_modules/classnames/index.js","webpack://learnpress/./node_modules/refx/refx.js","webpack://learnpress/external window [\"LP\",\"dataControls\"]","webpack://learnpress/external window [\"wp\",\"compose\"]","webpack://learnpress/external window [\"wp\",\"data\"]","webpack://learnpress/external window [\"wp\",\"element\"]","webpack://learnpress/external window [\"wp\",\"i18n\"]","webpack://learnpress/external window [\"wp\",\"url\"]","webpack://learnpress/./node_modules/@babel/runtime/helpers/esm/defineProperty.js","webpack://learnpress/./node_modules/@babel/runtime/helpers/esm/extends.js","webpack://learnpress/webpack/bootstrap","webpack://learnpress/webpack/runtime/compat get default export","webpack://learnpress/webpack/runtime/define property getters","webpack://learnpress/webpack/runtime/hasOwnProperty shorthand","webpack://learnpress/webpack/runtime/make namespace object","webpack://learnpress/./assets/src/apps/js/frontend/quiz.js"],"sourcesContent":["import { select } from '@wordpress/data';\nimport { __ } from '@wordpress/i18n';\nimport { default as formatDuration } from '../duration';\n\n/**\n * Displays list of all attempt from a quiz.\n */\nconst Attempts = () => {\n\tconst attempts = select( 'learnpress/quiz' ).getData( 'attempts' ) || [];\n\n\tconst hasAttempts = attempts && !! attempts.length;\n\treturn (\n\t\t! hasAttempts ? false : <>\n\t\t\t<div className=\"quiz-attempts\">\n\t\t\t\t<h4 className=\"attempts-heading\">{ __( 'Last Attempt', 'learnpress' ) }</h4>\n\n\t\t\t\t{ hasAttempts && (\n\t\t\t\t\t<table>\n\t\t\t\t\t\t<thead>\n\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t<th className=\"quiz-attempts__questions\">{ __( 'Questions', 'learnpress' ) }</th>\n\t\t\t\t\t\t\t\t<th className=\"quiz-attempts__spend\">{ __( 'Time spent', 'learnpress' ) }</th>\n\t\t\t\t\t\t\t\t<th className=\"quiz-attempts__marks\">{ __( 'Marks', 'learnpress' ) }</th>\n\t\t\t\t\t\t\t\t<th className=\"quiz-attempts__grade\">{ __( 'Passing grade', 'learnpress' ) }</th>\n\t\t\t\t\t\t\t\t<th className=\"quiz-attempts__result\">{ __( 'Result', 'learnpress' ) }</th>\n\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t</thead>\n\t\t\t\t\t\t<tbody>\n\t\t\t\t\t\t\t{ attempts.map( ( row, key ) => {\n\t\t\t\t\t\t\t\t// Re-write value to attempts.timeSpend\n\t\t\t\t\t\t\t\t/*if ( lpQuizSettings.checkNorequizenroll === 1 ) {\n\t\t\t\t\t\t\t\t\tconst timespendStart = window.localStorage.getItem( 'quiz_start_' + lpQuizSettings.id ),\n\t\t\t\t\t\t\t\t\t\ttimespendEnd = window.localStorage.getItem( 'quiz_end_' + lpQuizSettings.id );\n\t\t\t\t\t\t\t\t\tif ( timespendStart && timespendEnd ) {\n\t\t\t\t\t\t\t\t\t\trow.timeSpend = timeDifference( timespendStart, timespendEnd ).duration;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}*/\n\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t<tr key={ `attempt-${ key }` }>\n\t\t\t\t\t\t\t\t\t\t<td className=\"quiz-attempts__questions\">{ `${ row.questionCorrect } / ${ row.questionCount }` }</td>\n\t\t\t\t\t\t\t\t\t\t<td className=\"quiz-attempts__spend\">{ row.timeSpend || '--' }</td>\n\t\t\t\t\t\t\t\t\t\t<td className=\"quiz-attempts__marks\">{ `${ row.userMark } / ${ row.mark }` }</td>\n\t\t\t\t\t\t\t\t\t\t<td className=\"quiz-attempts__grade\">{ row.passingGrade || '-' }</td>\n\t\t\t\t\t\t\t\t\t\t<td className=\"quiz-attempts__result\">{ `${ parseFloat( row.result ).toFixed( 2 ) }%` } <span>{ row.graduationText }</span></td>\n\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t} ) }\n\t\t\t\t\t\t</tbody>\n\t\t\t\t\t</table>\n\t\t\t\t) }\n\t\t\t</div>\n\t\t</>\n\t);\n};\nfunction timeDifference( earlierDate, laterDate ) {\n\tconst oDiff = new Object();\n\n\t// Calculate Differences\n\t// ------------------------------------------------------------------- //\n\tlet nTotalDiff = laterDate - earlierDate;\n\n\toDiff.days = Math.floor( nTotalDiff / 1000 / 60 / 60 / 24 );\n\tnTotalDiff -= oDiff.days * 1000 * 60 * 60 * 24;\n\n\toDiff.hours = Math.floor( nTotalDiff / 1000 / 60 / 60 );\n\tnTotalDiff -= oDiff.hours * 1000 * 60 * 60;\n\n\toDiff.minutes = Math.floor( nTotalDiff / 1000 / 60 );\n\tnTotalDiff -= oDiff.minutes * 1000 * 60;\n\n\toDiff.seconds = Math.floor( nTotalDiff / 1000 );\n\t// ------------------------------------------------------------------- //\n\n\t// Format Duration\n\t// ------------------------------------------------------------------- //\n\t// Format Hours\n\tlet hourtext = '00';\n\tif ( oDiff.days > 0 ) {\n\t\thourtext = String( oDiff.days );\n\t}\n\tif ( hourtext.length == 1 ) {\n\t\thourtext = '0' + hourtext;\n\t}\n\n\t// Format Minutes\n\tlet mintext = '00';\n\tif ( oDiff.minutes > 0 ) {\n\t\tmintext = String( oDiff.minutes );\n\t}\n\tif ( mintext.length == 1 ) {\n\t\tmintext = '0' + mintext;\n\t}\n\n\t// Format Seconds\n\tlet sectext = '00';\n\tif ( oDiff.seconds > 0 ) {\n\t\tsectext = String( oDiff.seconds );\n\t}\n\tif ( sectext.length == 1 ) {\n\t\tsectext = '0' + sectext;\n\t}\n\t// Set Duration\n\tconst sDuration = hourtext + ':' + mintext + ':' + sectext;\n\toDiff.duration = sDuration;\n\t// ------------------------------------------------------------------- //\n\n\treturn oDiff;\n}\nexport default Attempts;\n","import classNames from 'classnames';\n\nimport { Component } from '@wordpress/element';\nimport { withDispatch, withSelect } from '@wordpress/data';\nimport { compose } from '@wordpress/compose';\nimport { __ } from '@wordpress/i18n';\n\nclass ButtonCheck extends Component {\n\tconstructor() {\n\t\tsuper( ...arguments );\n\n\t\tthis.state = {\n\t\t\tloading: false,\n\t\t};\n\t}\n\n\tcheckAnswer = () => {\n\t\tconst { checkAnswer, question, answered } = this.props;\n\n\t\tif ( answered ) {\n\t\t\tcheckAnswer( question.id );\n\n\t\t\tthis.setState( {\n\t\t\t\tloading: true,\n\t\t\t} );\n\t\t}\n\t};\n\n\trender() {\n\t\tconst { answered } = this.props;\n\n\t\treturn (\n\t\t\t<>\n\t\t\t\t<button className={ classNames( 'lp-button', 'instant-check', {\n\t\t\t\t\tloading: this.state.loading,\n\t\t\t\t\tdisable: ! answered,\n\t\t\t\t} ) } onClick={ this.checkAnswer }\n\t\t\t\t>\n\t\t\t\t\t<span className=\"instant-check__icon\" />\n\t\t\t\t\t{ __( 'Check answers', 'learnpress' ) }\n\n\t\t\t\t\t{ ! answered && (\n\t\t\t\t\t\t<div className=\"instant-check__info\" dangerouslySetInnerHTML={ { __html: __( 'You need to answer the question before checking the answer key.', 'learnpress' ) } } />\n\t\t\t\t\t) }\n\t\t\t\t</button>\n\t\t\t</>\n\t\t);\n\t}\n}\n\nexport default compose(\n\twithSelect( ( select, { question: { id } } ) => {\n\t\tconst { getQuestionAnswered } = select( 'learnpress/quiz' );\n\n\t\treturn {\n\t\t\tanswered: getQuestionAnswered( id ),\n\t\t};\n\t} ),\n\twithDispatch( ( dispatch, { id } ) => {\n\t\tconst { checkAnswer } = dispatch( 'learnpress/quiz' );\n\n\t\treturn {\n\t\t\tcheckAnswer( id ) {\n\t\t\t\tcheckAnswer( id );\n\t\t\t},\n\t\t};\n\t} )\n)( ButtonCheck );\n","import { Component } from '@wordpress/element';\nimport { withDispatch } from '@wordpress/data';\nimport { compose } from '@wordpress/compose';\nimport { __ } from '@wordpress/i18n';\n\nclass ButtonHint extends Component {\n\t/**\n\t * Callback to show hint of question\n\t */\n\tshowHint = () => {\n\t\tconst { showHint, question } = this.props;\n\n\t\tshowHint( question.id, ! question.showHint );\n\t};\n\n\trender() {\n\t\tconst { question } = this.props;\n\n\t\treturn (\n\t\t\tquestion.hint ? (\n\t\t\t\t<button className=\"btn-show-hint\" onClick={ this.showHint }>\n\t\t\t\t\t<span>{ __( 'Hint', 'learnpress' ) }</span>\n\t\t\t\t</button>\n\t\t\t) : ''\n\t\t);\n\t}\n}\n\nexport default compose(\n\twithDispatch( ( dispatch, { id } ) => {\n\t\tconst {\n\t\t\tshowHint,\n\t\t} = dispatch( 'learnpress/quiz' );\n\n\t\treturn {\n\t\t\tshowHint( id, show ) {\n\t\t\t\tshowHint( id, show );\n\t\t\t},\n\t\t};\n\t} )\n)( ButtonHint );\n","import { Component } from '@wordpress/element';\nimport { withSelect, withDispatch, select } from '@wordpress/data';\nimport { compose } from '@wordpress/compose';\nimport { __ } from '@wordpress/i18n';\n\nclass Buttons extends Component {\n\tstartQuiz = ( event ) => {\n\t\tevent && event.preventDefault();\n\t\tconst btn = document.querySelector( '.lp-button.start' );\n\t\tbtn && btn.setAttribute( 'disabled', 'disabled' );\n\t\tbtn.classList.add( 'loading' );\n\t\tconst { startQuiz, status } = this.props;\n\n\t\tif ( status === 'completed' ) {\n\t\t\tconst { confirm, isOpen } = select( 'learnpress/modal' );\n\n\t\t\tif ( 'no' === confirm( __( 'Are you sure you want to retake the quiz?', 'learnpress' ), this.startQuiz ) ) {\n\t\t\t\t! isOpen() && btn && btn.removeAttribute( 'disabled' );\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\n\t\t// No require enroll\n\t\t/*if ( lpQuizSettings.checkNorequizenroll === 1 ) {\n\t\t\t// Reset data\n\t\t\twindow.localStorage.removeItem( 'quiz_start_' + lpQuizSettings.id );\n\t\t\twindow.localStorage.removeItem( 'quiz_userdata_' + lpQuizSettings.id );\n\t\t\twindow.localStorage.setItem( 'quiz_start_' + lpQuizSettings.id, Date.now() );\n\n\t\t\t// Set retake to local.storage\n\t\t\tconst retakenNumber = window.localStorage.getItem( 'quiz_retake_' + lpQuizSettings.id );\n\t\t\tif ( retakenNumber >= 1 ) {\n\t\t\t\twindow.localStorage.setItem( 'quiz_retake_' + lpQuizSettings.id, parseInt( retakenNumber ) + 1 );\n\t\t\t} else {\n\t\t\t\twindow.localStorage.setItem( 'quiz_retake_' + lpQuizSettings.id, 1 );\n\t\t\t}\n\t\t}*/\n\n\t\tstartQuiz();\n\t};\n\n\tnav = ( to ) => ( event ) => {\n\t\tlet {\n\t\t\tquestionNav,\n\t\t\tcurrentPage,\n\t\t\tnumPages,\n\t\t\tsetCurrentPage,\n\t\t} = this.props;\n\n\t\tswitch ( to ) {\n\t\tcase 'prev':\n\t\t\tif ( currentPage > 1 ) {\n\t\t\t\tcurrentPage = currentPage - 1;\n\t\t\t} else if ( questionNav === 'infinity' ) {\n\t\t\t\tcurrentPage = numPages;\n\t\t\t} else {\n\t\t\t\tcurrentPage = 1;\n\t\t\t}\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tif ( currentPage < numPages ) {\n\t\t\t\tcurrentPage = currentPage + 1;\n\t\t\t} else if ( questionNav === 'infinity' ) {\n\t\t\t\tcurrentPage = 1;\n\t\t\t} else {\n\t\t\t\tcurrentPage = numPages;\n\t\t\t}\n\t\t}\n\n\t\tsetCurrentPage( currentPage );\n\t};\n\n\tmoveTo = ( pageNum ) => ( event ) => {\n\t\tevent.preventDefault();\n\n\t\tconst {\n\t\t\tnumPages,\n\t\t\tsetCurrentPage,\n\t\t} = this.props;\n\n\t\tif ( pageNum < 1 || pageNum > numPages ) {\n\t\t\treturn;\n\t\t}\n\n\t\tsetCurrentPage( pageNum );\n\t};\n\n\tisLast = () => {\n\t\tconst { currentPage, numPages } = this.props;\n\n\t\treturn currentPage === numPages;\n\t};\n\n\tisFirst = () => {\n\t\tconst { currentPage } = this.props;\n\n\t\treturn currentPage === 1;\n\t};\n\n\tsubmit = () => {\n\t\tconst { submitQuiz } = this.props;\n\n\t\tconst { confirm } = select( 'learnpress/modal' );\n\n\t\tif ( 'no' === confirm( __( 'Are you sure to submit the quiz?', 'learnpress' ), this.submit ) ) {\n\t\t\treturn;\n\t\t}\n\t\tsubmitQuiz();\n\t};\n\n\tsetQuizMode = ( mode ) => () => {\n\t\tconst { setQuizMode } = this.props;\n\n\t\tsetQuizMode( mode );\n\t};\n\n\tisReviewing = () => {\n\t\tconst { isReviewing } = this.props;\n\n\t\treturn isReviewing;\n\t};\n\n\tpageNumbers( args ) {\n\t\tconst { numPages, currentPage } = this.props;\n\n\t\tif ( numPages < 2 ) {\n\t\t\treturn '';\n\t\t}\n\n\t\targs = {\n\t\t\tnumPages,\n\t\t\tcurrentPage,\n\t\t\tmidSize: 1,\n\t\t\tendSize: 1,\n\t\t\tprevNext: true,\n\t\t\t...( args || {} ),\n\t\t};\n\n\t\tif ( args.endSize < 1 ) {\n\t\t\targs.endSize = 1;\n\t\t}\n\n\t\tif ( args.midSize < 0 ) {\n\t\t\targs.midSize = 1;\n\t\t}\n\n\t\tconst numbers = [ ...Array( numPages ).keys() ];\n\t\tlet dots = false;\n\n\t\treturn (\n\t\t\t<div className=\"nav-links\">\n\n\t\t\t\t{ args.prevNext && ! this.isFirst() && (\n\t\t\t\t\t<button\n\t\t\t\t\t\tclassName=\"page-numbers prev\"\n\t\t\t\t\t\tdata-type=\"question-navx\"\n\t\t\t\t\t\tonClick={ this.nav( 'prev' ) }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ __( 'Prev', 'learnpress' ) }\n\t\t\t\t\t</button>\n\t\t\t\t) }\n\n\t\t\t\t{ numbers.map( ( number ) => {\n\t\t\t\t\tnumber = number + 1;\n\n\t\t\t\t\tif ( number === args.currentPage ) {\n\t\t\t\t\t\tdots = true;\n\n\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t<span key={ `page-number-${ number }` } className=\"page-numbers current\">{ number }</span>\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( number <= args.endSize || ( args.currentPage && number >= args.currentPage - args.midSize && number <= args.currentPage + args.midSize ) || number > args.numPages - args.endSize ) {\n\t\t\t\t\t\tdots = true;\n\n\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t<button\n\t\t\t\t\t\t\t\tkey={ `page-number-${ number }` }\n\t\t\t\t\t\t\t\tclassName=\"page-numbers\"\n\t\t\t\t\t\t\t\tonClick={ this.moveTo( number ) }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ number }\n\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t);\n\t\t\t\t\t} else if ( dots ) {\n\t\t\t\t\t\tdots = false;\n\n\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t<span key={ `page-number-${ number }` } className=\"page-numbers dots\">&hellip;</span>\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\n\t\t\t\t\treturn '';\n\t\t\t\t} ) }\n\n\t\t\t\t{ args.prevNext && ! this.isLast() && (\n\t\t\t\t\t<button\n\t\t\t\t\t\tclassName=\"page-numbers next\"\n\t\t\t\t\t\tdata-type=\"question-navx\"\n\t\t\t\t\t\tonClick={ this.nav( 'next' ) }\n\t\t\t\t\t>\n\t\t\t\t\t\t{ __( 'Next', 'learnpress' ) }\n\t\t\t\t\t</button>\n\t\t\t\t) }\n\t\t\t</div>\n\t\t);\n\t}\n\n\trender() {\n\t\tconst {\n\t\t\tstatus,\n\t\t\tquestionNav,\n\t\t\tisReviewing,\n\t\t\tshowReview,\n\t\t\tnumPages,\n\t\t\tquestion,\n\t\t\tquestionsPerPage,\n\t\t\tcanRetry,\n\t\t\tretakeNumber,\n\t\t\trequiredPassword,\n\t\t\tallowRetake,\n\t\t} = this.props;\n\n\t\tconst classNames = [ 'quiz-buttons' ];\n\n\t\tif ( status === 'started' || isReviewing ) {\n\t\t\tclassNames.push( 'align-center' );\n\t\t}\n\n\t\tif ( questionNav === 'questionNav' ) {\n\t\t\tclassNames.push( 'infinity' );\n\t\t}\n\n\t\tif ( this.isFirst() ) {\n\t\t\tclassNames.push( 'is-first' );\n\t\t}\n\n\t\tif ( this.isLast() ) {\n\t\t\tclassNames.push( 'is-last' );\n\t\t}\n\n\t\tconst popupSidebar = document.querySelector( '#popup-sidebar' );\n\t\tconst quizzApp = document.querySelector( '#learn-press-quiz-app' );\n\n\t\tlet styles = '';\n\n\t\tif ( status === 'started' || isReviewing ) {\n\t\t\tstyles = { marginLeft: popupSidebar && popupSidebar.offsetWidth / 2, width: quizzApp && quizzApp.offsetWidth };\n\t\t} else {\n\t\t\tstyles = null;\n\t\t}\n\t\tlet navPositionClass = ' fixed';\n\t\tif ( lpQuizSettings.navigationPosition == 'no' ) {\n\t\t\tnavPositionClass = ' nav-center';\n\t\t}\n\t\treturn (\n\t\t\t<>\n\t\t\t\t<div className={ classNames.join( ' ' ) }>\n\t\t\t\t\t<div\n\t\t\t\t\t\tclassName={ `button-left` + ( ( status === 'started' || isReviewing ) ? navPositionClass : '' ) }\n\t\t\t\t\t\tstyle={ styles }\n\t\t\t\t\t>\n\n\t\t\t\t\t\t{ ( ( status === 'completed' && canRetry ) || -1 !== [ '', 'viewed' ].indexOf( status ) ) && ! isReviewing && ! requiredPassword && (\n\t\t\t\t\t\t\t<button className=\"lp-button start\" onClick={ this.startQuiz }>\n\t\t\t\t\t\t\t\t{ ( status === 'completed' ) ? `${ __( 'Retake', 'learnpress' ) } ${ ! allowRetake ? ` ${ retakeNumber ? ` (${ retakeNumber })` : '' }` : '' } ` :\t' ' + __( 'Start', 'learnpress' ) }\n\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t) }\n\n\t\t\t\t\t\t{ ( 'started' === status || isReviewing ) && ( numPages > 1 ) && (\n\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t<div className=\"questions-pagination\">\n\t\t\t\t\t\t\t\t\t{ this.pageNumbers() }\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t) }\n\t\t\t\t\t</div>\n\n\t\t\t\t\t<div className=\"button-right\">\n\t\t\t\t\t\t{ ( 'started' === status ) && (\n\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t{ ( ( 'infinity' === questionNav || this.isLast() ) && ! isReviewing ) && (\n\t\t\t\t\t\t\t\t\t<button\n\t\t\t\t\t\t\t\t\t\tclassName=\"lp-button submit-quiz\"\n\t\t\t\t\t\t\t\t\t\tonClick={ this.submit }\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t{ __( 'Finish Quiz', 'learnpress' ) }\n\t\t\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t) }\n\n\t\t\t\t\t\t{ isReviewing && showReview && (\n\t\t\t\t\t\t\t<button\n\t\t\t\t\t\t\t\tclassName=\"lp-button back-quiz\"\n\t\t\t\t\t\t\t\tonClick={ this.setQuizMode( '' ) }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ __( 'Result', 'learnpress' ) }\n\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t) }\n\n\t\t\t\t\t\t{ 'completed' === status && showReview && ! isReviewing && (\n\t\t\t\t\t\t\t<button\n\t\t\t\t\t\t\t\tclassName=\"lp-button review-quiz\"\n\t\t\t\t\t\t\t\tonClick={ this.setQuizMode( 'reviewing' ) }\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{ __( 'Review', 'learnpress' ) }\n\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t) }\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\n\t\t\t\t{ this.props.message && this.props.success !== true && (\n\t\t\t\t\t<div className=\"learn-press-message error\">\n\t\t\t\t\t\t{ this.props.message }\n\t\t\t\t\t</div>\n\t\t\t\t) }\n\t\t\t</>\n\t\t);\n\t}\n}\n\n/**\n * Helper function to check a button should be show or not.\n *\n * Buttons [hint, check]\n */\nexport const MaybeShowButton = compose(\n\twithSelect( ( select ) => {\n\t\tconst {\n\t\t\tgetData,\n\t\t} = select( 'learnpress/quiz' );\n\n\t\treturn {\n\t\t\tstatus: getData( 'status' ),\n\t\t\tshowCheck: getData( 'instantCheck' ),\n\t\t\tcheckedQuestions: getData( 'checkedQuestions' ),\n\t\t\thintedQuestions: getData( 'hintedQuestions' ),\n\t\t\tquestionsPerPage: getData( 'questionsPerPage' ),\n\t\t};\n\t} )\n)( ( props ) => {\n\tconst {\n\t\tshowCheck,\n\t\tcheckedQuestions,\n\t\thintedQuestions,\n\t\tquestion,\n\t\tstatus,\n\t\ttype,\n\t\tButton,\n\t} = props;\n\n\tif ( status !== 'started' ) {\n\t\treturn false;\n\t}\n\n\tconst theButton = <Button question={ question } />;\n\n\tswitch ( type ) {\n\tcase 'hint':\n\n\t\tif ( ! hintedQuestions ) {\n\t\t\treturn theButton;\n\t\t}\n\n\t\tif ( ! question.hasHint ) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn hintedQuestions.indexOf( question.id ) === -1 && theButton;\n\n\tcase 'check':\n\n\t\tif ( ! showCheck ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif ( ! checkedQuestions ) {\n\t\t\treturn theButton;\n\t\t}\n\n\t\treturn checkedQuestions.indexOf( question.id ) === -1 && theButton;\n\t}\n} );\n\nexport default compose( [\n\twithSelect( ( select ) => {\n\t\tconst {\n\t\t\tgetData,\n\t\t\tgetCurrentQuestion,\n\t\t} = select( 'learnpress/quiz' );\n\n\t\tconst data = {\n\t\t\tid: getData( 'id' ),\n\t\t\tstatus: getData( 'status' ),\n\t\t\tquestionIds: getData( 'questionIds' ),\n\t\t\tquestionNav: getData( 'questionNav' ),\n\t\t\tisReviewing: getData( 'reviewQuestions' ) && getData( 'mode' ) === 'reviewing',\n\t\t\tshowReview: getData( 'reviewQuestions' ),\n\t\t\tshowCheck: getData( 'instantCheck' ),\n\t\t\tcheckedQuestions: getData( 'checkedQuestions' ),\n\t\t\thintedQuestions: getData( 'hintedQuestions' ),\n\t\t\tnumPages: getData( 'numPages' ),\n\t\t\tpages: getData( 'pages' ),\n\t\t\tcurrentPage: getData( 'currentPage' ),\n\t\t\tquestionsPerPage: getData( 'questionsPerPage' ),\n\t\t\tpageNumbers: getData( 'pageNumbers' ),\n\t\t\tkeyPressed: getData( 'keyPressed' ),\n\t\t\tcanRetry: getData( 'retakeCount' ) > 0 && getData( 'retaken' ) < getData( 'retakeCount' ),\n\t\t\tretakeNumber: getData( 'retakeCount' ) > 0 && getData( 'retaken' ) < getData( 'retakeCount' ) ? getData( 'retakeCount' ) - getData( 'retaken' ) : null,\n\t\t\tmessage: getData( 'messageResponse' ) || false,\n\t\t\tsuccess: getData( 'successResponse' ) !== undefined ? getData( 'successResponse' ) : true,\n\t\t\trequiredPassword: getData( 'requiredPassword' ),\n\t\t\tallowRetake: getData( 'allowRetake' ),\n\t\t};\n\n\t\tif ( data.questionsPerPage === 1 ) {\n\t\t\tdata.question = getCurrentQuestion( 'object' );\n\t\t}\n\n\t\tif ( lpQuizSettings.checkNorequizenroll === 1 ) {\n\t\t\tconst retakenCurrent = window.localStorage.getItem( 'quiz_off_retaken_' + lpQuizSettings.id );\n\n\t\t\tif ( getData( 'retakeCount' ) > retakenCurrent ) {\n\t\t\t\tdata.retakeNumber = getData( 'retakeCount' ) - retakenCurrent;\n\t\t\t\tdata.canRetry = true;\n\t\t\t} else {\n\t\t\t\tdata.canRetry = false;\n\t\t\t}\n\t\t}\n\n\t\tif ( data.allowRetake ) {\n\t\t\tdata.canRetry = true;\n\t\t}\n\n\t\treturn data;\n\t} ),\n\twithDispatch( ( dispatch, { id } ) => {\n\t\tconst {\n\t\t\tstartQuiz,\n\t\t\tsetCurrentQuestion,\n\t\t\tsubmitQuiz,\n\t\t\tsetQuizMode,\n\t\t\tshowHint,\n\t\t\tcheckAnswer,\n\t\t\tsetCurrentPage,\n\t\t} = dispatch( 'learnpress/quiz' );\n\n\t\treturn {\n\t\t\tstartQuiz,\n\t\t\tsetCurrentQuestion,\n\t\t\tsetQuizMode,\n\t\t\tsetCurrentPage,\n\t\t\tsubmitQuiz( id ) {\n\t\t\t\tsubmitQuiz( id );\n\t\t\t},\n\t\t\tshowHint( id ) {\n\t\t\t\tshowHint( id );\n\t\t\t},\n\t\t\tcheckAnswer( id ) {\n\t\t\t\tcheckAnswer( id );\n\t\t\t},\n\t\t};\n\t} ),\n] )( Buttons );\n","/**\n * Quizz Content.\n * Edit: Use React hook.\n *\n * @author nhamdv - ThimPress\n */\nimport { select } from '@wordpress/data';\n\nconst Content = () => {\n\tconst content = select( 'learnpress/quiz' ).getData( 'content' );\n\n\treturn (\n\t\t<div className=\"quiz-content\" dangerouslySetInnerHTML={ { __html: content } } />\n\t);\n};\n\nexport default Content;\n","const formatDuration = ( seconds ) => {\n\tlet d;\n\n\tconst dayInSeconds = 3600 * 24;\n\n\tif ( seconds > dayInSeconds ) {\n\t\td = ( seconds - ( seconds % dayInSeconds ) ) / dayInSeconds;\n\t\tseconds = seconds % dayInSeconds;\n\t} else if ( seconds == dayInSeconds ) {\n\t\treturn '24:00';\n\t}\n\n\tconst x = ( new Date( seconds * 1000 ).toUTCString() ).match( /\\d{2}:\\d{2}:\\d{2}/ )[ 0 ].split( ':' );\n\n\tif ( d ) {\n\t\tx[ 0 ] = parseInt( x[ 0 ] ) + ( d * 24 );\n\t}\n\n\tconst html = x.join( ':' );\n\n\treturn html;\n};\n\nexport default formatDuration;\n","export { default as Title } from './title';\nexport { default as Content } from './content';\nexport { default as Meta } from './meta';\nexport { default as Buttons } from './buttons';\nexport { default as Questions } from './questions';\nexport { default as Attempts } from './attempts';\nexport { default as Timer } from './timer';\nexport { default as Result } from './result';\nexport { default as Status } from './status';\n","/**\n * Quiz Meta.\n * Edit: Use React Hook.\n *\n * @author Nhamdv - ThimPress\n */\nimport { select } from '@wordpress/data';\nimport { __ } from '@wordpress/i18n';\n\nimport { default as formatDuration } from '../duration';\nconst { Hook } = LP;\n\nconst Meta = () => {\n\tconst getData = ( attr ) => {\n\t\treturn select( 'learnpress/quiz' ).getData( attr );\n\t};\n\n\tconst metaFields = Hook.applyFilters( 'quiz-meta-fields', {\n\t\tduration: {\n\t\t\ttitle: __( 'Duration:', 'learnpress' ),\n\t\t\tname: 'duration',\n\t\t\tcontent: formatDuration( getData( 'duration' ) ) || '--',\n\t\t},\n\t\tpassingGrade: {\n\t\t\ttitle: __( 'Passing grade:', 'learnpress' ),\n\t\t\tname: 'passing-grade',\n\t\t\tcontent: getData( 'passingGrade' ) || '--',\n\t\t},\n\t\tquestionsCount: {\n\t\t\ttitle: __( 'Questions:', 'learnpress' ),\n\t\t\tname: 'questions-count',\n\t\t\tcontent: getData( 'questionIds' ) ? getData( 'questionIds' ).length : 0,\n\t\t},\n\t} );\n\n\treturn (\n\t\tmetaFields && (\n\t\t\t<>\n\t\t\t\t<ul className=\"quiz-intro\">\n\t\t\t\t\t{ Object.values( metaFields ).map( ( field, i ) => {\n\t\t\t\t\t\tconst id = field.name || i;\n\n\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t<li key={ `quiz-intro-field-${ i }` } className={ `quiz-intro-item quiz-intro-item--${ id }` }>\n\t\t\t\t\t\t\t\t<div className=\"quiz-intro-item__title\" dangerouslySetInnerHTML={ { __html: field.title } } />\n\t\t\t\t\t\t\t\t<span className=\"quiz-intro-item__content\" dangerouslySetInnerHTML={ { __html: field.content } } />\n\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t);\n\t\t\t\t\t} ) }\n\t\t\t\t</ul>\n\t\t\t</>\n\t\t)\n\t);\n};\n\nexport default Meta;\n","import { default as ButtonHint } from '../buttons/button-hint';\nimport { default as ButtonCheck } from '../buttons/button-check';\nimport { MaybeShowButton } from '../buttons';\nimport { Fragment } from '@wordpress/element';\n\nconst Buttons = function Buttons( props ) {\n\tconst {\n\t\tquestion,\n\t} = props;\n\n\tconst buttons = {\n\t\t'instant-check': () => {\n\t\t\treturn (\n\t\t\t\t<MaybeShowButton\n\t\t\t\t\ttype=\"check\"\n\t\t\t\t\tButton={ ButtonCheck }\n\t\t\t\t\tquestion={ question }\n\t\t\t\t/>\n\t\t\t);\n\t\t},\n\t\thint: () => {\n\t\t\treturn (\n\t\t\t\t<MaybeShowButton\n\t\t\t\t\ttype=\"hint\"\n\t\t\t\t\tButton={ ButtonHint }\n\t\t\t\t\tquestion={ question }\n\t\t\t\t/>\n\t\t\t);\n\t\t},\n\t};\n\n\treturn (\n\t\t<>\n\t\t\t{ LP.config.questionFooterButtons().map( ( name ) => {\n\t\t\t\treturn (\n\t\t\t\t\t<Fragment key={ `button-${ name }` }>\n\t\t\t\t\t\t{ buttons[ name ] && buttons[ name ]() }\n\t\t\t\t\t</Fragment>\n\t\t\t\t);\n\t\t\t} ) }\n\t\t</>\n\t);\n};\n\nexport default Buttons;\n","import { Component } from '@wordpress/element';\nimport { withSelect, withDispatch } from '@wordpress/data';\nimport { compose } from '@wordpress/compose';\nimport { __ } from '@wordpress/i18n';\n\nimport Question from './question';\n\nclass Questions extends Component {\n\tconstructor( props ) {\n\t\tsuper( ...arguments );\n\n\t\tthis.needToTop = false;\n\t\tthis.state = {\n\t\t\tisReviewing: null,\n\t\t\tcurrentPage: 0,\n\t\t\tself: this,\n\t\t};\n\t}\n\n\tstatic getDerivedStateFromProps( props, state ) {\n\t\tconst checkProps = [ 'isReviewing', 'currentPage' ];\n\t\tconst changedProps = {};\n\n\t\tfor ( let i = 0; i < checkProps.length; i++ ) {\n\t\t\tif ( props[ checkProps[ i ] ] !== state[ checkProps[ i ] ] ) {\n\t\t\t\tchangedProps[ checkProps[ i ] ] = props[ checkProps[ i ] ];\n\t\t\t}\n\t\t}\n\n\t\tif ( Object.values( changedProps ).length ) {\n\t\t\tstate.self.needToTop = true;\n\t\t\treturn changedProps;\n\t\t}\n\n\t\treturn null;\n\t}\n\n\t// componentWillReceiveProps(nextProps){\n\t// const checkProps = ['isReviewing', 'currentPage'];\n\t//\n\t// for(let i = 0; i < checkProps.length; i++){\n\t// if(this.props[checkProps[i]] !== nextProps[checkProps[i]]){\n\t// this.needToTop = true;\n\t// return;\n\t// }\n\t// }\n\t//\n\t// }\n\n\t// componentWillUpdate() {\n\t// this.needToTop = this.state.needToTop;\n\t// this.setState({needToTop: false});\n\t// }\n\n\tcomponentDidUpdate() {\n\t\tif ( this.needToTop ) {\n\t\t\tjQuery( '#popup-content' )\n\t\t\t\t.animate( { scrollTop: 0 } )\n\t\t\t\t.find( '.content-item-scrollable:last' )\n\t\t\t\t.animate( { scrollTop: 0 } );\n\t\t\tthis.needToTop = false;\n\t\t}\n\t}\n\n\tstartQuiz = ( event ) => {\n\t\tevent.preventDefault();\n\n\t\tconst {\n\t\t\tstartQuiz,\n\t\t} = this.props;\n\n\t\tstartQuiz();\n\t};\n\n\tisInVisibleRange = ( id, index ) => {\n\t\tconst {\n\t\t\tcurrentPage,\n\t\t\tquestionsPerPage,\n\t\t} = this.props;\n\t\treturn currentPage === Math.ceil( index / questionsPerPage );\n\t};\n\n\tnav = ( event ) => {\n\t\tconst { sendKey } = this.props;\n\n\t\tswitch ( event.keyCode ) {\n\t\tcase 37:\n\t\t\treturn sendKey( 'left' );\n\t\tcase 38:\n\t\t\treturn;\n\t\tcase 39:\n\t\t\treturn sendKey( 'right' );\n\t\tcase 40:\n\t\t\treturn;\n\t\tdefault:\n\t\t\tif ( event.keyCode >= 49 && event.keyCode <= 57 ) {\n\t\t\t\tsendKey( event.keyCode - 48 );\n\t\t\t}\n\t\t}\n\t}\n\n\trender() {\n\t\tconst {\n\t\t\tstatus,\n\t\t\tcurrentQuestion,\n\t\t\tquestions,\n\t\t\tquestionsRendered,\n\t\t\tisReviewing,\n\t\t\tquestionsPerPage,\n\t\t} = this.props;\n\t\tlet isShow = true;\n\n\t\tif ( status === 'completed' && ! isReviewing ) {\n\t\t\tisShow = false;\n\t\t}\n\n\t\treturn (\n\t\t\t<>\n\t\t\t\t<div tabIndex={ 100 } onKeyUp={ this.nav }>\n\t\t\t\t\t<div className=\"quiz-questions\" style={ { display: isShow ? '' : 'none' } }>\n\t\t\t\t\t\t{ questions.map( ( question, index ) => {\n\t\t\t\t\t\t\tconst isCurrent = questionsPerPage ? false : currentQuestion === question.id;\n\t\t\t\t\t\t\tconst isRendered = questionsRendered && questionsRendered.indexOf( question.id ) !== -1;\n\t\t\t\t\t\t\tconst isVisible = this.isInVisibleRange( question.id, index + 1 );\n\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t( isRendered || ! isRendered ) || isVisible\n\t\t\t\t\t\t\t\t\t? <Question\n\t\t\t\t\t\t\t\t\t\t\tkey={ `loop-question-${ question.id }` }\n\t\t\t\t\t\t\t\t\t\t\tisCurrent={ isCurrent }\n\t\t\t\t\t\t\t\t\t\t\tisShow={ isVisible }\n\t\t\t\t\t\t\t\t\t\t\tisShowIndex={ questionsPerPage ? index + 1 : false }\n\t\t\t\t\t\t\t\t\t\t\tquestionsPerPage={ questionsPerPage }\n\t\t\t\t\t\t\t\t\t\t\tquestion={ question }\n\t\t\t\t\t\t\t\t\t/> : ''\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t} ) }\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</>\n\t\t);\n\t}\n}\n\nexport default compose(\n\twithSelect( ( select, a, b ) => {\n\t\tconst {\n\t\t\tgetData,\n\t\t\tgetQuestions,\n\t\t} = select( 'learnpress/quiz' );\n\n\t\treturn {\n\t\t\tstatus: getData( 'status' ),\n\t\t\tcurrentQuestion: getData( 'currentQuestion' ),\n\t\t\tquestions: getQuestions(),\n\t\t\tquestionsRendered: getData( 'questionsRendered' ),\n\t\t\tisReviewing: getData( 'mode' ) === 'reviewing',\n\t\t\tnumPages: getData( 'numPages' ),\n\t\t\tcurrentPage: getData( 'currentPage' ),\n\t\t\tquestionsPerPage: getData( 'questionsPerPage' ) || 1,\n\t\t};\n\t} ),\n\twithDispatch( ( dispatch ) => {\n\t\tconst {\n\t\t\tstartQuiz,\n\t\t\tsendKey,\n\t\t} = dispatch( 'learnpress/quiz' );\n\n\t\treturn {\n\t\t\tstartQuiz,\n\t\t\tsendKey,\n\t\t};\n\t} )\n)( Questions );\n","import { Component, Fragment } from '@wordpress/element';\nimport { withSelect, withDispatch } from '@wordpress/data';\nimport { compose } from '@wordpress/compose';\nimport { __, sprintf } from '@wordpress/i18n';\nimport Buttons from './buttons';\nimport { MaybeShowButton } from '../buttons';\nimport { default as ButtonCheck } from '../buttons/button-check';\nimport { default as ButtonHint } from '../buttons/button-hint';\n\nconst $ = window.jQuery;\nconst { uniqueId, isArray, isNumber, bind } = lodash;\n\nclass Question extends Component {\n\tconstructor() {\n\t\tsuper( ...arguments );\n\n\t\tthis.state = {\n\t\t\ttime: null,\n\t\t\tshowHint: false,\n\t\t};\n\n\t\tthis.$wrap = null;\n\t}\n\n\tcomponentDidMount( a ) {\n\t\tconst {\n\t\t\tquestion,\n\t\t\tisCurrent,\n\t\t\tmarkQuestionRendered,\n\t\t} = this.props;\n\n\t\tif ( isCurrent ) {\n\t\t\tmarkQuestionRendered( question.id );\n\t\t}\n\n\t\tif ( ! this.state.time ) {\n\t\t\tthis.setState( {\n\t\t\t\ttime: new Date(),\n\t\t\t} );\n\t\t}\n\n\t\tLP.Hook.doAction( 'lp-question-compatible-builder' );\n\n\t\tif ( typeof MathJax !== 'undefined' ) {\n\t\t\tMathJax.Hub.Queue( [ 'Typeset', MathJax.Hub ] );\n\t\t}\n\n\t\treturn a;\n\t}\n\n\tsetRef = ( el ) => {\n\t\tthis.$wrap = $( el );\n\t};\n\n\tparseOptions = ( options ) => {\n\t\tif ( options ) {\n\t\t\toptions = ! isArray( options ) ? JSON.parse( CryptoJS.AES.decrypt( options.data, options.key, { format: CryptoJSAesJson } ).toString( CryptoJS.enc.Utf8 ) ) : options;\n\t\t\toptions = ! isArray( options ) ? JSON.parse( options ) : options;\n\t\t}\n\n\t\treturn options || [];\n\t};\n\n\tgetWrapperClass = () => {\n\t\tconst { question, answered } = this.props;\n\n\t\tconst classes = [ 'question', 'question-' + question.type ];\n\t\tconst options = this.parseOptions( question.options );\n\n\t\tif ( options.length && options[ 0 ].isTrue !== undefined ) {\n\t\t\tclasses.push( 'question-answered' );\n\t\t}\n\n\t\treturn classes;\n\t};\n\n\tgetEditLink = () => {\n\t\tconst {\n\t\t\tquestion,\n\t\t\teditPermalink,\n\t\t} = this.props;\n\n\t\treturn editPermalink ? editPermalink.replace( /post=(.*[0-9])/, `post=${ question.id }` ) : '';\n\t};\n\n\teditPermalink = ( editPermalink ) => {\n\t\treturn sprintf( '<a href=\"%s\">%s</a>', editPermalink, __( 'Edit', 'learnpress' ) );\n\t};\n\n\trender() {\n\t\tconst {\n\t\t\tquestion,\n\t\t\tisShow,\n\t\t\tisShowIndex,\n\t\t\tisShowHint,\n\t\t\tstatus,\n\t\t} = this.props;\n\n\t\tconst QuestionTypes = LP.questionTypes.default;\n\t\tconst editPermalink = this.getEditLink();\n\n\t\tif ( editPermalink ) {\n\t\t\tjQuery( '#wp-admin-bar-edit-lp_question' ).find( '.ab-item' ).attr( 'href', editPermalink );\n\t\t}\n\n\t\tconst titleParts = {\n\t\t\tindex: () => {\n\t\t\t\treturn ( isShowIndex ? <span className=\"question-index\">{ isShowIndex }.</span> : '' );\n\t\t\t},\n\n\t\t\ttitle: () => {\n\t\t\t\treturn ( <span dangerouslySetInnerHTML={ { __html: question.title } } /> );\n\t\t\t},\n\n\t\t\thint: () => {\n\t\t\t\treturn <ButtonHint question={ question }></ButtonHint>;\n\t\t\t},\n\n\t\t\t'edit-permalink': () => {\n\t\t\t\treturn (\n\t\t\t\t\teditPermalink && (\n\t\t\t\t\t\t<span\n\t\t\t\t\t\t\tdangerouslySetInnerHTML={ { __html: this.editPermalink( editPermalink ) } }\n\t\t\t\t\t\t\tclassName=\"edit-link\">\n\t\t\t\t\t\t</span>\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t},\n\t\t};\n\n\t\tconst blocks = {\n\t\t\ttitle: () => {\n\t\t\t\treturn (\n\t\t\t\t\t<h4 className=\"question-title\">\n\t\t\t\t\t\t{ LP.config.questionTitleParts().map( ( name ) => {\n\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t<Fragment key={ `title-part-${ name }` }>\n\t\t\t\t\t\t\t\t\t{ titleParts[ name ] && titleParts[ name ]() }\n\t\t\t\t\t\t\t\t</Fragment>\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t} ) }\n\t\t\t\t\t</h4>\n\t\t\t\t);\n\t\t\t},\n\n\t\t\tcontent: () => {\n\t\t\t\treturn (\n\t\t\t\t\t<div className=\"question-content\" dangerouslySetInnerHTML={ { __html: question.content } } />\n\t\t\t\t);\n\t\t\t},\n\n\t\t\t'answer-options': () => {\n\t\t\t\treturn (\n\t\t\t\t\tthis.$wrap && <QuestionTypes { ...{ ...this.props, $wrap: this.$wrap } } />\n\t\t\t\t);\n\t\t\t},\n\n\t\t\texplanation: () => {\n\t\t\t\treturn (\n\t\t\t\t\tquestion.explanation && (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t<div className=\"question-explanation-content\">\n\t\t\t\t\t\t\t\t<strong className=\"explanation-title\">{ __( 'Explanation', 'learnpress' ) }:</strong>\n\t\t\t\t\t\t\t\t<div dangerouslySetInnerHTML={ { __html: question.explanation } }>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</>\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t},\n\n\t\t\thint: () => {\n\t\t\t\treturn (\n\t\t\t\t\tquestion.hint && ! question.explanation && question.showHint && (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t<div className=\"question-hint-content\">\n\t\t\t\t\t\t\t\t<strong className=\"hint-title\">{ __( 'Hint', 'learnpress' ) }:</strong>\n\t\t\t\t\t\t\t\t<div dangerouslySetInnerHTML={ { __html: question.hint } } />\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</>\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t},\n\n\t\t\tbuttons: () => {\n\t\t\t\treturn (\n\t\t\t\t\t( 'started' === status ) && <Buttons question={ question } />\n\t\t\t\t);\n\t\t\t},\n\t\t};\n\n\t\tconst configBlocks = LP.config.questionBlocks();\n\n\t\treturn (\n\t\t\t<>\n\t\t\t\t<div className={ this.getWrapperClass().join( ' ' ) }\n\t\t\t\t\tstyle={ { display: isShow ? '' : 'none' } }\n\t\t\t\t\tdata-id={ question.id }\n\t\t\t\t\tref={ this.setRef }>\n\n\t\t\t\t\t{ configBlocks.map( ( name ) => {\n\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t<Fragment key={ `block-${ name }` }>\n\t\t\t\t\t\t\t\t{ blocks[ name ] ? blocks[ name ]() : '' }\n\t\t\t\t\t\t\t</Fragment>\n\t\t\t\t\t\t);\n\t\t\t\t\t} ) }\n\t\t\t\t</div>\n\t\t\t</>\n\t\t);\n\t}\n}\n\nexport default compose( [\n\twithSelect( ( select, { question: { id } } ) => {\n\t\tconst {\n\t\t\tgetData,\n\t\t\tgetQuestionAnswered,\n\t\t\tgetQuestionMark,\n\t\t} = select( 'learnpress/quiz' );\n\n\t\treturn {\n\t\t\tstatus: getData( 'status' ),\n\t\t\tquestions: getData( 'question' ),\n\t\t\tanswered: getQuestionAnswered( id ),\n\t\t\tquestionsRendered: getData( 'questionsRendered' ),\n\t\t\teditPermalink: getData( 'editPermalink' ),\n\t\t\tnumPages: getData( 'numPages' ),\n\t\t\tmark: getQuestionMark( id ) || '',\n\t\t};\n\t} ),\n\twithDispatch( ( dispatch ) => {\n\t\tconst {\n\t\t\tupdateUserQuestionAnswers,\n\t\t\tmarkQuestionRendered,\n\t\t} = dispatch( 'learnpress/quiz' );\n\n\t\treturn {\n\t\t\tmarkQuestionRendered,\n\t\t\tupdateUserQuestionAnswers,\n\t\t};\n\t} ),\n] )( Question );\n","/**\n * Quizz Result.\n * Edit: Use React hook.\n *\n * @author Nhamdv - ThimPress\n */\nimport { useState, useEffect } from '@wordpress/element';\nimport { useSelect } from '@wordpress/data';\nimport { __ } from '@wordpress/i18n';\n\nimport { getResponse } from '../../../single-curriculum/components/items-progress';\n\nconst { debounce } = lodash;\nconst Result = () => {\n\tconst [ percentage, setPercentage ] = useState( 0 );\n\tconst [ done, setDone ] = useState( false );\n\tconst QuizID = useSelect( ( select ) => {\n\t\treturn select( 'learnpress/quiz' ).getData( 'id' );\n\t}, [] );\n\tconst results = useSelect( ( select ) => {\n\t\treturn select( 'learnpress/quiz' ).getData( 'results' );\n\t}, [] );\n\n\tconst passingGrade = useSelect( ( select ) => {\n\t\treturn select( 'learnpress/quiz' ).getData( 'passingGrade' );\n\t}, [] );\n\n\tconst submitting = useSelect( ( select ) => {\n\t\treturn select( 'learnpress/quiz' ).getData( 'submitting' );\n\t}, [] );\n\n\tuseEffect( () => {\n\t\tanimate();\n\n\t\tlet graduation = '';\n\t\tif ( results.graduation ) {\n\t\t\tgraduation = results.graduation;\n\t\t} else if ( results.result >= passingGradeValue ) {\n\t\t\tgraduation = 'passed';\n\t\t} else {\n\t\t\tgraduation = 'failed';\n\t\t}\n\n\t\tif ( graduation ) {\n\t\t\tconst ele = document.querySelector( `.course-curriculum .course-item.course-item-${ QuizID }` );\n\n\t\t\tif ( ele ) {\n\t\t\t\tele.classList.remove( 'failed', 'passed' );\n\t\t\t\tele.classList.add( 'has-status', 'status-completed', graduation );\n\t\t\t}\n\t\t}\n\n\t\tconst item = [ ...document.querySelectorAll( '#popup-header .items-progress' ) ][ 0 ];\n\t\tconst elCurriculumSections = document.querySelector( '.curriculum-sections' );\n\n\t\tif ( item && elCurriculumSections ) {\n\t\t\tconst totalItems = item.dataset.totalItems;\n\n\t\t\tconst itemCompleted = item.querySelector( '.items-completed' );\n\t\t\tconst elProgress = item.querySelector( '.learn-press-progress__active' );\n\n\t\t\tif ( itemCompleted ) {\n\t\t\t\t// const number = parseInt( itemCompleted.textContent );\n\n\t\t\t\tconst allItemCompleted = document.querySelectorAll( '#popup-sidebar .course-curriculum .course-item.status-completed' );\n\n\t\t\t\titemCompleted.textContent = parseInt( allItemCompleted.length );\n\n\t\t\t\t// Set progress\n\t\t\t\tconst perCent = parseInt( allItemCompleted.length ) * 100 / parseInt( totalItems );\n\t\t\t\tconst percentSet = 100 - perCent;\n\n\t\t\t\telProgress.style.left = '-' + percentSet + '%';\n\t\t\t}\n\t\t}\n\t}, [ results ] );\n\n\tuseEffect( () => {\n\t\tif ( submitting !== undefined ) {\n\t\t\tupdateItemsProgress();\n\t\t}\n\t}, [ submitting ] );\n\n\tconst updateItemsProgress = () => {\n\t\tconst elements = document.querySelectorAll( '.popup-header__inner' );\n\n\t\tif ( elements.length > 0 && elements[ 0 ].querySelectorAll( 'form.form-button-finish-course' ).length === 0 ) {\n\t\t\tgetResponse( elements[ 0 ] );\n\t\t}\n\t};\n\n\tconst animate = () => {\n\t\tsetPercentage( 0 );\n\t\tsetDone( false );\n\n\t\tjQuery.easing._customEasing = function( e, f, a, h, g ) {\n\t\t\treturn ( h * Math.sqrt( 1 - ( ( f = ( f / g ) - 1 ) * f ) ) ) + a;\n\t\t};\n\n\t\tdebounce( () => {\n\t\t\tconst $el = jQuery( '<span />' ).css( {\n\t\t\t\twidth: 1,\n\t\t\t\theight: 1,\n\t\t\t} ).appendTo( document.body );\n\n\t\t\t$el.css( 'left', 0 ).animate( { left: results.result }, {\n\t\t\t\tduration: 1500,\n\t\t\t\tstep: ( now, fx ) => {\n\t\t\t\t\tsetPercentage( now );\n\t\t\t\t},\n\t\t\t\tdone: () => {\n\t\t\t\t\tsetDone( true );\n\t\t\t\t\t$el.remove();\n\n\t\t\t\t\tjQuery( '#quizResultGrade' ).css( {\n\t\t\t\t\t\ttransform: 'scale(1.3)',\n\t\t\t\t\t\ttransition: 'all 0.25s',\n\t\t\t\t\t} );\n\n\t\t\t\t\tdebounce( () => {\n\t\t\t\t\t\tjQuery( '#quizResultGrade' ).css( {\n\t\t\t\t\t\t\ttransform: 'scale(1)',\n\t\t\t\t\t\t} );\n\t\t\t\t\t}, 500 )();\n\t\t\t\t},\n\t\t\t\teasing: '_customEasing',\n\t\t\t} );\n\t\t}, results.result > 0 ? 1000 : 10 )();\n\t};\n\n\t/**\n\t * Render HTML elements.\n\t *\n\t */\n\n\tlet percentResult = percentage;\n\n\tif ( ! Number.isInteger( percentage ) ) {\n\t\tpercentResult = parseFloat( percentage ).toFixed( 2 );\n\t}\n\n\tconst border = 10;\n\tconst width = 200;\n\tconst radius = width / 2;\n\tconst r = ( width - border ) / 2;\n\tconst circumference = r * 2 * Math.PI;\n\tconst offset = circumference - ( percentResult / 100 * circumference );\n\tconst styles = {\n\t\tstrokeDasharray: `${ circumference } ${ circumference }`,\n\t\tstrokeDashoffset: offset,\n\t};\n\tconst passingGradeValue = parseFloat( results.passingGrade || passingGrade );\n\n\tlet graduation = '';\n\tif ( results.graduation ) {\n\t\tgraduation = results.graduation;\n\t} else if ( percentResult >= passingGradeValue ) {\n\t\tgraduation = 'passed';\n\t} else {\n\t\tgraduation = 'failed';\n\t}\n\n\tlet message = '';\n\tif ( results.graduationText ) {\n\t\tmessage = results.graduationText;\n\t} else if ( graduation === 'passed' ) {\n\t\tmessage = __( 'Passed', 'learnpress' );\n\t} else {\n\t\tmessage = __( 'Failed', 'learnpress' );\n\t}\n\n\tconst classNames = [ 'quiz-result', graduation ];\n\n\treturn (\n\t\t<div className={ classNames.join( ' ' ) }>\n\t\t\t<h3 className=\"result-heading\">{ __( 'Your Result', 'learnpress' ) }</h3>\n\n\t\t\t<div id=\"quizResultGrade\" className=\"result-grade\">\n\t\t\t\t<svg className=\"circle-progress-bar\" width={ width } height={ width }>\n\t\t\t\t\t<circle className=\"circle-progress-bar__circle\" stroke=\"\" strokeWidth={ border } style={ styles }\n\t\t\t\t\t\tfill=\"transparent\" r={ r } cx={ radius } cy={ radius }></circle>\n\t\t\t\t</svg>\n\n\t\t\t\t<span className=\"result-achieved\">{ `${ percentResult }%` }</span>\n\t\t\t\t<span className=\"result-require\">\n\t\t\t\t\t{ passingGradeValue + '%' || '-' }\n\t\t\t\t</span>\n\t\t\t</div>\n\n\t\t\t{ done && <p className=\"result-message\">{ message }</p> }\n\n\t\t\t<ul className=\"result-statistic\">\n\t\t\t\t<li className=\"result-statistic-field result-time-spend\">\n\t\t\t\t\t<span>{ __( 'Time spent', 'learnpress' ) }</span>\n\t\t\t\t\t<p>{ results.timeSpend }</p>\n\t\t\t\t</li>\n\t\t\t\t<li className=\"result-statistic-field result-point\">\n\t\t\t\t\t<span>{ __( 'Points', 'learnpress' ) }</span>\n\t\t\t\t\t<p>{ results.userMark } / { results.mark }</p>\n\t\t\t\t</li>\n\t\t\t\t<li className=\"result-statistic-field result-questions\">\n\t\t\t\t\t<span>{ __( 'Questions', 'learnpress' ) }</span>\n\t\t\t\t\t<p>{ results.questionCount }</p>\n\t\t\t\t</li>\n\t\t\t\t<li className=\"result-statistic-field result-questions-correct\">\n\t\t\t\t\t<span>{ __( 'Correct', 'learnpress' ) }</span>\n\t\t\t\t\t<p>{ results.questionCorrect }</p>\n\t\t\t\t</li>\n\t\t\t\t<li className=\"result-statistic-field result-questions-wrong\">\n\t\t\t\t\t<span>{ __( 'Wrong', 'learnpress' ) }</span>\n\t\t\t\t\t<p>{ results.questionWrong }</p>\n\t\t\t\t</li>\n\t\t\t\t<li className=\"result-statistic-field result-questions-skipped\">\n\t\t\t\t\t<span>{ __( 'Skipped', 'learnpress' ) }</span>\n\t\t\t\t\t<p>{ results.questionEmpty }</p>\n\t\t\t\t</li>\n\t\t\t</ul>\n\t\t</div>\n\t);\n\n\tfunction timeDifference( earlierDate, laterDate ) {\n\t\tconst oDiff = new Object();\n\n\t\t// Calculate Differences\n\t\t// ------------------------------------------------------------------- //\n\t\tlet nTotalDiff = laterDate - earlierDate;\n\n\t\toDiff.days = Math.floor( nTotalDiff / 1000 / 60 / 60 / 24 );\n\t\tnTotalDiff -= oDiff.days * 1000 * 60 * 60 * 24;\n\n\t\toDiff.hours = Math.floor( nTotalDiff / 1000 / 60 / 60 );\n\t\tnTotalDiff -= oDiff.hours * 1000 * 60 * 60;\n\n\t\toDiff.minutes = Math.floor( nTotalDiff / 1000 / 60 );\n\t\tnTotalDiff -= oDiff.minutes * 1000 * 60;\n\n\t\toDiff.seconds = Math.floor( nTotalDiff / 1000 );\n\t\t// ------------------------------------------------------------------- //\n\n\t\t// Format Duration\n\t\t// ------------------------------------------------------------------- //\n\t\t// Format Hours\n\t\tlet hourtext = '00';\n\t\tif ( oDiff.days > 0 ) {\n\t\t\thourtext = String( oDiff.days );\n\t\t}\n\t\tif ( hourtext.length == 1 ) {\n\t\t\thourtext = '0' + hourtext;\n\t\t}\n\n\t\t// Format Minutes\n\t\tlet mintext = '00';\n\t\tif ( oDiff.minutes > 0 ) {\n\t\t\tmintext = String( oDiff.minutes );\n\t\t}\n\t\tif ( mintext.length == 1 ) {\n\t\t\tmintext = '0' + mintext;\n\t\t}\n\n\t\t// Format Seconds\n\t\tlet sectext = '00';\n\t\tif ( oDiff.seconds > 0 ) {\n\t\t\tsectext = String( oDiff.seconds );\n\t\t}\n\t\tif ( sectext.length == 1 ) {\n\t\t\tsectext = '0' + sectext;\n\t\t}\n\t\t// Set Duration\n\t\tconst sDuration = hourtext + ':' + mintext + ':' + sectext;\n\t\toDiff.duration = sDuration;\n\t\t// ------------------------------------------------------------------- //\n\n\t\treturn oDiff;\n\t}\n};\n\nexport default Result;\n","import { useEffect } from '@wordpress/element';\nimport { dispatch, select } from '@wordpress/data';\nimport Timer from '../timer';\nimport { __, sprintf } from '@wordpress/i18n';\n\nconst $ = jQuery;\nconst { debounce } = lodash;\n\nconst Status = () => {\n\tconst { submitQuiz } = dispatch( 'learnpress/quiz' );\n\n\tuseEffect( () => {\n\t\tconst $pc = $( '#popup-content' );\n\n\t\tif ( ! $pc.length ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst $sc = $pc.find( '.content-item-scrollable:eq(1)' );\n\t\tconst $ciw = $pc.find( '.content-item-wrap' );\n\t\tconst $qs = $pc.find( '.quiz-status' );\n\t\tconst pcTop = $qs.offset().top - 92;\n\n\t\tlet isFixed = false;\n\t\tlet marginLeft = '-' + $ciw.css( 'margin-left' );\n\n\t\t$( window ).on( 'resize.refresh-quiz-stauts-bar', debounce( function() {\n\t\t\tmarginLeft = '-' + $ciw.css( 'margin-left' );\n\n\t\t\t$qs.css( {\n\t\t\t\t'margin-left': marginLeft,\n\t\t\t\t'margin-right': marginLeft,\n\t\t\t} );\n\t\t}, 100 ) ).trigger( 'resize.refresh-quiz-stauts-bar' );\n\n\t\t/**\n\t\t * Check when status bar is stopped in the top\n\t\t * to add new class into html\n\t\t */\n\t\t$sc.on( 'scroll', () => {\n\t\t\tif ( $sc.scrollTop() >= pcTop ) {\n\t\t\t\tif ( isFixed ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tisFixed = true;\n\t\t\t} else {\n\t\t\t\tif ( ! isFixed ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tisFixed = false;\n\t\t\t}\n\n\t\t\tif ( isFixed ) {\n\t\t\t\t$pc.addClass( 'fixed-quiz-status' );\n\t\t\t} else {\n\t\t\t\t$pc.removeClass( 'fixed-quiz-status' );\n\t\t\t}\n\t\t} );\n\t}, [] );\n\n\t/**\n\t * Submit question to record results.\n\t */\n\tconst submit = () => {\n\t\tconst { confirm } = select( 'learnpress/modal' );\n\n\t\tif ( 'no' === confirm( __( 'Are you sure to submit the quiz?', 'learnpress' ), submit ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tsubmitQuiz();\n\t};\n\n\tconst getMark = () => {\n\t\tconst answered = select( 'learnpress/quiz' ).getData( 'answered' );\n\n\t\treturn Object.values( answered ).reduce( ( m, r ) => {\n\t\t\treturn m + r.mark;\n\t\t}, 0 );\n\t};\n\n\tconst { getData, getUserMark } = select( 'learnpress/quiz' );\n\n\tconst currentPage = getData( 'currentPage' );\n\tconst questionsPerPage = getData( 'questionsPerPage' );\n\tconst questionsCount = getData( 'questionIds' ).length;\n\tconst submitting = getData( 'submitting' );\n\tconst duration = getData( 'duration' );\n\tconst userMark = getUserMark();\n\n\tconst classNames = [ 'quiz-status' ];\n\n\tconst start = ( ( currentPage - 1 ) * questionsPerPage ) + 1;\n\tlet end = start + questionsPerPage - 1;\n\tlet indexHtml = '';\n\n\tend = Math.min( end, questionsCount );\n\n\tif ( submitting ) {\n\t\tclassNames.push( 'submitting' );\n\t}\n\n\tif ( end < questionsCount ) {\n\t\tif ( questionsPerPage > 1 ) {\n\t\t\tindexHtml = sprintf( __( 'Question <span>%d to %d of %d</span>', 'learnpress' ), start, end, questionsCount );\n\t\t} else {\n\t\t\tindexHtml = sprintf( __( 'Question <span>%d of %d</span>', 'learnpress' ), start, questionsCount );\n\t\t}\n\t} else {\n\t\tindexHtml = sprintf( __( 'Question <span>%d to %d</span>', 'learnpress' ), start, end );\n\t}\n\n\treturn (\n\t\t<div className={ classNames.join( ' ' ) }>\n\t\t\t<div>\n\t\t\t\t<div className=\"questions-index\" dangerouslySetInnerHTML={ { __html: indexHtml } } />\n\n\t\t\t\t<div className=\"current-point\">\n\t\t\t\t\t{ sprintf( __( 'Earned Point: %s', 'learnpress' ), userMark ) }\n\t\t\t\t</div>\n\n\t\t\t\t<div>\n\t\t\t\t\t<div className=\"submit-quiz\">\n\t\t\t\t\t\t<button\n\t\t\t\t\t\t\tclassName=\"lp-button\" id=\"button-submit-quiz\"\n\t\t\t\t\t\t\tonClick={ submit }\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ ! submitting ? __( 'Finish Quiz', 'learnpress' ) : __( 'Submitting...', 'learnpress' ) }\n\t\t\t\t\t\t</button>\n\t\t\t\t\t</div>\n\n\t\t\t\t\t{ <Timer /> }\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t);\n};\n\nexport default Status;\n","/**\n * Edit: React hook.\n *\n * @author Nhamdv - ThimPress\n */\nimport { useEffect, useState } from '@wordpress/element';\nimport { select, dispatch } from '@wordpress/data';\n\nconst Timer = () => {\n\tconst { getData } = select( 'learnpress/quiz' );\n\tconst { submitQuiz } = dispatch( 'learnpress/quiz' );\n\tconst totalTime = getData( 'totalTime' );\n\tconst durationTime = getData( 'duration' );\n\tconst [ seconds, setSeconds ] = useState( totalTime );\n\tlet [ timeSpend, setTimeSpend ] = useState( 0 );\n\n\tuseEffect( () => {\n\t\tconst myInterval = setInterval( () => {\n\t\t\tif ( durationTime > 0 ) {\n\t\t\t\tlet remainSeconds = seconds;\n\t\t\t\tremainSeconds -= 1;\n\n\t\t\t\tif ( remainSeconds > 0 ) {\n\t\t\t\t\tsetSeconds( remainSeconds );\n\t\t\t\t\ttimeSpend++;\n\t\t\t\t\tsetTimeSpend( durationTime - remainSeconds );\n\t\t\t\t} else {\n\t\t\t\t\tclearInterval( myInterval );\n\t\t\t\t\tsubmitQuiz();\n\t\t\t\t}\n\t\t\t} else { // Apply when set duration = 0\n\t\t\t\ttimeSpend++;\n\t\t\t\tsetTimeSpend( timeSpend );\n\t\t\t\tsetSeconds( timeSpend );\n\t\t\t}\n\t\t}, 1000 );\n\n\t\treturn () => clearInterval( myInterval );\n\t}, [ seconds, timeSpend ] );\n\n\tconst formatTime = ( separator = ':' ) => {\n\t\tconst t = [];\n\t\tlet m;\n\n\t\tif ( totalTime < 3600 ) {\n\t\t\tt.push( ( seconds - ( seconds % 60 ) ) / 60 );\n\t\t\tt.push( seconds % 60 );\n\t\t} else if ( totalTime ) {\n\t\t\tt.push( ( seconds - ( seconds % 3600 ) ) / 3600 );\n\t\t\tm = seconds % 3600;\n\t\t\tt.push( ( m - ( m % 60 ) ) / 60 );\n\t\t\tt.push( m % 60 );\n\t\t}\n\n\t\treturn t.map( ( a ) => {\n\t\t\treturn a < 10 ? `0${ a }` : a;\n\t\t} ).join( separator );\n\t};\n\n\treturn (\n\t\t<div className=\"countdown\">\n\t\t\t<i className=\"fas fa-stopwatch\"></i>\n\t\t\t<span>{ formatTime() }</span>\n\t\t\t<input type=\"hidden\" name=\"lp-quiz-time-spend\" value={ timeSpend } />\n\t\t</div>\n\t);\n};\n\nexport default Timer;\n","\nconst Title = () => {\n\treturn <h3>The title</h3>;\n};\n\nexport default Title;\n","import { Component } from '@wordpress/element';\nimport { compose } from '@wordpress/compose';\nimport { withDispatch, withSelect } from '@wordpress/data';\nimport { Content, Meta, Buttons, Questions, Attempts, Result, Status } from './components';\n\nimport store from './store';\n\nconst { chunk } = lodash;\nclass Quiz extends Component {\n\tconstructor( props ) {\n\t\tsuper( ...arguments );\n\n\t\tthis.state = {\n\t\t\tcurrentPage: 1,\n\t\t\tnumPages: 0,\n\t\t\tpages: [],\n\t\t};\n\t}\n\n\tcomponentDidMount() {\n\t\tconst { settings, setQuizData } = this.props;\n\n\t\tconst { question_ids, questions_per_page } = settings;\n\n\t\tconst chunks = chunk( question_ids, questions_per_page );\n\n\t\tsettings.currentPage = 1;\n\t\tsettings.numPages = chunks.length;\n\t\tsettings.pages = chunks;\n\n\t\tconst answered = settings.id ? localStorage.getItem( `LP_Quiz_${ settings.id }_Answered` ) : false;\n\n\t\tif ( answered ) {\n\t\t\tsettings.answered = JSON.parse( answered );\n\t\t}\n\n\t\tsetQuizData( settings );\n\t}\n\n\tcomponentDidUpdate( prevProps, prevState, snapshot ) {\n\t\tconst { status } = prevProps;\n\t\tconst elQuizContent = document.querySelector( '.quiz-content' );\n\n\t\tif ( status !== undefined && elQuizContent ) {\n\t\t\telQuizContent.style.display = 'none';\n\t\t}\n\t}\n\n\tstartQuiz = ( event ) => {\n\t\tthis.props.startQuiz();\n\t};\n\n\trender() {\n\t\tconst { status, isReviewing } = this.props;\n\n\t\tconst isA =\n\t\t\t-1 !== [ '', 'completed', 'viewed' ].indexOf( status ) || ! status;\n\t\tconst notStarted =\n\t\t\t-1 !== [ '', 'viewed', undefined ].indexOf( status ) || ! status;\n\n\t\t// Just render content if status !== undefined (meant all data loaded)\n\t\treturn (\n\t\t\tundefined !== status && (\n\t\t\t\t<>\n\t\t\t\t\t<div>\n\t\t\t\t\t\t{ ! isReviewing && 'completed' === status && (\n\t\t\t\t\t\t\t<Result />\n\t\t\t\t\t\t) }\n\n\t\t\t\t\t\t{ ! isReviewing && notStarted && <Meta /> }\n\n\t\t\t\t\t\t{ 'started' === status && <Status /> }\n\n\t\t\t\t\t\t{ ( -1 !== [ 'completed', 'started' ].indexOf( status ) ||\n\t\t\t\t\t\t\t\tisReviewing ) && <Questions /> }\n\n\t\t\t\t\t\t<Buttons />\n\n\t\t\t\t\t\t{ isA && ! isReviewing && <Attempts /> }\n\t\t\t\t\t</div>\n\t\t\t\t</>\n\t\t\t)\n\t\t);\n\t}\n}\n\nexport default compose( [\n\twithSelect( ( select ) => {\n\t\tconst { getQuestions, getData } = select( 'learnpress/quiz' );\n\n\t\treturn {\n\t\t\tquestions: getQuestions(),\n\t\t\tstatus: getData( 'status' ),\n\t\t\tstore: getData(),\n\t\t\tanswered: getData( 'answered' ),\n\t\t\tisReviewing: getData( 'mode' ) === 'reviewing',\n\t\t\tquestionIds: getData( 'questionIds' ),\n\t\t\tcheckCount: getData( 'instantCheck' ),\n\t\t\tquestionsPerPage: getData( 'questionsPerPage' ) || 1,\n\t\t};\n\t} ),\n\twithDispatch( ( dispatch ) => {\n\t\tconst { setQuizData, startQuiz } = dispatch( 'learnpress/quiz' );\n\n\t\treturn {\n\t\t\tsetQuizData,\n\t\t\tstartQuiz,\n\t\t};\n\t} ),\n] )( Quiz );\n","import { dispatch, select, apiFetch } from '@learnpress/data-controls';\nimport { select as wpSelect, dispatch as wpDispatch } from '@wordpress/data';\nimport { useSelect } from '@wordpress/data';\n\nfunction _dispatch() {\n\tconst args = [].slice.call( arguments, 2 );\n\tconst d = wpDispatch( arguments[ 0 ] );\n\tconst f = arguments[ 1 ];\n\td[ f ]( ...args );\n}\n\nconst { camelCaseDashObjectKeys, Hook } = LP;\n/**\n * Set user data for app.\n *\n * @param key\n * @param data\n * @return {{type: string, data: *}}\n */\nexport function setQuizData( key, data ) {\n\tif ( typeof key === 'string' ) {\n\t\tdata = { [ key ]: data };\n\t} else {\n\t\tdata = key;\n\t}\n\n\t// Save all data for no required enroll available\n\t/*if ( lpQuizSettings.checkNorequizenroll === 1 && window.localStorage.getItem( 'quiz_userdata_' + lpQuizSettings.id ) !== null ) {\n\t\tdata = JSON.parse( window.localStorage.getItem( 'quiz_userdata_' + lpQuizSettings.id ) );\n\t}*/\n\n\treturn {\n\t\ttype: 'SET_QUIZ_DATA',\n\t\tdata: camelCaseDashObjectKeys( data ),\n\t};\n}\n\n/**\n * Set question will display.\n *\n * @param questionId\n * @return {{type: string, data: *}}\n */\nexport function setCurrentQuestion( questionId ) {\n\treturn {\n\t\ttype: 'SET_CURRENT_QUESTION',\n\t\tquestionId,\n\t};\n}\n\nexport function setCurrentPage( currentPage ) {\n\treturn {\n\t\ttype: 'SET_CURRENT_PAGE',\n\t\tcurrentPage,\n\t};\n}\n\nexport function __requestBeforeStartQuiz( quizId, courseId, userId ) {\n\treturn {\n\t\ttype: 'BEFORE_START_QUIZ',\n\t};\n}\n\nexport function __requestStartQuizSuccess( results, quizId, courseId, userId ) {\n\tHook.doAction( 'quiz-started', results, quizId, courseId, userId );\n\treturn {\n\t\ttype: 'START_QUIZ_SUCCESS',\n\t\tquizId,\n\t\tcourseId,\n\t\tuserId,\n\t\tresults,\n\t};\n}\n\n/**\n * Request to api for starting a quiz.\n */\nconst startQuiz = function*() {\n\tconst { itemId, courseId } = wpSelect( 'learnpress/quiz' ).getDefaultRestArgs();\n\n\tconst doStart = Hook.applyFilters( 'before-start-quiz', true, itemId, courseId );\n\n\tif ( true !== doStart ) {\n\t\treturn;\n\t}\n\n\tlet response = yield apiFetch( {\n\t\tpath: 'lp/v1/users/start-quiz',\n\t\tmethod: 'POST',\n\t\tdata: {\n\t\t\titem_id: itemId,\n\t\t\tcourse_id: courseId,\n\t\t},\n\t} );\n\n\tconst btnStart = document.querySelector( '.lp-button.start' );\n\n\tif ( response.status !== 'error' ) {\n\t\tresponse = Hook.applyFilters( 'request-start-quiz-response', response, itemId, courseId );\n\n\t\t// No require enroll\n\t\tif ( lpQuizSettings.checkNorequizenroll === 1 ) {\n\t\t\tconst keyQuizOff = 'quiz_off_' + lpQuizSettings.id;\n\t\t\twindow.localStorage.removeItem( keyQuizOff );\n\t\t\tconst quizDataOff = { endTime: ( Date.now() + response.results.duration * 1000 ), status: response.results.status };\n\n\t\t\twindow.localStorage.setItem( keyQuizOff, JSON.stringify( quizDataOff ) );\n\n\t\t\t// Set Retake quiz\n\t\t\tconst keyQuizOffRetaken = 'quiz_off_retaken_' + lpQuizSettings.id;\n\t\t\tlet quizOffRetaken = window.localStorage.getItem( keyQuizOffRetaken );\n\n\t\t\tif ( null === quizOffRetaken ) {\n\t\t\t\tquizOffRetaken = 0;\n\t\t\t} else {\n\t\t\t\tquizOffRetaken++;\n\t\t\t}\n\n\t\t\twindow.localStorage.setItem( keyQuizOffRetaken, quizOffRetaken );\n\t\t\t// End\n\t\t}\n\n\t\tyield _dispatch( 'learnpress/quiz', '__requestStartQuizSuccess', camelCaseDashObjectKeys( response ), itemId, courseId );\n\t} else {\n\t\tconst elButtons = document.querySelector( '.quiz-buttons' );\n\t\tconst message = `<div class=\"learn-press-message error\">${ response.message }</div>`;\n\t\telButtons.insertAdjacentHTML( 'afterend', message );\n\t\tbtnStart.classList.remove( 'loading' );\n\t}\n};\n\nexport { startQuiz };\n\nexport function __requestSubmitQuiz() {\n\treturn {\n\t\ttype: 'SUBMIT_QUIZ',\n\t};\n}\n\nexport function __requestSubmitQuizSuccess( results, quizId, courseId ) {\n\tHook.doAction( 'quiz-submitted', results, quizId, courseId );\n\n\treturn {\n\t\ttype: 'SUBMIT_QUIZ_SUCCESS',\n\t\tresults,\n\t};\n}\n\nexport function* submitQuiz() {\n\tconst {\n\t\tgetDefaultRestArgs,\n\t\tgetQuestionsSelectedAnswers,\n\t} = wpSelect( 'learnpress/quiz' );\n\n\tconst {\n\t\titemId,\n\t\tcourseId,\n\t} = getDefaultRestArgs();\n\n\tconst doSubmit = Hook.applyFilters( 'before-submit-quiz', true );\n\n\tif ( true !== doSubmit ) {\n\t\treturn;\n\t}\n\n\tconst answered = getQuestionsSelectedAnswers();\n\n\tif ( lpQuizSettings.checkNorequizenroll === 1 ) {\n\t\tconst keyAnswer = `LP_Quiz_${ itemId }_Answered`;\n\t\tconst answerDataStr = localStorage.getItem( keyAnswer );\n\n\t\tif ( null !== answerDataStr ) {\n\t\t\tconst data = JSON.parse( answerDataStr );\n\n\t\t\tfor ( const [ k, v ] of Object.entries( data ) ) {\n\t\t\t\tanswered[ k ] = v.answered;\n\t\t\t}\n\t\t}\n\t}\n\n\t// Get time spend did quiz - tungnx\n\tlet timeSpend = 0;\n\tconst elTimeSpend = document.querySelector( 'input[name=lp-quiz-time-spend]' );\n\n\tif ( elTimeSpend ) {\n\t\ttimeSpend = elTimeSpend.value;\n\t}\n\t// End\n\n\tlet response = yield apiFetch( {\n\t\tpath: 'lp/v1/users/submit-quiz',\n\t\tmethod: 'POST',\n\t\tdata: {\n\t\t\titem_id: itemId,\n\t\t\tcourse_id: courseId,\n\t\t\tanswered,\n\t\t\ttime_spend: timeSpend,\n\t\t},\n\t} );\n\n\tresponse = Hook.applyFilters( 'request-submit-quiz-response', response, itemId, courseId );\n\n\tif ( response.status === 'success' ) {\n\t\tif ( lpQuizSettings.checkNorequizenroll === 1 ) {\n\t\t\tconst keyQuizOff = 'quiz_off_' + lpQuizSettings.id;\n\t\t\tconst quizDataOffStr = window.localStorage.getItem( keyQuizOff );\n\t\t\tif ( null !== quizDataOffStr ) {\n\t\t\t\tconst quizDataOff = JSON.parse( quizDataOffStr );\n\n\t\t\t\tquizDataOff.status = response.results.status;\n\t\t\t\tquizDataOff.results = response.results.results;\n\n\t\t\t\twindow.localStorage.setItem( keyQuizOff, JSON.stringify( quizDataOff ) );\n\t\t\t\twindow.localStorage.removeItem( 'LP_Quiz_' + lpQuizSettings.id + '_Answered' );\n\t\t\t}\n\t\t}\n\n\t\t//console.log( response.results );\n\n\t\tyield _dispatch( 'learnpress/quiz', '__requestSubmitQuizSuccess', camelCaseDashObjectKeys( response.results ), itemId, courseId );\n\t}\n\n\t/*if ( lpQuizSettings.checkNorequizenroll == '1' ) {\n\t\tlocalStorage.setItem( 'quiz_userdata_' + lpQuizSettings.id, JSON.stringify( wpSelect( 'learnpress/quiz' ).getData() ) );\n\t}*/\n}\n\nexport function updateUserQuestionAnswers( questionId, answers, quizId, courseId = 0, userId = 0 ) {\n\treturn {\n\t\ttype: 'UPDATE_USER_QUESTION_ANSWERS',\n\t\tquestionId,\n\t\tanswers,\n\t};\n}\n\nexport function __requestShowHintSuccess( id, showHint ) {\n\treturn {\n\t\ttype: 'SET_QUESTION_HINT',\n\t\tquestionId: id,\n\t\tshowHint,\n\t};\n}\n\nexport function* showHint( id, showHint ) {\n\tyield _dispatch( 'learnpress/quiz', '__requestShowHintSuccess', id, showHint );\n}\n\nexport function __requestCheckAnswerSuccess( id, result ) {\n\treturn {\n\t\ttype: 'CHECK_ANSWER',\n\t\tquestionId: id,\n\t\t...result,\n\t};\n}\n\nexport function* checkAnswer( id ) {\n\tconst {\n\t\tgetDefaultRestArgs,\n\t\tgetQuestionAnswered,\n\t} = wpSelect( 'learnpress/quiz' );\n\n\tconst {\n\t\titemId,\n\t\tcourseId,\n\t} = getDefaultRestArgs();\n\n\tconst result = yield apiFetch( {\n\t\tpath: 'lp/v1/users/check-answer',\n\t\tmethod: 'POST',\n\t\tdata: {\n\t\t\titem_id: itemId,\n\t\t\tcourse_id: courseId,\n\t\t\tquestion_id: id,\n\t\t\tanswered: getQuestionAnswered( id ) || '',\n\t\t},\n\t} );\n\n\tif ( result.status === 'success' ) {\n\t\t// No require enroll\n\t\tif ( lpQuizSettings.checkNorequizenroll === 1 ) {\n\t\t\tconst keyQuizOff = 'quiz_off_' + lpQuizSettings.id;\n\t\t\tconst quizDataOffStr = window.localStorage.getItem( keyQuizOff );\n\n\t\t\tif ( null !== quizDataOffStr ) {\n\t\t\t\tconst quizDataOff = JSON.parse( quizDataOffStr );\n\n\t\t\t\tconst questionOptions = result.options;\n\n\t\t\t\tif ( undefined === quizDataOff.checked_questions ) {\n\t\t\t\t\tquizDataOff.checked_questions = [];\n\t\t\t\t\tquizDataOff.checked_questions.push( id );\n\t\t\t\t} else if ( -1 === quizDataOff.checked_questions.indexOf( id ) ) {\n\t\t\t\t\tquizDataOff.checked_questions.push( id );\n\t\t\t\t}\n\n\t\t\t\tif ( undefined === quizDataOff.question_options ) {\n\t\t\t\t\tquizDataOff.question_options = {};\n\t\t\t\t\tquizDataOff.question_options[ id ] = questionOptions;\n\t\t\t\t} else if ( undefined === quizDataOff.question_options[ id ] ) {\n\t\t\t\t\tquizDataOff.question_options[ id ] = questionOptions;\n\t\t\t\t}\n\n\t\t\t\twindow.localStorage.setItem( keyQuizOff, JSON.stringify( quizDataOff ) );\n\n\t\t\t\t//console.log( quizDataOff );\n\t\t\t}\n\t\t}\n\n\t\tyield _dispatch( 'learnpress/quiz', '__requestCheckAnswerSuccess', id, camelCaseDashObjectKeys( result ) );\n\t}\n}\n\nexport function markQuestionRendered( questionId ) {\n\treturn {\n\t\ttype: 'MARK_QUESTION_RENDERED',\n\t\tquestionId,\n\t};\n}\n\nexport function setQuizMode( mode ) {\n\treturn {\n\t\ttype: 'SET_QUIZ_MODE',\n\t\tmode,\n\t};\n}\n\nexport function sendKey( keyPressed ) {\n\tsetTimeout( () => {\n\t\t_dispatch( 'learnpress/quiz', 'sendKey', '' );\n\t}, 300 );\n\n\treturn {\n\t\ttype: 'SEND_KEY',\n\t\tkeyPressed,\n\t};\n}\n","import { registerStore } from '@wordpress/data';\n\nimport reducer from './reducer';\nimport * as actions from './actions';\nimport * as selectors from './selectors';\nimport applyMiddlewares from './middlewares';\n\nconst { controls: dataControls } = LP.dataControls;\n\nconst store = registerStore( 'learnpress/quiz', {\n\treducer,\n\tselectors,\n\tactions,\n\tcontrols: {\n\t\t...dataControls,\n\t},\n} );\n\napplyMiddlewares( store );\n\nexport default store;\n","/**\n * External dependencies\n */\nimport refx from 'refx';\n\n/**\n * Internal dependencies\n */\n//import effects from './effects';\n\nconst effects = {\n\tENROLL_COURSE_X: ( action, store ) => {\n\t\tenrollCourse:( action, store ) => {\n\t\t\tconst { dispatch } = store;\n\n\t\t\t//dispatch()\n\t\t};\n\t},\n};\n\n/**\n * Applies the custom middlewares used specifically in the editor module.\n *\n * @param {Object} store Store Object.\n *\n * @return {Object} Update Store Object.\n */\nfunction applyMiddlewares( store ) {\n\tlet enhancedDispatch = () => {\n\t\tthrow new Error(\n\t\t\t'Dispatching while constructing your middleware is not allowed. ' +\n 'Other middleware would not be applied to this dispatch.'\n\t\t);\n\t};\n\n\tconst middlewareAPI = {\n\t\tgetState: store.getState,\n\t\tdispatch: ( ...args ) => enhancedDispatch( ...args ),\n\t};\n\n\tenhancedDispatch = refx( effects )( middlewareAPI )( store.dispatch );\n\n\tstore.dispatch = enhancedDispatch;\n\treturn store;\n}\n\nexport default applyMiddlewares;\n","import { combineReducers } from '@wordpress/data';\n\nconst { omit, flow, isArray, chunk } = lodash;\nconst { camelCaseDashObjectKeys } = LP;\nconst { get: storageGet, set: storageSet } = LP.localStorage;\nconst STORE_DATA = {};\n\nexport const setItemStatus = ( item, status ) => {\n\tconst userSettings = {\n\t\t...item.userSettings,\n\t\tstatus,\n\t};\n\n\treturn {\n\t\t...item,\n\t\tuserSettings,\n\t};\n};\n\nconst updateUserQuestionAnswer = ( state, action ) => {\n\tconst { answered, id } = state;\n\tconst newAnswer = {\n\t\t...( answered[ action.questionId ] || {} ),\n\t\tanswered: action.answers,\n\t\ttemp: true,\n\t};\n\n\tif ( id ) {\n\t\tlocalStorage.setItem( `LP_Quiz_${ id }_Answered`, JSON.stringify( {\n\t\t\t...state.answered,\n\t\t\t[ action.questionId ]: newAnswer,\n\t\t} ) );\n\t}\n\n\treturn {\n\t\t...state,\n\t\tanswered: {\n\t\t\t...state.answered,\n\t\t\t[ action.questionId ]: newAnswer,\n\t\t},\n\t};\n};\n\nconst markQuestionRendered = ( state, action ) => {\n\tconst {\n\t\tquestionsRendered,\n\t} = state;\n\n\tif ( isArray( questionsRendered ) ) {\n\t\tquestionsRendered.push( action.questionId );\n\t\treturn {\n\t\t\t...state,\n\t\t\tquestionsRendered: [ ...questionsRendered ],\n\t\t};\n\t}\n\treturn {\n\t\t...state,\n\t\tquestionsRendered: [ action.questionId ],\n\t};\n};\n\nconst resetCurrentPage = ( state, args ) => {\n\tif ( args.currentPage ) {\n\t\tstorageSet( `Q${ state.id }.currentPage`, args.currentPage );\n\t}\n\n\treturn {\n\t\t...state,\n\t\t...args,\n\t};\n};\n\nconst setQuestionHint = ( state, action ) => {\n\tconst questions = state.questions.map( ( question ) => {\n\t\treturn question.id == action.questionId ? { ...question, showHint: action.showHint } : question;\n\t} );\n\n\treturn {\n\t\t...state,\n\t\tquestions: [ ...questions ],\n\t};\n};\n\nconst checkAnswer = ( state, action ) => {\n\tconst questions = state.questions.map( ( question ) => {\n\t\tif ( question.id !== action.questionId ) {\n\t\t\treturn question;\n\t\t}\n\n\t\tconst newArgs = {\n\t\t\texplanation: action.explanation,\n\t\t};\n\n\t\tif ( action.options ) {\n\t\t\tnewArgs.options = action.options;\n\t\t}\n\n\t\treturn { ...question, ...newArgs };\n\t} );\n\n\tconst answered = {\n\t\t...state.answered,\n\t\t[ action.questionId ]: action.result,\n\t};\n\n\tlet newAnswered = localStorage.getItem( `LP_Quiz_${ state.id }_Answered` );\n\n\tif ( newAnswered ) {\n\t\tnewAnswered = {\n\t\t\t...JSON.parse( newAnswered ),\n\t\t\t...answered,\n\t\t}\n\n\t\tlocalStorage.setItem( `LP_Quiz_${ state.id }_Answered`, JSON.stringify( newAnswered ) );\n\t}\n\n\treturn {\n\t\t...state,\n\t\tquestions: [ ...questions ],\n\t\tanswered: answered,\n\t\tcheckedQuestions: [ ...state.checkedQuestions, action.questionId ],\n\t};\n};\n\nconst submitQuiz = ( state, action ) => {\n\tlocalStorage.removeItem( `LP_Quiz_${ state.id }_Answered` );\n\n\tconst questions = state.questions.map( ( question ) => {\n\t\tconst newArgs = {};\n\t\tif ( state.reviewQuestions ) {\n\t\t\tif ( action.results.questions[ question.id ]?.explanation ) {\n\t\t\t\tnewArgs.explanation = action.results.questions[ question.id ].explanation;\n\t\t\t}\n\n\t\t\tif ( action.results.questions[ question.id ]?.options ) {\n\t\t\t\tnewArgs.options = action.results.questions[ question.id ].options;\n\t\t\t}\n\t\t}\n\n\t\treturn { ...question, ...newArgs };\n\t} );\n\n\treturn resetCurrentPage( state, {\n\t\tsubmitting: false,\n\t\tcurrentPage: 1,\n\t\t...action.results,\n\t\tquestions: [ ...questions ],\n\t} );\n};\n\nconst startQuizz = ( state, action ) => {\n\tconst successResponse = ( action.results.success ) !== undefined ? action.results.success : false;\n\tconst messageResponse = action.results.message || false;\n\n\treturn resetCurrentPage( state, {\n\t\tcheckedQuestions: [],\n\t\thintedQuestions: [],\n\t\tmode: '',\n\t\tcurrentPage: 1,\n\t\t...action.results.results,\n\t\tsuccessResponse,\n\t\tmessageResponse,\n\t} );\n};\n\nexport const userQuiz = ( state = STORE_DATA, action ) => {\n\tswitch ( action.type ) {\n\tcase 'SET_QUIZ_DATA':\n\t\tif ( 1 > action.data.questionsPerPage ) {\n\t\t\taction.data.questionsPerPage = 1;\n\t\t}\n\n\t\tconst chunks = chunk( state.questionIds || action.data.questionIds, action.data.questionsPerPage );\n\n\t\taction.data.numPages = chunks.length;\n\t\taction.data.pages = chunks;\n\n\t\treturn {\n\t\t\t...state,\n\t\t\t...action.data,\n\t\t\tcurrentPage: storageGet( `Q${ action.data.id }.currentPage` ) || action.data.currentPage,\n\t\t};\n\tcase 'SUBMIT_QUIZ':\n\t\treturn {\n\t\t\t...state,\n\t\t\tsubmitting: true,\n\t\t};\n\tcase 'START_QUIZ':\n\tcase 'START_QUIZ_SUCCESS':\n\t\treturn startQuizz( state, action );\n\tcase 'SET_CURRENT_QUESTION':\n\t\tstorageSet( `Q${ state.id }.currentQuestion`, action.questionId );\n\t\treturn {\n\t\t\t...state,\n\t\t\tcurrentQuestion: action.questionId,\n\t\t};\n\tcase 'SET_CURRENT_PAGE':\n\t\tstorageSet( `Q${ state.id }.currentPage`, action.currentPage );\n\n\t\treturn {\n\t\t\t...state,\n\t\t\tcurrentPage: action.currentPage,\n\t\t};\n\tcase 'SUBMIT_QUIZ_SUCCESS':\n\t\treturn submitQuiz( state, action );\n\tcase 'UPDATE_USER_QUESTION_ANSWERS':\n\t\treturn state.status === 'started' ? updateUserQuestionAnswer( state, action ) : state;\n\tcase 'MARK_QUESTION_RENDERED':\n\t\treturn markQuestionRendered( state, action );\n\tcase 'SET_QUIZ_MODE':\n\t\tif ( action.mode == 'reviewing' ) {\n\t\t\treturn resetCurrentPage( state, {\n\t\t\t\tmode: action.mode,\n\t\t\t} );\n\t\t}\n\t\treturn {\n\t\t\t...state,\n\t\t\tmode: action.mode,\n\t\t};\n\tcase 'SET_QUESTION_HINT':\n\t\treturn setQuestionHint( state, action );\n\tcase 'CHECK_ANSWER':\n\t\treturn checkAnswer( state, action );\n\tcase 'SEND_KEY':\n\t\treturn {\n\t\t\t...state,\n\t\t\tkeyPressed: action.keyPressed,\n\t\t};\n\t}\n\treturn state;\n};\n\nexport const blocks = flow(\n\tcombineReducers,\n\t( reducer ) => ( state, action ) => {\n\t\treturn reducer( state, action );\n\t},\n\t( reducer ) => ( state, action ) => {\n\t\treturn reducer( state, action );\n\t},\n\t( reducer ) => ( state, action ) => {\n\t\treturn reducer( state, action );\n\t}\n)( {\n\ta( state = { a: 1 }, action ) {\n\t\treturn state;\n\t},\n\tb( state = { b: 2 }, action ) {\n\t\treturn state;\n\t},\n} );\n\nexport default combineReducers( { blocks, userQuiz } );\n","import { select } from '@wordpress/data';\nconst { get, isArray } = lodash;\n\nconst getQuestionOptions = function getQuestionOptions( state, id ) {\n\tconsole.time( 'parseOptions' );\n\n\tconst question = getQuestion( state, id );\n\tlet options = question.options;\n\n\toptions = ! isArray( options ) ? JSON.parse( CryptoJS.AES.decrypt( options.data, options.key, { format: CryptoJSAesJson } ).toString( CryptoJS.enc.Utf8 ) ) : options;\n\toptions = ! isArray( options ) ? JSON.parse( options ) : options;\n\n\tconsole.timeEnd( 'parseOptions' );\n\treturn options;\n};\n\nexport { getQuestionOptions };\n\n/**\n * Get current status of an item in course.\n *\n * @param state\n * @param itemId\n */\nexport function getItemStatus( state, itemId ) {\n\tconst item = select( 'course-learner/user' ).getItemById( itemId );\n\treturn item ? get( item, 'userSettings.status' ) : '';\n}\n\nexport function getProp( state, prop, defaultValue ) {\n\treturn state[ prop ] || defaultValue;\n}\n\n/**\n * Get quiz attempted.\n *\n * @param state\n * @param itemId\n * @return {Array}\n */\nexport function getQuizAttempts( state, itemId ) {\n\tconst item = select( 'course-learner/user' ).getItemById( itemId );\n\treturn item ? get( item, 'userSettings.attempts' ) : [];\n}\n\n/**\n * Get answers for a quiz user has did.\n *\n * @param state\n * @param itemId\n * @return {{}}\n */\nexport function getQuizAnswered( state, itemId ) {\n\tconst item = select( 'course-learner/user' ).getItemById( itemId );\n\treturn item ? get( item, 'userSettings.answered', {} ) : {};\n}\n\n/**\n * Get all questions in quiz.\n *\n * @param state\n * @return {*}\n */\nexport function getQuestions( state ) {\n\tconst { userQuiz } = state;\n\tconst questions = get( userQuiz, 'questions' );\n\treturn questions ? Object.values( questions ) : [];\n}\n\n/**\n * Get property of store data.\n *\n * @param state - Store data\n * @param prop - Optional. NULL will return all data.\n * @return {*}\n */\nexport function getData( state, prop ) {\n\tconst { userQuiz } = state;\n\n\tif ( prop ) {\n\t\treturn get( userQuiz, prop );\n\t}\n\n\treturn userQuiz;\n}\n\nexport function getDefaultRestArgs( state ) {\n\tconst { userQuiz } = state;\n\n\treturn {\n\t\titemId: userQuiz.id,\n\t\tcourseId: userQuiz.courseId,\n\t};\n}\n\nexport function getQuestionAnswered( state, id ) {\n\tconst { userQuiz } = state;\n\n\treturn get( userQuiz, `answered.${ id }.answered` ) || undefined;\n}\n\nexport function getQuestionMark( state, id ) {\n\tconst { userQuiz } = state;\n\n\treturn get( userQuiz, `answered.${ id }.mark` ) || undefined;\n}\n\n/**\n * Get current question is doing.\n *\n * @param {Object} state\n * @param {string} ret\n * @return {*}\n */\nexport function getCurrentQuestion( state, ret = '' ) {\n\tconst questionsPerPage = get( state, 'userQuiz.questionsPerPage' ) || 1;\n\n\tif ( questionsPerPage > 1 ) {\n\t\treturn false;\n\t}\n\n\tconst currentPage = get( state, 'userQuiz.currentPage' ) || 1;\n\treturn ret === 'object' ? get( state, `userQuiz.questions[${ currentPage - 1 }]` ) : get( state, `userQuiz.questionIds[${ currentPage - 1 }]` );\n}\n\n/**\n * Return a question contains fully data with title, content, ...\n *\n * @param state\n * @param theId\n */\nconst getQuestion = function getQuestion( state, theId ) {\n\tconst { userQuiz } = state;\n\tconst s = select( 'learnpress/quiz' );\n\tconst questions = s.getQuestions();\n\n\treturn questions.find( ( q ) => {\n\t\treturn q.id == theId;\n\t} );\n};\n\nexport { getQuestion };\n\n/**\n * If user has used 'Instant check' for a question.\n *\n * @param {Object} state - Global state for app.\n * @param {number} id\n * @return {boolean}\n */\nexport function isCheckedAnswer( state, id ) {\n\tconst checkedQuestions = get( state, 'userQuiz.checkedQuestions' ) || [];\n\n\treturn checkedQuestions.indexOf( id ) !== -1;\n}\n\nexport function isCorrect( state, id ) {\n\n}\n\n/**\n * Get questions user has selected answers.\n *\n * @param {Object} state. Global app state\n * @param state\n * @param {number} questionId\n * @return {{}}\n */\nconst getQuestionsSelectedAnswers = function( state, questionId ) {\n\tconst data = get( state, 'userQuiz.answered' );\n\tconst returnData = {};\n\n\tfor ( const loopId in data ) {\n\t\tif ( ! data.hasOwnProperty( loopId ) ) {\n\t\t\tcontinue;\n\t\t}\n\n\t\t// Answer filled by user\n\t\tif ( ( data[ loopId ].temp || data[ loopId ].blanks ) ) {\n\t\t\t// If specific a question then return it only.\n\t\t\tif ( questionId && loopId === questionId ) {\n\t\t\t\treturn data[ loopId ].answered;\n\t\t\t}\n\n\t\t\treturnData[ loopId ] = data[ loopId ].answered;\n\t\t}\n\t}\n\n\treturn returnData;\n};\n\nexport { getQuestionsSelectedAnswers };\n\n/**\n * Get mark user earned.\n * Just for questions user has used 'Instant check' button.\n *\n * @param state\n * @return {number}\n */\nexport function getUserMark( state ) {\n\tconst userQuiz = state.userQuiz || {};\n\tconst {\n\t\tanswered,\n\t\tnegativeMarking,\n\t\tquestions,\n\t\tcheckedQuestions,\n\t} = userQuiz;\n\n\tlet totalMark = 0;\n\n\tfor ( let id in answered ) {\n\t\tif ( ! answered.hasOwnProperty( id ) ) {\n\t\t\tcontinue;\n\t\t}\n\n\t\tid = parseInt( id );\n\t\tconst data = answered[ id ];\n\t\tconst questionMark = data.questionMark ? data.questionMark : ( function() {\n\t\t\tconst question = questions.find( ( q ) => {\n\t\t\t\treturn q.id === id;\n\t\t\t} );\n\n\t\t\treturn question ? question.point : 0;\n\t\t}() );\n\n\t\tconst isChecked = checkedQuestions.indexOf( id ) !== -1;\n\n\t\tif ( data.temp ) {\n\t\t\tcontinue;\n\t\t}\n\n\t\tif ( negativeMarking ) {\n\t\t\tif ( data.answered ) {\n\t\t\t\ttotalMark = data.correct ? totalMark + data.mark : totalMark - questionMark;\n\t\t\t}\n\t\t} else if ( data.answered && data.correct ) {\n\t\t\ttotalMark += data.mark;\n\t\t}\n\t}\n\n\treturn totalMark > 0 ? totalMark : 0;\n}\n","import lpModalOverlay from '../utils/lp-modal-overlay';\n\nconst lpModalOverlayCompleteItem = {\n\telBtnFinishCourse: null,\n\telBtnCompleteItem: null,\n\tinit() {\n\t\tif ( ! lpModalOverlay.init() ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( undefined === lpGlobalSettings || 'yes' !== lpGlobalSettings.option_enable_popup_confirm_finish ) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.elBtnFinishCourse = document.querySelectorAll( '.lp-btn-finish-course' );\n\t\tthis.elBtnCompleteItem = document.querySelector( '.lp-btn-complete-item' );\n\n\t\tif ( this.elBtnCompleteItem ) {\n\t\t\tthis.elBtnCompleteItem.addEventListener( 'click', ( e ) => {\n\t\t\t\te.preventDefault();\n\n\t\t\t\tconst form = e.target.closest( 'form' );\n\n\t\t\t\tlpModalOverlay.elLPOverlay.show();\n\t\t\t\tlpModalOverlay.setTitleModal( form.dataset.title );\n\t\t\t\tlpModalOverlay.setContentModal( '<div class=\"pd-2em\">' + form.dataset.confirm + '</div>' );\n\t\t\t\tlpModalOverlay.callBackYes = () => {\n\t\t\t\t\tform.submit();\n\t\t\t\t};\n\t\t\t} );\n\t\t}\n\n\t\tif ( this.elBtnFinishCourse ) {\n\t\t\tthis.elBtnFinishCourse.forEach( ( element ) => element.addEventListener( 'click', ( e ) => {\n\t\t\t\te.preventDefault();\n\n\t\t\t\tconst form = e.target.closest( 'form' );\n\n\t\t\t\tlpModalOverlay.elLPOverlay.show();\n\t\t\t\tlpModalOverlay.setTitleModal( form.dataset.title );\n\t\t\t\tlpModalOverlay.setContentModal( '<div class=\"pd-2em\">' + form.dataset.confirm + '</div>' );\n\t\t\t\tlpModalOverlay.callBackYes = () => {\n\t\t\t\t\tform.submit();\n\t\t\t\t};\n\t\t\t} ) );\n\t\t}\n\t},\n};\n\nexport default lpModalOverlayCompleteItem;\n","/**\n * Compatible with Page Builder.\n *\n * @author nhamdv\n */\n\nLP.Hook.addAction( 'lp-compatible-builder', () => {\n\tLP.Hook.removeAction( 'lp-compatible-builder' );\n\n\tif ( typeof elementorFrontend !== 'undefined' ) {\n\t\t[ ...document.querySelectorAll( '#popup-content' ) ][ 0 ].addEventListener( 'scroll', () => {\n\t\t\tWaypoint.refreshAll();\n\t\t\twindow.dispatchEvent( new Event( 'resize' ) );\n\t\t} );\n\t}\n\n\tif ( typeof vc_js !== 'undefined' && typeof VcWaypoint !== 'undefined' ) {\n\t\t[ ...document.querySelectorAll( '#popup-content' ) ][ 0 ].addEventListener( 'scroll', () => {\n\t\t\tVcWaypoint.refreshAll();\n\t\t} );\n\t}\n} );\n\nLP.Hook.addAction( 'lp-quiz-compatible-builder', () => {\n\tLP.Hook.removeAction( 'lp-quiz-compatible-builder' );\n\n\tLP.Hook.doAction( 'lp-compatible-builder' );\n\n\tif ( typeof elementorFrontend !== 'undefined' ) {\n\t\treturn window.elementorFrontend.init();\n\t}\n\n\tif ( typeof vc_js !== 'undefined' ) {\n\t\tif ( typeof vc_round_charts !== 'undefined' ) {\n\t\t\tvc_round_charts();\n\t\t}\n\n\t\tif ( typeof vc_pieChart !== 'undefined' ) {\n\t\t\tvc_pieChart();\n\t\t}\n\t\tif ( typeof vc_line_charts !== 'undefined' ) {\n\t\t\tvc_line_charts();\n\t\t}\n\n\t\treturn window.vc_js();\n\t}\n} );\n\nLP.Hook.addAction( 'lp-question-compatible-builder', () => {\n\tLP.Hook.removeAction( 'lp-question-compatible-builder' );\n\tLP.Hook.removeAction( 'lp-quiz-compatible-builder' );\n\tLP.Hook.doAction( 'lp-compatible-builder' );\n\n\tif ( typeof elementorFrontend !== 'undefined' ) {\n\t\treturn window.elementorFrontend.init();\n\t}\n\n\tif ( typeof vc_js !== 'undefined' ) {\n\t\tif ( typeof vc_round_charts !== 'undefined' ) {\n\t\t\tvc_round_charts();\n\t\t}\n\n\t\tif ( typeof vc_pieChart !== 'undefined' ) {\n\t\t\tvc_pieChart();\n\t\t}\n\t\tif ( typeof vc_line_charts !== 'undefined' ) {\n\t\t\tvc_line_charts();\n\t\t}\n\n\t\treturn window.vc_js();\n\t}\n} );\n","// Rest API load content course progress - Nhamdv.\nimport { addQueryArgs } from '@wordpress/url';\nimport lpModalOverlayCompleteItem from '../../show-lp-overlay-complete-item';\n\nexport const itemsProgress = () => {\n\tconst elements = document.querySelectorAll( '.popup-header__inner' );\n\n\tif ( ! elements.length ) {\n\t\treturn;\n\t}\n\n\tif ( document.querySelector( '#learn-press-quiz-app div.quiz-result' ) !== null ) {\n\t\treturn;\n\t}\n\n\tif ( elements[ 0 ].querySelectorAll( 'form.form-button-finish-course' ).length !== 0 ) {\n\t\treturn;\n\t}\n\n\tif ( 'IntersectionObserver' in window ) {\n\t\tconst eleObserver = new IntersectionObserver( ( entries, observer ) => {\n\t\t\tentries.forEach( ( entry ) => {\n\t\t\t\tif ( entry.isIntersecting ) {\n\t\t\t\t\tconst ele = entry.target;\n\n\t\t\t\t\tgetResponse( ele );\n\n\t\t\t\t\teleObserver.unobserve( ele );\n\t\t\t\t}\n\t\t\t} );\n\t\t} );\n\n\t\t[ ...elements ].map( ( ele ) => eleObserver.observe( ele ) );\n\t}\n};\n\nexport const getResponse = async ( ele ) => {\n\tconst response = await wp.apiFetch( {\n\t\tpath: addQueryArgs( 'lp/v1/lazy-load/items-progress', {\n\t\t\tcourseId: lpGlobalSettings.post_id || '',\n\t\t\tuserId: lpGlobalSettings.user_id || '',\n\t\t} ),\n\t\tmethod: 'GET',\n\t} );\n\n\tconst { data } = response;\n\n\tele.innerHTML += data;\n\n\tlpModalOverlayCompleteItem.init();\n};\n","const $ = jQuery;\nlet elLPOverlay = null;\nconst lpModalOverlay = {\n\telLPOverlay: null,\n\telMainContent: null,\n\telTitle: null,\n\telBtnYes: null,\n\telBtnNo: null,\n\telFooter: null,\n\telCalledModal: null,\n\tcallBackYes: null,\n\tinstance: null,\n\tinit() {\n\t\tif ( this.instance ) {\n\t\t\treturn true;\n\t\t}\n\n\t\tthis.elLPOverlay = $( '.lp-overlay' );\n\n\t\tif ( ! this.elLPOverlay.length ) {\n\t\t\treturn false;\n\t\t}\n\t\telLPOverlay = this.elLPOverlay;\n\n\t\tthis.elMainContent = elLPOverlay.find( '.main-content' );\n\t\tthis.elTitle = elLPOverlay.find( '.modal-title' );\n\t\tthis.elBtnYes = elLPOverlay.find( '.btn-yes' );\n\t\tthis.elBtnNo = elLPOverlay.find( '.btn-no' );\n\t\tthis.elFooter = elLPOverlay.find( '.lp-modal-footer' );\n\n\t\t$( document ).on( 'click', '.close, .btn-no', function() {\n\t\t\telLPOverlay.hide();\n\t\t} );\n\n\t\t$( document ).on( 'click', '.btn-yes', function( e ) {\n\t\t\te.preventDefault();\n\t\t\te.stopPropagation();\n\n\t\t\tif ( 'function' === typeof lpModalOverlay.callBackYes ) {\n\t\t\t\tlpModalOverlay.callBackYes();\n\t\t\t}\n\t\t} );\n\n\t\tthis.instance = this;\n\n\t\treturn true;\n\t},\n\tsetElCalledModal( elCalledModal ) {\n\t\tthis.elCalledModal = elCalledModal;\n\t},\n\tsetContentModal( content, event ) {\n\t\tthis.elMainContent.html( content );\n\t\tif ( 'function' === typeof event ) {\n\t\t\tevent();\n\t\t}\n\t},\n\tsetTitleModal( content ) {\n\t\tthis.elTitle.html( content );\n\t},\n};\n\nexport default lpModalOverlay;\n","/*!\n Copyright (c) 2018 Jed Watson.\n Licensed under the MIT License (MIT), see\n http://jedwatson.github.io/classnames\n*/\n/* global define */\n\n(function () {\n\t'use strict';\n\n\tvar hasOwn = {}.hasOwnProperty;\n\n\tfunction classNames() {\n\t\tvar classes = [];\n\n\t\tfor (var i = 0; i < arguments.length; i++) {\n\t\t\tvar arg = arguments[i];\n\t\t\tif (!arg) continue;\n\n\t\t\tvar argType = typeof arg;\n\n\t\t\tif (argType === 'string' || argType === 'number') {\n\t\t\t\tclasses.push(arg);\n\t\t\t} else if (Array.isArray(arg)) {\n\t\t\t\tif (arg.length) {\n\t\t\t\t\tvar inner = classNames.apply(null, arg);\n\t\t\t\t\tif (inner) {\n\t\t\t\t\t\tclasses.push(inner);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else if (argType === 'object') {\n\t\t\t\tif (arg.toString === Object.prototype.toString) {\n\t\t\t\t\tfor (var key in arg) {\n\t\t\t\t\t\tif (hasOwn.call(arg, key) && arg[key]) {\n\t\t\t\t\t\t\tclasses.push(key);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tclasses.push(arg.toString());\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn classes.join(' ');\n\t}\n\n\tif (typeof module !== 'undefined' && module.exports) {\n\t\tclassNames.default = classNames;\n\t\tmodule.exports = classNames;\n\t} else if (typeof define === 'function' && typeof define.amd === 'object' && define.amd) {\n\t\t// register as 'classnames', consistent with npm package name\n\t\tdefine('classnames', [], function () {\n\t\t\treturn classNames;\n\t\t});\n\t} else {\n\t\twindow.classNames = classNames;\n\t}\n}());\n","'use strict';\n\nfunction flattenIntoMap( map, effects ) {\n\tvar i;\n\tif ( Array.isArray( effects ) ) {\n\t\tfor ( i = 0; i < effects.length; i++ ) {\n\t\t\tflattenIntoMap( map, effects[ i ] );\n\t\t}\n\t} else {\n\t\tfor ( i in effects ) {\n\t\t\tmap[ i ] = ( map[ i ] || [] ).concat( effects[ i ] );\n\t\t}\n\t}\n}\n\nfunction refx( effects ) {\n\tvar map = {},\n\t\tmiddleware;\n\n\tflattenIntoMap( map, effects );\n\n\tmiddleware = function( store ) {\n\t\treturn function( next ) {\n\t\t\treturn function( action ) {\n\t\t\t\tvar handlers = map[ action.type ],\n\t\t\t\t\tresult = next( action ),\n\t\t\t\t\ti, handlerAction;\n\n\t\t\t\tif ( handlers ) {\n\t\t\t\t\tfor ( i = 0; i < handlers.length; i++ ) {\n\t\t\t\t\t\thandlerAction = handlers[ i ]( action, store );\n\t\t\t\t\t\tif ( handlerAction ) {\n\t\t\t\t\t\t\tstore.dispatch( handlerAction );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn result;\n\t\t\t};\n\t\t};\n\t};\n\n\tmiddleware.effects = map;\n\n\treturn middleware;\n}\n\nmodule.exports = refx;\n","module.exports = window[\"LP\"][\"dataControls\"];","module.exports = window[\"wp\"][\"compose\"];","module.exports = window[\"wp\"][\"data\"];","module.exports = window[\"wp\"][\"element\"];","module.exports = window[\"wp\"][\"i18n\"];","module.exports = window[\"wp\"][\"url\"];","export default function _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}","export default function _extends() {\n _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n\n return _extends.apply(this, arguments);\n}","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = function(module) {\n\tvar getter = module && module.__esModule ?\n\t\tfunction() { return module['default']; } :\n\t\tfunction() { return module; };\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = function(exports, definition) {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }","// define __esModule on exports\n__webpack_require__.r = function(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};","import Quiz from './quiz/index';\nimport './single-curriculum/components/compatible';\n\nconst { modal: { default: Modal } } = LP;\n\nexport default Quiz;\n\nexport const init = ( elem, settings ) => {\n\t// For no require enroll\n\tif ( lpQuizSettings.checkNorequizenroll === 1 ) {\n\t\tconst keyQuizOff = 'quiz_off_' + lpQuizSettings.id;\n\t\tconst quizDataOffStr = window.localStorage.getItem( keyQuizOff );\n\n\t\tif ( null !== quizDataOffStr ) {\n\t\t\tconst quizDataOff = JSON.parse( quizDataOffStr );\n\t\t\tsettings.status = quizDataOff.status;\n\n\t\t\tif ( 'started' === quizDataOff.status ) {\n\t\t\t\tconst now = Date.now();\n\n\t\t\t\tsettings.total_time = Math.floor(( quizDataOff.endTime - now ) / 1000);\n\t\t\t} else if ( 'completed' === quizDataOff.status ) {\n\t\t\t\tsettings.results = quizDataOff.results;\n\t\t\t\tsettings.answered = quizDataOff.results.answered;\n\t\t\t\tsettings.questions = quizDataOff.results.questions;\n\t\t\t}\n\n\t\t\tif ( undefined !== quizDataOff.checked_questions ) {\n\t\t\t\tsettings.checked_questions = quizDataOff.checked_questions;\n\t\t\t}\n\n\t\t\tif ( undefined !== quizDataOff.question_options ) {\n\t\t\t\t//settings.checked_questions = quizDataOff.checked_questions;\n\n\t\t\t\tfor ( const i in settings.questions ) {\n\t\t\t\t\tlet question = settings.questions[ i ];\n\n\t\t\t\t\tif ( undefined !== quizDataOff.question_options[ question.id ] ) {\n\t\t\t\t\t\tquestion.options = quizDataOff.question_options[ question.id ];\n\t\t\t\t\t}\n\n\t\t\t\t\tsettings.questions[ i ] = question;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t//console.log(settings);\n\n\twp.element.render(\n\t\t<Modal><Quiz settings={ settings } /></Modal>,\n\t\t[ ...document.querySelectorAll( elem ) ][ 0 ]\n\t);\n\n\tLP.Hook.doAction( 'lp-quiz-compatible-builder' );\n};\n"],"names":["select","__","default","formatDuration","Attempts","attempts","getData","hasAttempts","length","map","row","key","questionCorrect","questionCount","timeSpend","userMark","mark","passingGrade","parseFloat","result","toFixed","graduationText","timeDifference","earlierDate","laterDate","oDiff","Object","nTotalDiff","days","Math","floor","hours","minutes","seconds","hourtext","String","mintext","sectext","sDuration","duration","classNames","Component","withDispatch","withSelect","compose","ButtonCheck","constructor","arguments","checkAnswer","question","answered","props","id","setState","loading","state","render","disable","__html","getQuestionAnswered","dispatch","ButtonHint","showHint","hint","show","Buttons","event","preventDefault","btn","document","querySelector","setAttribute","classList","add","startQuiz","status","confirm","isOpen","removeAttribute","to","questionNav","currentPage","numPages","setCurrentPage","pageNum","submitQuiz","submit","mode","setQuizMode","isReviewing","pageNumbers","args","midSize","endSize","prevNext","numbers","Array","keys","dots","isFirst","nav","number","moveTo","isLast","showReview","questionsPerPage","canRetry","retakeNumber","requiredPassword","allowRetake","push","popupSidebar","quizzApp","styles","marginLeft","offsetWidth","width","navPositionClass","lpQuizSettings","navigationPosition","join","indexOf","message","success","MaybeShowButton","showCheck","checkedQuestions","hintedQuestions","type","Button","theButton","hasHint","getCurrentQuestion","data","questionIds","pages","keyPressed","undefined","checkNorequizenroll","retakenCurrent","window","localStorage","getItem","setCurrentQuestion","Content","content","d","dayInSeconds","x","Date","toUTCString","match","split","parseInt","html","Title","Meta","Questions","Timer","Result","Status","Hook","LP","attr","metaFields","applyFilters","title","name","questionsCount","values","field","i","Fragment","buttons","config","questionFooterButtons","Question","index","ceil","sendKey","keyCode","needToTop","self","getDerivedStateFromProps","checkProps","changedProps","componentDidUpdate","jQuery","animate","scrollTop","find","currentQuestion","questions","questionsRendered","isShow","display","isCurrent","isRendered","isVisible","isInVisibleRange","a","b","getQuestions","sprintf","$","uniqueId","isArray","isNumber","bind","lodash","el","$wrap","options","JSON","parse","CryptoJS","AES","decrypt","format","CryptoJSAesJson","toString","enc","Utf8","classes","parseOptions","isTrue","editPermalink","replace","time","componentDidMount","markQuestionRendered","doAction","MathJax","Hub","Queue","isShowIndex","isShowHint","QuestionTypes","questionTypes","getEditLink","titleParts","blocks","questionTitleParts","explanation","configBlocks","questionBlocks","getWrapperClass","setRef","getQuestionMark","updateUserQuestionAnswers","useState","useEffect","useSelect","getResponse","debounce","percentage","setPercentage","done","setDone","QuizID","results","submitting","graduation","passingGradeValue","ele","remove","item","querySelectorAll","elCurriculumSections","totalItems","dataset","itemCompleted","elProgress","allItemCompleted","textContent","perCent","percentSet","style","left","updateItemsProgress","elements","easing","_customEasing","e","f","h","g","sqrt","$el","css","height","appendTo","body","step","now","fx","transform","transition","percentResult","Number","isInteger","border","radius","r","circumference","PI","offset","strokeDasharray","strokeDashoffset","questionWrong","questionEmpty","$pc","$sc","$ciw","$qs","pcTop","top","isFixed","on","trigger","addClass","removeClass","getMark","reduce","m","getUserMark","start","end","indexHtml","min","totalTime","durationTime","setSeconds","setTimeSpend","myInterval","setInterval","remainSeconds","clearInterval","formatTime","separator","t","store","chunk","Quiz","settings","setQuizData","question_ids","questions_per_page","chunks","prevProps","prevState","snapshot","elQuizContent","isA","notStarted","checkCount","apiFetch","wpSelect","wpDispatch","_dispatch","slice","call","camelCaseDashObjectKeys","questionId","__requestBeforeStartQuiz","quizId","courseId","userId","__requestStartQuizSuccess","itemId","getDefaultRestArgs","doStart","response","path","method","item_id","course_id","btnStart","keyQuizOff","removeItem","quizDataOff","endTime","setItem","stringify","keyQuizOffRetaken","quizOffRetaken","elButtons","insertAdjacentHTML","__requestSubmitQuiz","__requestSubmitQuizSuccess","getQuestionsSelectedAnswers","doSubmit","keyAnswer","answerDataStr","k","v","entries","elTimeSpend","value","time_spend","quizDataOffStr","answers","__requestShowHintSuccess","__requestCheckAnswerSuccess","question_id","questionOptions","checked_questions","question_options","setTimeout","registerStore","reducer","actions","selectors","applyMiddlewares","controls","dataControls","refx","effects","ENROLL_COURSE_X","action","enrollCourse","enhancedDispatch","Error","middlewareAPI","getState","combineReducers","omit","flow","get","storageGet","set","storageSet","STORE_DATA","setItemStatus","userSettings","updateUserQuestionAnswer","newAnswer","temp","resetCurrentPage","setQuestionHint","newArgs","newAnswered","reviewQuestions","startQuizz","successResponse","messageResponse","userQuiz","getQuestionOptions","console","getQuestion","timeEnd","getItemStatus","getItemById","getProp","prop","defaultValue","getQuizAttempts","getQuizAnswered","ret","theId","s","q","isCheckedAnswer","isCorrect","returnData","loopId","hasOwnProperty","blanks","negativeMarking","totalMark","questionMark","point","isChecked","correct","lpModalOverlay","lpModalOverlayCompleteItem","elBtnFinishCourse","elBtnCompleteItem","init","lpGlobalSettings","option_enable_popup_confirm_finish","addEventListener","form","target","closest","elLPOverlay","setTitleModal","setContentModal","callBackYes","forEach","element","addAction","removeAction","elementorFrontend","Waypoint","refreshAll","dispatchEvent","Event","vc_js","VcWaypoint","vc_round_charts","vc_pieChart","vc_line_charts","addQueryArgs","itemsProgress","eleObserver","IntersectionObserver","observer","entry","isIntersecting","unobserve","observe","wp","post_id","user_id","innerHTML","elMainContent","elTitle","elBtnYes","elBtnNo","elFooter","elCalledModal","instance","hide","stopPropagation","setElCalledModal","modal","Modal","elem","total_time"],"sourceRoot":""}
assets/js/dist/frontend/quiz.min.asset.php ADDED
@@ -0,0 +1 @@
 
1
+ <?php return array('dependencies' => array('wp-compose', 'wp-data', 'wp-element', 'wp-i18n', 'wp-url'), 'version' => '88fd6ac09454db2f9834');
assets/js/dist/frontend/quiz.min.deps.json ADDED
@@ -0,0 +1 @@
 
1
+ ["LP-data-controls"]
assets/js/dist/frontend/single-course.asset.php ADDED
@@ -0,0 +1 @@
 
1
+ <?php return array('dependencies' => array('wp-api-fetch', 'wp-element', 'wp-url'), 'version' => '2cd85b7e2552ad8ae299');
assets/js/dist/frontend/single-course.deps.json ADDED
@@ -0,0 +1 @@
 
1
+ ["LP-quiz"]
assets/js/dist/frontend/single-course.js CHANGED
@@ -365,6 +365,8 @@ __webpack_require__.r(__webpack_exports__);
365
 
366
  function courseCurriculumSkeleton() {
367
  let courseID = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
 
 
368
 
369
  const Sekeleton = () => {
370
  const elementCurriculum = document.querySelector('.learnpress-course-curriculum');
@@ -546,6 +548,7 @@ function courseCurriculumSkeleton() {
546
  }
547
  }
548
 
 
549
  return {
550
  data3: returnData,
551
  pages3: pages || data.pages,
@@ -589,6 +592,7 @@ function courseCurriculumSkeleton() {
589
  }
590
  }
591
 
 
592
  return {
593
  data2: returnData,
594
  pages2: pages || data.pages,
@@ -602,7 +606,8 @@ function courseCurriculumSkeleton() {
602
  document.addEventListener('click', e => {
603
  const sectionBtns = document.querySelectorAll('.section-item__loadmore');
604
  [...sectionBtns].map(async sectionBtn => {
605
- if (sectionBtn.contains(e.target)) {
 
606
  const sectionItem = sectionBtn.parentNode;
607
  const sectionId = sectionItem.getAttribute('data-section-id');
608
  const sectionContent = sectionItem.querySelector('.section-content');
@@ -640,7 +645,8 @@ function courseCurriculumSkeleton() {
640
 
641
  const moreSections = document.querySelectorAll('.curriculum-more__button');
642
  [...moreSections].map(async moreSection => {
643
- if (moreSection.contains(e.target)) {
 
644
  const paged = parseInt(moreSection.dataset.page);
645
  const sections = moreSection.parentNode.parentNode.querySelector('.curriculum-sections');
646
 
365
 
366
  function courseCurriculumSkeleton() {
367
  let courseID = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
368
+ let isLoadingItems = false;
369
+ let isLoadingSections = false;
370
 
371
  const Sekeleton = () => {
372
  const elementCurriculum = document.querySelector('.learnpress-course-curriculum');
548
  }
549
  }
550
 
551
+ isLoadingItems = false;
552
  return {
553
  data3: returnData,
554
  pages3: pages || data.pages,
592
  }
593
  }
594
 
595
+ isLoadingSections = false;
596
  return {
597
  data2: returnData,
598
  pages2: pages || data.pages,
606
  document.addEventListener('click', e => {
607
  const sectionBtns = document.querySelectorAll('.section-item__loadmore');
608
  [...sectionBtns].map(async sectionBtn => {
609
+ if (sectionBtn.contains(e.target) && !isLoadingItems) {
610
+ isLoadingItems = true;
611
  const sectionItem = sectionBtn.parentNode;
612
  const sectionId = sectionItem.getAttribute('data-section-id');
613
  const sectionContent = sectionItem.querySelector('.section-content');
645
 
646
  const moreSections = document.querySelectorAll('.curriculum-more__button');
647
  [...moreSections].map(async moreSection => {
648
+ if (moreSection.contains(e.target) && !isLoadingSections) {
649
+ isLoadingSections = true;
650
  const paged = parseInt(moreSection.dataset.page);
651
  const sections = moreSection.parentNode.parentNode.querySelector('.curriculum-sections');
652
 
assets/js/dist/frontend/single-course.js.map ADDED
@@ -0,0 +1 @@
 
1
+ {"version":3,"file":"./assets/js/dist/frontend/single-course.js","mappings":";;;;;;;;;;;;AAAA;AAEA,MAAMC,0BAA0B,GAAG;AAClCC,EAAAA,iBAAiB,EAAE,IADe;AAElCC,EAAAA,iBAAiB,EAAE,IAFe;;AAGlCC,EAAAA,IAAI,GAAG;AACN,QAAK,CAAEJ,oEA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gBA,MAAM6R,oBAAoB,GAAGC,WAAW,CAAE,YAAW;AACpD,QAAMrJ,iBAAiB,GAAGlI,QAAQ,CAACE,aAAT,CAAwB,+BAAxB,CAA1B;;AACA,MAAKgI,iBAAL,EAAyB;AACxBL,IAAAA,uEAAwB;AACxB2J,IAAAA,aAAa,CAAEF,oBAAF,CAAb;AACA;AACD,CANuC,EAMrC,CANqC,CAAxC,EAQA;;AACA/M,EAAE,CAACkD,IAAH,CAAQgK,SAAR,CAAmB,+BAAnB,EAAoD,UAAUrP,EAAV,EAAe;AAClEyF,EAAAA,uEAAwB,CAAEzF,EAAF,CAAxB;AACA,CAFD,E","sources":["webpack://learnpress/./assets/src/apps/js/frontend/show-lp-overlay-complete-item.js","webpack://learnpress/./assets/src/apps/js/frontend/single-course/index.js","webpack://learnpress/./assets/src/apps/js/frontend/single-course/store/index.js","webpack://learnpress/./assets/src/apps/js/frontend/single-curriculum/components/search.js","webpack://learnpress/./assets/src/apps/js/frontend/single-curriculum/components/sidebar.js","webpack://learnpress/./assets/src/apps/js/frontend/single-curriculum/scrolltoitem.js","webpack://learnpress/./assets/src/apps/js/frontend/single-curriculum/skeleton.js","webpack://learnpress/./assets/src/apps/js/utils/lp-modal-overlay.js","webpack://learnpress/external window [\"LP\",\"quiz\"]","webpack://learnpress/external window [\"wp\",\"apiFetch\"]","webpack://learnpress/external window [\"wp\",\"element\"]","webpack://learnpress/external window [\"wp\",\"url\"]","webpack://learnpress/webpack/bootstrap","webpack://learnpress/webpack/runtime/compat get default export","webpack://learnpress/webpack/runtime/define property getters","webpack://learnpress/webpack/runtime/hasOwnProperty shorthand","webpack://learnpress/webpack/runtime/make namespace object","webpack://learnpress/./assets/src/apps/js/frontend/single-course.js"],"sourcesContent":["import lpModalOverlay from '../utils/lp-modal-overlay';\n\nconst lpModalOverlayCompleteItem = {\n\telBtnFinishCourse: null,\n\telBtnCompleteItem: null,\n\tinit() {\n\t\tif ( ! lpModalOverlay.init() ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( undefined === lpGlobalSettings || 'yes' !== lpGlobalSettings.option_enable_popup_confirm_finish ) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.elBtnFinishCourse = document.querySelectorAll( '.lp-btn-finish-course' );\n\t\tthis.elBtnCompleteItem = document.querySelector( '.lp-btn-complete-item' );\n\n\t\tif ( this.elBtnCompleteItem ) {\n\t\t\tthis.elBtnCompleteItem.addEventListener( 'click', ( e ) => {\n\t\t\t\te.preventDefault();\n\n\t\t\t\tconst form = e.target.closest( 'form' );\n\n\t\t\t\tlpModalOverlay.elLPOverlay.show();\n\t\t\t\tlpModalOverlay.setTitleModal( form.dataset.title );\n\t\t\t\tlpModalOverlay.setContentModal( '<div class=\"pd-2em\">' + form.dataset.confirm + '</div>' );\n\t\t\t\tlpModalOverlay.callBackYes = () => {\n\t\t\t\t\tform.submit();\n\t\t\t\t};\n\t\t\t} );\n\t\t}\n\n\t\tif ( this.elBtnFinishCourse ) {\n\t\t\tthis.elBtnFinishCourse.forEach( ( element ) => element.addEventListener( 'click', ( e ) => {\n\t\t\t\te.preventDefault();\n\n\t\t\t\tconst form = e.target.closest( 'form' );\n\n\t\t\t\tlpModalOverlay.elLPOverlay.show();\n\t\t\t\tlpModalOverlay.setTitleModal( form.dataset.title );\n\t\t\t\tlpModalOverlay.setContentModal( '<div class=\"pd-2em\">' + form.dataset.confirm + '</div>' );\n\t\t\t\tlpModalOverlay.callBackYes = () => {\n\t\t\t\t\tform.submit();\n\t\t\t\t};\n\t\t\t} ) );\n\t\t}\n\t},\n};\n\nexport default lpModalOverlayCompleteItem;\n","import { Component } from '@wordpress/element';\nimport Quiz from '@learnpress/quiz';\n\nimport './store';\n\nimport { Sidebar } from '../single-curriculum/components/sidebar'; // Use toggle in Curriculum tab.\n\nclass SingleCourse extends Component {\n\trender() {\n\t\treturn (\n\t\t\t<>\n\t\t\t</>\n\t\t);\n\t}\n}\n\nexport default SingleCourse;\n\nfunction run() {\n\tSidebar();\n}\n\ndocument.addEventListener( 'DOMContentLoaded', () => {\n\trun();\n} );\n\n","/**\n * Created by tu on 9/19/19.\n */\n","\nexport const searchCourseContent = () => {\n\tconst popup = document.querySelector( '#popup-course' );\n\tconst list = document.querySelector( '#learn-press-course-curriculum' );\n\n\tif ( popup && list ) {\n\t\tconst items = list.querySelector( '.curriculum-sections' );\n\t\tconst form = popup.querySelector( '.search-course' );\n\t\tconst search = popup.querySelector( '.search-course input[type=\"text\"]' );\n\n\t\tif ( ! search || ! items || ! form ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst sections = items.querySelectorAll( 'li.section' );\n\t\tconst dataItems = items.querySelectorAll( 'li.course-item' );\n\n\t\tconst dataSearch = [];\n\n\t\tdataItems.forEach( ( item ) => {\n\t\t\tconst itemID = item.dataset.id;\n\t\t\tconst name = item.querySelector( '.item-name' );\n\n\t\t\tdataSearch.push( {\n\t\t\t\tid: itemID,\n\t\t\t\tname: name ? name.textContent.toLowerCase() : '',\n\t\t\t} );\n\t\t} );\n\n\t\tconst submit = ( event ) => {\n\t\t\tevent.preventDefault();\n\n\t\t\tconst inputVal = search.value;\n\n\t\t\tform.classList.add( 'searching' );\n\n\t\t\tif ( ! inputVal ) {\n\t\t\t\tform.classList.remove( 'searching' );\n\t\t\t}\n\n\t\t\tconst outputs = [];\n\n\t\t\tdataSearch.forEach( ( i ) => {\n\t\t\t\tif ( ! inputVal || i.name.match( inputVal.toLowerCase() ) ) {\n\t\t\t\t\toutputs.push( i.id );\n\n\t\t\t\t\tdataItems.forEach( ( c ) => {\n\t\t\t\t\t\tif ( outputs.indexOf( c.dataset.id ) !== -1 ) {\n\t\t\t\t\t\t\tc.classList.remove( 'hide-if-js' );\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tc.classList.add( 'hide-if-js' );\n\t\t\t\t\t\t}\n\t\t\t\t\t} );\n\t\t\t\t}\n\t\t\t} );\n\n\t\t\tsections.forEach( ( section ) => {\n\t\t\t\tconst listItem = section.querySelectorAll( '.course-item' );\n\t\t\t\tconst isTrue = [];\n\n\t\t\t\tlistItem.forEach( ( a ) => {\n\t\t\t\t\tif ( outputs.includes( a.dataset.id ) ) {\n\t\t\t\t\t\tisTrue.push( a.dataset.id );\n\t\t\t\t\t}\n\t\t\t\t} );\n\n\t\t\t\tif ( isTrue.length === 0 ) {\n\t\t\t\t\tsection.classList.add( 'hide-if-js' );\n\t\t\t\t} else {\n\t\t\t\t\tsection.classList.remove( 'hide-if-js' );\n\t\t\t\t}\n\t\t\t} );\n\t\t};\n\n\t\tconst clear = form.querySelector( '.clear' );\n\n\t\tif ( clear ) {\n\t\t\tclear.addEventListener( 'click', ( e ) => {\n\t\t\t\te.preventDefault();\n\t\t\t\tsearch.value = '';\n\n\t\t\t\tsubmit( e );\n\t\t\t} );\n\t\t}\n\n\t\tform.addEventListener( 'submit', submit );\n\t\tsearch.addEventListener( 'keyup', submit );\n\t}\n};\n","const $ = jQuery;\nconst { throttle } = lodash;\n\nexport const Sidebar = () => {\n\t// Tungnx - Show/hide sidebar curriculumn\n\tconst elSidebarToggle = document.querySelector( '#sidebar-toggle' );\n\n\t// For style of theme\n\tconst toggleSidebar = ( toggle ) => {\n\t\t$( 'body' ).removeClass( 'lp-sidebar-toggle__open' );\n\t\t$( 'body' ).removeClass( 'lp-sidebar-toggle__close' );\n\n\t\tif ( toggle ) {\n\t\t\t$( 'body' ).addClass( 'lp-sidebar-toggle__close' );\n\t\t} else {\n\t\t\t$( 'body' ).addClass( 'lp-sidebar-toggle__open' );\n\t\t}\n\t};\n\n\t// For lp and theme\n\tif ( elSidebarToggle ) {\n\t\tif ( $( window ).innerWidth() <= 768 ) {\n\t\t\telSidebarToggle.setAttribute( 'checked', 'checked' );\n\t\t} else if ( LP.Cookies.get( 'sidebar-toggle' ) ) {\n\t\t\telSidebarToggle.setAttribute( 'checked', 'checked' );\n\t\t} else {\n\t\t\telSidebarToggle.removeAttribute( 'checked' );\n\t\t}\n\n\t\tdocument.querySelector( '#popup-course' ).addEventListener( 'click', ( e ) => {\n\t\t\tif ( e.target.id === 'sidebar-toggle' ) {\n\t\t\t\tLP.Cookies.set( 'sidebar-toggle', e.target.checked ? true : false );\n\t\t\t\ttoggleSidebar( LP.Cookies.get( 'sidebar-toggle' ) );\n\t\t\t}\n\t\t} );\n\t}\n\t// End editor by tungnx\n\n\tconst $curriculum = $( '#learn-press-course-curriculum' );\n\t$curriculum.find( '.section-desc' ).each( ( i, el ) => {\n\t\tconst a = $( '<span class=\"show-desc\"></span>' ).on( 'click', () => {\n\t\t\tb.toggleClass( 'c' );\n\t\t} );\n\t\tconst b = $( el ).siblings( '.section-title' ).append( a );\n\t} );\n\n\t$( '.section' ).each( function() {\n\t\tconst $section = $( this ),\n\t\t\t$toggle = $section.find( '.section-left' );\n\n\t\t$toggle.on( 'click', function() {\n\t\t\tconst isClose = $section.toggleClass( 'closed' ).hasClass( 'closed' );\n\t\t\tconst sections = LP.Cookies.get( 'closed-section-' + lpGlobalSettings.post_id ) || [];\n\t\t\tconst sectionId = parseInt( $section.data( 'section-id' ) );\n\t\t\tconst at = sections.findIndex( ( id ) => {\n\t\t\t\treturn id == sectionId;\n\t\t\t} );\n\n\t\t\tif ( isClose ) {\n\t\t\t\tsections.push( parseInt( $section.data( 'section-id' ) ) );\n\t\t\t} else {\n\t\t\t\tsections.splice( at, 1 );\n\t\t\t}\n\n\t\t\tLP.Cookies.remove( 'closed-section-(.*)' );\n\t\t\tLP.Cookies.set( 'closed-section-' + lpGlobalSettings.post_id, [ ...new Set( sections ) ] );\n\t\t} );\n\t} );\n};\n\n","import lpModalOverlay from '../../utils/lp-modal-overlay';\n\nconst $ = jQuery;\n\nconst scrollToItemCurrent = {\n\tinit() {\n\t\tthis.scrollToItemViewing = function() {\n\t\t\tconst elItemViewing = $( '.viewing-course-item' );\n\t\t\tif ( elItemViewing.length ) {\n\t\t\t\tconst elCourseCurriculumn = $( '#learn-press-course-curriculum' );\n\t\t\t\tconst heightCourseItemContentHeader = $( '#popup-sidebar' ).outerHeight();\n\t\t\t\tconst heightSectionTitle = $( '.section-title' ).outerHeight();\n\t\t\t\tconst heightSectionHeader = $( '.section-header' ).outerHeight();\n\t\t\t\tconst regex = new RegExp( '^viewing-course-item-([0-9].*)' );\n\t\t\t\tconst classList = elItemViewing.attr( 'class' );\n\t\t\t\tconst classArr = classList.split( /\\s+/ );\n\t\t\t\tlet idItem = 0;\n\n\t\t\t\t$.each( classArr, function( i, className ) {\n\t\t\t\t\tconst compare = regex.exec( className );\n\n\t\t\t\t\tif ( compare ) {\n\t\t\t\t\t\tidItem = compare[ 1 ];\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t} );\n\n\t\t\t\tif ( 0 === idItem ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tconst elItemCurrent = $( '.course-item-' + idItem );\n\t\t\t\tconst offSetTop = elItemCurrent.offset().top;\n\t\t\t\tconst offset = elItemCurrent.offset().top - elCourseCurriculumn.offset().top +\n\t\t\t\t\telCourseCurriculumn.scrollTop();\n\n\t\t\t\telCourseCurriculumn.animate( {\n\t\t\t\t\tscrollTop: LP.Hook.applyFilters( 'scroll-item-current', offset - heightSectionHeader ),\n\t\t\t\t}, 800 );\n\t\t\t}\n\t\t};\n\t\tthis.scrollToItemViewing();\n\t},\n};\n\nexport default scrollToItemCurrent;\n","\n// Rest API load content in Tab Curriculum - Nhamdv.\nimport { addQueryArgs } from '@wordpress/url';\nimport apiFetch from '@wordpress/api-fetch';\nimport scrollToItemCurrent from './scrolltoitem';\nimport { searchCourseContent } from './components/search';\n\nexport default function courseCurriculumSkeleton( courseID = '' ) {\n\tlet isLoadingItems = false;\n\tlet isLoadingSections = false;\n\tconst Sekeleton = () => {\n\t\tconst elementCurriculum = document.querySelector( '.learnpress-course-curriculum' );\n\n\t\tif ( ! elementCurriculum ) {\n\t\t\treturn;\n\t\t}\n\n\t\tgetResponse( elementCurriculum );\n\t};\n\n\tconst getResponse = async ( ele ) => {\n\t\tconst skeleton = ele.querySelector( '.lp-skeleton-animation' );\n\t\tconst itemID = ele.dataset.id;\n\t\tconst sectionID = ele.dataset.section;\n\n\t\ttry {\n\t\t\tconst page = 1;\n\t\t\tconst response = await apiFetch( {\n\t\t\t\tpath: addQueryArgs( 'lp/v1/lazy-load/course-curriculum', {\n\t\t\t\t\tcourseId: courseID || lpGlobalSettings.post_id || '',\n\t\t\t\t\tpage,\n\t\t\t\t\tsectionID: sectionID || '',\n\t\t\t\t} ),\n\t\t\t\tmethod: 'GET',\n\t\t\t} );\n\n\t\t\tconst { data, status, message } = response;\n\t\t\tlet section_ids = data.section_ids;\n\n\t\t\tif ( status === 'error' ) {\n\t\t\t\tthrow new Error( message || 'Error' );\n\t\t\t}\n\n\t\t\tlet returnData = data.content;\n\t\t\tif ( undefined === returnData ) { // For old Eduma <= 4.6.0\n\t\t\t\treturnData = data;\n\t\t\t\tsection_ids = response.section_ids;\n\t\t\t}\n\n\t\t\tif ( sectionID ) {\n\t\t\t\tif ( section_ids && ! section_ids.includes( sectionID ) ) {\n\t\t\t\t\tconst response2 = await getResponsive( '', page + 1, sectionID );\n\n\t\t\t\t\tif ( response2 ) {\n\t\t\t\t\t\tconst { data2, pages2, page2 } = response2;\n\n\t\t\t\t\t\tawait parseContentItems( { ele, returnData, sectionID, itemID, data2, pages2, page2 } );\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tawait parseContentItems( { ele, returnData, sectionID, itemID } );\n\t\t\t\t}\n \t\t\t} else {\n\t\t\t\treturnData && ele.insertAdjacentHTML( 'beforeend', returnData );\n\t\t\t}\n\t\t} catch ( error ) {\n\t\t\tele.insertAdjacentHTML( 'beforeend', `<div class=\"lp-ajax-message error\" style=\"display:block\">${ error.message || 'Error: Query lp/v1/lazy-load/course-curriculum' }</div>` );\n\t\t}\n\n\t\tskeleton && skeleton.remove();\n\n\t\tsearchCourseContent();\n\t};\n\n\tconst parseContentItems = async ( { ele, returnData, sectionID, itemID, data2, pages2, page2 } ) => {\n\t\tconst parser = new DOMParser();\n\t\tconst doc = parser.parseFromString( returnData, 'text/html' );\n\n\t\tif ( data2 ) {\n\t\t\tconst sections = doc.querySelector( '.curriculum-sections' );\n\n\t\t\tconst loadMoreBtn = doc.querySelector( '.curriculum-more__button' );\n\n\t\t\tif ( loadMoreBtn ) {\n\t\t\t\tif ( pages2 <= page2 ) {\n\t\t\t\t\tloadMoreBtn.remove();\n\t\t\t\t} else {\n\t\t\t\t\tloadMoreBtn.dataset.page = page2;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tsections.insertAdjacentHTML( 'beforeend', data2 );\n\t\t}\n\n\t\tconst section = doc.querySelector( `[data-section-id=\"${ sectionID }\"]` );\n\n\t\tif ( section ) {\n\t\t\tconst items = section.querySelectorAll( '.course-item' );\n\t\t\tconst item_ids = [ ...items ].map( ( item ) => item.dataset.id );\n\t\t\tconst sectionContent = section.querySelector( '.section-content' );\n\t\t\tconst itemLoadMore = section.querySelector( '.section-item__loadmore' );\n\n\t\t\tif ( itemID && ! item_ids.includes( itemID ) ) {\n\t\t\t\tconst responseItem = await getResponsiveItem( '', 2, sectionID, itemID );\n\n\t\t\t\tconst { data3, pages3, paged3, page } = responseItem;\n\n\t\t\t\tif ( pages3 <= paged3 || pages3 <= page ) {\n\t\t\t\t\titemLoadMore.remove();\n\t\t\t\t} else {\n\t\t\t\t\titemLoadMore.dataset.page = page;\n\t\t\t\t}\n\n\t\t\t\tif ( data3 && sectionContent ) {\n\t\t\t\t\tsectionContent.insertAdjacentHTML( 'beforeend', data3 );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tele.insertAdjacentHTML( 'beforeend', doc.body.innerHTML );\n\n\t\tscrollToItemCurrent.init();\n\t};\n\n\tconst getResponsiveItem = async ( returnData, paged, sectionID, itemID ) => {\n\t\tconst response = await apiFetch( {\n\t\t\tpath: addQueryArgs( 'lp/v1/lazy-load/course-curriculum-items', {\n\t\t\t\tsectionId: sectionID || '',\n\t\t\t\tpage: paged,\n\t\t\t} ),\n\t\t\tmethod: 'GET',\n\t\t} );\n\n\t\tconst { data, status, pages, message } = response;\n\n\t\tconst { page } = data;\n\n\t\tlet item_ids;\n\n\t\tif ( status === 'success' ) {\n\t\t\tlet dataTmp = data.content;\n\t\t\titem_ids = data.item_ids;\n\n\t\t\tif ( undefined === dataTmp ) { // For old Eduma <= 4.6.0\n\t\t\t\tdataTmp = data;\n\t\t\t\titem_ids = response.item_ids;\n\t\t\t}\n\n\t\t\treturnData += dataTmp;\n\n\t\t\tif ( sectionID && item_ids && itemID && ! item_ids.includes( itemID ) ) {\n\t\t\t\treturn getResponsiveItem( returnData, paged + 1, sectionID, itemID );\n\t\t\t}\n\t\t}\n\n\t\tisLoadingItems = false;\n\n\t\treturn { data3: returnData, pages3: pages || data.pages, status3: status, message3: message, page: page || 0 };\n\t};\n\n\tconst getResponsive = async ( returnData, page, sectionID ) => {\n\t\tconst response = await apiFetch( {\n\t\t\tpath: addQueryArgs( 'lp/v1/lazy-load/course-curriculum', {\n\t\t\t\tcourseId: courseID || lpGlobalSettings.post_id || '',\n\t\t\t\tpage,\n\t\t\t\tsectionID: sectionID || '',\n\t\t\t\tloadMore: true,\n\t\t\t} ),\n\t\t\tmethod: 'GET',\n\t\t} );\n\n\t\tconst { data, status, message } = response;\n\n\t\tlet returnDataTmp = data.content;\n\t\tlet section_ids = data.section_ids;\n\t\tlet pages = data.pages;\n\t\tif ( undefined === returnDataTmp ) { // For old Eduma <= 4.6.0\n\t\t\treturnDataTmp = data;\n\t\t\tsection_ids = response.section_ids;\n\t\t\tpages = response.pages;\n\t\t}\n\n\t\tif ( status === 'success' ) {\n\t\t\treturnData += returnDataTmp;\n\n\t\t\tif ( sectionID && section_ids && section_ids.length > 0 && ! section_ids.includes( sectionID ) ) {\n\t\t\t\treturn getResponsive( returnData, page + 1, sectionID );\n\t\t\t}\n\t\t}\n\n\t\tisLoadingSections = false;\n\n\t\treturn { data2: returnData, pages2: pages || data.pages, page2: page, status2: status, message2: message };\n\t};\n\n\tSekeleton();\n\n\tdocument.addEventListener( 'click', ( e ) => {\n\t\tconst sectionBtns = document.querySelectorAll( '.section-item__loadmore' );\n\n\t\t[ ...sectionBtns ].map( async ( sectionBtn ) => {\n\t\t\tif ( sectionBtn.contains( e.target ) && ! isLoadingItems ) {\n\t\t\t\tisLoadingItems = true;\n\t\t\t\tconst sectionItem = sectionBtn.parentNode;\n\t\t\t\tconst sectionId = sectionItem.getAttribute( 'data-section-id' );\n\t\t\t\tconst sectionContent = sectionItem.querySelector( '.section-content' );\n\n\t\t\t\tconst paged = parseInt( sectionBtn.dataset.page );\n\n\t\t\t\tsectionBtn.classList.add( 'loading' );\n\n\t\t\t\ttry {\n\t\t\t\t\tconst response = await getResponsiveItem( '', paged + 1, sectionId, '' );\n\n\t\t\t\t\tconst { data3, pages3, status3, message3 } = response;\n\n\t\t\t\t\tif ( status3 === 'error' ) {\n\t\t\t\t\t\tthrow new Error( message3 || 'Error' );\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( pages3 <= paged + 1 ) {\n\t\t\t\t\t\tsectionBtn.remove();\n\t\t\t\t\t} else {\n\t\t\t\t\t\tsectionBtn.dataset.page = paged + 1;\n\t\t\t\t\t}\n\n\t\t\t\t\tsectionContent.insertAdjacentHTML( 'beforeend', data3 );\n\t\t\t\t} catch ( e ) {\n\t\t\t\t\tsectionContent.insertAdjacentHTML( 'beforeend', `<div class=\"lp-ajax-message error\" style=\"display:block\">${ e.message || 'Error: Query lp/v1/lazy-load/course-curriculum' }</div>` );\n\t\t\t\t}\n\n\t\t\t\tsectionBtn.classList.remove( 'loading' );\n\n\t\t\t\tsearchCourseContent();\n\t\t\t}\n\t\t} );\n\n\t\t// Load more Sections\n\t\tconst moreSections = document.querySelectorAll( '.curriculum-more__button' );\n\n\t\t[ ...moreSections ].map( async ( moreSection ) => {\n\t\t\tif ( moreSection.contains( e.target ) && ! isLoadingSections ) {\n\t\t\t\tisLoadingSections = true;\n\t\t\t\tconst paged = parseInt( moreSection.dataset.page );\n\n\t\t\t\tconst sections = moreSection.parentNode.parentNode.querySelector( '.curriculum-sections' );\n\n\t\t\t\tif ( paged && sections ) {\n\t\t\t\t\tmoreSection.classList.add( 'loading' );\n\n\t\t\t\t\ttry {\n\t\t\t\t\t\tconst response2 = await getResponsive( '', paged + 1, '' );\n\n\t\t\t\t\t\tconst { data2, pages2, status2, message2 } = response2;\n\n\t\t\t\t\t\tif ( status2 === 'error' ) {\n\t\t\t\t\t\t\tthrow new Error( message2 || 'Error' );\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif ( pages2 <= paged + 1 ) {\n\t\t\t\t\t\t\tmoreSection.remove();\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tmoreSection.dataset.page = paged + 1;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tsections.insertAdjacentHTML( 'beforeend', data2 );\n\t\t\t\t\t} catch ( e ) {\n\t\t\t\t\t\tsections.insertAdjacentHTML( 'beforeend', `<div class=\"lp-ajax-message error\" style=\"display:block\">${ e.message || 'Error: Query lp/v1/lazy-load/course-curriculum' }</div>` );\n\t\t\t\t\t}\n\n\t\t\t\t\tmoreSection.classList.remove( 'loading' );\n\n\t\t\t\t\tsearchCourseContent();\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\n\t\t// Show/Hide accordion\n\t\tif ( document.querySelector( '.learnpress-course-curriculum' ) ) {\n\t\t\tconst sections = document.querySelectorAll( '.section' );\n\n\t\t\t[ ...sections ].map( ( section ) => {\n\t\t\t\tif ( section.contains( e.target ) ) {\n\t\t\t\t\tconst toggle = section.querySelector( '.section-left' );\n\n\t\t\t\t\ttoggle.contains( e.target ) && section.classList.toggle( 'closed' );\n\t\t\t\t}\n\t\t\t} );\n\t\t}\n\t} );\n}\n","const $ = jQuery;\nlet elLPOverlay = null;\nconst lpModalOverlay = {\n\telLPOverlay: null,\n\telMainContent: null,\n\telTitle: null,\n\telBtnYes: null,\n\telBtnNo: null,\n\telFooter: null,\n\telCalledModal: null,\n\tcallBackYes: null,\n\tinstance: null,\n\tinit() {\n\t\tif ( this.instance ) {\n\t\t\treturn true;\n\t\t}\n\n\t\tthis.elLPOverlay = $( '.lp-overlay' );\n\n\t\tif ( ! this.elLPOverlay.length ) {\n\t\t\treturn false;\n\t\t}\n\t\telLPOverlay = this.elLPOverlay;\n\n\t\tthis.elMainContent = elLPOverlay.find( '.main-content' );\n\t\tthis.elTitle = elLPOverlay.find( '.modal-title' );\n\t\tthis.elBtnYes = elLPOverlay.find( '.btn-yes' );\n\t\tthis.elBtnNo = elLPOverlay.find( '.btn-no' );\n\t\tthis.elFooter = elLPOverlay.find( '.lp-modal-footer' );\n\n\t\t$( document ).on( 'click', '.close, .btn-no', function() {\n\t\t\telLPOverlay.hide();\n\t\t} );\n\n\t\t$( document ).on( 'click', '.btn-yes', function( e ) {\n\t\t\te.preventDefault();\n\t\t\te.stopPropagation();\n\n\t\t\tif ( 'function' === typeof lpModalOverlay.callBackYes ) {\n\t\t\t\tlpModalOverlay.callBackYes();\n\t\t\t}\n\t\t} );\n\n\t\tthis.instance = this;\n\n\t\treturn true;\n\t},\n\tsetElCalledModal( elCalledModal ) {\n\t\tthis.elCalledModal = elCalledModal;\n\t},\n\tsetContentModal( content, event ) {\n\t\tthis.elMainContent.html( content );\n\t\tif ( 'function' === typeof event ) {\n\t\t\tevent();\n\t\t}\n\t},\n\tsetTitleModal( content ) {\n\t\tthis.elTitle.html( content );\n\t},\n};\n\nexport default lpModalOverlay;\n","module.exports = window[\"LP\"][\"quiz\"];","module.exports = window[\"wp\"][\"apiFetch\"];","module.exports = window[\"wp\"][\"element\"];","module.exports = window[\"wp\"][\"url\"];","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = function(module) {\n\tvar getter = module && module.__esModule ?\n\t\tfunction() { return module['default']; } :\n\t\tfunction() { return module; };\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = function(exports, definition) {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }","// define __esModule on exports\n__webpack_require__.r = function(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};","import SingleCourse from './single-course/index';\nimport { addQueryArgs } from '@wordpress/url';\nimport lpModalOverlayCompleteItem from './show-lp-overlay-complete-item';\nimport lpModalOverlay from '../utils/lp-modal-overlay';\nimport courseCurriculumSkeleton from './single-curriculum/skeleton';\n\nexport default SingleCourse;\n\nexport const init = () => {\n\twp.element.render(\n\t\t<SingleCourse />,\n\t);\n};\n\nconst $ = jQuery;\n\nconst initCourseTabs = function() {\n\t$( '#learn-press-course-tabs' ).on(\n\t\t'change',\n\t\t'input[name=\"learn-press-course-tab-radio\"]',\n\t\tfunction( e ) {\n\t\t\tconst selectedTab = $( 'input[name=\"learn-press-course-tab-radio\"]:checked' ).val();\n\n\t\t\tLP.Cookies.set( 'course-tab', selectedTab );\n\n\t\t\t$( 'label[for=\"' + $( e.target ).attr( 'id' ) + '\"]' ).closest( 'li' ).addClass( 'active' ).siblings().removeClass( 'active' );\n\t\t}\n\t);\n};\n\nconst initCourseSidebar = function initCourseSidebar() {\n\tconst $sidebar = $( '.course-summary-sidebar' );\n\n\tif ( ! $sidebar.length ) {\n\t\treturn;\n\t}\n\n\tconst $window = $( window );\n\tconst $scrollable = $sidebar.children();\n\tconst offset = $sidebar.offset();\n\tlet scrollTop = 0;\n\tconst maxHeight = $sidebar.height();\n\tconst scrollHeight = $scrollable.height();\n\tconst options = {\n\t\toffsetTop: 32,\n\t};\n\n\tconst onScroll = function() {\n\t\tscrollTop = $window.scrollTop();\n\n\t\tconst top = scrollTop - offset.top + options.offsetTop;\n\n\t\tif ( top < 0 ) {\n\t\t\t$sidebar.removeClass( 'slide-top slide-down' );\n\t\t\t$scrollable.css( 'top', '' );\n\t\t\treturn;\n\t\t}\n\n\t\tif ( top > maxHeight - scrollHeight ) {\n\t\t\t$sidebar.removeClass( 'slide-down' ).addClass( 'slide-top' );\n\t\t\t$scrollable.css( 'top', maxHeight - scrollHeight );\n\t\t} else {\n\t\t\t$sidebar.removeClass( 'slide-top' ).addClass( 'slide-down' );\n\t\t\t$scrollable.css( 'top', options.offsetTop );\n\t\t}\n\t};\n\n\t$window.on( 'scroll.fixed-course-sidebar', onScroll ).trigger( 'scroll.fixed-course-sidebar' );\n};\n\n// Rest API Enroll course - Nhamdv.\nconst enrollCourse = () => {\n\tconst formEnrolls = document.querySelectorAll( 'form.enroll-course' );\n\n\tif ( formEnrolls.length > 0 ) {\n\t\tformEnrolls.forEach( ( formEnroll ) => {\n\t\t\tconst submit = async ( id, btnEnroll ) => {\n\t\t\t\ttry {\n\t\t\t\t\tconst response = await wp.apiFetch( {\n\t\t\t\t\t\tpath: 'lp/v1/courses/enroll-course',\n\t\t\t\t\t\tmethod: 'POST',\n\t\t\t\t\t\tdata: { id },\n\t\t\t\t\t} );\n\n\t\t\t\t\tbtnEnroll.classList.remove( 'loading' );\n\t\t\t\t\tbtnEnroll.disabled = false;\n\n\t\t\t\t\tconst { status, data: { redirect }, message } = response;\n\n\t\t\t\t\tif ( message && status ) {\n\t\t\t\t\t\tbtnEnroll.style.display = 'none';\n\t\t\t\t\t\tformEnroll.innerHTML += `<div class=\"lp-enroll-notice ${ status }\">${ message }</div>`;\n\n\t\t\t\t\t\tif ( redirect ) {\n\t\t\t\t\t\t\twindow.location.href = redirect;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} catch ( error ) {\n\t\t\t\t\tform.innerHTML += `<div class=\"lp-enroll-notice error\">${ error.message && error.message }</div>`;\n\t\t\t\t}\n\t\t\t};\n\n\t\t\tformEnroll.addEventListener( 'submit', ( event ) => {\n\t\t\t\tevent.preventDefault();\n\t\t\t\tconst id = formEnroll.querySelector( 'input[name=enroll-course]' ).value;\n\t\t\t\tconst btnEnroll = formEnroll.querySelector( 'button.button-enroll-course' );\n\t\t\t\tbtnEnroll.classList.add( 'loading' );\n\t\t\t\tbtnEnroll.disabled = true;\n\t\t\t\tsubmit( id, btnEnroll );\n\t\t\t} );\n\t\t} );\n\t}\n\n\t// Reload when press back button in chrome.\n\tif ( document.querySelector( '.course-detail-info' ) !== null ) {\n\t\twindow.addEventListener( 'pageshow', ( event ) => {\n\t\t\tconst hasCache = event.persisted || ( typeof window.performance != 'undefined' && String( window.performance.getEntriesByType( 'navigation' )[ 0 ].type ) == 'back_forward' );\n\t\t\tif ( hasCache ) {\n\t\t\t\tlocation.reload();\n\t\t\t}\n\t\t} );\n\t}\n};\n\n// Rest API purchase course - Nhamdv.\nconst purchaseCourse = () => {\n\tconst forms = document.querySelectorAll( 'form.purchase-course' );\n\n\tif ( forms.length > 0 ) {\n\t\tforms.forEach( ( form ) => {\n\t\t\t// Allow Repurchase.\n\t\t\tconst allowRepurchase = () => {\n\t\t\t\tconst continueRepurchases = document.querySelectorAll( '.lp_allow_repuchase_select' );\n\n\t\t\t\tcontinueRepurchases.forEach( ( repurchase ) => {\n\t\t\t\t\tconst radios = repurchase.querySelectorAll( '[name=_lp_allow_repurchase_type]' );\n\n\t\t\t\t\tfor ( let i = 0, length = radios.length; i < length; i++ ) {\n\t\t\t\t\t\tif ( radios[ i ].checked ) {\n\t\t\t\t\t\t\tconst repurchaseType = radios[ i ].value;\n\t\t\t\t\t\t\tconst id = form.querySelector( 'input[name=purchase-course]' ).value;\n\n\t\t\t\t\t\t\tconst btnBuynow = form.querySelector( 'button.button-purchase-course' );\n\t\t\t\t\t\t\tbtnBuynow.classList.add( 'loading' );\n\t\t\t\t\t\t\tbtnBuynow.disabled = true;\n\n\t\t\t\t\t\t\tsubmit( id, btnBuynow, repurchaseType );\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} );\n\t\t\t};\n\n\t\t\tconst submit = async ( id, btn, repurchaseType = false ) => {\n\t\t\t\ttry {\n\t\t\t\t\tconst response = await wp.apiFetch( {\n\t\t\t\t\t\tpath: 'lp/v1/courses/purchase-course',\n\t\t\t\t\t\tmethod: 'POST',\n\t\t\t\t\t\tdata: { id, repurchaseType },\n\t\t\t\t\t} );\n\n\t\t\t\t\tif ( btn ) {\n\t\t\t\t\t\tbtn.classList.remove( 'loading' );\n\t\t\t\t\t\tbtn.disabled = false;\n\t\t\t\t\t}\n\n\t\t\t\t\tconst { status, data: { redirect, type, html, titlePopup }, message } = response;\n\n\t\t\t\t\tif ( type === 'allow_repurchase' && status === 'success' ) {\n\t\t\t\t\t\tif ( ! form.querySelector( '.lp_allow_repuchase_select' ) ) {\n\t\t\t\t\t\t\tif ( ! lpModalOverlay.init() ) {\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tlpModalOverlay.elLPOverlay.show();\n\n\t\t\t\t\t\t\tlpModalOverlay.setTitleModal( titlePopup || '' );\n\n\t\t\t\t\t\t\tlpModalOverlay.setContentModal( html );\n\n\t\t\t\t\t\t\tlpModalOverlay.callBackYes = () => {\n\t\t\t\t\t\t\t\tlpModalOverlay.elLPOverlay.hide();\n\n\t\t\t\t\t\t\t\tallowRepurchase();\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if ( message && status ) {\n\t\t\t\t\t\tform.innerHTML += `<div class=\"lp-enroll-notice ${ status }\">${ message }</div>`;\n\n\t\t\t\t\t\tif ( 'success' === status && redirect ) {\n\t\t\t\t\t\t\twindow.location.href = redirect;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} catch ( error ) {\n\t\t\t\t\tform.innerHTML += `<div class=\"lp-enroll-notice error\">${ error.message && error.message }</div>`;\n\t\t\t\t}\n\t\t\t};\n\n\t\t\tform.addEventListener( 'submit', ( event ) => {\n\t\t\t\tevent.preventDefault();\n\t\t\t\tconst id = form.querySelector( 'input[name=purchase-course]' ).value;\n\t\t\t\tconst btn = form.querySelector( 'button.button-purchase-course' );\n\t\t\t\tbtn.classList.add( 'loading' );\n\t\t\t\tbtn.disabled = true;\n\n\t\t\t\tsubmit( id, btn );\n\t\t\t} );\n\t\t} );\n\t}\n};\n\nconst retakeCourse = () => {\n\tconst elFormRetakeCourses = document.querySelectorAll( '.lp-form-retake-course' );\n\n\tif ( ! elFormRetakeCourses.length ) {\n\t\treturn;\n\t}\n\n\telFormRetakeCourses.forEach( ( elFormRetakeCourse ) => {\n\t\tconst elButtonRetakeCourses = elFormRetakeCourse.querySelector( '.button-retake-course' );\n\t\tconst elCourseId = elFormRetakeCourse.querySelector( '[name=retake-course]' ).value;\n\t\tconst elAjaxMessage = elFormRetakeCourse.querySelector( '.lp-ajax-message' );\n\t\tconst submit = ( elButtonRetakeCourse ) => {\n\t\t\twp.apiFetch( {\n\t\t\t\tpath: '/lp/v1/courses/retake-course',\n\t\t\t\tmethod: 'POST',\n\t\t\t\tdata: { id: elCourseId },\n\t\t\t} ).then( ( res ) => {\n\t\t\t\tconst { status, message, data } = res;\n\t\t\t\telAjaxMessage.innerHTML = message;\n\n\t\t\t\tif ( undefined != status && status === 'success' ) {\n\t\t\t\t\telButtonRetakeCourse.style.display = 'none';\n\t\t\t\t\tsetTimeout( () => {\n\t\t\t\t\t\twindow.location.replace( data.url_redirect );\n\t\t\t\t\t}, 1000 );\n\t\t\t\t} else {\n\t\t\t\t\telAjaxMessage.classList.add( 'error' );\n\t\t\t\t}\n\t\t\t} ).catch( ( err ) => {\n\t\t\t\telAjaxMessage.classList.add( 'error' );\n\t\t\t\telAjaxMessage.innerHTML = 'error: ' + err.message;\n\t\t\t} ).then( ( ) => {\n\t\t\t\telButtonRetakeCourse.classList.remove( 'loading' );\n\t\t\t\telButtonRetakeCourse.disabled = false;\n\t\t\t\telAjaxMessage.style.display = 'block';\n\t\t\t} );\n\t\t};\n\n\t\telFormRetakeCourse.addEventListener( 'submit', ( e ) => {\n\t\t\te.preventDefault();\n\t\t} );\n\n\t\telButtonRetakeCourses.addEventListener(\n\t\t\t'click',\n\t\t\t( e ) => {\n\t\t\t\te.preventDefault();\n\t\t\t\telButtonRetakeCourses.classList.add( 'loading' );\n\t\t\t\telButtonRetakeCourses.disabled = true;\n\t\t\t\tsubmit( elButtonRetakeCourses );\n\t\t\t}\n\t\t);\n\t} );\n};\n\n// Rest API load content course progress - Nhamdv.\nconst courseProgress = () => {\n\tconst elements = document.querySelectorAll( '.lp-course-progress-wrapper' );\n\n\tif ( ! elements.length ) {\n\t\treturn;\n\t}\n\n\tif ( 'IntersectionObserver' in window ) {\n\t\tconst eleObserver = new IntersectionObserver( ( entries, observer ) => {\n\t\t\tentries.forEach( ( entry ) => {\n\t\t\t\tif ( entry.isIntersecting ) {\n\t\t\t\t\tconst ele = entry.target;\n\n\t\t\t\t\tsetTimeout( function() {\n\t\t\t\t\t\tgetResponse( ele );\n\t\t\t\t\t}, 600 );\n\n\t\t\t\t\teleObserver.unobserve( ele );\n\t\t\t\t}\n\t\t\t} );\n\t\t} );\n\n\t\t[ ...elements ].map( ( ele ) => eleObserver.observe( ele ) );\n\t}\n\n\tconst getResponse = async ( ele ) => {\n\t\tconst response = await wp.apiFetch( {\n\t\t\tpath: 'lp/v1/lazy-load/course-progress',\n\t\t\tmethod: 'POST',\n\t\t\tdata: {\n\t\t\t\tcourseId: lpGlobalSettings.post_id || '',\n\t\t\t\tuserId: lpGlobalSettings.user_id || '',\n\t\t\t},\n\t\t} );\n\n\t\tconst { data } = response;\n\n\t\tele.innerHTML = data;\n\t};\n};\n\nconst accordionExtraTab = () => {\n\tconst elements = document.querySelectorAll( '.course-extra-box' );\n\n\t[ ...elements ].map( ( ele ) => {\n\t\tconst title = ele.querySelector( '.course-extra-box__title' );\n\n\t\ttitle.addEventListener( 'click', () => {\n\t\t\tconst panel = title.nextElementSibling;\n\t\t\tconst eleActive = document.querySelector( '.course-extra-box.active' );\n\n\t\t\tif ( eleActive && ! ele.classList.contains( 'active' ) ) {\n\t\t\t\teleActive.classList.remove( 'active' );\n\t\t\t\teleActive.querySelector( '.course-extra-box__content' ).style.display = 'none';\n\t\t\t}\n\n\t\t\tif ( ! ele.classList.contains( 'active' ) ) {\n\t\t\t\tele.classList.add( 'active' );\n\t\t\t\tpanel.style.display = 'block';\n\t\t\t} else {\n\t\t\t\tele.classList.remove( 'active' );\n\t\t\t\tpanel.style.display = 'none';\n\t\t\t}\n\t\t} );\n\t} );\n};\n\nconst courseContinue = () => {\n\tconst formContinue = document.querySelectorAll( 'form.continue-course' );\n\n\tif ( formContinue != null && lpGlobalSettings.user_id > 0 ) {\n\t\tconst getResponse = async ( ele ) => {\n\t\t\tconst response = await wp.apiFetch( {\n\t\t\t\tpath: 'lp/v1/courses/continue-course',\n\t\t\t\tmethod: 'POST',\n\t\t\t\tdata: {\n\t\t\t\t\tcourseId: lpGlobalSettings.post_id || '',\n\t\t\t\t\tuserId: lpGlobalSettings.user_id || '',\n\t\t\t\t},\n\t\t\t} );\n\n\t\t\treturn response;\n\t\t};\n\n\t\tgetResponse( formContinue ).then( function( result ) {\n\t\t\tif ( result.status === 'success' ) {\n\t\t\t\tformContinue.forEach( ( form ) => {\n\t\t\t\t\tform.style.display = 'block';\n\t\t\t\t\tform.action = result.data;\n\t\t\t\t} );\n\t\t\t}\n\t\t} );\n\t}\n};\n\nexport {\n\tinitCourseTabs,\n\tinitCourseSidebar,\n\tenrollCourse,\n};\n\n$( window ).on( 'load', () => {\n\tconst $popup = $( '#popup-course' );\n\tlet timerClearScroll;\n\tconst $curriculum = $( '#learn-press-course-curriculum' );\n\taccordionExtraTab();\n\tinitCourseTabs();\n\tinitCourseSidebar();\n\tenrollCourse();\n\tpurchaseCourse();\n\tretakeCourse();\n\tcourseProgress();\n\tcourseContinue();\n\tlpModalOverlayCompleteItem.init();\n\t//courseCurriculumSkeleton();\n} );\n\nconst detectedElCurriculum = setInterval( function() {\n\tconst elementCurriculum = document.querySelector( '.learnpress-course-curriculum' );\n\tif ( elementCurriculum ) {\n\t\tcourseCurriculumSkeleton();\n\t\tclearInterval( detectedElCurriculum );\n\t}\n}, 1 );\n\n// Add callback for Thimkits\nLP.Hook.addAction( 'lp_course_curriculum_skeleton', function( id ) {\n\tcourseCurriculumSkeleton( id );\n} );\n\n"],"names":["lpModalOverlay","lpModalOverlayCompleteItem","elBtnFinishCourse","elBtnCompleteItem","init","undefined","lpGlobalSettings","option_enable_popup_confirm_finish","document","querySelectorAll","querySelector","addEventListener","e","preventDefault","form","target","closest","elLPOverlay","show","setTitleModal","dataset","title","setContentModal","confirm","callBackYes","submit","forEach","element","Component","Quiz","Sidebar","SingleCourse","render","run","searchCourseContent","popup","list","items","search","sections","dataItems","dataSearch","item","itemID","id","name","push","textContent","toLowerCase","event","inputVal","value","classList","add","remove","outputs","i","match","c","indexOf","section","listItem","isTrue","a","includes","length","clear","$","jQuery","throttle","lodash","elSidebarToggle","toggleSidebar","toggle","removeClass","addClass","window","innerWidth","setAttribute","LP","Cookies","get","removeAttribute","set","checked","$curriculum","find","each","el","on","b","toggleClass","siblings","append","$section","$toggle","isClose","hasClass","post_id","sectionId","parseInt","data","at","findIndex","splice","Set","scrollToItemCurrent","scrollToItemViewing","elItemViewing","elCourseCurriculumn","heightCourseItemContentHeader","outerHeight","heightSectionTitle","heightSectionHeader","regex","RegExp","attr","classArr","split","idItem","className","compare","exec","elItemCurrent","offSetTop","offset","top","scrollTop","animate","Hook","applyFilters","addQueryArgs","apiFetch","courseCurriculumSkeleton","courseID","isLoadingItems","isLoadingSections","Sekeleton","elementCurriculum","getResponse","ele","skeleton","sectionID","page","response","path","courseId","method","status","message","section_ids","Error","returnData","content","response2","getResponsive","data2","pages2","page2","parseContentItems","insertAdjacentHTML","error","parser","DOMParser","doc","parseFromString","loadMoreBtn","item_ids","map","sectionContent","itemLoadMore","responseItem","getResponsiveItem","data3","pages3","paged3","body","innerHTML","paged","pages","dataTmp","status3","message3","loadMore","returnDataTmp","status2","message2","sectionBtns","sectionBtn","contains","sectionItem","parentNode","getAttribute","moreSections","moreSection","elMainContent","elTitle","elBtnYes","elBtnNo","elFooter","elCalledModal","instance","hide","stopPropagation","setElCalledModal","html","wp","initCourseTabs","selectedTab","val","initCourseSidebar","$sidebar","$window","$scrollable","children","maxHeight","height","scrollHeight","options","offsetTop","onScroll","css","trigger","enrollCourse","formEnrolls","formEnroll","btnEnroll","disabled","redirect","style","display","location","href","hasCache","persisted","performance","String","getEntriesByType","type","reload","purchaseCourse","forms","allowRepurchase","continueRepurchases","repurchase","radios","repurchaseType","btnBuynow","btn","titlePopup","retakeCourse","elFormRetakeCourses","elFormRetakeCourse","elButtonRetakeCourses","elCourseId","elAjaxMessage","elButtonRetakeCourse","then","res","setTimeout","replace","url_redirect","catch","err","courseProgress","elements","eleObserver","IntersectionObserver","entries","observer","entry","isIntersecting","unobserve","observe","userId","user_id","accordionExtraTab","panel","nextElementSibling","eleActive","courseContinue","formContinue","result","action","$popup","timerClearScroll","detectedElCurriculum","setInterval","clearInterval","addAction"],"sourceRoot":""}
assets/js/dist/frontend/single-course.min.asset.php ADDED
@@ -0,0 +1 @@
 
1
+ <?php return array('dependencies' => array('wp-api-fetch', 'wp-element', 'wp-url'), 'version' => 'aba4bbb025edc3250b95');
assets/js/dist/frontend/single-course.min.deps.json ADDED
@@ -0,0 +1 @@
 
1
+ ["LP-quiz"]
assets/js/dist/frontend/single-curriculum.asset.php ADDED
@@ -0,0 +1 @@
 
1
+ <?php return array('dependencies' => array('wp-api-fetch', 'wp-element', 'wp-url'), 'version' => 'ce58a2c0e3f3ee8ac30f');
assets/js/dist/frontend/single-curriculum.deps.json ADDED
@@ -0,0 +1 @@
 
1
+ []
assets/js/dist/frontend/single-curriculum.js CHANGED
@@ -607,6 +607,8 @@ __webpack_require__.r(__webpack_exports__);
607
 
608
  function courseCurriculumSkeleton() {
609
  let courseID = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
 
 
610
 
611
  const Sekeleton = () => {
612
  const elementCurriculum = document.querySelector('.learnpress-course-curriculum');
@@ -788,6 +790,7 @@ function courseCurriculumSkeleton() {
788
  }
789
  }
790
 
 
791
  return {
792
  data3: returnData,
793
  pages3: pages || data.pages,
@@ -831,6 +834,7 @@ function courseCurriculumSkeleton() {
831
  }
832
  }
833
 
 
834
  return {
835
  data2: returnData,
836
  pages2: pages || data.pages,
@@ -844,7 +848,8 @@ function courseCurriculumSkeleton() {
844
  document.addEventListener('click', e => {
845
  const sectionBtns = document.querySelectorAll('.section-item__loadmore');
846
  [...sectionBtns].map(async sectionBtn => {
847
- if (sectionBtn.contains(e.target)) {
 
848
  const sectionItem = sectionBtn.parentNode;
849
  const sectionId = sectionItem.getAttribute('data-section-id');
850
  const sectionContent = sectionItem.querySelector('.section-content');
@@ -882,7 +887,8 @@ function courseCurriculumSkeleton() {
882
 
883
  const moreSections = document.querySelectorAll('.curriculum-more__button');
884
  [...moreSections].map(async moreSection => {
885
- if (moreSection.contains(e.target)) {
 
886
  const paged = parseInt(moreSection.dataset.page);
887
  const sections = moreSection.parentNode.parentNode.querySelector('.curriculum-sections');
888
 
607
 
608
  function courseCurriculumSkeleton() {
609
  let courseID = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
610
+ let isLoadingItems = false;
611
+ let isLoadingSections = false;
612
 
613
  const Sekeleton = () => {
614
  const elementCurriculum = document.querySelector('.learnpress-course-curriculum');
790
  }
791
  }
792
 
793
+ isLoadingItems = false;
794
  return {
795
  data3: returnData,
796
  pages3: pages || data.pages,
834
  }
835
  }
836
 
837
+ isLoadingSections = false;
838
  return {
839
  data2: returnData,
840
  pages2: pages || data.pages,
848
  document.addEventListener('click', e => {
849
  const sectionBtns = document.querySelectorAll('.section-item__loadmore');
850
  [...sectionBtns].map(async sectionBtn => {
851
+ if (sectionBtn.contains(e.target) && !isLoadingItems) {
852
+ isLoadingItems = true;
853
  const sectionItem = sectionBtn.parentNode;
854
  const sectionId = sectionItem.getAttribute('data-section-id');
855
  const sectionContent = sectionItem.querySelector('.section-content');
887
 
888
  const moreSections = document.querySelectorAll('.curriculum-more__button');
889
  [...moreSections].map(async moreSection => {
890
+ if (moreSection.contains(e.target) && !isLoadingSections) {
891
+ isLoadingSections = true;
892
  const paged = parseInt(moreSection.dataset.page);
893
  const sections = moreSection.parentNode.parentNode.querySelector('.curriculum-sections');
894
 
assets/js/dist/frontend/single-curriculum.js.map ADDED
@@ -0,0 +1 @@
 
1
+ {"version":3,"file":"./assets/js/dist/frontend/single-curriculum.js","mappings":";;;;;;;;;;;;AAAA;AAEA,MAAMC,0BAA0B,GAAG;AAClCC,EAAAA,iBAAiB,EAAE,IADe;AAElCC,EAAAA,iBAAiB,EAAE,IAFe;;AAGlCC,EAAAA,IAAI,GAAG;AACN,QAAK,CAAEJ,oEAAA,EAAP,EAA+B;AAC9B;AACA;;AAED,QAAKK,SAAS,KAAKC,gBAAd,IAAkC,UAAUA,gBAAgB,CAACC,kCAAlE,EAAuG;AACtG;AACA;;AAED,SAAKL,iBAAL,GAAyBM,QAAQ,CAACC,gBAAT,CAA2B,uBAA3B,CAAzB;AACA,SAAKN,iBAAL,GAAyBK,QAAQ,CAACE,aAAT,CAAwB,uBAAxB,CAAzB;;AAEA,QAAK,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AD,OADD,EAEC3J,QAAQ,CAACoP,cAAT,CAAyB,+BAAzB,CAFD;AAIA,CALM;AAOPpP,QAAQ,CAACG,gBAAT,CAA2B,kBAA3B,EAA+C,UAAUoG,KAAV,EAAkB;AAChEjE,EAAAA,EAAE,CAACC,IAAH,CAAQU,QAAR,CAAkB,cAAlB;AACAxD,EAAAA,2EAAA,GAFgE,CAGhE;AACA;AACA,CALD;AAOA,MAAM4P,oBAAoB,GAAGC,WAAW,CAAE,YAAW;AACpD,QAAM5D,iBAAiB,GAAG1L,QAAQ,CAACE,aAAT,CAAwB,+BAAxB,CAA1B;;AACA,MAAKwL,iBAAL,EAAyB;AACxBL,IAAAA,uEAAwB;AACxBkE,IAAAA,aAAa,CAAEF,oBAAF,CAAb;AACA;AACD,CANuC,EAMrC,CANqC,CAAxC,C","sources":["webpack://learnpress/./assets/src/apps/js/frontend/show-lp-overlay-complete-item.js","webpack://learnpress/./assets/src/apps/js/frontend/single-curriculum/components/comment.js","webpack://learnpress/./assets/src/apps/js/frontend/single-curriculum/components/compatible.js","webpack://learnpress/./assets/src/apps/js/frontend/single-curriculum/components/items-progress.js","webpack://learnpress/./assets/src/apps/js/frontend/single-curriculum/components/progress.js","webpack://learnpress/./assets/src/apps/js/frontend/single-curriculum/components/search.js","webpack://learnpress/./assets/src/apps/js/frontend/single-curriculum/components/sidebar.js","webpack://learnpress/./assets/src/apps/js/frontend/single-curriculum/index.js","webpack://learnpress/./assets/src/apps/js/frontend/single-curriculum/scrolltoitem.js","webpack://learnpress/./assets/src/apps/js/frontend/single-curriculum/skeleton.js","webpack://learnpress/./assets/src/apps/js/utils/lp-modal-overlay.js","webpack://learnpress/external window [\"wp\",\"apiFetch\"]","webpack://learnpress/external window [\"wp\",\"element\"]","webpack://learnpress/external window [\"wp\",\"url\"]","webpack://learnpress/webpack/bootstrap","webpack://learnpress/webpack/runtime/compat get default export","webpack://learnpress/webpack/runtime/define property getters","webpack://learnpress/webpack/runtime/hasOwnProperty shorthand","webpack://learnpress/webpack/runtime/make namespace object","webpack://learnpress/./assets/src/apps/js/frontend/single-curriculum.js"],"sourcesContent":["import lpModalOverlay from '../utils/lp-modal-overlay';\n\nconst lpModalOverlayCompleteItem = {\n\telBtnFinishCourse: null,\n\telBtnCompleteItem: null,\n\tinit() {\n\t\tif ( ! lpModalOverlay.init() ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( undefined === lpGlobalSettings || 'yes' !== lpGlobalSettings.option_enable_popup_confirm_finish ) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.elBtnFinishCourse = document.querySelectorAll( '.lp-btn-finish-course' );\n\t\tthis.elBtnCompleteItem = document.querySelector( '.lp-btn-complete-item' );\n\n\t\tif ( this.elBtnCompleteItem ) {\n\t\t\tthis.elBtnCompleteItem.addEventListener( 'click', ( e ) => {\n\t\t\t\te.preventDefault();\n\n\t\t\t\tconst form = e.target.closest( 'form' );\n\n\t\t\t\tlpModalOverlay.elLPOverlay.show();\n\t\t\t\tlpModalOverlay.setTitleModal( form.dataset.title );\n\t\t\t\tlpModalOverlay.setContentModal( '<div class=\"pd-2em\">' + form.dataset.confirm + '</div>' );\n\t\t\t\tlpModalOverlay.callBackYes = () => {\n\t\t\t\t\tform.submit();\n\t\t\t\t};\n\t\t\t} );\n\t\t}\n\n\t\tif ( this.elBtnFinishCourse ) {\n\t\t\tthis.elBtnFinishCourse.forEach( ( element ) => element.addEventListener( 'click', ( e ) => {\n\t\t\t\te.preventDefault();\n\n\t\t\t\tconst form = e.target.closest( 'form' );\n\n\t\t\t\tlpModalOverlay.elLPOverlay.show();\n\t\t\t\tlpModalOverlay.setTitleModal( form.dataset.title );\n\t\t\t\tlpModalOverlay.setContentModal( '<div class=\"pd-2em\">' + form.dataset.confirm + '</div>' );\n\t\t\t\tlpModalOverlay.callBackYes = () => {\n\t\t\t\t\tform.submit();\n\t\t\t\t};\n\t\t\t} ) );\n\t\t}\n\t},\n};\n\nexport default lpModalOverlayCompleteItem;\n","/**\n * Toogle form Comment for Lesson.\n *\n * @author Nhamdv.\n */\n\nexport const commentForm = () => {\n\tconst btn = document.querySelector( '.lp-lesson-comment-btn' );\n\n\tif ( ! btn ) {\n\t\treturn;\n\t}\n\n\tconst btnOpen = btn.textContent;\n\tconst btnClose = btn.dataset.close;\n\tconst hashComment = window.location.hash;\n\n\tif ( hashComment.includes( 'comment' ) ) {\n\t\tbtn.parentNode.classList.add( 'open-comments' );\n\t}\n\n\tconst toogleText = ( btn, btnParent ) => {\n\t\tif ( btnParent.classList.contains( 'open-comments' ) ) {\n\t\t\tbtn.textContent = btnClose;\n\t\t} else {\n\t\t\tbtn.textContent = btnOpen;\n\t\t}\n\t};\n\n\ttoogleText( btn, btn.parentNode );\n\n\tbtn.addEventListener( 'click', ( e ) => {\n\t\te.preventDefault();\n\n\t\tbtn.parentNode.classList.toggle( 'open-comments' );\n\t\ttoogleText( btn, btn.parentNode );\n\t} );\n\n\t// Use for Rest API.\n\t// const toogle = $( '#learn-press-item-comments-toggle' );\n\n\t// toogle.on( 'change', async function() {\n\t// \tif ( ! toogle[ 0 ].checked ) {\n\t// \t\treturn;\n\t// \t}\n\n\t// \tconst response = await wp.apiFetch( {\n\t// \t\tpath: 'lp/v1/courses/339/item-comments/50',\n\t// \t} );\n\n\t// \t$( '.learn-press-comments' ).html( response.comments );\n\t// } );\n};\n","/**\n * Compatible with Page Builder.\n *\n * @author nhamdv\n */\n\nLP.Hook.addAction( 'lp-compatible-builder', () => {\n\tLP.Hook.removeAction( 'lp-compatible-builder' );\n\n\tif ( typeof elementorFrontend !== 'undefined' ) {\n\t\t[ ...document.querySelectorAll( '#popup-content' ) ][ 0 ].addEventListener( 'scroll', () => {\n\t\t\tWaypoint.refreshAll();\n\t\t\twindow.dispatchEvent( new Event( 'resize' ) );\n\t\t} );\n\t}\n\n\tif ( typeof vc_js !== 'undefined' && typeof VcWaypoint !== 'undefined' ) {\n\t\t[ ...document.querySelectorAll( '#popup-content' ) ][ 0 ].addEventListener( 'scroll', () => {\n\t\t\tVcWaypoint.refreshAll();\n\t\t} );\n\t}\n} );\n\nLP.Hook.addAction( 'lp-quiz-compatible-builder', () => {\n\tLP.Hook.removeAction( 'lp-quiz-compatible-builder' );\n\n\tLP.Hook.doAction( 'lp-compatible-builder' );\n\n\tif ( typeof elementorFrontend !== 'undefined' ) {\n\t\treturn window.elementorFrontend.init();\n\t}\n\n\tif ( typeof vc_js !== 'undefined' ) {\n\t\tif ( typeof vc_round_charts !== 'undefined' ) {\n\t\t\tvc_round_charts();\n\t\t}\n\n\t\tif ( typeof vc_pieChart !== 'undefined' ) {\n\t\t\tvc_pieChart();\n\t\t}\n\t\tif ( typeof vc_line_charts !== 'undefined' ) {\n\t\t\tvc_line_charts();\n\t\t}\n\n\t\treturn window.vc_js();\n\t}\n} );\n\nLP.Hook.addAction( 'lp-question-compatible-builder', () => {\n\tLP.Hook.removeAction( 'lp-question-compatible-builder' );\n\tLP.Hook.removeAction( 'lp-quiz-compatible-builder' );\n\tLP.Hook.doAction( 'lp-compatible-builder' );\n\n\tif ( typeof elementorFrontend !== 'undefined' ) {\n\t\treturn window.elementorFrontend.init();\n\t}\n\n\tif ( typeof vc_js !== 'undefined' ) {\n\t\tif ( typeof vc_round_charts !== 'undefined' ) {\n\t\t\tvc_round_charts();\n\t\t}\n\n\t\tif ( typeof vc_pieChart !== 'undefined' ) {\n\t\t\tvc_pieChart();\n\t\t}\n\t\tif ( typeof vc_line_charts !== 'undefined' ) {\n\t\t\tvc_line_charts();\n\t\t}\n\n\t\treturn window.vc_js();\n\t}\n} );\n","// Rest API load content course progress - Nhamdv.\nimport { addQueryArgs } from '@wordpress/url';\nimport lpModalOverlayCompleteItem from '../../show-lp-overlay-complete-item';\n\nexport const itemsProgress = () => {\n\tconst elements = document.querySelectorAll( '.popup-header__inner' );\n\n\tif ( ! elements.length ) {\n\t\treturn;\n\t}\n\n\tif ( document.querySelector( '#learn-press-quiz-app div.quiz-result' ) !== null ) {\n\t\treturn;\n\t}\n\n\tif ( elements[ 0 ].querySelectorAll( 'form.form-button-finish-course' ).length !== 0 ) {\n\t\treturn;\n\t}\n\n\tif ( 'IntersectionObserver' in window ) {\n\t\tconst eleObserver = new IntersectionObserver( ( entries, observer ) => {\n\t\t\tentries.forEach( ( entry ) => {\n\t\t\t\tif ( entry.isIntersecting ) {\n\t\t\t\t\tconst ele = entry.target;\n\n\t\t\t\t\tgetResponse( ele );\n\n\t\t\t\t\teleObserver.unobserve( ele );\n\t\t\t\t}\n\t\t\t} );\n\t\t} );\n\n\t\t[ ...elements ].map( ( ele ) => eleObserver.observe( ele ) );\n\t}\n};\n\nexport const getResponse = async ( ele ) => {\n\tconst response = await wp.apiFetch( {\n\t\tpath: addQueryArgs( 'lp/v1/lazy-load/items-progress', {\n\t\t\tcourseId: lpGlobalSettings.post_id || '',\n\t\t\tuserId: lpGlobalSettings.user_id || '',\n\t\t} ),\n\t\tmethod: 'GET',\n\t} );\n\n\tconst { data } = response;\n\n\tele.innerHTML += data;\n\n\tlpModalOverlayCompleteItem.init();\n};\n","const $ = jQuery;\n\nexport const progressBar = () => {\n\t$( '.learn-press-progress' ).each( function() {\n\t\tconst $progress = $( this );\n\t\tconst $active = $progress.find( '.learn-press-progress__active' );\n\t\tconst value = $active.data( 'value' );\n\n\t\tif ( value === undefined ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$active.css( 'left', -( 100 - parseInt( value ) ) + '%' );\n\t} );\n};\n","\nexport const searchCourseContent = () => {\n\tconst popup = document.querySelector( '#popup-course' );\n\tconst list = document.querySelector( '#learn-press-course-curriculum' );\n\n\tif ( popup && list ) {\n\t\tconst items = list.querySelector( '.curriculum-sections' );\n\t\tconst form = popup.querySelector( '.search-course' );\n\t\tconst search = popup.querySelector( '.search-course input[type=\"text\"]' );\n\n\t\tif ( ! search || ! items || ! form ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst sections = items.querySelectorAll( 'li.section' );\n\t\tconst dataItems = items.querySelectorAll( 'li.course-item' );\n\n\t\tconst dataSearch = [];\n\n\t\tdataItems.forEach( ( item ) => {\n\t\t\tconst itemID = item.dataset.id;\n\t\t\tconst name = item.querySelector( '.item-name' );\n\n\t\t\tdataSearch.push( {\n\t\t\t\tid: itemID,\n\t\t\t\tname: name ? name.textContent.toLowerCase() : '',\n\t\t\t} );\n\t\t} );\n\n\t\tconst submit = ( event ) => {\n\t\t\tevent.preventDefault();\n\n\t\t\tconst inputVal = search.value;\n\n\t\t\tform.classList.add( 'searching' );\n\n\t\t\tif ( ! inputVal ) {\n\t\t\t\tform.classList.remove( 'searching' );\n\t\t\t}\n\n\t\t\tconst outputs = [];\n\n\t\t\tdataSearch.forEach( ( i ) => {\n\t\t\t\tif ( ! inputVal || i.name.match( inputVal.toLowerCase() ) ) {\n\t\t\t\t\toutputs.push( i.id );\n\n\t\t\t\t\tdataItems.forEach( ( c ) => {\n\t\t\t\t\t\tif ( outputs.indexOf( c.dataset.id ) !== -1 ) {\n\t\t\t\t\t\t\tc.classList.remove( 'hide-if-js' );\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tc.classList.add( 'hide-if-js' );\n\t\t\t\t\t\t}\n\t\t\t\t\t} );\n\t\t\t\t}\n\t\t\t} );\n\n\t\t\tsections.forEach( ( section ) => {\n\t\t\t\tconst listItem = section.querySelectorAll( '.course-item' );\n\t\t\t\tconst isTrue = [];\n\n\t\t\t\tlistItem.forEach( ( a ) => {\n\t\t\t\t\tif ( outputs.includes( a.dataset.id ) ) {\n\t\t\t\t\t\tisTrue.push( a.dataset.id );\n\t\t\t\t\t}\n\t\t\t\t} );\n\n\t\t\t\tif ( isTrue.length === 0 ) {\n\t\t\t\t\tsection.classList.add( 'hide-if-js' );\n\t\t\t\t} else {\n\t\t\t\t\tsection.classList.remove( 'hide-if-js' );\n\t\t\t\t}\n\t\t\t} );\n\t\t};\n\n\t\tconst clear = form.querySelector( '.clear' );\n\n\t\tif ( clear ) {\n\t\t\tclear.addEventListener( 'click', ( e ) => {\n\t\t\t\te.preventDefault();\n\t\t\t\tsearch.value = '';\n\n\t\t\t\tsubmit( e );\n\t\t\t} );\n\t\t}\n\n\t\tform.addEventListener( 'submit', submit );\n\t\tsearch.addEventListener( 'keyup', submit );\n\t}\n};\n","const $ = jQuery;\nconst { throttle } = lodash;\n\nexport const Sidebar = () => {\n\t// Tungnx - Show/hide sidebar curriculumn\n\tconst elSidebarToggle = document.querySelector( '#sidebar-toggle' );\n\n\t// For style of theme\n\tconst toggleSidebar = ( toggle ) => {\n\t\t$( 'body' ).removeClass( 'lp-sidebar-toggle__open' );\n\t\t$( 'body' ).removeClass( 'lp-sidebar-toggle__close' );\n\n\t\tif ( toggle ) {\n\t\t\t$( 'body' ).addClass( 'lp-sidebar-toggle__close' );\n\t\t} else {\n\t\t\t$( 'body' ).addClass( 'lp-sidebar-toggle__open' );\n\t\t}\n\t};\n\n\t// For lp and theme\n\tif ( elSidebarToggle ) {\n\t\tif ( $( window ).innerWidth() <= 768 ) {\n\t\t\telSidebarToggle.setAttribute( 'checked', 'checked' );\n\t\t} else if ( LP.Cookies.get( 'sidebar-toggle' ) ) {\n\t\t\telSidebarToggle.setAttribute( 'checked', 'checked' );\n\t\t} else {\n\t\t\telSidebarToggle.removeAttribute( 'checked' );\n\t\t}\n\n\t\tdocument.querySelector( '#popup-course' ).addEventListener( 'click', ( e ) => {\n\t\t\tif ( e.target.id === 'sidebar-toggle' ) {\n\t\t\t\tLP.Cookies.set( 'sidebar-toggle', e.target.checked ? true : false );\n\t\t\t\ttoggleSidebar( LP.Cookies.get( 'sidebar-toggle' ) );\n\t\t\t}\n\t\t} );\n\t}\n\t// End editor by tungnx\n\n\tconst $curriculum = $( '#learn-press-course-curriculum' );\n\t$curriculum.find( '.section-desc' ).each( ( i, el ) => {\n\t\tconst a = $( '<span class=\"show-desc\"></span>' ).on( 'click', () => {\n\t\t\tb.toggleClass( 'c' );\n\t\t} );\n\t\tconst b = $( el ).siblings( '.section-title' ).append( a );\n\t} );\n\n\t$( '.section' ).each( function() {\n\t\tconst $section = $( this ),\n\t\t\t$toggle = $section.find( '.section-left' );\n\n\t\t$toggle.on( 'click', function() {\n\t\t\tconst isClose = $section.toggleClass( 'closed' ).hasClass( 'closed' );\n\t\t\tconst sections = LP.Cookies.get( 'closed-section-' + lpGlobalSettings.post_id ) || [];\n\t\t\tconst sectionId = parseInt( $section.data( 'section-id' ) );\n\t\t\tconst at = sections.findIndex( ( id ) => {\n\t\t\t\treturn id == sectionId;\n\t\t\t} );\n\n\t\t\tif ( isClose ) {\n\t\t\t\tsections.push( parseInt( $section.data( 'section-id' ) ) );\n\t\t\t} else {\n\t\t\t\tsections.splice( at, 1 );\n\t\t\t}\n\n\t\t\tLP.Cookies.remove( 'closed-section-(.*)' );\n\t\t\tLP.Cookies.set( 'closed-section-' + lpGlobalSettings.post_id, [ ...new Set( sections ) ] );\n\t\t} );\n\t} );\n};\n\n","const $ = jQuery;\nimport { Component } from '@wordpress/element';\nimport { searchCourseContent } from './components/search';\nimport { Sidebar } from './components/sidebar';\nimport { progressBar } from './components/progress';\nimport { commentForm } from './components/comment';\nimport { itemsProgress } from './components/items-progress';\n\nimport './components/compatible';\n\nclass SingleCurriculums extends Component {\n\tcheckCourseDurationExpire() {\n\t\tconst elCourseItemIsBlockeds = document.getElementsByName( 'lp-course-timestamp-remaining' );\n\n\t\tif ( elCourseItemIsBlockeds.length ) {\n\t\t\tconst elCourseItemIsBlocked = elCourseItemIsBlockeds[ 0 ];\n\t\t\tconst timeDuration = elCourseItemIsBlocked.value; // value is second\n\n\t\t\tif ( timeDuration < ( 60 * 60 * 24 ) ) { // compare with 1 day\n\t\t\t\tsetTimeout(\n\t\t\t\t\tfunction() {\n\t\t\t\t\t\twindow.location.reload( true );\n\t\t\t\t\t},\n\t\t\t\t\ttimeDuration * 1000\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t}\n\trender() {\n\t\treturn (\n\t\t\t<div></div>\n\t\t);\n\t}\n}\n\nexport default SingleCurriculums;\n\ndocument.addEventListener( 'DOMContentLoaded', () => {\n\tLP.Hook.doAction( 'lp-compatible-builder' );\n\n\tsearchCourseContent();\n\tSidebar();\n\tprogressBar();\n\t//commentForm();\n\titemsProgress();\n\n\t// Check duration expire of course\n\tconst singleCurriculums = new SingleCurriculums();\n\tsingleCurriculums.checkCourseDurationExpire();\n} );\n","import lpModalOverlay from '../../utils/lp-modal-overlay';\n\nconst $ = jQuery;\n\nconst scrollToItemCurrent = {\n\tinit() {\n\t\tthis.scrollToItemViewing = function() {\n\t\t\tconst elItemViewing = $( '.viewing-course-item' );\n\t\t\tif ( elItemViewing.length ) {\n\t\t\t\tconst elCourseCurriculumn = $( '#learn-press-course-curriculum' );\n\t\t\t\tconst heightCourseItemContentHeader = $( '#popup-sidebar' ).outerHeight();\n\t\t\t\tconst heightSectionTitle = $( '.section-title' ).outerHeight();\n\t\t\t\tconst heightSectionHeader = $( '.section-header' ).outerHeight();\n\t\t\t\tconst regex = new RegExp( '^viewing-course-item-([0-9].*)' );\n\t\t\t\tconst classList = elItemViewing.attr( 'class' );\n\t\t\t\tconst classArr = classList.split( /\\s+/ );\n\t\t\t\tlet idItem = 0;\n\n\t\t\t\t$.each( classArr, function( i, className ) {\n\t\t\t\t\tconst compare = regex.exec( className );\n\n\t\t\t\t\tif ( compare ) {\n\t\t\t\t\t\tidItem = compare[ 1 ];\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t} );\n\n\t\t\t\tif ( 0 === idItem ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tconst elItemCurrent = $( '.course-item-' + idItem );\n\t\t\t\tconst offSetTop = elItemCurrent.offset().top;\n\t\t\t\tconst offset = elItemCurrent.offset().top - elCourseCurriculumn.offset().top +\n\t\t\t\t\telCourseCurriculumn.scrollTop();\n\n\t\t\t\telCourseCurriculumn.animate( {\n\t\t\t\t\tscrollTop: LP.Hook.applyFilters( 'scroll-item-current', offset - heightSectionHeader ),\n\t\t\t\t}, 800 );\n\t\t\t}\n\t\t};\n\t\tthis.scrollToItemViewing();\n\t},\n};\n\nexport default scrollToItemCurrent;\n","\n// Rest API load content in Tab Curriculum - Nhamdv.\nimport { addQueryArgs } from '@wordpress/url';\nimport apiFetch from '@wordpress/api-fetch';\nimport scrollToItemCurrent from './scrolltoitem';\nimport { searchCourseContent } from './components/search';\n\nexport default function courseCurriculumSkeleton( courseID = '' ) {\n\tlet isLoadingItems = false;\n\tlet isLoadingSections = false;\n\tconst Sekeleton = () => {\n\t\tconst elementCurriculum = document.querySelector( '.learnpress-course-curriculum' );\n\n\t\tif ( ! elementCurriculum ) {\n\t\t\treturn;\n\t\t}\n\n\t\tgetResponse( elementCurriculum );\n\t};\n\n\tconst getResponse = async ( ele ) => {\n\t\tconst skeleton = ele.querySelector( '.lp-skeleton-animation' );\n\t\tconst itemID = ele.dataset.id;\n\t\tconst sectionID = ele.dataset.section;\n\n\t\ttry {\n\t\t\tconst page = 1;\n\t\t\tconst response = await apiFetch( {\n\t\t\t\tpath: addQueryArgs( 'lp/v1/lazy-load/course-curriculum', {\n\t\t\t\t\tcourseId: courseID || lpGlobalSettings.post_id || '',\n\t\t\t\t\tpage,\n\t\t\t\t\tsectionID: sectionID || '',\n\t\t\t\t} ),\n\t\t\t\tmethod: 'GET',\n\t\t\t} );\n\n\t\t\tconst { data, status, message } = response;\n\t\t\tlet section_ids = data.section_ids;\n\n\t\t\tif ( status === 'error' ) {\n\t\t\t\tthrow new Error( message || 'Error' );\n\t\t\t}\n\n\t\t\tlet returnData = data.content;\n\t\t\tif ( undefined === returnData ) { // For old Eduma <= 4.6.0\n\t\t\t\treturnData = data;\n\t\t\t\tsection_ids = response.section_ids;\n\t\t\t}\n\n\t\t\tif ( sectionID ) {\n\t\t\t\tif ( section_ids && ! section_ids.includes( sectionID ) ) {\n\t\t\t\t\tconst response2 = await getResponsive( '', page + 1, sectionID );\n\n\t\t\t\t\tif ( response2 ) {\n\t\t\t\t\t\tconst { data2, pages2, page2 } = response2;\n\n\t\t\t\t\t\tawait parseContentItems( { ele, returnData, sectionID, itemID, data2, pages2, page2 } );\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tawait parseContentItems( { ele, returnData, sectionID, itemID } );\n\t\t\t\t}\n \t\t\t} else {\n\t\t\t\treturnData && ele.insertAdjacentHTML( 'beforeend', returnData );\n\t\t\t}\n\t\t} catch ( error ) {\n\t\t\tele.insertAdjacentHTML( 'beforeend', `<div class=\"lp-ajax-message error\" style=\"display:block\">${ error.message || 'Error: Query lp/v1/lazy-load/course-curriculum' }</div>` );\n\t\t}\n\n\t\tskeleton && skeleton.remove();\n\n\t\tsearchCourseContent();\n\t};\n\n\tconst parseContentItems = async ( { ele, returnData, sectionID, itemID, data2, pages2, page2 } ) => {\n\t\tconst parser = new DOMParser();\n\t\tconst doc = parser.parseFromString( returnData, 'text/html' );\n\n\t\tif ( data2 ) {\n\t\t\tconst sections = doc.querySelector( '.curriculum-sections' );\n\n\t\t\tconst loadMoreBtn = doc.querySelector( '.curriculum-more__button' );\n\n\t\t\tif ( loadMoreBtn ) {\n\t\t\t\tif ( pages2 <= page2 ) {\n\t\t\t\t\tloadMoreBtn.remove();\n\t\t\t\t} else {\n\t\t\t\t\tloadMoreBtn.dataset.page = page2;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tsections.insertAdjacentHTML( 'beforeend', data2 );\n\t\t}\n\n\t\tconst section = doc.querySelector( `[data-section-id=\"${ sectionID }\"]` );\n\n\t\tif ( section ) {\n\t\t\tconst items = section.querySelectorAll( '.course-item' );\n\t\t\tconst item_ids = [ ...items ].map( ( item ) => item.dataset.id );\n\t\t\tconst sectionContent = section.querySelector( '.section-content' );\n\t\t\tconst itemLoadMore = section.querySelector( '.section-item__loadmore' );\n\n\t\t\tif ( itemID && ! item_ids.includes( itemID ) ) {\n\t\t\t\tconst responseItem = await getResponsiveItem( '', 2, sectionID, itemID );\n\n\t\t\t\tconst { data3, pages3, paged3, page } = responseItem;\n\n\t\t\t\tif ( pages3 <= paged3 || pages3 <= page ) {\n\t\t\t\t\titemLoadMore.remove();\n\t\t\t\t} else {\n\t\t\t\t\titemLoadMore.dataset.page = page;\n\t\t\t\t}\n\n\t\t\t\tif ( data3 && sectionContent ) {\n\t\t\t\t\tsectionContent.insertAdjacentHTML( 'beforeend', data3 );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tele.insertAdjacentHTML( 'beforeend', doc.body.innerHTML );\n\n\t\tscrollToItemCurrent.init();\n\t};\n\n\tconst getResponsiveItem = async ( returnData, paged, sectionID, itemID ) => {\n\t\tconst response = await apiFetch( {\n\t\t\tpath: addQueryArgs( 'lp/v1/lazy-load/course-curriculum-items', {\n\t\t\t\tsectionId: sectionID || '',\n\t\t\t\tpage: paged,\n\t\t\t} ),\n\t\t\tmethod: 'GET',\n\t\t} );\n\n\t\tconst { data, status, pages, message } = response;\n\n\t\tconst { page } = data;\n\n\t\tlet item_ids;\n\n\t\tif ( status === 'success' ) {\n\t\t\tlet dataTmp = data.content;\n\t\t\titem_ids = data.item_ids;\n\n\t\t\tif ( undefined === dataTmp ) { // For old Eduma <= 4.6.0\n\t\t\t\tdataTmp = data;\n\t\t\t\titem_ids = response.item_ids;\n\t\t\t}\n\n\t\t\treturnData += dataTmp;\n\n\t\t\tif ( sectionID && item_ids && itemID && ! item_ids.includes( itemID ) ) {\n\t\t\t\treturn getResponsiveItem( returnData, paged + 1, sectionID, itemID );\n\t\t\t}\n\t\t}\n\n\t\tisLoadingItems = false;\n\n\t\treturn { data3: returnData, pages3: pages || data.pages, status3: status, message3: message, page: page || 0 };\n\t};\n\n\tconst getResponsive = async ( returnData, page, sectionID ) => {\n\t\tconst response = await apiFetch( {\n\t\t\tpath: addQueryArgs( 'lp/v1/lazy-load/course-curriculum', {\n\t\t\t\tcourseId: courseID || lpGlobalSettings.post_id || '',\n\t\t\t\tpage,\n\t\t\t\tsectionID: sectionID || '',\n\t\t\t\tloadMore: true,\n\t\t\t} ),\n\t\t\tmethod: 'GET',\n\t\t} );\n\n\t\tconst { data, status, message } = response;\n\n\t\tlet returnDataTmp = data.content;\n\t\tlet section_ids = data.section_ids;\n\t\tlet pages = data.pages;\n\t\tif ( undefined === returnDataTmp ) { // For old Eduma <= 4.6.0\n\t\t\treturnDataTmp = data;\n\t\t\tsection_ids = response.section_ids;\n\t\t\tpages = response.pages;\n\t\t}\n\n\t\tif ( status === 'success' ) {\n\t\t\treturnData += returnDataTmp;\n\n\t\t\tif ( sectionID && section_ids && section_ids.length > 0 && ! section_ids.includes( sectionID ) ) {\n\t\t\t\treturn getResponsive( returnData, page + 1, sectionID );\n\t\t\t}\n\t\t}\n\n\t\tisLoadingSections = false;\n\n\t\treturn { data2: returnData, pages2: pages || data.pages, page2: page, status2: status, message2: message };\n\t};\n\n\tSekeleton();\n\n\tdocument.addEventListener( 'click', ( e ) => {\n\t\tconst sectionBtns = document.querySelectorAll( '.section-item__loadmore' );\n\n\t\t[ ...sectionBtns ].map( async ( sectionBtn ) => {\n\t\t\tif ( sectionBtn.contains( e.target ) && ! isLoadingItems ) {\n\t\t\t\tisLoadingItems = true;\n\t\t\t\tconst sectionItem = sectionBtn.parentNode;\n\t\t\t\tconst sectionId = sectionItem.getAttribute( 'data-section-id' );\n\t\t\t\tconst sectionContent = sectionItem.querySelector( '.section-content' );\n\n\t\t\t\tconst paged = parseInt( sectionBtn.dataset.page );\n\n\t\t\t\tsectionBtn.classList.add( 'loading' );\n\n\t\t\t\ttry {\n\t\t\t\t\tconst response = await getResponsiveItem( '', paged + 1, sectionId, '' );\n\n\t\t\t\t\tconst { data3, pages3, status3, message3 } = response;\n\n\t\t\t\t\tif ( status3 === 'error' ) {\n\t\t\t\t\t\tthrow new Error( message3 || 'Error' );\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( pages3 <= paged + 1 ) {\n\t\t\t\t\t\tsectionBtn.remove();\n\t\t\t\t\t} else {\n\t\t\t\t\t\tsectionBtn.dataset.page = paged + 1;\n\t\t\t\t\t}\n\n\t\t\t\t\tsectionContent.insertAdjacentHTML( 'beforeend', data3 );\n\t\t\t\t} catch ( e ) {\n\t\t\t\t\tsectionContent.insertAdjacentHTML( 'beforeend', `<div class=\"lp-ajax-message error\" style=\"display:block\">${ e.message || 'Error: Query lp/v1/lazy-load/course-curriculum' }</div>` );\n\t\t\t\t}\n\n\t\t\t\tsectionBtn.classList.remove( 'loading' );\n\n\t\t\t\tsearchCourseContent();\n\t\t\t}\n\t\t} );\n\n\t\t// Load more Sections\n\t\tconst moreSections = document.querySelectorAll( '.curriculum-more__button' );\n\n\t\t[ ...moreSections ].map( async ( moreSection ) => {\n\t\t\tif ( moreSection.contains( e.target ) && ! isLoadingSections ) {\n\t\t\t\tisLoadingSections = true;\n\t\t\t\tconst paged = parseInt( moreSection.dataset.page );\n\n\t\t\t\tconst sections = moreSection.parentNode.parentNode.querySelector( '.curriculum-sections' );\n\n\t\t\t\tif ( paged && sections ) {\n\t\t\t\t\tmoreSection.classList.add( 'loading' );\n\n\t\t\t\t\ttry {\n\t\t\t\t\t\tconst response2 = await getResponsive( '', paged + 1, '' );\n\n\t\t\t\t\t\tconst { data2, pages2, status2, message2 } = response2;\n\n\t\t\t\t\t\tif ( status2 === 'error' ) {\n\t\t\t\t\t\t\tthrow new Error( message2 || 'Error' );\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif ( pages2 <= paged + 1 ) {\n\t\t\t\t\t\t\tmoreSection.remove();\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tmoreSection.dataset.page = paged + 1;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tsections.insertAdjacentHTML( 'beforeend', data2 );\n\t\t\t\t\t} catch ( e ) {\n\t\t\t\t\t\tsections.insertAdjacentHTML( 'beforeend', `<div class=\"lp-ajax-message error\" style=\"display:block\">${ e.message || 'Error: Query lp/v1/lazy-load/course-curriculum' }</div>` );\n\t\t\t\t\t}\n\n\t\t\t\t\tmoreSection.classList.remove( 'loading' );\n\n\t\t\t\t\tsearchCourseContent();\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\n\t\t// Show/Hide accordion\n\t\tif ( document.querySelector( '.learnpress-course-curriculum' ) ) {\n\t\t\tconst sections = document.querySelectorAll( '.section' );\n\n\t\t\t[ ...sections ].map( ( section ) => {\n\t\t\t\tif ( section.contains( e.target ) ) {\n\t\t\t\t\tconst toggle = section.querySelector( '.section-left' );\n\n\t\t\t\t\ttoggle.contains( e.target ) && section.classList.toggle( 'closed' );\n\t\t\t\t}\n\t\t\t} );\n\t\t}\n\t} );\n}\n","const $ = jQuery;\nlet elLPOverlay = null;\nconst lpModalOverlay = {\n\telLPOverlay: null,\n\telMainContent: null,\n\telTitle: null,\n\telBtnYes: null,\n\telBtnNo: null,\n\telFooter: null,\n\telCalledModal: null,\n\tcallBackYes: null,\n\tinstance: null,\n\tinit() {\n\t\tif ( this.instance ) {\n\t\t\treturn true;\n\t\t}\n\n\t\tthis.elLPOverlay = $( '.lp-overlay' );\n\n\t\tif ( ! this.elLPOverlay.length ) {\n\t\t\treturn false;\n\t\t}\n\t\telLPOverlay = this.elLPOverlay;\n\n\t\tthis.elMainContent = elLPOverlay.find( '.main-content' );\n\t\tthis.elTitle = elLPOverlay.find( '.modal-title' );\n\t\tthis.elBtnYes = elLPOverlay.find( '.btn-yes' );\n\t\tthis.elBtnNo = elLPOverlay.find( '.btn-no' );\n\t\tthis.elFooter = elLPOverlay.find( '.lp-modal-footer' );\n\n\t\t$( document ).on( 'click', '.close, .btn-no', function() {\n\t\t\telLPOverlay.hide();\n\t\t} );\n\n\t\t$( document ).on( 'click', '.btn-yes', function( e ) {\n\t\t\te.preventDefault();\n\t\t\te.stopPropagation();\n\n\t\t\tif ( 'function' === typeof lpModalOverlay.callBackYes ) {\n\t\t\t\tlpModalOverlay.callBackYes();\n\t\t\t}\n\t\t} );\n\n\t\tthis.instance = this;\n\n\t\treturn true;\n\t},\n\tsetElCalledModal( elCalledModal ) {\n\t\tthis.elCalledModal = elCalledModal;\n\t},\n\tsetContentModal( content, event ) {\n\t\tthis.elMainContent.html( content );\n\t\tif ( 'function' === typeof event ) {\n\t\t\tevent();\n\t\t}\n\t},\n\tsetTitleModal( content ) {\n\t\tthis.elTitle.html( content );\n\t},\n};\n\nexport default lpModalOverlay;\n","module.exports = window[\"wp\"][\"apiFetch\"];","module.exports = window[\"wp\"][\"element\"];","module.exports = window[\"wp\"][\"url\"];","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = function(module) {\n\tvar getter = module && module.__esModule ?\n\t\tfunction() { return module['default']; } :\n\t\tfunction() { return module; };\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = function(exports, definition) {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }","// define __esModule on exports\n__webpack_require__.r = function(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};","import SingleCurriculums from './single-curriculum/index';\nimport lpModalOverlayCompleteItem from './show-lp-overlay-complete-item';\nimport courseCurriculumSkeleton from './single-curriculum/skeleton';\n\nexport default SingleCurriculums;\n\nexport const init = () => {\n\twp.element.render(\n\t\t<SingleCurriculums />,\n\t\tdocument.getElementById( 'learn-press-course-curriculum' )\n\t);\n};\n\ndocument.addEventListener( 'DOMContentLoaded', function( event ) {\n\tLP.Hook.doAction( 'course-ready' );\n\tlpModalOverlayCompleteItem.init();\n\t//courseCurriculumSkeleton();\n\t//init();\n} );\n\nconst detectedElCurriculum = setInterval( function() {\n\tconst elementCurriculum = document.querySelector( '.learnpress-course-curriculum' );\n\tif ( elementCurriculum ) {\n\t\tcourseCurriculumSkeleton();\n\t\tclearInterval( detectedElCurriculum );\n\t}\n}, 1 );\n"],"names":["lpModalOverlay","lpModalOverlayCompleteItem","elBtnFinishCourse","elBtnCompleteItem","init","undefined","lpGlobalSettings","option_enable_popup_confirm_finish","document","querySelectorAll","querySelector","addEventListener","e","preventDefault","form","target","closest","elLPOverlay","show","setTitleModal","dataset","title","setContentModal","confirm","callBackYes","submit","forEach","element","commentForm","btn","btnOpen","textContent","btnClose","close","hashComment","window","location","hash","includes","parentNode","classList","add","toogleText","btnParent","contains","toggle","LP","Hook","addAction","removeAction","elementorFrontend","Waypoint","refreshAll","dispatchEvent","Event","vc_js","VcWaypoint","doAction","vc_round_charts","vc_pieChart","vc_line_charts","addQueryArgs","itemsProgress","elements","length","eleObserver","IntersectionObserver","entries","observer","entry","isIntersecting","ele","getResponse","unobserve","map","observe","response","wp","apiFetch","path","courseId","post_id","userId","user_id","method","data","innerHTML","$","jQuery","progressBar","each","$progress","$active","find","value","css","parseInt","searchCourseContent","popup","list","items","search","sections","dataItems","dataSearch","item","itemID","id","name","push","toLowerCase","event","inputVal","remove","outputs","i","match","c","indexOf","section","listItem","isTrue","a","clear","throttle","lodash","Sidebar","elSidebarToggle","toggleSidebar","removeClass","addClass","innerWidth","setAttribute","Cookies","get","removeAttribute","set","checked","$curriculum","el","on","b","toggleClass","siblings","append","$section","$toggle","isClose","hasClass","sectionId","at","findIndex","splice","Set","Component","SingleCurriculums","checkCourseDurationExpire","elCourseItemIsBlockeds","getElementsByName","elCourseItemIsBlocked","timeDuration","setTimeout","reload","render","singleCurriculums","scrollToItemCurrent","scrollToItemViewing","elItemViewing","elCourseCurriculumn","heightCourseItemContentHeader","outerHeight","heightSectionTitle","heightSectionHeader","regex","RegExp","attr","classArr","split","idItem","className","compare","exec","elItemCurrent","offSetTop","offset","top","scrollTop","animate","applyFilters","courseCurriculumSkeleton","courseID","isLoadingItems","isLoadingSections","Sekeleton","elementCurriculum","skeleton","sectionID","page","status","message","section_ids","Error","returnData","content","response2","getResponsive","data2","pages2","page2","parseContentItems","insertAdjacentHTML","error","parser","DOMParser","doc","parseFromString","loadMoreBtn","item_ids","sectionContent","itemLoadMore","responseItem","getResponsiveItem","data3","pages3","paged3","body","paged","pages","dataTmp","status3","message3","loadMore","returnDataTmp","status2","message2","sectionBtns","sectionBtn","sectionItem","getAttribute","moreSections","moreSection","elMainContent","elTitle","elBtnYes","elBtnNo","elFooter","elCalledModal","instance","hide","stopPropagation","setElCalledModal","html","getElementById","detectedElCurriculum","setInterval","clearInterval"],"sourceRoot":""}
assets/js/dist/frontend/single-curriculum.min.asset.php ADDED
@@ -0,0 +1 @@
 
1
+ <?php return array('dependencies' => array('wp-api-fetch', 'wp-element', 'wp-url'), 'version' => 'a717a073228489a5c984');
assets/js/dist/frontend/single-curriculum.min.deps.json ADDED
@@ -0,0 +1 @@
 
1
+ []
assets/js/dist/frontend/widgets.asset.php ADDED
@@ -0,0 +1 @@
 
1
+ <?php return array('dependencies' => array('wp-url'), 'version' => '3ea3e748910e2087b501');
assets/js/dist/frontend/widgets.deps.json ADDED
@@ -0,0 +1 @@
 
1
+ []
assets/js/dist/frontend/widgets.js.map ADDED
@@ -0,0 +1 @@
 
1
+ {"version":3,"file":"./assets/js/dist/frontend/widgets.js","mappings":";;;;;;;;;;AAAA;;;;;;UCAA;UACA;;UAEA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UAC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,IAAAA,GAAG,CAACc,aAAJ,CAAmB,wBAAnB,EAA8CC,MAA9C;AACA,GApBD;;AAsBA,MAAK,0BAA0BC,MAA/B,EAAwC;AACvC,UAAMC,WAAW,GAAG,IAAIC,oBAAJ,CAA0B,CAAEC,OAAF,EAAWC,QAAX,KAAyB;AACtED,MAAAA,OAAO,CAACE,OAAR,CAAmBC,KAAF,IAAa;AAC7B,YAAKA,KAAK,CAACC,cAAX,EAA4B;AAC3B,gBAAMvB,GAAG,GAAGsB,KAAK,CAACE,MAAlB;AAEAzB,UAAAA,WAAW,CAAEC,GAAF,CAAX;AAEAiB,UAAAA,WAAW,CAACQ,SAAZ,CAAuBzB,GAAvB;AACA;AACD,OARD;AASA,KAVmB,CAApB;AAYA,KAAE,GAAGL,OAAL,EAAe+B,GAAf,CAAsB1B,GAAF,IAAWA,GAAG,CAAC2B,SAAJ,CAAcC,QAAd,CAAwB,oCAAxB,KAAkEX,WAAW,CAACY,OAAZ,CAAqB7B,GAArB,CAAjG;AACA;AACD;;AAEDJ,QAAQ,CAACkC,gBAAT,CAA2B,kBAA3B,EAA+C,UAAUC,KAAV,EAAkB;AAChErC,EAAAA,aAAa;AACb,CAFD,E","sources":["webpack://learnpress/external window [\"wp\",\"url\"]","webpack://learnpress/webpack/bootstrap","webpack://learnpress/webpack/runtime/compat get default export","webpack://learnpress/webpack/runtime/define property getters","webpack://learnpress/webpack/runtime/hasOwnProperty shorthand","webpack://learnpress/webpack/runtime/make namespace object","webpack://learnpress/./assets/src/apps/js/frontend/widgets.js"],"sourcesContent":["module.exports = window[\"wp\"][\"url\"];","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = function(module) {\n\tvar getter = module && module.__esModule ?\n\t\tfunction() { return module['default']; } :\n\t\tfunction() { return module; };\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = function(exports, definition) {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }","// define __esModule on exports\n__webpack_require__.r = function(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};","import { addQueryArgs } from '@wordpress/url';\n\nfunction widgetRestAPI() {\n\tconst widgets = document.querySelectorAll( '.learnpress-widget-wrapper' );\n\n\tif ( ! widgets.length ) {\n\t\treturn;\n\t}\n\n\tconst getResponse = async ( ele ) => {\n\t\tconst widget = ele.dataset.widget ? JSON.parse( ele.dataset.widget ) : '';\n\n\t\tconst response = await wp.apiFetch( {\n\t\t\tpath: 'lp/v1/widgets/api',\n\t\t\tmethod: 'POST',\n\t\t\tdata: { ...widget },\n\t\t} );\n\n\t\tconst { data, status, message } = response;\n\n\t\tif ( data && status === 'success' ) {\n\t\t\tele.insertAdjacentHTML( 'afterbegin', data );\n\t\t} else if ( message ) {\n\t\t\tele.insertAdjacentHTML( 'afterbegin', `<div class=\"lp-ajax-message error\" style=\"display:block\">${ message }</div>` );\n\t\t}\n\n\t\tdelete ele.dataset.widget;\n\n\t\tele.querySelector( '.lp-skeleton-animation' ).remove();\n\t};\n\n\tif ( 'IntersectionObserver' in window ) {\n\t\tconst eleObserver = new IntersectionObserver( ( entries, observer ) => {\n\t\t\tentries.forEach( ( entry ) => {\n\t\t\t\tif ( entry.isIntersecting ) {\n\t\t\t\t\tconst ele = entry.target;\n\n\t\t\t\t\tgetResponse( ele );\n\n\t\t\t\t\teleObserver.unobserve( ele );\n\t\t\t\t}\n\t\t\t} );\n\t\t} );\n\n\t\t[ ...widgets ].map( ( ele ) => ele.classList.contains( 'learnpress-widget-wrapper__restapi' ) && eleObserver.observe( ele ) );\n\t}\n}\n\ndocument.addEventListener( 'DOMContentLoaded', function( event ) {\n\twidgetRestAPI();\n} );\n"],"names":["addQueryArgs","widgetRestAPI","widgets","document","querySelectorAll","length","getResponse","ele","widget","dataset","JSON","parse","response","wp","apiFetch","path","method","data","status","message","insertAdjacentHTML","querySelector","remove","window","eleObserver","IntersectionObserver","entries","observer","forEach","entry","isIntersecting","target","unobserve","map","classList","contains","observe","addEventListener","event"],"sourceRoot":""}
assets/js/dist/frontend/widgets.min.asset.php ADDED
@@ -0,0 +1 @@
 
1
+ <?php return array('dependencies' => array('wp-url'), 'version' => 'd1e586939f095dce9f2b');
assets/js/dist/frontend/widgets.min.deps.json ADDED
@@ -0,0 +1 @@
 
1
+ []
assets/js/dist/js/data-controls.asset.php ADDED
@@ -0,0 +1 @@
 
1
+ <?php return array('dependencies' => array('wp-api-fetch'), 'version' => '2b4023b9929d4688d46f');
assets/js/dist/js/data-controls.deps.json ADDED
@@ -0,0 +1 @@
 
1
+ []
assets/js/dist/js/data-controls.js.map ADDED
@@ -0,0 +1 @@
 
1
+ {"version":3,"file":"./assets/js/dist/js/data-controls.js","mappings":";;;;;;;;;;AAAA;;;;;;UCAA;UACA;;UAEA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;UAEA;UACA;;UAEA;UACA;UACA;;;;;WCtBA;WACA;WACA;WACA,eAAe,4BAA4B;WAC3C,eAAe;WACf,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AAnB,EAA+BI,UAA/B,EAA6C,GAAGF,IAAhD,CAAP;AACA,GAH6B;AAXR,CAAjB,C","sources":["webpack://learnpress/external window [\"wp\",\"apiFetch\"]","webpack://learnpress/webpack/bootstrap","webpack://learnpress/webpack/runtime/compat get default export","webpack://learnpress/webpack/runtime/define property getters","webpack://learnpress/webpack/runtime/hasOwnProperty shorthand","webpack://learnpress/webpack/runtime/make namespace object","webpack://learnpress/./assets/src/apps/js/data-controls.js"],"sourcesContent":["module.exports = window[\"wp\"][\"apiFetch\"];","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = function(module) {\n\tvar getter = module && module.__esModule ?\n\t\tfunction() { return module['default']; } :\n\t\tfunction() { return module; };\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = function(exports, definition) {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }","// define __esModule on exports\n__webpack_require__.r = function(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};","import triggerFetch from '@wordpress/api-fetch';\n\nconst createRegistryControl = function createRegistryControl( registryControl ) {\n\tregistryControl.isRegistryControl = true;\n\n\treturn registryControl;\n};\n\nexport const apiFetch = ( request ) => {\n\treturn {\n\t\ttype: 'API_FETCH',\n\t\trequest,\n\t};\n};\n\nexport function select( storeKey, selectorName, ...args ) {\n\treturn {\n\t\ttype: 'SELECT',\n\t\tstoreKey,\n\t\tselectorName,\n\t\targs,\n\t};\n}\n\nexport function dispatch( storeKey, actionName, ...args ) {\n\treturn {\n\t\ttype: 'DISPATCH',\n\t\tstoreKey,\n\t\tactionName,\n\t\targs,\n\t};\n}\n\nconst resolveSelect = ( registry, { storeKey, selectorName, args } ) => {\n\treturn new Promise( ( resolve ) => {\n\t\tconst hasFinished = () => registry.select( '' )\n\t\t\t.hasFinishedResolution( storeKey, selectorName, args );\n\n\t\tconst getResult = () => registry.select( storeKey )[ selectorName ]\n\t\t\t.apply( null, args );\n\n\t\tconst result = getResult();\n\n\t\tif ( hasFinished() ) {\n\t\t\treturn resolve( result );\n\t\t}\n\n\t\tconst unsubscribe = registry.subscribe( () => {\n\t\t\tif ( hasFinished() ) {\n\t\t\t\tunsubscribe();\n\t\t\t\tresolve( getResult() );\n\t\t\t}\n\t\t} );\n\t} );\n};\n\nexport const controls = {\n\tAPI_FETCH( { request } ) {\n\t\treturn triggerFetch( request );\n\t},\n\tSELECT: createRegistryControl(\n\t\t( registry ) => ( { storeKey, selectorName, args } ) => {\n\t\t\treturn registry.select( storeKey )[ selectorName ].hasResolver\n\t\t\t\t? resolveSelect( registry, { storeKey, selectorName, args } )\n\t\t\t\t: registry.select( storeKey )[ selectorName ]( ...args );\n\t\t}\n\t),\n\tDISPATCH: createRegistryControl(\n\t\t( registry ) => ( { storeKey, actionName, args } ) => {\n\t\t\treturn registry.dispatch( storeKey )[ actionName ]( ...args );\n\t\t}\n\t),\n};\n"],"names":["triggerFetch","createRegistryControl","registryControl","isRegistryControl","apiFetch","request","type","select","storeKey","selectorName","args","dispatch","actionName","resolveSelect","registry","Promise","resolve","hasFinished","hasFinishedResolution","getResult","apply","result","unsubscribe","subscribe","controls","API_FETCH","SELECT","hasResolver","DISPATCH"],"sourceRoot":""}
assets/js/dist/js/data-controls.min.asset.php ADDED
@@ -0,0 +1 @@
 
1
+ <?php return array('dependencies' => array('wp-api-fetch'), 'version' => 'b39461812dcfb44ac610');
assets/js/dist/js/data-controls.min.deps.json ADDED
@@ -0,0 +1 @@
 
1
+ []
assets/js/dist/utils.asset.php ADDED
@@ -0,0 +1 @@
 
1
+ <?php return array('dependencies' => array(), 'version' => '5f9c2256bdaa311b61ec');
assets/js/dist/utils.js.map ADDED
@@ -0,0 +1 @@
 
1
+ {"version":3,"file":"./assets/js/dist/utils.js","mappings":";;;;;;;;;;;AAAA,MAAMA,OAAO,GAAG;AACfC,EAAAA,GAAG,EAAE,CAAEC,IAAF,EAAQC,GAAR,EAAaC,MAAb,KAAyB;AAC7B,QAAIC,GAAJ;;AAEA,QAAKD,MAAL,EAAc;AACbC,MAAAA,GAAG,GAAGC,SAAS,CAACL,GAAV,CAAeC,IAAf,CAAN;AACA,KAFD,MAEO;AACN,UAAIK,EAAE,GAAGD,SAAS,CAACL,GAAV,CAAe,IAAf,CAAT;;AACA,UAAKM,EAAL,EAAU;AACTA,QAAAA,EAAE,GAAGC,IAAI,CAACC,KAAL,CAAYF,EAAZ,CAAL;AACAF,QAAAA,GAAG,GAAGH,IAAI,GAAGK,EAAE,CAAEL,IAAF,CAAL,GAAgBK,EAA1B;AACA;AACD;;AAED,QAAK,CAAEF,GAAF,IAASA,GAAG,KAAKF,GAAtB,EAA4B;AAC3BE,MAAAA,GAAG,GAAGF,GAAN;AACA;;AAED,WAAOE,GAAP;AACA,GAnBc;;AAqBfK,EAAAA,GAAG,CAAER,IAAF,EAAQS,KAAR,EAAeC,OAAf,EAAwBC,IAAxB,EAA8BC,MAA9B,EAAsCC,MAAtC,EAA+C;AACjD,QAAKC,SAAS,CAACC,MAAV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cookies.js","webpack://learnpress/./assets/src/js/utils/event-callback.js","webpack://learnpress/./assets/src/js/utils/extend.js","webpack://learnpress/./assets/src/js/utils/fn.js","webpack://learnpress/./assets/src/js/utils/hook.js","webpack://learnpress/./assets/src/js/utils/iframe-submit.js","webpack://learnpress/./assets/src/js/utils/jquery.plugins.js","webpack://learnpress/./assets/src/js/utils/local-storage.js","webpack://learnpress/./assets/src/js/utils/message-box.js","webpack://learnpress/./assets/src/js/utils/quick-tip.js","webpack://learnpress/./assets/src/js/utils/show-password.js","webpack://learnpress/webpack/bootstrap","webpack://learnpress/webpack/runtime/compat get default export","webpack://learnpress/webpack/runtime/define property getters","webpack://learnpress/webpack/runtime/hasOwnProperty shorthand","webpack://learnpress/webpack/runtime/make namespace object","webpack://learnpress/./assets/src/js/utils/index.js"],"sourcesContent":["const Cookies = {\n\tget: ( name, def, global ) => {\n\t\tlet ret;\n\n\t\tif ( global ) {\n\t\t\tret = wpCookies.get( name );\n\t\t} else {\n\t\t\tlet ck = wpCookies.get( 'LP' );\n\t\t\tif ( ck ) {\n\t\t\t\tck = JSON.parse( ck );\n\t\t\t\tret = name ? ck[ name ] : ck;\n\t\t\t}\n\t\t}\n\n\t\tif ( ! ret && ret !== def ) {\n\t\t\tret = def;\n\t\t}\n\n\t\treturn ret;\n\t},\n\n\tset( name, value, expires, path, domain, secure ) {\n\t\tif ( arguments.length > 2 ) {\n\t\t\twpCookies.set( name, value, expires, path, domain, secure );\n\t\t} else if ( arguments.length == 2 ) {\n\t\t\tlet ck = wpCookies.get( 'LP' );\n\n\t\t\tif ( ck ) {\n\t\t\t\tck = JSON.parse( ck );\n\t\t\t} else {\n\t\t\t\tck = {};\n\t\t\t}\n\n\t\t\tck[ name ] = value;\n\n\t\t\twpCookies.set( 'LP', JSON.stringify( ck ), '', '/' );\n\t\t} else {\n\t\t\twpCookies.set( 'LP', JSON.stringify( name ), '', '/' );\n\t\t}\n\t},\n\n\tremove( name ) {\n\t\tconst allCookies = Cookies.get();\n\t\tconst reg = new RegExp( name, 'g' );\n\t\tconst newCookies = {};\n\t\tconst useRegExp = name.match( /\\*/ );\n\n\t\tfor ( const i in allCookies ) {\n\t\t\tif ( useRegExp ) {\n\t\t\t\tif ( ! i.match( reg ) ) {\n\t\t\t\t\tnewCookies[ i ] = allCookies[ i ];\n\t\t\t\t}\n\t\t\t} else if ( name != i ) {\n\t\t\t\tnewCookies[ i ] = allCookies[ i ];\n\t\t\t}\n\t\t}\n\n\t\tCookies.set( newCookies );\n\t},\n};\n\nexport default Cookies;\n","/**\n * Manage event callbacks.\nAllow add/remove a callback function into custom event of an object.\n *\n * @class\n * @param self\n */\nconst Event_Callback = function Event_Callback( self ) {\n\tconst callbacks = {};\n\tconst $ = window.jQuery;\n\n\tthis.on = function( event, callback ) {\n\t\tlet namespaces = event.split( '.' ),\n\t\t\tnamespace = '';\n\n\t\tif ( namespaces.length > 1 ) {\n\t\t\tevent = namespaces[ 0 ];\n\t\t\tnamespace = namespaces[ 1 ];\n\t\t}\n\n\t\tif ( ! callbacks[ event ] ) {\n\t\t\tcallbacks[ event ] = [ [], {} ];\n\t\t}\n\n\t\tif ( namespace ) {\n\t\t\tif ( ! callbacks[ event ][ 1 ][ namespace ] ) {\n\t\t\t\tcallbacks[ event ][ 1 ][ namespace ] = [];\n\t\t\t}\n\t\t\tcallbacks[ event ][ 1 ][ namespace ].push( callback );\n\t\t} else {\n\t\t\tcallbacks[ event ][ 0 ].push( callback );\n\t\t}\n\n\t\treturn self;\n\t};\n\n\tthis.off = function( event, callback ) {\n\t\tlet namespaces = event.split( '.' ),\n\t\t\tnamespace = '';\n\n\t\tif ( namespaces.length > 1 ) {\n\t\t\tevent = namespaces[ 0 ];\n\t\t\tnamespace = namespaces[ 1 ];\n\t\t}\n\n\t\tif ( ! callbacks[ event ] ) {\n\t\t\treturn self;\n\t\t}\n\t\tlet at = -1;\n\t\tif ( ! namespace ) {\n\t\t\tif ( typeof callback === 'function' ) {\n\t\t\t\tat = callbacks[ event ][ 0 ].indexOf( callback );\n\t\t\t\tif ( at < 0 ) {\n\t\t\t\t\treturn self;\n\t\t\t\t}\n\t\t\t\tcallbacks[ event ][ 0 ].splice( at, 1 );\n\t\t\t} else {\n\t\t\t\tcallbacks[ event ][ 0 ] = [];\n\t\t\t}\n\t\t} else {\n\t\t\tif ( ! callbacks[ event ][ 1 ][ namespace ] ) {\n\t\t\t\treturn self;\n\t\t\t}\n\n\t\t\tif ( typeof callback === 'function' ) {\n\t\t\t\tat = callbacks[ event ][ 1 ][ namespace ].indexOf( callback );\n\t\t\t\tif ( at < 0 ) {\n\t\t\t\t\treturn self;\n\t\t\t\t}\n\t\t\t\tcallbacks[ event ][ 1 ][ namespace ].splice( at, 1 );\n\t\t\t} else {\n\t\t\t\tcallbacks[ event ][ 1 ][ namespace ] = [];\n\t\t\t}\n\t\t}\n\n\t\treturn self;\n\t};\n\n\tthis.callEvent = function( event, callbackArgs ) {\n\t\tif ( ! callbacks[ event ] ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( callbacks[ event ][ 0 ] ) {\n\t\t\tfor ( var i = 0; i < callbacks[ event ][ 0 ].length; i++ ) {\n\t\t\t\ttypeof ( callbacks[ event ][ 0 ][ i ] ) === 'function' && callbacks[ event ][ i ][ 0 ].apply( self, callbackArgs );\n\t\t\t}\n\t\t}\n\n\t\tif ( callbacks[ event ][ 1 ] ) {\n\t\t\tfor ( var i in callbacks[ event ][ 1 ] ) {\n\t\t\t\tfor ( let j = 0; j < callbacks[ event ][ 1 ][ i ].length; j++ ) {\n\t\t\t\t\ttypeof ( callbacks[ event ][ 1 ][ i ][ j ] ) === 'function' && callbacks[ event ][ 1 ][ i ][ j ].apply( self, callbackArgs );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t};\n};\n\nexport default Event_Callback;\n","export default function() {\n\twindow.LP = window.LP || {};\n\n\tif ( typeof arguments[ 0 ] === 'string' ) {\n\t\tLP[ arguments[ 0 ] ] = LP[ arguments[ 0 ] ] || {};\n\t\tLP[ arguments[ 0 ] ] = jQuery.extend( LP[ arguments[ 0 ] ], arguments[ 1 ] );\n\t} else {\n\t\tLP = jQuery.extend( LP, arguments[ 0 ] );\n\t}\n}\n","/**\n * Auto prepend `LP` prefix for jQuery fn plugin name.\n *\n * Create : $.fn.LP( 'PLUGIN_NAME', func) <=> $.fn.LP_PLUGIN_NAME\n * Usage: $(selector).LP('PLUGIN_NAME') <=> $(selector).LP_PLUGIN_NAME()\n *\n * @version 3.2.6\n */\n\nconst $ = window.jQuery;\nlet exp;\n\n( function() {\n\tif ( $ === undefined ) {\n\t\treturn;\n\t}\n\n\t$.fn.LP = exp = function( widget, fn ) {\n\t\tif ( typeof fn === 'function' ) {\n\t\t\t$.fn[ 'LP_' + widget ] = fn;\n\t\t} else if ( widget ) {\n\t\t\tconst args = [];\n\t\t\tif ( arguments.length > 1 ) {\n\t\t\t\tfor ( let i = 1; i < arguments.length; i++ ) {\n\t\t\t\t\targs.push( arguments[ i ] );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn typeof ( $( this )[ 'LP_' + widget ] ) === 'function' ? $( this )[ 'LP_' + widget ].apply( this, args ) : this;\n\t\t}\n\t\treturn this;\n\t};\n}() );\n\nexport default exp;\n","const Hook = {\n\thooks: { action: {}, filter: {} },\n\taddAction( action, callable, priority, tag ) {\n\t\tthis.addHook( 'action', action, callable, priority, tag );\n\t\treturn this;\n\t},\n\taddFilter( action, callable, priority, tag ) {\n\t\tthis.addHook( 'filter', action, callable, priority, tag );\n\t\treturn this;\n\t},\n\tdoAction( action ) {\n\t\treturn this.doHook( 'action', action, arguments );\n\t},\n\tapplyFilters( action ) {\n\t\treturn this.doHook( 'filter', action, arguments );\n\t},\n\tremoveAction( action, tag ) {\n\t\tthis.removeHook( 'action', action, tag );\n\t\treturn this;\n\t},\n\tremoveFilter( action, priority, tag ) {\n\t\tthis.removeHook( 'filter', action, priority, tag );\n\t\treturn this;\n\t},\n\taddHook( hookType, action, callable, priority, tag ) {\n\t\tif ( undefined === this.hooks[ hookType ][ action ] ) {\n\t\t\tthis.hooks[ hookType ][ action ] = [];\n\t\t}\n\t\tconst hooks = this.hooks[ hookType ][ action ];\n\t\tif ( undefined === tag ) {\n\t\t\ttag = action + '_' + hooks.length;\n\t\t}\n\t\tthis.hooks[ hookType ][ action ].push( { tag, callable, priority } );\n\t\treturn this;\n\t},\n\tdoHook( hookType, action, args ) {\n\t\targs = Array.prototype.slice.call( args, 1 );\n\n\t\tif ( undefined !== this.hooks[ hookType ][ action ] ) {\n\t\t\tlet hooks = this.hooks[ hookType ][ action ],\n\t\t\t\thook;\n\n\t\t\thooks.sort( function( a, b ) {\n\t\t\t\treturn a.priority - b.priority;\n\t\t\t} );\n\n\t\t\tfor ( let i = 0; i < hooks.length; i++ ) {\n\t\t\t\thook = hooks[ i ].callable;\n\t\t\t\tif ( typeof hook !== 'function' ) {\n\t\t\t\t\thook = window[ hook ];\n\t\t\t\t}\n\n\t\t\t\tif ( 'action' === hookType ) {\n\t\t\t\t\targs[ i ] = hook.apply( null, args );\n\t\t\t\t} else {\n\t\t\t\t\targs[ 0 ] = hook.apply( null, args );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif ( 'filter' === hookType ) {\n\t\t\treturn args[ 0 ];\n\t\t}\n\t\treturn args;\n\t},\n\tremoveHook( hookType, action, priority, tag ) {\n\t\tif ( undefined !== this.hooks[ hookType ][ action ] ) {\n\t\t\tconst hooks = this.hooks[ hookType ][ action ];\n\t\t\tfor ( let i = hooks.length - 1; i >= 0; i-- ) {\n\t\t\t\tif ( ( undefined === tag || tag === hooks[ i ].tag ) && ( undefined === priority || priority === hooks[ i ].priority ) ) {\n\t\t\t\t\thooks.splice( i, 1 );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn this;\n\t},\n};\n\nexport default Hook;\n","let iframeCounter = 1;\nconst $ = window.jQuery || jQuery;\n\nconst IframeSubmit = function( form ) {\n\tconst iframeId = 'ajax-iframe-' + iframeCounter;\n\tlet $iframe = $( 'form[name=\"' + iframeId + '\"]' );\n\n\tif ( ! $iframe.length ) {\n\t\t$iframe = $( '<iframe />' ).appendTo( document.body ).attr( {\n\t\t\tname: iframeId,\n\t\t\tsrc: '#',\n\t\t} );\n\t}\n\n\t$( form ).on( 'submit', function() {\n\t\tconst $form = $( form ).clone().appendTo( document.body );\n\n\t\t$form.attr( 'target', iframeId );\n\t\t$form.find( '#submit' ).remove();\n\n\t\treturn false;\n\t} );\n\n\tiframeCounter++;\n};\n\nexport default IframeSubmit;\n","const $ = window.jQuery || jQuery;\n\nconst serializeJSON = function serializeJSON( path ) {\n\tconst isInput = $( this ).is( 'input' ) || $( this ).is( 'select' ) || $( this ).is( 'textarea' );\n\tlet unIndexed = isInput ? $( this ).serializeArray() : $( this ).find( 'input, select, textarea' ).serializeArray(),\n\t\tindexed = {},\n\t\tvalidate = /(\\[([a-zA-Z0-9_-]+)?\\]?)/g,\n\t\tarrayKeys = {},\n\t\tend = false;\n\t$.each( unIndexed, function() {\n\t\tconst that = this,\n\t\t\tmatch = this.name.match( /^([0-9a-zA-Z_-]+)/ );\n\t\tif ( ! match ) {\n\t\t\treturn;\n\t\t}\n\t\tlet keys = this.name.match( validate ),\n\t\t\tobjPath = \"indexed['\" + match[ 0 ] + \"']\";\n\n\t\tif ( keys ) {\n\t\t\tif ( typeof indexed[ match[ 0 ] ] != 'object' ) {\n\t\t\t\tindexed[ match[ 0 ] ] = {};\n\t\t\t}\n\n\t\t\t$.each( keys, function( i, prop ) {\n\t\t\t\tprop = prop.replace( /\\]|\\[/g, '' );\n\t\t\t\tlet rawPath = objPath.replace( /'|\\[|\\]/g, '' ),\n\t\t\t\t\tobjExp = '',\n\t\t\t\t\tpreObjPath = objPath;\n\n\t\t\t\tif ( prop == '' ) {\n\t\t\t\t\tif ( arrayKeys[ rawPath ] == undefined ) {\n\t\t\t\t\t\tarrayKeys[ rawPath ] = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tarrayKeys[ rawPath ]++;\n\t\t\t\t\t}\n\t\t\t\t\tobjPath += \"['\" + arrayKeys[ rawPath ] + \"']\";\n\t\t\t\t} else {\n\t\t\t\t\tif ( ! isNaN( prop ) ) {\n\t\t\t\t\t\tarrayKeys[ rawPath ] = prop;\n\t\t\t\t\t}\n\t\t\t\t\tobjPath += \"['\" + prop + \"']\";\n\t\t\t\t}\n\t\t\t\ttry {\n\t\t\t\t\tif ( i == keys.length - 1 ) {\n\t\t\t\t\t\tobjExp = objPath + '=that.value;';\n\t\t\t\t\t\tend = true;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tobjExp = objPath + '={}';\n\t\t\t\t\t\tend = false;\n\t\t\t\t\t}\n\n\t\t\t\t\tconst evalString = '' +\n 'if( typeof ' + objPath + \" == 'undefined'){\" + objExp + ';' +\n '}else{' +\n 'if(end){' +\n 'if(typeof ' + preObjPath + \"!='object'){\" + preObjPath + '={};}' +\n objExp +\n '}' +\n '}';\n\t\t\t\t\teval( evalString );\n\t\t\t\t} catch ( e ) {\n\t\t\t\t\tconsole.log( 'Error:' + e + '\\n' + objExp );\n\t\t\t\t}\n\t\t\t} );\n\t\t} else {\n\t\t\tindexed[ match[ 0 ] ] = this.value;\n\t\t}\n\t} );\n\tif ( path ) {\n\t\tpath = \"['\" + path.replace( '.', \"']['\" ) + \"']\";\n\t\tconst c = 'try{indexed = indexed' + path + '}catch(ex){console.log(c, ex);}';\n\t\teval( c );\n\t}\n\treturn indexed;\n};\n\nconst LP_Tooltip = ( options ) => {\n\toptions = $.extend( {}, { offset: [ 0, 0 ] }, options || {} );\n\n\treturn $.each( this, function() {\n\t\tconst $el = $( this ),\n\t\t\tcontent = $el.data( 'content' );\n\n\t\tif ( ! content || ( $el.data( 'LP_Tooltip' ) !== undefined ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tlet $tooltip = null;\n\n\t\t$el.on( 'mouseenter', function( e ) {\n\t\t\t$tooltip = $( '<div class=\"learn-press-tooltip-bubble\"/>' ).html( content ).appendTo( $( 'body' ) ).hide();\n\t\t\tconst position = $el.offset();\n\n\t\t\tif ( Array.isArray( options.offset ) ) {\n\t\t\t\tconst top = options.offset[ 1 ],\n\t\t\t\t\tleft = options.offset[ 0 ];\n\n\t\t\t\tif ( $.isNumeric( left ) ) {\n\t\t\t\t\tposition.left += left;\n\t\t\t\t} else {\n\n\t\t\t\t}\n\t\t\t\tif ( $.isNumeric( top ) ) {\n\t\t\t\t\tposition.top += top;\n\t\t\t\t} else {\n\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$tooltip.css( {\n\t\t\t\ttop: position.top,\n\t\t\t\tleft: position.left,\n\t\t\t} );\n\n\t\t\t$tooltip.fadeIn();\n\t\t} );\n\n\t\t$el.on( 'mouseleave', function( e ) {\n\t\t\t$tooltip && $tooltip.remove();\n\t\t} );\n\n\t\t$el.data( 'tooltip', true );\n\t} );\n};\n\nconst hasEvent = function hasEvent( name ) {\n\tconst events = $( this ).data( 'events' );\n\tif ( typeof events.LP == 'undefined' ) {\n\t\treturn false;\n\t}\n\tfor ( i = 0; i < events.LP.length; i++ ) {\n\t\tif ( events.LP[ i ].namespace == name ) {\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n};\n\nconst dataToJSON = function dataToJSON() {\n\tconst json = {};\n\t$.each( this[ 0 ].attributes, function() {\n\t\tconst m = this.name.match( /^data-(.*)/ );\n\t\tif ( m ) {\n\t\t\tjson[ m[ 1 ] ] = this.value;\n\t\t}\n\t} );\n\treturn json;\n};\n\nconst rows = function rows() {\n\tconst h = $( this ).height();\n\tconst lh = $( this ).css( 'line-height' ).replace( 'px', '' );\n\t$( this ).attr( { height: h, 'line-height': lh } );\n\n\treturn Math.floor( h / parseInt( lh ) );\n};\n\nconst checkLines = function checkLines( p ) {\n\treturn this.each( function() {\n\t\tconst $e = $( this ),\n\t\t\trows = $e.rows();\n\n\t\tp.call( this, rows );\n\t} );\n};\n\nconst findNext = function findNext( selector ) {\n\tconst $selector = $( selector ),\n\t\t$root = this.first(),\n\t\tindex = $selector.index( $root ),\n\t\t$next = $selector.eq( index + 1 );\n\treturn $next.length ? $next : false;\n};\n\nconst findPrev = function findPrev( selector ) {\n\tconst $selector = $( selector ),\n\t\t$root = this.first(),\n\t\tindex = $selector.index( $root ),\n\t\t$prev = $selector.eq( index - 1 );\n\treturn $prev.length ? $prev : false;\n};\n\nconst progress = function progress( v ) {\n\treturn this.each( function() {\n\t\tconst t = parseInt( v / 100 * 360 ),\n\t\t\ttimer = null,\n\t\t\t$this = $( this );\n\n\t\tif ( t < 180 ) {\n\t\t\t$this.find( '.progress-circle' ).removeClass( 'gt-50' );\n\t\t} else {\n\t\t\t$this.find( '.progress-circle' ).addClass( 'gt-50' );\n\t\t}\n\t\t$this.find( '.fill' ).css( {\n\t\t\ttransform: 'rotate(' + t + 'deg)',\n\t\t} );\n\t} );\n};\n\n$.fn.serializeJSON = serializeJSON;\n$.fn.LP_Tooltip = LP_Tooltip;\n$.fn.hasEvent = hasEvent;\n$.fn.dataToJSON = dataToJSON;\n$.fn.rows = rows;\n$.fn.checkLines = checkLines;\n$.fn.findNext = findNext;\n$.fn.findPrev = findPrev;\n$.fn.progress = progress;\n\nexport default {\n\tserializeJSON,\n\tLP_Tooltip,\n\thasEvent,\n\tdataToJSON,\n\trows,\n\tcheckLines,\n\tfindNext,\n\tfindPrev,\n\tprogress,\n};\n","const _localStorage = {\n\t__key: 'LP',\n\tset( name, value ) {\n\t\tconst data = _localStorage.get();\n\t\tconst { set } = lodash;\n\n\t\tset( data, name, value );\n\n\t\tlocalStorage.setItem( _localStorage.__key, JSON.stringify( data ) );\n\t},\n\n\tget( name, def ) {\n\t\tconst data = JSON.parse( localStorage.getItem( _localStorage.__key ) || '{}' );\n\t\tconst { get } = lodash;\n\t\tconst value = get( data, name );\n\n\t\treturn ! name ? data : ( value !== undefined ? value : def );\n\t},\n\n\texists( name ) {\n\t\tconst data = _localStorage.get();\n\n\t\t// return data.hasOwnProperty( name );\n\t\treturn name in data;\n\t},\n\n\tremove( name ) {\n\t\tconst data = _localStorage.get();\n\t\tconst newData = lodash.omit( data, name );\n\n\t\t_localStorage.__set( newData );\n\t},\n\t__get() {\n\t\treturn localStorage.getItem( _localStorage.__key );\n\t},\n\t__set( data ) {\n\t\tlocalStorage.setItem( _localStorage.__key, JSON.stringify( data || '{}' ) );\n\t},\n};\n\nexport default _localStorage;\n","const $ = window.jQuery;\nconst MessageBox = {\n\t$block: null,\n\t$window: null,\n\tevents: {},\n\tinstances: [],\n\tinstance: null,\n\tquickConfirm( elem, args ) {\n\t\tconst $e = $( elem );\n\t\t$( '[learn-press-quick-confirm]' ).each( function() {\n\t\t\tlet $ins;\n\t\t\t( $ins = $( this ).data( 'quick-confirm' ) ) && ( console.log( $ins ), $ins.destroy() );\n\t\t} );\n\t\t! $e.attr( 'learn-press-quick-confirm' ) && $e.attr( 'learn-press-quick-confirm', 'true' ).data( 'quick-confirm',\n\t\t\tnew ( function( elem, args ) {\n\t\t\t\tvar $elem = $( elem ),\n\t\t\t\t\t$div = $( '<span class=\"learn-press-quick-confirm\"></span>' ).insertAfter( $elem ), //($(document.body)),\n\t\t\t\t\toffset = $( elem ).position() || { left: 0, top: 0 },\n\t\t\t\t\ttimerOut = null,\n\t\t\t\t\ttimerHide = null,\n\t\t\t\t\tn = 3,\n\t\t\t\t\thide = function() {\n\t\t\t\t\t\t$div.fadeOut( 'fast', function() {\n\t\t\t\t\t\t\t$( this ).remove();\n\t\t\t\t\t\t\t$div.parent().css( 'position', '' );\n\t\t\t\t\t\t} );\n\t\t\t\t\t\t$elem.removeAttr( 'learn-press-quick-confirm' ).data( 'quick-confirm', undefined );\n\t\t\t\t\t\tstop();\n\t\t\t\t\t},\n\t\t\t\t\tstop = function() {\n\t\t\t\t\t\ttimerHide && clearInterval( timerHide );\n\t\t\t\t\t\ttimerOut && clearInterval( timerOut );\n\t\t\t\t\t},\n\t\t\t\t\tstart = function() {\n\t\t\t\t\t\ttimerOut = setInterval( function() {\n\t\t\t\t\t\t\tif ( --n == 0 ) {\n\t\t\t\t\t\t\t\thide.call( $div[ 0 ] );\n\t\t\t\t\t\t\t\ttypeof ( args.onCancel ) === 'function' && args.onCancel( args.data );\n\t\t\t\t\t\t\t\tstop();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$div.find( 'span' ).html( ' (' + n + ')' );\n\t\t\t\t\t\t}, 1000 );\n\n\t\t\t\t\t\ttimerHide = setInterval( function() {\n\t\t\t\t\t\t\tif ( ! $elem.is( ':visible' ) || $elem.css( 'visibility' ) == 'hidden' ) {\n\t\t\t\t\t\t\t\tstop();\n\t\t\t\t\t\t\t\t$div.remove();\n\t\t\t\t\t\t\t\t$div.parent().css( 'position', '' );\n\t\t\t\t\t\t\t\ttypeof ( args.onCancel ) === 'function' && args.onCancel( args.data );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}, 350 );\n\t\t\t\t\t};\n\t\t\t\targs = $.extend( {\n\t\t\t\t\tmessage: '',\n\t\t\t\t\tdata: null,\n\t\t\t\t\tonOk: null,\n\t\t\t\t\tonCancel: null,\n\t\t\t\t\toffset: { top: 0, left: 0 },\n\t\t\t\t}, args || {} );\n\t\t\t\t$div.html( args.message || $elem.attr( 'data-confirm-remove' ) || 'Are you sure?' ).append( '<span> (' + n + ')</span>' ).css( {} );\n\t\t\t\t$div.click( function() {\n\t\t\t\t\ttypeof ( args.onOk ) === 'function' && args.onOk( args.data );\n\t\t\t\t\thide();\n\t\t\t\t} ).hover( function() {\n\t\t\t\t\tstop();\n\t\t\t\t}, function() {\n\t\t\t\t\tstart();\n\t\t\t\t} );\n\t\t\t\t//$div.parent().css('position', 'relative');\n\t\t\t\t$div.css( {\n\t\t\t\t\tleft: ( ( offset.left + $elem.outerWidth() ) - $div.outerWidth() ) + args.offset.left,\n\t\t\t\t\ttop: offset.top + $elem.outerHeight() + args.offset.top + 5,\n\t\t\t\t} ).hide().fadeIn( 'fast' );\n\t\t\t\tstart();\n\n\t\t\t\tthis.destroy = function() {\n\t\t\t\t\t$div.remove();\n\t\t\t\t\t$elem.removeAttr( 'learn-press-quick-confirm' ).data( 'quick-confirm', undefined );\n\t\t\t\t\tstop();\n\t\t\t\t};\n\t\t\t} )( elem, args )\n\t\t);\n\t},\n\tshow( message, args ) {\n\t\t//this.hide();\n\t\t$.proxy( function() {\n\t\t\targs = $.extend( {\n\t\t\t\ttitle: '',\n\t\t\t\tbuttons: '',\n\t\t\t\tevents: false,\n\t\t\t\tautohide: false,\n\t\t\t\tmessage,\n\t\t\t\tdata: false,\n\t\t\t\tid: LP.uniqueId(),\n\t\t\t\tonHide: null,\n\t\t\t}, args || {} );\n\n\t\t\tthis.instances.push( args );\n\t\t\tthis.instance = args;\n\n\t\t\tconst $doc = $( document ),\n\t\t\t\t$body = $( document.body );\n\t\t\tif ( ! this.$block ) {\n\t\t\t\tthis.$block = $( '<div id=\"learn-press-message-box-block\"></div>' ).appendTo( $body );\n\t\t\t}\n\t\t\tif ( ! this.$window ) {\n\t\t\t\tthis.$window = $( '<div id=\"learn-press-message-box-window\"><div id=\"message-box-wrap\"></div> </div>' ).insertAfter( this.$block );\n\t\t\t\tthis.$window.click( function() {\n\t\t\t\t} );\n\t\t\t}\n\t\t\t//this.events = args.events || {};\n\t\t\tthis._createWindow( message, args.title, args.buttons );\n\t\t\tthis.$block.show();\n\t\t\tthis.$window.show().attr( 'instance', args.id );\n\t\t\t$( window )\n\t\t\t\t.bind( 'resize.message-box', $.proxy( this.update, this ) )\n\t\t\t\t.bind( 'scroll.message-box', $.proxy( this.update, this ) );\n\t\t\tthis.update( true );\n\t\t\tif ( args.autohide ) {\n\t\t\t\tsetTimeout( function() {\n\t\t\t\t\tLP.MessageBox.hide();\n\t\t\t\t\ttypeof ( args.onHide ) === 'function' && args.onHide.call( LP.MessageBox, args );\n\t\t\t\t}, args.autohide );\n\t\t\t}\n\t\t}, this )();\n\t},\n\tblockUI( message ) {\n\t\tmessage = ( message !== false ? ( message ? message : 'Wait a moment' ) : '' ) + '<div class=\"message-box-animation\"></div>';\n\t\tthis.show( message );\n\t},\n\thide( delay, instance ) {\n\t\tif ( instance ) {\n\t\t\tthis._removeInstance( instance.id );\n\t\t} else if ( this.instance ) {\n\t\t\tthis._removeInstance( this.instance.id );\n\t\t}\n\t\tif ( this.instances.length === 0 ) {\n\t\t\tif ( this.$block ) {\n\t\t\t\tthis.$block.hide();\n\t\t\t}\n\t\t\tif ( this.$window ) {\n\t\t\t\tthis.$window.hide();\n\t\t\t}\n\t\t\t$( window )\n\t\t\t\t.unbind( 'resize.message-box', this.update )\n\t\t\t\t.unbind( 'scroll.message-box', this.update );\n\t\t} else if ( this.instance ) {\n\t\t\tthis._createWindow( this.instance.message, this.instance.title, this.instance.buttons );\n\t\t}\n\t},\n\tupdate( force ) {\n\t\tlet that = this,\n\t\t\t$wrap = this.$window.find( '#message-box-wrap' ),\n\t\t\ttimer = $wrap.data( 'timer' ),\n\t\t\t_update = function() {\n\t\t\t\tLP.Hook.doAction( 'learn_press_message_box_before_resize', that );\n\t\t\t\tlet $content = $wrap.find( '.message-box-content' ).css( 'height', '' ).css( 'overflow', 'hidden' ),\n\t\t\t\t\twidth = $wrap.outerWidth(),\n\t\t\t\t\theight = $wrap.outerHeight(),\n\t\t\t\t\tcontentHeight = $content.height(),\n\t\t\t\t\twindowHeight = $( window ).height(),\n\t\t\t\t\ttop = $wrap.offset().top;\n\t\t\t\tif ( contentHeight > windowHeight - 50 ) {\n\t\t\t\t\t$content.css( {\n\t\t\t\t\t\theight: windowHeight - 25,\n\t\t\t\t\t} );\n\t\t\t\t\theight = $wrap.outerHeight();\n\t\t\t\t} else {\n\t\t\t\t\t$content.css( 'height', '' ).css( 'overflow', '' );\n\t\t\t\t}\n\t\t\t\t$wrap.css( {\n\t\t\t\t\tmarginTop: ( $( window ).height() - height ) / 2,\n\t\t\t\t} );\n\t\t\t\tLP.Hook.doAction( 'learn_press_message_box_resize', height, that );\n\t\t\t};\n\t\tif ( force ) {\n\t\t\t_update();\n\t\t}\n\t\ttimer && clearTimeout( timer );\n\t\ttimer = setTimeout( _update, 250 );\n\t},\n\t_removeInstance( id ) {\n\t\tfor ( let i = 0; i < this.instances.length; i++ ) {\n\t\t\tif ( this.instances[ i ].id === id ) {\n\t\t\t\tthis.instances.splice( i, 1 );\n\n\t\t\t\tconst len = this.instances.length;\n\t\t\t\tif ( len ) {\n\t\t\t\t\tthis.instance = this.instances[ len - 1 ];\n\t\t\t\t\tthis.$window.attr( 'instance', this.instance.id );\n\t\t\t\t} else {\n\t\t\t\t\tthis.instance = false;\n\t\t\t\t\tthis.$window.removeAttr( 'instance' );\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t},\n\t_getInstance( id ) {\n\t\tfor ( let i = 0; i < this.instances.length; i++ ) {\n\t\t\tif ( this.instances[ i ].id === id ) {\n\t\t\t\treturn this.instances[ i ];\n\t\t\t}\n\t\t}\n\t},\n\t_createWindow( message, title, buttons ) {\n\t\tconst $wrap = this.$window.find( '#message-box-wrap' ).html( '' );\n\t\tif ( title ) {\n\t\t\t$wrap.append( '<h3 class=\"message-box-title\">' + title + '</h3>' );\n\t\t}\n\t\t$wrap.append( $( '<div class=\"message-box-content\"></div>' ).html( message ) );\n\t\tif ( buttons ) {\n\t\t\tconst $buttons = $( '<div class=\"message-box-buttons\"></div>' );\n\t\t\tswitch ( buttons ) {\n\t\t\tcase 'yesNo':\n\t\t\t\t$buttons.append( this._createButton( LP_Settings.localize.button_yes, 'yes' ) );\n\t\t\t\t$buttons.append( this._createButton( LP_Settings.localize.button_no, 'no' ) );\n\t\t\t\tbreak;\n\t\t\tcase 'okCancel':\n\t\t\t\t$buttons.append( this._createButton( LP_Settings.localize.button_ok, 'ok' ) );\n\t\t\t\t$buttons.append( this._createButton( LP_Settings.localize.button_cancel, 'cancel' ) );\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t$buttons.append( this._createButton( LP_Settings.localize.button_ok, 'ok' ) );\n\t\t\t}\n\t\t\t$wrap.append( $buttons );\n\t\t}\n\t},\n\t_createButton( title, type ) {\n\t\tconst $button = $( '<button type=\"button\" class=\"button message-box-button message-box-button-' + type + '\">' + title + '</button>' ),\n\t\t\tcallback = 'on' + ( type.substr( 0, 1 ).toUpperCase() + type.substr( 1 ) );\n\t\t$button.data( 'callback', callback ).click( function() {\n\t\t\tconst instance = $( this ).data( 'instance' ),\n\t\t\t\tcallback = instance.events[ $( this ).data( 'callback' ) ];\n\t\t\tif ( $.type( callback ) === 'function' ) {\n\t\t\t\tif ( callback.apply( LP.MessageBox, [ instance ] ) === false ) {\n\t\t\t\t\t// return;\n\t\t\t\t} else {\n\t\t\t\t\tLP.MessageBox.hide( null, instance );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tLP.MessageBox.hide( null, instance );\n\t\t\t}\n\t\t} ).data( 'instance', this.instance );\n\t\treturn $button;\n\t},\n};\n\nexport default MessageBox;\n","( function( $ ) {\n\tfunction QuickTip( el, options ) {\n\t\tconst $el = $( el ),\n\t\t\tuniId = $el.attr( 'data-id' ) || LP.uniqueId();\n\n\t\toptions = $.extend( {\n\t\t\tevent: 'hover',\n\t\t\tautoClose: true,\n\t\t\tsingle: true,\n\t\t\tcloseInterval: 1000,\n\t\t\tarrowOffset: null,\n\t\t\ttipClass: '',\n\t\t}, options, $el.data() );\n\n\t\t$el.attr( 'data-id', uniId );\n\n\t\tlet content = $el.attr( 'data-content-tip' ) || $el.html(),\n\t\t\t$tip = $( '<div class=\"learn-press-tip-floating\">' + content + '</div>' ),\n\t\t\tt = null,\n\t\t\tcloseInterval = 0,\n\t\t\tuseData = false,\n\t\t\tarrowOffset = options.arrowOffset === 'el' ? $el.outerWidth() / 2 : 8,\n\t\t\t$content = $( '#__' + uniId );\n\n\t\tif ( $content.length === 0 ) {\n\t\t\t$( document.body ).append( $( '<div />' ).attr( 'id', '__' + uniId ).html( content ).css( 'display', 'none' ) );\n\t\t}\n\n\t\tcontent = $content.html();\n\n\t\t$tip.addClass( options.tipClass );\n\n\t\t$el.data( 'content-tip', content );\n\t\tif ( $el.attr( 'data-content-tip' ) ) {\n\t\t\t//$el.removeAttr('data-content-tip');\n\t\t\tuseData = true;\n\t\t}\n\n\t\tcloseInterval = options.closeInterval;\n\n\t\tif ( options.autoClose === false ) {\n\t\t\t$tip.append( '<a class=\"close\"></a>' );\n\t\t\t$tip.on( 'click', '.close', function() {\n\t\t\t\tclose();\n\t\t\t} );\n\t\t}\n\n\t\tfunction show() {\n\t\t\tif ( t ) {\n\t\t\t\tclearTimeout( t );\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ( options.single ) {\n\t\t\t\t$( '.learn-press-tip' ).not( $el ).LP( 'QuickTip', 'close' );\n\t\t\t}\n\n\t\t\t$tip.appendTo( document.body );\n\t\t\tconst pos = $el.offset();\n\n\t\t\t$tip.css( {\n\t\t\t\ttop: pos.top - $tip.outerHeight() - 8,\n\t\t\t\tleft: pos.left - $tip.outerWidth() / 2 + arrowOffset,\n\t\t\t} );\n\t\t}\n\n\t\tfunction hide() {\n\t\t\tt && clearTimeout( t );\n\t\t\tt = setTimeout( function() {\n\t\t\t\t$tip.detach();\n\t\t\t\tt = null;\n\t\t\t}, closeInterval );\n\t\t}\n\n\t\tfunction close() {\n\t\t\tcloseInterval = 0;\n\t\t\thide();\n\t\t\tcloseInterval = options.closeInterval;\n\t\t}\n\n\t\tfunction open() {\n\t\t\tshow();\n\t\t}\n\n\t\tif ( ! useData ) {\n\t\t\t$el.html( '' );\n\t\t}\n\n\t\tif ( options.event === 'click' ) {\n\t\t\t$el.on( 'click', function( e ) {\n\t\t\t\te.stopPropagation();\n\t\t\t\tshow();\n\t\t\t} );\n\t\t}\n\n\t\t$( document ).on( 'learn-press/close-all-quick-tip', function() {\n\t\t\tclose();\n\t\t} );\n\t\t$el.hover(\n\t\t\tfunction( e ) {\n\t\t\t\te.stopPropagation();\n\t\t\t\tif ( options.event !== 'click' ) {\n\t\t\t\t\tshow();\n\t\t\t\t}\n\t\t\t},\n\t\t\tfunction( e ) {\n\t\t\t\te.stopPropagation();\n\t\t\t\tif ( options.autoClose ) {\n\t\t\t\t\thide();\n\t\t\t\t}\n\t\t\t}\n\t\t).addClass( 'ready' );\n\t\treturn {\n\t\t\tclose,\n\t\t\topen,\n\t\t};\n\t}\n\n\t$.fn.LP( 'QuickTip', function( options ) {\n\t\treturn $.each( this, function() {\n\t\t\tlet $tip = $( this ).data( 'quick-tip' );\n\n\t\t\tif ( ! $tip ) {\n\t\t\t\t$tip = new QuickTip( this, options );\n\t\t\t\t$( this ).data( 'quick-tip', $tip );\n\t\t\t}\n\n\t\t\tif ( typeof options === 'string' ) {\n\t\t\t\t$tip[ options ] && $tip[ options ].apply( $tip );\n\t\t\t}\n\t\t} );\n\t} );\n}\n( jQuery ) );\n","const $ = jQuery;\n\n$( function() {\n\t$( '.form-field input[type=\"password\"]' ).wrap( '<span class=\"lp-password-input\"></span>' );\n\t$( '.lp-password-input' ).append( '<span class=\"lp-show-password-input\"></span>' );\n\n\t$( '.lp-show-password-input' ).on( 'click', function() {\n\t\t$( this ).toggleClass( 'display-password' );\n\t\tif ( $( this ).hasClass( 'display-password' ) ) {\n\t\t\t$( this ).siblings( [ 'input[type=\"password\"]' ] ).prop( 'type', 'text' );\n\t\t} else {\n\t\t\t$( this ).siblings( 'input[type=\"text\"]' ).prop( 'type', 'password' );\n\t\t}\n\t} );\n} );\n\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = function(module) {\n\tvar getter = module && module.__esModule ?\n\t\tfunction() { return module['default']; } :\n\t\tfunction() { return module; };\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = function(exports, definition) {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }","// define __esModule on exports\n__webpack_require__.r = function(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};","/**\n * Utility functions may use for both admin and frontend.\n *\n * @version 3.2.6\n */\n\nimport extend from './extend';\nimport fn from './fn';\nimport QuickTip from './quick-tip';\nimport MessageBox from './message-box';\nimport Event_Callback from './event-callback';\nimport Hook from './hook';\nimport Cookies from './cookies';\nimport _localStorage from './local-storage';\nimport * as jplugins from './jquery.plugins';\nimport IframeSubmit from './iframe-submit';\nimport showPass from './show-password';\n\nconst $ = jQuery;\n\nString.prototype.getQueryVar = function( name ) {\n\tname = name.replace( /[\\[]/, '\\\\[' ).replace( /[\\]]/, '\\\\]' );\n\tconst regex = new RegExp( '[\\\\?&]' + name + '=([^&#]*)' ),\n\t\tresults = regex.exec( this );\n\treturn results === null ? '' : decodeURIComponent( results[ 1 ].replace( /\\+/g, ' ' ) );\n};\n\nString.prototype.addQueryVar = function( name, value ) {\n\tlet url = this,\n\t\tm = url.split( '#' );\n\turl = m[ 0 ];\n\tif ( name.match( /\\[/ ) ) {\n\t\turl += url.match( /\\?/ ) ? '&' : '?';\n\t\turl += name + '=' + value;\n\t} else if ( ( url.indexOf( '&' + name + '=' ) != -1 ) || ( url.indexOf( '?' + name + '=' ) != -1 ) ) {\n\t\turl = url.replace( new RegExp( name + '=([^&#]*)', 'g' ), name + '=' + value );\n\t} else {\n\t\turl += url.match( /\\?/ ) ? '&' : '?';\n\t\turl += name + '=' + value;\n\t}\n\treturn url + ( m[ 1 ] ? '#' + m[ 1 ] : '' );\n};\n\nString.prototype.removeQueryVar = function( name ) {\n\tlet url = this;\n\tconst m = url.split( '#' );\n\turl = m[ 0 ];\n\tname = name.replace( /[\\[]/, '\\\\[' ).replace( /[\\]]/, '\\\\]' );\n\tconst regex = new RegExp( '[\\\\?&]' + name + '([\\[][^=]*)?=([^&#]*)', 'g' );\n\turl = url.replace( regex, '' );\n\treturn url + ( m[ 1 ] ? '#' + m[ 1 ] : '' );\n};\n\n// if ( $.isEmptyObject( '' ) == false ) {\n// \t$.isEmptyObject = function( a ) {\n// \t\tlet prop;\n// \t\tfor ( prop in a ) {\n// \t\t\tif ( a.hasOwnProperty( prop ) ) {\n// \t\t\t\treturn false;\n// \t\t\t}\n// \t\t}\n// \t\treturn true;\n// \t};\n// }\n\nconst _default = {\n\tHook,\n\tsetUrl( url, ember, title ) {\n\t\tif ( url ) {\n\t\t\thistory.pushState( {}, title, url );\n\t\t\tLP.Hook.doAction( 'learn_press_set_location_url', url );\n\t\t}\n\t},\n\ttoggleGroupSection( el, target ) {\n\t\tconst $el = $( el ),\n\t\t\tisHide = $el.hasClass( 'hide-if-js' );\n\t\tif ( isHide ) {\n\t\t\t$el.hide().removeClass( 'hide-if-js' );\n\t\t}\n\t\t$el.removeClass( 'hide-if-js' ).slideToggle( function() {\n\t\t\tconst $this = $( this );\n\t\t\tif ( $this.is( ':visible' ) ) {\n\t\t\t\t$( target ).addClass( 'toggle-on' ).removeClass( 'toggle-off' );\n\t\t\t} else {\n\t\t\t\t$( target ).addClass( 'toggle-off' ).removeClass( 'toggle-on' );\n\t\t\t}\n\t\t} );\n\t},\n\toverflow( el, v ) {\n\t\tconst $el = $( el ),\n\t\t\toverflow = $el.css( 'overflow' );\n\t\tif ( v ) {\n\t\t\t$el.css( 'overflow', v ).data( 'overflow', overflow );\n\t\t} else {\n\t\t\t$el.css( 'overflow', $el.data( 'overflow' ) );\n\t\t}\n\t},\n\tgetUrl() {\n\t\treturn window.location.href;\n\t},\n\taddQueryVar( name, value, url ) {\n\t\treturn ( url === undefined ? window.location.href : url ).addQueryVar( name, value );\n\t},\n\tremoveQueryVar( name, url ) {\n\t\treturn ( url === undefined ? window.location.href : url ).removeQueryVar( name );\n\t},\n\treload( url ) {\n\t\tif ( ! url ) {\n\t\t\turl = window.location.href;\n\t\t}\n\t\twindow.location.href = url;\n\t},\n\n\tparseResponse( response, type ) {\n\t\tconst m = response.match( /<-- LP_AJAX_START -->(.*)<-- LP_AJAX_END -->/s );\n\t\tif ( m ) {\n\t\t\tresponse = m[ 1 ];\n\t\t}\n\t\treturn ( type || 'json' ) === 'json' ? this.parseJSON( response ) : response;\n\t},\n\tparseJSON( data ) {\n\t\tif ( typeof data !== 'string' ) {\n\t\t\treturn data;\n\t\t}\n\n\t\tconst m = String.raw( { raw: data } ).match( /<-- LP_AJAX_START -->(.*)<-- LP_AJAX_END -->/s );\n\n\t\ttry {\n\t\t\tif ( m ) {\n\t\t\t\tdata = JSON.parse( m[ 1 ].replace( /(?:\\r\\n|\\r|\\n)/g, '' ) );\n\t\t\t} else {\n\t\t\t\tdata = JSON.parse( data );\n\t\t\t}\n\t\t} catch ( e ) {\n\t\t\tdata = {};\n\t\t}\n\t\treturn data;\n\t},\n\tajax( args ) {\n\t\tconst type = args.type || 'post',\n\t\t\tdataType = args.dataType || 'json',\n\t\t\tdata = args.action ? $.extend( args.data, { 'lp-ajax': args.action } ) : args.data,\n\t\t\tbeforeSend = args.beforeSend || function() {\n\t\t\t},\n\t\t\turl = args.url || window.location.href;\n\t\t// console.debug( beforeSend );\n\t\t$.ajax( {\n\t\t\tdata,\n\t\t\turl,\n\t\t\ttype,\n\t\t\tdataType: 'html',\n\t\t\tbeforeSend: beforeSend.apply( null, args ),\n\t\t\tsuccess( raw ) {\n\t\t\t\tconst response = LP.parseResponse( raw, dataType );\n\t\t\t\ttypeof ( args.success ) === 'function' && args.success( response, raw );\n\t\t\t},\n\t\t\terror() {\n\t\t\t\ttypeof ( args.error ) === 'function' && args.error.apply( null, LP.funcArgs2Array() );\n\t\t\t},\n\t\t} );\n\t},\n\tdoAjax( args ) {\n\t\tconst type = args.type || 'post',\n\t\t\tdataType = args.dataType || 'json',\n\t\t\taction = ( ( args.prefix === undefined ) || 'learnpress_' ) + args.action,\n\t\t\tdata = args.action ? $.extend( args.data, { action } ) : args.data;\n\n\t\t$.ajax( {\n\t\t\tdata,\n\t\t\turl: ( args.url || window.location.href ),\n\t\t\ttype,\n\t\t\tdataType: 'html',\n\t\t\tsuccess( raw ) {\n\t\t\t\tconst response = LP.parseResponse( raw, dataType );\n\t\t\t\ttypeof ( args.success ) === 'function' && args.success( response, raw );\n\t\t\t},\n\t\t\terror() {\n\t\t\t\ttypeof ( args.error ) === 'function' && args.error.apply( null, LP.funcArgs2Array() );\n\t\t\t},\n\t\t} );\n\t},\n\n\tfuncArgs2Array( args ) {\n\t\tconst arr = [];\n\t\tfor ( let i = 0; i < args.length; i++ ) {\n\t\t\tarr.push( args[ i ] );\n\t\t}\n\t\treturn arr;\n\t},\n\taddFilter( action, callback ) {\n\t\tconst $doc = $( document ),\n\t\t\tevent = 'LP.' + action;\n\t\t$doc.on( event, callback );\n\t\tLP.log( $doc.data( 'events' ) );\n\t\treturn this;\n\t},\n\tapplyFilters() {\n\t\tconst $doc = $( document ),\n\t\t\taction = arguments[ 0 ],\n\t\t\targs = this.funcArgs2Array( arguments );\n\t\tif ( $doc.hasEvent( action ) ) {\n\t\t\targs[ 0 ] = 'LP.' + action;\n\t\t\treturn $doc.triggerHandler.apply( $doc, args );\n\t\t}\n\t\treturn args[ 1 ];\n\t},\n\taddAction( action, callback ) {\n\t\treturn this.addFilter( action, callback );\n\t},\n\tdoAction() {\n\t\tconst $doc = $( document ),\n\t\t\taction = arguments[ 0 ],\n\t\t\targs = this.funcArgs2Array( arguments );\n\t\tif ( $doc.hasEvent( action ) ) {\n\t\t\targs[ 0 ] = 'LP.' + action;\n\t\t\t$doc.trigger.apply( $doc, args );\n\t\t}\n\t},\n\ttoElement( element, args ) {\n\t\tif ( $( element ).length === 0 ) {\n\t\t\treturn;\n\t\t}\n\t\targs = $.extend( {\n\t\t\tdelay: 300,\n\t\t\tduration: 'slow',\n\t\t\toffset: 50,\n\t\t\tcontainer: null,\n\t\t\tcallback: null,\n\t\t\tinvisible: false,\n\t\t}, args || {} );\n\t\tlet $container = $( args.container ),\n\t\t\trootTop = 0;\n\t\tif ( $container.length === 0 ) {\n\t\t\t$container = $( 'body, html' );\n\t\t}\n\t\trootTop = $container.offset().top;\n\t\tconst to = ( $( element ).offset().top + $container.scrollTop() ) - rootTop - args.offset;\n\n\t\tfunction isElementInView( element, fullyInView ) {\n\t\t\tconst pageTop = $container.scrollTop();\n\t\t\tconst pageBottom = pageTop + $container.height();\n\t\t\tconst elementTop = $( element ).offset().top - $container.offset().top;\n\t\t\tconst elementBottom = elementTop + $( element ).height();\n\n\t\t\tif ( fullyInView === true ) {\n\t\t\t\treturn ( ( pageTop < elementTop ) && ( pageBottom > elementBottom ) );\n\t\t\t}\n\t\t\treturn ( ( elementTop <= pageBottom ) && ( elementBottom >= pageTop ) );\n\t\t}\n\n\t\tif ( args.invisible && isElementInView( element, true ) ) {\n\t\t\treturn;\n\t\t}\n\t\t$container.fadeIn( 10 )\n\t\t\t.delay( args.delay )\n\t\t\t.animate( {\n\t\t\t\tscrollTop: to,\n\t\t\t}, args.duration, args.callback );\n\t},\n\tuniqueId( prefix, more_entropy ) {\n\t\tif ( typeof prefix === 'undefined' ) {\n\t\t\tprefix = '';\n\t\t}\n\n\t\tlet retId;\n\t\tconst formatSeed = function( seed, reqWidth ) {\n\t\t\tseed = parseInt( seed, 10 )\n\t\t\t\t.toString( 16 ); // to hex str\n\t\t\tif ( reqWidth < seed.length ) { // so long we split\n\t\t\t\treturn seed.slice( seed.length - reqWidth );\n\t\t\t}\n\t\t\tif ( reqWidth > seed.length ) { // so short we pad\n\t\t\t\treturn new Array( 1 + ( reqWidth - seed.length ) )\n\t\t\t\t\t.join( '0' ) + seed;\n\t\t\t}\n\t\t\treturn seed;\n\t\t};\n\n\t\t// BEGIN REDUNDANT\n\t\tif ( ! this.php_js ) {\n\t\t\tthis.php_js = {};\n\t\t}\n\t\t// END REDUNDANT\n\t\tif ( ! this.php_js.uniqidSeed ) { // init seed with big random int\n\t\t\tthis.php_js.uniqidSeed = Math.floor( Math.random() * 0x75bcd15 );\n\t\t}\n\t\tthis.php_js.uniqidSeed++;\n\n\t\tretId = prefix; // start with prefix, add current milliseconds hex string\n\t\tretId += formatSeed( parseInt( new Date()\n\t\t\t.getTime() / 1000, 10 ), 8 );\n\t\tretId += formatSeed( this.php_js.uniqidSeed, 5 ); // add seed hex string\n\t\tif ( more_entropy ) {\n\t\t\t// for more entropy we add a float lower to 10\n\t\t\tretId += ( Math.random() * 10 )\n\t\t\t\t.toFixed( 8 )\n\t\t\t\t.toString();\n\t\t}\n\n\t\treturn retId;\n\t},\n\tlog() {\n\t\t//if (typeof LEARN_PRESS_DEBUG != 'undefined' && LEARN_PRESS_DEBUG && console) {\n\t\tfor ( let i = 0, n = arguments.length; i < n; i++ ) {\n\t\t\tconsole.log( arguments[ i ] );\n\t\t}\n\t\t//}\n\t},\n\tblockContent() {\n\t\tif ( $( '#learn-press-block-content' ).length === 0 ) {\n\t\t\t$( LP.template( 'learn-press-template-block-content', {} ) ).appendTo( $( 'body' ) );\n\t\t}\n\t\tLP.hideMainScrollbar().addClass( 'block-content' );\n\t\t$( document ).trigger( 'learn_press_block_content' );\n\t},\n\tunblockContent() {\n\t\tsetTimeout( function() {\n\t\t\tLP.showMainScrollbar().removeClass( 'block-content' );\n\t\t\t$( document ).trigger( 'learn_press_unblock_content' );\n\t\t}, 350 );\n\t},\n\thideMainScrollbar( el ) {\n\t\tif ( ! el ) {\n\t\t\tel = 'html, body';\n\t\t}\n\t\tconst $el = $( el );\n\t\t$el.each( function() {\n\t\t\tconst $root = $( this ),\n\t\t\t\toverflow = $root.css( 'overflow' );\n\t\t\t$root.css( 'overflow', 'hidden' ).attr( 'overflow', overflow );\n\t\t} );\n\t\treturn $el;\n\t},\n\tshowMainScrollbar( el ) {\n\t\tif ( ! el ) {\n\t\t\tel = 'html, body';\n\t\t}\n\t\tconst $el = $( el );\n\t\t$el.each( function() {\n\t\t\tconst $root = $( this ),\n\t\t\t\toverflow = $root.attr( 'overflow' );\n\t\t\t$root.css( 'overflow', overflow ).removeAttr( 'overflow' );\n\t\t} );\n\t\treturn $el;\n\t},\n\ttemplate: typeof _ !== 'undefined' ? _.memoize( function( id, data ) {\n\t\tlet compiled,\n\t\t\toptions = {\n\t\t\t\tevaluate: /<#([\\s\\S]+?)#>/g,\n\t\t\t\tinterpolate: /\\{\\{\\{([\\s\\S]+?)\\}\\}\\}/g,\n\t\t\t\tescape: /\\{\\{([^\\}]+?)\\}\\}(?!\\})/g,\n\t\t\t\tvariable: 'data',\n\t\t\t};\n\n\t\tconst tmpl = function( data ) {\n\t\t\tcompiled = compiled || _.template( $( '#' + id ).html(), null, options );\n\t\t\treturn compiled( data );\n\t\t};\n\t\treturn data ? tmpl( data ) : tmpl;\n\t}, function( a, b ) {\n\t\treturn a + '-' + JSON.stringify( b );\n\t} ) : function() {\n\t\treturn '';\n\t},\n\talert( localize, callback ) {\n\t\tlet title = '',\n\t\t\tmessage = '';\n\t\tif ( typeof localize === 'string' ) {\n\t\t\tmessage = localize;\n\t\t} else {\n\t\t\tif ( typeof localize.title !== 'undefined' ) {\n\t\t\t\ttitle = localize.title;\n\t\t\t}\n\t\t\tif ( typeof localize.message !== 'undefined' ) {\n\t\t\t\tmessage = localize.message;\n\t\t\t}\n\t\t}\n\t\t$.alerts.alert( message, title, function( e ) {\n\t\t\tLP._on_alert_hide();\n\t\t\tcallback && callback( e );\n\t\t} );\n\t\tthis._on_alert_show();\n\t},\n\tconfirm( localize, callback ) {\n\t\tlet title = '',\n\t\t\tmessage = '';\n\n\t\tif ( typeof localize === 'string' ) {\n\t\t\tmessage = localize;\n\t\t} else {\n\t\t\tif ( typeof localize.title !== 'undefined' ) {\n\t\t\t\ttitle = localize.title;\n\t\t\t}\n\t\t\tif ( typeof localize.message !== 'undefined' ) {\n\t\t\t\tmessage = localize.message;\n\t\t\t}\n\t\t}\n\t\t$.alerts.confirm( message, title, function( e ) {\n\t\t\tLP._on_alert_hide();\n\t\t\tcallback && callback( e );\n\t\t} );\n\t\tthis._on_alert_show();\n\t},\n\t_on_alert_show() {\n\t\tconst $container = $( '#popup_container' ),\n\t\t\t$placeholder = $( '<span id=\"popup_container_placeholder\" />' ).insertAfter( $container ).data( 'xxx', $container );\n\t\t$container.stop().css( 'top', '-=50' ).css( 'opacity', '0' ).animate( {\n\t\t\ttop: '+=50',\n\t\t\topacity: 1,\n\t\t}, 250 );\n\t},\n\t_on_alert_hide() {\n\t\tconst $holder = $( '#popup_container_placeholder' ),\n\t\t\t$container = $holder.data( 'xxx' );\n\t\tif ( $container ) {\n\t\t\t$container.replaceWith( $holder );\n\t\t}\n\t\t$container.appendTo( $( document.body ) );\n\t\t$container.stop().animate( {\n\t\t\ttop: '+=50',\n\t\t\topacity: 0,\n\t\t}, 250, function() {\n\t\t\t$( this ).remove();\n\t\t} );\n\t},\n\tsendMessage( data, object, targetOrigin, transfer ) {\n\t\tif ( $.isPlainObject( data ) ) {\n\t\t\tdata = JSON.stringify( data );\n\t\t}\n\t\tobject = object || window;\n\t\ttargetOrigin = targetOrigin || '*';\n\t\tobject.postMessage( data, targetOrigin, transfer );\n\t},\n\treceiveMessage( event, b ) {\n\t\tlet target = event.origin || event.originalEvent.origin,\n\t\t\tdata = event.data || event.originalEvent.data || '';\n\t\tif ( typeof data === 'string' || data instanceof String ) {\n\t\t\tif ( data.indexOf( '{' ) === 0 ) {\n\t\t\t\tdata = LP.parseJSON( data );\n\t\t\t}\n\t\t}\n\t\tLP.Hook.doAction( 'learn_press_receive_message', data, target );\n\t},\n\n\tcamelCaseDashObjectKeys( obj, deep = true ) {\n\t\tconst self = LP;\n\t\tconst isArray = function( a ) {\n\t\t\treturn Array.isArray( a );\n\t\t};\n\t\tconst isObject = function( o ) {\n\t\t\treturn o === Object( o ) && ! isArray( o ) && typeof o !== 'function';\n\t\t};\n\t\tconst toCamel = ( s ) => {\n\t\t\treturn s.replace( /([-_][a-z])/ig, ( $1 ) => {\n\t\t\t\treturn $1.toUpperCase()\n\t\t\t\t\t.replace( '-', '' )\n\t\t\t\t\t.replace( '_', '' );\n\t\t\t} );\n\t\t};\n\n\t\tif ( isObject( obj ) ) {\n\t\t\tconst n = {};\n\n\t\t\tObject.keys( obj )\n\t\t\t\t.forEach( ( k ) => {\n\t\t\t\t\tn[ toCamel( k ) ] = deep ? self.camelCaseDashObjectKeys( obj[ k ] ) : obj[ k ];\n\t\t\t\t} );\n\n\t\t\treturn n;\n\t\t} else if ( isArray( obj ) ) {\n\t\t\treturn obj.map( ( i ) => {\n\t\t\t\treturn self.camelCaseDashObjectKeys( i );\n\t\t\t} );\n\t\t}\n\n\t\treturn obj;\n\t},\n\tIframeSubmit,\n};\n\n$( document ).ready( function() {\n\tif ( typeof $.alerts !== 'undefined' ) {\n\t\t$.alerts.overlayColor = '#000';\n\t\t$.alerts.overlayOpacity = 0.5;\n\t\t$.alerts.okButton = lpGlobalSettings.localize.button_ok;\n\t\t$.alerts.cancelButton = lpGlobalSettings.localize.button_cancel;\n\t}\n\n\t$( '.learn-press-message.fixed' ).each( function() {\n\t\tconst $el = $( this ),\n\t\t\toptions = $el.data();\n\t\t( function( $el, options ) {\n\t\t\tif ( options.delayIn ) {\n\t\t\t\tsetTimeout( function() {\n\t\t\t\t\t$el.show().hide().fadeIn();\n\t\t\t\t}, options.delayIn );\n\t\t\t}\n\t\t\tif ( options.delayOut ) {\n\t\t\t\tsetTimeout( function() {\n\t\t\t\t\t$el.fadeOut();\n\t\t\t\t}, options.delayOut + ( options.delayIn || 0 ) );\n\t\t\t}\n\t\t}( $el, options ) );\n\t} );\n\n\tsetTimeout( function() {\n\t\t$( '.learn-press-nav-tabs li.active:not(.default) a' ).trigger( 'click' );\n\t}, 300 );\n\n\t$( 'body.course-item-popup' ).parent().css( 'overflow', 'hidden' );\n\n\t( function() {\n\t\tlet timer = null,\n\t\t\tcallback = function() {\n\t\t\t\t$( '.auto-check-lines' ).checkLines( function( r ) {\n\t\t\t\t\tif ( r > 1 ) {\n\t\t\t\t\t\t$( this ).removeClass( 'single-lines' );\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$( this ).addClass( 'single-lines' );\n\t\t\t\t\t}\n\t\t\t\t\t$( this ).attr( 'rows', r );\n\t\t\t\t} );\n\t\t\t};\n\t\t$( window ).on( 'resize.check-lines', function() {\n\t\t\tif ( timer ) {\n\t\t\t\ttimer && clearTimeout( timer );\n\t\t\t\ttimer = setTimeout( callback, 300 );\n\t\t\t} else {\n\t\t\t\tcallback();\n\t\t\t}\n\t\t} );\n\t}() );\n\n\t$( '.learn-press-tooltip, .lp-passing-conditional' ).LP_Tooltip( { offset: [ 24, 24 ] } );\n\n\t$( '.learn-press-icon' ).LP_Tooltip( { offset: [ 30, 30 ] } );\n\n\t$( '.learn-press-message[data-autoclose]' ).each( function() {\n\t\tconst $el = $( this ),\n\t\t\tdelay = parseInt( $el.data( 'autoclose' ) );\n\t\tif ( delay ) {\n\t\t\tsetTimeout( function( $el ) {\n\t\t\t\t$el.fadeOut();\n\t\t\t}, delay, $el );\n\t\t}\n\t} );\n\n\t$( document ).on( 'click', function() {\n\t\t$( document ).trigger( 'learn-press/close-all-quick-tip' );\n\t} );\n} );\n\nextend( {\n\tEvent_Callback,\n\tMessageBox,\n\tCookies,\n\tlocalStorage: _localStorage,\n\t..._default,\n} );\n\nexport default {\n\tfn,\n\tQuickTip,\n\tCookies,\n\tlocalStorage: _localStorage,\n\tshowPass,\n};\n"],"names":["Cookies","get","name","def","global","ret","wpCookies","ck","JSON","parse","set","value","expires","path","domain","secure","arguments","length","stringify","remove","allCookies","reg","RegExp","newCookies","useRegExp","match","i","Event_Callback","self","callbacks","$","window","jQuery","on","event","callback","namespaces","split","namespace","push","off","at","indexOf","splice","callEvent","callbackArgs","apply","j","LP","extend","exp","undefined","fn","widget","args","Hook","hooks","action","filter","addAction","callable","priority","tag","addHook","addFilter","doAction","doHook","applyFilters","removeAction","removeHook","removeFilter","hookType","Array","prototype","slice","call","hook","sort","a","b","iframeCounter","IframeSubmit","form","iframeId","$iframe","appendTo","document","body","attr","src","$form","clone","find","serializeJSON","isInput","is","unIndexed","serializeArray","indexed","validate","arrayKeys","end","each","that","keys","objPath","prop","replace","rawPath","objExp","preObjPath","isNaN","evalString","eval","e","console","log","c","LP_Tooltip","options","offset","$el","content","data","$tooltip","html","hide","position","isArray","top","left","isNumeric","css","fadeIn","hasEvent","events","dataToJSON","json","attributes","m","rows","h","height","lh","Math","floor","parseInt","checkLines","p","$e","findNext","selector","$selector","$root","first","index","$next","eq","findPrev","$prev","progress","v","t","timer","$this","removeClass","addClass","transform","_localStorage","__key","lodash","localStorage","setItem","getItem","exists","newData","omit","__set","__get","MessageBox","$block","$window","instances","instance","quickConfirm","elem","$ins","destroy","$elem","$div","insertAfter","timerOut","timerHide","n","fadeOut","parent","removeAttr","stop","clearInterval","start","setInterval","onCancel","message","onOk","append","click","hover","outerWidth","outerHeight","show","proxy","title","buttons","autohide","id","uniqueId","onHide","$doc","$body","_createWindow","bind","update","setTimeout","blockUI","delay","_removeInstance","unbind","force","$wrap","_update","$content","width","contentHeight","windowHeight","marginTop","clearTimeout","len","_getInstance","$buttons","_createButton","LP_Settings","localize","button_yes","button_no","button_ok","button_cancel","type","$button","substr","toUpperCase","QuickTip","el","uniId","autoClose","single","closeInterval","arrowOffset","tipClass","$tip","useData","close","not","pos","detach","open","stopPropagation","wrap","toggleClass","hasClass","siblings","jplugins","showPass","String","getQueryVar","regex","results","exec","decodeURIComponent","addQueryVar","url","removeQueryVar","_default","setUrl","ember","history","pushState","toggleGroupSection","target","isHide","slideToggle","overflow","getUrl","location","href","reload","parseResponse","response","parseJSON","raw","ajax","dataType","beforeSend","success","error","funcArgs2Array","doAjax","prefix","arr","triggerHandler","trigger","toElement","element","duration","container","invisible","$container","rootTop","to","scrollTop","isElementInView","fullyInView","pageTop","pageBottom","elementTop","elementBottom","animate","more_entropy","retId","formatSeed","seed","reqWidth","toString","join","php_js","uniqidSeed","random","Date","getTime","toFixed","blockContent","template","hideMainScrollbar","unblockContent","showMainScrollbar","_","memoize","compiled","evaluate","interpolate","escape","variable","tmpl","alert","alerts","_on_alert_hide","_on_alert_show","confirm","$placeholder","opacity","$holder","replaceWith","sendMessage","object","targetOrigin","transfer","isPlainObject","postMessage","receiveMessage","origin","originalEvent","camelCaseDashObjectKeys","obj","deep","isObject","o","Object","toCamel","s","$1","forEach","k","map","ready","overlayColor","overlayOpacity","okButton","lpGlobalSettings","cancelButton","delayIn","delayOut","r"],"sourceRoot":""}
assets/js/dist/utils.min.asset.php ADDED
@@ -0,0 +1 @@
 
1
+ <?php return array('dependencies' => array(), 'version' => 'adeb4a7a463475939c48');
assets/js/vendor/plugins.all.js CHANGED
@@ -1 +1,359 @@
1
- if(!Object.prototype.watchChange){var isFunction=function(e){return e&&"[object Function]"==={}.toString.call(e)};Object.defineProperty(Object.prototype,"watchChange",{enumerable:!1,configurable:!0,writable:!1,value:function(e,t){var n=this;function o(e,t){var o=n[e],s=o;delete n[e]&&Object.defineProperty(n,e,{get:function(){return s},set:function(r){return s=t.call(n,e,o,r)},enumerable:!0,configurable:!0})}if(isFunction(e))for(var s in this)new o(s,e);else new o(e,t)}})}Object.prototype.unwatchChange||Object.defineProperty(Object.prototype,"unwatchChange",{enumerable:!1,configurable:!0,writable:!1,value:function(e){var t=this[e];delete this[e],this[e]=t}}),function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery"],e):"undefined"!=typeof module&&module.exports?module.exports=e(require("jquery")):e(jQuery)}((function(e){"use strict";var t=e.scrollTo=function(t,n,o){return e(window).scrollTo(t,n,o)};function n(t){return!t.nodeName||-1!==e.inArray(t.nodeName.toLowerCase(),["iframe","#document","html","body"])}function o(t){return e.isFunction(t)||e.isPlainObject(t)?t:{top:t,left:t}}return t.defaults={axis:"xy",duration:0,limit:!0},e.fn.scrollTo=function(s,r,i){"object"==typeof r&&(i=r,r=0),"function"==typeof i&&(i={onAfter:i}),"max"===s&&(s=9e9),i=e.extend({},t.defaults,i),r=r||i.duration;var a=i.queue&&i.axis.length>1;return a&&(r/=2),i.offset=o(i.offset),i.over=o(i.over),this.each((function(){if(null!==s){var c,u=n(this),l=u?this.contentWindow||window:this,f=e(l),d=s,h={};switch(typeof d){case"number":case"string":if(/^([+-]=?)?\d+(\.\d+)?(px|%)?$/.test(d)){d=o(d);break}d=u?e(d):e(d,l);case"object":if(0===d.length)return;(d.is||d.style)&&(c=(d=e(d)).offset())}var m=e.isFunction(i.offset)&&i.offset(l,d)||i.offset;e.each(i.axis.split(""),(function(e,n){var o="x"===n?"Left":"Top",s=o.toLowerCase(),r="scroll"+o,p=f[r](),g=t.max(l,n);if(c)h[r]=c[s]+(u?0:p-f.offset()[s]),i.margin&&(h[r]-=parseInt(d.css("margin"+o),10)||0,h[r]-=parseInt(d.css("border"+o+"Width"),10)||0),h[r]+=m[s]||0,i.over[s]&&(h[r]+=d["x"===n?"width":"height"]()*i.over[s]);else{var v=d[s];h[r]=v.slice&&"%"===v.slice(-1)?parseFloat(v)/100*g:v}i.limit&&/^\d+$/.test(h[r])&&(h[r]=h[r]<=0?0:Math.min(h[r],g)),!e&&i.axis.length>1&&(p===h[r]?h={}:a&&(_(i.onAfterFirst),h={}))})),_(i.onAfter)}function _(t){var n=e.extend({},i,{queue:!0,duration:r,complete:t&&function(){t.call(l,d,i)}});f.animate(h,n)}}))},t.max=function(t,o){var s="x"===o?"Width":"Height",r="scroll"+s;if(!n(t))return t[r]-e(t)[s.toLowerCase()]();var i="client"+s,a=t.ownerDocument||t.document,c=a.documentElement,u=a.body;return Math.max(c[r],u[r])-Math.min(c[i],u[i])},e.Tween.propHooks.scrollLeft=e.Tween.propHooks.scrollTop={get:function(t){return e(t.elem)[t.prop]()},set:function(t){var n=this.get(t);if(t.options.interrupt&&t._last&&t._last!==n)return e(t.elem).stop();var o=Math.round(t.now);n!==o&&(e(t.elem)[t.prop](o),t._last=this.get(t))}},t})),function(e){e.backward_timer=function(t){var n={seconds:5,step:1,format:"h%:m%:s%",value_setter:void 0,on_exhausted:function(e){},on_tick:function(e){}},o=this;o.seconds_left=0,o.target=e(t),o.timeout=void 0,o.settings={},o.methods={init:function(t){o.settings=e.extend({},n,t),null==o.settings.value_setter&&(o.target.is("input")?o.settings.value_setter="val":o.settings.value_setter="text"),o.methods.reset()},start:function(){if(null==o.timeout){var e=o.seconds_left==o.settings.seconds?0:1e3*o.settings.step;setTimeout(o.methods._on_tick,e,e)}},cancel:function(){null!=o.timeout&&(clearTimeout(o.timeout),o.timeout=void 0)},reset:function(){o.seconds_left=o.settings.seconds,o.methods._render_seconds()},_on_tick:function(e){if(0!=e&&o.settings.on_tick(o),o.methods._render_seconds(),o.seconds_left>0){if(o.seconds_left<o.settings.step)var t=o.seconds_left;else t=o.settings.step;o.seconds_left-=t;var n=1e3*t;o.timeout=setTimeout(o.methods._on_tick,n,n)}else o.timeout=void 0,o.settings.on_exhausted(o)},_render_seconds:function(){var e=o.methods._seconds_to_dhms(o.seconds_left),t=o.settings.format;t=(t=-1!==t.indexOf("d%")?t.replace("d%",e.d).replace("h%",o.methods._check_leading_zero(e.h)):t.replace("h%",24*e.d+e.h)).replace("m%",o.methods._check_leading_zero(e.m)).replace("s%",o.methods._check_leading_zero(e.s)),o.target[o.settings.value_setter](t)},_seconds_to_dhms:function(e){var t=Math.floor(e/86400),n=(e-=24*t*3600,Math.floor(e/3600)),o=(e-=3600*n,Math.floor(e/60));return{d:t,h:n,m:o,s:Math.floor(e-60*o)}},_check_leading_zero:function(e){return e<10?"0"+e:""+e}}},e.fn.backward_timer=function(t){var n=arguments;return this.each((function(){var o=e(this).data("backward_timer");return null==o&&(o=new e.backward_timer(this),e(this).data("backward_timer",o)),o.methods[t]?o.methods[t].apply(this,Array.prototype.slice.call(n,1)):"object"!=typeof t&&t?void e.error("Method "+t+" does not exist on jQuery.backward_timer"):o.methods.init.apply(this,n)}))}}(jQuery);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ if (!Object.prototype.watchChange) {
2
+ var isFunction = function (fn) {
3
+ return fn && {}.toString.call(fn) === '[object Function]';
4
+ };
5
+ Object.defineProperty(
6
+ Object.prototype,
7
+ 'watchChange',
8
+ {
9
+ enumerable: false,
10
+ configurable: true,
11
+ writable: false,
12
+ value: function (prop, handler) {
13
+ var obj = this;
14
+
15
+ function x(prop, handler) {
16
+ var oldval = obj[prop],
17
+ newval = oldval,
18
+ getter = function () {
19
+ return newval;
20
+ },
21
+ setter = function (val) {
22
+ return newval = handler.call(obj, prop, oldval, val);
23
+ };
24
+
25
+ if (delete obj[prop]) {
26
+ Object.defineProperty(
27
+ obj,
28
+ prop,
29
+ {
30
+ get: getter,
31
+ set: setter,
32
+ enumerable: true,
33
+ configurable: true
34
+ }
35
+ );
36
+ }
37
+ }
38
+
39
+ if (isFunction(prop)) {
40
+ for (var k in this) {
41
+ new x(k, prop);
42
+ }
43
+ } else {
44
+ new x(prop, handler)
45
+ }
46
+ }
47
+ });
48
+ }
49
+
50
+ if (!Object.prototype.unwatchChange) {
51
+ Object.defineProperty(
52
+ Object.prototype,
53
+ 'unwatchChange',
54
+ {
55
+ enumerable: false,
56
+ configurable: true,
57
+ writable: false,
58
+ value: function (prop) {
59
+ var val = this[prop];
60
+ delete this[prop];
61
+ this[prop] = val;
62
+ }
63
+ }
64
+ );
65
+ }
66
+ /*!
67
+ * jQuery.scrollTo
68
+ * Copyright (c) 2007-2015 Ariel Flesler - aflesler ○ gmail • com | http://flesler.blogspot.com
69
+ * Licensed under MIT
70
+ * http://flesler.blogspot.com/2007/10/jqueryscrollto.html
71
+ * @projectDescription Lightweight, cross-browser and highly customizable animated scrolling with jQuery
72
+ * @author Ariel Flesler
73
+ * @version 2.1.2
74
+ */
75
+ ;(function(factory) {
76
+ 'use strict';
77
+ if (typeof define === 'function' && define.amd) {
78
+ // AMD
79
+ define(['jquery'], factory);
80
+ } else if (typeof module !== 'undefined' && module.exports) {
81
+ // CommonJS
82
+ module.exports = factory(require('jquery'));
83
+ } else {
84
+ // Global
85
+ factory(jQuery);
86
+ }
87
+ })(function($) {
88
+ 'use strict';
89
+
90
+ var $scrollTo = $.scrollTo = function(target, duration, settings) {
91
+ return $(window).scrollTo(target, duration, settings);
92
+ };
93
+
94
+ $scrollTo.defaults = {
95
+ axis:'xy',
96
+ duration: 0,
97
+ limit:true
98
+ };
99
+
100
+ function isWin(elem) {
101
+ return !elem.nodeName ||
102
+ $.inArray(elem.nodeName.toLowerCase(), ['iframe','#document','html','body']) !== -1;
103
+ }
104
+
105
+ $.fn.scrollTo = function(target, duration, settings) {
106
+ if (typeof duration === 'object') {
107
+ settings = duration;
108
+ duration = 0;
109
+ }
110
+ if (typeof settings === 'function') {
111
+ settings = { onAfter:settings };
112
+ }
113
+ if (target === 'max') {
114
+ target = 9e9;
115
+ }
116
+
117
+ settings = $.extend({}, $scrollTo.defaults, settings);
118
+ // Speed is still recognized for backwards compatibility
119
+ duration = duration || settings.duration;
120
+ // Make sure the settings are given right
121
+ var queue = settings.queue && settings.axis.length > 1;
122
+ if (queue) {
123
+ // Let's keep the overall duration
124
+ duration /= 2;
125
+ }
126
+ settings.offset = both(settings.offset);
127
+ settings.over = both(settings.over);
128
+
129
+ return this.each(function() {
130
+ // Null target yields nothing, just like jQuery does
131
+ if (target === null) return;
132
+
133
+ var win = isWin(this),
134
+ elem = win ? this.contentWindow || window : this,
135
+ $elem = $(elem),
136
+ targ = target,
137
+ attr = {},
138
+ toff;
139
+
140
+ switch (typeof targ) {
141
+ // A number will pass the regex
142
+ case 'number':
143
+ case 'string':
144
+ if (/^([+-]=?)?\d+(\.\d+)?(px|%)?$/.test(targ)) {
145
+ targ = both(targ);
146
+ // We are done
147
+ break;
148
+ }
149
+ // Relative/Absolute selector
150
+ targ = win ? $(targ) : $(targ, elem);
151
+ /* falls through */
152
+ case 'object':
153
+ if (targ.length === 0) return;
154
+ // DOMElement / jQuery
155
+ if (targ.is || targ.style) {
156
+ // Get the real position of the target
157
+ toff = (targ = $(targ)).offset();
158
+ }
159
+ }
160
+
161
+ var offset = $.isFunction(settings.offset) && settings.offset(elem, targ) || settings.offset;
162
+
163
+ $.each(settings.axis.split(''), function(i, axis) {
164
+ var Pos = axis === 'x' ? 'Left' : 'Top',
165
+ pos = Pos.toLowerCase(),
166
+ key = 'scroll' + Pos,
167
+ prev = $elem[key](),
168
+ max = $scrollTo.max(elem, axis);
169
+
170
+ if (toff) {// jQuery / DOMElement
171
+ attr[key] = toff[pos] + (win ? 0 : prev - $elem.offset()[pos]);
172
+
173
+ // If it's a dom element, reduce the margin
174
+ if (settings.margin) {
175
+ attr[key] -= parseInt(targ.css('margin'+Pos), 10) || 0;
176
+ attr[key] -= parseInt(targ.css('border'+Pos+'Width'), 10) || 0;
177
+ }
178
+
179
+ attr[key] += offset[pos] || 0;
180
+
181
+ if (settings.over[pos]) {
182
+ // Scroll to a fraction of its width/height
183
+ attr[key] += targ[axis === 'x'?'width':'height']() * settings.over[pos];
184
+ }
185
+ } else {
186
+ var val = targ[pos];
187
+ // Handle percentage values
188
+ attr[key] = val.slice && val.slice(-1) === '%' ?
189
+ parseFloat(val) / 100 * max
190
+ : val;
191
+ }
192
+
193
+ // Number or 'number'
194
+ if (settings.limit && /^\d+$/.test(attr[key])) {
195
+ // Check the limits
196
+ attr[key] = attr[key] <= 0 ? 0 : Math.min(attr[key], max);
197
+ }
198
+
199
+ // Don't waste time animating, if there's no need.
200
+ if (!i && settings.axis.length > 1) {
201
+ if (prev === attr[key]) {
202
+ // No animation needed
203
+ attr = {};
204
+ } else if (queue) {
205
+ // Intermediate animation
206
+ animate(settings.onAfterFirst);
207
+ // Don't animate this axis again in the next iteration.
208
+ attr = {};
209
+ }
210
+ }
211
+ });
212
+
213
+ animate(settings.onAfter);
214
+
215
+ function animate(callback) {
216
+ var opts = $.extend({}, settings, {
217
+ // The queue setting conflicts with animate()
218
+ // Force it to always be true
219
+ queue: true,
220
+ duration: duration,
221
+ complete: callback && function() {
222
+ callback.call(elem, targ, settings);
223
+ }
224
+ });
225
+ $elem.animate(attr, opts);
226
+ }
227
+ });
228
+ };
229
+
230
+ // Max scrolling position, works on quirks mode
231
+ // It only fails (not too badly) on IE, quirks mode.
232
+ $scrollTo.max = function(elem, axis) {
233
+ var Dim = axis === 'x' ? 'Width' : 'Height',
234
+ scroll = 'scroll'+Dim;
235
+
236
+ if (!isWin(elem))
237
+ return elem[scroll] - $(elem)[Dim.toLowerCase()]();
238
+
239
+ var size = 'client' + Dim,
240
+ doc = elem.ownerDocument || elem.document,
241
+ html = doc.documentElement,
242
+ body = doc.body;
243
+
244
+ return Math.max(html[scroll], body[scroll]) - Math.min(html[size], body[size]);
245
+ };
246
+
247
+ function both(val) {
248
+ return $.isFunction(val) || $.isPlainObject(val) ? val : { top:val, left:val };
249
+ }
250
+
251
+ // Add special hooks so that window scroll properties can be animated
252
+ $.Tween.propHooks.scrollLeft =
253
+ $.Tween.propHooks.scrollTop = {
254
+ get: function(t) {
255
+ return $(t.elem)[t.prop]();
256
+ },
257
+ set: function(t) {
258
+ var curr = this.get(t);
259
+ // If interrupt is true and user scrolled, stop animating
260
+ if (t.options.interrupt && t._last && t._last !== curr) {
261
+ return $(t.elem).stop();
262
+ }
263
+ var next = Math.round(t.now);
264
+ // Don't waste CPU
265
+ // Browsers don't render floating point scroll
266
+ if (curr !== next) {
267
+ $(t.elem)[t.prop](next);
268
+ t._last = this.get(t);
269
+ }
270
+ }
271
+ };
272
+
273
+ // AMD requirement
274
+ return $scrollTo;
275
+ });
276
+ (function (e) {
277
+ e.backward_timer = function (t) {
278
+ var n = {seconds: 5, step: 1, format: "h%:m%:s%", value_setter: undefined, on_exhausted: function (e) {
279
+ }, on_tick : function (e) {
280
+ }}, r = this;
281
+ r.seconds_left = 0;
282
+ r.target = e(t);
283
+ r.timeout = undefined;
284
+ r.settings = {};
285
+ r.methods = {init : function (t) {
286
+ r.settings = e.extend({}, n, t);
287
+ if (r.settings.value_setter == undefined) {
288
+ if (r.target.is("input")) {
289
+ r.settings.value_setter = "val"
290
+ } else {
291
+ r.settings.value_setter = "text"
292
+ }
293
+ }
294
+ r.methods.reset()
295
+ }, start : function () {
296
+ if (r.timeout == undefined) {
297
+ var e = r.seconds_left == r.settings.seconds ? 0 : r.settings.step * 1e3;
298
+ setTimeout(r.methods._on_tick, e, e)
299
+ }
300
+ }, cancel : function () {
301
+ if (r.timeout != undefined) {
302
+ clearTimeout(r.timeout);
303
+ r.timeout = undefined
304
+ }
305
+ }, reset : function () {
306
+ r.seconds_left = r.settings.seconds;
307
+ r.methods._render_seconds()
308
+ }, _on_tick : function (e) {
309
+ if (e != 0) {
310
+ r.settings.on_tick(r)
311
+ }
312
+ r.methods._render_seconds();
313
+ if (r.seconds_left > 0) {
314
+ if (r.seconds_left < r.settings.step) {
315
+ var t = r.seconds_left
316
+ } else {
317
+ var t = r.settings.step
318
+ }
319
+ r.seconds_left -= t;
320
+ var n = t * 1e3;
321
+ r.timeout = setTimeout(r.methods._on_tick, n, n)
322
+ } else {
323
+ r.timeout = undefined;
324
+ r.settings.on_exhausted(r)
325
+ }
326
+ }, _render_seconds : function () {
327
+ var e = r.methods._seconds_to_dhms(r.seconds_left), t = r.settings.format;
328
+ if (t.indexOf("d%") !== -1) {
329
+ t = t.replace("d%", e.d).replace("h%", r.methods._check_leading_zero(e.h))
330
+ } else {
331
+ t = t.replace("h%", e.d * 24 + e.h)
332
+ }
333
+ t = t.replace("m%", r.methods._check_leading_zero(e.m)).replace("s%", r.methods._check_leading_zero(e.s));
334
+ r.target[r.settings.value_setter](t)
335
+ }, _seconds_to_dhms : function (e) {
336
+ var t = Math.floor(e / (24 * 3600)), e = e - t * 24 * 3600, n = Math.floor(e / 3600), e = e - n * 3600, r = Math.floor(e / 60), i = Math.floor(e - r * 60);
337
+ return{d: t, h: n, m: r, s: i}
338
+ }, _check_leading_zero: function (e) {
339
+ return e < 10 ? "0" + e : "" + e
340
+ }}
341
+ };
342
+ e.fn.backward_timer = function (t) {
343
+ var n = arguments;
344
+ return this.each(function () {
345
+ var r = e(this).data("backward_timer");
346
+ if (r == undefined) {
347
+ r = new e.backward_timer(this);
348
+ e(this).data("backward_timer", r)
349
+ }
350
+ if (r.methods[t]) {
351
+ return r.methods[t].apply(this, Array.prototype.slice.call(n, 1))
352
+ } else if (typeof t === "object" || !t) {
353
+ return r.methods.init.apply(this, n)
354
+ } else {
355
+ e.error("Method " + t + " does not exist on jQuery.backward_timer")
356
+ }
357
+ })
358
+ }
359
+ })(jQuery);
assets/js/vendor/vue/vue_libs.js CHANGED
@@ -1 +1,14524 @@
1
- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e=e||self).Vue=t()}(this,(function(){"use strict";var e=Object.freeze({});function t(e){return null==e}function n(e){return null!=e}function r(e){return!0===e}function o(e){return"string"==typeof e||"number"==typeof e||"symbol"==typeof e||"boolean"==typeof e}function i(e){return null!==e&&"object"==typeof e}var a=Object.prototype.toString;function s(e){return a.call(e).slice(8,-1)}function c(e){return"[object Object]"===a.call(e)}function u(e){return"[object RegExp]"===a.call(e)}function l(e){var t=parseFloat(String(e));return t>=0&&Math.floor(t)===t&&isFinite(e)}function f(e){return n(e)&&"function"==typeof e.then&&"function"==typeof e.catch}function p(e){return null==e?"":Array.isArray(e)||c(e)&&e.toString===a?JSON.stringify(e,null,2):String(e)}function d(e){var t=parseFloat(e);return isNaN(t)?e:t}function v(e,t){for(var n=Object.create(null),r=e.split(","),o=0;o<r.length;o++)n[r[o]]=!0;return t?function(e){return n[e.toLowerCase()]}:function(e){return n[e]}}var h=v("slot,component",!0),m=v("key,ref,slot,slot-scope,is");function y(e,t){if(e.length){var n=e.indexOf(t);if(n>-1)return e.splice(n,1)}}var g=Object.prototype.hasOwnProperty;function b(e,t){return g.call(e,t)}function _(e){var t=Object.create(null);return function(n){return t[n]||(t[n]=e(n))}}var w=/-(\w)/g,x=_((function(e){return e.replace(w,(function(e,t){return t?t.toUpperCase():""}))})),$=_((function(e){return e.charAt(0).toUpperCase()+e.slice(1)})),C=/\B([A-Z])/g,k=_((function(e){return e.replace(C,"-$1").toLowerCase()})),A=Function.prototype.bind?function(e,t){return e.bind(t)}:function(e,t){function n(n){var r=arguments.length;return r?r>1?e.apply(t,arguments):e.call(t,n):e.call(t)}return n._length=e.length,n};function O(e,t){t=t||0;for(var n=e.length-t,r=new Array(n);n--;)r[n]=e[n+t];return r}function S(e,t){for(var n in t)e[n]=t[n];return e}function T(e){for(var t={},n=0;n<e.length;n++)e[n]&&S(t,e[n]);return t}function j(e,t,n){}var E=function(e,t,n){return!1},M=function(e){return e};function N(e,t){if(e===t)return!0;var n=i(e),r=i(t);if(!n||!r)return!n&&!r&&String(e)===String(t);try{var o=Array.isArray(e),a=Array.isArray(t);if(o&&a)return e.length===t.length&&e.every((function(e,n){return N(e,t[n])}));if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();if(o||a)return!1;var s=Object.keys(e),c=Object.keys(t);return s.length===c.length&&s.every((function(n){return N(e[n],t[n])}))}catch(e){return!1}}function P(e,t){for(var n=0;n<e.length;n++)if(N(e[n],t))return n;return-1}function I(e){var t=!1;return function(){t||(t=!0,e.apply(this,arguments))}}var L="data-server-rendered",D=["component","directive","filter"],R=["beforeCreate","created","beforeMount","mounted","beforeUpdate","updated","beforeDestroy","destroyed","activated","deactivated","errorCaptured","serverPrefetch"],F={optionMergeStrategies:Object.create(null),silent:!1,productionTip:!0,devtools:!0,performance:!1,errorHandler:null,warnHandler:null,ignoredElements:[],keyCodes:Object.create(null),isReservedTag:E,isReservedAttr:E,isUnknownElement:E,getTagNamespace:j,parsePlatformTagName:M,mustUseProp:E,async:!0,_lifecycleHooks:R},U=/a-zA-Z\u00B7\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u037D\u037F-\u1FFF\u200C-\u200D\u203F-\u2040\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD/;function H(e){var t=(e+"").charCodeAt(0);return 36===t||95===t}function V(e,t,n,r){Object.defineProperty(e,t,{value:n,enumerable:!!r,writable:!0,configurable:!0})}var B,q=new RegExp("[^"+U.source+".$_\\d]"),z="__proto__"in{},J="undefined"!=typeof window,G="undefined"!=typeof WXEnvironment&&!!WXEnvironment.platform,K=G&&WXEnvironment.platform.toLowerCase(),W=J&&window.navigator.userAgent.toLowerCase(),X=W&&/msie|trident/.test(W),Z=W&&W.indexOf("msie 9.0")>0,Y=W&&W.indexOf("edge/")>0,Q=(W&&W.indexOf("android"),W&&/iphone|ipad|ipod|ios/.test(W)||"ios"===K),ee=(W&&/chrome\/\d+/.test(W),W&&/phantomjs/.test(W),W&&W.match(/firefox\/(\d+)/)),te={}.watch,ne=!1;if(J)try{var re={};Object.defineProperty(re,"passive",{get:function(){ne=!0}}),window.addEventListener("test-passive",null,re)}catch(e){}var oe=function(){return void 0===B&&(B=!J&&!G&&"undefined"!=typeof global&&global.process&&"server"===global.process.env.VUE_ENV),B},ie=J&&window.__VUE_DEVTOOLS_GLOBAL_HOOK__;function ae(e){return"function"==typeof e&&/native code/.test(e.toString())}var se,ce="undefined"!=typeof Symbol&&ae(Symbol)&&"undefined"!=typeof Reflect&&ae(Reflect.ownKeys);se="undefined"!=typeof Set&&ae(Set)?Set:function(){function e(){this.set=Object.create(null)}return e.prototype.has=function(e){return!0===this.set[e]},e.prototype.add=function(e){this.set[e]=!0},e.prototype.clear=function(){this.set=Object.create(null)},e}();var ue,le,fe,pe=j,de="undefined"!=typeof console,ve=/(?:^|[-_])(\w)/g;ue=function(e,t){var n=t?pe(t):"";F.warnHandler?F.warnHandler.call(null,e,t,n):de&&!F.silent&&console.error("[Vue warn]: "+e+n)},le=function(e,t){de&&!F.silent&&console.warn("[Vue tip]: "+e+(t?pe(t):""))},fe=function(e,t){if(e.$root===e)return"<Root>";var n="function"==typeof e&&null!=e.cid?e.options:e._isVue?e.$options||e.constructor.options:e,r=n.name||n._componentTag,o=n.__file;if(!r&&o){var i=o.match(/([^/\\]+)\.vue$/);r=i&&i[1]}return(r?"<"+function(e){return e.replace(ve,(function(e){return e.toUpperCase()})).replace(/[-_]/g,"")}(r)+">":"<Anonymous>")+(o&&!1!==t?" at "+o:"")},pe=function(e){if(e._isVue&&e.$parent){for(var t=[],n=0;e;){if(t.length>0){var r=t[t.length-1];if(r.constructor===e.constructor){n++,e=e.$parent;continue}n>0&&(t[t.length-1]=[r,n],n=0)}t.push(e),e=e.$parent}return"\n\nfound in\n\n"+t.map((function(e,t){return""+(0===t?"---\x3e ":function(e,t){for(var n="";t;)t%2==1&&(n+=e),t>1&&(e+=e),t>>=1;return n}(" ",5+2*t))+(Array.isArray(e)?fe(e[0])+"... ("+e[1]+" recursive calls)":fe(e))})).join("\n")}return"\n\n(found in "+fe(e)+")"};var he=0,me=function(){this.id=he++,this.subs=[]};me.prototype.addSub=function(e){this.subs.push(e)},me.prototype.removeSub=function(e){y(this.subs,e)},me.prototype.depend=function(){me.target&&me.target.addDep(this)},me.prototype.notify=function(){var e=this.subs.slice();F.async||e.sort((function(e,t){return e.id-t.id}));for(var t=0,n=e.length;t<n;t++)e[t].update()},me.target=null;var ye=[];function ge(e){ye.push(e),me.target=e}function be(){ye.pop(),me.target=ye[ye.length-1]}var _e=function(e,t,n,r,o,i,a,s){this.tag=e,this.data=t,this.children=n,this.text=r,this.elm=o,this.ns=void 0,this.context=i,this.fnContext=void 0,this.fnOptions=void 0,this.fnScopeId=void 0,this.key=t&&t.key,this.componentOptions=a,this.componentInstance=void 0,this.parent=void 0,this.raw=!1,this.isStatic=!1,this.isRootInsert=!0,this.isComment=!1,this.isCloned=!1,this.isOnce=!1,this.asyncFactory=s,this.asyncMeta=void 0,this.isAsyncPlaceholder=!1},we={child:{configurable:!0}};we.child.get=function(){return this.componentInstance},Object.defineProperties(_e.prototype,we);var xe=function(e){void 0===e&&(e="");var t=new _e;return t.text=e,t.isComment=!0,t};function $e(e){return new _e(void 0,void 0,void 0,String(e))}function Ce(e){var t=new _e(e.tag,e.data,e.children&&e.children.slice(),e.text,e.elm,e.context,e.componentOptions,e.asyncFactory);return t.ns=e.ns,t.isStatic=e.isStatic,t.key=e.key,t.isComment=e.isComment,t.fnContext=e.fnContext,t.fnOptions=e.fnOptions,t.fnScopeId=e.fnScopeId,t.asyncMeta=e.asyncMeta,t.isCloned=!0,t}var ke=Array.prototype,Ae=Object.create(ke);["push","pop","shift","unshift","splice","sort","reverse"].forEach((function(e){var t=ke[e];V(Ae,e,(function(){for(var n=[],r=arguments.length;r--;)n[r]=arguments[r];var o,i=t.apply(this,n),a=this.__ob__;switch(e){case"push":case"unshift":o=n;break;case"splice":o=n.slice(2)}return o&&a.observeArray(o),a.dep.notify(),i}))}));var Oe=Object.getOwnPropertyNames(Ae),Se=!0;function Te(e){Se=e}var je=function(e){this.value=e,this.dep=new me,this.vmCount=0,V(e,"__ob__",this),Array.isArray(e)?(z?function(e,t){e.__proto__=t}(e,Ae):function(e,t,n){for(var r=0,o=n.length;r<o;r++){var i=n[r];V(e,i,t[i])}}(e,Ae,Oe),this.observeArray(e)):this.walk(e)};function Ee(e,t){var n;if(i(e)&&!(e instanceof _e))return b(e,"__ob__")&&e.__ob__ instanceof je?n=e.__ob__:Se&&!oe()&&(Array.isArray(e)||c(e))&&Object.isExtensible(e)&&!e._isVue&&(n=new je(e)),t&&n&&n.vmCount++,n}function Me(e,t,n,r,o){var i=new me,a=Object.getOwnPropertyDescriptor(e,t);if(!a||!1!==a.configurable){var s=a&&a.get,c=a&&a.set;s&&!c||2!==arguments.length||(n=e[t]);var u=!o&&Ee(n);Object.defineProperty(e,t,{enumerable:!0,configurable:!0,get:function(){var t=s?s.call(e):n;return me.target&&(i.depend(),u&&(u.dep.depend(),Array.isArray(t)&&Ie(t))),t},set:function(t){var a=s?s.call(e):n;t===a||t!=t&&a!=a||(r&&r(),s&&!c||(c?c.call(e,t):n=t,u=!o&&Ee(t),i.notify()))}})}}function Ne(e,n,r){if((t(e)||o(e))&&ue("Cannot set reactive property on undefined, null, or primitive value: "+e),Array.isArray(e)&&l(n))return e.length=Math.max(e.length,n),e.splice(n,1,r),r;if(n in e&&!(n in Object.prototype))return e[n]=r,r;var i=e.__ob__;return e._isVue||i&&i.vmCount?(ue("Avoid adding reactive properties to a Vue instance or its root $data at runtime - declare it upfront in the data option."),r):i?(Me(i.value,n,r),i.dep.notify(),r):(e[n]=r,r)}function Pe(e,n){if((t(e)||o(e))&&ue("Cannot delete reactive property on undefined, null, or primitive value: "+e),Array.isArray(e)&&l(n))e.splice(n,1);else{var r=e.__ob__;e._isVue||r&&r.vmCount?ue("Avoid deleting properties on a Vue instance or its root $data - just set it to null."):b(e,n)&&(delete e[n],r&&r.dep.notify())}}function Ie(e){for(var t=void 0,n=0,r=e.length;n<r;n++)(t=e[n])&&t.__ob__&&t.__ob__.dep.depend(),Array.isArray(t)&&Ie(t)}je.prototype.walk=function(e){for(var t=Object.keys(e),n=0;n<t.length;n++)Me(e,t[n])},je.prototype.observeArray=function(e){for(var t=0,n=e.length;t<n;t++)Ee(e[t])};var Le=F.optionMergeStrategies;function De(e,t){if(!t)return e;for(var n,r,o,i=ce?Reflect.ownKeys(t):Object.keys(t),a=0;a<i.length;a++)"__ob__"!==(n=i[a])&&(r=e[n],o=t[n],b(e,n)?r!==o&&c(r)&&c(o)&&De(r,o):Ne(e,n,o));return e}function Re(e,t,n){return n?function(){var r="function"==typeof t?t.call(n,n):t,o="function"==typeof e?e.call(n,n):e;return r?De(r,o):o}:t?e?function(){return De("function"==typeof t?t.call(this,this):t,"function"==typeof e?e.call(this,this):e)}:t:e}function Fe(e,t){var n=t?e?e.concat(t):Array.isArray(t)?t:[t]:e;return n?function(e){for(var t=[],n=0;n<e.length;n++)-1===t.indexOf(e[n])&&t.push(e[n]);return t}(n):n}function Ue(e,t,n,r){var o=Object.create(e||null);return t?(Be(r,t,n),S(o,t)):o}Le.el=Le.propsData=function(e,t,n,r){return n||ue('option "'+r+'" can only be used during instance creation with the `new` keyword.'),He(e,t)},Le.data=function(e,t,n){return n?Re(e,t,n):t&&"function"!=typeof t?(ue('The "data" option should be a function that returns a per-instance value in component definitions.',n),e):Re(e,t)},R.forEach((function(e){Le[e]=Fe})),D.forEach((function(e){Le[e+"s"]=Ue})),Le.watch=function(e,t,n,r){if(e===te&&(e=void 0),t===te&&(t=void 0),!t)return Object.create(e||null);if(Be(r,t,n),!e)return t;var o={};for(var i in S(o,e),t){var a=o[i],s=t[i];a&&!Array.isArray(a)&&(a=[a]),o[i]=a?a.concat(s):Array.isArray(s)?s:[s]}return o},Le.props=Le.methods=Le.inject=Le.computed=function(e,t,n,r){if(t&&Be(r,t,n),!e)return t;var o=Object.create(null);return S(o,e),t&&S(o,t),o},Le.provide=Re;var He=function(e,t){return void 0===t?e:t};function Ve(e){new RegExp("^[a-zA-Z][\\-\\.0-9_"+U.source+"]*$").test(e)||ue('Invalid component name: "'+e+'". Component names should conform to valid custom element name in html5 specification.'),(h(e)||F.isReservedTag(e))&&ue("Do not use built-in or reserved HTML elements as component id: "+e)}function Be(e,t,n){c(t)||ue('Invalid value for option "'+e+'": expected an Object, but got '+s(t)+".",n)}function qe(e,t,n){if(function(e){for(var t in e.components)Ve(t)}(t),"function"==typeof t&&(t=t.options),function(e,t){var n=e.props;if(n){var r,o,i={};if(Array.isArray(n))for(r=n.length;r--;)"string"==typeof(o=n[r])?i[x(o)]={type:null}:ue("props must be strings when using array syntax.");else if(c(n))for(var a in n)o=n[a],i[x(a)]=c(o)?o:{type:o};else ue('Invalid value for option "props": expected an Array or an Object, but got '+s(n)+".",t);e.props=i}}(t,n),function(e,t){var n=e.inject;if(n){var r=e.inject={};if(Array.isArray(n))for(var o=0;o<n.length;o++)r[n[o]]={from:n[o]};else if(c(n))for(var i in n){var a=n[i];r[i]=c(a)?S({from:i},a):{from:a}}else ue('Invalid value for option "inject": expected an Array or an Object, but got '+s(n)+".",t)}}(t,n),function(e){var t=e.directives;if(t)for(var n in t){var r=t[n];"function"==typeof r&&(t[n]={bind:r,update:r})}}(t),!t._base&&(t.extends&&(e=qe(e,t.extends,n)),t.mixins))for(var r=0,o=t.mixins.length;r<o;r++)e=qe(e,t.mixins[r],n);var i,a={};for(i in e)u(i);for(i in t)b(e,i)||u(i);function u(r){var o=Le[r]||He;a[r]=o(e[r],t[r],n,r)}return a}function ze(e,t,n,r){if("string"==typeof n){var o=e[t];if(b(o,n))return o[n];var i=x(n);if(b(o,i))return o[i];var a=$(i);if(b(o,a))return o[a];var s=o[n]||o[i]||o[a];return r&&!s&&ue("Failed to resolve "+t.slice(0,-1)+": "+n,e),s}}function Je(e,t,n,r){var o=t[e],a=!b(n,e),c=n[e],u=Ze(Boolean,o.type);if(u>-1)if(a&&!b(o,"default"))c=!1;else if(""===c||c===k(e)){var l=Ze(String,o.type);(l<0||u<l)&&(c=!0)}if(void 0===c){c=function(e,t,n){if(b(t,"default")){var r=t.default;return i(r)&&ue('Invalid default value for prop "'+n+'": Props with type Object/Array must use a factory function to return the default value.',e),e&&e.$options.propsData&&void 0===e.$options.propsData[n]&&void 0!==e._props[n]?e._props[n]:"function"==typeof r&&"Function"!==We(t.type)?r.call(e):r}}(r,o,e);var f=Se;Te(!0),Ee(c),Te(f)}return function(e,t,n,r,o){if(e.required&&o)ue('Missing required prop: "'+t+'"',r);else if(null!=n||e.required){var i=e.type,a=!i||!0===i,c=[];if(i){Array.isArray(i)||(i=[i]);for(var u=0;u<i.length&&!a;u++){var l=Ke(n,i[u]);c.push(l.expectedType||""),a=l.valid}}if(a){var f=e.validator;f&&(f(n)||ue('Invalid prop: custom validator check failed for prop "'+t+'".',r))}else ue(function(e,t,n){var r='Invalid prop: type check failed for prop "'+e+'". Expected '+n.map($).join(", "),o=n[0],i=s(t),a=Ye(t,o),c=Ye(t,i);return 1===n.length&&Qe(o)&&!function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return e.some((function(e){return"boolean"===e.toLowerCase()}))}(o,i)&&(r+=" with value "+a),r+=", got "+i+" ",Qe(i)&&(r+="with value "+c+"."),r}(t,n,c),r)}}(o,e,c,r,a),c}var Ge=/^(String|Number|Boolean|Function|Symbol)$/;function Ke(e,t){var n,r=We(t);if(Ge.test(r)){var o=typeof e;(n=o===r.toLowerCase())||"object"!==o||(n=e instanceof t)}else n="Object"===r?c(e):"Array"===r?Array.isArray(e):e instanceof t;return{valid:n,expectedType:r}}function We(e){var t=e&&e.toString().match(/^\s*function (\w+)/);return t?t[1]:""}function Xe(e,t){return We(e)===We(t)}function Ze(e,t){if(!Array.isArray(t))return Xe(t,e)?0:-1;for(var n=0,r=t.length;n<r;n++)if(Xe(t[n],e))return n;return-1}function Ye(e,t){return"String"===t?'"'+e+'"':"Number"===t?""+Number(e):""+e}function Qe(e){return["string","number","boolean"].some((function(t){return e.toLowerCase()===t}))}function et(e,t,n){ge();try{if(t)for(var r=t;r=r.$parent;){var o=r.$options.errorCaptured;if(o)for(var i=0;i<o.length;i++)try{if(!1===o[i].call(r,e,t,n))return}catch(e){nt(e,r,"errorCaptured hook")}}nt(e,t,n)}finally{be()}}function tt(e,t,n,r,o){var i;try{(i=n?e.apply(t,n):e.call(t))&&!i._isVue&&f(i)&&!i._handled&&(i.catch((function(e){return et(e,r,o+" (Promise/async)")})),i._handled=!0)}catch(e){et(e,r,o)}return i}function nt(e,t,n){if(F.errorHandler)try{return F.errorHandler.call(null,e,t,n)}catch(t){t!==e&&rt(t,null,"config.errorHandler")}rt(e,t,n)}function rt(e,t,n){if(ue("Error in "+n+': "'+e.toString()+'"',t),!J&&!G||"undefined"==typeof console)throw e;console.error(e)}var ot,it,at,st=!1,ct=[],ut=!1;function lt(){ut=!1;var e=ct.slice(0);ct.length=0;for(var t=0;t<e.length;t++)e[t]()}if("undefined"!=typeof Promise&&ae(Promise)){var ft=Promise.resolve();ot=function(){ft.then(lt),Q&&setTimeout(j)},st=!0}else if(X||"undefined"==typeof MutationObserver||!ae(MutationObserver)&&"[object MutationObserverConstructor]"!==MutationObserver.toString())ot="undefined"!=typeof setImmediate&&ae(setImmediate)?function(){setImmediate(lt)}:function(){setTimeout(lt,0)};else{var pt=1,dt=new MutationObserver(lt),vt=document.createTextNode(String(pt));dt.observe(vt,{characterData:!0}),ot=function(){pt=(pt+1)%2,vt.data=String(pt)},st=!0}function ht(e,t){var n;if(ct.push((function(){if(e)try{e.call(t)}catch(e){et(e,t,"nextTick")}else n&&n(t)})),ut||(ut=!0,ot()),!e&&"undefined"!=typeof Promise)return new Promise((function(e){n=e}))}var mt,yt=J&&window.performance;yt&&yt.mark&&yt.measure&&yt.clearMarks&&yt.clearMeasures&&(it=function(e){return yt.mark(e)},at=function(e,t,n){yt.measure(e,t,n),yt.clearMarks(t),yt.clearMarks(n)});var gt=v("Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,require"),bt=function(e,t){ue('Property or method "'+t+'" is not defined on the instance but referenced during render. Make sure that this property is reactive, either in the data option, or for class-based components, by initializing the property. See: https://vuejs.org/v2/guide/reactivity.html#Declaring-Reactive-Properties.',e)},_t=function(e,t){ue('Property "'+t+'" must be accessed with "$data.'+t+'" because properties starting with "$" or "_" are not proxied in the Vue instance to prevent conflicts with Vue internalsSee: https://vuejs.org/v2/api/#data',e)},wt="undefined"!=typeof Proxy&&ae(Proxy);if(wt){var xt=v("stop,prevent,self,ctrl,shift,alt,meta,exact");F.keyCodes=new Proxy(F.keyCodes,{set:function(e,t,n){return xt(t)?(ue("Avoid overwriting built-in modifier in config.keyCodes: ."+t),!1):(e[t]=n,!0)}})}var $t={has:function(e,t){var n=t in e,r=gt(t)||"string"==typeof t&&"_"===t.charAt(0)&&!(t in e.$data);return n||r||(t in e.$data?_t(e,t):bt(e,t)),n||!r}},Ct={get:function(e,t){return"string"!=typeof t||t in e||(t in e.$data?_t(e,t):bt(e,t)),e[t]}};mt=function(e){if(wt){var t=e.$options,n=t.render&&t.render._withStripped?Ct:$t;e._renderProxy=new Proxy(e,n)}else e._renderProxy=e};var kt=new se;function At(e){Ot(e,kt),kt.clear()}function Ot(e,t){var n,r,o=Array.isArray(e);if(!(!o&&!i(e)||Object.isFrozen(e)||e instanceof _e)){if(e.__ob__){var a=e.__ob__.dep.id;if(t.has(a))return;t.add(a)}if(o)for(n=e.length;n--;)Ot(e[n],t);else for(n=(r=Object.keys(e)).length;n--;)Ot(e[r[n]],t)}}var St=_((function(e){var t="&"===e.charAt(0),n="~"===(e=t?e.slice(1):e).charAt(0),r="!"===(e=n?e.slice(1):e).charAt(0);return{name:e=r?e.slice(1):e,once:n,capture:r,passive:t}}));function Tt(e,t){function n(){var e=arguments,r=n.fns;if(!Array.isArray(r))return tt(r,null,arguments,t,"v-on handler");for(var o=r.slice(),i=0;i<o.length;i++)tt(o[i],null,e,t,"v-on handler")}return n.fns=e,n}function jt(e,n,o,i,a,s){var c,u,l,f;for(c in e)u=e[c],l=n[c],f=St(c),t(u)?ue('Invalid handler for event "'+f.name+'": got '+String(u),s):t(l)?(t(u.fns)&&(u=e[c]=Tt(u,s)),r(f.once)&&(u=e[c]=a(f.name,u,f.capture)),o(f.name,u,f.capture,f.passive,f.params)):u!==l&&(l.fns=u,e[c]=l);for(c in n)t(e[c])&&i((f=St(c)).name,n[c],f.capture)}function Et(e,o,i){var a;e instanceof _e&&(e=e.data.hook||(e.data.hook={}));var s=e[o];function c(){i.apply(this,arguments),y(a.fns,c)}t(s)?a=Tt([c]):n(s.fns)&&r(s.merged)?(a=s).fns.push(c):a=Tt([s,c]),a.merged=!0,e[o]=a}function Mt(e,t,r,o,i){if(n(t)){if(b(t,r))return e[r]=t[r],i||delete t[r],!0;if(b(t,o))return e[r]=t[o],i||delete t[o],!0}return!1}function Nt(e){return o(e)?[$e(e)]:Array.isArray(e)?It(e):void 0}function Pt(e){return n(e)&&n(e.text)&&!1===e.isComment}function It(e,i){var a,s,c,u,l=[];for(a=0;a<e.length;a++)t(s=e[a])||"boolean"==typeof s||(u=l[c=l.length-1],Array.isArray(s)?s.length>0&&(Pt((s=It(s,(i||"")+"_"+a))[0])&&Pt(u)&&(l[c]=$e(u.text+s[0].text),s.shift()),l.push.apply(l,s)):o(s)?Pt(u)?l[c]=$e(u.text+s):""!==s&&l.push($e(s)):Pt(s)&&Pt(u)?l[c]=$e(u.text+s.text):(r(e._isVList)&&n(s.tag)&&t(s.key)&&n(i)&&(s.key="__vlist"+i+"_"+a+"__"),l.push(s)));return l}function Lt(e,t){if(e){for(var n=Object.create(null),r=ce?Reflect.ownKeys(e):Object.keys(e),o=0;o<r.length;o++){var i=r[o];if("__ob__"!==i){for(var a=e[i].from,s=t;s;){if(s._provided&&b(s._provided,a)){n[i]=s._provided[a];break}s=s.$parent}if(!s)if("default"in e[i]){var c=e[i].default;n[i]="function"==typeof c?c.call(t):c}else ue('Injection "'+i+'" not found',t)}}return n}}function Dt(e,t){if(!e||!e.length)return{};for(var n={},r=0,o=e.length;r<o;r++){var i=e[r],a=i.data;if(a&&a.attrs&&a.attrs.slot&&delete a.attrs.slot,i.context!==t&&i.fnContext!==t||!a||null==a.slot)(n.default||(n.default=[])).push(i);else{var s=a.slot,c=n[s]||(n[s]=[]);"template"===i.tag?c.push.apply(c,i.children||[]):c.push(i)}}for(var u in n)n[u].every(Rt)&&delete n[u];return n}function Rt(e){return e.isComment&&!e.asyncFactory||" "===e.text}function Ft(t,n,r){var o,i=Object.keys(n).length>0,a=t?!!t.$stable:!i,s=t&&t.$key;if(t){if(t._normalized)return t._normalized;if(a&&r&&r!==e&&s===r.$key&&!i&&!r.$hasNormal)return r;for(var c in o={},t)t[c]&&"$"!==c[0]&&(o[c]=Ut(n,c,t[c]))}else o={};for(var u in n)u in o||(o[u]=Ht(n,u));return t&&Object.isExtensible(t)&&(t._normalized=o),V(o,"$stable",a),V(o,"$key",s),V(o,"$hasNormal",i),o}function Ut(e,t,n){var r=function(){var e=arguments.length?n.apply(null,arguments):n({});return(e=e&&"object"==typeof e&&!Array.isArray(e)?[e]:Nt(e))&&(0===e.length||1===e.length&&e[0].isComment)?void 0:e};return n.proxy&&Object.defineProperty(e,t,{get:r,enumerable:!0,configurable:!0}),r}function Ht(e,t){return function(){return e[t]}}function Vt(e,t){var r,o,a,s,c;if(Array.isArray(e)||"string"==typeof e)for(r=new Array(e.length),o=0,a=e.length;o<a;o++)r[o]=t(e[o],o);else if("number"==typeof e)for(r=new Array(e),o=0;o<e;o++)r[o]=t(o+1,o);else if(i(e))if(ce&&e[Symbol.iterator]){r=[];for(var u=e[Symbol.iterator](),l=u.next();!l.done;)r.push(t(l.value,r.length)),l=u.next()}else for(s=Object.keys(e),r=new Array(s.length),o=0,a=s.length;o<a;o++)c=s[o],r[o]=t(e[c],c,o);return n(r)||(r=[]),r._isVList=!0,r}function Bt(e,t,n,r){var o,a=this.$scopedSlots[e];a?(n=n||{},r&&(i(r)||ue("slot v-bind without argument expects an Object",this),n=S(S({},r),n)),o=a(n)||t):o=this.$slots[e]||t;var s=n&&n.slot;return s?this.$createElement("template",{slot:s},o):o}function qt(e){return ze(this.$options,"filters",e,!0)||M}function zt(e,t){return Array.isArray(e)?-1===e.indexOf(t):e!==t}function Jt(e,t,n,r,o){var i=F.keyCodes[t]||n;return o&&r&&!F.keyCodes[t]?zt(o,r):i?zt(i,e):r?k(r)!==t:void 0}function Gt(e,t,n,r,o){if(n)if(i(n)){var a;Array.isArray(n)&&(n=T(n));var s=function(i){if("class"===i||"style"===i||m(i))a=e;else{var s=e.attrs&&e.attrs.type;a=r||F.mustUseProp(t,s,i)?e.domProps||(e.domProps={}):e.attrs||(e.attrs={})}var c=x(i),u=k(i);c in a||u in a||(a[i]=n[i],o&&((e.on||(e.on={}))["update:"+i]=function(e){n[i]=e}))};for(var c in n)s(c)}else ue("v-bind without argument expects an Object or Array value",this);return e}function Kt(e,t){var n=this._staticTrees||(this._staticTrees=[]),r=n[e];return r&&!t||Xt(r=n[e]=this.$options.staticRenderFns[e].call(this._renderProxy,null,this),"__static__"+e,!1),r}function Wt(e,t,n){return Xt(e,"__once__"+t+(n?"_"+n:""),!0),e}function Xt(e,t,n){if(Array.isArray(e))for(var r=0;r<e.length;r++)e[r]&&"string"!=typeof e[r]&&Zt(e[r],t+"_"+r,n);else Zt(e,t,n)}function Zt(e,t,n){e.isStatic=!0,e.key=t,e.isOnce=n}function Yt(e,t){if(t)if(c(t)){var n=e.on=e.on?S({},e.on):{};for(var r in t){var o=n[r],i=t[r];n[r]=o?[].concat(o,i):i}}else ue("v-on without argument expects an Object value",this);return e}function Qt(e,t,n,r){t=t||{$stable:!n};for(var o=0;o<e.length;o++){var i=e[o];Array.isArray(i)?Qt(i,t,n):i&&(i.proxy&&(i.fn.proxy=!0),t[i.key]=i.fn)}return r&&(t.$key=r),t}function en(e,t){for(var n=0;n<t.length;n+=2){var r=t[n];"string"==typeof r&&r?e[t[n]]=t[n+1]:""!==r&&null!==r&&ue("Invalid value for dynamic directive argument (expected string or null): "+r,this)}return e}function tn(e,t){return"string"==typeof e?t+e:e}function nn(e){e._o=Wt,e._n=d,e._s=p,e._l=Vt,e._t=Bt,e._q=N,e._i=P,e._m=Kt,e._f=qt,e._k=Jt,e._b=Gt,e._v=$e,e._e=xe,e._u=Qt,e._g=Yt,e._d=en,e._p=tn}function rn(t,n,o,i,a){var s,c=this,u=a.options;b(i,"_uid")?(s=Object.create(i))._original=i:(s=i,i=i._original);var l=r(u._compiled),f=!l;this.data=t,this.props=n,this.children=o,this.parent=i,this.listeners=t.on||e,this.injections=Lt(u.inject,i),this.slots=function(){return c.$slots||Ft(t.scopedSlots,c.$slots=Dt(o,i)),c.$slots},Object.defineProperty(this,"scopedSlots",{enumerable:!0,get:function(){return Ft(t.scopedSlots,this.slots())}}),l&&(this.$options=u,this.$slots=this.slots(),this.$scopedSlots=Ft(t.scopedSlots,this.$slots)),u._scopeId?this._c=function(e,t,n,r){var o=fn(s,e,t,n,r,f);return o&&!Array.isArray(o)&&(o.fnScopeId=u._scopeId,o.fnContext=i),o}:this._c=function(e,t,n,r){return fn(s,e,t,n,r,f)}}function on(e,t,n,r,o){var i=Ce(e);return i.fnContext=n,i.fnOptions=r,(i.devtoolsMeta=i.devtoolsMeta||{}).renderContext=o,t.slot&&((i.data||(i.data={})).slot=t.slot),i}function an(e,t){for(var n in t)e[x(n)]=t[n]}nn(rn.prototype);var sn={init:function(e,t){if(e.componentInstance&&!e.componentInstance._isDestroyed&&e.data.keepAlive){var r=e;sn.prepatch(r,r)}else(e.componentInstance=function(e,t){var r={_isComponent:!0,_parentVnode:e,parent:t},o=e.data.inlineTemplate;return n(o)&&(r.render=o.render,r.staticRenderFns=o.staticRenderFns),new e.componentOptions.Ctor(r)}(e,$n)).$mount(t?e.elm:void 0,t)},prepatch:function(t,n){var r=n.componentOptions;!function(t,n,r,o,i){Cn=!0;var a=o.data.scopedSlots,s=t.$scopedSlots,c=!!(a&&!a.$stable||s!==e&&!s.$stable||a&&t.$scopedSlots.$key!==a.$key),u=!!(i||t.$options._renderChildren||c);if(t.$options._parentVnode=o,t.$vnode=o,t._vnode&&(t._vnode.parent=o),t.$options._renderChildren=i,t.$attrs=o.data.attrs||e,t.$listeners=r||e,n&&t.$options.props){Te(!1);for(var l=t._props,f=t.$options._propKeys||[],p=0;p<f.length;p++){var d=f[p],v=t.$options.props;l[d]=Je(d,v,n,t)}Te(!0),t.$options.propsData=n}r=r||e;var h=t.$options._parentListeners;t.$options._parentListeners=r,xn(t,r,h),u&&(t.$slots=Dt(i,o.context),t.$forceUpdate()),Cn=!1}(n.componentInstance=t.componentInstance,r.propsData,r.listeners,n,r.children)},insert:function(e){var t,n=e.context,r=e.componentInstance;r._isMounted||(r._isMounted=!0,Tn(r,"mounted")),e.data.keepAlive&&(n._isMounted?((t=r)._inactive=!1,En.push(t)):On(r,!0))},destroy:function(e){var t=e.componentInstance;t._isDestroyed||(e.data.keepAlive?Sn(t,!0):t.$destroy())}},cn=Object.keys(sn);function un(o,a,s,c,u){if(!t(o)){var l=s.$options._base;if(i(o)&&(o=l.extend(o)),"function"==typeof o){var p;if(t(o.cid)&&(o=function(e,o){if(r(e.error)&&n(e.errorComp))return e.errorComp;if(n(e.resolved))return e.resolved;var a=vn;if(a&&n(e.owners)&&-1===e.owners.indexOf(a)&&e.owners.push(a),r(e.loading)&&n(e.loadingComp))return e.loadingComp;if(a&&!n(e.owners)){var s=e.owners=[a],c=!0,u=null,l=null;a.$on("hook:destroyed",(function(){return y(s,a)}));var p=function(e){for(var t=0,n=s.length;t<n;t++)s[t].$forceUpdate();e&&(s.length=0,null!==u&&(clearTimeout(u),u=null),null!==l&&(clearTimeout(l),l=null))},d=I((function(t){e.resolved=hn(t,o),c?s.length=0:p(!0)})),v=I((function(t){ue("Failed to resolve async component: "+String(e)+(t?"\nReason: "+t:"")),n(e.errorComp)&&(e.error=!0,p(!0))})),h=e(d,v);return i(h)&&(f(h)?t(e.resolved)&&h.then(d,v):f(h.component)&&(h.component.then(d,v),n(h.error)&&(e.errorComp=hn(h.error,o)),n(h.loading)&&(e.loadingComp=hn(h.loading,o),0===h.delay?e.loading=!0:u=setTimeout((function(){u=null,t(e.resolved)&&t(e.error)&&(e.loading=!0,p(!1))}),h.delay||200)),n(h.timeout)&&(l=setTimeout((function(){l=null,t(e.resolved)&&v("timeout ("+h.timeout+"ms)")}),h.timeout)))),c=!1,e.loading?e.loadingComp:e.resolved}}(p=o,l),void 0===o))return function(e,t,n,r,o){var i=xe();return i.asyncFactory=e,i.asyncMeta={data:t,context:n,children:r,tag:o},i}(p,a,s,c,u);a=a||{},Zn(o),n(a.model)&&function(e,t){var r=e.model&&e.model.prop||"value",o=e.model&&e.model.event||"input";(t.attrs||(t.attrs={}))[r]=t.model.value;var i=t.on||(t.on={}),a=i[o],s=t.model.callback;n(a)?(Array.isArray(a)?-1===a.indexOf(s):a!==s)&&(i[o]=[s].concat(a)):i[o]=s}(o.options,a);var d=function(e,r,o){var i=r.options.props;if(!t(i)){var a={},s=e.attrs,c=e.props;if(n(s)||n(c))for(var u in i){var l=k(u),f=u.toLowerCase();u!==f&&s&&b(s,f)&&le('Prop "'+f+'" is passed to component '+fe(o||r)+', but the declared prop name is "'+u+'". Note that HTML attributes are case-insensitive and camelCased props need to use their kebab-case equivalents when using in-DOM templates. You should probably use "'+l+'" instead of "'+u+'".'),Mt(a,c,u,l,!0)||Mt(a,s,u,l,!1)}return a}}(a,o,u);if(r(o.options.functional))return function(t,r,o,i,a){var s=t.options,c={},u=s.props;if(n(u))for(var l in u)c[l]=Je(l,u,r||e);else n(o.attrs)&&an(c,o.attrs),n(o.props)&&an(c,o.props);var f=new rn(o,c,a,i,t),p=s.render.call(null,f._c,f);if(p instanceof _e)return on(p,o,f.parent,s,f);if(Array.isArray(p)){for(var d=Nt(p)||[],v=new Array(d.length),h=0;h<d.length;h++)v[h]=on(d[h],o,f.parent,s,f);return v}}(o,d,a,s,c);var v=a.on;if(a.on=a.nativeOn,r(o.options.abstract)){var h=a.slot;a={},h&&(a.slot=h)}!function(e){for(var t=e.hook||(e.hook={}),n=0;n<cn.length;n++){var r=cn[n],o=t[r],i=sn[r];o===i||o&&o._merged||(t[r]=o?ln(i,o):i)}}(a);var m=o.options.name||u;return new _e("vue-component-"+o.cid+(m?"-"+m:""),a,void 0,void 0,void 0,s,{Ctor:o,propsData:d,listeners:v,tag:u,children:c},p)}ue("Invalid Component definition: "+String(o),s)}}function ln(e,t){var n=function(n,r){e(n,r),t(n,r)};return n._merged=!0,n}function fn(e,t,a,s,c,u){return(Array.isArray(a)||o(a))&&(c=s,s=a,a=void 0),r(u)&&(c=2),function(e,t,r,a,s){if(n(r)&&n(r.__ob__))return ue("Avoid using observed data object as vnode data: "+JSON.stringify(r)+"\nAlways create fresh vnode data objects in each render!",e),xe();if(n(r)&&n(r.is)&&(t=r.is),!t)return xe();var c,u,l;(n(r)&&n(r.key)&&!o(r.key)&&ue("Avoid using non-primitive value as key, use string/number value instead.",e),Array.isArray(a)&&"function"==typeof a[0]&&((r=r||{}).scopedSlots={default:a[0]},a.length=0),2===s?a=Nt(a):1===s&&(a=function(e){for(var t=0;t<e.length;t++)if(Array.isArray(e[t]))return Array.prototype.concat.apply([],e);return e}(a)),"string"==typeof t)?(u=e.$vnode&&e.$vnode.ns||F.getTagNamespace(t),c=F.isReservedTag(t)?new _e(F.parsePlatformTagName(t),r,a,void 0,void 0,e):r&&r.pre||!n(l=ze(e.$options,"components",t))?new _e(t,r,a,void 0,void 0,e):un(l,r,e,a,t)):c=un(t,r,e,a);return Array.isArray(c)?c:n(c)?(n(u)&&pn(c,u),n(r)&&function(e){i(e.style)&&At(e.style),i(e.class)&&At(e.class)}(r),c):xe()}(e,t,a,s,c)}function pn(e,o,i){if(e.ns=o,"foreignObject"===e.tag&&(o=void 0,i=!0),n(e.children))for(var a=0,s=e.children.length;a<s;a++){var c=e.children[a];n(c.tag)&&(t(c.ns)||r(i)&&"svg"!==c.tag)&&pn(c,o,i)}}var dn,vn=null;function hn(e,t){return(e.__esModule||ce&&"Module"===e[Symbol.toStringTag])&&(e=e.default),i(e)?t.extend(e):e}function mn(e){return e.isComment&&e.asyncFactory}function yn(e){if(Array.isArray(e))for(var t=0;t<e.length;t++){var r=e[t];if(n(r)&&(n(r.componentOptions)||mn(r)))return r}}function gn(e,t){dn.$on(e,t)}function bn(e,t){dn.$off(e,t)}function wn(e,t){var n=dn;return function r(){var o=t.apply(null,arguments);null!==o&&n.$off(e,r)}}function xn(e,t,n){dn=e,jt(t,n||{},gn,bn,wn,e),dn=void 0}var $n=null,Cn=!1;function kn(e){var t=$n;return $n=e,function(){$n=t}}function An(e){for(;e&&(e=e.$parent);)if(e._inactive)return!0;return!1}function On(e,t){if(t){if(e._directInactive=!1,An(e))return}else if(e._directInactive)return;if(e._inactive||null===e._inactive){e._inactive=!1;for(var n=0;n<e.$children.length;n++)On(e.$children[n]);Tn(e,"activated")}}function Sn(e,t){if(!(t&&(e._directInactive=!0,An(e))||e._inactive)){e._inactive=!0;for(var n=0;n<e.$children.length;n++)Sn(e.$children[n]);Tn(e,"deactivated")}}function Tn(e,t){ge();var n=e.$options[t],r=t+" hook";if(n)for(var o=0,i=n.length;o<i;o++)tt(n[o],e,null,e,r);e._hasHookEvent&&e.$emit("hook:"+t),be()}var jn=[],En=[],Mn={},Nn={},Pn=!1,In=!1,Ln=0,Dn=0,Rn=Date.now;if(J&&!X){var Fn=window.performance;Fn&&"function"==typeof Fn.now&&Rn()>document.createEvent("Event").timeStamp&&(Rn=function(){return Fn.now()})}function Un(){var e,t;for(Dn=Rn(),In=!0,jn.sort((function(e,t){return e.id-t.id})),Ln=0;Ln<jn.length;Ln++)if((e=jn[Ln]).before&&e.before(),t=e.id,Mn[t]=null,e.run(),null!=Mn[t]&&(Nn[t]=(Nn[t]||0)+1,Nn[t]>100)){ue("You may have an infinite update loop "+(e.user?'in watcher with expression "'+e.expression+'"':"in a component render function."),e.vm);break}var n=En.slice(),r=jn.slice();Ln=jn.length=En.length=0,Mn={},Nn={},Pn=In=!1,function(e){for(var t=0;t<e.length;t++)e[t]._inactive=!0,On(e[t],!0)}(n),function(e){for(var t=e.length;t--;){var n=e[t],r=n.vm;r._watcher===n&&r._isMounted&&!r._isDestroyed&&Tn(r,"updated")}}(r),ie&&F.devtools&&ie.emit("flush")}var Hn=0,Vn=function(e,t,n,r,o){this.vm=e,o&&(e._watcher=this),e._watchers.push(this),r?(this.deep=!!r.deep,this.user=!!r.user,this.lazy=!!r.lazy,this.sync=!!r.sync,this.before=r.before):this.deep=this.user=this.lazy=this.sync=!1,this.cb=n,this.id=++Hn,this.active=!0,this.dirty=this.lazy,this.deps=[],this.newDeps=[],this.depIds=new se,this.newDepIds=new se,this.expression=t.toString(),"function"==typeof t?this.getter=t:(this.getter=function(e){if(!q.test(e)){var t=e.split(".");return function(e){for(var n=0;n<t.length;n++){if(!e)return;e=e[t[n]]}return e}}}(t),this.getter||(this.getter=j,ue('Failed watching path: "'+t+'" Watcher only accepts simple dot-delimited paths. For full control, use a function instead.',e))),this.value=this.lazy?void 0:this.get()};Vn.prototype.get=function(){var e;ge(this);var t=this.vm;try{e=this.getter.call(t,t)}catch(e){if(!this.user)throw e;et(e,t,'getter for watcher "'+this.expression+'"')}finally{this.deep&&At(e),be(),this.cleanupDeps()}return e},Vn.prototype.addDep=function(e){var t=e.id;this.newDepIds.has(t)||(this.newDepIds.add(t),this.newDeps.push(e),this.depIds.has(t)||e.addSub(this))},Vn.prototype.cleanupDeps=function(){for(var e=this.deps.length;e--;){var t=this.deps[e];this.newDepIds.has(t.id)||t.removeSub(this)}var n=this.depIds;this.depIds=this.newDepIds,this.newDepIds=n,this.newDepIds.clear(),n=this.deps,this.deps=this.newDeps,this.newDeps=n,this.newDeps.length=0},Vn.prototype.update=function(){this.lazy?this.dirty=!0:this.sync?this.run():function(e){var t=e.id;if(null==Mn[t]){if(Mn[t]=!0,In){for(var n=jn.length-1;n>Ln&&jn[n].id>e.id;)n--;jn.splice(n+1,0,e)}else jn.push(e);if(!Pn){if(Pn=!0,!F.async)return void Un();ht(Un)}}}(this)},Vn.prototype.run=function(){if(this.active){var e=this.get();if(e!==this.value||i(e)||this.deep){var t=this.value;if(this.value=e,this.user)try{this.cb.call(this.vm,e,t)}catch(e){et(e,this.vm,'callback for watcher "'+this.expression+'"')}else this.cb.call(this.vm,e,t)}}},Vn.prototype.evaluate=function(){this.value=this.get(),this.dirty=!1},Vn.prototype.depend=function(){for(var e=this.deps.length;e--;)this.deps[e].depend()},Vn.prototype.teardown=function(){if(this.active){this.vm._isBeingDestroyed||y(this.vm._watchers,this);for(var e=this.deps.length;e--;)this.deps[e].removeSub(this);this.active=!1}};var Bn={enumerable:!0,configurable:!0,get:j,set:j};function qn(e,t,n){Bn.get=function(){return this[t][n]},Bn.set=function(e){this[t][n]=e},Object.defineProperty(e,n,Bn)}var zn={lazy:!0};function Jn(e,t,n){var r=!oe();"function"==typeof n?(Bn.get=r?Gn(t):Kn(n),Bn.set=j):(Bn.get=n.get?r&&!1!==n.cache?Gn(t):Kn(n.get):j,Bn.set=n.set||j),Bn.set===j&&(Bn.set=function(){ue('Computed property "'+t+'" was assigned to but it has no setter.',this)}),Object.defineProperty(e,t,Bn)}function Gn(e){return function(){var t=this._computedWatchers&&this._computedWatchers[e];if(t)return t.dirty&&t.evaluate(),me.target&&t.depend(),t.value}}function Kn(e){return function(){return e.call(this,this)}}function Wn(e,t,n,r){return c(n)&&(r=n,n=n.handler),"string"==typeof n&&(n=e[n]),e.$watch(t,n,r)}var Xn=0;function Zn(e){var t=e.options;if(e.super){var n=Zn(e.super);if(n!==e.superOptions){e.superOptions=n;var r=function(e){var t,n=e.options,r=e.sealedOptions;for(var o in n)n[o]!==r[o]&&(t||(t={}),t[o]=n[o]);return t}(e);r&&S(e.extendOptions,r),(t=e.options=qe(n,e.extendOptions)).name&&(t.components[t.name]=e)}}return t}function Yn(e){this instanceof Yn||ue("Vue is a constructor and should be called with the `new` keyword"),this._init(e)}function Qn(e){return e&&(e.Ctor.options.name||e.tag)}function er(e,t){return Array.isArray(e)?e.indexOf(t)>-1:"string"==typeof e?e.split(",").indexOf(t)>-1:!!u(e)&&e.test(t)}function tr(e,t){var n=e.cache,r=e.keys,o=e._vnode;for(var i in n){var a=n[i];if(a){var s=Qn(a.componentOptions);s&&!t(s)&&nr(n,i,r,o)}}}function nr(e,t,n,r){var o=e[t];!o||r&&o.tag===r.tag||o.componentInstance.$destroy(),e[t]=null,y(n,t)}!function(t){t.prototype._init=function(t){var n,r,o=this;o._uid=Xn++,F.performance&&it&&(n="vue-perf-start:"+o._uid,r="vue-perf-end:"+o._uid,it(n)),o._isVue=!0,t&&t._isComponent?function(e,t){var n=e.$options=Object.create(e.constructor.options),r=t._parentVnode;n.parent=t.parent,n._parentVnode=r;var o=r.componentOptions;n.propsData=o.propsData,n._parentListeners=o.listeners,n._renderChildren=o.children,n._componentTag=o.tag,t.render&&(n.render=t.render,n.staticRenderFns=t.staticRenderFns)}(o,t):o.$options=qe(Zn(o.constructor),t||{},o),mt(o),o._self=o,function(e){var t=e.$options,n=t.parent;if(n&&!t.abstract){for(;n.$options.abstract&&n.$parent;)n=n.$parent;n.$children.push(e)}e.$parent=n,e.$root=n?n.$root:e,e.$children=[],e.$refs={},e._watcher=null,e._inactive=null,e._directInactive=!1,e._isMounted=!1,e._isDestroyed=!1,e._isBeingDestroyed=!1}(o),function(e){e._events=Object.create(null),e._hasHookEvent=!1;var t=e.$options._parentListeners;t&&xn(e,t)}(o),function(t){t._vnode=null,t._staticTrees=null;var n=t.$options,r=t.$vnode=n._parentVnode,o=r&&r.context;t.$slots=Dt(n._renderChildren,o),t.$scopedSlots=e,t._c=function(e,n,r,o){return fn(t,e,n,r,o,!1)},t.$createElement=function(e,n,r,o){return fn(t,e,n,r,o,!0)};var i=r&&r.data;Me(t,"$attrs",i&&i.attrs||e,(function(){!Cn&&ue("$attrs is readonly.",t)}),!0),Me(t,"$listeners",n._parentListeners||e,(function(){!Cn&&ue("$listeners is readonly.",t)}),!0)}(o),Tn(o,"beforeCreate"),function(e){var t=Lt(e.$options.inject,e);t&&(Te(!1),Object.keys(t).forEach((function(n){Me(e,n,t[n],(function(){ue('Avoid mutating an injected value directly since the changes will be overwritten whenever the provided component re-renders. injection being mutated: "'+n+'"',e)}))})),Te(!0))}(o),function(e){e._watchers=[];var t=e.$options;t.props&&function(e,t){var n=e.$options.propsData||{},r=e._props={},o=e.$options._propKeys=[],i=!e.$parent;i||Te(!1);var a=function(a){o.push(a);var s=Je(a,t,n,e),c=k(a);(m(c)||F.isReservedAttr(c))&&ue('"'+c+'" is a reserved attribute and cannot be used as component prop.',e),Me(r,a,s,(function(){i||Cn||ue("Avoid mutating a prop directly since the value will be overwritten whenever the parent component re-renders. Instead, use a data or computed property based on the prop's value. Prop being mutated: \""+a+'"',e)})),a in e||qn(e,"_props",a)};for(var s in t)a(s);Te(!0)}(e,t.props),t.methods&&function(e,t){var n=e.$options.props;for(var r in t)"function"!=typeof t[r]&&ue('Method "'+r+'" has type "'+typeof t[r]+'" in the component definition. Did you reference the function correctly?',e),n&&b(n,r)&&ue('Method "'+r+'" has already been defined as a prop.',e),r in e&&H(r)&&ue('Method "'+r+'" conflicts with an existing Vue instance method. Avoid defining component methods that start with _ or $.'),e[r]="function"!=typeof t[r]?j:A(t[r],e)}(e,t.methods),t.data?function(e){var t=e.$options.data;c(t=e._data="function"==typeof t?function(e,t){ge();try{return e.call(t,t)}catch(e){return et(e,t,"data()"),{}}finally{be()}}(t,e):t||{})||(t={},ue("data functions should return an object:\nhttps://vuejs.org/v2/guide/components.html#data-Must-Be-a-Function",e));for(var n=Object.keys(t),r=e.$options.props,o=e.$options.methods,i=n.length;i--;){var a=n[i];o&&b(o,a)&&ue('Method "'+a+'" has already been defined as a data property.',e),r&&b(r,a)?ue('The data property "'+a+'" is already declared as a prop. Use prop default value instead.',e):H(a)||qn(e,"_data",a)}Ee(t,!0)}(e):Ee(e._data={},!0),t.computed&&function(e,t){var n=e._computedWatchers=Object.create(null),r=oe();for(var o in t){var i=t[o],a="function"==typeof i?i:i.get;null==a&&ue('Getter is missing for computed property "'+o+'".',e),r||(n[o]=new Vn(e,a||j,j,zn)),o in e?o in e.$data?ue('The computed property "'+o+'" is already defined in data.',e):e.$options.props&&o in e.$options.props&&ue('The computed property "'+o+'" is already defined as a prop.',e):Jn(e,o,i)}}(e,t.computed),t.watch&&t.watch!==te&&function(e,t){for(var n in t){var r=t[n];if(Array.isArray(r))for(var o=0;o<r.length;o++)Wn(e,n,r[o]);else Wn(e,n,r)}}(e,t.watch)}(o),function(e){var t=e.$options.provide;t&&(e._provided="function"==typeof t?t.call(e):t)}(o),Tn(o,"created"),F.performance&&it&&(o._name=fe(o,!1),it(r),at("vue "+o._name+" init",n,r)),o.$options.el&&o.$mount(o.$options.el)}}(Yn),function(e){var t={get:function(){return this._data}},n={get:function(){return this._props}};t.set=function(){ue("Avoid replacing instance root $data. Use nested data properties instead.",this)},n.set=function(){ue("$props is readonly.",this)},Object.defineProperty(e.prototype,"$data",t),Object.defineProperty(e.prototype,"$props",n),e.prototype.$set=Ne,e.prototype.$delete=Pe,e.prototype.$watch=function(e,t,n){var r=this;if(c(t))return Wn(r,e,t,n);(n=n||{}).user=!0;var o=new Vn(r,e,t,n);if(n.immediate)try{t.call(r,o.value)}catch(e){et(e,r,'callback for immediate watcher "'+o.expression+'"')}return function(){o.teardown()}}}(Yn),function(e){var t=/^hook:/;e.prototype.$on=function(e,n){var r=this;if(Array.isArray(e))for(var o=0,i=e.length;o<i;o++)r.$on(e[o],n);else(r._events[e]||(r._events[e]=[])).push(n),t.test(e)&&(r._hasHookEvent=!0);return r},e.prototype.$once=function(e,t){var n=this;function r(){n.$off(e,r),t.apply(n,arguments)}return r.fn=t,n.$on(e,r),n},e.prototype.$off=function(e,t){var n=this;if(!arguments.length)return n._events=Object.create(null),n;if(Array.isArray(e)){for(var r=0,o=e.length;r<o;r++)n.$off(e[r],t);return n}var i,a=n._events[e];if(!a)return n;if(!t)return n._events[e]=null,n;for(var s=a.length;s--;)if((i=a[s])===t||i.fn===t){a.splice(s,1);break}return n},e.prototype.$emit=function(e){var t=this,n=e.toLowerCase();n!==e&&t._events[n]&&le('Event "'+n+'" is emitted in component '+fe(t)+' but the handler is registered for "'+e+'". Note that HTML attributes are case-insensitive and you cannot use v-on to listen to camelCase events when using in-DOM templates. You should probably use "'+k(e)+'" instead of "'+e+'".');var r=t._events[e];if(r){r=r.length>1?O(r):r;for(var o=O(arguments,1),i='event handler for "'+e+'"',a=0,s=r.length;a<s;a++)tt(r[a],t,o,t,i)}return t}}(Yn),function(e){e.prototype._update=function(e,t){var n=this,r=n.$el,o=n._vnode,i=kn(n);n._vnode=e,n.$el=o?n.__patch__(o,e):n.__patch__(n.$el,e,t,!1),i(),r&&(r.__vue__=null),n.$el&&(n.$el.__vue__=n),n.$vnode&&n.$parent&&n.$vnode===n.$parent._vnode&&(n.$parent.$el=n.$el)},e.prototype.$forceUpdate=function(){this._watcher&&this._watcher.update()},e.prototype.$destroy=function(){var e=this;if(!e._isBeingDestroyed){Tn(e,"beforeDestroy"),e._isBeingDestroyed=!0;var t=e.$parent;!t||t._isBeingDestroyed||e.$options.abstract||y(t.$children,e),e._watcher&&e._watcher.teardown();for(var n=e._watchers.length;n--;)e._watchers[n].teardown();e._data.__ob__&&e._data.__ob__.vmCount--,e._isDestroyed=!0,e.__patch__(e._vnode,null),Tn(e,"destroyed"),e.$off(),e.$el&&(e.$el.__vue__=null),e.$vnode&&(e.$vnode.parent=null)}}}(Yn),function(e){nn(e.prototype),e.prototype.$nextTick=function(e){return ht(e,this)},e.prototype._render=function(){var e,t=this,n=t.$options,r=n.render,o=n._parentVnode;o&&(t.$scopedSlots=Ft(o.data.scopedSlots,t.$slots,t.$scopedSlots)),t.$vnode=o;try{vn=t,e=r.call(t._renderProxy,t.$createElement)}catch(n){if(et(n,t,"render"),t.$options.renderError)try{e=t.$options.renderError.call(t._renderProxy,t.$createElement,n)}catch(n){et(n,t,"renderError"),e=t._vnode}else e=t._vnode}finally{vn=null}return Array.isArray(e)&&1===e.length&&(e=e[0]),e instanceof _e||(Array.isArray(e)&&ue("Multiple root nodes returned from render function. Render function should return a single root node.",t),e=xe()),e.parent=o,e}}(Yn);var rr=[String,RegExp,Array],or={KeepAlive:{name:"keep-alive",abstract:!0,props:{include:rr,exclude:rr,max:[String,Number]},created:function(){this.cache=Object.create(null),this.keys=[]},destroyed:function(){for(var e in this.cache)nr(this.cache,e,this.keys)},mounted:function(){var e=this;this.$watch("include",(function(t){tr(e,(function(e){return er(t,e)}))})),this.$watch("exclude",(function(t){tr(e,(function(e){return!er(t,e)}))}))},render:function(){var e=this.$slots.default,t=yn(e),n=t&&t.componentOptions;if(n){var r=Qn(n),o=this.include,i=this.exclude;if(o&&(!r||!er(o,r))||i&&r&&er(i,r))return t;var a=this.cache,s=this.keys,c=null==t.key?n.Ctor.cid+(n.tag?"::"+n.tag:""):t.key;a[c]?(t.componentInstance=a[c].componentInstance,y(s,c),s.push(c)):(a[c]=t,s.push(c),this.max&&s.length>parseInt(this.max)&&nr(a,s[0],s,this._vnode)),t.data.keepAlive=!0}return t||e&&e[0]}}};!function(e){var t={get:function(){return F},set:function(){ue("Do not replace the Vue.config object, set individual fields instead.")}};Object.defineProperty(e,"config",t),e.util={warn:ue,extend:S,mergeOptions:qe,defineReactive:Me},e.set=Ne,e.delete=Pe,e.nextTick=ht,e.observable=function(e){return Ee(e),e},e.options=Object.create(null),D.forEach((function(t){e.options[t+"s"]=Object.create(null)})),e.options._base=e,S(e.options.components,or),function(e){e.use=function(e){var t=this._installedPlugins||(this._installedPlugins=[]);if(t.indexOf(e)>-1)return this;var n=O(arguments,1);return n.unshift(this),"function"==typeof e.install?e.install.apply(e,n):"function"==typeof e&&e.apply(null,n),t.push(e),this}}(e),function(e){e.mixin=function(e){return this.options=qe(this.options,e),this}}(e),function(e){e.cid=0;var t=1;e.extend=function(e){e=e||{};var n=this,r=n.cid,o=e._Ctor||(e._Ctor={});if(o[r])return o[r];var i=e.name||n.options.name;i&&Ve(i);var a=function(e){this._init(e)};return(a.prototype=Object.create(n.prototype)).constructor=a,a.cid=t++,a.options=qe(n.options,e),a.super=n,a.options.props&&function(e){var t=e.options.props;for(var n in t)qn(e.prototype,"_props",n)}(a),a.options.computed&&function(e){var t=e.options.computed;for(var n in t)Jn(e.prototype,n,t[n])}(a),a.extend=n.extend,a.mixin=n.mixin,a.use=n.use,D.forEach((function(e){a[e]=n[e]})),i&&(a.options.components[i]=a),a.superOptions=n.options,a.extendOptions=e,a.sealedOptions=S({},a.options),o[r]=a,a}}(e),function(e){D.forEach((function(t){e[t]=function(e,n){return n?("component"===t&&Ve(e),"component"===t&&c(n)&&(n.name=n.name||e,n=this.options._base.extend(n)),"directive"===t&&"function"==typeof n&&(n={bind:n,update:n}),this.options[t+"s"][e]=n,n):this.options[t+"s"][e]}}))}(e)}(Yn),Object.defineProperty(Yn.prototype,"$isServer",{get:oe}),Object.defineProperty(Yn.prototype,"$ssrContext",{get:function(){return this.$vnode&&this.$vnode.ssrContext}}),Object.defineProperty(Yn,"FunctionalRenderContext",{value:rn}),Yn.version="2.6.10";var ir=v("style,class"),ar=v("input,textarea,option,select,progress"),sr=function(e,t,n){return"value"===n&&ar(e)&&"button"!==t||"selected"===n&&"option"===e||"checked"===n&&"input"===e||"muted"===n&&"video"===e},cr=v("contenteditable,draggable,spellcheck"),ur=v("events,caret,typing,plaintext-only"),lr=v("allowfullscreen,async,autofocus,autoplay,checked,compact,controls,declare,default,defaultchecked,defaultmuted,defaultselected,defer,disabled,enabled,formnovalidate,hidden,indeterminate,inert,ismap,itemscope,loop,multiple,muted,nohref,noresize,noshade,novalidate,nowrap,open,pauseonexit,readonly,required,reversed,scoped,seamless,selected,sortable,translate,truespeed,typemustmatch,visible"),fr="http://www.w3.org/1999/xlink",pr=function(e){return":"===e.charAt(5)&&"xlink"===e.slice(0,5)},dr=function(e){return pr(e)?e.slice(6,e.length):""},vr=function(e){return null==e||!1===e};function hr(e,t){return{staticClass:mr(e.staticClass,t.staticClass),class:n(e.class)?[e.class,t.class]:t.class}}function mr(e,t){return e?t?e+" "+t:e:t||""}function yr(e){return Array.isArray(e)?function(e){for(var t,r="",o=0,i=e.length;o<i;o++)n(t=yr(e[o]))&&""!==t&&(r&&(r+=" "),r+=t);return r}(e):i(e)?function(e){var t="";for(var n in e)e[n]&&(t&&(t+=" "),t+=n);return t}(e):"string"==typeof e?e:""}var gr={svg:"http://www.w3.org/2000/svg",math:"http://www.w3.org/1998/Math/MathML"},br=v("html,body,base,head,link,meta,style,title,address,article,aside,footer,header,h1,h2,h3,h4,h5,h6,hgroup,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,rtc,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,menuitem,summary,content,element,shadow,template,blockquote,iframe,tfoot"),_r=v("svg,animate,circle,clippath,cursor,defs,desc,ellipse,filter,font-face,foreignObject,g,glyph,image,line,marker,mask,missing-glyph,path,pattern,polygon,polyline,rect,switch,symbol,text,textpath,tspan,use,view",!0),wr=function(e){return br(e)||_r(e)};function xr(e){return _r(e)?"svg":"math"===e?"math":void 0}var $r=Object.create(null),Cr=v("text,number,password,search,email,tel,url");function kr(e){return"string"==typeof e?document.querySelector(e)||(ue("Cannot find element: "+e),document.createElement("div")):e}var Ar=Object.freeze({createElement:function(e,t){var n=document.createElement(e);return"select"!==e||t.data&&t.data.attrs&&void 0!==t.data.attrs.multiple&&n.setAttribute("multiple","multiple"),n},createElementNS:function(e,t){return document.createElementNS(gr[e],t)},createTextNode:function(e){return document.createTextNode(e)},createComment:function(e){return document.createComment(e)},insertBefore:function(e,t,n){e.insertBefore(t,n)},removeChild:function(e,t){e.removeChild(t)},appendChild:function(e,t){e.appendChild(t)},parentNode:function(e){return e.parentNode},nextSibling:function(e){return e.nextSibling},tagName:function(e){return e.tagName},setTextContent:function(e,t){e.textContent=t},setStyleScope:function(e,t){e.setAttribute(t,"")}}),Or={create:function(e,t){Sr(t)},update:function(e,t){e.data.ref!==t.data.ref&&(Sr(e,!0),Sr(t))},destroy:function(e){Sr(e,!0)}};function Sr(e,t){var r=e.data.ref;if(n(r)){var o=e.context,i=e.componentInstance||e.elm,a=o.$refs;t?Array.isArray(a[r])?y(a[r],i):a[r]===i&&(a[r]=void 0):e.data.refInFor?Array.isArray(a[r])?a[r].indexOf(i)<0&&a[r].push(i):a[r]=[i]:a[r]=i}}var Tr=new _e("",{},[]),jr=["create","activate","update","remove","destroy"];function Er(e,o){return e.key===o.key&&(e.tag===o.tag&&e.isComment===o.isComment&&n(e.data)===n(o.data)&&function(e,t){if("input"!==e.tag)return!0;var r,o=n(r=e.data)&&n(r=r.attrs)&&r.type,i=n(r=t.data)&&n(r=r.attrs)&&r.type;return o===i||Cr(o)&&Cr(i)}(e,o)||r(e.isAsyncPlaceholder)&&e.asyncFactory===o.asyncFactory&&t(o.asyncFactory.error))}function Mr(e,t,r){var o,i,a={};for(o=t;o<=r;++o)n(i=e[o].key)&&(a[i]=o);return a}var Nr={create:Pr,update:Pr,destroy:function(e){Pr(e,Tr)}};function Pr(e,t){(e.data.directives||t.data.directives)&&function(e,t){var n,r,o,i=e===Tr,a=t===Tr,s=Lr(e.data.directives,e.context),c=Lr(t.data.directives,t.context),u=[],l=[];for(n in c)r=s[n],o=c[n],r?(o.oldValue=r.value,o.oldArg=r.arg,Rr(o,"update",t,e),o.def&&o.def.componentUpdated&&l.push(o)):(Rr(o,"bind",t,e),o.def&&o.def.inserted&&u.push(o));if(u.length){var f=function(){for(var n=0;n<u.length;n++)Rr(u[n],"inserted",t,e)};i?Et(t,"insert",f):f()}if(l.length&&Et(t,"postpatch",(function(){for(var n=0;n<l.length;n++)Rr(l[n],"componentUpdated",t,e)})),!i)for(n in s)c[n]||Rr(s[n],"unbind",e,e,a)}(e,t)}var Ir=Object.create(null);function Lr(e,t){var n,r,o=Object.create(null);if(!e)return o;for(n=0;n<e.length;n++)(r=e[n]).modifiers||(r.modifiers=Ir),o[Dr(r)]=r,r.def=ze(t.$options,"directives",r.name,!0);return o}function Dr(e){return e.rawName||e.name+"."+Object.keys(e.modifiers||{}).join(".")}function Rr(e,t,n,r,o){var i=e.def&&e.def[t];if(i)try{i(n.elm,e,n,r,o)}catch(r){et(r,n.context,"directive "+e.name+" "+t+" hook")}}var Fr=[Or,Nr];function Ur(e,r){var o=r.componentOptions;if(!(n(o)&&!1===o.Ctor.options.inheritAttrs||t(e.data.attrs)&&t(r.data.attrs))){var i,a,s=r.elm,c=e.data.attrs||{},u=r.data.attrs||{};for(i in n(u.__ob__)&&(u=r.data.attrs=S({},u)),u)a=u[i],c[i]!==a&&Hr(s,i,a);for(i in(X||Y)&&u.value!==c.value&&Hr(s,"value",u.value),c)t(u[i])&&(pr(i)?s.removeAttributeNS(fr,dr(i)):cr(i)||s.removeAttribute(i))}}function Hr(e,t,n){e.tagName.indexOf("-")>-1?Vr(e,t,n):lr(t)?vr(n)?e.removeAttribute(t):(n="allowfullscreen"===t&&"EMBED"===e.tagName?"true":t,e.setAttribute(t,n)):cr(t)?e.setAttribute(t,function(e,t){return vr(t)||"false"===t?"false":"contenteditable"===e&&ur(t)?t:"true"}(t,n)):pr(t)?vr(n)?e.removeAttributeNS(fr,dr(t)):e.setAttributeNS(fr,t,n):Vr(e,t,n)}function Vr(e,t,n){if(vr(n))e.removeAttribute(t);else{if(X&&!Z&&"TEXTAREA"===e.tagName&&"placeholder"===t&&""!==n&&!e.__ieph){var r=function(t){t.stopImmediatePropagation(),e.removeEventListener("input",r)};e.addEventListener("input",r),e.__ieph=!0}e.setAttribute(t,n)}}var Br={create:Ur,update:Ur};function qr(e,r){var o=r.elm,i=r.data,a=e.data;if(!(t(i.staticClass)&&t(i.class)&&(t(a)||t(a.staticClass)&&t(a.class)))){var s=function(e){for(var t=e.data,r=e,o=e;n(o.componentInstance);)(o=o.componentInstance._vnode)&&o.data&&(t=hr(o.data,t));for(;n(r=r.parent);)r&&r.data&&(t=hr(t,r.data));return i=t.staticClass,a=t.class,n(i)||n(a)?mr(i,yr(a)):"";var i,a}(r),c=o._transitionClasses;n(c)&&(s=mr(s,yr(c))),s!==o._prevClass&&(o.setAttribute("class",s),o._prevClass=s)}}var zr,Jr,Gr,Kr,Wr,Xr,Zr,Yr={create:qr,update:qr},Qr=/[\w).+\-_$\]]/;function eo(e){var t,n,r,o,i,a=!1,s=!1,c=!1,u=!1,l=0,f=0,p=0,d=0;for(r=0;r<e.length;r++)if(n=t,t=e.charCodeAt(r),a)39===t&&92!==n&&(a=!1);else if(s)34===t&&92!==n&&(s=!1);else if(c)96===t&&92!==n&&(c=!1);else if(u)47===t&&92!==n&&(u=!1);else if(124!==t||124===e.charCodeAt(r+1)||124===e.charCodeAt(r-1)||l||f||p){switch(t){case 34:s=!0;break;case 39:a=!0;break;case 96:c=!0;break;case 40:p++;break;case 41:p--;break;case 91:f++;break;case 93:f--;break;case 123:l++;break;case 125:l--}if(47===t){for(var v=r-1,h=void 0;v>=0&&" "===(h=e.charAt(v));v--);h&&Qr.test(h)||(u=!0)}}else void 0===o?(d=r+1,o=e.slice(0,r).trim()):m();function m(){(i||(i=[])).push(e.slice(d,r).trim()),d=r+1}if(void 0===o?o=e.slice(0,r).trim():0!==d&&m(),i)for(r=0;r<i.length;r++)o=to(o,i[r]);return o}function to(e,t){var n=t.indexOf("(");if(n<0)return'_f("'+t+'")('+e+")";var r=t.slice(0,n),o=t.slice(n+1);return'_f("'+r+'")('+e+(")"!==o?","+o:o)}function no(e,t){console.error("[Vue compiler]: "+e)}function ro(e,t){return e?e.map((function(e){return e[t]})).filter((function(e){return e})):[]}function oo(e,t,n,r,o){(e.props||(e.props=[])).push(ho({name:t,value:n,dynamic:o},r)),e.plain=!1}function io(e,t,n,r,o){(o?e.dynamicAttrs||(e.dynamicAttrs=[]):e.attrs||(e.attrs=[])).push(ho({name:t,value:n,dynamic:o},r)),e.plain=!1}function ao(e,t,n,r){e.attrsMap[t]=n,e.attrsList.push(ho({name:t,value:n},r))}function so(e,t,n,r,o,i,a,s){(e.directives||(e.directives=[])).push(ho({name:t,rawName:n,value:r,arg:o,isDynamicArg:i,modifiers:a},s)),e.plain=!1}function co(e,t,n){return n?"_p("+t+',"'+e+'")':e+t}function uo(t,n,r,o,i,a,s,c){var u;o=o||e,a&&o.prevent&&o.passive&&a("passive and prevent can't be used together. Passive handler can't prevent default event.",s),o.right?c?n="("+n+")==='click'?'contextmenu':("+n+")":"click"===n&&(n="contextmenu",delete o.right):o.middle&&(c?n="("+n+")==='click'?'mouseup':("+n+")":"click"===n&&(n="mouseup")),o.capture&&(delete o.capture,n=co("!",n,c)),o.once&&(delete o.once,n=co("~",n,c)),o.passive&&(delete o.passive,n=co("&",n,c)),o.native?(delete o.native,u=t.nativeEvents||(t.nativeEvents={})):u=t.events||(t.events={});var l=ho({value:r.trim(),dynamic:c},s);o!==e&&(l.modifiers=o);var f=u[n];Array.isArray(f)?i?f.unshift(l):f.push(l):u[n]=f?i?[l,f]:[f,l]:l,t.plain=!1}function lo(e,t){return e.rawAttrsMap[":"+t]||e.rawAttrsMap["v-bind:"+t]||e.rawAttrsMap[t]}function fo(e,t,n){var r=po(e,":"+t)||po(e,"v-bind:"+t);if(null!=r)return eo(r);if(!1!==n){var o=po(e,t);if(null!=o)return JSON.stringify(o)}}function po(e,t,n){var r;if(null!=(r=e.attrsMap[t]))for(var o=e.attrsList,i=0,a=o.length;i<a;i++)if(o[i].name===t){o.splice(i,1);break}return n&&delete e.attrsMap[t],r}function vo(e,t){for(var n=e.attrsList,r=0,o=n.length;r<o;r++){var i=n[r];if(t.test(i.name))return n.splice(r,1),i}}function ho(e,t){return t&&(null!=t.start&&(e.start=t.start),null!=t.end&&(e.end=t.end)),e}function mo(e,t,n){var r=n||{},o=r.number,i="$$v";r.trim&&(i="(typeof $$v === 'string'? $$v.trim(): $$v)"),o&&(i="_n("+i+")");var a=yo(t,i);e.model={value:"("+t+")",expression:JSON.stringify(t),callback:"function ($$v) {"+a+"}"}}function yo(e,t){var n=function(e){if(e=e.trim(),zr=e.length,e.indexOf("[")<0||e.lastIndexOf("]")<zr-1)return(Kr=e.lastIndexOf("."))>-1?{exp:e.slice(0,Kr),key:'"'+e.slice(Kr+1)+'"'}:{exp:e,key:null};for(Jr=e,Kr=Wr=Xr=0;!bo();)_o(Gr=go())?xo(Gr):91===Gr&&wo(Gr);return{exp:e.slice(0,Wr),key:e.slice(Wr+1,Xr)}}(e);return null===n.key?e+"="+t:"$set("+n.exp+", "+n.key+", "+t+")"}function go(){return Jr.charCodeAt(++Kr)}function bo(){return Kr>=zr}function _o(e){return 34===e||39===e}function wo(e){var t=1;for(Wr=Kr;!bo();)if(_o(e=go()))xo(e);else if(91===e&&t++,93===e&&t--,0===t){Xr=Kr;break}}function xo(e){for(var t=e;!bo()&&(e=go())!==t;);}var $o;function Co(e,t,n){var r=$o;return function o(){var i=t.apply(null,arguments);null!==i&&Oo(e,o,n,r)}}var ko=st&&!(ee&&Number(ee[1])<=53);function Ao(e,t,n,r){if(ko){var o=Dn,i=t;t=i._wrapper=function(e){if(e.target===e.currentTarget||e.timeStamp>=o||e.timeStamp<=0||e.target.ownerDocument!==document)return i.apply(this,arguments)}}$o.addEventListener(e,t,ne?{capture:n,passive:r}:n)}function Oo(e,t,n,r){(r||$o).removeEventListener(e,t._wrapper||t,n)}function So(e,r){if(!t(e.data.on)||!t(r.data.on)){var o=r.data.on||{},i=e.data.on||{};$o=r.elm,function(e){if(n(e.__r)){var t=X?"change":"input";e[t]=[].concat(e.__r,e[t]||[]),delete e.__r}n(e.__c)&&(e.change=[].concat(e.__c,e.change||[]),delete e.__c)}(o),jt(o,i,Ao,Oo,Co,r.context),$o=void 0}}var To,jo={create:So,update:So};function Eo(e,r){if(!t(e.data.domProps)||!t(r.data.domProps)){var o,i,a=r.elm,s=e.data.domProps||{},c=r.data.domProps||{};for(o in n(c.__ob__)&&(c=r.data.domProps=S({},c)),s)o in c||(a[o]="");for(o in c){if(i=c[o],"textContent"===o||"innerHTML"===o){if(r.children&&(r.children.length=0),i===s[o])continue;1===a.childNodes.length&&a.removeChild(a.childNodes[0])}if("value"===o&&"PROGRESS"!==a.tagName){a._value=i;var u=t(i)?"":String(i);Mo(a,u)&&(a.value=u)}else if("innerHTML"===o&&_r(a.tagName)&&t(a.innerHTML)){(To=To||document.createElement("div")).innerHTML="<svg>"+i+"</svg>";for(var l=To.firstChild;a.firstChild;)a.removeChild(a.firstChild);for(;l.firstChild;)a.appendChild(l.firstChild)}else if(i!==s[o])try{a[o]=i}catch(e){}}}}function Mo(e,t){return!e.composing&&("OPTION"===e.tagName||function(e,t){var n=!0;try{n=document.activeElement!==e}catch(e){}return n&&e.value!==t}(e,t)||function(e,t){var r=e.value,o=e._vModifiers;if(n(o)){if(o.number)return d(r)!==d(t);if(o.trim)return r.trim()!==t.trim()}return r!==t}(e,t))}var No={create:Eo,update:Eo},Po=_((function(e){var t={},n=/:(.+)/;return e.split(/;(?![^(]*\))/g).forEach((function(e){if(e){var r=e.split(n);r.length>1&&(t[r[0].trim()]=r[1].trim())}})),t}));function Io(e){var t=Lo(e.style);return e.staticStyle?S(e.staticStyle,t):t}function Lo(e){return Array.isArray(e)?T(e):"string"==typeof e?Po(e):e}var Do,Ro=/^--/,Fo=/\s*!important$/,Uo=function(e,t,n){if(Ro.test(t))e.style.setProperty(t,n);else if(Fo.test(n))e.style.setProperty(k(t),n.replace(Fo,""),"important");else{var r=Vo(t);if(Array.isArray(n))for(var o=0,i=n.length;o<i;o++)e.style[r]=n[o];else e.style[r]=n}},Ho=["Webkit","Moz","ms"],Vo=_((function(e){if(Do=Do||document.createElement("div").style,"filter"!==(e=x(e))&&e in Do)return e;for(var t=e.charAt(0).toUpperCase()+e.slice(1),n=0;n<Ho.length;n++){var r=Ho[n]+t;if(r in Do)return r}}));function Bo(e,r){var o=r.data,i=e.data;if(!(t(o.staticStyle)&&t(o.style)&&t(i.staticStyle)&&t(i.style))){var a,s,c=r.elm,u=i.staticStyle,l=i.normalizedStyle||i.style||{},f=u||l,p=Lo(r.data.style)||{};r.data.normalizedStyle=n(p.__ob__)?S({},p):p;var d=function(e,t){for(var n,r={},o=e;o.componentInstance;)(o=o.componentInstance._vnode)&&o.data&&(n=Io(o.data))&&S(r,n);(n=Io(e.data))&&S(r,n);for(var i=e;i=i.parent;)i.data&&(n=Io(i.data))&&S(r,n);return r}(r);for(s in f)t(d[s])&&Uo(c,s,"");for(s in d)(a=d[s])!==f[s]&&Uo(c,s,null==a?"":a)}}var qo={create:Bo,update:Bo},zo=/\s+/;function Jo(e,t){if(t&&(t=t.trim()))if(e.classList)t.indexOf(" ")>-1?t.split(zo).forEach((function(t){return e.classList.add(t)})):e.classList.add(t);else{var n=" "+(e.getAttribute("class")||"")+" ";n.indexOf(" "+t+" ")<0&&e.setAttribute("class",(n+t).trim())}}function Go(e,t){if(t&&(t=t.trim()))if(e.classList)t.indexOf(" ")>-1?t.split(zo).forEach((function(t){return e.classList.remove(t)})):e.classList.remove(t),e.classList.length||e.removeAttribute("class");else{for(var n=" "+(e.getAttribute("class")||"")+" ",r=" "+t+" ";n.indexOf(r)>=0;)n=n.replace(r," ");(n=n.trim())?e.setAttribute("class",n):e.removeAttribute("class")}}function Ko(e){if(e){if("object"==typeof e){var t={};return!1!==e.css&&S(t,Wo(e.name||"v")),S(t,e),t}return"string"==typeof e?Wo(e):void 0}}var Wo=_((function(e){return{enterClass:e+"-enter",enterToClass:e+"-enter-to",enterActiveClass:e+"-enter-active",leaveClass:e+"-leave",leaveToClass:e+"-leave-to",leaveActiveClass:e+"-leave-active"}})),Xo=J&&!Z,Zo="transition",Yo="animation",Qo="transition",ei="transitionend",ti="animation",ni="animationend";Xo&&(void 0===window.ontransitionend&&void 0!==window.onwebkittransitionend&&(Qo="WebkitTransition",ei="webkitTransitionEnd"),void 0===window.onanimationend&&void 0!==window.onwebkitanimationend&&(ti="WebkitAnimation",ni="webkitAnimationEnd"));var ri=J?window.requestAnimationFrame?window.requestAnimationFrame.bind(window):setTimeout:function(e){return e()};function oi(e){ri((function(){ri(e)}))}function ii(e,t){var n=e._transitionClasses||(e._transitionClasses=[]);n.indexOf(t)<0&&(n.push(t),Jo(e,t))}function ai(e,t){e._transitionClasses&&y(e._transitionClasses,t),Go(e,t)}function si(e,t,n){var r=ui(e,t),o=r.type,i=r.timeout,a=r.propCount;if(!o)return n();var s=o===Zo?ei:ni,c=0,u=function(){e.removeEventListener(s,l),n()},l=function(t){t.target===e&&++c>=a&&u()};setTimeout((function(){c<a&&u()}),i+1),e.addEventListener(s,l)}var ci=/\b(transform|all)(,|$)/;function ui(e,t){var n,r=window.getComputedStyle(e),o=(r[Qo+"Delay"]||"").split(", "),i=(r[Qo+"Duration"]||"").split(", "),a=li(o,i),s=(r[ti+"Delay"]||"").split(", "),c=(r[ti+"Duration"]||"").split(", "),u=li(s,c),l=0,f=0;return t===Zo?a>0&&(n=Zo,l=a,f=i.length):t===Yo?u>0&&(n=Yo,l=u,f=c.length):f=(n=(l=Math.max(a,u))>0?a>u?Zo:Yo:null)?n===Zo?i.length:c.length:0,{type:n,timeout:l,propCount:f,hasTransform:n===Zo&&ci.test(r[Qo+"Property"])}}function li(e,t){for(;e.length<t.length;)e=e.concat(e);return Math.max.apply(null,t.map((function(t,n){return fi(t)+fi(e[n])})))}function fi(e){return 1e3*Number(e.slice(0,-1).replace(",","."))}function pi(e,r){var o=e.elm;n(o._leaveCb)&&(o._leaveCb.cancelled=!0,o._leaveCb());var a=Ko(e.data.transition);if(!t(a)&&!n(o._enterCb)&&1===o.nodeType){for(var s=a.css,c=a.type,u=a.enterClass,l=a.enterToClass,f=a.enterActiveClass,p=a.appearClass,v=a.appearToClass,h=a.appearActiveClass,m=a.beforeEnter,y=a.enter,g=a.afterEnter,b=a.enterCancelled,_=a.beforeAppear,w=a.appear,x=a.afterAppear,$=a.appearCancelled,C=a.duration,k=$n,A=$n.$vnode;A&&A.parent;)k=A.context,A=A.parent;var O=!k._isMounted||!e.isRootInsert;if(!O||w||""===w){var S=O&&p?p:u,T=O&&h?h:f,j=O&&v?v:l,E=O&&_||m,M=O&&"function"==typeof w?w:y,N=O&&x||g,P=O&&$||b,L=d(i(C)?C.enter:C);null!=L&&vi(L,"enter",e);var D=!1!==s&&!Z,R=mi(M),F=o._enterCb=I((function(){D&&(ai(o,j),ai(o,T)),F.cancelled?(D&&ai(o,S),P&&P(o)):N&&N(o),o._enterCb=null}));e.data.show||Et(e,"insert",(function(){var t=o.parentNode,n=t&&t._pending&&t._pending[e.key];n&&n.tag===e.tag&&n.elm._leaveCb&&n.elm._leaveCb(),M&&M(o,F)})),E&&E(o),D&&(ii(o,S),ii(o,T),oi((function(){ai(o,S),F.cancelled||(ii(o,j),R||(hi(L)?setTimeout(F,L):si(o,c,F)))}))),e.data.show&&(r&&r(),M&&M(o,F)),D||R||F()}}}function di(e,r){var o=e.elm;n(o._enterCb)&&(o._enterCb.cancelled=!0,o._enterCb());var a=Ko(e.data.transition);if(t(a)||1!==o.nodeType)return r();if(!n(o._leaveCb)){var s=a.css,c=a.type,u=a.leaveClass,l=a.leaveToClass,f=a.leaveActiveClass,p=a.beforeLeave,v=a.leave,h=a.afterLeave,m=a.leaveCancelled,y=a.delayLeave,g=a.duration,b=!1!==s&&!Z,_=mi(v),w=d(i(g)?g.leave:g);n(w)&&vi(w,"leave",e);var x=o._leaveCb=I((function(){o.parentNode&&o.parentNode._pending&&(o.parentNode._pending[e.key]=null),b&&(ai(o,l),ai(o,f)),x.cancelled?(b&&ai(o,u),m&&m(o)):(r(),h&&h(o)),o._leaveCb=null}));y?y($):$()}function $(){x.cancelled||(!e.data.show&&o.parentNode&&((o.parentNode._pending||(o.parentNode._pending={}))[e.key]=e),p&&p(o),b&&(ii(o,u),ii(o,f),oi((function(){ai(o,u),x.cancelled||(ii(o,l),_||(hi(w)?setTimeout(x,w):si(o,c,x)))}))),v&&v(o,x),b||_||x())}}function vi(e,t,n){"number"!=typeof e?ue("<transition> explicit "+t+" duration is not a valid number - got "+JSON.stringify(e)+".",n.context):isNaN(e)&&ue("<transition> explicit "+t+" duration is NaN - the duration expression might be incorrect.",n.context)}function hi(e){return"number"==typeof e&&!isNaN(e)}function mi(e){if(t(e))return!1;var r=e.fns;return n(r)?mi(Array.isArray(r)?r[0]:r):(e._length||e.length)>1}function yi(e,t){!0!==t.data.show&&pi(t)}var gi=function(e){var i,a,s={},c=e.modules,l=e.nodeOps;for(i=0;i<jr.length;++i)for(s[jr[i]]=[],a=0;a<c.length;++a)n(c[a][jr[i]])&&s[jr[i]].push(c[a][jr[i]]);function f(e){var t=l.parentNode(e);n(t)&&l.removeChild(t,e)}function p(e,t){return!t&&!e.ns&&!(F.ignoredElements.length&&F.ignoredElements.some((function(t){return u(t)?t.test(e.tag):t===e.tag})))&&F.isUnknownElement(e.tag)}var d=0;function h(e,t,o,i,a,c,u){if(n(e.elm)&&n(c)&&(e=c[u]=Ce(e)),e.isRootInsert=!a,!function(e,t,o,i){var a=e.data;if(n(a)){var c=n(e.componentInstance)&&a.keepAlive;if(n(a=a.hook)&&n(a=a.init)&&a(e,!1),n(e.componentInstance))return m(e,t),y(o,e.elm,i),r(c)&&function(e,t,r,o){for(var i,a=e;a.componentInstance;)if(n(i=(a=a.componentInstance._vnode).data)&&n(i=i.transition)){for(i=0;i<s.activate.length;++i)s.activate[i](Tr,a);t.push(a);break}y(r,e.elm,o)}(e,t,o,i),!0}}(e,t,o,i)){var f=e.data,v=e.children,h=e.tag;n(h)?(f&&f.pre&&d++,p(e,d)&&ue("Unknown custom element: <"+h+'> - did you register the component correctly? For recursive components, make sure to provide the "name" option.',e.context),e.elm=e.ns?l.createElementNS(e.ns,h):l.createElement(h,e),w(e),g(e,v,t),n(f)&&_(e,t),y(o,e.elm,i),f&&f.pre&&d--):r(e.isComment)?(e.elm=l.createComment(e.text),y(o,e.elm,i)):(e.elm=l.createTextNode(e.text),y(o,e.elm,i))}}function m(e,t){n(e.data.pendingInsert)&&(t.push.apply(t,e.data.pendingInsert),e.data.pendingInsert=null),e.elm=e.componentInstance.$el,b(e)?(_(e,t),w(e)):(Sr(e),t.push(e))}function y(e,t,r){n(e)&&(n(r)?l.parentNode(r)===e&&l.insertBefore(e,t,r):l.appendChild(e,t))}function g(e,t,n){if(Array.isArray(t)){A(t);for(var r=0;r<t.length;++r)h(t[r],n,e.elm,null,!0,t,r)}else o(e.text)&&l.appendChild(e.elm,l.createTextNode(String(e.text)))}function b(e){for(;e.componentInstance;)e=e.componentInstance._vnode;return n(e.tag)}function _(e,t){for(var r=0;r<s.create.length;++r)s.create[r](Tr,e);n(i=e.data.hook)&&(n(i.create)&&i.create(Tr,e),n(i.insert)&&t.push(e))}function w(e){var t;if(n(t=e.fnScopeId))l.setStyleScope(e.elm,t);else for(var r=e;r;)n(t=r.context)&&n(t=t.$options._scopeId)&&l.setStyleScope(e.elm,t),r=r.parent;n(t=$n)&&t!==e.context&&t!==e.fnContext&&n(t=t.$options._scopeId)&&l.setStyleScope(e.elm,t)}function x(e,t,n,r,o,i){for(;r<=o;++r)h(n[r],i,e,t,!1,n,r)}function $(e){var t,r,o=e.data;if(n(o))for(n(t=o.hook)&&n(t=t.destroy)&&t(e),t=0;t<s.destroy.length;++t)s.destroy[t](e);if(n(t=e.children))for(r=0;r<e.children.length;++r)$(e.children[r])}function C(e,t,r,o){for(;r<=o;++r){var i=t[r];n(i)&&(n(i.tag)?(k(i),$(i)):f(i.elm))}}function k(e,t){if(n(t)||n(e.data)){var r,o=s.remove.length+1;for(n(t)?t.listeners+=o:t=function(e,t){function n(){0==--n.listeners&&f(e)}return n.listeners=t,n}(e.elm,o),n(r=e.componentInstance)&&n(r=r._vnode)&&n(r.data)&&k(r,t),r=0;r<s.remove.length;++r)s.remove[r](e,t);n(r=e.data.hook)&&n(r=r.remove)?r(e,t):t()}else f(e.elm)}function A(e){for(var t={},r=0;r<e.length;r++){var o=e[r],i=o.key;n(i)&&(t[i]?ue("Duplicate keys detected: '"+i+"'. This may cause an update error.",o.context):t[i]=!0)}}function O(e,t,r,o){for(var i=r;i<o;i++){var a=t[i];if(n(a)&&Er(e,a))return i}}function S(e,o,i,a,c,u){if(e!==o){n(o.elm)&&n(a)&&(o=a[c]=Ce(o));var f=o.elm=e.elm;if(r(e.isAsyncPlaceholder))n(o.asyncFactory.resolved)?M(e.elm,o,i):o.isAsyncPlaceholder=!0;else if(r(o.isStatic)&&r(e.isStatic)&&o.key===e.key&&(r(o.isCloned)||r(o.isOnce)))o.componentInstance=e.componentInstance;else{var p,d=o.data;n(d)&&n(p=d.hook)&&n(p=p.prepatch)&&p(e,o);var v=e.children,m=o.children;if(n(d)&&b(o)){for(p=0;p<s.update.length;++p)s.update[p](e,o);n(p=d.hook)&&n(p=p.update)&&p(e,o)}t(o.text)?n(v)&&n(m)?v!==m&&function(e,r,o,i,a){var s,c,u,f=0,p=0,d=r.length-1,v=r[0],m=r[d],y=o.length-1,g=o[0],b=o[y],_=!a;for(A(o);f<=d&&p<=y;)t(v)?v=r[++f]:t(m)?m=r[--d]:Er(v,g)?(S(v,g,i,o,p),v=r[++f],g=o[++p]):Er(m,b)?(S(m,b,i,o,y),m=r[--d],b=o[--y]):Er(v,b)?(S(v,b,i,o,y),_&&l.insertBefore(e,v.elm,l.nextSibling(m.elm)),v=r[++f],b=o[--y]):Er(m,g)?(S(m,g,i,o,p),_&&l.insertBefore(e,m.elm,v.elm),m=r[--d],g=o[++p]):(t(s)&&(s=Mr(r,f,d)),t(c=n(g.key)?s[g.key]:O(g,r,f,d))?h(g,i,e,v.elm,!1,o,p):Er(u=r[c],g)?(S(u,g,i,o,p),r[c]=void 0,_&&l.insertBefore(e,u.elm,v.elm)):h(g,i,e,v.elm,!1,o,p),g=o[++p]);f>d?x(e,t(o[y+1])?null:o[y+1].elm,o,p,y,i):p>y&&C(0,r,f,d)}(f,v,m,i,u):n(m)?(A(m),n(e.text)&&l.setTextContent(f,""),x(f,null,m,0,m.length-1,i)):n(v)?C(0,v,0,v.length-1):n(e.text)&&l.setTextContent(f,""):e.text!==o.text&&l.setTextContent(f,o.text),n(d)&&n(p=d.hook)&&n(p=p.postpatch)&&p(e,o)}}}function T(e,t,o){if(r(o)&&n(e.parent))e.parent.data.pendingInsert=t;else for(var i=0;i<t.length;++i)t[i].data.hook.insert(t[i])}var j=!1,E=v("attrs,class,staticClass,staticStyle,key");function M(e,t,o,i){var a,s=t.tag,c=t.data,u=t.children;if(i=i||c&&c.pre,t.elm=e,r(t.isComment)&&n(t.asyncFactory))return t.isAsyncPlaceholder=!0,!0;if(!function(e,t,r){return n(t.tag)?0===t.tag.indexOf("vue-component")||!p(t,r)&&t.tag.toLowerCase()===(e.tagName&&e.tagName.toLowerCase()):e.nodeType===(t.isComment?8:3)}(e,t,i))return!1;if(n(c)&&(n(a=c.hook)&&n(a=a.init)&&a(t,!0),n(a=t.componentInstance)))return m(t,o),!0;if(n(s)){if(n(u))if(e.hasChildNodes())if(n(a=c)&&n(a=a.domProps)&&n(a=a.innerHTML)){if(a!==e.innerHTML)return"undefined"==typeof console||j||(j=!0,console.warn("Parent: ",e),console.warn("server innerHTML: ",a),console.warn("client innerHTML: ",e.innerHTML)),!1}else{for(var l=!0,f=e.firstChild,d=0;d<u.length;d++){if(!f||!M(f,u[d],o,i)){l=!1;break}f=f.nextSibling}if(!l||f)return"undefined"==typeof console||j||(j=!0,console.warn("Parent: ",e),console.warn("Mismatching childNodes vs. VNodes: ",e.childNodes,u)),!1}else g(t,u,o);if(n(c)){var v=!1;for(var h in c)if(!E(h)){v=!0,_(t,o);break}!v&&c.class&&At(c.class)}}else e.data!==t.text&&(e.data=t.text);return!0}return function(e,o,i,a){if(!t(o)){var c,u=!1,f=[];if(t(e))u=!0,h(o,f);else{var p=n(e.nodeType);if(!p&&Er(e,o))S(e,o,f,null,null,a);else{if(p){if(1===e.nodeType&&e.hasAttribute(L)&&(e.removeAttribute(L),i=!0),r(i)){if(M(e,o,f))return T(o,f,!0),e;ue("The client-side rendered virtual DOM tree is not matching server-rendered content. This is likely caused by incorrect HTML markup, for example nesting block-level elements inside <p>, or missing <tbody>. Bailing hydration and performing full client-side render.")}c=e,e=new _e(l.tagName(c).toLowerCase(),{},[],void 0,c)}var d=e.elm,v=l.parentNode(d);if(h(o,f,d._leaveCb?null:v,l.nextSibling(d)),n(o.parent))for(var m=o.parent,y=b(o);m;){for(var g=0;g<s.destroy.length;++g)s.destroy[g](m);if(m.elm=o.elm,y){for(var _=0;_<s.create.length;++_)s.create[_](Tr,m);var w=m.data.hook.insert;if(w.merged)for(var x=1;x<w.fns.length;x++)w.fns[x]()}else Sr(m);m=m.parent}n(v)?C(0,[e],0,0):n(e.tag)&&$(e)}}return T(o,f,u),o.elm}n(e)&&$(e)}}({nodeOps:Ar,modules:[Br,Yr,jo,No,qo,J?{create:yi,activate:yi,remove:function(e,t){!0!==e.data.show?di(e,t):t()}}:{}].concat(Fr)});Z&&document.addEventListener("selectionchange",(function(){var e=document.activeElement;e&&e.vmodel&&Ai(e,"input")}));var bi={inserted:function(e,t,n,r){"select"===n.tag?(r.elm&&!r.elm._vOptions?Et(n,"postpatch",(function(){bi.componentUpdated(e,t,n)})):_i(e,t,n.context),e._vOptions=[].map.call(e.options,$i)):("textarea"===n.tag||Cr(e.type))&&(e._vModifiers=t.modifiers,t.modifiers.lazy||(e.addEventListener("compositionstart",Ci),e.addEventListener("compositionend",ki),e.addEventListener("change",ki),Z&&(e.vmodel=!0)))},componentUpdated:function(e,t,n){if("select"===n.tag){_i(e,t,n.context);var r=e._vOptions,o=e._vOptions=[].map.call(e.options,$i);o.some((function(e,t){return!N(e,r[t])}))&&(e.multiple?t.value.some((function(e){return xi(e,o)})):t.value!==t.oldValue&&xi(t.value,o))&&Ai(e,"change")}}};function _i(e,t,n){wi(e,t,n),(X||Y)&&setTimeout((function(){wi(e,t,n)}),0)}function wi(e,t,n){var r=t.value,o=e.multiple;if(!o||Array.isArray(r)){for(var i,a,s=0,c=e.options.length;s<c;s++)if(a=e.options[s],o)i=P(r,$i(a))>-1,a.selected!==i&&(a.selected=i);else if(N($i(a),r))return void(e.selectedIndex!==s&&(e.selectedIndex=s));o||(e.selectedIndex=-1)}else ue('<select multiple v-model="'+t.expression+'"> expects an Array value for its binding, but got '+Object.prototype.toString.call