scorm-again 2.6.0 → 2.6.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (95) hide show
  1. package/dist/aicc.js +172 -166
  2. package/dist/aicc.js.map +1 -1
  3. package/dist/aicc.min.js +1 -1
  4. package/dist/aicc.min.js.map +1 -1
  5. package/dist/esm/aicc.js +173 -167
  6. package/dist/esm/aicc.js.map +1 -1
  7. package/dist/esm/aicc.min.js +1 -1
  8. package/dist/esm/aicc.min.js.map +1 -1
  9. package/dist/esm/scorm-again.js +194 -184
  10. package/dist/esm/scorm-again.js.map +1 -1
  11. package/dist/esm/scorm-again.min.js +1 -1
  12. package/dist/esm/scorm-again.min.js.map +1 -1
  13. package/dist/esm/scorm12.js +171 -165
  14. package/dist/esm/scorm12.js.map +1 -1
  15. package/dist/esm/scorm12.min.js +1 -1
  16. package/dist/esm/scorm12.min.js.map +1 -1
  17. package/dist/esm/scorm2004.js +65 -51
  18. package/dist/esm/scorm2004.js.map +1 -1
  19. package/dist/esm/scorm2004.min.js +1 -1
  20. package/dist/esm/scorm2004.min.js.map +1 -1
  21. package/dist/scorm-again.js +195 -185
  22. package/dist/scorm-again.js.map +1 -1
  23. package/dist/scorm-again.min.js +1 -1
  24. package/dist/scorm-again.min.js.map +1 -1
  25. package/dist/scorm12.js +170 -164
  26. package/dist/scorm12.js.map +1 -1
  27. package/dist/scorm12.min.js +1 -1
  28. package/dist/scorm12.min.js.map +1 -1
  29. package/dist/scorm2004.js +64 -50
  30. package/dist/scorm2004.js.map +1 -1
  31. package/dist/scorm2004.min.js +1 -1
  32. package/dist/scorm2004.min.js.map +1 -1
  33. package/dist/types/AICC.d.ts +13 -0
  34. package/dist/types/BaseAPI.d.ts +71 -0
  35. package/dist/types/Scorm12API.d.ts +39 -0
  36. package/dist/types/Scorm2004API.d.ts +52 -0
  37. package/dist/types/ScormAgain.d.ts +4 -0
  38. package/dist/types/cmi/aicc/attempts.d.ts +19 -0
  39. package/dist/types/cmi/aicc/cmi.d.ts +34 -0
  40. package/dist/types/cmi/aicc/core.d.ts +57 -0
  41. package/dist/types/cmi/aicc/evaluation.d.ts +33 -0
  42. package/dist/types/cmi/aicc/paths.d.ts +35 -0
  43. package/dist/types/cmi/aicc/student_data.d.ts +20 -0
  44. package/dist/types/cmi/aicc/student_demographics.d.ts +61 -0
  45. package/dist/types/cmi/aicc/student_preferences.d.ts +34 -0
  46. package/dist/types/cmi/aicc/tries.d.ts +23 -0
  47. package/dist/types/cmi/aicc/validation.d.ts +1 -0
  48. package/dist/types/cmi/common/array.d.ts +19 -0
  49. package/dist/types/cmi/common/base_cmi.d.ts +13 -0
  50. package/dist/types/cmi/common/score.d.ts +38 -0
  51. package/dist/types/cmi/common/validation.d.ts +3 -0
  52. package/dist/types/cmi/scorm12/cmi.d.ts +45 -0
  53. package/dist/types/cmi/scorm12/interactions.d.ts +64 -0
  54. package/dist/types/cmi/scorm12/nav.d.ts +11 -0
  55. package/dist/types/cmi/scorm12/objectives.d.ts +22 -0
  56. package/dist/types/cmi/scorm12/student_data.d.ts +22 -0
  57. package/dist/types/cmi/scorm12/student_preference.d.ts +26 -0
  58. package/dist/types/cmi/scorm12/validation.d.ts +2 -0
  59. package/dist/types/cmi/scorm2004/adl.d.ts +71 -0
  60. package/dist/types/cmi/scorm2004/cmi.d.ts +103 -0
  61. package/dist/types/cmi/scorm2004/comments.d.ts +27 -0
  62. package/dist/types/cmi/scorm2004/interactions.d.ts +68 -0
  63. package/dist/types/cmi/scorm2004/learner_preference.d.ts +26 -0
  64. package/dist/types/cmi/scorm2004/objectives.d.ts +38 -0
  65. package/dist/types/cmi/scorm2004/score.d.ts +14 -0
  66. package/dist/types/cmi/scorm2004/validation.d.ts +2 -0
  67. package/dist/types/constants/api_constants.d.ts +49 -0
  68. package/dist/types/constants/default_settings.d.ts +2 -0
  69. package/dist/types/constants/enums.d.ts +23 -0
  70. package/dist/types/constants/error_codes.d.ts +6 -0
  71. package/dist/types/constants/language_constants.d.ts +2 -0
  72. package/dist/types/constants/regex.d.ts +82 -0
  73. package/dist/types/constants/response_constants.d.ts +16 -0
  74. package/dist/types/exceptions/aicc_exceptions.d.ts +4 -0
  75. package/dist/types/exceptions/scorm12_exceptions.d.ts +4 -0
  76. package/dist/types/exceptions/scorm2004_exceptions.d.ts +4 -0
  77. package/dist/types/exceptions.d.ts +18 -0
  78. package/dist/types/helpers/scheduled_commit.d.ts +10 -0
  79. package/dist/types/interfaces/IBaseAPI.d.ts +22 -0
  80. package/dist/types/types/api_types.d.ts +73 -0
  81. package/dist/types/utilities.d.ts +19 -0
  82. package/dist_test.html +208 -0
  83. package/package.json +3 -2
  84. package/src/AICC.ts +3 -3
  85. package/src/BaseAPI.ts +32 -22
  86. package/src/Scorm12API.ts +4 -12
  87. package/src/Scorm2004API.ts +18 -23
  88. package/src/ScormAgain.ts +3 -7
  89. package/src/constants/default_settings.ts +2 -2
  90. package/src/types/api_types.ts +27 -2
  91. package/test/AICC.spec.ts +2 -2
  92. package/test/Scorm12API.spec.ts +26 -3
  93. package/test/Scorm2004API.spec.ts +20 -20
  94. package/tsconfig.json +19 -6
  95. package/webpack.config.js +1 -1
