(()=>{var t={};/************************************************************************/// The module cache
var e={};// The require function
function a(r){// Check if module is in cache
var n=e[r];if(n!==undefined){return n.exports}// Create a new module (and put it into the cache)
var s=e[r]={exports:{}};// Execute the module function
t[r](s,s.exports,a);// Return the exports of the module
return s.exports}/************************************************************************/// webpack/runtime/rspack_version
(()=>{a.rv=()=>"1.5.7"})();// webpack/runtime/rspack_unique_id
(()=>{a.ruid="bundler=rspack@1.5.7"})();/************************************************************************/// Show h5p statement result in detail on modal
window.jQuery(document).ready(t=>{t(document).on("click",".open-tutor-h5p-statement-result-modal-btn",function(e){e.preventDefault();var a=t(this);var r=parseInt(a.data("statement-id"),10);var n=parseInt(a.data("content-id"),10);var s=a.data("is-lesson");t.ajax({url:_tutorobject.ajaxurl,type:"POST",data:{action:"view_h5p_statement_result",statement_id:r,content_id:n,is_lesson:s},beforeSend:function t(){a.addClass("is-loading").attr("disabled",true)},success:function e(e){if(!e.success){tutor_toast(__("Error","tutor-pro"),get_response_message(e),"error");return}t(".h5p-statement-result-modal .tutor-modal-container").html(e.data.output);t(".h5p-statement-result-modal").addClass("tutor-is-active");window.dispatchEvent(new Event(_tutorobject.content_change_event))},complete:function t(){a.removeClass("is-loading").attr("disabled",false)}})});// Show h5p quiz result details on a modal
t(document).on("click",".open-tutor-h5p-quiz-result-modal-btn",function(e){e.preventDefault();var a=t(this);var r=parseInt(a.data("question-id"),10);var n=parseInt(a.data("user-id"),10);var s=parseInt(a.data("quiz-id"),10);var o=parseInt(a.data("attempt-id"),10);var d=parseInt(a.data("content-id"),10);t.ajax({url:_tutorobject.ajaxurl,type:"POST",data:{action:"view_h5p_quiz_result",question_id:r,user_id:n,quiz_id:s,attempt_id:o,content_id:d},beforeSend:function t(){a.addClass("is-loading").attr("disabled",true)},success:function e(e){if(!e.success){tutor_toast(__("Error","tutor-pro"),get_response_message(e),"error");return}t(".h5p-quiz-result-modal .tutor-modal-container").html(e.data.output);t(".h5p-quiz-result-modal").addClass("tutor-is-active");window.dispatchEvent(new Event(_tutorobject.content_change_event))},complete:function t(){a.removeClass("is-loading").attr("disabled",false)}})})})})();