@@ -1,2 +1,2 @@
1
- var e={916:function(e,t,r){r.r(t),r.d(t,{AICCImpl:function(){return x}});var i=r(635),n=r(941),o=r(989),s=r(340),a=r(589),c=r(784),l=s.aicc_constants.error_descriptions,u=function(e){function t(t){return{}.hasOwnProperty.call(l,String(t))?e.call(this,t,l[String(t)].basicMessage,l[String(t)].detailMessage)||this:e.call(this,101,l[101].basicMessage,l[101].detailMessage)||this}return(0,i.__extends)(t,e),t}(c.ValidationError),_=r(319),d=r(797),h=r(449);function m(e,t,r){return(0,h.checkValidFormat)(e,t,d.scorm12_errors.TYPE_MISMATCH,u,r)}var f=r(417),p=function(e){function t(){var t=e.call(this)||this;return t.comments=new g,t}return(0,i.__extends)(t,e),t.prototype.initialize=function(){var t;e.prototype.initialize.call(this),null===(t=this.comments)||void 0===t||t.initialize()},t.prototype.reset=function(){var e;this._initialized=!1,null===(e=this.comments)||void 0===e||e.reset()},t.prototype.toJSON=function(){this.jsonString=!0;var e={comments:this.comments};return delete this.jsonString,e},t}(_.BaseCMI),g=function(e){function t(){return e.call(this,{children:s.aicc_constants.comments_children,errorCode:d.scorm12_errors.INVALID_SET_VALUE,errorClass:u})||this}return(0,i.__extends)(t,e),t}(a.CMIArray),E=function(e){function t(){var t=e.call(this)||this;return t._content="",t._location="",t._time="",t}return(0,i.__extends)(t,e),t.prototype.reset=function(){this._initialized=!1,this._content="",this._location="",this._time=""},Object.defineProperty(t.prototype,"content",{get:function(){return this._content},set:function(e){m(e,f.aicc_regex.CMIString256)&&(this._content=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"location",{get:function(){return this._location},set:function(e){m(e,f.aicc_regex.CMIString256)&&(this._location=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"time",{get:function(){return this._time},set:function(e){m(e,f.aicc_regex.CMITime)&&(this._time=e)},enumerable:!1,configurable:!0}),t.prototype.toJSON=function(){this.jsonString=!0;var e={content:this.content,location:this.location,time:this.time};return delete this.jsonString,e},t}(_.BaseCMI),y=function(e){function t(){var t=e.call(this,s.aicc_constants.student_preference_children)||this;return t._lesson_type="",t._text_color="",t._text_location="",t._text_size="",t._video="",t.windows=new a.CMIArray({errorCode:d.scorm12_errors.INVALID_SET_VALUE,errorClass:u,children:""}),t}return(0,i.__extends)(t,e),t.prototype.initialize=function(){var t;e.prototype.initialize.call(this),null===(t=this.windows)||void 0===t||t.initialize()},Object.defineProperty(t.prototype,"lesson_type",{get:function(){return this._lesson_type},set:function(e){m(e,f.aicc_regex.CMIString256)&&(this._lesson_type=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"text_color",{get:function(){return this._text_color},set:function(e){m(e,f.aicc_regex.CMIString256)&&(this._text_color=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"text_location",{get:function(){return this._text_location},set:function(e){m(e,f.aicc_regex.CMIString256)&&(this._text_location=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"text_size",{get:function(){return this._text_size},set:function(e){m(e,f.aicc_regex.CMIString256)&&(this._text_size=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"video",{get:function(){return this._video},set:function(e){m(e,f.aicc_regex.CMIString256)&&(this._video=e)},enumerable:!1,configurable:!0}),t.prototype.toJSON=function(){this.jsonString=!0;var e={audio:this.audio,language:this.language,lesson_type:this.lesson_type,speed:this.speed,text:this.text,text_color:this.text_color,text_location:this.text_location,text_size:this.text_size,video:this.video,windows:this.windows};return delete this.jsonString,e},t}(r(181).CMIStudentPreference),b=function(e){function t(){var t=e.call(this)||this;return t.__children=s.aicc_constants.student_demographics_children,t._city="",t._class="",t._company="",t._country="",t._experience="",t._familiar_name="",t._instructor_name="",t._title="",t._native_language="",t._state="",t._street_address="",t._telephone="",t._years_experience="",t}return(0,i.__extends)(t,e),t.prototype.reset=function(){this._initialized=!1},Object.defineProperty(t.prototype,"_children",{get:function(){return this.__children},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"city",{get:function(){return this._city},set:function(e){if(this.initialized)throw new u(d.scorm12_errors.READ_ONLY_ELEMENT);this._city=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"class",{get:function(){return this._class},set:function(e){if(this.initialized)throw new u(d.scorm12_errors.READ_ONLY_ELEMENT);this._class=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"company",{get:function(){return this._company},set:function(e){if(this.initialized)throw new u(d.scorm12_errors.READ_ONLY_ELEMENT);this._company=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"country",{get:function(){return this._country},set:function(e){if(this.initialized)throw new u(d.scorm12_errors.READ_ONLY_ELEMENT);this._country=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"experience",{get:function(){return this._experience},set:function(e){if(this.initialized)throw new u(d.scorm12_errors.READ_ONLY_ELEMENT);this._experience=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"familiar_name",{get:function(){return this._familiar_name},set:function(e){if(this.initialized)throw new u(d.scorm12_errors.READ_ONLY_ELEMENT);this._familiar_name=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"instructor_name",{get:function(){return this._instructor_name},set:function(e){if(this.initialized)throw new u(d.scorm12_errors.READ_ONLY_ELEMENT);this._instructor_name=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"title",{get:function(){return this._title},set:function(e){if(this.initialized)throw new u(d.scorm12_errors.READ_ONLY_ELEMENT);this._title=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"native_language",{get:function(){return this._native_language},set:function(e){if(this.initialized)throw new u(d.scorm12_errors.READ_ONLY_ELEMENT);this._native_language=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"state",{get:function(){return this._state},set:function(e){if(this.initialized)throw new u(d.scorm12_errors.READ_ONLY_ELEMENT);this._state=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"street_address",{get:function(){return this._street_address},set:function(e){if(this.initialized)throw new u(d.scorm12_errors.READ_ONLY_ELEMENT);this._street_address=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"telephone",{get:function(){return this._telephone},set:function(e){if(this.initialized)throw new u(d.scorm12_errors.READ_ONLY_ELEMENT);this._telephone=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"years_experience",{get:function(){return this._years_experience},set:function(e){if(this.initialized)throw new u(d.scorm12_errors.READ_ONLY_ELEMENT);this._years_experience=e},enumerable:!1,configurable:!0}),t.prototype.toJSON=function(){this.jsonString=!0;var e={city:this.city,class:this.class,company:this.company,country:this.country,experience:this.experience,familiar_name:this.familiar_name,instructor_name:this.instructor_name,title:this.title,native_language:this.native_language,state:this.state,street_address:this.street_address,telephone:this.telephone,years_experience:this.years_experience};return delete this.jsonString,e},t}(_.BaseCMI),v=r(434),M=function(e){function t(){return e.call(this,{children:s.aicc_constants.tries_children})||this}return(0,i.__extends)(t,e),t}(a.CMIArray),S=function(e){function t(){var t=e.call(this)||this;return t._status="",t._time="",t.score=new v.CMIScore({score_children:s.aicc_constants.score_children,score_range:f.aicc_regex.score_range,invalidErrorCode:d.scorm12_errors.INVALID_SET_VALUE,invalidTypeCode:d.scorm12_errors.TYPE_MISMATCH,invalidRangeCode:d.scorm12_errors.VALUE_OUT_OF_RANGE,errorClass:u}),t}return(0,i.__extends)(t,e),t.prototype.initialize=function(){var t;e.prototype.initialize.call(this),null===(t=this.score)||void 0===t||t.initialize()},t.prototype.reset=function(){var e;this._initialized=!1,this._status="",this._time="",null===(e=this.score)||void 0===e||e.reset()},Object.defineProperty(t.prototype,"status",{get:function(){return this._status},set:function(e){m(e,f.aicc_regex.CMIStatus2)&&(this._status=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"time",{get:function(){return this._time},set:function(e){m(e,f.aicc_regex.CMITime)&&(this._time=e)},enumerable:!1,configurable:!0}),t.prototype.toJSON=function(){this.jsonString=!0;var e={status:this.status,time:this.time,score:this.score};return delete this.jsonString,e},t}(_.BaseCMI),I=r(532),C=function(e){function t(){return e.call(this,{children:s.aicc_constants.attempt_records_children})||this}return(0,i.__extends)(t,e),t}(a.CMIArray),O=function(e){function t(){var t=e.call(this)||this;return t._lesson_status="",t.score=new v.CMIScore({score_children:s.aicc_constants.score_children,score_range:f.aicc_regex.score_range,invalidErrorCode:d.scorm12_errors.INVALID_SET_VALUE,invalidTypeCode:d.scorm12_errors.TYPE_MISMATCH,invalidRangeCode:d.scorm12_errors.VALUE_OUT_OF_RANGE,errorClass:u}),t}return(0,i.__extends)(t,e),t.prototype.initialize=function(){var t;e.prototype.initialize.call(this),this._lesson_status="",null===(t=this.score)||void 0===t||t.initialize()},t.prototype.reset=function(){var e;this._initialized=!1,null===(e=this.score)||void 0===e||e.reset()},Object.defineProperty(t.prototype,"lesson_status",{get:function(){return this._lesson_status},set:function(e){m(e,f.aicc_regex.CMIStatus2)&&(this._lesson_status=e)},enumerable:!1,configurable:!0}),t.prototype.toJSON=function(){this.jsonString=!0;var e={lesson_status:this.lesson_status,score:this.score};return delete this.jsonString,e},t}(_.BaseCMI),w=function(e){function t(){var t=e.call(this,s.aicc_constants.student_data_children)||this;return t._tries_during_lesson="",t.tries=new M,t.attempt_records=new C,t}return(0,i.__extends)(t,e),t.prototype.initialize=function(){var t,r;e.prototype.initialize.call(this),null===(t=this.tries)||void 0===t||t.initialize(),null===(r=this.attempt_records)||void 0===r||r.initialize()},t.prototype.reset=function(){var e,t;this._initialized=!1,null===(e=this.tries)||void 0===e||e.reset(!0),null===(t=this.attempt_records)||void 0===t||t.reset(!0)},Object.defineProperty(t.prototype,"tries_during_lesson",{get:function(){return this._tries_during_lesson},set:function(e){if(this.initialized)throw new u(d.scorm12_errors.READ_ONLY_ELEMENT);this._tries_during_lesson=e},enumerable:!1,configurable:!0}),t.prototype.toJSON=function(){this.jsonString=!0;var e={mastery_score:this.mastery_score,max_time_allowed:this.max_time_allowed,time_limit_action:this.time_limit_action,tries:this.tries,attempt_records:this.attempt_records};return delete this.jsonString,e},t}(I.CMIStudentData),T=function(e){function t(){return e.call(this,{children:s.aicc_constants.paths_children})||this}return(0,i.__extends)(t,e),t}(a.CMIArray),N=function(e){function t(){var t=e.call(this)||this;return t._location_id="",t._date="",t._time="",t._status="",t._why_left="",t._time_in_element="",t}return(0,i.__extends)(t,e),t.prototype.reset=function(){this._initialized=!1,this._location_id="",this._date="",this._time="",this._status="",this._why_left="",this._time_in_element=""},Object.defineProperty(t.prototype,"location_id",{get:function(){return this._location_id},set:function(e){m(e,f.aicc_regex.CMIString256)&&(this._location_id=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"date",{get:function(){return this._date},set:function(e){m(e,f.aicc_regex.CMIString256)&&(this._date=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"time",{get:function(){return this._time},set:function(e){m(e,f.aicc_regex.CMITime)&&(this._time=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"status",{get:function(){return this._status},set:function(e){m(e,f.aicc_regex.CMIStatus2)&&(this._status=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"why_left",{get:function(){return this._why_left},set:function(e){m(e,f.aicc_regex.CMIString256)&&(this._why_left=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"time_in_element",{get:function(){return this._time_in_element},set:function(e){m(e,f.aicc_regex.CMITime)&&(this._time_in_element=e)},enumerable:!1,configurable:!0}),t.prototype.toJSON=function(){this.jsonString=!0;var e={location_id:this.location_id,date:this.date,time:this.time,status:this.status,why_left:this.why_left,time_in_element:this.time_in_element};return delete this.jsonString,e},t}(_.BaseCMI),L=function(e){function t(t){void 0===t&&(t=!1);var r=e.call(this,s.aicc_constants.cmi_children)||this;return t&&r.initialize(),r.student_preference=new y,r.student_data=new w,r.student_demographics=new b,r.evaluation=new p,r.paths=new T,r}return(0,i.__extends)(t,e),t.prototype.initialize=function(){var t,r,i,n,o;e.prototype.initialize.call(this),null===(t=this.student_preference)||void 0===t||t.initialize(),null===(r=this.student_data)||void 0===r||r.initialize(),null===(i=this.student_demographics)||void 0===i||i.initialize(),null===(n=this.evaluation)||void 0===n||n.initialize(),null===(o=this.paths)||void 0===o||o.initialize()},t.prototype.toJSON=function(){this.jsonString=!0;var e={suspend_data:this.suspend_data,launch_data:this.launch_data,comments:this.comments,comments_from_lms:this.comments_from_lms,core:this.core,objectives:this.objectives,student_data:this.student_data,student_preference:this.student_preference,student_demographics:this.student_demographics,interactions:this.interactions,evaluation:this.evaluation,paths:this.paths};return delete this.jsonString,e},t}(o.CMI),A=r(331),R=r(864),x=function(e){function t(t){var r=e.call(this,t)||this;return r.cmi=new L,r.nav=new A.NAV,r}return(0,i.__extends)(t,e),t.prototype.getChildElement=function(t,r,i){var n=e.prototype.getChildElement.call(this,t,r,i);return n||((0,R.stringMatches)(t,"cmi\\.evaluation\\.comments\\.\\d+")?n=new E:(0,R.stringMatches)(t,"cmi\\.student_data\\.tries\\.\\d+")?n=new S:(0,R.stringMatches)(t,"cmi\\.student_data\\.attempt_records\\.\\d+")?n=new O:(0,R.stringMatches)(t,"cmi\\.paths\\.\\d+")&&(n=new N)),n},t.prototype.replaceWithAnotherScormAPI=function(e){this.cmi=e.cmi,this.nav=e.nav},t}(n.Scorm12Impl)},429:function(e,t,r){r.r(t),r.d(t,{default:function(){return d}});var i=r(635),n=r(589),o=r(784),s=r(340),a=r(864),c=r(56),l={autocommit:!1,autocommitSeconds:10,asyncCommit:!1,sendFullCommit:!0,lmsCommitUrl:!1,dataCommitFormat:"json",commitRequestDataType:"application/json;charset=UTF-8",autoProgress:!1,logLevel:c.LogLevelEnum.ERROR,selfReportSessionTime:!1,alwaysSendTotalTime:!1,renderCommonCommitFields:!1,strict_errors:!0,xhrHeaders:{},xhrWithCredentials:!1,fetchMode:"cors",responseHandler:function(e){return(0,i.__awaiter)(this,void 0,void 0,(function(){var t,r;return(0,i.__generator)(this,(function(i){switch(i.label){case 0:return void 0===e?[3,2]:[4,e.text()];case 1:return t=i.sent(),r=null,t&&(r=JSON.parse(t)),null!==r&&{}.hasOwnProperty.call(r,"result")?[2,{result:r.result,errorCode:r.errorCode?r.errorCode:r.result===s.global_constants.SCORM_TRUE?0:101}]:200===e.status?[2,{result:s.global_constants.SCORM_TRUE,errorCode:0}]:[2,{result:s.global_constants.SCORM_FALSE,errorCode:101}];case 2:return[2,{result:s.global_constants.SCORM_FALSE,errorCode:101}]}}))}))},requestHandler:function(e){return e},onLogMessage:function(e,t){switch(e){case"4":case 4:case"ERROR":case c.LogLevelEnum.ERROR:console.error(t);break;case"3":case 3:case"WARN":case c.LogLevelEnum.WARN:console.warn(t);break;case"2":case 2:case"INFO":case c.LogLevelEnum.INFO:console.info(t);break;case"1":case 1:case"DEBUG":case c.LogLevelEnum.DEBUG:console.debug?console.debug(t):console.log(t)}},scoItemIds:[],scoItemIdValidator:!1,globalObjectiveIds:[]},u=function(){function e(e,t,r){this._cancelled=!1,this._API=e,this._timeout=setTimeout(this.wrapper.bind(this),t),this._callback=r}return e.prototype.cancel=function(){this._cancelled=!0,this._timeout&&clearTimeout(this._timeout)},e.prototype.wrapper=function(){this._cancelled||(0,i.__awaiter)(this,void 0,void 0,(function(){return(0,i.__generator)(this,(function(e){switch(e.label){case 0:return[4,this._API.commit(this._callback)];case 1:return[2,e.sent()]}}))}))},e}(),_=function(){function e(t,r){var i=this.constructor;if(this._settings=l,i===e)throw new TypeError("Cannot construct BaseAPI instances directly");this.currentState=s.global_constants.STATE_NOT_INITIALIZED,this.lastErrorCode="0",this.listenerArray=[],this._error_codes=t,r&&(this.settings=r),this.apiLogLevel=this.settings.logLevel,this.selfReportSessionTime=this.settings.selfReportSessionTime,void 0===this.apiLogLevel&&(this.apiLogLevel=c.LogLevelEnum.NONE)}return e.prototype.commonReset=function(e){this.apiLog("reset","Called",c.LogLevelEnum.INFO),this.settings=(0,i.__assign)((0,i.__assign)({},this.settings),e),this.clearScheduledCommit(),this.currentState=s.global_constants.STATE_NOT_INITIALIZED,this.lastErrorCode="0",this.listenerArray=[],this.startingData=void 0},e.prototype.initialize=function(e,t,r){var i=s.global_constants.SCORM_FALSE;return this.isInitialized()?this.throwSCORMError(this._error_codes.INITIALIZED,t):this.isTerminated()?this.throwSCORMError(this._error_codes.TERMINATED,r):(this.selfReportSessionTime&&this.cmi.setStartTime(),this.currentState=s.global_constants.STATE_INITIALIZED,this.lastErrorCode="0",i=s.global_constants.SCORM_TRUE,this.processListeners(e)),this.apiLog(e,"returned: "+i,c.LogLevelEnum.INFO),this.clearSCORMError(i),i},e.prototype.apiLog=function(e,t,r,i){t=(0,a.formatMessage)(e,t,i),r>=this.apiLogLevel&&this.settings.onLogMessage(r,t)},Object.defineProperty(e.prototype,"error_codes",{get:function(){return this._error_codes},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"settings",{get:function(){return this._settings},set:function(e){this._settings=(0,i.__assign)((0,i.__assign)({},this._settings),e)},enumerable:!1,configurable:!0}),e.prototype.terminate=function(e,t){return(0,i.__awaiter)(this,void 0,void 0,(function(){var r,n;return(0,i.__generator)(this,(function(i){switch(i.label){case 0:return r=s.global_constants.SCORM_FALSE,this.checkState(t,this._error_codes.TERMINATION_BEFORE_INIT,this._error_codes.MULTIPLE_TERMINATION)?(this.currentState=s.global_constants.STATE_TERMINATED,[4,this.storeData(!0)]):[3,2];case 1:void 0!==(n=i.sent()).errorCode&&n.errorCode>0&&this.throwSCORMError(n.errorCode),r=void 0!==n&&n.result?n.result:s.global_constants.SCORM_FALSE,t&&(this.lastErrorCode="0"),r=s.global_constants.SCORM_TRUE,this.processListeners(e),i.label=2;case 2:return this.apiLog(e,"returned: "+r,c.LogLevelEnum.INFO),this.clearSCORMError(r),[2,r]}}))}))},e.prototype.getValue=function(e,t,r){var i="";if(this.checkState(t,this._error_codes.RETRIEVE_BEFORE_INIT,this._error_codes.RETRIEVE_AFTER_TERM)){t&&(this.lastErrorCode="0");try{i=this.getCMIValue(r)}catch(e){i=this.handleValueAccessException(e,i)}this.processListeners(e,r)}return this.apiLog(e,": returned: "+i,c.LogLevelEnum.INFO,r),void 0===i?"":(this.clearSCORMError(i),i)},e.prototype.setValue=function(e,t,r,i,n){void 0!==n&&(n=String(n));var o=s.global_constants.SCORM_FALSE;if(this.checkState(r,this._error_codes.STORE_BEFORE_INIT,this._error_codes.STORE_AFTER_TERM)){r&&(this.lastErrorCode="0");try{o=this.setCMIValue(i,n)}catch(e){this.handleValueAccessException(e,o)}this.processListeners(e,i,n)}return void 0===o&&(o=s.global_constants.SCORM_FALSE),"0"===String(this.lastErrorCode)&&this.settings.autocommit&&this.scheduleCommit(1e3*this.settings.autocommitSeconds,t),this.apiLog(e,": "+n+": result: "+o,c.LogLevelEnum.INFO,i),this.clearSCORMError(o),o},e.prototype.commit=function(e){return(0,i.__awaiter)(this,arguments,void 0,(function(e,t){var r,n;return void 0===t&&(t=!1),(0,i.__generator)(this,(function(i){switch(i.label){case 0:return this.clearScheduledCommit(),r=s.global_constants.SCORM_FALSE,this.checkState(t,this._error_codes.COMMIT_BEFORE_INIT,this._error_codes.COMMIT_AFTER_TERM)?[4,this.storeData(!1)]:[3,2];case 1:(n=i.sent()).errorCode&&n.errorCode>0&&this.throwSCORMError(n.errorCode),r=void 0!==n&&n.result?n.result:s.global_constants.SCORM_FALSE,this.apiLog(e," Result: "+r,c.LogLevelEnum.DEBUG,"HttpRequest"),t&&(this.lastErrorCode="0"),this.processListeners(e),i.label=2;case 2:return this.apiLog(e,"returned: "+r,c.LogLevelEnum.INFO),this.clearSCORMError(r),[2,r]}}))}))},e.prototype.getLastError=function(e){var t=String(this.lastErrorCode);return this.processListeners(e),this.apiLog(e,"returned: "+t,c.LogLevelEnum.INFO),t},e.prototype.getErrorString=function(e,t){var r="";return null!==t&&""!==t&&(r=this.getLmsErrorMessageDetails(t),this.processListeners(e)),this.apiLog(e,"returned: "+r,c.LogLevelEnum.INFO),r},e.prototype.getDiagnostic=function(e,t){var r="";return null!==t&&""!==t&&(r=this.getLmsErrorMessageDetails(t,!0),this.processListeners(e)),this.apiLog(e,"returned: "+r,c.LogLevelEnum.INFO),r},e.prototype.checkState=function(e,t,r){return this.isNotInitialized()?(this.throwSCORMError(t),!1):!e||!this.isTerminated()||(this.throwSCORMError(r),!1)},e.prototype.getLmsErrorMessageDetails=function(e,t){throw void 0===t&&(t=!1),new Error("The getLmsErrorMessageDetails method has not been implemented")},e.prototype.getCMIValue=function(e){throw new Error("The getCMIValue method has not been implemented")},e.prototype.setCMIValue=function(e,t){throw new Error("The setCMIValue method has not been implemented")},e.prototype._commonSetCMIValue=function(e,t,r,o){if(!r||""===r)return s.global_constants.SCORM_FALSE;for(var l=r.split("."),u=this,_=s.global_constants.SCORM_FALSE,d=!1,h="The data model element passed to ".concat(e," (").concat(r,") is not a valid SCORM data model element."),m=t?this._error_codes.UNDEFINED_DATA_MODEL:this._error_codes.GENERAL,f=0;f<l.length;f++){var p=l[f];if(f===l.length-1)t&&"{target="===p.substring(0,8)?this.isInitialized()?this.throwSCORMError(this._error_codes.READ_ONLY_ELEMENT):u=(0,i.__assign)((0,i.__assign)({},u),{attribute:o}):this._checkObjectHasProperty(u,p)?((0,a.stringMatches)(r,"\\.correct_responses\\.\\d+")&&this.isInitialized()&&this.validateCorrectResponse(r,o),t&&"0"!==this.lastErrorCode||(u[p]=o,_=s.global_constants.SCORM_TRUE)):this.throwSCORMError(m,h);else{if(!(u=u[p])){this.throwSCORMError(m,h);break}if(u instanceof n.CMIArray){var g=parseInt(l[f+1],10);if(!isNaN(g)){var E=u.childArray[g];if(E)u=E,d=!0;else{var y=this.getChildElement(r,o,d);d=!0,y?(u.initialized&&y.initialize(),u.childArray.push(y),u=y):this.throwSCORMError(m,h)}f++}}}}return _===s.global_constants.SCORM_FALSE&&this.apiLog(e,"There was an error setting the value for: ".concat(r,", value of: ").concat(o),c.LogLevelEnum.WARN),_},e.prototype._commonGetCMIValue=function(e,t,r){if(!r||""===r)return"";for(var i=r.split("."),o=this,s=null,a="The data model element passed to ".concat(e," (").concat(r,") has not been initialized."),c="The data model element passed to ".concat(e," (").concat(r,") is not a valid SCORM data model element."),l=t?this._error_codes.UNDEFINED_DATA_MODEL:this._error_codes.GENERAL,u=0;u<i.length;u++){if(s=i[u],t){if("{target="===String(s).substring(0,8)&&"function"==typeof o._isTargetValid){var _=String(s).substring(8,String(s).length-9);return o._isTargetValid(_)}if(!this._checkObjectHasProperty(o,s))return void this.throwSCORMError(l,c)}else if(u===i.length-1&&!this._checkObjectHasProperty(o,s))return void this.throwSCORMError(l,c);if(void 0===(o=o[s])){this.throwSCORMError(l,c);break}if(o instanceof n.CMIArray){var d=parseInt(i[u+1],10);if(!isNaN(d)){var h=o.childArray[d];if(!h){this.throwSCORMError(this._error_codes.VALUE_NOT_INITIALIZED,a);break}o=h,u++}}}if(null!=o)return o;t||("_children"===s?this.throwSCORMError(this._error_codes.CHILDREN_ERROR):"_count"===s&&this.throwSCORMError(this._error_codes.COUNT_ERROR))},e.prototype.isInitialized=function(){return this.currentState===s.global_constants.STATE_INITIALIZED},e.prototype.isNotInitialized=function(){return this.currentState===s.global_constants.STATE_NOT_INITIALIZED},e.prototype.isTerminated=function(){return this.currentState===s.global_constants.STATE_TERMINATED},e.prototype.on=function(e,t){if(t)for(var r=e.split(" "),i=0;i<r.length;i++){var n=r[i].split(".");if(0===n.length)return;var o=n[0],s=null;n.length>1&&(s=e.replace(o+".","")),this.listenerArray.push({functionName:o,CMIElement:s,callback:t}),this.apiLog("on","Added event listener: ".concat(this.listenerArray.length),c.LogLevelEnum.INFO,o)}},e.prototype.off=function(e,t){if(t)for(var r=e.split(" "),i=function(i){var o=r[i].split(".");if(0===o.length)return{value:void 0};var s=o[0],a=null;o.length>1&&(a=e.replace(s+".",""));var l=n.listenerArray.findIndex((function(e){return e.functionName===s&&e.CMIElement===a&&e.callback===t}));-1!==l&&(n.listenerArray.splice(l,1),n.apiLog("off","Removed event listener: ".concat(n.listenerArray.length),c.LogLevelEnum.INFO,s))},n=this,o=0;o<r.length;o++){var s=i(o);if("object"==typeof s)return s.value}},e.prototype.clear=function(e){for(var t=e.split(" "),r=function(r){var n=t[r].split(".");if(0===n.length)return{value:void 0};var o=n[0],s=null;n.length>1&&(s=e.replace(o+".","")),i.listenerArray=i.listenerArray.filter((function(e){return e.functionName!==o&&e.CMIElement!==s}))},i=this,n=0;n<t.length;n++){var o=r(n);if("object"==typeof o)return o.value}},e.prototype.processListeners=function(e,t,r){this.apiLog(e,r,c.LogLevelEnum.INFO,t);for(var i=0;i<this.listenerArray.length;i++){var n,o=this.listenerArray[i],s=o.functionName===e,a=!!o.CMIElement;n=t&&o.CMIElement&&"*"===o.CMIElement.substring(o.CMIElement.length-1)?0===t.indexOf(o.CMIElement.substring(0,o.CMIElement.length-1)):o.CMIElement===t,!s||a&&!n||(this.apiLog("processListeners","Processing listener: ".concat(o.functionName),c.LogLevelEnum.INFO,t),o.callback(t,r))}},e.prototype.throwSCORMError=function(e,t){t||(t=this.getLmsErrorMessageDetails(e)),this.apiLog("throwSCORMError",e+": "+t,c.LogLevelEnum.ERROR),this.lastErrorCode=String(e)},e.prototype.clearSCORMError=function(e){void 0!==e&&e!==s.global_constants.SCORM_FALSE&&(this.lastErrorCode="0")},e.prototype.loadFromFlattenedJSON=function(e,t){var r=this;if(t||(t=""),this.isNotInitialized()){var i,n=/^(cmi\.interactions\.)(\d+)\.(.*)$/,o=/^(cmi\.objectives\.)(\d+)\.(.*)$/,s=Object.keys(e).map((function(t){return[String(t),e[t]]}));s.sort((function(e,t){var r,i=e[0],s=(e[1],t[0]);return t[1],null!==(r=c(i,s,n))||null!==(r=c(i,s,o))?r:i<s?-1:i>s?1:0})),s.forEach((function(e){(i={})[e[0]]=e[1],r.loadFromJSON((0,a.unflatten)(i),t)}))}else console.error("loadFromFlattenedJSON can only be called before the call to lmsInitialize.");function c(e,t,r){var i,n=e.match(r);if(null!==n&&null!==(i=t.match(r))){var o=Number(n[2]),s=Number(i[2]);return o===s?"id"===n[3]?-1:"type"===n[3]?"id"===i[3]?1:-1:1:o-s}return null}},e.prototype.loadFromJSON=function(e,t){if(void 0===t&&(t=""),this.isNotInitialized()){for(var r in t=void 0!==t?t:"cmi",this.startingData=e,e)if({}.hasOwnProperty.call(e,r)&&e[r]){var i=(t?t+".":"")+r,n=e[r];if(n.childArray)for(var o=0;o<n.childArray.length;o++)this.loadFromJSON(n.childArray[o],i+"."+o);else n.constructor===Object?this.loadFromJSON(n,i):this.setCMIValue(i,n)}}else console.error("loadFromJSON can only be called before the call to lmsInitialize.")},e.prototype.renderCMIToJSONString=function(){var e=this.cmi;return this.settings.sendFullCommit?JSON.stringify({cmi:e}):JSON.stringify({cmi:e},(function(e,t){return void 0===t?null:t}),2)},e.prototype.renderCMIToJSONObject=function(){return JSON.parse(this.renderCMIToJSONString())},e.prototype.processHttpRequest=function(e,t){return(0,i.__awaiter)(this,arguments,void 0,(function(e,t,r){var n,o,a,l=this;return void 0===r&&(r=!1),(0,i.__generator)(this,(function(u){switch(u.label){case 0:return n=this,o={result:s.global_constants.SCORM_FALSE,errorCode:this.error_codes.GENERAL},r?(this.performFetch(e,t).then((function(e){return(0,i.__awaiter)(l,void 0,void 0,(function(){return(0,i.__generator)(this,(function(t){switch(t.label){case 0:return[4,this.transformResponse(e)];case 1:return t.sent(),[2]}}))}))})),[2,{result:s.global_constants.SCORM_TRUE,errorCode:0}]):(a=function(e,t,r){return(0,i.__awaiter)(l,void 0,void 0,(function(){var s,a;return(0,i.__generator)(this,(function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),t=r.requestHandler(t),[4,this.performFetch(e,t)];case 1:return s=i.sent(),[2,this.transformResponse(s)];case 2:return a=i.sent(),this.apiLog("processHttpRequest",a,c.LogLevelEnum.ERROR),n.processListeners("CommitError"),[2,o];case 3:return[2]}}))}))},[4,a(e,t,this.settings)]);case 1:return[2,u.sent()]}}))}))},e.prototype.scheduleCommit=function(e,t){this._timeout||(this._timeout=new u(this,e,t),this.apiLog("scheduleCommit","scheduled",c.LogLevelEnum.DEBUG,""))},e.prototype.clearScheduledCommit=function(){this._timeout&&(this._timeout.cancel(),this._timeout=void 0,this.apiLog("clearScheduledCommit","cleared",c.LogLevelEnum.DEBUG,""))},e.prototype._checkObjectHasProperty=function(e,t){return Object.hasOwnProperty.call(e,t)||null!=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(e),t)||t in e},e.prototype.handleValueAccessException=function(e,t){return e instanceof o.ValidationError?(this.lastErrorCode=String(e.errorCode),t=s.global_constants.SCORM_FALSE):(e instanceof Error&&e.message?console.error(e.message):console.error(e),this.throwSCORMError(this._error_codes.GENERAL)),t},e.prototype.getCommitObject=function(e){var t=e||this.settings.alwaysSendTotalTime,r=this.settings.renderCommonCommitFields?this.renderCommitObject(t):this.renderCommitCMI(t);return[c.LogLevelEnum.DEBUG,"1",1,"DEBUG"].includes(this.apiLogLevel)&&(console.debug("Commit (terminated: "+(e?"yes":"no")+"): "),console.debug(r)),r},e.prototype.performFetch=function(e,t){return(0,i.__awaiter)(this,void 0,void 0,(function(){return(0,i.__generator)(this,(function(r){return[2,fetch(e,{method:"POST",mode:this.settings.fetchMode,body:t instanceof Array?t.join("&"):JSON.stringify(t),headers:(0,i.__assign)((0,i.__assign)({},this.settings.xhrHeaders),{"Content-Type":this.settings.commitRequestDataType}),credentials:this.settings.xhrWithCredentials?"include":void 0,keepalive:!0})]}))}))},e.prototype.transformResponse=function(e){return(0,i.__awaiter)(this,void 0,void 0,(function(){var t,r;return(0,i.__generator)(this,(function(i){switch(i.label){case 0:return"function"!=typeof this.settings.responseHandler?[3,2]:[4,this.settings.responseHandler(e)];case 1:return r=i.sent(),[3,4];case 2:return[4,e.json()];case 3:r=i.sent(),i.label=4;case 4:return t=r,e.status>=200&&e.status<=299&&(!0===t.result||t.result===s.global_constants.SCORM_TRUE)?this.processListeners("CommitSuccess"):this.processListeners("CommitError"),[2,t]}}))}))},e}(),d=_},941:function(e,t,r){r.r(t),r.d(t,{Scorm12Impl:function(){return m}});var i=r(635),n=r(989),o=r(864),s=r(340),a=r(797),c=r(176),l=r(833),u=r(331),_=r(56),d=r(429),h=r(417),m=function(e){function t(t){var r=this;return t&&void 0===t.mastery_override&&(t.mastery_override=!1),(r=e.call(this,a.scorm12_errors,t)||this).statusSetByModule=!1,r.cmi=new n.CMI,r.nav=new u.NAV,r.LMSInitialize=r.lmsInitialize,r.LMSFinish=r.lmsFinish,r.LMSGetValue=r.lmsGetValue,r.LMSSetValue=r.lmsSetValue,r.LMSCommit=r.lmsCommit,r.LMSGetLastError=r.lmsGetLastError,r.LMSGetErrorString=r.lmsGetErrorString,r.LMSGetDiagnostic=r.lmsGetDiagnostic,r}return(0,i.__extends)(t,e),t.prototype.reset=function(e){var t,r;this.commonReset(e),null===(t=this.cmi)||void 0===t||t.reset(),null===(r=this.nav)||void 0===r||r.reset()},t.prototype.lmsInitialize=function(){return this.cmi.initialize(),this.cmi.core.lesson_status?this.statusSetByModule=!0:this.cmi.core.lesson_status="not attempted",this.initialize("LMSInitialize","LMS was already initialized!","LMS is already finished!")},t.prototype.lmsFinish=function(){return(0,i.__awaiter)(this,void 0,void 0,(function(){return(0,i.__generator)(this,(function(e){switch(e.label){case 0:return[4,this.internalFinish()];case 1:return e.sent(),[2]}}))})),s.global_constants.SCORM_TRUE},t.prototype.internalFinish=function(){return(0,i.__awaiter)(this,void 0,void 0,(function(){var e;return(0,i.__generator)(this,(function(t){switch(t.label){case 0:return[4,this.terminate("LMSFinish",!0)];case 1:return(e=t.sent())===s.global_constants.SCORM_TRUE&&(""!==this.nav.event?"continue"===this.nav.event?this.processListeners("SequenceNext"):this.processListeners("SequencePrevious"):this.settings.autoProgress&&this.processListeners("SequenceNext")),[2,e]}}))}))},t.prototype.lmsGetValue=function(e){return this.getValue("LMSGetValue",!1,e)},t.prototype.lmsSetValue=function(e,t){return"cmi.core.lesson_status"===e&&(this.statusSetByModule=!0),this.setValue("LMSSetValue","LMSCommit",!1,e,t)},t.prototype.lmsCommit=function(){return this.settings.asyncCommit?this.scheduleCommit(500,"LMSCommit"):(0,i.__awaiter)(this,void 0,void 0,(function(){return(0,i.__generator)(this,(function(e){switch(e.label){case 0:return[4,this.commit("LMSCommit",!1)];case 1:return e.sent(),[2]}}))})),s.global_constants.SCORM_TRUE},t.prototype.lmsGetLastError=function(){return this.getLastError("LMSGetLastError")},t.prototype.lmsGetErrorString=function(e){return this.getErrorString("LMSGetErrorString",e)},t.prototype.lmsGetDiagnostic=function(e){return this.getDiagnostic("LMSGetDiagnostic",e)},t.prototype.setCMIValue=function(e,t){return this._commonSetCMIValue("LMSSetValue",!1,e,t)},t.prototype.getCMIValue=function(e){return this._commonGetCMIValue("getCMIValue",!1,e)},t.prototype.getChildElement=function(e,t,r){return(0,o.stringMatches)(e,"cmi\\.objectives\\.\\d+")?new c.CMIObjectivesObject:r&&(0,o.stringMatches)(e,"cmi\\.interactions\\.\\d+\\.correct_responses\\.\\d+")?new l.CMIInteractionsCorrectResponsesObject:r&&(0,o.stringMatches)(e,"cmi\\.interactions\\.\\d+\\.objectives\\.\\d+")?new l.CMIInteractionsObjectivesObject:!r&&(0,o.stringMatches)(e,"cmi\\.interactions\\.\\d+")?new l.CMIInteractionsObject:null},t.prototype.validateCorrectResponse=function(e,t){},t.prototype.getLmsErrorMessageDetails=function(e,t){var r="No Error",i="No Error";return e=String(e),s.scorm12_constants.error_descriptions[e]&&(r=s.scorm12_constants.error_descriptions[e].basicMessage,i=s.scorm12_constants.error_descriptions[e].detailMessage),t?i:r},t.prototype.replaceWithAnotherScormAPI=function(e){this.cmi=e.cmi},t.prototype.renderCommitCMI=function(e){var t=this.renderCMIToJSONObject();e&&(t.cmi.core.total_time=this.cmi.getCurrentTotalTime());var r=[],i=o.flatten(t);switch(this.settings.dataCommitFormat){case"flattened":return o.flatten(t);case"params":for(var n in i)({}).hasOwnProperty.call(i,n)&&r.push("".concat(n,"=").concat(i[n]));return r;default:return t}},t.prototype.renderCommitObject=function(e){var t=this.renderCommitCMI(e),r=this.cmi.getCurrentTotalTime(),i=o.getTimeAsSeconds(r,h.scorm12_regex.CMITimespan),n=this.cmi.core.lesson_status,s=_.CompletionStatus.unknown,a=_.SuccessStatus.unknown;n&&(s="completed"===n||"passed"===n?_.CompletionStatus.completed:_.CompletionStatus.incomplete,"passed"===n?a=_.SuccessStatus.passed:"failed"===n&&(a=_.SuccessStatus.failed));var c=this.cmi.core.score,l=null;c&&(l={},Number.isNaN(Number.parseFloat(c.raw))||(l.raw=Number.parseFloat(c.raw)),Number.isNaN(Number.parseFloat(c.min))||(l.min=Number.parseFloat(c.min)),Number.isNaN(Number.parseFloat(c.max))||(l.max=Number.parseFloat(c.max)));var u={successStatus:a,completionStatus:s,runtimeData:t,totalTimeSeconds:i};return l&&(u.score=l),u},t.prototype.storeData=function(e){return(0,i.__awaiter)(this,void 0,void 0,(function(){var t,r,n,o,a;return(0,i.__generator)(this,(function(i){switch(i.label){case 0:return e&&(t=this.cmi.core.lesson_status,this.cmi.core.lesson_status&&(this.statusSetByModule||"not attempted"!==this.cmi.core.lesson_status)||(this.cmi.core.lesson_status="completed"),"normal"===this.cmi.core.lesson_mode?"credit"===this.cmi.core.credit&&this.settings.mastery_override&&""!==this.cmi.student_data.mastery_score&&""!==this.cmi.core.score.raw&&(this.cmi.core.lesson_status=parseFloat(this.cmi.core.score.raw)>=parseFloat(this.cmi.student_data.mastery_score)?"passed":"failed"):"browse"===this.cmi.core.lesson_mode&&""===((null===(a=null===(o=null===(n=this.startingData)||void 0===n?void 0:n.cmi)||void 0===o?void 0:o.core)||void 0===a?void 0:a.lesson_status)||"")&&"not attempted"===t&&(this.cmi.core.lesson_status="browsed")),r=this.getCommitObject(e),"string"!=typeof this.settings.lmsCommitUrl?[3,2]:[4,this.processHttpRequest(this.settings.lmsCommitUrl,r,e)];case 1:return[2,i.sent()];case 2:return[2,{result:s.global_constants.SCORM_TRUE,errorCode:0}]}}))}))},t}(d.default)},809:function(e,t,r){r.r(t),r.d(t,{Scorm2004Impl:function(){return z}});var i=r(635),n=r(429),o=r(340),s=r(417),a=r(797),c=r(784),l=o.scorm2004_constants.error_descriptions,u=function(e){function t(t){return{}.hasOwnProperty.call(l,String(t))?e.call(this,t,l[String(t)].basicMessage,l[String(t)].detailMessage)||this:e.call(this,101,l[101].basicMessage,l[101].detailMessage)||this}return(0,i.__extends)(t,e),t}(c.ValidationError),_=r(864),d=r(319),h=r(449);function m(e,t,r){return(0,h.checkValidFormat)(e,t,a.scorm2004_errors.TYPE_MISMATCH,u,r)}function f(e,t){return(0,h.checkValidRange)(e,t,a.scorm2004_errors.VALUE_OUT_OF_RANGE,u)}var p=function(e){function t(){var t=e.call(this)||this;return t.__children=o.scorm2004_constants.student_preference_children,t._audio_level="1",t._language="",t._delivery_speed="1",t._audio_captioning="0",t}return(0,i.__extends)(t,e),t.prototype.reset=function(){this._initialized=!1},Object.defineProperty(t.prototype,"_children",{get:function(){return this.__children},set:function(e){throw new u(a.scorm2004_errors.READ_ONLY_ELEMENT)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"audio_level",{get:function(){return this._audio_level},set:function(e){m(e,s.scorm2004_regex.CMIDecimal)&&f(e,s.scorm2004_regex.audio_range)&&(this._audio_level=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"language",{get:function(){return this._language},set:function(e){m(e,s.scorm2004_regex.CMILang)&&(this._language=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"delivery_speed",{get:function(){return this._delivery_speed},set:function(e){m(e,s.scorm2004_regex.CMIDecimal)&&f(e,s.scorm2004_regex.speed_range)&&(this._delivery_speed=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"audio_captioning",{get:function(){return this._audio_captioning},set:function(e){m(e,s.scorm2004_regex.CMISInteger)&&f(e,s.scorm2004_regex.text_range)&&(this._audio_captioning=e)},enumerable:!1,configurable:!0}),t.prototype.toJSON=function(){this.jsonString=!0;var e={audio_level:this.audio_level,language:this.language,delivery_speed:this.delivery_speed,audio_captioning:this.audio_captioning};return delete this.jsonString,e},t}(d.BaseCMI),g=r(589),E={"true-false":{format:"^true$|^false$",max:1,delimiter:"",unique:!1},choice:{format:s.scorm2004_regex.CMILongIdentifier,max:36,delimiter:"[,]",unique:!0},"fill-in":{format:s.scorm2004_regex.CMILangString250,max:10,delimiter:"[,]",unique:!1},"long-fill-in":{format:s.scorm2004_regex.CMILangString4000,max:1,delimiter:"",unique:!1},matching:{format:s.scorm2004_regex.CMIShortIdentifier,format2:s.scorm2004_regex.CMIShortIdentifier,max:36,delimiter:"[,]",delimiter2:"[.]",unique:!1},performance:{format:"^$|"+s.scorm2004_regex.CMIShortIdentifier,format2:s.scorm2004_regex.CMIDecimal+"|^$|"+s.scorm2004_regex.CMIShortIdentifier,max:250,delimiter:"[,]",delimiter2:"[.]",unique:!1},sequencing:{format:s.scorm2004_regex.CMIShortIdentifier,max:36,delimiter:"[,]",unique:!1},likert:{format:s.scorm2004_regex.CMIShortIdentifier,max:1,delimiter:"",unique:!1},numeric:{format:s.scorm2004_regex.CMIDecimal,max:1,delimiter:"",unique:!1},other:{format:s.scorm2004_regex.CMIString4000,max:1,delimiter:"",unique:!1}},y={"true-false":{max:1,delimiter:"",unique:!1,duplicate:!1,format:"^true$|^false$",limit:1},choice:{max:36,delimiter:"[,]",unique:!0,duplicate:!1,format:s.scorm2004_regex.CMILongIdentifier},"fill-in":{max:10,delimiter:"[,]",unique:!1,duplicate:!1,format:s.scorm2004_regex.CMILangString250cr},"long-fill-in":{max:1,delimiter:"",unique:!1,duplicate:!0,format:s.scorm2004_regex.CMILangString4000},matching:{max:36,delimiter:"[,]",delimiter2:"[.]",unique:!1,duplicate:!1,format:s.scorm2004_regex.CMIShortIdentifier,format2:s.scorm2004_regex.CMIShortIdentifier},performance:{max:250,delimiter:"[,]",delimiter2:"[.]",delimiter3:"[:]",unique:!1,duplicate:!1,format:"^$|"+s.scorm2004_regex.CMIShortIdentifier,format2:s.scorm2004_regex.CMIDecimal+"|^$|"+s.scorm2004_regex.CMIShortIdentifier},sequencing:{max:36,delimiter:"[,]",unique:!1,duplicate:!1,format:s.scorm2004_regex.CMIShortIdentifier},likert:{max:1,delimiter:"",unique:!1,duplicate:!1,format:s.scorm2004_regex.CMIShortIdentifier,limit:1},numeric:{max:2,delimiter:"[:]",unique:!1,duplicate:!1,format:s.scorm2004_regex.CMIDecimal,limit:1},other:{max:1,delimiter:"",unique:!1,duplicate:!1,format:s.scorm2004_regex.CMIString4000,limit:1}},b=function(e){function t(){return e.call(this,{children:o.scorm2004_constants.interactions_children,errorCode:a.scorm2004_errors.READ_ONLY_ELEMENT,errorClass:u})||this}return(0,i.__extends)(t,e),t}(g.CMIArray),v=function(e){function t(){var t=e.call(this)||this;return t._id="",t._type="",t._timestamp="",t._weighting="",t._learner_response="",t._result="",t._latency="",t._description="",t.objectives=new g.CMIArray({errorCode:a.scorm2004_errors.READ_ONLY_ELEMENT,errorClass:u,children:o.scorm2004_constants.objectives_children}),t.correct_responses=new g.CMIArray({errorCode:a.scorm2004_errors.READ_ONLY_ELEMENT,errorClass:u,children:o.scorm2004_constants.correct_responses_children}),t}return(0,i.__extends)(t,e),t.prototype.initialize=function(){var t,r;e.prototype.initialize.call(this),null===(t=this.objectives)||void 0===t||t.initialize(),null===(r=this.correct_responses)||void 0===r||r.initialize()},t.prototype.reset=function(){this._initialized=!1,this._id="",this._type="",this._timestamp="",this._weighting="",this._learner_response="",this._result="",this._latency="",this._description="",this.objectives=new g.CMIArray({errorCode:a.scorm2004_errors.READ_ONLY_ELEMENT,errorClass:u,children:o.scorm2004_constants.objectives_children}),this.correct_responses=new g.CMIArray({errorCode:a.scorm2004_errors.READ_ONLY_ELEMENT,errorClass:u,children:o.scorm2004_constants.correct_responses_children})},Object.defineProperty(t.prototype,"id",{get:function(){return this._id},set:function(e){m(e,s.scorm2004_regex.CMILongIdentifier)&&(this._id=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"type",{get:function(){return this._type},set:function(e){if(this.initialized&&""===this._id)throw new u(a.scorm2004_errors.DEPENDENCY_NOT_ESTABLISHED);m(e,s.scorm2004_regex.CMIType)&&(this._type=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"timestamp",{get:function(){return this._timestamp},set:function(e){if(this.initialized&&""===this._id)throw new u(a.scorm2004_errors.DEPENDENCY_NOT_ESTABLISHED);m(e,s.scorm2004_regex.CMITime)&&(this._timestamp=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"weighting",{get:function(){return this._weighting},set:function(e){if(this.initialized&&""===this._id)throw new u(a.scorm2004_errors.DEPENDENCY_NOT_ESTABLISHED);m(e,s.scorm2004_regex.CMIDecimal)&&(this._weighting=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"learner_response",{get:function(){return this._learner_response},set:function(e){if(this.initialized&&(""===this._type||""===this._id))throw new u(a.scorm2004_errors.DEPENDENCY_NOT_ESTABLISHED);var t=[],r=E[this.type];if(!r)throw new u(a.scorm2004_errors.TYPE_MISMATCH);if((null==r?void 0:r.delimiter)?t=e.split(r.delimiter):t[0]=e,!(t.length>0&&t.length<=r.max))throw new u(a.scorm2004_errors.GENERAL_SET_FAILURE);for(var i=new RegExp(r.format),n=0;n<t.length;n++)if(null==r?void 0:r.delimiter2){var o=t[n].split(r.delimiter2);if(2!==o.length)throw new u(a.scorm2004_errors.TYPE_MISMATCH);if(!o[0].match(i))throw new u(a.scorm2004_errors.TYPE_MISMATCH);if(!r.format2||!o[1].match(new RegExp(r.format2)))throw new u(a.scorm2004_errors.TYPE_MISMATCH)}else{if(!t[n].match(i))throw new u(a.scorm2004_errors.TYPE_MISMATCH);if(""!==t[n]&&r.unique)for(var s=0;s<n;s++)if(t[n]===t[s])throw new u(a.scorm2004_errors.TYPE_MISMATCH)}this._learner_response=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"result",{get:function(){return this._result},set:function(e){m(e,s.scorm2004_regex.CMIResult)&&(this._result=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"latency",{get:function(){return this._latency},set:function(e){if(this.initialized&&""===this._id)throw new u(a.scorm2004_errors.DEPENDENCY_NOT_ESTABLISHED);m(e,s.scorm2004_regex.CMITimespan)&&(this._latency=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"description",{get:function(){return this._description},set:function(e){if(this.initialized&&""===this._id)throw new u(a.scorm2004_errors.DEPENDENCY_NOT_ESTABLISHED);m(e,s.scorm2004_regex.CMILangString250,!0)&&(this._description=e)},enumerable:!1,configurable:!0}),t.prototype.toJSON=function(){this.jsonString=!0;var e={id:this.id,type:this.type,objectives:this.objectives,timestamp:this.timestamp,weighting:this.weighting,learner_response:this.learner_response,result:this.result,latency:this.latency,description:this.description,correct_responses:this.correct_responses};return delete this.jsonString,e},t}(d.BaseCMI),M=function(e){function t(){var t=e.call(this)||this;return t._id="",t}return(0,i.__extends)(t,e),t.prototype.reset=function(){this._initialized=!1,this._id=""},Object.defineProperty(t.prototype,"id",{get:function(){return this._id},set:function(e){m(e,s.scorm2004_regex.CMILongIdentifier)&&(this._id=e)},enumerable:!1,configurable:!0}),t.prototype.toJSON=function(){this.jsonString=!0;var e={id:this.id};return delete this.jsonString,e},t}(d.BaseCMI),S=function(e){function t(){var t=e.call(this)||this;return t._pattern="",t}return(0,i.__extends)(t,e),t.prototype.reset=function(){this._initialized=!1,this._pattern=""},Object.defineProperty(t.prototype,"pattern",{get:function(){return this._pattern},set:function(e){m(e,s.scorm2004_regex.CMIFeedback)&&(this._pattern=e)},enumerable:!1,configurable:!0}),t.prototype.toJSON=function(){this.jsonString=!0;var e={pattern:this.pattern};return delete this.jsonString,e},t}(d.BaseCMI),I=function(e){function t(){var t=e.call(this,{score_children:o.scorm2004_constants.score_children,max:"",invalidErrorCode:a.scorm2004_errors.READ_ONLY_ELEMENT,invalidTypeCode:a.scorm2004_errors.TYPE_MISMATCH,invalidRangeCode:a.scorm2004_errors.VALUE_OUT_OF_RANGE,decimalRegex:s.scorm2004_regex.CMIDecimal,errorClass:u})||this;return t._scaled="",t}return(0,i.__extends)(t,e),t.prototype.reset=function(){this._initialized=!1,this._scaled="",this._raw="",this._min="",this._max=""},Object.defineProperty(t.prototype,"scaled",{get:function(){return this._scaled},set:function(e){m(e,s.scorm2004_regex.CMIDecimal)&&f(e,s.scorm2004_regex.scaled_range)&&(this._scaled=e)},enumerable:!1,configurable:!0}),t.prototype.toJSON=function(){this.jsonString=!0;var e={scaled:this.scaled,raw:this.raw,min:this.min,max:this.max};return delete this.jsonString,e},t}(r(434).CMIScore),C=function(e){function t(){return e.call(this,{children:o.scorm2004_constants.comments_children,errorCode:a.scorm2004_errors.READ_ONLY_ELEMENT,errorClass:u})||this}return(0,i.__extends)(t,e),t}(g.CMIArray),O=function(e){function t(){return e.call(this,{children:o.scorm2004_constants.comments_children,errorCode:a.scorm2004_errors.READ_ONLY_ELEMENT,errorClass:u})||this}return(0,i.__extends)(t,e),t}(g.CMIArray),w=function(e){function t(t){void 0===t&&(t=!1);var r=e.call(this)||this;return r._comment="",r._location="",r._timestamp="",r._comment="",r._location="",r._timestamp="",r._readOnlyAfterInit=t,r}return(0,i.__extends)(t,e),t.prototype.reset=function(){this._initialized=!1},Object.defineProperty(t.prototype,"comment",{get:function(){return this._comment},set:function(e){if(this.initialized&&this._readOnlyAfterInit)throw new u(a.scorm2004_errors.READ_ONLY_ELEMENT);m(e,s.scorm2004_regex.CMILangString4000,!0)&&(this._comment=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"location",{get:function(){return this._location},set:function(e){if(this.initialized&&this._readOnlyAfterInit)throw new u(a.scorm2004_errors.READ_ONLY_ELEMENT);m(e,s.scorm2004_regex.CMIString250)&&(this._location=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"timestamp",{get:function(){return this._timestamp},set:function(e){if(this.initialized&&this._readOnlyAfterInit)throw new u(a.scorm2004_errors.READ_ONLY_ELEMENT);m(e,s.scorm2004_regex.CMITime)&&(this._timestamp=e)},enumerable:!1,configurable:!0}),t.prototype.toJSON=function(){this.jsonString=!0;var e={comment:this.comment,location:this.location,timestamp:this.timestamp};return delete this.jsonString,e},t}(d.BaseCMI),T=function(e){function t(){return e.call(this,{children:o.scorm2004_constants.objectives_children,errorCode:a.scorm2004_errors.READ_ONLY_ELEMENT,errorClass:u})||this}return(0,i.__extends)(t,e),t.prototype.findObjectiveById=function(e){return this.childArray.find((function(t){return t.id===e}))},t.prototype.findObjectiveByIndex=function(e){return this.childArray[e]},t.prototype.setObjectiveByIndex=function(e,t){this.childArray[e]=t},t}(g.CMIArray),N=function(e){function t(){var t=e.call(this)||this;return t._id="",t._success_status="unknown",t._completion_status="unknown",t._progress_measure="",t._description="",t.score=new I,t}return(0,i.__extends)(t,e),t.prototype.reset=function(){this._initialized=!1},t.prototype.initialize=function(){var t;e.prototype.initialize.call(this),null===(t=this.score)||void 0===t||t.initialize()},Object.defineProperty(t.prototype,"id",{get:function(){return this._id},set:function(e){m(e,s.scorm2004_regex.CMILongIdentifier)&&(this._id=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"success_status",{get:function(){return this._success_status},set:function(e){if(this.initialized&&""===this._id)throw new u(a.scorm2004_errors.DEPENDENCY_NOT_ESTABLISHED);m(e,s.scorm2004_regex.CMISStatus)&&(this._success_status=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"completion_status",{get:function(){return this._completion_status},set:function(e){if(this.initialized&&""===this._id)throw new u(a.scorm2004_errors.DEPENDENCY_NOT_ESTABLISHED);m(e,s.scorm2004_regex.CMICStatus)&&(this._completion_status=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"progress_measure",{get:function(){return this._progress_measure},set:function(e){if(this.initialized&&""===this._id)throw new u(a.scorm2004_errors.DEPENDENCY_NOT_ESTABLISHED);m(e,s.scorm2004_regex.CMIDecimal)&&f(e,s.scorm2004_regex.progress_range)&&(this._progress_measure=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"description",{get:function(){return this._description},set:function(e){if(this.initialized&&""===this._id)throw new u(a.scorm2004_errors.DEPENDENCY_NOT_ESTABLISHED);m(e,s.scorm2004_regex.CMILangString250,!0)&&(this._description=e)},enumerable:!1,configurable:!0}),t.prototype.toJSON=function(){this.jsonString=!0;var e={id:this.id,success_status:this.success_status,completion_status:this.completion_status,progress_measure:this.progress_measure,description:this.description,score:this.score};return delete this.jsonString,e},t}(d.BaseCMI),L=function(e){function t(t){void 0===t&&(t=!1);var r=e.call(this)||this;return r.__version="1.0",r.__children=o.scorm2004_constants.cmi_children,r._completion_status="unknown",r._completion_threshold="",r._credit="credit",r._entry="",r._exit="",r._launch_data="",r._learner_id="",r._learner_name="",r._location="",r._max_time_allowed="",r._mode="normal",r._progress_measure="",r._scaled_passing_score="",r._session_time="PT0H0M0S",r._success_status="unknown",r._suspend_data="",r._time_limit_action="continue,no message",r._total_time="",r.learner_preference=new p,r.score=new I,r.comments_from_learner=new O,r.comments_from_lms=new C,r.interactions=new b,r.objectives=new T,t&&r.initialize(),r}return(0,i.__extends)(t,e),t.prototype.initialize=function(){var t,r,i,n,o,s;e.prototype.initialize.call(this),null===(t=this.learner_preference)||void 0===t||t.initialize(),null===(r=this.score)||void 0===r||r.initialize(),null===(i=this.comments_from_learner)||void 0===i||i.initialize(),null===(n=this.comments_from_lms)||void 0===n||n.initialize(),null===(o=this.interactions)||void 0===o||o.initialize(),null===(s=this.objectives)||void 0===s||s.initialize()},t.prototype.reset=function(){var e,t,r,i,n,o;this._initialized=!1,this._completion_status="incomplete",this._exit="",this._session_time="PT0H0M0S",this._progress_measure="",this._location="",null===(e=this.objectives)||void 0===e||e.reset(!1),null===(t=this.interactions)||void 0===t||t.reset(!0),null===(r=this.score)||void 0===r||r.reset(),null===(i=this.comments_from_learner)||void 0===i||i.reset(),null===(n=this.comments_from_lms)||void 0===n||n.reset(),null===(o=this.learner_preference)||void 0===o||o.reset()},Object.defineProperty(t.prototype,"_version",{get:function(){return this.__version},set:function(e){throw new u(a.scorm2004_errors.READ_ONLY_ELEMENT)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"_children",{get:function(){return this.__children},set:function(e){throw new u(a.scorm2004_errors.READ_ONLY_ELEMENT)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"completion_status",{get:function(){return this._completion_status},set:function(e){m(e,s.scorm2004_regex.CMICStatus)&&(this._completion_status=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"completion_threshold",{get:function(){return this._completion_threshold},set:function(e){if(this.initialized)throw new u(a.scorm2004_errors.READ_ONLY_ELEMENT);this._completion_threshold=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"credit",{get:function(){return this._credit},set:function(e){if(this.initialized)throw new u(a.scorm2004_errors.READ_ONLY_ELEMENT);this._credit=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"entry",{get:function(){return this._entry},set:function(e){if(this.initialized)throw new u(a.scorm2004_errors.READ_ONLY_ELEMENT);this._entry=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"exit",{get:function(){if(!this.jsonString)throw new u(a.scorm2004_errors.WRITE_ONLY_ELEMENT);return this._exit},set:function(e){m(e,s.scorm2004_regex.CMIExit,!0)&&(this._exit=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"launch_data",{get:function(){return this._launch_data},set:function(e){if(this.initialized)throw new u(a.scorm2004_errors.READ_ONLY_ELEMENT);this._launch_data=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"learner_id",{get:function(){return this._learner_id},set:function(e){if(this.initialized)throw new u(a.scorm2004_errors.READ_ONLY_ELEMENT);this._learner_id=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"learner_name",{get:function(){return this._learner_name},set:function(e){if(this.initialized)throw new u(a.scorm2004_errors.READ_ONLY_ELEMENT);this._learner_name=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"location",{get:function(){return this._location},set:function(e){m(e,s.scorm2004_regex.CMIString1000)&&(this._location=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"max_time_allowed",{get:function(){return this._max_time_allowed},set:function(e){if(this.initialized)throw new u(a.scorm2004_errors.READ_ONLY_ELEMENT);this._max_time_allowed=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"mode",{get:function(){return this._mode},set:function(e){if(this.initialized)throw new u(a.scorm2004_errors.READ_ONLY_ELEMENT);this._mode=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"progress_measure",{get:function(){return this._progress_measure},set:function(e){m(e,s.scorm2004_regex.CMIDecimal)&&f(e,s.scorm2004_regex.progress_range)&&(this._progress_measure=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"scaled_passing_score",{get:function(){return this._scaled_passing_score},set:function(e){if(this.initialized)throw new u(a.scorm2004_errors.READ_ONLY_ELEMENT);this._scaled_passing_score=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"session_time",{get:function(){if(!this.jsonString)throw new u(a.scorm2004_errors.WRITE_ONLY_ELEMENT);return this._session_time},set:function(e){m(e,s.scorm2004_regex.CMITimespan)&&(this._session_time=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"success_status",{get:function(){return this._success_status},set:function(e){m(e,s.scorm2004_regex.CMISStatus)&&(this._success_status=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"suspend_data",{get:function(){return this._suspend_data},set:function(e){m(e,s.scorm2004_regex.CMIString64000,!0)&&(this._suspend_data=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"time_limit_action",{get:function(){return this._time_limit_action},set:function(e){if(this.initialized)throw new u(a.scorm2004_errors.READ_ONLY_ELEMENT);this._time_limit_action=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"total_time",{get:function(){return this._total_time},set:function(e){if(this.initialized)throw new u(a.scorm2004_errors.READ_ONLY_ELEMENT);this._total_time=e},enumerable:!1,configurable:!0}),t.prototype.getCurrentTotalTime=function(){var e=this._session_time,t=this.start_time;if(null!=t){var r=(new Date).getTime()-t;e=_.getSecondsAsISODuration(r/1e3)}return _.addTwoDurations(this._total_time,e,s.scorm2004_regex.CMITimespan)},t.prototype.toJSON=function(){this.jsonString=!0;var e={comments_from_learner:this.comments_from_learner,comments_from_lms:this.comments_from_lms,completion_status:this.completion_status,completion_threshold:this.completion_threshold,credit:this.credit,entry:this.entry,exit:this.exit,interactions:this.interactions,launch_data:this.launch_data,learner_id:this.learner_id,learner_name:this.learner_name,learner_preference:this.learner_preference,location:this.location,max_time_allowed:this.max_time_allowed,mode:this.mode,objectives:this.objectives,progress_measure:this.progress_measure,scaled_passing_score:this.scaled_passing_score,score:this.score,session_time:this.session_time,success_status:this.success_status,suspend_data:this.suspend_data,time_limit_action:this.time_limit_action};return delete this.jsonString,e},t}(d.BaseRootCMI),A=["aa","ab","ae","af","ak","am","an","ar","as","av","ay","az","ba","be","bg","bh","bi","bm","bn","bo","br","bs","ca","ce","ch","co","cr","cs","cu","cv","cy","da","de","dv","dz","ee","el","en","eo","es","et","eu","fa","ff","fi","fj","fo","fr","fy","ga","gd","gl","gn","gu","gv","ha","he","hi","ho","hr","ht","hu","hy","hz","ia","id","ie","ig","ii","ik","io","is","it","iu","ja","jv","ka","kg","ki","kj","kk","kl","km","kn","ko","kr","ks","ku","kv","kw","ky","la","lb","lg","li","ln","lo","lt","lu","lv","mg","mh","mi","mk","ml","mn","mo","mr","ms","mt","my","na","nb","nd","ne","ng","nl","nn","no","nr","nv","ny","oc","oj","om","or","os","pa","pi","pl","ps","pt","qu","rm","rn","ro","ru","rw","sa","sc","sd","se","sg","sh","si","sk","sl","sm","sn","so","sq","sr","ss","st","su","sv","sw","ta","te","tg","th","ti","tk","tl","tn","to","tr","ts","tt","tw","ty","ug","uk","ur","uz","ve","vi","vo","wa","wo","xh","yi","yo","za","zh","zu","aar","abk","ave","afr","aka","amh","arg","ara","asm","ava","aym","aze","bak","bel","bul","bih","bis","bam","ben","tib","bod","bre","bos","cat","che","cha","cos","cre","cze","ces","chu","chv","wel","cym","dan","ger","deu","div","dzo","ewe","gre","ell","eng","epo","spa","est","baq","eus","per","fas","ful","fin","fij","fao","fre","fra","fry","gle","gla","glg","grn","guj","glv","hau","heb","hin","hmo","hrv","hat","hun","arm","hye","her","ina","ind","ile","ibo","iii","ipk","ido","ice","isl","ita","iku","jpn","jav","geo","kat","kon","kik","kua","kaz","kal","khm","kan","kor","kau","kas","kur","kom","cor","kir","lat","ltz","lug","lim","lin","lao","lit","lub","lav","mlg","mah","mao","mri","mac","mkd","mal","mon","mol","mar","may","msa","mlt","bur","mya","nau","nob","nde","nep","ndo","dut","nld","nno","nor","nbl","nav","nya","oci","oji","orm","ori","oss","pan","pli","pol","pus","por","que","roh","run","rum","ron","rus","kin","san","srd","snd","sme","sag","slo","sin","slk","slv","smo","sna","som","alb","sqi","srp","ssw","sot","sun","swe","swa","tam","tel","tgk","tha","tir","tuk","tgl","tsn","ton","tur","tso","tat","twi","tah","uig","ukr","urd","uzb","ven","vie","vol","wln","wol","xho","yid","yor","zha","chi","zho","zul"],R=r(56),x=function(e){function t(){var t=e.call(this)||this;return t.data=new D,t.nav=new j,t.data=new D,t}return(0,i.__extends)(t,e),t.prototype.initialize=function(){var t;e.prototype.initialize.call(this),null===(t=this.nav)||void 0===t||t.initialize()},t.prototype.reset=function(){var e;this._initialized=!1,null===(e=this.nav)||void 0===e||e.reset()},t.prototype.toJSON=function(){this.jsonString=!0;var e={nav:this.nav,data:this.data};return delete this.jsonString,e},t}(d.BaseCMI),j=function(e){function t(){var t=e.call(this)||this;return t._request="_none_",t.request_valid=new V,t}return(0,i.__extends)(t,e),t.prototype.initialize=function(){var t;e.prototype.initialize.call(this),null===(t=this.request_valid)||void 0===t||t.initialize()},t.prototype.reset=function(){var e;this._initialized=!1,this._request="_none_",null===(e=this.request_valid)||void 0===e||e.reset()},Object.defineProperty(t.prototype,"request",{get:function(){return this._request},set:function(e){m(e,s.scorm2004_regex.NAVEvent)&&(this._request=e)},enumerable:!1,configurable:!0}),t.prototype.toJSON=function(){this.jsonString=!0;var e={request:this.request};return delete this.jsonString,e},t}(d.BaseCMI),D=function(e){function t(){return e.call(this,{children:o.scorm2004_constants.adl_data_children,errorCode:a.scorm2004_errors.READ_ONLY_ELEMENT,errorClass:u})||this}return(0,i.__extends)(t,e),t}(g.CMIArray),P=function(e){function t(){var t=e.call(this)||this;return t._id="",t._store="",t}return(0,i.__extends)(t,e),t.prototype.reset=function(){this._initialized=!1},Object.defineProperty(t.prototype,"id",{get:function(){return this._id},set:function(e){m(e,s.scorm2004_regex.CMILongIdentifier)&&(this._id=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"store",{get:function(){return this._store},set:function(e){m(e,s.scorm2004_regex.CMILangString4000)&&(this._store=e)},enumerable:!1,configurable:!0}),t.prototype.toJSON=function(){this.jsonString=!0;var e={id:this._id,store:this._store};return delete this.jsonString,e},t}(d.BaseCMI),V=function(e){function t(){var t=e.call(this)||this;return t._continue="unknown",t._previous="unknown",t._choice={},t._jump={},t}return(0,i.__extends)(t,e),t.prototype.reset=function(){this._initialized=!1,this._continue="unknown",this._previous="unknown"},Object.defineProperty(t.prototype,"continue",{get:function(){return this._continue},set:function(e){if(this.initialized)throw new u(a.scorm2004_errors.READ_ONLY_ELEMENT);m(e,s.scorm2004_regex.NAVBoolean)&&(this._continue=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"previous",{get:function(){return this._previous},set:function(e){if(this.initialized)throw new u(a.scorm2004_errors.READ_ONLY_ELEMENT);m(e,s.scorm2004_regex.NAVBoolean)&&(this._previous=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"choice",{get:function(){return this._choice},set:function(e){if(this.initialized)throw new u(a.scorm2004_errors.READ_ONLY_ELEMENT);if("object"!=typeof e)throw new u(a.scorm2004_errors.TYPE_MISMATCH);for(var t in e)({}).hasOwnProperty.call(e,t)&&m(e[t],s.scorm2004_regex.NAVBoolean)&&m(t,s.scorm2004_regex.NAVTarget)&&(this._choice[t]=R.NAVBoolean[e[t]])},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"jump",{get:function(){return this._jump},set:function(e){if(this.initialized)throw new u(a.scorm2004_errors.READ_ONLY_ELEMENT);if("object"!=typeof e)throw new u(a.scorm2004_errors.TYPE_MISMATCH);for(var t in e)({}).hasOwnProperty.call(e,t)&&m(e[t],s.scorm2004_regex.NAVBoolean)&&m(t,s.scorm2004_regex.NAVTarget)&&(this._jump[t]=R.NAVBoolean[e[t]])},enumerable:!1,configurable:!0}),t.prototype.toJSON=function(){this.jsonString=!0;var e={previous:this._previous,continue:this._continue,choice:this._choice,jump:this._jump};return delete this.jsonString,e},t}(d.BaseCMI),z=function(e){function t(t){var r=this;return t&&void 0===t.mastery_override&&(t.mastery_override=!1),(r=e.call(this,a.scorm2004_errors,t)||this)._version="1.0",r._globalObjectives=[],r.cmi=new L,r.adl=new x,r.Initialize=r.lmsInitialize,r.Terminate=r.lmsFinish,r.GetValue=r.lmsGetValue,r.SetValue=r.lmsSetValue,r.Commit=r.lmsCommit,r.GetLastError=r.lmsGetLastError,r.GetErrorString=r.lmsGetErrorString,r.GetDiagnostic=r.lmsGetDiagnostic,r}return(0,i.__extends)(t,e),t.prototype.reset=function(e){var t,r;this.commonReset(e),null===(t=this.cmi)||void 0===t||t.reset(),null===(r=this.adl)||void 0===r||r.reset()},Object.defineProperty(t.prototype,"version",{get:function(){return this._version},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"globalObjectives",{get:function(){return this._globalObjectives},enumerable:!1,configurable:!0}),t.prototype.lmsInitialize=function(){return this.cmi.initialize(),this.initialize("Initialize")},t.prototype.lmsFinish=function(){return(0,i.__awaiter)(this,void 0,void 0,(function(){return(0,i.__generator)(this,(function(e){switch(e.label){case 0:return[4,this.internalFinish()];case 1:return e.sent(),[2]}}))})),o.global_constants.SCORM_TRUE},t.prototype.internalFinish=function(){return(0,i.__awaiter)(this,void 0,void 0,(function(){var e,t,r,n,a,c,l,u,_,d,h;return(0,i.__generator)(this,(function(i){switch(i.label){case 0:return[4,this.terminate("Terminate",!0)];case 1:return(e=i.sent())===o.global_constants.SCORM_TRUE&&("_none_"!==this.adl.nav.request?(t={continue:"SequenceNext",previous:"SequencePrevious",choice:"SequenceChoice",jump:"SequenceJump",exit:"SequenceExit",exitAll:"SequenceExitAll",abandon:"SequenceAbandon",abandonAll:"SequenceAbandonAll"},r=this.adl.nav.request,n=new RegExp(s.scorm2004_regex.NAVEvent),a=r.match(n),c="",a&&((null===(u=a.groups)||void 0===u?void 0:u.choice_target)?(c=null===(_=a.groups)||void 0===_?void 0:_.choice_target,r="choice"):(null===(d=a.groups)||void 0===d?void 0:d.jump_target)&&(c=null===(h=a.groups)||void 0===h?void 0:h.jump_target,r="jump")),(l=t[r])&&this.processListeners(l,"adl.nav.request",c)):this.settings.autoProgress&&this.processListeners("SequenceNext")),[2,e]}}))}))},t.prototype.lmsGetValue=function(e){var t="^adl\\.nav\\.request_valid\\.(choice|jump)\\.{target=\\S{0,}([a-zA-Z0-9-_]+)}$";if((0,_.stringMatches)(e,t)){var r=e.match(t),i=r[1],n=r[2].replace("{target=","").replace("}","");if("choice"===i||"jump"===i)return this.settings.scoItemIdValidator?String(this.settings.scoItemIdValidator(n)):String(this.settings.scoItemIds.includes(n))}return this.getValue("GetValue",!0,e)},t.prototype.lmsSetValue=function(e,t){return this.setValue("SetValue","Commit",!0,e,t)},t.prototype.lmsCommit=function(){return this.settings.asyncCommit?this.scheduleCommit(500,"LMSCommit"):(0,i.__awaiter)(this,void 0,void 0,(function(){return(0,i.__generator)(this,(function(e){switch(e.label){case 0:return[4,this.commit("LMSCommit",!1)];case 1:return e.sent(),[2]}}))})),o.global_constants.SCORM_TRUE},t.prototype.lmsGetLastError=function(){return this.getLastError("GetLastError")},t.prototype.lmsGetErrorString=function(e){return this.getErrorString("GetErrorString",e)},t.prototype.lmsGetDiagnostic=function(e){return this.getDiagnostic("GetDiagnostic",e)},t.prototype.setCMIValue=function(e,t){if((0,_.stringMatches)(e,"cmi\\.objectives\\.\\d+")){var r,i=e.split("."),n=Number(i[2]),o="cmi.objectives.".concat(n);if((0,_.stringMatches)(e,"cmi\\.objectives\\.\\d+\\.id"))r=t;else{var s=this.cmi.objectives.findObjectiveByIndex(n);r=s?s.id:void 0}if(r&&this.settings.globalObjectiveIds.includes(r)){var a=this._globalObjectives.findIndex((function(e){return e.id===r}));if(-1===a){a=this._globalObjectives.length;var c=new N;c.id=r,this._globalObjectives.push(c)}var l=e.replace(o,"_globalObjectives.".concat(a));this._commonSetCMIValue("SetGlobalObjectiveValue",!0,l,t)}}return this._commonSetCMIValue("SetValue",!0,e,t)},t.prototype.getChildElement=function(e,t,r){if((0,_.stringMatches)(e,"cmi\\.objectives\\.\\d+"))return new N;if(r){if((0,_.stringMatches)(e,"cmi\\.interactions\\.\\d+\\.correct_responses\\.\\d+"))return this.createCorrectResponsesObject(e,t);if((0,_.stringMatches)(e,"cmi\\.interactions\\.\\d+\\.objectives\\.\\d+"))return new M}else if((0,_.stringMatches)(e,"cmi\\.interactions\\.\\d+"))return new v;return(0,_.stringMatches)(e,"cmi\\.comments_from_learner\\.\\d+")?new w:(0,_.stringMatches)(e,"cmi\\.comments_from_lms\\.\\d+")?new w(!0):(0,_.stringMatches)(e,"adl\\.data\\.\\d+")?new P:null},t.prototype.createCorrectResponsesObject=function(e,t){var r=e.split("."),i=Number(r[2]),n=this.cmi.interactions.childArray[i];if(this.isInitialized())if(n.type){this.checkDuplicateChoiceResponse(n,t);var o=y[n.type];o?this.checkValidResponseType(o,t,n.type):this.throwSCORMError(a.scorm2004_errors.GENERAL_SET_FAILURE,"Incorrect Response Type: "+n.type)}else this.throwSCORMError(a.scorm2004_errors.DEPENDENCY_NOT_ESTABLISHED);return"0"===this.lastErrorCode?new S:null},t.prototype.checkValidResponseType=function(e,t,r){var i=[];(null==e?void 0:e.delimiter)?i=String(t).split(e.delimiter):i[0]=t,i.length>0&&i.length<=e.max?this.checkCorrectResponseValue(r,i,t):i.length>e.max&&this.throwSCORMError(a.scorm2004_errors.GENERAL_SET_FAILURE,"Data Model Element Pattern Too Long")},t.prototype.checkDuplicateChoiceResponse=function(e,t){var r=e.correct_responses._count;if("choice"===e.type)for(var i=0;i<r&&"0"===this.lastErrorCode;i++)e.correct_responses.childArray[i].pattern===t&&this.throwSCORMError(a.scorm2004_errors.GENERAL_SET_FAILURE)},t.prototype.validateCorrectResponse=function(e,t){var r=e.split("."),i=Number(r[2]),n=Number(r[4]),o=this.cmi.interactions.childArray[i],s=o.correct_responses._count;this.checkDuplicateChoiceResponse(o,t);var c=y[o.type];void 0===c.limit||s<=c.limit?(this.checkValidResponseType(c,t,o.type),"0"===this.lastErrorCode&&(!c.duplicate||!this.checkDuplicatedPattern(o.correct_responses,n,t))||"0"===this.lastErrorCode&&""===t||"0"===this.lastErrorCode&&this.throwSCORMError(a.scorm2004_errors.GENERAL_SET_FAILURE,"Data Model Element Pattern Already Exists")):this.throwSCORMError(a.scorm2004_errors.GENERAL_SET_FAILURE,"Data Model Element Collection Limit Reached")},t.prototype.getCMIValue=function(e){return this._commonGetCMIValue("GetValue",!0,e)},t.prototype.getLmsErrorMessageDetails=function(e,t){var r="",i="";return e=String(e),o.scorm2004_constants.error_descriptions[e]&&(r=o.scorm2004_constants.error_descriptions[e].basicMessage,i=o.scorm2004_constants.error_descriptions[e].detailMessage),t?i:r},t.prototype.checkDuplicatedPattern=function(e,t,r){for(var i=!1,n=e._count,o=0;o<n&&!i;o++)o!==t&&e.childArray[o]===r&&(i=!0);return i},t.prototype.checkCorrectResponseValue=function(e,t,r){for(var i=y[e],n=new RegExp(i.format),o=0;o<t.length&&"0"===this.lastErrorCode;o++)if(e.match("^(fill-in|long-fill-in|matching|performance|sequencing)$")&&(t[o]=this.removeCorrectResponsePrefixes(t[o])),null==i?void 0:i.delimiter2){var s=t[o].split(i.delimiter2);2===s.length&&(c=s[0].match(n))&&i.format2&&s[1].match(new RegExp(i.format2))||this.throwSCORMError(a.scorm2004_errors.TYPE_MISMATCH)}else{var c;if(!(c=t[o].match(n))&&""!==r||!c&&"true-false"===e)this.throwSCORMError(a.scorm2004_errors.TYPE_MISMATCH);else if("numeric"===e&&t.length>1)Number(t[0])>Number(t[1])&&this.throwSCORMError(a.scorm2004_errors.TYPE_MISMATCH);else if(""!==t[o]&&i.unique)for(var l=0;l<o&&"0"===this.lastErrorCode;l++)t[o]===t[l]&&this.throwSCORMError(a.scorm2004_errors.TYPE_MISMATCH)}},t.prototype.removeCorrectResponsePrefixes=function(e){for(var t=!1,r=!1,i=!1,n=new RegExp("^({(lang|case_matters|order_matters)=([^}]+)})"),o=e.match(n),c=null;o;){switch(o[2]){case"lang":if(c=e.match(s.scorm2004_regex.CMILangcr)){var l=c[3];void 0!==l&&l.length>0&&(A.includes(l.toLowerCase())||this.throwSCORMError(a.scorm2004_errors.TYPE_MISMATCH))}i=!0;break;case"case_matters":i||t||r||"true"!==o[3]&&"false"!==o[3]&&this.throwSCORMError(a.scorm2004_errors.TYPE_MISMATCH),r=!0;break;case"order_matters":r||i||t||"true"!==o[3]&&"false"!==o[3]&&this.throwSCORMError(a.scorm2004_errors.TYPE_MISMATCH),t=!0}o=(e=e.substring(o[1].length)).match(n)}return e},t.prototype.replaceWithAnotherScormAPI=function(e){this.cmi=e.cmi,this.adl=e.adl},t.prototype.renderCommitCMI=function(e){var t=this.renderCMIToJSONObject();e&&(t.cmi.total_time=this.cmi.getCurrentTotalTime());var r=[],i=_.flatten(t);switch(this.settings.dataCommitFormat){case"flattened":return _.flatten(t);case"params":for(var n in i)({}).hasOwnProperty.call(i,n)&&r.push("".concat(n,"=").concat(i[n]));return r;default:return t}},t.prototype.renderCommitObject=function(e){var t=this.renderCommitCMI(e),r=this.cmi.getCurrentTotalTime(),i=_.getDurationAsSeconds(r,s.scorm2004_regex.CMITimespan),n=R.CompletionStatus.unknown,o=R.SuccessStatus.unknown;this.cmi.completion_status&&("completed"===this.cmi.completion_status?n=R.CompletionStatus.completed:"incomplete"===this.cmi.completion_status&&(n=R.CompletionStatus.incomplete)),this.cmi.success_status&&("passed"===this.cmi.success_status?o=R.SuccessStatus.passed:"failed"===this.cmi.success_status&&(o=R.SuccessStatus.failed));var a=this.cmi.score,c=null;a&&(c={},Number.isNaN(Number.parseFloat(a.raw))||(c.raw=Number.parseFloat(a.raw)),Number.isNaN(Number.parseFloat(a.min))||(c.min=Number.parseFloat(a.min)),Number.isNaN(Number.parseFloat(a.max))||(c.max=Number.parseFloat(a.max)),Number.isNaN(Number.parseFloat(a.scaled))||(c.scaled=Number.parseFloat(a.scaled)));var l={completionStatus:n,successStatus:o,totalTimeSeconds:i,runtimeData:t};return c&&(l.score=c),l},t.prototype.storeData=function(e){return(0,i.__awaiter)(this,void 0,void 0,(function(){var t,r,n,s,a,c;return(0,i.__generator)(this,(function(i){switch(i.label){case 0:return e&&"normal"===this.cmi.mode&&"credit"===this.cmi.credit&&(this.cmi.completion_threshold&&this.cmi.progress_measure&&(this.cmi.progress_measure>=this.cmi.completion_threshold?this.cmi.completion_status="completed":this.cmi.completion_status="incomplete"),this.cmi.scaled_passing_score&&this.cmi.score.scaled&&(this.cmi.score.scaled>=this.cmi.scaled_passing_score?this.cmi.success_status="passed":this.cmi.success_status="failed")),t=!1,this.adl.nav.request!==(null===(c=null===(a=null===(s=this.startingData)||void 0===s?void 0:s.adl)||void 0===a?void 0:a.nav)||void 0===c?void 0:c.request)&&"_none_"!==this.adl.nav.request&&(t=!0),r=this.getCommitObject(e),"string"!=typeof this.settings.lmsCommitUrl?[3,2]:[4,this.processHttpRequest(this.settings.lmsCommitUrl,r,e)];case 1:return n=i.sent(),t&&void 0!==n.navRequest&&""!==n.navRequest&&Function('"use strict";(() => { '.concat(n.navRequest," })()"))(),[2,n];case 2:return[2,{result:o.global_constants.SCORM_TRUE,errorCode:0}]}}))}))},t}(n.default)},589:function(e,t,r){r.r(t),r.d(t,{CMIArray:function(){return a}});var i=r(635),n=r(319),o=r(784),s=r(797),a=function(e){function t(t){var r=e.call(this)||this;return r.__children=t.children,r._errorCode=t.errorCode||s.scorm12_errors.GENERAL,r._errorClass=t.errorClass||o.BaseScormValidationError,r.childArray=[],r}return(0,i.__extends)(t,e),t.prototype.reset=function(e){if(void 0===e&&(e=!1),this._initialized=!1,e)this.childArray=[];else for(var t=0;t<this.childArray.length;t++)this.childArray[t].reset()},Object.defineProperty(t.prototype,"_children",{get:function(){return this.__children},set:function(e){throw new this._errorClass(this._errorCode)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"_count",{get:function(){return this.childArray.length},set:function(e){throw new this._errorClass(this._errorCode)},enumerable:!1,configurable:!0}),t.prototype.toJSON=function(){this.jsonString=!0;for(var e={},t=0;t<this.childArray.length;t++)e[t+""]=this.childArray[t];return delete this.jsonString,e},t}(n.BaseCMI)},319:function(e,t,r){r.r(t),r.d(t,{BaseCMI:function(){return n},BaseRootCMI:function(){return o}});var i=r(635),n=function(){function e(){this.jsonString=!1,this._initialized=!1}return Object.defineProperty(e.prototype,"initialized",{get:function(){return this._initialized},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"start_time",{get:function(){return this._start_time},enumerable:!1,configurable:!0}),e.prototype.initialize=function(){this._initialized=!0},e.prototype.setStartTime=function(){this._start_time=(new Date).getTime()},e}(),o=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,i.__extends)(t,e),t}(n)},434:function(e,t,r){r.r(t),r.d(t,{CMIScore:function(){return l}});var i=r(635),n=r(340),o=r(417),s=r(319),a=r(449),c=r(797),l=function(e){function t(t){var r=e.call(this)||this;return r._raw="",r._min="",r.__children=t.score_children||n.scorm12_constants.score_children,r.__score_range=!!t.score_range&&o.scorm12_regex.score_range,r._max=t.max||""===t.max?t.max:"100",r.__invalid_error_code=t.invalidErrorCode||c.scorm12_errors.INVALID_SET_VALUE,r.__invalid_type_code=t.invalidTypeCode||c.scorm12_errors.TYPE_MISMATCH,r.__invalid_range_code=t.invalidRangeCode||c.scorm12_errors.VALUE_OUT_OF_RANGE,r.__decimal_regex=t.decimalRegex||o.scorm12_regex.CMIDecimal,r.__error_class=t.errorClass,r}return(0,i.__extends)(t,e),t.prototype.reset=function(){this._initialized=!1},Object.defineProperty(t.prototype,"_children",{get:function(){return this.__children},set:function(e){throw new this.__error_class(this.__invalid_error_code)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"raw",{get:function(){return this._raw},set:function(e){!(0,a.checkValidFormat)(e,this.__decimal_regex,this.__invalid_type_code,this.__error_class)||this.__score_range&&!(0,a.checkValidRange)(e,this.__score_range,this.__invalid_range_code,this.__error_class)||(this._raw=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"min",{get:function(){return this._min},set:function(e){!(0,a.checkValidFormat)(e,this.__decimal_regex,this.__invalid_type_code,this.__error_class)||this.__score_range&&!(0,a.checkValidRange)(e,this.__score_range,this.__invalid_range_code,this.__error_class)||(this._min=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"max",{get:function(){return this._max},set:function(e){!(0,a.checkValidFormat)(e,this.__decimal_regex,this.__invalid_type_code,this.__error_class)||this.__score_range&&!(0,a.checkValidRange)(e,this.__score_range,this.__invalid_range_code,this.__error_class)||(this._max=e)},enumerable:!1,configurable:!0}),t.prototype.toJSON=function(){this.jsonString=!0;var e={raw:this.raw,min:this.min,max:this.max};return delete this.jsonString,e},t}(s.BaseCMI)},449:function(e,t,r){function i(e,t,r,i,n){if("string"!=typeof e)return!1;var o=new RegExp(t),s=e.match(o);if(n&&""===e)return!0;if(void 0===e||!s||""===s[0])throw new i(r);return!0}function n(e,t,r,i){var n=t.split("#");if((e*=1)>=n[0]){if("*"===n[1]||e<=n[1])return!0;throw new i(r)}throw new i(r)}r.r(t),r.d(t,{checkValidFormat:function(){return i},checkValidRange:function(){return n}})},989:function(e,t,r){r.r(t),r.d(t,{CMI:function(){return g}});var i=r(635),n=r(340),o=r(797),s=r(417),a=r(179),c=r(319),l=r(915),u=r(434),_=r(864),d=function(e){function t(){var t=e.call(this)||this;return t.__children=n.scorm12_constants.core_children,t._student_id="",t._student_name="",t._lesson_location="",t._credit="",t._lesson_status="not attempted",t._entry="",t._total_time="",t._lesson_mode="normal",t._exit="",t._session_time="00:00:00",t._suspend_data="",t.score=new u.CMIScore({score_children:n.scorm12_constants.score_children,score_range:s.scorm12_regex.score_range,invalidErrorCode:o.scorm12_errors.INVALID_SET_VALUE,invalidTypeCode:o.scorm12_errors.TYPE_MISMATCH,invalidRangeCode:o.scorm12_errors.VALUE_OUT_OF_RANGE,errorClass:a.Scorm12ValidationError}),t}return(0,i.__extends)(t,e),t.prototype.initialize=function(){var t;e.prototype.initialize.call(this),null===(t=this.score)||void 0===t||t.initialize()},t.prototype.reset=function(){var e;this._initialized=!1,this._exit="",this._entry="",this._session_time="00:00:00",null===(e=this.score)||void 0===e||e.reset()},Object.defineProperty(t.prototype,"_children",{get:function(){return this.__children},set:function(e){throw new a.Scorm12ValidationError(o.scorm12_errors.INVALID_SET_VALUE)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"student_id",{get:function(){return this._student_id},set:function(e){if(this.initialized)throw new a.Scorm12ValidationError(o.scorm12_errors.READ_ONLY_ELEMENT);this._student_id=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"student_name",{get:function(){return this._student_name},set:function(e){if(this.initialized)throw new a.Scorm12ValidationError(o.scorm12_errors.READ_ONLY_ELEMENT);this._student_name=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"lesson_location",{get:function(){return this._lesson_location},set:function(e){(0,l.check12ValidFormat)(e,s.scorm12_regex.CMIString256,!0)&&(this._lesson_location=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"credit",{get:function(){return this._credit},set:function(e){if(this.initialized)throw new a.Scorm12ValidationError(o.scorm12_errors.READ_ONLY_ELEMENT);this._credit=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"lesson_status",{get:function(){return this._lesson_status},set:function(e){this.initialized?(0,l.check12ValidFormat)(e,s.scorm12_regex.CMIStatus)&&(this._lesson_status=e):(0,l.check12ValidFormat)(e,s.scorm12_regex.CMIStatus2)&&(this._lesson_status=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"entry",{get:function(){return this._entry},set:function(e){if(this.initialized)throw new a.Scorm12ValidationError(o.scorm12_errors.READ_ONLY_ELEMENT);this._entry=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"total_time",{get:function(){return this._total_time},set:function(e){if(this.initialized)throw new a.Scorm12ValidationError(o.scorm12_errors.READ_ONLY_ELEMENT);this._total_time=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"lesson_mode",{get:function(){return this._lesson_mode},set:function(e){if(this.initialized)throw new a.Scorm12ValidationError(o.scorm12_errors.READ_ONLY_ELEMENT);this._lesson_mode=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"exit",{get:function(){if(!this.jsonString)throw new a.Scorm12ValidationError(o.scorm12_errors.WRITE_ONLY_ELEMENT);return this._exit},set:function(e){(0,l.check12ValidFormat)(e,s.scorm12_regex.CMIExit,!0)&&(this._exit=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"session_time",{get:function(){if(!this.jsonString)throw new a.Scorm12ValidationError(o.scorm12_errors.WRITE_ONLY_ELEMENT);return this._session_time},set:function(e){(0,l.check12ValidFormat)(e,s.scorm12_regex.CMITimespan)&&(this._session_time=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"suspend_data",{get:function(){return this._suspend_data},set:function(e){(0,l.check12ValidFormat)(e,s.scorm12_regex.CMIString4096,!0)&&(this._suspend_data=e)},enumerable:!1,configurable:!0}),t.prototype.getCurrentTotalTime=function(e){var t=this._session_time,r=e;if(null!=r){var i=(new Date).getTime()-r;t=_.getSecondsAsHHMMSS(i/1e3)}return _.addHHMMSSTimeStrings(this._total_time,t,new RegExp(s.scorm12_regex.CMITimespan))},t.prototype.toJSON=function(){this.jsonString=!0;var e={student_id:this.student_id,student_name:this.student_name,lesson_location:this.lesson_location,credit:this.credit,lesson_status:this.lesson_status,entry:this.entry,lesson_mode:this.lesson_mode,exit:this.exit,session_time:this.session_time,score:this.score};return delete this.jsonString,e},t}(c.BaseCMI),h=r(176),m=r(532),f=r(181),p=r(833),g=function(e){function t(t,r,i){var o=e.call(this)||this;return o.__children="",o.__version="3.4",o._launch_data="",o._comments="",o._comments_from_lms="",i&&o.initialize(),o.__children=t||n.scorm12_constants.cmi_children,o.core=new d,o.objectives=new h.CMIObjectives,o.student_data=r||new m.CMIStudentData,o.student_preference=new f.CMIStudentPreference,o.interactions=new p.CMIInteractions,o}return(0,i.__extends)(t,e),t.prototype.reset=function(){var e,t,r;this._initialized=!1,this._launch_data="",this._comments="",null===(e=this.core)||void 0===e||e.reset(),this.objectives=new h.CMIObjectives,this.interactions=new p.CMIInteractions,null===(t=this.student_data)||void 0===t||t.reset(),null===(r=this.student_preference)||void 0===r||r.reset()},t.prototype.initialize=function(){var t,r,i,n,o;e.prototype.initialize.call(this),null===(t=this.core)||void 0===t||t.initialize(),null===(r=this.objectives)||void 0===r||r.initialize(),null===(i=this.student_data)||void 0===i||i.initialize(),null===(n=this.student_preference)||void 0===n||n.initialize(),null===(o=this.interactions)||void 0===o||o.initialize()},t.prototype.toJSON=function(){this.jsonString=!0;var e={suspend_data:this.suspend_data,launch_data:this.launch_data,comments:this.comments,comments_from_lms:this.comments_from_lms,core:this.core,objectives:this.objectives,student_data:this.student_data,student_preference:this.student_preference,interactions:this.interactions};return delete this.jsonString,e},Object.defineProperty(t.prototype,"_version",{get:function(){return this.__version},set:function(e){throw new a.Scorm12ValidationError(o.scorm12_errors.INVALID_SET_VALUE)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"_children",{get:function(){return this.__children},set:function(e){throw new a.Scorm12ValidationError(o.scorm12_errors.INVALID_SET_VALUE)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"suspend_data",{get:function(){var e;return null===(e=this.core)||void 0===e?void 0:e.suspend_data},set:function(e){this.core&&(this.core.suspend_data=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"launch_data",{get:function(){return this._launch_data},set:function(e){if(this.initialized)throw new a.Scorm12ValidationError(o.scorm12_errors.READ_ONLY_ELEMENT);this._launch_data=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"comments",{get:function(){return this._comments},set:function(e){(0,l.check12ValidFormat)(e,s.scorm12_regex.CMIString4096,!0)&&(this._comments=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"comments_from_lms",{get:function(){return this._comments_from_lms},set:function(e){if(this.initialized)throw new a.Scorm12ValidationError(o.scorm12_errors.READ_ONLY_ELEMENT);this._comments_from_lms=e},enumerable:!1,configurable:!0}),t.prototype.getCurrentTotalTime=function(){return this.core.getCurrentTotalTime(this.start_time)},t}(c.BaseRootCMI)},833:function(e,t,r){r.r(t),r.d(t,{CMIInteractions:function(){return _},CMIInteractionsCorrectResponsesObject:function(){return m},CMIInteractionsObject:function(){return d},CMIInteractionsObjectivesObject:function(){return h}});var i=r(635),n=r(589),o=r(340),s=r(797),a=r(179),c=r(319),l=r(915),u=r(417),_=function(e){function t(){return e.call(this,{children:o.scorm12_constants.interactions_children,errorCode:s.scorm12_errors.INVALID_SET_VALUE,errorClass:a.Scorm12ValidationError})||this}return(0,i.__extends)(t,e),t}(n.CMIArray),d=function(e){function t(){var t=e.call(this)||this;return t._id="",t._time="",t._type="",t._weighting="",t._student_response="",t._result="",t._latency="",t.objectives=new n.CMIArray({errorCode:s.scorm12_errors.INVALID_SET_VALUE,errorClass:a.Scorm12ValidationError,children:o.scorm12_constants.objectives_children}),t.correct_responses=new n.CMIArray({errorCode:s.scorm12_errors.INVALID_SET_VALUE,errorClass:a.Scorm12ValidationError,children:o.scorm12_constants.correct_responses_children}),t}return(0,i.__extends)(t,e),t.prototype.initialize=function(){var t,r;e.prototype.initialize.call(this),null===(t=this.objectives)||void 0===t||t.initialize(),null===(r=this.correct_responses)||void 0===r||r.initialize()},t.prototype.reset=function(){var e,t;this._initialized=!1,this._id="",this._time="",this._type="",this._weighting="",this._student_response="",this._result="",this._latency="",null===(e=this.objectives)||void 0===e||e.reset(),null===(t=this.correct_responses)||void 0===t||t.reset()},Object.defineProperty(t.prototype,"id",{get:function(){if(!this.jsonString)throw new a.Scorm12ValidationError(s.scorm12_errors.WRITE_ONLY_ELEMENT);return this._id},set:function(e){(0,l.check12ValidFormat)(e,u.scorm12_regex.CMIIdentifier)&&(this._id=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"time",{get:function(){if(!this.jsonString)throw new a.Scorm12ValidationError(s.scorm12_errors.WRITE_ONLY_ELEMENT);return this._time},set:function(e){(0,l.check12ValidFormat)(e,u.scorm12_regex.CMITime)&&(this._time=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"type",{get:function(){if(!this.jsonString)throw new a.Scorm12ValidationError(s.scorm12_errors.WRITE_ONLY_ELEMENT);return this._type},set:function(e){(0,l.check12ValidFormat)(e,u.scorm12_regex.CMIType)&&(this._type=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"weighting",{get:function(){if(!this.jsonString)throw new a.Scorm12ValidationError(s.scorm12_errors.WRITE_ONLY_ELEMENT);return this._weighting},set:function(e){(0,l.check12ValidFormat)(e,u.scorm12_regex.CMIDecimal)&&(0,l.check12ValidRange)(e,u.scorm12_regex.weighting_range)&&(this._weighting=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"student_response",{get:function(){if(!this.jsonString)throw new a.Scorm12ValidationError(s.scorm12_errors.WRITE_ONLY_ELEMENT);return this._student_response},set:function(e){(0,l.check12ValidFormat)(e,u.scorm12_regex.CMIFeedback,!0)&&(this._student_response=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"result",{get:function(){if(!this.jsonString)throw new a.Scorm12ValidationError(s.scorm12_errors.WRITE_ONLY_ELEMENT);return this._result},set:function(e){(0,l.check12ValidFormat)(e,u.scorm12_regex.CMIResult)&&(this._result=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"latency",{get:function(){if(!this.jsonString)throw new a.Scorm12ValidationError(s.scorm12_errors.WRITE_ONLY_ELEMENT);return this._latency},set:function(e){(0,l.check12ValidFormat)(e,u.scorm12_regex.CMITimespan)&&(this._latency=e)},enumerable:!1,configurable:!0}),t.prototype.toJSON=function(){this.jsonString=!0;var e={id:this.id,time:this.time,type:this.type,weighting:this.weighting,student_response:this.student_response,result:this.result,latency:this.latency,objectives:this.objectives,correct_responses:this.correct_responses};return delete this.jsonString,e},t}(c.BaseCMI),h=function(e){function t(){var t=e.call(this)||this;return t._id="",t}return(0,i.__extends)(t,e),t.prototype.reset=function(){this._initialized=!1,this._id=""},Object.defineProperty(t.prototype,"id",{get:function(){return this._id},set:function(e){(0,l.check12ValidFormat)(e,u.scorm12_regex.CMIIdentifier)&&(this._id=e)},enumerable:!1,configurable:!0}),t.prototype.toJSON=function(){this.jsonString=!0;var e={id:this.id};return delete this.jsonString,e},t}(c.BaseCMI),m=function(e){function t(){var t=e.call(this)||this;return t._pattern="",t}return(0,i.__extends)(t,e),t.prototype.reset=function(){this._initialized=!1,this._pattern=""},Object.defineProperty(t.prototype,"pattern",{get:function(){if(!this.jsonString)throw new a.Scorm12ValidationError(s.scorm12_errors.WRITE_ONLY_ELEMENT);return this._pattern},set:function(e){(0,l.check12ValidFormat)(e,u.scorm12_regex.CMIFeedback,!0)&&(this._pattern=e)},enumerable:!1,configurable:!0}),t.prototype.toJSON=function(){this.jsonString=!0;var e={pattern:this._pattern};return delete this.jsonString,e},t}(c.BaseCMI)},331:function(e,t,r){r.r(t),r.d(t,{NAV:function(){return a}});var i=r(635),n=r(319),o=r(915),s=r(417),a=function(e){function t(){var t=e.call(this)||this;return t._event="",t}return(0,i.__extends)(t,e),t.prototype.reset=function(){this._event="",this._initialized=!1},Object.defineProperty(t.prototype,"event",{get:function(){return this._event},set:function(e){(0,o.check12ValidFormat)(e,s.scorm12_regex.NAVEvent)&&(this._event=e)},enumerable:!1,configurable:!0}),t.prototype.toJSON=function(){this.jsonString=!0;var e={event:this.event};return delete this.jsonString,e},t}(n.BaseCMI)},176:function(e,t,r){r.r(t),r.d(t,{CMIObjectives:function(){return _},CMIObjectivesObject:function(){return d}});var i=r(635),n=r(319),o=r(434),s=r(340),a=r(417),c=r(797),l=r(179),u=r(915),_=function(e){function t(){return e.call(this,{children:s.scorm12_constants.objectives_children,errorCode:c.scorm12_errors.INVALID_SET_VALUE,errorClass:l.Scorm12ValidationError})||this}return(0,i.__extends)(t,e),t}(r(589).CMIArray),d=function(e){function t(){var t=e.call(this)||this;return t._id="",t._status="",t.score=new o.CMIScore({score_children:s.scorm12_constants.score_children,score_range:a.scorm12_regex.score_range,invalidErrorCode:c.scorm12_errors.INVALID_SET_VALUE,invalidTypeCode:c.scorm12_errors.TYPE_MISMATCH,invalidRangeCode:c.scorm12_errors.VALUE_OUT_OF_RANGE,errorClass:l.Scorm12ValidationError}),t}return(0,i.__extends)(t,e),t.prototype.reset=function(){var e;this._initialized=!1,this._id="",this._status="",null===(e=this.score)||void 0===e||e.reset()},Object.defineProperty(t.prototype,"id",{get:function(){return this._id},set:function(e){(0,u.check12ValidFormat)(e,a.scorm12_regex.CMIIdentifier)&&(this._id=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"status",{get:function(){return this._status},set:function(e){(0,u.check12ValidFormat)(e,a.scorm12_regex.CMIStatus2)&&(this._status=e)},enumerable:!1,configurable:!0}),t.prototype.toJSON=function(){this.jsonString=!0;var e={id:this.id,status:this.status,score:this.score};return delete this.jsonString,e},t}(n.BaseCMI)},532:function(e,t,r){r.r(t),r.d(t,{CMIStudentData:function(){return c}});var i=r(635),n=r(319),o=r(340),s=r(179),a=r(797),c=function(e){function t(t){var r=e.call(this)||this;return r._mastery_score="",r._max_time_allowed="",r._time_limit_action="",r.__children=t||o.scorm12_constants.student_data_children,r}return(0,i.__extends)(t,e),t.prototype.reset=function(){this._initialized=!1},Object.defineProperty(t.prototype,"_children",{get:function(){return this.__children},set:function(e){throw new s.Scorm12ValidationError(a.scorm12_errors.INVALID_SET_VALUE)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"mastery_score",{get:function(){return this._mastery_score},set:function(e){if(this.initialized)throw new s.Scorm12ValidationError(a.scorm12_errors.READ_ONLY_ELEMENT);this._mastery_score=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"max_time_allowed",{get:function(){return this._max_time_allowed},set:function(e){if(this.initialized)throw new s.Scorm12ValidationError(a.scorm12_errors.READ_ONLY_ELEMENT);this._max_time_allowed=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"time_limit_action",{get:function(){return this._time_limit_action},set:function(e){if(this.initialized)throw new s.Scorm12ValidationError(a.scorm12_errors.READ_ONLY_ELEMENT);this._time_limit_action=e},enumerable:!1,configurable:!0}),t.prototype.toJSON=function(){this.jsonString=!0;var e={mastery_score:this.mastery_score,max_time_allowed:this.max_time_allowed,time_limit_action:this.time_limit_action};return delete this.jsonString,e},t}(n.BaseCMI)},181:function(e,t,r){r.r(t),r.d(t,{CMIStudentPreference:function(){return u}});var i=r(635),n=r(319),o=r(340),s=r(179),a=r(915),c=r(417),l=r(797),u=function(e){function t(t){var r=e.call(this)||this;return r._audio="",r._language="",r._speed="",r._text="",r.__children=t||o.scorm12_constants.student_preference_children,r}return(0,i.__extends)(t,e),t.prototype.reset=function(){this._initialized=!1},Object.defineProperty(t.prototype,"_children",{get:function(){return this.__children},set:function(e){throw new s.Scorm12ValidationError(l.scorm12_errors.INVALID_SET_VALUE)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"audio",{get:function(){return this._audio},set:function(e){(0,a.check12ValidFormat)(e,c.scorm12_regex.CMISInteger)&&(0,a.check12ValidRange)(e,c.scorm12_regex.audio_range)&&(this._audio=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"language",{get:function(){return this._language},set:function(e){(0,a.check12ValidFormat)(e,c.scorm12_regex.CMIString256)&&(this._language=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"speed",{get:function(){return this._speed},set:function(e){(0,a.check12ValidFormat)(e,c.scorm12_regex.CMISInteger)&&(0,a.check12ValidRange)(e,c.scorm12_regex.speed_range)&&(this._speed=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"text",{get:function(){return this._text},set:function(e){(0,a.check12ValidFormat)(e,c.scorm12_regex.CMISInteger)&&(0,a.check12ValidRange)(e,c.scorm12_regex.text_range)&&(this._text=e)},enumerable:!1,configurable:!0}),t.prototype.toJSON=function(){this.jsonString=!0;var e={audio:this.audio,language:this.language,speed:this.speed,text:this.text};return delete this.jsonString,e},t}(n.BaseCMI)},915:function(e,t,r){r.r(t),r.d(t,{check12ValidFormat:function(){return s},check12ValidRange:function(){return a}});var i=r(449),n=r(797),o=r(179);function s(e,t,r){return(0,i.checkValidFormat)(e,t,n.scorm12_errors.TYPE_MISMATCH,o.Scorm12ValidationError,r)}function a(e,t,r){if(!r&&""===e)throw new o.Scorm12ValidationError(n.scorm12_errors.VALUE_OUT_OF_RANGE);return(0,i.checkValidRange)(e,t,n.scorm12_errors.VALUE_OUT_OF_RANGE,o.Scorm12ValidationError)}},340:function(e,t,r){r.r(t),r.d(t,{aicc_constants:function(){return s},global_constants:function(){return n},scorm12_constants:function(){return o},scorm2004_constants:function(){return a}});var i=r(635),n={SCORM_TRUE:"true",SCORM_FALSE:"false",STATE_NOT_INITIALIZED:0,STATE_INITIALIZED:1,STATE_TERMINATED:2},o={cmi_children:"core,suspend_data,launch_data,comments,objectives,student_data,student_preference,interactions",core_children:"student_id,student_name,lesson_location,credit,lesson_status,entry,score,total_time,lesson_mode,exit,session_time",score_children:"raw,min,max",comments_children:"content,location,time",objectives_children:"id,score,status",correct_responses_children:"pattern",student_data_children:"mastery_score,max_time_allowed,time_limit_action",student_preference_children:"audio,language,speed,text",interactions_children:"id,objectives,time,type,correct_responses,weighting,student_response,result,latency",error_descriptions:{101:{basicMessage:"General Exception",detailMessage:"No specific error code exists to describe the error. Use LMSGetDiagnostic for more information"},201:{basicMessage:"Invalid argument error",detailMessage:"Indicates that an argument represents an invalid data model element or is otherwise incorrect."},202:{basicMessage:"Element cannot have children",detailMessage:'Indicates that LMSGetValue was called with a data model element name that ends in "_children" for a data model element that does not support the "_children" suffix.'},203:{basicMessage:"Element not an array - cannot have count",detailMessage:'Indicates that LMSGetValue was called with a data model element name that ends in "_count" for a data model element that does not support the "_count" suffix.'},301:{basicMessage:"Not initialized",detailMessage:"Indicates that an API call was made before the call to lmsInitialize."},401:{basicMessage:"Not implemented error",detailMessage:"The data model element indicated in a call to LMSGetValue or LMSSetValue is valid, but was not implemented by this LMS. SCORM 1.2 defines a set of data model elements as being optional for an LMS to implement."},402:{basicMessage:"Invalid set value, element is a keyword",detailMessage:'Indicates that LMSSetValue was called on a data model element that represents a keyword (elements that end in "_children" and "_count").'},403:{basicMessage:"Element is read only",detailMessage:"LMSSetValue was called with a data model element that can only be read."},404:{basicMessage:"Element is write only",detailMessage:"LMSGetValue was called on a data model element that can only be written to."},405:{basicMessage:"Incorrect Data Type",detailMessage:"LMSSetValue was called with a value that is not consistent with the data format of the supplied data model element."},407:{basicMessage:"Element Value Out Of Range",detailMessage:"The numeric value supplied to a LMSSetValue call is outside of the numeric range allowed for the supplied data model element."},408:{basicMessage:"Data Model Dependency Not Established",detailMessage:"Some data model elements cannot be set until another data model element was set. This error condition indicates that the prerequisite element was not set before the dependent element."}}},s=(0,i.__assign)((0,i.__assign)({},o),{cmi_children:"core,suspend_data,launch_data,comments,objectives,student_data,student_preference,interactions,evaluation",student_preference_children:"audio,language,lesson_type,speed,text,text_color,text_location,text_size,video,windows",student_data_children:"attempt_number,tries,mastery_score,max_time_allowed,time_limit_action",student_demographics_children:"city,class,company,country,experience,familiar_name,instructor_name,title,native_language,state,street_address,telephone,years_experience",tries_children:"time,status,score",attempt_records_children:"score,lesson_status",paths_children:"location_id,date,time,status,why_left,time_in_element"}),a={cmi_children:"_version,comments_from_learner,comments_from_lms,completion_status,credit,entry,exit,interactions,launch_data,learner_id,learner_name,learner_preference,location,max_time_allowed,mode,objectives,progress_measure,scaled_passing_score,score,session_time,success_status,suspend_data,time_limit_action,total_time",comments_children:"comment,timestamp,location",score_children:"max,raw,scaled,min",objectives_children:"progress_measure,completion_status,success_status,description,score,id",correct_responses_children:"pattern",student_data_children:"mastery_score,max_time_allowed,time_limit_action",student_preference_children:"audio_level,audio_captioning,delivery_speed,language",interactions_children:"id,type,objectives,timestamp,correct_responses,weighting,learner_response,result,latency,description",adl_data_children:"id,store",error_descriptions:{0:{basicMessage:"No Error",detailMessage:"No error occurred, the previous API call was successful."},101:{basicMessage:"General Exception",detailMessage:"No specific error code exists to describe the error. Use GetDiagnostic for more information."},102:{basicMessage:"General Initialization Failure",detailMessage:"Call to Initialize failed for an unknown reason."},103:{basicMessage:"Already Initialized",detailMessage:"Call to Initialize failed because Initialize was already called."},104:{basicMessage:"Content Instance Terminated",detailMessage:"Call to Initialize failed because Terminate was already called."},111:{basicMessage:"General Termination Failure",detailMessage:"Call to Terminate failed for an unknown reason."},112:{basicMessage:"Termination Before Initialization",detailMessage:"Call to Terminate failed because it was made before the call to Initialize."},113:{basicMessage:"Termination After Termination",detailMessage:"Call to Terminate failed because Terminate was already called."},122:{basicMessage:"Retrieve Data Before Initialization",detailMessage:"Call to GetValue failed because it was made before the call to Initialize."},123:{basicMessage:"Retrieve Data After Termination",detailMessage:"Call to GetValue failed because it was made after the call to Terminate."},132:{basicMessage:"Store Data Before Initialization",detailMessage:"Call to SetValue failed because it was made before the call to Initialize."},133:{basicMessage:"Store Data After Termination",detailMessage:"Call to SetValue failed because it was made after the call to Terminate."},142:{basicMessage:"Commit Before Initialization",detailMessage:"Call to Commit failed because it was made before the call to Initialize."},143:{basicMessage:"Commit After Termination",detailMessage:"Call to Commit failed because it was made after the call to Terminate."},201:{basicMessage:"General Argument Error",detailMessage:"An invalid argument was passed to an API method (usually indicates that Initialize, Commit or Terminate did not receive the expected empty string argument."},301:{basicMessage:"General Get Failure",detailMessage:"Indicates a failed GetValue call where no other specific error code is applicable. Use GetDiagnostic for more information."},351:{basicMessage:"General Set Failure",detailMessage:"Indicates a failed SetValue call where no other specific error code is applicable. Use GetDiagnostic for more information."},391:{basicMessage:"General Commit Failure",detailMessage:"Indicates a failed Commit call where no other specific error code is applicable. Use GetDiagnostic for more information."},401:{basicMessage:"Undefined Data Model Element",detailMessage:"The data model element name passed to GetValue or SetValue is not a valid SCORM data model element."},402:{basicMessage:"Unimplemented Data Model Element",detailMessage:"The data model element indicated in a call to GetValue or SetValue is valid, but was not implemented by this LMS. In SCORM 2004, this error would indicate an LMS that is not fully SCORM conformant."},403:{basicMessage:"Data Model Element Value Not Initialized",detailMessage:"Attempt to read a data model element that has not been initialized by the LMS or through a SetValue call. This error condition is often reached during normal execution of a SCO."},404:{basicMessage:"Data Model Element Is Read Only",detailMessage:"SetValue was called with a data model element that can only be read."},405:{basicMessage:"Data Model Element Is Write Only",detailMessage:"GetValue was called on a data model element that can only be written to."},406:{basicMessage:"Data Model Element Type Mismatch",detailMessage:"SetValue was called with a value that is not consistent with the data format of the supplied data model element."},407:{basicMessage:"Data Model Element Value Out Of Range",detailMessage:"The numeric value supplied to a SetValue call is outside of the numeric range allowed for the supplied data model element."},408:{basicMessage:"Data Model Dependency Not Established",detailMessage:"Some data model elements cannot be set until another data model element was set. This error condition indicates that the prerequisite element was not set before the dependent element."}}}},56:function(e,t,r){var i,n,o,s;r.r(t),r.d(t,{CompletionStatus:function(){return o},LogLevelEnum:function(){return s},NAVBoolean:function(){return i},SuccessStatus:function(){return n}}),function(e){e.unknown="unknown",e.true="true",e.false="false"}(i||(i={})),function(e){e.passed="passed",e.failed="failed",e.unknown="unknown"}(n||(n={})),function(e){e.completed="completed",e.incomplete="incomplete",e.unknown="unknown"}(o||(o={})),function(e){e[e._=0]="_",e[e.DEBUG=1]="DEBUG",e[e.INFO=2]="INFO",e[e.WARN=3]="WARN",e[e.ERROR=4]="ERROR",e[e.NONE=5]="NONE"}(s||(s={}))},797:function(e,t,r){r.r(t),r.d(t,{global_errors:function(){return n},scorm12_errors:function(){return o},scorm2004_errors:function(){return s}});var i=r(635),n={GENERAL:101,INITIALIZATION_FAILED:101,INITIALIZED:101,TERMINATED:101,TERMINATION_FAILURE:101,TERMINATION_BEFORE_INIT:101,MULTIPLE_TERMINATION:101,RETRIEVE_BEFORE_INIT:101,RETRIEVE_AFTER_TERM:101,STORE_BEFORE_INIT:101,STORE_AFTER_TERM:101,COMMIT_BEFORE_INIT:101,COMMIT_AFTER_TERM:101,ARGUMENT_ERROR:101,CHILDREN_ERROR:101,COUNT_ERROR:101,GENERAL_GET_FAILURE:101,GENERAL_SET_FAILURE:101,GENERAL_COMMIT_FAILURE:101,UNDEFINED_DATA_MODEL:101,UNIMPLEMENTED_ELEMENT:101,VALUE_NOT_INITIALIZED:101,INVALID_SET_VALUE:101,READ_ONLY_ELEMENT:101,WRITE_ONLY_ELEMENT:101,TYPE_MISMATCH:101,VALUE_OUT_OF_RANGE:101,DEPENDENCY_NOT_ESTABLISHED:101},o=(0,i.__assign)((0,i.__assign)({},n),{RETRIEVE_BEFORE_INIT:301,STORE_BEFORE_INIT:301,COMMIT_BEFORE_INIT:301,ARGUMENT_ERROR:201,CHILDREN_ERROR:202,COUNT_ERROR:203,UNDEFINED_DATA_MODEL:401,UNIMPLEMENTED_ELEMENT:401,VALUE_NOT_INITIALIZED:301,INVALID_SET_VALUE:402,READ_ONLY_ELEMENT:403,WRITE_ONLY_ELEMENT:404,TYPE_MISMATCH:405,VALUE_OUT_OF_RANGE:407,DEPENDENCY_NOT_ESTABLISHED:408}),s=(0,i.__assign)((0,i.__assign)({},n),{INITIALIZATION_FAILED:102,INITIALIZED:103,TERMINATED:104,TERMINATION_FAILURE:111,TERMINATION_BEFORE_INIT:112,MULTIPLE_TERMINATIONS:113,RETRIEVE_BEFORE_INIT:122,RETRIEVE_AFTER_TERM:123,STORE_BEFORE_INIT:132,STORE_AFTER_TERM:133,COMMIT_BEFORE_INIT:142,COMMIT_AFTER_TERM:143,ARGUMENT_ERROR:201,GENERAL_GET_FAILURE:301,GENERAL_SET_FAILURE:351,GENERAL_COMMIT_FAILURE:391,UNDEFINED_DATA_MODEL:401,UNIMPLEMENTED_ELEMENT:402,VALUE_NOT_INITIALIZED:403,READ_ONLY_ELEMENT:404,WRITE_ONLY_ELEMENT:405,TYPE_MISMATCH:406,VALUE_OUT_OF_RANGE:407,DEPENDENCY_NOT_ESTABLISHED:408})},417:function(e,t,r){r.r(t),r.d(t,{aicc_regex:function(){return o},scorm12_regex:function(){return n},scorm2004_regex:function(){return s}});var i=r(635),n={CMIString256:"^.{0,255}$",CMIString4096:"^.{0,4096}$",CMITime:"^(?:[01]\\d|2[0123]):(?:[012345]\\d):(?:[012345]\\d)$",CMITimespan:"^([0-9]{2,}):([0-9]{2}):([0-9]{2})(.[0-9]{1,2})?$",CMIInteger:"^\\d+$",CMISInteger:"^-?([0-9]+)$",CMIDecimal:"^-?([0-9]{0,3})(.[0-9]*)?$",CMIIdentifier:"^[\\u0021-\\u007E\\s]{0,255}$",CMIFeedback:"^.{0,255}$",CMIIndex:"[._](\\d+).",CMIStatus:"^(passed|completed|failed|incomplete|browsed)$",CMIStatus2:"^(passed|completed|failed|incomplete|browsed|not attempted)$",CMIExit:"^(time-out|suspend|logout|)$",CMIType:"^(true-false|choice|fill-in|matching|performance|sequencing|likert|numeric)$",CMIResult:"^(correct|wrong|unanticipated|neutral|([0-9]{0,3})?(\\.[0-9]*)?)$",NAVEvent:"^(previous|continue)$",score_range:"0#100",audio_range:"-1#100",speed_range:"-100#100",weighting_range:"-100#100",text_range:"-1#1"},o=(0,i.__assign)((0,i.__assign)({},n),{CMIIdentifier:"^\\w{1,255}$"}),s={CMIString200:"^[\\u0000-\\uFFFF]{0,200}$",CMIString250:"^[\\u0000-\\uFFFF]{0,250}$",CMIString1000:"^[\\u0000-\\uFFFF]{0,1000}$",CMIString4000:"^[\\u0000-\\uFFFF]{0,4000}$",CMIString64000:"^[\\u0000-\\uFFFF]{0,64000}$",CMILang:"^([a-zA-Z]{2,3}|i|x)(-[a-zA-Z0-9-]{2,8})?$|^$",CMILangString250:"^({lang=([a-zA-Z]{2,3}|i|x)(-[a-zA-Z0-9-]{2,8})?})?((?!{.*$).{0,250}$)?$",CMILangcr:"^(({lang=([a-zA-Z]{2,3}|i|x)?(-[a-zA-Z0-9-]{2,8})?}))(.*?)$",CMILangString250cr:"^(({lang=([a-zA-Z]{2,3}|i|x)?(-[a-zA-Z0-9-]{2,8})?})?(.{0,250})?)?$",CMILangString4000:"^({lang=([a-zA-Z]{2,3}|i|x)(-[a-zA-Z0-9-]{2,8})?})?((?!{.*$).{0,4000}$)?$",CMITime:"^(19[7-9]{1}[0-9]{1}|20[0-2]{1}[0-9]{1}|203[0-8]{1})((-(0[1-9]{1}|1[0-2]{1}))((-(0[1-9]{1}|[1-2]{1}[0-9]{1}|3[0-1]{1}))(T([0-1]{1}[0-9]{1}|2[0-3]{1})((:[0-5]{1}[0-9]{1})((:[0-5]{1}[0-9]{1})((\\.[0-9]{1,2})((Z|([+|-]([0-1]{1}[0-9]{1}|2[0-3]{1})))(:[0-5]{1}[0-9]{1})?)?)?)?)?)?)?)?$",CMITimespan:"^P(?:([.,\\d]+)Y)?(?:([.,\\d]+)M)?(?:([.,\\d]+)W)?(?:([.,\\d]+)D)?(?:T?(?:([.,\\d]+)H)?(?:([.,\\d]+)M)?(?:([.,\\d]+)S)?)?$",CMIInteger:"^\\d+$",CMISInteger:"^-?([0-9]+)$",CMIDecimal:"^-?([0-9]{1,5})(\\.[0-9]{1,18})?$",CMIIdentifier:"^\\S{1,250}[a-zA-Z0-9]$",CMIShortIdentifier:"^[\\w\\.\\-\\_]{1,250}$",CMILongIdentifier:"^(?:(?!urn:)\\S{1,4000}|urn:[A-Za-z0-9-]{1,31}:\\S{1,4000}|.{1,4000})$",CMIFeedback:"^.*$",CMIIndex:"[._](\\d+).",CMIIndexStore:".N(\\d+).",CMICStatus:"^(completed|incomplete|not attempted|unknown)$",CMISStatus:"^(passed|failed|unknown)$",CMIExit:"^(time-out|suspend|logout|normal)$",CMIType:"^(true-false|choice|fill-in|long-fill-in|matching|performance|sequencing|likert|numeric|other)$",CMIResult:"^(correct|incorrect|unanticipated|neutral|-?([0-9]{1,4})(\\.[0-9]{1,18})?)$",NAVEvent:"^(previous|continue|exit|exitAll|abandon|abandonAll|suspendAll|_none_|(\\{target=(?<choice_target>\\S{0,}[a-zA-Z0-9-_]+)})?choice|(\\{target=(?<jump_target>\\S{0,}[a-zA-Z0-9-_]+)})?jump)$",NAVBoolean:"^(unknown|true|false$)",NAVTarget:"^{target=\\S{0,}[a-zA-Z0-9-_]+}$",scaled_range:"-1#1",audio_range:"0#*",speed_range:"0#*",text_range:"-1#1",progress_range:"0#1"}},784:function(e,t,r){r.r(t),r.d(t,{BaseScormValidationError:function(){return n},ValidationError:function(){return o}});var i=r(635),n=function(e){function t(t){var r=e.call(this,t.toString())||this;return r._errorCode=t,r.name="ScormValidationError",r}return(0,i.__extends)(t,e),Object.defineProperty(t.prototype,"errorCode",{get:function(){return this._errorCode},enumerable:!1,configurable:!0}),t}(Error),o=function(e){function t(t,r,i){var n=e.call(this,t)||this;return n._detailedMessage="",n.message=r,n._errorMessage=r,i&&(n._detailedMessage=i),n}return(0,i.__extends)(t,e),Object.defineProperty(t.prototype,"errorMessage",{get:function(){return this._errorMessage},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"detailedMessage",{get:function(){return this._detailedMessage},enumerable:!1,configurable:!0}),t}(n)},179:function(e,t,r){r.r(t),r.d(t,{Scorm12ValidationError:function(){return s}});var i=r(635),n=r(784),o=r(340).scorm12_constants.error_descriptions,s=function(e){function t(t){return{}.hasOwnProperty.call(o,String(t))?e.call(this,t,o[String(t)].basicMessage,o[String(t)].detailMessage)||this:e.call(this,101,o[101].basicMessage,o[101].detailMessage)||this}return(0,i.__extends)(t,e),t}(n.ValidationError)},864:function(e,t,r){r.r(t),r.d(t,{SECONDS_PER_DAY:function(){return s},SECONDS_PER_HOUR:function(){return o},SECONDS_PER_MINUTE:function(){return n},SECONDS_PER_SECOND:function(){return i},addHHMMSSTimeStrings:function(){return h},addTwoDurations:function(){return d},countDecimals:function(){return p},flatten:function(){return m},formatMessage:function(){return g},getDurationAsSeconds:function(){return _},getSecondsAsHHMMSS:function(){return c},getSecondsAsISODuration:function(){return l},getTimeAsSeconds:function(){return u},stringMatches:function(){return E},unflatten:function(){return f}});var i=1,n=60,o=60*n,s=24*o,a={D:s,H:o,M:n,S:i};function c(e){if(!e||e<=0)return"00:00:00";var t=Math.floor(e/o),r=new Date(1e3*e),i=r.getUTCMinutes(),n=r.getSeconds(),s=e%1,a="";return p(s)>0&&(a="."+(a=p(s)>2?s.toFixed(2):String(s)).split(".")[1]),(t+":"+i+":"+n).replace(/\b\d\b/g,"0$&")+a}function l(e){if(!e||e<=0)return"PT0S";var t="P",r=e;for(var i in a){var n=a[i],o=Math.floor(r/n);p(r%=n)>2&&(r=Number(Number(r).toFixed(2))),"S"===i&&r>0&&(o+=r),o&&((t.indexOf("D")>0||"H"===i||"M"===i||"S"===i)&&-1===t.indexOf("T")&&(t+="T"),t+="".concat(o).concat(i))}return t}function u(e,t){if("number"!=typeof e&&"boolean"!=typeof e||(e=String(e)),"string"==typeof t&&(t=new RegExp(t)),!e||!e.match(t))return 0;var r=e.split(":");return 3600*Number(r[0])+60*Number(r[1])+Number(r[2])}function _(e,t){if("string"==typeof t&&(t=new RegExp(t)),!e||!e.match(t))return 0;var r=new RegExp(t).exec(e)||[],i=r[1],n=(r[2],r[4]),o=r[5],s=r[6],a=r[7],c=0;return c+=Number(a)||0,c+=60*Number(s)||0,c+=3600*Number(o)||0,(c+=86400*Number(n)||0)+(31536e3*Number(i)||0)}function d(e,t,r){var i="string"==typeof r?new RegExp(r):r;return l(_(e,i)+_(t,i))}function h(e,t,r){return"string"==typeof r&&(r=new RegExp(r)),c(u(e,r)+u(t,r))}function m(e){var t={};return function e(r,i){if(Object(r)!==r)t[i]=r;else if(Array.isArray(r))for(var n=0,o=r.length;n<o;n++)e(r[n],i+"["+n+"]"),0===o&&(t[i]=[]);else{var s=!0;for(var a in r)({}).hasOwnProperty.call(r,a)&&(s=!1,e(r[a],i?i+"."+a:a));s&&i&&(t[i]={})}}(e,""),t}function f(e){if(Object(e)!==e||Array.isArray(e))return e;var t=/\.?([^.[\]]+)|\[(\d+)]/g,r={};for(var i in e)if({}.hasOwnProperty.call(e,i)){for(var n=r,o="",s=t.exec(i);s;)n=n[o]||(n[o]=s[2]?[]:{}),o=s[2]||s[1],s=t.exec(i);n[o]=e[i]}return r[""]||r}function p(e){return Math.floor(e)===e||String(e).indexOf(".")<0?0:e.toString().split(".")[1].length||0}function g(e,t,r){for(var i="",n=20-(i+=e).length,o=0;o<n;o++)i+=" ";if(i+=": ",r){n=70-(i+=r).length;for(var s=0;s<n;s++)i+=" "}return t&&(i+=t),i}function E(e,t){return null!==(null==e?void 0:e.match(t))}},635:function(e,t,r){r.r(t),r.d(t,{__addDisposableResource:function(){return j},__assign:function(){return o},__asyncDelegator:function(){return C},__asyncGenerator:function(){return I},__asyncValues:function(){return O},__await:function(){return S},__awaiter:function(){return m},__classPrivateFieldGet:function(){return A},__classPrivateFieldIn:function(){return x},__classPrivateFieldSet:function(){return R},__createBinding:function(){return p},__decorate:function(){return a},__disposeResources:function(){return P},__esDecorate:function(){return l},__exportStar:function(){return g},__extends:function(){return n},__generator:function(){return f},__importDefault:function(){return L},__importStar:function(){return N},__makeTemplateObject:function(){return w},__metadata:function(){return h},__param:function(){return c},__propKey:function(){return _},__read:function(){return y},__rest:function(){return s},__runInitializers:function(){return u},__setFunctionName:function(){return d},__spread:function(){return b},__spreadArray:function(){return M},__spreadArrays:function(){return v},__values:function(){return E}});var i=function(e,t){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},i(e,t)};function n(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var o=function(){return o=Object.assign||function(e){for(var t,r=1,i=arguments.length;r<i;r++)for(var n in t=arguments[r])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},o.apply(this,arguments)};function s(e,t){var r={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(r[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(i=Object.getOwnPropertySymbols(e);n<i.length;n++)t.indexOf(i[n])<0&&Object.prototype.propertyIsEnumerable.call(e,i[n])&&(r[i[n]]=e[i[n]])}return r}function a(e,t,r,i){var n,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(o<3?n(s):o>3?n(t,r,s):n(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s}function c(e,t){return function(r,i){t(r,i,e)}}function l(e,t,r,i,n,o){function s(e){if(void 0!==e&&"function"!=typeof e)throw new TypeError("Function expected");return e}for(var a,c=i.kind,l="getter"===c?"get":"setter"===c?"set":"value",u=!t&&e?i.static?e:e.prototype:null,_=t||(u?Object.getOwnPropertyDescriptor(u,i.name):{}),d=!1,h=r.length-1;h>=0;h--){var m={};for(var f in i)m[f]="access"===f?{}:i[f];for(var f in i.access)m.access[f]=i.access[f];m.addInitializer=function(e){if(d)throw new TypeError("Cannot add initializers after decoration has completed");o.push(s(e||null))};var p=(0,r[h])("accessor"===c?{get:_.get,set:_.set}:_[l],m);if("accessor"===c){if(void 0===p)continue;if(null===p||"object"!=typeof p)throw new TypeError("Object expected");(a=s(p.get))&&(_.get=a),(a=s(p.set))&&(_.set=a),(a=s(p.init))&&n.unshift(a)}else(a=s(p))&&("field"===c?n.unshift(a):_[l]=a)}u&&Object.defineProperty(u,i.name,_),d=!0}function u(e,t,r){for(var i=arguments.length>2,n=0;n<t.length;n++)r=i?t[n].call(e,r):t[n].call(e);return i?r:void 0}function _(e){return"symbol"==typeof e?e:"".concat(e)}function d(e,t,r){return"symbol"==typeof t&&(t=t.description?"[".concat(t.description,"]"):""),Object.defineProperty(e,"name",{configurable:!0,value:r?"".concat(r," ",t):t})}function h(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function m(e,t,r,i){return new(r||(r=Promise))((function(n,o){function s(e){try{c(i.next(e))}catch(e){o(e)}}function a(e){try{c(i.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}c((i=i.apply(e,t||[])).next())}))}function f(e,t){var r,i,n,o={label:0,sent:function(){if(1&n[0])throw n[1];return n[1]},trys:[],ops:[]},s=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return s.next=a(0),s.throw=a(1),s.return=a(2),"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(a){return function(c){return function(a){if(r)throw new TypeError("Generator is already executing.");for(;s&&(s=0,a[0]&&(o=0)),o;)try{if(r=1,i&&(n=2&a[0]?i.return:a[0]?i.throw||((n=i.return)&&n.call(i),0):i.next)&&!(n=n.call(i,a[1])).done)return n;switch(i=0,n&&(a=[2&a[0],n.value]),a[0]){case 0:case 1:n=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,i=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!((n=(n=o.trys).length>0&&n[n.length-1])||6!==a[0]&&2!==a[0])){o=0;continue}if(3===a[0]&&(!n||a[1]>n[0]&&a[1]<n[3])){o.label=a[1];break}if(6===a[0]&&o.label<n[1]){o.label=n[1],n=a;break}if(n&&o.label<n[2]){o.label=n[2],o.ops.push(a);break}n[2]&&o.ops.pop(),o.trys.pop();continue}a=t.call(e,o)}catch(e){a=[6,e],i=0}finally{r=n=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,c])}}}var p=Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]};function g(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||p(t,e,r)}function E(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],i=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&i>=e.length&&(e=void 0),{value:e&&e[i++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function y(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var i,n,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(i=o.next()).done;)s.push(i.value)}catch(e){n={error:e}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return s}function b(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(y(arguments[t]));return e}function v(){for(var e=0,t=0,r=arguments.length;t<r;t++)e+=arguments[t].length;var i=Array(e),n=0;for(t=0;t<r;t++)for(var o=arguments[t],s=0,a=o.length;s<a;s++,n++)i[n]=o[s];return i}function M(e,t,r){if(r||2===arguments.length)for(var i,n=0,o=t.length;n<o;n++)!i&&n in t||(i||(i=Array.prototype.slice.call(t,0,n)),i[n]=t[n]);return e.concat(i||Array.prototype.slice.call(t))}function S(e){return this instanceof S?(this.v=e,this):new S(e)}function I(e,t,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var i,n=r.apply(e,t||[]),o=[];return i=Object.create(("function"==typeof AsyncIterator?AsyncIterator:Object).prototype),s("next"),s("throw"),s("return",(function(e){return function(t){return Promise.resolve(t).then(e,l)}})),i[Symbol.asyncIterator]=function(){return this},i;function s(e,t){n[e]&&(i[e]=function(t){return new Promise((function(r,i){o.push([e,t,r,i])>1||a(e,t)}))},t&&(i[e]=t(i[e])))}function a(e,t){try{(r=n[e](t)).value instanceof S?Promise.resolve(r.value.v).then(c,l):u(o[0][2],r)}catch(e){u(o[0][3],e)}var r}function c(e){a("next",e)}function l(e){a("throw",e)}function u(e,t){e(t),o.shift(),o.length&&a(o[0][0],o[0][1])}}function C(e){var t,r;return t={},i("next"),i("throw",(function(e){throw e})),i("return"),t[Symbol.iterator]=function(){return this},t;function i(i,n){t[i]=e[i]?function(t){return(r=!r)?{value:S(e[i](t)),done:!1}:n?n(t):t}:n}}function O(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,r=e[Symbol.asyncIterator];return r?r.call(e):(e=E(e),t={},i("next"),i("throw"),i("return"),t[Symbol.asyncIterator]=function(){return this},t);function i(r){t[r]=e[r]&&function(t){return new Promise((function(i,n){!function(e,t,r,i){Promise.resolve(i).then((function(t){e({value:t,done:r})}),t)}(i,n,(t=e[r](t)).done,t.value)}))}}}function w(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var T=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t};function N(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&p(t,e,r);return T(t,e),t}function L(e){return e&&e.__esModule?e:{default:e}}function A(e,t,r,i){if("a"===r&&!i)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?i:"a"===r?i.call(e):i?i.value:t.get(e)}function R(e,t,r,i,n){if("m"===i)throw new TypeError("Private method is not writable");if("a"===i&&!n)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===i?n.call(e,r):n?n.value=r:t.set(e,r),r}function x(e,t){if(null===t||"object"!=typeof t&&"function"!=typeof t)throw new TypeError("Cannot use 'in' operator on non-object");return"function"==typeof e?t===e:e.has(t)}function j(e,t,r){if(null!=t){if("object"!=typeof t&&"function"!=typeof t)throw new TypeError("Object expected.");var i,n;if(r){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");i=t[Symbol.asyncDispose]}if(void 0===i){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");i=t[Symbol.dispose],r&&(n=i)}if("function"!=typeof i)throw new TypeError("Object not disposable.");n&&(i=function(){try{n.call(this)}catch(e){return Promise.reject(e)}}),e.stack.push({value:t,dispose:i,async:r})}else r&&e.stack.push({async:!0});return t}var D="function"==typeof SuppressedError?SuppressedError:function(e,t,r){var i=new Error(r);return i.name="SuppressedError",i.error=e,i.suppressed=t,i};function P(e){function t(t){e.error=e.hasError?new D(t,e.error,"An error was suppressed during disposal."):t,e.hasError=!0}var r,i=0;return function n(){for(;r=e.stack.pop();)try{if(!r.async&&1===i)return i=0,e.stack.push(r),Promise.resolve().then(n);if(r.dispose){var o=r.dispose.call(r.value);if(r.async)return i|=2,Promise.resolve(o).then(n,(function(e){return t(e),n()}))}else i|=1}catch(e){t(e)}if(1===i)return e.hasError?Promise.reject(e.error):Promise.resolve();if(e.hasError)throw e.error}()}t.default={__extends:n,__assign:o,__rest:s,__decorate:a,__param:c,__metadata:h,__awaiter:m,__generator:f,__createBinding:p,__exportStar:g,__values:E,__read:y,__spread:b,__spreadArrays:v,__spreadArray:M,__await:S,__asyncGenerator:I,__asyncDelegator:C,__asyncValues:O,__makeTemplateObject:w,__importStar:N,__importDefault:L,__classPrivateFieldGet:A,__classPrivateFieldSet:R,__classPrivateFieldIn:x,__addDisposableResource:j,__disposeResources:P}}},t={};function r(i){var n=t[i];if(void 0!==n)return n.exports;var o=t[i]={exports:{}};return e[i](o,o.exports,r),o.exports}r.d=function(e,t){for(var i in t)r.o(t,i)&&!r.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var i={};r.r(i),r.d(i,{AICC:function(){return l},Scorm12API:function(){return a},Scorm2004API:function(){return c}});var n=r(916),o=r(941),s=r(809),a=o.Scorm12Impl,c=s.Scorm2004Impl,l=n.AICCImpl,u=i.AICC,_=i.Scorm12API,d=i.Scorm2004API;export{u as AICC,_ as Scorm12API,d as Scorm2004API};
1
+ var e={916:function(e,t,r){r.r(t),r.d(t,{AICC:function(){return x}});var i=r(635),n=r(941),o=r(989),s=r(340),a=r(589),c=r(784),l=s.aicc_constants.error_descriptions,u=function(e){function t(t){return{}.hasOwnProperty.call(l,String(t))?e.call(this,t,l[String(t)].basicMessage,l[String(t)].detailMessage)||this:e.call(this,101,l[101].basicMessage,l[101].detailMessage)||this}return(0,i.__extends)(t,e),t}(c.ValidationError),_=r(319),d=r(797),h=r(449);function m(e,t,r){return(0,h.checkValidFormat)(e,t,d.scorm12_errors.TYPE_MISMATCH,u,r)}var f=r(417),p=function(e){function t(){var t=e.call(this)||this;return t.comments=new g,t}return(0,i.__extends)(t,e),t.prototype.initialize=function(){var t;e.prototype.initialize.call(this),null===(t=this.comments)||void 0===t||t.initialize()},t.prototype.reset=function(){var e;this._initialized=!1,null===(e=this.comments)||void 0===e||e.reset()},t.prototype.toJSON=function(){this.jsonString=!0;var e={comments:this.comments};return delete this.jsonString,e},t}(_.BaseCMI),g=function(e){function t(){return e.call(this,{children:s.aicc_constants.comments_children,errorCode:d.scorm12_errors.INVALID_SET_VALUE,errorClass:u})||this}return(0,i.__extends)(t,e),t}(a.CMIArray),E=function(e){function t(){var t=e.call(this)||this;return t._content="",t._location="",t._time="",t}return(0,i.__extends)(t,e),t.prototype.reset=function(){this._initialized=!1,this._content="",this._location="",this._time=""},Object.defineProperty(t.prototype,"content",{get:function(){return this._content},set:function(e){m(e,f.aicc_regex.CMIString256)&&(this._content=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"location",{get:function(){return this._location},set:function(e){m(e,f.aicc_regex.CMIString256)&&(this._location=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"time",{get:function(){return this._time},set:function(e){m(e,f.aicc_regex.CMITime)&&(this._time=e)},enumerable:!1,configurable:!0}),t.prototype.toJSON=function(){this.jsonString=!0;var e={content:this.content,location:this.location,time:this.time};return delete this.jsonString,e},t}(_.BaseCMI),y=function(e){function t(){var t=e.call(this,s.aicc_constants.student_preference_children)||this;return t._lesson_type="",t._text_color="",t._text_location="",t._text_size="",t._video="",t.windows=new a.CMIArray({errorCode:d.scorm12_errors.INVALID_SET_VALUE,errorClass:u,children:""}),t}return(0,i.__extends)(t,e),t.prototype.initialize=function(){var t;e.prototype.initialize.call(this),null===(t=this.windows)||void 0===t||t.initialize()},Object.defineProperty(t.prototype,"lesson_type",{get:function(){return this._lesson_type},set:function(e){m(e,f.aicc_regex.CMIString256)&&(this._lesson_type=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"text_color",{get:function(){return this._text_color},set:function(e){m(e,f.aicc_regex.CMIString256)&&(this._text_color=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"text_location",{get:function(){return this._text_location},set:function(e){m(e,f.aicc_regex.CMIString256)&&(this._text_location=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"text_size",{get:function(){return this._text_size},set:function(e){m(e,f.aicc_regex.CMIString256)&&(this._text_size=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"video",{get:function(){return this._video},set:function(e){m(e,f.aicc_regex.CMIString256)&&(this._video=e)},enumerable:!1,configurable:!0}),t.prototype.toJSON=function(){this.jsonString=!0;var e={audio:this.audio,language:this.language,lesson_type:this.lesson_type,speed:this.speed,text:this.text,text_color:this.text_color,text_location:this.text_location,text_size:this.text_size,video:this.video,windows:this.windows};return delete this.jsonString,e},t}(r(181).CMIStudentPreference),b=function(e){function t(){var t=e.call(this)||this;return t.__children=s.aicc_constants.student_demographics_children,t._city="",t._class="",t._company="",t._country="",t._experience="",t._familiar_name="",t._instructor_name="",t._title="",t._native_language="",t._state="",t._street_address="",t._telephone="",t._years_experience="",t}return(0,i.__extends)(t,e),t.prototype.reset=function(){this._initialized=!1},Object.defineProperty(t.prototype,"_children",{get:function(){return this.__children},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"city",{get:function(){return this._city},set:function(e){if(this.initialized)throw new u(d.scorm12_errors.READ_ONLY_ELEMENT);this._city=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"class",{get:function(){return this._class},set:function(e){if(this.initialized)throw new u(d.scorm12_errors.READ_ONLY_ELEMENT);this._class=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"company",{get:function(){return this._company},set:function(e){if(this.initialized)throw new u(d.scorm12_errors.READ_ONLY_ELEMENT);this._company=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"country",{get:function(){return this._country},set:function(e){if(this.initialized)throw new u(d.scorm12_errors.READ_ONLY_ELEMENT);this._country=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"experience",{get:function(){return this._experience},set:function(e){if(this.initialized)throw new u(d.scorm12_errors.READ_ONLY_ELEMENT);this._experience=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"familiar_name",{get:function(){return this._familiar_name},set:function(e){if(this.initialized)throw new u(d.scorm12_errors.READ_ONLY_ELEMENT);this._familiar_name=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"instructor_name",{get:function(){return this._instructor_name},set:function(e){if(this.initialized)throw new u(d.scorm12_errors.READ_ONLY_ELEMENT);this._instructor_name=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"title",{get:function(){return this._title},set:function(e){if(this.initialized)throw new u(d.scorm12_errors.READ_ONLY_ELEMENT);this._title=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"native_language",{get:function(){return this._native_language},set:function(e){if(this.initialized)throw new u(d.scorm12_errors.READ_ONLY_ELEMENT);this._native_language=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"state",{get:function(){return this._state},set:function(e){if(this.initialized)throw new u(d.scorm12_errors.READ_ONLY_ELEMENT);this._state=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"street_address",{get:function(){return this._street_address},set:function(e){if(this.initialized)throw new u(d.scorm12_errors.READ_ONLY_ELEMENT);this._street_address=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"telephone",{get:function(){return this._telephone},set:function(e){if(this.initialized)throw new u(d.scorm12_errors.READ_ONLY_ELEMENT);this._telephone=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"years_experience",{get:function(){return this._years_experience},set:function(e){if(this.initialized)throw new u(d.scorm12_errors.READ_ONLY_ELEMENT);this._years_experience=e},enumerable:!1,configurable:!0}),t.prototype.toJSON=function(){this.jsonString=!0;var e={city:this.city,class:this.class,company:this.company,country:this.country,experience:this.experience,familiar_name:this.familiar_name,instructor_name:this.instructor_name,title:this.title,native_language:this.native_language,state:this.state,street_address:this.street_address,telephone:this.telephone,years_experience:this.years_experience};return delete this.jsonString,e},t}(_.BaseCMI),v=r(434),M=function(e){function t(){return e.call(this,{children:s.aicc_constants.tries_children})||this}return(0,i.__extends)(t,e),t}(a.CMIArray),S=function(e){function t(){var t=e.call(this)||this;return t._status="",t._time="",t.score=new v.CMIScore({score_children:s.aicc_constants.score_children,score_range:f.aicc_regex.score_range,invalidErrorCode:d.scorm12_errors.INVALID_SET_VALUE,invalidTypeCode:d.scorm12_errors.TYPE_MISMATCH,invalidRangeCode:d.scorm12_errors.VALUE_OUT_OF_RANGE,errorClass:u}),t}return(0,i.__extends)(t,e),t.prototype.initialize=function(){var t;e.prototype.initialize.call(this),null===(t=this.score)||void 0===t||t.initialize()},t.prototype.reset=function(){var e;this._initialized=!1,this._status="",this._time="",null===(e=this.score)||void 0===e||e.reset()},Object.defineProperty(t.prototype,"status",{get:function(){return this._status},set:function(e){m(e,f.aicc_regex.CMIStatus2)&&(this._status=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"time",{get:function(){return this._time},set:function(e){m(e,f.aicc_regex.CMITime)&&(this._time=e)},enumerable:!1,configurable:!0}),t.prototype.toJSON=function(){this.jsonString=!0;var e={status:this.status,time:this.time,score:this.score};return delete this.jsonString,e},t}(_.BaseCMI),I=r(532),C=function(e){function t(){return e.call(this,{children:s.aicc_constants.attempt_records_children})||this}return(0,i.__extends)(t,e),t}(a.CMIArray),O=function(e){function t(){var t=e.call(this)||this;return t._lesson_status="",t.score=new v.CMIScore({score_children:s.aicc_constants.score_children,score_range:f.aicc_regex.score_range,invalidErrorCode:d.scorm12_errors.INVALID_SET_VALUE,invalidTypeCode:d.scorm12_errors.TYPE_MISMATCH,invalidRangeCode:d.scorm12_errors.VALUE_OUT_OF_RANGE,errorClass:u}),t}return(0,i.__extends)(t,e),t.prototype.initialize=function(){var t;e.prototype.initialize.call(this),this._lesson_status="",null===(t=this.score)||void 0===t||t.initialize()},t.prototype.reset=function(){var e;this._initialized=!1,null===(e=this.score)||void 0===e||e.reset()},Object.defineProperty(t.prototype,"lesson_status",{get:function(){return this._lesson_status},set:function(e){m(e,f.aicc_regex.CMIStatus2)&&(this._lesson_status=e)},enumerable:!1,configurable:!0}),t.prototype.toJSON=function(){this.jsonString=!0;var e={lesson_status:this.lesson_status,score:this.score};return delete this.jsonString,e},t}(_.BaseCMI),w=function(e){function t(){var t=e.call(this,s.aicc_constants.student_data_children)||this;return t._tries_during_lesson="",t.tries=new M,t.attempt_records=new C,t}return(0,i.__extends)(t,e),t.prototype.initialize=function(){var t,r;e.prototype.initialize.call(this),null===(t=this.tries)||void 0===t||t.initialize(),null===(r=this.attempt_records)||void 0===r||r.initialize()},t.prototype.reset=function(){var e,t;this._initialized=!1,null===(e=this.tries)||void 0===e||e.reset(!0),null===(t=this.attempt_records)||void 0===t||t.reset(!0)},Object.defineProperty(t.prototype,"tries_during_lesson",{get:function(){return this._tries_during_lesson},set:function(e){if(this.initialized)throw new u(d.scorm12_errors.READ_ONLY_ELEMENT);this._tries_during_lesson=e},enumerable:!1,configurable:!0}),t.prototype.toJSON=function(){this.jsonString=!0;var e={mastery_score:this.mastery_score,max_time_allowed:this.max_time_allowed,time_limit_action:this.time_limit_action,tries:this.tries,attempt_records:this.attempt_records};return delete this.jsonString,e},t}(I.CMIStudentData),T=function(e){function t(){return e.call(this,{children:s.aicc_constants.paths_children})||this}return(0,i.__extends)(t,e),t}(a.CMIArray),N=function(e){function t(){var t=e.call(this)||this;return t._location_id="",t._date="",t._time="",t._status="",t._why_left="",t._time_in_element="",t}return(0,i.__extends)(t,e),t.prototype.reset=function(){this._initialized=!1,this._location_id="",this._date="",this._time="",this._status="",this._why_left="",this._time_in_element=""},Object.defineProperty(t.prototype,"location_id",{get:function(){return this._location_id},set:function(e){m(e,f.aicc_regex.CMIString256)&&(this._location_id=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"date",{get:function(){return this._date},set:function(e){m(e,f.aicc_regex.CMIString256)&&(this._date=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"time",{get:function(){return this._time},set:function(e){m(e,f.aicc_regex.CMITime)&&(this._time=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"status",{get:function(){return this._status},set:function(e){m(e,f.aicc_regex.CMIStatus2)&&(this._status=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"why_left",{get:function(){return this._why_left},set:function(e){m(e,f.aicc_regex.CMIString256)&&(this._why_left=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"time_in_element",{get:function(){return this._time_in_element},set:function(e){m(e,f.aicc_regex.CMITime)&&(this._time_in_element=e)},enumerable:!1,configurable:!0}),t.prototype.toJSON=function(){this.jsonString=!0;var e={location_id:this.location_id,date:this.date,time:this.time,status:this.status,why_left:this.why_left,time_in_element:this.time_in_element};return delete this.jsonString,e},t}(_.BaseCMI),L=function(e){function t(t){void 0===t&&(t=!1);var r=e.call(this,s.aicc_constants.cmi_children)||this;return t&&r.initialize(),r.student_preference=new y,r.student_data=new w,r.student_demographics=new b,r.evaluation=new p,r.paths=new T,r}return(0,i.__extends)(t,e),t.prototype.initialize=function(){var t,r,i,n,o;e.prototype.initialize.call(this),null===(t=this.student_preference)||void 0===t||t.initialize(),null===(r=this.student_data)||void 0===r||r.initialize(),null===(i=this.student_demographics)||void 0===i||i.initialize(),null===(n=this.evaluation)||void 0===n||n.initialize(),null===(o=this.paths)||void 0===o||o.initialize()},t.prototype.toJSON=function(){this.jsonString=!0;var e={suspend_data:this.suspend_data,launch_data:this.launch_data,comments:this.comments,comments_from_lms:this.comments_from_lms,core:this.core,objectives:this.objectives,student_data:this.student_data,student_preference:this.student_preference,student_demographics:this.student_demographics,interactions:this.interactions,evaluation:this.evaluation,paths:this.paths};return delete this.jsonString,e},t}(o.CMI),A=r(331),R=r(864),x=function(e){function t(t){var r=e.call(this,t)||this;return r.cmi=new L,r.nav=new A.NAV,r}return(0,i.__extends)(t,e),t.prototype.getChildElement=function(t,r,i){var n=e.prototype.getChildElement.call(this,t,r,i);return n||((0,R.stringMatches)(t,"cmi\\.evaluation\\.comments\\.\\d+")?n=new E:(0,R.stringMatches)(t,"cmi\\.student_data\\.tries\\.\\d+")?n=new S:(0,R.stringMatches)(t,"cmi\\.student_data\\.attempt_records\\.\\d+")?n=new O:(0,R.stringMatches)(t,"cmi\\.paths\\.\\d+")&&(n=new N)),n},t.prototype.replaceWithAnotherScormAPI=function(e){this.cmi=e.cmi,this.nav=e.nav},t}(n.Scorm12API)},429:function(e,t,r){r.r(t),r.d(t,{default:function(){return d}});var i=r(635),n=r(589),o=r(784),s=r(340),a=r(864),c=r(56),l={autocommit:!1,autocommitSeconds:10,asyncCommit:!1,sendFullCommit:!0,lmsCommitUrl:!1,dataCommitFormat:"json",commitRequestDataType:"application/json;charset=UTF-8",autoProgress:!1,logLevel:c.LogLevelEnum.ERROR,selfReportSessionTime:!1,alwaysSendTotalTime:!1,renderCommonCommitFields:!1,strict_errors:!0,xhrHeaders:{},xhrWithCredentials:!1,fetchMode:"cors",responseHandler:function(e){return(0,i.__awaiter)(this,void 0,void 0,(function(){var t,r;return(0,i.__generator)(this,(function(i){switch(i.label){case 0:return void 0===e?[3,2]:[4,e.text()];case 1:return t=i.sent(),r=null,t&&(r=JSON.parse(t)),null!==r&&{}.hasOwnProperty.call(r,"result")?[2,{result:r.result,errorCode:r.errorCode?r.errorCode:r.result===s.global_constants.SCORM_TRUE?0:101}]:200===e.status?[2,{result:s.global_constants.SCORM_TRUE,errorCode:0}]:[2,{result:s.global_constants.SCORM_FALSE,errorCode:101}];case 2:return[2,{result:s.global_constants.SCORM_FALSE,errorCode:101}]}}))}))},requestHandler:function(e){return e},onLogMessage:function(e,t){switch(e){case"4":case 4:case"ERROR":case c.LogLevelEnum.ERROR:console.error(t);break;case"3":case 3:case"WARN":case c.LogLevelEnum.WARN:console.warn(t);break;case"2":case 2:case"INFO":case c.LogLevelEnum.INFO:console.info(t);break;case"1":case 1:case"DEBUG":case c.LogLevelEnum.DEBUG:console.debug?console.debug(t):console.log(t)}},scoItemIds:[],scoItemIdValidator:!1,globalObjectiveIds:[]},u=function(){function e(e,t,r){this._cancelled=!1,this._API=e,this._timeout=setTimeout(this.wrapper.bind(this),t),this._callback=r}return e.prototype.cancel=function(){this._cancelled=!0,this._timeout&&clearTimeout(this._timeout)},e.prototype.wrapper=function(){this._cancelled||(0,i.__awaiter)(this,void 0,void 0,(function(){return(0,i.__generator)(this,(function(e){switch(e.label){case 0:return[4,this._API.commit(this._callback)];case 1:return[2,e.sent()]}}))}))},e}(),_=function(){function e(t,r){var n,o,a=this.constructor;if(this._settings=l,a===e)throw new TypeError("Cannot construct BaseAPI instances directly");this.currentState=s.global_constants.STATE_NOT_INITIALIZED,this.lastErrorCode="0",this.listenerArray=[],this._error_codes=t,r&&(this.settings=(0,i.__assign)((0,i.__assign)({},l),r)),this.apiLogLevel=null!==(n=this.settings.logLevel)&&void 0!==n?n:c.LogLevelEnum.ERROR,this.selfReportSessionTime=null!==(o=this.settings.selfReportSessionTime)&&void 0!==o&&o}return e.prototype.commonReset=function(e){this.apiLog("reset","Called",c.LogLevelEnum.INFO),this.settings=(0,i.__assign)((0,i.__assign)({},this.settings),e),this.clearScheduledCommit(),this.currentState=s.global_constants.STATE_NOT_INITIALIZED,this.lastErrorCode="0",this.listenerArray=[],this.startingData={}},e.prototype.initialize=function(e,t,r){var i=s.global_constants.SCORM_FALSE;return this.isInitialized()?this.throwSCORMError(this._error_codes.INITIALIZED,t):this.isTerminated()?this.throwSCORMError(this._error_codes.TERMINATED,r):(this.selfReportSessionTime&&this.cmi.setStartTime(),this.currentState=s.global_constants.STATE_INITIALIZED,this.lastErrorCode="0",i=s.global_constants.SCORM_TRUE,this.processListeners(e)),this.apiLog(e,"returned: "+i,c.LogLevelEnum.INFO),this.clearSCORMError(i),i},e.prototype.apiLog=function(e,t,r,i){t=(0,a.formatMessage)(e,t,i),r>=this.apiLogLevel&&this.settings.onLogMessage(r,t)},Object.defineProperty(e.prototype,"error_codes",{get:function(){return this._error_codes},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"settings",{get:function(){return this._settings},set:function(e){this._settings=(0,i.__assign)((0,i.__assign)({},this._settings),e)},enumerable:!1,configurable:!0}),e.prototype.terminate=function(e,t){return(0,i.__awaiter)(this,void 0,void 0,(function(){var r,n;return(0,i.__generator)(this,(function(i){switch(i.label){case 0:return r=s.global_constants.SCORM_FALSE,this.checkState(t,this._error_codes.TERMINATION_BEFORE_INIT,this._error_codes.MULTIPLE_TERMINATION)?(this.currentState=s.global_constants.STATE_TERMINATED,[4,this.storeData(!0)]):[3,2];case 1:void 0!==(n=i.sent()).errorCode&&n.errorCode>0&&this.throwSCORMError(n.errorCode),r=void 0!==n&&n.result?n.result:s.global_constants.SCORM_FALSE,t&&(this.lastErrorCode="0"),r=s.global_constants.SCORM_TRUE,this.processListeners(e),i.label=2;case 2:return this.apiLog(e,"returned: "+r,c.LogLevelEnum.INFO),this.clearSCORMError(r),[2,r]}}))}))},e.prototype.getValue=function(e,t,r){var i="";if(this.checkState(t,this._error_codes.RETRIEVE_BEFORE_INIT,this._error_codes.RETRIEVE_AFTER_TERM)){t&&(this.lastErrorCode="0");try{i=this.getCMIValue(r)}catch(e){i=this.handleValueAccessException(e,i)}this.processListeners(e,r)}return this.apiLog(e,": returned: "+i,c.LogLevelEnum.INFO,r),void 0===i?"":(this.clearSCORMError(i),i)},e.prototype.setValue=function(e,t,r,i,n){void 0!==n&&(n=String(n));var o=s.global_constants.SCORM_FALSE;if(this.checkState(r,this._error_codes.STORE_BEFORE_INIT,this._error_codes.STORE_AFTER_TERM)){r&&(this.lastErrorCode="0");try{o=this.setCMIValue(i,n)}catch(e){this.handleValueAccessException(e,o)}this.processListeners(e,i,n)}return void 0===o&&(o=s.global_constants.SCORM_FALSE),"0"===String(this.lastErrorCode)&&this.settings.autocommit&&this.scheduleCommit(1e3*this.settings.autocommitSeconds,t),this.apiLog(e,": "+n+": result: "+o,c.LogLevelEnum.INFO,i),this.clearSCORMError(o),o},e.prototype.commit=function(e){return(0,i.__awaiter)(this,arguments,void 0,(function(e,t){var r,n;return void 0===t&&(t=!1),(0,i.__generator)(this,(function(i){switch(i.label){case 0:return this.clearScheduledCommit(),r=s.global_constants.SCORM_FALSE,this.checkState(t,this._error_codes.COMMIT_BEFORE_INIT,this._error_codes.COMMIT_AFTER_TERM)?[4,this.storeData(!1)]:[3,2];case 1:(n=i.sent()).errorCode&&n.errorCode>0&&this.throwSCORMError(n.errorCode),r=void 0!==n&&n.result?n.result:s.global_constants.SCORM_FALSE,this.apiLog(e," Result: "+r,c.LogLevelEnum.DEBUG,"HttpRequest"),t&&(this.lastErrorCode="0"),this.processListeners(e),i.label=2;case 2:return this.apiLog(e,"returned: "+r,c.LogLevelEnum.INFO),this.clearSCORMError(r),[2,r]}}))}))},e.prototype.getLastError=function(e){var t=String(this.lastErrorCode);return this.processListeners(e),this.apiLog(e,"returned: "+t,c.LogLevelEnum.INFO),t},e.prototype.getErrorString=function(e,t){var r="";return null!==t&&""!==t&&(r=this.getLmsErrorMessageDetails(t),this.processListeners(e)),this.apiLog(e,"returned: "+r,c.LogLevelEnum.INFO),r},e.prototype.getDiagnostic=function(e,t){var r="";return null!==t&&""!==t&&(r=this.getLmsErrorMessageDetails(t,!0),this.processListeners(e)),this.apiLog(e,"returned: "+r,c.LogLevelEnum.INFO),r},e.prototype.checkState=function(e,t,r){return this.isNotInitialized()?(this.throwSCORMError(t),!1):!e||!this.isTerminated()||(this.throwSCORMError(r),!1)},e.prototype.getLmsErrorMessageDetails=function(e,t){throw void 0===t&&(t=!1),new Error("The getLmsErrorMessageDetails method has not been implemented")},e.prototype.getCMIValue=function(e){throw new Error("The getCMIValue method has not been implemented")},e.prototype.setCMIValue=function(e,t){throw new Error("The setCMIValue method has not been implemented")},e.prototype._commonSetCMIValue=function(e,t,r,o){if(!r||""===r)return s.global_constants.SCORM_FALSE;for(var l=r.split("."),u=this,_=s.global_constants.SCORM_FALSE,d=!1,h="The data model element passed to ".concat(e," (").concat(r,") is not a valid SCORM data model element."),m=t?this._error_codes.UNDEFINED_DATA_MODEL:this._error_codes.GENERAL,f=0;f<l.length;f++){var p=l[f];if(f===l.length-1)t&&"{target="===p.substring(0,8)?this.isInitialized()?this.throwSCORMError(this._error_codes.READ_ONLY_ELEMENT):u=(0,i.__assign)((0,i.__assign)({},u),{attribute:o}):this._checkObjectHasProperty(u,p)?((0,a.stringMatches)(r,"\\.correct_responses\\.\\d+")&&this.isInitialized()&&this.validateCorrectResponse(r,o),t&&"0"!==this.lastErrorCode||(u[p]=o,_=s.global_constants.SCORM_TRUE)):this.throwSCORMError(m,h);else{if(!(u=u[p])){this.throwSCORMError(m,h);break}if(u instanceof n.CMIArray){var g=parseInt(l[f+1],10);if(!isNaN(g)){var E=u.childArray[g];if(E)u=E,d=!0;else{var y=this.getChildElement(r,o,d);d=!0,y?(u.initialized&&y.initialize(),u.childArray.push(y),u=y):this.throwSCORMError(m,h)}f++}}}}return _===s.global_constants.SCORM_FALSE&&this.apiLog(e,"There was an error setting the value for: ".concat(r,", value of: ").concat(o),c.LogLevelEnum.WARN),_},e.prototype._commonGetCMIValue=function(e,t,r){if(!r||""===r)return"";for(var i=r.split("."),o=this,s=null,a="The data model element passed to ".concat(e," (").concat(r,") has not been initialized."),c="The data model element passed to ".concat(e," (").concat(r,") is not a valid SCORM data model element."),l=t?this._error_codes.UNDEFINED_DATA_MODEL:this._error_codes.GENERAL,u=0;u<i.length;u++){if(s=i[u],t){if("{target="===String(s).substring(0,8)&&"function"==typeof o._isTargetValid){var _=String(s).substring(8,String(s).length-9);return o._isTargetValid(_)}if(!this._checkObjectHasProperty(o,s))return void this.throwSCORMError(l,c)}else if(u===i.length-1&&!this._checkObjectHasProperty(o,s))return void this.throwSCORMError(l,c);if(void 0===(o=o[s])){this.throwSCORMError(l,c);break}if(o instanceof n.CMIArray){var d=parseInt(i[u+1],10);if(!isNaN(d)){var h=o.childArray[d];if(!h){this.throwSCORMError(this._error_codes.VALUE_NOT_INITIALIZED,a);break}o=h,u++}}}if(null!=o)return o;t||("_children"===s?this.throwSCORMError(this._error_codes.CHILDREN_ERROR):"_count"===s&&this.throwSCORMError(this._error_codes.COUNT_ERROR))},e.prototype.isInitialized=function(){return this.currentState===s.global_constants.STATE_INITIALIZED},e.prototype.isNotInitialized=function(){return this.currentState===s.global_constants.STATE_NOT_INITIALIZED},e.prototype.isTerminated=function(){return this.currentState===s.global_constants.STATE_TERMINATED},e.prototype.on=function(e,t){if(t)for(var r=e.split(" "),i=0;i<r.length;i++){var n=r[i].split(".");if(0===n.length)return;var o=n[0],s=null;n.length>1&&(s=e.replace(o+".","")),this.listenerArray.push({functionName:o,CMIElement:s,callback:t}),this.apiLog("on","Added event listener: ".concat(this.listenerArray.length),c.LogLevelEnum.INFO,o)}},e.prototype.off=function(e,t){if(t)for(var r=e.split(" "),i=function(i){var o=r[i].split(".");if(0===o.length)return{value:void 0};var s=o[0],a=null;o.length>1&&(a=e.replace(s+".",""));var l=n.listenerArray.findIndex((function(e){return e.functionName===s&&e.CMIElement===a&&e.callback===t}));-1!==l&&(n.listenerArray.splice(l,1),n.apiLog("off","Removed event listener: ".concat(n.listenerArray.length),c.LogLevelEnum.INFO,s))},n=this,o=0;o<r.length;o++){var s=i(o);if("object"==typeof s)return s.value}},e.prototype.clear=function(e){for(var t=e.split(" "),r=function(r){var n=t[r].split(".");if(0===n.length)return{value:void 0};var o=n[0],s=null;n.length>1&&(s=e.replace(o+".","")),i.listenerArray=i.listenerArray.filter((function(e){return e.functionName!==o&&e.CMIElement!==s}))},i=this,n=0;n<t.length;n++){var o=r(n);if("object"==typeof o)return o.value}},e.prototype.processListeners=function(e,t,r){this.apiLog(e,r,c.LogLevelEnum.INFO,t);for(var i=0;i<this.listenerArray.length;i++){var n,o=this.listenerArray[i],s=o.functionName===e,a=!!o.CMIElement;n=t&&o.CMIElement&&"*"===o.CMIElement.substring(o.CMIElement.length-1)?0===t.indexOf(o.CMIElement.substring(0,o.CMIElement.length-1)):o.CMIElement===t,!s||a&&!n||(this.apiLog("processListeners","Processing listener: ".concat(o.functionName),c.LogLevelEnum.INFO,t),o.callback(t,r))}},e.prototype.throwSCORMError=function(e,t){t||(t=this.getLmsErrorMessageDetails(e)),this.apiLog("throwSCORMError",e+": "+t,c.LogLevelEnum.ERROR),this.lastErrorCode=String(e)},e.prototype.clearSCORMError=function(e){void 0!==e&&e!==s.global_constants.SCORM_FALSE&&(this.lastErrorCode="0")},e.prototype.loadFromFlattenedJSON=function(e,t){var r=this;if(t||(t=""),this.isNotInitialized()){var i,n=/^(cmi\.interactions\.)(\d+)\.(.*)$/,o=/^(cmi\.objectives\.)(\d+)\.(.*)$/,s=Object.keys(e).map((function(t){return[String(t),e[t]]}));s.sort((function(e,t){var r,i=e[0],s=(e[1],t[0]);return t[1],null!==(r=c(i,s,n))||null!==(r=c(i,s,o))?r:i<s?-1:i>s?1:0})),s.forEach((function(e){(i={})[e[0]]=e[1],r.loadFromJSON((0,a.unflatten)(i),t)}))}else console.error("loadFromFlattenedJSON can only be called before the call to lmsInitialize.");function c(e,t,r){var i,n=e.match(r);if(null!==n&&null!==(i=t.match(r))){var o=Number(n[2]),s=Number(i[2]);return o===s?"id"===n[3]?-1:"type"===n[3]?"id"===i[3]?1:-1:1:o-s}return null}},e.prototype.loadFromJSON=function(e,t){if(void 0===t&&(t=""),t&&""!==t||Object.hasOwnProperty.call(e,"cmi")||Object.hasOwnProperty.call(e,"adl")||(t="cmi"),this.isNotInitialized()){for(var r in t=void 0!==t?t:"cmi",this.startingData=e,e)if({}.hasOwnProperty.call(e,r)&&e[r]){var i=(t?t+".":"")+r,n=e[r];if(n.childArray)for(var o=0;o<n.childArray.length;o++)this.loadFromJSON(n.childArray[o],i+"."+o);else n.constructor===Object?this.loadFromJSON(n,i):this.setCMIValue(i,n)}}else console.error("loadFromJSON can only be called before the call to lmsInitialize.")},e.prototype.renderCMIToJSONString=function(){var e=this.cmi;return this.settings.sendFullCommit?JSON.stringify({cmi:e}):JSON.stringify({cmi:e},(function(e,t){return void 0===t?null:t}),2)},e.prototype.renderCMIToJSONObject=function(){return JSON.parse(this.renderCMIToJSONString())},e.prototype.processHttpRequest=function(e,t){return(0,i.__awaiter)(this,arguments,void 0,(function(e,t,r){var n,o,a,l=this;return void 0===r&&(r=!1),(0,i.__generator)(this,(function(u){switch(u.label){case 0:return n=this,o={result:s.global_constants.SCORM_FALSE,errorCode:this.error_codes.GENERAL},r?(this.performFetch(e,t).then((function(e){return(0,i.__awaiter)(l,void 0,void 0,(function(){return(0,i.__generator)(this,(function(t){switch(t.label){case 0:return[4,this.transformResponse(e)];case 1:return t.sent(),[2]}}))}))})),[2,{result:s.global_constants.SCORM_TRUE,errorCode:0}]):(a=function(e,t,r){return(0,i.__awaiter)(l,void 0,void 0,(function(){var s,a;return(0,i.__generator)(this,(function(i){switch(i.label){case 0:return i.trys.push([0,2,,3]),t=r.requestHandler(t),[4,this.performFetch(e,t)];case 1:return s=i.sent(),[2,this.transformResponse(s)];case 2:return a=i.sent(),this.apiLog("processHttpRequest",a,c.LogLevelEnum.ERROR),n.processListeners("CommitError"),[2,o];case 3:return[2]}}))}))},[4,a(e,t,this.settings)]);case 1:return[2,u.sent()]}}))}))},e.prototype.scheduleCommit=function(e,t){this._timeout||(this._timeout=new u(this,e,t),this.apiLog("scheduleCommit","scheduled",c.LogLevelEnum.DEBUG,""))},e.prototype.clearScheduledCommit=function(){this._timeout&&(this._timeout.cancel(),this._timeout=void 0,this.apiLog("clearScheduledCommit","cleared",c.LogLevelEnum.DEBUG,""))},e.prototype._checkObjectHasProperty=function(e,t){return Object.hasOwnProperty.call(e,t)||null!=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(e),t)||t in e},e.prototype.handleValueAccessException=function(e,t){return e instanceof o.ValidationError?(this.lastErrorCode=String(e.errorCode),t=s.global_constants.SCORM_FALSE):(e instanceof Error&&e.message?console.error(e.message):console.error(e),this.throwSCORMError(this._error_codes.GENERAL)),t},e.prototype.getCommitObject=function(e){var t=e||this.settings.alwaysSendTotalTime,r=this.settings.renderCommonCommitFields?this.renderCommitObject(t):this.renderCommitCMI(t);return[c.LogLevelEnum.DEBUG,"1",1,"DEBUG"].includes(this.apiLogLevel)&&(console.debug("Commit (terminated: "+(e?"yes":"no")+"): "),console.debug(r)),r},e.prototype.performFetch=function(e,t){return(0,i.__awaiter)(this,void 0,void 0,(function(){var r;return(0,i.__generator)(this,(function(n){return r={method:"POST",mode:this.settings.fetchMode,body:t instanceof Array?t.join("&"):JSON.stringify(t),headers:(0,i.__assign)((0,i.__assign)({},this.settings.xhrHeaders),{"Content-Type":this.settings.commitRequestDataType}),keepalive:!0},this.settings.xhrWithCredentials&&(r=(0,i.__assign)((0,i.__assign)({},r),{credentials:"include"})),[2,fetch(e,r)]}))}))},e.prototype.transformResponse=function(e){return(0,i.__awaiter)(this,void 0,void 0,(function(){var t,r;return(0,i.__generator)(this,(function(i){switch(i.label){case 0:return"function"!=typeof this.settings.responseHandler?[3,2]:[4,this.settings.responseHandler(e)];case 1:return r=i.sent(),[3,4];case 2:return[4,e.json()];case 3:r=i.sent(),i.label=4;case 4:return t=r,e.status>=200&&e.status<=299&&(!0===t.result||t.result===s.global_constants.SCORM_TRUE)?this.processListeners("CommitSuccess"):this.processListeners("CommitError"),[2,t]}}))}))},e}(),d=_},941:function(e,t,r){r.r(t),r.d(t,{Scorm12API:function(){return m}});var i=r(635),n=r(989),o=r(864),s=r(340),a=r(797),c=r(176),l=r(833),u=r(331),_=r(56),d=r(429),h=r(417),m=function(e){function t(t){var r=this;return t&&void 0===t.mastery_override&&(t.mastery_override=!1),(r=e.call(this,a.scorm12_errors,t)||this).statusSetByModule=!1,r.cmi=new n.CMI,r.nav=new u.NAV,r.LMSInitialize=r.lmsInitialize,r.LMSFinish=r.lmsFinish,r.LMSGetValue=r.lmsGetValue,r.LMSSetValue=r.lmsSetValue,r.LMSCommit=r.lmsCommit,r.LMSGetLastError=r.lmsGetLastError,r.LMSGetErrorString=r.lmsGetErrorString,r.LMSGetDiagnostic=r.lmsGetDiagnostic,r}return(0,i.__extends)(t,e),t.prototype.reset=function(e){var t,r;this.commonReset(e),null===(t=this.cmi)||void 0===t||t.reset(),null===(r=this.nav)||void 0===r||r.reset()},t.prototype.lmsInitialize=function(){return this.cmi.initialize(),this.cmi.core.lesson_status?this.statusSetByModule=!0:this.cmi.core.lesson_status="not attempted",this.initialize("LMSInitialize","LMS was already initialized!","LMS is already finished!")},t.prototype.lmsFinish=function(){return(0,i.__awaiter)(this,void 0,void 0,(function(){return(0,i.__generator)(this,(function(e){switch(e.label){case 0:return[4,this.internalFinish()];case 1:return e.sent(),[2]}}))})),s.global_constants.SCORM_TRUE},t.prototype.internalFinish=function(){return(0,i.__awaiter)(this,void 0,void 0,(function(){var e;return(0,i.__generator)(this,(function(t){switch(t.label){case 0:return[4,this.terminate("LMSFinish",!0)];case 1:return(e=t.sent())===s.global_constants.SCORM_TRUE&&(""!==this.nav.event?"continue"===this.nav.event?this.processListeners("SequenceNext"):this.processListeners("SequencePrevious"):this.settings.autoProgress&&this.processListeners("SequenceNext")),[2,e]}}))}))},t.prototype.lmsGetValue=function(e){return this.getValue("LMSGetValue",!1,e)},t.prototype.lmsSetValue=function(e,t){return"cmi.core.lesson_status"===e&&(this.statusSetByModule=!0),this.setValue("LMSSetValue","LMSCommit",!1,e,t)},t.prototype.lmsCommit=function(){return this.settings.asyncCommit?this.scheduleCommit(500,"LMSCommit"):(0,i.__awaiter)(this,void 0,void 0,(function(){return(0,i.__generator)(this,(function(e){switch(e.label){case 0:return[4,this.commit("LMSCommit",!1)];case 1:return e.sent(),[2]}}))})),s.global_constants.SCORM_TRUE},t.prototype.lmsGetLastError=function(){return this.getLastError("LMSGetLastError")},t.prototype.lmsGetErrorString=function(e){return this.getErrorString("LMSGetErrorString",e)},t.prototype.lmsGetDiagnostic=function(e){return this.getDiagnostic("LMSGetDiagnostic",e)},t.prototype.setCMIValue=function(e,t){return this._commonSetCMIValue("LMSSetValue",!1,e,t)},t.prototype.getCMIValue=function(e){return this._commonGetCMIValue("getCMIValue",!1,e)},t.prototype.getChildElement=function(e,t,r){return(0,o.stringMatches)(e,"cmi\\.objectives\\.\\d+")?new c.CMIObjectivesObject:r&&(0,o.stringMatches)(e,"cmi\\.interactions\\.\\d+\\.correct_responses\\.\\d+")?new l.CMIInteractionsCorrectResponsesObject:r&&(0,o.stringMatches)(e,"cmi\\.interactions\\.\\d+\\.objectives\\.\\d+")?new l.CMIInteractionsObjectivesObject:!r&&(0,o.stringMatches)(e,"cmi\\.interactions\\.\\d+")?new l.CMIInteractionsObject:null},t.prototype.validateCorrectResponse=function(e,t){},t.prototype.getLmsErrorMessageDetails=function(e,t){var r="No Error",i="No Error";return e=String(e),s.scorm12_constants.error_descriptions[e]&&(r=s.scorm12_constants.error_descriptions[e].basicMessage,i=s.scorm12_constants.error_descriptions[e].detailMessage),t?i:r},t.prototype.replaceWithAnotherScormAPI=function(e){this.cmi=e.cmi},t.prototype.renderCommitCMI=function(e){var t=this.renderCMIToJSONObject();e&&(t.cmi.core.total_time=this.cmi.getCurrentTotalTime());var r=[],i=o.flatten(t);switch(this.settings.dataCommitFormat){case"flattened":return o.flatten(t);case"params":for(var n in i)({}).hasOwnProperty.call(i,n)&&r.push("".concat(n,"=").concat(i[n]));return r;default:return t}},t.prototype.renderCommitObject=function(e){var t=this.renderCommitCMI(e),r=this.cmi.getCurrentTotalTime(),i=o.getTimeAsSeconds(r,h.scorm12_regex.CMITimespan),n=this.cmi.core.lesson_status,s=_.CompletionStatus.unknown,a=_.SuccessStatus.unknown;n&&(s="completed"===n||"passed"===n?_.CompletionStatus.completed:_.CompletionStatus.incomplete,"passed"===n?a=_.SuccessStatus.passed:"failed"===n&&(a=_.SuccessStatus.failed));var c=this.cmi.core.score,l={};c&&(Number.isNaN(Number.parseFloat(c.raw))||(l.raw=Number.parseFloat(c.raw)),Number.isNaN(Number.parseFloat(c.min))||(l.min=Number.parseFloat(c.min)),Number.isNaN(Number.parseFloat(c.max))||(l.max=Number.parseFloat(c.max)));var u={successStatus:a,completionStatus:s,runtimeData:t,totalTimeSeconds:i};return l&&(u.score=l),u},t.prototype.storeData=function(e){return(0,i.__awaiter)(this,void 0,void 0,(function(){var t,r,n,o,a;return(0,i.__generator)(this,(function(i){switch(i.label){case 0:return e&&(t=this.cmi.core.lesson_status,this.cmi.core.lesson_status&&(this.statusSetByModule||"not attempted"!==this.cmi.core.lesson_status)||(this.cmi.core.lesson_status="completed"),"normal"===this.cmi.core.lesson_mode?"credit"===this.cmi.core.credit&&this.settings.mastery_override&&""!==this.cmi.student_data.mastery_score&&""!==this.cmi.core.score.raw&&(this.cmi.core.lesson_status=parseFloat(this.cmi.core.score.raw)>=parseFloat(this.cmi.student_data.mastery_score)?"passed":"failed"):"browse"===this.cmi.core.lesson_mode&&""===((null===(a=null===(o=null===(n=this.startingData)||void 0===n?void 0:n.cmi)||void 0===o?void 0:o.core)||void 0===a?void 0:a.lesson_status)||"")&&"not attempted"===t&&(this.cmi.core.lesson_status="browsed")),r=this.getCommitObject(e),"string"!=typeof this.settings.lmsCommitUrl?[3,2]:[4,this.processHttpRequest(this.settings.lmsCommitUrl,r,e)];case 1:return[2,i.sent()];case 2:return[2,{result:s.global_constants.SCORM_TRUE,errorCode:0}]}}))}))},t}(d.default)},809:function(e,t,r){r.r(t),r.d(t,{Scorm2004API:function(){return z}});var i=r(635),n=r(429),o=r(340),s=r(417),a=r(797),c=r(784),l=o.scorm2004_constants.error_descriptions,u=function(e){function t(t){return{}.hasOwnProperty.call(l,String(t))?e.call(this,t,l[String(t)].basicMessage,l[String(t)].detailMessage)||this:e.call(this,101,l[101].basicMessage,l[101].detailMessage)||this}return(0,i.__extends)(t,e),t}(c.ValidationError),_=r(864),d=r(319),h=r(449);function m(e,t,r){return(0,h.checkValidFormat)(e,t,a.scorm2004_errors.TYPE_MISMATCH,u,r)}function f(e,t){return(0,h.checkValidRange)(e,t,a.scorm2004_errors.VALUE_OUT_OF_RANGE,u)}var p=function(e){function t(){var t=e.call(this)||this;return t.__children=o.scorm2004_constants.student_preference_children,t._audio_level="1",t._language="",t._delivery_speed="1",t._audio_captioning="0",t}return(0,i.__extends)(t,e),t.prototype.reset=function(){this._initialized=!1},Object.defineProperty(t.prototype,"_children",{get:function(){return this.__children},set:function(e){throw new u(a.scorm2004_errors.READ_ONLY_ELEMENT)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"audio_level",{get:function(){return this._audio_level},set:function(e){m(e,s.scorm2004_regex.CMIDecimal)&&f(e,s.scorm2004_regex.audio_range)&&(this._audio_level=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"language",{get:function(){return this._language},set:function(e){m(e,s.scorm2004_regex.CMILang)&&(this._language=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"delivery_speed",{get:function(){return this._delivery_speed},set:function(e){m(e,s.scorm2004_regex.CMIDecimal)&&f(e,s.scorm2004_regex.speed_range)&&(this._delivery_speed=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"audio_captioning",{get:function(){return this._audio_captioning},set:function(e){m(e,s.scorm2004_regex.CMISInteger)&&f(e,s.scorm2004_regex.text_range)&&(this._audio_captioning=e)},enumerable:!1,configurable:!0}),t.prototype.toJSON=function(){this.jsonString=!0;var e={audio_level:this.audio_level,language:this.language,delivery_speed:this.delivery_speed,audio_captioning:this.audio_captioning};return delete this.jsonString,e},t}(d.BaseCMI),g=r(589),E={"true-false":{format:"^true$|^false$",max:1,delimiter:"",unique:!1},choice:{format:s.scorm2004_regex.CMILongIdentifier,max:36,delimiter:"[,]",unique:!0},"fill-in":{format:s.scorm2004_regex.CMILangString250,max:10,delimiter:"[,]",unique:!1},"long-fill-in":{format:s.scorm2004_regex.CMILangString4000,max:1,delimiter:"",unique:!1},matching:{format:s.scorm2004_regex.CMIShortIdentifier,format2:s.scorm2004_regex.CMIShortIdentifier,max:36,delimiter:"[,]",delimiter2:"[.]",unique:!1},performance:{format:"^$|"+s.scorm2004_regex.CMIShortIdentifier,format2:s.scorm2004_regex.CMIDecimal+"|^$|"+s.scorm2004_regex.CMIShortIdentifier,max:250,delimiter:"[,]",delimiter2:"[.]",unique:!1},sequencing:{format:s.scorm2004_regex.CMIShortIdentifier,max:36,delimiter:"[,]",unique:!1},likert:{format:s.scorm2004_regex.CMIShortIdentifier,max:1,delimiter:"",unique:!1},numeric:{format:s.scorm2004_regex.CMIDecimal,max:1,delimiter:"",unique:!1},other:{format:s.scorm2004_regex.CMIString4000,max:1,delimiter:"",unique:!1}},y={"true-false":{max:1,delimiter:"",unique:!1,duplicate:!1,format:"^true$|^false$",limit:1},choice:{max:36,delimiter:"[,]",unique:!0,duplicate:!1,format:s.scorm2004_regex.CMILongIdentifier},"fill-in":{max:10,delimiter:"[,]",unique:!1,duplicate:!1,format:s.scorm2004_regex.CMILangString250cr},"long-fill-in":{max:1,delimiter:"",unique:!1,duplicate:!0,format:s.scorm2004_regex.CMILangString4000},matching:{max:36,delimiter:"[,]",delimiter2:"[.]",unique:!1,duplicate:!1,format:s.scorm2004_regex.CMIShortIdentifier,format2:s.scorm2004_regex.CMIShortIdentifier},performance:{max:250,delimiter:"[,]",delimiter2:"[.]",delimiter3:"[:]",unique:!1,duplicate:!1,format:"^$|"+s.scorm2004_regex.CMIShortIdentifier,format2:s.scorm2004_regex.CMIDecimal+"|^$|"+s.scorm2004_regex.CMIShortIdentifier},sequencing:{max:36,delimiter:"[,]",unique:!1,duplicate:!1,format:s.scorm2004_regex.CMIShortIdentifier},likert:{max:1,delimiter:"",unique:!1,duplicate:!1,format:s.scorm2004_regex.CMIShortIdentifier,limit:1},numeric:{max:2,delimiter:"[:]",unique:!1,duplicate:!1,format:s.scorm2004_regex.CMIDecimal,limit:1},other:{max:1,delimiter:"",unique:!1,duplicate:!1,format:s.scorm2004_regex.CMIString4000,limit:1}},b=function(e){function t(){return e.call(this,{children:o.scorm2004_constants.interactions_children,errorCode:a.scorm2004_errors.READ_ONLY_ELEMENT,errorClass:u})||this}return(0,i.__extends)(t,e),t}(g.CMIArray),v=function(e){function t(){var t=e.call(this)||this;return t._id="",t._type="",t._timestamp="",t._weighting="",t._learner_response="",t._result="",t._latency="",t._description="",t.objectives=new g.CMIArray({errorCode:a.scorm2004_errors.READ_ONLY_ELEMENT,errorClass:u,children:o.scorm2004_constants.objectives_children}),t.correct_responses=new g.CMIArray({errorCode:a.scorm2004_errors.READ_ONLY_ELEMENT,errorClass:u,children:o.scorm2004_constants.correct_responses_children}),t}return(0,i.__extends)(t,e),t.prototype.initialize=function(){var t,r;e.prototype.initialize.call(this),null===(t=this.objectives)||void 0===t||t.initialize(),null===(r=this.correct_responses)||void 0===r||r.initialize()},t.prototype.reset=function(){this._initialized=!1,this._id="",this._type="",this._timestamp="",this._weighting="",this._learner_response="",this._result="",this._latency="",this._description="",this.objectives=new g.CMIArray({errorCode:a.scorm2004_errors.READ_ONLY_ELEMENT,errorClass:u,children:o.scorm2004_constants.objectives_children}),this.correct_responses=new g.CMIArray({errorCode:a.scorm2004_errors.READ_ONLY_ELEMENT,errorClass:u,children:o.scorm2004_constants.correct_responses_children})},Object.defineProperty(t.prototype,"id",{get:function(){return this._id},set:function(e){m(e,s.scorm2004_regex.CMILongIdentifier)&&(this._id=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"type",{get:function(){return this._type},set:function(e){if(this.initialized&&""===this._id)throw new u(a.scorm2004_errors.DEPENDENCY_NOT_ESTABLISHED);m(e,s.scorm2004_regex.CMIType)&&(this._type=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"timestamp",{get:function(){return this._timestamp},set:function(e){if(this.initialized&&""===this._id)throw new u(a.scorm2004_errors.DEPENDENCY_NOT_ESTABLISHED);m(e,s.scorm2004_regex.CMITime)&&(this._timestamp=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"weighting",{get:function(){return this._weighting},set:function(e){if(this.initialized&&""===this._id)throw new u(a.scorm2004_errors.DEPENDENCY_NOT_ESTABLISHED);m(e,s.scorm2004_regex.CMIDecimal)&&(this._weighting=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"learner_response",{get:function(){return this._learner_response},set:function(e){if(this.initialized&&(""===this._type||""===this._id))throw new u(a.scorm2004_errors.DEPENDENCY_NOT_ESTABLISHED);var t=[],r=E[this.type];if(!r)throw new u(a.scorm2004_errors.TYPE_MISMATCH);if((null==r?void 0:r.delimiter)?t=e.split(r.delimiter):t[0]=e,!(t.length>0&&t.length<=r.max))throw new u(a.scorm2004_errors.GENERAL_SET_FAILURE);for(var i=new RegExp(r.format),n=0;n<t.length;n++)if(null==r?void 0:r.delimiter2){var o=t[n].split(r.delimiter2);if(2!==o.length)throw new u(a.scorm2004_errors.TYPE_MISMATCH);if(!o[0].match(i))throw new u(a.scorm2004_errors.TYPE_MISMATCH);if(!r.format2||!o[1].match(new RegExp(r.format2)))throw new u(a.scorm2004_errors.TYPE_MISMATCH)}else{if(!t[n].match(i))throw new u(a.scorm2004_errors.TYPE_MISMATCH);if(""!==t[n]&&r.unique)for(var s=0;s<n;s++)if(t[n]===t[s])throw new u(a.scorm2004_errors.TYPE_MISMATCH)}this._learner_response=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"result",{get:function(){return this._result},set:function(e){m(e,s.scorm2004_regex.CMIResult)&&(this._result=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"latency",{get:function(){return this._latency},set:function(e){if(this.initialized&&""===this._id)throw new u(a.scorm2004_errors.DEPENDENCY_NOT_ESTABLISHED);m(e,s.scorm2004_regex.CMITimespan)&&(this._latency=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"description",{get:function(){return this._description},set:function(e){if(this.initialized&&""===this._id)throw new u(a.scorm2004_errors.DEPENDENCY_NOT_ESTABLISHED);m(e,s.scorm2004_regex.CMILangString250,!0)&&(this._description=e)},enumerable:!1,configurable:!0}),t.prototype.toJSON=function(){this.jsonString=!0;var e={id:this.id,type:this.type,objectives:this.objectives,timestamp:this.timestamp,weighting:this.weighting,learner_response:this.learner_response,result:this.result,latency:this.latency,description:this.description,correct_responses:this.correct_responses};return delete this.jsonString,e},t}(d.BaseCMI),M=function(e){function t(){var t=e.call(this)||this;return t._id="",t}return(0,i.__extends)(t,e),t.prototype.reset=function(){this._initialized=!1,this._id=""},Object.defineProperty(t.prototype,"id",{get:function(){return this._id},set:function(e){m(e,s.scorm2004_regex.CMILongIdentifier)&&(this._id=e)},enumerable:!1,configurable:!0}),t.prototype.toJSON=function(){this.jsonString=!0;var e={id:this.id};return delete this.jsonString,e},t}(d.BaseCMI),S=function(e){function t(){var t=e.call(this)||this;return t._pattern="",t}return(0,i.__extends)(t,e),t.prototype.reset=function(){this._initialized=!1,this._pattern=""},Object.defineProperty(t.prototype,"pattern",{get:function(){return this._pattern},set:function(e){m(e,s.scorm2004_regex.CMIFeedback)&&(this._pattern=e)},enumerable:!1,configurable:!0}),t.prototype.toJSON=function(){this.jsonString=!0;var e={pattern:this.pattern};return delete this.jsonString,e},t}(d.BaseCMI),I=function(e){function t(){var t=e.call(this,{score_children:o.scorm2004_constants.score_children,max:"",invalidErrorCode:a.scorm2004_errors.READ_ONLY_ELEMENT,invalidTypeCode:a.scorm2004_errors.TYPE_MISMATCH,invalidRangeCode:a.scorm2004_errors.VALUE_OUT_OF_RANGE,decimalRegex:s.scorm2004_regex.CMIDecimal,errorClass:u})||this;return t._scaled="",t}return(0,i.__extends)(t,e),t.prototype.reset=function(){this._initialized=!1,this._scaled="",this._raw="",this._min="",this._max=""},Object.defineProperty(t.prototype,"scaled",{get:function(){return this._scaled},set:function(e){m(e,s.scorm2004_regex.CMIDecimal)&&f(e,s.scorm2004_regex.scaled_range)&&(this._scaled=e)},enumerable:!1,configurable:!0}),t.prototype.toJSON=function(){this.jsonString=!0;var e={scaled:this.scaled,raw:this.raw,min:this.min,max:this.max};return delete this.jsonString,e},t}(r(434).CMIScore),C=function(e){function t(){return e.call(this,{children:o.scorm2004_constants.comments_children,errorCode:a.scorm2004_errors.READ_ONLY_ELEMENT,errorClass:u})||this}return(0,i.__extends)(t,e),t}(g.CMIArray),O=function(e){function t(){return e.call(this,{children:o.scorm2004_constants.comments_children,errorCode:a.scorm2004_errors.READ_ONLY_ELEMENT,errorClass:u})||this}return(0,i.__extends)(t,e),t}(g.CMIArray),w=function(e){function t(t){void 0===t&&(t=!1);var r=e.call(this)||this;return r._comment="",r._location="",r._timestamp="",r._comment="",r._location="",r._timestamp="",r._readOnlyAfterInit=t,r}return(0,i.__extends)(t,e),t.prototype.reset=function(){this._initialized=!1},Object.defineProperty(t.prototype,"comment",{get:function(){return this._comment},set:function(e){if(this.initialized&&this._readOnlyAfterInit)throw new u(a.scorm2004_errors.READ_ONLY_ELEMENT);m(e,s.scorm2004_regex.CMILangString4000,!0)&&(this._comment=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"location",{get:function(){return this._location},set:function(e){if(this.initialized&&this._readOnlyAfterInit)throw new u(a.scorm2004_errors.READ_ONLY_ELEMENT);m(e,s.scorm2004_regex.CMIString250)&&(this._location=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"timestamp",{get:function(){return this._timestamp},set:function(e){if(this.initialized&&this._readOnlyAfterInit)throw new u(a.scorm2004_errors.READ_ONLY_ELEMENT);m(e,s.scorm2004_regex.CMITime)&&(this._timestamp=e)},enumerable:!1,configurable:!0}),t.prototype.toJSON=function(){this.jsonString=!0;var e={comment:this.comment,location:this.location,timestamp:this.timestamp};return delete this.jsonString,e},t}(d.BaseCMI),T=function(e){function t(){return e.call(this,{children:o.scorm2004_constants.objectives_children,errorCode:a.scorm2004_errors.READ_ONLY_ELEMENT,errorClass:u})||this}return(0,i.__extends)(t,e),t.prototype.findObjectiveById=function(e){return this.childArray.find((function(t){return t.id===e}))},t.prototype.findObjectiveByIndex=function(e){return this.childArray[e]},t.prototype.setObjectiveByIndex=function(e,t){this.childArray[e]=t},t}(g.CMIArray),N=function(e){function t(){var t=e.call(this)||this;return t._id="",t._success_status="unknown",t._completion_status="unknown",t._progress_measure="",t._description="",t.score=new I,t}return(0,i.__extends)(t,e),t.prototype.reset=function(){this._initialized=!1},t.prototype.initialize=function(){var t;e.prototype.initialize.call(this),null===(t=this.score)||void 0===t||t.initialize()},Object.defineProperty(t.prototype,"id",{get:function(){return this._id},set:function(e){m(e,s.scorm2004_regex.CMILongIdentifier)&&(this._id=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"success_status",{get:function(){return this._success_status},set:function(e){if(this.initialized&&""===this._id)throw new u(a.scorm2004_errors.DEPENDENCY_NOT_ESTABLISHED);m(e,s.scorm2004_regex.CMISStatus)&&(this._success_status=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"completion_status",{get:function(){return this._completion_status},set:function(e){if(this.initialized&&""===this._id)throw new u(a.scorm2004_errors.DEPENDENCY_NOT_ESTABLISHED);m(e,s.scorm2004_regex.CMICStatus)&&(this._completion_status=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"progress_measure",{get:function(){return this._progress_measure},set:function(e){if(this.initialized&&""===this._id)throw new u(a.scorm2004_errors.DEPENDENCY_NOT_ESTABLISHED);m(e,s.scorm2004_regex.CMIDecimal)&&f(e,s.scorm2004_regex.progress_range)&&(this._progress_measure=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"description",{get:function(){return this._description},set:function(e){if(this.initialized&&""===this._id)throw new u(a.scorm2004_errors.DEPENDENCY_NOT_ESTABLISHED);m(e,s.scorm2004_regex.CMILangString250,!0)&&(this._description=e)},enumerable:!1,configurable:!0}),t.prototype.toJSON=function(){this.jsonString=!0;var e={id:this.id,success_status:this.success_status,completion_status:this.completion_status,progress_measure:this.progress_measure,description:this.description,score:this.score};return delete this.jsonString,e},t}(d.BaseCMI),L=function(e){function t(t){void 0===t&&(t=!1);var r=e.call(this)||this;return r.__version="1.0",r.__children=o.scorm2004_constants.cmi_children,r._completion_status="unknown",r._completion_threshold="",r._credit="credit",r._entry="",r._exit="",r._launch_data="",r._learner_id="",r._learner_name="",r._location="",r._max_time_allowed="",r._mode="normal",r._progress_measure="",r._scaled_passing_score="",r._session_time="PT0H0M0S",r._success_status="unknown",r._suspend_data="",r._time_limit_action="continue,no message",r._total_time="",r.learner_preference=new p,r.score=new I,r.comments_from_learner=new O,r.comments_from_lms=new C,r.interactions=new b,r.objectives=new T,t&&r.initialize(),r}return(0,i.__extends)(t,e),t.prototype.initialize=function(){var t,r,i,n,o,s;e.prototype.initialize.call(this),null===(t=this.learner_preference)||void 0===t||t.initialize(),null===(r=this.score)||void 0===r||r.initialize(),null===(i=this.comments_from_learner)||void 0===i||i.initialize(),null===(n=this.comments_from_lms)||void 0===n||n.initialize(),null===(o=this.interactions)||void 0===o||o.initialize(),null===(s=this.objectives)||void 0===s||s.initialize()},t.prototype.reset=function(){var e,t,r,i,n,o;this._initialized=!1,this._completion_status="incomplete",this._exit="",this._session_time="PT0H0M0S",this._progress_measure="",this._location="",null===(e=this.objectives)||void 0===e||e.reset(!1),null===(t=this.interactions)||void 0===t||t.reset(!0),null===(r=this.score)||void 0===r||r.reset(),null===(i=this.comments_from_learner)||void 0===i||i.reset(),null===(n=this.comments_from_lms)||void 0===n||n.reset(),null===(o=this.learner_preference)||void 0===o||o.reset()},Object.defineProperty(t.prototype,"_version",{get:function(){return this.__version},set:function(e){throw new u(a.scorm2004_errors.READ_ONLY_ELEMENT)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"_children",{get:function(){return this.__children},set:function(e){throw new u(a.scorm2004_errors.READ_ONLY_ELEMENT)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"completion_status",{get:function(){return this._completion_status},set:function(e){m(e,s.scorm2004_regex.CMICStatus)&&(this._completion_status=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"completion_threshold",{get:function(){return this._completion_threshold},set:function(e){if(this.initialized)throw new u(a.scorm2004_errors.READ_ONLY_ELEMENT);this._completion_threshold=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"credit",{get:function(){return this._credit},set:function(e){if(this.initialized)throw new u(a.scorm2004_errors.READ_ONLY_ELEMENT);this._credit=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"entry",{get:function(){return this._entry},set:function(e){if(this.initialized)throw new u(a.scorm2004_errors.READ_ONLY_ELEMENT);this._entry=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"exit",{get:function(){if(!this.jsonString)throw new u(a.scorm2004_errors.WRITE_ONLY_ELEMENT);return this._exit},set:function(e){m(e,s.scorm2004_regex.CMIExit,!0)&&(this._exit=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"launch_data",{get:function(){return this._launch_data},set:function(e){if(this.initialized)throw new u(a.scorm2004_errors.READ_ONLY_ELEMENT);this._launch_data=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"learner_id",{get:function(){return this._learner_id},set:function(e){if(this.initialized)throw new u(a.scorm2004_errors.READ_ONLY_ELEMENT);this._learner_id=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"learner_name",{get:function(){return this._learner_name},set:function(e){if(this.initialized)throw new u(a.scorm2004_errors.READ_ONLY_ELEMENT);this._learner_name=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"location",{get:function(){return this._location},set:function(e){m(e,s.scorm2004_regex.CMIString1000)&&(this._location=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"max_time_allowed",{get:function(){return this._max_time_allowed},set:function(e){if(this.initialized)throw new u(a.scorm2004_errors.READ_ONLY_ELEMENT);this._max_time_allowed=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"mode",{get:function(){return this._mode},set:function(e){if(this.initialized)throw new u(a.scorm2004_errors.READ_ONLY_ELEMENT);this._mode=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"progress_measure",{get:function(){return this._progress_measure},set:function(e){m(e,s.scorm2004_regex.CMIDecimal)&&f(e,s.scorm2004_regex.progress_range)&&(this._progress_measure=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"scaled_passing_score",{get:function(){return this._scaled_passing_score},set:function(e){if(this.initialized)throw new u(a.scorm2004_errors.READ_ONLY_ELEMENT);this._scaled_passing_score=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"session_time",{get:function(){if(!this.jsonString)throw new u(a.scorm2004_errors.WRITE_ONLY_ELEMENT);return this._session_time},set:function(e){m(e,s.scorm2004_regex.CMITimespan)&&(this._session_time=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"success_status",{get:function(){return this._success_status},set:function(e){m(e,s.scorm2004_regex.CMISStatus)&&(this._success_status=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"suspend_data",{get:function(){return this._suspend_data},set:function(e){m(e,s.scorm2004_regex.CMIString64000,!0)&&(this._suspend_data=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"time_limit_action",{get:function(){return this._time_limit_action},set:function(e){if(this.initialized)throw new u(a.scorm2004_errors.READ_ONLY_ELEMENT);this._time_limit_action=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"total_time",{get:function(){return this._total_time},set:function(e){if(this.initialized)throw new u(a.scorm2004_errors.READ_ONLY_ELEMENT);this._total_time=e},enumerable:!1,configurable:!0}),t.prototype.getCurrentTotalTime=function(){var e=this._session_time,t=this.start_time;if(null!=t){var r=(new Date).getTime()-t;e=_.getSecondsAsISODuration(r/1e3)}return _.addTwoDurations(this._total_time,e,s.scorm2004_regex.CMITimespan)},t.prototype.toJSON=function(){this.jsonString=!0;var e={comments_from_learner:this.comments_from_learner,comments_from_lms:this.comments_from_lms,completion_status:this.completion_status,completion_threshold:this.completion_threshold,credit:this.credit,entry:this.entry,exit:this.exit,interactions:this.interactions,launch_data:this.launch_data,learner_id:this.learner_id,learner_name:this.learner_name,learner_preference:this.learner_preference,location:this.location,max_time_allowed:this.max_time_allowed,mode:this.mode,objectives:this.objectives,progress_measure:this.progress_measure,scaled_passing_score:this.scaled_passing_score,score:this.score,session_time:this.session_time,success_status:this.success_status,suspend_data:this.suspend_data,time_limit_action:this.time_limit_action};return delete this.jsonString,e},t}(d.BaseRootCMI),A=["aa","ab","ae","af","ak","am","an","ar","as","av","ay","az","ba","be","bg","bh","bi","bm","bn","bo","br","bs","ca","ce","ch","co","cr","cs","cu","cv","cy","da","de","dv","dz","ee","el","en","eo","es","et","eu","fa","ff","fi","fj","fo","fr","fy","ga","gd","gl","gn","gu","gv","ha","he","hi","ho","hr","ht","hu","hy","hz","ia","id","ie","ig","ii","ik","io","is","it","iu","ja","jv","ka","kg","ki","kj","kk","kl","km","kn","ko","kr","ks","ku","kv","kw","ky","la","lb","lg","li","ln","lo","lt","lu","lv","mg","mh","mi","mk","ml","mn","mo","mr","ms","mt","my","na","nb","nd","ne","ng","nl","nn","no","nr","nv","ny","oc","oj","om","or","os","pa","pi","pl","ps","pt","qu","rm","rn","ro","ru","rw","sa","sc","sd","se","sg","sh","si","sk","sl","sm","sn","so","sq","sr","ss","st","su","sv","sw","ta","te","tg","th","ti","tk","tl","tn","to","tr","ts","tt","tw","ty","ug","uk","ur","uz","ve","vi","vo","wa","wo","xh","yi","yo","za","zh","zu","aar","abk","ave","afr","aka","amh","arg","ara","asm","ava","aym","aze","bak","bel","bul","bih","bis","bam","ben","tib","bod","bre","bos","cat","che","cha","cos","cre","cze","ces","chu","chv","wel","cym","dan","ger","deu","div","dzo","ewe","gre","ell","eng","epo","spa","est","baq","eus","per","fas","ful","fin","fij","fao","fre","fra","fry","gle","gla","glg","grn","guj","glv","hau","heb","hin","hmo","hrv","hat","hun","arm","hye","her","ina","ind","ile","ibo","iii","ipk","ido","ice","isl","ita","iku","jpn","jav","geo","kat","kon","kik","kua","kaz","kal","khm","kan","kor","kau","kas","kur","kom","cor","kir","lat","ltz","lug","lim","lin","lao","lit","lub","lav","mlg","mah","mao","mri","mac","mkd","mal","mon","mol","mar","may","msa","mlt","bur","mya","nau","nob","nde","nep","ndo","dut","nld","nno","nor","nbl","nav","nya","oci","oji","orm","ori","oss","pan","pli","pol","pus","por","que","roh","run","rum","ron","rus","kin","san","srd","snd","sme","sag","slo","sin","slk","slv","smo","sna","som","alb","sqi","srp","ssw","sot","sun","swe","swa","tam","tel","tgk","tha","tir","tuk","tgl","tsn","ton","tur","tso","tat","twi","tah","uig","ukr","urd","uzb","ven","vie","vol","wln","wol","xho","yid","yor","zha","chi","zho","zul"],R=r(56),x=function(e){function t(){var t=e.call(this)||this;return t.data=new P,t.nav=new j,t.data=new P,t}return(0,i.__extends)(t,e),t.prototype.initialize=function(){var t;e.prototype.initialize.call(this),null===(t=this.nav)||void 0===t||t.initialize()},t.prototype.reset=function(){var e;this._initialized=!1,null===(e=this.nav)||void 0===e||e.reset()},t.prototype.toJSON=function(){this.jsonString=!0;var e={nav:this.nav,data:this.data};return delete this.jsonString,e},t}(d.BaseCMI),j=function(e){function t(){var t=e.call(this)||this;return t._request="_none_",t.request_valid=new V,t}return(0,i.__extends)(t,e),t.prototype.initialize=function(){var t;e.prototype.initialize.call(this),null===(t=this.request_valid)||void 0===t||t.initialize()},t.prototype.reset=function(){var e;this._initialized=!1,this._request="_none_",null===(e=this.request_valid)||void 0===e||e.reset()},Object.defineProperty(t.prototype,"request",{get:function(){return this._request},set:function(e){m(e,s.scorm2004_regex.NAVEvent)&&(this._request=e)},enumerable:!1,configurable:!0}),t.prototype.toJSON=function(){this.jsonString=!0;var e={request:this.request};return delete this.jsonString,e},t}(d.BaseCMI),P=function(e){function t(){return e.call(this,{children:o.scorm2004_constants.adl_data_children,errorCode:a.scorm2004_errors.READ_ONLY_ELEMENT,errorClass:u})||this}return(0,i.__extends)(t,e),t}(g.CMIArray),D=function(e){function t(){var t=e.call(this)||this;return t._id="",t._store="",t}return(0,i.__extends)(t,e),t.prototype.reset=function(){this._initialized=!1},Object.defineProperty(t.prototype,"id",{get:function(){return this._id},set:function(e){m(e,s.scorm2004_regex.CMILongIdentifier)&&(this._id=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"store",{get:function(){return this._store},set:function(e){m(e,s.scorm2004_regex.CMILangString4000)&&(this._store=e)},enumerable:!1,configurable:!0}),t.prototype.toJSON=function(){this.jsonString=!0;var e={id:this._id,store:this._store};return delete this.jsonString,e},t}(d.BaseCMI),V=function(e){function t(){var t=e.call(this)||this;return t._continue="unknown",t._previous="unknown",t._choice={},t._jump={},t}return(0,i.__extends)(t,e),t.prototype.reset=function(){this._initialized=!1,this._continue="unknown",this._previous="unknown"},Object.defineProperty(t.prototype,"continue",{get:function(){return this._continue},set:function(e){if(this.initialized)throw new u(a.scorm2004_errors.READ_ONLY_ELEMENT);m(e,s.scorm2004_regex.NAVBoolean)&&(this._continue=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"previous",{get:function(){return this._previous},set:function(e){if(this.initialized)throw new u(a.scorm2004_errors.READ_ONLY_ELEMENT);m(e,s.scorm2004_regex.NAVBoolean)&&(this._previous=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"choice",{get:function(){return this._choice},set:function(e){if(this.initialized)throw new u(a.scorm2004_errors.READ_ONLY_ELEMENT);if("object"!=typeof e)throw new u(a.scorm2004_errors.TYPE_MISMATCH);for(var t in e)({}).hasOwnProperty.call(e,t)&&m(e[t],s.scorm2004_regex.NAVBoolean)&&m(t,s.scorm2004_regex.NAVTarget)&&(this._choice[t]=R.NAVBoolean[e[t]])},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"jump",{get:function(){return this._jump},set:function(e){if(this.initialized)throw new u(a.scorm2004_errors.READ_ONLY_ELEMENT);if("object"!=typeof e)throw new u(a.scorm2004_errors.TYPE_MISMATCH);for(var t in e)({}).hasOwnProperty.call(e,t)&&m(e[t],s.scorm2004_regex.NAVBoolean)&&m(t,s.scorm2004_regex.NAVTarget)&&(this._jump[t]=R.NAVBoolean[e[t]])},enumerable:!1,configurable:!0}),t.prototype.toJSON=function(){this.jsonString=!0;var e={previous:this._previous,continue:this._continue,choice:this._choice,jump:this._jump};return delete this.jsonString,e},t}(d.BaseCMI),z=function(e){function t(t){var r=this;return t&&void 0===t.mastery_override&&(t.mastery_override=!1),(r=e.call(this,a.scorm2004_errors,t)||this)._version="1.0",r._globalObjectives=[],r.cmi=new L,r.adl=new x,r.Initialize=r.lmsInitialize,r.Terminate=r.lmsFinish,r.GetValue=r.lmsGetValue,r.SetValue=r.lmsSetValue,r.Commit=r.lmsCommit,r.GetLastError=r.lmsGetLastError,r.GetErrorString=r.lmsGetErrorString,r.GetDiagnostic=r.lmsGetDiagnostic,r}return(0,i.__extends)(t,e),t.prototype.reset=function(e){var t,r;this.commonReset(e),null===(t=this.cmi)||void 0===t||t.reset(),null===(r=this.adl)||void 0===r||r.reset()},Object.defineProperty(t.prototype,"version",{get:function(){return this._version},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"globalObjectives",{get:function(){return this._globalObjectives},enumerable:!1,configurable:!0}),t.prototype.lmsInitialize=function(){return this.cmi.initialize(),this.initialize("Initialize")},t.prototype.lmsFinish=function(){return(0,i.__awaiter)(this,void 0,void 0,(function(){return(0,i.__generator)(this,(function(e){switch(e.label){case 0:return[4,this.internalFinish()];case 1:return e.sent(),[2]}}))})),o.global_constants.SCORM_TRUE},t.prototype.internalFinish=function(){return(0,i.__awaiter)(this,void 0,void 0,(function(){var e,t,r,n,a,c,l,u,_,d,h;return(0,i.__generator)(this,(function(i){switch(i.label){case 0:return[4,this.terminate("Terminate",!0)];case 1:return(e=i.sent())===o.global_constants.SCORM_TRUE&&("_none_"!==this.adl.nav.request?(t={continue:"SequenceNext",previous:"SequencePrevious",choice:"SequenceChoice",jump:"SequenceJump",exit:"SequenceExit",exitAll:"SequenceExitAll",abandon:"SequenceAbandon",abandonAll:"SequenceAbandonAll"},r=this.adl.nav.request,n=new RegExp(s.scorm2004_regex.NAVEvent),a=r.match(n),c="",a&&((null===(u=a.groups)||void 0===u?void 0:u.choice_target)?(c=null===(_=a.groups)||void 0===_?void 0:_.choice_target,r="choice"):(null===(d=a.groups)||void 0===d?void 0:d.jump_target)&&(c=null===(h=a.groups)||void 0===h?void 0:h.jump_target,r="jump")),(l=t[r])&&this.processListeners(l,"adl.nav.request",c)):this.settings.autoProgress&&this.processListeners("SequenceNext")),[2,e]}}))}))},t.prototype.lmsGetValue=function(e){var t,r="^adl\\.nav\\.request_valid\\.(choice|jump)\\.{target=\\S{0,}([a-zA-Z0-9-_]+)}$";if((0,_.stringMatches)(e,r)){var i=e.match(r);if(i){var n=i[1],o=i[2].replace("{target=","").replace("}","");if("choice"===n||"jump"===n)return this.settings.scoItemIdValidator?String(this.settings.scoItemIdValidator(o)):this.settings.scoItemIds?String(null===(t=this.settings.scoItemIds)||void 0===t?void 0:t.includes(o)):String(n)}}return this.getValue("GetValue",!0,e)},t.prototype.lmsSetValue=function(e,t){return this.setValue("SetValue","Commit",!0,e,t)},t.prototype.lmsCommit=function(){return this.settings.asyncCommit?this.scheduleCommit(500,"LMSCommit"):(0,i.__awaiter)(this,void 0,void 0,(function(){return(0,i.__generator)(this,(function(e){switch(e.label){case 0:return[4,this.commit("LMSCommit",!1)];case 1:return e.sent(),[2]}}))})),o.global_constants.SCORM_TRUE},t.prototype.lmsGetLastError=function(){return this.getLastError("GetLastError")},t.prototype.lmsGetErrorString=function(e){return this.getErrorString("GetErrorString",e)},t.prototype.lmsGetDiagnostic=function(e){return this.getDiagnostic("GetDiagnostic",e)},t.prototype.setCMIValue=function(e,t){var r;if((0,_.stringMatches)(e,"cmi\\.objectives\\.\\d+")){var i,n=e.split("."),o=Number(n[2]),s="cmi.objectives.".concat(o);if((0,_.stringMatches)(e,"cmi\\.objectives\\.\\d+\\.id"))i=t;else{var a=this.cmi.objectives.findObjectiveByIndex(o);i=a?a.id:void 0}if(i&&(null===(r=this.settings.globalObjectiveIds)||void 0===r?void 0:r.includes(i))){var c=this._globalObjectives.findIndex((function(e){return e.id===i}));if(-1===c){c=this._globalObjectives.length;var l=new N;l.id=i,this._globalObjectives.push(l)}var u=e.replace(s,"_globalObjectives.".concat(c));this._commonSetCMIValue("SetGlobalObjectiveValue",!0,u,t)}}return this._commonSetCMIValue("SetValue",!0,e,t)},t.prototype.getChildElement=function(e,t,r){if((0,_.stringMatches)(e,"cmi\\.objectives\\.\\d+"))return new N;if(r){if((0,_.stringMatches)(e,"cmi\\.interactions\\.\\d+\\.correct_responses\\.\\d+"))return this.createCorrectResponsesObject(e,t);if((0,_.stringMatches)(e,"cmi\\.interactions\\.\\d+\\.objectives\\.\\d+"))return new M}else if((0,_.stringMatches)(e,"cmi\\.interactions\\.\\d+"))return new v;return(0,_.stringMatches)(e,"cmi\\.comments_from_learner\\.\\d+")?new w:(0,_.stringMatches)(e,"cmi\\.comments_from_lms\\.\\d+")?new w(!0):(0,_.stringMatches)(e,"adl\\.data\\.\\d+")?new D:null},t.prototype.createCorrectResponsesObject=function(e,t){var r=e.split("."),i=Number(r[2]),n=this.cmi.interactions.childArray[i];if(this.isInitialized())if(n.type){this.checkDuplicateChoiceResponse(n,t);var o=y[n.type];o?this.checkValidResponseType(o,t,n.type):this.throwSCORMError(a.scorm2004_errors.GENERAL_SET_FAILURE,"Incorrect Response Type: "+n.type)}else this.throwSCORMError(a.scorm2004_errors.DEPENDENCY_NOT_ESTABLISHED);return"0"===this.lastErrorCode?new S:null},t.prototype.checkValidResponseType=function(e,t,r){var i=[];(null==e?void 0:e.delimiter)?i=String(t).split(e.delimiter):i[0]=t,i.length>0&&i.length<=e.max?this.checkCorrectResponseValue(r,i,t):i.length>e.max&&this.throwSCORMError(a.scorm2004_errors.GENERAL_SET_FAILURE,"Data Model Element Pattern Too Long")},t.prototype.checkDuplicateChoiceResponse=function(e,t){var r=e.correct_responses._count;if("choice"===e.type)for(var i=0;i<r&&"0"===this.lastErrorCode;i++)e.correct_responses.childArray[i].pattern===t&&this.throwSCORMError(a.scorm2004_errors.GENERAL_SET_FAILURE)},t.prototype.validateCorrectResponse=function(e,t){var r=e.split("."),i=Number(r[2]),n=Number(r[4]),o=this.cmi.interactions.childArray[i],s=o.correct_responses._count;this.checkDuplicateChoiceResponse(o,t);var c=y[o.type];void 0===c.limit||s<=c.limit?(this.checkValidResponseType(c,t,o.type),"0"===this.lastErrorCode&&(!c.duplicate||!this.checkDuplicatedPattern(o.correct_responses,n,t))||"0"===this.lastErrorCode&&""===t||"0"===this.lastErrorCode&&this.throwSCORMError(a.scorm2004_errors.GENERAL_SET_FAILURE,"Data Model Element Pattern Already Exists")):this.throwSCORMError(a.scorm2004_errors.GENERAL_SET_FAILURE,"Data Model Element Collection Limit Reached")},t.prototype.getCMIValue=function(e){return this._commonGetCMIValue("GetValue",!0,e)},t.prototype.getLmsErrorMessageDetails=function(e,t){var r="",i="";return e=String(e),o.scorm2004_constants.error_descriptions[e]&&(r=o.scorm2004_constants.error_descriptions[e].basicMessage,i=o.scorm2004_constants.error_descriptions[e].detailMessage),t?i:r},t.prototype.checkDuplicatedPattern=function(e,t,r){for(var i=!1,n=e._count,o=0;o<n&&!i;o++)o!==t&&e.childArray[o]===r&&(i=!0);return i},t.prototype.checkCorrectResponseValue=function(e,t,r){for(var i=y[e],n=new RegExp(i.format),o=0;o<t.length&&"0"===this.lastErrorCode;o++)if(e.match("^(fill-in|long-fill-in|matching|performance|sequencing)$")&&(t[o]=this.removeCorrectResponsePrefixes(t[o])),null==i?void 0:i.delimiter2){var s=t[o].split(i.delimiter2);2===s.length&&(c=s[0].match(n))&&i.format2&&s[1].match(new RegExp(i.format2))||this.throwSCORMError(a.scorm2004_errors.TYPE_MISMATCH)}else{var c;if(!(c=t[o].match(n))&&""!==r||!c&&"true-false"===e)this.throwSCORMError(a.scorm2004_errors.TYPE_MISMATCH);else if("numeric"===e&&t.length>1)Number(t[0])>Number(t[1])&&this.throwSCORMError(a.scorm2004_errors.TYPE_MISMATCH);else if(""!==t[o]&&i.unique)for(var l=0;l<o&&"0"===this.lastErrorCode;l++)t[o]===t[l]&&this.throwSCORMError(a.scorm2004_errors.TYPE_MISMATCH)}},t.prototype.removeCorrectResponsePrefixes=function(e){for(var t=!1,r=!1,i=!1,n=new RegExp("^({(lang|case_matters|order_matters)=([^}]+)})"),o=e.match(n),c=null;o;){switch(o[2]){case"lang":if(c=e.match(s.scorm2004_regex.CMILangcr)){var l=c[3];void 0!==l&&l.length>0&&(A.includes(l.toLowerCase())||this.throwSCORMError(a.scorm2004_errors.TYPE_MISMATCH))}i=!0;break;case"case_matters":i||t||r||"true"!==o[3]&&"false"!==o[3]&&this.throwSCORMError(a.scorm2004_errors.TYPE_MISMATCH),r=!0;break;case"order_matters":r||i||t||"true"!==o[3]&&"false"!==o[3]&&this.throwSCORMError(a.scorm2004_errors.TYPE_MISMATCH),t=!0}o=(e=e.substring(o[1].length)).match(n)}return e},t.prototype.replaceWithAnotherScormAPI=function(e){this.cmi=e.cmi,this.adl=e.adl},t.prototype.renderCommitCMI=function(e){var t=this.renderCMIToJSONObject();e&&(t.cmi.total_time=this.cmi.getCurrentTotalTime());var r=[],i=_.flatten(t);switch(this.settings.dataCommitFormat){case"flattened":return _.flatten(t);case"params":for(var n in i)({}).hasOwnProperty.call(i,n)&&r.push("".concat(n,"=").concat(i[n]));return r;default:return t}},t.prototype.renderCommitObject=function(e){var t=this.renderCommitCMI(e),r=this.cmi.getCurrentTotalTime(),i=_.getDurationAsSeconds(r,s.scorm2004_regex.CMITimespan),n=R.CompletionStatus.unknown,o=R.SuccessStatus.unknown;this.cmi.completion_status&&("completed"===this.cmi.completion_status?n=R.CompletionStatus.completed:"incomplete"===this.cmi.completion_status&&(n=R.CompletionStatus.incomplete)),this.cmi.success_status&&("passed"===this.cmi.success_status?o=R.SuccessStatus.passed:"failed"===this.cmi.success_status&&(o=R.SuccessStatus.failed));var a=this.cmi.score,c={};a&&(Number.isNaN(Number.parseFloat(a.raw))||(c.raw=Number.parseFloat(a.raw)),Number.isNaN(Number.parseFloat(a.min))||(c.min=Number.parseFloat(a.min)),Number.isNaN(Number.parseFloat(a.max))||(c.max=Number.parseFloat(a.max)),Number.isNaN(Number.parseFloat(a.scaled))||(c.scaled=Number.parseFloat(a.scaled)));var l={completionStatus:n,successStatus:o,totalTimeSeconds:i,runtimeData:t};return c&&(l.score=c),l},t.prototype.storeData=function(e){return(0,i.__awaiter)(this,void 0,void 0,(function(){var t,r,n,s,a,c;return(0,i.__generator)(this,(function(i){switch(i.label){case 0:return e&&"normal"===this.cmi.mode&&"credit"===this.cmi.credit&&(this.cmi.completion_threshold&&this.cmi.progress_measure&&(this.cmi.progress_measure>=this.cmi.completion_threshold?this.cmi.completion_status="completed":this.cmi.completion_status="incomplete"),this.cmi.scaled_passing_score&&this.cmi.score.scaled&&(this.cmi.score.scaled>=this.cmi.scaled_passing_score?this.cmi.success_status="passed":this.cmi.success_status="failed")),t=!1,this.adl.nav.request!==(null===(c=null===(a=null===(s=this.startingData)||void 0===s?void 0:s.adl)||void 0===a?void 0:a.nav)||void 0===c?void 0:c.request)&&"_none_"!==this.adl.nav.request&&(t=!0),r=this.getCommitObject(e),"string"!=typeof this.settings.lmsCommitUrl?[3,2]:[4,this.processHttpRequest(this.settings.lmsCommitUrl,r,e)];case 1:return n=i.sent(),t&&void 0!==n.navRequest&&""!==n.navRequest&&Function('"use strict";(() => { '.concat(n.navRequest," })()"))(),[2,n];case 2:return[2,{result:o.global_constants.SCORM_TRUE,errorCode:0}]}}))}))},t}(n.default)},589:function(e,t,r){r.r(t),r.d(t,{CMIArray:function(){return a}});var i=r(635),n=r(319),o=r(784),s=r(797),a=function(e){function t(t){var r=e.call(this)||this;return r.__children=t.children,r._errorCode=t.errorCode||s.scorm12_errors.GENERAL,r._errorClass=t.errorClass||o.BaseScormValidationError,r.childArray=[],r}return(0,i.__extends)(t,e),t.prototype.reset=function(e){if(void 0===e&&(e=!1),this._initialized=!1,e)this.childArray=[];else for(var t=0;t<this.childArray.length;t++)this.childArray[t].reset()},Object.defineProperty(t.prototype,"_children",{get:function(){return this.__children},set:function(e){throw new this._errorClass(this._errorCode)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"_count",{get:function(){return this.childArray.length},set:function(e){throw new this._errorClass(this._errorCode)},enumerable:!1,configurable:!0}),t.prototype.toJSON=function(){this.jsonString=!0;for(var e={},t=0;t<this.childArray.length;t++)e[t+""]=this.childArray[t];return delete this.jsonString,e},t}(n.BaseCMI)},319:function(e,t,r){r.r(t),r.d(t,{BaseCMI:function(){return n},BaseRootCMI:function(){return o}});var i=r(635),n=function(){function e(){this.jsonString=!1,this._initialized=!1}return Object.defineProperty(e.prototype,"initialized",{get:function(){return this._initialized},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"start_time",{get:function(){return this._start_time},enumerable:!1,configurable:!0}),e.prototype.initialize=function(){this._initialized=!0},e.prototype.setStartTime=function(){this._start_time=(new Date).getTime()},e}(),o=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,i.__extends)(t,e),t}(n)},434:function(e,t,r){r.r(t),r.d(t,{CMIScore:function(){return l}});var i=r(635),n=r(340),o=r(417),s=r(319),a=r(449),c=r(797),l=function(e){function t(t){var r=e.call(this)||this;return r._raw="",r._min="",r.__children=t.score_children||n.scorm12_constants.score_children,r.__score_range=!!t.score_range&&o.scorm12_regex.score_range,r._max=t.max||""===t.max?t.max:"100",r.__invalid_error_code=t.invalidErrorCode||c.scorm12_errors.INVALID_SET_VALUE,r.__invalid_type_code=t.invalidTypeCode||c.scorm12_errors.TYPE_MISMATCH,r.__invalid_range_code=t.invalidRangeCode||c.scorm12_errors.VALUE_OUT_OF_RANGE,r.__decimal_regex=t.decimalRegex||o.scorm12_regex.CMIDecimal,r.__error_class=t.errorClass,r}return(0,i.__extends)(t,e),t.prototype.reset=function(){this._initialized=!1},Object.defineProperty(t.prototype,"_children",{get:function(){return this.__children},set:function(e){throw new this.__error_class(this.__invalid_error_code)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"raw",{get:function(){return this._raw},set:function(e){!(0,a.checkValidFormat)(e,this.__decimal_regex,this.__invalid_type_code,this.__error_class)||this.__score_range&&!(0,a.checkValidRange)(e,this.__score_range,this.__invalid_range_code,this.__error_class)||(this._raw=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"min",{get:function(){return this._min},set:function(e){!(0,a.checkValidFormat)(e,this.__decimal_regex,this.__invalid_type_code,this.__error_class)||this.__score_range&&!(0,a.checkValidRange)(e,this.__score_range,this.__invalid_range_code,this.__error_class)||(this._min=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"max",{get:function(){return this._max},set:function(e){!(0,a.checkValidFormat)(e,this.__decimal_regex,this.__invalid_type_code,this.__error_class)||this.__score_range&&!(0,a.checkValidRange)(e,this.__score_range,this.__invalid_range_code,this.__error_class)||(this._max=e)},enumerable:!1,configurable:!0}),t.prototype.toJSON=function(){this.jsonString=!0;var e={raw:this.raw,min:this.min,max:this.max};return delete this.jsonString,e},t}(s.BaseCMI)},449:function(e,t,r){function i(e,t,r,i,n){if("string"!=typeof e)return!1;var o=new RegExp(t),s=e.match(o);if(n&&""===e)return!0;if(void 0===e||!s||""===s[0])throw new i(r);return!0}function n(e,t,r,i){var n=t.split("#");if((e*=1)>=n[0]){if("*"===n[1]||e<=n[1])return!0;throw new i(r)}throw new i(r)}r.r(t),r.d(t,{checkValidFormat:function(){return i},checkValidRange:function(){return n}})},989:function(e,t,r){r.r(t),r.d(t,{CMI:function(){return g}});var i=r(635),n=r(340),o=r(797),s=r(417),a=r(179),c=r(319),l=r(915),u=r(434),_=r(864),d=function(e){function t(){var t=e.call(this)||this;return t.__children=n.scorm12_constants.core_children,t._student_id="",t._student_name="",t._lesson_location="",t._credit="",t._lesson_status="not attempted",t._entry="",t._total_time="",t._lesson_mode="normal",t._exit="",t._session_time="00:00:00",t._suspend_data="",t.score=new u.CMIScore({score_children:n.scorm12_constants.score_children,score_range:s.scorm12_regex.score_range,invalidErrorCode:o.scorm12_errors.INVALID_SET_VALUE,invalidTypeCode:o.scorm12_errors.TYPE_MISMATCH,invalidRangeCode:o.scorm12_errors.VALUE_OUT_OF_RANGE,errorClass:a.Scorm12ValidationError}),t}return(0,i.__extends)(t,e),t.prototype.initialize=function(){var t;e.prototype.initialize.call(this),null===(t=this.score)||void 0===t||t.initialize()},t.prototype.reset=function(){var e;this._initialized=!1,this._exit="",this._entry="",this._session_time="00:00:00",null===(e=this.score)||void 0===e||e.reset()},Object.defineProperty(t.prototype,"_children",{get:function(){return this.__children},set:function(e){throw new a.Scorm12ValidationError(o.scorm12_errors.INVALID_SET_VALUE)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"student_id",{get:function(){return this._student_id},set:function(e){if(this.initialized)throw new a.Scorm12ValidationError(o.scorm12_errors.READ_ONLY_ELEMENT);this._student_id=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"student_name",{get:function(){return this._student_name},set:function(e){if(this.initialized)throw new a.Scorm12ValidationError(o.scorm12_errors.READ_ONLY_ELEMENT);this._student_name=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"lesson_location",{get:function(){return this._lesson_location},set:function(e){(0,l.check12ValidFormat)(e,s.scorm12_regex.CMIString256,!0)&&(this._lesson_location=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"credit",{get:function(){return this._credit},set:function(e){if(this.initialized)throw new a.Scorm12ValidationError(o.scorm12_errors.READ_ONLY_ELEMENT);this._credit=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"lesson_status",{get:function(){return this._lesson_status},set:function(e){this.initialized?(0,l.check12ValidFormat)(e,s.scorm12_regex.CMIStatus)&&(this._lesson_status=e):(0,l.check12ValidFormat)(e,s.scorm12_regex.CMIStatus2)&&(this._lesson_status=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"entry",{get:function(){return this._entry},set:function(e){if(this.initialized)throw new a.Scorm12ValidationError(o.scorm12_errors.READ_ONLY_ELEMENT);this._entry=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"total_time",{get:function(){return this._total_time},set:function(e){if(this.initialized)throw new a.Scorm12ValidationError(o.scorm12_errors.READ_ONLY_ELEMENT);this._total_time=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"lesson_mode",{get:function(){return this._lesson_mode},set:function(e){if(this.initialized)throw new a.Scorm12ValidationError(o.scorm12_errors.READ_ONLY_ELEMENT);this._lesson_mode=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"exit",{get:function(){if(!this.jsonString)throw new a.Scorm12ValidationError(o.scorm12_errors.WRITE_ONLY_ELEMENT);return this._exit},set:function(e){(0,l.check12ValidFormat)(e,s.scorm12_regex.CMIExit,!0)&&(this._exit=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"session_time",{get:function(){if(!this.jsonString)throw new a.Scorm12ValidationError(o.scorm12_errors.WRITE_ONLY_ELEMENT);return this._session_time},set:function(e){(0,l.check12ValidFormat)(e,s.scorm12_regex.CMITimespan)&&(this._session_time=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"suspend_data",{get:function(){return this._suspend_data},set:function(e){(0,l.check12ValidFormat)(e,s.scorm12_regex.CMIString4096,!0)&&(this._suspend_data=e)},enumerable:!1,configurable:!0}),t.prototype.getCurrentTotalTime=function(e){var t=this._session_time,r=e;if(null!=r){var i=(new Date).getTime()-r;t=_.getSecondsAsHHMMSS(i/1e3)}return _.addHHMMSSTimeStrings(this._total_time,t,new RegExp(s.scorm12_regex.CMITimespan))},t.prototype.toJSON=function(){this.jsonString=!0;var e={student_id:this.student_id,student_name:this.student_name,lesson_location:this.lesson_location,credit:this.credit,lesson_status:this.lesson_status,entry:this.entry,lesson_mode:this.lesson_mode,exit:this.exit,session_time:this.session_time,score:this.score};return delete this.jsonString,e},t}(c.BaseCMI),h=r(176),m=r(532),f=r(181),p=r(833),g=function(e){function t(t,r,i){var o=e.call(this)||this;return o.__children="",o.__version="3.4",o._launch_data="",o._comments="",o._comments_from_lms="",i&&o.initialize(),o.__children=t||n.scorm12_constants.cmi_children,o.core=new d,o.objectives=new h.CMIObjectives,o.student_data=r||new m.CMIStudentData,o.student_preference=new f.CMIStudentPreference,o.interactions=new p.CMIInteractions,o}return(0,i.__extends)(t,e),t.prototype.reset=function(){var e,t,r;this._initialized=!1,this._launch_data="",this._comments="",null===(e=this.core)||void 0===e||e.reset(),this.objectives=new h.CMIObjectives,this.interactions=new p.CMIInteractions,null===(t=this.student_data)||void 0===t||t.reset(),null===(r=this.student_preference)||void 0===r||r.reset()},t.prototype.initialize=function(){var t,r,i,n,o;e.prototype.initialize.call(this),null===(t=this.core)||void 0===t||t.initialize(),null===(r=this.objectives)||void 0===r||r.initialize(),null===(i=this.student_data)||void 0===i||i.initialize(),null===(n=this.student_preference)||void 0===n||n.initialize(),null===(o=this.interactions)||void 0===o||o.initialize()},t.prototype.toJSON=function(){this.jsonString=!0;var e={suspend_data:this.suspend_data,launch_data:this.launch_data,comments:this.comments,comments_from_lms:this.comments_from_lms,core:this.core,objectives:this.objectives,student_data:this.student_data,student_preference:this.student_preference,interactions:this.interactions};return delete this.jsonString,e},Object.defineProperty(t.prototype,"_version",{get:function(){return this.__version},set:function(e){throw new a.Scorm12ValidationError(o.scorm12_errors.INVALID_SET_VALUE)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"_children",{get:function(){return this.__children},set:function(e){throw new a.Scorm12ValidationError(o.scorm12_errors.INVALID_SET_VALUE)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"suspend_data",{get:function(){var e;return null===(e=this.core)||void 0===e?void 0:e.suspend_data},set:function(e){this.core&&(this.core.suspend_data=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"launch_data",{get:function(){return this._launch_data},set:function(e){if(this.initialized)throw new a.Scorm12ValidationError(o.scorm12_errors.READ_ONLY_ELEMENT);this._launch_data=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"comments",{get:function(){return this._comments},set:function(e){(0,l.check12ValidFormat)(e,s.scorm12_regex.CMIString4096,!0)&&(this._comments=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"comments_from_lms",{get:function(){return this._comments_from_lms},set:function(e){if(this.initialized)throw new a.Scorm12ValidationError(o.scorm12_errors.READ_ONLY_ELEMENT);this._comments_from_lms=e},enumerable:!1,configurable:!0}),t.prototype.getCurrentTotalTime=function(){return this.core.getCurrentTotalTime(this.start_time)},t}(c.BaseRootCMI)},833:function(e,t,r){r.r(t),r.d(t,{CMIInteractions:function(){return _},CMIInteractionsCorrectResponsesObject:function(){return m},CMIInteractionsObject:function(){return d},CMIInteractionsObjectivesObject:function(){return h}});var i=r(635),n=r(589),o=r(340),s=r(797),a=r(179),c=r(319),l=r(915),u=r(417),_=function(e){function t(){return e.call(this,{children:o.scorm12_constants.interactions_children,errorCode:s.scorm12_errors.INVALID_SET_VALUE,errorClass:a.Scorm12ValidationError})||this}return(0,i.__extends)(t,e),t}(n.CMIArray),d=function(e){function t(){var t=e.call(this)||this;return t._id="",t._time="",t._type="",t._weighting="",t._student_response="",t._result="",t._latency="",t.objectives=new n.CMIArray({errorCode:s.scorm12_errors.INVALID_SET_VALUE,errorClass:a.Scorm12ValidationError,children:o.scorm12_constants.objectives_children}),t.correct_responses=new n.CMIArray({errorCode:s.scorm12_errors.INVALID_SET_VALUE,errorClass:a.Scorm12ValidationError,children:o.scorm12_constants.correct_responses_children}),t}return(0,i.__extends)(t,e),t.prototype.initialize=function(){var t,r;e.prototype.initialize.call(this),null===(t=this.objectives)||void 0===t||t.initialize(),null===(r=this.correct_responses)||void 0===r||r.initialize()},t.prototype.reset=function(){var e,t;this._initialized=!1,this._id="",this._time="",this._type="",this._weighting="",this._student_response="",this._result="",this._latency="",null===(e=this.objectives)||void 0===e||e.reset(),null===(t=this.correct_responses)||void 0===t||t.reset()},Object.defineProperty(t.prototype,"id",{get:function(){if(!this.jsonString)throw new a.Scorm12ValidationError(s.scorm12_errors.WRITE_ONLY_ELEMENT);return this._id},set:function(e){(0,l.check12ValidFormat)(e,u.scorm12_regex.CMIIdentifier)&&(this._id=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"time",{get:function(){if(!this.jsonString)throw new a.Scorm12ValidationError(s.scorm12_errors.WRITE_ONLY_ELEMENT);return this._time},set:function(e){(0,l.check12ValidFormat)(e,u.scorm12_regex.CMITime)&&(this._time=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"type",{get:function(){if(!this.jsonString)throw new a.Scorm12ValidationError(s.scorm12_errors.WRITE_ONLY_ELEMENT);return this._type},set:function(e){(0,l.check12ValidFormat)(e,u.scorm12_regex.CMIType)&&(this._type=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"weighting",{get:function(){if(!this.jsonString)throw new a.Scorm12ValidationError(s.scorm12_errors.WRITE_ONLY_ELEMENT);return this._weighting},set:function(e){(0,l.check12ValidFormat)(e,u.scorm12_regex.CMIDecimal)&&(0,l.check12ValidRange)(e,u.scorm12_regex.weighting_range)&&(this._weighting=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"student_response",{get:function(){if(!this.jsonString)throw new a.Scorm12ValidationError(s.scorm12_errors.WRITE_ONLY_ELEMENT);return this._student_response},set:function(e){(0,l.check12ValidFormat)(e,u.scorm12_regex.CMIFeedback,!0)&&(this._student_response=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"result",{get:function(){if(!this.jsonString)throw new a.Scorm12ValidationError(s.scorm12_errors.WRITE_ONLY_ELEMENT);return this._result},set:function(e){(0,l.check12ValidFormat)(e,u.scorm12_regex.CMIResult)&&(this._result=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"latency",{get:function(){if(!this.jsonString)throw new a.Scorm12ValidationError(s.scorm12_errors.WRITE_ONLY_ELEMENT);return this._latency},set:function(e){(0,l.check12ValidFormat)(e,u.scorm12_regex.CMITimespan)&&(this._latency=e)},enumerable:!1,configurable:!0}),t.prototype.toJSON=function(){this.jsonString=!0;var e={id:this.id,time:this.time,type:this.type,weighting:this.weighting,student_response:this.student_response,result:this.result,latency:this.latency,objectives:this.objectives,correct_responses:this.correct_responses};return delete this.jsonString,e},t}(c.BaseCMI),h=function(e){function t(){var t=e.call(this)||this;return t._id="",t}return(0,i.__extends)(t,e),t.prototype.reset=function(){this._initialized=!1,this._id=""},Object.defineProperty(t.prototype,"id",{get:function(){return this._id},set:function(e){(0,l.check12ValidFormat)(e,u.scorm12_regex.CMIIdentifier)&&(this._id=e)},enumerable:!1,configurable:!0}),t.prototype.toJSON=function(){this.jsonString=!0;var e={id:this.id};return delete this.jsonString,e},t}(c.BaseCMI),m=function(e){function t(){var t=e.call(this)||this;return t._pattern="",t}return(0,i.__extends)(t,e),t.prototype.reset=function(){this._initialized=!1,this._pattern=""},Object.defineProperty(t.prototype,"pattern",{get:function(){if(!this.jsonString)throw new a.Scorm12ValidationError(s.scorm12_errors.WRITE_ONLY_ELEMENT);return this._pattern},set:function(e){(0,l.check12ValidFormat)(e,u.scorm12_regex.CMIFeedback,!0)&&(this._pattern=e)},enumerable:!1,configurable:!0}),t.prototype.toJSON=function(){this.jsonString=!0;var e={pattern:this._pattern};return delete this.jsonString,e},t}(c.BaseCMI)},331:function(e,t,r){r.r(t),r.d(t,{NAV:function(){return a}});var i=r(635),n=r(319),o=r(915),s=r(417),a=function(e){function t(){var t=e.call(this)||this;return t._event="",t}return(0,i.__extends)(t,e),t.prototype.reset=function(){this._event="",this._initialized=!1},Object.defineProperty(t.prototype,"event",{get:function(){return this._event},set:function(e){(0,o.check12ValidFormat)(e,s.scorm12_regex.NAVEvent)&&(this._event=e)},enumerable:!1,configurable:!0}),t.prototype.toJSON=function(){this.jsonString=!0;var e={event:this.event};return delete this.jsonString,e},t}(n.BaseCMI)},176:function(e,t,r){r.r(t),r.d(t,{CMIObjectives:function(){return _},CMIObjectivesObject:function(){return d}});var i=r(635),n=r(319),o=r(434),s=r(340),a=r(417),c=r(797),l=r(179),u=r(915),_=function(e){function t(){return e.call(this,{children:s.scorm12_constants.objectives_children,errorCode:c.scorm12_errors.INVALID_SET_VALUE,errorClass:l.Scorm12ValidationError})||this}return(0,i.__extends)(t,e),t}(r(589).CMIArray),d=function(e){function t(){var t=e.call(this)||this;return t._id="",t._status="",t.score=new o.CMIScore({score_children:s.scorm12_constants.score_children,score_range:a.scorm12_regex.score_range,invalidErrorCode:c.scorm12_errors.INVALID_SET_VALUE,invalidTypeCode:c.scorm12_errors.TYPE_MISMATCH,invalidRangeCode:c.scorm12_errors.VALUE_OUT_OF_RANGE,errorClass:l.Scorm12ValidationError}),t}return(0,i.__extends)(t,e),t.prototype.reset=function(){var e;this._initialized=!1,this._id="",this._status="",null===(e=this.score)||void 0===e||e.reset()},Object.defineProperty(t.prototype,"id",{get:function(){return this._id},set:function(e){(0,u.check12ValidFormat)(e,a.scorm12_regex.CMIIdentifier)&&(this._id=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"status",{get:function(){return this._status},set:function(e){(0,u.check12ValidFormat)(e,a.scorm12_regex.CMIStatus2)&&(this._status=e)},enumerable:!1,configurable:!0}),t.prototype.toJSON=function(){this.jsonString=!0;var e={id:this.id,status:this.status,score:this.score};return delete this.jsonString,e},t}(n.BaseCMI)},532:function(e,t,r){r.r(t),r.d(t,{CMIStudentData:function(){return c}});var i=r(635),n=r(319),o=r(340),s=r(179),a=r(797),c=function(e){function t(t){var r=e.call(this)||this;return r._mastery_score="",r._max_time_allowed="",r._time_limit_action="",r.__children=t||o.scorm12_constants.student_data_children,r}return(0,i.__extends)(t,e),t.prototype.reset=function(){this._initialized=!1},Object.defineProperty(t.prototype,"_children",{get:function(){return this.__children},set:function(e){throw new s.Scorm12ValidationError(a.scorm12_errors.INVALID_SET_VALUE)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"mastery_score",{get:function(){return this._mastery_score},set:function(e){if(this.initialized)throw new s.Scorm12ValidationError(a.scorm12_errors.READ_ONLY_ELEMENT);this._mastery_score=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"max_time_allowed",{get:function(){return this._max_time_allowed},set:function(e){if(this.initialized)throw new s.Scorm12ValidationError(a.scorm12_errors.READ_ONLY_ELEMENT);this._max_time_allowed=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"time_limit_action",{get:function(){return this._time_limit_action},set:function(e){if(this.initialized)throw new s.Scorm12ValidationError(a.scorm12_errors.READ_ONLY_ELEMENT);this._time_limit_action=e},enumerable:!1,configurable:!0}),t.prototype.toJSON=function(){this.jsonString=!0;var e={mastery_score:this.mastery_score,max_time_allowed:this.max_time_allowed,time_limit_action:this.time_limit_action};return delete this.jsonString,e},t}(n.BaseCMI)},181:function(e,t,r){r.r(t),r.d(t,{CMIStudentPreference:function(){return u}});var i=r(635),n=r(319),o=r(340),s=r(179),a=r(915),c=r(417),l=r(797),u=function(e){function t(t){var r=e.call(this)||this;return r._audio="",r._language="",r._speed="",r._text="",r.__children=t||o.scorm12_constants.student_preference_children,r}return(0,i.__extends)(t,e),t.prototype.reset=function(){this._initialized=!1},Object.defineProperty(t.prototype,"_children",{get:function(){return this.__children},set:function(e){throw new s.Scorm12ValidationError(l.scorm12_errors.INVALID_SET_VALUE)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"audio",{get:function(){return this._audio},set:function(e){(0,a.check12ValidFormat)(e,c.scorm12_regex.CMISInteger)&&(0,a.check12ValidRange)(e,c.scorm12_regex.audio_range)&&(this._audio=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"language",{get:function(){return this._language},set:function(e){(0,a.check12ValidFormat)(e,c.scorm12_regex.CMIString256)&&(this._language=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"speed",{get:function(){return this._speed},set:function(e){(0,a.check12ValidFormat)(e,c.scorm12_regex.CMISInteger)&&(0,a.check12ValidRange)(e,c.scorm12_regex.speed_range)&&(this._speed=e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"text",{get:function(){return this._text},set:function(e){(0,a.check12ValidFormat)(e,c.scorm12_regex.CMISInteger)&&(0,a.check12ValidRange)(e,c.scorm12_regex.text_range)&&(this._text=e)},enumerable:!1,configurable:!0}),t.prototype.toJSON=function(){this.jsonString=!0;var e={audio:this.audio,language:this.language,speed:this.speed,text:this.text};return delete this.jsonString,e},t}(n.BaseCMI)},915:function(e,t,r){r.r(t),r.d(t,{check12ValidFormat:function(){return s},check12ValidRange:function(){return a}});var i=r(449),n=r(797),o=r(179);function s(e,t,r){return(0,i.checkValidFormat)(e,t,n.scorm12_errors.TYPE_MISMATCH,o.Scorm12ValidationError,r)}function a(e,t,r){if(!r&&""===e)throw new o.Scorm12ValidationError(n.scorm12_errors.VALUE_OUT_OF_RANGE);return(0,i.checkValidRange)(e,t,n.scorm12_errors.VALUE_OUT_OF_RANGE,o.Scorm12ValidationError)}},340:function(e,t,r){r.r(t),r.d(t,{aicc_constants:function(){return s},global_constants:function(){return n},scorm12_constants:function(){return o},scorm2004_constants:function(){return a}});var i=r(635),n={SCORM_TRUE:"true",SCORM_FALSE:"false",STATE_NOT_INITIALIZED:0,STATE_INITIALIZED:1,STATE_TERMINATED:2},o={cmi_children:"core,suspend_data,launch_data,comments,objectives,student_data,student_preference,interactions",core_children:"student_id,student_name,lesson_location,credit,lesson_status,entry,score,total_time,lesson_mode,exit,session_time",score_children:"raw,min,max",comments_children:"content,location,time",objectives_children:"id,score,status",correct_responses_children:"pattern",student_data_children:"mastery_score,max_time_allowed,time_limit_action",student_preference_children:"audio,language,speed,text",interactions_children:"id,objectives,time,type,correct_responses,weighting,student_response,result,latency",error_descriptions:{101:{basicMessage:"General Exception",detailMessage:"No specific error code exists to describe the error. Use LMSGetDiagnostic for more information"},201:{basicMessage:"Invalid argument error",detailMessage:"Indicates that an argument represents an invalid data model element or is otherwise incorrect."},202:{basicMessage:"Element cannot have children",detailMessage:'Indicates that LMSGetValue was called with a data model element name that ends in "_children" for a data model element that does not support the "_children" suffix.'},203:{basicMessage:"Element not an array - cannot have count",detailMessage:'Indicates that LMSGetValue was called with a data model element name that ends in "_count" for a data model element that does not support the "_count" suffix.'},301:{basicMessage:"Not initialized",detailMessage:"Indicates that an API call was made before the call to lmsInitialize."},401:{basicMessage:"Not implemented error",detailMessage:"The data model element indicated in a call to LMSGetValue or LMSSetValue is valid, but was not implemented by this LMS. SCORM 1.2 defines a set of data model elements as being optional for an LMS to implement."},402:{basicMessage:"Invalid set value, element is a keyword",detailMessage:'Indicates that LMSSetValue was called on a data model element that represents a keyword (elements that end in "_children" and "_count").'},403:{basicMessage:"Element is read only",detailMessage:"LMSSetValue was called with a data model element that can only be read."},404:{basicMessage:"Element is write only",detailMessage:"LMSGetValue was called on a data model element that can only be written to."},405:{basicMessage:"Incorrect Data Type",detailMessage:"LMSSetValue was called with a value that is not consistent with the data format of the supplied data model element."},407:{basicMessage:"Element Value Out Of Range",detailMessage:"The numeric value supplied to a LMSSetValue call is outside of the numeric range allowed for the supplied data model element."},408:{basicMessage:"Data Model Dependency Not Established",detailMessage:"Some data model elements cannot be set until another data model element was set. This error condition indicates that the prerequisite element was not set before the dependent element."}}},s=(0,i.__assign)((0,i.__assign)({},o),{cmi_children:"core,suspend_data,launch_data,comments,objectives,student_data,student_preference,interactions,evaluation",student_preference_children:"audio,language,lesson_type,speed,text,text_color,text_location,text_size,video,windows",student_data_children:"attempt_number,tries,mastery_score,max_time_allowed,time_limit_action",student_demographics_children:"city,class,company,country,experience,familiar_name,instructor_name,title,native_language,state,street_address,telephone,years_experience",tries_children:"time,status,score",attempt_records_children:"score,lesson_status",paths_children:"location_id,date,time,status,why_left,time_in_element"}),a={cmi_children:"_version,comments_from_learner,comments_from_lms,completion_status,credit,entry,exit,interactions,launch_data,learner_id,learner_name,learner_preference,location,max_time_allowed,mode,objectives,progress_measure,scaled_passing_score,score,session_time,success_status,suspend_data,time_limit_action,total_time",comments_children:"comment,timestamp,location",score_children:"max,raw,scaled,min",objectives_children:"progress_measure,completion_status,success_status,description,score,id",correct_responses_children:"pattern",student_data_children:"mastery_score,max_time_allowed,time_limit_action",student_preference_children:"audio_level,audio_captioning,delivery_speed,language",interactions_children:"id,type,objectives,timestamp,correct_responses,weighting,learner_response,result,latency,description",adl_data_children:"id,store",error_descriptions:{0:{basicMessage:"No Error",detailMessage:"No error occurred, the previous API call was successful."},101:{basicMessage:"General Exception",detailMessage:"No specific error code exists to describe the error. Use GetDiagnostic for more information."},102:{basicMessage:"General Initialization Failure",detailMessage:"Call to Initialize failed for an unknown reason."},103:{basicMessage:"Already Initialized",detailMessage:"Call to Initialize failed because Initialize was already called."},104:{basicMessage:"Content Instance Terminated",detailMessage:"Call to Initialize failed because Terminate was already called."},111:{basicMessage:"General Termination Failure",detailMessage:"Call to Terminate failed for an unknown reason."},112:{basicMessage:"Termination Before Initialization",detailMessage:"Call to Terminate failed because it was made before the call to Initialize."},113:{basicMessage:"Termination After Termination",detailMessage:"Call to Terminate failed because Terminate was already called."},122:{basicMessage:"Retrieve Data Before Initialization",detailMessage:"Call to GetValue failed because it was made before the call to Initialize."},123:{basicMessage:"Retrieve Data After Termination",detailMessage:"Call to GetValue failed because it was made after the call to Terminate."},132:{basicMessage:"Store Data Before Initialization",detailMessage:"Call to SetValue failed because it was made before the call to Initialize."},133:{basicMessage:"Store Data After Termination",detailMessage:"Call to SetValue failed because it was made after the call to Terminate."},142:{basicMessage:"Commit Before Initialization",detailMessage:"Call to Commit failed because it was made before the call to Initialize."},143:{basicMessage:"Commit After Termination",detailMessage:"Call to Commit failed because it was made after the call to Terminate."},201:{basicMessage:"General Argument Error",detailMessage:"An invalid argument was passed to an API method (usually indicates that Initialize, Commit or Terminate did not receive the expected empty string argument."},301:{basicMessage:"General Get Failure",detailMessage:"Indicates a failed GetValue call where no other specific error code is applicable. Use GetDiagnostic for more information."},351:{basicMessage:"General Set Failure",detailMessage:"Indicates a failed SetValue call where no other specific error code is applicable. Use GetDiagnostic for more information."},391:{basicMessage:"General Commit Failure",detailMessage:"Indicates a failed Commit call where no other specific error code is applicable. Use GetDiagnostic for more information."},401:{basicMessage:"Undefined Data Model Element",detailMessage:"The data model element name passed to GetValue or SetValue is not a valid SCORM data model element."},402:{basicMessage:"Unimplemented Data Model Element",detailMessage:"The data model element indicated in a call to GetValue or SetValue is valid, but was not implemented by this LMS. In SCORM 2004, this error would indicate an LMS that is not fully SCORM conformant."},403:{basicMessage:"Data Model Element Value Not Initialized",detailMessage:"Attempt to read a data model element that has not been initialized by the LMS or through a SetValue call. This error condition is often reached during normal execution of a SCO."},404:{basicMessage:"Data Model Element Is Read Only",detailMessage:"SetValue was called with a data model element that can only be read."},405:{basicMessage:"Data Model Element Is Write Only",detailMessage:"GetValue was called on a data model element that can only be written to."},406:{basicMessage:"Data Model Element Type Mismatch",detailMessage:"SetValue was called with a value that is not consistent with the data format of the supplied data model element."},407:{basicMessage:"Data Model Element Value Out Of Range",detailMessage:"The numeric value supplied to a SetValue call is outside of the numeric range allowed for the supplied data model element."},408:{basicMessage:"Data Model Dependency Not Established",detailMessage:"Some data model elements cannot be set until another data model element was set. This error condition indicates that the prerequisite element was not set before the dependent element."}}}},56:function(e,t,r){var i,n,o,s;r.r(t),r.d(t,{CompletionStatus:function(){return o},LogLevelEnum:function(){return s},NAVBoolean:function(){return i},SuccessStatus:function(){return n}}),function(e){e.unknown="unknown",e.true="true",e.false="false"}(i||(i={})),function(e){e.passed="passed",e.failed="failed",e.unknown="unknown"}(n||(n={})),function(e){e.completed="completed",e.incomplete="incomplete",e.unknown="unknown"}(o||(o={})),function(e){e[e._=0]="_",e[e.DEBUG=1]="DEBUG",e[e.INFO=2]="INFO",e[e.WARN=3]="WARN",e[e.ERROR=4]="ERROR",e[e.NONE=5]="NONE"}(s||(s={}))},797:function(e,t,r){r.r(t),r.d(t,{global_errors:function(){return n},scorm12_errors:function(){return o},scorm2004_errors:function(){return s}});var i=r(635),n={GENERAL:101,INITIALIZATION_FAILED:101,INITIALIZED:101,TERMINATED:101,TERMINATION_FAILURE:101,TERMINATION_BEFORE_INIT:101,MULTIPLE_TERMINATION:101,RETRIEVE_BEFORE_INIT:101,RETRIEVE_AFTER_TERM:101,STORE_BEFORE_INIT:101,STORE_AFTER_TERM:101,COMMIT_BEFORE_INIT:101,COMMIT_AFTER_TERM:101,ARGUMENT_ERROR:101,CHILDREN_ERROR:101,COUNT_ERROR:101,GENERAL_GET_FAILURE:101,GENERAL_SET_FAILURE:101,GENERAL_COMMIT_FAILURE:101,UNDEFINED_DATA_MODEL:101,UNIMPLEMENTED_ELEMENT:101,VALUE_NOT_INITIALIZED:101,INVALID_SET_VALUE:101,READ_ONLY_ELEMENT:101,WRITE_ONLY_ELEMENT:101,TYPE_MISMATCH:101,VALUE_OUT_OF_RANGE:101,DEPENDENCY_NOT_ESTABLISHED:101},o=(0,i.__assign)((0,i.__assign)({},n),{RETRIEVE_BEFORE_INIT:301,STORE_BEFORE_INIT:301,COMMIT_BEFORE_INIT:301,ARGUMENT_ERROR:201,CHILDREN_ERROR:202,COUNT_ERROR:203,UNDEFINED_DATA_MODEL:401,UNIMPLEMENTED_ELEMENT:401,VALUE_NOT_INITIALIZED:301,INVALID_SET_VALUE:402,READ_ONLY_ELEMENT:403,WRITE_ONLY_ELEMENT:404,TYPE_MISMATCH:405,VALUE_OUT_OF_RANGE:407,DEPENDENCY_NOT_ESTABLISHED:408}),s=(0,i.__assign)((0,i.__assign)({},n),{INITIALIZATION_FAILED:102,INITIALIZED:103,TERMINATED:104,TERMINATION_FAILURE:111,TERMINATION_BEFORE_INIT:112,MULTIPLE_TERMINATIONS:113,RETRIEVE_BEFORE_INIT:122,RETRIEVE_AFTER_TERM:123,STORE_BEFORE_INIT:132,STORE_AFTER_TERM:133,COMMIT_BEFORE_INIT:142,COMMIT_AFTER_TERM:143,ARGUMENT_ERROR:201,GENERAL_GET_FAILURE:301,GENERAL_SET_FAILURE:351,GENERAL_COMMIT_FAILURE:391,UNDEFINED_DATA_MODEL:401,UNIMPLEMENTED_ELEMENT:402,VALUE_NOT_INITIALIZED:403,READ_ONLY_ELEMENT:404,WRITE_ONLY_ELEMENT:405,TYPE_MISMATCH:406,VALUE_OUT_OF_RANGE:407,DEPENDENCY_NOT_ESTABLISHED:408})},417:function(e,t,r){r.r(t),r.d(t,{aicc_regex:function(){return o},scorm12_regex:function(){return n},scorm2004_regex:function(){return s}});var i=r(635),n={CMIString256:"^.{0,255}$",CMIString4096:"^.{0,4096}$",CMITime:"^(?:[01]\\d|2[0123]):(?:[012345]\\d):(?:[012345]\\d)$",CMITimespan:"^([0-9]{2,}):([0-9]{2}):([0-9]{2})(.[0-9]{1,2})?$",CMIInteger:"^\\d+$",CMISInteger:"^-?([0-9]+)$",CMIDecimal:"^-?([0-9]{0,3})(.[0-9]*)?$",CMIIdentifier:"^[\\u0021-\\u007E\\s]{0,255}$",CMIFeedback:"^.{0,255}$",CMIIndex:"[._](\\d+).",CMIStatus:"^(passed|completed|failed|incomplete|browsed)$",CMIStatus2:"^(passed|completed|failed|incomplete|browsed|not attempted)$",CMIExit:"^(time-out|suspend|logout|)$",CMIType:"^(true-false|choice|fill-in|matching|performance|sequencing|likert|numeric)$",CMIResult:"^(correct|wrong|unanticipated|neutral|([0-9]{0,3})?(\\.[0-9]*)?)$",NAVEvent:"^(previous|continue)$",score_range:"0#100",audio_range:"-1#100",speed_range:"-100#100",weighting_range:"-100#100",text_range:"-1#1"},o=(0,i.__assign)((0,i.__assign)({},n),{CMIIdentifier:"^\\w{1,255}$"}),s={CMIString200:"^[\\u0000-\\uFFFF]{0,200}$",CMIString250:"^[\\u0000-\\uFFFF]{0,250}$",CMIString1000:"^[\\u0000-\\uFFFF]{0,1000}$",CMIString4000:"^[\\u0000-\\uFFFF]{0,4000}$",CMIString64000:"^[\\u0000-\\uFFFF]{0,64000}$",CMILang:"^([a-zA-Z]{2,3}|i|x)(-[a-zA-Z0-9-]{2,8})?$|^$",CMILangString250:"^({lang=([a-zA-Z]{2,3}|i|x)(-[a-zA-Z0-9-]{2,8})?})?((?!{.*$).{0,250}$)?$",CMILangcr:"^(({lang=([a-zA-Z]{2,3}|i|x)?(-[a-zA-Z0-9-]{2,8})?}))(.*?)$",CMILangString250cr:"^(({lang=([a-zA-Z]{2,3}|i|x)?(-[a-zA-Z0-9-]{2,8})?})?(.{0,250})?)?$",CMILangString4000:"^({lang=([a-zA-Z]{2,3}|i|x)(-[a-zA-Z0-9-]{2,8})?})?((?!{.*$).{0,4000}$)?$",CMITime:"^(19[7-9]{1}[0-9]{1}|20[0-2]{1}[0-9]{1}|203[0-8]{1})((-(0[1-9]{1}|1[0-2]{1}))((-(0[1-9]{1}|[1-2]{1}[0-9]{1}|3[0-1]{1}))(T([0-1]{1}[0-9]{1}|2[0-3]{1})((:[0-5]{1}[0-9]{1})((:[0-5]{1}[0-9]{1})((\\.[0-9]{1,2})((Z|([+|-]([0-1]{1}[0-9]{1}|2[0-3]{1})))(:[0-5]{1}[0-9]{1})?)?)?)?)?)?)?)?$",CMITimespan:"^P(?:([.,\\d]+)Y)?(?:([.,\\d]+)M)?(?:([.,\\d]+)W)?(?:([.,\\d]+)D)?(?:T?(?:([.,\\d]+)H)?(?:([.,\\d]+)M)?(?:([.,\\d]+)S)?)?$",CMIInteger:"^\\d+$",CMISInteger:"^-?([0-9]+)$",CMIDecimal:"^-?([0-9]{1,5})(\\.[0-9]{1,18})?$",CMIIdentifier:"^\\S{1,250}[a-zA-Z0-9]$",CMIShortIdentifier:"^[\\w\\.\\-\\_]{1,250}$",CMILongIdentifier:"^(?:(?!urn:)\\S{1,4000}|urn:[A-Za-z0-9-]{1,31}:\\S{1,4000}|.{1,4000})$",CMIFeedback:"^.*$",CMIIndex:"[._](\\d+).",CMIIndexStore:".N(\\d+).",CMICStatus:"^(completed|incomplete|not attempted|unknown)$",CMISStatus:"^(passed|failed|unknown)$",CMIExit:"^(time-out|suspend|logout|normal)$",CMIType:"^(true-false|choice|fill-in|long-fill-in|matching|performance|sequencing|likert|numeric|other)$",CMIResult:"^(correct|incorrect|unanticipated|neutral|-?([0-9]{1,4})(\\.[0-9]{1,18})?)$",NAVEvent:"^(previous|continue|exit|exitAll|abandon|abandonAll|suspendAll|_none_|(\\{target=(?<choice_target>\\S{0,}[a-zA-Z0-9-_]+)})?choice|(\\{target=(?<jump_target>\\S{0,}[a-zA-Z0-9-_]+)})?jump)$",NAVBoolean:"^(unknown|true|false$)",NAVTarget:"^{target=\\S{0,}[a-zA-Z0-9-_]+}$",scaled_range:"-1#1",audio_range:"0#*",speed_range:"0#*",text_range:"-1#1",progress_range:"0#1"}},784:function(e,t,r){r.r(t),r.d(t,{BaseScormValidationError:function(){return n},ValidationError:function(){return o}});var i=r(635),n=function(e){function t(t){var r=e.call(this,t.toString())||this;return r._errorCode=t,r.name="ScormValidationError",r}return(0,i.__extends)(t,e),Object.defineProperty(t.prototype,"errorCode",{get:function(){return this._errorCode},enumerable:!1,configurable:!0}),t}(Error),o=function(e){function t(t,r,i){var n=e.call(this,t)||this;return n._detailedMessage="",n.message=r,n._errorMessage=r,i&&(n._detailedMessage=i),n}return(0,i.__extends)(t,e),Object.defineProperty(t.prototype,"errorMessage",{get:function(){return this._errorMessage},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"detailedMessage",{get:function(){return this._detailedMessage},enumerable:!1,configurable:!0}),t}(n)},179:function(e,t,r){r.r(t),r.d(t,{Scorm12ValidationError:function(){return s}});var i=r(635),n=r(784),o=r(340).scorm12_constants.error_descriptions,s=function(e){function t(t){return{}.hasOwnProperty.call(o,String(t))?e.call(this,t,o[String(t)].basicMessage,o[String(t)].detailMessage)||this:e.call(this,101,o[101].basicMessage,o[101].detailMessage)||this}return(0,i.__extends)(t,e),t}(n.ValidationError)},864:function(e,t,r){r.r(t),r.d(t,{SECONDS_PER_DAY:function(){return s},SECONDS_PER_HOUR:function(){return o},SECONDS_PER_MINUTE:function(){return n},SECONDS_PER_SECOND:function(){return i},addHHMMSSTimeStrings:function(){return h},addTwoDurations:function(){return d},countDecimals:function(){return p},flatten:function(){return m},formatMessage:function(){return g},getDurationAsSeconds:function(){return _},getSecondsAsHHMMSS:function(){return c},getSecondsAsISODuration:function(){return l},getTimeAsSeconds:function(){return u},stringMatches:function(){return E},unflatten:function(){return f}});var i=1,n=60,o=60*n,s=24*o,a={D:s,H:o,M:n,S:i};function c(e){if(!e||e<=0)return"00:00:00";var t=Math.floor(e/o),r=new Date(1e3*e),i=r.getUTCMinutes(),n=r.getSeconds(),s=e%1,a="";return p(s)>0&&(a="."+(a=p(s)>2?s.toFixed(2):String(s)).split(".")[1]),(t+":"+i+":"+n).replace(/\b\d\b/g,"0$&")+a}function l(e){if(!e||e<=0)return"PT0S";var t="P",r=e;for(var i in a){var n=a[i],o=Math.floor(r/n);p(r%=n)>2&&(r=Number(Number(r).toFixed(2))),"S"===i&&r>0&&(o+=r),o&&((t.indexOf("D")>0||"H"===i||"M"===i||"S"===i)&&-1===t.indexOf("T")&&(t+="T"),t+="".concat(o).concat(i))}return t}function u(e,t){if("number"!=typeof e&&"boolean"!=typeof e||(e=String(e)),"string"==typeof t&&(t=new RegExp(t)),!e||!e.match(t))return 0;var r=e.split(":");return 3600*Number(r[0])+60*Number(r[1])+Number(r[2])}function _(e,t){if("string"==typeof t&&(t=new RegExp(t)),!e||!e.match(t))return 0;var r=new RegExp(t).exec(e)||[],i=r[1],n=(r[2],r[4]),o=r[5],s=r[6],a=r[7],c=0;return c+=Number(a)||0,c+=60*Number(s)||0,c+=3600*Number(o)||0,(c+=86400*Number(n)||0)+(31536e3*Number(i)||0)}function d(e,t,r){var i="string"==typeof r?new RegExp(r):r;return l(_(e,i)+_(t,i))}function h(e,t,r){return"string"==typeof r&&(r=new RegExp(r)),c(u(e,r)+u(t,r))}function m(e){var t={};return function e(r,i){if(Object(r)!==r)t[i]=r;else if(Array.isArray(r))for(var n=0,o=r.length;n<o;n++)e(r[n],i+"["+n+"]"),0===o&&(t[i]=[]);else{var s=!0;for(var a in r)({}).hasOwnProperty.call(r,a)&&(s=!1,e(r[a],i?i+"."+a:a));s&&i&&(t[i]={})}}(e,""),t}function f(e){if(Object(e)!==e||Array.isArray(e))return e;var t=/\.?([^.[\]]+)|\[(\d+)]/g,r={};for(var i in e)if({}.hasOwnProperty.call(e,i)){for(var n=r,o="",s=t.exec(i);s;)n=n[o]||(n[o]=s[2]?[]:{}),o=s[2]||s[1],s=t.exec(i);n[o]=e[i]}return r[""]||r}function p(e){return Math.floor(e)===e||String(e).indexOf(".")<0?0:e.toString().split(".")[1].length||0}function g(e,t,r){for(var i="",n=20-(i+=e).length,o=0;o<n;o++)i+=" ";if(i+=": ",r){n=70-(i+=r).length;for(var s=0;s<n;s++)i+=" "}return t&&(i+=t),i}function E(e,t){return null!==(null==e?void 0:e.match(t))}},635:function(e,t,r){r.r(t),r.d(t,{__addDisposableResource:function(){return j},__assign:function(){return o},__asyncDelegator:function(){return C},__asyncGenerator:function(){return I},__asyncValues:function(){return O},__await:function(){return S},__awaiter:function(){return m},__classPrivateFieldGet:function(){return A},__classPrivateFieldIn:function(){return x},__classPrivateFieldSet:function(){return R},__createBinding:function(){return p},__decorate:function(){return a},__disposeResources:function(){return D},__esDecorate:function(){return l},__exportStar:function(){return g},__extends:function(){return n},__generator:function(){return f},__importDefault:function(){return L},__importStar:function(){return N},__makeTemplateObject:function(){return w},__metadata:function(){return h},__param:function(){return c},__propKey:function(){return _},__read:function(){return y},__rest:function(){return s},__runInitializers:function(){return u},__setFunctionName:function(){return d},__spread:function(){return b},__spreadArray:function(){return M},__spreadArrays:function(){return v},__values:function(){return E}});var i=function(e,t){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},i(e,t)};function n(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var o=function(){return o=Object.assign||function(e){for(var t,r=1,i=arguments.length;r<i;r++)for(var n in t=arguments[r])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},o.apply(this,arguments)};function s(e,t){var r={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(r[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(i=Object.getOwnPropertySymbols(e);n<i.length;n++)t.indexOf(i[n])<0&&Object.prototype.propertyIsEnumerable.call(e,i[n])&&(r[i[n]]=e[i[n]])}return r}function a(e,t,r,i){var n,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(o<3?n(s):o>3?n(t,r,s):n(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s}function c(e,t){return function(r,i){t(r,i,e)}}function l(e,t,r,i,n,o){function s(e){if(void 0!==e&&"function"!=typeof e)throw new TypeError("Function expected");return e}for(var a,c=i.kind,l="getter"===c?"get":"setter"===c?"set":"value",u=!t&&e?i.static?e:e.prototype:null,_=t||(u?Object.getOwnPropertyDescriptor(u,i.name):{}),d=!1,h=r.length-1;h>=0;h--){var m={};for(var f in i)m[f]="access"===f?{}:i[f];for(var f in i.access)m.access[f]=i.access[f];m.addInitializer=function(e){if(d)throw new TypeError("Cannot add initializers after decoration has completed");o.push(s(e||null))};var p=(0,r[h])("accessor"===c?{get:_.get,set:_.set}:_[l],m);if("accessor"===c){if(void 0===p)continue;if(null===p||"object"!=typeof p)throw new TypeError("Object expected");(a=s(p.get))&&(_.get=a),(a=s(p.set))&&(_.set=a),(a=s(p.init))&&n.unshift(a)}else(a=s(p))&&("field"===c?n.unshift(a):_[l]=a)}u&&Object.defineProperty(u,i.name,_),d=!0}function u(e,t,r){for(var i=arguments.length>2,n=0;n<t.length;n++)r=i?t[n].call(e,r):t[n].call(e);return i?r:void 0}function _(e){return"symbol"==typeof e?e:"".concat(e)}function d(e,t,r){return"symbol"==typeof t&&(t=t.description?"[".concat(t.description,"]"):""),Object.defineProperty(e,"name",{configurable:!0,value:r?"".concat(r," ",t):t})}function h(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function m(e,t,r,i){return new(r||(r=Promise))((function(n,o){function s(e){try{c(i.next(e))}catch(e){o(e)}}function a(e){try{c(i.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}c((i=i.apply(e,t||[])).next())}))}function f(e,t){var r,i,n,o={label:0,sent:function(){if(1&n[0])throw n[1];return n[1]},trys:[],ops:[]},s=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return s.next=a(0),s.throw=a(1),s.return=a(2),"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(a){return function(c){return function(a){if(r)throw new TypeError("Generator is already executing.");for(;s&&(s=0,a[0]&&(o=0)),o;)try{if(r=1,i&&(n=2&a[0]?i.return:a[0]?i.throw||((n=i.return)&&n.call(i),0):i.next)&&!(n=n.call(i,a[1])).done)return n;switch(i=0,n&&(a=[2&a[0],n.value]),a[0]){case 0:case 1:n=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,i=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!((n=(n=o.trys).length>0&&n[n.length-1])||6!==a[0]&&2!==a[0])){o=0;continue}if(3===a[0]&&(!n||a[1]>n[0]&&a[1]<n[3])){o.label=a[1];break}if(6===a[0]&&o.label<n[1]){o.label=n[1],n=a;break}if(n&&o.label<n[2]){o.label=n[2],o.ops.push(a);break}n[2]&&o.ops.pop(),o.trys.pop();continue}a=t.call(e,o)}catch(e){a=[6,e],i=0}finally{r=n=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,c])}}}var p=Object.create?function(e,t,r,i){void 0===i&&(i=r);var n=Object.getOwnPropertyDescriptor(t,r);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,n)}:function(e,t,r,i){void 0===i&&(i=r),e[i]=t[r]};function g(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||p(t,e,r)}function E(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],i=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&i>=e.length&&(e=void 0),{value:e&&e[i++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function y(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var i,n,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(i=o.next()).done;)s.push(i.value)}catch(e){n={error:e}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return s}function b(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(y(arguments[t]));return e}function v(){for(var e=0,t=0,r=arguments.length;t<r;t++)e+=arguments[t].length;var i=Array(e),n=0;for(t=0;t<r;t++)for(var o=arguments[t],s=0,a=o.length;s<a;s++,n++)i[n]=o[s];return i}function M(e,t,r){if(r||2===arguments.length)for(var i,n=0,o=t.length;n<o;n++)!i&&n in t||(i||(i=Array.prototype.slice.call(t,0,n)),i[n]=t[n]);return e.concat(i||Array.prototype.slice.call(t))}function S(e){return this instanceof S?(this.v=e,this):new S(e)}function I(e,t,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var i,n=r.apply(e,t||[]),o=[];return i=Object.create(("function"==typeof AsyncIterator?AsyncIterator:Object).prototype),s("next"),s("throw"),s("return",(function(e){return function(t){return Promise.resolve(t).then(e,l)}})),i[Symbol.asyncIterator]=function(){return this},i;function s(e,t){n[e]&&(i[e]=function(t){return new Promise((function(r,i){o.push([e,t,r,i])>1||a(e,t)}))},t&&(i[e]=t(i[e])))}function a(e,t){try{(r=n[e](t)).value instanceof S?Promise.resolve(r.value.v).then(c,l):u(o[0][2],r)}catch(e){u(o[0][3],e)}var r}function c(e){a("next",e)}function l(e){a("throw",e)}function u(e,t){e(t),o.shift(),o.length&&a(o[0][0],o[0][1])}}function C(e){var t,r;return t={},i("next"),i("throw",(function(e){throw e})),i("return"),t[Symbol.iterator]=function(){return this},t;function i(i,n){t[i]=e[i]?function(t){return(r=!r)?{value:S(e[i](t)),done:!1}:n?n(t):t}:n}}function O(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,r=e[Symbol.asyncIterator];return r?r.call(e):(e=E(e),t={},i("next"),i("throw"),i("return"),t[Symbol.asyncIterator]=function(){return this},t);function i(r){t[r]=e[r]&&function(t){return new Promise((function(i,n){!function(e,t,r,i){Promise.resolve(i).then((function(t){e({value:t,done:r})}),t)}(i,n,(t=e[r](t)).done,t.value)}))}}}function w(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var T=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t};function N(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&p(t,e,r);return T(t,e),t}function L(e){return e&&e.__esModule?e:{default:e}}function A(e,t,r,i){if("a"===r&&!i)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?i:"a"===r?i.call(e):i?i.value:t.get(e)}function R(e,t,r,i,n){if("m"===i)throw new TypeError("Private method is not writable");if("a"===i&&!n)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===i?n.call(e,r):n?n.value=r:t.set(e,r),r}function x(e,t){if(null===t||"object"!=typeof t&&"function"!=typeof t)throw new TypeError("Cannot use 'in' operator on non-object");return"function"==typeof e?t===e:e.has(t)}function j(e,t,r){if(null!=t){if("object"!=typeof t&&"function"!=typeof t)throw new TypeError("Object expected.");var i,n;if(r){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");i=t[Symbol.asyncDispose]}if(void 0===i){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");i=t[Symbol.dispose],r&&(n=i)}if("function"!=typeof i)throw new TypeError("Object not disposable.");n&&(i=function(){try{n.call(this)}catch(e){return Promise.reject(e)}}),e.stack.push({value:t,dispose:i,async:r})}else r&&e.stack.push({async:!0});return t}var P="function"==typeof SuppressedError?SuppressedError:function(e,t,r){var i=new Error(r);return i.name="SuppressedError",i.error=e,i.suppressed=t,i};function D(e){function t(t){e.error=e.hasError?new P(t,e.error,"An error was suppressed during disposal."):t,e.hasError=!0}var r,i=0;return function n(){for(;r=e.stack.pop();)try{if(!r.async&&1===i)return i=0,e.stack.push(r),Promise.resolve().then(n);if(r.dispose){var o=r.dispose.call(r.value);if(r.async)return i|=2,Promise.resolve(o).then(n,(function(e){return t(e),n()}))}else i|=1}catch(e){t(e)}if(1===i)return e.hasError?Promise.reject(e.error):Promise.resolve();if(e.hasError)throw e.error}()}t.default={__extends:n,__assign:o,__rest:s,__decorate:a,__param:c,__metadata:h,__awaiter:m,__generator:f,__createBinding:p,__exportStar:g,__values:E,__read:y,__spread:b,__spreadArrays:v,__spreadArray:M,__await:S,__asyncGenerator:I,__asyncDelegator:C,__asyncValues:O,__makeTemplateObject:w,__importStar:N,__importDefault:L,__classPrivateFieldGet:A,__classPrivateFieldSet:R,__classPrivateFieldIn:x,__addDisposableResource:j,__disposeResources:D}}},t={};function r(i){var n=t[i];if(void 0!==n)return n.exports;var o=t[i]={exports:{}};return e[i](o,o.exports,r),o.exports}r.d=function(e,t){for(var i in t)r.o(t,i)&&!r.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var i={};r.r(i),r.d(i,{AICC:function(){return n.AICC},Scorm12API:function(){return o.Scorm12API},Scorm2004API:function(){return s.Scorm2004API}});var n=r(916),o=r(941),s=r(809),a=i.AICC,c=i.Scorm12API,l=i.Scorm2004API;export{a as AICC,c as Scorm12API,l as Scorm2004API};
2
2
  //# sourceMappingURL=scorm-again.min.js.map